/** * 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; }; /** * The flow will be run with the permissions of the user with this email. */ on_behalf_of_email?: 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; /** * 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; /** * 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; }; /** * 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 shown when stopping */ error_message?: string; }; /** * 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 true, this step's result is deleted after use to save memory */ delete_after_use?: boolean; /** * 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; }; /** * 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; }; /** * 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 loops, use 'flow_input.iter.value' for the current iteration value */ 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' | '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; }; /** * Conversation memory configuration */ export type MemoryConfig = { kind: 'off'; } | { 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' | 'python3' | 'go' | 'bash' | 'powershell' | 'postgresql' | 'mysql' | 'bigquery' | 'snowflake' | 'mssql' | 'oracledb' | 'graphql' | 'nativets' | 'php' | 'rust' | 'ansible' | 'csharp' | 'nu' | 'java' | 'ruby' | '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'; /** * 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 while a condition is true. The loop checks the condition after each iteration. Use stop_after_if on modules to control loop termination */ export type WhileloopFlow = { /** * Steps to execute in each iteration. Use stop_after_if to control when the loop ends */ 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. */ 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, 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; /** * 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 image references for vision-capable models. * Format: Array<{ bucket: string, key: string }> - S3 object references * Example: [{ bucket: 'my-bucket', key: 'images/photo.jpg' }] * */ user_images?: 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; }; /** * 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; /** * Short description of what this tool does (shown to the AI) */ summary?: 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'; /** * 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)>; }; /** * 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; }; /** * 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; /** * Vault JWT auth role name for Windmill (optional, if not provided token auth is used) */ jwt_role?: 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; }; 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; }>; }; 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; }; 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; /** * The step name that produced that message */ step_name?: string; /** * Whether the message is a success */ success?: boolean; }; 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' | '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'; export type AIProviderModel = { model: string; provider: AIProvider; }; export type AIProviderConfig = { resource_path: string; models: Array<(string)>; }; export type AIConfig = { providers?: { [key: string]: AIProviderConfig; }; default_model?: AIProviderModel; code_completion_model?: AIProviderModel; custom_prompts?: { [key: string]: (string); }; max_tokens_per_model?: { [key: string]: (number); }; }; 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; }; 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; has_draft?: boolean; 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; dedicated_worker?: boolean; ws_error_handler_muted?: boolean; priority?: number; restart_unless_cancelled?: boolean; timeout?: number; delete_after_use?: boolean; visible_to_runner_only?: boolean; no_main_func: boolean; codebase?: string; has_preprocessor: boolean; on_behalf_of_email?: string; }; export type NewScript = { path: string; parent_hash?: string; summary: string; description?: string; content: string; schema?: { [key: string]: unknown; }; is_template?: boolean; lock?: string; language: ScriptLang; kind?: 'script' | 'failure' | 'trigger' | 'command' | 'approval' | 'preprocessor'; tag?: string; draft_only?: boolean; 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; delete_after_use?: boolean; 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; no_main_func?: boolean; codebase?: string; has_preprocessor?: boolean; on_behalf_of_email?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original on_behalf_of_email value instead of overwriting it. */ preserve_on_behalf_of?: boolean; assets?: Array<{ path: string; kind: AssetKind; access_type?: 'r' | 'w' | 'rw'; alt_access_type?: 'r' | 'w' | 'rw'; }>; }; export type NewScriptWithDraft = NewScript & { draft?: NewScript; hash: string; }; export type ScriptHistory = { script_hash: string; deployment_msg?: 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; 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; 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; 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_owners: Array<(string)>; added_via?: (UserSource) | null; }; 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 TruncatedToken = { label?: string; expiration?: string; token_prefix: string; created_at: string; last_used_at: string; scopes?: Array<(string)>; email?: string; }; export type NewToken = { label?: string; expiration?: string; scopes?: Array<(string)>; workspace_id?: string; }; 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; }; 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; }; 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; }; 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.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' | 'variables.decrypt_secret' | '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 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; }>; no_main_func: boolean | 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' | 'duckdb' | 'bunnative'; 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; }; 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; }; 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; }; 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; }; 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; }; export type ResourceType = { workspace_id?: string; name: string; schema?: unknown; description?: string; created_by?: string; edited_at?: string; format_extension?: string; is_fileset?: boolean; }; export type EditResourceType = { schema?: unknown; description?: string; is_fileset?: boolean; }; export type Schedule = { /** * The unique path identifier for this schedule */ 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; /** * 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; }; export type ScheduleWJobs = Schedule & { jobs?: Array<{ id: string; success: boolean; duration_ms: number; }>; }; export type ErrorHandler = 'custom' | 'slack' | 'teams' | 'email'; export type NewSchedule = { /** * The unique path identifier for this schedule */ 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; /** * Email of the user who the scheduled jobs run as. Used during deployment to preserve the original schedule owner. */ email?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original email value instead of overwriting it. */ preserve_email?: boolean; }; 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; /** * Email of the user who the scheduled jobs run as. Used during deployment to preserve the original schedule owner. */ email?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original email value instead of overwriting it. */ preserve_email?: boolean; }; /** * job trigger kind (schedule, http, websocket...) */ export type JobTriggerKind = 'webhook' | 'default_email' | 'email' | 'schedule' | 'http' | 'websocket' | 'postgres' | 'kafka' | 'nats' | 'mqtt' | 'sqs' | 'gcp' | 'google'; /** * job trigger mode */ export type TriggerMode = 'enabled' | 'disabled' | 'suspended'; export type TriggerExtraProperty = { /** * The unique path identifier for this trigger */ path: string; /** * Path to the script or flow to execute when triggered */ script_path: string; /** * Email of the user who owns this trigger, used for permissioned_as */ email: 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; }; 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; /** * 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; }; export type NewHttpTrigger = { /** * The unique path identifier for this trigger */ 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; /** * 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; /** * Email of the user who triggered jobs run as. Used during deployment to preserve the original trigger owner. */ email?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original email value instead of overwriting it. */ preserve_email?: boolean; }; export type EditHttpTrigger = { /** * The unique path identifier for this trigger */ 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; /** * 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; /** * Email of the user who triggered jobs run as. Used during deployment to preserve the original trigger owner. */ email?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original email value instead of overwriting it. */ preserve_email?: boolean; }; 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; gcp_count?: number; sqs_count?: number; nextcloud_count?: number; google_count?: number; }; 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; /** * Array of key-value filters to match incoming messages (only matching messages trigger the script) */ filters: Array<{ key: string; value: unknown; }>; /** * 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; /** * 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; }; export type NewWebsocketTrigger = { /** * The unique path identifier for this trigger */ 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; /** * Array of key-value filters to match incoming messages (only matching messages trigger the script) */ filters: Array<{ key: string; value: unknown; }>; /** * 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; /** * 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; /** * Email of the user who triggered jobs run as. Used during deployment to preserve the original trigger owner. */ email?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original email value instead of overwriting it. */ preserve_email?: boolean; }; export type EditWebsocketTrigger = { /** * The WebSocket URL to connect to (can be a static URL or computed by a runnable) */ url: string; /** * The unique path identifier for this trigger */ 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; /** * Array of key-value filters to match incoming messages (only matching messages trigger the script) */ filters: Array<{ key: string; value: unknown; }>; /** * 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; /** * 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; /** * Email of the user who triggered jobs run as. Used during deployment to preserve the original trigger owner. */ email?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original email value instead of overwriting it. */ preserve_email?: boolean; }; 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 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; }; 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 path identifier for this trigger */ 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 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; /** * Email of the user who triggered jobs run as. Used during deployment to preserve the original trigger owner. */ email?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original email value instead of overwriting it. */ preserve_email?: boolean; }; 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 path identifier for this trigger */ 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 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; /** * Email of the user who triggered jobs run as. Used during deployment to preserve the original trigger owner. */ email?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original email value instead of overwriting it. */ preserve_email?: boolean; }; /** * 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. */ gcp_resource_path: string; /** * Google Cloud Pub/Sub topic ID to subscribe to. */ topic_id: string; /** * Google Cloud Pub/Sub subscription ID. */ 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. */ gcp_resource_path: string; subscription_mode: SubscriptionMode; /** * Google Cloud Pub/Sub topic ID to subscribe to. */ topic_id: string; /** * Google Cloud Pub/Sub subscription ID. */ subscription_id?: string; /** * Base URL for push delivery endpoint. */ base_endpoint?: string; delivery_type?: DeliveryType; delivery_config?: PushConfig | null; /** * The unique path identifier for this trigger. */ 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; /** * Email of the user who triggered jobs run as. Used during deployment to preserve the original trigger owner. */ email?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original email value instead of overwriting it. */ preserve_email?: boolean; }; export type GetAllTopicSubscription = { topic_id: string; }; export type DeleteGcpSubscription = { subscription_id: 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 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; }; 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; }; export type CustomInstanceDbTag = 'ducklake' | 'datatable'; export type CustomInstanceDb = { logs: CustomInstanceDbLogs; /** * Whether the operation completed successfully */ success: boolean; /** * Error message if the operation failed */ error?: string | null; tag?: CustomInstanceDbTag; }; 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 path identifier for this trigger */ 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 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; /** * Email of the user who triggered jobs run as. Used during deployment to preserve the original trigger owner. */ email?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original email value instead of overwriting it. */ preserve_email?: boolean; }; 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 path identifier for this trigger */ 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 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; /** * Email of the user who triggered jobs run as. Used during deployment to preserve the original trigger owner. */ email?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original email value instead of overwriting it. */ preserve_email?: boolean; }; 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 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; }; 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 path identifier for this trigger */ 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 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; /** * Email of the user who triggered jobs run as. Used during deployment to preserve the original trigger owner. */ email?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original email value instead of overwriting it. */ preserve_email?: boolean; }; 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 path identifier for this trigger */ 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 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; /** * Email of the user who triggered jobs run as. Used during deployment to preserve the original trigger owner. */ email?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original email value instead of overwriting it. */ preserve_email?: boolean; }; 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: Array<{ key: string; value: unknown; }>; /** * 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 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; }; export type NewKafkaTrigger = { /** * The unique path identifier for this trigger */ 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: Array<{ key: string; value: unknown; }>; /** * 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 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; /** * Email of the user who triggered jobs run as. Used during deployment to preserve the original trigger owner. */ email?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original email value instead of overwriting it. */ preserve_email?: boolean; }; 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: Array<{ key: string; value: unknown; }>; /** * 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 path identifier for this trigger */ 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 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; /** * Email of the user who triggered jobs run as. Used during deployment to preserve the original trigger owner. */ email?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original email value instead of overwriting it. */ preserve_email?: boolean; }; 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 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; }; export type NewNatsTrigger = { /** * The unique path identifier for this trigger */ 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 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; /** * Email of the user who triggered jobs run as. Used during deployment to preserve the original trigger owner. */ email?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original email value instead of overwriting it. */ preserve_email?: boolean; }; 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 path identifier for this trigger */ 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 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; /** * Email of the user who triggered jobs run as. Used during deployment to preserve the original trigger owner. */ email?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original email value instead of overwriting it. */ preserve_email?: boolean; }; 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; /** * Email of the user who triggered jobs run as. Used during deployment to preserve the original trigger owner. */ email?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original email value instead of overwriting it. */ preserve_email?: boolean; }; 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; /** * Email of the user who triggered jobs run as. Used during deployment to preserve the original trigger owner. */ email?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original email value instead of overwriting it. */ preserve_email?: boolean; }; 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)>; }; export type InstanceGroupWithWorkspaces = { name: string; summary?: string; emails?: Array<(string)>; 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; }; 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; created_by?: string | null; disabled: boolean; }>; }; export type CreateWorkspace = { id: string; name: string; username?: string; color?: string; }; export type CreateWorkspaceFork = { id: string; name: string; color?: string; }; export type Workspace = { id: string; name: string; owner: string; domain?: string; color?: string; parent_workspace_id?: 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'; super_admin: boolean; devops?: boolean; verified: boolean; name?: string; company?: string; username?: string; operator_only?: boolean; first_time_user: boolean; }; 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; }; 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; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original on_behalf_of_email value instead of overwriting it. */ preserve_on_behalf_of?: boolean; }; export type FlowPreview = { value: FlowValue; path?: string; args: ScriptArgs; tag?: string; restarted_from?: RestartedFrom; }; export type RestartedFrom = { flow_job_id?: string; step_id?: string; branch_or_iteration_n?: number; flow_version?: number; }; 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; }>; execution_mode?: 'viewer' | 'publisher' | 'anonymous'; on_behalf_of?: string; on_behalf_of_email?: 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' | 'anonymous'; raw_app?: boolean; }; 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; }; 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; }; export type AppWithLastVersionWDraft = AppWithLastVersion & { draft_only?: boolean; draft?: unknown; }; export type AppHistory = { version: number; deployment_msg?: string; }; export type FlowVersion = { id: number; created_at: string; deployment_msg?: string; }; export type SlackToken = { access_token: string; team_id: string; team_name: string; bot: { bot_access_token?: 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; }; 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; }; }; }; export type DataTableSettings = { datatables: { [key: string]: { database: { resource_type: 'postgresql' | 'instance'; resource_path?: string; }; }; }; }; 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 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 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 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; force_branch?: string; collapsed?: boolean; settings?: { include_path?: Array<(string)>; include_type?: Array; exclude_path?: Array<(string)>; extra_include_path?: Array<(string)>; }; exclude_types_override?: Array; }; 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; }; export type JobSearchHit = { dancer?: string; }; export type LogSearchHit = { dancer?: string; }; 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' | 'gcp' | '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; } | 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; }; export type WorkspaceItemDiff = { /** * Type of the item */ kind: 'script' | 'flow' | 'app' | 'resource' | 'variable' | 'resource_type'; /** * 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; }; 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 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; }>; 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'; export type Asset = { path: string; kind: AssetKind; }; 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; export type ProtectionRuleKind = 'DisableDirectDeployment' | 'DisableWorkspaceForking'; /** * Groups that can bypass this ruleset */ export type RuleBypasserGroups = Array<(string)>; /** * Users that can bypass this ruleset */ export type RuleBypasserUsers = Array<(string)>; export type NativeServiceName = 'nextcloud' | 'google'; /** * 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; }; /** * 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; /** * Configuration data from the external service */ external_data: { [key: string]: unknown; }; }; 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; }; }; /** * 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 ParameterId = string; export type ParameterKey = string; export type ParameterWorkspaceId = 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; export type ParameterCustomPath = string; 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 QueryDocumentationData = { /** * query to send to the AI documentation assistant */ requestBody: { /** * The documentation query to send to the AI assistant */ query: string; }; }; export type QueryDocumentationResponse = { [key: string]: unknown; }; 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; /** * 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 LoginData = { /** * credentials */ requestBody: Login; }; export type LoginResponse = string; export type LogoutResponse = string; export type IsSmtpConfiguredResponse = boolean; export type RequestPasswordResetData = { /** * email to send password reset link to */ requestBody: { email: string; }; }; export type RequestPasswordResetResponse = PasswordResetResponse; 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; }; }; export type CreateUserGloballyResponse = string; export type GlobalUserUpdateData = { email: string; /** * new user info */ requestBody: { is_super_admin?: boolean; is_devops?: boolean; name?: string; }; }; 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 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 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 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 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 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 DeleteTokenData = { tokenPrefix: string; }; export type DeleteTokenResponse = 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 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; }; export type ListWorkspacesResponse = Array; export type IsDomainAllowedResponse = boolean; export type ListUserWorkspacesResponse = UserWorkspaceList; 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 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 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 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 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 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; deploy_to?: string; ai_config?: AIConfig; error_handler?: ErrorHandlerConfig; success_handler?: SuccessHandlerConfig; large_file_storage?: LargeFileStorage; ducklake?: DucklakeSettings; 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; }; export type GetDeployToData = { workspace: string; }; export type GetDeployToResponse = { deploy_to?: string; }; export type GetIsPremiumData = { workspace: string; }; export type GetIsPremiumResponse = boolean; 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 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 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 EditDeployToData = { requestBody: { deploy_to?: string; }; workspace: string; }; export type EditDeployToResponse = 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 = string; 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 ListDucklakesData = { workspace: string; }; export type ListDucklakesResponse = Array<(string)>; export type ListDataTablesData = { workspace: string; }; export type ListDataTablesResponse = Array<(string)>; export type ListDataTableSchemasData = { workspace: string; }; export type ListDataTableSchemasResponse = Array; export type EditDucklakeConfigData = { /** * Ducklake settings */ requestBody: { settings: DucklakeSettings; }; workspace: string; }; export type EditDucklakeConfigResponse = unknown; export type EditDataTableConfigData = { /** * DataTable settings */ requestBody: { settings: DataTableSettings; }; workspace: string; }; export type EditDataTableConfigResponse = unknown; 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 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: { 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; }; 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; gcp_used: boolean; sqs_used: boolean; email_used: boolean; nextcloud_used: boolean; google_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: { 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 RefreshCustomInstanceUserPwdResponse = { [key: string]: unknown; }; export type ListCustomInstanceDbsResponse = { [key: string]: CustomInstanceDb; }; export type SetupCustomInstanceDbData = { /** * The name of the database to create */ name: string; requestBody: { tag?: CustomInstanceDbTag; }; }; export type SetupCustomInstanceDbResponse = CustomInstanceDb; 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 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 SendStatsResponse = string; export type GetStatsResponse = string; export type GetLatestKeyRenewalAttemptResponse = { result: string; attempted_at: string; } | null; export type RenewLicenseKeyData = { licenseKey?: string; }; export type RenewLicenseKeyResponse = string; 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 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 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 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; /** * 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; 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; /** * 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 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; /** * OAuth token URL override for resource-level authentication (client_credentials flow only) */ cc_token_url?: string; /** * MCP server URL for MCP OAuth token refresh */ mcp_server_url?: 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 for resource-level authentication */ cc_client_id: string; /** * OAuth client secret for resource-level authentication */ cc_client_secret: string; /** * OAuth token URL override for resource-level authentication */ cc_token_url?: 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; }; export type ListOauthConnectsResponse = Array<(string)>; export type GetOauthConnectData = { /** * client name */ client: string; }; export type GetOauthConnectResponse = { extra_params?: { [key: string]: unknown; }; scopes?: Array<(string)>; grant_types?: Array<(string)>; }; 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 GetResourceData = { path: string; workspace: string; }; export type GetResourceResponse = Resource; 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; /** * 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; value: unknown; }>; export type GetMcpToolsData = { path: string; workspace: string; }; export type GetMcpToolsResponse = Array<{ name: string; description?: string; parameters: { [key: string]: unknown; }; }>; 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 QueryResourceTypesData = { /** * query limit */ limit?: number; /** * query text */ text: string; workspace: string; }; export type QueryResourceTypesResponse = Array<{ name: string; score: number; schema?: unknown; }>; 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 ListHubIntegrationsData = { /** * query integrations kind */ kind?: string; }; export type ListHubIntegrationsResponse = Array<{ name: string; }>; 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; /** * 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 & { has_draft?: boolean; draft_only?: boolean; })>; export type GetFlowHistoryData = { path: string; 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 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 = { path: string; withStarredInfo?: boolean; workspace: string; }; export type GetFlowByPathResponse = Flow; 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 GetFlowByPathWithDraftData = { path: string; workspace: string; }; export type GetFlowByPathWithDraftResponse = Flow & { draft?: Flow; }; export type ExistsFlowByPathData = { path: string; workspace: string; }; export type ExistsFlowByPathResponse = boolean; export type CreateFlowData = { /** * Partially filled flow */ requestBody: OpenFlowWPath & { draft_only?: boolean; deployment_message?: string; }; workspace: string; }; export type CreateFlowResponse = string; export type UpdateFlowData = { path: string; /** * Partially filled flow */ requestBody: OpenFlowWPath & { deployment_message?: string; }; 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 GetPublicAppByCustomPathData = { customPath: string; }; export type GetPublicAppByCustomPathResponse = AppWithLastVersion & { workspace_id?: string; }; export type GetRawAppDataData = { 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; /** * 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; draft_only?: boolean; 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; }; workspace: string; }; export type CreateAppResponse = string; export type CreateAppRawData = { /** * new app */ formData: { app?: { path: string; value: unknown; summary: string; policy: Policy; draft_only?: boolean; 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; }; js?: string; css?: string; }; workspace: string; }; export type CreateAppRawResponse = string; export type ExistsAppData = { path: string; workspace: string; }; export type ExistsAppResponse = boolean; export type GetAppByPathData = { path: string; withStarredInfo?: boolean; workspace: string; }; export type GetAppByPathResponse = AppWithLastVersion; export type GetAppLiteByPathData = { path: string; workspace: string; }; export type GetAppLiteByPathResponse = AppWithLastVersion; export type GetAppByPathWithDraftData = { path: string; workspace: string; }; export type GetAppByPathWithDraftResponse = AppWithLastVersionWDraft; export type GetAppHistoryByPathData = { path: string; 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 GetPublicAppBySecretData = { path: string; workspace: string; }; export type GetPublicAppBySecretResponse = AppWithLastVersion; 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; }; workspace: string; }; export type UpdateAppResponse = string; 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; }; js?: string; css?: string; }; path: string; workspace: string; }; export type UpdateAppRawResponse = string; export type CustomPathExistsData = { customPath: string; workspace: string; }; export type CustomPathExistsResponse = boolean; export type SignS3ObjectsData = { /** * s3 objects to sign */ requestBody: { s3_objects: Array; }; 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; }; id?: number; force_viewer_static_fields?: { [key: string]: unknown; }; force_viewer_one_of_fields?: { [key: string]: unknown; }; force_viewer_allow_user_resources?: Array<(string)>; /** * Runnable query parameters */ run_query_params?: { [key: string]: unknown; }; }; 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 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 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