export type AssetGraph = { assets: Array<{ kind: AssetKind; path: string; /** * Fork workspaces only — 'fork' when this ducklake asset was materialized in the fork itself, 'deferred' when reads fall back to the parent workspace's current table via a defer view. Omitted otherwise. */ fork_materialization?: 'fork' | 'deferred'; dbt?: DbtAssetProvenance; }>; runnables: Array<{ path: string; usage_kind: AssetUsageKind; /** * True iff the script is a pipeline member (deployed with `// pipeline`). Omitted when false. */ in_pipeline?: boolean; /** * Macros this script provides to the workspace registry (deployed `// macros` library). Omitted when empty. */ macros?: Array<{ name: string; /** * verbatim parameter list */ params: string; is_table: boolean; }>; /** * Set on a `dbt` script, which owns a whole project rather than a single output. Omitted otherwise. */ dbt?: { model_count: number; }; }>; edges: Array<{ runnable_path: string; runnable_kind: AssetUsageKind; asset_kind: AssetKind; asset_path: string; access_type?: AssetUsageAccessType; }>; triggers: Array<({ trigger_kind: 'asset'; asset_kind: AssetKind; asset_path: string; runnable_kind: AssetUsageKind; runnable_path: string; } | { trigger_kind: 'schedule' | 'email' | 'kafka' | 'mqtt' | 'nats' | 'postgres' | 'sqs' | 'gcp'; path: string; runnable_kind: AssetUsageKind; runnable_path: string; })>; /** * Macro-library → consumer edges (deploy-recorded call detection plus `// use`). Omitted when empty. */ macro_edges?: Array<{ lib_path: string; consumer_path: string; macro_names: Array<(string)>; via_use: boolean; }>; /** * Ordering-only "must-run-after" edges — a `// data_test relationships` (or custom test reading a pipeline asset) requires the referenced asset's producer to run before the tested script. Not a data-consumption edge; fed into the cascade topo-sort so cold runs order correctly. Omitted when empty. */ test_edges?: Array<{ producer_kind: AssetUsageKind; producer_path: string; runnable_kind: AssetUsageKind; runnable_path: string; asset_kind: AssetKind; asset_path: string; }>; /** * `ref()` lineage BETWEEN two dbt models, in the terms the canvas draws — the relations, not dbt's node ids. Without it every model hangs off the one dbt runnable and the project reads as a flat fan-out. Omitted when empty. */ dbt_edges?: Array<{ from_asset_path: string; to_asset_path: string; }>; /** * The job whose own snapshot the dbt half was resolved from, when one was asked for and found. A run page polls the graph while its job runs, because a dynamic descriptor's snapshot is written mid-run, and this is what tells it to stop. Omitted when the answer came from the version's deployed graph. */ dbt_snapshot_job?: string; /** * When the dbt half on screen was parsed, for a graph pinned to a job. What the dbt editor labels its provenance with — "parsed from the editor at 14:32" against "as of last deploy" — since the two are drawn identically and the ambiguity would otherwise just move into the editor. Omitted for the unpinned workspace graph, which spans every project and so has no one time. */ dbt_graph_ingested_at?: string; }; /** * The direct column-to-column lineage the asked-for relations' columns sit in — the connected component around them — in the terms the canvas draws: relations and columns, never dbt's node ids. */ export type DbtColumnLineage = { edges: Array<{ from_asset_path: string; from_column: string; to_asset_path: string; to_column: string; /** * dbt's own word for how the value travelled — `copy` (passthrough) or `mod` (transformed). Not an enum: the engine treats the set as open. */ kind: string; }>; /** * The component reaches further than `edges`, which holds the part nearest the asked-for relations. A trace that stops short is otherwise indistinguishable from one that ends. */ truncated: boolean; }; /** * What dbt says about the model, snapshot, seed or source that produces (or, for a source, is read at) this relation. A dbt project is one runnable node with many model assets, so per-model metadata belongs here rather than on the script. */ export type DbtAssetProvenance = { /** * dbt's own node id, e.g. `model.jaffle_shop.customers`. */ unique_id: string; resource_type: 'model' | 'snapshot' | 'seed' | 'source'; /** * dbt's own word (`table`, `view`, `incremental`, `snapshot`). */ materialized?: string; /** * The Windmill write strategy it maps to, absent for `view` and `ephemeral`, which have none. */ materialize_strategy?: string; tags?: Array<(string)>; description?: string; data_tests?: Array<{ /** * One of the four generic tests, or a package test's namespaced name (`dbt_utils.accepted_range`). */ kind: string; column?: string; args?: { [key: string]: unknown; }; /** * Lowercased. dbt's severity decides whether a failure fails the run. */ severity?: string; }>; /** * Declared column metadata (name -> description) — what `manifest.json` carries, which is only the columns an author wrote down. Omitted when the caller cannot read the script. */ columns?: { [key: string]: unknown; }; /** * Every column of the relation, typed and in the order the model produces them, from the engine's static analysis. Present only for a project that opted into it, and gated like `columns` and the model's SQL: a full column list is the shape of what the author wrote. */ column_schema?: Array<{ name: string; /** * The declared type where `schema.yml` gives one, else the inferred one. Omitted when neither is known. */ type?: string; }>; /** * A source's declared freshness policy, for the staleness chip. */ freshness?: { [key: string]: unknown; }; /** * The model's SQL as written, at the deploy this graph belongs to. Omitted when the caller cannot read the script. */ raw_code?: string; /** * Its path inside the dbt project, e.g. `models/staging/stg_orders.sql`. */ original_file_path?: string; }; /** * Overlay fields added to every "get by path" response that accepts * the `get_draft` query parameter. The deployed payload is sent * untouched in the response body; the authed user's saved draft * for this path — whatever shape the editor wrote — is attached * as the sibling `draft` field when `get_draft=true` and a draft * exists. The frontend pairs the two to present diff / reset / * discard UI; the server never merges them. * * When `no_deployed=true` there is no deployed row at this path — * the response body is a best-effort stand-in synthesized from * the draft, and only `draft` is canonical. Callers should disable * "diff vs deployed" UI in that case. * */ export type UserDraftOverlay = { is_draft: boolean; draft_saved_at?: string; /** * The deployed version the draft forked from, as text whatever the * kind (script hash, flow version id, app version id). Compare to the * deployed head to tell a draft that is behind. Absent when there is * no draft or it was never forked from a deploy. * */ draft_base?: string; no_deployed?: boolean; draft?: { [key: string]: unknown; }; /** * Other workspace users (and the legacy NULL-email row, if any) * with a saved draft at the same path. Populated only on the * authed user's "get by path" responses for kinds the editor * surfaces a fork banner for (script, flow, app, raw_app). * Empty / omitted for kinds without that UI. * */ other_drafts_users?: Array<{ /** * Workspace username of the draft owner. `null` represents * the legacy workspace-level (NULL-email) row. Emails never * leave the server. * */ username?: string | null; /** * When this user's draft was last saved (`draft.created_at`), * surfaced in the fork modal as "Last updated". * */ draft_saved_at: string; }>; }; /** * Closed set of item kinds a user can autosave as a draft. Mirrors the * Postgres `DRAFT_KIND` enum and the backend `UserDraftItemKind`. * */ export type UserDraftItemKind = 'script' | 'flow' | 'app' | 'raw_app' | 'resource' | 'variable' | 'trigger_schedule' | 'trigger_webhook' | 'trigger_default_email' | 'trigger_email' | 'trigger_http' | 'trigger_websocket' | 'trigger_postgres' | 'trigger_kafka' | 'trigger_nats' | 'trigger_mqtt' | 'trigger_amqp' | 'trigger_sqs' | 'trigger_gcp' | 'trigger_azure' | 'trigger_poll' | 'trigger_cli' | 'trigger_nextcloud' | 'trigger_google' | 'trigger_github' | 'data_pipeline'; /** * Top-level flow definition containing metadata, configuration, and the flow structure */ export type OpenFlow = { /** * Short description of what this flow does */ summary: string; /** * Detailed documentation for this flow */ description?: string; value: FlowValue; /** * JSON Schema for flow inputs. Use this to define input parameters, their types, defaults, and validation. For resource inputs, set type to 'object' and format to 'resource-' (e.g., 'resource-stripe') */ schema?: { [key: string]: unknown; }; /** * Address of the account the flow runs on behalf of. Derived from on_behalf_of on read; accepted on write, where it is resolved to the account it names. */ on_behalf_of_email?: string; /** * The flow runs with the permissions of this identity: u/{username}, g/{group}, or a bare email when the username is itself email-shaped. The only stored half of the identity; on_behalf_of_email is derived from it. Omit it when writing and it is resolved from that address instead. */ on_behalf_of?: string; }; /** * The flow structure containing modules and optional preprocessor/failure handlers */ export type FlowValue = { /** * Array of steps that execute in sequence. Each step can be a script, subflow, loop, or branch */ modules: Array; /** * Special module that executes when the flow fails. Receives error object with message, name, stack, and step_id. Must have id 'failure'. Only supports script/rawscript types */ failure_module?: FlowModule; /** * Special module that runs before the first step on external triggers. Must have id 'preprocessor'. Only supports script/rawscript types. Cannot reference other step results */ preprocessor_module?: FlowModule; /** * If true, all steps run on the same worker for better performance */ same_worker?: boolean; /** * If true and the flow runs on a custom worker tag, steps that declare their own non-empty tag run on it instead of inheriting the flow tag. Steps without their own tag still inherit the flow tag. */ preserve_step_tags?: boolean; /** * Maximum number of concurrent executions of this flow */ concurrent_limit?: number; /** * Expression to group concurrent executions (e.g., by user ID) */ concurrency_key?: string; /** * Time window in seconds for concurrent_limit */ concurrency_time_window_s?: number; /** * Delay in seconds to debounce flow executions */ debounce_delay_s?: number; /** * Expression to group debounced executions */ debounce_key?: string; /** * Arguments to accumulate across debounced executions */ debounce_args_to_accumulate?: Array<(string)>; /** * Maximum total time in seconds that a job can be debounced */ max_total_debouncing_time?: number; /** * Maximum number of times a job can be debounced */ max_total_debounces_amount?: number; /** * JavaScript expression to conditionally skip the entire flow */ skip_expr?: string; /** * Cache duration in seconds for flow results */ cache_ttl?: number; cache_ignore_s3_path?: boolean; /** * If set, delete the flow job's args, result and logs after this many seconds following job completion */ delete_after_secs?: number; /** * Environment variables available to all steps. Values can be strings, JSON values, or special references: '$var:path' (workspace variable) or '$res:path' (resource). */ flow_env?: { [key: string]: unknown; }; /** * Execution priority (higher numbers run first) */ priority?: number; /** * JavaScript expression to return early from the flow */ early_return?: string; /** * Whether this flow accepts chat-style input */ chat_input_enabled?: boolean; /** * Sticky notes attached to the flow */ notes?: Array; /** * Semantic groups of modules for organizational purposes */ groups?: Array<{ /** * Display name for this group */ summary?: string; /** * Markdown note shown below the group header */ note?: string; /** * If true, this group is collapsed by default in the flow editor. UI hint only. */ autocollapse?: boolean; /** * ID of the first flow module in this group (topological entry point) */ start_id: string; /** * ID of the last flow module in this group (topological exit point) */ end_id: string; /** * Color for the group in the flow editor */ color?: string; }>; }; /** * Retry configuration for failed module executions */ export type Retry = { /** * Retry with constant delay between attempts */ constant?: { /** * Number of retry attempts */ attempts?: number; /** * Seconds to wait between retries */ seconds?: number; }; /** * Retry with exponential backoff (delay doubles each time) */ exponential?: { /** * Number of retry attempts */ attempts?: number; /** * Multiplier for exponential backoff */ multiplier?: number; /** * Initial delay in seconds */ seconds?: number; /** * Random jitter percentage (0-100) to avoid thundering herd */ random_factor?: number; }; /** * Conditional retry based on error or result */ retry_if?: { /** * JavaScript expression that returns true to retry. Has access to 'result' and 'error' variables */ expr: string; }; }; /** * Early termination condition for a module */ export type StopAfterIf = { /** * If true, following steps are skipped when this condition triggers */ skip_if_stopped?: boolean; /** * JavaScript expression evaluated after the module runs. Can use 'result' (step's result) or 'flow_input'. Return true to stop */ expr: string; /** * Custom error message when stopping with an error. Mutually exclusive with skip_if_stopped. If set to a non-empty string, the flow stops with this error. If empty string, a default error message is used. If null or omitted, no error is raised. */ error_message?: string | null; /** * When stopping with an error (error_message set), embed the stopping step's own result inside the raised error object (as error.result) instead of discarding it. The top-level result stays { error }. Defaults to false. */ error_include_result?: boolean; }; /** * A single step in a flow. Can be a script, subflow, loop, or branch */ export type FlowModule = { /** * Unique identifier for this step. Used to reference results via 'results.step_id'. Must be a valid identifier (alphanumeric, underscore, hyphen) */ id: string; value: FlowModuleValue; /** * Early termination condition evaluated after this step completes */ stop_after_if?: StopAfterIf; /** * For loops only - early termination condition evaluated after all iterations complete */ stop_after_all_iters_if?: StopAfterIf; /** * Conditionally skip this step based on previous results or flow inputs */ skip_if?: { /** * JavaScript expression that returns true to skip. Can use 'flow_input' or 'results.' */ expr: string; }; /** * Delay before executing this step (in seconds or as expression) */ sleep?: InputTransform; /** * Cache duration in seconds for this step's results */ cache_ttl?: number; cache_ignore_s3_path?: boolean; /** * Maximum execution time in seconds (static value or expression) */ timeout?: InputTransform; /** * If set, delete the step's args, result and logs after this many seconds following job completion */ delete_after_secs?: number; /** * Short description of what this step does */ summary?: string; /** * Mock configuration for testing without executing the actual step */ mock?: { /** * If true, return mock value instead of executing */ enabled?: boolean; /** * Value to return when mocked */ return_value?: unknown; }; /** * Configuration for approval/resume steps that wait for user input */ suspend?: { /** * Number of approvals required before continuing */ required_events?: number; /** * Timeout in seconds before auto-continuing or canceling */ timeout?: number; /** * Form schema for collecting input when resuming */ resume_form?: { /** * JSON Schema for the resume form */ schema?: { [key: string]: unknown; }; }; /** * If true, only authenticated users can approve */ user_auth_required?: boolean; /** * Expression or list of groups that can approve */ user_groups_required?: InputTransform; /** * If true, the user who started the flow cannot approve */ self_approval_disabled?: boolean; /** * If true, hide the cancel button on the approval form */ hide_cancel?: boolean; /** * If true, continue flow on timeout instead of canceling */ continue_on_disapprove_timeout?: boolean; /** * How the approval request is presented, on the approval page and in Slack/Teams approval messages. 'detailed' (used when unset) shows the flow details (arguments, graph, approvers); 'minimal' shows only the request: the step description, form and approve/reject actions */ skin?: 'detailed' | 'minimal'; }; /** * Execution priority for this step (higher numbers run first) */ priority?: number; /** * If true, flow continues even if this step fails */ continue_on_error?: boolean; /** * Retry configuration if this step fails */ retry?: Retry; /** * Debounce configuration for this step (EE only) */ debouncing?: { /** * Delay in seconds to debounce this step's executions across flow runs */ debounce_delay_s?: number; /** * Expression to group debounced executions. Supports $workspace and $args[name]. Default: $workspace/flow/- */ debounce_key?: string; /** * Array-type arguments to accumulate across debounced executions */ debounce_args_to_accumulate?: Array<(string)>; /** * Maximum total time in seconds before forced execution */ max_total_debouncing_time?: number; /** * Maximum number of debounces before forced execution */ max_total_debounces_amount?: number; }; }; /** * Maps input parameters for a step. Can be a static value or a JavaScript expression that references previous results or flow inputs */ export type InputTransform = StaticTransform | JavascriptTransform | AiTransform; /** * Static value passed directly to the step. Use for hardcoded values or resource references like '$res:path/to/resource' */ export type StaticTransform = { /** * The static value. For resources, use format '$res:path/to/resource' */ value?: unknown; type: 'static'; }; /** * JavaScript expression evaluated at runtime. Can reference previous step results via 'results.step_id' or flow inputs via 'flow_input.property'. Inside for loops, use 'flow_input.iter.value' for the current iteration value (in while loops it equals 'flow_input.iter.index') */ export type JavascriptTransform = { /** * JavaScript expression returning the value. Available variables - results (object with all previous step results), flow_input (flow inputs), flow_input.iter (in loops) */ expr: string; type: 'javascript'; }; /** * Value resolved by the AI runtime for this input. The AI engine decides how to satisfy the parameter. */ export type AiTransform = { type: 'ai'; }; /** * Complete AI provider configuration with resource reference and model selection */ export type ProviderConfig = { /** * Supported AI provider types */ kind: 'openai' | 'azure_openai' | 'azure_foundry' | 'anthropic' | 'mistral' | 'deepseek' | 'googleai' | 'groq' | 'openrouter' | 'togetherai' | 'customai' | 'aws_bedrock'; /** * Resource reference in format '$res:{resource_path}' pointing to provider credentials */ resource: string; /** * Model identifier (e.g., 'gpt-4', 'claude-3-opus-20240229', 'gemini-pro') */ model: string; /** * Provider-native reasoning effort token (e.g. 'low', 'high', 'none') for models that support extended thinking. Optional; unset leaves the provider default. */ reasoning_effort?: string; }; /** * Managed memory, stored by Windmill and replayed with each request. The memory is named by a memory id, see `memory_id`. While it is off, a step can supply its history in `previous_messages`. */ export type MemoryConfig = { kind: 'off'; } | { kind: 'window'; /** * Number of most recent messages to load and store. 0 turns memory off. */ context_length: number; } | { kind: 'auto'; /** * Maximum number of messages to retain in context */ context_length?: number; /** * Identifier for persistent memory across agent invocations */ memory_id?: string; } | { kind: 'manual'; messages: Array<{ role: 'user' | 'assistant' | 'system'; content: string; }>; }; /** * The actual implementation of a flow step. Can be a script (inline or referenced), subflow, loop, branch, or special module type */ export type FlowModuleValue = RawScript | PathScript | PathFlow | ForloopFlow | WhileloopFlow | BranchOne | BranchAll | Identity | AiAgent; /** * Inline script with code defined directly in the flow. Use 'bun' as default language if unspecified. The script receives arguments from input_transforms */ export type RawScript = { /** * Map of parameter names to their values (static or JavaScript expressions). These become the script's input arguments */ input_transforms: { [key: string]: InputTransform; }; /** * The script source code. Should export a 'main' function */ content: string; /** * Programming language for this script */ language: 'deno' | 'bun' | 'bunnative' | 'python3' | 'go' | 'bash' | 'powershell' | 'postgresql' | 'mysql' | 'bigquery' | 'snowflake' | 'mssql' | 'oracledb' | 'graphql' | 'nativets' | 'php' | 'rust' | 'ansible' | 'csharp' | 'nu' | 'java' | 'ruby' | 'rlang' | 'duckdb'; /** * Optional path for saving this script */ path?: string; /** * Lock file content for dependencies */ lock?: string; type: 'rawscript'; /** * Worker group tag for execution routing */ tag?: string; /** * Maximum concurrent executions of this script */ concurrent_limit?: number; /** * Time window for concurrent_limit */ concurrency_time_window_s?: number; /** * Custom key for grouping concurrent executions */ custom_concurrency_key?: string; /** * If true, this script is a trigger that can start the flow */ is_trigger?: boolean; /** * External resources this script accesses (S3 objects, resources, etc.) */ assets?: Array<{ /** * Path to the asset */ path: string; /** * Type of asset */ kind: 's3object' | 'resource' | 'ducklake' | 'datatable' | 'volume' | 'dbt'; /** * Access level for this asset */ access_type?: 'r' | 'w' | 'rw' | null; /** * Alternative access level */ alt_access_type?: 'r' | 'w' | 'rw' | null; }>; }; /** * Reference to an existing script by path. Use this when calling a previously saved script instead of writing inline code */ export type PathScript = { /** * Map of parameter names to their values (static or JavaScript expressions). These become the script's input arguments */ input_transforms: { [key: string]: InputTransform; }; /** * Path to the script in the workspace (e.g., 'f/scripts/send_email') */ path: string; /** * Optional specific version hash of the script to use */ hash?: string; type: 'script'; /** * Override the script's default worker group tag */ tag_override?: string; /** * If true, this script is a trigger that can start the flow */ is_trigger?: boolean; }; /** * Reference to an existing flow by path. Use this to call another flow as a subflow */ export type PathFlow = { /** * Map of parameter names to their values (static or JavaScript expressions). These become the subflow's input arguments */ input_transforms: { [key: string]: InputTransform; }; /** * Path to the flow in the workspace (e.g., 'f/flows/process_user') */ path: string; type: 'flow'; }; /** * Executes nested modules in a loop over an iterator. Inside the loop, use 'flow_input.iter.value' to access the current iteration value, and 'flow_input.iter.index' for the index. Supports parallel execution for better performance on I/O-bound operations */ export type ForloopFlow = { /** * Steps to execute for each iteration. These can reference the iteration value via 'flow_input.iter.value' */ modules: Array; /** * JavaScript expression that returns an array to iterate over. Can reference 'results.step_id' or 'flow_input' */ iterator: InputTransform; /** * If true, iteration failures don't stop the loop. Failed iterations return null */ skip_failures: boolean; type: 'forloopflow'; /** * If true, iterations run concurrently (faster for I/O-bound operations). Use with parallelism to control concurrency */ parallel?: boolean; /** * Maximum number of concurrent iterations when parallel=true. Limits resource usage. Can be static number or expression */ parallelism?: InputTransform; squash?: boolean; }; /** * Executes nested modules repeatedly until stopped. The implicit iterator is the iteration counter, so 'flow_input.iter.value' equals 'flow_input.iter.index' (0, 1, 2, ...) and never carries state. To carry state across iterations, a step reads its own previous-iteration result via 'results.' with a first-iteration fallback - the loop's stop_after_if must then be on that inner step (a plain single-step body with stop_after_if on the loop module does not resolve 'results' across iterations and never terminates); plain counters can instead be derived from 'flow_input.iter.index', which works in every configuration. stop_after_if is evaluated after each iteration - on the loop module 'result' is the last iteration's result */ export type WhileloopFlow = { /** * Steps to execute in each iteration */ modules: Array; /** * If true, iteration failures don't stop the loop. Failed iterations return null */ skip_failures: boolean; type: 'whileloopflow'; /** * If true, iterations run concurrently (use with caution in while loops) */ parallel?: boolean; /** * Maximum number of concurrent iterations when parallel=true */ parallelism?: InputTransform; squash?: boolean; }; /** * Conditional branching where only the first matching branch executes. Branches are evaluated in order, and the first one with a true expression runs. If no branches match, the default branch executes */ export type BranchOne = { /** * Array of branches to evaluate in order. The first branch with expr evaluating to true executes */ branches: Array<{ /** * Short description of this branch condition */ summary?: string; /** * JavaScript expression that returns boolean. Can use 'results.step_id' or 'flow_input'. First true expr wins */ expr: string; /** * Steps to execute if this branch's expr is true */ modules: Array; }>; /** * Steps to execute if no branch expressions match */ default: Array; type: 'branchone'; }; /** * Parallel branching where all branches execute simultaneously. Unlike BranchOne, all branches run regardless of conditions. Useful for executing independent tasks concurrently */ export type BranchAll = { /** * Array of branches that all execute (either in parallel or sequentially) */ branches: Array<{ /** * Short description of this branch's purpose */ summary?: string; /** * If true, failure in this branch doesn't fail the entire flow */ skip_failure?: boolean; /** * Steps to execute in this branch */ modules: Array; }>; type: 'branchall'; /** * If true, all branches execute concurrently. If false, they execute sequentially */ parallel?: boolean; }; /** * AI agent step that can use tools to accomplish tasks. The agent receives inputs and can call any of its configured tools to complete the task */ export type AiAgent = { /** * Input parameters for the AI agent mapped to their values */ input_transforms: { /** * Provider configuration - can be static (ProviderConfig), JavaScript expression, or AI-determined */ provider?: { value: ProviderConfig; type: 'static'; } | JavascriptTransform | AiTransform; /** * Output format type. * Valid values: 'text' (default) - plain text response, 'image' - image generation * */ output_type?: InputTransform; /** * The user's prompt/message to the AI agent. Supports variable interpolation with * flow.input syntax. Required unless memory is off and `previous_messages` supplies * the prompt; image output always needs it. * */ user_message?: InputTransform; /** * System instructions that guide the AI's behavior, persona, and response style. Optional. */ system_prompt?: InputTransform; /** * Boolean. If true, stream the AI response incrementally. * Streaming events include: token_delta, reasoning_token_delta, tool_call, tool_call_arguments, tool_execution, tool_result * */ streaming?: InputTransform; /** * Memory configuration - can be static (MemoryConfig), JavaScript expression, or AI-determined */ memory?: { value: MemoryConfig; type: 'static'; } | JavascriptTransform | AiTransform; /** * String. Names the memory this step reads and writes, overriding the memory id the run * was started with (the chat conversation, an app chat session or the `memory_id` run * parameter). Leave unset to use the run's memory id. A fixed value shares one memory * across every run; an expression such as `flow_input.customer_id` keeps one memory per * key. When it evaluates to an empty value the agent runs without memory. Read only * while `memory` is `window`: it is ignored when memory is off, and an older `auto` or * `manual` memory reads neither history input. * */ memory_id?: InputTransform; /** * Array of MemoryMessage. History supplied by the flow, sent between the system prompt * and the user message. Read only while `memory` is off or absent: managed memory * ignores it, and an older `auto` or `manual` memory reads neither history input. * */ previous_messages?: InputTransform; /** * JSON Schema object defining structured output format. Used when you need the AI to return data in a specific shape. * Supports standard JSON Schema properties: type, properties, required, items, enum, pattern, minLength, maxLength, minimum, maximum, etc. * Example: { type: 'object', properties: { name: { type: 'string' }, age: { type: 'integer' } }, required: ['name'] } * */ output_schema?: InputTransform; /** * Array of file references (images or PDFs) for the AI agent. * Format: Array<{ bucket: string, key: string }> - S3 object references * Example: [{ bucket: 'my-bucket', key: 'documents/report.pdf' }] * */ user_attachments?: InputTransform; /** * Array of strings naming which of the tools configured in `tools` the agent may call * this run. Leaving it unset carries every one of them; an empty array carries none. * A tool is named as the model is shown it. An entry the model is shown nothing of is * named by what identifies it instead: an MCP server by its resource path, carrying * every tool it exposes (which of them stays that entry's include_tools/exclude_tools), * and a websearch entry by the reserved name '__wm_web_search', whatever summary it carries * (no tool may take that name). * Example: ['get_user', 'u/admin/github_mcp', '__wm_web_search'] * */ enabled_tools?: InputTransform; /** * Integer. Maximum number of tokens the AI will generate in its response. * Range: 1 to 4,294,967,295. Typical values: 256-4096 for most use cases. * */ max_completion_tokens?: InputTransform; /** * Float. Controls randomness/creativity of responses. * Range: 0.0 to 2.0 (provider-dependent) * - 0.0 = deterministic, focused responses * - 0.7 = balanced (common default) * - 1.0+ = more creative/random * */ temperature?: InputTransform; /** * Number. Limits how many times the agent can loop through reasoning and tool use. * Range: 1-1000. * */ max_iterations?: InputTransform; }; /** * Array of tools the agent can use. The agent decides which tools to call based on the task */ tools?: Array<{ /** * Unique identifier for this tool. Cannot contain spaces - use underscores instead (e.g., 'get_user_data' not 'get user data') */ id: string; /** * The name the AI agent calls this tool by, not a human label. On a flowmodule tool it must match ^[a-zA-Z0-9_]+$ - letters, numbers and underscores only (e.g. 'search_documentation', not 'Search documentation') - and always be set; on an mcp or websearch tool it is a plain label. Put the human-readable explanation in 'description'. */ summary?: string; /** * Free-text description of the tool given to the AI to decide when and how to call it. Overrides the description auto-derived from the underlying script. */ description?: string; /** * The implementation of a tool. Can be a flow module (script/flow) or an MCP tool reference */ value: { tool_type: 'flowmodule'; } & FlowModuleValue | { tool_type: 'mcp'; /** * Path to the MCP resource/server configuration */ resource_path: string; /** * Whitelist of specific tools to include from this MCP server */ include_tools?: Array<(string)>; /** * Blacklist of tools to exclude from this MCP server */ exclude_tools?: Array<(string)>; } | { tool_type: 'websearch'; }; }>; type: 'aiagent'; /** * Worker group tag for execution routing. If not set, the AI agent step runs on the flow's tag (default `flow`) */ tag?: string; /** * If true, this AI agent step does not persist its assistant or tool messages to the flow conversation when chat mode is enabled. */ omit_output_from_conversation?: boolean; /** * Path of a reusable `ai_agent` resource (hybrid linking). When set, the agent brain * config (provider/model/system prompt/etc.) and tool set are resolved at runtime from * that resource; the module's input_transforms then only carry the flow-local inputs * (user_message, user_attachments, enabled_tools and the history inputs memory_id and previous_messages). * */ agent?: string; /** * Host-local wiring for an agent's tool inputs, keyed by tool id then input key. Binds the * referenced agent's tools to this flow's context (flow_input/results) without mutating the * shared resource; overlaid onto the tools' input_transforms at runtime — including when * `agent` is unset, since a step forked for editing keeps these overrides until it is saved * back or unlinked. * */ tool_inputs?: { [key: string]: { [key: string]: InputTransform; }; }; /** * If true, the agent can execute multiple tool calls in parallel */ parallel?: boolean; }; /** * Pass-through module that returns its input unchanged. Useful for flow structure or as a placeholder */ export type Identity = { type: 'identity'; /** * If true, marks this as a flow identity (special handling) */ flow?: boolean; }; export type FlowStatus = { step: number; modules: Array; user_states?: unknown; preprocessor_module?: FlowStatusModule; failure_module: FlowStatusModule & { parent_module?: string; }; retry?: { fail_count?: number; failed_jobs?: Array<(string)>; }; }; export type FlowStatusModule = { type: 'WaitingForPriorSteps' | 'WaitingForEvents' | 'WaitingForExecutor' | 'InProgress' | 'Success' | 'Failure'; id?: string; job?: string; count?: number; progress?: number; iterator?: { index?: number; itered?: Array; itered_len?: number; args?: unknown; }; flow_jobs?: Array<(string)>; flow_jobs_success?: Array<(boolean)>; flow_jobs_duration?: { started_at?: Array<(string)>; duration_ms?: Array<(number)>; }; branch_chosen?: { type: 'branch' | 'default'; branch?: number; }; branchall?: { branch: number; len: number; }; approvers?: Array<{ resume_id: number; approver: string; }>; failed_retries?: Array<(string)>; skipped?: boolean; agent_actions?: Array<({ job_id: string; function_name: string; type: 'tool_call'; module_id: string; } | { call_id: string; function_name: string; resource_path: string; type: 'mcp_tool_call'; arguments?: { [key: string]: unknown; }; } | { type: 'web_search'; } | { type: 'message'; })>; agent_actions_success?: Array<(boolean)>; }; /** * A sticky note attached to a flow for documentation and annotation */ export type FlowNote = { /** * Unique identifier for the note */ id: string; /** * Content of the note */ text: string; /** * Position of the note in the flow editor */ position?: { /** * X coordinate */ x: number; /** * Y coordinate */ y: number; }; /** * Size of the note in the flow editor */ size?: { /** * Width in pixels */ width: number; /** * Height in pixels */ height: number; }; /** * Color of the note (e.g., "yellow", "#ffff00") */ color: string; /** * Type of note - 'free' for standalone notes, 'group' for notes that group other nodes */ type: 'free' | 'group'; /** * Whether the note is locked and cannot be edited or moved */ locked?: boolean; /** * For group notes, the IDs of nodes contained within this group */ contained_node_ids?: Array<(string)>; }; export type CiTestResult = { test_script_path: string; job_id?: string | null; status?: string | null; started_at?: string | null; }; /** * Health status response (cached with 5s TTL) */ export type HealthStatusResponse = { /** * Overall health status */ status: 'healthy' | 'degraded' | 'unhealthy'; /** * Timestamp when the health check was actually performed (not cache return time) */ checked_at: string; /** * Whether the database is reachable */ database_healthy: boolean; /** * Number of workers that pinged within last 5 minutes */ workers_alive: number; }; /** * Detailed health status response (always fresh, no caching) */ export type DetailedHealthResponse = { /** * Overall health status */ status: 'healthy' | 'degraded' | 'unhealthy'; /** * Timestamp when the health check was performed */ checked_at: string; /** * Server version (e.g., "EE 1.615.3") */ version: string; checks: HealthChecks; }; /** * Detailed health checks */ export type HealthChecks = { database: DatabaseHealth; /** * Worker status (null if database is unreachable) */ workers?: WorkersHealth | null; /** * Queue status (null if database is unreachable) */ queue?: QueueHealth | null; readiness: ReadinessHealth; }; /** * Database health status */ export type DatabaseHealth = { /** * Whether the database is reachable */ healthy: boolean; /** * Database query latency in milliseconds */ latency_ms: number; pool: PoolStats; }; /** * Database connection pool statistics */ export type PoolStats = { /** * Current number of connections in the pool */ size: number; /** * Number of idle connections */ idle: number; /** * Maximum number of connections allowed */ max_connections: number; }; /** * Workers health status */ export type WorkersHealth = { /** * Whether any workers are active */ healthy: boolean; /** * Number of active workers (pinged in last 5 minutes) */ active_count: number; /** * List of active worker groups */ worker_groups: Array<(string)>; /** * Minimum required worker version */ min_version: string; /** * List of active worker versions */ versions: Array<(string)>; }; /** * Job queue status */ export type QueueHealth = { /** * Number of pending jobs in the queue */ pending_jobs: number; /** * Number of currently running jobs */ running_jobs: number; }; /** * Server readiness status */ export type ReadinessHealth = { /** * Whether the server is ready to accept requests */ healthy: boolean; }; /** * Configuration for auto-inviting users to the workspace */ export type AutoInviteConfig = { enabled?: boolean; domain?: string; /** * If true, auto-invited users are added as operators. If false, they are added as developers. */ operator?: boolean; mode?: 'invite' | 'add'; instance_groups?: Array<(string)>; instance_groups_roles?: { [key: string]: (string); }; }; /** * Configuration for the workspace error handler */ export type ErrorHandlerConfig = { /** * Path to the error handler script or flow */ path?: string; extra_args?: ScriptArgs; muted_on_cancel?: boolean; muted_on_user_path?: boolean; }; /** * Configuration for the workspace success handler */ export type SuccessHandlerConfig = { /** * Path to the success handler script or flow */ path?: string; extra_args?: ScriptArgs; }; /** * Request body for editing the workspace error handler. Accepts both new grouped format and legacy flat format for backward compatibility. */ export type EditErrorHandler = EditErrorHandlerNew | EditErrorHandlerLegacy; /** * New grouped format for editing error handler */ export type EditErrorHandlerNew = { /** * Path to the error handler script or flow */ path?: string; extra_args?: ScriptArgs; muted_on_cancel?: boolean; muted_on_user_path?: boolean; /** * Report failed jobs to the instance critical alert channels when no workspace error handler is set. Omit to leave the stored value untouched. */ fallback_to_instance_alerts?: boolean; }; /** * Legacy flat format for editing error handler (deprecated, use new format) */ export type EditErrorHandlerLegacy = { /** * Path to the error handler script or flow */ error_handler?: string; error_handler_extra_args?: ScriptArgs; error_handler_muted_on_cancel?: boolean; }; /** * Request body for editing the workspace success handler. Accepts both new grouped format and legacy flat format for backward compatibility. */ export type EditSuccessHandler = EditSuccessHandlerNew | EditSuccessHandlerLegacy; /** * New grouped format for editing success handler */ export type EditSuccessHandlerNew = { /** * Path to the success handler script or flow */ path?: string; extra_args?: ScriptArgs; }; /** * Legacy flat format for editing success handler (deprecated, use new format) */ export type EditSuccessHandlerLegacy = { /** * Path to the success handler script or flow */ success_handler?: string; success_handler_extra_args?: ScriptArgs; }; export type VaultSettings = { /** * HashiCorp Vault server address (e.g., https://vault.company.com:8200) */ address: string; /** * KV v2 secrets engine mount path (e.g., windmill) */ mount_path: string; /** * Optional path prefix inserted between the KV data/metadata segment and the workspace id (e.g., "apps/windmill"). When set, secrets are stored at `/data///`, allowing a Vault policy scoped to exactly `/data/*`. */ kv_secret_path_prefix?: string; /** * Vault JWT auth role name for Windmill (optional, if not provided token auth is used) */ jwt_role?: string; /** * Mount path for the JWT auth method in Vault (optional, defaults to "jwt"). Set this when the JWT auth method is mounted at a non-default path, e.g. via `vault auth enable -path= jwt`. */ jwt_mount_path?: string; /** * Vault Enterprise namespace (optional) */ namespace?: string; /** * Static Vault token for testing/development (optional, if provided this is used instead of JWT authentication) */ token?: string; /** * Skip TLS certificate verification when connecting to Vault. Only use for self-signed certificates in development environments. */ skip_ssl_verify?: boolean; }; export type AzureKeyVaultSettings = { /** * Azure Key Vault URL (e.g., https://myvault.vault.azure.net) */ vault_url: string; /** * Azure AD tenant ID */ tenant_id: string; /** * Azure AD application (client) ID */ client_id: string; /** * Azure AD client secret. Optional — when omitted, the integration falls back to Azure Workload Identity Federation, exchanging the Kubernetes-projected service-account JWT at AZURE_FEDERATED_TOKEN_FILE for an access token (no long-lived secret stored). */ client_secret?: string; /** * Static Bearer token for testing/development (optional, if provided this is used instead of OAuth2 authentication) */ token?: string; }; export type AwsSecretsManagerSettings = { /** * AWS region (e.g., us-east-1) */ region: string; /** * AWS Access Key ID (optional, uses default credential chain if not provided) */ access_key_id?: string; /** * AWS Secret Access Key (optional) */ secret_access_key?: string; /** * Custom endpoint URL for testing (e.g., LocalStack) */ endpoint_url?: string; /** * Prefix for secret names (e.g., windmill/) */ prefix?: string; }; export type SecretMigrationFailure = { /** * Workspace ID where the secret is located */ workspace_id: string; /** * Path of the secret that failed to migrate */ path: string; /** * Error message */ error: string; }; export type SecretMigrationReport = { /** * Total number of secrets found */ total_secrets: number; /** * Number of secrets successfully migrated */ migrated_count: number; /** * Number of secrets that failed to migrate */ failed_count: number; /** * Details of any failures encountered during migration */ failures: Array; }; export type JwksResponse = { /** * Array of JSON Web Keys for JWT verification */ keys: Array<{ [key: string]: unknown; }>; }; /** * What an eval run is executed against. */ export type EvalSubject = { /** * `agent` runs the ai_agent resource as it is deployed when the run opens, `agent_draft` the caller's unsaved edits of it as the editor holds them (carried in `draft`), and `agent_version` one past version named by `version`. The first and last are read server-side; all three are inlined into the run, so every case of a run executes one configuration: a deploy part-way through changes what the next run measures, never this one. * */ kind: 'agent' | 'agent_draft' | 'agent_version'; /** * Path of the ai_agent resource. */ path: string; /** * The agent's per-path version number when the run opened: how many times the resource had been saved, not a resource_version row id. For `agent` and `agent_draft` it names the configuration the run read and every case executed. For `agent_version` it is the request's own, says which version to inline, and is required. * */ version?: number | null; draft?: AgentDraft; /** * Hash of the configuration a draft run executed, stamped server-side. A draft moves without the version moving, so this is what dates a run of one. It is also what recognises a draft run whose configuration was later deployed: when it matches the agent as deployed, the run's kind and version are rewritten to that version, once, and the hash is kept as what the resolution rests on. * */ draft_hash?: string; }; /** * The brain and tools of an agent, as the flow editor holds them. Carried by the request and present exactly when the subject kind is `agent_draft` — the edits exist only in the editor — where it is the whole definition of what ran: the run goes through the same unlinked branch of the agent executor the editor's own test uses. * */ export type AgentDraft = { /** * The agent's input transforms: provider, system prompt, output type and the rest. The message and attachments come from the case and override anything named here. * */ input_transforms?: { [key: string]: unknown; }; tools?: Array<{ [key: string]: unknown; }>; }; export type EvalDataset = { path: string; summary?: string; /** * The columns of the results table, in display order. */ scorers?: Array; created_at: string; created_by: string; edited_at: string; edited_by: string; }; /** * The inputs a standalone run feeds the agent. */ export type EvalCaseInput = { user_message?: string; user_attachments?: Array<{ [key: string]: unknown; }>; }; export type NewEvalCase = { input?: EvalCaseInput; /** * Reference output a scorer compares a rerun against. */ expected?: unknown; }; export type SaveEvalCase = { /** * Absent for a case the dataset does not hold yet. */ id?: string; } & NewEvalCase; export type EvalCase = { id: string; created_at: string; created_by: string; } & NewEvalCase; /** * A scorer is a column of the results table, and it is always a runnable: an ai_agent resource sent the run to grade, or a script handed the run as an argument. `id` is assigned when the scorer is added to a dataset and never reused: it is what makes a column the same column across experiments when the scorer is renamed, and a delta is only ever computed between two scores carrying the same id. A scorer sent without an id is given one. * */ export type Scorer = { id?: string; /** * Column header. Defaults to the last segment of the path. */ name?: string; /** * A score at or above this counts as a pass, and the column reports a pass rate beside its mean. Applied when results are read rather than when they are produced, so moving the line re-reads every score already recorded instead of invalidating them. * */ pass_if?: number; kind: 'script' | 'agent'; /** * The script, or the ai_agent resource used as a judge. */ path: string; }; /** * One run of a dataset: written once when the dataset is run, and only ever read afterwards. The case set it executed is returned by the results endpoint, not here: a listing would otherwise send the whole dataset back once per experiment. */ export type EvalExperiment = { id: string; dataset: string; subject: EvalSubject; /** * This agent's nth run of this dataset, allocated once and never reused. What a run is called. Numbered per agent rather than per subject kind: runs of what is deployed and runs of its draft are the same agent's history. * */ run_number: number; /** * The flow executing the run: one job holding every case and its scores. * */ run_job_id: string; case_count: number; /** * What the run scored, one entry per scorer that produced a number. Carried on the run itself so a list of runs can say what each one scored without reading every cell of every one of them. Empty on a run whose scores have not been read yet. * */ scores?: Array; /** * Whether the flow executing this run is still going. What makes a list of runs worth watching rather than worth reloading. * */ running?: boolean; created_at: string; created_by: string; }; /** * One scorer's headline for one run: the two numbers a column reports, over that run's cells. */ export type ExperimentScore = { scorer_id: string; /** * What the column is called in the dataset that ran it, resolved server-side because a list of runs spanning datasets cannot hold every dataset's scorers to look it up. * */ name: string; kind: 'agent' | 'script'; mean?: number; /** * The share of scored cells at or above the column's threshold, for a column that has one. Absent where the column has no threshold and the mean is the whole headline. * */ pass_rate?: number; scored: number; /** * How many of the run's cells the column failed on. A column that failed on all of them has no number to report and is still one of the columns that ran. * */ failed: number; }; /** * One scorer's verdict on one run, and how it compares with the baseline. */ export type CellScore = { scorer_id: string; score?: number; reason?: string; checks?: unknown; error?: string; /** * The scorer read this case and had nothing to measure on it. Left out of the column's mean and pass rate rather than counted as a zero. * */ not_applicable?: boolean; /** * A scoring job is still running for this cell. */ pending: boolean; /** * Which side of the scorer's `pass_if` threshold the score fell on. Absent when the column has no threshold, or has no score yet. * */ passed?: boolean; /** * The same scorer's number on the baseline experiment. */ baseline?: number; /** * The baseline's score came from a different definition of this scorer, so the delta is a change of scorer as much as a change of agent. * */ definition_changed: boolean; }; export type ExperimentRow = { case_id: string; input: EvalCaseInput; expected?: unknown; /** * The iteration that ran this case. Absent between a run being recorded and its flow reaching this case, which reads as a case still to run. * */ job_id?: string; /** * The case's status; `running` until its iteration completes, and `unavailable` for a case whose job was retained away before anything read what it produced. * */ status: 'running' | 'success' | 'failure' | 'canceled' | 'skipped' | 'unavailable'; /** * The agent's answer. The full trajectory stays reachable through job_id. */ output?: string; /** * The agent version this cell ran against. Cells of one experiment can differ, which the table says rather than averaging two versions silently. * */ subject_version?: number; /** * For a run of unsaved edits, the hash of the configuration this cell ran. Edits move without a version changing, so this is what identifies what ran, and what recognises a run whose edits were later saved as a run of that version. * */ subject_draft_hash?: string; /** * One entry per scorer of the dataset, in column order. */ scores: Array; }; /** * A column's summary. There is no single number for a dataset: averaging a judge with an exact match would invent one. * */ export type ScorerMean = { scorer_id: string; mean?: number; baseline_mean?: number; /** * The share of scored cells that passed, for a column with a threshold. Reported beside the mean rather than instead of it: a pass rate says how many cases are good enough, a mean says by how much, and neither answers the other's question. * */ pass_rate?: number; baseline_pass_rate?: number; scored: number; /** * Cells the baseline has no score for, so a column the baseline never ran shows as unscored rather than as a spurious difference. */ missing_in_baseline: number; definition_changed: boolean; }; export type FlowConversation = { /** * Unique identifier for the conversation */ id: string; /** * The workspace ID where the conversation belongs */ workspace_id: string; /** * Path of the flow this conversation is for */ flow_path: string; /** * Optional title for the conversation */ title?: string | null; /** * When the conversation was created */ created_at: string; /** * When the conversation was last updated */ updated_at: string; /** * Username who created the conversation */ created_by: string; /** * Started from the flow editor's test panel rather than a deployed run */ is_test: boolean; }; export type FlowConversationMessage = { /** * Unique identifier for the message */ id: string; /** * The conversation this message belongs to */ conversation_id: string; /** * Type of the message */ message_type: 'user' | 'assistant' | 'system' | 'tool'; /** * The message content */ content: string; /** * Associated job ID if this message came from a flow run */ job_id?: string | null; /** * When the message was created */ created_at: string; /** * Monotonic cursor assigned when the message is inserted */ created_seq: number; /** * The step name that produced that message */ step_name?: string; /** * Whether the message is a success */ success?: boolean; /** * On a tool row, the arguments the model wrote for the call. For a script, flow or AI agent tool these exclude the inputs its step wires in, which only the tool's job holds. Null for a provider-native web search, whose query the provider does not return. */ tool_arguments?: string | null; /** * On a tool row, the text the model got back from the call, or what the call failed with — the row's own text names the tool rather than the reason. For a provider-native web search, its citations. */ tool_result?: string | null; /** * On an answer, the thinking that produced it; on a tool row, the thinking that led to the call. Each round's thinking is on one row. The agent job's result keeps the turn's thinking as a single string. */ reasoning?: string | null; /** * The files a user message carried, as object-storage references: every flow input other than user_message that held one or a list of them, at most 20. Never file bytes or a presigned URL. */ attachments?: Array<{ /** * The flow input that held the file */ input: string; /** * The file's key in object storage */ s3: string; /** * The secondary storage holding the file, absent for the primary one */ storage?: string; filename?: string; }> | null; }; export type EndpointTool = { /** * The tool name/operation ID */ name: string; /** * Short description of the tool */ description: string; /** * Detailed instructions for using the tool */ instructions: string; /** * API endpoint path */ path: string; /** * HTTP method (GET, POST, etc.) */ method: string; /** * JSON schema for path parameters */ path_params_schema?: { [key: string]: unknown; } | null; /** * JSON schema for query parameters */ query_params_schema?: { [key: string]: unknown; } | null; /** * JSON schema for request body */ body_schema?: { [key: string]: unknown; } | null; }; export type AIProvider = 'openai' | 'azure_openai' | 'azure_foundry' | 'anthropic' | 'mistral' | 'deepseek' | 'googleai' | 'groq' | 'openrouter' | 'togetherai' | 'aws_bedrock' | 'customai'; export type GitSyncObjectType = 'script' | 'flow' | 'app' | 'folder' | 'resource' | 'variable' | 'secret' | 'resourcetype' | 'schedule' | 'user' | 'group' | 'trigger' | 'settings' | 'key' | 'workspacedependencies' | 'datatablemigration'; export type AIProviderModel = { model: string; provider: AIProvider; }; export type AIProviderConfig = { resource_path: string; models: Array<(string)>; web_search_enabled?: boolean; }; export type AIConfig = { providers?: { [key: string]: AIProviderConfig; }; default_model?: AIProviderModel; metadata_model?: AIProviderModel; code_completion_model?: AIProviderModel; custom_prompts?: { [key: string]: (string); }; max_tokens_per_model?: { [key: string]: (number); }; free_tier?: FreeTierInfo; model_pricing?: { [key: string]: ModelPriceOverride; }; /** * Context window in tokens per `provider:model`, overriding the built-in table the AI chat uses to decide when to compact its history. */ context_window_per_model?: { [key: string]: (number); }; /** * Hides the Windmill AI assistant (chat, sessions, code generation, completion, fixes) from the workspace UI. Read from the workspace's own settings even when the providers served fall back to the instance config. AI agent steps and the AI sandbox in flows are unaffected. */ copilot_disabled?: boolean; /** * Stops browsers from backing their AI sessions up to the workspace's object storage. Read from the workspace's own settings like `copilot_disabled`. */ sessions_storage_disabled?: boolean; /** * The server deletes the backup of a session no push has reached for this many days. Unset keeps backups until the user deletes the session. Read from the workspace's own settings like `copilot_disabled`. */ sessions_retention_days?: number; }; export type AISessionBackupListing = { id: string; updated_at: string; /** * the session's move count when this copy was pushed; of a session two workspaces list, the copy with the higher one is the later */ epoch: number; }; export type AISessionBackupImage = { chat_id: string; id: string; data_url: string; }; export type AISessionBackupChat = { id: string; record: { [key: string]: unknown; }; }; export type AISessionBackup = { id: string; head: { [key: string]: unknown; }; chats: Array; images: Array; artifacts?: { [key: string]: unknown; }; next?: AISessionBackupCursor; /** * a fingerprint of the session's listing; pages of one session whose fingerprints differ do not belong together */ listing: string; /** * the backup kept changing while this page was read, so it may mix two versions; the browser starts the session over */ moved?: boolean; }; /** * where a pull of a session that did not fit one answer whole picks up; the rest of the session follows a pull naming that session alone with this as `resume` */ export type AISessionBackupCursor = { id: string; images: boolean; after: string; }; export type AISessionBackupPush = { id: string; head?: { [key: string]: unknown; }; chats?: Array; images?: Array; artifacts?: { [key: string]: unknown; }; delete_chats?: Array<(string)>; delete_images?: Array<{ chat_id: string; id: string; }>; /** * more parts of this session follow, in this push or a later one; the session is not listed on this one. Such a part names its push (`push`), or it is refused */ partial?: boolean; /** * a part of a push of the session whole; the head is on the part that opens it, which replaces whatever the storage holds of the session, and every piece the browser has is on one of them. An incremental part instead rides on a session the storage lists and is refused with needs_whole when it lists none */ whole?: boolean; /** * a push split over several parts names itself on each with a token the browser draws; the part that opens it unlists the session and the last part lists it again, and a later part is written only while that token is the one there (refused with needs_whole otherwise) */ push?: string; /** * this part opens the push named by `push` */ opens?: boolean; /** * the session's move count (its record's `moves`), kept with the marker that lists the session; an incremental part rides on the marker of the same count */ epoch?: number; }; /** * Read-only. Present when the workspace has no AI provider of its own and is running on Windmill's free tier. Ignored on write. */ export type FreeTierInfo = { /** * The one-time grant is spent; no provider is served and the user must add their own API key. */ exhausted: boolean; /** * Fraction of the grant consumed, 0 to 1. */ used_ratio: number; }; /** * negotiated rates in USD per million tokens, keyed `provider:model` */ export type ModelPriceOverride = { input: number; output: number; cache_read?: number; cache_write?: number; }; export type AITokenUsageEvent = { provider: AIProvider; model: string; session_id?: string; input_tokens?: number; cache_read_tokens?: number; cache_write_tokens?: number; output_tokens?: number; /** * only set by providers that bill back an exact figure */ reported_cost_nano_usd?: number; requests?: number; }; export type AITokenUsageBucket = { /** * the grouped dimension's value; empty when grouping by model */ key: string; provider: string; model: string; input_tokens: number; cache_read_tokens: number; cache_write_tokens: number; output_tokens: number; reported_cost_nano_usd?: number; requests: number; }; export type SharedAiArtifactInfo = { id: string; name: string; kind: 'md' | 'html'; version: number; created_by: string; shared_at: string; expires_at: string; }; export type InstanceAIProviderSummary = { provider: AIProvider; models: Array<(string)>; }; export type InstanceAISummary = { providers: Array; default_model?: AIProviderModel; metadata_model?: AIProviderModel; code_completion_model?: AIProviderModel; }; export type Alert = { name: string; tags_to_monitor: Array<(string)>; jobs_num_threshold: number; alert_cooldown_seconds: number; alert_time_threshold_seconds: number; }; export type Configs = { alerts?: Array; } | null; export type WorkspaceDependencies = { id: number; archived: boolean; name?: string; description?: string; content: string; language: ScriptLang; workspace_id: string; created_at: string; }; export type NewWorkspaceDependencies = { workspace_id: string; language: ScriptLang; name?: string; description?: string; content: string; }; /** * A row in the merged runnables listing. `type` is the discriminator; * kind-specific fields (hash/language/kind for scripts, execution_mode/ * version for apps) are present only for that kind. `edited_at` is the * unified last-updated time (a script's created_at, a flow/app's edit * time). * */ export type RunnableItem = { type: 'script' | 'flow' | 'app'; path: string; summary?: string; workspace_id?: string; extra_perms?: { [key: string]: (boolean); }; starred?: boolean; archived?: boolean; is_draft?: boolean; draft_only?: boolean | null; draft_path?: string; draft_users?: Array<{ [key: string]: unknown; }>; labels?: Array<(string)>; inherited_labels?: Array<(string)>; ws_error_handler_muted?: boolean; edited_at?: string; /** * script version hash as a 16-char hex string */ hash?: string; language?: string; kind?: string; auto_kind?: string; use_codebase?: boolean; has_deploy_errors?: boolean; /** * flow-only. `chat_input_enabled` of the flow's value, projected so the list can mark flows that open as a chat. Omitted when the value has no such field. */ chat_input_enabled?: boolean; raw_app?: boolean; execution_mode?: string; id?: number; version?: number; }; export type Script = { workspace_id?: string; hash: string; path: string; /** * The first element is the direct parent of the script, the second is the parent of the first, etc * */ parent_hashes?: Array<(string)>; summary: string; description: string; content: string; created_by: string; created_at: string; archived: boolean; schema?: { [key: string]: unknown; }; deleted: boolean; is_template: boolean; extra_perms: { [key: string]: (boolean); }; lock?: string; lock_error_logs?: string; language: ScriptLang; kind: 'script' | 'failure' | 'trigger' | 'command' | 'approval' | 'preprocessor'; starred: boolean; tag?: string; draft_only?: boolean; envs?: Array<(string)>; concurrent_limit?: number; concurrency_time_window_s?: number; concurrency_key?: string; debounce_key?: string; debounce_delay_s?: number; debounce_args_to_accumulate?: Array<(string)>; max_total_debouncing_time?: number; max_total_debounces_amount?: number; cache_ttl?: number; cache_ignore_s3_path?: boolean; dedicated_worker?: boolean; ws_error_handler_muted?: boolean; priority?: number; restart_unless_cancelled?: boolean; timeout?: number; /** * If set, delete the job's args, result and logs after this many seconds following job completion */ delete_after_secs?: number; visible_to_runner_only?: boolean; auto_kind?: string; codebase?: string; has_preprocessor: boolean; on_behalf_of_email?: string; /** * Authorization identity the runnable runs as: u/{username}, g/{group}, or a bare email when the username is itself email-shaped. The only stored half of the identity; on_behalf_of_email is derived from it. */ on_behalf_of?: string; /** * Additional script modules keyed by relative file path */ modules?: { [key: string]: ScriptModule; } | null; labels?: Array<(string)>; /** * Labels inherited from the parent folder, computed at read time. Read-only — edit them on the folder. * */ inherited_labels?: Array<(string)>; }; export type NewScript = { path: string; /** * The hash of the version this one supersedes: deploying with it archives that version and chains the new one onto its history, and a `path` differing from the superseded version's moves the script there. */ parent_hash?: string; /** * When true, the backend resolves the parent to the current deployed head for this path within the transaction (ignoring parent_hash), instead of failing with a "lineage must be linear" error when the supplied parent_hash is stale. */ auto_parent?: boolean; summary: string; description?: string; content: string; /** * JSON Schema of the arguments of `main`, which is what a run form and an MCP tool offer. Omitted (or `{}`), it is inferred from `content` for TypeScript, Python, Go, Bash, PowerShell, SQL, GraphQL and Ansible scripts. For other languages, or code that does not parse, a new script gets none. A new version of an existing script also keeps what the previous version's schema says about each argument, or that whole schema when nothing can be inferred. A dbt script always takes its schema from its descriptor, whatever is sent. */ schema?: { [key: string]: unknown; }; is_template?: boolean; lock?: string; language: ScriptLang; kind?: 'script' | 'failure' | 'trigger' | 'command' | 'approval' | 'preprocessor'; tag?: string; envs?: Array<(string)>; concurrent_limit?: number; concurrency_time_window_s?: number; cache_ttl?: number; cache_ignore_s3_path?: boolean; dedicated_worker?: boolean; ws_error_handler_muted?: boolean; priority?: number; restart_unless_cancelled?: boolean; timeout?: number; /** * If set, delete the job's args, result and logs after this many seconds following job completion */ delete_after_secs?: number; deployment_message?: string; concurrency_key?: string; debounce_key?: string; debounce_delay_s?: number; debounce_args_to_accumulate?: Array<(string)>; max_total_debouncing_time?: number; max_total_debounces_amount?: number; visible_to_runner_only?: boolean; auto_kind?: string; codebase?: string; has_preprocessor?: boolean; on_behalf_of_email?: string; /** * Authorization identity to run as: u/{username}, g/{group}, or a bare email when the username is itself email-shaped. Supply this or on_behalf_of_email; when only the address is given it is resolved to the account it names, and an address naming nobody is rejected. A pair that disagrees is rejected. */ on_behalf_of?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original on_behalf_of_email / on_behalf_of pair instead of overwriting it with the caller's own identity. */ preserve_on_behalf_of?: boolean; assets?: Array<{ path: string; kind: AssetKind; access_type?: 'r' | 'w' | 'rw'; alt_access_type?: 'r' | 'w' | 'rw'; }>; /** * Additional script modules keyed by relative file path */ modules?: { [key: string]: ScriptModule; } | null; labels?: Array<(string)>; /** * When true (set by the CLI / git sync), deploying this script does not delete an existing user draft at the same path. */ skip_draft_deletion?: boolean; }; export type ScriptHistory = { script_hash: string; deployment_msg?: string; created_at?: string; created_by?: string; }; /** * The arguments to pass to the script or flow */ export type ScriptArgs = { [key: string]: unknown; }; export type Input = { id: string; name: string; created_by: string; created_at: string; is_public: boolean; success?: boolean; }; export type CreateInput = { name: string; args: { [key: string]: unknown; }; }; export type UpdateInput = { id: string; name: string; is_public: boolean; }; export type RunnableType = 'ScriptHash' | 'ScriptPath' | 'FlowPath'; export type QueuedJob = { workspace_id?: string; id: string; parent_job?: string; created_by?: string; created_at?: string; started_at?: string; scheduled_for?: string; running: boolean; script_path?: string; script_hash?: string; args?: ScriptArgs; logs?: string; raw_code?: string; canceled: boolean; canceled_by?: string; canceled_reason?: string; last_ping?: string; job_kind: 'script' | 'preview' | 'dependencies' | 'flowdependencies' | 'appdependencies' | 'flow' | 'flowpreview' | 'script_hub' | 'identity' | 'deploymentcallback' | 'singlestepflow' | 'flowscript' | 'flownode' | 'appscript' | 'aiagent' | 'unassigned_script' | 'unassigned_flow' | 'unassigned_singlestepflow'; schedule_path?: string; /** * The user (u/userfoo) or group (g/groupfoo) whom * the execution of this script will be permissioned_as and by extension its DT_TOKEN. * */ permissioned_as: string; flow_status?: FlowStatus; workflow_as_code_status?: WorkflowStatus; raw_flow?: FlowValue; is_flow_step: boolean; language?: ScriptLang; email: string; visible_to_owner: boolean; mem_peak?: number; tag: string; priority?: number; self_wait_time_ms?: number; aggregate_wait_time_ms?: number; suspend?: number; preprocessed?: boolean; is_retry?: boolean; trigger_kind?: JobTriggerKind; worker?: string; }; export type CompletedJob = { workspace_id?: string; id: string; parent_job?: string; created_by: string; created_at: string; started_at: string; completed_at?: string; duration_ms: number; success: boolean; script_path?: string; script_hash?: string; args?: ScriptArgs; /** * For large results, this may be the placeholder string 'WINDMILL_TOO_BIG'. * Use the completed job result endpoint to retrieve the full result. * */ result?: unknown; logs?: string; deleted?: boolean; raw_code?: string; canceled: boolean; canceled_by?: string; canceled_reason?: string; job_kind: 'script' | 'preview' | 'dependencies' | 'flow' | 'flowdependencies' | 'appdependencies' | 'flowpreview' | 'script_hub' | 'identity' | 'deploymentcallback' | 'singlestepflow' | 'flowscript' | 'flownode' | 'appscript' | 'aiagent' | 'unassigned_script' | 'unassigned_flow' | 'unassigned_singlestepflow'; schedule_path?: string; /** * The user (u/userfoo) or group (g/groupfoo) whom * the execution of this script will be permissioned_as and by extension its DT_TOKEN. * */ permissioned_as: string; flow_status?: FlowStatus; workflow_as_code_status?: WorkflowStatus; raw_flow?: FlowValue; is_flow_step: boolean; language?: ScriptLang; is_skipped: boolean; email: string; visible_to_owner: boolean; mem_peak?: number; tag: string; priority?: number; labels?: Array<(string)>; self_wait_time_ms?: number; aggregate_wait_time_ms?: number; preprocessed?: boolean; is_retry?: boolean; /** * whether this failure has been marked as handled */ resolved?: boolean; /** * who resolved the failure. Enterprise-only, so also absent for a manual resolution outside enterprise; use resolved_automatically to tell the two apart */ resolved_by?: string; resolved_at?: string; resolution_note?: string; /** * true when a succeeding retry resolved this rather than a person. Explicit rather than inferred from an absent resolved_by, which is also absent for a manual resolution outside enterprise */ resolved_automatically?: boolean; trigger_kind?: JobTriggerKind; worker?: string; }; /** * Completed job with full data for export/import operations */ export type ExportableCompletedJob = { id: string; parent_job?: string; created_by: string; created_at: string; started_at?: string; completed_at?: string; duration_ms?: number; script_path?: string; script_hash?: string; /** * Full job arguments without size restrictions */ args?: { [key: string]: unknown; }; /** * Full job result without size restrictions */ result?: { [key: string]: unknown; }; /** * Complete job logs from v2_job table */ logs?: string; raw_code?: string; raw_lock?: string; canceled_by?: string; canceled_reason?: string; job_kind: 'script' | 'preview' | 'dependencies' | 'flow' | 'flowdependencies' | 'appdependencies' | 'flowpreview' | 'script_hub' | 'identity' | 'deploymentcallback' | 'singlestepflow' | 'flowscript' | 'flownode' | 'appscript' | 'aiagent' | 'unassigned_script' | 'unassigned_flow' | 'unassigned_singlestepflow'; /** * Trigger path for the job (replaces schedule_path) */ trigger?: string; trigger_kind?: 'webhook' | 'http' | 'websocket' | 'kafka' | 'email' | 'nats' | 'schedule' | 'app' | 'ui' | 'postgres' | 'sqs' | 'gcp'; permissioned_as: string; permissioned_as_email?: string; /** * Flow status from v2_job_status table */ flow_status?: { [key: string]: unknown; }; workflow_as_code_status?: { [key: string]: unknown; }; raw_flow?: { [key: string]: unknown; }; is_flow_step?: boolean; language?: ScriptLang; is_skipped?: boolean; email: string; visible_to_owner: boolean; mem_peak?: number; tag?: string; priority?: number; labels?: Array<(string)>; same_worker?: boolean; flow_step_id?: string; flow_innermost_root_job?: string; concurrent_limit?: number; concurrency_time_window_s?: number; timeout?: number; cache_ttl?: number; self_wait_time_ms?: number; aggregate_wait_time_ms?: number; preprocessed?: boolean; worker?: string; /** * Actual job status from database */ status?: string; }; /** * Queued job with full data for export/import operations */ export type ExportableQueuedJob = { id: string; parent_job?: string; created_by: string; created_at: string; started_at?: string; scheduled_for?: string; script_path?: string; script_hash?: string; /** * Full job arguments without size restrictions */ args?: { [key: string]: unknown; }; /** * Complete job logs from v2_job table */ logs?: string; raw_code?: string; raw_lock?: string; canceled_by?: string; canceled_reason?: string; job_kind: 'script' | 'preview' | 'dependencies' | 'flowdependencies' | 'appdependencies' | 'flow' | 'flowpreview' | 'script_hub' | 'identity' | 'deploymentcallback' | 'singlestepflow' | 'flowscript' | 'flownode' | 'appscript' | 'aiagent' | 'unassigned_script' | 'unassigned_flow' | 'unassigned_singlestepflow'; /** * Trigger path for the job (replaces schedule_path) */ trigger?: string; trigger_kind?: 'webhook' | 'http' | 'websocket' | 'kafka' | 'email' | 'nats' | 'schedule' | 'app' | 'ui' | 'postgres' | 'sqs' | 'gcp'; permissioned_as: string; permissioned_as_email?: string; /** * Flow status from v2_job_status table */ flow_status?: { [key: string]: unknown; }; workflow_as_code_status?: { [key: string]: unknown; }; raw_flow?: { [key: string]: unknown; }; is_flow_step?: boolean; language?: ScriptLang; email: string; visible_to_owner: boolean; mem_peak?: number; tag?: string; priority?: number; labels?: Array<(string)>; same_worker?: boolean; flow_step_id?: string; flow_innermost_root_job?: string; concurrent_limit?: number; concurrency_time_window_s?: number; timeout?: number; cache_ttl?: number; self_wait_time_ms?: number; aggregate_wait_time_ms?: number; preprocessed?: boolean; suspend?: number; suspend_until?: string; }; export type ObscuredJob = { typ?: string; started_at?: string; duration_ms?: number; }; export type Job = CompletedJob & { type?: 'CompletedJob'; } | QueuedJob & { type?: 'QueuedJob'; }; export type User = { email: string; username: string; is_admin: boolean; name?: string; is_super_admin: boolean; created_at: string; operator: boolean; disabled: boolean; groups?: Array<(string)>; folders: Array<(string)>; folders_read: Array<(string)>; folders_owners: Array<(string)>; added_via?: (UserSource) | null; is_service_account?: boolean; /** * True when this is a superadmin viewing a workspace they are not a member of (is_admin/role reflect the superadmin fallback, not an actual membership). */ non_member?: boolean; }; export type UserSource = { /** * How the user was added to the workspace */ source: 'domain' | 'instance_group' | 'manual'; /** * The domain used for auto-invite (when source is 'domain') */ domain?: string; /** * The instance group name (when source is 'instance_group') */ group?: string; }; export type UserUsage = { email?: string; executions?: number; }; export type Login = { email: string; password: string; }; export type PasswordResetResponse = { message: string; }; export type EditWorkspaceUser = { is_admin?: boolean; operator?: boolean; disabled?: boolean; }; export type OffboardAffectedPaths = { scripts?: Array<(string)>; flows?: Array<(string)>; apps?: Array<(string)>; resources?: Array<(string)>; variables?: Array<(string)>; schedules?: Array<(string)>; triggers?: { [key: string]: Array<(string)>; }; }; export type OffboardPreview = { /** * Objects under u/{username}/ that will be reassigned */ owned: OffboardAffectedPaths; /** * Objects not under the user's path but that execute on behalf of this user (permissioned_as/on_behalf_of will be updated) */ executing_on_behalf: OffboardAffectedPaths; /** * Scripts/flows/apps/resources whose content or value references this user's paths (may break after reassignment) */ referencing: OffboardAffectedPaths; /** * Tokens owned by this user (will be deleted) */ tokens: Array; /** * HTTP triggers under the user's path (webhook URLs will change) */ http_triggers: number; /** * Email triggers under the user's path (email addresses will change) */ email_triggers: number; }; export type OffboardTokenInfo = { label: string; scopes: Array<(string)>; expiration?: string; }; export type OffboardRequest = { /** * Target for reassignment: 'u/{username}' or 'f/{folder}' */ reassign_to: string; /** * Required when reassign_to is a folder. The username whose identity will be used as permissioned_as for schedules and triggers. */ new_on_behalf_of_user?: string; /** * Whether to also remove the user from the workspace */ delete_user?: boolean; }; export type OffboardResponse = { /** * List of path conflicts that block the offboarding. Empty on success. */ conflicts?: Array<(string)>; summary?: OffboardSummary; }; export type OffboardSummary = { scripts_reassigned: number; flows_reassigned: number; apps_reassigned: number; resources_reassigned: number; variables_reassigned: number; schedules_reassigned: number; triggers_reassigned: number; drafts_deleted: number; }; export type GlobalOffboardPreview = { workspaces: Array; }; export type WorkspaceOffboardPreview = { workspace_id: string; username: string; preview: OffboardPreview; }; export type GlobalOffboardRequest = { /** * Map of workspace_id to reassignment config */ reassignments?: { [key: string]: WorkspaceReassignment; }; /** * Whether to also remove the user from the instance */ delete_user?: boolean; }; export type WorkspaceReassignment = { /** * Target: 'u/{username}' or 'f/{folder}' */ reassign_to: string; /** * Required when reassign_to is a folder. Username to use as permissioned_as. */ new_on_behalf_of_user?: string; }; export type TruncatedToken = { label?: string; expiration?: string; token_prefix: string; created_at: string; last_used_at: string; scopes?: Array<(string)>; email?: string; workspace_id?: string; read_only: boolean; }; export type ExternalJwtToken = { jwt_hash: number; email: string; username: string; is_admin: boolean; is_operator: boolean; workspace_id?: string; label?: string; scopes?: Array<(string)>; last_used_at: string; }; /** * Guests are free up to `free_allowance` distinct emails over the trailing `window_days`. Past that an Enterprise plan meters them (`metered`, four guests to one seat: `billable_guests`, `guest_seats`); every other plan and build admits no new email until the count drops. `instance_enabled` is the superadmin switch (`guest_access_disabled` global setting) every workspace switch sits under. `available` is whether this deployment can have guests at all: false on the shared cloud, where guest access requires a self-hosted or dedicated deployment, and every other field and switch is then moot. */ export type GuestUsage = { available: boolean; instance_enabled: boolean; guest_count: number; window_days: number; free_allowance: number; metered: boolean; billable_guests: number; guest_seats: number; }; export type GuestActivity = { email: string; workspaces: Array<(string)>; first_seen: string; last_seen: string; }; export type GuestList = { usage: GuestUsage; guests: Array; }; export type NewToken = { label?: string; expiration?: string; scopes?: Array<(string)>; workspace_id?: string; /** * If true, the token is restricted to read-only HTTP methods * (GET/HEAD/OPTIONS). Mutating endpoints and job-run actions are * rejected with 403, regardless of the scopes attached. * */ read_only?: boolean; }; export type NewTokenImpersonate = { label?: string; expiration?: string; impersonate_email: string; workspace_id?: string; }; export type ListableVariable = { workspace_id: string; path: string; value?: string; is_secret: boolean; description?: string; account?: number; is_oauth?: boolean; extra_perms: { [key: string]: (boolean); }; is_expired?: boolean; refresh_error?: string; is_linked?: boolean; is_refreshed?: boolean; expires_at?: string; labels?: Array<(string)>; /** * Labels inherited from the parent folder, computed at read time. Read-only — edit them on the folder. * */ inherited_labels?: Array<(string)>; ws_specific?: boolean; edited_at?: string; edited_by?: string; /** * True when this row is a per-user draft with no deployed * variable at the same path. Frontend renders a "Draft" badge. * */ draft_only?: boolean; /** * True when the authed user has a per-user draft at this path * (over a deployed row or a synthesized draft-only row). * Frontend appends a `*` to the displayed name. * */ is_draft?: boolean; }; export type ContextualVariable = { name: string; value: string; description: string; is_custom: boolean; }; export type CreateVariable = { /** * The path to the variable */ path: string; /** * The value of the variable */ value: string; /** * Whether the variable is a secret */ is_secret: boolean; /** * The description of the variable */ description: string; /** * The account identifier */ account?: number; /** * Whether the variable is an OAuth variable */ is_oauth?: boolean; /** * The expiration date of the variable */ expires_at?: string; labels?: Array<(string)>; ws_specific?: boolean; }; export type EditVariable = { /** * The path to the variable */ path?: string; /** * The new value of the variable */ value?: string; /** * Whether the variable is a secret */ is_secret?: boolean; /** * The new description of the variable */ description?: string; labels?: Array<(string)>; ws_specific?: boolean; }; export type AuditLog = { workspace_id: string; id: number; timestamp: string; username: string; operation: 'jobs.run' | 'jobs.run.script' | 'jobs.run.preview' | 'jobs.run.flow' | 'jobs.run.flow_preview' | 'jobs.run.script_hub' | 'jobs.run.dependencies' | 'jobs.run.identity' | 'jobs.run.noop' | 'jobs.flow_dependencies' | 'jobs' | 'jobs.cancel' | 'jobs.force_cancel' | 'jobs.run_now' | 'jobs.disapproval' | 'jobs.delete' | 'account.delete' | 'ai.request' | 'resources.create' | 'resources.update' | 'resources.delete' | 'resource_types.create' | 'resource_types.update' | 'resource_types.delete' | 'schedule.create' | 'schedule.setenabled' | 'schedule.edit' | 'schedule.delete' | 'scripts.create' | 'scripts.update' | 'scripts.archive' | 'scripts.delete' | 'users.create' | 'users.delete' | 'users.update' | 'users.login' | 'users.login_failure' | 'users.logout' | 'users.accept_invite' | 'users.decline_invite' | 'users.token.create' | 'users.token.delete' | 'users.add_to_workspace' | 'users.add_global' | 'users.setpassword' | 'users.impersonate' | 'users.leave_workspace' | 'oauth.login' | 'oauth.login_failure' | 'oauth.signup' | 'variables.create' | 'variables.delete' | 'variables.update' | 'flows.create' | 'flows.update' | 'flows.delete' | 'flows.archive' | 'apps.create' | 'apps.update' | 'apps.delete' | 'folder.create' | 'folder.update' | 'folder.delete' | 'folder.add_owner' | 'folder.remove_owner' | 'group.create' | 'group.delete' | 'group.edit' | 'group.adduser' | 'group.removeuser' | 'igroup.create' | 'igroup.delete' | 'igroup.adduser' | 'igroup.removeuser' | 'instance_groups.jit_adduser' | 'instance_groups.jit_removeuser' | 'variables.decrypt_secret' | 'workspaces.read_encryption_key' | 'workspaces.edit_command_script' | 'workspaces.edit_deploy_to' | 'workspaces.edit_auto_invite_domain' | 'workspaces.edit_webhook' | 'workspaces.edit_copilot_config' | 'workspaces.edit_error_handler' | 'workspaces.create' | 'workspaces.update' | 'workspaces.archive' | 'workspaces.unarchive' | 'workspaces.delete'; action_kind: 'Created' | 'Updated' | 'Delete' | 'Execute'; resource?: string; parameters?: { [key: string]: unknown; }; span?: string; }; export type TrashItem = { id: number; workspace_id: string; /** * script, flow, app, schedule, variable, resource, or a trigger kind such as http_trigger */ item_kind: string; item_path: string; deleted_by: string; deleted_at: string; /** * when the item is permanently deleted unless restored first */ expires_at: string; }; export type TrashItemWithData = TrashItem & { /** * the deleted rows as they were stored; the shape depends on the kind, and a secret variable's value stays encrypted * */ item_data: { [key: string]: unknown; }; }; export type MainArgSignature = { type: 'Valid' | 'Invalid'; error: string; star_args: boolean; star_kwargs?: boolean; args: Array<{ name: string; typ: 'float' | 'int' | 'bool' | 'email' | 'unknown' | 'bytes' | 'dict' | 'datetime' | 'sql' | { resource: string | null; } | { str: Array<(string)> | null; } | { object: { name?: string; props?: Array<{ key: string; typ: 'float' | 'int' | 'bool' | 'email' | 'unknown' | 'bytes' | 'dict' | 'datetime' | 'sql' | { str: unknown; }; }>; }; } | { list: 'float' | 'int' | 'bool' | 'email' | 'unknown' | 'bytes' | 'dict' | 'datetime' | 'sql' | { str: unknown; } | null; }; has_default?: boolean; default?: unknown; }>; auto_kind: string | null; has_preprocessor: boolean | null; }; export type ScriptLang = 'python3' | 'deno' | 'go' | 'bash' | 'powershell' | 'postgresql' | 'mysql' | 'bigquery' | 'snowflake' | 'mssql' | 'oracledb' | 'graphql' | 'nativets' | 'bun' | 'php' | 'rust' | 'ansible' | 'csharp' | 'nu' | 'java' | 'ruby' | 'rlang' | 'duckdb' | 'bunnative' | 'dbt'; /** * An additional module file associated with a script */ export type ScriptModule = { /** * The source code content of this module */ content: string; language: ScriptLang; /** * Lock file content for this module's dependencies */ lock?: string | null; }; export type Preview = { /** * The code to run */ content?: string; /** * The path to the script */ path?: string; /** * The hash of the script */ script_hash?: string; args: ScriptArgs; language?: ScriptLang; tag?: string; kind?: 'code' | 'identity' | 'http'; dedicated_worker?: boolean; lock?: string; flow_path?: string; /** * Additional script modules keyed by relative file path */ modules?: { [key: string]: ScriptModule; } | null; /** * Map of relative-import script path -> temp storage hash so the preview job resolves those imports from not-yet-deployed local content instead of the deployed script */ temp_script_refs?: { [key: string]: (string); } | null; }; export type PreviewInline = { /** * The code to run */ content: string; args: ScriptArgs; language: ScriptLang; }; export type InlineScriptArgs = { args?: ScriptArgs; }; export type WorkflowTask = { args: ScriptArgs; }; export type WorkflowStatusRecord = { [key: string]: WorkflowStatus; }; export type WorkflowStatus = { scheduled_for?: string; started_at?: string; duration_ms?: number; name?: string; }; export type CreateResource = { /** * The path to the resource */ path: string; value: unknown; /** * The description of the resource */ description?: string; /** * The resource_type associated with the resource */ resource_type: string; labels?: Array<(string)>; ws_specific?: boolean; }; export type EditResource = { /** * The path to the resource */ path?: string; /** * The new description of the resource */ description?: string; value?: unknown; /** * The new resource_type to be associated with the resource */ resource_type?: string; labels?: Array<(string)>; ws_specific?: boolean; }; export type Resource = { workspace_id?: string; path: string; description?: string; resource_type: string; value?: unknown; is_oauth: boolean; extra_perms?: { [key: string]: (boolean); }; created_by?: string; edited_at?: string; labels?: Array<(string)>; /** * Labels inherited from the parent folder, computed at read time. Read-only — edit them on the folder. * */ inherited_labels?: Array<(string)>; ws_specific?: boolean; }; export type ResourceVersion = { /** * How this version is addressed. Unique across every resource, so it says nothing about how many times this one has been saved. */ id: number; /** * Which version of this resource it is, counted from its first. What a version is called. */ version: number; created_at: string; created_by?: string; }; export type ListableResource = { workspace_id?: string; path: string; description?: string; resource_type: string; value?: unknown; is_oauth: boolean; extra_perms?: { [key: string]: (boolean); }; is_expired?: boolean; refresh_error?: string; is_linked: boolean; is_refreshed: boolean; account?: number; created_by?: string; edited_at?: string; labels?: Array<(string)>; /** * Labels inherited from the parent folder, computed at read time. Read-only — edit them on the folder. * */ inherited_labels?: Array<(string)>; ws_specific?: boolean; /** * True when this row is a per-user draft with no deployed * resource at the same path. Frontend renders a "Draft" badge. * */ draft_only?: boolean; /** * True when the authed user has a per-user draft at this path * (over a deployed row or a synthesized draft-only row). * Frontend appends a `*` to the displayed name. * */ is_draft?: boolean; }; export type ResourceType = { workspace_id?: string; name: string; schema?: unknown; description?: string; created_by?: string; edited_at?: string; format_extension?: string; is_fileset?: boolean; /** * The name the product goes by, e.g. "Google Sheets" for gsheets. Absent where nobody named the type. */ display_name?: string; }; export type EditResourceType = { schema?: unknown; description?: string; is_fileset?: boolean; /** * File extension for a type whose value is one file rather than a set of fields. Omit to leave it unchanged; send null to clear it. */ format_extension?: string | null; /** * The name the product goes by. Omit to leave it unchanged; send null to clear it. */ display_name?: string | null; }; export type TriggerHistoryEntry = { id: number; /** * 'schedule' or a trigger type (http, kafka, ...) */ trigger_kind: string; path: string; operation: 'create' | 'update' | 'delete' | 'enable' | 'disable' | 'suspend'; /** * The kind of client the change came from. `worker` means the server disabled the trigger on its own after a failure. */ source: 'ui' | 'cli' | 'api' | 'worker'; /** * Unset when the server acted on its own. */ username?: string | null; created_at: string; /** * {field: {old, new}} for the fields that actually changed. Unset for a delete. */ changes?: { [key: string]: unknown; } | null; }; export type Schedule = { /** * The unique Windmill path for this schedule. Must be of the form `u//` or `f//`. */ path: string; /** * Username of the last person who edited this schedule */ edited_by: string; /** * Timestamp of the last edit */ edited_at: string; /** * Cron expression with 6 fields (seconds, minutes, hours, day of month, month, day of week). Example '0 0 12 * * *' for daily at noon */ schedule: string; /** * IANA timezone for the schedule (e.g., 'UTC', 'Europe/Paris', 'America/New_York') */ timezone: string; /** * Whether the schedule is currently active and will trigger jobs */ enabled: boolean; /** * Path to the script or flow to execute when triggered */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; args?: ScriptArgs | null; /** * Additional permissions for this schedule */ extra_perms: { [key: string]: (boolean); }; /** * Email of the user who owns this schedule, used for permissioned_as */ email: string; /** * The user or group this schedule runs as (e.g., 'u/admin' or 'g/mygroup') */ permissioned_as: string; /** * Last error message if the schedule failed to trigger */ error?: string | null; /** * Path to a script or flow to run when the scheduled job fails */ on_failure?: string | null; /** * Number of consecutive failures before the on_failure handler is triggered (default 1) */ on_failure_times?: number | null; /** * If true, trigger on_failure handler only on exactly N failures, not on every failure after N */ on_failure_exact?: boolean | null; on_failure_extra_args?: ScriptArgs | null; /** * Path to a script or flow to run when the schedule recovers after failures */ on_recovery?: string | null; /** * Number of consecutive successes before the on_recovery handler is triggered (default 1) */ on_recovery_times?: number | null; on_recovery_extra_args?: ScriptArgs | null; /** * Path to a script or flow to run after each successful execution */ on_success?: string | null; on_success_extra_args?: ScriptArgs | null; /** * If true, the workspace-level error handler will not be triggered for this schedule's failures */ ws_error_handler_muted?: boolean; retry?: Retry | null; /** * Short summary describing the purpose of this schedule */ summary?: string | null; /** * Detailed description of what this schedule does */ description?: string | null; /** * If true, skip this schedule's execution if the previous run is still in progress (prevents concurrent runs) */ no_flow_overlap?: boolean; /** * Worker tag to route jobs to specific worker groups */ tag?: string | null; /** * ISO 8601 datetime until which the schedule is paused. Schedule resumes automatically after this time */ paused_until?: string | null; /** * Cron parser version. Use 'v2' for extended syntax with additional features */ cron_version?: string | null; /** * Path to a script that validates scheduled datetimes. Receives scheduled_for datetime and returns boolean to skip (true) or run (false) */ dynamic_skip?: string | null; labels?: Array<(string)>; /** * True when this row is a per-user draft with no deployed * schedule at the same path. Frontend renders a "Draft" badge. * */ draft_only?: boolean; /** * True when the authed user has a per-user draft at this path * (over a deployed row or a synthesized draft-only row). * Frontend appends a `*` to the displayed name. * */ is_draft?: boolean; /** * Labels inherited from the parent folder, computed at read time. Read-only — edit them on the folder. * */ inherited_labels?: Array<(string)>; }; export type ScheduleWJobs = Schedule & { jobs?: Array<{ id: string; success: boolean; duration_ms: number; }>; }; export type ErrorHandler = 'custom' | 'slack' | 'teams' | 'email' | 'instance_alerts'; export type NewSchedule = { /** * The unique Windmill path for this schedule. Must be of the form `u//` or `f//`. */ path: string; /** * Cron expression with 6 fields (seconds, minutes, hours, day of month, month, day of week). Example '0 0 12 * * *' for daily at noon */ schedule: string; /** * IANA timezone for the schedule (e.g., 'UTC', 'Europe/Paris', 'America/New_York') */ timezone: string; /** * Path to the script or flow to execute when triggered */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; args: ScriptArgs | null; /** * Whether the schedule is currently active and will trigger jobs */ enabled?: boolean; /** * Path to a script or flow to run when the scheduled job fails */ on_failure?: string | null; /** * Number of consecutive failures before the on_failure handler is triggered (default 1) */ on_failure_times?: number | null; /** * If true, trigger on_failure handler only on exactly N failures, not on every failure after N */ on_failure_exact?: boolean | null; on_failure_extra_args?: ScriptArgs | null; /** * Path to a script or flow to run when the schedule recovers after failures */ on_recovery?: string | null; /** * Number of consecutive successes before the on_recovery handler is triggered (default 1) */ on_recovery_times?: number | null; on_recovery_extra_args?: ScriptArgs | null; /** * Path to a script or flow to run after each successful execution */ on_success?: string | null; on_success_extra_args?: ScriptArgs | null; /** * If true, the workspace-level error handler will not be triggered for this schedule's failures */ ws_error_handler_muted?: boolean; retry?: Retry | null; /** * If true, skip this schedule's execution if the previous run is still in progress (prevents concurrent runs) */ no_flow_overlap?: boolean; /** * Short summary describing the purpose of this schedule */ summary?: string | null; /** * Detailed description of what this schedule does */ description?: string | null; /** * Worker tag to route jobs to specific worker groups */ tag?: string | null; /** * ISO 8601 datetime until which the schedule is paused. Schedule resumes automatically after this time */ paused_until?: string | null; /** * Cron parser version. Use 'v2' for extended syntax with additional features */ cron_version?: string | null; /** * Path to a script that validates scheduled datetimes. Receives scheduled_for datetime and returns boolean to skip (true) or run (false) */ dynamic_skip?: string | null; /** * The user or group this schedule runs as. Used during deployment to preserve the original schedule owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type EditSchedule = { /** * Cron expression with 6 fields (seconds, minutes, hours, day of month, month, day of week). Example '0 0 12 * * *' for daily at noon */ schedule: string; /** * IANA timezone for the schedule (e.g., 'UTC', 'Europe/Paris', 'America/New_York') */ timezone: string; args: ScriptArgs | null; /** * Path to a script or flow to run when the scheduled job fails */ on_failure?: string | null; /** * Number of consecutive failures before the on_failure handler is triggered (default 1) */ on_failure_times?: number | null; /** * If true, trigger on_failure handler only on exactly N failures, not on every failure after N */ on_failure_exact?: boolean | null; on_failure_extra_args?: ScriptArgs | null; /** * Path to a script or flow to run when the schedule recovers after failures */ on_recovery?: string | null; /** * Number of consecutive successes before the on_recovery handler is triggered (default 1) */ on_recovery_times?: number | null; on_recovery_extra_args?: ScriptArgs | null; /** * Path to a script or flow to run after each successful execution */ on_success?: string | null; on_success_extra_args?: ScriptArgs | null; /** * If true, the workspace-level error handler will not be triggered for this schedule's failures */ ws_error_handler_muted?: boolean; retry?: Retry | null; /** * If true, skip this schedule's execution if the previous run is still in progress (prevents concurrent runs) */ no_flow_overlap?: boolean; /** * Short summary describing the purpose of this schedule */ summary?: string | null; /** * Detailed description of what this schedule does */ description?: string | null; /** * Worker tag to route jobs to specific worker groups */ tag?: string | null; /** * ISO 8601 datetime until which the schedule is paused. Schedule resumes automatically after this time */ paused_until?: string | null; /** * Cron parser version. Use 'v2' for extended syntax with additional features */ cron_version?: string | null; /** * Path to a script that validates scheduled datetimes. Receives scheduled_for datetime and returns boolean to skip (true) or run (false) */ dynamic_skip?: string | null; /** * The user or group this schedule runs as (e.g., 'u/admin' or 'g/mygroup'). Only admins and wm_deployers can set this via preserve_permissioned_as. */ permissioned_as?: string | null; /** * If true and user is admin/wm_deployers, preserve the provided permissioned_as instead of using the deploying user's identity */ preserve_permissioned_as?: boolean | null; labels?: Array<(string)>; }; /** * job trigger kind (schedule, http, websocket...) */ export type JobTriggerKind = 'webhook' | 'default_email' | 'email' | 'schedule' | 'http' | 'websocket' | 'postgres' | 'kafka' | 'nats' | 'mqtt' | 'amqp' | 'sqs' | 'gcp' | 'azure' | 'google' | 'github' | 'asset' | 'freshness' | 'app' | 'ui'; /** * job trigger mode */ export type TriggerMode = 'enabled' | 'disabled' | 'suspended'; export type TriggerExtraProperty = { /** * The unique Windmill path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when triggered */ script_path: string; /** * The user or group this trigger runs as (permissioned_as) */ permissioned_as: string; /** * Additional permissions for this trigger */ extra_perms: { [key: string]: (boolean); }; /** * The workspace this trigger belongs to */ workspace_id: string; /** * Username of the last person who edited this trigger */ edited_by: string; /** * Timestamp of the last edit */ edited_at: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; /** * Trigger mode (enabled/disabled) */ mode: TriggerMode; labels?: Array<(string)>; /** * True when this row is a per-user draft with no deployed * trigger at the same path. Set by list endpoints when * `include_draft_only=true` synthesizes the row from the * draft. Frontend renders a "Draft" badge. * */ draft_only?: boolean; /** * True when the authed user has a per-user draft at this path * (over a deployed row or a synthesized draft-only row). * Frontend appends a `*` to the displayed name. * */ is_draft?: boolean; }; export type AuthenticationMethod = 'none' | 'windmill' | 'api_key' | 'basic_http' | 'custom_script' | 'signature'; export type RunnableKind = 'script' | 'flow'; export type OpenapiSpecFormat = 'yaml' | 'json'; export type OpenapiHttpRouteFilters = { folder_regex: string; path_regex: string; route_path_regex: string; }; export type WebhookFilters = { user_or_folder_regex: '*' | 'u' | 'f'; user_or_folder_regex_value: string; path: string; runnable_kind: RunnableKind; }; export type OpenapiV3Info = { title: string; version: string; description?: string; terms_of_service?: string; contact?: { name?: string; url?: string; email?: string; }; license?: { name: string; identifier?: string; url?: string; }; }; export type GenerateOpenapiSpec = { info?: OpenapiV3Info; url?: string; openapi_spec_format?: OpenapiSpecFormat; http_route_filters?: Array; webhook_filters?: Array; }; export type HttpMethod = 'get' | 'post' | 'put' | 'delete' | 'patch'; export type HttpRequestType = 'sync' | 'async' | 'sync_sse'; export type HttpTrigger = TriggerExtraProperty & { /** * The URL route path that will trigger this endpoint (e.g., 'api/myendpoint'). Must NOT start with a /. */ route_path: string; /** * Configuration for serving static assets (s3 bucket, storage path, filename) */ static_asset_config?: { /** * S3 bucket path for static assets */ s3: string; /** * Storage path for static assets */ storage?: string; /** * Filename for the static asset */ filename?: string; } | null; /** * HTTP method (get, post, put, delete, patch) that triggers this endpoint */ http_method: HttpMethod; /** * Path to the resource containing authentication configuration (for api_key, basic_http, custom_script, signature methods) */ authentication_resource_path?: string | null; /** * Short summary describing the purpose of this trigger */ summary?: string | null; /** * Detailed description of what this trigger does */ description?: string | null; /** * How the request is handled - 'sync' waits for result, 'async' returns job ID immediately, 'sync_sse' streams results via Server-Sent Events */ request_type: HttpRequestType; /** * How requests are authenticated - 'none' (public), 'windmill' (Windmill token), 'api_key', 'basic_http', 'custom_script', 'signature' */ authentication_method: AuthenticationMethod; /** * If true, serves static files from S3/storage instead of running a script */ is_static_website: boolean; /** * If true, the route includes the workspace ID in the path */ workspaced_route: boolean; /** * If true, wraps the request body in a 'body' parameter */ wrap_body: boolean; /** * If true, passes the request body as a raw string instead of parsing as JSON */ raw_string: boolean; /** * Origins allowed to call this route cross-origin, matched against the request's Origin header (ignoring case) and echoed back on a match. When set, the list governs both the preflight and the response, overriding any Access-Control-Allow-Origin the runnable returns via wm_headers. Use ['*'] to opt out of any restriction, including the http_route_default_allowed_origins instance setting. An empty list is not a configuration and resolves exactly as null does. When null, the instance setting applies, or Access-Control-Allow-Origin: * if it is unset. Ignored on a static website, which has no authentication of its own and so hands out public files: restricting which browsers may read them protects nothing while breaking cross-origin webfonts and fetches. A single-file static asset is not exempt, since it can carry an authentication_method. */ allowed_origins?: Array<(string)> | null; /** * Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow. */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; }; export type NewHttpTrigger = { /** * The unique Windmill path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when triggered */ script_path: string; /** * The URL route path that will trigger this endpoint (e.g., 'api/myendpoint'). Must NOT start with a /. */ route_path: string; /** * If true, the route includes the workspace ID in the path */ workspaced_route?: boolean; /** * Short summary describing the purpose of this trigger */ summary?: string | null; /** * Detailed description of what this trigger does */ description?: string | null; /** * Configuration for serving static assets (s3 bucket, storage path, filename) */ static_asset_config?: { /** * S3 bucket path for static assets */ s3: string; /** * Storage path for static assets */ storage?: string; /** * Filename for the static asset */ filename?: string; } | null; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; /** * HTTP method (get, post, put, delete, patch) that triggers this endpoint */ http_method: HttpMethod; /** * Path to the resource containing authentication configuration (for api_key, basic_http, custom_script, signature methods) */ authentication_resource_path?: string | null; /** * Deprecated, use request_type instead */ is_async?: boolean; /** * How the request is handled - 'sync' waits for result, 'async' returns job ID immediately, 'sync_sse' streams results via Server-Sent Events */ request_type?: HttpRequestType; /** * How requests are authenticated - 'none' (public), 'windmill' (Windmill token), 'api_key', 'basic_http', 'custom_script', 'signature' */ authentication_method: AuthenticationMethod; /** * If true, serves static files from S3/storage instead of running a script */ is_static_website: boolean; /** * If true, wraps the request body in a 'body' parameter */ wrap_body?: boolean; mode?: TriggerMode; /** * If true, passes the request body as a raw string instead of parsing as JSON */ raw_string?: boolean; /** * Origins allowed to call this route cross-origin, matched against the request's Origin header (ignoring case) and echoed back on a match. When set, the list governs both the preflight and the response, overriding any Access-Control-Allow-Origin the runnable returns via wm_headers. Use ['*'] to opt out of any restriction, including the http_route_default_allowed_origins instance setting. An empty list is not a configuration and resolves exactly as null does. When null, the instance setting applies, or Access-Control-Allow-Origin: * if it is unset. Ignored on a static website, which has no authentication of its own and so hands out public files: restricting which browsers may read them protects nothing while breaking cross-origin webfonts and fetches. A single-file static asset is not exempt, since it can carry an authentication_method. */ allowed_origins?: Array<(string)> | null; /** * Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow. */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type EditHttpTrigger = { /** * The unique Windmill path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when triggered */ script_path: string; /** * The URL route path that will trigger this endpoint (e.g., 'api/myendpoint'). Must NOT start with a /. */ route_path?: string; /** * Short summary describing the purpose of this trigger */ summary?: string | null; /** * Detailed description of what this trigger does */ description?: string | null; /** * If true, the route includes the workspace ID in the path */ workspaced_route?: boolean; /** * Configuration for serving static assets (s3 bucket, storage path, filename) */ static_asset_config?: { /** * S3 bucket path for static assets */ s3: string; /** * Storage path for static assets */ storage?: string; /** * Filename for the static asset */ filename?: string; } | null; /** * Path to the resource containing authentication configuration (for api_key, basic_http, custom_script, signature methods) */ authentication_resource_path?: string | null; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; /** * HTTP method (get, post, put, delete, patch) that triggers this endpoint */ http_method: HttpMethod; /** * Deprecated, use request_type instead */ is_async?: boolean; /** * How the request is handled - 'sync' waits for result, 'async' returns job ID immediately, 'sync_sse' streams results via Server-Sent Events */ request_type?: HttpRequestType; /** * How requests are authenticated - 'none' (public), 'windmill' (Windmill token), 'api_key', 'basic_http', 'custom_script', 'signature' */ authentication_method: AuthenticationMethod; /** * If true, serves static files from S3/storage instead of running a script */ is_static_website: boolean; /** * If true, wraps the request body in a 'body' parameter */ wrap_body?: boolean; /** * If true, passes the request body as a raw string instead of parsing as JSON */ raw_string?: boolean; /** * Origins allowed to call this route cross-origin, matched against the request's Origin header (ignoring case) and echoed back on a match. When set, the list governs both the preflight and the response, overriding any Access-Control-Allow-Origin the runnable returns via wm_headers. Use ['*'] to opt out of any restriction, including the http_route_default_allowed_origins instance setting. An empty list is not a configuration and resolves exactly as null does. When null, the instance setting applies, or Access-Control-Allow-Origin: * if it is unset. Ignored on a static website, which has no authentication of its own and so hands out public files: restricting which browsers may read them protects nothing while breaking cross-origin webfonts and fetches. A single-file static asset is not exempt, since it can carry an authentication_method. */ allowed_origins?: Array<(string)> | null; /** * Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow. */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type TriggersCount = { primary_schedule?: { schedule?: string; }; schedule_count?: number; http_routes_count?: number; webhook_count?: number; email_count?: number; default_email_count?: number; websocket_count?: number; postgres_count?: number; kafka_count?: number; nats_count?: number; mqtt_count?: number; amqp_count?: number; gcp_count?: number; azure_count?: number; sqs_count?: number; nextcloud_count?: number; google_count?: number; github_count?: number; }; export type WebsocketHeartbeat = { /** * Interval in seconds between heartbeat messages */ interval_secs: number; /** * Message to send as heartbeat. Use {{state}} as a placeholder for a value extracted from incoming messages (see state_field). */ message: string; /** * Optional. Top-level JSON field to extract from incoming messages. The extracted value replaces {{state}} in the heartbeat message. */ state_field?: string; }; /** * Either a leaf filter, matching a field of the message (parsed as JSON) against a value by equality (or superset, when the value is an object or array) — addressed by `key` for a top-level field or `path` for a dotted path into nested objects — or a group nesting sub-filters under a boolean operator (`none_of` matches when none of its sub-filters do). * */ export type TriggerFilter = { key: string; value: unknown; } | { /** * Dotted path into nested objects, e.g. `a.b.c`. Does not traverse arrays. */ path: string; value: unknown; } | { any_of: Array; } | { all_of: Array; } | { none_of: Array; }; export type WebsocketTrigger = TriggerExtraProperty & { /** * The WebSocket URL to connect to (can be a static URL or computed by a runnable) */ url: string; /** * ID of the server currently handling this trigger (internal) */ server_id?: string; /** * Timestamp of last server heartbeat (internal) */ last_server_ping?: string; /** * Last error message if the trigger failed */ error?: string; /** * Filters to match incoming messages (only matching messages trigger the script). Each entry is either a leaf `{key, value}` (top-level field) or `{path, value}` (dotted path into nested objects), or a group `{any_of: [...]}` / `{all_of: [...]}` / `{none_of: [...]}` nesting more entries. Entries at the top level are combined with `filter_logic`. */ filters: Array; /** * Logic to apply when evaluating the top-level filters. 'and' requires all of them to match, 'or' requires any of them to match. Nested `any_of`/`all_of`/`none_of` groups carry their own logic. */ filter_logic?: 'and' | 'or'; /** * Messages to send immediately after connecting (can be raw strings or computed by runnables) */ initial_messages?: Array | null; /** * Arguments to pass to the script/flow that computes the WebSocket URL */ url_runnable_args?: ScriptArgs | null; /** * If true, the script can return a message to send back through the WebSocket */ can_return_message: boolean; /** * If true, error results are sent back through the WebSocket */ can_return_error_result: boolean; /** * Optional periodic heartbeat message configuration */ heartbeat?: WebsocketHeartbeat | null; /** * Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow. */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; }; export type NewWebsocketTrigger = { /** * The unique Windmill path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when a message is received */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; /** * The WebSocket URL to connect to (can be a static URL or computed by a runnable) */ url: string; mode?: TriggerMode; /** * Filters to match incoming messages (only matching messages trigger the script). Each entry is either a leaf `{key, value}` (top-level field) or `{path, value}` (dotted path into nested objects), or a group `{any_of: [...]}` / `{all_of: [...]}` / `{none_of: [...]}` nesting more entries. Entries at the top level are combined with `filter_logic`. */ filters: Array; /** * Logic to apply when evaluating the top-level filters. 'and' requires all of them to match, 'or' requires any of them to match. Nested `any_of`/`all_of`/`none_of` groups carry their own logic. */ filter_logic?: 'and' | 'or'; /** * Messages to send immediately after connecting (can be raw strings or computed by runnables) */ initial_messages?: Array | null; /** * Arguments to pass to the script/flow that computes the WebSocket URL */ url_runnable_args?: ScriptArgs | null; /** * If true, the script can return a message to send back through the WebSocket */ can_return_message: boolean; /** * If true, error results are sent back through the WebSocket */ can_return_error_result: boolean; /** * Optional periodic heartbeat message configuration */ heartbeat?: WebsocketHeartbeat | null; /** * Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow. */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type EditWebsocketTrigger = { /** * The WebSocket URL to connect to (can be a static URL or computed by a runnable) */ url: string; /** * The unique Windmill path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when a message is received */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; /** * Filters to match incoming messages (only matching messages trigger the script). Each entry is either a leaf `{key, value}` (top-level field) or `{path, value}` (dotted path into nested objects), or a group `{any_of: [...]}` / `{all_of: [...]}` / `{none_of: [...]}` nesting more entries. Entries at the top level are combined with `filter_logic`. */ filters: Array; /** * Logic to apply when evaluating the top-level filters. 'and' requires all of them to match, 'or' requires any of them to match. Nested `any_of`/`all_of`/`none_of` groups carry their own logic. */ filter_logic?: 'and' | 'or'; /** * Messages to send immediately after connecting (can be raw strings or computed by runnables) */ initial_messages?: Array | null; /** * Arguments to pass to the script/flow that computes the WebSocket URL */ url_runnable_args?: ScriptArgs | null; /** * If true, the script can return a message to send back through the WebSocket */ can_return_message: boolean; /** * If true, error results are sent back through the WebSocket */ can_return_error_result: boolean; /** * Optional periodic heartbeat message configuration */ heartbeat?: WebsocketHeartbeat | null; /** * Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow. */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type WebsocketTriggerInitialMessage = { raw_message: string; } | { runnable_result: { path: string; args: ScriptArgs; is_flow: boolean; }; }; export type MqttQoS = 'qos0' | 'qos1' | 'qos2'; export type MqttV3Config = { clean_session?: boolean; }; export type MqttV5Config = { clean_start?: boolean; topic_alias_maximum?: number; session_expiry_interval?: number; }; export type MqttSubscribeTopic = { qos: MqttQoS; topic: string; }; export type MqttClientVersion = 'v3' | 'v5'; export type MqttTrigger = TriggerExtraProperty & { /** * Path to the MQTT resource containing broker connection configuration */ mqtt_resource_path: string; /** * Array of MQTT topics to subscribe to, each with topic name and QoS level */ subscribe_topics: Array; /** * MQTT v3 specific configuration (clean_session) */ v3_config?: MqttV3Config | null; /** * MQTT v5 specific configuration (clean_start, topic_alias_maximum, session_expiry_interval) */ v5_config?: MqttV5Config | null; /** * MQTT client ID for this connection */ client_id?: string | null; /** * MQTT protocol version ('v3' or 'v5') */ client_version?: MqttClientVersion | null; /** * ID of the server currently handling this trigger (internal) */ server_id?: string; /** * Timestamp of last server heartbeat (internal) */ last_server_ping?: string; /** * Last error message if the trigger failed */ error?: string; /** * Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow. */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; }; export type NewMqttTrigger = { /** * Path to the MQTT resource containing broker connection configuration */ mqtt_resource_path: string; /** * Array of MQTT topics to subscribe to, each with topic name and QoS level */ subscribe_topics: Array; /** * MQTT client ID for this connection */ client_id?: string | null; /** * MQTT v3 specific configuration (clean_session) */ v3_config?: MqttV3Config | null; /** * MQTT v5 specific configuration (clean_start, topic_alias_maximum, session_expiry_interval) */ v5_config?: MqttV5Config | null; /** * MQTT protocol version ('v3' or 'v5') */ client_version?: MqttClientVersion | null; /** * The unique Windmill path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when a message is received */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; mode?: TriggerMode; /** * Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow. */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type EditMqttTrigger = { /** * Path to the MQTT resource containing broker connection configuration */ mqtt_resource_path: string; /** * Array of MQTT topics to subscribe to, each with topic name and QoS level */ subscribe_topics: Array; /** * MQTT client ID for this connection */ client_id?: string | null; /** * MQTT v3 specific configuration (clean_session) */ v3_config?: MqttV3Config | null; /** * MQTT v5 specific configuration (clean_start, topic_alias_maximum, session_expiry_interval) */ v5_config?: MqttV5Config | null; /** * MQTT protocol version ('v3' or 'v5') */ client_version?: MqttClientVersion | null; /** * The unique Windmill path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when a message is received */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; mode?: TriggerMode; /** * Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow. */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type AmqpExchange = { /** * Name of the exchange to bind the consumed queue to */ exchange_name: string; /** * Routing keys used to bind the queue to the exchange */ routing_keys?: Array<(string)>; }; export type AmqpOptions = { /** * Declare the queue (durable) before consuming; when false the queue is declared passively and must already exist */ declare_queue?: boolean; /** * Maximum number of unacknowledged messages the broker delivers at once (1-65535) */ prefetch_count?: number; }; export type AmqpTrigger = TriggerExtraProperty & { /** * Path to the AMQP resource containing broker connection configuration */ amqp_resource_path: string; /** * Name of the queue to consume messages from */ queue_name: string; /** * Optional exchange binding for the consumed queue */ exchange?: AmqpExchange | null; /** * Optional consumer options (queue declaration, prefetch) */ options?: AmqpOptions | null; /** * ID of the server currently handling this trigger (internal) */ server_id?: string; /** * Timestamp of last server heartbeat (internal) */ last_server_ping?: string; /** * Last error message if the trigger failed */ error?: string; /** * Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow. */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; }; export type NewAmqpTrigger = { /** * Path to the AMQP resource containing broker connection configuration */ amqp_resource_path: string; /** * Name of the queue to consume messages from */ queue_name: string; /** * Optional exchange binding for the consumed queue */ exchange?: AmqpExchange | null; /** * Optional consumer options (queue declaration, prefetch) */ options?: AmqpOptions | null; /** * The unique Windmill path for this trigger. Must be of the form `u//` or `f//`. */ path: string; /** * Path to the script or flow to execute when a message is received */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; mode?: TriggerMode; /** * Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow. */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type EditAmqpTrigger = { /** * Path to the AMQP resource containing broker connection configuration */ amqp_resource_path: string; /** * Name of the queue to consume messages from */ queue_name: string; /** * Optional exchange binding for the consumed queue */ exchange?: AmqpExchange | null; /** * Optional consumer options (queue declaration, prefetch) */ options?: AmqpOptions | null; /** * The unique Windmill path for this trigger. Must be of the form `u//` or `f//`. */ path: string; /** * Path to the script or flow to execute when a message is received */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; mode?: TriggerMode; /** * Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow. */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; /** * Delivery mode for messages. 'push' for HTTP push delivery where messages are sent to a webhook endpoint, 'pull' for polling where the trigger actively fetches messages. */ export type DeliveryType = 'push' | 'pull'; /** * Configuration for push delivery mode. */ export type PushConfig = { /** * The audience claim for OIDC tokens used in push authentication. */ audience?: string; /** * If true, push messages will include OIDC authentication tokens. */ authenticate: boolean; }; /** * A Google Cloud Pub/Sub trigger that executes a script or flow when messages are received. */ export type GcpTrigger = TriggerExtraProperty & { /** * Path to the GCP resource containing service account credentials for authentication. Omit to authenticate with the instance's application default credentials. */ gcp_resource_path?: string; /** * GCP project the client operates in. Defaults to the project of the credentials. Topics and subscriptions given as fully qualified names are reached whatever it is. */ project_id?: string; /** * Google Cloud Pub/Sub topic ID to subscribe to. Accepts a bare ID or a fully qualified name (projects//topics/). */ topic_id: string; /** * Google Cloud Pub/Sub subscription ID. Accepts a bare ID or a fully qualified name (projects//subscriptions/). */ subscription_id: string; /** * ID of the server currently handling this trigger (internal use). */ server_id?: string; delivery_type: DeliveryType; delivery_config?: PushConfig | null; subscription_mode: SubscriptionMode; /** * Timestamp of last server heartbeat (internal use). */ last_server_ping?: string; /** * Last error message if the trigger failed. */ error?: string; /** * Path to a script or flow to run when the triggered job fails. */ error_handler_path?: string; /** * Arguments to pass to the error handler. */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions. */ retry?: Retry; }; /** * The mode of subscription. 'existing' means using an existing GCP subscription, while 'create_update' involves creating or updating a new subscription. */ export type SubscriptionMode = 'existing' | 'create_update'; /** * Data for creating or updating a Google Cloud Pub/Sub trigger. */ export type GcpTriggerData = { /** * Path to the GCP resource containing service account credentials for authentication. Omit to authenticate with the instance's application default credentials, which only workspace admins may select. */ gcp_resource_path?: string; /** * GCP project the client operates in. Defaults to the project of the credentials. Topics and subscriptions given as fully qualified names are reached whatever it is. */ project_id?: string; subscription_mode: SubscriptionMode; /** * Google Cloud Pub/Sub topic ID to subscribe to. Accepts a bare ID or a fully qualified name (projects//topics/). */ topic_id: string; /** * Google Cloud Pub/Sub subscription ID. Accepts a bare ID or a fully qualified name (projects//subscriptions/). */ subscription_id?: string; /** * Base URL for push delivery endpoint. */ base_endpoint?: string; delivery_type?: DeliveryType; delivery_config?: PushConfig | null; /** * The unique Windmill path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when a message is received. */ script_path: string; /** * True if script_path points to a flow, false if it points to a script. */ is_flow: boolean; mode?: TriggerMode; /** * If true, automatically acknowledge messages after processing. */ auto_acknowledge_msg?: boolean; /** * Time in seconds within which the message must be acknowledged. If not provided, defaults to the subscription's acknowledgment deadline (600 seconds). */ ack_deadline?: number; /** * Path to a script or flow to run when the triggered job fails. */ error_handler_path?: string; /** * Arguments to pass to the error handler. */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions. */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type GetAllTopicSubscription = { topic_id: string; project_id?: string; }; export type DeleteGcpSubscription = { subscription_id: string; project_id?: string; }; /** * Azure Event Grid trigger mode. */ export type AzureMode = 'basic_push' | 'namespace_push' | 'namespace_pull'; /** * An ARM resource the service principal can see. */ export type AzureArmResource = { id: string; name: string; location?: string; type: string; }; export type AzureDeleteSubscription = { azure_mode: AzureMode; scope_resource_id: string; topic_name?: string | null; subscription_name: string; }; /** * An Azure Event Grid trigger that executes a script or flow when events arrive. */ export type AzureTrigger = TriggerExtraProperty & { azure_resource_path: string; azure_mode: AzureMode; /** * ARM resource ID of the topic (basic) or namespace (namespace modes). */ scope_resource_id: string; /** * Topic name within the namespace (namespace modes only). */ topic_name?: string | null; subscription_name: string; event_type_filters?: Array<(string)> | null; server_id?: string; last_server_ping?: string; error?: string; error_handler_path?: string; error_handler_args?: ScriptArgs; retry?: Retry; }; /** * Data for creating or updating an Azure Event Grid trigger. */ export type AzureTriggerData = { azure_resource_path: string; azure_mode: AzureMode; scope_resource_id: string; topic_name?: string | null; subscription_name: string; /** * Base URL for push delivery endpoints (push modes only). */ base_endpoint?: string; event_type_filters?: Array<(string)>; /** * The unique Windmill path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; script_path: string; is_flow: boolean; mode?: TriggerMode; error_handler_path?: string; error_handler_args?: ScriptArgs; retry?: Retry; permissioned_as?: string; preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type TestAzureConnection = { azure_resource_path: string; }; export type AzureListTopics = { scope_resource_id: string; }; export type AzureListSubscriptions = { scope_resource_id: string; topic_name: string; }; export type AwsAuthResourceType = 'oidc' | 'credentials'; export type SqsTrigger = TriggerExtraProperty & { /** * The full URL of the AWS SQS queue to poll for messages */ queue_url: string; /** * Authentication type - 'credentials' for access key/secret, 'oidc' for OpenID Connect */ aws_auth_resource_type: AwsAuthResourceType; /** * Path to the AWS resource containing credentials or OIDC configuration */ aws_resource_path: string; /** * Array of SQS message attribute names to include with each message */ message_attributes?: Array<(string)> | null; /** * ID of the server currently handling this trigger (internal) */ server_id?: string; /** * Timestamp of last server heartbeat (internal) */ last_server_ping?: string; /** * Last error message if the trigger failed */ error?: string; /** * Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow. */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; }; export type LoggedWizardStatus = 'OK' | 'SKIP' | 'FAIL'; export type CustomInstanceDbLogs = { super_admin?: LoggedWizardStatus; database_credentials?: LoggedWizardStatus; valid_dbname?: LoggedWizardStatus; created_database?: LoggedWizardStatus; db_connect?: LoggedWizardStatus; grant_permissions?: LoggedWizardStatus; replication_user?: LoggedWizardStatus; replication_user_error?: string; user_connect?: LoggedWizardStatus; }; export type CustomInstanceDbTag = 'ducklake' | 'datatable'; export type InstanceDatatableRole = { id: string; name: string; enabled: boolean; }; export type DatatableRoleTenants = { id: string; name?: string; tenants: Array<(string)>; }; export type DatatablePermissions = { /** * Whether this data table can be put under roles at all. Only one backed by the instance database can: a role is a login on that cluster. */ supported: boolean; permissioned: boolean; default_role: string; roles: Array; governing_workspace_id?: string; /** * for a clone, the data table whose roles it takes */ clone_of?: { workspace_id: string; datatable: string; }; editable: boolean; available_roles: Array; ungoverned_reachers?: Array<{ workspace_id: string; datatable: string; }>; }; /** * what access is read or changed on */ export type AclTarget = AclTargetDatabase | AclTargetSchema | AclTargetTable; export type AclTargetDatabase = { kind: 'database'; }; export type AclTargetSchema = { kind: 'schema'; schema: string; }; export type AclTargetTable = { kind: 'table'; schema: string; table: string; }; /** * one change to plan or apply */ export type AclChange = AclChangeSetOwner | AclChangeGrant | AclChangeRevoke; /** * hands the target to role — for a schema, with everything already in it but an extension's members, which stay with the extension */ export type AclChangeSetOwner = { type: 'set_owner'; /** * a data table role of the instance, or admin */ role: string; }; export type AclChangeGrant = { type: 'grant'; /** * a data table role of the instance, or admin */ role: string; privileges: Array<(string)>; scope: AclGrantScope; }; export type AclChangeRevoke = { type: 'revoke'; /** * a data table role of the instance, other than admin */ role: string; privileges: Array<(string)>; scope: AclGrantScope; /** * objects inside the target the revoke covers, empty for the target itself. Only with the target scope; a revoke on all objects of a kind is refused, since it cannot say which grants it takes back. */ objects?: Array; }; export type AclGrantScope = 'target' | 'all_tables' | 'all_sequences' | 'all_functions' | 'future_tables' | 'future_sequences' | 'future_functions'; export type AclChangeRequest = { target: AclTarget; change: AclChange; /** * The statements the plan showed. Required to apply, which plans again and refuses if the result differs. */ statements?: Array<(string)>; }; export type AclPlan = { statements: Array<(string)>; warnings: Array<(string)>; }; export type AclObject = { name: string; /** * TABLE, SEQUENCE, FUNCTION, PROCEDURE or TYPE — what the object is. A revoke turns it into the keyword it takes, ROUTINE for both routine kinds; a type's grants are read only. */ kind: string; /** * identity arguments of a routine, which is what tells two of the same name apart */ args?: string; }; export type AclGrant = { grantee: string; privileges: Array<(string)>; object?: AclObject; /** * set for a default privilege, naming the kind of object it covers (TABLES, SEQUENCES, FUNCTIONS, TYPES, or SCHEMAS). On a schema, the defaults set in that schema; on the database, the ones set database-wide, which apply in every schema and which no schema's own defaults take back. */ future?: string; /** * the roles the grant comes from, each once — who granted it, or for a default privilege the role whose future objects it covers. A revoke of some of the grant's privileges takes them back from every source that gave them. */ sources: Array; }; export type AclSource = { role: string; /** * what role gave of the grant's privileges. A revoke is held back only by a source out of reach that gave some of what it takes back. */ privileges: Array<(string)>; /** * whether the data table's connection can take back what role gave. On an object that is the owner, when the connection acts for the owner, and otherwise the connection itself; for a default privilege, a creating role the connection acts for. What a source out of reach gave is not revocable from here; privileges only other sources gave still are. */ reachable: boolean; }; export type DatatableAclInfo = { owner: string; /** * the roles a change may name; empty unless the caller may change anything */ roles: Array<(string)>; /** * whether the caller may plan and apply changes */ editable: boolean; /** * whether this is a clone, whose grants stay as they were copied */ clone: boolean; /** * whether the server is Postgres 17+, which added the MAINTAIN table privilege */ supports_maintain: boolean; /** * the database the target lives in */ dbname: string; grants: Array; /** * a database's schemas, or a schema's tables */ children: Array<(string)>; }; export type CustomInstanceDb = { logs: CustomInstanceDbLogs; /** * Whether the operation completed successfully */ success: boolean; /** * Error message if the operation failed */ error?: string | null; tag?: CustomInstanceDbTag; /** * Workspaces that reference this database via a ducklake catalog or datatable database with resource_type 'instance'. Computed at request time, not persisted. */ used_by_workspaces?: Array<(string)>; }; export type NewSqsTrigger = { /** * The full URL of the AWS SQS queue to poll for messages */ queue_url: string; /** * Authentication type - 'credentials' for access key/secret, 'oidc' for OpenID Connect */ aws_auth_resource_type: AwsAuthResourceType; /** * Path to the AWS resource containing credentials or OIDC configuration */ aws_resource_path: string; /** * Array of SQS message attribute names to include with each message */ message_attributes?: Array<(string)> | null; /** * The unique Windmill path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when a message is received */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; mode?: TriggerMode; /** * Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow. */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type EditSqsTrigger = { /** * The full URL of the AWS SQS queue to poll for messages */ queue_url: string; /** * Authentication type - 'credentials' for access key/secret, 'oidc' for OpenID Connect */ aws_auth_resource_type: AwsAuthResourceType; /** * Path to the AWS resource containing credentials or OIDC configuration */ aws_resource_path: string; /** * Array of SQS message attribute names to include with each message */ message_attributes?: Array<(string)> | null; /** * The unique Windmill path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when a message is received */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; mode?: TriggerMode; /** * Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow. */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type Slot = { name?: string; }; export type SlotList = { slot_name?: string; active?: boolean; }; export type PublicationData = { table_to_track?: Array; transaction_to_track: Array<(string)>; }; export type TableToTrack = Array<{ table_name: string; columns_name?: Array<(string)>; where_clause?: string; }>; export type Relations = { schema_name: string; table_to_track: TableToTrack; }; export type Language = 'Typescript'; export type TemplateScript = { postgres_resource_path: string; relations: Array; language: Language; }; export type PostgresTrigger = TriggerExtraProperty & { /** * Path to the PostgreSQL resource containing connection configuration */ postgres_resource_path: string; /** * Name of the PostgreSQL publication to subscribe to for change data capture */ publication_name: string; /** * ID of the server currently handling this trigger (internal) */ server_id?: string; /** * Name of the PostgreSQL logical replication slot to use */ replication_slot_name: string; /** * Last error message if the trigger failed */ error?: string; /** * Timestamp of last server heartbeat (internal) */ last_server_ping?: string; /** * Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow. */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; }; export type NewPostgresTrigger = { /** * Name of the PostgreSQL logical replication slot to use */ replication_slot_name?: string; /** * Name of the PostgreSQL publication to subscribe to for change data capture */ publication_name?: string; /** * The unique Windmill path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when database changes are detected */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; mode?: TriggerMode; /** * Path to the PostgreSQL resource containing connection configuration */ postgres_resource_path: string; /** * Configuration for creating/managing the publication (tables, operations) */ publication?: PublicationData; /** * Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow. */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type EditPostgresTrigger = { /** * Name of the PostgreSQL logical replication slot to use */ replication_slot_name: string; /** * Name of the PostgreSQL publication to subscribe to for change data capture */ publication_name: string; /** * The unique Windmill path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when database changes are detected */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; mode?: TriggerMode; /** * Path to the PostgreSQL resource containing connection configuration */ postgres_resource_path: string; /** * Configuration for creating/managing the publication (tables, operations) */ publication?: PublicationData; /** * Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow. */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type KafkaTrigger = TriggerExtraProperty & { /** * Path to the Kafka resource containing connection configuration */ kafka_resource_path: string; /** * Kafka consumer group ID for this trigger */ group_id: string; /** * Array of Kafka topic names to subscribe to */ topics: Array<(string)>; /** * Filters to match incoming messages (only matching messages trigger the script). Each entry is either a leaf `{key, value}` (top-level field) or `{path, value}` (dotted path into nested objects), or a group `{any_of: [...]}` / `{all_of: [...]}` / `{none_of: [...]}` nesting more entries. Entries at the top level are combined with `filter_logic`. */ filters: Array; /** * Logic to apply when evaluating the top-level filters. 'and' requires all of them to match, 'or' requires any of them to match. Nested `any_of`/`all_of`/`none_of` groups carry their own logic. */ filter_logic?: 'and' | 'or'; /** * Initial offset behavior when consumer group has no committed offset. 'latest' starts from new messages only, 'earliest' starts from the beginning. */ auto_offset_reset?: 'latest' | 'earliest'; /** * When true (default), offsets are committed automatically after receiving each message. When false, you must manually commit offsets using the commit_offsets endpoint. */ auto_commit?: boolean; /** * ID of the server currently handling this trigger (internal) */ server_id?: string; /** * Timestamp of last server heartbeat (internal) */ last_server_ping?: string; /** * Last error message if the trigger failed */ error?: string; /** * Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow. */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; }; export type NewKafkaTrigger = { /** * The unique Windmill path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when a message is received */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; /** * Path to the Kafka resource containing connection configuration */ kafka_resource_path: string; /** * Kafka consumer group ID for this trigger */ group_id: string; /** * Array of Kafka topic names to subscribe to */ topics: Array<(string)>; /** * Filters to match incoming messages (only matching messages trigger the script). Each entry is either a leaf `{key, value}` (top-level field) or `{path, value}` (dotted path into nested objects), or a group `{any_of: [...]}` / `{all_of: [...]}` / `{none_of: [...]}` nesting more entries. Entries at the top level are combined with `filter_logic`. */ filters: Array; /** * Logic to apply when evaluating the top-level filters. 'and' requires all of them to match, 'or' requires any of them to match. Nested `any_of`/`all_of`/`none_of` groups carry their own logic. */ filter_logic?: 'and' | 'or'; /** * Initial offset behavior when consumer group has no committed offset. */ auto_offset_reset?: 'latest' | 'earliest'; /** * When true (default), offsets are committed automatically after receiving each message. When false, you must manually commit offsets using the commit_offsets endpoint. */ auto_commit?: boolean; mode?: TriggerMode; /** * Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow. */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type EditKafkaTrigger = { /** * Path to the Kafka resource containing connection configuration */ kafka_resource_path: string; /** * Kafka consumer group ID for this trigger */ group_id: string; /** * Array of Kafka topic names to subscribe to */ topics: Array<(string)>; /** * Filters to match incoming messages (only matching messages trigger the script). Each entry is either a leaf `{key, value}` (top-level field) or `{path, value}` (dotted path into nested objects), or a group `{any_of: [...]}` / `{all_of: [...]}` / `{none_of: [...]}` nesting more entries. Entries at the top level are combined with `filter_logic`. */ filters: Array; /** * Logic to apply when evaluating the top-level filters. 'and' requires all of them to match, 'or' requires any of them to match. Nested `any_of`/`all_of`/`none_of` groups carry their own logic. */ filter_logic?: 'and' | 'or'; /** * Initial offset behavior when consumer group has no committed offset. */ auto_offset_reset?: 'latest' | 'earliest'; /** * When true (default), offsets are committed automatically after receiving each message. When false, you must manually commit offsets using the commit_offsets endpoint. */ auto_commit?: boolean; /** * The unique Windmill path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when a message is received */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; /** * Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow. */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type NatsTrigger = TriggerExtraProperty & { /** * Path to the NATS resource containing connection configuration */ nats_resource_path: string; /** * If true, uses NATS JetStream for durable message delivery */ use_jetstream: boolean; /** * JetStream stream name (required when use_jetstream is true) */ stream_name?: string | null; /** * JetStream consumer name (required when use_jetstream is true) */ consumer_name?: string | null; /** * Array of NATS subjects to subscribe to */ subjects: Array<(string)>; /** * ID of the server currently handling this trigger (internal) */ server_id?: string; /** * Timestamp of last server heartbeat (internal) */ last_server_ping?: string; /** * Last error message if the trigger failed */ error?: string; /** * Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow. */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; }; export type NewNatsTrigger = { /** * The unique Windmill path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when a message is received */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; /** * Path to the NATS resource containing connection configuration */ nats_resource_path: string; /** * If true, uses NATS JetStream for durable message delivery */ use_jetstream: boolean; /** * JetStream stream name (required when use_jetstream is true) */ stream_name?: string | null; /** * JetStream consumer name (required when use_jetstream is true) */ consumer_name?: string | null; /** * Array of NATS subjects to subscribe to */ subjects: Array<(string)>; mode?: TriggerMode; /** * Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow. */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type EditNatsTrigger = { /** * Path to the NATS resource containing connection configuration */ nats_resource_path: string; /** * If true, uses NATS JetStream for durable message delivery */ use_jetstream: boolean; /** * JetStream stream name (required when use_jetstream is true) */ stream_name?: string | null; /** * JetStream consumer name (required when use_jetstream is true) */ consumer_name?: string | null; /** * Array of NATS subjects to subscribe to */ subjects: Array<(string)>; /** * The unique Windmill path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when a message is received */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; /** * Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow. */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type EmailTrigger = TriggerExtraProperty & { local_part: string; workspaced_local_part?: boolean; error_handler_path?: string; error_handler_args?: ScriptArgs; retry?: Retry; }; export type NewEmailTrigger = { path: string; script_path: string; local_part: string; workspaced_local_part?: boolean; is_flow: boolean; error_handler_path?: string; error_handler_args?: ScriptArgs; retry?: Retry; mode?: TriggerMode; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type EditEmailTrigger = { path: string; script_path: string; local_part?: string; workspaced_local_part?: boolean; is_flow: boolean; error_handler_path?: string; error_handler_args?: ScriptArgs; retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type Group = { name: string; summary?: string; members?: Array<(string)>; extra_perms?: { [key: string]: (boolean); }; }; export type InstanceGroup = { name: string; summary?: string; emails?: Array<(string)>; instance_role?: 'superadmin' | 'devops' | null; }; export type InstanceGroupWithWorkspaces = { name: string; summary?: string; emails?: Array<(string)>; instance_role?: 'superadmin' | 'devops' | null; workspaces?: Array; }; export type WorkspaceInfo = { workspace_id?: string; workspace_name?: string; role?: string; }; export type Folder = { name: string; owners: Array<(string)>; extra_perms: { [key: string]: (boolean); }; summary?: string; created_by?: string; edited_at?: string; default_permissioned_as?: FolderDefaultPermissionedAs; /** * Labels set on the folder. Items inside the folder inherit them, exposed as `inherited_labels` on scripts and flows and stamped into job labels at run time. * */ labels?: Array<(string)>; }; /** * Ordered list of rules applied at create-time when admins or `wm_deployers` members deploy items in this folder. The first rule whose `path_glob` matches the item path (relative to the folder root) wins, and its `permissioned_as` is used as the default. * */ export type FolderDefaultPermissionedAs = Array<{ /** * Glob pattern evaluated against the item path *relative* to the folder root (e.g. "jobs**" matches every item whose full path is `f//jobs/...`). Supports `*`, `**`, `?`, `[abc]`, `{a,b}`. * */ path_glob: string; /** * Target identity the matched item should be permissioned as. Must be `u/`, `g/`, or an email that exists in this workspace. * */ permissioned_as: string; }>; export type WorkerPing = { worker: string; worker_instance: string; last_ping?: number; started_at: string; ip: string; jobs_executed: number; custom_tags?: Array<(string)>; worker_group: string; wm_version: string; last_job_id?: string; last_job_workspace_id?: string; occupancy_rate?: number; occupancy_rate_15s?: number; occupancy_rate_5m?: number; occupancy_rate_30m?: number; memory?: number; vcpus?: number; memory_usage?: number; wm_memory_usage?: number; job_isolation?: string; native_mode?: boolean; }; export type UserWorkspaceList = { email: string; workspaces: Array<{ id: string; name: string; username: string; color: string; operator_settings?: OperatorSettings; parent_workspace_id?: string | null; is_dev_workspace: boolean; /** * Environment label of the dev workspace, e.g. 'dev' or 'staging'; null defaults to 'dev' */ dev_workspace_label?: string | null; created_by?: string | null; disabled: boolean; /** * Whether this membership is a service account. */ is_service_account?: boolean; }>; }; export type CreateWorkspace = { id: string; name: string; username?: string; color?: string; /** * Report failed jobs to the instance critical alert channels when no workspace error handler is set. Not available on cloud or on fork workspaces. */ error_handler_fallback_to_instance_alerts?: boolean; }; export type CreateWorkspaceFork = { id: string; name: string; color?: string; forked_datatables?: Array<{ /** * Datatable name */ name: string; /** * New database name for the fork */ new_dbname: string; /** * What the fork request copies into `new_dbname`, which it creates — with the owners and grants of a data table under roles. This server refuses an entry without it; servers predating it expect `new_dbname` created and filled beforehand. */ fork_behavior?: 'schema_only' | 'schema_and_data'; }>; /** * Lake names the fork SHARES with the parent (reads and writes the parent's lake directly). Every lake not listed gets the default isolated fork namespace with read-defer to the parent. */ shared_ducklakes?: Array<(string)>; /** * Create the fork as a persistent dev workspace (id not required to carry the wm-fork- prefix; at most one per parent) */ is_dev_workspace?: boolean; /** * When creating a dev workspace, lock the parent (prod) against direct deployment */ lock_prod_deploy?: boolean; /** * When creating a dev workspace, prevent forking the parent (prod) */ lock_prod_forking?: boolean; /** * Copy the parent's members (users + group memberships) into the fork so the team can work in it */ copy_members?: boolean; /** * Environment label for the dev workspace: its badge text and the branch it deploys to. Ignored for non-dev forks. Omitted defaults to 'dev' */ dev_workspace_label?: 'dev' | 'qa' | 'test' | 'uat' | 'staging' | 'demo' | 'sandbox' | 'preprod'; }; export type Workspace = { id: string; name: string; owner: string; domain?: string; color?: string; parent_workspace_id?: string | null; /** * Archived (soft-deleted) workspace */ deleted?: boolean; is_dev_workspace?: boolean; /** * Environment label of the dev workspace, e.g. 'dev' or 'staging'; null defaults to 'dev' */ dev_workspace_label?: string | null; }; export type DependencyMap = { workspace_id?: string | null; importer_path?: string | null; importer_kind?: string | null; imported_path?: string | null; importer_node_id?: string | null; }; export type DependencyDependent = { importer_path: string; importer_kind: 'script' | 'flow' | 'app'; importer_node_ids?: Array<(string)> | null; }; export type DependentsAmount = { imported_path: string; count: number; }; export type WorkspaceInvite = { workspace_id: string; email: string; is_admin: boolean; operator: boolean; parent_workspace_id?: string | null; }; export type GlobalUserInfo = { email: string; login_type: 'password' | 'github' | 'service_account' | 'pending_oauth'; super_admin: boolean; devops?: boolean; verified: boolean; name?: string; company?: string; username?: string; operator_only?: boolean; /** * Populated only for service accounts. True if the service account has workspace admin in its (single) workspace. */ is_workspace_admin?: boolean; first_time_user: boolean; role_source: 'manual' | 'instance_group' | 'service_account'; disabled: boolean; workspace_id?: string; }; export type Flow = OpenFlow & FlowMetadata & { lock_error_logs?: string; version_id?: number; }; export type ExtraPerms = { [key: string]: (boolean); }; export type FlowMetadata = { workspace_id?: string; path: string; edited_by: string; edited_at: string; archived: boolean; extra_perms: ExtraPerms; starred?: boolean; draft_only?: boolean; tag?: string; ws_error_handler_muted?: boolean; priority?: number; dedicated_worker?: boolean; timeout?: number; visible_to_runner_only?: boolean; on_behalf_of_email?: string; /** * Authorization identity the runnable runs as: u/{username}, g/{group}, or a bare email when the username is itself email-shaped. The only stored half of the identity; on_behalf_of_email is derived from it. */ on_behalf_of?: string; labels?: Array<(string)>; /** * Labels inherited from the parent folder, computed at read time. Read-only — edit them on the folder. * */ inherited_labels?: Array<(string)>; }; export type OpenFlowWPath = OpenFlow & { path: string; tag?: string; ws_error_handler_muted?: boolean; priority?: number; dedicated_worker?: boolean; timeout?: number; visible_to_runner_only?: boolean; on_behalf_of_email?: string; /** * Authorization identity to run as: u/{username}, g/{group}, or a bare email when the username is itself email-shaped. Supply this or on_behalf_of_email; when only the address is given it is resolved to the account it names, and an address naming nobody is rejected. A pair that disagrees is rejected. */ on_behalf_of?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original on_behalf_of_email / on_behalf_of pair instead of overwriting it with the caller's own identity. */ preserve_on_behalf_of?: boolean; labels?: Array<(string)>; }; export type EditFlow = OpenFlow & { path?: string; tag?: string; ws_error_handler_muted?: boolean; priority?: number; dedicated_worker?: boolean; timeout?: number; visible_to_runner_only?: boolean; on_behalf_of_email?: string; /** * Authorization identity to run as: u/{username}, g/{group}, or a bare email when the username is itself email-shaped. Supply this or on_behalf_of_email; when only the address is given it is resolved to the account it names, and an address naming nobody is rejected. A pair that disagrees is rejected. */ on_behalf_of?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original on_behalf_of_email / on_behalf_of pair instead of overwriting it with the caller's own identity. */ preserve_on_behalf_of?: boolean; labels?: Array<(string)>; }; export type FlowPreview = { value: FlowValue; path?: string; args: ScriptArgs; tag?: string; restarted_from?: RestartedFrom; /** * Map of relative-import script path -> temp storage hash, propagated to each flow step so inline-script relative imports resolve from not-yet-deployed local content instead of the deployed script */ temp_script_refs?: { [key: string]: (string); } | null; }; export type RestartedFrom = { flow_job_id?: string; step_id?: string; /** * 0-based iteration index for ForLoop / branch index for BranchAll. Iterations 0..n-1 are preserved; iteration n is restarted. */ branch_or_iteration_n?: number; flow_version?: number; /** * For BranchOne nested restart — the branch that was originally chosen, used to lock branch evaluation. */ branch_chosen?: { type?: 'default' | 'branch'; branch?: number; }; /** * When set, the worker spawns the child for `step_id` as a `RestartedFlow` against `nested.flow_job_id` instead of fresh-launching it. */ nested?: RestartedFrom; }; export type Policy = { triggerables?: { [key: string]: { [key: string]: unknown; }; }; triggerables_v2?: { [key: string]: { [key: string]: unknown; }; }; s3_inputs?: Array<{ [key: string]: unknown; }>; allowed_s3_keys?: Array<{ s3_path?: string; resource?: string; }>; /** * Who may open the app, and who its runnables execute as. Optional, and what omitting it means depends on the operation: creating an app defaults it to `publisher` (runs on behalf of the app's publisher and requires an authenticated viewer), while updating one keeps the mode the app is already deployed under. Neither `anonymous`, which makes the app publicly executable, nor `guest`, which opens it to anyone the identity provider authenticates, is ever assumed. A guest is only admitted where the workspace also has `guest_access_enabled`, which is checked when the session is minted and again on every guest request */ execution_mode?: 'viewer' | 'publisher' | 'guest' | 'anonymous'; /** * The user or group the app runs as in anonymous or publisher mode (e.g. 'u/admin' or 'g/mygroup'). The authority for the app's identity. */ on_behalf_of?: string; /** * Address of `on_behalf_of`, written through from it on every save and returned as stored. Optional; when absent it is derived from `on_behalf_of`. Sending it is optional too; it must name the same account as `on_behalf_of`, and a pair that disagrees is rejected. */ on_behalf_of_email?: string; /** * Publisher opt-in to app sandbox isolation (alpha). When true the app is isolated from each viewer's Windmill session. When false/absent the app runs same-origin with the viewer's full session (the default, pre-isolation behavior). * */ sandbox?: boolean; /** * Raw apps: author-declared scopes for the frontend SDK token. Takes effect only when `sandbox` is also true — an unsandboxed bundle runs with the viewer's own session, so no token is advertised or minted for it and this list stays inert. On a sandboxed app a non-empty list lets viewers mint (after consenting) a short-lived token carrying their own identity restricted to these scopes, handed to the app bundle so `windmill-client` calls run as the viewer. Must be a subset of the server's curated allowlist (jobs:run, jobs:read, users:read, resources:read, variables:read, flow_conversations:read, flow_conversations:write). * */ frontend_sdk_scopes?: Array<(string)>; }; export type ListableApp = { id: number; workspace_id: string; path: string; summary: string; version: number; extra_perms: { [key: string]: (boolean); }; starred?: boolean; edited_at: string; execution_mode: 'viewer' | 'publisher' | 'guest' | 'anonymous'; raw_app?: boolean; labels?: Array<(string)>; /** * True when the authed user has a draft for this app — either no * deployed row exists at this path (draft-only) or the user has * saved a per-user draft on top of the deployed row. * */ is_draft?: boolean; /** * User-typed path the editor has staged but not yet deployed. * Sourced from the draft JSON's `draft_path` field (the editor * only writes it when the typed path differs from the deployed * one). Lets the home list render the meaningful name instead of * the autogenerated `u/{user}/draft_{uuid}` URL path. Omitted * when unchanged. * */ draft_path?: string; /** * Workspace users (including the authed user, and the legacy * NULL-email row if any) who have a per-user draft at this * path. Drives the home page's user-avatar circles inside the * Draft badge. Omitted when no drafts exist. * */ draft_users?: Array<{ username?: string | null; }>; /** * Labels inherited from the parent folder, computed at read time. Read-only — edit them on the folder. * */ inherited_labels?: Array<(string)>; }; export type ScopeDefinition = { value: string; label: string; description?: string | null; requires_resource_path: boolean; }; export type ScopeDomain = { name: string; description?: string | null; scopes: Array; }; export type ListableRawApp = { workspace_id: string; path: string; summary: string; extra_perms: { [key: string]: (boolean); }; starred?: boolean; version: number; edited_at: string; labels?: Array<(string)>; /** * Labels inherited from the parent folder, computed at read time. Read-only — edit them on the folder. * */ inherited_labels?: Array<(string)>; }; export type AppWithLastVersion = { id: number; workspace_id: string; path: string; summary: string; versions: Array<(number)>; created_by: string; created_at: string; value: unknown; policy: Policy; execution_mode: 'viewer' | 'publisher' | 'anonymous'; extra_perms: { [key: string]: (boolean); }; custom_path?: string; raw_app: boolean; bundle_secret?: string; labels?: Array<(string)>; }; /** * What a deploy of an existing app answers with. `version` is the one this call wrote, which is what an editor pins as the fork base of the draft it starts next: reading the head back afterwards cannot tell it from a deploy that landed beside it. A metadata-only update writes none and reports the head it kept. */ export type AppDeployed = { /** * Where the app now lives, which differs from the request path on a rename. */ path: string; version: number; }; export type AppHistory = { version: number; deployment_msg?: string; created_at?: string; created_by?: string; }; export type EmbedTokenResponse = { /** * Scoped token for the app. For sandboxed low-code apps this is the embed token handed to the opaque iframe. For a raw app it is the viewer-scoped frontend SDK token, returned only when the app is sandboxed, its policy declares frontend_sdk_scopes, and the request carries sdk_consent=true. Absent for anonymous viewers and whenever no token is needed. * */ token?: string | null; /** * Expiration of the embed token. */ expiration?: string | null; /** * Raw apps render single-iframe and skip the opaque-viewer indirection and the embed token entirely. A sandboxed one may still carry a token here: the viewer-scoped frontend SDK token, which is a different credential from the low-code embed token. * */ raw_app: boolean; /** * Publisher opted this app into sandbox isolation. When false the viewer runs the app same-origin with its full session. */ sandbox: boolean; /** * The resolved app path; the embedder uses it to scope the app's backing localStorage per app. */ app_path?: string | null; /** * The resolved workspace; pairs with app_path so apps at the same path in different workspaces don't share a localStorage store. */ workspace_id?: string | null; /** * Sandboxed raw apps: scopes the app policy declares for the frontend SDK token. Null when the app is unsandboxed, however the policy reads. The viewer renders these in the permission prompt; token stays absent until the endpoint is re-called with sdk_consent=true. * */ sdk_scopes?: Array<(string)> | null; /** * The caller's own email, returned alongside sdk_scopes so the viewer can key its stored "do not ask again" per person. * */ viewer_email?: string | null; }; export type FlowVersion = { id: number; created_at: string; deployment_msg?: string; created_by?: string; }; export type SlackToken = { access_token: string; team?: { id: string; name: string; }; }; export type TokenResponse = { access_token: string; expires_in?: number; refresh_token?: string; scope?: Array<(string)>; grant_type?: string; }; export type HubScriptKind = 'script' | 'failure' | 'trigger' | 'approval'; export type PolarsClientKwargs = { region_name: string; }; /** * Warehouses a dbt project may run against, by name. `main` is the one a project gets when its descriptor names none. Each entry points at a resource; it never holds credentials. */ export type DbtWarehouses = { [key: string]: { resource_path: string; target?: string; }; }; export type DbtWarehouseConnection = { /** * the resolved resource, rendered into profiles.yml */ value: unknown; target?: string; /** * decides whether the value is translated into a profiles.yml target or already is one */ resource_type?: string; }; export type LargeFileStorage = { type?: 'S3Storage' | 'AzureBlobStorage' | 'AzureWorkloadIdentity' | 'S3AwsOidc' | 'GoogleCloudStorage'; s3_resource_path?: string; azure_blob_resource_path?: string; gcs_resource_path?: string; public_resource?: boolean; advanced_permissions?: Array; secondary_storage?: { [key: string]: { type?: 'S3Storage' | 'AzureBlobStorage' | 'AzureWorkloadIdentity' | 'S3AwsOidc' | 'GoogleCloudStorage'; s3_resource_path?: string; azure_blob_resource_path?: string; gcs_resource_path?: string; public_resource?: boolean; }; }; }; export type DucklakeSettings = { ducklakes: { [key: string]: { catalog: { resource_type: 'postgresql' | 'mysql' | 'instance'; resource_path?: string; }; storage: { storage?: string; path: string; }; extra_args?: string; /** * Fork workspaces only - how this lake behaves in the fork, stamped at fork creation. Absent = isolated (fork-scoped namespace + read-defer to parent). */ fork_behavior?: 'isolated' | 'shared'; /** * Scheduled maintenance (enterprise) - snapshot expiry, adjacent-file compaction and orphaned-file cleanup, run as a managed per-lake schedule */ maintenance?: { enabled: boolean; /** * cron cadence (v2, UTC); defaults to daily at 03h with a per-lake minute offset */ schedule?: string; /** * snapshot retention window in days (default 7); time-travel older than this stops working */ retention_days?: number; /** * merge adjacent small parquet files (default true) */ compaction?: boolean; /** * delete orphaned files older than max(retention, 1 day) (default true) */ orphan_cleanup?: boolean; }; }; }; }; export type DataTableSettings = { datatables: { [key: string]: { /** * Set on an entry that owns its database. Absent on a fork's entry, which points at another workspace's data table instead. */ database?: { resource_type: 'postgresql' | 'instance'; resource_path?: string; }; /** * The workspace and data table that govern this one. Server-owned: written by fork creation, and carried across a settings save whatever the request says. */ reference?: { workspace_id: string; datatable: string; }; /** * On a clone, the data table it was copied from, whose roles it takes. Server-owned like `reference`. */ governed_by?: { workspace_id: string; datatable: string; }; /** * Whether the SQL migrations feature is opted in for this data table */ migrations_enabled?: boolean; /** * Fork origin info with schema snapshot */ forked_from?: { /** * Schema snapshot at fork time */ schema?: { [key: string]: unknown; }; }; }; }; }; export type DatatableMigration = { datatable: string; timestamp: number; name: string; code_up: string; code_down?: string; }; export type DatatableMigrationWithStatus = { timestamp: number; name: string; code_up: string; code_down?: string; status: 'ran' | 'not_run' | 'unknown'; }; export type DataTableSchema = { datatable_name: string; /** * Hierarchical schema: schema_name -> table_name -> column_name -> compact_type (e.g. 'int4', 'text?', 'int4?=0') */ schemas: { [key: string]: { [key: string]: { [key: string]: (string); }; }; }; error?: string; }; export type DataTableTables = { datatable_name: string; /** * Hierarchical metadata: schema_name -> table_names */ schemas: { [key: string]: Array<(string)>; }; error?: string; /** * on the instance database, the only kind that can be under roles or have its access edited */ instance: boolean; permissioned: boolean; /** * the roles the caller may connect as, by name; empty when not under roles */ usable_roles: Array<(string)>; default_role: string; /** * whether the role the listing connected as may create schemas */ can_create_schema: boolean; /** * the schemas the role the listing connected as may create in */ creatable_schemas: Array<(string)>; }; export type DataTableTableSchema = { datatable_name: string; schema_name: string; table_name: string; /** * Columns in this table: column_name -> compact_type */ columns: { [key: string]: (string); }; }; export type DynamicInputData = { /** * Name of the function to execute for dynamic select */ entrypoint_function: string; /** * Arguments to pass to the function */ args?: { [key: string]: unknown; }; runnable_ref: { source: 'deployed'; /** * Path to the deployed script or flow */ path: string; runnable_kind: RunnableKind; } | { source: 'inline'; /** * Code content for inline execution */ code: string; language?: ScriptLang; }; }; export type WindmillLargeFile = { s3: string; }; export type StorageFolder = { /** * Full key prefix of the folder, ending with '/' */ prefix: string; /** * Last path segment, without the trailing '/' */ name: string; }; export type StorageFile = { key: string; name: string; size?: number; last_modified?: string; }; export type WindmillFileMetadata = { mime_type?: string; size_in_bytes?: number; last_modified?: string; expires?: string; version_id?: string; }; export type WindmillFilePreview = { msg?: string; content?: string; content_type: 'RawText' | 'Csv' | 'Parquet' | 'Unknown'; }; export type S3Resource = { bucket: string; region: string; endPoint: string; useSSL: boolean; accessKey?: string; secretKey?: string; pathStyle: boolean; }; export type WorkspaceGitSyncSettings = { repositories?: Array; }; export type WorkspaceDeployUISettings = { include_path?: Array<(string)>; include_type?: Array; }; export type RemoteDeployTarget = { /** * root URL of the remote Windmill instance, without /api */ base_url: string; /** * workspace on the remote instance that deploys land in */ workspace_id: string; }; export type RemoteDeployConnection = { /** * identity the stored token has on the remote instance */ remote_email: string; /** * goes in every proxy URL, `/w/{workspace}/remote_deploy/proxy/{proxy_key}/{route}` */ proxy_key: string; connected_at: string; }; export type RemoteDeployStatus = { target?: RemoteDeployTarget; connection?: RemoteDeployConnection; }; export type WorkspaceDefaultScripts = { order?: Array<(string)>; hidden?: Array<(string)>; default_script_content?: unknown; }; export type S3PermissionRule = { pattern: string; allow: string; }; export type GitRepositorySettings = { script_path?: string; git_repo_resource_path: string; use_individual_branch?: boolean; group_by_folder?: boolean; collapsed?: boolean; settings?: { include_path?: Array<(string)>; include_type?: Array; exclude_path?: Array<(string)>; extra_include_path?: Array<(string)>; }; exclude_types_override?: Array; auto_pull?: AutoPullSettings; promotion_open_prs?: boolean; fork_open_prs?: boolean; /** * server-owned, last failure opening a PR for a deploy branch of this repo */ open_pr_error?: string; credential?: GitCredentialStatus; }; /** * server-owned, what the repo's own credential reports about itself */ export type GitCredentialStatus = { provider: 'gitlab'; token_id?: number; /** * absent for a non-expiring token */ expires_at?: string; scopes?: Array<(string)>; /** * whether this workspace renews the credential itself */ rotatable: boolean; checked_at: number; error?: string; }; /** * a GitLab project a token can sync, as the resource form needs it */ export type GitlabProject = { /** * nested group path plus project name, which is also GitLab's project id */ path_with_namespace: string; http_url_to_repo: string; default_branch?: string; }; export type AutoPullMode = 'auto' | 'webhook' | 'polling'; export type AutoPullStatus = { synced_sha?: string; at: number; job_id?: string; success: boolean; error?: string; }; export type AutoPullSettings = { enabled: boolean; mode?: AutoPullMode; poll_interval_s?: number; sync_forks?: boolean; webhook_id?: number; webhook_secret?: string; webhook_url?: string; webhook_error?: string; last_synced_sha?: { [key: string]: (string); }; last_pull_status?: AutoPullStatus; /** * Email of the admin automatic pulls apply changes as. Set by the server when the settings are saved. */ enabled_by?: string; }; export type MetricMetadata = { id: string; name?: string; }; export type ScalarMetric = { metric_id?: string; value: number; }; export type TimeseriesMetric = { metric_id?: string; values: Array; }; export type MetricDataPoint = { timestamp: string; value: number; }; export type RawScriptForDependencies = { raw_code: string; path: string; language: ScriptLang; }; export type ConcurrencyGroup = { concurrency_key: string; total_running: number; }; export type ExtendedJobs = { jobs: Array; obscured_jobs: Array; /** * Obscured jobs omitted for security because of too specific filtering */ omitted_obscured_jobs?: boolean; }; export type ExportedUser = { email: string; password_hash?: string; super_admin: boolean; verified: boolean; name?: string; company?: string; first_time_user: boolean; username?: string; }; export type GlobalSetting = { name: string; value: unknown; }; /** * Unified instance configuration combining global settings and worker group configs */ export type InstanceConfig = { /** * Global settings keyed by setting name. Known fields include base_url, license_key, retention_period_secs, smtp_settings, otel, etc. Unknown fields are preserved as-is. * */ global_settings?: { [key: string]: unknown; }; /** * Worker group configurations keyed by group name (e.g. "default", "gpu"). Each value contains worker_tags, init_bash, autoscaling, etc. * */ worker_configs?: { [key: string]: { [key: string]: unknown; }; }; }; export type Config = { name: string; config?: { [key: string]: unknown; }; }; export type ExportedInstanceGroup = { name: string; summary?: string; emails?: Array<(string)>; id?: string; scim_display_name?: string; external_id?: string; instance_role?: 'superadmin' | 'devops' | null; }; export type JobSearchHit = { dancer?: string; }; export type LogSearchHit = { /** * timestamp of the log line itself, not of the file containing it */ ts: string; host: string; level: 'TRACE' | 'DEBUG' | 'INFO' | 'WARN' | 'ERROR'; /** * the tracing target that emitted the line */ target?: string | null; message: string; /** * the log file the line came from */ file_path: string; /** * offset of the line within its file */ line_no: number; }; export type AutoscalingEvent = { id?: number; worker_group?: string; event_type?: string; desired_workers?: number; reason?: string; applied_at?: string; }; export type CriticalAlert = { /** * Unique identifier for the alert */ id?: number; /** * Type of alert (e.g., critical_error) */ alert_type?: string; /** * The message content of the alert */ message?: string; /** * Time when the alert was created */ created_at?: string; /** * Acknowledgment status of the alert, can be true, false, or null if not set */ acknowledged?: boolean | null; /** * Workspace id if the alert is in the scope of a workspace */ workspace_id?: string | null; }; export type CaptureTriggerKind = 'webhook' | 'http' | 'websocket' | 'kafka' | 'default_email' | 'nats' | 'postgres' | 'sqs' | 'mqtt' | 'amqp' | 'gcp' | 'azure' | 'email'; export type Capture = { trigger_kind: CaptureTriggerKind; main_args: unknown; preprocessor_args: unknown; id: number; created_at: string; }; export type CaptureConfig = { trigger_config?: unknown; trigger_kind: CaptureTriggerKind; error?: string; last_server_ping?: string; }; export type OperatorSettings = { /** * Whether operators can view runs */ runs: boolean; /** * Whether operators can view schedules */ schedules: boolean; /** * Whether operators can view resources */ resources: boolean; /** * Whether operators can view variables */ variables: boolean; /** * Whether operators can view assets */ assets: boolean; /** * Whether operators can view audit logs */ audit_logs: boolean; /** * Whether operators can view triggers */ triggers: boolean; /** * Whether operators can view groups page */ groups: boolean; /** * Whether operators can view folders page */ folders: boolean; /** * Whether operators can view workers page */ workers: boolean; /** * Whether operators can create, edit and delete schedules. Granted unless withdrawn; omitting the field leaves the stored value unchanged. */ manage_schedules?: boolean; /** * Whether operators can create, edit and delete triggers. Granted unless withdrawn; omitting the field leaves the stored value unchanged. */ manage_triggers?: boolean; } | null; export type WorkspaceComparison = { /** * All items with changes ahead are visible by the user of the request. */ all_ahead_items_visible: boolean; /** * All items with changes behind are visible by the user of the request. */ all_behind_items_visible: boolean; /** * Whether the comparison was skipped. This happens with old forks that where not being kept track of */ skipped_comparison: boolean; /** * List of differences found between workspaces */ diffs: Array; /** * Summary statistics of the comparison */ summary: CompareSummary; /** * Ahead items excluded from `diffs` because they are not visible to the caller */ hidden_ahead: HiddenItemsSummary; /** * Behind items excluded from `diffs` because they are not visible to the caller */ hidden_behind: HiddenItemsSummary; /** * For a pair outside the fork lineage, when its candidate set was last seeded by an explicit full scan. Absent when the pair has never been scanned (an empty `diffs` then says nothing about whether the workspaces agree) or when the pair is a lineage pair, which the tally keeps current. */ full_scan_at?: string; }; export type HiddenItemsSummary = { /** * Total number of hidden items on this side */ total: number; /** * Count of hidden items keyed by item kind (always populated) */ by_kind: { [key: string]: (number); }; /** * Kind and path of each hidden item; only populated when the caller is an admin of the relevant side (empty otherwise) */ items: Array; }; export type HiddenItem = { /** * Type of the hidden item */ kind: string; /** * Path of the hidden item */ path: string; }; export type WorkspaceItemDiff = { /** * Type of the item */ kind: 'script' | 'flow' | 'app' | 'raw_app' | 'resource' | 'variable' | 'resource_type' | 'folder' | 'schedule' | 'http_trigger' | 'websocket_trigger' | 'kafka_trigger' | 'nats_trigger' | 'postgres_trigger' | 'mqtt_trigger' | 'amqp_trigger' | 'sqs_trigger' | 'gcp_trigger' | 'azure_trigger' | 'email_trigger'; /** * Path of the item in the workspace */ path: string; /** * Number of versions source is ahead of target */ ahead: number; /** * Number of versions source is behind target */ behind: number; /** * Whether the item has any differences */ has_changes: boolean; /** * If the item exists in the source workspace */ exists_in_source: boolean; /** * If the item exists in the fork workspace */ exists_in_fork: boolean; fork_last_event_kind?: DeployEventKind; fork_last_event_origin?: DeployEventOrigin; source_last_event_kind?: DeployEventKind; source_last_event_origin?: DeployEventOrigin; }; /** * What a deploy event did to the path it is recorded against: `write` (the path holds an item * after the event), `delete` (it does not), or `rename_from` (the path was vacated by a rename * to another path). Create and update are not distinguished. Omitted when no such event has * been recorded for that side, which counts as no evidence. * */ export type DeployEventKind = 'write' | 'delete' | 'rename_from'; /** * Who caused a deploy event: `authored` (written in that workspace by the requester) or `sync` * (applied there by a git-sync pull or a workspace-to-workspace deploy). Only an authored * removal is evidence that the workspace dropped the item on purpose. Omitted when no such * event has been recorded for that side. * */ export type DeployEventOrigin = 'authored' | 'sync'; export type CompareSummary = { /** * Total number of items with differences */ total_diffs: number; /** * Total number of ahead changes */ total_ahead: number; /** * Total number of behind changes */ total_behind: number; /** * Number of scripts with differences */ scripts_changed: number; /** * Number of flows with differences */ flows_changed: number; /** * Number of apps with differences */ apps_changed: number; /** * Number of resources with differences */ resources_changed: number; /** * Number of variables with differences */ variables_changed: number; /** * Number of resource types with differences */ resource_types_changed: number; /** * Number of folders with differences */ folders_changed: number; /** * Number of schedules with differences */ schedules_changed: number; /** * Number of triggers with differences (sum across all trigger kinds) */ triggers_changed: number; /** * Number of data table migrations with differences */ datatable_migrations_changed: number; /** * Number of items that are both ahead and behind (conflicts) */ conflicts: number; }; export type TeamInfo = { /** * The unique identifier of the Microsoft Teams team */ team_id: string; /** * The display name of the Microsoft Teams team */ team_name: string; /** * List of channels within the team */ channels: Array; }; export type ChannelInfo = { /** * The unique identifier of the channel */ channel_id: string; /** * The display name of the channel */ channel_name: string; /** * The Microsoft Teams tenant identifier */ tenant_id: string; /** * The service URL for the channel */ service_url: string; }; export type GithubInstallations = Array<{ workspace_id?: string; installation_id: number; account_id: string; repositories: Array<{ name: string; url: string; }>; /** * Total number of repositories available for this installation */ total_count: number; /** * Number of repositories loaded per page */ per_page: number; /** * Error message if token retrieval failed */ error?: string; /** * Set for self-managed (GHES) installs. Cloud installs omit this field. */ github_base_url?: string | null; /** * True when the installation was assigned by the instance super-admin from instance settings. Workspace admins cannot remove these. */ provisioned_by_admin?: boolean; }>; export type WorkspaceGithubInstallation = { account_id: string; installation_id: number; }; export type S3Object = { s3: string; filename?: string; storage?: string; presigned?: string; }; export type TeamsChannel = { /** * Microsoft Teams team ID */ team_id: string; /** * Microsoft Teams team name */ team_name: string; /** * Microsoft Teams channel ID */ channel_id: string; /** * Microsoft Teams channel name */ channel_name: string; }; export type AssetUsageKind = 'script' | 'flow' | 'job'; export type AssetUsageAccessType = 'r' | 'w' | 'rw'; export type AssetKind = 's3object' | 'resource' | 'ducklake' | 'datatable' | 'volume' | 'dbt'; export type AssetProgress = { asset_kind: AssetKind; asset_path: string; status: 'running' | 'materialized' | 'failed'; row_count?: number | null; error?: string | null; }; export type MaterializedPartition = { asset_kind: AssetKind; asset_path: string; partition: string; status: 'running' | 'materialized' | 'failed'; snapshot_id?: number | null; row_count?: number | null; job_id?: string | null; materialized_at: string; error?: string | null; }; export type PartitionsInRange = { /** * the pipeline script that materializes the asset (managed `// materialize` target, or a partitioned writer using the SDK helpers) — the runnable a backfill launches */ producer_path: string; partition_kind: 'daily' | 'hourly' | 'weekly' | 'monthly' | 'dynamic'; partitions: Array<{ partition: string; status: 'missing' | 'running' | 'materialized' | 'failed'; }>; }; export type AssetSchemaVersion = { version: number; columns: Array<{ name: string; type: string; }>; snapshot_id?: number | null; job_id?: string | null; captured_at: string; }; export type Asset = { path: string; kind: AssetKind; }; /** * One `// measure` or `// dimension` declaration, as catalogued from the * script that materializes the table. `expr` and `filter` are the author's * own SQL: a reader renders a measure as `expr` plus, when `filter` is set, * a trailing `FILTER (WHERE filter)`. * */ export type DataMetric = { /** * The declaring script, and the path reads are authorized against */ script_path: string; /** * Canonical scheme-less DuckLake path, `/.` (schema defaults to `main`) */ table_path: string; kind: 'measure' | 'dimension'; name: string; expr: string; /** * Row predicate from a measure's trailing `where` */ filter?: string; }; /** * One save-time schema-contract warning: a consumer reference that does * not match the referenced asset's latest captured schema. * `schema_version`/`captured_at` identify the capture the check ran * against (as-of the producer's last run, not its latest save). * */ export type ContractWarning = { kind: 'missing_column' | 'missing_lineage_source' | 'missing_relationship_column' | 'relationship_type_mismatch' | 'missing_measure_column' | 'missing_dimension_column' | 'non_aggregate_measure' | 'suppressed'; asset_path: string; column?: string; expected_type?: string; found_type?: string; schema_version?: number; captured_at?: string; message: string; }; export type Volume = { name: string; size_bytes: number; file_count: number; created_at: string; created_by: string; updated_at?: string | null; last_used_at?: string | null; extra_perms?: { [key: string]: unknown; }; }; /** * A workspace protection rule defining restrictions and bypass permissions */ export type ProtectionRuleset = { /** * Unique name for the protection rule */ name: string; workspace_id?: string; rules: ProtectionRules; bypass_groups: RuleBypasserGroups; bypass_users: RuleBypasserUsers; }; /** * Configuration of protection restrictions */ export type ProtectionRules = Array; /** * What a signed-out visitor needs to start a guest sign-in. */ export type GuestEntry = { workspace_id: string; app_path: string; }; export type ProtectionRuleKind = 'DisableDirectDeployment' | 'DisableWorkspaceForking' | 'RestrictDeployToDeployers' | 'RestrictAnonymousAppDeployment' | 'RestrictPublicRunSharing' | 'RestrictGuestAppDeployment'; /** * Groups that can bypass this ruleset */ export type RuleBypasserGroups = Array<(string)>; /** * Users that can bypass this ruleset */ export type RuleBypasserUsers = Array<(string)>; export type DeploymentRequestEligibleDeployer = { username: string; email: string; is_admin: boolean; }; export type DeploymentRequestAssignee = { username: string; email: string; }; export type DeploymentRequestComment = { id: number; parent_id?: number | null; author: string; author_email: string; body: string; anchor_kind?: string | null; anchor_path?: string | null; obsolete: boolean; created_at: string; }; export type DeploymentRequest = { id: number; source_workspace_id: string; fork_workspace_id: string; requested_by: string; requested_by_email: string; requested_at: string; assignees: Array; comments: Array; }; export type QuotaInfo = { used: number; limit: number; prunable: number; }; export type NativeServiceName = 'nextcloud' | 'google' | 'github'; /** * A native trigger stored in Windmill */ export type NativeTrigger = { /** * The unique identifier from the external service */ external_id: string; /** * The workspace this trigger belongs to */ workspace_id: string; service_name: NativeServiceName; /** * The path to the script or flow that will be triggered */ script_path: string; /** * Whether the trigger targets a flow (true) or a script (false) */ is_flow: boolean; /** * Configuration for the trigger including event_type and service_config */ service_config: { [key: string]: unknown; }; /** * Error message if the trigger is in an error state */ error?: string | null; /** * Short summary to be displayed when listed */ summary?: string | null; /** * Whether the trigger starts a job when it fires */ enabled: boolean; }; /** * Full trigger response containing both Windmill data and external service data */ export type NativeTriggerWithExternal = { /** * The unique identifier from the external service */ external_id: string; /** * The workspace this trigger belongs to */ workspace_id: string; service_name: NativeServiceName; /** * The path to the script or flow that will be triggered */ script_path: string; /** * Whether the trigger targets a flow (true) or a script (false) */ is_flow: boolean; /** * Configuration for the trigger including event_type and service_config */ service_config: { [key: string]: unknown; }; /** * Error message if the trigger is in an error state */ error?: string | null; /** * Short summary to be displayed when listed */ summary?: string | null; /** * Whether the trigger starts a job when it fires */ enabled: boolean; /** * Configuration data from the external service. Null when the service has no such API, or when it could not be read — see external_error. */ external_data: { [key: string]: unknown; } | null; /** * Why the external service configuration could not be read. When set, external_data is null and the configuration Windmill stored is returned instead. */ external_error?: string | null; }; export type WorkspaceIntegrations = { service_name: NativeServiceName; oauth_data?: WorkspaceOAuthConfig | null; /** * Path to the resource storing the OAuth token */ resource_path?: string | null; }; export type WorkspaceOAuthConfig = { /** * The OAuth client ID for the workspace */ client_id: string; /** * The OAuth client secret for the workspace */ client_secret: string; /** * The base URL of the workspace */ base_url: string; /** * The OAuth redirect URI */ redirect_uri: string; }; export type WebhookEvent = { type: 'webhook'; request_type: WebhookRequestType; }; /** * The type of webhook request (define possible values here) */ export type WebhookRequestType = 'async' | 'sync'; export type RedirectUri = { redirect_uri: string; }; /** * Data for creating or updating a native trigger */ export type NativeTriggerData = { /** * The path to the script or flow that will be triggered */ script_path: string; /** * Whether the trigger targets a flow (true) or a script (false) */ is_flow: boolean; /** * Service-specific configuration (e.g., event types, filters) */ service_config: { [key: string]: unknown; }; /** * Short summary to be displayed when listed */ summary?: string | null; /** * Whether the trigger starts a job when it fires. Honoured on create only, so a trigger can be registered already paused; an update ignores it and setenabled is the only way to change an existing trigger's state. Defaults to true. */ enabled?: boolean; }; /** * Response returned when a native trigger is created */ export type CreateTriggerResponse = { /** * The external ID of the created trigger from the external service */ external_id: string; }; export type SyncResult = { already_in_sync: boolean; added_count: number; added_triggers: Array<(string)>; total_external: number; total_windmill: number; }; export type NextCloudEventType = { id: string; name: string; description?: string; category?: string; path: string; }; export type GoogleCalendarEntry = { id: string; summary: string; primary?: boolean; }; export type GoogleDriveFile = { id: string; name: string; mime_type: string; is_folder?: boolean; }; export type GoogleDriveFilesResponse = { files: Array; next_page_token?: string; }; export type SharedDriveEntry = { id: string; name: string; }; export type GithubRepoEntry = { full_name: string; name: string; owner: string; private: boolean; }; /** * hub project slug (3-50 chars, lowercase alphanumeric and hyphens, no leading/trailing hyphen) */ export type HubProjectSlug = string; export type PublishDraftBody = { slug: HubProjectSlug; name: string; summary: string; readme?: string; }; export type PublishScriptBody = { summary: string; app: string; description?: string; kind?: string; content: string; language: string; schema?: { [key: string]: unknown; }; lockfile?: string; path?: string; source_path?: string; project_slug: HubProjectSlug; }; export type PublishFlowInner = { summary: string; description?: string; value: { [key: string]: unknown; }; schema?: { [key: string]: unknown; }; }; export type PublishFlowBody = { flow: PublishFlowInner; apps: Array<(string)>; path?: string; source_path?: string; project_slug: HubProjectSlug; }; export type PublishAppBody = { app: { [key: string]: unknown; }; apps: Array<(string)>; description?: string; summary: string; path?: string; source_path?: string; project_slug: HubProjectSlug; }; export type PublishRawAppBody = { raw: string; apps: Array<(string)>; description?: string; summary: string; path?: string; source_path?: string; project_slug: HubProjectSlug; }; export type RecordingBody = { recording?: { [key: string]: unknown; }; project_slug: HubProjectSlug; }; export type PipelineRecordingBody = { recording?: { [key: string]: unknown; }; }; export type ProjectLogoBody = { /** * the logo to set, or null to clear the project's current logo */ logo: { /** * base64-encoded image bytes (decoded size max 512KB) */ b64: string; mime: 'image/png' | 'image/svg+xml'; } | null; }; export type PublishResourceTypeBody = { name: string; schema?: { [key: string]: unknown; }; description?: string; project_slug: HubProjectSlug; }; export type PublishResourceBody = { path: string; resource_type: string; }; export type PublishResourcesBody = { resources: Array; project_slug: HubProjectSlug; }; export type PublishTriggerBody = { path: string; kind: string; summary?: string | null; description?: string | null; config: { [key: string]: unknown; }; script_ask_id?: number | null; flow_id?: number | null; }; export type PublishTriggersBody = { triggers: Array; project_slug: HubProjectSlug; }; /** * one best-effort data table migration attached to a project (per data table) */ export type PublishMigrationBody = { datatable_name: string; sql: string; /** * defaults to an empty string when omitted */ sql_down?: string; enabled: boolean; }; export type PublishMigrationsBody = { migrations: Array; project_slug: HubProjectSlug; }; /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ export type ParameterGetDraft = boolean; /** * When true, append per-user draft rows whose path has no * deployed counterpart. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. Gated to * non-operators + page 0 + no narrowing filters on the backend so * picker callers stay deployed-only and pagination stays clean. * */ export type ParameterIncludeDraftOnly = boolean; export type ParameterId = string; export type ParameterKey = string; export type ParameterWorkspaceId = string; /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ export type ParameterHubPublishFolder = string; /** * The name of the publication */ export type ParameterPublicationName = string; export type ParameterVersionId = number; export type ParameterToken = string; export type ParameterAccountId = number; export type ParameterClientName = string; export type ParameterScriptPath = string; export type ParameterScriptHash = string; export type ParameterJobId = string; export type ParameterPath = string; /** * GCP project to list resources from, when it is not the project of the credentials */ export type ParameterGcpProjectId = string; /** * HMAC signature of a presigned S3 object (bypasses the app provenance gate) */ export type ParameterS3Sig = string; /** * Expiry timestamp of a presigned S3 object signature */ export type ParameterS3Exp = string; export type ParameterCustomPath = string; /** * Raw apps: the viewer confirmed the frontend-SDK permissions consent banner, so the viewer-scoped SDK token may actually be minted. Without it the response only advertises the declared sdk_scopes. * */ export type ParameterSdkConsent = boolean; export type ParameterPathId = number; export type ParameterPathVersion = number; export type ParameterName = string; /** * which page to return (start at 1, default 1) */ export type ParameterPage = number; /** * number of items to return for a given page (default 30, max 100) */ export type ParameterPerPage = number; /** * filter by trigger kind. Supports comma-separated list (e.g. 'schedule,webhook') and negation by prefixing all values with '!' (e.g. '!schedule,!webhook') */ export type ParameterJobTriggerKind = string; /** * order by desc order (default true) */ export type ParameterOrderDesc = boolean; /** * filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') */ export type ParameterCreatedBy = string; /** * filter by exact matching job label. Supports comma-separated list (e.g. 'deploy,release') and negation by prefixing all values with '!' (e.g. '!deploy,!release') */ export type ParameterLabel = string; /** * filter by worker this job ran on. Supports comma-separated list (e.g. 'worker-1,worker-2') and negation by prefixing all values with '!' (e.g. '!worker-1,!worker-2') */ export type ParameterWorker = string; /** * The parent job that is at the origin and responsible for the execution of this script if any */ export type ParameterParentJob = string; /** * Override the tag to use */ export type ParameterWorkerTag = string; /** * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl */ export type ParameterCacheTtl = string; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ export type ParameterNewJobId = string; /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ export type ParameterIncludeHeader = string; /** * The maximum size of the queue for which the request would get rejected if that job would push it above that limit * */ export type ParameterQueueLimit = string; /** * skip the preprocessor */ export type ParameterSkipPreprocessor = boolean; /** * The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` * */ export type ParameterPayload = string; /** * filter by script path prefix. Supports comma-separated list (e.g. 'f/folder1,f/folder2') and negation by prefixing all values with '!' (e.g. '!f/folder1,!f/folder2') */ export type ParameterScriptStartPath = string; /** * mask to filter by schedule path */ export type ParameterSchedulePath = string; /** * filter by trigger path. Supports comma-separated list (e.g. 'f/trigger1,f/trigger2') and negation by prefixing all values with '!' (e.g. '!f/trigger1,!f/trigger2') */ export type ParameterTriggerPath = string; /** * filter by exact matching script path. Supports comma-separated list (e.g. 'f/script1,f/script2') and negation by prefixing all values with '!' (e.g. '!f/script1,!f/script2') */ export type ParameterScriptExactPath = string; /** * mask to filter exact matching path */ export type ParameterScriptExactHash = string; /** * filter on created before (inclusive) timestamp */ export type ParameterCreatedBefore = string; /** * filter on created after (exclusive) timestamp */ export type ParameterCreatedAfter = string; /** * filter on started before (inclusive) timestamp */ export type ParameterStartedBefore = string; /** * filter on started after (exclusive) timestamp */ export type ParameterStartedAfter = string; /** * filter on started before (inclusive) timestamp */ export type ParameterBefore = string; /** * filter on started before (inclusive) timestamp */ export type ParameterCompletedBefore = string; /** * filter on started after (exclusive) timestamp */ export type ParameterCompletedAfter = string; /** * filter on jobs created after X for jobs in the queue only */ export type ParameterCreatedAfterQueue = string; /** * filter on jobs created before X for jobs in the queue only */ export type ParameterCreatedBeforeQueue = string; /** * filter on successful jobs */ export type ParameterSuccess = boolean; /** * filter on jobs scheduled_for before now (hence waitinf for a worker) */ export type ParameterScheduledForBeforeNow = boolean; /** * filter on suspended jobs */ export type ParameterSuspended = boolean; /** * filter on running jobs */ export type ParameterRunning = boolean; /** * allow wildcards (*) in the filter of label, tag, worker */ export type ParameterAllowWildcards = boolean; /** * filter on jobs containing those args as a json subset (@> in postgres) */ export type ParameterArgsFilter = string; /** * filter by tag/worker group. Supports comma-separated list (e.g. 'gpu,highmem') and negation by prefixing all values with '!' (e.g. '!gpu,!highmem') */ export type ParameterTag = string; /** * filter on jobs containing those result as a json subset (@> in postgres) */ export type ParameterResultFilter = string; /** * filter on created after (exclusive) timestamp */ export type ParameterAfter = string; /** * filter on exact username of user */ export type ParameterUsername = string; /** * filter on exact or prefix name of operation */ export type ParameterOperation = string; /** * filter on exact or prefix name of resource */ export type ParameterResourceName = string; /** * filter on type of operation */ export type ParameterActionKind = 'Create' | 'Update' | 'Delete' | 'Execute'; /** * filter by job kind. Supports comma-separated list of values ('preview', 'script', 'dependencies', 'flow') and negation by prefixing all values with '!' (e.g. '!preview,!dependencies') */ export type ParameterJobKinds = string; export type ParameterRunnableId = string; export type ParameterRunnableTypeQuery = RunnableType; export type ParameterInputId = string; export type ParameterGetStarted = boolean; export type ParameterConcurrencyId = string; export type ParameterRunnableKind = 'script' | 'flow'; export type BackendVersionResponse = string; export type BackendUptodateResponse = string; export type GetLicenseIdResponse = string; export type GetOpenApiYamlResponse = string; export type GetHealthStatusData = { /** * Force a fresh check, bypassing the cache */ force?: boolean; }; export type GetHealthStatusResponse = HealthStatusResponse; export type GetHealthDetailedResponse = DetailedHealthResponse; export type SearchDocsData = { /** * Keywords to search for in the documentation body, e.g. "chromium worker tag" or "retry exponential backoff". Fewer, more distinctive words match better. */ query: string; }; export type SearchDocsResponse = { /** * Model-ready rendering of the results */ text: string; results: Array<{ url: string; title: string; score: number; snippets: Array<(string)>; }>; }; export type ReadDocsPageData = { /** * Optional. A heading title from the page outline to read just that section instead of the full page. */ section?: string; /** * The docs page to read, as a Source URL returned by searchDocs (e.g. https://www.windmill.dev/docs/core_concepts/jobs). A bare path (e.g. /docs/core_concepts/jobs) is also accepted. */ url: string; }; export type ReadDocsPageResponse = { text: string; source_url: string; }; export type GetAuditLogData = { id: number; workspace: string; }; export type GetAuditLogResponse = AuditLog; export type ListAuditLogsData = { /** * filter on type of operation */ actionKind?: 'Create' | 'Update' | 'Delete' | 'Execute'; /** * filter on created after (exclusive) timestamp */ after?: string; /** * get audit logs for all workspaces */ allWorkspaces?: boolean; /** * filter on started before (inclusive) timestamp */ before?: string; /** * only return logs with an id strictly lower than this one. Logs are ordered by descending id, so this is a keyset cursor to stream a page in several batches without paying a growing offset. * */ beforeId?: number; /** * comma separated list of operations to exclude */ excludeOperations?: string; /** * filter on exact or prefix name of operation */ operation?: string; /** * comma separated list of exact operations to include */ operations?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * filter on exact or prefix name of resource */ resource?: string; /** * filter on exact username of user */ username?: string; workspace: string; }; export type ListAuditLogsResponse = Array; export type ListTrashData = { /** * only return items of this kind: script, flow, app, schedule, variable, resource, or a trigger kind such as http_trigger * */ itemKind?: string; /** * which page to return (starts at 0, default 0) */ page?: number; /** * number of items to return for a given page (default 100, max 1000) */ perPage?: number; workspace: string; }; export type ListTrashResponse = Array; export type GetTrashItemData = { id: number; workspace: string; }; export type GetTrashItemResponse = TrashItemWithData; export type RestoreTrashItemData = { id: number; workspace: string; }; export type RestoreTrashItemResponse = string; export type PermanentlyDeleteTrashItemData = { id: number; workspace: string; }; export type PermanentlyDeleteTrashItemResponse = string; export type EmptyTrashData = { workspace: string; }; export type EmptyTrashResponse = string; export type LoginData = { /** * credentials */ requestBody: Login; }; export type LoginResponse = string; export type LogoutResponse = string; export type IsSmtpConfiguredResponse = boolean; export type IsPasswordLoginDisabledResponse = boolean; export type RequestPasswordResetData = { /** * email to send password reset link to */ requestBody: { email: string; }; }; export type RequestPasswordResetResponse = PasswordResetResponse; export type ConsumeLoginLinkData = { rd?: string; token: string; }; export type ResetPasswordData = { /** * token and new password */ requestBody: { token: string; new_password: string; }; }; export type ResetPasswordResponse = PasswordResetResponse; export type GetUserData = { username: string; workspace: string; }; export type GetUserResponse = User; export type UpdateUserData = { /** * new user */ requestBody: EditWorkspaceUser; username: string; workspace: string; }; export type UpdateUserResponse = string; export type IsOwnerOfPathData = { path: string; workspace: string; }; export type IsOwnerOfPathResponse = boolean; export type SetPasswordData = { /** * set password */ requestBody: { password: string; }; }; export type SetPasswordResponse = string; export type SetPasswordForUserData = { /** * set password */ requestBody: { password: string; }; user: string; }; export type SetPasswordForUserResponse = string; export type SetLoginTypeForUserData = { /** * set login type */ requestBody: { login_type: string; }; user: string; }; export type SetLoginTypeForUserResponse = string; export type CreateUserGloballyData = { /** * user info */ requestBody: { email: string; password?: string; super_admin: boolean; name?: string; company?: string; /** * Skip sending email notifications to the user */ skip_email?: boolean; /** * password (default, requires `password`), pending_oauth (no credential until the first OAuth login proving the address adopts the account), or a configured OAuth login client key */ login_type?: string; }; }; export type CreateUserGloballyResponse = string; export type GlobalUserUpdateData = { email: string; /** * new user info */ requestBody: { is_super_admin?: boolean; is_devops?: boolean; name?: string; disabled?: boolean; }; }; export type GlobalUserUpdateResponse = string; export type GlobalUsernameInfoData = { email: string; }; export type GlobalUsernameInfoResponse = { username: string; workspace_usernames: Array<{ workspace_id: string; username: string; }>; }; export type GlobalUserRenameData = { email: string; /** * new username */ requestBody: { new_username: string; }; }; export type GlobalUserRenameResponse = string; export type GlobalUserChangeEmailData = { email: string; /** * new email */ requestBody: { new_email: string; }; }; export type GlobalUserChangeEmailResponse = string; export type GlobalUserDeleteData = { email: string; }; export type GlobalUserDeleteResponse = string; export type GlobalUsersOverwriteData = { /** * List of users */ requestBody: Array; }; export type GlobalUsersOverwriteResponse = string; export type GlobalUsersExportResponse = Array; export type ListExtJwtTokensData = { /** * only tokens used in the last 30 days */ activeOnly?: boolean; page?: number; perPage?: number; }; export type ListExtJwtTokensResponse = Array; export type ListGuestsData = { page?: number; perPage?: number; }; export type ListGuestsResponse = GuestList; export type SubmitOnboardingDataData = { requestBody: { touch_point?: string; use_case?: string; }; }; export type SubmitOnboardingDataResponse = string; export type DeleteUserData = { username: string; workspace: string; }; export type DeleteUserResponse = string; export type OffboardPreviewData = { username: string; workspace: string; }; export type OffboardPreviewResponse = OffboardPreview; export type OffboardWorkspaceUserData = { requestBody: OffboardRequest; username: string; workspace: string; }; export type OffboardWorkspaceUserResponse = OffboardResponse; export type GlobalOffboardPreviewData = { email: string; }; export type GlobalOffboardPreviewResponse = GlobalOffboardPreview; export type OffboardGlobalUserData = { email: string; requestBody: GlobalOffboardRequest; }; export type OffboardGlobalUserResponse = OffboardResponse; export type ConvertUserToGroupData = { username: string; workspace: string; }; export type ConvertUserToGroupResponse = string; export type GetCurrentEmailResponse = string; export type RefreshUserTokenData = { ifExpiringInLessThanS?: number; }; export type RefreshUserTokenResponse = string; export type GetTutorialProgressResponse = { progress?: number; skipped_all?: boolean; }; export type UpdateTutorialProgressData = { /** * progress update */ requestBody: { progress?: number; skipped_all?: boolean; }; }; export type UpdateTutorialProgressResponse = string; export type LeaveInstanceResponse = string; export type GetUsageResponse = number; export type GetRunnableResponse = { workspace: string; endpoint_async: string; endpoint_sync: string; summary: string; description?: string; kind: string; }; export type GlobalWhoamiResponse = GlobalUserInfo; export type ListWorkspaceInvitesResponse = Array; export type WhoamiData = { workspace: string; }; export type WhoamiResponse = User; export type AcceptInviteData = { /** * accept invite */ requestBody: { workspace_id: string; username?: string; }; }; export type AcceptInviteResponse = string; export type DeclineInviteData = { /** * decline invite */ requestBody: { workspace_id: string; }; }; export type DeclineInviteResponse = string; export type ImpersonateServiceAccountData = { requestBody: { username: string; }; workspace: string; }; export type ImpersonateServiceAccountResponse = string; export type ExitImpersonationData = { requestBody: { token: string; }; workspace: string; }; export type ExitImpersonationResponse = string; export type WhoisData = { username: string; workspace: string; }; export type WhoisResponse = User; export type ExistsEmailData = { email: string; }; export type ExistsEmailResponse = boolean; export type ListUsersAsSuperAdminData = { /** * filter only active users */ activeOnly?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; }; export type ListUsersAsSuperAdminResponse = Array; export type ListUsersData = { workspace: string; }; export type ListUsersResponse = Array; export type ListAddableInstanceUsersData = { /** * number of users to return (default 10, max 100) */ perPage?: number; /** * filter users whose email or username contains this string */ search?: string; workspace: string; }; export type ListAddableInstanceUsersResponse = Array<{ email: string; username?: string; }>; export type ListUsersUsageData = { workspace: string; }; export type ListUsersUsageResponse = Array; export type ListUsernamesData = { workspace: string; }; export type ListUsernamesResponse = Array<(string)>; export type UsernameToEmailData = { username: string; workspace: string; }; export type UsernameToEmailResponse = string; export type CreateTokenData = { /** * new token */ requestBody: NewToken; }; export type CreateTokenResponse = string; export type CreateTokenImpersonateData = { /** * new token */ requestBody: NewTokenImpersonate; }; export type CreateTokenImpersonateResponse = string; export type CreateLoginLinkData = { /** * target account and link options */ requestBody: { email: string; /** * link lifetime in seconds, at most 900 (default 600) */ expires_in_s?: number; /** * same-origin path the browser lands on after login (default /user/workspaces) */ rd?: string; /** * mint only while the account still has this login type (for example pending_oauth), so a link stops working once the owner has set a password or signed in with a provider */ require_login_type?: string; }; }; export type CreateLoginLinkResponse = { url: string; expires_at: string; }; export type SetCloudTrialOfferData = { requestBody: { email: string; /** * mark the offer used (a trial or subscription now exists) instead of recording it */ consumed?: boolean; }; }; export type SetCloudTrialOfferResponse = string; export type GetCloudTrialOfferResponse = { offered: boolean; }; export type GoCloudTrialOfferResponse = { location: string; /** * present when the portal refused (e.g. the account already has a subscription); the offer is then spent */ reason?: string; }; export type SetOnboardingProfileData = { requestBody: { email: string; /** * free-form context from the invite, every key optional. The frontend reads `touch_point` (answers onboarding's source question), `company` and `workspace_name` (prefill the first workspace's name), `hub_projects` (slugs surfaced first on an empty workspace), `tools` (integrations, used to pick hub projects when none are named) and `starter_prompts` (`[{label, prompt}]`, replacing the home page's example prompts); unknown keys are kept and ignored */ profile: { [key: string]: unknown; }; }; }; export type SetOnboardingProfileResponse = string; export type GetOnboardingProfileResponse = { profile?: { [key: string]: unknown; } | null; }; export type DeleteTokenData = { tokenPrefix: string; }; export type DeleteTokenResponse = string; export type UpdateTokenScopesData = { /** * new scopes (null or omitted = full access) */ requestBody: { scopes?: Array<(string)> | null; }; tokenPrefix: string; }; export type UpdateTokenScopesResponse = string; export type UpdateTokenLabelData = { /** * new label (null or omitted = no label) */ requestBody: { label?: string | null; }; tokenPrefix: string; }; export type UpdateTokenLabelResponse = string; export type ListTokensData = { excludeEphemeral?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; }; export type ListTokensResponse = Array; export type LoginWithOauthData = { clientName: string; /** * Partially filled script */ requestBody: { code?: string; state?: string; }; }; export type LoginWithOauthResponse = string; export type GetGlobalConnectedRepositoriesData = { /** * Page number for pagination (default 1) */ page?: number; }; export type GetGlobalConnectedRepositoriesResponse = GithubInstallations; export type InstallFromWorkspaceData = { requestBody: { /** * The ID of the workspace containing the installation to copy */ source_workspace_id: string; /** * The ID of the GitHub installation to copy */ installation_id: number; }; workspace: string; }; export type InstallFromWorkspaceResponse = unknown; export type DeleteFromWorkspaceData = { /** * The ID of the GitHub installation to delete */ installationId: number; workspace: string; }; export type DeleteFromWorkspaceResponse = unknown; export type ExportInstallationData = { installationId: number; workspace: string; }; export type ExportInstallationResponse = { jwt_token?: string; }; export type ImportInstallationData = { requestBody: { jwt_token: string; }; workspace: string; }; export type ImportInstallationResponse = unknown; export type ListGitlabProjectsData = { requestBody: { /** * The GitLab instance, e.g. https://gitlab.com */ base_url: string; /** * A project access token with the api scope, or a group token that reaches the project */ token: string; /** * Narrow the list to projects matching this text */ search?: string; }; workspace: string; }; export type ListGitlabProjectsResponse = Array; export type GetCredentialOriginData = { /** * Path of the git repository resource, with or without the `$res:` prefix. A path rather than a URL, because a resource URL may carry a token and a URL in a query string lands in logs. */ path: string; workspace: string; }; export type GetCredentialOriginResponse = { origin?: 'held' | 'borrowed'; provider?: 'gitlab'; }; export type SetGitCredentialData = { requestBody: { /** * The repository the credential is for, and the key it is stored under. It is served for this repository and no other, so repointing a resource elsewhere cannot carry the token along. */ repo_url: string; /** * The access token, as pasted */ token: string; }; workspace: string; }; export type SetGitCredentialResponse = string; export type GhesInstallationCallbackData = { requestBody: { /** * The GitHub App installation ID from GHES */ installation_id: number; }; workspace: string; }; export type GhesInstallationCallbackResponse = unknown; export type GetGhesConfigResponse = { base_url: string; app_slug: string; client_id: string; app_owner?: string | null; }; export type DiscoverGhesInstallationsResponse = Array<{ installation_id: number; /** * GitHub login of the installation's account (org or user) */ account_id: string; assigned_workspaces: Array<{ workspace_id: string; provisioned_by_admin: boolean; }>; }>; export type AssignGhesInstallationData = { requestBody: { workspace_id: string; installation_id: number; }; }; export type AssignGhesInstallationResponse = unknown; export type UnassignGhesInstallationData = { installationId: number; workspaceId: string; }; export type UnassignGhesInstallationResponse = unknown; export type ListWorkspacesResponse = Array; export type IsDomainAllowedResponse = boolean; export type ListUserWorkspacesResponse = UserWorkspaceList; export type GetSessionWorkspaceStatusData = { requestBody: { workspace_ids: Array<(string)>; }; }; export type GetSessionWorkspaceStatusResponse = { [key: string]: ('active' | 'archived' | 'deleted'); }; export type GetSessionWorkspaceRetentionData = { requestBody: { workspace_ids: Array<(string)>; }; }; export type GetSessionWorkspaceRetentionResponse = { [key: string]: (number); }; export type GetWorkspaceAsSuperAdminData = { workspace: string; }; export type GetWorkspaceAsSuperAdminResponse = Workspace; export type ListWorkspacesAsSuperAdminData = { /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; }; export type ListWorkspacesAsSuperAdminResponse = Array; export type CreateWorkspaceData = { /** * new token */ requestBody: CreateWorkspace; }; export type CreateWorkspaceResponse = string; export type CreateWorkspaceForkGitBranchData = { /** * new forked workspace */ requestBody: CreateWorkspaceFork; workspace: string; }; export type CreateWorkspaceForkGitBranchResponse = Array<(string)>; export type CreateWorkspaceForkData = { /** * new forked workspace */ requestBody: CreateWorkspaceFork; workspace: string; }; export type CreateWorkspaceForkResponse = string; export type AttachDevWorkspaceData = { requestBody: { dev_workspace_id: string; lock_prod_deploy?: boolean; lock_prod_forking?: boolean; /** * Environment label; also names the branch the dev workspace deploys to. Omitted defaults to 'dev' */ dev_workspace_label?: 'dev' | 'qa' | 'test' | 'uat' | 'staging' | 'demo' | 'sandbox' | 'preprod'; }; workspace: string; }; export type AttachDevWorkspaceResponse = string; export type DetachDevWorkspaceData = { requestBody: { dev_workspace_id: string; }; workspace: string; }; export type DetachDevWorkspaceResponse = string; export type GetDevWorkspaceData = { workspace: string; }; export type GetDevWorkspaceResponse = { id: string; name: string; /** * Environment label, e.g. 'dev' or 'staging'; null defaults to 'dev' */ dev_workspace_label?: string | null; } | null; export type ExistsWorkspaceData = { /** * id of workspace */ requestBody: { id: string; }; }; export type ExistsWorkspaceResponse = boolean; export type ExistsUsernameData = { requestBody: { id: string; username: string; }; }; export type ExistsUsernameResponse = boolean; export type GetGithubAppTokenData = { /** * jwt job token */ requestBody: { job_token: string; }; workspace: string; }; export type GetGithubAppTokenResponse = { token: string; }; export type GetGithubAppRepoArchiveData = { path: string; /** * branch, tag or commit sha; defaults to the resource's branch */ ref?: string; workspace: string; }; export type GetGithubAppRepoArchiveResponse = (Blob | File); export type InviteUserData = { /** * WorkspaceInvite */ requestBody: { email: string; is_admin: boolean; operator: boolean; parent_workspace_id?: string | null; }; workspace: string; }; export type InviteUserResponse = string; export type AddUserData = { /** * WorkspaceInvite */ requestBody: { email: string; is_admin: boolean; username?: string; operator: boolean; }; workspace: string; }; export type AddUserResponse = string; export type CreateServiceAccountData = { requestBody: { username: string; /** * Grant the service account workspace admin. Defaults to false. Cannot be combined with operator=true. */ is_admin?: boolean; /** * Make the service account an operator. Defaults to true for backward compatibility. Set to false to count as a developer (1 seat) instead of 0.5 seat. */ operator?: boolean; /** * Add the service account to the workspace `wm_deployers` group on creation. Recommended when the account will be used as a CLI sync / CI deploy identity so it can deploy on behalf of other users. */ add_to_deployers?: boolean; }; workspace: string; }; export type CreateServiceAccountResponse = string; export type DeleteInviteData = { /** * WorkspaceInvite */ requestBody: { email: string; is_admin: boolean; operator: boolean; }; workspace: string; }; export type DeleteInviteResponse = string; export type ArchiveWorkspaceData = { workspace: string; }; export type ArchiveWorkspaceResponse = string; export type UnarchiveWorkspaceData = { workspace: string; }; export type UnarchiveWorkspaceResponse = string; export type DeleteWorkspaceData = { onlyDeleteForks?: boolean; workspace: string; }; export type DeleteWorkspaceResponse = string; export type LeaveWorkspaceData = { workspace: string; }; export type LeaveWorkspaceResponse = string; export type GetWorkspaceNameData = { workspace: string; }; export type GetWorkspaceNameResponse = string; export type ChangeWorkspaceNameData = { requestBody?: { new_name?: string; }; workspace: string; }; export type ChangeWorkspaceNameResponse = string; export type ChangeWorkspaceIdData = { requestBody?: { new_id?: string; new_name?: string; }; workspace: string; }; export type ChangeWorkspaceIdResponse = string; export type ChangeWorkspaceColorData = { requestBody?: { color?: string; }; workspace: string; }; export type ChangeWorkspaceColorResponse = string; export type UpdateOperatorSettingsData = { requestBody: OperatorSettings; workspace: string; }; export type UpdateOperatorSettingsResponse = string; export type CompareWorkspacesData = { /** * The ID of the workspace to compare with */ targetWorkspaceId: string; workspace: string; }; export type CompareWorkspacesResponse = WorkspaceComparison; export type SeedFullDiffScanData = { /** * The ID of the workspace to compare with */ targetWorkspaceId: string; workspace: string; }; export type SeedFullDiffScanResponse = { /** * Number of candidate items the comparison will evaluate */ candidates: number; scanned_at: string; }; export type ResetDiffTallyData = { /** * The ID of the workspace to compare with */ forkWorkspaceId: string; workspace: string; }; export type ResetDiffTallyResponse = unknown; export type ListPendingInvitesData = { workspace: string; }; export type ListPendingInvitesResponse = Array; export type GetPublicSettingsData = { workspace: string; }; export type GetPublicSettingsResponse = { workspace_id: string; slack_name?: string; slack_team_id?: string; teams_team_id?: string; teams_team_name?: string; teams_team_guid?: string; large_file_storage?: LargeFileStorage; datatable?: DataTableSettings; deploy_ui?: WorkspaceDeployUISettings; mute_critical_alerts?: boolean; /** * Whether this workspace admits guest sessions. An app's own `guest` execution mode is inert while this is false. */ guest_access_enabled: boolean; /** * Whether every new fork of this workspace starts with its admins and developers as members, keeping their role. */ add_admins_and_developers_to_forks: boolean; }; export type GetSettingsData = { workspace: string; }; export type GetSettingsResponse = { workspace_id?: string; slack_name?: string; slack_team_id?: string; slack_command_script?: string; slack_oauth_client_id?: string; slack_oauth_client_secret?: string; teams_team_id?: string; teams_command_script?: string; teams_team_name?: string; teams_team_guid?: string; auto_invite?: AutoInviteConfig; plan?: string; customer_id?: string; webhook?: string; ai_config?: AIConfig; error_handler?: ErrorHandlerConfig; success_handler?: SuccessHandlerConfig; large_file_storage?: LargeFileStorage; ducklake?: DucklakeSettings; dbt_warehouses?: DbtWarehouses; datatable?: DataTableSettings; git_sync?: WorkspaceGitSyncSettings; deploy_ui?: WorkspaceDeployUISettings; default_app?: string; default_scripts?: WorkspaceDefaultScripts; mute_critical_alerts?: boolean; color?: string; operator_settings?: OperatorSettings; /** * Rate limit for public app executions per minute per server. NULL or 0 means disabled. */ public_app_execution_limit_per_minute?: number; /** * Report failed jobs to the instance critical alert channels when no workspace error handler is set. */ error_handler_fallback_to_instance_alerts?: boolean; /** * Whether this workspace admits guest sessions. An app's own `guest` execution mode is inert while this is false. */ guest_access_enabled?: boolean; /** * PEM public key a guest JWT (`jwt_guest_`) is verified against for this workspace. Mutually exclusive with `guest_jwt_jwks_url`. */ guest_jwt_public_key?: string; /** * JWKS URL a guest JWT (`jwt_guest_`) is verified against for this workspace. Mutually exclusive with `guest_jwt_public_key`. */ guest_jwt_jwks_url?: string; /** * Whether every new fork of this workspace starts with its admins and developers as members, keeping their role. */ add_admins_and_developers_to_forks?: boolean; }; export type GetDeployToData = { workspace: string; }; export type GetDeployToResponse = { deploy_to?: string; }; export type GetRemoteDeployTargetData = { workspace: string; }; export type GetRemoteDeployTargetResponse = RemoteDeployStatus; export type SetRemoteDeployTargetData = { requestBody: { target?: RemoteDeployTarget; }; workspace: string; }; export type SetRemoteDeployTargetResponse = string; export type ConnectRemoteDeployData = { requestBody: { token: string; target: RemoteDeployTarget; }; workspace: string; }; export type ConnectRemoteDeployResponse = RemoteDeployConnection; export type DisconnectRemoteDeployData = { workspace: string; }; export type DisconnectRemoteDeployResponse = string; export type GetIsPremiumData = { workspace: string; }; export type GetIsPremiumResponse = boolean; export type GetBillableSeatsData = { workspace: string; }; export type GetBillableSeatsResponse = { /** * Omitted when the seats counted are another workspace's, as they are for a fork resolving to its billing root. */ developers?: number; /** * Omitted when the seats counted are another workspace's, as they are for a fork resolving to its billing root. */ operators?: number; seats: number; }; export type GetPremiumInfoData = { /** * skip fetching subscription status from stripe */ skipSubscriptionFetch?: boolean; workspace: string; }; export type GetPremiumInfoResponse = { premium: boolean; usage?: number; owner: string; status?: string; is_past_due: boolean; max_tolerated_executions?: number; }; export type GetThresholdAlertData = { workspace: string; }; export type GetThresholdAlertResponse = { threshold_alert_amount?: number; last_alert_sent?: string; }; export type SetThresholdAlertData = { /** * threshold alert info */ requestBody: { threshold_alert_amount?: number; }; workspace: string; }; export type SetThresholdAlertResponse = string; export type RebuildDependencyMapData = { workspace: string; }; export type RebuildDependencyMapResponse = string; export type GetDependentsData = { /** * The imported path to get dependents for */ importedPath: string; workspace: string; }; export type GetDependentsResponse = Array; export type GetImportsData = { /** * The script path to get imports for */ importerPath: string; workspace: string; }; export type GetImportsResponse = Array<(string)>; export type GetDependentsAmountsData = { /** * List of imported paths to get dependents counts for */ requestBody: Array<(string)>; workspace: string; }; export type GetDependentsAmountsResponse = Array; export type GetDependencyMapData = { workspace: string; }; export type GetDependencyMapResponse = Array; export type EditSlackCommandData = { /** * WorkspaceInvite */ requestBody: { slack_command_script?: string; }; workspace: string; }; export type EditSlackCommandResponse = string; export type GetWorkspaceSlackOauthConfigData = { workspace: string; }; export type GetWorkspaceSlackOauthConfigResponse = { slack_oauth_client_id?: string | null; /** * Masked with *** if set */ slack_oauth_client_secret?: string | null; }; export type SetWorkspaceSlackOauthConfigData = { /** * Slack OAuth Configuration */ requestBody: { slack_oauth_client_id: string; slack_oauth_client_secret: string; }; workspace: string; }; export type SetWorkspaceSlackOauthConfigResponse = string; export type DeleteWorkspaceSlackOauthConfigData = { workspace: string; }; export type DeleteWorkspaceSlackOauthConfigResponse = string; export type EditTeamsCommandData = { /** * WorkspaceInvite */ requestBody: { slack_command_script?: string; }; workspace: string; }; export type EditTeamsCommandResponse = string; export type ListAvailableTeamsIdsData = { /** * Pagination cursor URL from previous response. Pass this to fetch the next page of results. */ nextLink?: string; /** * Search teams by name. If omitted, returns first page of all teams. */ search?: string; workspace: string; }; export type ListAvailableTeamsIdsResponse = { teams?: Array<{ team_name?: string; team_id?: string; }>; /** * Total number of teams across all pages */ total_count?: number; /** * Number of teams per page (configurable via TEAMS_PER_PAGE env var) */ per_page?: number; /** * URL to fetch next page of results. Null if no more pages. */ next_link?: string | null; }; export type ListAvailableTeamsChannelsData = { /** * Microsoft Teams team ID */ teamId: string; workspace: string; }; export type ListAvailableTeamsChannelsResponse = { channels?: Array<{ channel_name?: string; channel_id?: string; }>; total_count?: number; }; export type ConnectTeamsData = { /** * connect teams */ requestBody: { team_id?: string; team_name?: string; }; workspace: string; }; export type ConnectTeamsResponse = string; export type ConnectSlackData = { /** * connect slack with a pre-minted bot token */ requestBody: { /** * xoxb-... bot token obtained at api.slack.com/apps */ bot_token: string; team_id: string; team_name: string; }; workspace: string; }; export type ConnectSlackResponse = unknown; export type RunSlackMessageTestJobData = { /** * path to hub script to run and its corresponding args */ requestBody: { hub_script_path?: string; channel?: string; test_msg?: string; }; workspace: string; }; export type RunSlackMessageTestJobResponse = { job_uuid?: string; }; export type RunTeamsMessageTestJobData = { /** * path to hub script to run and its corresponding args */ requestBody: { hub_script_path?: string; channel?: string; test_msg?: string; }; workspace: string; }; export type RunTeamsMessageTestJobResponse = { job_uuid?: string; }; export type EditAutoInviteData = { /** * WorkspaceInvite */ requestBody: { operator?: boolean; invite_all?: boolean; auto_add?: boolean; }; workspace: string; }; export type EditAutoInviteResponse = string; export type EditInstanceGroupsData = { /** * Instance Groups Configuration */ requestBody: { groups?: Array<(string)>; roles?: { [key: string]: (string); }; }; workspace: string; }; export type EditInstanceGroupsResponse = string; export type EditWebhookData = { /** * WorkspaceWebhook */ requestBody: { webhook?: string; }; workspace: string; }; export type EditWebhookResponse = string; export type EditCopilotConfigData = { /** * WorkspaceCopilotConfig */ requestBody: AIConfig; workspace: string; }; export type EditCopilotConfigResponse = { effective_ai_config: AIConfig; has_instance_ai_config: boolean; uses_instance_ai_config: boolean; instance_ai_summary?: InstanceAISummary; }; export type GetCopilotSettingsStateData = { workspace: string; }; export type GetCopilotSettingsStateResponse = { has_instance_ai_config: boolean; uses_instance_ai_config: boolean; instance_ai_summary?: InstanceAISummary; }; export type GetCopilotInfoData = { workspace: string; }; export type GetCopilotInfoResponse = AIConfig; export type EditErrorHandlerData = { /** * WorkspaceErrorHandler */ requestBody: EditErrorHandler; workspace: string; }; export type EditErrorHandlerResponse = string; export type EditSuccessHandlerData = { /** * WorkspaceSuccessHandler */ requestBody: EditSuccessHandler; workspace: string; }; export type EditSuccessHandlerResponse = string; export type EditLargeFileStorageConfigData = { /** * LargeFileStorage info */ requestBody: { large_file_storage?: LargeFileStorage; }; workspace: string; }; export type EditLargeFileStorageConfigResponse = unknown; export type EditDbtWarehousesData = { /** * dbt warehouses, by name */ requestBody: { dbt_warehouses?: DbtWarehouses; }; workspace: string; }; export type EditDbtWarehousesResponse = unknown; export type ListDucklakesData = { workspace: string; }; export type ListDucklakesResponse = Array<(string)>; export type ListDataTablesData = { workspace: string; }; export type ListDataTablesResponse = Array<{ name: string; resource_type: 'postgres' | 'instance'; resource_path: string; governing_workspace_id?: string; permissioned: boolean; }>; export type GetDatatablePermissionsData = { datatableName: string; workspace: string; }; export type GetDatatablePermissionsResponse = DatatablePermissions; export type SetDatatablePermissionsData = { datatableName: string; requestBody: { permissioned: boolean; default_role?: string; roles?: Array; }; workspace: string; }; export type SetDatatablePermissionsResponse = string; export type GetDatatableAclData = { datatableName: string; kind: 'database' | 'schema' | 'table'; schema?: string; table?: string; workspace: string; }; export type GetDatatableAclResponse = DatatableAclInfo; export type PlanDatatableAclData = { datatableName: string; requestBody: AclChangeRequest; workspace: string; }; export type PlanDatatableAclResponse = AclPlan; export type ApplyDatatableAclData = { datatableName: string; requestBody: AclChangeRequest; workspace: string; }; export type ApplyDatatableAclResponse = string; export type ListUsableDatatableRolesData = { datatableName: string; workspace: string; }; export type ListUsableDatatableRolesResponse = { permissioned: boolean; roles: Array<(string)>; default_role: string; }; export type ListDataTableSchemasData = { workspace: string; }; export type ListDataTableSchemasResponse = Array; export type TestDataTableConnectionData = { datatableName: string; workspace: string; }; export type TestDataTableConnectionResponse = { user: string; schema: string | null; can_create_table: boolean; can_create_schema: boolean; migrations_table_exists: boolean; suggested_grants: Array<(string)>; suggested_search_path?: string; }; export type ListDataTableTablesData = { /** * list only this data table; each listed data table opens a connection to its database */ datatableName?: string; /** * the role to list `role_for` as; refused, in that entry's `error`, if the caller may not use it */ role?: string; /** * the data table `role` applies to; every other one is listed as its default role */ roleFor?: string; workspace: string; }; export type ListDataTableTablesResponse = Array; export type GetDataTableTableSchemaData = { datatableName: string; /** * the data table role to read the table as; defaults to the data table's default role */ role?: string; schemaName: string; tableName: string; workspace: string; }; export type GetDataTableTableSchemaResponse = DataTableTableSchema; export type EditDucklakeConfigData = { /** * Ducklake settings */ requestBody: { settings: DucklakeSettings; }; workspace: string; }; export type EditDucklakeConfigResponse = unknown; export type EditDataTableConfigData = { /** * DataTable settings */ requestBody: { settings: DataTableSettings; /** * data tables renamed in this save, so their migrations cascade */ renames?: Array<{ from: string; to: string; }>; /** * data tables removed in this save, so their migrations are deleted */ deleted_datatables?: Array<(string)>; }; workspace: string; }; export type EditDataTableConfigResponse = { /** * Data tables in other workspaces that were governed by one this save deleted and no longer resolve. */ stranded_references?: Array<{ workspace_id: string; datatable: string; }>; }; export type RunDatatableMigrationsData = { datatableName: string; /** * apply only this specific migration version, ignoring others */ only?: number; /** * only apply pending migrations up to and including this version */ upTo?: number; workspace: string; }; export type RunDatatableMigrationsResponse = { applied: Array<{ version: number; name: string; }>; }; export type RollbackDatatableMigrationsData = { datatableName: string; /** * roll back this specific applied migration version instead of the latest */ only?: number; workspace: string; }; export type RollbackDatatableMigrationsResponse = { rolled_back: Array<{ version: number; name: string; }>; }; export type ListDatatableMigrationsData = { workspace: string; }; export type ListDatatableMigrationsResponse = Array; export type GetDatatableMigrationsStatusData = { datatableName: string; workspace: string; }; export type GetDatatableMigrationsStatusResponse = { enabled: boolean; migrations: Array; error?: string; }; export type EnableDatatableMigrationsData = { datatableName: string; workspace: string; }; export type EnableDatatableMigrationsResponse = string; export type DisableDatatableMigrationsData = { datatableName: string; workspace: string; }; export type DisableDatatableMigrationsResponse = string; export type CreateDatatableMigrationData = { datatableName: string; requestBody: { name: string; code_up: string; code_down?: string; }; workspace: string; }; export type CreateDatatableMigrationResponse = DatatableMigration; export type DeleteDatatableMigrationData = { datatableName: string; timestamp: number; workspace: string; }; export type DeleteDatatableMigrationResponse = string; export type UpsertDatatableMigrationData = { datatableName: string; requestBody: { timestamp: number; name: string; code_up: string; code_down?: string; }; workspace: string; }; export type UpsertDatatableMigrationResponse = string; export type GenerateInitialDatatableMigrationData = { datatableName: string; workspace: string; }; export type GenerateInitialDatatableMigrationResponse = DatatableMigration; export type CreatePgDatabaseData = { /** * Create pg database request */ requestBody: { /** * Datatable source to determine connection info: 'datatable://name' or '$res:path' */ source: string; /** * Name for the new database */ target_dbname: string; }; workspace: string; }; export type CreatePgDatabaseResponse = string; export type DropForkedDatatableDatabasesData = { requestBody: { datatable_names: Array<(string)>; }; workspace: string; }; export type DropForkedDatatableDatabasesResponse = Array<(string)>; export type DropForkedDucklakeNamespacesData = { workspace: string; }; export type DropForkedDucklakeNamespacesResponse = Array<(string)>; export type ImportPgDatabaseData = { /** * Import pg database request */ requestBody: { /** * Source database: 'datatable://name' or '$res:path' */ source: string; /** * Target database: 'datatable://name' or '$res:path' */ target: string; /** * Override the target database name */ target_dbname_override?: string; fork_behavior: 'schema_only' | 'schema_and_data' | 'keep_original'; }; workspace: string; }; export type ImportPgDatabaseResponse = string; export type ExportPgSchemaData = { /** * Export pg schema request */ requestBody: { /** * Source database: 'datatable://name' or '$res:path' */ source: string; }; workspace: string; }; export type ExportPgSchemaResponse = string; export type GetDatatableFullSchemaData = { requestBody: { /** * Source datatable, e.g. 'datatable://main' */ source: string; }; workspace: string; }; export type GetDatatableFullSchemaResponse = { [key: string]: { [key: string]: { name: string; columns: Array<{ name: string; datatype: string; primary_key?: boolean; default_value?: string; nullable?: boolean; }>; foreign_keys: Array<{ target_table?: string; columns: Array<{ source_column?: string; target_column?: string; }>; on_delete: string; on_update: string; fk_constraint_name?: string; }>; pk_constraint_name?: string; }; }; }; export type GetGitSyncEnabledData = { workspace: string; }; export type GetGitSyncEnabledResponse = { enabled?: boolean; reason?: string | null; max_repos?: number | null; user_count?: number | null; max_users?: number | null; }; export type GetGitSyncDeployModeData = { /** * The branch the caller would push. */ branch?: string; workspace: string; }; export type GetGitSyncDeployModeResponse = { /** * At least one git-sync repository is configured. */ configured: boolean; /** * True means a `git push` is confirmed to deploy via auto-pull: exactly one licensed, deliverable repository tracks the branch. False is *not confirmed* rather than a definite no — it also covers unlicensed, ambiguous (several repos track it), and conservative false-negatives; determine the deploy path another way (CI `git push`, or `wmill sync push`). */ deploy_on_push: boolean; }; export type EditWorkspaceGitSyncConfigData = { /** * Workspace Git sync settings */ requestBody: { git_sync_settings?: WorkspaceGitSyncSettings; }; workspace: string; }; export type EditWorkspaceGitSyncConfigResponse = unknown; export type EditGitSyncRepositoryData = { /** * Git sync repository settings to add or update */ requestBody: { /** * The resource path of the git repository to update */ git_repo_resource_path: string; repository: GitRepositorySettings; }; workspace: string; }; export type EditGitSyncRepositoryResponse = unknown; export type DeleteGitSyncRepositoryData = { /** * Git sync repository to delete */ requestBody: { /** * The resource path of the git repository to delete */ git_repo_resource_path: string; }; workspace: string; }; export type DeleteGitSyncRepositoryResponse = unknown; export type EditWorkspaceDeployUiSettingsData = { /** * Workspace deploy UI settings */ requestBody: { deploy_ui_settings?: WorkspaceDeployUISettings; }; workspace: string; }; export type EditWorkspaceDeployUiSettingsResponse = unknown; export type EditWorkspaceDefaultAppData = { /** * Workspace default app */ requestBody: { default_app_path?: string; }; workspace: string; }; export type EditWorkspaceDefaultAppResponse = string; export type EditGuestAccessData = { /** * Whether guest sessions are admitted */ requestBody: { guest_access_enabled: boolean; }; workspace: string; }; export type EditGuestAccessResponse = string; export type EditAddAdminsAndDevelopersToForksData = { /** * Whether new forks start with this workspace's admins and developers */ requestBody: { add_admins_and_developers_to_forks: boolean; }; workspace: string; }; export type EditAddAdminsAndDevelopersToForksResponse = string; export type EditGuestJwtKeyData = { /** * The guest JWT verification key */ requestBody: { /** * A PEM public key (RS or ES family). */ public_key?: string; /** * A JWKS URL whose keys are fetched and refreshed. */ jwks_url?: string; }; workspace: string; }; export type EditGuestJwtKeyResponse = string; export type GetGuestUsageData = { workspace: string; }; export type GetGuestUsageResponse = GuestUsage; export type EditDefaultScriptsData = { /** * Workspace default app */ requestBody?: WorkspaceDefaultScripts; workspace: string; }; export type EditDefaultScriptsResponse = string; export type GetDefaultScriptsData = { workspace: string; }; export type GetDefaultScriptsResponse = WorkspaceDefaultScripts; export type SetEnvironmentVariableData = { /** * Workspace default app */ requestBody: { /** * Environment variable name. New names must be a plain JS identifier (matching ^[A-Za-z_$][A-Za-z0-9_$]*$) since the name is spliced into the NativeTS/Bun worker prologue; otherwise the request is rejected with 400. Existing names can still be updated regardless of shape. */ name: string; value?: string; }; workspace: string; }; export type SetEnvironmentVariableResponse = string; export type GetWorkspaceEncryptionKeyData = { workspace: string; }; export type GetWorkspaceEncryptionKeyResponse = { key: string; }; export type SetWorkspaceEncryptionKeyData = { /** * New encryption key */ requestBody: { new_key: string; skip_reencrypt?: boolean; }; workspace: string; }; export type SetWorkspaceEncryptionKeyResponse = string; export type GetWorkspaceDefaultAppData = { workspace: string; }; export type GetWorkspaceDefaultAppResponse = { default_app_path?: string; default_app_raw?: boolean; }; export type GetWorkspaceUsageData = { workspace: string; }; export type GetWorkspaceUsageResponse = number; export type GetUsedTriggersData = { workspace: string; }; export type GetUsedTriggersResponse = { http_routes_used: boolean; websocket_used: boolean; kafka_used: boolean; nats_used: boolean; postgres_used: boolean; mqtt_used: boolean; amqp_used: boolean; gcp_used: boolean; azure_used: boolean; sqs_used: boolean; email_used: boolean; nextcloud_used: boolean; google_used: boolean; github_used: boolean; }; export type ListProtectionRulesData = { workspace: string; }; export type ListProtectionRulesResponse = Array; export type CreateProtectionRuleData = { /** * New protection rule configuration */ requestBody: { /** * Unique name for the protection rule */ name: string; rules: ProtectionRules; bypass_groups: RuleBypasserGroups; bypass_users: RuleBypasserUsers; }; workspace: string; }; export type CreateProtectionRuleResponse = string; export type UpdateProtectionRuleData = { /** * Updated protection rule configuration */ requestBody: { /** * New name for the rule. Omit, or pass the current name, to leave it unchanged. The reserved `dev_workspace_lock` rule cannot be renamed, nor can another rule be renamed onto it. */ name?: string; rules: ProtectionRules; bypass_groups: RuleBypasserGroups; bypass_users: RuleBypasserUsers; }; /** * Name of the protection rule to update */ ruleName: string; workspace: string; }; export type UpdateProtectionRuleResponse = string; export type DeleteProtectionRuleData = { /** * Name of the protection rule to delete */ ruleName: string; workspace: string; }; export type DeleteProtectionRuleResponse = string; export type ListDeploymentRequestEligibleDeployersData = { workspace: string; }; export type ListDeploymentRequestEligibleDeployersResponse = Array; export type GetOpenDeploymentRequestData = { workspace: string; }; export type GetOpenDeploymentRequestResponse = (DeploymentRequest) | null; export type CreateDeploymentRequestData = { requestBody: { /** * Usernames in the parent workspace. Must be admin or wm_deployers. */ assignees: Array<(string)>; }; workspace: string; }; export type CreateDeploymentRequestResponse = DeploymentRequest; export type CancelDeploymentRequestData = { id: number; workspace: string; }; export type CancelDeploymentRequestResponse = string; export type CloseDeploymentRequestMergedData = { id: number; workspace: string; }; export type CloseDeploymentRequestMergedResponse = string; export type CreateDeploymentRequestCommentData = { id: number; requestBody: { body: string; parent_id?: number | null; anchor_kind?: string | null; anchor_path?: string | null; }; workspace: string; }; export type CreateDeploymentRequestCommentResponse = DeploymentRequestComment; export type LogFeatureUsageData = { requestBody: { events: Array<{ feature: string; kind: string; key?: string; entity_id?: string; value?: number; }>; }; workspace: string; }; export type LogFeatureUsageResponse = void; export type GetCloudQuotasData = { workspace: string; }; export type GetCloudQuotasResponse = { scripts: QuotaInfo; flows: QuotaInfo; apps: QuotaInfo; variables: QuotaInfo; resources: QuotaInfo; forks: QuotaInfo; }; export type PruneVersionsData = { requestBody: { resource_type: 'scripts' | 'flows' | 'apps' | 'resources'; }; workspace: string; }; export type PruneVersionsResponse = { pruned: number; }; export type ListWsSpecificData = { workspace: string; }; export type ListWsSpecificResponse = Array<{ item_kind: string; path: string; }>; export type ListWsSpecificVersionsData = { kind: 'resource' | 'variable'; path: string; workspace: string; }; export type ListWsSpecificVersionsResponse = Array<(string)>; export type SetWsSpecificData = { requestBody: { item_kind: 'resource' | 'variable'; path: string; value: boolean; }; workspace: string; }; export type SetWsSpecificResponse = string; export type GetSharedUiData = { workspace: string; }; export type GetSharedUiResponse = { files: { [key: string]: (string); }; version: number; edited_at: string; edited_by: string; }; export type ListSharedUiData = { workspace: string; }; export type ListSharedUiResponse = { paths: Array<(string)>; sizes: { [key: string]: (number); }; version: number; edited_at: string; edited_by: string; }; export type GetSharedUiVersionData = { workspace: string; }; export type GetSharedUiVersionResponse = { version: number; }; export type UpdateSharedUiData = { requestBody: { files: { [key: string]: (string); }; }; workspace: string; }; export type UpdateSharedUiResponse = string; export type RefreshCustomInstanceUserPwdResponse = { [key: string]: unknown; }; export type ListCustomInstanceDbsResponse = { [key: string]: CustomInstanceDb; }; export type ListInstanceDatatableRolesResponse = Array; export type CreateInstanceDatatableRoleData = { requestBody: { name: string; }; }; export type CreateInstanceDatatableRoleResponse = InstanceDatatableRole; export type UpdateInstanceDatatableRoleData = { id: string; requestBody: { name?: string; enabled?: boolean; }; }; export type UpdateInstanceDatatableRoleResponse = InstanceDatatableRole; export type DeleteInstanceDatatableRoleData = { id: string; }; export type DeleteInstanceDatatableRoleResponse = unknown; export type SetupCustomInstanceDbData = { /** * The name of the database to create */ name: string; requestBody: { tag?: CustomInstanceDbTag; }; }; export type SetupCustomInstanceDbResponse = CustomInstanceDb; export type DropCustomInstanceDbData = { /** * The name of the database to drop */ name: string; }; export type DropCustomInstanceDbResponse = string; export type GetGlobalData = { key: string; }; export type GetGlobalResponse = unknown; export type SetGlobalData = { key: string; /** * value set */ requestBody: { value?: unknown; }; }; export type SetGlobalResponse = string; export type GetInstanceUiResponse = { instance_banner?: unknown; accent_color?: unknown; }; export type GetRuffConfigResponse = string; export type GetLocalResponse = unknown; export type TestSmtpData = { /** * test smtp payload */ requestBody: { to: string; smtp: { host: string; username: string; password: string; port: number; from: string; tls_implicit: boolean; disable_tls: boolean; }; }; }; export type TestSmtpResponse = string; export type TestCriticalChannelsData = { /** * test critical channel payload */ requestBody: Array<{ email?: string; slack_channel?: string; }>; }; export type TestCriticalChannelsResponse = string; export type GetCriticalAlertsData = { acknowledged?: boolean | null; page?: number; pageSize?: number; }; export type GetCriticalAlertsResponse = { alerts?: Array; /** * Total number of rows matching the query. */ total_rows?: number; /** * Total number of pages based on the page size. */ total_pages?: number; }; export type AcknowledgeCriticalAlertData = { /** * The ID of the critical alert to acknowledge */ id: number; }; export type AcknowledgeCriticalAlertResponse = string; export type AcknowledgeAllCriticalAlertsResponse = string; export type TestLicenseKeyData = { /** * test license key */ requestBody: { license_key: string; }; }; export type TestLicenseKeyResponse = string; export type TestObjectStorageConfigData = { /** * test object storage config */ requestBody: { [key: string]: unknown; }; }; export type TestObjectStorageConfigResponse = string; export type GetObjectStorageUsageResponse = { running: boolean; started_at: string; finished_at?: string | null; current_prefix?: string | null; scanned_objects: number; folders: Array<{ prefix: string; size: number; partial?: boolean; }>; error?: string | null; } | null; export type ComputeObjectStorageUsageResponse = string; export type RunLogCleanupResponse = string; export type GetLogCleanupStatusResponse = { running: boolean; started_at: string; finished_at?: string | null; phase: string; total_service: number; processed_service: number; total_jobs: number; processed_jobs: number; s3_deleted: number; s3_not_found?: number; orphans_scanned: number; orphans_deleted: number; errors: number; last_error?: string | null; } | null; export type GetAuditLogsS3StatusResponse = { last_xmin: number; last_ts?: string | null; bootstrapping: boolean; last_exported_audit_ts?: string | null; last_run_at?: string | null; last_run_exported: number; updated_at: string; owner?: string | null; } | null; export type RunAuditLogsS3BackfillData = { requestBody: { /** * inclusive lower bound of the window to export */ from: string; /** * exclusive upper bound of the window to export */ to: string; }; }; export type RunAuditLogsS3BackfillResponse = unknown; export type GetAuditLogsS3BackfillStatusResponse = { running: boolean; started_at: string; finished_at?: string | null; phase: string; from: string; to: string; rows_written: number; objects_written: number; last_ts?: string | null; errors: number; last_error?: string | null; } | null; export type SendStatsResponse = string; export type RestartWorkerGroupData = { /** * the name of the worker group to restart */ workerGroup: string; }; export type RestartWorkerGroupResponse = string; export type GetStatsResponse = { signature?: string; data?: string; }; export type GetLatestKeyRenewalAttemptResponse = { result: string; attempted_at: string; } | null; export type RenewLicenseKeyData = { licenseKey?: string; }; export type RenewLicenseKeyResponse = string; export type GetOfflineLicenseStatusResponse = { /** * Author-equivalent seats consumed (authors + 0.5 × operators) */ seats_used?: number; seats_cap?: number; author_count?: number; operator_count?: number; /** * Sum of CU rate across workers that pinged in the last 2 minutes. */ current_cu?: number; cu_cap?: number; cu_over_cap?: boolean; } | null; export type GetInstanceHashResponse = { instance_hash?: string | null; }; export type CreateCustomerPortalSessionData = { licenseKey?: string; }; export type CreateCustomerPortalSessionResponse = string; export type TestMetadataData = { /** * test metadata */ requestBody: string; }; export type TestMetadataResponse = string; export type ListGlobalSettingsResponse = Array; export type GithubAppStaleWebhooksResponse = Array<{ workspace_id: string; git_repo_resource_path: string; registered_url?: string | null; }>; export type GetInstanceConfigResponse = InstanceConfig; export type SetInstanceConfigData = { /** * full instance configuration to apply */ requestBody: InstanceConfig; }; export type SetInstanceConfigResponse = string; export type GetMinKeepAliveVersionResponse = { /** * minimum version for normal workers */ worker: string; /** * minimum version for agent workers */ agent: string; }; export type GetJwksResponse = JwksResponse; export type TestSecretBackendData = { /** * Vault settings to test */ requestBody: VaultSettings; }; export type TestSecretBackendResponse = string; export type MigrateSecretsToVaultData = { /** * Vault settings for migration target */ requestBody: VaultSettings; }; export type MigrateSecretsToVaultResponse = SecretMigrationReport; export type MigrateSecretsToDatabaseData = { /** * Vault settings for migration source */ requestBody: VaultSettings; }; export type MigrateSecretsToDatabaseResponse = SecretMigrationReport; export type TestAzureKvBackendData = { /** * Azure Key Vault settings to test */ requestBody: AzureKeyVaultSettings; }; export type TestAzureKvBackendResponse = string; export type MigrateSecretsToAzureKvData = { /** * Azure Key Vault settings for migration target */ requestBody: AzureKeyVaultSettings; }; export type MigrateSecretsToAzureKvResponse = SecretMigrationReport; export type MigrateSecretsFromAzureKvData = { /** * Azure Key Vault settings for migration source */ requestBody: AzureKeyVaultSettings; }; export type MigrateSecretsFromAzureKvResponse = SecretMigrationReport; export type TestAwsSmBackendData = { requestBody: AwsSecretsManagerSettings; }; export type TestAwsSmBackendResponse = string; export type MigrateSecretsToAwsSmData = { requestBody: AwsSecretsManagerSettings; }; export type MigrateSecretsToAwsSmResponse = SecretMigrationReport; export type MigrateSecretsFromAwsSmData = { requestBody: AwsSecretsManagerSettings; }; export type MigrateSecretsFromAwsSmResponse = SecretMigrationReport; export type GetSecondaryStorageNamesData = { /** * If true, include "_default_" in the list if primary workspace storage is set */ includeDefault?: boolean; workspace: string; }; export type GetSecondaryStorageNamesResponse = Array<(string)>; export type WorkspaceGetCriticalAlertsData = { acknowledged?: boolean | null; page?: number; pageSize?: number; workspace: string; }; export type WorkspaceGetCriticalAlertsResponse = { alerts?: Array; /** * Total number of rows matching the query. */ total_rows?: number; /** * Total number of pages based on the page size. */ total_pages?: number; }; export type WorkspaceAcknowledgeCriticalAlertData = { /** * The ID of the critical alert to acknowledge */ id: number; workspace: string; }; export type WorkspaceAcknowledgeCriticalAlertResponse = string; export type WorkspaceAcknowledgeAllCriticalAlertsData = { workspace: string; }; export type WorkspaceAcknowledgeAllCriticalAlertsResponse = string; export type WorkspaceMuteCriticalAlertsUiData = { /** * Boolean flag to mute critical alerts. */ requestBody: { /** * Whether critical alerts should be muted. */ mute_critical_alerts?: boolean; }; workspace: string; }; export type WorkspaceMuteCriticalAlertsUiResponse = string; export type SetPublicAppRateLimitData = { /** * Public app rate limit configuration */ requestBody: { /** * Rate limit for public app executions per minute per server. NULL or 0 to disable. */ public_app_execution_limit_per_minute?: number; }; workspace: string; }; export type SetPublicAppRateLimitResponse = string; export type RecordDbtRunProgressData = { requestBody: Array<{ asset_path: string; status: string; row_count?: number; error?: string; }>; workspace: string; }; export type RecordDbtRunProgressResponse = unknown; export type GetDbtWarehouseData = { name: string; workspace: string; }; export type GetDbtWarehouseResponse = DbtWarehouseConnection; export type DbtWarehouseExistsData = { name: string; workspace: string; }; export type DbtWarehouseExistsResponse = unknown; export type ListDataMetricsData = { cursorKind?: string; cursorName?: string; cursorScript?: string; /** * Keyset cursor. To page, pass the previous response's `next_cursor` fields back as `cursor_*`; all four move together, and are omitted for the first page. Continue whenever `next_cursor` is present. Every returned row is one the caller may read, so the cursor never names a hidden row. * */ cursorTable?: string; /** * Producing script path prefix, e.g. `f/analytics` */ pathPrefix?: string; /** * Results per page, capped at 1000 (default 1000) */ perPage?: number; /** * DuckLake table path, with or without the `ducklake://` scheme */ table?: string; workspace: string; }; export type ListDataMetricsResponse = { metrics: Array; /** * Present when more rows may follow: pass its fields back as the `cursor_*` params. Absent means the catalog is exhausted. * */ next_cursor?: { table_path: string; kind: string; name: string; script_path: string; }; }; export type ListAvailableScopesResponse = Array; export type GetOidcTokenData = { audience: string; expiresIn?: number; workspace: string; }; export type GetOidcTokenResponse = string; export type CreateVariableData = { /** * whether the variable is already encrypted (default false) */ alreadyEncrypted?: boolean; /** * new variable */ requestBody: CreateVariable; workspace: string; }; export type CreateVariableResponse = string; export type EncryptValueData = { /** * new variable */ requestBody: string; workspace: string; }; export type EncryptValueResponse = string; export type DeleteVariableData = { path: string; workspace: string; }; export type DeleteVariableResponse = string; export type DeleteVariablesBulkData = { /** * paths to delete */ requestBody: { paths: Array<(string)>; }; workspace: string; }; export type DeleteVariablesBulkResponse = Array<(string)>; export type UpdateVariableData = { /** * whether the variable is already encrypted (default false) */ alreadyEncrypted?: boolean; path: string; /** * updated variable */ requestBody: EditVariable; workspace: string; }; export type UpdateVariableResponse = string; export type GetVariableData = { /** * ask to decrypt secret if this variable is secret * (if not secret no effect, default: true) * */ decryptSecret?: boolean; /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; /** * ask to include the encrypted value if secret and decrypt secret is not true (default: false) * */ includeEncrypted?: boolean; path: string; workspace: string; }; export type GetVariableResponse = ListableVariable & UserDraftOverlay; export type GetVariableValueData = { /** * allow getting a cached value for improved performance * */ allowCache?: boolean; path: string; workspace: string; }; export type GetVariableValueResponse = string; export type ExistsVariableData = { path: string; workspace: string; }; export type ExistsVariableResponse = boolean; export type ListVariableData = { /** * broad search across multiple fields (case-insensitive substring match) */ broadFilter?: string; /** * pattern match filter for description field (case-insensitive) */ description?: string; /** * When true, append per-user draft variables whose path has no * deployed variable. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. * */ includeDraftOnly?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * exact path match filter */ path?: string; /** * filter variables by path prefix */ pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * pattern match filter for non-secret variable values (case-insensitive) */ value?: string; workspace: string; }; export type ListVariableResponse = Array; export type ListContextualVariablesData = { workspace: string; }; export type ListContextualVariablesResponse = Array; export type ConnectSlackCallbackData = { /** * code endpoint */ requestBody: { code: string; state: string; }; workspace: string; }; export type ConnectSlackCallbackResponse = string; export type ConnectSlackCallbackInstanceData = { /** * code endpoint */ requestBody: { code: string; state: string; }; }; export type ConnectSlackCallbackInstanceResponse = string; export type ConnectSlackInstanceData = { /** * connect slack at the instance level with a pre-minted bot token */ requestBody: { /** * xoxb-... bot token obtained at api.slack.com/apps */ bot_token: string; team_id: string; team_name: string; }; }; export type ConnectSlackInstanceResponse = unknown; export type ConnectCallbackData = { clientName: string; /** * code endpoint */ requestBody: { code: string; state: string; }; }; export type ConnectCallbackResponse = TokenResponse; export type CreateAccountData = { /** * code endpoint */ requestBody: { /** * OAuth refresh token. For authorization_code flow, this contains the actual refresh token. For client_credentials flow, this must be set to an empty string. */ refresh_token: string; expires_in: number; client: string; grant_type?: string; /** * OAuth client ID for resource-level credentials (client_credentials flow only) */ cc_client_id?: string; /** * OAuth client secret for resource-level credentials (client_credentials flow only) */ cc_client_secret?: string; /** * Instance name for built-in providers whose client-credentials token URL is instance-templated; substituted into the fixed-host registry template server-side (client_credentials flow only). The token URL is never caller-supplied. */ cc_instance?: string; /** * Bring-your-own token endpoint override (client_credentials flow only). Only honored together with cc_client_id/cc_client_secret and mutually exclusive with cc_instance; ignored/rejected on the shared-instance path. */ cc_token_url?: string; /** * MCP server URL for MCP OAuth token refresh */ mcp_server_url?: string; /** * OAuth scopes to use for token refresh. Overrides instance-level scopes. */ scopes?: Array<(string)>; }; workspace: string; }; export type CreateAccountResponse = string; export type ConnectClientCredentialsData = { /** * OAuth client name */ client: string; /** * client credentials flow parameters */ requestBody: { scopes?: Array<(string)>; /** * OAuth client ID. Omit to use the credentials configured on the provider's instance OAuth entry. */ cc_client_id?: string; /** * OAuth client secret. Omit to use the credentials configured on the provider's instance OAuth entry. */ cc_client_secret?: string; /** * Instance name for built-in providers whose client-credentials token URL is instance-templated; substituted into the fixed-host registry template server-side. The token URL is never caller-supplied. */ cc_instance?: string; /** * Bring-your-own token endpoint override. Only honored together with cc_client_id/cc_client_secret and mutually exclusive with cc_instance; rejected on the shared-instance path. */ cc_token_url?: string; }; workspace: string; }; export type ConnectClientCredentialsResponse = TokenResponse; export type RefreshTokenData = { id: number; /** * variable path */ requestBody: { path: string; }; workspace: string; }; export type RefreshTokenResponse = string; export type DisconnectAccountData = { id: number; workspace: string; }; export type DisconnectAccountResponse = string; export type DisconnectSlackData = { workspace: string; }; export type DisconnectSlackResponse = string; export type DisconnectTeamsData = { workspace: string; }; export type DisconnectTeamsResponse = string; export type ListOauthLoginsResponse = { oauth: Array<{ type: string; display_name?: string; }>; saml?: string; /** * provider type to auto-redirect to on login (oauth key or "saml") */ auto_login?: string; }; export type ListOauthConnectsResponse = Array<{ name: string; supports_client_credentials: boolean; has_shared_credentials: boolean; }>; export type GetOauthConnectData = { /** * client name */ client: string; }; export type GetOauthConnectResponse = { extra_params?: { [key: string]: unknown; }; scopes?: Array<(string)>; grant_types?: Array<(string)>; /** * The instance OAuth entry carries shared client-credentials, so the connect dialog can skip the bring-your-own form and run the exchange server-side */ client_credentials_configured?: boolean; }; export type SendMessageToConversationData = { requestBody: { /** * The ID of the Teams conversation/activity */ conversation_id: string; /** * Used for styling the card conditionally */ success?: boolean; /** * The message text to be sent in the Teams card */ text: string; /** * The card block to be sent in the Teams card */ card_block?: { [key: string]: unknown; }; }; }; export type SendMessageToConversationResponse = unknown; export type CreateResourceData = { /** * new resource */ requestBody: CreateResource; /** * update the resource if it already exists (default false) */ updateIfExists?: boolean; workspace: string; }; export type CreateResourceResponse = string; export type DeleteResourceData = { path: string; workspace: string; }; export type DeleteResourceResponse = string; export type DeleteResourcesBulkData = { /** * paths to delete */ requestBody: { paths: Array<(string)>; }; workspace: string; }; export type DeleteResourcesBulkResponse = Array<(string)>; export type UpdateResourceData = { path: string; /** * updated resource */ requestBody: EditResource; workspace: string; }; export type UpdateResourceResponse = string; export type UpdateResourceValueData = { path: string; /** * updated resource */ requestBody: { value?: unknown; }; workspace: string; }; export type UpdateResourceValueResponse = string; export type GetResourceHistoryData = { path: string; workspace: string; }; export type GetResourceHistoryResponse = { versions: Array; versioned: boolean; }; export type ClearResourceHistoryData = { path: string; workspace: string; }; export type ClearResourceHistoryResponse = string; export type GetResourceVersionData = { /** * The version's id, not its number. */ id: number; workspace: string; }; export type GetResourceVersionResponse = ResourceVersion & { value?: unknown; missing_references: Array<(string)>; }; export type RestoreResourceVersionData = { /** * The version's id, not its number. */ id: number; workspace: string; }; export type RestoreResourceVersionResponse = string; export type GetResourceData = { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; workspace: string; }; export type GetResourceResponse = ListableResource & UserDraftOverlay; export type GetResourceValueInterpolatedData = { /** * allow getting a cached value for improved performance */ allowCache?: boolean; /** * job id */ jobId?: string; path: string; workspace: string; }; export type GetResourceValueInterpolatedResponse = unknown; export type GetResourceValueData = { path: string; workspace: string; }; export type GetResourceValueResponse = unknown; export type GetGitCommitHashData = { gitSshIdentity?: string; path: string; workspace: string; }; export type GetGitCommitHashResponse = { /** * Latest commit hash from git ls-remote */ commit_hash: string; }; export type ExistsResourceData = { path: string; workspace: string; }; export type ExistsResourceResponse = boolean; export type ListResourceData = { /** * broad search across multiple fields (case-insensitive substring match) */ broadFilter?: string; /** * pattern match filter for description field (case-insensitive) */ description?: string; /** * When true, append per-user draft resources whose path has * no deployed resource. Synthesized rows carry * `draft_only: true`. * */ includeDraftOnly?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * exact path match filter */ path?: string; /** * filter resources by path prefix */ pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * resource_types to list from, separated by ',', */ resourceType?: string; /** * resource_types to not list from, separated by ',', */ resourceTypeExclude?: string; /** * JSONB subset match filter using base64 encoded JSON */ value?: string; workspace: string; }; export type ListResourceResponse = Array; export type ListSearchResourceData = { workspace: string; }; export type ListSearchResourceResponse = Array<{ path: string; /** * pretty-printed JSON rendering of the resource value, capped at 4000 characters — a search preview, not the value itself (use get_value for that) */ value: string; /** * whether value was cut short by that cap */ truncated: boolean; }>; export type GetMcpToolsData = { path: string; workspace: string; }; export type GetMcpToolsResponse = Array<{ name: string; description?: string; inputSchema: { [key: string]: unknown; }; annotations?: { title?: string; readOnlyHint?: boolean; destructiveHint?: boolean; idempotentHint?: boolean; openWorldHint?: boolean; }; }>; export type CallMcpToolData = { path: string; /** * tool name and arguments */ requestBody: { tool: string; arguments?: { [key: string]: unknown; }; /** * set when the caller ran the tool without asking the user to * confirm it; the call is refused unless the server's live * listing marks the tool read-only * */ read_only?: boolean; }; workspace: string; }; export type CallMcpToolResponse = { content?: Array<{ [key: string]: unknown; }>; structuredContent?: { [key: string]: unknown; }; isError?: boolean; }; export type ListResourceNamesData = { name: string; workspace: string; }; export type ListResourceNamesResponse = Array<{ name: string; path: string; }>; export type CreateResourceTypeData = { /** * new resource_type */ requestBody: ResourceType; workspace: string; }; export type CreateResourceTypeResponse = string; export type FileResourceTypeToFileExtMapData = { workspace: string; }; export type FileResourceTypeToFileExtMapResponse = { [key: string]: { format_extension?: string | null; is_fileset?: boolean; }; }; export type DeleteResourceTypeData = { path: string; workspace: string; }; export type DeleteResourceTypeResponse = string; export type UpdateResourceTypeData = { path: string; /** * updated resource_type */ requestBody: EditResourceType; workspace: string; }; export type UpdateResourceTypeResponse = string; export type GetResourceTypeData = { path: string; workspace: string; }; export type GetResourceTypeResponse = ResourceType; export type ExistsResourceTypeData = { path: string; workspace: string; }; export type ExistsResourceTypeResponse = boolean; export type ListResourceTypeData = { workspace: string; }; export type ListResourceTypeResponse = Array; export type ListResourceTypeNamesData = { workspace: string; }; export type ListResourceTypeNamesResponse = Array<(string)>; export type ListResourceCountsByTypeData = { workspace: string; }; export type ListResourceCountsByTypeResponse = Array<{ resource_type: string; count: number; }>; export type ListHubResourceTypeInfoData = { workspace: string; }; export type ListHubResourceTypeInfoResponse = Array<{ name: string; /** * the integration the resource type belongs to, which is not always its own name */ app: string; picks: number; }>; export type PickHubResourceTypeData = { name: string; workspace: string; }; export type PickHubResourceTypeResponse = { success: boolean; }; export type QueryResourceTypesData = { /** * query limit */ limit?: number; /** * query text */ text: string; workspace: string; }; export type QueryResourceTypesResponse = Array<{ name: string; score: number; schema?: unknown; }>; export type GetNpmProxyConfigData = { workspace: string; }; export type GetNpmProxyConfigResponse = { registry_configured: boolean; }; export type GetNpmPackageMetadataData = { /** * npm package name */ _package: string; workspace: string; }; export type GetNpmPackageMetadataResponse = { tags?: { [key: string]: (string); }; versions?: Array<(string)>; }; export type ResolveNpmPackageVersionData = { /** * npm package name */ _package: string; /** * version tag or reference */ tag?: string; workspace: string; }; export type ResolveNpmPackageVersionResponse = { version?: string | null; }; export type GetNpmPackageFiletreeData = { /** * npm package name */ _package: string; /** * package version */ version: string; workspace: string; }; export type GetNpmPackageFiletreeResponse = { default?: string; files?: Array<{ name?: string; }>; }; export type GetNpmPackageFileData = { /** * npm package name */ _package: string; /** * file path within package */ filepath: string; /** * package version */ version: string; workspace: string; }; export type GetNpmPackageFileResponse = string; export type GetNpmPackageTarballData = { /** * npm package name */ _package: string; /** * package version */ version: string; workspace: string; }; export type GetNpmPackageTarballResponse = (Blob | File); export type ListHubIntegrationsData = { /** * query integrations kind */ kind?: string; }; export type ListHubIntegrationsResponse = Array<{ name: string; /** * how often the integration has been picked, absent on a hub that does not count picks */ picks?: number; /** * the label the hub curates for the integration, null or absent where it names none */ display_name?: string | null; }>; export type ListHubFlowsResponse = { flows?: Array<{ id: number; flow_id: number; summary: string; apps: Array<(string)>; approved: boolean; votes: number; }>; }; export type GetHubFlowByIdData = { id: number; }; export type GetHubFlowByIdResponse = { flow?: OpenFlow; }; export type ListFlowPathsData = { workspace: string; }; export type ListFlowPathsResponse = Array<(string)>; export type ListSearchFlowData = { workspace: string; }; export type ListSearchFlowResponse = Array<{ path: string; value: unknown; }>; export type ListFlowsData = { /** * filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') */ createdBy?: string; /** * (default regardless) * If true, show only flows with dedicated_worker enabled. * If false, show only flows with dedicated_worker disabled. * */ dedicatedWorker?: boolean; /** * (default false) * include items that have no deployed version * */ includeDraftOnly?: boolean; /** * Filter by label */ label?: string; /** * order by desc order (default true) */ orderDesc?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * mask to filter exact matching path */ pathExact?: string; /** * mask to filter matching starting path */ pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * (default false) * show only the archived files. * when multiple archived hash share the same path, only the ones with the latest create_at * are displayed. * */ showArchived?: boolean; /** * (default false) * show only the starred items * */ starredOnly?: boolean; /** * (default false) * include deployment message * */ withDeploymentMsg?: boolean; /** * (default false) * If true, the description field will be omitted from the response. * */ withoutDescription?: boolean; workspace: string; }; export type ListFlowsResponse = Array<(Flow & { draft_only?: boolean; /** * `chat_input_enabled` of the flow's value, * projected so the list can mark flows that open * as a chat. Omitted when the value has no such * field. * */ chat_input_enabled?: boolean; /** * True when the authed user has a draft for this * flow — either no deployed row exists at this * path (draft-only) or the user saved a per-user * draft on top of the deployed row. * */ is_draft?: boolean; /** * User-typed path the editor has staged but not * yet deployed. Sourced from the draft JSON's * `draft_path` field (the editor only writes it * when the typed path differs from the deployed * one). Lets the home list render the meaningful * name instead of the autogenerated * `u/{user}/draft_{uuid}` URL path. Omitted when * unchanged. * */ draft_path?: string; /** * Workspace users (including the authed user, and * the legacy NULL-email row if any) who have a * per-user draft at this path. Drives the home * page's user-avatar circles inside the Draft * badge. Omitted when no drafts exist. * */ draft_users?: Array<{ username?: string | null; }>; })>; export type GetFlowHistoryData = { /** * which page to return (start at 1, default 1) */ page?: number; path: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; export type GetFlowHistoryResponse = Array; export type GetFlowLatestVersionData = { path: string; workspace: string; }; export type GetFlowLatestVersionResponse = FlowVersion; export type ListFlowPathsFromWorkspaceRunnableData = { matchPathStart?: boolean; path: string; runnableKind: 'script' | 'flow'; workspace: string; }; export type ListFlowPathsFromWorkspaceRunnableResponse = Array<(string)>; export type ListFlowPathsLinkingAgentData = { path: string; workspace: string; }; export type ListFlowPathsLinkingAgentResponse = Array<(string)>; export type GetFlowVersionData = { version: number; workspace: string; }; export type GetFlowVersionResponse = Flow; export type UpdateFlowHistoryData = { /** * Flow deployment message */ requestBody: { deployment_msg: string; }; version: number; workspace: string; }; export type UpdateFlowHistoryResponse = string; export type GetFlowByPathData = { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; withStarredInfo?: boolean; workspace: string; }; export type GetFlowByPathResponse = Flow & UserDraftOverlay; export type GetFlowDeploymentStatusData = { path: string; workspace: string; }; export type GetFlowDeploymentStatusResponse = { lock_error_logs?: string; job_id?: string; }; export type GetTriggersCountOfFlowData = { path: string; workspace: string; }; export type GetTriggersCountOfFlowResponse = TriggersCount; export type ListTokensOfFlowData = { path: string; workspace: string; }; export type ListTokensOfFlowResponse = Array; export type ToggleWorkspaceErrorHandlerForFlowData = { path: string; /** * Workspace error handler enabled */ requestBody: { muted?: boolean; }; workspace: string; }; export type ToggleWorkspaceErrorHandlerForFlowResponse = string; export type ExistsFlowByPathData = { path: string; workspace: string; }; export type ExistsFlowByPathResponse = boolean; export type CreateFlowData = { /** * Partially filled flow */ requestBody: OpenFlowWPath & { deployment_message?: string; /** * When true (set by the CLI / git sync), deploying this flow does not delete an existing user draft at the same path. */ skip_draft_deletion?: boolean; }; workspace: string; }; export type CreateFlowResponse = string; export type UpdateFlowData = { path: string; /** * Partially filled flow */ requestBody: EditFlow & { deployment_message?: string; /** * When true (set by the CLI / git sync), deploying this flow does not delete an existing user draft at the same path. */ skip_draft_deletion?: boolean; }; workspace: string; }; export type UpdateFlowResponse = string; export type ArchiveFlowByPathData = { path: string; /** * archiveFlow */ requestBody: { archived?: boolean; }; workspace: string; }; export type ArchiveFlowByPathResponse = string; export type DeleteFlowByPathData = { /** * keep captures */ keepCaptures?: boolean; path: string; workspace: string; }; export type DeleteFlowByPathResponse = string; export type ListHubAppsResponse = { apps?: Array<{ id: number; app_id: number; summary: string; apps: Array<(string)>; approved: boolean; votes: number; }>; }; export type GetHubAppByIdData = { id: number; }; export type GetHubAppByIdResponse = { app: { summary: string; value: unknown; }; }; export type GetHubRawAppByIdData = { id: number; }; export type GetHubRawAppByIdResponse = { app: { summary: string; value: unknown; }; }; export type GetGuestEntryByCustomPathData = { customPath: string; }; export type GetGuestEntryByCustomPathResponse = GuestEntry; export type GetPublicAppByCustomPathData = { customPath: string; }; export type GetPublicAppByCustomPathResponse = AppWithLastVersion & { workspace_id?: string; }; export type GetAppEmbedTokenByCustomPathData = { customPath: string; /** * Raw apps: the viewer confirmed the frontend-SDK permissions consent banner, so the viewer-scoped SDK token may actually be minted. Without it the response only advertises the declared sdk_scopes. * */ sdkConsent?: boolean; }; export type GetAppEmbedTokenByCustomPathResponse = EmbedTokenResponse; export type GetRawAppDataData = { /** * App version secret suffixed with the requested file type extension. Supported extensions are `.js` (JavaScript bundle), `.css` (stylesheet), and `.html` (sandboxed wrapper document). */ secretWithExtension: string; workspace: string; }; export type GetRawAppDataResponse = string; export type ListSearchAppData = { workspace: string; }; export type ListSearchAppResponse = Array<{ path: string; value: unknown; }>; export type ListAppsData = { /** * filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') */ createdBy?: string; /** * (default false) * include items that have no deployed version * */ includeDraftOnly?: boolean; /** * Filter by label */ label?: string; /** * order by desc order (default true) */ orderDesc?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * mask to filter exact matching path */ pathExact?: string; /** * mask to filter matching starting path */ pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * (default false) * show only the starred items * */ starredOnly?: boolean; /** * (default false) * include deployment message * */ withDeploymentMsg?: boolean; workspace: string; }; export type ListAppsResponse = Array; export type CreateAppData = { /** * new app */ requestBody: { path: string; value: unknown; summary: string; policy: Policy; deployment_message?: string; custom_path?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original on_behalf_of value in the policy instead of overwriting it. */ preserve_on_behalf_of?: boolean; labels?: Array<(string)>; /** * When true (set by the CLI / git sync), deploying this app does not delete an existing user draft at the same path. */ skip_draft_deletion?: boolean; }; workspace: string; }; export type CreateAppResponse = string; export type CreateAppRawData = { /** * new app */ formData: { app?: { path: string; value: unknown; summary: string; policy: Policy; deployment_message?: string; custom_path?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original on_behalf_of value in the policy instead of overwriting it. */ preserve_on_behalf_of?: boolean; labels?: Array<(string)>; /** * When true (set by the CLI / git sync), deploying this app does not delete an existing user draft at the same path. */ skip_draft_deletion?: boolean; }; js?: string; css?: string; }; workspace: string; }; export type CreateAppRawResponse = string; export type ExistsAppData = { path: string; workspace: string; }; export type ExistsAppResponse = boolean; export type GetAppByPathData = { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; /** * When no deployed app exists at this path and `get_draft` is set, * disambiguates which draft kind (`raw_app` or `app`) to look up. * Ignored when a deployed row exists. * */ rawApp?: boolean; withStarredInfo?: boolean; workspace: string; }; export type GetAppByPathResponse = AppWithLastVersion & UserDraftOverlay; export type MintPreviewSdkTokenData = { requestBody: { /** * App being edited; may not be deployed yet. */ path: string; /** * Scopes from the policy being edited. Capped by the curated allowlist and by the caller's own scopes, and minted as the caller, so it grants nothing they could not mint themselves. * */ scopes: Array<(string)>; }; workspace: string; }; export type MintPreviewSdkTokenResponse = string; export type GetAppEmbedTokenByPathData = { path: string; /** * Raw apps: the viewer confirmed the frontend-SDK permissions consent banner, so the viewer-scoped SDK token may actually be minted. Without it the response only advertises the declared sdk_scopes. * */ sdkConsent?: boolean; workspace: string; }; export type GetAppEmbedTokenByPathResponse = EmbedTokenResponse; export type GetAppLiteByPathData = { path: string; workspace: string; }; export type GetAppLiteByPathResponse = AppWithLastVersion; export type GetAppHistoryByPathData = { /** * which page to return (start at 1, default 1) */ page?: number; path: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; export type GetAppHistoryByPathResponse = Array; export type GetAppLatestVersionData = { path: string; workspace: string; }; export type GetAppLatestVersionResponse = AppHistory; export type ListAppPathsFromWorkspaceRunnableData = { path: string; runnableKind: 'script' | 'flow'; workspace: string; }; export type ListAppPathsFromWorkspaceRunnableResponse = Array<(string)>; export type UpdateAppHistoryData = { id: number; /** * App deployment message */ requestBody: { deployment_msg?: string; }; version: number; workspace: string; }; export type UpdateAppHistoryResponse = string; export type GetGuestEntryData = { path: string; workspace: string; }; export type GetGuestEntryResponse = GuestEntry; export type GetPublicAppBySecretData = { path: string; workspace: string; }; export type GetPublicAppBySecretResponse = AppWithLastVersion; export type GetAppEmbedTokenBySecretData = { /** * Raw apps: the viewer confirmed the frontend-SDK permissions consent banner, so the viewer-scoped SDK token may actually be minted. Without it the response only advertises the declared sdk_scopes. * */ sdkConsent?: boolean; secret: string; workspace: string; }; export type GetAppEmbedTokenBySecretResponse = EmbedTokenResponse; export type GetPublicResourceData = { path: string; workspace: string; }; export type GetPublicResourceResponse = unknown; export type GetPublicSecretOfAppData = { path: string; workspace: string; }; export type GetPublicSecretOfAppResponse = string; export type GetPublicSecretOfLatestVersionOfAppData = { path: string; workspace: string; }; export type GetPublicSecretOfLatestVersionOfAppResponse = string; export type GetAppByVersionData = { id: number; workspace: string; }; export type GetAppByVersionResponse = AppWithLastVersion; export type DeleteAppData = { path: string; workspace: string; }; export type DeleteAppResponse = string; export type UpdateAppData = { path: string; /** * update app */ requestBody: { path?: string; summary?: string; value?: unknown; policy?: Policy; deployment_message?: string; custom_path?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original on_behalf_of value in the policy instead of overwriting it. */ preserve_on_behalf_of?: boolean; labels?: Array<(string)>; /** * When true (set by the CLI / git sync), deploying this app does not delete an existing user draft at the same path. */ skip_draft_deletion?: boolean; /** * When true, this deploy may switch the app between low-code and raw. Without it, deploying a value to an app of the other kind is refused so an app is never converted by accident. */ allow_kind_change?: boolean; }; workspace: string; }; export type UpdateAppResponse = AppDeployed; export type CreateAppRawSourceData = { /** * raw app sources to bundle and deploy */ requestBody: { path: string; summary: string; /** * The raw app's value. `files` maps each source path to its content and must contain an entry point; `runnables` and `data` are carried through unchanged. */ value: { files: { [key: string]: (string); }; runnables?: { [key: string]: unknown; }; data?: { [key: string]: unknown; }; }; policy: Policy; deployment_message?: string; custom_path?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original on_behalf_of value in the policy instead of overwriting it. */ preserve_on_behalf_of?: boolean; labels?: Array<(string)>; /** * When true (set by the CLI / git sync), deploying this app does not delete an existing user draft at the same path. */ skip_draft_deletion?: boolean; }; workspace: string; }; export type CreateAppRawSourceResponse = string; export type UpdateAppRawSourceData = { path: string; /** * raw app sources to bundle and deploy */ requestBody: { path?: string; summary?: string; /** * The raw app's value. `files` maps each source path (e.g. `/index.tsx`, `/App.tsx`, `/package.json`) to its content and must contain an entry point (`/index.tsx`, `/index.ts` or `/index.js`); `runnables` and `data` are carried through unchanged. */ value: { files: { [key: string]: (string); }; runnables?: { [key: string]: unknown; }; data?: { [key: string]: unknown; }; }; policy?: Policy; deployment_message?: string; custom_path?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original on_behalf_of value in the policy instead of overwriting it. */ preserve_on_behalf_of?: boolean; labels?: Array<(string)>; /** * When true (set by the CLI / git sync), deploying this app does not delete an existing user draft at the same path. */ skip_draft_deletion?: boolean; /** * When true, this deploy may switch the app between low-code and raw. Without it, deploying a value to an app of the other kind is refused so an app is never converted by accident. */ allow_kind_change?: boolean; }; workspace: string; }; export type UpdateAppRawSourceResponse = AppDeployed; export type UpdateAppRawData = { /** * update app */ formData: { app?: { path?: string; summary?: string; value?: unknown; policy?: Policy; deployment_message?: string; custom_path?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original on_behalf_of value in the policy instead of overwriting it. */ preserve_on_behalf_of?: boolean; labels?: Array<(string)>; /** * When true (set by the CLI / git sync), deploying this app does not delete an existing user draft at the same path. */ skip_draft_deletion?: boolean; /** * When true, this deploy may switch the app between low-code and raw. Without it, deploying a value to an app of the other kind is refused so an app is never converted by accident. */ allow_kind_change?: boolean; }; js?: string; css?: string; }; path: string; workspace: string; }; export type UpdateAppRawResponse = AppDeployed; export type CustomPathExistsData = { customPath: string; workspace: string; }; export type CustomPathExistsResponse = boolean; export type SignS3ObjectsData = { /** * s3 objects to sign */ requestBody: { s3_objects: Array; /** * how long the signature stays valid, in seconds. Defaults to 43200 (12h) and is clamped server-side to [60, 604800] (1 minute to 7 days). */ expiry_secs?: number; }; workspace: string; }; export type SignS3ObjectsResponse = Array; export type ExecuteComponentData = { path: string; /** * update app */ requestBody: { component: string; path?: string; version?: number; args: unknown; raw_code?: { content: string; language: string; path?: string; lock?: string; cache_ttl?: number; tag?: string; }; id?: number; force_viewer_static_fields?: { [key: string]: unknown; }; force_viewer_one_of_fields?: { [key: string]: unknown; }; force_viewer_allow_user_resources?: Array<(string)>; force_viewer_sensitive_inputs?: Array<(string)>; force_viewer_delete_after_secs?: number; /** * Runnable query parameters */ run_query_params?: { [key: string]: unknown; }; /** * Map of relative-import script path -> temp storage hash. Only honored for inline-script (raw_code) execution so app dev resolves those imports from not-yet-deployed local content. */ temp_script_refs?: { [key: string]: (string); } | null; }; workspace: string; }; export type ExecuteComponentResponse = string; export type UploadS3FileFromAppData = { contentDisposition?: string; contentType?: string; fileExtension?: string; fileKey?: string; path: string; /** * File content */ requestBody: (Blob | File); resourceType?: string; s3ResourcePath?: string; storage?: string; workspace: string; }; export type UploadS3FileFromAppResponse = { file_key: string; delete_token: string; }; export type DeleteS3FileFromAppData = { deleteToken: string; workspace: string; }; export type DeleteS3FileFromAppResponse = string; export type AppLoadFileMetadataData = { /** * Expiry timestamp of a presigned S3 object signature */ exp?: string; fileKey: string; path: string; /** * HMAC signature of a presigned S3 object (bypasses the app provenance gate) */ sig?: string; storage?: string; workspace: string; }; export type AppLoadFileMetadataResponse = WindmillFileMetadata; export type AppLoadFilePreviewData = { csvHasHeader?: boolean; csvSeparator?: string; /** * Expiry timestamp of a presigned S3 object signature */ exp?: string; fileKey: string; fileMimeType?: string; fileSizeInBytes?: number; path: string; readBytesFrom: number; readBytesLength: number; /** * HMAC signature of a presigned S3 object (bypasses the app provenance gate) */ sig?: string; storage?: string; workspace: string; }; export type AppLoadFilePreviewResponse = WindmillFilePreview; export type AppLoadParquetPreviewData = { /** * Expiry timestamp of a presigned S3 object signature */ exp?: string; fileKey: string; limit?: number; offset?: number; path: string; searchCol?: string; searchTerm?: string; /** * HMAC signature of a presigned S3 object (bypasses the app provenance gate) */ sig?: string; sortCol?: string; sortDesc?: boolean; storage?: string; workspace: string; }; export type AppLoadParquetPreviewResponse = unknown; export type AppLoadCsvPreviewData = { csvSeparator?: string; /** * Expiry timestamp of a presigned S3 object signature */ exp?: string; fileKey: string; limit?: number; offset?: number; path: string; searchCol?: string; searchTerm?: string; /** * HMAC signature of a presigned S3 object (bypasses the app provenance gate) */ sig?: string; sortCol?: string; sortDesc?: boolean; storage?: string; workspace: string; }; export type AppLoadCsvPreviewResponse = unknown; export type AppLoadTableCountData = { /** * Expiry timestamp of a presigned S3 object signature */ exp?: string; fileKey: string; path: string; searchCol?: string; searchTerm?: string; /** * HMAC signature of a presigned S3 object (bypasses the app provenance gate) */ sig?: string; storage?: string; workspace: string; }; export type AppLoadTableCountResponse = { count?: number; }; export type AppDownloadS3ParquetFileAsCsvData = { /** * Expiry timestamp of a presigned S3 object signature */ exp?: string; fileKey: string; path: string; /** * HMAC signature of a presigned S3 object (bypasses the app provenance gate) */ sig?: string; storage?: string; workspace: string; }; export type AppDownloadS3ParquetFileAsCsvResponse = string; export type GetHubScriptContentByPathData = { path: string; }; export type GetHubScriptContentByPathResponse = string; export type GetHubScriptByPathData = { path: string; }; export type GetHubScriptByPathResponse = { content: string; lockfile?: string; schema?: unknown; language: string; summary?: string; }; export type PickHubScriptByPathData = { path: string; }; export type PickHubScriptByPathResponse = { success: boolean; }; export type GetTopHubScriptsData = { /** * query scripts app */ app?: string; /** * query scripts kind */ kind?: string; /** * query limit */ limit?: number; }; export type GetTopHubScriptsResponse = { asks?: Array<{ id: number; ask_id: number; summary: string; app: string; version_id: number; kind: HubScriptKind; votes: number; views: number; }>; }; export type QueryHubScriptsData = { /** * query scripts app */ app?: string; /** * query scripts kind */ kind?: string; /** * query limit */ limit?: number; /** * query text */ text: string; }; export type QueryHubScriptsResponse = Array<{ ask_id: number; id: number; version_id: number; summary: string; app: string; kind: HubScriptKind; score: number; }>; export type ListSearchScriptData = { workspace: string; }; export type ListSearchScriptResponse = Array<{ path: string; content: string; }>; export type ListScriptsData = { /** * filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') */ createdBy?: string; /** * (default regardless) * If true, show only scripts with dedicated_worker enabled. * If false, show only scripts with dedicated_worker disabled. * */ dedicatedWorker?: boolean; /** * mask to filter scripts whom first direct parent has exact hash */ firstParentHash?: string; /** * (default false) * include scripts that have no deployed version * */ includeDraftOnly?: boolean; /** * (default false) * include scripts without an exported main function * */ includeWithoutMain?: boolean; /** * (default regardless) * if true show only the templates * if false show only the non templates * if not defined, show all regardless of if the script is a template * */ isTemplate?: boolean; /** * (default regardless) * script kinds to filter, split by comma * */ kinds?: string; /** * Filter by label */ label?: string; /** * Filter to only include scripts written in the given languages. * Accepts multiple values as a comma-separated list. * */ languages?: string; /** * mask to filter scripts whom last parent in the chain has exact hash. * Beware that each script stores only a limited number of parents. Hence * the last parent hash for a script is not necessarily its top-most parent. * To find the top-most parent you will have to jump from last to last hash * until finding the parent * */ lastParentHash?: string; /** * order by desc order (default true) */ orderDesc?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * is the hash present in the array of stored parent hashes for this script. * The same warning applies than for last_parent_hash. A script only store a * limited number of direct parent * */ parentHash?: string; /** * mask to filter exact matching path */ pathExact?: string; /** * mask to filter matching starting path */ pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * (default false) * show only the archived files. * when multiple archived hash share the same path, only the ones with the latest create_at * are * ed. * */ showArchived?: boolean; /** * (default false) * show only the starred items * */ starredOnly?: boolean; /** * (default false) * include deployment message * */ withDeploymentMsg?: boolean; /** * (default false) * If true, the description field will be omitted from the response. * */ withoutDescription?: boolean; workspace: string; }; export type ListScriptsResponse = Array<(Script & { /** * True when the authed user has a draft for this * script — either no deployed row exists at this * path (draft-only) or the user saved a per-user * draft on top of the deployed row. * */ is_draft?: boolean; /** * User-typed path the editor has staged but not * yet deployed. Surfaced for draft-only rows so * the home list can render the meaningful name * instead of the autogenerated * `u/{user}/draft_{uuid}` URL path. Omitted * when unchanged. * */ draft_path?: string; /** * Workspace users (including the authed user, and * the legacy NULL-email row if any) who have a * per-user draft at this path. Drives the home * page's user-avatar circles inside the Draft * badge. Omitted when no drafts exist. * */ draft_users?: Array<{ username?: string | null; }>; })>; export type ListScriptPathsData = { workspace: string; }; export type ListScriptPathsResponse = Array<(string)>; export type CreateScriptData = { /** * Partially filled script */ requestBody: NewScript; workspace: string; }; export type CreateScriptResponse = string; export type UpdateScriptData = { path: string; /** * The new version of the script, whose `path` is where it should end up. */ requestBody: NewScript; workspace: string; }; export type UpdateScriptResponse = string; export type ToggleWorkspaceErrorHandlerForScriptData = { path: string; /** * Workspace error handler enabled */ requestBody: { muted?: boolean; }; workspace: string; }; export type ToggleWorkspaceErrorHandlerForScriptResponse = string; export type ArchiveScriptByPathData = { path: string; workspace: string; }; export type ArchiveScriptByPathResponse = string; export type ArchiveScriptByHashData = { hash: string; workspace: string; }; export type ArchiveScriptByHashResponse = Script; export type DeleteScriptByHashData = { hash: string; workspace: string; }; export type DeleteScriptByHashResponse = Script; export type DeleteScriptByPathData = { /** * keep captures */ keepCaptures?: boolean; path: string; workspace: string; }; export type DeleteScriptByPathResponse = string; export type DeleteScriptsBulkData = { /** * paths to delete */ requestBody: { paths: Array<(string)>; }; workspace: string; }; export type DeleteScriptsBulkResponse = Array<(string)>; export type GetScriptByPathData = { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; withStarredInfo?: boolean; workspace: string; }; export type GetScriptByPathResponse = Script & UserDraftOverlay; export type GetTriggersCountOfScriptData = { path: string; workspace: string; }; export type GetTriggersCountOfScriptResponse = TriggersCount; export type ListTokensOfScriptData = { path: string; workspace: string; }; export type ListTokensOfScriptResponse = Array; export type GetScriptHistoryByPathData = { /** * which page to return (start at 1, default 1) */ page?: number; path: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; export type GetScriptHistoryByPathResponse = Array; export type ListScriptPathsFromWorkspaceRunnableData = { path: string; workspace: string; }; export type ListScriptPathsFromWorkspaceRunnableResponse = Array<(string)>; export type GetScriptLatestVersionData = { path: string; workspace: string; }; export type GetScriptLatestVersionResponse = ScriptHistory; export type UpdateScriptHistoryData = { hash: string; path: string; /** * Script deployment message */ requestBody: { deployment_msg?: string; }; workspace: string; }; export type UpdateScriptHistoryResponse = string; export type ListDedicatedWithDepsData = { workspace: string; }; export type ListDedicatedWithDepsResponse = Array<{ path: string; language: 'python3' | 'deno' | 'go' | 'bash' | 'powershell' | 'postgresql' | 'mysql' | 'bigquery' | 'snowflake' | 'mssql' | 'graphql' | 'nativets' | 'bun' | 'bunnative' | 'php' | 'rust' | 'ansible' | 'csharp' | 'oracledb' | 'duckdb' | 'java' | 'ruby'; workspace_dep_names: Array<(string)>; }>; export type RawScriptByPathData = { path: string; workspace: string; }; export type RawScriptByPathResponse = string; export type RawScriptByPathTokenedData = { path: string; token: string; workspace: string; }; export type RawScriptByPathTokenedResponse = string; export type ExistsScriptByPathData = { path: string; workspace: string; }; export type ExistsScriptByPathResponse = boolean; export type GetScriptByHashData = { authed?: boolean; hash: string; withStarredInfo?: boolean; workspace: string; }; export type GetScriptByHashResponse = Script; export type RawScriptByHashData = { path: string; workspace: string; }; export type RawScriptByHashResponse = string; export type GetScriptDeploymentStatusData = { hash: string; workspace: string; }; export type GetScriptDeploymentStatusResponse = { lock?: string; lock_error_logs?: string; job_id?: string; }; export type GetCiTestResultsData = { kind: 'script' | 'flow' | 'resource'; path: string; workspace: string; }; export type GetCiTestResultsResponse = Array; export type GetCiTestResultsBatchData = { requestBody: { items: Array<{ path: string; kind: 'script' | 'flow' | 'resource'; }>; }; workspace: string; }; export type GetCiTestResultsBatchResponse = { [key: string]: Array; }; export type CheckSchemaContractsData = { requestBody: { language: ScriptLang; content: string; }; workspace: string; }; export type CheckSchemaContractsResponse = { warnings: Array; }; export type StoreRawScriptTempData = { /** * script content to store */ requestBody: string; workspace: string; }; export type StoreRawScriptTempResponse = string; export type DiffRawScriptsWithDeployedData = { /** * scripts and workspace deps to diff against deployed versions */ requestBody: { /** * map of script path to SHA256 content hash */ scripts: { [key: string]: (string); }; /** * workspace dependencies to diff */ workspace_deps?: Array<{ /** * CLI path (e.g. dependencies/package.json) */ path: string; language: ScriptLang; /** * named workspace dependency (null for default) */ name?: string; /** * SHA256 content hash */ hash: string; }>; }; workspace: string; }; export type DiffRawScriptsWithDeployedResponse = Array<(string)>; export type ListRunnablesData = { /** * opaque keyset cursor from a previous page's next_cursor */ cursor?: string; /** * also list the caller's drafts at paths with no deployed row, sorted and paginated with the deployed ones. Ignored for operators, in the archived view, and under a label filter (a draft carries no labels). */ includeDraftOnly?: boolean; /** * include library scripts (no runnable main) */ includeWithoutMain?: boolean; /** * comma-separated subset of script,flow,app (default all) */ kinds?: string; label?: string; /** * sort key: 'updated' (default) or 'name' */ orderBy?: 'updated' | 'name'; /** * order by desc order (default true) */ orderDesc?: boolean; /** * restrict to paths under this prefix */ pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * case-insensitive fuzzy match on "summary (path)": the query is split into terms on runs of anything but ASCII letters, digits and apostrophes, and each of the first 8 must appear whole and in order, with anything in between. Terms past the 8th are ignored, so an over-long query matches more rows rather than fewer. Omitted or empty filters nothing; a query holding no ASCII-alphanumeric character at all (a lone space, "_", or text in a non-Latin script) yields no terms and matches nothing, mirroring the homepage, whose matcher discards those queries too. */ search?: string; showArchived?: boolean; workspace: string; }; export type ListRunnablesResponse = { items: Array; next_cursor?: string; }; export type CountRunnablesByOwnerData = { /** * also count the caller's drafts at paths with no deployed row, matching the same flag on /runnables/list */ includeDraftOnly?: boolean; /** * include library scripts (no runnable main) */ includeWithoutMain?: boolean; /** * comma-separated subset of script,flow,app (default all) */ kinds?: string; workspace: string; }; export type CountRunnablesByOwnerResponse = { /** * owner prefix (f/ or u/) to count */ counts: { [key: string]: (number); }; }; export type ListDraftsData = { /** * List every draft in the workspace (all users), not just the current user's own + legacy rows. Other users' rows come back with `mine=false` (view-only). */ allUsers?: boolean; /** * A fork passes its parent workspace id here to have each row flagged with `unchanged_from_parent`. Ignored unless it is exactly this workspace's parent. */ compareToWorkspace?: string; workspace: string; }; export type ListDraftsResponse = Array<{ kind: UserDraftItemKind; path: string; /** * Best-effort, read from the draft JSON's `summary` field when the editor shape carries one. */ summary?: string; /** * User-typed friendly path from the draft JSON's `draft_path`, when set and different from the storage path (e.g. a never-deployed item parked at `u/{user}/draft_{uuid}`). */ draft_path?: string; /** * No deployed counterpart exists at this path — the draft is the whole item. */ draft_only: boolean; /** * The listed draft is a legacy workspace-level row (email NULL) predating the per-user drafts migration. Only true when no per-user draft exists at this path. */ legacy_draft: boolean; created_at: string; /** * Whether the current user may deploy/discard this draft (same check the deploy/discard endpoints enforce). */ can_write: boolean; /** * The row belongs to the current user (own draft or the legacy no-owner row) and is therefore actionable. Always true in the default listing; with `all_users=true`, other users' rows are false (view-only). */ mine: boolean; /** * Only present when `compare_to_workspace` was passed. True when this draft is identical to the parent's draft at the same path/kind/owner (cloned in on fork and never edited here). */ unchanged_from_parent?: boolean; /** * Draft authors at this (path, kind) — the legacy NULL-email row surfaced as a null username. * Populated only for the shared full-page-editor kinds (script/flow/app/raw_app); omitted for * drawer kinds, which keep their drafts private. Feeds the Draft badge's owner-avatar circles. * */ draft_users?: Array<{ username?: string | null; }>; }>; export type GetDraftForUserData = { kind: UserDraftItemKind; path: string; /** * Workspace username of the draft owner. Omit to fetch the legacy workspace-level (NULL email) row. */ username?: string; workspace: string; }; export type GetDraftForUserResponse = { value: unknown; created_at: string; }; export type GetOwnDraftData = { kind: UserDraftItemKind; path: string; workspace: string; }; export type GetOwnDraftResponse = { value: unknown; created_at: string; } | null; export type UpdateDraftData = { kind: UserDraftItemKind; path: string; requestBody: { /** * Draft content to save. `null` (or omitted) signals a delete — the row is removed under the same conflict rules. */ value?: unknown; /** * Server timestamp of the client's last known sync for this draft. Omit on first save. */ last_sync?: string; /** * Skip the conflict check and overwrite the server copy. */ force?: boolean; /** * Delete-only. Target the legacy workspace-level row (email NULL) instead of the current user's row. Used to discard a legacy draft from the review page. */ legacy?: boolean; /** * Upsert-only override for the stored creation timestamp. Normal saves omit it (stamped server-side); the localStorage→DB migration passes the draft's original write time so migrated drafts keep their age. */ created_at?: string; }; workspace: string; }; export type UpdateDraftResponse = { status: 'saved' | 'conflict'; current_timestamp: string; /** * `saved` only, upsert or delete: where the write landed. Differs from the URL path when the item had moved away from it; the editor follows it there. Absent when a delete found nothing to remove and the caller cannot read the path it moved to. */ path?: string; }; export type MoveDraftData = { /** * script, flow, app or raw_app only. */ kind: 'script' | 'flow' | 'app' | 'raw_app'; path: string; requestBody: { new_path: string; /** * Also restate the draft's summary. */ summary?: string; }; workspace: string; }; export type MoveDraftResponse = string; export type MigrateLegacyDraftData = { kind: UserDraftItemKind; path: string; requestBody: { /** * delete the legacy draft, or take ownership of it. */ action: 'delete' | 'assign_to_self'; }; workspace: string; }; export type MigrateLegacyDraftResponse = string; export type GetCustomTagsData = { showWorkspaceRestriction?: boolean; }; export type GetCustomTagsResponse = Array<(string)>; export type GetCustomTagsForWorkspaceData = { workspace: string; }; export type GetCustomTagsForWorkspaceResponse = Array<(string)>; export type GeDefaultTagsResponse = Array<(string)>; export type IsDefaultTagsPerWorkspaceResponse = boolean; export type ListWorkersData = { /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * number of seconds the worker must have had a last ping more recent of (default to 300) */ pingSince?: number; }; export type ListWorkersResponse = Array; export type ExistsWorkersWithTagsData = { /** * comma separated list of tags */ tags: string; /** * workspace to filter tags visibility (required when TAGS_ARE_SENSITIVE is enabled for non-superadmins) */ workspace?: string; }; export type ExistsWorkersWithTagsResponse = { [key: string]: (boolean); }; export type GetQueueMetricsResponse = Array<{ id: string; values: Array<{ created_at: string; value: number; }>; }>; export type GetQueueMetricsSeriesData = { /** * how far back to read, in seconds (defaults to one day, capped at the 14-day retention) */ windowSecs?: number; }; export type GetQueueMetricsSeriesResponse = { /** * start of the window, in epoch milliseconds */ from: number; /** * end of the window, in epoch milliseconds */ to: number; tags: Array<{ tag: string; /** * [epoch ms, jobs waiting more than 3 seconds] vertices */ count: Array>; /** * [epoch ms, seconds the next job has waited] vertices */ delay: Array>; }>; }; export type GetQueueStatusResponse = Array<{ tag: string; /** * jobs due for more than 3 seconds that no worker has picked up */ waiting: number; /** * seconds the job the next pull would take has been waiting, absent when none is */ delay?: number; running: number; /** * workers that pinged in the last minute and pull this tag */ workers: number; }>; export type GetCountsOfJobsWaitingPerTagResponse = { [key: string]: (number); }; export type GetCountsOfRunningJobsPerTagResponse = { [key: string]: (number); }; export type GetWorkspaceFairnessEventsResponse = Array<{ timestamp: string; operation: string; workspace_id?: string | null; parameters?: { [key: string]: unknown; } | null; }>; export type CreateWorkspaceDependenciesData = { /** * New workspace dependencies */ requestBody: NewWorkspaceDependencies; workspace: string; }; export type CreateWorkspaceDependenciesResponse = string; export type ArchiveWorkspaceDependenciesData = { language: ScriptLang; name?: string; workspace: string; }; export type ArchiveWorkspaceDependenciesResponse = unknown; export type DeleteWorkspaceDependenciesData = { language: ScriptLang; name?: string; workspace: string; }; export type DeleteWorkspaceDependenciesResponse = unknown; export type ListWorkspaceDependenciesData = { workspace: string; }; export type ListWorkspaceDependenciesResponse = Array; export type GetLatestWorkspaceDependenciesData = { language: ScriptLang; name?: string; workspace: string; }; export type GetLatestWorkspaceDependenciesResponse = WorkspaceDependencies; export type ListSelectedJobGroupsData = { /** * script args */ requestBody: Array<(string)>; workspace: string; }; export type ListSelectedJobGroupsResponse = Array<{ kind: 'script' | 'flow'; script_path: string; latest_schema: { [key: string]: unknown; }; schemas: Array<{ schema: { [key: string]: unknown; }; script_hash: string; job_ids: Array<(string)>; }>; }>; export type RunScriptByPathData = { /** * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl */ cacheTtl?: string; /** * make the run invisible to the the script owner (default false) */ invisibleToOwner?: boolean; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; path: string; /** * script args */ requestBody: ScriptArgs; /** * when to schedule this job (leave empty for immediate run) */ scheduledFor?: string; /** * schedule the script to execute in the number of seconds starting now */ scheduledInSecs?: number; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * Override the tag to use */ tag?: string; workspace: string; }; export type RunScriptByPathResponse = string; export type RunWaitResultScriptByPathData = { /** * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl */ cacheTtl?: string; /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; path: string; /** * The maximum size of the queue for which the request would get rejected if that job would push it above that limit * */ queueLimit?: string; /** * script args */ requestBody: ScriptArgs; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * Override the tag to use */ tag?: string; workspace: string; }; export type RunWaitResultScriptByPathResponse = unknown; export type RunWaitResultScriptByPathGetData = { /** * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl */ cacheTtl?: string; /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; path: string; /** * The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` * */ payload?: string; /** * The maximum size of the queue for which the request would get rejected if that job would push it above that limit * */ queueLimit?: string; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * Override the tag to use */ tag?: string; workspace: string; }; export type RunWaitResultScriptByPathGetResponse = unknown; export type RunWaitResultFlowByPathData = { /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow. */ memoryId?: string; path: string; /** * The maximum size of the queue for which the request would get rejected if that job would push it above that limit * */ queueLimit?: string; /** * script args */ requestBody: ScriptArgs; /** * skip the preprocessor */ skipPreprocessor?: boolean; workspace: string; }; export type RunWaitResultFlowByPathResponse = unknown; export type RunWaitResultFlowByVersionData = { /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow. */ memoryId?: string; /** * The maximum size of the queue for which the request would get rejected if that job would push it above that limit * */ queueLimit?: string; /** * script args */ requestBody: ScriptArgs; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * flow version ID */ version: number; workspace: string; }; export type RunWaitResultFlowByVersionResponse = unknown; export type RunWaitResultFlowByVersionGetData = { /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow. */ memoryId?: string; /** * The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` * */ payload?: string; /** * The maximum size of the queue for which the request would get rejected if that job would push it above that limit * */ queueLimit?: string; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * flow version ID */ version: number; workspace: string; }; export type RunWaitResultFlowByVersionGetResponse = unknown; export type RunAndStreamFlowByPathData = { /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow. */ memoryId?: string; path: string; /** * delay between polling for job updates in milliseconds */ pollDelayMs?: number; /** * The maximum size of the queue for which the request would get rejected if that job would push it above that limit * */ queueLimit?: string; /** * flow args */ requestBody: ScriptArgs; /** * skip the preprocessor */ skipPreprocessor?: boolean; workspace: string; }; export type RunAndStreamFlowByPathResponse = string; export type RunAndStreamFlowByPathGetData = { /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow. */ memoryId?: string; path: string; /** * The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` * */ payload?: string; /** * delay between polling for job updates in milliseconds */ pollDelayMs?: number; /** * The maximum size of the queue for which the request would get rejected if that job would push it above that limit * */ queueLimit?: string; /** * skip the preprocessor */ skipPreprocessor?: boolean; workspace: string; }; export type RunAndStreamFlowByPathGetResponse = string; export type RunAndStreamFlowByVersionData = { /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow. */ memoryId?: string; /** * delay between polling for job updates in milliseconds */ pollDelayMs?: number; /** * The maximum size of the queue for which the request would get rejected if that job would push it above that limit * */ queueLimit?: string; /** * flow args */ requestBody: ScriptArgs; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * flow version ID */ version: number; workspace: string; }; export type RunAndStreamFlowByVersionResponse = string; export type RunAndStreamFlowByVersionGetData = { /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow. */ memoryId?: string; /** * The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` * */ payload?: string; /** * delay between polling for job updates in milliseconds */ pollDelayMs?: number; /** * The maximum size of the queue for which the request would get rejected if that job would push it above that limit * */ queueLimit?: string; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * flow version ID */ version: number; workspace: string; }; export type RunAndStreamFlowByVersionGetResponse = string; export type RunAndStreamScriptByPathData = { /** * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl */ cacheTtl?: string; /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; path: string; /** * delay between polling for job updates in milliseconds */ pollDelayMs?: number; /** * The maximum size of the queue for which the request would get rejected if that job would push it above that limit * */ queueLimit?: string; /** * script args */ requestBody: ScriptArgs; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * Override the tag to use */ tag?: string; workspace: string; }; export type RunAndStreamScriptByPathResponse = string; export type RunAndStreamScriptByPathGetData = { /** * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl */ cacheTtl?: string; /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; path: string; /** * The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` * */ payload?: string; /** * delay between polling for job updates in milliseconds */ pollDelayMs?: number; /** * The maximum size of the queue for which the request would get rejected if that job would push it above that limit * */ queueLimit?: string; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * Override the tag to use */ tag?: string; workspace: string; }; export type RunAndStreamScriptByPathGetResponse = string; export type RunAndStreamScriptByHashData = { /** * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl */ cacheTtl?: string; hash: string; /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; /** * delay between polling for job updates in milliseconds */ pollDelayMs?: number; /** * The maximum size of the queue for which the request would get rejected if that job would push it above that limit * */ queueLimit?: string; /** * script args */ requestBody: ScriptArgs; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * Override the tag to use */ tag?: string; workspace: string; }; export type RunAndStreamScriptByHashResponse = string; export type RunAndStreamScriptByHashGetData = { /** * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl */ cacheTtl?: string; hash: string; /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; /** * The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` * */ payload?: string; /** * delay between polling for job updates in milliseconds */ pollDelayMs?: number; /** * The maximum size of the queue for which the request would get rejected if that job would push it above that limit * */ queueLimit?: string; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * Override the tag to use */ tag?: string; workspace: string; }; export type RunAndStreamScriptByHashGetResponse = string; export type ResultByIdData = { flowJobId: string; nodeId: string; workspace: string; }; export type ResultByIdResponse = unknown; export type GetJobViewTokenData = { id: string; workspace: string; }; export type GetJobViewTokenResponse = string; export type GetJobPublicViewTokenData = { id: string; workspace: string; }; export type GetJobPublicViewTokenResponse = string; export type RunFlowByPathData = { /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * make the run invisible to the the flow owner (default false) */ invisibleToOwner?: boolean; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow. */ memoryId?: string; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; path: string; /** * flow args */ requestBody: ScriptArgs; /** * when to schedule this job (leave empty for immediate run) */ scheduledFor?: string; /** * schedule the script to execute in the number of seconds starting now */ scheduledInSecs?: number; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * Override the tag to use */ tag?: string; workspace: string; }; export type RunFlowByPathResponse = string; export type RunFlowByVersionData = { /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * make the run invisible to the the flow owner (default false) */ invisibleToOwner?: boolean; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow. */ memoryId?: string; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; /** * flow args */ requestBody: ScriptArgs; /** * when to schedule this job (leave empty for immediate run) */ scheduledFor?: string; /** * schedule the script to execute in the number of seconds starting now */ scheduledInSecs?: number; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * Override the tag to use */ tag?: string; /** * flow version ID */ version: number; workspace: string; }; export type RunFlowByVersionResponse = string; export type BatchReRunJobsData = { /** * list of job ids to re run and arg tranforms */ requestBody: { job_ids: Array<(string)>; script_options_by_path: { [key: string]: { input_transforms?: { [key: string]: InputTransform; }; use_latest_version?: boolean; }; }; flow_options_by_path: { [key: string]: { input_transforms?: { [key: string]: InputTransform; }; use_latest_version?: boolean; }; }; }; workspace: string; }; export type BatchReRunJobsResponse = string; export type RestartFlowAtStepData = { id: string; /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * make the run invisible to the the flow owner (default false) */ invisibleToOwner?: boolean; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; /** * restart flow parameters */ requestBody: { /** * top-level step id to restart the flow from (or the outermost container when restarting at a nested step) */ step_id: string; /** * for branchall or loop at the top level, the iteration at which the flow should restart (optional) */ branch_or_iteration_n?: number; /** * specific flow version to use for restart (optional, uses current version if not specified) */ flow_version?: number; /** * path of additional steps to descend into AFTER `step_id`. Each entry represents one level of nesting inside the spawned child of the previous level's container (BranchOne / sequential ForLoop iteration / Subflow). When non-empty, the actual restart point is the LAST entry's step_id. */ nested_path?: Array<{ /** * step id at this nesting level */ step_id: string; /** * for ForLoop containers, the iteration to restart at (0-based; iterations 0..n-1 are preserved) */ branch_or_iteration_n?: number; }>; }; /** * when to schedule this job (leave empty for immediate run) */ scheduledFor?: string; /** * schedule the script to execute in the number of seconds starting now */ scheduledInSecs?: number; /** * Override the tag to use */ tag?: string; workspace: string; }; export type RestartFlowAtStepResponse = string; export type RunScriptByHashData = { /** * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl */ cacheTtl?: string; hash: string; /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * make the run invisible to the the script owner (default false) */ invisibleToOwner?: boolean; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; /** * Partially filled args */ requestBody: { [key: string]: unknown; }; /** * when to schedule this job (leave empty for immediate run) */ scheduledFor?: string; /** * schedule the script to execute in the number of seconds starting now */ scheduledInSecs?: number; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * Override the tag to use */ tag?: string; workspace: string; }; export type RunScriptByHashResponse = string; export type RunScriptPreviewData = { /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * make the run invisible to the the script owner (default false) */ invisibleToOwner?: boolean; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * preview */ requestBody: Preview; /** * custom timeout in seconds for this preview run */ timeout?: number; workspace: string; }; export type RunScriptPreviewResponse = string; export type RunScriptPreviewInlineData = { /** * preview */ requestBody: PreviewInline; workspace: string; }; export type RunScriptPreviewInlineResponse = unknown; export type RunScriptByPathInlineData = { path: string; /** * script args */ requestBody: InlineScriptArgs; workspace: string; }; export type RunScriptByPathInlineResponse = unknown; export type RunScriptByHashInlineData = { hash: string; /** * script args */ requestBody: InlineScriptArgs; workspace: string; }; export type RunScriptByHashInlineResponse = unknown; export type RunScriptPreviewAndWaitResultData = { /** * preview */ requestBody: Preview; workspace: string; }; export type RunScriptPreviewAndWaitResultResponse = unknown; export type RunCodeWorkflowTaskData = { entrypoint: string; jobId: string; /** * preview */ requestBody: WorkflowTask; workspace: string; }; export type RunCodeWorkflowTaskResponse = string; export type RunRawScriptDependenciesData = { /** * raw script content */ requestBody: { raw_scripts: Array; entrypoint: string; }; workspace: string; }; export type RunRawScriptDependenciesResponse = { lock: string; }; export type RunRawScriptDependenciesAsyncData = { /** * raw script content */ requestBody: { raw_scripts: Array; entrypoint: string; }; workspace: string; }; export type RunRawScriptDependenciesAsyncResponse = string; export type RunFlowDependenciesAsyncData = { /** * flow value and path */ requestBody: { path: string; flow_value: FlowValue; }; workspace: string; }; export type RunFlowDependenciesAsyncResponse = string; export type RunFlowPreviewData = { /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * make the run invisible to the the script owner (default false) */ invisibleToOwner?: boolean; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow. */ memoryId?: string; /** * preview */ requestBody: FlowPreview; workspace: string; }; export type RunFlowPreviewResponse = string; export type RunFlowPreviewAndWaitResultData = { /** * Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow. */ memoryId?: string; /** * preview */ requestBody: FlowPreview; workspace: string; }; export type RunFlowPreviewAndWaitResultResponse = unknown; export type RunDynamicSelectData = { /** * dynamic select request */ requestBody: DynamicInputData; workspace: string; }; export type RunDynamicSelectResponse = string; export type ListQueueData = { /** * allow wildcards (*) in the filter of label, tag, worker */ allowWildcards?: boolean; /** * get jobs from all workspaces (only valid if request come from the `admins` workspace) */ allWorkspaces?: boolean; /** * filter on jobs containing those args as a json subset (@> in postgres) */ args?: string; /** * filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') */ createdBy?: string; /** * is not a scheduled job */ isNotSchedule?: boolean; /** * filter by job kind. Supports comma-separated list of values ('preview', 'script', 'dependencies', 'flow') and negation by prefixing all values with '!' (e.g. '!preview,!dependencies') */ jobKinds?: string; /** * order by desc order (default true) */ orderDesc?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * filter on jobs containing those result as a json subset (@> in postgres) */ result?: string; /** * filter on running jobs */ running?: boolean; /** * filter on jobs scheduled_for before now (hence waitinf for a worker) */ scheduledForBeforeNow?: boolean; /** * mask to filter by schedule path */ schedulePath?: string; /** * mask to filter exact matching path */ scriptHash?: string; /** * filter by exact matching script path. Supports comma-separated list (e.g. 'f/script1,f/script2') and negation by prefixing all values with '!' (e.g. '!f/script1,!f/script2') */ scriptPathExact?: string; /** * filter by script path prefix. Supports comma-separated list (e.g. 'f/folder1,f/folder2') and negation by prefixing all values with '!' (e.g. '!f/folder1,!f/folder2') */ scriptPathStart?: string; /** * filter on started after (exclusive) timestamp */ startedAfter?: string; /** * filter on started before (inclusive) timestamp */ startedBefore?: string; /** * filter on successful jobs */ success?: boolean; /** * filter on suspended jobs */ suspended?: boolean; /** * filter by tag/worker group. Supports comma-separated list (e.g. 'gpu,highmem') and negation by prefixing all values with '!' (e.g. '!gpu,!highmem') */ tag?: string; /** * filter by trigger kind. Supports comma-separated list (e.g. 'schedule,webhook') and negation by prefixing all values with '!' (e.g. '!schedule,!webhook') */ triggerKind?: string; /** * filter by trigger path. Supports comma-separated list (e.g. 'f/trigger1,f/trigger2') and negation by prefixing all values with '!' (e.g. '!f/trigger1,!f/trigger2') */ triggerPath?: string; /** * filter by worker this job ran on. Supports comma-separated list (e.g. 'worker-1,worker-2') and negation by prefixing all values with '!' (e.g. '!worker-1,!worker-2') */ worker?: string; workspace: string; }; export type ListQueueResponse = Array; export type GetQueueCountData = { /** * get jobs from all workspaces (only valid if request come from the `admins` workspace) */ allWorkspaces?: boolean; workspace: string; }; export type GetQueueCountResponse = { database_length: number; suspended?: number; }; export type GetCompletedCountData = { workspace: string; }; export type GetCompletedCountResponse = { database_length: number; }; export type CountCompletedJobsData = { allWorkspaces?: boolean; completedAfterSAgo?: number; success?: boolean; tags?: string; workspace: string; }; export type CountCompletedJobsResponse = number; export type ListFilteredJobsUuidsData = { /** * get jobs from all workspaces (only valid if request come from the `admins` workspace) */ allWorkspaces?: boolean; /** * filter on jobs containing those args as a json subset (@> in postgres) */ args?: string; /** * filter on started after (exclusive) timestamp */ completedAfter?: string; /** * filter on started before (inclusive) timestamp */ completedBefore?: string; /** * filter on created after (exclusive) timestamp */ createdAfter?: string; /** * filter on jobs created after X for jobs in the queue only */ createdAfterQueue?: string; /** * filter on created before (inclusive) timestamp */ createdBefore?: string; /** * filter on jobs created before X for jobs in the queue only */ createdBeforeQueue?: string; /** * filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') */ createdBy?: string; /** * has null parent */ hasNullParent?: boolean; /** * is the job a flow step */ isFlowStep?: boolean; /** * is not a scheduled job */ isNotSchedule?: boolean; /** * is the job skipped */ isSkipped?: boolean; /** * filter by job kind. Supports comma-separated list of values ('preview', 'script', 'dependencies', 'flow') and negation by prefixing all values with '!' (e.g. '!preview,!dependencies') */ jobKinds?: string; /** * filter by exact matching job label. Supports comma-separated list (e.g. 'deploy,release') and negation by prefixing all values with '!' (e.g. '!deploy,!release') */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * filter on whether a failure has been marked as handled. true keeps only resolved failures, false hides them */ resolved?: boolean; /** * filter on jobs containing those result as a json subset (@> in postgres) */ result?: string; /** * filter on running jobs */ running?: boolean; /** * filter on jobs scheduled_for before now (hence waitinf for a worker) */ scheduledForBeforeNow?: boolean; /** * mask to filter by schedule path */ schedulePath?: string; /** * mask to filter exact matching path */ scriptHash?: string; /** * filter by exact matching script path. Supports comma-separated list (e.g. 'f/script1,f/script2') and negation by prefixing all values with '!' (e.g. '!f/script1,!f/script2') */ scriptPathExact?: string; /** * filter by script path prefix. Supports comma-separated list (e.g. 'f/folder1,f/folder2') and negation by prefixing all values with '!' (e.g. '!f/folder1,!f/folder2') */ scriptPathStart?: string; /** * filter on started after (exclusive) timestamp */ startedAfter?: string; /** * filter on started before (inclusive) timestamp */ startedBefore?: string; /** * filter on the exact completed job status. Unlike `success=true` (which also matches `skipped`), `status=success` matches only `success`. */ status?: 'success' | 'failure' | 'canceled' | 'skipped'; /** * filter on successful jobs */ success?: boolean; /** * filter on suspended jobs */ suspended?: boolean; /** * filter by tag/worker group. Supports comma-separated list (e.g. 'gpu,highmem') and negation by prefixing all values with '!' (e.g. '!gpu,!highmem') */ tag?: string; /** * filter by worker this job ran on. Supports comma-separated list (e.g. 'worker-1,worker-2') and negation by prefixing all values with '!' (e.g. '!worker-1,!worker-2') */ worker?: string; workspace: string; }; export type ListFilteredJobsUuidsResponse = Array<(string)>; export type ListFilteredQueueUuidsData = { /** * allow wildcards (*) in the filter of label, tag, worker */ allowWildcards?: boolean; /** * get jobs from all workspaces (only valid if request come from the `admins` workspace) */ allWorkspaces?: boolean; /** * filter on jobs containing those args as a json subset (@> in postgres) */ args?: string; concurrencyKey?: string; /** * filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') */ createdBy?: string; /** * is not a scheduled job */ isNotSchedule?: boolean; /** * filter by job kind. Supports comma-separated list of values ('preview', 'script', 'dependencies', 'flow') and negation by prefixing all values with '!' (e.g. '!preview,!dependencies') */ jobKinds?: string; /** * order by desc order (default true) */ orderDesc?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * filter on jobs containing those result as a json subset (@> in postgres) */ result?: string; /** * filter on running jobs */ running?: boolean; /** * filter on jobs scheduled_for before now (hence waitinf for a worker) */ scheduledForBeforeNow?: boolean; /** * mask to filter by schedule path */ schedulePath?: string; /** * mask to filter exact matching path */ scriptHash?: string; /** * filter by exact matching script path. Supports comma-separated list (e.g. 'f/script1,f/script2') and negation by prefixing all values with '!' (e.g. '!f/script1,!f/script2') */ scriptPathExact?: string; /** * filter by script path prefix. Supports comma-separated list (e.g. 'f/folder1,f/folder2') and negation by prefixing all values with '!' (e.g. '!f/folder1,!f/folder2') */ scriptPathStart?: string; /** * filter on started after (exclusive) timestamp */ startedAfter?: string; /** * filter on started before (inclusive) timestamp */ startedBefore?: string; /** * filter on successful jobs */ success?: boolean; /** * filter on suspended jobs */ suspended?: boolean; /** * filter by tag/worker group. Supports comma-separated list (e.g. 'gpu,highmem') and negation by prefixing all values with '!' (e.g. '!gpu,!highmem') */ tag?: string; workspace: string; }; export type ListFilteredQueueUuidsResponse = Array<(string)>; export type RunQueuedJobNowData = { id: string; workspace: string; }; export type RunQueuedJobNowResponse = string; export type CancelSelectionData = { allWorkspaces?: boolean; forceCancel?: boolean; /** * uuids of the jobs to cancel */ requestBody: Array<(string)>; workspace: string; }; export type CancelSelectionResponse = Array<(string)>; export type GetJobOtelTracesData = { id: string; workspace: string; }; export type GetJobOtelTracesResponse = Array<{ [key: string]: unknown; }>; export type ListCompletedJobsData = { /** * allow wildcards (*) in the filter of label, tag, worker */ allowWildcards?: boolean; /** * filter on jobs containing those args as a json subset (@> in postgres) */ args?: string; /** * filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') */ createdBy?: string; /** * has null parent */ hasNullParent?: boolean; /** * is the job a flow step */ isFlowStep?: boolean; /** * is not a scheduled job */ isNotSchedule?: boolean; /** * is the job skipped */ isSkipped?: boolean; /** * filter by job kind. Supports comma-separated list of values ('preview', 'script', 'dependencies', 'flow') and negation by prefixing all values with '!' (e.g. '!preview,!dependencies') */ jobKinds?: string; /** * filter by exact matching job label. Supports comma-separated list (e.g. 'deploy,release') and negation by prefixing all values with '!' (e.g. '!deploy,!release') */ label?: string; /** * order by desc order (default true) */ orderDesc?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * filter on whether a failure has been marked as handled. true keeps only resolved failures, false hides them */ resolved?: boolean; /** * filter on jobs containing those result as a json subset (@> in postgres) */ result?: string; /** * mask to filter by schedule path */ schedulePath?: string; /** * mask to filter exact matching path */ scriptHash?: string; /** * filter by exact matching script path. Supports comma-separated list (e.g. 'f/script1,f/script2') and negation by prefixing all values with '!' (e.g. '!f/script1,!f/script2') */ scriptPathExact?: string; /** * filter by script path prefix. Supports comma-separated list (e.g. 'f/folder1,f/folder2') and negation by prefixing all values with '!' (e.g. '!f/folder1,!f/folder2') */ scriptPathStart?: string; /** * filter on started after (exclusive) timestamp */ startedAfter?: string; /** * filter on started before (inclusive) timestamp */ startedBefore?: string; /** * filter on the exact completed job status. Unlike `success=true` (which also matches `skipped`), `status=success` matches only `success`. */ status?: 'success' | 'failure' | 'canceled' | 'skipped'; /** * filter on successful jobs */ success?: boolean; /** * filter by tag/worker group. Supports comma-separated list (e.g. 'gpu,highmem') and negation by prefixing all values with '!' (e.g. '!gpu,!highmem') */ tag?: string; /** * filter by worker this job ran on. Supports comma-separated list (e.g. 'worker-1,worker-2') and negation by prefixing all values with '!' (e.g. '!worker-1,!worker-2') */ worker?: string; workspace: string; }; export type ListCompletedJobsResponse = Array; export type ExportCompletedJobsData = { /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; export type ExportCompletedJobsResponse = Array; export type ImportCompletedJobsData = { requestBody: Array; workspace: string; }; export type ImportCompletedJobsResponse = string; export type ExportQueuedJobsData = { /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; export type ExportQueuedJobsResponse = Array; export type ImportQueuedJobsData = { requestBody: Array; workspace: string; }; export type ImportQueuedJobsResponse = string; export type DeleteJobsData = { requestBody: Array<(string)>; workspace: string; }; export type DeleteJobsResponse = string; export type ListJobsData = { /** * allow wildcards (*) in the filter of label, tag, worker */ allowWildcards?: boolean; /** * get jobs from all workspaces (only valid if request come from the `admins` workspace) */ allWorkspaces?: boolean; /** * filter on jobs containing those args as a json subset (@> in postgres) */ args?: string; /** * broad search across multiple fields (case-insensitive substring match on path, tag, schedule path, trigger kind, label) */ broadFilter?: string; /** * filter on started after (exclusive) timestamp */ completedAfter?: string; /** * filter on started before (inclusive) timestamp */ completedBefore?: string; /** * filter on created after (exclusive) timestamp */ createdAfter?: string; /** * filter on jobs created after X for jobs in the queue only */ createdAfterQueue?: string; /** * filter on created before (inclusive) timestamp */ createdBefore?: string; /** * filter on jobs created before X for jobs in the queue only */ createdBeforeQueue?: string; /** * filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') */ createdBy?: string; /** * exclude jobs that were started with a `_ENTRYPOINT_OVERRIDE` arg (e.g. dynamic-select helper runs and preprocessor previews) */ excludesEntrypointOverride?: boolean; /** * has null parent */ hasNullParent?: boolean; /** * is the job a flow step */ isFlowStep?: boolean; /** * is not a scheduled job */ isNotSchedule?: boolean; /** * is the job skipped */ isSkipped?: boolean; /** * filter by job kind. Supports comma-separated list of values ('preview', 'script', 'dependencies', 'flow') and negation by prefixing all values with '!' (e.g. '!preview,!dependencies') */ jobKinds?: string; /** * filter by exact matching job label. Supports comma-separated list (e.g. 'deploy,release') and negation by prefixing all values with '!' (e.g. '!deploy,!release') */ label?: string; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * filter on whether a failure has been marked as handled. true keeps only resolved failures, false hides them */ resolved?: boolean; /** * filter on jobs containing those result as a json subset (@> in postgres) */ result?: string; /** * filter on running jobs */ running?: boolean; /** * filter on jobs scheduled_for before now (hence waitinf for a worker) */ scheduledForBeforeNow?: boolean; /** * mask to filter by schedule path */ schedulePath?: string; /** * mask to filter exact matching path */ scriptHash?: string; /** * filter by exact matching script path. Supports comma-separated list (e.g. 'f/script1,f/script2') and negation by prefixing all values with '!' (e.g. '!f/script1,!f/script2') */ scriptPathExact?: string; /** * filter by script path prefix. Supports comma-separated list (e.g. 'f/folder1,f/folder2') and negation by prefixing all values with '!' (e.g. '!f/folder1,!f/folder2') */ scriptPathStart?: string; /** * filter on started after (exclusive) timestamp */ startedAfter?: string; /** * filter on started before (inclusive) timestamp */ startedBefore?: string; /** * filter on the exact completed job status. Unlike `success=true` (which also matches `skipped`), `status=success` matches only `success`. */ status?: 'success' | 'failure' | 'canceled' | 'skipped'; /** * filter on successful jobs */ success?: boolean; /** * filter on suspended jobs */ suspended?: boolean; /** * filter by tag/worker group. Supports comma-separated list (e.g. 'gpu,highmem') and negation by prefixing all values with '!' (e.g. '!gpu,!highmem') */ tag?: string; /** * filter by trigger kind. Supports comma-separated list (e.g. 'schedule,webhook') and negation by prefixing all values with '!' (e.g. '!schedule,!webhook') */ triggerKind?: string; /** * filter by worker this job ran on. Supports comma-separated list (e.g. 'worker-1,worker-2') and negation by prefixing all values with '!' (e.g. '!worker-1,!worker-2') */ worker?: string; workspace: string; }; export type ListJobsResponse = Array; export type GetDbClockResponse = number; export type CountJobsByTagData = { /** * Past Time horizon in seconds (when to start the count = now - horizon) (default is 3600) */ horizonSecs?: number; /** * Specific workspace ID to filter results (optional) */ workspaceId?: string; }; export type CountJobsByTagResponse = Array<{ tag: string; count: number; }>; export type GetJobData = { /** * Approval token granting read access to the job when not logged in. The token must be the one issued for this job's flow (i.e. the flow id used when generating the approval URL). */ approvalToken?: string; id: string; noCode?: boolean; noLogs?: boolean; workspace: string; }; export type GetJobResponse = Job; export type GetRootJobIdData = { id: string; workspace: string; }; export type GetRootJobIdResponse = string; export type GetJobLogsData = { id: string; removeAnsiWarnings?: boolean; workspace: string; }; export type GetJobLogsResponse = string; export type GetFlowAllLogsData = { id: string; workspace: string; }; export type GetFlowAllLogsResponse = string; export type GetFlowAllLogsStructuredData = { id: string; workspace: string; }; export type GetFlowAllLogsStructuredResponse = Array<{ job_id: string; /** * human-readable label describing the job's position in the flow tree */ label: string; /** * job kind (script, flow, forloopflow, ...) */ kind: string; flow_step_id?: string | null; /** * materialized step path (e.g. "a/b") */ step_path?: string | null; /** * depth in the flow tree (0 for the root flow job) */ depth: number; /** * parent module type (forloopflow, branchall, ...) */ parent_module_type?: string | null; /** * 1-based index of this job among siblings sharing the same step */ sibling_index: number; /** * total number of siblings sharing the same step */ sibling_count: number; logs: string; }>; export type GetFlowAllResultsData = { id: string; /** * per-entry cap (in characters of JSON text) on result_prefix (default 2000, max 30000) */ maxResultLen?: number; /** * step address to resolve to a single job instead of enumerating the tree: "b", "b/c", "b[12]" (1-based iteration/branch), composable as "b[12]/c" */ step?: string; workspace: string; }; export type GetFlowAllResultsResponse = { /** * set when the requested job is itself a step of a larger flow run; id of the flow run directly enclosing it */ enclosing_job?: string; entries: Array<{ job_id: string; /** * human-readable label describing the job's position in the flow tree */ label: string; /** * job kind (script, flow, forloopflow, ...) */ kind: string; flow_step_id?: string | null; /** * materialized step path (e.g. "a/b") */ step_path?: string | null; /** * depth in the flow tree (0 for the root flow job) */ depth: number; /** * parent module type (forloopflow, branchall, ...) */ parent_module_type?: string | null; /** * 1-based index of this job among siblings sharing the same step */ sibling_index: number; /** * total number of siblings sharing the same step */ sibling_count: number; status: 'success' | 'failure' | 'canceled' | 'skipped' | 'suspended' | 'running' | 'queued'; success?: boolean; duration_ms?: number; started_at?: string; /** * result JSON text truncated to the per-entry budget; absent until the job has completed */ result_prefix?: string; /** * full length in characters of the result JSON text (greater than the prefix length when truncated) */ result_length?: number; }>; /** * true when the tree has more jobs than the entry cap; entries then hold the depth-first prefix */ truncated?: boolean; /** * true when the caller's token is tag-scoped; steps running on other tags are omitted */ scope_filtered?: boolean; /** * set when step was provided but could not be resolved; a diagnostic listing available step ids or iteration statuses */ step_error?: string; }; export type GetCompletedJobLogsTailData = { id: string; workspace: string; }; export type GetCompletedJobLogsTailResponse = string; export type GetJobArgsData = { id: string; workspace: string; }; export type GetJobArgsResponse = unknown; export type GetStartedAtByIdsData = { /** * ids */ requestBody: Array<(string)>; workspace: string; }; export type GetStartedAtByIdsResponse = Array<(string)>; export type GetJobUpdatesData = { getProgress?: boolean; id: string; logOffset?: number; noLogs?: boolean; running?: boolean; streamOffset?: number; workspace: string; }; export type GetJobUpdatesResponse = { running?: boolean; completed?: boolean; new_logs?: string; log_offset?: number; mem_peak?: number; progress?: number; stream_offset?: number; new_result_stream?: string; flow_status?: FlowStatus; workflow_as_code_status?: WorkflowStatus; }; export type GetJobUpdatesSseData = { fast?: boolean; getProgress?: boolean; id: string; logOffset?: number; noLogs?: boolean; onlyResult?: boolean; running?: boolean; streamOffset?: number; workspace: string; }; export type GetJobUpdatesSseResponse = string; export type GetLogFileFromStoreData = { path: string; workspace: string; }; export type GetLogFileFromStoreResponse = string; export type GetFlowDebugInfoData = { id: string; workspace: string; }; export type GetFlowDebugInfoResponse = unknown; export type GetCompletedJobData = { id: string; workspace: string; }; export type GetCompletedJobResponse = CompletedJob; export type GetCompletedJobResultData = { approver?: string; id: string; resumeId?: number; secret?: string; suspendedJob?: string; workspace: string; }; export type GetCompletedJobResultResponse = unknown; export type GetCompletedJobResultMaybeData = { getStarted?: boolean; id: string; workspace: string; }; export type GetCompletedJobResultMaybeResponse = { completed: boolean; result: unknown; success?: boolean; started?: boolean; }; export type GetCompletedJobTimingData = { id: string; workspace: string; }; export type GetCompletedJobTimingResponse = { created_at: string; started_at?: string; duration_ms?: number; }; export type ListDispatchEventsData = { id: string; workspace: string; }; export type ListDispatchEventsResponse = Array<{ subscriber_path: string; asset_kind: 's3object' | 'resource' | 'variable' | 'ducklake' | 'datatable' | 'volume' | 'dbt'; asset_path: string; outcome: 'dispatched' | 'join_pending' | 'skipped'; child_job_id?: string; partition?: string; received_inputs?: number; required_inputs?: number; debounce_s?: number; reason?: string; created_at: string; }>; export type ListAssetDispatchEdgesData = { /** * Only edges dispatched at/after this instant. */ createdAfter?: string; /** * Folder path prefix the children live under, e.g. `f/orders/`. */ pathStart: string; workspace: string; }; export type ListAssetDispatchEdgesResponse = Array<{ producer_job_id: string; /** * Set for `dispatched`; absent for `join_pending` inputs. */ child_job_id?: string; subscriber_path: string; outcome: 'dispatched' | 'join_pending'; asset_kind: 's3object' | 'resource' | 'variable' | 'ducklake' | 'datatable' | 'volume' | 'dbt'; asset_path: string; created_at: string; }>; export type DeleteCompletedJobData = { id: string; workspace: string; }; export type DeleteCompletedJobResponse = CompletedJob; export type ResolveCompletedJobsData = { requestBody: { job_ids: Array<(string)>; /** * a person's explanation of why the failure is considered handled. Enterprise-only: ignored outside enterprise */ note?: string; /** * id of a later successful run of the same runnable that supersedes the failure. Verified server-side, and the resulting note is the server's own wording, so it is recorded regardless of licence. A claim that cannot be verified resolves nothing */ superseded_by?: string; }; workspace: string; }; export type ResolveCompletedJobsResponse = Array<(string)>; export type UnresolveCompletedJobsData = { requestBody: { job_ids: Array<(string)>; }; workspace: string; }; export type UnresolveCompletedJobsResponse = Array<(string)>; export type CancelQueuedJobData = { id: string; /** * reason */ requestBody: { reason?: string; }; workspace: string; }; export type CancelQueuedJobResponse = string; export type CancelPersistentQueuedJobsData = { path: string; /** * reason */ requestBody: { reason?: string; }; workspace: string; }; export type CancelPersistentQueuedJobsResponse = string; export type ForceCancelQueuedJobData = { id: string; /** * reason */ requestBody: { reason?: string; }; workspace: string; }; export type ForceCancelQueuedJobResponse = string; export type GetQueuePositionData = { scheduledFor: number; workspace: string; }; export type GetQueuePositionResponse = { /** * The position in queue (1-based), null if not in queue or already running */ position?: number; }; export type GetScheduledForData = { id: string; workspace: string; }; export type GetScheduledForResponse = number; export type CreateJobSignatureData = { approver?: string; id: string; resumeId: number; workspace: string; }; export type CreateJobSignatureResponse = string; export type GetResumeUrlsData = { approver?: string; /** * If true, generate resume URLs for the parent flow instead of the specific step. This allows pre-approvals that can be consumed by any later suspend step in the same flow. */ flowLevel?: boolean; id: string; resumeId: number; workspace: string; }; export type GetResumeUrlsResponse = { approvalPage: string; resume: string; cancel: string; }; export type GetWacApprovalUrlsData = { approver?: string; id: string; /** * checkpoint key of the wait_for_approval step, as passed to `wait_for_approval(key=...)` */ stepKey: string; workspace: string; }; export type GetWacApprovalUrlsResponse = { approvalPage: string; resume: string; cancel: string; }; export type GetSlackApprovalPayloadData = { approver?: string; cancelButtonText?: string; channelId: string; defaultArgsJson?: string; dynamicEnumsJson?: string; flowStepId: string; id: string; message?: string; resumeButtonText?: string; slackResourcePath: string; workspace: string; }; export type GetSlackApprovalPayloadResponse = unknown; export type GetTeamsApprovalPayloadData = { approver?: string; cancelButtonText?: string; channelName: string; defaultArgsJson?: string; dynamicEnumsJson?: string; flowStepId: string; id: string; message?: string; resumeButtonText?: string; teamName: string; workspace: string; }; export type GetTeamsApprovalPayloadResponse = unknown; export type ResumeSuspendedData = { jobId: string; requestBody: { /** * payload to send to the resumed job */ payload?: unknown; /** * approval token for unauthenticated access */ approval_token?: string; /** * whether to approve (true) or cancel (false) the job */ approved?: boolean; }; workspace: string; }; export type ResumeSuspendedResponse = string; export type GetApprovalInfoData = { jobId: string; /** * approval token for unauthenticated access */ token?: string; workspace: string; }; export type GetApprovalInfoResponse = { flow_id: string; /** * form schema for the approval step */ form_schema?: unknown; /** * description of the approval step */ description?: unknown; approval_conditions?: { user_auth_required: boolean; user_groups_required: Array<(string)>; self_approval_disabled: boolean; }; /** * whether the current user/token holder can approve */ can_approve: boolean; /** * whether user authentication is required to approve */ user_auth_required: boolean; /** * whether to hide the cancel button in the UI */ hide_cancel?: boolean; /** * how the approval page presents the request */ skin: 'detailed' | 'minimal'; /** * summary of the approval step, for the page title */ step_summary?: string; /** * summary of the flow or workflow the approval belongs to */ flow_summary?: string; approvers: Array<{ resume_id: number; approver: string; }>; /** * Share-read-link token for the flow. An authenticated workspace member can append it as a `view_token` query param on the run page to read a flow they don't otherwise have access to. */ view_token?: string; }; export type ResumeSuspendedJobGetData = { approver?: string; id: string; /** * The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` * */ payload?: string; resumeId: number; signature: string; workspace: string; }; export type ResumeSuspendedJobGetResponse = string; export type ResumeSuspendedJobPostData = { approver?: string; id: string; requestBody: { [key: string]: unknown; }; resumeId: number; signature: string; workspace: string; }; export type ResumeSuspendedJobPostResponse = string; export type SetFlowUserStateData = { id: string; key: string; /** * new value */ requestBody: unknown; workspace: string; }; export type SetFlowUserStateResponse = string; export type GetFlowUserStateData = { id: string; key: string; workspace: string; }; export type GetFlowUserStateResponse = unknown; export type ResumeSuspendedFlowAsOwnerData = { id: string; requestBody: { [key: string]: unknown; }; workspace: string; }; export type ResumeSuspendedFlowAsOwnerResponse = string; export type CancelSuspendedJobGetData = { approver?: string; id: string; resumeId: number; signature: string; workspace: string; }; export type CancelSuspendedJobGetResponse = string; export type CancelSuspendedJobPostData = { approver?: string; id: string; requestBody: { [key: string]: unknown; }; resumeId: number; signature: string; workspace: string; }; export type CancelSuspendedJobPostResponse = string; export type GetSuspendedJobFlowData = { approver?: string; id: string; resumeId: number; signature: string; workspace: string; }; export type GetSuspendedJobFlowResponse = { job: Job; approvers: Array<{ resume_id: number; approver: string; }>; /** * Share-read-link token for the parent flow. An authenticated workspace member can append it as a `view_token` query param on the run page to read a flow they don't otherwise have access to. */ view_token?: string; }; export type ListExtendedJobsData = { /** * allow wildcards (*) in the filter of label, tag, worker */ allowWildcards?: boolean; /** * get jobs from all workspaces (only valid if request come from the `admins` workspace) */ allWorkspaces?: boolean; /** * filter on jobs containing those args as a json subset (@> in postgres) */ args?: string; /** * filter on started after (exclusive) timestamp */ completedAfter?: string; /** * filter on started before (inclusive) timestamp */ completedBefore?: string; concurrencyKey?: string; /** * filter on jobs created after X for jobs in the queue only */ createdAfterQueue?: string; /** * filter on jobs created before X for jobs in the queue only */ createdBeforeQueue?: string; /** * filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') */ createdBy?: string; /** * has null parent */ hasNullParent?: boolean; /** * is the job a flow step */ isFlowStep?: boolean; /** * is not a scheduled job */ isNotSchedule?: boolean; /** * is the job skipped */ isSkipped?: boolean; /** * filter by job kind. Supports comma-separated list of values ('preview', 'script', 'dependencies', 'flow') and negation by prefixing all values with '!' (e.g. '!preview,!dependencies') */ jobKinds?: string; /** * filter by exact matching job label. Supports comma-separated list (e.g. 'deploy,release') and negation by prefixing all values with '!' (e.g. '!deploy,!release') */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * filter on whether a failure has been marked as handled. true keeps only resolved failures, false hides them */ resolved?: boolean; /** * filter on jobs containing those result as a json subset (@> in postgres) */ result?: string; rowLimit?: number; /** * filter on running jobs */ running?: boolean; /** * filter on jobs scheduled_for before now (hence waitinf for a worker) */ scheduledForBeforeNow?: boolean; /** * mask to filter by schedule path */ schedulePath?: string; /** * mask to filter exact matching path */ scriptHash?: string; /** * filter by exact matching script path. Supports comma-separated list (e.g. 'f/script1,f/script2') and negation by prefixing all values with '!' (e.g. '!f/script1,!f/script2') */ scriptPathExact?: string; /** * filter by script path prefix. Supports comma-separated list (e.g. 'f/folder1,f/folder2') and negation by prefixing all values with '!' (e.g. '!f/folder1,!f/folder2') */ scriptPathStart?: string; /** * filter on started after (exclusive) timestamp */ startedAfter?: string; /** * filter on started before (inclusive) timestamp */ startedBefore?: string; /** * filter on the exact completed job status. Unlike `success=true` (which also matches `skipped`), `status=success` matches only `success`. */ status?: 'success' | 'failure' | 'canceled' | 'skipped'; /** * filter on successful jobs */ success?: boolean; /** * filter by tag/worker group. Supports comma-separated list (e.g. 'gpu,highmem') and negation by prefixing all values with '!' (e.g. '!gpu,!highmem') */ tag?: string; /** * filter by trigger kind. Supports comma-separated list (e.g. 'schedule,webhook') and negation by prefixing all values with '!' (e.g. '!schedule,!webhook') */ triggerKind?: string; workspace: string; }; export type ListExtendedJobsResponse = ExtendedJobs; export type GetDbtResumableData = { /** * The job whose script and principal decide the saved failure */ id: string; workspace: string; }; export type GetDbtResumableResponse = string | null; export type GetDbtResumableForScriptData = { path: string; workspace: string; }; export type GetDbtResumableForScriptResponse = string | null; export type GetDbtRunGraphData = { /** * Filter by asset kinds (comma-separated list) */ assetKinds?: string; /** * Fallback only, for a job that names no deployed script — a preview or a flow. For a script job the version comes from the job row itself, so this is ignored: which deploy's models, SQL and `ref()` lineage are shown is not the caller's to choose. * */ dbtScriptHash?: string; /** * Scope the graph to runnables in a single folder */ folder?: string; /** * The job whose graph to render */ id: string; workspace: string; }; export type GetDbtRunGraphResponse = AssetGraph; export type GetDbtRunColumnLineageData = { /** * The `dbt://` relations whose lineage to return. Repeated, once per relation, and answered as one union. At least one, and at most 1000 — a request naming none, or more than that, is refused rather than answered with an empty component. * */ assetPath: Array<(string)>; /** * The job whose graph the lineage is read from */ id: string; workspace: string; }; export type GetDbtRunColumnLineageResponse = DbtColumnLineage; export type GetRunProgressData = { /** * The job whose per-relation progress to read */ id: string; workspace: string; }; export type GetRunProgressResponse = Array; export type ListRunAssetsData = { /** * The job whose runtime assets to read */ id: string; workspace: string; }; export type ListRunAssetsResponse = { /** * whether the run touched more assets than are listed */ truncated: boolean; assets: Array<{ path: string; kind: AssetKind; access_type?: AssetUsageAccessType; }>; }; export type ListFlowConversationsData = { /** * filter conversations by flow path */ flowPath?: string; /** * which conversations to list - the flow editor's test chats, the deployed flow's own (the default), or both */ kind?: 'test' | 'deployed' | 'all'; /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; export type ListFlowConversationsResponse = Array; export type UpdateFlowConversationData = { /** * conversation id */ conversationId: string; requestBody: { /** * the chat's name */ title: string; }; workspace: string; }; export type UpdateFlowConversationResponse = string; export type DeleteFlowConversationData = { /** * conversation id */ conversationId: string; workspace: string; }; export type DeleteFlowConversationResponse = string; export type ListConversationMessagesData = { /** * Message sequence cursor to fetch only the messages after that cursor */ afterSeq?: number; /** * conversation id */ conversationId: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; export type ListConversationMessagesResponse = Array; export type ListEvalDatasetsData = { workspace: string; }; export type ListEvalDatasetsResponse = Array; export type CreateEvalDatasetData = { /** * new eval dataset */ requestBody: { path: string; summary?: string; scorers?: Array; /** * The cases to create the dataset holding, so one can be assembled in a single act rather than created empty and filled in afterwards. */ cases?: Array; }; workspace: string; }; export type CreateEvalDatasetResponse = string; export type GetEvalDatasetData = { path: string; workspace: string; }; export type GetEvalDatasetResponse = EvalDataset; export type UpdateEvalDatasetData = { path: string; /** * updated eval dataset */ requestBody: { /** * Renames the dataset. Its cases and experiments follow through the foreign keys, so a rename keeps the history it already has. * */ path?: string; /** * Left out to keep the stored summary; sent as "" to clear it. */ summary?: string; /** * Left out to keep the dataset's columns as they are; sent to replace them wholesale. * */ scorers?: Array; /** * The cases as they should stand afterwards: all of them, each carrying its id if the dataset already has it. Sent with the rest of an edit so that a rename the dataset refuses refuses the case edits with it. * */ cases?: Array; }; workspace: string; }; export type UpdateEvalDatasetResponse = string; export type DeleteEvalDatasetData = { path: string; workspace: string; }; export type DeleteEvalDatasetResponse = string; export type ListEvalCasesData = { /** * which page to return (start at 1, default 1) */ page?: number; path: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; export type ListEvalCasesResponse = { cases: Array; }; export type EvalSubjectStateData = { path: string; workspace: string; }; export type EvalSubjectStateResponse = { version?: number; }; export type EvalRunPayloadData = { /** * The flow job that answered the case. */ jobId: string; workspace: string; }; export type EvalRunPayloadResponse = { /** * The case, the answer, and every tool call the agent made. */ run: { [key: string]: unknown; }; /** * The same run as a judge agent is shown it. */ rendered: string; }; export type ScorerDefaultsData = { workspace: string; }; export type ScorerDefaultsResponse = { /** * The system prompt a judge agent is created with. */ judge_prompt: string; script_template: string; }; export type RecentScorersData = { /** * only scorers of this kind */ kind?: 'script' | 'agent'; workspace: string; }; export type RecentScorersResponse = Array<(Scorer & { /** * The dataset it is a column of. */ dataset: string; })>; export type RunExperimentData = { /** * what to run */ requestBody: { dataset: string; subject: EvalSubject; }; workspace: string; }; export type RunExperimentResponse = string; export type CollectExperimentData = { id: string; workspace: string; }; export type CollectExperimentResponse = number; export type ListAllExperimentsData = { /** * Restrict to one agent's runs, which is what makes the list a history rather than a log. Runs of what is deployed, of a past version, and of the edits waiting on top are all that agent's, so this does not discriminate by kind. * */ subjectPath?: string; workspace: string; }; export type ListAllExperimentsResponse = Array; export type ExperimentResultsData = { /** * The experiment every column is compared against. A delta is only computed between two scores of the same scorer id, and a column the baseline was never scored with reports it rather than showing a difference. * */ baseline?: string; /** * the experiment to read */ id: string; path: string; workspace: string; }; export type ExperimentResultsResponse = { experiment: EvalExperiment; baseline?: EvalExperiment; /** * The columns, which belong to the dataset rather than the experiment. */ scorers: Array; rows: Array; means: Array; /** * Cells scoring lower than the baseline, across every column. */ regressed: number; /** * The version the subject is on now. A row that ran against an earlier one describes an agent that no longer exists. * */ subject_current_version?: number; /** * What the agent hashes to as deployed. A run of unsaved edits carrying this hash ran exactly what is deployed now — the edits were saved — so it is a run of that version rather than of edits. * */ subject_deployed_hash?: string; }; export type ListPathAutocompletePathsData = { /** * bypass the server-side cache and re-query the DB, refreshing the * cache. Used right after a deploy so the new path appears immediately. * */ force?: boolean; workspace: string; }; export type ListPathAutocompletePathsResponse = { paths: Array<(string)>; }; export type ListRawAppsData = { /** * filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') */ createdBy?: string; /** * When true, append per-user draft rows whose path has no * deployed counterpart. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. Gated to * non-operators + page 0 + no narrowing filters on the backend so * picker callers stay deployed-only and pagination stays clean. * */ includeDraftOnly?: boolean; /** * Filter by label */ label?: string; /** * order by desc order (default true) */ orderDesc?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * mask to filter exact matching path */ pathExact?: string; /** * mask to filter matching starting path */ pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * (default false) * show only the starred items * */ starredOnly?: boolean; workspace: string; }; export type ListRawAppsResponse = Array; export type RecordAiUsageData = { requestBody: { events: Array; }; workspace: string; }; export type RecordAiUsageResponse = void; export type ListAiUsageData = { days?: number; groupBy?: 'day' | 'user' | 'model'; /** * workspace-wide usage (admin only) or the calling user's own */ scope?: 'workspace' | 'self'; workspace: string; }; export type ListAiUsageResponse = { buckets: Array; /** * more buckets matched than were returned, so summing them under-reports */ truncated: boolean; }; export type ListAiSessionBackupsData = { workspace: string; }; export type ListAiSessionBackupsResponse = { enabled: boolean; /** * names the storage answered from; sync state recorded against another one is void */ storage_id?: string; /** * bumped by every workspace key rotation; sync state recorded under another one is void */ backup_generation?: number; /** * the storage answered from is the instance object store, standing in for a workspace without storage of its own; a removal owed to it is retired by any answer from the workspace's own storage */ fallback?: boolean; /** * the newest 500 at most */ sessions: Array; /** * the user has more sessions than the answer names */ truncated?: boolean; }; export type PullAiSessionBackupsData = { requestBody: { ids: Array<(string)>; resume?: AISessionBackupCursor; }; workspace: string; }; export type PullAiSessionBackupsResponse = { enabled: boolean; storage_id?: string; backup_generation?: number; fallback?: boolean; sessions: Array; deferred: Array<(string)>; }; export type PushAiSessionBackupsData = { requestBody: { /** * the email the push was prepared for; refused with a 409 when it is not the caller's */ owner: string; sessions?: Array; removed?: Array<(string)>; }; workspace: string; }; export type PushAiSessionBackupsResponse = { enabled: boolean; storage_id?: string; backup_generation?: number; fallback?: boolean; results: Array<{ id: string; error?: string; /** * nothing was written and the session must be pushed whole again; an incremental part found no listed session to ride on (the backup was removed, or a push split over parts is in progress or was abandoned), or a later part of a push split over parts found another push had superseded it */ needs_whole?: boolean; }>; }; export type ShareAiArtifactData = { requestBody: { /** * the artifact's id in the author's session */ artifact_id: string; name: string; kind: 'md' | 'html'; version: number; content: string; }; workspace: string; }; export type ShareAiArtifactResponse = SharedAiArtifactInfo; export type GetAiArtifactShareStatusData = { artifactId: string; workspace: string; }; export type GetAiArtifactShareStatusResponse = { retention_secs: number; share?: SharedAiArtifactInfo; }; export type GetSharedAiArtifactData = { id: string; workspace: string; }; export type GetSharedAiArtifactResponse = SharedAiArtifactInfo & { content: string; /** * whether the caller authored the share or is a workspace admin */ can_unshare: boolean; }; export type UnshareAiArtifactData = { id: string; workspace: string; }; export type UnshareAiArtifactResponse = string; export type ResumeSuspendedTriggerJobsData = { /** * Optional list of job IDs to reassign */ requestBody?: { /** * Optional list of specific job UUIDs to reassign. If not provided, all suspended jobs for the trigger will be reassigned. */ job_ids?: Array<(string)>; }; /** * The kind of trigger */ triggerKind: JobTriggerKind; /** * The path of the trigger (can contain forward slashes) */ triggerPath: string; workspace: string; }; export type ResumeSuspendedTriggerJobsResponse = string; export type CancelSuspendedTriggerJobsData = { /** * Optional list of job IDs to cancel */ requestBody?: { /** * Optional list of specific job UUIDs to cancel. If not provided, all suspended jobs for the trigger will be canceled. */ job_ids?: Array<(string)>; }; /** * The kind of trigger */ triggerKind: JobTriggerKind; /** * The path of the trigger (can contain forward slashes) */ triggerPath: string; workspace: string; }; export type CancelSuspendedTriggerJobsResponse = string; export type ListTriggerHistoryData = { /** * which page to return (start at 1, default 1) */ page?: number; /** * only return the history of the trigger at this path */ path?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * 'schedule' or a trigger type (http, kafka, ...) */ triggerKind?: string; workspace: string; }; export type ListTriggerHistoryResponse = Array; export type PreviewScheduleData = { /** * schedule */ requestBody: { schedule: string; timezone: string; cron_version?: string; }; }; export type PreviewScheduleResponse = Array<(string)>; export type CreateScheduleData = { /** * new schedule */ requestBody: NewSchedule; workspace: string; }; export type CreateScheduleResponse = string; export type UpdateScheduleData = { path: string; /** * updated schedule */ requestBody: EditSchedule; workspace: string; }; export type UpdateScheduleResponse = string; export type SetScheduleEnabledData = { path: string; /** * updated schedule enable */ requestBody: { enabled: boolean; /** * Bypass the parent-state conflict warning when enabling a schedule in a fork whose parent has the same path enabled. * */ force?: boolean; }; workspace: string; }; export type SetScheduleEnabledResponse = string; export type DeleteScheduleData = { path: string; workspace: string; }; export type DeleteScheduleResponse = string; export type GetScheduleData = { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; workspace: string; }; export type GetScheduleResponse = Schedule & UserDraftOverlay; export type ExistsScheduleData = { path: string; workspace: string; }; export type ExistsScheduleResponse = boolean; export type ListSchedulesData = { /** * filter on jobs containing those args as a json subset (@> in postgres) */ args?: string; /** * broad search across multiple fields (case-insensitive substring match) */ broadFilter?: string; /** * pattern match filter for description field (case-insensitive) */ description?: string; /** * When true, append per-user draft schedules whose path has * no deployed schedule. Synthesized rows carry * `draft_only: true`. * */ includeDraftOnly?: boolean; /** * filter schedules by whether they target a flow */ isFlow?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * filter by path (script path) */ path?: string; /** * filter schedules by path prefix */ pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * exact match on the schedule's path */ schedulePath?: string; /** * pattern match filter for summary field (case-insensitive) */ summary?: string; workspace: string; }; export type ListSchedulesResponse = Array; export type ListSchedulesWithJobsData = { /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; export type ListSchedulesWithJobsResponse = Array; export type SetDefaultErrorOrRecoveryHandlerData = { /** * Handler description */ requestBody: { handler_type: 'error' | 'recovery' | 'success'; override_existing: boolean; path?: string; extra_args?: { [key: string]: unknown; }; number_of_occurence?: number; number_of_occurence_exact?: boolean; workspace_handler_muted?: boolean; }; workspace: string; }; export type SetDefaultErrorOrRecoveryHandlerResponse = unknown; export type GenerateOpenapiSpecData = { /** * openapi spec info and url */ requestBody?: GenerateOpenapiSpec; workspace: string; }; export type GenerateOpenapiSpecResponse = string; export type DownloadOpenapiSpecData = { /** * openapi spec info and url */ requestBody?: GenerateOpenapiSpec; workspace: string; }; export type DownloadOpenapiSpecResponse = (Blob | File); export type CreateHttpTriggersData = { /** * new http trigger */ requestBody: Array; workspace: string; }; export type CreateHttpTriggersResponse = string; export type CreateHttpTriggerData = { /** * new http trigger */ requestBody: NewHttpTrigger; workspace: string; }; export type CreateHttpTriggerResponse = string; export type UpdateHttpTriggerData = { path: string; /** * updated trigger */ requestBody: EditHttpTrigger; workspace: string; }; export type UpdateHttpTriggerResponse = string; export type DeleteHttpTriggerData = { path: string; workspace: string; }; export type DeleteHttpTriggerResponse = string; export type GetHttpTriggerData = { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; workspace: string; }; export type GetHttpTriggerResponse = HttpTrigger & UserDraftOverlay; export type ListHttpTriggersData = { /** * When true, append per-user draft rows whose path has no * deployed counterpart. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. Gated to * non-operators + page 0 + no narrowing filters on the backend so * picker callers stay deployed-only and pagination stays clean. * */ includeDraftOnly?: boolean; isFlow?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * filter by path */ path?: string; pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; export type ListHttpTriggersResponse = Array; export type ExistsHttpTriggerData = { path: string; workspace: string; }; export type ExistsHttpTriggerResponse = boolean; export type ExistsRouteData = { /** * route exists request */ requestBody: { route_path: string; http_method: HttpMethod; trigger_path?: string; workspaced_route?: boolean; }; workspace: string; }; export type ExistsRouteResponse = boolean; export type SetHttpTriggerModeData = { path: string; requestBody: { mode: TriggerMode; /** * Bypass the parent-state conflict warning when enabling a trigger in a fork whose parent has the same path enabled. * */ force?: boolean; }; workspace: string; }; export type SetHttpTriggerModeResponse = string; export type CreateWebsocketTriggerData = { /** * new websocket trigger */ requestBody: NewWebsocketTrigger; workspace: string; }; export type CreateWebsocketTriggerResponse = string; export type UpdateWebsocketTriggerData = { path: string; /** * updated trigger */ requestBody: EditWebsocketTrigger; workspace: string; }; export type UpdateWebsocketTriggerResponse = string; export type DeleteWebsocketTriggerData = { path: string; workspace: string; }; export type DeleteWebsocketTriggerResponse = string; export type GetWebsocketTriggerData = { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; workspace: string; }; export type GetWebsocketTriggerResponse = WebsocketTrigger & UserDraftOverlay; export type ListWebsocketTriggersData = { /** * When true, append per-user draft rows whose path has no * deployed counterpart. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. Gated to * non-operators + page 0 + no narrowing filters on the backend so * picker callers stay deployed-only and pagination stays clean. * */ includeDraftOnly?: boolean; isFlow?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * filter by path */ path?: string; pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; export type ListWebsocketTriggersResponse = Array; export type ExistsWebsocketTriggerData = { path: string; workspace: string; }; export type ExistsWebsocketTriggerResponse = boolean; export type SetWebsocketTriggerModeData = { path: string; /** * updated websocket trigger enable */ requestBody: { mode: TriggerMode; /** * Bypass the parent-state conflict warning when enabling a trigger in a fork whose parent has the same path enabled. * */ force?: boolean; }; workspace: string; }; export type SetWebsocketTriggerModeResponse = string; export type TestWebsocketConnectionData = { /** * test websocket connection */ requestBody: { url: string; url_runnable_args?: ScriptArgs; can_return_message: boolean; }; workspace: string; }; export type TestWebsocketConnectionResponse = string; export type CreateKafkaTriggerData = { /** * new kafka trigger */ requestBody: NewKafkaTrigger; workspace: string; }; export type CreateKafkaTriggerResponse = string; export type UpdateKafkaTriggerData = { path: string; /** * updated trigger */ requestBody: EditKafkaTrigger; workspace: string; }; export type UpdateKafkaTriggerResponse = string; export type DeleteKafkaTriggerData = { path: string; workspace: string; }; export type DeleteKafkaTriggerResponse = string; export type GetKafkaTriggerData = { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; workspace: string; }; export type GetKafkaTriggerResponse = KafkaTrigger & UserDraftOverlay; export type ListKafkaTriggersData = { /** * When true, append per-user draft rows whose path has no * deployed counterpart. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. Gated to * non-operators + page 0 + no narrowing filters on the backend so * picker callers stay deployed-only and pagination stays clean. * */ includeDraftOnly?: boolean; isFlow?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * filter by path */ path?: string; pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; export type ListKafkaTriggersResponse = Array; export type ExistsKafkaTriggerData = { path: string; workspace: string; }; export type ExistsKafkaTriggerResponse = boolean; export type SetKafkaTriggerModeData = { path: string; /** * updated kafka trigger enable */ requestBody: { mode: TriggerMode; /** * Bypass the parent-state conflict warning when enabling a trigger in a fork whose parent has the same path enabled. * */ force?: boolean; }; workspace: string; }; export type SetKafkaTriggerModeResponse = string; export type TestKafkaConnectionData = { /** * test kafka connection */ requestBody: { connection: { [key: string]: unknown; }; }; workspace: string; }; export type TestKafkaConnectionResponse = string; export type ResetKafkaOffsetsData = { path: string; workspace: string; }; export type ResetKafkaOffsetsResponse = unknown; export type CommitKafkaOffsetsData = { path: string; /** * offsets to commit */ requestBody: { topic: string; partition: number; offset: number; }; workspace: string; }; export type CommitKafkaOffsetsResponse = unknown; export type CreateNatsTriggerData = { /** * new nats trigger */ requestBody: NewNatsTrigger; workspace: string; }; export type CreateNatsTriggerResponse = string; export type UpdateNatsTriggerData = { path: string; /** * updated trigger */ requestBody: EditNatsTrigger; workspace: string; }; export type UpdateNatsTriggerResponse = string; export type DeleteNatsTriggerData = { path: string; workspace: string; }; export type DeleteNatsTriggerResponse = string; export type GetNatsTriggerData = { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; workspace: string; }; export type GetNatsTriggerResponse = NatsTrigger & UserDraftOverlay; export type ListNatsTriggersData = { /** * When true, append per-user draft rows whose path has no * deployed counterpart. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. Gated to * non-operators + page 0 + no narrowing filters on the backend so * picker callers stay deployed-only and pagination stays clean. * */ includeDraftOnly?: boolean; isFlow?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * filter by path */ path?: string; pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; export type ListNatsTriggersResponse = Array; export type ExistsNatsTriggerData = { path: string; workspace: string; }; export type ExistsNatsTriggerResponse = boolean; export type SetNatsTriggerModeData = { path: string; /** * updated nats trigger enable */ requestBody: { mode: TriggerMode; /** * Bypass the parent-state conflict warning when enabling a trigger in a fork whose parent has the same path enabled. * */ force?: boolean; }; workspace: string; }; export type SetNatsTriggerModeResponse = string; export type TestNatsConnectionData = { /** * test nats connection */ requestBody: { connection: { [key: string]: unknown; }; }; workspace: string; }; export type TestNatsConnectionResponse = string; export type CreateSqsTriggerData = { /** * new sqs trigger */ requestBody: NewSqsTrigger; workspace: string; }; export type CreateSqsTriggerResponse = string; export type UpdateSqsTriggerData = { path: string; /** * updated trigger */ requestBody: EditSqsTrigger; workspace: string; }; export type UpdateSqsTriggerResponse = string; export type DeleteSqsTriggerData = { path: string; workspace: string; }; export type DeleteSqsTriggerResponse = string; export type GetSqsTriggerData = { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; workspace: string; }; export type GetSqsTriggerResponse = SqsTrigger & UserDraftOverlay; export type ListSqsTriggersData = { /** * When true, append per-user draft rows whose path has no * deployed counterpart. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. Gated to * non-operators + page 0 + no narrowing filters on the backend so * picker callers stay deployed-only and pagination stays clean. * */ includeDraftOnly?: boolean; isFlow?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * filter by path */ path?: string; pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; export type ListSqsTriggersResponse = Array; export type ExistsSqsTriggerData = { path: string; workspace: string; }; export type ExistsSqsTriggerResponse = boolean; export type SetSqsTriggerModeData = { path: string; /** * updated sqs trigger enable */ requestBody: { mode: TriggerMode; /** * Bypass the parent-state conflict warning when enabling a trigger in a fork whose parent has the same path enabled. * */ force?: boolean; }; workspace: string; }; export type SetSqsTriggerModeResponse = string; export type TestSqsConnectionData = { /** * test sqs connection */ requestBody: { connection: { [key: string]: unknown; }; }; workspace: string; }; export type TestSqsConnectionResponse = string; export type ListNativeTriggerServicesData = { workspace: string; }; export type ListNativeTriggerServicesResponse = Array; export type CheckIfNativeTriggersServiceExistsData = { serviceName: NativeServiceName; workspace: string; }; export type CheckIfNativeTriggersServiceExistsResponse = boolean; export type CreateNativeTriggerServiceData = { /** * new native trigger service */ requestBody: WorkspaceOAuthConfig; serviceName: NativeServiceName; workspace: string; }; export type CreateNativeTriggerServiceResponse = string; export type GenerateNativeTriggerServiceConnectUrlData = { /** * redirect_uri */ requestBody: RedirectUri; serviceName: NativeServiceName; workspace: string; }; export type GenerateNativeTriggerServiceConnectUrlResponse = string; export type CheckInstanceSharingAvailableData = { serviceName: NativeServiceName; workspace: string; }; export type CheckInstanceSharingAvailableResponse = boolean; export type GenerateInstanceConnectUrlData = { /** * redirect_uri */ requestBody: RedirectUri; serviceName: NativeServiceName; workspace: string; }; export type GenerateInstanceConnectUrlResponse = string; export type DeleteNativeTriggerServiceData = { serviceName: NativeServiceName; workspace: string; }; export type DeleteNativeTriggerServiceResponse = string; export type NativeTriggerServiceCallbackData = { /** * OAuth callback data */ requestBody: { code: string; state: string; redirect_uri: string; resource_path?: string; }; serviceName: NativeServiceName; workspace: string; }; export type NativeTriggerServiceCallbackResponse = string; export type CreateNativeTriggerData = { /** * new native trigger configuration */ requestBody: NativeTriggerData; serviceName: NativeServiceName; workspace: string; }; export type CreateNativeTriggerResponse = CreateTriggerResponse; export type UpdateNativeTriggerData = { /** * The external ID of the trigger from the external service */ externalId: string; /** * updated native trigger configuration */ requestBody: NativeTriggerData; serviceName: NativeServiceName; workspace: string; }; export type UpdateNativeTriggerResponse = string; export type GetNativeTriggerData = { /** * The external ID of the trigger from the external service */ externalId: string; serviceName: NativeServiceName; workspace: string; }; export type GetNativeTriggerResponse = NativeTriggerWithExternal; export type DeleteNativeTriggerData = { /** * The external ID of the trigger from the external service */ externalId: string; serviceName: NativeServiceName; workspace: string; }; export type DeleteNativeTriggerResponse = string; export type SetNativeTriggerEnabledData = { /** * The external ID of the trigger from the external service */ externalId: string; /** * updated enabled state */ requestBody: { enabled: boolean; }; serviceName: NativeServiceName; workspace: string; }; export type SetNativeTriggerEnabledResponse = string; export type ListNativeTriggersData = { /** * When true, append per-user draft rows whose path has no * deployed counterpart. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. Gated to * non-operators + page 0 + no narrowing filters on the backend so * picker callers stay deployed-only and pagination stays clean. * */ includeDraftOnly?: boolean; /** * filter by is_flow */ isFlow?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * filter by script path */ path?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; serviceName: NativeServiceName; workspace: string; }; export type ListNativeTriggersResponse = Array; export type ExistsNativeTriggerData = { /** * The external ID of the trigger from the external service */ externalId: string; serviceName: NativeServiceName; workspace: string; }; export type ExistsNativeTriggerResponse = boolean; export type SyncNativeTriggersData = { serviceName: NativeServiceName; workspace: string; }; export type SyncNativeTriggersResponse = unknown; export type ListNextCloudEventsData = { workspace: string; }; export type ListNextCloudEventsResponse = Array; export type ListGoogleCalendarsData = { workspace: string; }; export type ListGoogleCalendarsResponse = Array; export type ListGoogleDriveFilesData = { /** * token for next page of results */ pageToken?: string; /** * folder ID to list children of */ parentId?: string; /** * search query to filter files by name */ q?: string; /** * if true, list files shared with the user */ sharedWithMe?: boolean; workspace: string; }; export type ListGoogleDriveFilesResponse = GoogleDriveFilesResponse; export type ListGoogleSharedDrivesData = { workspace: string; }; export type ListGoogleSharedDrivesResponse = Array; export type ListGithubReposData = { workspace: string; }; export type ListGithubReposResponse = Array; export type NativeTriggerWebhookData = { /** * The internal database ID of the trigger */ internalId: number; /** * webhook payload from external service */ requestBody?: { [key: string]: unknown; }; serviceName: NativeServiceName; workspaceId: string; }; export type NativeTriggerWebhookResponse = string; export type CreateMqttTriggerData = { /** * new mqtt trigger */ requestBody: NewMqttTrigger; workspace: string; }; export type CreateMqttTriggerResponse = string; export type UpdateMqttTriggerData = { path: string; /** * updated trigger */ requestBody: EditMqttTrigger; workspace: string; }; export type UpdateMqttTriggerResponse = string; export type DeleteMqttTriggerData = { path: string; workspace: string; }; export type DeleteMqttTriggerResponse = string; export type GetMqttTriggerData = { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; workspace: string; }; export type GetMqttTriggerResponse = MqttTrigger & UserDraftOverlay; export type ListMqttTriggersData = { /** * When true, append per-user draft rows whose path has no * deployed counterpart. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. Gated to * non-operators + page 0 + no narrowing filters on the backend so * picker callers stay deployed-only and pagination stays clean. * */ includeDraftOnly?: boolean; isFlow?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * filter by path */ path?: string; pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; export type ListMqttTriggersResponse = Array; export type ExistsMqttTriggerData = { path: string; workspace: string; }; export type ExistsMqttTriggerResponse = boolean; export type SetMqttTriggerModeData = { path: string; /** * updated mqtt trigger enable */ requestBody: { mode: TriggerMode; /** * Bypass the parent-state conflict warning when enabling a trigger in a fork whose parent has the same path enabled. * */ force?: boolean; }; workspace: string; }; export type SetMqttTriggerModeResponse = string; export type TestMqttConnectionData = { /** * test mqtt connection */ requestBody: { connection: { [key: string]: unknown; }; }; workspace: string; }; export type TestMqttConnectionResponse = string; export type CreateAmqpTriggerData = { /** * new amqp trigger */ requestBody: NewAmqpTrigger; workspace: string; }; export type CreateAmqpTriggerResponse = string; export type UpdateAmqpTriggerData = { path: string; /** * updated trigger */ requestBody: EditAmqpTrigger; workspace: string; }; export type UpdateAmqpTriggerResponse = string; export type DeleteAmqpTriggerData = { path: string; workspace: string; }; export type DeleteAmqpTriggerResponse = string; export type GetAmqpTriggerData = { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; workspace: string; }; export type GetAmqpTriggerResponse = AmqpTrigger & UserDraftOverlay; export type ListAmqpTriggersData = { /** * When true, append per-user draft rows whose path has no * deployed counterpart. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. Gated to * non-operators + page 0 + no narrowing filters on the backend so * picker callers stay deployed-only and pagination stays clean. * */ includeDraftOnly?: boolean; isFlow?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * filter by path */ path?: string; pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; export type ListAmqpTriggersResponse = Array; export type ExistsAmqpTriggerData = { path: string; workspace: string; }; export type ExistsAmqpTriggerResponse = boolean; export type SetAmqpTriggerModeData = { path: string; /** * updated amqp trigger enable */ requestBody: { mode: TriggerMode; /** * Bypass the parent-state conflict warning when enabling a trigger in a fork whose parent has the same path enabled. * */ force?: boolean; }; workspace: string; }; export type SetAmqpTriggerModeResponse = string; export type TestAmqpConnectionData = { /** * test amqp connection */ requestBody: { /** * Path to the AMQP resource containing broker connection configuration */ amqp_resource_path: string; }; workspace: string; }; export type TestAmqpConnectionResponse = string; export type CreateGcpTriggerData = { /** * new gcp trigger */ requestBody: GcpTriggerData; workspace: string; }; export type CreateGcpTriggerResponse = string; export type UpdateGcpTriggerData = { path: string; /** * updated trigger */ requestBody: GcpTriggerData; workspace: string; }; export type UpdateGcpTriggerResponse = string; export type DeleteGcpTriggerData = { path: string; workspace: string; }; export type DeleteGcpTriggerResponse = string; export type GetGcpTriggerData = { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; workspace: string; }; export type GetGcpTriggerResponse = GcpTrigger & UserDraftOverlay; export type ListGcpTriggersData = { /** * When true, append per-user draft rows whose path has no * deployed counterpart. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. Gated to * non-operators + page 0 + no narrowing filters on the backend so * picker callers stay deployed-only and pagination stays clean. * */ includeDraftOnly?: boolean; isFlow?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * filter by path */ path?: string; pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; export type ListGcpTriggersResponse = Array; export type ExistsGcpTriggerData = { path: string; workspace: string; }; export type ExistsGcpTriggerResponse = boolean; export type SetGcpTriggerModeData = { path: string; /** * updated gcp trigger enable */ requestBody: { mode: TriggerMode; /** * Bypass the parent-state conflict warning when enabling a trigger in a fork whose parent has the same path enabled. * */ force?: boolean; }; workspace: string; }; export type SetGcpTriggerModeResponse = string; export type TestGcpConnectionData = { /** * test gcp connection */ requestBody: { connection: { [key: string]: unknown; }; }; workspace: string; }; export type TestGcpConnectionResponse = string; export type DeleteGcpSubscriptionData = { path: string; /** * args to delete subscription from google cloud */ requestBody: DeleteGcpSubscription; workspace: string; }; export type DeleteGcpSubscriptionResponse = string; export type DeleteGcpSubscriptionWithDefaultCredentialsData = { /** * args to delete subscription from google cloud */ requestBody: DeleteGcpSubscription; workspace: string; }; export type DeleteGcpSubscriptionWithDefaultCredentialsResponse = string; export type ListGoogleTopicsData = { path: string; /** * GCP project to list resources from, when it is not the project of the credentials */ projectId?: string; workspace: string; }; export type ListGoogleTopicsResponse = Array<(string)>; export type ListGoogleTopicsWithDefaultCredentialsData = { /** * GCP project to list resources from, when it is not the project of the credentials */ projectId?: string; workspace: string; }; export type ListGoogleTopicsWithDefaultCredentialsResponse = Array<(string)>; export type ListAllTgoogleTopicSubscriptionsData = { path: string; /** * args to get subscription's topic from google cloud */ requestBody: GetAllTopicSubscription; workspace: string; }; export type ListAllTgoogleTopicSubscriptionsResponse = Array<(string)>; export type ListAllTgoogleTopicSubscriptionsWithDefaultCredentialsData = { /** * args to get subscription's topic from google cloud */ requestBody: GetAllTopicSubscription; workspace: string; }; export type ListAllTgoogleTopicSubscriptionsWithDefaultCredentialsResponse = Array<(string)>; export type CreateAzureTriggerData = { requestBody: AzureTriggerData; workspace: string; }; export type CreateAzureTriggerResponse = string; export type UpdateAzureTriggerData = { path: string; requestBody: AzureTriggerData; workspace: string; }; export type UpdateAzureTriggerResponse = string; export type DeleteAzureTriggerData = { path: string; workspace: string; }; export type DeleteAzureTriggerResponse = string; export type GetAzureTriggerData = { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; workspace: string; }; export type GetAzureTriggerResponse = AzureTrigger & UserDraftOverlay; export type ListAzureTriggersData = { /** * When true, append per-user draft rows whose path has no * deployed counterpart. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. Gated to * non-operators + page 0 + no narrowing filters on the backend so * picker callers stay deployed-only and pagination stays clean. * */ includeDraftOnly?: boolean; isFlow?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * filter by exact path */ path?: string; pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; export type ListAzureTriggersResponse = Array; export type ExistsAzureTriggerData = { path: string; workspace: string; }; export type ExistsAzureTriggerResponse = boolean; export type SetAzureTriggerModeData = { path: string; requestBody: { mode: TriggerMode; /** * Bypass the parent-state conflict warning when enabling a trigger in a fork whose parent has the same path enabled. * */ force?: boolean; }; workspace: string; }; export type SetAzureTriggerModeResponse = string; export type TestAzureConnectionData = { requestBody: TestAzureConnection; workspace: string; }; export type TestAzureConnectionResponse = string; export type ListAzureNamespaceTopicsData = { path: string; requestBody: AzureListTopics; workspace: string; }; export type ListAzureNamespaceTopicsResponse = Array<{ [key: string]: unknown; }>; export type ListAzureNamespaceSubscriptionsData = { path: string; requestBody: AzureListSubscriptions; workspace: string; }; export type ListAzureNamespaceSubscriptionsResponse = Array<{ [key: string]: unknown; }>; export type DeleteAzureSubscriptionData = { path: string; requestBody: AzureDeleteSubscription; workspace: string; }; export type DeleteAzureSubscriptionResponse = string; export type ListAzureNamespacesData = { path: string; workspace: string; }; export type ListAzureNamespacesResponse = Array; export type ListAzureBasicTopicsData = { path: string; workspace: string; }; export type ListAzureBasicTopicsResponse = Array; export type GetPostgresVersionData = { path: string; workspace: string; }; export type GetPostgresVersionResponse = string; export type IsValidPostgresConfigurationData = { path: string; workspace: string; }; export type IsValidPostgresConfigurationResponse = boolean; export type CreateTemplateScriptData = { /** * template script */ requestBody: TemplateScript; workspace: string; }; export type CreateTemplateScriptResponse = string; export type GetTemplateScriptData = { id: string; workspace: string; }; export type GetTemplateScriptResponse = string; export type ListPostgresReplicationSlotData = { path: string; workspace: string; }; export type ListPostgresReplicationSlotResponse = Array; export type CreatePostgresReplicationSlotData = { path: string; /** * new slot for postgres */ requestBody: Slot; workspace: string; }; export type CreatePostgresReplicationSlotResponse = string; export type DeletePostgresReplicationSlotData = { path: string; /** * replication slot of postgres */ requestBody: Slot; workspace: string; }; export type DeletePostgresReplicationSlotResponse = string; export type ListPostgresPublicationData = { path: string; workspace: string; }; export type ListPostgresPublicationResponse = Array<(string)>; export type GetPostgresPublicationData = { path: string; /** * The name of the publication */ publication: string; workspace: string; }; export type GetPostgresPublicationResponse = PublicationData; export type CreatePostgresPublicationData = { path: string; /** * The name of the publication */ publication: string; /** * new publication for postgres */ requestBody: PublicationData; workspace: string; }; export type CreatePostgresPublicationResponse = string; export type UpdatePostgresPublicationData = { path: string; /** * The name of the publication */ publication: string; /** * update publication for postgres */ requestBody: PublicationData; workspace: string; }; export type UpdatePostgresPublicationResponse = string; export type DeletePostgresPublicationData = { path: string; /** * The name of the publication */ publication: string; workspace: string; }; export type DeletePostgresPublicationResponse = string; export type CreatePostgresTriggerData = { /** * new postgres trigger */ requestBody: NewPostgresTrigger; workspace: string; }; export type CreatePostgresTriggerResponse = string; export type UpdatePostgresTriggerData = { path: string; /** * updated trigger */ requestBody: EditPostgresTrigger; workspace: string; }; export type UpdatePostgresTriggerResponse = string; export type DeletePostgresTriggerData = { path: string; workspace: string; }; export type DeletePostgresTriggerResponse = string; export type GetPostgresTriggerData = { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; workspace: string; }; export type GetPostgresTriggerResponse = PostgresTrigger & UserDraftOverlay; export type ListPostgresTriggersData = { /** * When true, append per-user draft rows whose path has no * deployed counterpart. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. Gated to * non-operators + page 0 + no narrowing filters on the backend so * picker callers stay deployed-only and pagination stays clean. * */ includeDraftOnly?: boolean; isFlow?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * filter by path */ path?: string; pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; export type ListPostgresTriggersResponse = Array; export type ExistsPostgresTriggerData = { path: string; workspace: string; }; export type ExistsPostgresTriggerResponse = boolean; export type SetPostgresTriggerModeData = { path: string; /** * updated postgres trigger enable */ requestBody: { mode: TriggerMode; /** * Bypass the parent-state conflict warning when enabling a trigger in a fork whose parent has the same path enabled. * */ force?: boolean; }; workspace: string; }; export type SetPostgresTriggerModeResponse = string; export type TestPostgresConnectionData = { /** * test postgres connection */ requestBody: { database: string; }; workspace: string; }; export type TestPostgresConnectionResponse = string; export type CreateEmailTriggerData = { /** * new email trigger */ requestBody: NewEmailTrigger; workspace: string; }; export type CreateEmailTriggerResponse = string; export type UpdateEmailTriggerData = { path: string; /** * updated trigger */ requestBody: EditEmailTrigger; workspace: string; }; export type UpdateEmailTriggerResponse = string; export type DeleteEmailTriggerData = { path: string; workspace: string; }; export type DeleteEmailTriggerResponse = string; export type GetEmailTriggerData = { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; workspace: string; }; export type GetEmailTriggerResponse = EmailTrigger & UserDraftOverlay; export type ListEmailTriggersData = { /** * When true, append per-user draft rows whose path has no * deployed counterpart. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. Gated to * non-operators + page 0 + no narrowing filters on the backend so * picker callers stay deployed-only and pagination stays clean. * */ includeDraftOnly?: boolean; isFlow?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * filter by path */ path?: string; pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; export type ListEmailTriggersResponse = Array; export type ExistsEmailTriggerData = { path: string; workspace: string; }; export type ExistsEmailTriggerResponse = boolean; export type ExistsEmailLocalPartData = { /** * email local part exists request */ requestBody: { local_part: string; workspaced_local_part?: boolean; trigger_path?: string; }; workspace: string; }; export type ExistsEmailLocalPartResponse = boolean; export type SetEmailTriggerModeData = { path: string; requestBody: { mode: TriggerMode; /** * Bypass the parent-state conflict warning when enabling a trigger in a fork whose parent has the same path enabled. * */ force?: boolean; }; workspace: string; }; export type SetEmailTriggerModeResponse = string; export type ListInstanceGroupsResponse = Array; export type ListInstanceGroupsWithWorkspacesResponse = Array; export type GetInstanceGroupData = { name: string; }; export type GetInstanceGroupResponse = InstanceGroupWithWorkspaces; export type CreateInstanceGroupData = { /** * create instance group */ requestBody: { name: string; summary?: string; }; }; export type CreateInstanceGroupResponse = string; export type UpdateInstanceGroupData = { name: string; /** * update instance group */ requestBody: { new_summary: string; /** * Instance-level role for group members. 'superadmin', 'devops', 'user' or empty to clear. */ instance_role?: string | null; }; }; export type UpdateInstanceGroupResponse = string; export type DeleteInstanceGroupData = { name: string; }; export type DeleteInstanceGroupResponse = string; export type AddUserToInstanceGroupData = { name: string; /** * user to add to instance group */ requestBody: { email: string; }; }; export type AddUserToInstanceGroupResponse = string; export type RemoveUserFromInstanceGroupData = { name: string; /** * user to remove from instance group */ requestBody: { email: string; }; }; export type RemoveUserFromInstanceGroupResponse = string; export type ExportInstanceGroupsResponse = Array; export type OverwriteInstanceGroupsData = { /** * overwrite instance groups */ requestBody: Array; }; export type OverwriteInstanceGroupsResponse = string; export type ListGroupsData = { /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; export type ListGroupsResponse = Array; export type ListGroupNamesData = { /** * only list the groups the user is member of (default false) */ onlyMemberOf?: boolean; workspace: string; }; export type ListGroupNamesResponse = Array<(string)>; export type CreateGroupData = { /** * create group */ requestBody: { name: string; summary?: string; }; workspace: string; }; export type CreateGroupResponse = string; export type UpdateGroupData = { name: string; /** * updated group */ requestBody: { summary?: string; }; workspace: string; }; export type UpdateGroupResponse = string; export type DeleteGroupData = { name: string; workspace: string; }; export type DeleteGroupResponse = string; export type GetGroupData = { name: string; workspace: string; }; export type GetGroupResponse = Group; export type AddUserToGroupData = { name: string; /** * added user to group */ requestBody: { username?: string; }; workspace: string; }; export type AddUserToGroupResponse = string; export type RemoveUserToGroupData = { name: string; /** * added user to group */ requestBody: { username?: string; }; workspace: string; }; export type RemoveUserToGroupResponse = string; export type GetGroupPermissionHistoryData = { name: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; export type GetGroupPermissionHistoryResponse = Array<{ id?: number; changed_by?: string; changed_at?: string; change_type?: string; member_affected?: string | null; }>; export type ListFoldersData = { /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; export type ListFoldersResponse = Array; export type ListFolderNamesData = { /** * only list the folders the user is member of (default false) */ onlyMemberOf?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; export type ListFolderNamesResponse = Array<(string)>; export type CreateFolderData = { /** * create folder */ requestBody: { name: string; summary?: string; owners?: Array<(string)>; extra_perms?: unknown; default_permissioned_as?: FolderDefaultPermissionedAs; labels?: Array<(string)>; }; workspace: string; }; export type CreateFolderResponse = string; export type UpdateFolderData = { name: string; /** * update folder */ requestBody: { summary?: string; owners?: Array<(string)>; extra_perms?: unknown; default_permissioned_as?: FolderDefaultPermissionedAs; labels?: Array<(string)>; }; workspace: string; }; export type UpdateFolderResponse = string; export type DeleteFolderData = { name: string; workspace: string; }; export type DeleteFolderResponse = string; export type GetFolderData = { name: string; workspace: string; }; export type GetFolderResponse = Folder; export type ExistsFolderData = { name: string; workspace: string; }; export type ExistsFolderResponse = boolean; export type GetFolderUsageData = { name: string; workspace: string; }; export type GetFolderUsageResponse = { scripts: number; flows: number; apps: number; resources: number; variables: number; schedules: number; }; export type AddOwnerToFolderData = { name: string; /** * owner user to folder */ requestBody: { owner: string; }; workspace: string; }; export type AddOwnerToFolderResponse = string; export type RemoveOwnerToFolderData = { name: string; /** * added owner to folder */ requestBody: { owner: string; write?: boolean; }; workspace: string; }; export type RemoveOwnerToFolderResponse = string; export type GetFolderPermissionHistoryData = { name: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; export type GetFolderPermissionHistoryResponse = Array<{ id?: number; changed_by?: string; changed_at?: string; change_type?: string; affected?: string | null; }>; export type ListWorkerGroupsResponse = Array<{ name: string; config: unknown; }>; export type GetConfigData = { name: string; }; export type GetConfigResponse = Configs; export type UpdateConfigData = { name: string; /** * worker group */ requestBody: unknown; }; export type UpdateConfigResponse = string; export type DeleteConfigData = { name: string; }; export type DeleteConfigResponse = string; export type ListConfigsResponse = Array; export type ListAutoscalingEventsData = { /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workerGroup: string; }; export type ListAutoscalingEventsResponse = Array; export type NativeKubernetesAutoscalingHealthcheckResponse = unknown; export type ListAvailablePythonVersionsResponse = Array<(string)>; export type ListAllWorkspaceDependenciesResponse = Array<{ workspace_id: string; name?: string; language: ScriptLang; }>; export type ListAllDedicatedWithDepsResponse = Array<{ workspace_id: string; path: string; language: ScriptLang; workspace_dep_names: Array<(string)>; }>; export type CreateAgentTokenData = { /** * agent token */ requestBody: { worker_group: string; tags: Array<(string)>; exp: number; }; }; export type CreateAgentTokenResponse = string; export type BlacklistAgentTokenData = { /** * token to blacklist */ requestBody: { /** * The agent token to blacklist */ token: string; /** * Optional expiration date for the blacklist entry */ expires_at?: string; }; }; export type BlacklistAgentTokenResponse = unknown; export type RemoveBlacklistAgentTokenData = { /** * token to remove from blacklist */ requestBody: { /** * The agent token to remove from blacklist */ token: string; }; }; export type RemoveBlacklistAgentTokenResponse = unknown; export type ListBlacklistedAgentTokensData = { /** * Whether to include expired blacklisted tokens */ includeExpired?: boolean; }; export type ListBlacklistedAgentTokensResponse = Array<{ /** * The blacklisted token (without prefix) */ token: string; /** * When the blacklist entry expires */ expires_at: string; /** * When the token was blacklisted */ blacklisted_at: string; /** * Email of the user who blacklisted the token */ blacklisted_by: string; }>; export type GetMinVersionResponse = string; export type GetGranularAclsData = { kind: 'script' | 'group_' | 'resource' | 'schedule' | 'variable' | 'flow' | 'folder' | 'app' | 'raw_app' | 'http_trigger' | 'websocket_trigger' | 'kafka_trigger' | 'nats_trigger' | 'postgres_trigger' | 'mqtt_trigger' | 'amqp_trigger' | 'gcp_trigger' | 'azure_trigger' | 'sqs_trigger' | 'email_trigger' | 'volume'; path: string; workspace: string; }; export type GetGranularAclsResponse = { [key: string]: (boolean); }; export type AddGranularAclsData = { kind: 'script' | 'group_' | 'resource' | 'schedule' | 'variable' | 'flow' | 'folder' | 'app' | 'raw_app' | 'http_trigger' | 'websocket_trigger' | 'kafka_trigger' | 'nats_trigger' | 'postgres_trigger' | 'mqtt_trigger' | 'amqp_trigger' | 'gcp_trigger' | 'azure_trigger' | 'sqs_trigger' | 'email_trigger' | 'volume'; path: string; /** * acl to add */ requestBody: { owner: string; write?: boolean; }; workspace: string; }; export type AddGranularAclsResponse = string; export type RemoveGranularAclsData = { kind: 'script' | 'group_' | 'resource' | 'schedule' | 'variable' | 'flow' | 'folder' | 'app' | 'raw_app' | 'http_trigger' | 'websocket_trigger' | 'kafka_trigger' | 'nats_trigger' | 'postgres_trigger' | 'mqtt_trigger' | 'amqp_trigger' | 'gcp_trigger' | 'azure_trigger' | 'sqs_trigger' | 'email_trigger' | 'volume'; path: string; /** * acl to add */ requestBody: { owner: string; }; workspace: string; }; export type RemoveGranularAclsResponse = string; export type SetCaptureConfigData = { /** * capture config */ requestBody: { trigger_kind: CaptureTriggerKind; path: string; is_flow: boolean; trigger_config?: { [key: string]: unknown; }; }; workspace: string; }; export type SetCaptureConfigResponse = { [key: string]: unknown; }; export type PingCaptureConfigData = { path: string; runnableKind: 'script' | 'flow'; triggerKind: CaptureTriggerKind; workspace: string; }; export type PingCaptureConfigResponse = unknown; export type GetCaptureConfigsData = { path: string; runnableKind: 'script' | 'flow'; workspace: string; }; export type GetCaptureConfigsResponse = Array; export type ListCapturesData = { /** * which page to return (start at 1, default 1) */ page?: number; path: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; runnableKind: 'script' | 'flow'; triggerKind?: CaptureTriggerKind; workspace: string; }; export type ListCapturesResponse = Array; export type MoveCapturesAndConfigsData = { path: string; /** * move captures and configs to a new path */ requestBody: { new_path?: string; }; runnableKind: 'script' | 'flow'; workspace: string; }; export type MoveCapturesAndConfigsResponse = string; export type GetCaptureData = { id: number; workspace: string; }; export type GetCaptureResponse = Capture; export type DeleteCaptureData = { id: number; workspace: string; }; export type DeleteCaptureResponse = unknown; export type StarData = { requestBody?: { path?: string; favorite_kind?: 'flow' | 'app' | 'script' | 'raw_app' | 'asset'; }; workspace: string; }; export type StarResponse = unknown; export type UnstarData = { requestBody?: { path?: string; favorite_kind?: 'flow' | 'app' | 'script' | 'raw_app' | 'asset'; }; workspace: string; }; export type UnstarResponse = unknown; export type GetInputHistoryData = { /** * filter on jobs containing those args as a json subset (@> in postgres) */ args?: string; includePreview?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; runnableId?: string; runnableType?: RunnableType; workspace: string; }; export type GetInputHistoryResponse = Array; export type GetArgsFromHistoryOrSavedInputData = { allowLarge?: boolean; input?: boolean; jobOrInputId: string; workspace: string; }; export type GetArgsFromHistoryOrSavedInputResponse = unknown; export type ListInputsData = { /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; runnableId?: string; runnableType?: RunnableType; workspace: string; }; export type ListInputsResponse = Array; export type CreateInputData = { /** * Input */ requestBody: CreateInput; runnableId?: string; runnableType?: RunnableType; workspace: string; }; export type CreateInputResponse = string; export type UpdateInputData = { /** * UpdateInput */ requestBody: UpdateInput; workspace: string; }; export type UpdateInputResponse = string; export type DeleteInputData = { input: string; workspace: string; }; export type DeleteInputResponse = string; export type DuckdbConnectionSettingsData = { /** * S3 resource to connect to */ requestBody: { s3_resource?: S3Resource; }; workspace: string; }; export type DuckdbConnectionSettingsResponse = { connection_settings_str?: string; }; export type DuckdbConnectionSettingsV2Data = { /** * S3 resource path to use to generate the connection settings. If empty, the S3 resource defined in the workspace settings will be used */ requestBody: { s3_resource_path?: string; }; workspace: string; }; export type DuckdbConnectionSettingsV2Response = { connection_settings_str: string; azure_container_path?: string; }; export type PolarsConnectionSettingsData = { /** * S3 resource to connect to */ requestBody: { s3_resource?: S3Resource; }; workspace: string; }; export type PolarsConnectionSettingsResponse = { endpoint_url: string; key?: string; secret?: string; use_ssl: boolean; cache_regions: boolean; client_kwargs: PolarsClientKwargs; }; export type PolarsConnectionSettingsV2Data = { /** * S3 resource path to use to generate the connection settings. If empty, the S3 resource defined in the workspace settings will be used */ requestBody: { s3_resource_path?: string; }; workspace: string; }; export type PolarsConnectionSettingsV2Response = { s3fs_args: { endpoint_url: string; key?: string; secret?: string; use_ssl: boolean; cache_regions: boolean; client_kwargs: PolarsClientKwargs; }; storage_options: { aws_endpoint_url: string; aws_access_key_id?: string; aws_secret_access_key?: string; aws_region: string; aws_allow_http: string; }; }; export type S3ResourceInfoData = { /** * S3 resource path to use. If empty, the S3 resource defined in the workspace settings will be used */ requestBody: { s3_resource_path?: string; }; workspace: string; }; export type S3ResourceInfoResponse = S3Resource; export type DatasetStorageTestConnectionData = { /** * When set, test the connection of this object storage resource instead of the workspace storage */ s3ResourcePath?: string; storage?: string; workspace: string; }; export type DatasetStorageTestConnectionResponse = unknown; export type GetStorageUsageData = { /** * recount usage by listing the storage instead of returning cached values */ refresh?: boolean; workspace: string; }; export type GetStorageUsageResponse = { total_bytes: number; /** * only present on Community Edition, where workspace storage is capped */ quota_bytes?: number; storages: Array<{ storage: string; bytes: number; computed_at: string; }>; }; export type ListStoredFilesData = { marker?: string; maxKeys: number; prefix?: string; /** * When set, list the files of this object storage resource instead of the workspace storage */ s3ResourcePath?: string; /** * Match keys by path prefix, case-sensitively, on the raw key rather than per path segment (so "a/file1" matches "a/file1000"). Pushed down to the storage provider as a seek; resume with the returned next_marker. */ search?: string; storage?: string; workspace: string; }; export type ListStoredFilesResponse = { next_marker?: string; windmill_large_files: Array; restricted_access?: boolean; }; export type ListStoredFilesPagedData = { /** * Maximum number of folders and files combined */ maxKeys?: number; /** * Opaque token from a previous response, to continue listing the same folder */ pageToken?: string; /** * Folder to list; empty for the bucket root, otherwise must end with '/' */ prefix?: string; /** * When set, list the files of this object storage resource instead of the workspace storage */ s3ResourcePath?: string; storage?: string; workspace: string; }; export type ListStoredFilesPagedResponse = { folders: Array; files: Array; /** * When set, more entries remain at this level */ next_page_token?: string; restricted_access: boolean; }; export type LoadFileMetadataData = { fileKey: string; /** * When set, load the file metadata from this object storage resource instead of the workspace storage */ s3ResourcePath?: string; storage?: string; workspace: string; }; export type LoadFileMetadataResponse = WindmillFileMetadata; export type LoadFilePreviewData = { csvHasHeader?: boolean; csvSeparator?: string; fileKey: string; fileMimeType?: string; fileSizeInBytes?: number; readBytesFrom?: number; readBytesLength?: number; /** * When set, load the file preview from this object storage resource instead of the workspace storage */ s3ResourcePath?: string; storage?: string; workspace: string; }; export type LoadFilePreviewResponse = WindmillFilePreview; export type ListGitRepoFilesData = { marker?: string; maxKeys: number; prefix?: string; storage?: string; workspace: string; }; export type ListGitRepoFilesResponse = { next_marker?: string; windmill_large_files: Array; restricted_access?: boolean; }; export type LoadGitRepoFilePreviewData = { csvHasHeader?: boolean; csvSeparator?: string; fileKey: string; fileMimeType?: string; fileSizeInBytes?: number; readBytesFrom?: number; readBytesLength?: number; storage?: string; workspace: string; }; export type LoadGitRepoFilePreviewResponse = WindmillFilePreview; export type LoadGitRepoFileMetadataData = { fileKey: string; storage?: string; workspace: string; }; export type LoadGitRepoFileMetadataResponse = WindmillFileMetadata; export type CheckS3FolderExistsData = { /** * S3 file key to check (e.g., gitrepos/{workspace_id}/u/user/resource/{commit_hash}) */ fileKey: string; /** * If provided, the folder is only considered to exist when this exact * sentinel file is present under file_key. Lets callers distinguish a * fully populated folder from a partial upload. * */ markerFile?: string; workspace: string; }; export type CheckS3FolderExistsResponse = { /** * Whether the path exists */ exists: boolean; /** * Whether the path is a folder (true) or file (false) */ is_folder: boolean; }; export type LoadParquetPreviewData = { limit?: number; offset?: number; path: string; searchCol?: string; searchTerm?: string; sortCol?: string; sortDesc?: boolean; storage?: string; workspace: string; }; export type LoadParquetPreviewResponse = unknown; export type LoadTableRowCountData = { path: string; searchCol?: string; searchTerm?: string; storage?: string; workspace: string; }; export type LoadTableRowCountResponse = { count?: number; }; export type LoadCsvPreviewData = { csvSeparator?: string; limit?: number; offset?: number; path: string; searchCol?: string; searchTerm?: string; sortCol?: string; sortDesc?: boolean; storage?: string; workspace: string; }; export type LoadCsvPreviewResponse = unknown; export type DeleteS3FileData = { fileKey: string; /** * When set, delete the file from this object storage resource instead of the workspace storage */ s3ResourcePath?: string; storage?: string; workspace: string; }; export type DeleteS3FileResponse = unknown; export type MoveS3FileData = { destFileKey: string; /** * When set, move the file within this object storage resource instead of the workspace storage */ s3ResourcePath?: string; srcFileKey: string; storage?: string; workspace: string; }; export type MoveS3FileResponse = unknown; export type FileUploadData = { contentDisposition?: string; contentType?: string; fileExtension?: string; fileKey?: string; /** * File content */ requestBody: (Blob | File); resourceType?: string; s3ResourcePath?: string; storage?: string; workspace: string; }; export type FileUploadResponse = { file_key: string; }; export type GitRepoViewerFileUploadData = { contentDisposition?: string; contentType?: string; fileExtension?: string; fileKey?: string; /** * File content */ requestBody: (Blob | File); resourceType?: string; s3ResourcePath?: string; storage?: string; workspace: string; }; export type GitRepoViewerFileUploadResponse = { file_key: string; }; export type FileDownloadData = { fileKey: string; resourceType?: string; s3ResourcePath?: string; storage?: string; workspace: string; }; export type FileDownloadResponse = (Blob | File); export type FileDownloadParquetAsCsvData = { fileKey: string; resourceType?: string; s3ResourcePath?: string; workspace: string; }; export type FileDownloadParquetAsCsvResponse = string; export type GetJobMetricsData = { id: string; /** * parameters for statistics retrieval */ requestBody: { timeseries_max_datapoints?: number; from_timestamp?: string; to_timestamp?: string; }; workspace: string; }; export type GetJobMetricsResponse = { metrics_metadata?: Array; scalar_metrics?: Array; timeseries_metrics?: Array; }; export type SetJobProgressData = { id: string; /** * parameters for statistics retrieval */ requestBody: { percent?: number; flow_job_id?: string; }; workspace: string; }; export type SetJobProgressResponse = unknown; export type GetJobProgressData = { id: string; workspace: string; }; export type GetJobProgressResponse = number; export type ListLogFilesData = { /** * filter on created after (exclusive) timestamp */ after?: string; /** * filter on started before (inclusive) timestamp */ before?: string; withError?: boolean; }; export type ListLogFilesResponse = Array<{ hostname: string; mode: string; worker_group?: string; log_ts: string; file_path: string; ok_lines?: number; err_lines?: number; json_fmt: boolean; }>; export type GetLogFileData = { path: string; }; export type GetLogFileResponse = string; export type ListConcurrencyGroupsResponse = Array; export type DeleteConcurrencyGroupData = { concurrencyId: string; }; export type DeleteConcurrencyGroupResponse = unknown; export type GetConcurrencyKeyData = { id: string; }; export type GetConcurrencyKeyResponse = string; export type SearchJobsIndexData = { paginationOffset?: number; searchQuery: string; workspace: string; }; export type SearchJobsIndexResponse = { /** * a list of the terms that couldn't be parsed (and thus ignored) */ query_parse_errors?: Array<(string)>; /** * the jobs that matched the query */ hits?: Array; /** * how many jobs matched in total */ hit_count?: number; /** * Metadata about the index current state */ index_metadata?: { /** * Datetime of the most recently indexed job */ indexed_until?: string; /** * Is the current indexer service being replaced */ lost_lock_ownership?: boolean; /** * Maximum time window in seconds for indexing */ max_index_time_window_secs?: number; }; }; export type SearchLogsIndexData = { hostname: string; maxTs?: string; minTs?: string; mode: string; searchQuery: string; workerGroup?: string; }; export type SearchLogsIndexResponse = { /** * a list of the terms that couldn't be parsed (and thus ignored) */ query_parse_errors?: Array<(string)>; /** * the log lines that matched the query, newest first */ hits?: Array; }; export type CountSearchLogsIndexData = { maxTs?: string; minTs?: string; searchQuery: string; }; export type CountSearchLogsIndexResponse = { /** * a list of the terms that couldn't be parsed (and thus ignored) */ query_parse_errors?: Array<(string)>; /** * count of log lines that matched the query per hostname */ count_per_host?: { [key: string]: unknown; }; }; export type GetIndexDiskStorageSizesResponse = { job_index_disk_size_bytes?: number | null; log_index_disk_size_bytes?: number | null; }; export type ClearIndexData = { idxName: 'JobIndex' | 'ServiceLogIndex'; }; export type ClearIndexResponse = string; export type GetIndexStorageSizesResponse = { job_index?: { disk_size_bytes?: number | null; s3_size_bytes?: number | null; }; service_log_index?: { disk_size_bytes?: number | null; s3_size_bytes?: number | null; }; }; export type GetIndexerStatusResponse = { job_indexer?: { is_alive?: boolean; state?: 'running' | 'stale' | 'never_started'; last_locked_at?: string | null; owner?: string | null; storage?: { disk_size_bytes?: number | null; s3_size_bytes?: number | null; }; }; log_indexer?: { is_alive?: boolean; state?: 'running' | 'stale' | 'never_started'; last_locked_at?: string | null; owner?: string | null; storage?: { disk_size_bytes?: number | null; s3_size_bytes?: number | null; }; }; }; export type ListAssetsData = { /** * Filter by asset kinds (multiple values allowed) */ assetKinds?: string; /** * Filter by asset path (case-insensitive partial match) */ assetPath?: string; /** * broad search across multiple fields (case-insensitive substring match) */ broadFilter?: string; /** * JSONB subset match filter for columns using base64 encoded JSON */ columns?: string; /** * Cursor timestamp for pagination (created_at of last item from previous page) */ cursorCreatedAt?: string; /** * Cursor ID for pagination (id of last item from previous page) */ cursorId?: number; /** * exact path match filter */ path?: string; /** * Number of items per page (max 1000, default 50) */ perPage?: number; /** * Filter by usage path (case-insensitive partial match) */ usagePath?: string; workspace: string; }; export type ListAssetsResponse = { assets: Array<{ path: string; kind: AssetKind; usages: Array<{ path: string; kind: AssetUsageKind; access_type?: AssetUsageAccessType; /** * The columns used (for tables) */ columns?: { [key: string]: AssetUsageAccessType; }; /** * When the asset was detected */ created_at?: string; metadata?: { /** * The path of the script/flow that was run (only present when kind is 'job') */ runnable_path?: string; /** * The kind of job (script, flow, preview, etc.) (only present when kind is 'job') */ job_kind?: string; }; }>; metadata?: { /** * The type of the resource (only present when kind is 'resource') */ resource_type?: string; }; }>; /** * Cursor for the next page (null if no more pages) */ next_cursor?: { /** * Timestamp to use for next page */ created_at?: string; /** * ID to use for next page */ id?: number; } | null; }; export type ListAssetsByUsageData = { /** * list assets by usages */ requestBody: { usages: Array<{ path: string; kind: AssetUsageKind; }>; }; workspace: string; }; export type ListAssetsByUsageResponse = Array>; export type ListFavoriteAssetsData = { workspace: string; }; export type ListFavoriteAssetsResponse = Array<{ /** * The asset path */ path: string; }>; export type GetAssetsGraphData = { /** * Filter by asset kinds (comma-separated list) */ assetKinds?: string; /** * Render the dbt half of the graph as one version of a dbt script had it, rather than as the currently deployed one. Given this, `folder` no longer scopes the dbt nodes: the pinned version's own models and lineage are the answer, including models a later deploy removed. * */ dbtScriptHash?: string; /** * Scope the graph to runnables in a single folder */ folder?: string; workspace: string; }; export type GetAssetsGraphResponse = AssetGraph; export type GetDbtColumnLineageData = { /** * The `dbt://` relations whose lineage to return. Repeated, once per relation, and answered as one union. At least one, and at most 1000 — a request naming none, or more than that, is refused rather than answered with an empty component. * */ assetPath: Array<(string)>; /** * The deployed version a view is drawing, when it is drawing one — the dbt editor, which shows a single project as of a single deploy. A version-pinned answer is that version's project alone, the same as a job-pinned one, and only the unpinned answer crosses projects: a pin says which stored graph is on screen, and another project's live graph is not part of it. * A run's or an editor buffer's own graph is not reachable here: that pins to a job, and costs the job-read gate — see `jobs/dbt_column_lineage/{id}`. * */ dbtScriptHash?: string; workspace: string; }; export type GetDbtColumnLineageResponse = DbtColumnLineage; export type ListWorkspaceMacrosData = { workspace: string; }; export type ListWorkspaceMacrosResponse = Array<{ name: string; /** * verbatim parameter list */ params: string; /** * verbatim body after AS [TABLE] */ body: string; is_table: boolean; /** * path of the `// macros` library script */ provider_path: string; }>; export type ListPipelineFoldersData = { workspace: string; }; export type ListPipelineFoldersResponse = Array<{ /** * The folder name (without the `f/` prefix) */ folder: string; /** * Number of pipeline-member scripts in the folder */ script_count: number; }>; export type ListAssetPartitionsData = { /** * The materialized ducklake asset path (`/
`) */ path: string; workspace: string; }; export type ListAssetPartitionsResponse = Array; export type ListAssetPartitionsInRangeData = { /** * Inclusive range start (YYYY-MM-DD), local to the producer's partition tz */ from: string; /** * The materialized ducklake asset path (`/
`) */ path: string; /** * Inclusive range end (YYYY-MM-DD), local to the producer's partition tz */ to: string; workspace: string; }; export type ListAssetPartitionsInRangeResponse = PartitionsInRange; export type ListAssetSchemasData = { /** * The materialized ducklake asset path (`/
`) */ path: string; workspace: string; }; export type ListAssetSchemasResponse = Array; export type ListVolumesData = { workspace: string; }; export type ListVolumesResponse = Array; export type GetVolumeStorageData = { workspace: string; }; export type GetVolumeStorageResponse = string | null; export type CreateVolumeData = { requestBody: { name: string; }; workspace: string; }; export type CreateVolumeResponse = string; export type DeleteVolumeData = { name: string; workspace: string; }; export type DeleteVolumeResponse = string; export type ListMcpToolsData = { workspace: string; }; export type ListMcpToolsResponse = Array; export type DiscoverMcpOauthData = { requestBody: { /** * URL of the MCP server to discover OAuth metadata from */ mcp_server_url: string; }; }; export type DiscoverMcpOauthResponse = { scopes_supported?: Array<(string)>; authorization_endpoint?: string; token_endpoint?: string; registration_endpoint?: string; supports_dynamic_registration?: boolean; }; export type StartMcpOauthPopupData = { /** * URL of the MCP server to connect to */ mcpServerUrl: string; /** * Comma-separated list of OAuth scopes to request */ scopes?: string; }; export type McpOauthCallbackData = { /** * OAuth authorization code */ code: string; /** * CSRF state token */ state: string; }; export type McpOauthCallbackResponse = string; export type PublishHubDraftData = { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; requestBody: PublishDraftBody; workspace: string; }; export type PublishHubDraftResponse = string; export type PublishHubScriptData = { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; requestBody: PublishScriptBody; workspace: string; }; export type PublishHubScriptResponse = string; export type PublishHubFlowData = { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; requestBody: PublishFlowBody; workspace: string; }; export type PublishHubFlowResponse = string; export type PublishHubAppData = { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; requestBody: PublishAppBody; workspace: string; }; export type PublishHubAppResponse = string; export type PublishHubRawAppData = { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; requestBody: PublishRawAppBody; workspace: string; }; export type PublishHubRawAppResponse = string; export type PublishHubRawAppRecordingData = { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; /** * hub id of the raw app */ id: number; requestBody: RecordingBody; workspace: string; }; export type PublishHubRawAppRecordingResponse = string; export type PublishHubScriptRecordingData = { /** * hub ask id of the script */ askId: number; /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; requestBody: RecordingBody; workspace: string; }; export type PublishHubScriptRecordingResponse = string; export type PublishHubFlowRecordingData = { /** * hub id of the flow */ flowId: number; /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; requestBody: RecordingBody; workspace: string; }; export type PublishHubFlowRecordingResponse = string; export type PublishHubPipelineRecordingData = { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; requestBody: PipelineRecordingBody; /** * hub project slug */ slug: HubProjectSlug; workspace: string; }; export type PublishHubPipelineRecordingResponse = string; export type PublishHubResourceTypeData = { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; requestBody: PublishResourceTypeBody; workspace: string; }; export type PublishHubResourceTypeResponse = string; export type PublishHubResourcesData = { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; requestBody: PublishResourcesBody; workspace: string; }; export type PublishHubResourcesResponse = string; export type PublishHubTriggersData = { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; requestBody: PublishTriggersBody; workspace: string; }; export type PublishHubTriggersResponse = string; export type PublishHubMigrationsData = { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; requestBody: PublishMigrationsBody; workspace: string; }; export type PublishHubMigrationsResponse = string; export type GetHubProjectExportData = { /** * folder scoping the Hub project source (`{workspace}:{folder}`) */ folder?: string; /** * hub project slug (3-50 chars, lowercase alphanumeric and hyphens, no leading/trailing hyphen) */ slug: string; workspace: string; }; export type GetHubProjectExportResponse = string; export type PublishHubProjectLogoData = { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; requestBody: ProjectLogoBody; /** * hub project slug */ slug: HubProjectSlug; workspace: string; }; export type PublishHubProjectLogoResponse = string; export type SubmitHubProjectData = { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; /** * hub project slug (3-50 chars, lowercase alphanumeric and hyphens, no leading/trailing hyphen) */ slug: string; workspace: string; }; export type SubmitHubProjectResponse = string; export type WithdrawHubProjectData = { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; /** * hub project slug (3-50 chars, lowercase alphanumeric and hyphens, no leading/trailing hyphen) */ slug: string; workspace: string; }; export type WithdrawHubProjectResponse = string; export type DiscardHubProjectUpdateData = { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; /** * hub project slug (3-50 chars, lowercase alphanumeric and hyphens, no leading/trailing hyphen) */ slug: string; workspace: string; }; export type DiscardHubProjectUpdateResponse = string; export type ListHubProjectsData = { workspace: string; }; export type ListHubProjectsResponse = string; export type GetHubProjectBySourceData = { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; workspace: string; }; export type GetHubProjectBySourceResponse = string; export type $OpenApiTs = { '/version': { get: { res: { /** * git version of backend */ 200: string; }; }; }; '/uptodate': { get: { res: { /** * is backend up to date */ 200: string; }; }; }; '/ee_license': { get: { res: { /** * get license id (empty if not ee) */ 200: string; }; }; }; '/openapi.yaml': { get: { res: { /** * openapi yaml file content */ 200: string; }; }; }; '/health/status': { get: { req: { /** * Force a fresh check, bypassing the cache */ force?: boolean; }; res: { /** * server is healthy or degraded */ 200: HealthStatusResponse; /** * server is unhealthy (database unreachable) */ 503: HealthStatusResponse; }; }; }; '/health/detailed': { get: { res: { /** * server is healthy or degraded */ 200: DetailedHealthResponse; /** * server is unhealthy (database unreachable) */ 503: DetailedHealthResponse; }; }; }; '/docs/search': { get: { req: { /** * Keywords to search for in the documentation body, e.g. "chromium worker tag" or "retry exponential backoff". Fewer, more distinctive words match better. */ query: string; }; res: { /** * matching documentation pages */ 200: { /** * Model-ready rendering of the results */ text: string; results: Array<{ url: string; title: string; score: number; snippets: Array<(string)>; }>; }; }; }; }; '/docs/page': { get: { req: { /** * Optional. A heading title from the page outline to read just that section instead of the full page. */ section?: string; /** * The docs page to read, as a Source URL returned by searchDocs (e.g. https://www.windmill.dev/docs/core_concepts/jobs). A bare path (e.g. /docs/core_concepts/jobs) is also accepted. */ url: string; }; res: { /** * documentation page content */ 200: { text: string; source_url: string; }; }; }; }; '/w/{workspace}/audit/get/{id}': { get: { req: { id: number; workspace: string; }; res: { /** * an audit log */ 200: AuditLog; }; }; }; '/w/{workspace}/audit/list': { get: { req: { /** * filter on type of operation */ actionKind?: 'Create' | 'Update' | 'Delete' | 'Execute'; /** * filter on created after (exclusive) timestamp */ after?: string; /** * get audit logs for all workspaces */ allWorkspaces?: boolean; /** * filter on started before (inclusive) timestamp */ before?: string; /** * only return logs with an id strictly lower than this one. Logs are ordered by descending id, so this is a keyset cursor to stream a page in several batches without paying a growing offset. * */ beforeId?: number; /** * comma separated list of operations to exclude */ excludeOperations?: string; /** * filter on exact or prefix name of operation */ operation?: string; /** * comma separated list of exact operations to include */ operations?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * filter on exact or prefix name of resource */ resource?: string; /** * filter on exact username of user */ username?: string; workspace: string; }; res: { /** * a list of audit logs */ 200: Array; }; }; }; '/w/{workspace}/trash/list': { get: { req: { /** * only return items of this kind: script, flow, app, schedule, variable, resource, or a trigger kind such as http_trigger * */ itemKind?: string; /** * which page to return (starts at 0, default 0) */ page?: number; /** * number of items to return for a given page (default 100, max 1000) */ perPage?: number; workspace: string; }; res: { /** * the trashed items, most recently deleted first */ 200: Array; }; }; }; '/w/{workspace}/trash/get/{id}': { get: { req: { id: number; workspace: string; }; res: { /** * the trashed item */ 200: TrashItemWithData; }; }; }; '/w/{workspace}/trash/restore/{id}': { post: { req: { id: number; workspace: string; }; res: { /** * item restored */ 200: string; }; }; }; '/w/{workspace}/trash/delete/{id}': { delete: { req: { id: number; workspace: string; }; res: { /** * item permanently deleted */ 200: string; }; }; }; '/w/{workspace}/trash/empty': { post: { req: { workspace: string; }; res: { /** * trashbin emptied */ 200: string; }; }; }; '/auth/login': { post: { req: { /** * credentials */ requestBody: Login; }; res: { /** * Successfully authenticated. The session ID is returned in a cookie named `token` and as plaintext response. Preferred method of authorization is through the bearer token. The cookie is only for browser convenience. * */ 200: string; }; }; }; '/auth/logout': { post: { res: { /** * clear cookies and clear token (if applicable) */ 200: string; }; }; }; '/auth/is_smtp_configured': { get: { res: { /** * returns true if SMTP is configured */ 200: boolean; }; }; }; '/auth/is_password_login_disabled': { get: { res: { /** * returns true if password login is disabled */ 200: boolean; }; }; }; '/auth/request_password_reset': { post: { req: { /** * email to send password reset link to */ requestBody: { email: string; }; }; res: { /** * password reset email sent (if user exists) */ 200: PasswordResetResponse; /** * SMTP not configured */ 400: unknown; }; }; }; '/auth/login_link/{token}': { get: { req: { rd?: string; token: string; }; res: { /** * redirected to the post-login destination, or to /user/login_link_expired when the link is used, expired or unknown */ 302: unknown; }; }; }; '/auth/reset_password': { post: { req: { /** * token and new password */ requestBody: { token: string; new_password: string; }; }; res: { /** * password reset successfully */ 200: PasswordResetResponse; /** * invalid or expired token */ 400: unknown; }; }; }; '/w/{workspace}/users/get/{username}': { get: { req: { username: string; workspace: string; }; res: { /** * user created */ 200: User; }; }; }; '/w/{workspace}/users/update/{username}': { post: { req: { /** * new user */ requestBody: EditWorkspaceUser; username: string; workspace: string; }; res: { /** * edited user */ 200: string; }; }; }; '/w/{workspace}/users/is_owner/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * is owner */ 200: boolean; }; }; }; '/users/setpassword': { post: { req: { /** * set password */ requestBody: { password: string; }; }; res: { /** * password set */ 200: string; }; }; }; '/users/set_password_of/{user}': { post: { req: { /** * set password */ requestBody: { password: string; }; user: string; }; res: { /** * password set */ 200: string; }; }; }; '/users/set_login_type/{user}': { post: { req: { /** * set login type */ requestBody: { login_type: string; }; user: string; }; res: { /** * login type set */ 200: string; }; }; }; '/users/create': { post: { req: { /** * user info */ requestBody: { email: string; password?: string; super_admin: boolean; name?: string; company?: string; /** * Skip sending email notifications to the user */ skip_email?: boolean; /** * password (default, requires `password`), pending_oauth (no credential until the first OAuth login proving the address adopts the account), or a configured OAuth login client key */ login_type?: string; }; }; res: { /** * user created */ 201: string; }; }; }; '/users/update/{email}': { post: { req: { email: string; /** * new user info */ requestBody: { is_super_admin?: boolean; is_devops?: boolean; name?: string; disabled?: boolean; }; }; res: { /** * user updated */ 200: string; }; }; }; '/users/username_info/{email}': { get: { req: { email: string; }; res: { /** * user renamed */ 200: { username: string; workspace_usernames: Array<{ workspace_id: string; username: string; }>; }; }; }; }; '/users/rename/{email}': { post: { req: { email: string; /** * new username */ requestBody: { new_username: string; }; }; res: { /** * user renamed */ 200: string; }; }; }; '/users/change_email/{email}': { post: { req: { email: string; /** * new email */ requestBody: { new_email: string; }; }; res: { /** * user email changed */ 200: string; }; }; }; '/users/delete/{email}': { delete: { req: { email: string; }; res: { /** * user deleted */ 200: string; }; }; }; '/users/overwrite': { post: { req: { /** * List of users */ requestBody: Array; }; res: { /** * Success message */ 200: string; }; }; }; '/users/export': { get: { res: { /** * exported users */ 200: Array; }; }; }; '/users/ext_jwt_tokens': { get: { req: { /** * only tokens used in the last 30 days */ activeOnly?: boolean; page?: number; perPage?: number; }; res: { /** * list of external JWT tokens */ 200: Array; }; }; }; '/users/guests': { get: { req: { page?: number; perPage?: number; }; res: { /** * the guests of the window and the allowance they count against */ 200: GuestList; }; }; }; '/users/onboarding': { post: { req: { requestBody: { touch_point?: string; use_case?: string; }; }; res: { /** * Onboarding data submitted successfully */ 200: string; }; }; }; '/w/{workspace}/users/delete/{username}': { delete: { req: { username: string; workspace: string; }; res: { /** * delete user */ 200: string; }; }; }; '/w/{workspace}/users/offboard_preview/{username}': { get: { req: { username: string; workspace: string; }; res: { /** * offboard preview with object counts */ 200: OffboardPreview; }; }; }; '/w/{workspace}/users/offboard/{username}': { post: { req: { requestBody: OffboardRequest; username: string; workspace: string; }; res: { /** * offboard response with conflicts or summary */ 200: OffboardResponse; }; }; }; '/users/offboard_preview/{email}': { get: { req: { email: string; }; res: { /** * per-workspace offboard previews */ 200: GlobalOffboardPreview; }; }; }; '/users/offboard/{email}': { post: { req: { email: string; requestBody: GlobalOffboardRequest; }; res: { /** * offboard result */ 200: OffboardResponse; }; }; }; '/w/{workspace}/users/convert_to_group/{username}': { post: { req: { username: string; workspace: string; }; res: { /** * convert user to group user */ 200: string; }; }; }; '/users/email': { get: { res: { /** * user email */ 200: string; }; }; }; '/users/refresh_token': { get: { req: { ifExpiringInLessThanS?: number; }; res: { /** * new token */ 200: string; }; }; }; '/users/tutorial_progress': { get: { res: { /** * tutorial progress */ 200: { progress?: number; skipped_all?: boolean; }; }; }; post: { req: { /** * progress update */ requestBody: { progress?: number; skipped_all?: boolean; }; }; res: { /** * tutorial progress */ 200: string; }; }; }; '/users/leave_instance': { post: { res: { /** * status */ 200: string; }; }; }; '/users/usage': { get: { res: { /** * free usage */ 200: number; }; }; }; '/users/all_runnables': { get: { res: { /** * free all runnables */ 200: { workspace: string; endpoint_async: string; endpoint_sync: string; summary: string; description?: string; kind: string; }; }; }; }; '/users/whoami': { get: { res: { /** * user email */ 200: GlobalUserInfo; }; }; }; '/users/list_invites': { get: { res: { /** * list all workspace invites */ 200: Array; }; }; }; '/w/{workspace}/users/whoami': { get: { req: { workspace: string; }; res: { /** * user */ 200: User; }; }; }; '/users/accept_invite': { post: { req: { /** * accept invite */ requestBody: { workspace_id: string; username?: string; }; }; res: { /** * status */ 200: string; }; }; }; '/users/decline_invite': { post: { req: { /** * decline invite */ requestBody: { workspace_id: string; }; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/users/impersonate_service_account': { post: { req: { requestBody: { username: string; }; workspace: string; }; res: { /** * impersonation token */ 201: string; }; }; }; '/w/{workspace}/users/exit_impersonation': { post: { req: { requestBody: { token: string; }; workspace: string; }; res: { /** * exited impersonation */ 200: string; }; }; }; '/w/{workspace}/users/whois/{username}': { get: { req: { username: string; workspace: string; }; res: { /** * user */ 200: User; }; }; }; '/users/exists/{email}': { get: { req: { email: string; }; res: { /** * user */ 200: boolean; }; }; }; '/users/list_as_super_admin': { get: { req: { /** * filter only active users */ activeOnly?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; }; res: { /** * user */ 200: Array; }; }; }; '/w/{workspace}/users/list': { get: { req: { workspace: string; }; res: { /** * user */ 200: Array; }; }; }; '/w/{workspace}/users/list_addable': { get: { req: { /** * number of users to return (default 10, max 100) */ perPage?: number; /** * filter users whose email or username contains this string */ search?: string; workspace: string; }; res: { /** * addable instance users */ 200: Array<{ email: string; username?: string; }>; }; }; }; '/w/{workspace}/users/list_usage': { get: { req: { workspace: string; }; res: { /** * user */ 200: Array; }; }; }; '/w/{workspace}/users/list_usernames': { get: { req: { workspace: string; }; res: { /** * user */ 200: Array<(string)>; }; }; }; '/w/{workspace}/users/username_to_email/{username}': { get: { req: { username: string; workspace: string; }; res: { /** * email */ 200: string; }; }; }; '/users/tokens/create': { post: { req: { /** * new token */ requestBody: NewToken; }; res: { /** * token created */ 201: string; }; }; }; '/users/tokens/impersonate': { post: { req: { /** * new token */ requestBody: NewTokenImpersonate; }; res: { /** * token created */ 201: string; }; }; }; '/users/login_links': { post: { req: { /** * target account and link options */ requestBody: { email: string; /** * link lifetime in seconds, at most 900 (default 600) */ expires_in_s?: number; /** * same-origin path the browser lands on after login (default /user/workspaces) */ rd?: string; /** * mint only while the account still has this login type (for example pending_oauth), so a link stops working once the owner has set a password or signed in with a provider */ require_login_type?: string; }; }; res: { /** * login link minted */ 201: { url: string; expires_at: string; }; /** * the account does not have the required login type */ 409: unknown; }; }; }; '/users/cloud_trial_offer': { post: { req: { requestBody: { email: string; /** * mark the offer used (a trial or subscription now exists) instead of recording it */ consumed?: boolean; }; }; res: { /** * offer recorded or consumed */ 200: string; }; }; get: { res: { /** * offer state */ 200: { offered: boolean; }; }; }; }; '/users/cloud_trial_offer/go': { post: { res: { /** * where to go — the customer portal signed in with the trial being started, or the portal home with the reason the offer could not be used */ 200: { location: string; /** * present when the portal refused (e.g. the account already has a subscription); the offer is then spent */ reason?: string; }; /** * called with a job token */ 403: unknown; /** * no offer for this account */ 404: unknown; }; }; }; '/users/onboarding_profile': { post: { req: { requestBody: { email: string; /** * free-form context from the invite, every key optional. The frontend reads `touch_point` (answers onboarding's source question), `company` and `workspace_name` (prefill the first workspace's name), `hub_projects` (slugs surfaced first on an empty workspace), `tools` (integrations, used to pick hub projects when none are named) and `starter_prompts` (`[{label, prompt}]`, replacing the home page's example prompts); unknown keys are kept and ignored */ profile: { [key: string]: unknown; }; }; }; res: { /** * profile recorded */ 200: string; }; }; get: { res: { /** * the profile, or null when none was recorded */ 200: { profile?: { [key: string]: unknown; } | null; }; }; }; }; '/users/tokens/delete/{token_prefix}': { delete: { req: { tokenPrefix: string; }; res: { /** * delete token */ 200: string; }; }; }; '/users/tokens/update_scopes/{token_prefix}': { post: { req: { /** * new scopes (null or omitted = full access) */ requestBody: { scopes?: Array<(string)> | null; }; tokenPrefix: string; }; res: { /** * scopes updated */ 200: string; }; }; }; '/users/tokens/update_label/{token_prefix}': { post: { req: { /** * new label (null or omitted = no label) */ requestBody: { label?: string | null; }; tokenPrefix: string; }; res: { /** * label updated */ 200: string; }; }; }; '/users/tokens/list': { get: { req: { excludeEphemeral?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; }; res: { /** * truncated token */ 200: Array; }; }; }; '/oauth/login_callback/{client_name}': { post: { req: { clientName: string; /** * Partially filled script */ requestBody: { code?: string; state?: string; }; }; res: { /** * Successfully authenticated. The session ID is returned in a cookie named `token` and as plaintext response. Preferred method of authorization is through the bearer token. The cookie is only for browser convenience. * */ 200: string; }; }; }; '/github_app/connected_repositories': { get: { req: { /** * Page number for pagination (default 1) */ page?: number; }; res: { /** * connected repositories */ 200: GithubInstallations; }; }; }; '/w/{workspace}/github_app/install_from_workspace': { post: { req: { requestBody: { /** * The ID of the workspace containing the installation to copy */ source_workspace_id: string; /** * The ID of the GitHub installation to copy */ installation_id: number; }; workspace: string; }; res: { /** * Installation successfully copied */ 200: unknown; }; }; }; '/w/{workspace}/github_app/installation/{installation_id}': { delete: { req: { /** * The ID of the GitHub installation to delete */ installationId: number; workspace: string; }; res: { /** * Installation successfully deleted */ 200: unknown; }; }; }; '/w/{workspace}/github_app/export/{installationId}': { get: { req: { installationId: number; workspace: string; }; res: { /** * Successfully exported the JWT token */ 200: { jwt_token?: string; }; }; }; }; '/w/{workspace}/github_app/import': { post: { req: { requestBody: { jwt_token: string; }; workspace: string; }; res: { /** * Successfully imported the installation */ 200: unknown; }; }; }; '/w/{workspace}/git_sync/gitlab/projects': { post: { req: { requestBody: { /** * The GitLab instance, e.g. https://gitlab.com */ base_url: string; /** * A project access token with the api scope, or a group token that reaches the project */ token: string; /** * Narrow the list to projects matching this text */ search?: string; }; workspace: string; }; res: { /** * the projects the token can sync */ 200: Array; }; }; }; '/w/{workspace}/git_sync/credential/origin': { get: { req: { /** * Path of the git repository resource, with or without the `$res:` prefix. A path rather than a URL, because a resource URL may carry a token and a URL in a query string lands in logs. */ path: string; workspace: string; }; res: { /** * where the credential comes from */ 200: { origin?: 'held' | 'borrowed'; provider?: 'gitlab'; }; }; }; }; '/w/{workspace}/git_sync/credential': { post: { req: { requestBody: { /** * The repository the credential is for, and the key it is stored under. It is served for this repository and no other, so repointing a resource elsewhere cannot carry the token along. */ repo_url: string; /** * The access token, as pasted */ token: string; }; workspace: string; }; res: { /** * the credential was stored */ 200: string; }; }; }; '/w/{workspace}/github_app/ghes_installation_callback': { post: { req: { requestBody: { /** * The GitHub App installation ID from GHES */ installation_id: number; }; workspace: string; }; res: { /** * GHES installation registered successfully */ 200: unknown; }; }; }; '/github_app/ghes_config': { get: { res: { /** * GHES app configuration */ 200: { base_url: string; app_slug: string; client_id: string; app_owner?: string | null; }; }; }; }; '/github_app/ghes/discover': { get: { res: { /** * Discovered installations */ 200: Array<{ installation_id: number; /** * GitHub login of the installation's account (org or user) */ account_id: string; assigned_workspaces: Array<{ workspace_id: string; provisioned_by_admin: boolean; }>; }>; }; }; }; '/github_app/ghes/assign': { post: { req: { requestBody: { workspace_id: string; installation_id: number; }; }; res: { /** * Installation assigned */ 200: unknown; }; }; }; '/github_app/ghes/assign/{workspace_id}/{installation_id}': { delete: { req: { installationId: number; workspaceId: string; }; res: { /** * Installation unassigned */ 200: unknown; }; }; }; '/workspaces/list': { get: { res: { /** * all workspaces */ 200: Array; }; }; }; '/workspaces/allowed_domain_auto_invite': { get: { res: { /** * domain allowed or not */ 200: boolean; }; }; }; '/workspaces/users': { get: { res: { /** * workspace with associated username */ 200: UserWorkspaceList; }; }; }; '/workspaces/session_workspace_status': { post: { req: { requestBody: { workspace_ids: Array<(string)>; }; }; res: { /** * map of workspace id to status (active, archived, or deleted) */ 200: { [key: string]: ('active' | 'archived' | 'deleted'); }; }; }; }; '/workspaces/session_workspace_retention': { post: { req: { requestBody: { workspace_ids: Array<(string)>; }; }; res: { /** * map of workspace id to its `ai_config.sessions_retention_days`; a workspace without a retention, or one the caller cannot be authenticated into, is absent */ 200: { [key: string]: (number); }; }; }; }; '/w/{workspace}/workspaces/get_as_superadmin': { get: { req: { workspace: string; }; res: { /** * workspace */ 200: Workspace; }; }; }; '/workspaces/list_as_superadmin': { get: { req: { /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; }; res: { /** * workspaces */ 200: Array; }; }; }; '/workspaces/create': { post: { req: { /** * new token */ requestBody: CreateWorkspace; }; res: { /** * token created */ 201: string; }; }; }; '/w/{workspace}/workspaces/create_workspace_fork_branch': { post: { req: { /** * new forked workspace */ requestBody: CreateWorkspaceFork; workspace: string; }; res: { /** * forked workspace branch created */ 201: Array<(string)>; }; }; }; '/w/{workspace}/workspaces/create_fork': { post: { req: { /** * new forked workspace */ requestBody: CreateWorkspaceFork; workspace: string; }; res: { /** * forked workspace created */ 201: string; }; }; }; '/w/{workspace}/workspaces/attach_dev_workspace': { post: { req: { requestBody: { dev_workspace_id: string; lock_prod_deploy?: boolean; lock_prod_forking?: boolean; /** * Environment label; also names the branch the dev workspace deploys to. Omitted defaults to 'dev' */ dev_workspace_label?: 'dev' | 'qa' | 'test' | 'uat' | 'staging' | 'demo' | 'sandbox' | 'preprod'; }; workspace: string; }; res: { /** * dev workspace attached */ 200: string; }; }; }; '/w/{workspace}/workspaces/detach_dev_workspace': { post: { req: { requestBody: { dev_workspace_id: string; }; workspace: string; }; res: { /** * dev workspace detached */ 200: string; }; }; }; '/w/{workspace}/workspaces/get_dev_workspace': { get: { req: { workspace: string; }; res: { /** * the dev workspace, or null if none */ 200: { id: string; name: string; /** * Environment label, e.g. 'dev' or 'staging'; null defaults to 'dev' */ dev_workspace_label?: string | null; } | null; }; }; }; '/workspaces/exists': { post: { req: { /** * id of workspace */ requestBody: { id: string; }; }; res: { /** * status */ 200: boolean; }; }; }; '/workspaces/exists_username': { post: { req: { requestBody: { id: string; username: string; }; }; res: { /** * status */ 200: boolean; }; }; }; '/w/{workspace}/github_app/token': { post: { req: { /** * jwt job token */ requestBody: { job_token: string; }; workspace: string; }; res: { /** * git credential */ 200: { token: string; }; }; }; }; '/w/{workspace}/github_app/repo_archive/{path}': { get: { req: { path: string; /** * branch, tag or commit sha; defaults to the resource's branch */ ref?: string; workspace: string; }; res: { /** * gzipped tarball of the repository at the resolved commit */ 200: (Blob | File); }; }; }; '/w/{workspace}/workspaces/invite_user': { post: { req: { /** * WorkspaceInvite */ requestBody: { email: string; is_admin: boolean; operator: boolean; parent_workspace_id?: string | null; }; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/add_user': { post: { req: { /** * WorkspaceInvite */ requestBody: { email: string; is_admin: boolean; username?: string; operator: boolean; }; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/create_service_account': { post: { req: { requestBody: { username: string; /** * Grant the service account workspace admin. Defaults to false. Cannot be combined with operator=true. */ is_admin?: boolean; /** * Make the service account an operator. Defaults to true for backward compatibility. Set to false to count as a developer (1 seat) instead of 0.5 seat. */ operator?: boolean; /** * Add the service account to the workspace `wm_deployers` group on creation. Recommended when the account will be used as a CLI sync / CI deploy identity so it can deploy on behalf of other users. */ add_to_deployers?: boolean; }; workspace: string; }; res: { /** * service account created */ 201: string; }; }; }; '/w/{workspace}/workspaces/delete_invite': { post: { req: { /** * WorkspaceInvite */ requestBody: { email: string; is_admin: boolean; operator: boolean; }; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/archive': { post: { req: { workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/workspaces/unarchive/{workspace}': { post: { req: { workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/workspaces/delete/{workspace}': { delete: { req: { onlyDeleteForks?: boolean; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/leave': { post: { req: { workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/get_workspace_name': { get: { req: { workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/change_workspace_name': { post: { req: { requestBody?: { new_name?: string; }; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/change_workspace_id': { post: { req: { requestBody?: { new_id?: string; new_name?: string; }; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/change_workspace_color': { post: { req: { requestBody?: { color?: string; }; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/operator_settings': { post: { req: { requestBody: OperatorSettings; workspace: string; }; res: { /** * Operator settings updated successfully */ 200: string; }; }; }; '/w/{workspace}/workspaces/compare/{target_workspace_id}': { get: { req: { /** * The ID of the workspace to compare with */ targetWorkspaceId: string; workspace: string; }; res: { /** * Workspace comparison results */ 200: WorkspaceComparison; }; }; }; '/w/{workspace}/workspaces/seed_full_diff/{target_workspace_id}': { post: { req: { /** * The ID of the workspace to compare with */ targetWorkspaceId: string; workspace: string; }; res: { /** * Scan seeded */ 200: { /** * Number of candidate items the comparison will evaluate */ candidates: number; scanned_at: string; }; }; }; }; '/w/{workspace}/workspaces/reset_diff_tally/{fork_workspace_id}': { post: { req: { /** * The ID of the workspace to compare with */ forkWorkspaceId: string; workspace: string; }; res: { /** * status */ 200: unknown; }; }; }; '/w/{workspace}/workspaces/list_pending_invites': { get: { req: { workspace: string; }; res: { /** * user */ 200: Array; }; }; }; '/w/{workspace}/workspaces/get_public_settings': { get: { req: { workspace: string; }; res: { /** * status */ 200: { workspace_id: string; slack_name?: string; slack_team_id?: string; teams_team_id?: string; teams_team_name?: string; teams_team_guid?: string; large_file_storage?: LargeFileStorage; datatable?: DataTableSettings; deploy_ui?: WorkspaceDeployUISettings; mute_critical_alerts?: boolean; /** * Whether this workspace admits guest sessions. An app's own `guest` execution mode is inert while this is false. */ guest_access_enabled: boolean; /** * Whether every new fork of this workspace starts with its admins and developers as members, keeping their role. */ add_admins_and_developers_to_forks: boolean; }; }; }; }; '/w/{workspace}/workspaces/get_settings': { get: { req: { workspace: string; }; res: { /** * status */ 200: { workspace_id?: string; slack_name?: string; slack_team_id?: string; slack_command_script?: string; slack_oauth_client_id?: string; slack_oauth_client_secret?: string; teams_team_id?: string; teams_command_script?: string; teams_team_name?: string; teams_team_guid?: string; auto_invite?: AutoInviteConfig; plan?: string; customer_id?: string; webhook?: string; ai_config?: AIConfig; error_handler?: ErrorHandlerConfig; success_handler?: SuccessHandlerConfig; large_file_storage?: LargeFileStorage; ducklake?: DucklakeSettings; dbt_warehouses?: DbtWarehouses; datatable?: DataTableSettings; git_sync?: WorkspaceGitSyncSettings; deploy_ui?: WorkspaceDeployUISettings; default_app?: string; default_scripts?: WorkspaceDefaultScripts; mute_critical_alerts?: boolean; color?: string; operator_settings?: OperatorSettings; /** * Rate limit for public app executions per minute per server. NULL or 0 means disabled. */ public_app_execution_limit_per_minute?: number; /** * Report failed jobs to the instance critical alert channels when no workspace error handler is set. */ error_handler_fallback_to_instance_alerts?: boolean; /** * Whether this workspace admits guest sessions. An app's own `guest` execution mode is inert while this is false. */ guest_access_enabled?: boolean; /** * PEM public key a guest JWT (`jwt_guest_`) is verified against for this workspace. Mutually exclusive with `guest_jwt_jwks_url`. */ guest_jwt_public_key?: string; /** * JWKS URL a guest JWT (`jwt_guest_`) is verified against for this workspace. Mutually exclusive with `guest_jwt_public_key`. */ guest_jwt_jwks_url?: string; /** * Whether every new fork of this workspace starts with its admins and developers as members, keeping their role. */ add_admins_and_developers_to_forks?: boolean; }; }; }; }; '/w/{workspace}/workspaces/get_deploy_to': { get: { req: { workspace: string; }; res: { /** * status */ 200: { deploy_to?: string; }; }; }; }; '/w/{workspace}/remote_deploy/target': { get: { req: { workspace: string; }; res: { /** * remote deploy target and the caller's connection to it */ 200: RemoteDeployStatus; }; }; post: { req: { requestBody: { target?: RemoteDeployTarget; }; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/remote_deploy/connect': { post: { req: { requestBody: { token: string; target: RemoteDeployTarget; }; workspace: string; }; res: { /** * the stored connection */ 200: RemoteDeployConnection; }; }; }; '/w/{workspace}/remote_deploy/disconnect': { post: { req: { workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/is_premium': { get: { req: { workspace: string; }; res: { /** * status */ 200: boolean; }; }; }; '/w/{workspace}/workspaces/billable_seats': { get: { req: { workspace: string; }; res: { /** * billable seats */ 200: { /** * Omitted when the seats counted are another workspace's, as they are for a fork resolving to its billing root. */ developers?: number; /** * Omitted when the seats counted are another workspace's, as they are for a fork resolving to its billing root. */ operators?: number; seats: number; }; }; }; }; '/w/{workspace}/workspaces/premium_info': { get: { req: { /** * skip fetching subscription status from stripe */ skipSubscriptionFetch?: boolean; workspace: string; }; res: { /** * status */ 200: { premium: boolean; usage?: number; owner: string; status?: string; is_past_due: boolean; max_tolerated_executions?: number; }; }; }; }; '/w/{workspace}/workspaces/threshold_alert': { get: { req: { workspace: string; }; res: { /** * status */ 200: { threshold_alert_amount?: number; last_alert_sent?: string; }; }; }; post: { req: { /** * threshold alert info */ requestBody: { threshold_alert_amount?: number; }; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/rebuild_dependency_map': { post: { req: { workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/get_dependents/{imported_path}': { get: { req: { /** * The imported path to get dependents for */ importedPath: string; workspace: string; }; res: { /** * list of dependents */ 200: Array; }; }; }; '/w/{workspace}/workspaces/get_imports/{importer_path}': { get: { req: { /** * The script path to get imports for */ importerPath: string; workspace: string; }; res: { /** * list of imported script paths */ 200: Array<(string)>; }; }; }; '/w/{workspace}/workspaces/get_dependents_amounts': { post: { req: { /** * List of imported paths to get dependents counts for */ requestBody: Array<(string)>; workspace: string; }; res: { /** * list of dependents amounts */ 200: Array; }; }; }; '/w/{workspace}/workspaces/get_dependency_map': { get: { req: { workspace: string; }; res: { /** * dmap */ 200: Array; }; }; }; '/w/{workspace}/workspaces/edit_slack_command': { post: { req: { /** * WorkspaceInvite */ requestBody: { slack_command_script?: string; }; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/slack_oauth_config': { get: { req: { workspace: string; }; res: { /** * slack oauth config */ 200: { slack_oauth_client_id?: string | null; /** * Masked with *** if set */ slack_oauth_client_secret?: string | null; }; }; }; post: { req: { /** * Slack OAuth Configuration */ requestBody: { slack_oauth_client_id: string; slack_oauth_client_secret: string; }; workspace: string; }; res: { /** * status */ 200: string; }; }; delete: { req: { workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/edit_teams_command': { post: { req: { /** * WorkspaceInvite */ requestBody: { slack_command_script?: string; }; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/available_teams_ids': { get: { req: { /** * Pagination cursor URL from previous response. Pass this to fetch the next page of results. */ nextLink?: string; /** * Search teams by name. If omitted, returns first page of all teams. */ search?: string; workspace: string; }; res: { /** * status */ 200: { teams?: Array<{ team_name?: string; team_id?: string; }>; /** * Total number of teams across all pages */ total_count?: number; /** * Number of teams per page (configurable via TEAMS_PER_PAGE env var) */ per_page?: number; /** * URL to fetch next page of results. Null if no more pages. */ next_link?: string | null; }; }; }; }; '/w/{workspace}/workspaces/available_teams_channels': { get: { req: { /** * Microsoft Teams team ID */ teamId: string; workspace: string; }; res: { /** * List of channels for the specified team */ 200: { channels?: Array<{ channel_name?: string; channel_id?: string; }>; total_count?: number; }; }; }; }; '/w/{workspace}/workspaces/connect_teams': { post: { req: { /** * connect teams */ requestBody: { team_id?: string; team_name?: string; }; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/connect_slack': { post: { req: { /** * connect slack with a pre-minted bot token */ requestBody: { /** * xoxb-... bot token obtained at api.slack.com/apps */ bot_token: string; team_id: string; team_name: string; }; workspace: string; }; res: { /** * status */ 200: unknown; }; }; }; '/w/{workspace}/workspaces/run_slack_message_test_job': { post: { req: { /** * path to hub script to run and its corresponding args */ requestBody: { hub_script_path?: string; channel?: string; test_msg?: string; }; workspace: string; }; res: { /** * status */ 200: { job_uuid?: string; }; }; }; }; '/w/{workspace}/workspaces/run_teams_message_test_job': { post: { req: { /** * path to hub script to run and its corresponding args */ requestBody: { hub_script_path?: string; channel?: string; test_msg?: string; }; workspace: string; }; res: { /** * status */ 200: { job_uuid?: string; }; }; }; }; '/w/{workspace}/workspaces/edit_auto_invite': { post: { req: { /** * WorkspaceInvite */ requestBody: { operator?: boolean; invite_all?: boolean; auto_add?: boolean; }; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/edit_instance_groups': { post: { req: { /** * Instance Groups Configuration */ requestBody: { groups?: Array<(string)>; roles?: { [key: string]: (string); }; }; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/edit_webhook': { post: { req: { /** * WorkspaceWebhook */ requestBody: { webhook?: string; }; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/edit_copilot_config': { post: { req: { /** * WorkspaceCopilotConfig */ requestBody: AIConfig; workspace: string; }; res: { /** * status */ 200: { effective_ai_config: AIConfig; has_instance_ai_config: boolean; uses_instance_ai_config: boolean; instance_ai_summary?: InstanceAISummary; }; }; }; }; '/w/{workspace}/workspaces/get_copilot_settings_state': { get: { req: { workspace: string; }; res: { /** * status */ 200: { has_instance_ai_config: boolean; uses_instance_ai_config: boolean; instance_ai_summary?: InstanceAISummary; }; }; }; }; '/w/{workspace}/workspaces/get_copilot_info': { get: { req: { workspace: string; }; res: { /** * status */ 200: AIConfig; }; }; }; '/w/{workspace}/workspaces/edit_error_handler': { post: { req: { /** * WorkspaceErrorHandler */ requestBody: EditErrorHandler; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/edit_success_handler': { post: { req: { /** * WorkspaceSuccessHandler */ requestBody: EditSuccessHandler; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/edit_large_file_storage_config': { post: { req: { /** * LargeFileStorage info */ requestBody: { large_file_storage?: LargeFileStorage; }; workspace: string; }; res: { /** * status */ 200: unknown; }; }; }; '/w/{workspace}/workspaces/edit_dbt_warehouses': { post: { req: { /** * dbt warehouses, by name */ requestBody: { dbt_warehouses?: DbtWarehouses; }; workspace: string; }; res: { /** * status */ 200: unknown; }; }; }; '/w/{workspace}/workspaces/list_ducklakes': { get: { req: { workspace: string; }; res: { /** * status */ 200: Array<(string)>; }; }; }; '/w/{workspace}/workspaces/list_datatables': { get: { req: { workspace: string; }; res: { /** * status */ 200: Array<{ name: string; resource_type: 'postgres' | 'instance'; resource_path: string; governing_workspace_id?: string; permissioned: boolean; }>; }; }; }; '/w/{workspace}/workspaces/datatable_permissions/{datatable_name}': { get: { req: { datatableName: string; workspace: string; }; res: { /** * the data table's roles and their tenants */ 200: DatatablePermissions; }; }; post: { req: { datatableName: string; requestBody: { permissioned: boolean; default_role?: string; roles?: Array; }; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/datatable_acl/{datatable_name}': { get: { req: { datatableName: string; kind: 'database' | 'schema' | 'table'; schema?: string; table?: string; workspace: string; }; res: { /** * owner and grants */ 200: DatatableAclInfo; }; }; }; '/w/{workspace}/workspaces/datatable_acl/{datatable_name}/plan': { post: { req: { datatableName: string; requestBody: AclChangeRequest; workspace: string; }; res: { /** * statements that would run, in a single transaction */ 200: AclPlan; }; }; }; '/w/{workspace}/workspaces/datatable_acl/{datatable_name}/apply': { post: { req: { datatableName: string; requestBody: AclChangeRequest; workspace: string; }; res: { /** * change applied */ 200: string; }; }; }; '/w/{workspace}/workspaces/datatable_usable_roles/{datatable_name}': { get: { req: { datatableName: string; workspace: string; }; res: { /** * usable roles */ 200: { permissioned: boolean; roles: Array<(string)>; default_role: string; }; }; }; }; '/w/{workspace}/workspaces/list_datatable_schemas': { get: { req: { workspace: string; }; res: { /** * schemas of all datatables */ 200: Array; }; }; }; '/w/{workspace}/workspaces/test_datatable_connection/{datatable_name}': { get: { req: { datatableName: string; workspace: string; }; res: { /** * connection and privilege report */ 200: { user: string; schema: string | null; can_create_table: boolean; can_create_schema: boolean; migrations_table_exists: boolean; suggested_grants: Array<(string)>; suggested_search_path?: string; }; }; }; }; '/w/{workspace}/workspaces/list_datatable_tables': { get: { req: { /** * list only this data table; each listed data table opens a connection to its database */ datatableName?: string; /** * the role to list `role_for` as; refused, in that entry's `error`, if the caller may not use it */ role?: string; /** * the data table `role` applies to; every other one is listed as its default role */ roleFor?: string; workspace: string; }; res: { /** * table metadata of all datatables */ 200: Array; }; }; }; '/w/{workspace}/workspaces/get_datatable_table_schema': { get: { req: { datatableName: string; /** * the data table role to read the table as; defaults to the data table's default role */ role?: string; schemaName: string; tableName: string; workspace: string; }; res: { /** * schema of one datatable table */ 200: DataTableTableSchema; }; }; }; '/w/{workspace}/workspaces/edit_ducklake_config': { post: { req: { /** * Ducklake settings */ requestBody: { settings: DucklakeSettings; }; workspace: string; }; res: { /** * status */ 200: unknown; }; }; }; '/w/{workspace}/workspaces/edit_datatable_config': { post: { req: { /** * DataTable settings */ requestBody: { settings: DataTableSettings; /** * data tables renamed in this save, so their migrations cascade */ renames?: Array<{ from: string; to: string; }>; /** * data tables removed in this save, so their migrations are deleted */ deleted_datatables?: Array<(string)>; }; workspace: string; }; res: { /** * status */ 200: { /** * Data tables in other workspaces that were governed by one this save deleted and no longer resolve. */ stranded_references?: Array<{ workspace_id: string; datatable: string; }>; }; }; }; }; '/w/{workspace}/workspaces/run_datatable_migrations/{datatable_name}': { post: { req: { datatableName: string; /** * apply only this specific migration version, ignoring others */ only?: number; /** * only apply pending migrations up to and including this version */ upTo?: number; workspace: string; }; res: { /** * applied migrations */ 200: { applied: Array<{ version: number; name: string; }>; }; }; }; }; '/w/{workspace}/workspaces/rollback_datatable_migrations/{datatable_name}': { post: { req: { datatableName: string; /** * roll back this specific applied migration version instead of the latest */ only?: number; workspace: string; }; res: { /** * rolled back migrations */ 200: { rolled_back: Array<{ version: number; name: string; }>; }; }; }; }; '/w/{workspace}/workspaces/list_datatable_migrations': { get: { req: { workspace: string; }; res: { /** * datatable migrations */ 200: Array; }; }; }; '/w/{workspace}/workspaces/datatable_migrations_status/{datatable_name}': { get: { req: { datatableName: string; workspace: string; }; res: { /** * migrations with status */ 200: { enabled: boolean; migrations: Array; error?: string; }; }; }; }; '/w/{workspace}/workspaces/enable_datatable_migrations/{datatable_name}': { post: { req: { datatableName: string; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/disable_datatable_migrations/{datatable_name}': { post: { req: { datatableName: string; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/create_datatable_migration/{datatable_name}': { post: { req: { datatableName: string; requestBody: { name: string; code_up: string; code_down?: string; }; workspace: string; }; res: { /** * created migration */ 200: DatatableMigration; }; }; }; '/w/{workspace}/workspaces/delete_datatable_migration/{datatable_name}/{timestamp}': { delete: { req: { datatableName: string; timestamp: number; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/upsert_datatable_migration/{datatable_name}': { post: { req: { datatableName: string; requestBody: { timestamp: number; name: string; code_up: string; code_down?: string; }; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/generate_initial_datatable_migration/{datatable_name}': { post: { req: { datatableName: string; workspace: string; }; res: { /** * created migration */ 200: DatatableMigration; }; }; }; '/w/{workspace}/workspaces/create_pg_database': { post: { req: { /** * Create pg database request */ requestBody: { /** * Datatable source to determine connection info: 'datatable://name' or '$res:path' */ source: string; /** * Name for the new database */ target_dbname: string; }; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/drop_forked_datatable_databases': { post: { req: { requestBody: { datatable_names: Array<(string)>; }; workspace: string; }; res: { /** * list of errors (empty if all succeeded) */ 200: Array<(string)>; }; }; }; '/w/{workspace}/workspaces/drop_forked_ducklake_namespaces': { post: { req: { workspace: string; }; res: { /** * list of errors (empty if all succeeded) */ 200: Array<(string)>; }; }; }; '/w/{workspace}/workspaces/import_pg_database': { post: { req: { /** * Import pg database request */ requestBody: { /** * Source database: 'datatable://name' or '$res:path' */ source: string; /** * Target database: 'datatable://name' or '$res:path' */ target: string; /** * Override the target database name */ target_dbname_override?: string; fork_behavior: 'schema_only' | 'schema_and_data' | 'keep_original'; }; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/export_pg_schema': { post: { req: { /** * Export pg schema request */ requestBody: { /** * Source database: 'datatable://name' or '$res:path' */ source: string; }; workspace: string; }; res: { /** * schema dump */ 200: string; }; }; }; '/w/{workspace}/workspaces/get_datatable_full_schema': { post: { req: { requestBody: { /** * Source datatable, e.g. 'datatable://main' */ source: string; }; workspace: string; }; res: { /** * Schema as { schema_name: { table_name: TableEditorValues } } */ 200: { [key: string]: { [key: string]: { name: string; columns: Array<{ name: string; datatype: string; primary_key?: boolean; default_value?: string; nullable?: boolean; }>; foreign_keys: Array<{ target_table?: string; columns: Array<{ source_column?: string; target_column?: string; }>; on_delete: string; on_update: string; fk_constraint_name?: string; }>; pk_constraint_name?: string; }; }; }; }; }; }; '/w/{workspace}/workspaces/git_sync_enabled': { get: { req: { workspace: string; }; res: { /** * Git sync availability status */ 200: { enabled?: boolean; reason?: string | null; max_repos?: number | null; user_count?: number | null; max_users?: number | null; }; }; }; }; '/w/{workspace}/workspaces/git_sync_deploy_mode': { get: { req: { /** * The branch the caller would push. */ branch?: string; workspace: string; }; res: { /** * Git sync deploy mode */ 200: { /** * At least one git-sync repository is configured. */ configured: boolean; /** * True means a `git push` is confirmed to deploy via auto-pull: exactly one licensed, deliverable repository tracks the branch. False is *not confirmed* rather than a definite no — it also covers unlicensed, ambiguous (several repos track it), and conservative false-negatives; determine the deploy path another way (CI `git push`, or `wmill sync push`). */ deploy_on_push: boolean; }; }; }; }; '/w/{workspace}/workspaces/edit_git_sync_config': { post: { req: { /** * Workspace Git sync settings */ requestBody: { git_sync_settings?: WorkspaceGitSyncSettings; }; workspace: string; }; res: { /** * status */ 200: unknown; }; }; }; '/w/{workspace}/workspaces/edit_git_sync_repository': { post: { req: { /** * Git sync repository settings to add or update */ requestBody: { /** * The resource path of the git repository to update */ git_repo_resource_path: string; repository: GitRepositorySettings; }; workspace: string; }; res: { /** * status */ 200: unknown; }; }; }; '/w/{workspace}/workspaces/delete_git_sync_repository': { delete: { req: { /** * Git sync repository to delete */ requestBody: { /** * The resource path of the git repository to delete */ git_repo_resource_path: string; }; workspace: string; }; res: { /** * status */ 200: unknown; }; }; }; '/w/{workspace}/workspaces/edit_deploy_ui_config': { post: { req: { /** * Workspace deploy UI settings */ requestBody: { deploy_ui_settings?: WorkspaceDeployUISettings; }; workspace: string; }; res: { /** * status */ 200: unknown; }; }; }; '/w/{workspace}/workspaces/edit_default_app': { post: { req: { /** * Workspace default app */ requestBody: { default_app_path?: string; }; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/edit_guest_access': { post: { req: { /** * Whether guest sessions are admitted */ requestBody: { guest_access_enabled: boolean; }; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/edit_add_admins_and_developers_to_forks': { post: { req: { /** * Whether new forks start with this workspace's admins and developers */ requestBody: { add_admins_and_developers_to_forks: boolean; }; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/edit_guest_jwt_key': { post: { req: { /** * The guest JWT verification key */ requestBody: { /** * A PEM public key (RS or ES family). */ public_key?: string; /** * A JWKS URL whose keys are fetched and refreshed. */ jwks_url?: string; }; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/guest_usage': { get: { req: { workspace: string; }; res: { /** * guest usage */ 200: GuestUsage; }; }; }; '/w/{workspace}/workspaces/default_scripts': { post: { req: { /** * Workspace default app */ requestBody?: WorkspaceDefaultScripts; workspace: string; }; res: { /** * status */ 200: string; }; }; get: { req: { workspace: string; }; res: { /** * status */ 200: WorkspaceDefaultScripts; }; }; }; '/w/{workspace}/workspaces/set_environment_variable': { post: { req: { /** * Workspace default app */ requestBody: { /** * Environment variable name. New names must be a plain JS identifier (matching ^[A-Za-z_$][A-Za-z0-9_$]*$) since the name is spliced into the NativeTS/Bun worker prologue; otherwise the request is rejected with 400. Existing names can still be updated regardless of shape. */ name: string; value?: string; }; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/encryption_key': { get: { req: { workspace: string; }; res: { /** * status */ 200: { key: string; }; }; }; post: { req: { /** * New encryption key */ requestBody: { new_key: string; skip_reencrypt?: boolean; }; workspace: string; }; res: { /** * status */ 200: string; }; }; }; '/w/{workspace}/workspaces/default_app': { get: { req: { workspace: string; }; res: { /** * status */ 200: { default_app_path?: string; default_app_raw?: boolean; }; }; }; }; '/w/{workspace}/workspaces/usage': { get: { req: { workspace: string; }; res: { /** * usage */ 200: number; }; }; }; '/w/{workspace}/workspaces/used_triggers': { get: { req: { workspace: string; }; res: { /** * status */ 200: { http_routes_used: boolean; websocket_used: boolean; kafka_used: boolean; nats_used: boolean; postgres_used: boolean; mqtt_used: boolean; amqp_used: boolean; gcp_used: boolean; azure_used: boolean; sqs_used: boolean; email_used: boolean; nextcloud_used: boolean; google_used: boolean; github_used: boolean; }; }; }; }; '/w/{workspace}/workspaces/protection_rules': { get: { req: { workspace: string; }; res: { /** * list of protection rules */ 200: Array; }; }; post: { req: { /** * New protection rule configuration */ requestBody: { /** * Unique name for the protection rule */ name: string; rules: ProtectionRules; bypass_groups: RuleBypasserGroups; bypass_users: RuleBypasserUsers; }; workspace: string; }; res: { /** * protection rule created successfully */ 200: string; /** * rule with this name already exists */ 400: unknown; }; }; }; '/w/{workspace}/workspaces/protection_rules/{rule_name}': { post: { req: { /** * Updated protection rule configuration */ requestBody: { /** * New name for the rule. Omit, or pass the current name, to leave it unchanged. The reserved `dev_workspace_lock` rule cannot be renamed, nor can another rule be renamed onto it. */ name?: string; rules: ProtectionRules; bypass_groups: RuleBypasserGroups; bypass_users: RuleBypasserUsers; }; /** * Name of the protection rule to update */ ruleName: string; workspace: string; }; res: { /** * protection rule updated successfully */ 200: string; /** * protection rule not found */ 404: unknown; }; }; delete: { req: { /** * Name of the protection rule to delete */ ruleName: string; workspace: string; }; res: { /** * protection rule deleted successfully */ 200: string; /** * protection rule not found */ 404: unknown; }; }; }; '/w/{workspace}/deployment_request/eligible_deployers': { get: { req: { workspace: string; }; res: { /** * list of eligible deployers */ 200: Array; }; }; }; '/w/{workspace}/deployment_request/open': { get: { req: { workspace: string; }; res: { /** * the open request or null if none exists */ 200: (DeploymentRequest) | null; }; }; }; '/w/{workspace}/deployment_request': { post: { req: { requestBody: { /** * Usernames in the parent workspace. Must be admin or wm_deployers. */ assignees: Array<(string)>; }; workspace: string; }; res: { /** * request created */ 200: DeploymentRequest; /** * invalid assignees */ 400: unknown; /** * a deployment request is already open for this fork */ 409: unknown; }; }; }; '/w/{workspace}/deployment_request/{id}/cancel': { post: { req: { id: number; workspace: string; }; res: { /** * cancelled */ 200: string; }; }; }; '/w/{workspace}/deployment_request/{id}/close_merged': { post: { req: { id: number; workspace: string; }; res: { /** * closed */ 200: string; }; }; }; '/w/{workspace}/deployment_request/{id}/comment': { post: { req: { id: number; requestBody: { body: string; parent_id?: number | null; anchor_kind?: string | null; anchor_path?: string | null; }; workspace: string; }; res: { /** * comment created */ 200: DeploymentRequestComment; /** * invalid input or request closed */ 400: unknown; }; }; }; '/w/{workspace}/workspaces/log_feature_usage': { post: { req: { requestBody: { events: Array<{ feature: string; kind: string; key?: string; entity_id?: string; value?: number; }>; }; workspace: string; }; res: { /** * logged */ 204: void; }; }; }; '/w/{workspace}/workspaces/cloud_quotas': { get: { req: { workspace: string; }; res: { /** * cloud quota usage and limits */ 200: { scripts: QuotaInfo; flows: QuotaInfo; apps: QuotaInfo; variables: QuotaInfo; resources: QuotaInfo; forks: QuotaInfo; }; }; }; }; '/w/{workspace}/workspaces/prune_versions': { post: { req: { requestBody: { resource_type: 'scripts' | 'flows' | 'apps' | 'resources'; }; workspace: string; }; res: { /** * number of pruned versions */ 200: { pruned: number; }; }; }; }; '/w/{workspace}/workspaces/list_ws_specific': { get: { req: { workspace: string; }; res: { /** * list of workspace-specific items */ 200: Array<{ item_kind: string; path: string; }>; }; }; }; '/w/{workspace}/workspaces/list_ws_specific_versions': { get: { req: { kind: 'resource' | 'variable'; path: string; workspace: string; }; res: { /** * list of workspace ids that have a version of the item */ 200: Array<(string)>; }; }; }; '/w/{workspace}/workspaces/set_ws_specific': { post: { req: { requestBody: { item_kind: 'resource' | 'variable'; path: string; value: boolean; }; workspace: string; }; res: { /** * workspace-specific flag updated */ 200: string; }; }; }; '/w/{workspace}/shared_ui/get': { get: { req: { workspace: string; }; res: { /** * shared UI content */ 200: { files: { [key: string]: (string); }; version: number; edited_at: string; edited_by: string; }; }; }; }; '/w/{workspace}/shared_ui/list': { get: { req: { workspace: string; }; res: { /** * shared UI listing */ 200: { paths: Array<(string)>; sizes: { [key: string]: (number); }; version: number; edited_at: string; edited_by: string; }; }; }; }; '/w/{workspace}/shared_ui/version': { get: { req: { workspace: string; }; res: { /** * shared UI version */ 200: { version: number; }; }; }; }; '/w/{workspace}/shared_ui': { put: { req: { requestBody: { files: { [key: string]: (string); }; }; workspace: string; }; res: { /** * updated */ 200: string; }; }; }; '/settings/refresh_custom_instance_user_pwd': { post: { res: { /** * Success */ 200: { [key: string]: unknown; }; }; }; }; '/settings/list_custom_instance_pg_databases': { post: { res: { /** * Statuses of all custom instance dbs */ 200: { [key: string]: CustomInstanceDb; }; }; }; }; '/settings/datatable_roles': { get: { res: { /** * the instance role catalog */ 200: Array; }; }; post: { req: { requestBody: { name: string; }; }; res: { /** * the created role */ 200: InstanceDatatableRole; }; }; }; '/settings/datatable_roles/{id}': { post: { req: { id: string; requestBody: { name?: string; enabled?: boolean; }; }; res: { /** * the updated role */ 200: InstanceDatatableRole; }; }; delete: { req: { id: string; }; res: { /** * deleted */ 200: unknown; }; }; }; '/settings/setup_custom_instance_pg_database/{name}': { post: { req: { /** * The name of the database to create */ name: string; requestBody: { tag?: CustomInstanceDbTag; }; }; res: { /** * status */ 200: CustomInstanceDb; }; }; }; '/settings/drop_custom_instance_pg_database/{name}': { post: { req: { /** * The name of the database to drop */ name: string; }; res: { /** * status */ 200: string; }; }; }; '/settings/global/{key}': { get: { req: { key: string; }; res: { /** * status */ 200: unknown; }; }; post: { req: { key: string; /** * value set */ requestBody: { value?: unknown; }; }; res: { /** * status */ 200: string; }; }; }; '/settings/instance_ui': { get: { res: { /** * the instance_banner and accent_color settings */ 200: { instance_banner?: unknown; accent_color?: unknown; }; }; }; }; '/settings_u/ruff_config': { get: { res: { /** * ruff.toml content (may be empty) */ 200: string; }; }; }; '/settings/local': { get: { res: { /** * status */ 200: unknown; }; }; }; '/settings/test_smtp': { post: { req: { /** * test smtp payload */ requestBody: { to: string; smtp: { host: string; username: string; password: string; port: number; from: string; tls_implicit: boolean; disable_tls: boolean; }; }; }; res: { /** * status */ 200: string; }; }; }; '/settings/test_critical_channels': { post: { req: { /** * test critical channel payload */ requestBody: Array<{ email?: string; slack_channel?: string; }>; }; res: { /** * status */ 200: string; }; }; }; '/settings/critical_alerts': { get: { req: { acknowledged?: boolean | null; page?: number; pageSize?: number; }; res: { /** * Successfully retrieved all critical alerts */ 200: { alerts?: Array; /** * Total number of rows matching the query. */ total_rows?: number; /** * Total number of pages based on the page size. */ total_pages?: number; }; }; }; }; '/settings/critical_alerts/{id}/acknowledge': { post: { req: { /** * The ID of the critical alert to acknowledge */ id: number; }; res: { /** * Successfully acknowledged the critical alert */ 200: string; }; }; }; '/settings/critical_alerts/acknowledge_all': { post: { res: { /** * Successfully acknowledged all unacknowledged critical alerts. */ 200: string; }; }; }; '/settings/test_license_key': { post: { req: { /** * test license key */ requestBody: { license_key: string; }; }; res: { /** * status */ 200: string; }; }; }; '/settings/test_object_storage_config': { post: { req: { /** * test object storage config */ requestBody: { [key: string]: unknown; }; }; res: { /** * status */ 200: string; }; }; }; '/settings/object_storage_usage': { get: { res: { /** * current or last storage-usage computation state */ 200: { running: boolean; started_at: string; finished_at?: string | null; current_prefix?: string | null; scanned_objects: number; folders: Array<{ prefix: string; size: number; partial?: boolean; }>; error?: string | null; } | null; }; }; post: { res: { /** * computation started */ 202: string; }; }; }; '/settings/run_log_cleanup': { post: { res: { /** * cleanup started */ 202: string; }; }; }; '/settings/log_cleanup_status': { get: { res: { /** * current or last log cleanup status (null if never run) */ 200: { running: boolean; started_at: string; finished_at?: string | null; phase: string; total_service: number; processed_service: number; total_jobs: number; processed_jobs: number; s3_deleted: number; s3_not_found?: number; orphans_scanned: number; orphans_deleted: number; errors: number; last_error?: string | null; } | null; }; }; }; '/settings/audit_logs_s3_status': { get: { res: { /** * current export status (null if the feature was never enabled) */ 200: { last_xmin: number; last_ts?: string | null; bootstrapping: boolean; last_exported_audit_ts?: string | null; last_run_at?: string | null; last_run_exported: number; updated_at: string; owner?: string | null; } | null; }; }; }; '/settings/audit_logs_s3_backfill': { post: { req: { requestBody: { /** * inclusive lower bound of the window to export */ from: string; /** * exclusive upper bound of the window to export */ to: string; }; }; res: { /** * backfill started */ 202: unknown; }; }; }; '/settings/audit_logs_s3_backfill_status': { get: { res: { /** * current backfill status (null if never run) */ 200: { running: boolean; started_at: string; finished_at?: string | null; phase: string; from: string; to: string; rows_written: number; objects_written: number; last_ts?: string | null; errors: number; last_error?: string | null; } | null; }; }; }; '/settings/send_stats': { post: { res: { /** * status */ 200: string; }; }; }; '/settings/restart_worker_group/{worker_group}': { post: { req: { /** * the name of the worker group to restart */ workerGroup: string; }; res: { /** * restart signal sent */ 200: string; }; }; }; '/settings/get_stats': { get: { res: { /** * telemetry stats JSON with signature */ 200: { signature?: string; data?: string; }; }; }; }; '/settings/latest_key_renewal_attempt': { get: { res: { /** * status */ 200: { result: string; attempted_at: string; } | null; }; }; }; '/settings/renew_license_key': { post: { req: { licenseKey?: string; }; res: { /** * status */ 200: string; }; }; }; '/settings/offline_license_status': { get: { res: { /** * cap status (or null when no offline license) */ 200: { /** * Author-equivalent seats consumed (authors + 0.5 × operators) */ seats_used?: number; seats_cap?: number; author_count?: number; operator_count?: number; /** * Sum of CU rate across workers that pinged in the last 2 minutes. */ current_cu?: number; cu_cap?: number; cu_over_cap?: boolean; } | null; }; }; }; '/settings/instance_hash': { get: { res: { /** * instance hash */ 200: { instance_hash?: string | null; }; }; }; }; '/settings/customer_portal': { post: { req: { licenseKey?: string; }; res: { /** * url to portal */ 200: string; }; }; }; '/saml/test_metadata': { post: { req: { /** * test metadata */ requestBody: string; }; res: { /** * status */ 200: string; }; }; }; '/settings/list_global': { get: { res: { /** * list of settings */ 200: Array; }; }; }; '/settings/github_app_stale_webhooks': { get: { res: { /** * repositories needing their git sync settings re-saved */ 200: Array<{ workspace_id: string; git_repo_resource_path: string; registered_url?: string | null; }>; }; }; }; '/settings/instance_config': { get: { res: { /** * full instance configuration */ 200: InstanceConfig; }; }; put: { req: { /** * full instance configuration to apply */ requestBody: InstanceConfig; }; res: { /** * instance config updated */ 200: string; }; }; }; '/min_keep_alive_version': { get: { res: { /** * minimum keep-alive versions for workers and agents */ 200: { /** * minimum version for normal workers */ worker: string; /** * minimum version for agent workers */ agent: string; }; }; }; }; '/.well-known/jwks.json': { get: { res: { /** * JSON Web Key Set */ 200: JwksResponse; }; }; }; '/settings/test_secret_backend': { post: { req: { /** * Vault settings to test */ requestBody: VaultSettings; }; res: { /** * connection successful */ 200: string; }; }; }; '/settings/migrate_secrets_to_vault': { post: { req: { /** * Vault settings for migration target */ requestBody: VaultSettings; }; res: { /** * migration report */ 200: SecretMigrationReport; }; }; }; '/settings/migrate_secrets_to_database': { post: { req: { /** * Vault settings for migration source */ requestBody: VaultSettings; }; res: { /** * migration report */ 200: SecretMigrationReport; }; }; }; '/settings/test_azure_kv_backend': { post: { req: { /** * Azure Key Vault settings to test */ requestBody: AzureKeyVaultSettings; }; res: { /** * connection successful */ 200: string; }; }; }; '/settings/migrate_secrets_to_azure_kv': { post: { req: { /** * Azure Key Vault settings for migration target */ requestBody: AzureKeyVaultSettings; }; res: { /** * migration report */ 200: SecretMigrationReport; }; }; }; '/settings/migrate_secrets_from_azure_kv': { post: { req: { /** * Azure Key Vault settings for migration source */ requestBody: AzureKeyVaultSettings; }; res: { /** * migration report */ 200: SecretMigrationReport; }; }; }; '/settings/test_aws_sm_backend': { post: { req: { requestBody: AwsSecretsManagerSettings; }; res: { /** * connection test result */ 200: string; }; }; }; '/settings/migrate_secrets_to_aws_sm': { post: { req: { requestBody: AwsSecretsManagerSettings; }; res: { /** * migration report */ 200: SecretMigrationReport; }; }; }; '/settings/migrate_secrets_from_aws_sm': { post: { req: { requestBody: AwsSecretsManagerSettings; }; res: { /** * migration report */ 200: SecretMigrationReport; }; }; }; '/w/{workspace}/workspaces/get_secondary_storage_names': { get: { req: { /** * If true, include "_default_" in the list if primary workspace storage is set */ includeDefault?: boolean; workspace: string; }; res: { /** * status */ 200: Array<(string)>; }; }; }; '/w/{workspace}/workspaces/critical_alerts': { get: { req: { acknowledged?: boolean | null; page?: number; pageSize?: number; workspace: string; }; res: { /** * Successfully retrieved all critical alerts */ 200: { alerts?: Array; /** * Total number of rows matching the query. */ total_rows?: number; /** * Total number of pages based on the page size. */ total_pages?: number; }; }; }; }; '/w/{workspace}/workspaces/critical_alerts/{id}/acknowledge': { post: { req: { /** * The ID of the critical alert to acknowledge */ id: number; workspace: string; }; res: { /** * Successfully acknowledged the critical alert */ 200: string; }; }; }; '/w/{workspace}/workspaces/critical_alerts/acknowledge_all': { post: { req: { workspace: string; }; res: { /** * Successfully acknowledged all unacknowledged critical alerts. */ 200: string; }; }; }; '/w/{workspace}/workspaces/critical_alerts/mute': { post: { req: { /** * Boolean flag to mute critical alerts. */ requestBody: { /** * Whether critical alerts should be muted. */ mute_critical_alerts?: boolean; }; workspace: string; }; res: { /** * Successfully updated mute critical alert settings. */ 200: string; }; }; }; '/w/{workspace}/workspaces/public_app_rate_limit': { post: { req: { /** * Public app rate limit configuration */ requestBody: { /** * Rate limit for public app executions per minute per server. NULL or 0 to disable. */ public_app_execution_limit_per_minute?: number; }; workspace: string; }; res: { /** * Successfully updated public app rate limit settings. */ 200: string; }; }; }; '/w/{workspace}/dbt/run_progress': { post: { req: { requestBody: Array<{ asset_path: string; status: string; row_count?: number; error?: string; }>; workspace: string; }; res: { /** * recorded */ 200: unknown; }; }; }; '/w/{workspace}/dbt/warehouse/{name}': { get: { req: { name: string; workspace: string; }; res: { /** * the connection the warehouse names */ 200: DbtWarehouseConnection; }; }; }; '/w/{workspace}/dbt/warehouse_exists/{name}': { get: { req: { name: string; workspace: string; }; res: { /** * the warehouse is configured */ 200: unknown; }; }; }; '/w/{workspace}/data_metrics/list': { get: { req: { cursorKind?: string; cursorName?: string; cursorScript?: string; /** * Keyset cursor. To page, pass the previous response's `next_cursor` fields back as `cursor_*`; all four move together, and are omitted for the first page. Continue whenever `next_cursor` is present. Every returned row is one the caller may read, so the cursor never names a hidden row. * */ cursorTable?: string; /** * Producing script path prefix, e.g. `f/analytics` */ pathPrefix?: string; /** * Results per page, capped at 1000 (default 1000) */ perPage?: number; /** * DuckLake table path, with or without the `ducklake://` scheme */ table?: string; workspace: string; }; res: { /** * declared measures and dimensions */ 200: { metrics: Array; /** * Present when more rows may follow: pass its fields back as the `cursor_*` params. Absent means the catalog is exhausted. * */ next_cursor?: { table_path: string; kind: string; name: string; script_path: string; }; }; }; }; }; '/tokens/list/scopes': { get: { res: { /** * list of available scopes */ 200: Array; }; }; }; '/w/{workspace}/oidc/token/{audience}': { post: { req: { audience: string; expiresIn?: number; workspace: string; }; res: { /** * new oidc token */ 200: string; }; }; }; '/w/{workspace}/variables/create': { post: { req: { /** * whether the variable is already encrypted (default false) */ alreadyEncrypted?: boolean; /** * new variable */ requestBody: CreateVariable; workspace: string; }; res: { /** * variable created */ 201: string; }; }; }; '/w/{workspace}/variables/encrypt': { post: { req: { /** * new variable */ requestBody: string; workspace: string; }; res: { /** * encrypted value */ 200: string; }; }; }; '/w/{workspace}/variables/delete/{path}': { delete: { req: { path: string; workspace: string; }; res: { /** * variable deleted */ 200: string; }; }; }; '/w/{workspace}/variables/delete_bulk': { delete: { req: { /** * paths to delete */ requestBody: { paths: Array<(string)>; }; workspace: string; }; res: { /** * deleted paths */ 200: Array<(string)>; }; }; }; '/w/{workspace}/variables/update/{path}': { post: { req: { /** * whether the variable is already encrypted (default false) */ alreadyEncrypted?: boolean; path: string; /** * updated variable */ requestBody: EditVariable; workspace: string; }; res: { /** * variable updated */ 200: string; }; }; }; '/w/{workspace}/variables/get/{path}': { get: { req: { /** * ask to decrypt secret if this variable is secret * (if not secret no effect, default: true) * */ decryptSecret?: boolean; /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; /** * ask to include the encrypted value if secret and decrypt secret is not true (default: false) * */ includeEncrypted?: boolean; path: string; workspace: string; }; res: { /** * variable */ 200: ListableVariable & UserDraftOverlay; }; }; }; '/w/{workspace}/variables/get_value/{path}': { get: { req: { /** * allow getting a cached value for improved performance * */ allowCache?: boolean; path: string; workspace: string; }; res: { /** * variable */ 200: string; }; }; }; '/w/{workspace}/variables/exists/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * variable */ 200: boolean; }; }; }; '/w/{workspace}/variables/list': { get: { req: { /** * broad search across multiple fields (case-insensitive substring match) */ broadFilter?: string; /** * pattern match filter for description field (case-insensitive) */ description?: string; /** * When true, append per-user draft variables whose path has no * deployed variable. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. * */ includeDraftOnly?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * exact path match filter */ path?: string; /** * filter variables by path prefix */ pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * pattern match filter for non-secret variable values (case-insensitive) */ value?: string; workspace: string; }; res: { /** * variable list */ 200: Array; }; }; }; '/w/{workspace}/variables/list_contextual': { get: { req: { workspace: string; }; res: { /** * contextual variable list */ 200: Array; }; }; }; '/w/{workspace}/oauth/connect_slack_callback': { post: { req: { /** * code endpoint */ requestBody: { code: string; state: string; }; workspace: string; }; res: { /** * slack token */ 200: string; }; }; }; '/oauth/connect_slack_callback': { post: { req: { /** * code endpoint */ requestBody: { code: string; state: string; }; }; res: { /** * success message */ 200: string; }; }; }; '/oauth/connect_slack_instance': { post: { req: { /** * connect slack at the instance level with a pre-minted bot token */ requestBody: { /** * xoxb-... bot token obtained at api.slack.com/apps */ bot_token: string; team_id: string; team_name: string; }; }; res: { /** * status */ 200: unknown; }; }; }; '/oauth/connect_callback/{client_name}': { post: { req: { clientName: string; /** * code endpoint */ requestBody: { code: string; state: string; }; }; res: { /** * oauth token */ 200: TokenResponse; }; }; }; '/w/{workspace}/oauth/create_account': { post: { req: { /** * code endpoint */ requestBody: { /** * OAuth refresh token. For authorization_code flow, this contains the actual refresh token. For client_credentials flow, this must be set to an empty string. */ refresh_token: string; expires_in: number; client: string; grant_type?: string; /** * OAuth client ID for resource-level credentials (client_credentials flow only) */ cc_client_id?: string; /** * OAuth client secret for resource-level credentials (client_credentials flow only) */ cc_client_secret?: string; /** * Instance name for built-in providers whose client-credentials token URL is instance-templated; substituted into the fixed-host registry template server-side (client_credentials flow only). The token URL is never caller-supplied. */ cc_instance?: string; /** * Bring-your-own token endpoint override (client_credentials flow only). Only honored together with cc_client_id/cc_client_secret and mutually exclusive with cc_instance; ignored/rejected on the shared-instance path. */ cc_token_url?: string; /** * MCP server URL for MCP OAuth token refresh */ mcp_server_url?: string; /** * OAuth scopes to use for token refresh. Overrides instance-level scopes. */ scopes?: Array<(string)>; }; workspace: string; }; res: { /** * account set */ 200: string; }; }; }; '/w/{workspace}/oauth/connect_client_credentials/{client}': { post: { req: { /** * OAuth client name */ client: string; /** * client credentials flow parameters */ requestBody: { scopes?: Array<(string)>; /** * OAuth client ID. Omit to use the credentials configured on the provider's instance OAuth entry. */ cc_client_id?: string; /** * OAuth client secret. Omit to use the credentials configured on the provider's instance OAuth entry. */ cc_client_secret?: string; /** * Instance name for built-in providers whose client-credentials token URL is instance-templated; substituted into the fixed-host registry template server-side. The token URL is never caller-supplied. */ cc_instance?: string; /** * Bring-your-own token endpoint override. Only honored together with cc_client_id/cc_client_secret and mutually exclusive with cc_instance; rejected on the shared-instance path. */ cc_token_url?: string; }; workspace: string; }; res: { /** * OAuth token response */ 200: TokenResponse; }; }; }; '/w/{workspace}/oauth/refresh_token/{id}': { post: { req: { id: number; /** * variable path */ requestBody: { path: string; }; workspace: string; }; res: { /** * token refreshed */ 200: string; }; }; }; '/w/{workspace}/oauth/disconnect/{id}': { post: { req: { id: number; workspace: string; }; res: { /** * disconnected client */ 200: string; }; }; }; '/w/{workspace}/oauth/disconnect_slack': { post: { req: { workspace: string; }; res: { /** * disconnected slack */ 200: string; }; }; }; '/w/{workspace}/oauth/disconnect_teams': { post: { req: { workspace: string; }; res: { /** * disconnected teams */ 200: string; }; }; }; '/oauth/list_logins': { get: { res: { /** * list of oauth and saml login clients */ 200: { oauth: Array<{ type: string; display_name?: string; }>; saml?: string; /** * provider type to auto-redirect to on login (oauth key or "saml") */ auto_login?: string; }; }; }; }; '/oauth/list_connects': { get: { res: { /** * list of oauth connects clients */ 200: Array<{ name: string; supports_client_credentials: boolean; has_shared_credentials: boolean; }>; }; }; }; '/oauth/get_connect/{client}': { get: { req: { /** * client name */ client: string; }; res: { /** * get */ 200: { extra_params?: { [key: string]: unknown; }; scopes?: Array<(string)>; grant_types?: Array<(string)>; /** * The instance OAuth entry carries shared client-credentials, so the connect dialog can skip the bring-your-own form and run the exchange server-side */ client_credentials_configured?: boolean; }; }; }; }; '/teams/activities': { post: { req: { requestBody: { /** * The ID of the Teams conversation/activity */ conversation_id: string; /** * Used for styling the card conditionally */ success?: boolean; /** * The message text to be sent in the Teams card */ text: string; /** * The card block to be sent in the Teams card */ card_block?: { [key: string]: unknown; }; }; }; res: { /** * Activity processed successfully */ 200: unknown; }; }; }; '/w/{workspace}/resources/create': { post: { req: { /** * new resource */ requestBody: CreateResource; /** * update the resource if it already exists (default false) */ updateIfExists?: boolean; workspace: string; }; res: { /** * resource created */ 201: string; }; }; }; '/w/{workspace}/resources/delete/{path}': { delete: { req: { path: string; workspace: string; }; res: { /** * resource deleted */ 200: string; }; }; }; '/w/{workspace}/resources/delete_bulk': { delete: { req: { /** * paths to delete */ requestBody: { paths: Array<(string)>; }; workspace: string; }; res: { /** * deleted paths */ 200: Array<(string)>; }; }; }; '/w/{workspace}/resources/update/{path}': { post: { req: { path: string; /** * updated resource */ requestBody: EditResource; workspace: string; }; res: { /** * resource updated */ 200: string; }; }; }; '/w/{workspace}/resources/update_value/{path}': { post: { req: { path: string; /** * updated resource */ requestBody: { value?: unknown; }; workspace: string; }; res: { /** * resource value updated */ 200: string; }; }; }; '/w/{workspace}/resources/history/p/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * resource version history */ 200: { versions: Array; versioned: boolean; }; }; }; delete: { req: { path: string; workspace: string; }; res: { /** * history cleared */ 200: string; }; }; }; '/w/{workspace}/resources/history/v/{id}': { get: { req: { /** * The version's id, not its number. */ id: number; workspace: string; }; res: { /** * resource version */ 200: ResourceVersion & { value?: unknown; missing_references: Array<(string)>; }; }; }; }; '/w/{workspace}/resources/history/restore/v/{id}': { post: { req: { /** * The version's id, not its number. */ id: number; workspace: string; }; res: { /** * resource restored */ 200: string; }; }; }; '/w/{workspace}/resources/get/{path}': { get: { req: { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; workspace: string; }; res: { /** * resource */ 200: ListableResource & UserDraftOverlay; }; }; }; '/w/{workspace}/resources/get_value_interpolated/{path}': { get: { req: { /** * allow getting a cached value for improved performance */ allowCache?: boolean; /** * job id */ jobId?: string; path: string; workspace: string; }; res: { /** * resource value */ 200: unknown; }; }; }; '/w/{workspace}/resources/get_value/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * resource value */ 200: unknown; }; }; }; '/w/{workspace}/resources/git_commit_hash/{path}': { get: { req: { gitSshIdentity?: string; path: string; workspace: string; }; res: { /** * git commit hash */ 200: { /** * Latest commit hash from git ls-remote */ commit_hash: string; }; }; }; }; '/w/{workspace}/resources/exists/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * does resource exists */ 200: boolean; }; }; }; '/w/{workspace}/resources/list': { get: { req: { /** * broad search across multiple fields (case-insensitive substring match) */ broadFilter?: string; /** * pattern match filter for description field (case-insensitive) */ description?: string; /** * When true, append per-user draft resources whose path has * no deployed resource. Synthesized rows carry * `draft_only: true`. * */ includeDraftOnly?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * exact path match filter */ path?: string; /** * filter resources by path prefix */ pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * resource_types to list from, separated by ',', */ resourceType?: string; /** * resource_types to not list from, separated by ',', */ resourceTypeExclude?: string; /** * JSONB subset match filter using base64 encoded JSON */ value?: string; workspace: string; }; res: { /** * resource list */ 200: Array; }; }; }; '/w/{workspace}/resources/list_search': { get: { req: { workspace: string; }; res: { /** * resource list */ 200: Array<{ path: string; /** * pretty-printed JSON rendering of the resource value, capped at 4000 characters — a search preview, not the value itself (use get_value for that) */ value: string; /** * whether value was cut short by that cap */ truncated: boolean; }>; }; }; }; '/w/{workspace}/resources/mcp_tools/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * list of MCP tools */ 200: Array<{ name: string; description?: string; inputSchema: { [key: string]: unknown; }; annotations?: { title?: string; readOnlyHint?: boolean; destructiveHint?: boolean; idempotentHint?: boolean; openWorldHint?: boolean; }; }>; }; }; }; '/w/{workspace}/resources/mcp_call_tool/{path}': { post: { req: { path: string; /** * tool name and arguments */ requestBody: { tool: string; arguments?: { [key: string]: unknown; }; /** * set when the caller ran the tool without asking the user to * confirm it; the call is refused unless the server's live * listing marks the tool read-only * */ read_only?: boolean; }; workspace: string; }; res: { /** * the MCP tool result, forwarded verbatim. A tool that ran but failed * returns 200 with isError true. * */ 200: { content?: Array<{ [key: string]: unknown; }>; structuredContent?: { [key: string]: unknown; }; isError?: boolean; }; }; }; }; '/w/{workspace}/resources/list_names/{name}': { get: { req: { name: string; workspace: string; }; res: { /** * resource list names */ 200: Array<{ name: string; path: string; }>; }; }; }; '/w/{workspace}/resources/type/create': { post: { req: { /** * new resource_type */ requestBody: ResourceType; workspace: string; }; res: { /** * resource_type created */ 201: string; }; }; }; '/w/{workspace}/resources/file_resource_type_to_file_ext_map': { get: { req: { workspace: string; }; res: { /** * map from resource type to file resource info */ 200: { [key: string]: { format_extension?: string | null; is_fileset?: boolean; }; }; }; }; }; '/w/{workspace}/resources/type/delete/{path}': { delete: { req: { path: string; workspace: string; }; res: { /** * resource_type deleted */ 200: string; }; }; }; '/w/{workspace}/resources/type/update/{path}': { post: { req: { path: string; /** * updated resource_type */ requestBody: EditResourceType; workspace: string; }; res: { /** * resource_type updated */ 200: string; }; }; }; '/w/{workspace}/resources/type/get/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * resource_type deleted */ 200: ResourceType; }; }; }; '/w/{workspace}/resources/type/exists/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * does resource_type exist */ 200: boolean; }; }; }; '/w/{workspace}/resources/type/list': { get: { req: { workspace: string; }; res: { /** * resource_type list */ 200: Array; }; }; }; '/w/{workspace}/resources/type/listnames': { get: { req: { workspace: string; }; res: { /** * resource_type list */ 200: Array<(string)>; }; }; }; '/w/{workspace}/resources/type/resource_counts': { get: { req: { workspace: string; }; res: { /** * resource count per resource_type */ 200: Array<{ resource_type: string; count: number; }>; }; }; }; '/w/{workspace}/resources/type/hub/info': { get: { req: { workspace: string; }; res: { /** * each hub resource type with its integration and pick count, empty if the hub answers neither read */ 200: Array<{ name: string; /** * the integration the resource type belongs to, which is not always its own name */ app: string; picks: number; }>; }; }; }; '/w/{workspace}/resources/type/hub/pick/{name}': { post: { req: { name: string; workspace: string; }; res: { /** * whether the hub recorded the pick */ 200: { success: boolean; }; }; }; }; '/w/{workspace}/embeddings/query_resource_types': { get: { req: { /** * query limit */ limit?: number; /** * query text */ text: string; workspace: string; }; res: { /** * resource type details */ 200: Array<{ name: string; score: number; schema?: unknown; }>; }; }; }; '/w/{workspace}/npm_proxy/config': { get: { req: { workspace: string; }; res: { /** * npm proxy configuration */ 200: { registry_configured: boolean; }; }; }; }; '/w/{workspace}/npm_proxy/metadata/{package}': { get: { req: { /** * npm package name */ _package: string; workspace: string; }; res: { /** * package metadata */ 200: { tags?: { [key: string]: (string); }; versions?: Array<(string)>; }; }; }; }; '/w/{workspace}/npm_proxy/resolve/{package}': { get: { req: { /** * npm package name */ _package: string; /** * version tag or reference */ tag?: string; workspace: string; }; res: { /** * resolved version */ 200: { version?: string | null; }; }; }; }; '/w/{workspace}/npm_proxy/filetree/{package}/{version}': { get: { req: { /** * npm package name */ _package: string; /** * package version */ version: string; workspace: string; }; res: { /** * package file tree */ 200: { default?: string; files?: Array<{ name?: string; }>; }; }; }; }; '/w/{workspace}/npm_proxy/file/{package}/{version}/{filepath}': { get: { req: { /** * npm package name */ _package: string; /** * file path within package */ filepath: string; /** * package version */ version: string; workspace: string; }; res: { /** * file content */ 200: string; }; }; }; '/w/{workspace}/npm_proxy/tarball/{package}/{version}': { get: { req: { /** * npm package name */ _package: string; /** * package version */ version: string; workspace: string; }; res: { /** * package tarball */ 200: (Blob | File); }; }; }; '/integrations/hub/list': { get: { req: { /** * query integrations kind */ kind?: string; }; res: { /** * integrations details */ 200: Array<{ name: string; /** * how often the integration has been picked, absent on a hub that does not count picks */ picks?: number; /** * the label the hub curates for the integration, null or absent where it names none */ display_name?: string | null; }>; }; }; }; '/flows/hub/list': { get: { res: { /** * hub flows list */ 200: { flows?: Array<{ id: number; flow_id: number; summary: string; apps: Array<(string)>; approved: boolean; votes: number; }>; }; }; }; }; '/flows/hub/get/{id}': { get: { req: { id: number; }; res: { /** * flow */ 200: { flow?: OpenFlow; }; }; }; }; '/w/{workspace}/flows/list_paths': { get: { req: { workspace: string; }; res: { /** * list of flow paths */ 200: Array<(string)>; }; }; }; '/w/{workspace}/flows/list_search': { get: { req: { workspace: string; }; res: { /** * flow list */ 200: Array<{ path: string; value: unknown; }>; }; }; }; '/w/{workspace}/flows/list': { get: { req: { /** * filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') */ createdBy?: string; /** * (default regardless) * If true, show only flows with dedicated_worker enabled. * If false, show only flows with dedicated_worker disabled. * */ dedicatedWorker?: boolean; /** * (default false) * include items that have no deployed version * */ includeDraftOnly?: boolean; /** * Filter by label */ label?: string; /** * order by desc order (default true) */ orderDesc?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * mask to filter exact matching path */ pathExact?: string; /** * mask to filter matching starting path */ pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * (default false) * show only the archived files. * when multiple archived hash share the same path, only the ones with the latest create_at * are displayed. * */ showArchived?: boolean; /** * (default false) * show only the starred items * */ starredOnly?: boolean; /** * (default false) * include deployment message * */ withDeploymentMsg?: boolean; /** * (default false) * If true, the description field will be omitted from the response. * */ withoutDescription?: boolean; workspace: string; }; res: { /** * All flow */ 200: Array<(Flow & { draft_only?: boolean; /** * `chat_input_enabled` of the flow's value, * projected so the list can mark flows that open * as a chat. Omitted when the value has no such * field. * */ chat_input_enabled?: boolean; /** * True when the authed user has a draft for this * flow — either no deployed row exists at this * path (draft-only) or the user saved a per-user * draft on top of the deployed row. * */ is_draft?: boolean; /** * User-typed path the editor has staged but not * yet deployed. Sourced from the draft JSON's * `draft_path` field (the editor only writes it * when the typed path differs from the deployed * one). Lets the home list render the meaningful * name instead of the autogenerated * `u/{user}/draft_{uuid}` URL path. Omitted when * unchanged. * */ draft_path?: string; /** * Workspace users (including the authed user, and * the legacy NULL-email row if any) who have a * per-user draft at this path. Drives the home * page's user-avatar circles inside the Draft * badge. Omitted when no drafts exist. * */ draft_users?: Array<{ username?: string | null; }>; })>; }; }; }; '/w/{workspace}/flows/history/p/{path}': { get: { req: { /** * which page to return (start at 1, default 1) */ page?: number; path: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; res: { /** * Flow history */ 200: Array; }; }; }; '/w/{workspace}/flows/get_latest_version/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * Flow version */ 200: FlowVersion; }; }; }; '/w/{workspace}/flows/list_paths_from_workspace_runnable/{runnable_kind}/{path}': { get: { req: { matchPathStart?: boolean; path: string; runnableKind: 'script' | 'flow'; workspace: string; }; res: { /** * list of flow paths */ 200: Array<(string)>; }; }; }; '/w/{workspace}/flows/list_paths_linking_agent/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * paths of the flows linking the `ai_agent` resource, as of their last deploy */ 200: Array<(string)>; }; }; }; '/w/{workspace}/flows/get/v/{version}': { get: { req: { version: number; workspace: string; }; res: { /** * flow details */ 200: Flow; }; }; }; '/w/{workspace}/flows/history_update/v/{version}': { post: { req: { /** * Flow deployment message */ requestBody: { deployment_msg: string; }; version: number; workspace: string; }; res: { /** * success */ 200: string; }; }; }; '/w/{workspace}/flows/get/{path}': { get: { req: { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; withStarredInfo?: boolean; workspace: string; }; res: { /** * flow details */ 200: Flow & UserDraftOverlay; }; }; }; '/w/{workspace}/flows/deployment_status/p/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * flow status */ 200: { lock_error_logs?: string; job_id?: string; }; }; }; }; '/w/{workspace}/flows/get_triggers_count/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * triggers count */ 200: TriggersCount; }; }; }; '/w/{workspace}/flows/list_tokens/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * tokens list */ 200: Array; }; }; }; '/w/{workspace}/flows/toggle_workspace_error_handler/{path}': { post: { req: { path: string; /** * Workspace error handler enabled */ requestBody: { muted?: boolean; }; workspace: string; }; res: { /** * error handler toggled */ 200: string; }; }; }; '/w/{workspace}/flows/exists/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * flow details */ 200: boolean; }; }; }; '/w/{workspace}/flows/create': { post: { req: { /** * Partially filled flow */ requestBody: OpenFlowWPath & { deployment_message?: string; /** * When true (set by the CLI / git sync), deploying this flow does not delete an existing user draft at the same path. */ skip_draft_deletion?: boolean; }; workspace: string; }; res: { /** * flow created */ 201: string; }; }; }; '/w/{workspace}/flows/update/{path}': { post: { req: { path: string; /** * Partially filled flow */ requestBody: EditFlow & { deployment_message?: string; /** * When true (set by the CLI / git sync), deploying this flow does not delete an existing user draft at the same path. */ skip_draft_deletion?: boolean; }; workspace: string; }; res: { /** * flow updated */ 200: string; }; }; }; '/w/{workspace}/flows/archive/{path}': { post: { req: { path: string; /** * archiveFlow */ requestBody: { archived?: boolean; }; workspace: string; }; res: { /** * flow archived */ 200: string; }; }; }; '/w/{workspace}/flows/delete/{path}': { delete: { req: { /** * keep captures */ keepCaptures?: boolean; path: string; workspace: string; }; res: { /** * flow delete */ 200: string; }; }; }; '/apps/hub/list': { get: { res: { /** * hub apps list */ 200: { apps?: Array<{ id: number; app_id: number; summary: string; apps: Array<(string)>; approved: boolean; votes: number; }>; }; }; }; }; '/apps/hub/get/{id}': { get: { req: { id: number; }; res: { /** * app */ 200: { app: { summary: string; value: unknown; }; }; }; }; }; '/apps/hub/get_raw/{id}': { get: { req: { id: number; }; res: { /** * raw app */ 200: { app: { summary: string; value: unknown; }; }; }; }; }; '/apps_u/guest_entry_by_custom_path/{custom_path}': { get: { req: { customPath: string; }; res: { /** * the app is open to guests */ 200: GuestEntry; }; }; }; '/apps_u/public_app_by_custom_path/{custom_path}': { get: { req: { customPath: string; }; res: { /** * app details */ 200: AppWithLastVersion & { workspace_id?: string; }; }; }; }; '/apps_u/embed_token_by_custom_path/{custom_path}': { get: { req: { customPath: string; /** * Raw apps: the viewer confirmed the frontend-SDK permissions consent banner, so the viewer-scoped SDK token may actually be minted. Without it the response only advertises the declared sdk_scopes. * */ sdkConsent?: boolean; }; res: { /** * embed token */ 200: EmbedTokenResponse; }; }; }; '/w/{workspace}/apps/get_data/v/{secretWithExtension}': { get: { req: { /** * App version secret suffixed with the requested file type extension. Supported extensions are `.js` (JavaScript bundle), `.css` (stylesheet), and `.html` (sandboxed wrapper document). */ secretWithExtension: string; workspace: string; }; res: { /** * app details */ 200: string; }; }; }; '/w/{workspace}/apps/list_search': { get: { req: { workspace: string; }; res: { /** * app list */ 200: Array<{ path: string; value: unknown; }>; }; }; }; '/w/{workspace}/apps/list': { get: { req: { /** * filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') */ createdBy?: string; /** * (default false) * include items that have no deployed version * */ includeDraftOnly?: boolean; /** * Filter by label */ label?: string; /** * order by desc order (default true) */ orderDesc?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * mask to filter exact matching path */ pathExact?: string; /** * mask to filter matching starting path */ pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * (default false) * show only the starred items * */ starredOnly?: boolean; /** * (default false) * include deployment message * */ withDeploymentMsg?: boolean; workspace: string; }; res: { /** * All apps */ 200: Array; }; }; }; '/w/{workspace}/apps/create': { post: { req: { /** * new app */ requestBody: { path: string; value: unknown; summary: string; policy: Policy; deployment_message?: string; custom_path?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original on_behalf_of value in the policy instead of overwriting it. */ preserve_on_behalf_of?: boolean; labels?: Array<(string)>; /** * When true (set by the CLI / git sync), deploying this app does not delete an existing user draft at the same path. */ skip_draft_deletion?: boolean; }; workspace: string; }; res: { /** * app created */ 201: string; }; }; }; '/w/{workspace}/apps/create_raw': { post: { req: { /** * new app */ formData: { app?: { path: string; value: unknown; summary: string; policy: Policy; deployment_message?: string; custom_path?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original on_behalf_of value in the policy instead of overwriting it. */ preserve_on_behalf_of?: boolean; labels?: Array<(string)>; /** * When true (set by the CLI / git sync), deploying this app does not delete an existing user draft at the same path. */ skip_draft_deletion?: boolean; }; js?: string; css?: string; }; workspace: string; }; res: { /** * app created */ 201: string; }; }; }; '/w/{workspace}/apps/exists/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * app exists */ 200: boolean; }; }; }; '/w/{workspace}/apps/get/p/{path}': { get: { req: { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; /** * When no deployed app exists at this path and `get_draft` is set, * disambiguates which draft kind (`raw_app` or `app`) to look up. * Ignored when a deployed row exists. * */ rawApp?: boolean; withStarredInfo?: boolean; workspace: string; }; res: { /** * app details */ 200: AppWithLastVersion & UserDraftOverlay; }; }; }; '/w/{workspace}/apps/preview_sdk_token': { post: { req: { requestBody: { /** * App being edited; may not be deployed yet. */ path: string; /** * Scopes from the policy being edited. Capped by the curated allowlist and by the caller's own scopes, and minted as the caller, so it grants nothing they could not mint themselves. * */ scopes: Array<(string)>; }; workspace: string; }; res: { /** * the token */ 200: string; }; }; }; '/w/{workspace}/apps/embed_token/p/{path}': { get: { req: { path: string; /** * Raw apps: the viewer confirmed the frontend-SDK permissions consent banner, so the viewer-scoped SDK token may actually be minted. Without it the response only advertises the declared sdk_scopes. * */ sdkConsent?: boolean; workspace: string; }; res: { /** * embed token */ 200: EmbedTokenResponse; }; }; }; '/w/{workspace}/apps/get/lite/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * app lite details */ 200: AppWithLastVersion; }; }; }; '/w/{workspace}/apps/history/p/{path}': { get: { req: { /** * which page to return (start at 1, default 1) */ page?: number; path: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; res: { /** * app history */ 200: Array; }; }; }; '/w/{workspace}/apps/get_latest_version/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * App version */ 200: AppHistory; }; }; }; '/w/{workspace}/apps/list_paths_from_workspace_runnable/{runnable_kind}/{path}': { get: { req: { path: string; runnableKind: 'script' | 'flow'; workspace: string; }; res: { /** * list of app paths */ 200: Array<(string)>; }; }; }; '/w/{workspace}/apps/history_update/a/{id}/v/{version}': { post: { req: { id: number; /** * App deployment message */ requestBody: { deployment_msg?: string; }; version: number; workspace: string; }; res: { /** * success */ 200: string; }; }; }; '/w/{workspace}/apps_u/guest_entry/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * the app is open to guests */ 200: GuestEntry; }; }; }; '/w/{workspace}/apps_u/public_app/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * app details */ 200: AppWithLastVersion; }; }; }; '/w/{workspace}/apps_u/embed_token/{secret}': { get: { req: { /** * Raw apps: the viewer confirmed the frontend-SDK permissions consent banner, so the viewer-scoped SDK token may actually be minted. Without it the response only advertises the declared sdk_scopes. * */ sdkConsent?: boolean; secret: string; workspace: string; }; res: { /** * embed token */ 200: EmbedTokenResponse; }; }; }; '/w/{workspace}/apps_u/public_resource/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * resource value */ 200: unknown; }; }; }; '/w/{workspace}/apps/secret_of/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * app secret */ 200: string; }; }; }; '/w/{workspace}/apps/secret_of_latest_version/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * app secret */ 200: string; }; }; }; '/w/{workspace}/apps/get/v/{id}': { get: { req: { id: number; workspace: string; }; res: { /** * app details */ 200: AppWithLastVersion; }; }; }; '/w/{workspace}/apps/delete/{path}': { delete: { req: { path: string; workspace: string; }; res: { /** * app deleted */ 200: string; }; }; }; '/w/{workspace}/apps/update/{path}': { post: { req: { path: string; /** * update app */ requestBody: { path?: string; summary?: string; value?: unknown; policy?: Policy; deployment_message?: string; custom_path?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original on_behalf_of value in the policy instead of overwriting it. */ preserve_on_behalf_of?: boolean; labels?: Array<(string)>; /** * When true (set by the CLI / git sync), deploying this app does not delete an existing user draft at the same path. */ skip_draft_deletion?: boolean; /** * When true, this deploy may switch the app between low-code and raw. Without it, deploying a value to an app of the other kind is refused so an app is never converted by accident. */ allow_kind_change?: boolean; }; workspace: string; }; res: { /** * app updated */ 200: AppDeployed; }; }; }; '/w/{workspace}/apps/create_raw_source': { post: { req: { /** * raw app sources to bundle and deploy */ requestBody: { path: string; summary: string; /** * The raw app's value. `files` maps each source path to its content and must contain an entry point; `runnables` and `data` are carried through unchanged. */ value: { files: { [key: string]: (string); }; runnables?: { [key: string]: unknown; }; data?: { [key: string]: unknown; }; }; policy: Policy; deployment_message?: string; custom_path?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original on_behalf_of value in the policy instead of overwriting it. */ preserve_on_behalf_of?: boolean; labels?: Array<(string)>; /** * When true (set by the CLI / git sync), deploying this app does not delete an existing user draft at the same path. */ skip_draft_deletion?: boolean; }; workspace: string; }; res: { /** * app created */ 201: string; }; }; }; '/w/{workspace}/apps/update_raw_source/{path}': { post: { req: { path: string; /** * raw app sources to bundle and deploy */ requestBody: { path?: string; summary?: string; /** * The raw app's value. `files` maps each source path (e.g. `/index.tsx`, `/App.tsx`, `/package.json`) to its content and must contain an entry point (`/index.tsx`, `/index.ts` or `/index.js`); `runnables` and `data` are carried through unchanged. */ value: { files: { [key: string]: (string); }; runnables?: { [key: string]: unknown; }; data?: { [key: string]: unknown; }; }; policy?: Policy; deployment_message?: string; custom_path?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original on_behalf_of value in the policy instead of overwriting it. */ preserve_on_behalf_of?: boolean; labels?: Array<(string)>; /** * When true (set by the CLI / git sync), deploying this app does not delete an existing user draft at the same path. */ skip_draft_deletion?: boolean; /** * When true, this deploy may switch the app between low-code and raw. Without it, deploying a value to an app of the other kind is refused so an app is never converted by accident. */ allow_kind_change?: boolean; }; workspace: string; }; res: { /** * app updated */ 200: AppDeployed; }; }; }; '/w/{workspace}/apps/update_raw/{path}': { post: { req: { /** * update app */ formData: { app?: { path?: string; summary?: string; value?: unknown; policy?: Policy; deployment_message?: string; custom_path?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original on_behalf_of value in the policy instead of overwriting it. */ preserve_on_behalf_of?: boolean; labels?: Array<(string)>; /** * When true (set by the CLI / git sync), deploying this app does not delete an existing user draft at the same path. */ skip_draft_deletion?: boolean; /** * When true, this deploy may switch the app between low-code and raw. Without it, deploying a value to an app of the other kind is refused so an app is never converted by accident. */ allow_kind_change?: boolean; }; js?: string; css?: string; }; path: string; workspace: string; }; res: { /** * app updated */ 200: AppDeployed; }; }; }; '/w/{workspace}/apps/custom_path_exists/{custom_path}': { get: { req: { customPath: string; workspace: string; }; res: { /** * custom path exists */ 200: boolean; }; }; }; '/w/{workspace}/apps/sign_s3_objects': { post: { req: { /** * s3 objects to sign */ requestBody: { s3_objects: Array; /** * how long the signature stays valid, in seconds. Defaults to 43200 (12h) and is clamped server-side to [60, 604800] (1 minute to 7 days). */ expiry_secs?: number; }; workspace: string; }; res: { /** * signed s3 objects */ 200: Array; }; }; }; '/w/{workspace}/apps_u/execute_component/{path}': { post: { req: { path: string; /** * update app */ requestBody: { component: string; path?: string; version?: number; args: unknown; raw_code?: { content: string; language: string; path?: string; lock?: string; cache_ttl?: number; tag?: string; }; id?: number; force_viewer_static_fields?: { [key: string]: unknown; }; force_viewer_one_of_fields?: { [key: string]: unknown; }; force_viewer_allow_user_resources?: Array<(string)>; force_viewer_sensitive_inputs?: Array<(string)>; force_viewer_delete_after_secs?: number; /** * Runnable query parameters */ run_query_params?: { [key: string]: unknown; }; /** * Map of relative-import script path -> temp storage hash. Only honored for inline-script (raw_code) execution so app dev resolves those imports from not-yet-deployed local content. */ temp_script_refs?: { [key: string]: (string); } | null; }; workspace: string; }; res: { /** * job uuid */ 200: string; }; }; }; '/w/{workspace}/apps_u/upload_s3_file/{path}': { post: { req: { contentDisposition?: string; contentType?: string; fileExtension?: string; fileKey?: string; path: string; /** * File content */ requestBody: (Blob | File); resourceType?: string; s3ResourcePath?: string; storage?: string; workspace: string; }; res: { /** * file uploaded */ 200: { file_key: string; delete_token: string; }; }; }; }; '/w/{workspace}/apps_u/delete_s3_file': { delete: { req: { deleteToken: string; workspace: string; }; res: { /** * file deleted */ 200: string; }; }; }; '/w/{workspace}/apps_u/load_file_metadata/{path}': { get: { req: { /** * Expiry timestamp of a presigned S3 object signature */ exp?: string; fileKey: string; path: string; /** * HMAC signature of a presigned S3 object (bypasses the app provenance gate) */ sig?: string; storage?: string; workspace: string; }; res: { /** * FileMetadata */ 200: WindmillFileMetadata; }; }; }; '/w/{workspace}/apps_u/load_file_preview/{path}': { get: { req: { csvHasHeader?: boolean; csvSeparator?: string; /** * Expiry timestamp of a presigned S3 object signature */ exp?: string; fileKey: string; fileMimeType?: string; fileSizeInBytes?: number; path: string; readBytesFrom: number; readBytesLength: number; /** * HMAC signature of a presigned S3 object (bypasses the app provenance gate) */ sig?: string; storage?: string; workspace: string; }; res: { /** * FilePreview */ 200: WindmillFilePreview; }; }; }; '/w/{workspace}/apps_u/load_parquet_preview/{path}': { get: { req: { /** * Expiry timestamp of a presigned S3 object signature */ exp?: string; fileKey: string; limit?: number; offset?: number; path: string; searchCol?: string; searchTerm?: string; /** * HMAC signature of a presigned S3 object (bypasses the app provenance gate) */ sig?: string; sortCol?: string; sortDesc?: boolean; storage?: string; workspace: string; }; res: { /** * Parquet Preview */ 200: unknown; }; }; }; '/w/{workspace}/apps_u/load_csv_preview/{path}': { get: { req: { csvSeparator?: string; /** * Expiry timestamp of a presigned S3 object signature */ exp?: string; fileKey: string; limit?: number; offset?: number; path: string; searchCol?: string; searchTerm?: string; /** * HMAC signature of a presigned S3 object (bypasses the app provenance gate) */ sig?: string; sortCol?: string; sortDesc?: boolean; storage?: string; workspace: string; }; res: { /** * Csv Preview */ 200: unknown; }; }; }; '/w/{workspace}/apps_u/load_table_count/{path}': { get: { req: { /** * Expiry timestamp of a presigned S3 object signature */ exp?: string; fileKey: string; path: string; searchCol?: string; searchTerm?: string; /** * HMAC signature of a presigned S3 object (bypasses the app provenance gate) */ sig?: string; storage?: string; workspace: string; }; res: { /** * Table count */ 200: { count?: number; }; }; }; }; '/w/{workspace}/apps_u/download_s3_parquet_file_as_csv/{path}': { get: { req: { /** * Expiry timestamp of a presigned S3 object signature */ exp?: string; fileKey: string; path: string; /** * HMAC signature of a presigned S3 object (bypasses the app provenance gate) */ sig?: string; storage?: string; workspace: string; }; res: { /** * The downloaded file */ 200: string; }; }; }; '/scripts/hub/get/{path}': { get: { req: { path: string; }; res: { /** * script details */ 200: string; }; }; }; '/scripts/hub/get_full/{path}': { get: { req: { path: string; }; res: { /** * script details */ 200: { content: string; lockfile?: string; schema?: unknown; language: string; summary?: string; }; }; }; }; '/scripts/hub/pick/{path}': { get: { req: { path: string; }; res: { /** * script pick recorded */ 200: { success: boolean; }; }; }; }; '/scripts/hub/top': { get: { req: { /** * query scripts app */ app?: string; /** * query scripts kind */ kind?: string; /** * query limit */ limit?: number; }; res: { /** * hub scripts list */ 200: { asks?: Array<{ id: number; ask_id: number; summary: string; app: string; version_id: number; kind: HubScriptKind; votes: number; views: number; }>; }; }; }; }; '/embeddings/query_hub_scripts': { get: { req: { /** * query scripts app */ app?: string; /** * query scripts kind */ kind?: string; /** * query limit */ limit?: number; /** * query text */ text: string; }; res: { /** * script details */ 200: Array<{ ask_id: number; id: number; version_id: number; summary: string; app: string; kind: HubScriptKind; score: number; }>; }; }; }; '/w/{workspace}/scripts/list_search': { get: { req: { workspace: string; }; res: { /** * script list */ 200: Array<{ path: string; content: string; }>; }; }; }; '/w/{workspace}/scripts/list': { get: { req: { /** * filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') */ createdBy?: string; /** * (default regardless) * If true, show only scripts with dedicated_worker enabled. * If false, show only scripts with dedicated_worker disabled. * */ dedicatedWorker?: boolean; /** * mask to filter scripts whom first direct parent has exact hash */ firstParentHash?: string; /** * (default false) * include scripts that have no deployed version * */ includeDraftOnly?: boolean; /** * (default false) * include scripts without an exported main function * */ includeWithoutMain?: boolean; /** * (default regardless) * if true show only the templates * if false show only the non templates * if not defined, show all regardless of if the script is a template * */ isTemplate?: boolean; /** * (default regardless) * script kinds to filter, split by comma * */ kinds?: string; /** * Filter by label */ label?: string; /** * Filter to only include scripts written in the given languages. * Accepts multiple values as a comma-separated list. * */ languages?: string; /** * mask to filter scripts whom last parent in the chain has exact hash. * Beware that each script stores only a limited number of parents. Hence * the last parent hash for a script is not necessarily its top-most parent. * To find the top-most parent you will have to jump from last to last hash * until finding the parent * */ lastParentHash?: string; /** * order by desc order (default true) */ orderDesc?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * is the hash present in the array of stored parent hashes for this script. * The same warning applies than for last_parent_hash. A script only store a * limited number of direct parent * */ parentHash?: string; /** * mask to filter exact matching path */ pathExact?: string; /** * mask to filter matching starting path */ pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * (default false) * show only the archived files. * when multiple archived hash share the same path, only the ones with the latest create_at * are * ed. * */ showArchived?: boolean; /** * (default false) * show only the starred items * */ starredOnly?: boolean; /** * (default false) * include deployment message * */ withDeploymentMsg?: boolean; /** * (default false) * If true, the description field will be omitted from the response. * */ withoutDescription?: boolean; workspace: string; }; res: { /** * All scripts */ 200: Array<(Script & { /** * True when the authed user has a draft for this * script — either no deployed row exists at this * path (draft-only) or the user saved a per-user * draft on top of the deployed row. * */ is_draft?: boolean; /** * User-typed path the editor has staged but not * yet deployed. Surfaced for draft-only rows so * the home list can render the meaningful name * instead of the autogenerated * `u/{user}/draft_{uuid}` URL path. Omitted * when unchanged. * */ draft_path?: string; /** * Workspace users (including the authed user, and * the legacy NULL-email row if any) who have a * per-user draft at this path. Drives the home * page's user-avatar circles inside the Draft * badge. Omitted when no drafts exist. * */ draft_users?: Array<{ username?: string | null; }>; })>; }; }; }; '/w/{workspace}/scripts/list_paths': { get: { req: { workspace: string; }; res: { /** * list of script paths */ 200: Array<(string)>; }; }; }; '/w/{workspace}/scripts/create': { post: { req: { /** * Partially filled script */ requestBody: NewScript; workspace: string; }; res: { /** * script created */ 201: string; }; }; }; '/w/{workspace}/scripts/update/{path}': { post: { req: { path: string; /** * The new version of the script, whose `path` is where it should end up. */ requestBody: NewScript; workspace: string; }; res: { /** * new script version created */ 201: string; }; }; }; '/w/{workspace}/scripts/toggle_workspace_error_handler/p/{path}': { post: { req: { path: string; /** * Workspace error handler enabled */ requestBody: { muted?: boolean; }; workspace: string; }; res: { /** * error handler toggled */ 200: string; }; }; }; '/w/{workspace}/scripts/archive/p/{path}': { post: { req: { path: string; workspace: string; }; res: { /** * script archived */ 200: string; }; }; }; '/w/{workspace}/scripts/archive/h/{hash}': { post: { req: { hash: string; workspace: string; }; res: { /** * script details */ 200: Script; }; }; }; '/w/{workspace}/scripts/delete/h/{hash}': { post: { req: { hash: string; workspace: string; }; res: { /** * script details */ 200: Script; }; }; }; '/w/{workspace}/scripts/delete/p/{path}': { post: { req: { /** * keep captures */ keepCaptures?: boolean; path: string; workspace: string; }; res: { /** * script path */ 200: string; }; }; }; '/w/{workspace}/scripts/delete_bulk': { delete: { req: { /** * paths to delete */ requestBody: { paths: Array<(string)>; }; workspace: string; }; res: { /** * deleted paths */ 200: Array<(string)>; }; }; }; '/w/{workspace}/scripts/get/p/{path}': { get: { req: { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; withStarredInfo?: boolean; workspace: string; }; res: { /** * script details */ 200: Script & UserDraftOverlay; }; }; }; '/w/{workspace}/scripts/get_triggers_count/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * triggers count */ 200: TriggersCount; }; }; }; '/w/{workspace}/scripts/list_tokens/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * tokens list */ 200: Array; }; }; }; '/w/{workspace}/scripts/history/p/{path}': { get: { req: { /** * which page to return (start at 1, default 1) */ page?: number; path: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; res: { /** * script history */ 200: Array; }; }; }; '/w/{workspace}/scripts/list_paths_from_workspace_runnable/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * list of script paths */ 200: Array<(string)>; }; }; }; '/w/{workspace}/scripts/get_latest_version/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * Script version/hash */ 200: ScriptHistory; }; }; }; '/w/{workspace}/scripts/history_update/h/{hash}/p/{path}': { post: { req: { hash: string; path: string; /** * Script deployment message */ requestBody: { deployment_msg?: string; }; workspace: string; }; res: { /** * success */ 200: string; }; }; }; '/w/{workspace}/scripts/list_dedicated_with_deps': { get: { req: { workspace: string; }; res: { /** * list of dedicated scripts with their workspace dependency names */ 200: Array<{ path: string; language: 'python3' | 'deno' | 'go' | 'bash' | 'powershell' | 'postgresql' | 'mysql' | 'bigquery' | 'snowflake' | 'mssql' | 'graphql' | 'nativets' | 'bun' | 'bunnative' | 'php' | 'rust' | 'ansible' | 'csharp' | 'oracledb' | 'duckdb' | 'java' | 'ruby'; workspace_dep_names: Array<(string)>; }>; }; }; }; '/w/{workspace}/scripts/raw/p/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * script content */ 200: string; }; }; }; '/scripts_u/tokened_raw/{workspace}/{token}/{path}': { get: { req: { path: string; token: string; workspace: string; }; res: { /** * script content */ 200: string; }; }; }; '/w/{workspace}/scripts/exists/p/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * does it exists */ 200: boolean; }; }; }; '/w/{workspace}/scripts/get/h/{hash}': { get: { req: { authed?: boolean; hash: string; withStarredInfo?: boolean; workspace: string; }; res: { /** * script details */ 200: Script; }; }; }; '/w/{workspace}/scripts/raw/h/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * script content */ 200: string; }; }; }; '/w/{workspace}/scripts/deployment_status/h/{hash}': { get: { req: { hash: string; workspace: string; }; res: { /** * script details */ 200: { lock?: string; lock_error_logs?: string; job_id?: string; }; }; }; }; '/w/{workspace}/scripts/ci_test_results/{kind}/{path}': { get: { req: { kind: 'script' | 'flow' | 'resource'; path: string; workspace: string; }; res: { /** * CI test results */ 200: Array; }; }; }; '/w/{workspace}/scripts/ci_test_results_batch': { post: { req: { requestBody: { items: Array<{ path: string; kind: 'script' | 'flow' | 'resource'; }>; }; workspace: string; }; res: { /** * CI test results by item key */ 200: { [key: string]: Array; }; }; }; }; '/w/{workspace}/scripts/check_schema_contracts': { post: { req: { requestBody: { language: ScriptLang; content: string; }; workspace: string; }; res: { /** * contract warnings (empty when all references match) */ 200: { warnings: Array; }; }; }; }; '/w/{workspace}/scripts/raw_temp/store': { post: { req: { /** * script content to store */ requestBody: string; workspace: string; }; res: { /** * hash of stored content */ 200: string; }; }; }; '/w/{workspace}/scripts/raw_temp/diff': { post: { req: { /** * scripts and workspace deps to diff against deployed versions */ requestBody: { /** * map of script path to SHA256 content hash */ scripts: { [key: string]: (string); }; /** * workspace dependencies to diff */ workspace_deps?: Array<{ /** * CLI path (e.g. dependencies/package.json) */ path: string; language: ScriptLang; /** * named workspace dependency (null for default) */ name?: string; /** * SHA256 content hash */ hash: string; }>; }; workspace: string; }; res: { /** * list of paths that differ from deployed versions */ 200: Array<(string)>; }; }; }; '/w/{workspace}/runnables/list': { get: { req: { /** * opaque keyset cursor from a previous page's next_cursor */ cursor?: string; /** * also list the caller's drafts at paths with no deployed row, sorted and paginated with the deployed ones. Ignored for operators, in the archived view, and under a label filter (a draft carries no labels). */ includeDraftOnly?: boolean; /** * include library scripts (no runnable main) */ includeWithoutMain?: boolean; /** * comma-separated subset of script,flow,app (default all) */ kinds?: string; label?: string; /** * sort key: 'updated' (default) or 'name' */ orderBy?: 'updated' | 'name'; /** * order by desc order (default true) */ orderDesc?: boolean; /** * restrict to paths under this prefix */ pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * case-insensitive fuzzy match on "summary (path)": the query is split into terms on runs of anything but ASCII letters, digits and apostrophes, and each of the first 8 must appear whole and in order, with anything in between. Terms past the 8th are ignored, so an over-long query matches more rows rather than fewer. Omitted or empty filters nothing; a query holding no ASCII-alphanumeric character at all (a lone space, "_", or text in a non-Latin script) yields no terms and matches nothing, mirroring the homepage, whose matcher discards those queries too. */ search?: string; showArchived?: boolean; workspace: string; }; res: { /** * a page of merged, ordered runnables */ 200: { items: Array; next_cursor?: string; }; }; }; }; '/w/{workspace}/runnables/counts': { get: { req: { /** * also count the caller's drafts at paths with no deployed row, matching the same flag on /runnables/list */ includeDraftOnly?: boolean; /** * include library scripts (no runnable main) */ includeWithoutMain?: boolean; /** * comma-separated subset of script,flow,app (default all) */ kinds?: string; workspace: string; }; res: { /** * number of runnables per owner prefix, empty owners omitted. Excludes data-pipeline member scripts, which are listed as their folder's single pipeline entry rather than as runnables. */ 200: { /** * owner prefix (f/ or u/) to count */ counts: { [key: string]: (number); }; }; }; }; }; '/w/{workspace}/drafts/list': { get: { req: { /** * List every draft in the workspace (all users), not just the current user's own + legacy rows. Other users' rows come back with `mine=false` (view-only). */ allUsers?: boolean; /** * A fork passes its parent workspace id here to have each row flagged with `unchanged_from_parent`. Ignored unless it is exactly this workspace's parent. */ compareToWorkspace?: string; workspace: string; }; res: { /** * the user's drafts */ 200: Array<{ kind: UserDraftItemKind; path: string; /** * Best-effort, read from the draft JSON's `summary` field when the editor shape carries one. */ summary?: string; /** * User-typed friendly path from the draft JSON's `draft_path`, when set and different from the storage path (e.g. a never-deployed item parked at `u/{user}/draft_{uuid}`). */ draft_path?: string; /** * No deployed counterpart exists at this path — the draft is the whole item. */ draft_only: boolean; /** * The listed draft is a legacy workspace-level row (email NULL) predating the per-user drafts migration. Only true when no per-user draft exists at this path. */ legacy_draft: boolean; created_at: string; /** * Whether the current user may deploy/discard this draft (same check the deploy/discard endpoints enforce). */ can_write: boolean; /** * The row belongs to the current user (own draft or the legacy no-owner row) and is therefore actionable. Always true in the default listing; with `all_users=true`, other users' rows are false (view-only). */ mine: boolean; /** * Only present when `compare_to_workspace` was passed. True when this draft is identical to the parent's draft at the same path/kind/owner (cloned in on fork and never edited here). */ unchanged_from_parent?: boolean; /** * Draft authors at this (path, kind) — the legacy NULL-email row surfaced as a null username. * Populated only for the shared full-page-editor kinds (script/flow/app/raw_app); omitted for * drawer kinds, which keep their drafts private. Feeds the Draft badge's owner-avatar circles. * */ draft_users?: Array<{ username?: string | null; }>; }>; }; }; }; '/w/{workspace}/drafts/get/{kind}/{path}': { get: { req: { kind: UserDraftItemKind; path: string; /** * Workspace username of the draft owner. Omit to fetch the legacy workspace-level (NULL email) row. */ username?: string; workspace: string; }; res: { /** * draft content */ 200: { value: unknown; created_at: string; }; /** * no draft for that owner at that path */ 404: unknown; }; }; }; '/w/{workspace}/drafts/get_own/{kind}/{path}': { get: { req: { kind: UserDraftItemKind; path: string; workspace: string; }; res: { /** * the user's draft content, or null when none exists */ 200: { value: unknown; created_at: string; } | null; }; }; }; '/w/{workspace}/drafts/update/{kind}/{path}': { post: { req: { kind: UserDraftItemKind; path: string; requestBody: { /** * Draft content to save. `null` (or omitted) signals a delete — the row is removed under the same conflict rules. */ value?: unknown; /** * Server timestamp of the client's last known sync for this draft. Omit on first save. */ last_sync?: string; /** * Skip the conflict check and overwrite the server copy. */ force?: boolean; /** * Delete-only. Target the legacy workspace-level row (email NULL) instead of the current user's row. Used to discard a legacy draft from the review page. */ legacy?: boolean; /** * Upsert-only override for the stored creation timestamp. Normal saves omit it (stamped server-side); the localStorage→DB migration passes the draft's original write time so migrated drafts keep their age. */ created_at?: string; }; workspace: string; }; res: { /** * save result */ 200: { status: 'saved' | 'conflict'; current_timestamp: string; /** * `saved` only, upsert or delete: where the write landed. Differs from the URL path when the item had moved away from it; the editor follows it there. Absent when a delete found nothing to remove and the caller cannot read the path it moved to. */ path?: string; }; }; }; }; '/w/{workspace}/drafts/move/{kind}/{path}': { post: { req: { /** * script, flow, app or raw_app only. */ kind: 'script' | 'flow' | 'app' | 'raw_app'; path: string; requestBody: { new_path: string; /** * Also restate the draft's summary. */ summary?: string; }; workspace: string; }; res: { /** * move result */ 200: string; }; }; }; '/w/{workspace}/drafts/migrate_legacy/{kind}/{path}': { post: { req: { kind: UserDraftItemKind; path: string; requestBody: { /** * delete the legacy draft, or take ownership of it. */ action: 'delete' | 'assign_to_self'; }; workspace: string; }; res: { /** * migration result */ 200: string; }; }; }; '/workers/custom_tags': { get: { req: { showWorkspaceRestriction?: boolean; }; res: { /** * list of custom tags */ 200: Array<(string)>; }; }; }; '/w/{workspace}/workers/custom_tags': { get: { req: { workspace: string; }; res: { /** * list of custom tags for workspace */ 200: Array<(string)>; }; }; }; '/workers/get_default_tags': { get: { res: { /** * list of default tags */ 200: Array<(string)>; }; }; }; '/workers/is_default_tags_per_workspace': { get: { res: { /** * is the default tags per workspace */ 200: boolean; }; }; }; '/workers/list': { get: { req: { /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * number of seconds the worker must have had a last ping more recent of (default to 300) */ pingSince?: number; }; res: { /** * a list of workers */ 200: Array; }; }; }; '/workers/exists_workers_with_tags': { get: { req: { /** * comma separated list of tags */ tags: string; /** * workspace to filter tags visibility (required when TAGS_ARE_SENSITIVE is enabled for non-superadmins) */ workspace?: string; }; res: { /** * map of tags to whether at least one worker with the tag exists */ 200: { [key: string]: (boolean); }; }; }; }; '/workers/queue_metrics': { get: { res: { /** * metrics */ 200: Array<{ id: string; values: Array<{ created_at: string; value: number; }>; }>; }; }; }; '/workers/queue_metrics_series': { get: { req: { /** * how far back to read, in seconds (defaults to one day, capped at the 14-day retention) */ windowSecs?: number; }; res: { /** * jobs waiting and queue delay per tag, as the vertices of lines joined by straight segments */ 200: { /** * start of the window, in epoch milliseconds */ from: number; /** * end of the window, in epoch milliseconds */ to: number; tags: Array<{ tag: string; /** * [epoch ms, jobs waiting more than 3 seconds] vertices */ count: Array>; /** * [epoch ms, seconds the next job has waited] vertices */ delay: Array>; }>; }; }; }; }; '/workers/queue_status': { get: { res: { /** * queue status per tag */ 200: Array<{ tag: string; /** * jobs due for more than 3 seconds that no worker has picked up */ waiting: number; /** * seconds the job the next pull would take has been waiting, absent when none is */ delay?: number; running: number; /** * workers that pinged in the last minute and pull this tag */ workers: number; }>; }; }; }; '/workers/queue_counts': { get: { res: { /** * queue counts */ 200: { [key: string]: (number); }; }; }; }; '/workers/queue_running_counts': { get: { res: { /** * queue running counts */ 200: { [key: string]: (number); }; }; }; }; '/workers/workspace_fairness_events': { get: { res: { /** * workspace fairness events (empty on non-cloud) */ 200: Array<{ timestamp: string; operation: string; workspace_id?: string | null; parameters?: { [key: string]: unknown; } | null; }>; }; }; }; '/w/{workspace}/workspace_dependencies/create': { post: { req: { /** * New workspace dependencies */ requestBody: NewWorkspaceDependencies; workspace: string; }; res: { /** * workspace dependencies created */ 201: string; }; }; }; '/w/{workspace}/workspace_dependencies/archive/{language}': { post: { req: { language: ScriptLang; name?: string; workspace: string; }; res: { /** * result */ 200: unknown; }; }; }; '/w/{workspace}/workspace_dependencies/delete/{language}': { post: { req: { language: ScriptLang; name?: string; workspace: string; }; res: { /** * result */ 200: unknown; }; }; }; '/w/{workspace}/workspace_dependencies/list': { get: { req: { workspace: string; }; res: { /** * All workspace dependencies */ 200: Array; }; }; }; '/w/{workspace}/workspace_dependencies/get_latest/{language}': { get: { req: { language: ScriptLang; name?: string; workspace: string; }; res: { /** * Latest workspace dependencies */ 200: WorkspaceDependencies; }; }; }; '/w/{workspace}/jobs/list_selected_job_groups': { post: { req: { /** * script args */ requestBody: Array<(string)>; workspace: string; }; res: { /** * result */ 200: Array<{ kind: 'script' | 'flow'; script_path: string; latest_schema: { [key: string]: unknown; }; schemas: Array<{ schema: { [key: string]: unknown; }; script_hash: string; job_ids: Array<(string)>; }>; }>; }; }; }; '/w/{workspace}/jobs/run/p/{path}': { post: { req: { /** * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl */ cacheTtl?: string; /** * make the run invisible to the the script owner (default false) */ invisibleToOwner?: boolean; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; path: string; /** * script args */ requestBody: ScriptArgs; /** * when to schedule this job (leave empty for immediate run) */ scheduledFor?: string; /** * schedule the script to execute in the number of seconds starting now */ scheduledInSecs?: number; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * Override the tag to use */ tag?: string; workspace: string; }; res: { /** * job created */ 201: string; }; }; }; '/w/{workspace}/jobs/run_wait_result/p/{path}': { post: { req: { /** * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl */ cacheTtl?: string; /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; path: string; /** * The maximum size of the queue for which the request would get rejected if that job would push it above that limit * */ queueLimit?: string; /** * script args */ requestBody: ScriptArgs; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * Override the tag to use */ tag?: string; workspace: string; }; res: { /** * job result */ 200: unknown; }; }; get: { req: { /** * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl */ cacheTtl?: string; /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; path: string; /** * The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` * */ payload?: string; /** * The maximum size of the queue for which the request would get rejected if that job would push it above that limit * */ queueLimit?: string; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * Override the tag to use */ tag?: string; workspace: string; }; res: { /** * job result */ 200: unknown; }; }; }; '/w/{workspace}/jobs/run_wait_result/f/{path}': { post: { req: { /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow. */ memoryId?: string; path: string; /** * The maximum size of the queue for which the request would get rejected if that job would push it above that limit * */ queueLimit?: string; /** * script args */ requestBody: ScriptArgs; /** * skip the preprocessor */ skipPreprocessor?: boolean; workspace: string; }; res: { /** * job result */ 200: unknown; }; }; }; '/w/{workspace}/jobs/run_wait_result/fv/{version}': { post: { req: { /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow. */ memoryId?: string; /** * The maximum size of the queue for which the request would get rejected if that job would push it above that limit * */ queueLimit?: string; /** * script args */ requestBody: ScriptArgs; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * flow version ID */ version: number; workspace: string; }; res: { /** * job result */ 200: unknown; }; }; get: { req: { /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow. */ memoryId?: string; /** * The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` * */ payload?: string; /** * The maximum size of the queue for which the request would get rejected if that job would push it above that limit * */ queueLimit?: string; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * flow version ID */ version: number; workspace: string; }; res: { /** * job result */ 200: unknown; }; }; }; '/w/{workspace}/jobs/run_and_stream/f/{path}': { post: { req: { /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow. */ memoryId?: string; path: string; /** * delay between polling for job updates in milliseconds */ pollDelayMs?: number; /** * The maximum size of the queue for which the request would get rejected if that job would push it above that limit * */ queueLimit?: string; /** * flow args */ requestBody: ScriptArgs; /** * skip the preprocessor */ skipPreprocessor?: boolean; workspace: string; }; res: { /** * server-sent events stream of job updates */ 200: string; }; }; get: { req: { /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow. */ memoryId?: string; path: string; /** * The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` * */ payload?: string; /** * delay between polling for job updates in milliseconds */ pollDelayMs?: number; /** * The maximum size of the queue for which the request would get rejected if that job would push it above that limit * */ queueLimit?: string; /** * skip the preprocessor */ skipPreprocessor?: boolean; workspace: string; }; res: { /** * server-sent events stream of job updates */ 200: string; }; }; }; '/w/{workspace}/jobs/run_and_stream/fv/{version}': { post: { req: { /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow. */ memoryId?: string; /** * delay between polling for job updates in milliseconds */ pollDelayMs?: number; /** * The maximum size of the queue for which the request would get rejected if that job would push it above that limit * */ queueLimit?: string; /** * flow args */ requestBody: ScriptArgs; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * flow version ID */ version: number; workspace: string; }; res: { /** * server-sent events stream of job updates */ 200: string; }; }; get: { req: { /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow. */ memoryId?: string; /** * The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` * */ payload?: string; /** * delay between polling for job updates in milliseconds */ pollDelayMs?: number; /** * The maximum size of the queue for which the request would get rejected if that job would push it above that limit * */ queueLimit?: string; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * flow version ID */ version: number; workspace: string; }; res: { /** * server-sent events stream of job updates */ 200: string; }; }; }; '/w/{workspace}/jobs/run_and_stream/p/{path}': { post: { req: { /** * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl */ cacheTtl?: string; /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; path: string; /** * delay between polling for job updates in milliseconds */ pollDelayMs?: number; /** * The maximum size of the queue for which the request would get rejected if that job would push it above that limit * */ queueLimit?: string; /** * script args */ requestBody: ScriptArgs; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * Override the tag to use */ tag?: string; workspace: string; }; res: { /** * server-sent events stream of job updates */ 200: string; }; }; get: { req: { /** * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl */ cacheTtl?: string; /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; path: string; /** * The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` * */ payload?: string; /** * delay between polling for job updates in milliseconds */ pollDelayMs?: number; /** * The maximum size of the queue for which the request would get rejected if that job would push it above that limit * */ queueLimit?: string; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * Override the tag to use */ tag?: string; workspace: string; }; res: { /** * server-sent events stream of job updates */ 200: string; }; }; }; '/w/{workspace}/jobs/run_and_stream/h/{hash}': { post: { req: { /** * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl */ cacheTtl?: string; hash: string; /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; /** * delay between polling for job updates in milliseconds */ pollDelayMs?: number; /** * The maximum size of the queue for which the request would get rejected if that job would push it above that limit * */ queueLimit?: string; /** * script args */ requestBody: ScriptArgs; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * Override the tag to use */ tag?: string; workspace: string; }; res: { /** * server-sent events stream of job updates */ 200: string; }; }; get: { req: { /** * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl */ cacheTtl?: string; hash: string; /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; /** * The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` * */ payload?: string; /** * delay between polling for job updates in milliseconds */ pollDelayMs?: number; /** * The maximum size of the queue for which the request would get rejected if that job would push it above that limit * */ queueLimit?: string; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * Override the tag to use */ tag?: string; workspace: string; }; res: { /** * server-sent events stream of job updates */ 200: string; }; }; }; '/w/{workspace}/jobs/result_by_id/{flow_job_id}/{node_id}': { get: { req: { flowJobId: string; nodeId: string; workspace: string; }; res: { /** * job result */ 200: unknown; }; }; }; '/w/{workspace}/jobs/job_view_token/{id}': { get: { req: { id: string; workspace: string; }; res: { /** * the share read token */ 200: string; }; }; }; '/w/{workspace}/jobs/job_public_view_token/{id}': { get: { req: { id: string; workspace: string; }; res: { /** * the public share read token */ 200: string; }; }; }; '/w/{workspace}/jobs/run/f/{path}': { post: { req: { /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * make the run invisible to the the flow owner (default false) */ invisibleToOwner?: boolean; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow. */ memoryId?: string; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; path: string; /** * flow args */ requestBody: ScriptArgs; /** * when to schedule this job (leave empty for immediate run) */ scheduledFor?: string; /** * schedule the script to execute in the number of seconds starting now */ scheduledInSecs?: number; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * Override the tag to use */ tag?: string; workspace: string; }; res: { /** * job created */ 201: string; }; }; }; '/w/{workspace}/jobs/run/fv/{version}': { post: { req: { /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * make the run invisible to the the flow owner (default false) */ invisibleToOwner?: boolean; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow. */ memoryId?: string; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; /** * flow args */ requestBody: ScriptArgs; /** * when to schedule this job (leave empty for immediate run) */ scheduledFor?: string; /** * schedule the script to execute in the number of seconds starting now */ scheduledInSecs?: number; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * Override the tag to use */ tag?: string; /** * flow version ID */ version: number; workspace: string; }; res: { /** * job created */ 201: string; }; }; }; '/w/{workspace}/jobs/run/batch_rerun_jobs': { post: { req: { /** * list of job ids to re run and arg tranforms */ requestBody: { job_ids: Array<(string)>; script_options_by_path: { [key: string]: { input_transforms?: { [key: string]: InputTransform; }; use_latest_version?: boolean; }; }; flow_options_by_path: { [key: string]: { input_transforms?: { [key: string]: InputTransform; }; use_latest_version?: boolean; }; }; }; workspace: string; }; res: { /** * stream of created job uuids separated by \n. Lines may start with 'Error:' */ 201: string; }; }; }; '/w/{workspace}/jobs/restart/f/{id}': { post: { req: { id: string; /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * make the run invisible to the the flow owner (default false) */ invisibleToOwner?: boolean; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; /** * restart flow parameters */ requestBody: { /** * top-level step id to restart the flow from (or the outermost container when restarting at a nested step) */ step_id: string; /** * for branchall or loop at the top level, the iteration at which the flow should restart (optional) */ branch_or_iteration_n?: number; /** * specific flow version to use for restart (optional, uses current version if not specified) */ flow_version?: number; /** * path of additional steps to descend into AFTER `step_id`. Each entry represents one level of nesting inside the spawned child of the previous level's container (BranchOne / sequential ForLoop iteration / Subflow). When non-empty, the actual restart point is the LAST entry's step_id. */ nested_path?: Array<{ /** * step id at this nesting level */ step_id: string; /** * for ForLoop containers, the iteration to restart at (0-based; iterations 0..n-1 are preserved) */ branch_or_iteration_n?: number; }>; }; /** * when to schedule this job (leave empty for immediate run) */ scheduledFor?: string; /** * schedule the script to execute in the number of seconds starting now */ scheduledInSecs?: number; /** * Override the tag to use */ tag?: string; workspace: string; }; res: { /** * job created */ 201: string; }; }; }; '/w/{workspace}/jobs/run/h/{hash}': { post: { req: { /** * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl */ cacheTtl?: string; hash: string; /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * make the run invisible to the the script owner (default false) */ invisibleToOwner?: boolean; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; /** * Partially filled args */ requestBody: { [key: string]: unknown; }; /** * when to schedule this job (leave empty for immediate run) */ scheduledFor?: string; /** * schedule the script to execute in the number of seconds starting now */ scheduledInSecs?: number; /** * skip the preprocessor */ skipPreprocessor?: boolean; /** * Override the tag to use */ tag?: string; workspace: string; }; res: { /** * job created */ 201: string; }; }; }; '/w/{workspace}/jobs/run/preview': { post: { req: { /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * make the run invisible to the the script owner (default false) */ invisibleToOwner?: boolean; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * preview */ requestBody: Preview; /** * custom timeout in seconds for this preview run */ timeout?: number; workspace: string; }; res: { /** * job created */ 201: string; }; }; }; '/w/{workspace}/jobs/run_inline/preview': { post: { req: { /** * preview */ requestBody: PreviewInline; workspace: string; }; res: { /** * script result */ 200: unknown; }; }; }; '/w/{workspace}/jobs/run_inline/p/{path}': { post: { req: { path: string; /** * script args */ requestBody: InlineScriptArgs; workspace: string; }; res: { /** * script result */ 200: unknown; }; }; }; '/w/{workspace}/jobs/run_inline/h/{hash}': { post: { req: { hash: string; /** * script args */ requestBody: InlineScriptArgs; workspace: string; }; res: { /** * script result */ 200: unknown; }; }; }; '/w/{workspace}/jobs/run_wait_result/preview': { post: { req: { /** * preview */ requestBody: Preview; workspace: string; }; res: { /** * job result */ 200: unknown; }; }; }; '/w/{workspace}/jobs/workflow_as_code/{job_id}/{entrypoint}': { post: { req: { entrypoint: string; jobId: string; /** * preview */ requestBody: WorkflowTask; workspace: string; }; res: { /** * job created */ 201: string; }; }; }; '/w/{workspace}/jobs/run/dependencies': { post: { req: { /** * raw script content */ requestBody: { raw_scripts: Array; entrypoint: string; }; workspace: string; }; res: { /** * dependency job result */ 201: { lock: string; }; }; }; }; '/w/{workspace}/jobs/run/dependencies_async': { post: { req: { /** * raw script content */ requestBody: { raw_scripts: Array; entrypoint: string; }; workspace: string; }; res: { /** * dependency job created */ 201: string; }; }; }; '/w/{workspace}/jobs/run/flow_dependencies_async': { post: { req: { /** * flow value and path */ requestBody: { path: string; flow_value: FlowValue; }; workspace: string; }; res: { /** * flow dependencies job created */ 201: string; }; }; }; '/w/{workspace}/jobs/run/preview_flow': { post: { req: { /** * List of headers's keys (separated with ',') whove value are added to the args * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key * */ includeHeader?: string; /** * make the run invisible to the the script owner (default false) */ invisibleToOwner?: boolean; /** * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) */ jobId?: string; /** * Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow. */ memoryId?: string; /** * preview */ requestBody: FlowPreview; workspace: string; }; res: { /** * job created */ 201: string; }; }; }; '/w/{workspace}/jobs/run_wait_result/preview_flow': { post: { req: { /** * Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow. */ memoryId?: string; /** * preview */ requestBody: FlowPreview; workspace: string; }; res: { /** * job result */ 200: unknown; }; }; }; '/w/{workspace}/jobs/run/dynamic_select': { post: { req: { /** * dynamic select request */ requestBody: DynamicInputData; workspace: string; }; res: { /** * dynamic select job created */ 201: string; }; }; }; '/w/{workspace}/jobs/queue/list': { get: { req: { /** * allow wildcards (*) in the filter of label, tag, worker */ allowWildcards?: boolean; /** * get jobs from all workspaces (only valid if request come from the `admins` workspace) */ allWorkspaces?: boolean; /** * filter on jobs containing those args as a json subset (@> in postgres) */ args?: string; /** * filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') */ createdBy?: string; /** * is not a scheduled job */ isNotSchedule?: boolean; /** * filter by job kind. Supports comma-separated list of values ('preview', 'script', 'dependencies', 'flow') and negation by prefixing all values with '!' (e.g. '!preview,!dependencies') */ jobKinds?: string; /** * order by desc order (default true) */ orderDesc?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * filter on jobs containing those result as a json subset (@> in postgres) */ result?: string; /** * filter on running jobs */ running?: boolean; /** * filter on jobs scheduled_for before now (hence waitinf for a worker) */ scheduledForBeforeNow?: boolean; /** * mask to filter by schedule path */ schedulePath?: string; /** * mask to filter exact matching path */ scriptHash?: string; /** * filter by exact matching script path. Supports comma-separated list (e.g. 'f/script1,f/script2') and negation by prefixing all values with '!' (e.g. '!f/script1,!f/script2') */ scriptPathExact?: string; /** * filter by script path prefix. Supports comma-separated list (e.g. 'f/folder1,f/folder2') and negation by prefixing all values with '!' (e.g. '!f/folder1,!f/folder2') */ scriptPathStart?: string; /** * filter on started after (exclusive) timestamp */ startedAfter?: string; /** * filter on started before (inclusive) timestamp */ startedBefore?: string; /** * filter on successful jobs */ success?: boolean; /** * filter on suspended jobs */ suspended?: boolean; /** * filter by tag/worker group. Supports comma-separated list (e.g. 'gpu,highmem') and negation by prefixing all values with '!' (e.g. '!gpu,!highmem') */ tag?: string; /** * filter by trigger kind. Supports comma-separated list (e.g. 'schedule,webhook') and negation by prefixing all values with '!' (e.g. '!schedule,!webhook') */ triggerKind?: string; /** * filter by trigger path. Supports comma-separated list (e.g. 'f/trigger1,f/trigger2') and negation by prefixing all values with '!' (e.g. '!f/trigger1,!f/trigger2') */ triggerPath?: string; /** * filter by worker this job ran on. Supports comma-separated list (e.g. 'worker-1,worker-2') and negation by prefixing all values with '!' (e.g. '!worker-1,!worker-2') */ worker?: string; workspace: string; }; res: { /** * All queued jobs */ 200: Array; }; }; }; '/w/{workspace}/jobs/queue/count': { get: { req: { /** * get jobs from all workspaces (only valid if request come from the `admins` workspace) */ allWorkspaces?: boolean; workspace: string; }; res: { /** * queue count */ 200: { database_length: number; suspended?: number; }; }; }; }; '/w/{workspace}/jobs/completed/count': { get: { req: { workspace: string; }; res: { /** * completed count */ 200: { database_length: number; }; }; }; }; '/w/{workspace}/jobs/completed/count_jobs': { get: { req: { allWorkspaces?: boolean; completedAfterSAgo?: number; success?: boolean; tags?: string; workspace: string; }; res: { /** * Count of completed jobs */ 200: number; }; }; }; '/w/{workspace}/jobs/list_filtered_uuids': { get: { req: { /** * get jobs from all workspaces (only valid if request come from the `admins` workspace) */ allWorkspaces?: boolean; /** * filter on jobs containing those args as a json subset (@> in postgres) */ args?: string; /** * filter on started after (exclusive) timestamp */ completedAfter?: string; /** * filter on started before (inclusive) timestamp */ completedBefore?: string; /** * filter on created after (exclusive) timestamp */ createdAfter?: string; /** * filter on jobs created after X for jobs in the queue only */ createdAfterQueue?: string; /** * filter on created before (inclusive) timestamp */ createdBefore?: string; /** * filter on jobs created before X for jobs in the queue only */ createdBeforeQueue?: string; /** * filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') */ createdBy?: string; /** * has null parent */ hasNullParent?: boolean; /** * is the job a flow step */ isFlowStep?: boolean; /** * is not a scheduled job */ isNotSchedule?: boolean; /** * is the job skipped */ isSkipped?: boolean; /** * filter by job kind. Supports comma-separated list of values ('preview', 'script', 'dependencies', 'flow') and negation by prefixing all values with '!' (e.g. '!preview,!dependencies') */ jobKinds?: string; /** * filter by exact matching job label. Supports comma-separated list (e.g. 'deploy,release') and negation by prefixing all values with '!' (e.g. '!deploy,!release') */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * filter on whether a failure has been marked as handled. true keeps only resolved failures, false hides them */ resolved?: boolean; /** * filter on jobs containing those result as a json subset (@> in postgres) */ result?: string; /** * filter on running jobs */ running?: boolean; /** * filter on jobs scheduled_for before now (hence waitinf for a worker) */ scheduledForBeforeNow?: boolean; /** * mask to filter by schedule path */ schedulePath?: string; /** * mask to filter exact matching path */ scriptHash?: string; /** * filter by exact matching script path. Supports comma-separated list (e.g. 'f/script1,f/script2') and negation by prefixing all values with '!' (e.g. '!f/script1,!f/script2') */ scriptPathExact?: string; /** * filter by script path prefix. Supports comma-separated list (e.g. 'f/folder1,f/folder2') and negation by prefixing all values with '!' (e.g. '!f/folder1,!f/folder2') */ scriptPathStart?: string; /** * filter on started after (exclusive) timestamp */ startedAfter?: string; /** * filter on started before (inclusive) timestamp */ startedBefore?: string; /** * filter on the exact completed job status. Unlike `success=true` (which also matches `skipped`), `status=success` matches only `success`. */ status?: 'success' | 'failure' | 'canceled' | 'skipped'; /** * filter on successful jobs */ success?: boolean; /** * filter on suspended jobs */ suspended?: boolean; /** * filter by tag/worker group. Supports comma-separated list (e.g. 'gpu,highmem') and negation by prefixing all values with '!' (e.g. '!gpu,!highmem') */ tag?: string; /** * filter by worker this job ran on. Supports comma-separated list (e.g. 'worker-1,worker-2') and negation by prefixing all values with '!' (e.g. '!worker-1,!worker-2') */ worker?: string; workspace: string; }; res: { /** * uuids of jobs */ 200: Array<(string)>; }; }; }; '/w/{workspace}/jobs/queue/list_filtered_uuids': { get: { req: { /** * allow wildcards (*) in the filter of label, tag, worker */ allowWildcards?: boolean; /** * get jobs from all workspaces (only valid if request come from the `admins` workspace) */ allWorkspaces?: boolean; /** * filter on jobs containing those args as a json subset (@> in postgres) */ args?: string; concurrencyKey?: string; /** * filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') */ createdBy?: string; /** * is not a scheduled job */ isNotSchedule?: boolean; /** * filter by job kind. Supports comma-separated list of values ('preview', 'script', 'dependencies', 'flow') and negation by prefixing all values with '!' (e.g. '!preview,!dependencies') */ jobKinds?: string; /** * order by desc order (default true) */ orderDesc?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * filter on jobs containing those result as a json subset (@> in postgres) */ result?: string; /** * filter on running jobs */ running?: boolean; /** * filter on jobs scheduled_for before now (hence waitinf for a worker) */ scheduledForBeforeNow?: boolean; /** * mask to filter by schedule path */ schedulePath?: string; /** * mask to filter exact matching path */ scriptHash?: string; /** * filter by exact matching script path. Supports comma-separated list (e.g. 'f/script1,f/script2') and negation by prefixing all values with '!' (e.g. '!f/script1,!f/script2') */ scriptPathExact?: string; /** * filter by script path prefix. Supports comma-separated list (e.g. 'f/folder1,f/folder2') and negation by prefixing all values with '!' (e.g. '!f/folder1,!f/folder2') */ scriptPathStart?: string; /** * filter on started after (exclusive) timestamp */ startedAfter?: string; /** * filter on started before (inclusive) timestamp */ startedBefore?: string; /** * filter on successful jobs */ success?: boolean; /** * filter on suspended jobs */ suspended?: boolean; /** * filter by tag/worker group. Supports comma-separated list (e.g. 'gpu,highmem') and negation by prefixing all values with '!' (e.g. '!gpu,!highmem') */ tag?: string; workspace: string; }; res: { /** * uuids of jobs */ 200: Array<(string)>; }; }; }; '/w/{workspace}/jobs/queue/run_now/{id}': { post: { req: { id: string; workspace: string; }; res: { /** * job id */ 200: string; }; }; }; '/w/{workspace}/jobs/queue/cancel_selection': { post: { req: { allWorkspaces?: boolean; forceCancel?: boolean; /** * uuids of the jobs to cancel */ requestBody: Array<(string)>; workspace: string; }; res: { /** * uuids of canceled jobs */ 200: Array<(string)>; }; }; }; '/w/{workspace}/jobs/get_otel_traces/{id}': { get: { req: { id: string; workspace: string; }; res: { /** * list of OTEL Span objects (compatible with OpenTelemetry Span proto) */ 200: Array<{ [key: string]: unknown; }>; }; }; }; '/w/{workspace}/jobs/completed/list': { get: { req: { /** * allow wildcards (*) in the filter of label, tag, worker */ allowWildcards?: boolean; /** * filter on jobs containing those args as a json subset (@> in postgres) */ args?: string; /** * filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') */ createdBy?: string; /** * has null parent */ hasNullParent?: boolean; /** * is the job a flow step */ isFlowStep?: boolean; /** * is not a scheduled job */ isNotSchedule?: boolean; /** * is the job skipped */ isSkipped?: boolean; /** * filter by job kind. Supports comma-separated list of values ('preview', 'script', 'dependencies', 'flow') and negation by prefixing all values with '!' (e.g. '!preview,!dependencies') */ jobKinds?: string; /** * filter by exact matching job label. Supports comma-separated list (e.g. 'deploy,release') and negation by prefixing all values with '!' (e.g. '!deploy,!release') */ label?: string; /** * order by desc order (default true) */ orderDesc?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * filter on whether a failure has been marked as handled. true keeps only resolved failures, false hides them */ resolved?: boolean; /** * filter on jobs containing those result as a json subset (@> in postgres) */ result?: string; /** * mask to filter by schedule path */ schedulePath?: string; /** * mask to filter exact matching path */ scriptHash?: string; /** * filter by exact matching script path. Supports comma-separated list (e.g. 'f/script1,f/script2') and negation by prefixing all values with '!' (e.g. '!f/script1,!f/script2') */ scriptPathExact?: string; /** * filter by script path prefix. Supports comma-separated list (e.g. 'f/folder1,f/folder2') and negation by prefixing all values with '!' (e.g. '!f/folder1,!f/folder2') */ scriptPathStart?: string; /** * filter on started after (exclusive) timestamp */ startedAfter?: string; /** * filter on started before (inclusive) timestamp */ startedBefore?: string; /** * filter on the exact completed job status. Unlike `success=true` (which also matches `skipped`), `status=success` matches only `success`. */ status?: 'success' | 'failure' | 'canceled' | 'skipped'; /** * filter on successful jobs */ success?: boolean; /** * filter by tag/worker group. Supports comma-separated list (e.g. 'gpu,highmem') and negation by prefixing all values with '!' (e.g. '!gpu,!highmem') */ tag?: string; /** * filter by worker this job ran on. Supports comma-separated list (e.g. 'worker-1,worker-2') and negation by prefixing all values with '!' (e.g. '!worker-1,!worker-2') */ worker?: string; workspace: string; }; res: { /** * All completed jobs */ 200: Array; }; }; }; '/w/{workspace}/jobs/completed/export': { get: { req: { /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; res: { /** * All completed jobs exported */ 200: Array; }; }; }; '/w/{workspace}/jobs/completed/import': { post: { req: { requestBody: Array; workspace: string; }; res: { /** * Successfully imported completed jobs */ 200: string; }; }; }; '/w/{workspace}/jobs/queue/export': { get: { req: { /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; res: { /** * All queued jobs exported */ 200: Array; }; }; }; '/w/{workspace}/jobs/queue/import': { post: { req: { requestBody: Array; workspace: string; }; res: { /** * Successfully imported queued jobs */ 200: string; }; }; }; '/w/{workspace}/jobs/delete': { post: { req: { requestBody: Array<(string)>; workspace: string; }; res: { /** * Successfully deleted jobs */ 200: string; }; }; }; '/w/{workspace}/jobs/list': { get: { req: { /** * allow wildcards (*) in the filter of label, tag, worker */ allowWildcards?: boolean; /** * get jobs from all workspaces (only valid if request come from the `admins` workspace) */ allWorkspaces?: boolean; /** * filter on jobs containing those args as a json subset (@> in postgres) */ args?: string; /** * broad search across multiple fields (case-insensitive substring match on path, tag, schedule path, trigger kind, label) */ broadFilter?: string; /** * filter on started after (exclusive) timestamp */ completedAfter?: string; /** * filter on started before (inclusive) timestamp */ completedBefore?: string; /** * filter on created after (exclusive) timestamp */ createdAfter?: string; /** * filter on jobs created after X for jobs in the queue only */ createdAfterQueue?: string; /** * filter on created before (inclusive) timestamp */ createdBefore?: string; /** * filter on jobs created before X for jobs in the queue only */ createdBeforeQueue?: string; /** * filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') */ createdBy?: string; /** * exclude jobs that were started with a `_ENTRYPOINT_OVERRIDE` arg (e.g. dynamic-select helper runs and preprocessor previews) */ excludesEntrypointOverride?: boolean; /** * has null parent */ hasNullParent?: boolean; /** * is the job a flow step */ isFlowStep?: boolean; /** * is not a scheduled job */ isNotSchedule?: boolean; /** * is the job skipped */ isSkipped?: boolean; /** * filter by job kind. Supports comma-separated list of values ('preview', 'script', 'dependencies', 'flow') and negation by prefixing all values with '!' (e.g. '!preview,!dependencies') */ jobKinds?: string; /** * filter by exact matching job label. Supports comma-separated list (e.g. 'deploy,release') and negation by prefixing all values with '!' (e.g. '!deploy,!release') */ label?: string; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * filter on whether a failure has been marked as handled. true keeps only resolved failures, false hides them */ resolved?: boolean; /** * filter on jobs containing those result as a json subset (@> in postgres) */ result?: string; /** * filter on running jobs */ running?: boolean; /** * filter on jobs scheduled_for before now (hence waitinf for a worker) */ scheduledForBeforeNow?: boolean; /** * mask to filter by schedule path */ schedulePath?: string; /** * mask to filter exact matching path */ scriptHash?: string; /** * filter by exact matching script path. Supports comma-separated list (e.g. 'f/script1,f/script2') and negation by prefixing all values with '!' (e.g. '!f/script1,!f/script2') */ scriptPathExact?: string; /** * filter by script path prefix. Supports comma-separated list (e.g. 'f/folder1,f/folder2') and negation by prefixing all values with '!' (e.g. '!f/folder1,!f/folder2') */ scriptPathStart?: string; /** * filter on started after (exclusive) timestamp */ startedAfter?: string; /** * filter on started before (inclusive) timestamp */ startedBefore?: string; /** * filter on the exact completed job status. Unlike `success=true` (which also matches `skipped`), `status=success` matches only `success`. */ status?: 'success' | 'failure' | 'canceled' | 'skipped'; /** * filter on successful jobs */ success?: boolean; /** * filter on suspended jobs */ suspended?: boolean; /** * filter by tag/worker group. Supports comma-separated list (e.g. 'gpu,highmem') and negation by prefixing all values with '!' (e.g. '!gpu,!highmem') */ tag?: string; /** * filter by trigger kind. Supports comma-separated list (e.g. 'schedule,webhook') and negation by prefixing all values with '!' (e.g. '!schedule,!webhook') */ triggerKind?: string; /** * filter by worker this job ran on. Supports comma-separated list (e.g. 'worker-1,worker-2') and negation by prefixing all values with '!' (e.g. '!worker-1,!worker-2') */ worker?: string; workspace: string; }; res: { /** * All jobs */ 200: Array; }; }; }; '/jobs/db_clock': { get: { res: { /** * the timestamp of the db that can be used to compute the drift */ 200: number; }; }; }; '/jobs/completed/count_by_tag': { get: { req: { /** * Past Time horizon in seconds (when to start the count = now - horizon) (default is 3600) */ horizonSecs?: number; /** * Specific workspace ID to filter results (optional) */ workspaceId?: string; }; res: { /** * Job counts by tag */ 200: Array<{ tag: string; count: number; }>; }; }; }; '/w/{workspace}/jobs_u/get/{id}': { get: { req: { /** * Approval token granting read access to the job when not logged in. The token must be the one issued for this job's flow (i.e. the flow id used when generating the approval URL). */ approvalToken?: string; id: string; noCode?: boolean; noLogs?: boolean; workspace: string; }; res: { /** * job details */ 200: Job; }; }; }; '/w/{workspace}/jobs_u/get_root_job_id/{id}': { get: { req: { id: string; workspace: string; }; res: { /** * get root job id */ 200: string; }; }; }; '/w/{workspace}/jobs_u/get_logs/{id}': { get: { req: { id: string; removeAnsiWarnings?: boolean; workspace: string; }; res: { /** * job details */ 200: string; }; }; }; '/w/{workspace}/jobs_u/get_flow_all_logs/{id}': { get: { req: { id: string; workspace: string; }; res: { /** * concatenated logs of all flow steps */ 200: string; }; }; }; '/w/{workspace}/jobs_u/get_flow_all_logs_structured/{id}': { get: { req: { id: string; workspace: string; }; res: { /** * structured logs of all flow steps, one entry per job */ 200: Array<{ job_id: string; /** * human-readable label describing the job's position in the flow tree */ label: string; /** * job kind (script, flow, forloopflow, ...) */ kind: string; flow_step_id?: string | null; /** * materialized step path (e.g. "a/b") */ step_path?: string | null; /** * depth in the flow tree (0 for the root flow job) */ depth: number; /** * parent module type (forloopflow, branchall, ...) */ parent_module_type?: string | null; /** * 1-based index of this job among siblings sharing the same step */ sibling_index: number; /** * total number of siblings sharing the same step */ sibling_count: number; logs: string; }>; }; }; }; '/w/{workspace}/jobs_u/get_flow_all_results/{id}': { get: { req: { id: string; /** * per-entry cap (in characters of JSON text) on result_prefix (default 2000, max 30000) */ maxResultLen?: number; /** * step address to resolve to a single job instead of enumerating the tree: "b", "b/c", "b[12]" (1-based iteration/branch), composable as "b[12]/c" */ step?: string; workspace: string; }; res: { /** * per-job statuses and truncated results of the flow's execution tree, or the single resolved entry when step is provided */ 200: { /** * set when the requested job is itself a step of a larger flow run; id of the flow run directly enclosing it */ enclosing_job?: string; entries: Array<{ job_id: string; /** * human-readable label describing the job's position in the flow tree */ label: string; /** * job kind (script, flow, forloopflow, ...) */ kind: string; flow_step_id?: string | null; /** * materialized step path (e.g. "a/b") */ step_path?: string | null; /** * depth in the flow tree (0 for the root flow job) */ depth: number; /** * parent module type (forloopflow, branchall, ...) */ parent_module_type?: string | null; /** * 1-based index of this job among siblings sharing the same step */ sibling_index: number; /** * total number of siblings sharing the same step */ sibling_count: number; status: 'success' | 'failure' | 'canceled' | 'skipped' | 'suspended' | 'running' | 'queued'; success?: boolean; duration_ms?: number; started_at?: string; /** * result JSON text truncated to the per-entry budget; absent until the job has completed */ result_prefix?: string; /** * full length in characters of the result JSON text (greater than the prefix length when truncated) */ result_length?: number; }>; /** * true when the tree has more jobs than the entry cap; entries then hold the depth-first prefix */ truncated?: boolean; /** * true when the caller's token is tag-scoped; steps running on other tags are omitted */ scope_filtered?: boolean; /** * set when step was provided but could not be resolved; a diagnostic listing available step ids or iteration statuses */ step_error?: string; }; }; }; }; '/w/{workspace}/jobs_u/get_completed_logs_tail/{id}': { get: { req: { id: string; workspace: string; }; res: { /** * completed job logs tail */ 200: string; }; }; }; '/w/{workspace}/jobs_u/get_args/{id}': { get: { req: { id: string; workspace: string; }; res: { /** * job args */ 200: unknown; }; }; }; '/w/{workspace}/jobs_u/queue/get_started_at_by_ids': { post: { req: { /** * ids */ requestBody: Array<(string)>; workspace: string; }; res: { /** * started at by ids */ 200: Array<(string)>; }; }; }; '/w/{workspace}/jobs_u/getupdate/{id}': { get: { req: { getProgress?: boolean; id: string; logOffset?: number; noLogs?: boolean; running?: boolean; streamOffset?: number; workspace: string; }; res: { /** * job details */ 200: { running?: boolean; completed?: boolean; new_logs?: string; log_offset?: number; mem_peak?: number; progress?: number; stream_offset?: number; new_result_stream?: string; flow_status?: FlowStatus; workflow_as_code_status?: WorkflowStatus; }; }; }; }; '/w/{workspace}/jobs_u/getupdate_sse/{id}': { get: { req: { fast?: boolean; getProgress?: boolean; id: string; logOffset?: number; noLogs?: boolean; onlyResult?: boolean; running?: boolean; streamOffset?: number; workspace: string; }; res: { /** * server-sent events stream of job updates */ 200: string; }; }; }; '/w/{workspace}/jobs_u/get_log_file/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * job log */ 200: string; }; }; }; '/w/{workspace}/jobs_u/get_flow_debug_info/{id}': { get: { req: { id: string; workspace: string; }; res: { /** * flow debug info details */ 200: unknown; }; }; }; '/w/{workspace}/jobs_u/completed/get/{id}': { get: { req: { id: string; workspace: string; }; res: { /** * job details */ 200: CompletedJob; }; }; }; '/w/{workspace}/jobs_u/completed/get_result/{id}': { get: { req: { approver?: string; id: string; resumeId?: number; secret?: string; suspendedJob?: string; workspace: string; }; res: { /** * result */ 200: unknown; }; }; }; '/w/{workspace}/jobs_u/completed/get_result_maybe/{id}': { get: { req: { getStarted?: boolean; id: string; workspace: string; }; res: { /** * result */ 200: { completed: boolean; result: unknown; success?: boolean; started?: boolean; }; }; }; }; '/w/{workspace}/jobs_u/completed/get_timing/{id}': { get: { req: { id: string; workspace: string; }; res: { /** * job timing details */ 200: { created_at: string; started_at?: string; duration_ms?: number; }; }; }; }; '/w/{workspace}/jobs_u/dispatch_events/{id}': { get: { req: { id: string; workspace: string; }; res: { /** * dispatch events for this producer job */ 200: Array<{ subscriber_path: string; asset_kind: 's3object' | 'resource' | 'variable' | 'ducklake' | 'datatable' | 'volume' | 'dbt'; asset_path: string; outcome: 'dispatched' | 'join_pending' | 'skipped'; child_job_id?: string; partition?: string; received_inputs?: number; required_inputs?: number; debounce_s?: number; reason?: string; created_at: string; }>; }; }; }; '/w/{workspace}/jobs/asset_dispatch_edges': { get: { req: { /** * Only edges dispatched at/after this instant. */ createdAfter?: string; /** * Folder path prefix the children live under, e.g. `f/orders/`. */ pathStart: string; workspace: string; }; res: { /** * asset-cascade edges for the folder */ 200: Array<{ producer_job_id: string; /** * Set for `dispatched`; absent for `join_pending` inputs. */ child_job_id?: string; subscriber_path: string; outcome: 'dispatched' | 'join_pending'; asset_kind: 's3object' | 'resource' | 'variable' | 'ducklake' | 'datatable' | 'volume' | 'dbt'; asset_path: string; created_at: string; }>; }; }; }; '/w/{workspace}/jobs/completed/delete/{id}': { post: { req: { id: string; workspace: string; }; res: { /** * job details */ 200: CompletedJob; }; }; }; '/w/{workspace}/jobs/completed/resolve': { post: { req: { requestBody: { job_ids: Array<(string)>; /** * a person's explanation of why the failure is considered handled. Enterprise-only: ignored outside enterprise */ note?: string; /** * id of a later successful run of the same runnable that supersedes the failure. Verified server-side, and the resulting note is the server's own wording, so it is recorded regardless of licence. A claim that cannot be verified resolves nothing */ superseded_by?: string; }; workspace: string; }; res: { /** * ids of the jobs that were resolved */ 200: Array<(string)>; }; }; }; '/w/{workspace}/jobs/completed/unresolve': { post: { req: { requestBody: { job_ids: Array<(string)>; }; workspace: string; }; res: { /** * ids of the jobs that were unresolved */ 200: Array<(string)>; }; }; }; '/w/{workspace}/jobs_u/queue/cancel/{id}': { post: { req: { id: string; /** * reason */ requestBody: { reason?: string; }; workspace: string; }; res: { /** * job canceled */ 200: string; }; }; }; '/w/{workspace}/jobs_u/queue/cancel_persistent/{path}': { post: { req: { path: string; /** * reason */ requestBody: { reason?: string; }; workspace: string; }; res: { /** * persistent job scaled down to zero */ 200: string; }; }; }; '/w/{workspace}/jobs_u/queue/force_cancel/{id}': { post: { req: { id: string; /** * reason */ requestBody: { reason?: string; }; workspace: string; }; res: { /** * job canceled */ 200: string; }; }; }; '/w/{workspace}/jobs/queue/position/{scheduled_for}': { get: { req: { scheduledFor: number; workspace: string; }; res: { /** * queue position information */ 200: { /** * The position in queue (1-based), null if not in queue or already running */ position?: number; }; }; }; }; '/w/{workspace}/jobs/queue/scheduled_for/{id}': { get: { req: { id: string; workspace: string; }; res: { /** * scheduled for timestamp */ 200: number; }; }; }; '/w/{workspace}/jobs/job_signature/{id}/{resume_id}': { get: { req: { approver?: string; id: string; resumeId: number; workspace: string; }; res: { /** * job signature */ 200: string; }; }; }; '/w/{workspace}/jobs/resume_urls/{id}/{resume_id}': { get: { req: { approver?: string; /** * If true, generate resume URLs for the parent flow instead of the specific step. This allows pre-approvals that can be consumed by any later suspend step in the same flow. */ flowLevel?: boolean; id: string; resumeId: number; workspace: string; }; res: { /** * url endpoints */ 200: { approvalPage: string; resume: string; cancel: string; }; }; }; }; '/w/{workspace}/jobs/wac_approval_urls/{id}/{step_key}': { get: { req: { approver?: string; id: string; /** * checkpoint key of the wait_for_approval step, as passed to `wait_for_approval(key=...)` */ stepKey: string; workspace: string; }; res: { /** * url endpoints */ 200: { approvalPage: string; resume: string; cancel: string; }; }; }; }; '/w/{workspace}/jobs/slack_approval/{id}': { get: { req: { approver?: string; cancelButtonText?: string; channelId: string; defaultArgsJson?: string; dynamicEnumsJson?: string; flowStepId: string; id: string; message?: string; resumeButtonText?: string; slackResourcePath: string; workspace: string; }; res: { /** * Interactive slack approval message sent successfully */ 200: unknown; }; }; }; '/w/{workspace}/jobs/teams_approval/{id}': { get: { req: { approver?: string; cancelButtonText?: string; channelName: string; defaultArgsJson?: string; dynamicEnumsJson?: string; flowStepId: string; id: string; message?: string; resumeButtonText?: string; teamName: string; workspace: string; }; res: { /** * Interactive slack approval message sent successfully */ 200: unknown; }; }; }; '/w/{workspace}/jobs_u/flow/resume_suspended/{job_id}': { post: { req: { jobId: string; requestBody: { /** * payload to send to the resumed job */ payload?: unknown; /** * approval token for unauthenticated access */ approval_token?: string; /** * whether to approve (true) or cancel (false) the job */ approved?: boolean; }; workspace: string; }; res: { /** * job resumed */ 201: string; }; }; }; '/w/{workspace}/jobs_u/flow/approval_info/{job_id}': { get: { req: { jobId: string; /** * approval token for unauthenticated access */ token?: string; workspace: string; }; res: { /** * approval info */ 200: { flow_id: string; /** * form schema for the approval step */ form_schema?: unknown; /** * description of the approval step */ description?: unknown; approval_conditions?: { user_auth_required: boolean; user_groups_required: Array<(string)>; self_approval_disabled: boolean; }; /** * whether the current user/token holder can approve */ can_approve: boolean; /** * whether user authentication is required to approve */ user_auth_required: boolean; /** * whether to hide the cancel button in the UI */ hide_cancel?: boolean; /** * how the approval page presents the request */ skin: 'detailed' | 'minimal'; /** * summary of the approval step, for the page title */ step_summary?: string; /** * summary of the flow or workflow the approval belongs to */ flow_summary?: string; approvers: Array<{ resume_id: number; approver: string; }>; /** * Share-read-link token for the flow. An authenticated workspace member can append it as a `view_token` query param on the run page to read a flow they don't otherwise have access to. */ view_token?: string; }; }; }; }; '/w/{workspace}/jobs_u/resume/{id}/{resume_id}/{signature}': { get: { req: { approver?: string; id: string; /** * The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` * */ payload?: string; resumeId: number; signature: string; workspace: string; }; res: { /** * job resumed */ 201: string; }; }; post: { req: { approver?: string; id: string; requestBody: { [key: string]: unknown; }; resumeId: number; signature: string; workspace: string; }; res: { /** * job resumed */ 201: string; }; }; }; '/w/{workspace}/jobs/flow/user_states/{id}/{key}': { post: { req: { id: string; key: string; /** * new value */ requestBody: unknown; workspace: string; }; res: { /** * flow user state updated */ 200: string; }; }; get: { req: { id: string; key: string; workspace: string; }; res: { /** * flow user state updated */ 200: unknown; }; }; }; '/w/{workspace}/jobs/flow/resume/{id}': { post: { req: { id: string; requestBody: { [key: string]: unknown; }; workspace: string; }; res: { /** * job resumed */ 201: string; }; }; }; '/w/{workspace}/jobs_u/cancel/{id}/{resume_id}/{signature}': { get: { req: { approver?: string; id: string; resumeId: number; signature: string; workspace: string; }; res: { /** * job canceled */ 201: string; }; }; post: { req: { approver?: string; id: string; requestBody: { [key: string]: unknown; }; resumeId: number; signature: string; workspace: string; }; res: { /** * job canceled */ 201: string; }; }; }; '/w/{workspace}/jobs_u/get_flow/{id}/{resume_id}/{signature}': { get: { req: { approver?: string; id: string; resumeId: number; signature: string; workspace: string; }; res: { /** * parent flow details */ 200: { job: Job; approvers: Array<{ resume_id: number; approver: string; }>; /** * Share-read-link token for the parent flow. An authenticated workspace member can append it as a `view_token` query param on the run page to read a flow they don't otherwise have access to. */ view_token?: string; }; }; }; }; '/w/{workspace}/concurrency_groups/list_jobs': { get: { req: { /** * allow wildcards (*) in the filter of label, tag, worker */ allowWildcards?: boolean; /** * get jobs from all workspaces (only valid if request come from the `admins` workspace) */ allWorkspaces?: boolean; /** * filter on jobs containing those args as a json subset (@> in postgres) */ args?: string; /** * filter on started after (exclusive) timestamp */ completedAfter?: string; /** * filter on started before (inclusive) timestamp */ completedBefore?: string; concurrencyKey?: string; /** * filter on jobs created after X for jobs in the queue only */ createdAfterQueue?: string; /** * filter on jobs created before X for jobs in the queue only */ createdBeforeQueue?: string; /** * filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') */ createdBy?: string; /** * has null parent */ hasNullParent?: boolean; /** * is the job a flow step */ isFlowStep?: boolean; /** * is not a scheduled job */ isNotSchedule?: boolean; /** * is the job skipped */ isSkipped?: boolean; /** * filter by job kind. Supports comma-separated list of values ('preview', 'script', 'dependencies', 'flow') and negation by prefixing all values with '!' (e.g. '!preview,!dependencies') */ jobKinds?: string; /** * filter by exact matching job label. Supports comma-separated list (e.g. 'deploy,release') and negation by prefixing all values with '!' (e.g. '!deploy,!release') */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * The parent job that is at the origin and responsible for the execution of this script if any */ parentJob?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * filter on whether a failure has been marked as handled. true keeps only resolved failures, false hides them */ resolved?: boolean; /** * filter on jobs containing those result as a json subset (@> in postgres) */ result?: string; rowLimit?: number; /** * filter on running jobs */ running?: boolean; /** * filter on jobs scheduled_for before now (hence waitinf for a worker) */ scheduledForBeforeNow?: boolean; /** * mask to filter by schedule path */ schedulePath?: string; /** * mask to filter exact matching path */ scriptHash?: string; /** * filter by exact matching script path. Supports comma-separated list (e.g. 'f/script1,f/script2') and negation by prefixing all values with '!' (e.g. '!f/script1,!f/script2') */ scriptPathExact?: string; /** * filter by script path prefix. Supports comma-separated list (e.g. 'f/folder1,f/folder2') and negation by prefixing all values with '!' (e.g. '!f/folder1,!f/folder2') */ scriptPathStart?: string; /** * filter on started after (exclusive) timestamp */ startedAfter?: string; /** * filter on started before (inclusive) timestamp */ startedBefore?: string; /** * filter on the exact completed job status. Unlike `success=true` (which also matches `skipped`), `status=success` matches only `success`. */ status?: 'success' | 'failure' | 'canceled' | 'skipped'; /** * filter on successful jobs */ success?: boolean; /** * filter by tag/worker group. Supports comma-separated list (e.g. 'gpu,highmem') and negation by prefixing all values with '!' (e.g. '!gpu,!highmem') */ tag?: string; /** * filter by trigger kind. Supports comma-separated list (e.g. 'schedule,webhook') and negation by prefixing all values with '!' (e.g. '!schedule,!webhook') */ triggerKind?: string; workspace: string; }; res: { /** * time */ 200: ExtendedJobs; }; }; }; '/w/{workspace}/jobs/dbt_resumable/{id}': { get: { req: { /** * The job whose script and principal decide the saved failure */ id: string; workspace: string; }; res: { /** * this job's id when a retry would resume it, or null */ 200: string | null; }; }; }; '/w/{workspace}/jobs/dbt_resumable_script/p/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * the job id a retry would resume, or null */ 200: string | null; }; }; }; '/w/{workspace}/jobs/dbt_graph/{id}': { get: { req: { /** * Filter by asset kinds (comma-separated list) */ assetKinds?: string; /** * Fallback only, for a job that names no deployed script — a preview or a flow. For a script job the version comes from the job row itself, so this is ignored: which deploy's models, SQL and `ref()` lineage are shown is not the caller's to choose. * */ dbtScriptHash?: string; /** * Scope the graph to runnables in a single folder */ folder?: string; /** * The job whose graph to render */ id: string; workspace: string; }; res: { /** * asset graph nodes, lineage edges and trigger edges */ 200: AssetGraph; }; }; }; '/w/{workspace}/jobs/dbt_column_lineage/{id}': { get: { req: { /** * The `dbt://` relations whose lineage to return. Repeated, once per relation, and answered as one union. At least one, and at most 1000 — a request naming none, or more than that, is refused rather than answered with an empty component. * */ assetPath: Array<(string)>; /** * The job whose graph the lineage is read from */ id: string; workspace: string; }; res: { /** * the relations' column-level lineage */ 200: DbtColumnLineage; }; }; }; '/w/{workspace}/jobs/run_progress/{id}': { get: { req: { /** * The job whose per-relation progress to read */ id: string; workspace: string; }; res: { /** * per-relation status for this run */ 200: Array; }; }; }; '/w/{workspace}/jobs/run_assets/{id}': { get: { req: { /** * The job whose runtime assets to read */ id: string; workspace: string; }; res: { /** * assets this run and its child jobs touched */ 200: { /** * whether the run touched more assets than are listed */ truncated: boolean; assets: Array<{ path: string; kind: AssetKind; access_type?: AssetUsageAccessType; }>; }; }; }; }; '/w/{workspace}/flow_conversations/list': { get: { req: { /** * filter conversations by flow path */ flowPath?: string; /** * which conversations to list - the flow editor's test chats, the deployed flow's own (the default), or both */ kind?: 'test' | 'deployed' | 'all'; /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; res: { /** * flow conversations list */ 200: Array; }; }; }; '/w/{workspace}/flow_conversations/update/{conversation_id}': { post: { req: { /** * conversation id */ conversationId: string; requestBody: { /** * the chat's name */ title: string; }; workspace: string; }; res: { /** * flow conversation updated */ 200: string; }; }; }; '/w/{workspace}/flow_conversations/delete/{conversation_id}': { delete: { req: { /** * conversation id */ conversationId: string; workspace: string; }; res: { /** * flow conversation deleted */ 200: string; }; }; }; '/w/{workspace}/flow_conversations/{conversation_id}/messages': { get: { req: { /** * Message sequence cursor to fetch only the messages after that cursor */ afterSeq?: number; /** * conversation id */ conversationId: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; res: { /** * conversation messages */ 200: Array; }; }; }; '/w/{workspace}/ai_evals/datasets/list': { get: { req: { workspace: string; }; res: { /** * eval datasets list */ 200: Array; }; }; }; '/w/{workspace}/ai_evals/datasets/create': { post: { req: { /** * new eval dataset */ requestBody: { path: string; summary?: string; scorers?: Array; /** * The cases to create the dataset holding, so one can be assembled in a single act rather than created empty and filled in afterwards. */ cases?: Array; }; workspace: string; }; res: { /** * eval dataset created */ 200: string; }; }; }; '/w/{workspace}/ai_evals/datasets/get/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * eval dataset */ 200: EvalDataset; }; }; }; '/w/{workspace}/ai_evals/datasets/update/{path}': { post: { req: { path: string; /** * updated eval dataset */ requestBody: { /** * Renames the dataset. Its cases and experiments follow through the foreign keys, so a rename keeps the history it already has. * */ path?: string; /** * Left out to keep the stored summary; sent as "" to clear it. */ summary?: string; /** * Left out to keep the dataset's columns as they are; sent to replace them wholesale. * */ scorers?: Array; /** * The cases as they should stand afterwards: all of them, each carrying its id if the dataset already has it. Sent with the rest of an edit so that a rename the dataset refuses refuses the case edits with it. * */ cases?: Array; }; workspace: string; }; res: { /** * eval dataset updated */ 200: string; }; }; }; '/w/{workspace}/ai_evals/datasets/delete/{path}': { post: { req: { path: string; workspace: string; }; res: { /** * eval dataset deleted */ 200: string; }; }; }; '/w/{workspace}/ai_evals/cases/list/{path}': { get: { req: { /** * which page to return (start at 1, default 1) */ page?: number; path: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; res: { /** * eval cases */ 200: { cases: Array; }; }; }; }; '/w/{workspace}/ai_evals/subject_state': { get: { req: { path: string; workspace: string; }; res: { /** * the subject as it is now */ 200: { version?: number; }; }; }; }; '/w/{workspace}/ai_evals/run_payload': { get: { req: { /** * The flow job that answered the case. */ jobId: string; workspace: string; }; res: { /** * the run and its rendering */ 200: { /** * The case, the answer, and every tool call the agent made. */ run: { [key: string]: unknown; }; /** * The same run as a judge agent is shown it. */ rendered: string; }; }; }; }; '/w/{workspace}/ai_evals/scorer_defaults': { get: { req: { workspace: string; }; res: { /** * scorer defaults */ 200: { /** * The system prompt a judge agent is created with. */ judge_prompt: string; script_template: string; }; }; }; }; '/w/{workspace}/ai_evals/scorers/recent': { get: { req: { /** * only scorers of this kind */ kind?: 'script' | 'agent'; workspace: string; }; res: { /** * recently used scorers */ 200: Array<(Scorer & { /** * The dataset it is a column of. */ dataset: string; })>; }; }; }; '/w/{workspace}/ai_evals/experiments/run': { post: { req: { /** * what to run */ requestBody: { dataset: string; subject: EvalSubject; }; workspace: string; }; res: { /** * id of the created experiment */ 200: string; }; }; }; '/w/{workspace}/ai_evals/experiments/collect': { post: { req: { id: string; workspace: string; }; res: { /** * how many of the run's cases are recorded */ 200: number; }; }; }; '/w/{workspace}/ai_evals/experiments/list_all': { get: { req: { /** * Restrict to one agent's runs, which is what makes the list a history rather than a log. Runs of what is deployed, of a past version, and of the edits waiting on top are all that agent's, so this does not discriminate by kind. * */ subjectPath?: string; workspace: string; }; res: { /** * The 100 newest experiments, each naming the dataset it is of. Restricted to datasets the caller can read. * */ 200: Array; }; }; }; '/w/{workspace}/ai_evals/experiments/results/{path}': { get: { req: { /** * The experiment every column is compared against. A delta is only computed between two scores of the same scorer id, and a column the baseline was never scored with reports it rather than showing a difference. * */ baseline?: string; /** * the experiment to read */ id: string; path: string; workspace: string; }; res: { /** * experiment results */ 200: { experiment: EvalExperiment; baseline?: EvalExperiment; /** * The columns, which belong to the dataset rather than the experiment. */ scorers: Array; rows: Array; means: Array; /** * Cells scoring lower than the baseline, across every column. */ regressed: number; /** * The version the subject is on now. A row that ran against an earlier one describes an agent that no longer exists. * */ subject_current_version?: number; /** * What the agent hashes to as deployed. A run of unsaved edits carrying this hash ran exactly what is deployed now — the edits were saved — so it is a run of that version rather than of edits. * */ subject_deployed_hash?: string; }; }; }; }; '/w/{workspace}/path_autocomplete/list_paths': { get: { req: { /** * bypass the server-side cache and re-query the DB, refreshing the * cache. Used right after a deploy so the new path appears immediately. * */ force?: boolean; workspace: string; }; res: { /** * deduplicated path list, sorted lexicographically */ 200: { paths: Array<(string)>; }; }; }; }; '/w/{workspace}/raw_apps/list': { get: { req: { /** * filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob') */ createdBy?: string; /** * When true, append per-user draft rows whose path has no * deployed counterpart. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. Gated to * non-operators + page 0 + no narrowing filters on the backend so * picker callers stay deployed-only and pagination stays clean. * */ includeDraftOnly?: boolean; /** * Filter by label */ label?: string; /** * order by desc order (default true) */ orderDesc?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * mask to filter exact matching path */ pathExact?: string; /** * mask to filter matching starting path */ pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * (default false) * show only the starred items * */ starredOnly?: boolean; workspace: string; }; res: { /** * All raw apps */ 200: Array; }; }; }; '/w/{workspace}/ai/usage': { post: { req: { requestBody: { events: Array; }; workspace: string; }; res: { /** * usage recorded */ 204: void; }; }; get: { req: { days?: number; groupBy?: 'day' | 'user' | 'model'; /** * workspace-wide usage (admin only) or the calling user's own */ scope?: 'workspace' | 'self'; workspace: string; }; res: { /** * usage buckets */ 200: { buckets: Array; /** * more buckets matched than were returned, so summing them under-reports */ truncated: boolean; }; }; }; }; '/w/{workspace}/ai/sessions/list': { get: { req: { workspace: string; }; res: { /** * backups, newest first; `enabled` is false when the workspace has no storage for them */ 200: { enabled: boolean; /** * names the storage answered from; sync state recorded against another one is void */ storage_id?: string; /** * bumped by every workspace key rotation; sync state recorded under another one is void */ backup_generation?: number; /** * the storage answered from is the instance object store, standing in for a workspace without storage of its own; a removal owed to it is retired by any answer from the workspace's own storage */ fallback?: boolean; /** * the newest 500 at most */ sessions: Array; /** * the user has more sessions than the answer names */ truncated?: boolean; }; }; }; }; '/w/{workspace}/ai/sessions/pull': { post: { req: { requestBody: { ids: Array<(string)>; resume?: AISessionBackupCursor; }; workspace: string; }; res: { /** * the backups found; `deferred` lists ids that did not fit the response budget */ 200: { enabled: boolean; storage_id?: string; backup_generation?: number; fallback?: boolean; sessions: Array; deferred: Array<(string)>; }; }; }; }; '/w/{workspace}/ai/sessions/push': { post: { req: { requestBody: { /** * the email the push was prepared for; refused with a 409 when it is not the caller's */ owner: string; sessions?: Array; removed?: Array<(string)>; }; workspace: string; }; res: { /** * one result per session written or removed, in request order */ 200: { enabled: boolean; storage_id?: string; backup_generation?: number; fallback?: boolean; results: Array<{ id: string; error?: string; /** * nothing was written and the session must be pushed whole again; an incremental part found no listed session to ride on (the backup was removed, or a push split over parts is in progress or was abandoned), or a later part of a push split over parts found another push had superseded it */ needs_whole?: boolean; }>; }; }; }; }; '/w/{workspace}/ai/shared_artifacts/share': { post: { req: { requestBody: { /** * the artifact's id in the author's session */ artifact_id: string; name: string; kind: 'md' | 'html'; version: number; content: string; }; workspace: string; }; res: { /** * the shared copy */ 200: SharedAiArtifactInfo; }; }; }; '/w/{workspace}/ai/shared_artifacts/status': { get: { req: { artifactId: string; workspace: string; }; res: { /** * the live share, if any, and how long shares last */ 200: { retention_secs: number; share?: SharedAiArtifactInfo; }; }; }; }; '/w/{workspace}/ai/shared_artifacts/get/{id}': { get: { req: { id: string; workspace: string; }; res: { /** * the shared artifact */ 200: SharedAiArtifactInfo & { content: string; /** * whether the caller authored the share or is a workspace admin */ can_unshare: boolean; }; }; }; }; '/w/{workspace}/ai/shared_artifacts/delete/{id}': { delete: { req: { id: string; workspace: string; }; res: { /** * share deleted */ 200: string; }; }; }; '/w/{workspace}/trigger/{trigger_kind}/resume_suspended_trigger_jobs/{trigger_path}': { post: { req: { /** * Optional list of job IDs to reassign */ requestBody?: { /** * Optional list of specific job UUIDs to reassign. If not provided, all suspended jobs for the trigger will be reassigned. */ job_ids?: Array<(string)>; }; /** * The kind of trigger */ triggerKind: JobTriggerKind; /** * The path of the trigger (can contain forward slashes) */ triggerPath: string; workspace: string; }; res: { /** * confirmation message */ 200: string; }; }; }; '/w/{workspace}/trigger/{trigger_kind}/cancel_suspended_trigger_jobs/{trigger_path}': { post: { req: { /** * Optional list of job IDs to cancel */ requestBody?: { /** * Optional list of specific job UUIDs to cancel. If not provided, all suspended jobs for the trigger will be canceled. */ job_ids?: Array<(string)>; }; /** * The kind of trigger */ triggerKind: JobTriggerKind; /** * The path of the trigger (can contain forward slashes) */ triggerPath: string; workspace: string; }; res: { /** * confirmation message */ 200: string; }; }; }; '/w/{workspace}/triggers_history/list': { get: { req: { /** * which page to return (start at 1, default 1) */ page?: number; /** * only return the history of the trigger at this path */ path?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * 'schedule' or a trigger type (http, kafka, ...) */ triggerKind?: string; workspace: string; }; res: { /** * trigger history */ 200: Array; }; }; }; '/schedules/preview': { post: { req: { /** * schedule */ requestBody: { schedule: string; timezone: string; cron_version?: string; }; }; res: { /** * List of 5 estimated upcoming execution events (in UTC) */ 200: Array<(string)>; }; }; }; '/w/{workspace}/schedules/create': { post: { req: { /** * new schedule */ requestBody: NewSchedule; workspace: string; }; res: { /** * schedule created */ 201: string; }; }; }; '/w/{workspace}/schedules/update/{path}': { post: { req: { path: string; /** * updated schedule */ requestBody: EditSchedule; workspace: string; }; res: { /** * schedule updated */ 200: string; }; }; }; '/w/{workspace}/schedules/setenabled/{path}': { post: { req: { path: string; /** * updated schedule enable */ requestBody: { enabled: boolean; /** * Bypass the parent-state conflict warning when enabling a schedule in a fork whose parent has the same path enabled. * */ force?: boolean; }; workspace: string; }; res: { /** * schedule enabled set */ 200: string; }; }; }; '/w/{workspace}/schedules/delete/{path}': { delete: { req: { path: string; workspace: string; }; res: { /** * schedule deleted */ 200: string; }; }; }; '/w/{workspace}/schedules/get/{path}': { get: { req: { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; workspace: string; }; res: { /** * schedule deleted */ 200: Schedule & UserDraftOverlay; }; }; }; '/w/{workspace}/schedules/exists/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * schedule exists */ 200: boolean; }; }; }; '/w/{workspace}/schedules/list': { get: { req: { /** * filter on jobs containing those args as a json subset (@> in postgres) */ args?: string; /** * broad search across multiple fields (case-insensitive substring match) */ broadFilter?: string; /** * pattern match filter for description field (case-insensitive) */ description?: string; /** * When true, append per-user draft schedules whose path has * no deployed schedule. Synthesized rows carry * `draft_only: true`. * */ includeDraftOnly?: boolean; /** * filter schedules by whether they target a flow */ isFlow?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * filter by path (script path) */ path?: string; /** * filter schedules by path prefix */ pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * exact match on the schedule's path */ schedulePath?: string; /** * pattern match filter for summary field (case-insensitive) */ summary?: string; workspace: string; }; res: { /** * schedule list */ 200: Array; }; }; }; '/w/{workspace}/schedules/list_with_jobs': { get: { req: { /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; res: { /** * schedule list */ 200: Array; }; }; }; '/w/{workspace}/schedules/setdefaulthandler': { post: { req: { /** * Handler description */ requestBody: { handler_type: 'error' | 'recovery' | 'success'; override_existing: boolean; path?: string; extra_args?: { [key: string]: unknown; }; number_of_occurence?: number; number_of_occurence_exact?: boolean; workspace_handler_muted?: boolean; }; workspace: string; }; res: { /** * default error handler set */ 201: unknown; }; }; }; '/w/{workspace}/openapi/generate': { post: { req: { /** * openapi spec info and url */ requestBody?: GenerateOpenapiSpec; workspace: string; }; res: { /** * openapi spec */ 200: string; }; }; }; '/w/{workspace}/openapi/download': { post: { req: { /** * openapi spec info and url */ requestBody?: GenerateOpenapiSpec; workspace: string; }; res: { /** * Downloaded OpenAPI spec */ 200: (Blob | File); }; }; }; '/w/{workspace}/http_triggers/create_many': { post: { req: { /** * new http trigger */ requestBody: Array; workspace: string; }; res: { /** * http trigger created */ 201: string; }; }; }; '/w/{workspace}/http_triggers/create': { post: { req: { /** * new http trigger */ requestBody: NewHttpTrigger; workspace: string; }; res: { /** * http trigger created */ 201: string; }; }; }; '/w/{workspace}/http_triggers/update/{path}': { post: { req: { path: string; /** * updated trigger */ requestBody: EditHttpTrigger; workspace: string; }; res: { /** * http trigger updated */ 200: string; }; }; }; '/w/{workspace}/http_triggers/delete/{path}': { delete: { req: { path: string; workspace: string; }; res: { /** * http trigger deleted */ 200: string; }; }; }; '/w/{workspace}/http_triggers/get/{path}': { get: { req: { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; workspace: string; }; res: { /** * http trigger deleted */ 200: HttpTrigger & UserDraftOverlay; }; }; }; '/w/{workspace}/http_triggers/list': { get: { req: { /** * When true, append per-user draft rows whose path has no * deployed counterpart. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. Gated to * non-operators + page 0 + no narrowing filters on the backend so * picker callers stay deployed-only and pagination stays clean. * */ includeDraftOnly?: boolean; isFlow?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * filter by path */ path?: string; pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; res: { /** * http trigger list */ 200: Array; }; }; }; '/w/{workspace}/http_triggers/exists/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * http trigger exists */ 200: boolean; }; }; }; '/w/{workspace}/http_triggers/route_exists': { post: { req: { /** * route exists request */ requestBody: { route_path: string; http_method: HttpMethod; trigger_path?: string; workspaced_route?: boolean; }; workspace: string; }; res: { /** * route exists */ 200: boolean; }; }; }; '/w/{workspace}/http_triggers/setmode/{path}': { post: { req: { path: string; requestBody: { mode: TriggerMode; /** * Bypass the parent-state conflict warning when enabling a trigger in a fork whose parent has the same path enabled. * */ force?: boolean; }; workspace: string; }; res: { /** * http trigger enable/disable */ 200: string; }; }; }; '/w/{workspace}/websocket_triggers/create': { post: { req: { /** * new websocket trigger */ requestBody: NewWebsocketTrigger; workspace: string; }; res: { /** * websocket trigger created */ 201: string; }; }; }; '/w/{workspace}/websocket_triggers/update/{path}': { post: { req: { path: string; /** * updated trigger */ requestBody: EditWebsocketTrigger; workspace: string; }; res: { /** * websocket trigger updated */ 200: string; }; }; }; '/w/{workspace}/websocket_triggers/delete/{path}': { delete: { req: { path: string; workspace: string; }; res: { /** * websocket trigger deleted */ 200: string; }; }; }; '/w/{workspace}/websocket_triggers/get/{path}': { get: { req: { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; workspace: string; }; res: { /** * websocket trigger deleted */ 200: WebsocketTrigger & UserDraftOverlay; }; }; }; '/w/{workspace}/websocket_triggers/list': { get: { req: { /** * When true, append per-user draft rows whose path has no * deployed counterpart. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. Gated to * non-operators + page 0 + no narrowing filters on the backend so * picker callers stay deployed-only and pagination stays clean. * */ includeDraftOnly?: boolean; isFlow?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * filter by path */ path?: string; pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; res: { /** * websocket trigger list */ 200: Array; }; }; }; '/w/{workspace}/websocket_triggers/exists/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * websocket trigger exists */ 200: boolean; }; }; }; '/w/{workspace}/websocket_triggers/setmode/{path}': { post: { req: { path: string; /** * updated websocket trigger enable */ requestBody: { mode: TriggerMode; /** * Bypass the parent-state conflict warning when enabling a trigger in a fork whose parent has the same path enabled. * */ force?: boolean; }; workspace: string; }; res: { /** * websocket trigger enabled set */ 200: string; }; }; }; '/w/{workspace}/websocket_triggers/test': { post: { req: { /** * test websocket connection */ requestBody: { url: string; url_runnable_args?: ScriptArgs; can_return_message: boolean; }; workspace: string; }; res: { /** * successfuly connected to websocket */ 200: string; }; }; }; '/w/{workspace}/kafka_triggers/create': { post: { req: { /** * new kafka trigger */ requestBody: NewKafkaTrigger; workspace: string; }; res: { /** * kafka trigger created */ 201: string; }; }; }; '/w/{workspace}/kafka_triggers/update/{path}': { post: { req: { path: string; /** * updated trigger */ requestBody: EditKafkaTrigger; workspace: string; }; res: { /** * kafka trigger updated */ 200: string; }; }; }; '/w/{workspace}/kafka_triggers/delete/{path}': { delete: { req: { path: string; workspace: string; }; res: { /** * kafka trigger deleted */ 200: string; }; }; }; '/w/{workspace}/kafka_triggers/get/{path}': { get: { req: { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; workspace: string; }; res: { /** * kafka trigger deleted */ 200: KafkaTrigger & UserDraftOverlay; }; }; }; '/w/{workspace}/kafka_triggers/list': { get: { req: { /** * When true, append per-user draft rows whose path has no * deployed counterpart. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. Gated to * non-operators + page 0 + no narrowing filters on the backend so * picker callers stay deployed-only and pagination stays clean. * */ includeDraftOnly?: boolean; isFlow?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * filter by path */ path?: string; pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; res: { /** * kafka trigger list */ 200: Array; }; }; }; '/w/{workspace}/kafka_triggers/exists/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * kafka trigger exists */ 200: boolean; }; }; }; '/w/{workspace}/kafka_triggers/setmode/{path}': { post: { req: { path: string; /** * updated kafka trigger enable */ requestBody: { mode: TriggerMode; /** * Bypass the parent-state conflict warning when enabling a trigger in a fork whose parent has the same path enabled. * */ force?: boolean; }; workspace: string; }; res: { /** * kafka trigger enabled set */ 200: string; }; }; }; '/w/{workspace}/kafka_triggers/test': { post: { req: { /** * test kafka connection */ requestBody: { connection: { [key: string]: unknown; }; }; workspace: string; }; res: { /** * successfuly connected to kafka brokers */ 200: string; }; }; }; '/w/{workspace}/kafka_triggers/reset_offsets/{path}': { post: { req: { path: string; workspace: string; }; res: { /** * kafka trigger offsets reset successfully */ 200: unknown; }; }; }; '/w/{workspace}/kafka_triggers/commit_offsets/{path}': { post: { req: { path: string; /** * offsets to commit */ requestBody: { topic: string; partition: number; offset: number; }; workspace: string; }; res: { /** * kafka offsets committed successfully */ 200: unknown; }; }; }; '/w/{workspace}/nats_triggers/create': { post: { req: { /** * new nats trigger */ requestBody: NewNatsTrigger; workspace: string; }; res: { /** * nats trigger created */ 201: string; }; }; }; '/w/{workspace}/nats_triggers/update/{path}': { post: { req: { path: string; /** * updated trigger */ requestBody: EditNatsTrigger; workspace: string; }; res: { /** * nats trigger updated */ 200: string; }; }; }; '/w/{workspace}/nats_triggers/delete/{path}': { delete: { req: { path: string; workspace: string; }; res: { /** * nats trigger deleted */ 200: string; }; }; }; '/w/{workspace}/nats_triggers/get/{path}': { get: { req: { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; workspace: string; }; res: { /** * nats trigger deleted */ 200: NatsTrigger & UserDraftOverlay; }; }; }; '/w/{workspace}/nats_triggers/list': { get: { req: { /** * When true, append per-user draft rows whose path has no * deployed counterpart. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. Gated to * non-operators + page 0 + no narrowing filters on the backend so * picker callers stay deployed-only and pagination stays clean. * */ includeDraftOnly?: boolean; isFlow?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * filter by path */ path?: string; pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; res: { /** * nats trigger list */ 200: Array; }; }; }; '/w/{workspace}/nats_triggers/exists/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * nats trigger exists */ 200: boolean; }; }; }; '/w/{workspace}/nats_triggers/setmode/{path}': { post: { req: { path: string; /** * updated nats trigger enable */ requestBody: { mode: TriggerMode; /** * Bypass the parent-state conflict warning when enabling a trigger in a fork whose parent has the same path enabled. * */ force?: boolean; }; workspace: string; }; res: { /** * nats trigger enabled set */ 200: string; }; }; }; '/w/{workspace}/nats_triggers/test': { post: { req: { /** * test nats connection */ requestBody: { connection: { [key: string]: unknown; }; }; workspace: string; }; res: { /** * successfuly connected to NATS servers */ 200: string; }; }; }; '/w/{workspace}/sqs_triggers/create': { post: { req: { /** * new sqs trigger */ requestBody: NewSqsTrigger; workspace: string; }; res: { /** * sqs trigger created */ 201: string; }; }; }; '/w/{workspace}/sqs_triggers/update/{path}': { post: { req: { path: string; /** * updated trigger */ requestBody: EditSqsTrigger; workspace: string; }; res: { /** * sqs trigger updated */ 200: string; }; }; }; '/w/{workspace}/sqs_triggers/delete/{path}': { delete: { req: { path: string; workspace: string; }; res: { /** * sqs trigger deleted */ 200: string; }; }; }; '/w/{workspace}/sqs_triggers/get/{path}': { get: { req: { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; workspace: string; }; res: { /** * sqs trigger deleted */ 200: SqsTrigger & UserDraftOverlay; }; }; }; '/w/{workspace}/sqs_triggers/list': { get: { req: { /** * When true, append per-user draft rows whose path has no * deployed counterpart. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. Gated to * non-operators + page 0 + no narrowing filters on the backend so * picker callers stay deployed-only and pagination stays clean. * */ includeDraftOnly?: boolean; isFlow?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * filter by path */ path?: string; pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; res: { /** * sqs trigger list */ 200: Array; }; }; }; '/w/{workspace}/sqs_triggers/exists/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * sqs trigger exists */ 200: boolean; }; }; }; '/w/{workspace}/sqs_triggers/setmode/{path}': { post: { req: { path: string; /** * updated sqs trigger enable */ requestBody: { mode: TriggerMode; /** * Bypass the parent-state conflict warning when enabling a trigger in a fork whose parent has the same path enabled. * */ force?: boolean; }; workspace: string; }; res: { /** * sqs trigger enabled set */ 200: string; }; }; }; '/w/{workspace}/sqs_triggers/test': { post: { req: { /** * test sqs connection */ requestBody: { connection: { [key: string]: unknown; }; }; workspace: string; }; res: { /** * successfuly connected to sqs */ 200: string; }; }; }; '/w/{workspace}/native_triggers/integrations/list': { get: { req: { workspace: string; }; res: { /** * native trigger services list */ 200: Array; }; }; }; '/w/{workspace}/native_triggers/integrations/{service_name}/exists': { get: { req: { serviceName: NativeServiceName; workspace: string; }; res: { /** * integration exists */ 200: boolean; }; }; }; '/w/{workspace}/native_triggers/integrations/{service_name}/create': { post: { req: { /** * new native trigger service */ requestBody: WorkspaceOAuthConfig; serviceName: NativeServiceName; workspace: string; }; res: { /** * native trigger service created */ 201: string; }; }; }; '/w/{workspace}/native_triggers/integrations/{service_name}/generate_connect_url': { post: { req: { /** * redirect_uri */ requestBody: RedirectUri; serviceName: NativeServiceName; workspace: string; }; res: { /** * native trigger service connect url */ 200: string; }; }; }; '/w/{workspace}/native_triggers/integrations/{service_name}/instance_sharing_available': { get: { req: { serviceName: NativeServiceName; workspace: string; }; res: { /** * whether instance sharing is available */ 200: boolean; }; }; }; '/w/{workspace}/native_triggers/integrations/{service_name}/generate_instance_connect_url': { post: { req: { /** * redirect_uri */ requestBody: RedirectUri; serviceName: NativeServiceName; workspace: string; }; res: { /** * authorization URL using instance credentials */ 200: string; }; }; }; '/w/{workspace}/native_triggers/integrations/{service_name}/delete': { delete: { req: { serviceName: NativeServiceName; workspace: string; }; res: { /** * native trigger service deleted */ 200: string; }; }; }; '/w/{workspace}/native_triggers/integrations/{service_name}/callback': { post: { req: { /** * OAuth callback data */ requestBody: { code: string; state: string; redirect_uri: string; resource_path?: string; }; serviceName: NativeServiceName; workspace: string; }; res: { /** * native trigger service oauth completed */ 200: string; }; }; }; '/w/{workspace}/native_triggers/{service_name}/create': { post: { req: { /** * new native trigger configuration */ requestBody: NativeTriggerData; serviceName: NativeServiceName; workspace: string; }; res: { /** * native trigger created */ 201: CreateTriggerResponse; }; }; }; '/w/{workspace}/native_triggers/{service_name}/update/{external_id}': { post: { req: { /** * The external ID of the trigger from the external service */ externalId: string; /** * updated native trigger configuration */ requestBody: NativeTriggerData; serviceName: NativeServiceName; workspace: string; }; res: { /** * native trigger updated */ 200: string; }; }; }; '/w/{workspace}/native_triggers/{service_name}/get/{external_id}': { get: { req: { /** * The external ID of the trigger from the external service */ externalId: string; serviceName: NativeServiceName; workspace: string; }; res: { /** * native trigger with external configuration */ 200: NativeTriggerWithExternal; }; }; }; '/w/{workspace}/native_triggers/{service_name}/delete/{external_id}': { delete: { req: { /** * The external ID of the trigger from the external service */ externalId: string; serviceName: NativeServiceName; workspace: string; }; res: { /** * native trigger deleted */ 200: string; }; }; }; '/w/{workspace}/native_triggers/{service_name}/setenabled/{external_id}': { post: { req: { /** * The external ID of the trigger from the external service */ externalId: string; /** * updated enabled state */ requestBody: { enabled: boolean; }; serviceName: NativeServiceName; workspace: string; }; res: { /** * native trigger enabled state updated */ 200: string; }; }; }; '/w/{workspace}/native_triggers/{service_name}/list': { get: { req: { /** * When true, append per-user draft rows whose path has no * deployed counterpart. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. Gated to * non-operators + page 0 + no narrowing filters on the backend so * picker callers stay deployed-only and pagination stays clean. * */ includeDraftOnly?: boolean; /** * filter by is_flow */ isFlow?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * filter by script path */ path?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; serviceName: NativeServiceName; workspace: string; }; res: { /** * native triggers list */ 200: Array; }; }; }; '/w/{workspace}/native_triggers/{service_name}/exists/{external_id}': { get: { req: { /** * The external ID of the trigger from the external service */ externalId: string; serviceName: NativeServiceName; workspace: string; }; res: { /** * whether the native trigger exists */ 200: boolean; }; }; }; '/w/{workspace}/native_triggers/{service_name}/sync': { post: { req: { serviceName: NativeServiceName; workspace: string; }; res: { /** * sync completed successfully */ 200: unknown; }; }; }; '/w/{workspace}/native_triggers/nextcloud/events': { get: { req: { workspace: string; }; res: { /** * list of available NextCloud events */ 200: Array; }; }; }; '/w/{workspace}/native_triggers/google/calendars': { get: { req: { workspace: string; }; res: { /** * list of Google Calendars */ 200: Array; }; }; }; '/w/{workspace}/native_triggers/google/drive/files': { get: { req: { /** * token for next page of results */ pageToken?: string; /** * folder ID to list children of */ parentId?: string; /** * search query to filter files by name */ q?: string; /** * if true, list files shared with the user */ sharedWithMe?: boolean; workspace: string; }; res: { /** * list of Google Drive files */ 200: GoogleDriveFilesResponse; }; }; }; '/w/{workspace}/native_triggers/google/drive/shared_drives': { get: { req: { workspace: string; }; res: { /** * list of shared drives */ 200: Array; }; }; }; '/w/{workspace}/native_triggers/github/repos': { get: { req: { workspace: string; }; res: { /** * list of GitHub repositories */ 200: Array; }; }; }; '/native_triggers/{service_name}/w/{workspace_id}/webhook/{internal_id}': { post: { req: { /** * The internal database ID of the trigger */ internalId: number; /** * webhook payload from external service */ requestBody?: { [key: string]: unknown; }; serviceName: NativeServiceName; workspaceId: string; }; res: { /** * webhook received successfully */ 200: string; }; }; }; '/w/{workspace}/mqtt_triggers/create': { post: { req: { /** * new mqtt trigger */ requestBody: NewMqttTrigger; workspace: string; }; res: { /** * mqtt trigger created */ 201: string; }; }; }; '/w/{workspace}/mqtt_triggers/update/{path}': { post: { req: { path: string; /** * updated trigger */ requestBody: EditMqttTrigger; workspace: string; }; res: { /** * mqtt trigger updated */ 200: string; }; }; }; '/w/{workspace}/mqtt_triggers/delete/{path}': { delete: { req: { path: string; workspace: string; }; res: { /** * mqtt trigger deleted */ 200: string; }; }; }; '/w/{workspace}/mqtt_triggers/get/{path}': { get: { req: { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; workspace: string; }; res: { /** * mqtt trigger deleted */ 200: MqttTrigger & UserDraftOverlay; }; }; }; '/w/{workspace}/mqtt_triggers/list': { get: { req: { /** * When true, append per-user draft rows whose path has no * deployed counterpart. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. Gated to * non-operators + page 0 + no narrowing filters on the backend so * picker callers stay deployed-only and pagination stays clean. * */ includeDraftOnly?: boolean; isFlow?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * filter by path */ path?: string; pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; res: { /** * mqtt trigger list */ 200: Array; }; }; }; '/w/{workspace}/mqtt_triggers/exists/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * mqtt trigger exists */ 200: boolean; }; }; }; '/w/{workspace}/mqtt_triggers/setmode/{path}': { post: { req: { path: string; /** * updated mqtt trigger enable */ requestBody: { mode: TriggerMode; /** * Bypass the parent-state conflict warning when enabling a trigger in a fork whose parent has the same path enabled. * */ force?: boolean; }; workspace: string; }; res: { /** * mqtt trigger enabled set */ 200: string; }; }; }; '/w/{workspace}/mqtt_triggers/test': { post: { req: { /** * test mqtt connection */ requestBody: { connection: { [key: string]: unknown; }; }; workspace: string; }; res: { /** * successfully connected to mqtt */ 200: string; }; }; }; '/w/{workspace}/amqp_triggers/create': { post: { req: { /** * new amqp trigger */ requestBody: NewAmqpTrigger; workspace: string; }; res: { /** * amqp trigger created */ 201: string; }; }; }; '/w/{workspace}/amqp_triggers/update/{path}': { post: { req: { path: string; /** * updated trigger */ requestBody: EditAmqpTrigger; workspace: string; }; res: { /** * amqp trigger updated */ 200: string; }; }; }; '/w/{workspace}/amqp_triggers/delete/{path}': { delete: { req: { path: string; workspace: string; }; res: { /** * amqp trigger deleted */ 200: string; }; }; }; '/w/{workspace}/amqp_triggers/get/{path}': { get: { req: { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; workspace: string; }; res: { /** * amqp trigger retrieved */ 200: AmqpTrigger & UserDraftOverlay; }; }; }; '/w/{workspace}/amqp_triggers/list': { get: { req: { /** * When true, append per-user draft rows whose path has no * deployed counterpart. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. Gated to * non-operators + page 0 + no narrowing filters on the backend so * picker callers stay deployed-only and pagination stays clean. * */ includeDraftOnly?: boolean; isFlow?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * filter by path */ path?: string; pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; res: { /** * amqp trigger list */ 200: Array; }; }; }; '/w/{workspace}/amqp_triggers/exists/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * amqp trigger exists */ 200: boolean; }; }; }; '/w/{workspace}/amqp_triggers/setmode/{path}': { post: { req: { path: string; /** * updated amqp trigger enable */ requestBody: { mode: TriggerMode; /** * Bypass the parent-state conflict warning when enabling a trigger in a fork whose parent has the same path enabled. * */ force?: boolean; }; workspace: string; }; res: { /** * amqp trigger enabled set */ 200: string; }; }; }; '/w/{workspace}/amqp_triggers/test': { post: { req: { /** * test amqp connection */ requestBody: { /** * Path to the AMQP resource containing broker connection configuration */ amqp_resource_path: string; }; workspace: string; }; res: { /** * successfully connected to amqp */ 200: string; }; }; }; '/w/{workspace}/gcp_triggers/create': { post: { req: { /** * new gcp trigger */ requestBody: GcpTriggerData; workspace: string; }; res: { /** * gcp trigger created */ 201: string; }; }; }; '/w/{workspace}/gcp_triggers/update/{path}': { post: { req: { path: string; /** * updated trigger */ requestBody: GcpTriggerData; workspace: string; }; res: { /** * gcp trigger updated */ 200: string; }; }; }; '/w/{workspace}/gcp_triggers/delete/{path}': { delete: { req: { path: string; workspace: string; }; res: { /** * gcp trigger deleted */ 200: string; }; }; }; '/w/{workspace}/gcp_triggers/get/{path}': { get: { req: { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; workspace: string; }; res: { /** * gcp trigger deleted */ 200: GcpTrigger & UserDraftOverlay; }; }; }; '/w/{workspace}/gcp_triggers/list': { get: { req: { /** * When true, append per-user draft rows whose path has no * deployed counterpart. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. Gated to * non-operators + page 0 + no narrowing filters on the backend so * picker callers stay deployed-only and pagination stays clean. * */ includeDraftOnly?: boolean; isFlow?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * filter by path */ path?: string; pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; res: { /** * gcp trigger list */ 200: Array; }; }; }; '/w/{workspace}/gcp_triggers/exists/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * gcp trigger exists */ 200: boolean; }; }; }; '/w/{workspace}/gcp_triggers/setmode/{path}': { post: { req: { path: string; /** * updated gcp trigger enable */ requestBody: { mode: TriggerMode; /** * Bypass the parent-state conflict warning when enabling a trigger in a fork whose parent has the same path enabled. * */ force?: boolean; }; workspace: string; }; res: { /** * gcp trigger enabled set */ 200: string; }; }; }; '/w/{workspace}/gcp_triggers/test': { post: { req: { /** * test gcp connection */ requestBody: { connection: { [key: string]: unknown; }; }; workspace: string; }; res: { /** * try to connect to a gcp broker */ 200: string; }; }; }; '/w/{workspace}/gcp_triggers/subscriptions/delete/{path}': { delete: { req: { path: string; /** * args to delete subscription from google cloud */ requestBody: DeleteGcpSubscription; workspace: string; }; res: { /** * gcp trigger deleted */ 200: string; }; }; }; '/w/{workspace}/gcp_triggers/subscriptions/delete': { delete: { req: { /** * args to delete subscription from google cloud */ requestBody: DeleteGcpSubscription; workspace: string; }; res: { /** * gcp trigger deleted */ 200: string; }; }; }; '/w/{workspace}/gcp_triggers/topics/list/{path}': { get: { req: { path: string; /** * GCP project to list resources from, when it is not the project of the credentials */ projectId?: string; workspace: string; }; res: { /** * get all google topics */ 200: Array<(string)>; }; }; }; '/w/{workspace}/gcp_triggers/topics/list': { get: { req: { /** * GCP project to list resources from, when it is not the project of the credentials */ projectId?: string; workspace: string; }; res: { /** * get all google topics */ 200: Array<(string)>; }; }; }; '/w/{workspace}/gcp_triggers/subscriptions/list/{path}': { post: { req: { path: string; /** * args to get subscription's topic from google cloud */ requestBody: GetAllTopicSubscription; workspace: string; }; res: { /** * get all google topic subscriptions name */ 200: Array<(string)>; }; }; }; '/w/{workspace}/gcp_triggers/subscriptions/list': { post: { req: { /** * args to get subscription's topic from google cloud */ requestBody: GetAllTopicSubscription; workspace: string; }; res: { /** * get all google topic subscriptions name */ 200: Array<(string)>; }; }; }; '/w/{workspace}/azure_triggers/create': { post: { req: { requestBody: AzureTriggerData; workspace: string; }; res: { /** * azure trigger created */ 201: string; }; }; }; '/w/{workspace}/azure_triggers/update/{path}': { post: { req: { path: string; requestBody: AzureTriggerData; workspace: string; }; res: { /** * azure trigger updated */ 200: string; }; }; }; '/w/{workspace}/azure_triggers/delete/{path}': { delete: { req: { path: string; workspace: string; }; res: { /** * azure trigger deleted */ 200: string; }; }; }; '/w/{workspace}/azure_triggers/get/{path}': { get: { req: { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; workspace: string; }; res: { /** * azure trigger */ 200: AzureTrigger & UserDraftOverlay; }; }; }; '/w/{workspace}/azure_triggers/list': { get: { req: { /** * When true, append per-user draft rows whose path has no * deployed counterpart. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. Gated to * non-operators + page 0 + no narrowing filters on the backend so * picker callers stay deployed-only and pagination stays clean. * */ includeDraftOnly?: boolean; isFlow?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * filter by exact path */ path?: string; pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; res: { /** * azure trigger list */ 200: Array; }; }; }; '/w/{workspace}/azure_triggers/exists/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * true/false */ 200: boolean; }; }; }; '/w/{workspace}/azure_triggers/setmode/{path}': { post: { req: { path: string; requestBody: { mode: TriggerMode; /** * Bypass the parent-state conflict warning when enabling a trigger in a fork whose parent has the same path enabled. * */ force?: boolean; }; workspace: string; }; res: { /** * trigger mode updated */ 200: string; }; }; }; '/w/{workspace}/azure_triggers/test': { post: { req: { requestBody: TestAzureConnection; workspace: string; }; res: { /** * connection successful */ 200: string; }; }; }; '/w/{workspace}/azure_triggers/namespaces/topics/list/{path}': { post: { req: { path: string; requestBody: AzureListTopics; workspace: string; }; res: { /** * topic list */ 200: Array<{ [key: string]: unknown; }>; }; }; }; '/w/{workspace}/azure_triggers/namespaces/subscriptions/list/{path}': { post: { req: { path: string; requestBody: AzureListSubscriptions; workspace: string; }; res: { /** * subscription list */ 200: Array<{ [key: string]: unknown; }>; }; }; }; '/w/{workspace}/azure_triggers/subscriptions/delete/{path}': { delete: { req: { path: string; requestBody: AzureDeleteSubscription; workspace: string; }; res: { /** * subscription deleted */ 200: string; }; }; }; '/w/{workspace}/azure_triggers/namespaces/list/{path}': { post: { req: { path: string; workspace: string; }; res: { /** * namespace list */ 200: Array; }; }; }; '/w/{workspace}/azure_triggers/basic/topics/list/{path}': { post: { req: { path: string; workspace: string; }; res: { /** * topic list */ 200: Array; }; }; }; '/w/{workspace}/postgres_triggers/postgres/version/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * postgres version */ 200: string; }; }; }; '/w/{workspace}/postgres_triggers/is_valid_postgres_configuration/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * boolean that indicates if postgres is set to logical level or not */ 200: boolean; }; }; }; '/w/{workspace}/postgres_triggers/create_template_script': { post: { req: { /** * template script */ requestBody: TemplateScript; workspace: string; }; res: { /** * custom id to retrieve template script */ 200: string; }; }; }; '/w/{workspace}/postgres_triggers/get_template_script/{id}': { get: { req: { id: string; workspace: string; }; res: { /** * template script */ 200: string; }; }; }; '/w/{workspace}/postgres_triggers/slot/list/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * list postgres slot */ 200: Array; }; }; }; '/w/{workspace}/postgres_triggers/slot/create/{path}': { post: { req: { path: string; /** * new slot for postgres */ requestBody: Slot; workspace: string; }; res: { /** * slot created */ 201: string; }; }; }; '/w/{workspace}/postgres_triggers/slot/delete/{path}': { delete: { req: { path: string; /** * replication slot of postgres */ requestBody: Slot; workspace: string; }; res: { /** * postgres replication slot deleted */ 200: string; }; }; }; '/w/{workspace}/postgres_triggers/publication/list/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * database publication list */ 200: Array<(string)>; }; }; }; '/w/{workspace}/postgres_triggers/publication/get/{publication}/{path}': { get: { req: { path: string; /** * The name of the publication */ publication: string; workspace: string; }; res: { /** * postgres publication get */ 200: PublicationData; }; }; }; '/w/{workspace}/postgres_triggers/publication/create/{publication}/{path}': { post: { req: { path: string; /** * The name of the publication */ publication: string; /** * new publication for postgres */ requestBody: PublicationData; workspace: string; }; res: { /** * publication created */ 201: string; }; }; }; '/w/{workspace}/postgres_triggers/publication/update/{publication}/{path}': { post: { req: { path: string; /** * The name of the publication */ publication: string; /** * update publication for postgres */ requestBody: PublicationData; workspace: string; }; res: { /** * publication updated */ 201: string; }; }; }; '/w/{workspace}/postgres_triggers/publication/delete/{publication}/{path}': { delete: { req: { path: string; /** * The name of the publication */ publication: string; workspace: string; }; res: { /** * postgres publication deleted */ 200: string; }; }; }; '/w/{workspace}/postgres_triggers/create': { post: { req: { /** * new postgres trigger */ requestBody: NewPostgresTrigger; workspace: string; }; res: { /** * postgres trigger created */ 201: string; }; }; }; '/w/{workspace}/postgres_triggers/update/{path}': { post: { req: { path: string; /** * updated trigger */ requestBody: EditPostgresTrigger; workspace: string; }; res: { /** * postgres trigger updated */ 200: string; }; }; }; '/w/{workspace}/postgres_triggers/delete/{path}': { delete: { req: { path: string; workspace: string; }; res: { /** * postgres trigger deleted */ 200: string; }; }; }; '/w/{workspace}/postgres_triggers/get/{path}': { get: { req: { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; workspace: string; }; res: { /** * get postgres trigger */ 200: PostgresTrigger & UserDraftOverlay; }; }; }; '/w/{workspace}/postgres_triggers/list': { get: { req: { /** * When true, append per-user draft rows whose path has no * deployed counterpart. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. Gated to * non-operators + page 0 + no narrowing filters on the backend so * picker callers stay deployed-only and pagination stays clean. * */ includeDraftOnly?: boolean; isFlow?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * filter by path */ path?: string; pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; res: { /** * postgres trigger list */ 200: Array; }; }; }; '/w/{workspace}/postgres_triggers/exists/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * postgres trigger exists */ 200: boolean; }; }; }; '/w/{workspace}/postgres_triggers/setmode/{path}': { post: { req: { path: string; /** * updated postgres trigger enable */ requestBody: { mode: TriggerMode; /** * Bypass the parent-state conflict warning when enabling a trigger in a fork whose parent has the same path enabled. * */ force?: boolean; }; workspace: string; }; res: { /** * postgres trigger enabled set */ 200: string; }; }; }; '/w/{workspace}/postgres_triggers/test': { post: { req: { /** * test postgres connection */ requestBody: { database: string; }; workspace: string; }; res: { /** * successfuly connected to postgres */ 200: string; }; }; }; '/w/{workspace}/email_triggers/create': { post: { req: { /** * new email trigger */ requestBody: NewEmailTrigger; workspace: string; }; res: { /** * email trigger created */ 201: string; }; }; }; '/w/{workspace}/email_triggers/update/{path}': { post: { req: { path: string; /** * updated trigger */ requestBody: EditEmailTrigger; workspace: string; }; res: { /** * email trigger updated */ 200: string; }; }; }; '/w/{workspace}/email_triggers/delete/{path}': { delete: { req: { path: string; workspace: string; }; res: { /** * email trigger deleted */ 200: string; }; }; }; '/w/{workspace}/email_triggers/get/{path}': { get: { req: { /** * When true, overlay the authed user's draft (if any) onto the deployed payload. */ getDraft?: boolean; path: string; workspace: string; }; res: { /** * email trigger retrieved */ 200: EmailTrigger & UserDraftOverlay; }; }; }; '/w/{workspace}/email_triggers/list': { get: { req: { /** * When true, append per-user draft rows whose path has no * deployed counterpart. Synthesized rows carry `draft_only: true` * so the home page can render a "Draft" badge. Gated to * non-operators + page 0 + no narrowing filters on the backend so * picker callers stay deployed-only and pagination stays clean. * */ includeDraftOnly?: boolean; isFlow?: boolean; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * filter by path */ path?: string; pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; res: { /** * email trigger list */ 200: Array; }; }; }; '/w/{workspace}/email_triggers/exists/{path}': { get: { req: { path: string; workspace: string; }; res: { /** * email trigger exists */ 200: boolean; }; }; }; '/w/{workspace}/email_triggers/local_part_exists': { post: { req: { /** * email local part exists request */ requestBody: { local_part: string; workspaced_local_part?: boolean; trigger_path?: string; }; workspace: string; }; res: { /** * email local part exists */ 200: boolean; }; }; }; '/w/{workspace}/email_triggers/setmode/{path}': { post: { req: { path: string; requestBody: { mode: TriggerMode; /** * Bypass the parent-state conflict warning when enabling a trigger in a fork whose parent has the same path enabled. * */ force?: boolean; }; workspace: string; }; res: { /** * email trigger enable/disable */ 200: string; }; }; }; '/groups/list': { get: { res: { /** * instance group list */ 200: Array; }; }; }; '/groups/list_with_workspaces': { get: { res: { /** * instance group list with workspaces */ 200: Array; }; }; }; '/groups/get/{name}': { get: { req: { name: string; }; res: { /** * instance group */ 200: InstanceGroupWithWorkspaces; }; }; }; '/groups/create': { post: { req: { /** * create instance group */ requestBody: { name: string; summary?: string; }; }; res: { /** * instance group created */ 200: string; }; }; }; '/groups/update/{name}': { post: { req: { name: string; /** * update instance group */ requestBody: { new_summary: string; /** * Instance-level role for group members. 'superadmin', 'devops', 'user' or empty to clear. */ instance_role?: string | null; }; }; res: { /** * instance group updated */ 200: string; }; }; }; '/groups/delete/{name}': { delete: { req: { name: string; }; res: { /** * instance group deleted */ 200: string; }; }; }; '/groups/adduser/{name}': { post: { req: { name: string; /** * user to add to instance group */ requestBody: { email: string; }; }; res: { /** * user added to instance group */ 200: string; }; }; }; '/groups/removeuser/{name}': { post: { req: { name: string; /** * user to remove from instance group */ requestBody: { email: string; }; }; res: { /** * user removed from instance group */ 200: string; }; }; }; '/groups/export': { get: { res: { /** * exported instance groups */ 200: Array; }; }; }; '/groups/overwrite': { post: { req: { /** * overwrite instance groups */ requestBody: Array; }; res: { /** * success message */ 200: string; }; }; }; '/w/{workspace}/groups/list': { get: { req: { /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; res: { /** * group list */ 200: Array; }; }; }; '/w/{workspace}/groups/listnames': { get: { req: { /** * only list the groups the user is member of (default false) */ onlyMemberOf?: boolean; workspace: string; }; res: { /** * group list */ 200: Array<(string)>; }; }; }; '/w/{workspace}/groups/create': { post: { req: { /** * create group */ requestBody: { name: string; summary?: string; }; workspace: string; }; res: { /** * group created */ 200: string; }; }; }; '/w/{workspace}/groups/update/{name}': { post: { req: { name: string; /** * updated group */ requestBody: { summary?: string; }; workspace: string; }; res: { /** * group updated */ 200: string; }; }; }; '/w/{workspace}/groups/delete/{name}': { delete: { req: { name: string; workspace: string; }; res: { /** * group deleted */ 200: string; }; }; }; '/w/{workspace}/groups/get/{name}': { get: { req: { name: string; workspace: string; }; res: { /** * group */ 200: Group; }; }; }; '/w/{workspace}/groups/adduser/{name}': { post: { req: { name: string; /** * added user to group */ requestBody: { username?: string; }; workspace: string; }; res: { /** * user added to group */ 200: string; }; }; }; '/w/{workspace}/groups/removeuser/{name}': { post: { req: { name: string; /** * added user to group */ requestBody: { username?: string; }; workspace: string; }; res: { /** * user removed from group */ 200: string; }; }; }; '/w/{workspace}/groups_history/get/{name}': { get: { req: { name: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; res: { /** * group permission history */ 200: Array<{ id?: number; changed_by?: string; changed_at?: string; change_type?: string; member_affected?: string | null; }>; }; }; }; '/w/{workspace}/folders/list': { get: { req: { /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; res: { /** * folder list */ 200: Array; }; }; }; '/w/{workspace}/folders/listnames': { get: { req: { /** * only list the folders the user is member of (default false) */ onlyMemberOf?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; res: { /** * folder list */ 200: Array<(string)>; }; }; }; '/w/{workspace}/folders/create': { post: { req: { /** * create folder */ requestBody: { name: string; summary?: string; owners?: Array<(string)>; extra_perms?: unknown; default_permissioned_as?: FolderDefaultPermissionedAs; labels?: Array<(string)>; }; workspace: string; }; res: { /** * folder created */ 200: string; }; }; }; '/w/{workspace}/folders/update/{name}': { post: { req: { name: string; /** * update folder */ requestBody: { summary?: string; owners?: Array<(string)>; extra_perms?: unknown; default_permissioned_as?: FolderDefaultPermissionedAs; labels?: Array<(string)>; }; workspace: string; }; res: { /** * folder updated */ 200: string; }; }; }; '/w/{workspace}/folders/delete/{name}': { delete: { req: { name: string; workspace: string; }; res: { /** * folder deleted */ 200: string; }; }; }; '/w/{workspace}/folders/get/{name}': { get: { req: { name: string; workspace: string; }; res: { /** * folder */ 200: Folder; }; }; }; '/w/{workspace}/folders/exists/{name}': { get: { req: { name: string; workspace: string; }; res: { /** * folder exists */ 200: boolean; }; }; }; '/w/{workspace}/folders/getusage/{name}': { get: { req: { name: string; workspace: string; }; res: { /** * folder */ 200: { scripts: number; flows: number; apps: number; resources: number; variables: number; schedules: number; }; }; }; }; '/w/{workspace}/folders/addowner/{name}': { post: { req: { name: string; /** * owner user to folder */ requestBody: { owner: string; }; workspace: string; }; res: { /** * owner added to folder */ 200: string; }; }; }; '/w/{workspace}/folders/removeowner/{name}': { post: { req: { name: string; /** * added owner to folder */ requestBody: { owner: string; write?: boolean; }; workspace: string; }; res: { /** * owner removed from folder */ 200: string; }; }; }; '/w/{workspace}/folders_history/get/{name}': { get: { req: { name: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workspace: string; }; res: { /** * folder permission history */ 200: Array<{ id?: number; changed_by?: string; changed_at?: string; change_type?: string; affected?: string | null; }>; }; }; }; '/configs/list_worker_groups': { get: { res: { /** * a list of worker group configs */ 200: Array<{ name: string; config: unknown; }>; }; }; }; '/configs/get/{name}': { get: { req: { name: string; }; res: { /** * a config */ 200: Configs; }; }; }; '/configs/update/{name}': { post: { req: { name: string; /** * worker group */ requestBody: unknown; }; res: { /** * Update a worker group */ 200: string; }; }; delete: { req: { name: string; }; res: { /** * Delete config */ 200: string; }; }; }; '/configs/list': { get: { res: { /** * list of configs */ 200: Array; }; }; }; '/configs/list_autoscaling_events/{worker_group}': { get: { req: { /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; workerGroup: string; }; res: { /** * List of autoscaling events */ 200: Array; }; }; }; '/configs/native_kubernetes_autoscaling_healthcheck': { get: { res: { /** * Kubernetes autoscaling is healthy */ 200: unknown; /** * Error */ 400: string; }; }; }; '/configs/list_available_python_versions': { get: { res: { /** * List of python versions */ 200: Array<(string)>; }; }; }; '/configs/list_all_workspace_dependencies': { get: { res: { /** * a list of workspace dependency summaries */ 200: Array<{ workspace_id: string; name?: string; language: ScriptLang; }>; }; }; }; '/configs/list_all_dedicated_with_deps': { get: { res: { /** * a list of dedicated scripts with workspace dependencies */ 200: Array<{ workspace_id: string; path: string; language: ScriptLang; workspace_dep_names: Array<(string)>; }>; }; }; }; '/agent_workers/create_agent_token': { post: { req: { /** * agent token */ requestBody: { worker_group: string; tags: Array<(string)>; exp: number; }; }; res: { /** * agent token created */ 200: string; }; }; }; '/agent_workers/blacklist_token': { post: { req: { /** * token to blacklist */ requestBody: { /** * The agent token to blacklist */ token: string; /** * Optional expiration date for the blacklist entry */ expires_at?: string; }; }; res: { /** * token blacklisted successfully */ 200: unknown; }; }; }; '/agent_workers/remove_blacklist_token': { post: { req: { /** * token to remove from blacklist */ requestBody: { /** * The agent token to remove from blacklist */ token: string; }; }; res: { /** * token removed from blacklist successfully */ 200: unknown; }; }; }; '/agent_workers/list_blacklisted_tokens': { get: { req: { /** * Whether to include expired blacklisted tokens */ includeExpired?: boolean; }; res: { /** * list of blacklisted tokens */ 200: Array<{ /** * The blacklisted token (without prefix) */ token: string; /** * When the blacklist entry expires */ expires_at: string; /** * When the token was blacklisted */ blacklisted_at: string; /** * Email of the user who blacklisted the token */ blacklisted_by: string; }>; }; }; }; '/agent_workers/get_min_version': { get: { res: { /** * minimum worker version */ 200: string; }; }; }; '/w/{workspace}/acls/get/{kind}/{path}': { get: { req: { kind: 'script' | 'group_' | 'resource' | 'schedule' | 'variable' | 'flow' | 'folder' | 'app' | 'raw_app' | 'http_trigger' | 'websocket_trigger' | 'kafka_trigger' | 'nats_trigger' | 'postgres_trigger' | 'mqtt_trigger' | 'amqp_trigger' | 'gcp_trigger' | 'azure_trigger' | 'sqs_trigger' | 'email_trigger' | 'volume'; path: string; workspace: string; }; res: { /** * acls */ 200: { [key: string]: (boolean); }; }; }; }; '/w/{workspace}/acls/add/{kind}/{path}': { post: { req: { kind: 'script' | 'group_' | 'resource' | 'schedule' | 'variable' | 'flow' | 'folder' | 'app' | 'raw_app' | 'http_trigger' | 'websocket_trigger' | 'kafka_trigger' | 'nats_trigger' | 'postgres_trigger' | 'mqtt_trigger' | 'amqp_trigger' | 'gcp_trigger' | 'azure_trigger' | 'sqs_trigger' | 'email_trigger' | 'volume'; path: string; /** * acl to add */ requestBody: { owner: string; write?: boolean; }; workspace: string; }; res: { /** * granular acl added */ 200: string; }; }; }; '/w/{workspace}/acls/remove/{kind}/{path}': { post: { req: { kind: 'script' | 'group_' | 'resource' | 'schedule' | 'variable' | 'flow' | 'folder' | 'app' | 'raw_app' | 'http_trigger' | 'websocket_trigger' | 'kafka_trigger' | 'nats_trigger' | 'postgres_trigger' | 'mqtt_trigger' | 'amqp_trigger' | 'gcp_trigger' | 'azure_trigger' | 'sqs_trigger' | 'email_trigger' | 'volume'; path: string; /** * acl to add */ requestBody: { owner: string; }; workspace: string; }; res: { /** * granular acl removed */ 200: string; }; }; }; '/w/{workspace}/capture/set_config': { post: { req: { /** * capture config */ requestBody: { trigger_kind: CaptureTriggerKind; path: string; is_flow: boolean; trigger_config?: { [key: string]: unknown; }; }; workspace: string; }; res: { /** * capture config set */ 200: { [key: string]: unknown; }; }; }; }; '/w/{workspace}/capture/ping_config/{trigger_kind}/{runnable_kind}/{path}': { post: { req: { path: string; runnableKind: 'script' | 'flow'; triggerKind: CaptureTriggerKind; workspace: string; }; res: { /** * capture config pinged */ 200: unknown; }; }; }; '/w/{workspace}/capture/get_configs/{runnable_kind}/{path}': { get: { req: { path: string; runnableKind: 'script' | 'flow'; workspace: string; }; res: { /** * capture configs for a script or flow */ 200: Array; }; }; }; '/w/{workspace}/capture/list/{runnable_kind}/{path}': { get: { req: { /** * which page to return (start at 1, default 1) */ page?: number; path: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; runnableKind: 'script' | 'flow'; triggerKind?: CaptureTriggerKind; workspace: string; }; res: { /** * list of captures for a script or flow */ 200: Array; }; }; }; '/w/{workspace}/capture/move/{runnable_kind}/{path}': { post: { req: { path: string; /** * move captures and configs to a new path */ requestBody: { new_path?: string; }; runnableKind: 'script' | 'flow'; workspace: string; }; res: { /** * captures and configs moved */ 200: string; }; }; }; '/w/{workspace}/capture/{id}': { get: { req: { id: number; workspace: string; }; res: { /** * capture */ 200: Capture; }; }; delete: { req: { id: number; workspace: string; }; res: { /** * capture deleted */ 200: unknown; }; }; }; '/w/{workspace}/favorites/star': { post: { req: { requestBody?: { path?: string; favorite_kind?: 'flow' | 'app' | 'script' | 'raw_app' | 'asset'; }; workspace: string; }; res: { /** * star item */ 200: unknown; }; }; }; '/w/{workspace}/favorites/unstar': { post: { req: { requestBody?: { path?: string; favorite_kind?: 'flow' | 'app' | 'script' | 'raw_app' | 'asset'; }; workspace: string; }; res: { /** * unstar item */ 200: unknown; }; }; }; '/w/{workspace}/inputs/history': { get: { req: { /** * filter on jobs containing those args as a json subset (@> in postgres) */ args?: string; includePreview?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; runnableId?: string; runnableType?: RunnableType; workspace: string; }; res: { /** * Input history for completed jobs */ 200: Array; }; }; }; '/w/{workspace}/inputs/{jobOrInputId}/args': { get: { req: { allowLarge?: boolean; input?: boolean; jobOrInputId: string; workspace: string; }; res: { /** * args */ 200: unknown; }; }; }; '/w/{workspace}/inputs/list': { get: { req: { /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; runnableId?: string; runnableType?: RunnableType; workspace: string; }; res: { /** * Saved Inputs for a Runnable */ 200: Array; }; }; }; '/w/{workspace}/inputs/create': { post: { req: { /** * Input */ requestBody: CreateInput; runnableId?: string; runnableType?: RunnableType; workspace: string; }; res: { /** * Input created */ 201: string; }; }; }; '/w/{workspace}/inputs/update': { post: { req: { /** * UpdateInput */ requestBody: UpdateInput; workspace: string; }; res: { /** * Input updated */ 201: string; }; }; }; '/w/{workspace}/inputs/delete/{input}': { post: { req: { input: string; workspace: string; }; res: { /** * Input deleted */ 200: string; }; }; }; '/w/{workspace}/job_helpers/duckdb_connection_settings': { post: { req: { /** * S3 resource to connect to */ requestBody: { s3_resource?: S3Resource; }; workspace: string; }; res: { /** * Connection settings */ 200: { connection_settings_str?: string; }; }; }; }; '/w/{workspace}/job_helpers/v2/duckdb_connection_settings': { post: { req: { /** * S3 resource path to use to generate the connection settings. If empty, the S3 resource defined in the workspace settings will be used */ requestBody: { s3_resource_path?: string; }; workspace: string; }; res: { /** * Connection settings */ 200: { connection_settings_str: string; azure_container_path?: string; }; }; }; }; '/w/{workspace}/job_helpers/polars_connection_settings': { post: { req: { /** * S3 resource to connect to */ requestBody: { s3_resource?: S3Resource; }; workspace: string; }; res: { /** * Connection settings */ 200: { endpoint_url: string; key?: string; secret?: string; use_ssl: boolean; cache_regions: boolean; client_kwargs: PolarsClientKwargs; }; }; }; }; '/w/{workspace}/job_helpers/v2/polars_connection_settings': { post: { req: { /** * S3 resource path to use to generate the connection settings. If empty, the S3 resource defined in the workspace settings will be used */ requestBody: { s3_resource_path?: string; }; workspace: string; }; res: { /** * Connection settings */ 200: { s3fs_args: { endpoint_url: string; key?: string; secret?: string; use_ssl: boolean; cache_regions: boolean; client_kwargs: PolarsClientKwargs; }; storage_options: { aws_endpoint_url: string; aws_access_key_id?: string; aws_secret_access_key?: string; aws_region: string; aws_allow_http: string; }; }; }; }; }; '/w/{workspace}/job_helpers/v2/s3_resource_info': { post: { req: { /** * S3 resource path to use. If empty, the S3 resource defined in the workspace settings will be used */ requestBody: { s3_resource_path?: string; }; workspace: string; }; res: { /** * Connection settings */ 200: S3Resource; }; }; }; '/w/{workspace}/job_helpers/test_connection': { get: { req: { /** * When set, test the connection of this object storage resource instead of the workspace storage */ s3ResourcePath?: string; storage?: string; workspace: string; }; res: { /** * Connection settings */ 200: unknown; }; }; }; '/w/{workspace}/job_helpers/storage_usage': { get: { req: { /** * recount usage by listing the storage instead of returning cached values */ refresh?: boolean; workspace: string; }; res: { /** * Storage usage */ 200: { total_bytes: number; /** * only present on Community Edition, where workspace storage is capped */ quota_bytes?: number; storages: Array<{ storage: string; bytes: number; computed_at: string; }>; }; }; }; }; '/w/{workspace}/job_helpers/list_stored_files': { get: { req: { marker?: string; maxKeys: number; prefix?: string; /** * When set, list the files of this object storage resource instead of the workspace storage */ s3ResourcePath?: string; /** * Match keys by path prefix, case-sensitively, on the raw key rather than per path segment (so "a/file1" matches "a/file1000"). Pushed down to the storage provider as a seek; resume with the returned next_marker. */ search?: string; storage?: string; workspace: string; }; res: { /** * List of file keys */ 200: { next_marker?: string; windmill_large_files: Array; restricted_access?: boolean; }; }; }; }; '/w/{workspace}/job_helpers/list_stored_files_paged': { get: { req: { /** * Maximum number of folders and files combined */ maxKeys?: number; /** * Opaque token from a previous response, to continue listing the same folder */ pageToken?: string; /** * Folder to list; empty for the bucket root, otherwise must end with '/' */ prefix?: string; /** * When set, list the files of this object storage resource instead of the workspace storage */ s3ResourcePath?: string; storage?: string; workspace: string; }; res: { /** * One page of folders and files at this level */ 200: { folders: Array; files: Array; /** * When set, more entries remain at this level */ next_page_token?: string; restricted_access: boolean; }; }; }; }; '/w/{workspace}/job_helpers/load_file_metadata': { get: { req: { fileKey: string; /** * When set, load the file metadata from this object storage resource instead of the workspace storage */ s3ResourcePath?: string; storage?: string; workspace: string; }; res: { /** * FileMetadata */ 200: WindmillFileMetadata; }; }; }; '/w/{workspace}/job_helpers/load_file_preview': { get: { req: { csvHasHeader?: boolean; csvSeparator?: string; fileKey: string; fileMimeType?: string; fileSizeInBytes?: number; readBytesFrom?: number; readBytesLength?: number; /** * When set, load the file preview from this object storage resource instead of the workspace storage */ s3ResourcePath?: string; storage?: string; workspace: string; }; res: { /** * FilePreview */ 200: WindmillFilePreview; }; }; }; '/w/{workspace}/job_helpers/list_git_repo_files': { get: { req: { marker?: string; maxKeys: number; prefix?: string; storage?: string; workspace: string; }; res: { /** * List of file keys */ 200: { next_marker?: string; windmill_large_files: Array; restricted_access?: boolean; }; }; }; }; '/w/{workspace}/job_helpers/load_git_repo_file_preview': { get: { req: { csvHasHeader?: boolean; csvSeparator?: string; fileKey: string; fileMimeType?: string; fileSizeInBytes?: number; readBytesFrom?: number; readBytesLength?: number; storage?: string; workspace: string; }; res: { /** * FilePreview */ 200: WindmillFilePreview; }; }; }; '/w/{workspace}/job_helpers/load_git_repo_file_metadata': { get: { req: { fileKey: string; storage?: string; workspace: string; }; res: { /** * FileMetadata */ 200: WindmillFileMetadata; }; }; }; '/w/{workspace}/job_helpers/check_s3_folder_exists': { get: { req: { /** * S3 file key to check (e.g., gitrepos/{workspace_id}/u/user/resource/{commit_hash}) */ fileKey: string; /** * If provided, the folder is only considered to exist when this exact * sentinel file is present under file_key. Lets callers distinguish a * fully populated folder from a partial upload. * */ markerFile?: string; workspace: string; }; res: { /** * S3 folder existence check result */ 200: { /** * Whether the path exists */ exists: boolean; /** * Whether the path is a folder (true) or file (false) */ is_folder: boolean; }; }; }; }; '/w/{workspace}/job_helpers/load_parquet_preview/{path}': { get: { req: { limit?: number; offset?: number; path: string; searchCol?: string; searchTerm?: string; sortCol?: string; sortDesc?: boolean; storage?: string; workspace: string; }; res: { /** * Parquet Preview */ 200: unknown; }; }; }; '/w/{workspace}/job_helpers/load_table_count/{path}': { get: { req: { path: string; searchCol?: string; searchTerm?: string; storage?: string; workspace: string; }; res: { /** * Table count */ 200: { count?: number; }; }; }; }; '/w/{workspace}/job_helpers/load_csv_preview/{path}': { get: { req: { csvSeparator?: string; limit?: number; offset?: number; path: string; searchCol?: string; searchTerm?: string; sortCol?: string; sortDesc?: boolean; storage?: string; workspace: string; }; res: { /** * Csv Preview */ 200: unknown; }; }; }; '/w/{workspace}/job_helpers/delete_s3_file': { delete: { req: { fileKey: string; /** * When set, delete the file from this object storage resource instead of the workspace storage */ s3ResourcePath?: string; storage?: string; workspace: string; }; res: { /** * Confirmation */ 200: unknown; }; }; }; '/w/{workspace}/job_helpers/move_s3_file': { get: { req: { destFileKey: string; /** * When set, move the file within this object storage resource instead of the workspace storage */ s3ResourcePath?: string; srcFileKey: string; storage?: string; workspace: string; }; res: { /** * Confirmation */ 200: unknown; }; }; }; '/w/{workspace}/job_helpers/upload_s3_file': { post: { req: { contentDisposition?: string; contentType?: string; fileExtension?: string; fileKey?: string; /** * File content */ requestBody: (Blob | File); resourceType?: string; s3ResourcePath?: string; storage?: string; workspace: string; }; res: { /** * File upload status */ 200: { file_key: string; }; }; }; }; '/w/{workspace}/job_helpers/upload_git_repo_file_to_instance_storage': { post: { req: { contentDisposition?: string; contentType?: string; fileExtension?: string; fileKey?: string; /** * File content */ requestBody: (Blob | File); resourceType?: string; s3ResourcePath?: string; storage?: string; workspace: string; }; res: { /** * File upload status */ 200: { file_key: string; }; }; }; }; '/w/{workspace}/job_helpers/download_s3_file': { get: { req: { fileKey: string; resourceType?: string; s3ResourcePath?: string; storage?: string; workspace: string; }; res: { /** * Chunk of the downloaded file */ 200: (Blob | File); }; }; }; '/w/{workspace}/job_helpers/download_s3_parquet_file_as_csv': { get: { req: { fileKey: string; resourceType?: string; s3ResourcePath?: string; workspace: string; }; res: { /** * The downloaded file */ 200: string; }; }; }; '/w/{workspace}/job_metrics/get/{id}': { post: { req: { id: string; /** * parameters for statistics retrieval */ requestBody: { timeseries_max_datapoints?: number; from_timestamp?: string; to_timestamp?: string; }; workspace: string; }; res: { /** * job details */ 200: { metrics_metadata?: Array; scalar_metrics?: Array; timeseries_metrics?: Array; }; }; }; }; '/w/{workspace}/job_metrics/set_progress/{id}': { post: { req: { id: string; /** * parameters for statistics retrieval */ requestBody: { percent?: number; flow_job_id?: string; }; workspace: string; }; res: { /** * Job progress updated */ 200: unknown; }; }; }; '/w/{workspace}/job_metrics/get_progress/{id}': { get: { req: { id: string; workspace: string; }; res: { /** * job progress between 0 and 99 */ 200: number; }; }; }; '/service_logs/list_files': { get: { req: { /** * filter on created after (exclusive) timestamp */ after?: string; /** * filter on started before (inclusive) timestamp */ before?: string; withError?: boolean; }; res: { /** * time */ 200: Array<{ hostname: string; mode: string; worker_group?: string; log_ts: string; file_path: string; ok_lines?: number; err_lines?: number; json_fmt: boolean; }>; }; }; }; '/service_logs/get_log_file/{path}': { get: { req: { path: string; }; res: { /** * log stream */ 200: string; }; }; }; '/concurrency_groups/list': { get: { res: { /** * all concurrency groups */ 200: Array; }; }; }; '/concurrency_groups/prune/{concurrency_id}': { delete: { req: { concurrencyId: string; }; res: { /** * concurrency group removed */ 200: unknown; }; }; }; '/concurrency_groups/{id}/key': { get: { req: { id: string; }; res: { /** * concurrency key for given job */ 200: string; }; }; }; '/srch/w/{workspace}/index/search/job': { get: { req: { paginationOffset?: number; searchQuery: string; workspace: string; }; res: { /** * search results */ 200: { /** * a list of the terms that couldn't be parsed (and thus ignored) */ query_parse_errors?: Array<(string)>; /** * the jobs that matched the query */ hits?: Array; /** * how many jobs matched in total */ hit_count?: number; /** * Metadata about the index current state */ index_metadata?: { /** * Datetime of the most recently indexed job */ indexed_until?: string; /** * Is the current indexer service being replaced */ lost_lock_ownership?: boolean; /** * Maximum time window in seconds for indexing */ max_index_time_window_secs?: number; }; }; }; }; }; '/srch/index/search/service_logs': { get: { req: { hostname: string; maxTs?: string; minTs?: string; mode: string; searchQuery: string; workerGroup?: string; }; res: { /** * search results */ 200: { /** * a list of the terms that couldn't be parsed (and thus ignored) */ query_parse_errors?: Array<(string)>; /** * the log lines that matched the query, newest first */ hits?: Array; }; }; }; }; '/srch/index/search/count_service_logs': { get: { req: { maxTs?: string; minTs?: string; searchQuery: string; }; res: { /** * search results */ 200: { /** * a list of the terms that couldn't be parsed (and thus ignored) */ query_parse_errors?: Array<(string)>; /** * count of log lines that matched the query per hostname */ count_per_host?: { [key: string]: unknown; }; }; }; }; }; '/srch/index/storage/disk': { get: { res: { /** * disk storage sizes for each index */ 200: { job_index_disk_size_bytes?: number | null; log_index_disk_size_bytes?: number | null; }; }; }; }; '/indexer/delete/{idx_name}': { delete: { req: { idxName: 'JobIndex' | 'ServiceLogIndex'; }; res: { /** * idx to be deleted and indexer restarting */ 200: string; }; }; }; '/indexer/storage': { get: { res: { /** * storage sizes for each index */ 200: { job_index?: { disk_size_bytes?: number | null; s3_size_bytes?: number | null; }; service_log_index?: { disk_size_bytes?: number | null; s3_size_bytes?: number | null; }; }; }; }; }; '/indexer/status': { get: { res: { /** * indexer status for each index */ 200: { job_indexer?: { is_alive?: boolean; state?: 'running' | 'stale' | 'never_started'; last_locked_at?: string | null; owner?: string | null; storage?: { disk_size_bytes?: number | null; s3_size_bytes?: number | null; }; }; log_indexer?: { is_alive?: boolean; state?: 'running' | 'stale' | 'never_started'; last_locked_at?: string | null; owner?: string | null; storage?: { disk_size_bytes?: number | null; s3_size_bytes?: number | null; }; }; }; }; }; }; '/w/{workspace}/assets/list': { get: { req: { /** * Filter by asset kinds (multiple values allowed) */ assetKinds?: string; /** * Filter by asset path (case-insensitive partial match) */ assetPath?: string; /** * broad search across multiple fields (case-insensitive substring match) */ broadFilter?: string; /** * JSONB subset match filter for columns using base64 encoded JSON */ columns?: string; /** * Cursor timestamp for pagination (created_at of last item from previous page) */ cursorCreatedAt?: string; /** * Cursor ID for pagination (id of last item from previous page) */ cursorId?: number; /** * exact path match filter */ path?: string; /** * Number of items per page (max 1000, default 50) */ perPage?: number; /** * Filter by usage path (case-insensitive partial match) */ usagePath?: string; workspace: string; }; res: { /** * paginated assets in the workspace */ 200: { assets: Array<{ path: string; kind: AssetKind; usages: Array<{ path: string; kind: AssetUsageKind; access_type?: AssetUsageAccessType; /** * The columns used (for tables) */ columns?: { [key: string]: AssetUsageAccessType; }; /** * When the asset was detected */ created_at?: string; metadata?: { /** * The path of the script/flow that was run (only present when kind is 'job') */ runnable_path?: string; /** * The kind of job (script, flow, preview, etc.) (only present when kind is 'job') */ job_kind?: string; }; }>; metadata?: { /** * The type of the resource (only present when kind is 'resource') */ resource_type?: string; }; }>; /** * Cursor for the next page (null if no more pages) */ next_cursor?: { /** * Timestamp to use for next page */ created_at?: string; /** * ID to use for next page */ id?: number; } | null; }; }; }; }; '/w/{workspace}/assets/list_by_usages': { post: { req: { /** * list assets by usages */ requestBody: { usages: Array<{ path: string; kind: AssetUsageKind; }>; }; workspace: string; }; res: { /** * all assets used by the given usage paths, in the same order */ 200: Array>; }; }; }; '/w/{workspace}/assets/list_favorites': { get: { req: { workspace: string; }; res: { /** * list of favorite assets */ 200: Array<{ /** * The asset path */ path: string; }>; }; }; }; '/w/{workspace}/assets/graph': { get: { req: { /** * Filter by asset kinds (comma-separated list) */ assetKinds?: string; /** * Render the dbt half of the graph as one version of a dbt script had it, rather than as the currently deployed one. Given this, `folder` no longer scopes the dbt nodes: the pinned version's own models and lineage are the answer, including models a later deploy removed. * */ dbtScriptHash?: string; /** * Scope the graph to runnables in a single folder */ folder?: string; workspace: string; }; res: { /** * asset graph nodes, lineage edges and trigger edges */ 200: AssetGraph; }; }; }; '/w/{workspace}/assets/column_lineage': { get: { req: { /** * The `dbt://` relations whose lineage to return. Repeated, once per relation, and answered as one union. At least one, and at most 1000 — a request naming none, or more than that, is refused rather than answered with an empty component. * */ assetPath: Array<(string)>; /** * The deployed version a view is drawing, when it is drawing one — the dbt editor, which shows a single project as of a single deploy. A version-pinned answer is that version's project alone, the same as a job-pinned one, and only the unpinned answer crosses projects: a pin says which stored graph is on screen, and another project's live graph is not part of it. * A run's or an editor buffer's own graph is not reachable here: that pins to a job, and costs the job-read gate — see `jobs/dbt_column_lineage/{id}`. * */ dbtScriptHash?: string; workspace: string; }; res: { /** * the relations' column-level lineage */ 200: DbtColumnLineage; }; }; }; '/w/{workspace}/assets/macros': { get: { req: { workspace: string; }; res: { /** * all registry macros, ordered by provider then name */ 200: Array<{ name: string; /** * verbatim parameter list */ params: string; /** * verbatim body after AS [TABLE] */ body: string; is_table: boolean; /** * path of the `// macros` library script */ provider_path: string; }>; }; }; }; '/w/{workspace}/assets/pipelines': { get: { req: { workspace: string; }; res: { /** * folders containing pipeline scripts, with their script counts */ 200: Array<{ /** * The folder name (without the `f/` prefix) */ folder: string; /** * Number of pipeline-member scripts in the folder */ script_count: number; }>; }; }; }; '/w/{workspace}/assets/partitions': { get: { req: { /** * The materialized ducklake asset path (`/
`) */ path: string; workspace: string; }; res: { /** * per-partition materialization status */ 200: Array; }; }; }; '/w/{workspace}/assets/partitions_in_range': { get: { req: { /** * Inclusive range start (YYYY-MM-DD), local to the producer's partition tz */ from: string; /** * The materialized ducklake asset path (`/
`) */ path: string; /** * Inclusive range end (YYYY-MM-DD), local to the producer's partition tz */ to: string; workspace: string; }; res: { /** * expected partitions in range with per-slice status — the missing/failed subset is the backfill worklist */ 200: PartitionsInRange; }; }; }; '/w/{workspace}/assets/asset_schemas': { get: { req: { /** * The materialized ducklake asset path (`/
`) */ path: string; workspace: string; }; res: { /** * captured schema versions, newest first */ 200: Array; }; }; }; '/w/{workspace}/volumes/list': { get: { req: { workspace: string; }; res: { /** * list of volumes */ 200: Array; }; }; }; '/w/{workspace}/volumes/storage': { get: { req: { workspace: string; }; res: { /** * volume storage name or null */ 200: string | null; }; }; }; '/w/{workspace}/volumes/create': { post: { req: { requestBody: { name: string; }; workspace: string; }; res: { /** * volume created */ 200: string; }; }; }; '/w/{workspace}/volumes/delete/{name}': { delete: { req: { name: string; workspace: string; }; res: { /** * volume deleted */ 200: string; }; }; }; '/mcp/w/{workspace}/list_tools': { get: { req: { workspace: string; }; res: { /** * list of MCP tools available for the workspace */ 200: Array; }; }; }; '/mcp/oauth/discover': { post: { req: { requestBody: { /** * URL of the MCP server to discover OAuth metadata from */ mcp_server_url: string; }; }; res: { /** * OAuth metadata from MCP server */ 200: { scopes_supported?: Array<(string)>; authorization_endpoint?: string; token_endpoint?: string; registration_endpoint?: string; supports_dynamic_registration?: boolean; }; }; }; }; '/mcp/oauth/start': { get: { req: { /** * URL of the MCP server to connect to */ mcpServerUrl: string; /** * Comma-separated list of OAuth scopes to request */ scopes?: string; }; res: { /** * Redirect to OAuth provider authorization URL */ 302: unknown; }; }; }; '/mcp/oauth/callback': { get: { req: { /** * OAuth authorization code */ code: string; /** * CSRF state token */ state: string; }; res: { /** * HTML page with JavaScript that posts tokens to opener window and closes */ 200: string; }; }; }; '/w/{workspace}/hub/publish_draft': { post: { req: { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; requestBody: PublishDraftBody; workspace: string; }; res: { /** * raw Hub response body (status code is passed through from the Hub) */ 200: string; }; }; }; '/w/{workspace}/hub/scripts': { post: { req: { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; requestBody: PublishScriptBody; workspace: string; }; res: { /** * raw Hub response body (status code is passed through from the Hub) */ 200: string; }; }; }; '/w/{workspace}/hub/flows': { post: { req: { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; requestBody: PublishFlowBody; workspace: string; }; res: { /** * raw Hub response body (status code is passed through from the Hub) */ 200: string; }; }; }; '/w/{workspace}/hub/apps': { post: { req: { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; requestBody: PublishAppBody; workspace: string; }; res: { /** * raw Hub response body (status code is passed through from the Hub) */ 200: string; }; }; }; '/w/{workspace}/hub/raw_apps': { post: { req: { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; requestBody: PublishRawAppBody; workspace: string; }; res: { /** * raw Hub response body (status code is passed through from the Hub) */ 200: string; }; }; }; '/w/{workspace}/hub/raw_apps/{id}/recording': { post: { req: { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; /** * hub id of the raw app */ id: number; requestBody: RecordingBody; workspace: string; }; res: { /** * raw Hub response body (status code is passed through from the Hub) */ 200: string; }; }; }; '/w/{workspace}/hub/scripts/{ask_id}/recording': { post: { req: { /** * hub ask id of the script */ askId: number; /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; requestBody: RecordingBody; workspace: string; }; res: { /** * raw Hub response body (status code is passed through from the Hub) */ 200: string; }; }; }; '/w/{workspace}/hub/flows/{flow_id}/recording': { post: { req: { /** * hub id of the flow */ flowId: number; /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; requestBody: RecordingBody; workspace: string; }; res: { /** * raw Hub response body (status code is passed through from the Hub) */ 200: string; }; }; }; '/w/{workspace}/hub/projects/{slug}/pipeline_recording': { post: { req: { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; requestBody: PipelineRecordingBody; /** * hub project slug */ slug: HubProjectSlug; workspace: string; }; res: { /** * raw Hub response body (status code is passed through from the Hub) */ 200: string; }; }; }; '/w/{workspace}/hub/resource_types': { post: { req: { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; requestBody: PublishResourceTypeBody; workspace: string; }; res: { /** * raw Hub response body (status code is passed through from the Hub) */ 200: string; }; }; }; '/w/{workspace}/hub/resources': { post: { req: { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; requestBody: PublishResourcesBody; workspace: string; }; res: { /** * raw Hub response body (status code is passed through from the Hub) */ 200: string; }; }; }; '/w/{workspace}/hub/triggers': { post: { req: { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; requestBody: PublishTriggersBody; workspace: string; }; res: { /** * raw Hub response body (status code is passed through from the Hub) */ 200: string; }; }; }; '/w/{workspace}/hub/migrations': { post: { req: { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; requestBody: PublishMigrationsBody; workspace: string; }; res: { /** * raw Hub response body (status code is passed through from the Hub) */ 200: string; }; }; }; '/w/{workspace}/hub/projects/{slug}/export': { get: { req: { /** * folder scoping the Hub project source (`{workspace}:{folder}`) */ folder?: string; /** * hub project slug (3-50 chars, lowercase alphanumeric and hyphens, no leading/trailing hyphen) */ slug: string; workspace: string; }; res: { /** * raw Hub response body (status code is passed through from the Hub) */ 200: string; }; }; }; '/w/{workspace}/hub/projects/{slug}/logo': { post: { req: { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; requestBody: ProjectLogoBody; /** * hub project slug */ slug: HubProjectSlug; workspace: string; }; res: { /** * raw Hub response body (status code is passed through from the Hub) */ 200: string; }; }; }; '/w/{workspace}/hub/projects/{slug}/submit': { post: { req: { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; /** * hub project slug (3-50 chars, lowercase alphanumeric and hyphens, no leading/trailing hyphen) */ slug: string; workspace: string; }; res: { /** * raw Hub response body (status code is passed through from the Hub) */ 200: string; }; }; }; '/w/{workspace}/hub/projects/{slug}/withdraw': { post: { req: { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; /** * hub project slug (3-50 chars, lowercase alphanumeric and hyphens, no leading/trailing hyphen) */ slug: string; workspace: string; }; res: { /** * raw Hub response body (status code is passed through from the Hub) */ 200: string; }; }; }; '/w/{workspace}/hub/projects/{slug}/discard_update': { post: { req: { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; /** * hub project slug (3-50 chars, lowercase alphanumeric and hyphens, no leading/trailing hyphen) */ slug: string; workspace: string; }; res: { /** * raw Hub response body (status code is passed through from the Hub) */ 200: string; }; }; }; '/w/{workspace}/hub/projects': { get: { req: { workspace: string; }; res: { /** * raw Hub response body (status code is passed through from the Hub) */ 200: string; /** * the Hub is disabled on this instance */ 400: unknown; }; }; }; '/w/{workspace}/hub/project': { get: { req: { /** * workspace folder scoping the Hub publication: a workspace can publish * one Hub project per folder and the Hub-side source key is * `{workspace}:{folder}` * */ folder: string; workspace: string; }; res: { /** * raw Hub response body (status code is passed through from the Hub) */ 200: string; }; }; }; };