/** * 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; /** * If set, delete the flow job's args, result and logs after this many seconds following job completion */ delete_after_secs?: number; /** * Environment variables available to all steps. Values can be strings, JSON values, or special references: '$var:path' (workspace variable) or '$res:path' (resource). */ flow_env?: { [key: string]: unknown; }; /** * Execution priority (higher numbers run first) */ priority?: number; /** * JavaScript expression to return early from the flow */ early_return?: string; /** * Whether this flow accepts chat-style input */ chat_input_enabled?: boolean; /** * Sticky notes attached to the flow */ notes?: Array; /** * Semantic groups of modules for organizational purposes */ groups?: Array<{ /** * Display name for this group */ summary?: string; /** * Markdown note shown below the group header */ note?: string; /** * If true, this group is collapsed by default in the flow editor. UI hint only. */ autocollapse?: boolean; /** * ID of the first flow module in this group (topological entry point) */ start_id: string; /** * ID of the last flow module in this group (topological exit point) */ end_id: string; /** * Color for the group in the flow editor */ color?: string; }>; }; /** * Retry configuration for failed module executions */ export type Retry = { /** * Retry with constant delay between attempts */ constant?: { /** * Number of retry attempts */ attempts?: number; /** * Seconds to wait between retries */ seconds?: number; }; /** * Retry with exponential backoff (delay doubles each time) */ exponential?: { /** * Number of retry attempts */ attempts?: number; /** * Multiplier for exponential backoff */ multiplier?: number; /** * Initial delay in seconds */ seconds?: number; /** * Random jitter percentage (0-100) to avoid thundering herd */ random_factor?: number; }; /** * Conditional retry based on error or result */ retry_if?: { /** * JavaScript expression that returns true to retry. Has access to 'result' and 'error' variables */ expr: string; }; }; /** * Early termination condition for a module */ export type StopAfterIf = { /** * If true, following steps are skipped when this condition triggers */ skip_if_stopped?: boolean; /** * JavaScript expression evaluated after the module runs. Can use 'result' (step's result) or 'flow_input'. Return true to stop */ expr: string; /** * Custom error message when stopping with an error. Mutually exclusive with skip_if_stopped. If set to a non-empty string, the flow stops with this error. If empty string, a default error message is used. If null or omitted, no error is raised. */ error_message?: string | null; }; /** * A single step in a flow. Can be a script, subflow, loop, or branch */ export type FlowModule = { /** * Unique identifier for this step. Used to reference results via 'results.step_id'. Must be a valid identifier (alphanumeric, underscore, hyphen) */ id: string; value: FlowModuleValue; /** * Early termination condition evaluated after this step completes */ stop_after_if?: StopAfterIf; /** * For loops only - early termination condition evaluated after all iterations complete */ stop_after_all_iters_if?: StopAfterIf; /** * Conditionally skip this step based on previous results or flow inputs */ skip_if?: { /** * JavaScript expression that returns true to skip. Can use 'flow_input' or 'results.' */ expr: string; }; /** * Delay before executing this step (in seconds or as expression) */ sleep?: InputTransform; /** * Cache duration in seconds for this step's results */ cache_ttl?: number; cache_ignore_s3_path?: boolean; /** * Maximum execution time in seconds (static value or expression) */ timeout?: InputTransform; /** * If set, delete the step's args, result and logs after this many seconds following job completion */ delete_after_secs?: number; /** * Short description of what this step does */ summary?: string; /** * Mock configuration for testing without executing the actual step */ mock?: { /** * If true, return mock value instead of executing */ enabled?: boolean; /** * Value to return when mocked */ return_value?: unknown; }; /** * Configuration for approval/resume steps that wait for user input */ suspend?: { /** * Number of approvals required before continuing */ required_events?: number; /** * Timeout in seconds before auto-continuing or canceling */ timeout?: number; /** * Form schema for collecting input when resuming */ resume_form?: { /** * JSON Schema for the resume form */ schema?: { [key: string]: unknown; }; }; /** * If true, only authenticated users can approve */ user_auth_required?: boolean; /** * Expression or list of groups that can approve */ user_groups_required?: InputTransform; /** * If true, the user who started the flow cannot approve */ self_approval_disabled?: boolean; /** * If true, hide the cancel button on the approval form */ hide_cancel?: boolean; /** * If true, continue flow on timeout instead of canceling */ continue_on_disapprove_timeout?: boolean; }; /** * Execution priority for this step (higher numbers run first) */ priority?: number; /** * If true, flow continues even if this step fails */ continue_on_error?: boolean; /** * Retry configuration if this step fails */ retry?: Retry; /** * Debounce configuration for this step (OEE only) */ debouncing?: { /** * Delay in seconds to debounce this step's executions across flow runs */ debounce_delay_s?: number; /** * Expression to group debounced executions. Supports $workspace and $args[name]. Default: $workspace/flow/- */ debounce_key?: string; /** * Array-type arguments to accumulate across debounced executions */ debounce_args_to_accumulate?: Array<(string)>; /** * Maximum total time in seconds before forced execution */ max_total_debouncing_time?: number; /** * Maximum number of debounces before forced execution */ max_total_debounces_amount?: number; }; }; /** * Maps input parameters for a step. Can be a static value or a JavaScript expression that references previous results or flow inputs */ export type InputTransform = StaticTransform | JavascriptTransform | AiTransform; /** * Static value passed directly to the step. Use for hardcoded values or resource references like '$res:path/to/resource' */ export type StaticTransform = { /** * The static value. For resources, use format '$res:path/to/resource' */ value?: unknown; type: 'static'; }; /** * JavaScript expression evaluated at runtime. Can reference previous step results via 'results.step_id' or flow inputs via 'flow_input.property'. Inside 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' | 'rlang' | 'duckdb' | 'mongodb' | 'groovy' | 'kotlin' | 'dart'; /** * 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 file references (images or PDFs) for the AI agent. * Format: Array<{ bucket: string, key: string }> - S3 object references * Example: [{ bucket: 'my-bucket', key: 'documents/report.pdf' }] * */ user_attachments?: InputTransform; /** * 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, this AI agent step does not persist its assistant or tool messages to the flow conversation when chat mode is enabled. */ omit_output_from_conversation?: boolean; /** * If true, the agent can execute multiple tool calls in parallel */ parallel?: boolean; }; /** * Pass-through module that returns its input unchanged. Useful for flow structure or as a placeholder */ export type Identity = { type: 'identity'; /** * If true, marks this as a flow identity (special handling) */ flow?: boolean; }; export type FlowStatus = { step: number; modules: Array; user_states?: unknown; preprocessor_module?: FlowStatusModule; failure_module: FlowStatusModule & { parent_module?: string; }; retry?: { fail_count?: number; failed_jobs?: Array<(string)>; }; }; export type FlowStatusModule = { type: 'WaitingForPriorSteps' | 'WaitingForEvents' | 'WaitingForExecutor' | 'InProgress' | 'Success' | 'Failure'; id?: string; job?: string; count?: number; progress?: number; iterator?: { index?: number; itered?: Array; itered_len?: number; args?: unknown; }; flow_jobs?: Array<(string)>; flow_jobs_success?: Array<(boolean)>; flow_jobs_duration?: { started_at?: Array<(string)>; duration_ms?: Array<(number)>; }; branch_chosen?: { type: 'branch' | 'default'; branch?: number; }; branchall?: { branch: number; len: number; }; approvers?: Array<{ resume_id: number; approver: string; }>; failed_retries?: Array<(string)>; skipped?: boolean; agent_actions?: Array<({ job_id: string; function_name: string; type: 'tool_call'; module_id: string; } | { call_id: string; function_name: string; resource_path: string; type: 'mcp_tool_call'; arguments?: { [key: string]: unknown; }; } | { type: 'web_search'; } | { type: 'message'; })>; agent_actions_success?: Array<(boolean)>; }; /** * A sticky note attached to a flow for documentation and annotation */ export type FlowNote = { /** * Unique identifier for the note */ id: string; /** * Content of the note */ text: string; /** * Position of the note in the flow editor */ position?: { /** * X coordinate */ x: number; /** * Y coordinate */ y: number; }; /** * Size of the note in the flow editor */ size?: { /** * Width in pixels */ width: number; /** * Height in pixels */ height: number; }; /** * Color of the note (e.g., "yellow", "#ffff00") */ color: string; /** * Type of note - 'free' for standalone notes, 'group' for notes that group other nodes */ type: 'free' | 'group'; /** * Whether the note is locked and cannot be edited or moved */ locked?: boolean; /** * For group notes, the IDs of nodes contained within this group */ contained_node_ids?: Array<(string)>; }; export type CiTestResult = { test_script_path: string; job_id?: string | null; status?: string | null; started_at?: string | null; }; /** * Health status response (cached with 5s TTL) */ export type HealthStatusResponse = { /** * Overall health status */ status: 'healthy' | 'degraded' | 'unhealthy'; /** * Timestamp when the health check was actually performed (not cache return time) */ checked_at: string; /** * Whether the database is reachable */ database_healthy: boolean; /** * Number of workers that pinged within last 5 minutes */ workers_alive: number; }; /** * Detailed health status response (always fresh, no caching) */ export type DetailedHealthResponse = { /** * Overall health status */ status: 'healthy' | 'degraded' | 'unhealthy'; /** * Timestamp when the health check was performed */ checked_at: string; /** * Server version (e.g., "OEE 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)>; /** * Distinct job isolation modes reported by live workers. `nsjail` means the worker both asked for nsjail sandboxing and has a working nsjail binary; `unshare` is PID-namespace isolation only; `none` means jobs run with no process isolation; `unknown` is a worker that reported no mode. Sorted for stability across polls. */ job_isolation: Array<('nsjail' | 'unshare' | 'none' | 'unknown')>; /** * Number of live workers running with no process isolation (reported `none`, or nothing at all). */ workers_without_isolation: number; }; /** * 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., orvanta) */ mount_path: string; /** * Vault JWT auth role name for Orvanta (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; /** * Skip TLS certificate verification when connecting to Vault. Only use for self-signed certificates in development environments. */ skip_ssl_verify?: boolean; }; export type AzureKeyVaultSettings = { /** * Azure Key Vault URL (e.g., https://myvault.vault.azure.net) */ vault_url: string; /** * Azure AD tenant ID */ tenant_id: string; /** * Azure AD application (client) ID */ client_id: string; /** * Azure AD client secret. Optional — when omitted, the integration falls back to Azure Workload Identity Federation, exchanging the Kubernetes-projected service-account JWT at AZURE_FEDERATED_TOKEN_FILE for an access token (no long-lived secret stored). */ client_secret?: string; /** * Static Bearer token for testing/development (optional, if provided this is used instead of OAuth2 authentication) */ token?: string; }; export type AwsSecretsManagerSettings = { /** * AWS region (e.g., us-east-1) */ region: string; /** * AWS Access Key ID (optional, uses default credential chain if not provided) */ access_key_id?: string; /** * AWS Secret Access Key (optional) */ secret_access_key?: string; /** * Custom endpoint URL for testing (e.g., LocalStack) */ endpoint_url?: string; /** * Prefix for secret names (e.g., orvanta/) */ prefix?: string; }; export type SecretMigrationFailure = { /** * Workspace ID where the secret is located */ workspace_id: string; /** * Path of the secret that failed to migrate */ path: string; /** * Error message */ error: string; }; export type SecretMigrationReport = { /** * Total number of secrets found */ total_secrets: number; /** * Number of secrets successfully migrated */ migrated_count: number; /** * Number of secrets that failed to migrate */ failed_count: number; /** * Details of any failures encountered during migration */ failures: Array; }; export type JwksResponse = { /** * Array of JSON Web Keys for JWT verification */ keys: Array<{ [key: string]: unknown; }>; }; 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; /** * Monotonic cursor assigned when the message is inserted */ created_seq: number; /** * The step name that produced that message */ step_name?: string; /** * Whether the message is a success */ success?: boolean; }; 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' | 'bpmnflow' | 'dmndecision' | '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 InstanceAIProviderSummary = { provider: AIProvider; models: Array<(string)>; }; export type InstanceAISummary = { providers: Array; default_model?: AIProviderModel; code_completion_model?: AIProviderModel; }; export type Alert = { name: string; tags_to_monitor: Array<(string)>; jobs_num_threshold: number; alert_cooldown_seconds: number; alert_time_threshold_seconds: number; }; export type Configs = { alerts?: Array; } | null; export type WorkspaceDependencies = { id: number; archived: boolean; name?: string; description?: string; content: string; language: ScriptLang; workspace_id: string; created_at: string; }; export type NewWorkspaceDependencies = { workspace_id: string; language: ScriptLang; name?: string; description?: string; content: string; }; 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; /** * If set, delete the job's args, result and logs after this many seconds following job completion */ delete_after_secs?: number; visible_to_runner_only?: boolean; auto_kind?: string; codebase?: string; has_preprocessor: boolean; on_behalf_of_email?: string; /** * Additional script modules keyed by relative file path */ modules?: { [key: string]: ScriptModule; } | null; labels?: Array<(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; /** * If set, delete the job's args, result and logs after this many seconds following job completion */ delete_after_secs?: number; deployment_message?: string; concurrency_key?: string; debounce_key?: string; debounce_delay_s?: number; debounce_args_to_accumulate?: Array<(string)>; max_total_debouncing_time?: number; max_total_debounces_amount?: number; visible_to_runner_only?: boolean; auto_kind?: string; codebase?: string; has_preprocessor?: boolean; on_behalf_of_email?: string; /** * 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'; }>; /** * Additional script modules keyed by relative file path */ modules?: { [key: string]: ScriptModule; } | null; labels?: Array<(string)>; }; 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; code_flow_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; code_flow_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; }; code_flow_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; }; code_flow_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; is_service_account?: boolean; }; export type UserSource = { /** * How the user was added to the workspace */ source: 'domain' | 'instance_group' | 'manual'; /** * The domain used for auto-invite (when source is 'domain') */ domain?: string; /** * The instance group name (when source is 'instance_group') */ group?: string; }; export type UserUsage = { email?: string; executions?: number; }; export type Login = { email: string; password: string; }; export type PasswordResetResponse = { message: string; }; export type EditWorkspaceUser = { is_admin?: boolean; operator?: boolean; disabled?: boolean; }; export type OffboardAffectedPaths = { scripts?: Array<(string)>; flows?: Array<(string)>; apps?: Array<(string)>; resources?: Array<(string)>; variables?: Array<(string)>; schedules?: Array<(string)>; triggers?: { [key: string]: Array<(string)>; }; }; export type OffboardPreview = { /** * Objects under u/{username}/ that will be reassigned */ owned: OffboardAffectedPaths; /** * Objects not under the user's path but that execute on behalf of this user (permissioned_as/on_behalf_of will be updated) */ executing_on_behalf: OffboardAffectedPaths; /** * Scripts/flows/apps/resources whose content or value references this user's paths (may break after reassignment) */ referencing: OffboardAffectedPaths; /** * Tokens owned by this user (will be deleted) */ tokens: Array; /** * HTTP triggers under the user's path (webhook URLs will change) */ http_triggers: number; /** * Email triggers under the user's path (email addresses will change) */ email_triggers: number; }; export type OffboardTokenInfo = { label: string; scopes: Array<(string)>; expiration?: string; }; export type OffboardRequest = { /** * Target for reassignment: 'u/{username}' or 'f/{folder}' */ reassign_to: string; /** * Required when reassign_to is a folder. The username whose identity will be used as permissioned_as for schedules and triggers. */ new_on_behalf_of_user?: string; /** * Whether to also remove the user from the workspace */ delete_user?: boolean; }; export type OffboardResponse = { /** * List of path conflicts that block the offboarding. Empty on success. */ conflicts?: Array<(string)>; summary?: OffboardSummary; }; export type OffboardSummary = { scripts_reassigned: number; flows_reassigned: number; apps_reassigned: number; resources_reassigned: number; variables_reassigned: number; schedules_reassigned: number; triggers_reassigned: number; drafts_deleted: number; }; export type GlobalOffboardPreview = { workspaces: Array; }; export type WorkspaceOffboardPreview = { workspace_id: string; username: string; preview: OffboardPreview; }; export type GlobalOffboardRequest = { /** * Map of workspace_id to reassignment config */ reassignments?: { [key: string]: WorkspaceReassignment; }; /** * Whether to also remove the user from the instance */ delete_user?: boolean; }; export type WorkspaceReassignment = { /** * Target: 'u/{username}' or 'f/{folder}' */ reassign_to: string; /** * Required when reassign_to is a folder. Username to use as permissioned_as. */ new_on_behalf_of_user?: string; }; export type TruncatedToken = { label?: string; expiration?: string; token_prefix: string; created_at: string; last_used_at: string; scopes?: Array<(string)>; email?: string; workspace_id?: string; }; export type ExternalJwtToken = { jwt_hash: number; email: string; username: string; is_admin: boolean; is_operator: boolean; workspace_id?: string; label?: string; scopes?: Array<(string)>; last_used_at: string; }; 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 SamlConfig = { configured: boolean; enabled: boolean; idp_entity_id?: string; single_sign_on_service_url?: string; name_id_format: string; sp_entity_id: string; acs_url: string; /** * whether unsolicited (IdP-initiated) SAML responses are accepted. false is the default and the secure posture — see SamlConfigRequest.allow_idp_initiated. */ allow_idp_initiated: boolean; }; export type SamlConfigRequest = { /** * URL to fetch the IdP's SAML metadata from (fetched server-side, SSRF-guarded). Provide this or idp_metadata_xml. */ idp_metadata_url?: string; /** * the IdP's SAML metadata XML, pasted directly. Provide this or idp_metadata_url. */ idp_metadata_xml?: string; name_id_format?: string; enabled: boolean; /** * accept unsolicited (IdP-initiated) SAML responses, e.g. from an Okta "My Apps" or Entra app-launcher tile. Defaults to false when omitted. Unsolicited responses carry no InResponseTo, so they cannot be bound to a login this SP started and remain exposed to login-CSRF / session fixation (#589) — enable only if your IdP offers no SP-initiated entry point. */ allow_idp_initiated?: boolean; }; export type ListableVariable = { workspace_id: string; path: string; value?: string; is_secret: boolean; description?: string; account?: number; is_oauth?: boolean; extra_perms: { [key: string]: (boolean); }; is_expired?: boolean; refresh_error?: string; is_linked?: boolean; is_refreshed?: boolean; expires_at?: string; labels?: Array<(string)>; ws_specific?: boolean; }; export type ContextualVariable = { name: string; value: string; description: string; is_custom: boolean; }; export type CreateVariable = { /** * The path to the variable */ path: string; /** * The value of the variable */ value: string; /** * Whether the variable is a secret */ is_secret: boolean; /** * The description of the variable */ description: string; /** * The account identifier */ account?: number; /** * Whether the variable is an OAuth variable */ is_oauth?: boolean; /** * The expiration date of the variable */ expires_at?: string; labels?: Array<(string)>; ws_specific?: boolean; }; export type EditVariable = { /** * The path to the variable */ path?: string; /** * The new value of the variable */ value?: string; /** * Whether the variable is a secret */ is_secret?: boolean; /** * The new description of the variable */ description?: string; labels?: Array<(string)>; ws_specific?: boolean; }; export type AuditLog = { workspace_id: string; id: number; timestamp: string; username: string; operation: 'jobs.run' | 'jobs.run.script' | 'jobs.run.preview' | 'jobs.run.flow' | 'jobs.run.flow_preview' | 'jobs.run.script_hub' | 'jobs.run.dependencies' | 'jobs.run.identity' | 'jobs.run.noop' | 'jobs.flow_dependencies' | 'jobs' | 'jobs.cancel' | 'jobs.force_cancel' | 'jobs.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; }>; auto_kind: string | null; has_preprocessor: boolean | null; }; export type ScriptLang = 'python3' | 'deno' | 'go' | 'bash' | 'powershell' | 'postgresql' | 'mysql' | 'bigquery' | 'snowflake' | 'mssql' | 'oracledb' | 'graphql' | 'nativets' | 'bun' | 'php' | 'rust' | 'ansible' | 'csharp' | 'nu' | 'java' | 'ruby' | 'rlang' | 'duckdb' | 'bunnative' | 'mongodb' | 'groovy' | 'kotlin' | 'dart'; /** * An additional module file associated with a script */ export type ScriptModule = { /** * The source code content of this module */ content: string; language: ScriptLang; /** * Lock file content for this module's dependencies */ lock?: string | null; }; export type Preview = { /** * The code to run */ content?: string; /** * The path to the script */ path?: string; /** * The hash of the script */ script_hash?: string; args: ScriptArgs; language?: ScriptLang; tag?: string; kind?: 'code' | 'identity' | 'http'; dedicated_worker?: boolean; lock?: string; flow_path?: string; /** * Additional script modules keyed by relative file path */ modules?: { [key: string]: ScriptModule; } | null; }; export type PreviewInline = { /** * The code to run */ content: string; args: ScriptArgs; language: ScriptLang; }; export type InlineScriptArgs = { args?: ScriptArgs; }; export type WorkflowTask = { args: ScriptArgs; }; export type WorkflowStatusRecord = { [key: string]: WorkflowStatus; }; export type WorkflowStatus = { scheduled_for?: string; started_at?: string; duration_ms?: number; name?: string; }; export type CreateResource = { /** * The path to the resource */ path: string; value: unknown; /** * The description of the resource */ description?: string; /** * The resource_type associated with the resource */ resource_type: string; labels?: Array<(string)>; ws_specific?: boolean; }; export type EditResource = { /** * The path to the resource */ path?: string; /** * The new description of the resource */ description?: string; value?: unknown; /** * The new resource_type to be associated with the resource */ resource_type?: string; labels?: Array<(string)>; ws_specific?: boolean; }; export type Resource = { workspace_id?: string; path: string; description?: string; resource_type: string; value?: unknown; is_oauth: boolean; extra_perms?: { [key: string]: (boolean); }; created_by?: string; edited_at?: string; labels?: Array<(string)>; ws_specific?: boolean; }; export type ListableResource = { workspace_id?: string; path: string; description?: string; resource_type: string; value?: unknown; is_oauth: boolean; extra_perms?: { [key: string]: (boolean); }; is_expired?: boolean; refresh_error?: string; is_linked: boolean; is_refreshed: boolean; account?: number; created_by?: string; edited_at?: string; labels?: Array<(string)>; ws_specific?: boolean; }; export type ResourceType = { workspace_id?: string; name: string; schema?: unknown; description?: string; created_by?: string; edited_at?: string; format_extension?: string; is_fileset?: boolean; }; export type EditResourceType = { schema?: unknown; description?: string; is_fileset?: boolean; }; export type Schedule = { /** * The unique Orvanta path for this schedule. Must be of the form `u//` or `f//`. */ path: string; /** * Username of the last person who edited this schedule */ edited_by: string; /** * Timestamp of the last edit */ edited_at: string; /** * Cron expression with 6 fields (seconds, minutes, hours, day of month, month, day of week). Example '0 0 12 * * *' for daily at noon */ schedule: string; /** * IANA timezone for the schedule (e.g., 'UTC', 'Europe/Paris', 'America/New_York') */ timezone: string; /** * Whether the schedule is currently active and will trigger jobs */ enabled: boolean; /** * Path to the script or flow to execute when triggered */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; /** * True if script_path points to a BPMN flow. Read-only: such a schedule is derived from the flow's timer start event and rewritten on every deploy, so it cannot be created or edited through this API (it can be enabled/disabled). Mutually exclusive with is_flow. */ is_bpmn?: boolean; args?: ScriptArgs | null; /** * Additional permissions for this schedule */ extra_perms: { [key: string]: (boolean); }; /** * Email of the user who owns this schedule, used for permissioned_as */ email: string; /** * The user or group this schedule runs as (e.g., 'u/admin' or 'g/mygroup') */ permissioned_as: string; /** * Last error message if the schedule failed to trigger */ error?: string | null; /** * Path to a script or flow to run when the scheduled job fails */ on_failure?: string | null; /** * Number of consecutive failures before the on_failure handler is triggered (default 1) */ on_failure_times?: number | null; /** * If true, trigger on_failure handler only on exactly N failures, not on every failure after N */ on_failure_exact?: boolean | null; on_failure_extra_args?: ScriptArgs | null; /** * Path to a script or flow to run when the schedule recovers after failures */ on_recovery?: string | null; /** * Number of consecutive successes before the on_recovery handler is triggered (default 1) */ on_recovery_times?: number | null; on_recovery_extra_args?: ScriptArgs | null; /** * Path to a script or flow to run after each successful execution */ on_success?: string | null; on_success_extra_args?: ScriptArgs | null; /** * If true, the workspace-level error handler will not be triggered for this schedule's failures */ ws_error_handler_muted?: boolean; retry?: Retry | null; /** * Short summary describing the purpose of this schedule */ summary?: string | null; /** * Detailed description of what this schedule does */ description?: string | null; /** * If true, skip this schedule's execution if the previous run is still in progress (prevents concurrent runs) */ no_flow_overlap?: boolean; /** * Worker tag to route jobs to specific worker groups */ tag?: string | null; /** * ISO 8601 datetime until which the schedule is paused. Schedule resumes automatically after this time */ paused_until?: string | null; /** * Cron parser version. Use 'v2' for extended syntax with additional features */ cron_version?: string | null; /** * Path to a script that validates scheduled datetimes. Receives scheduled_for datetime and returns boolean to skip (true) or run (false) */ dynamic_skip?: string | null; labels?: Array<(string)>; }; 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 Orvanta path for this schedule. Must be of the form `u//` or `f//`. */ path: string; /** * Cron expression with 6 fields (seconds, minutes, hours, day of month, month, day of week). Example '0 0 12 * * *' for daily at noon */ schedule: string; /** * IANA timezone for the schedule (e.g., 'UTC', 'Europe/Paris', 'America/New_York') */ timezone: string; /** * Path to the script or flow to execute when triggered */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; args: ScriptArgs | null; /** * Whether the schedule is currently active and will trigger jobs */ enabled?: boolean; /** * Path to a script or flow to run when the scheduled job fails */ on_failure?: string | null; /** * Number of consecutive failures before the on_failure handler is triggered (default 1) */ on_failure_times?: number | null; /** * If true, trigger on_failure handler only on exactly N failures, not on every failure after N */ on_failure_exact?: boolean | null; on_failure_extra_args?: ScriptArgs | null; /** * Path to a script or flow to run when the schedule recovers after failures */ on_recovery?: string | null; /** * Number of consecutive successes before the on_recovery handler is triggered (default 1) */ on_recovery_times?: number | null; on_recovery_extra_args?: ScriptArgs | null; /** * Path to a script or flow to run after each successful execution */ on_success?: string | null; on_success_extra_args?: ScriptArgs | null; /** * If true, the workspace-level error handler will not be triggered for this schedule's failures */ ws_error_handler_muted?: boolean; retry?: Retry | null; /** * If true, skip this schedule's execution if the previous run is still in progress (prevents concurrent runs) */ no_flow_overlap?: boolean; /** * Short summary describing the purpose of this schedule */ summary?: string | null; /** * Detailed description of what this schedule does */ description?: string | null; /** * Worker tag to route jobs to specific worker groups */ tag?: string | null; /** * ISO 8601 datetime until which the schedule is paused. Schedule resumes automatically after this time */ paused_until?: string | null; /** * Cron parser version. Use 'v2' for extended syntax with additional features */ cron_version?: string | null; /** * Path to a script that validates scheduled datetimes. Receives scheduled_for datetime and returns boolean to skip (true) or run (false) */ dynamic_skip?: string | null; /** * The user or group this schedule runs as. Used during deployment to preserve the original schedule owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type EditSchedule = { /** * Cron expression with 6 fields (seconds, minutes, hours, day of month, month, day of week). Example '0 0 12 * * *' for daily at noon */ schedule: string; /** * IANA timezone for the schedule (e.g., 'UTC', 'Europe/Paris', 'America/New_York') */ timezone: string; args: ScriptArgs | null; /** * Path to a script or flow to run when the scheduled job fails */ on_failure?: string | null; /** * Number of consecutive failures before the on_failure handler is triggered (default 1) */ on_failure_times?: number | null; /** * If true, trigger on_failure handler only on exactly N failures, not on every failure after N */ on_failure_exact?: boolean | null; on_failure_extra_args?: ScriptArgs | null; /** * Path to a script or flow to run when the schedule recovers after failures */ on_recovery?: string | null; /** * Number of consecutive successes before the on_recovery handler is triggered (default 1) */ on_recovery_times?: number | null; on_recovery_extra_args?: ScriptArgs | null; /** * Path to a script or flow to run after each successful execution */ on_success?: string | null; on_success_extra_args?: ScriptArgs | null; /** * If true, the workspace-level error handler will not be triggered for this schedule's failures */ ws_error_handler_muted?: boolean; retry?: Retry | null; /** * If true, skip this schedule's execution if the previous run is still in progress (prevents concurrent runs) */ no_flow_overlap?: boolean; /** * Short summary describing the purpose of this schedule */ summary?: string | null; /** * Detailed description of what this schedule does */ description?: string | null; /** * Worker tag to route jobs to specific worker groups */ tag?: string | null; /** * ISO 8601 datetime until which the schedule is paused. Schedule resumes automatically after this time */ paused_until?: string | null; /** * Cron parser version. Use 'v2' for extended syntax with additional features */ cron_version?: string | null; /** * Path to a script that validates scheduled datetimes. Receives scheduled_for datetime and returns boolean to skip (true) or run (false) */ dynamic_skip?: string | null; /** * The user or group this schedule runs as (e.g., 'u/admin' or 'g/mygroup'). Only admins and wm_deployers can set this via preserve_permissioned_as. */ permissioned_as?: string | null; /** * If true and user is admin/wm_deployers, preserve the provided permissioned_as instead of using the deploying user's identity */ preserve_permissioned_as?: boolean | null; labels?: Array<(string)>; }; /** * job trigger kind (schedule, http, websocket...) */ export type JobTriggerKind = 'webhook' | 'default_email' | 'email' | 'schedule' | 'http' | 'websocket' | 'postgres' | 'kafka' | 'nats' | 'mqtt' | 'sqs' | 'gcp' | 'azure' | 'google' | 'github'; /** * job trigger mode */ export type TriggerMode = 'enabled' | 'disabled' | 'suspended'; export type TriggerExtraProperty = { /** * The unique Orvanta path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when triggered */ script_path: string; /** * The user or group this trigger runs as (permissioned_as) */ permissioned_as: string; /** * Additional permissions for this trigger */ extra_perms: { [key: string]: (boolean); }; /** * The workspace this trigger belongs to */ workspace_id: string; /** * Username of the last person who edited this trigger */ edited_by: string; /** * Timestamp of the last edit */ edited_at: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; /** * Trigger mode (enabled/disabled) */ mode: TriggerMode; labels?: Array<(string)>; }; export type AuthenticationMethod = 'none' | 'orvanta' | '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), 'orvanta' (Orvanta 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 Orvanta path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when triggered */ script_path: string; /** * The URL route path that will trigger this endpoint (e.g., 'api/myendpoint'). Must NOT start with a /. */ route_path: string; /** * If true, the route includes the workspace ID in the path */ workspaced_route?: boolean; /** * Short summary describing the purpose of this trigger */ summary?: string | null; /** * Detailed description of what this trigger does */ description?: string | null; /** * Configuration for serving static assets (s3 bucket, storage path, filename) */ static_asset_config?: { /** * S3 bucket path for static assets */ s3: string; /** * Storage path for static assets */ storage?: string; /** * Filename for the static asset */ filename?: string; } | null; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; /** * HTTP method (get, post, put, delete, patch) that triggers this endpoint */ http_method: HttpMethod; /** * Path to the resource containing authentication configuration (for api_key, basic_http, custom_script, signature methods) */ authentication_resource_path?: string | null; /** * Deprecated, use request_type instead */ is_async?: boolean; /** * How the request is handled - 'sync' waits for result, 'async' returns job ID immediately, 'sync_sse' streams results via Server-Sent Events */ request_type?: HttpRequestType; /** * How requests are authenticated - 'none' (public), 'orvanta' (Orvanta 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; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type EditHttpTrigger = { /** * The unique Orvanta path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when triggered */ script_path: string; /** * The URL route path that will trigger this endpoint (e.g., 'api/myendpoint'). Must NOT start with a /. */ route_path?: string; /** * Short summary describing the purpose of this trigger */ summary?: string | null; /** * Detailed description of what this trigger does */ description?: string | null; /** * If true, the route includes the workspace ID in the path */ workspaced_route?: boolean; /** * Configuration for serving static assets (s3 bucket, storage path, filename) */ static_asset_config?: { /** * S3 bucket path for static assets */ s3: string; /** * Storage path for static assets */ storage?: string; /** * Filename for the static asset */ filename?: string; } | null; /** * Path to the resource containing authentication configuration (for api_key, basic_http, custom_script, signature methods) */ authentication_resource_path?: string | null; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; /** * HTTP method (get, post, put, delete, patch) that triggers this endpoint */ http_method: HttpMethod; /** * Deprecated, use request_type instead */ is_async?: boolean; /** * How the request is handled - 'sync' waits for result, 'async' returns job ID immediately, 'sync_sse' streams results via Server-Sent Events */ request_type?: HttpRequestType; /** * How requests are authenticated - 'none' (public), 'orvanta' (Orvanta 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; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type TriggersCount = { primary_schedule?: { schedule?: string; }; schedule_count?: number; http_routes_count?: number; webhook_count?: number; email_count?: number; default_email_count?: number; websocket_count?: number; postgres_count?: number; kafka_count?: number; nats_count?: number; mqtt_count?: number; gcp_count?: number; azure_count?: number; sqs_count?: number; nextcloud_count?: number; google_count?: number; github_count?: number; }; export type WebsocketHeartbeat = { /** * Interval in seconds between heartbeat messages */ interval_secs: number; /** * Message to send as heartbeat. Use {{state}} as a placeholder for a value extracted from incoming messages (see state_field). */ message: string; /** * Optional. Top-level JSON field to extract from incoming messages. The extracted value replaces {{state}} in the heartbeat message. */ state_field?: string; }; 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; }>; /** * Logic to apply when evaluating filters. 'and' requires all filters to match, 'or' requires any filter to match. */ filter_logic?: 'and' | 'or'; /** * Messages to send immediately after connecting (can be raw strings or computed by runnables) */ initial_messages?: Array | null; /** * Arguments to pass to the script/flow that computes the WebSocket URL */ url_runnable_args?: ScriptArgs | null; /** * If true, the script can return a message to send back through the WebSocket */ can_return_message: boolean; /** * If true, error results are sent back through the WebSocket */ can_return_error_result: boolean; /** * Optional periodic heartbeat message configuration */ heartbeat?: WebsocketHeartbeat | null; /** * Path to a script 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 Orvanta path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when a message is received */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; /** * The WebSocket URL to connect to (can be a static URL or computed by a runnable) */ url: string; mode?: TriggerMode; /** * Array of key-value filters to match incoming messages (only matching messages trigger the script) */ filters: Array<{ key: string; value: unknown; }>; /** * Logic to apply when evaluating filters. 'and' requires all filters to match, 'or' requires any filter to match. */ filter_logic?: 'and' | 'or'; /** * Messages to send immediately after connecting (can be raw strings or computed by runnables) */ initial_messages?: Array | null; /** * Arguments to pass to the script/flow that computes the WebSocket URL */ url_runnable_args?: ScriptArgs | null; /** * If true, the script can return a message to send back through the WebSocket */ can_return_message: boolean; /** * If true, error results are sent back through the WebSocket */ can_return_error_result: boolean; /** * Optional periodic heartbeat message configuration */ heartbeat?: WebsocketHeartbeat | null; /** * Path to a script or flow to run when the triggered job fails */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type EditWebsocketTrigger = { /** * The WebSocket URL to connect to (can be a static URL or computed by a runnable) */ url: string; /** * The unique Orvanta path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when a message is received */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; /** * Array of key-value filters to match incoming messages (only matching messages trigger the script) */ filters: Array<{ key: string; value: unknown; }>; /** * Logic to apply when evaluating filters. 'and' requires all filters to match, 'or' requires any filter to match. */ filter_logic?: 'and' | 'or'; /** * Messages to send immediately after connecting (can be raw strings or computed by runnables) */ initial_messages?: Array | null; /** * Arguments to pass to the script/flow that computes the WebSocket URL */ url_runnable_args?: ScriptArgs | null; /** * If true, the script can return a message to send back through the WebSocket */ can_return_message: boolean; /** * If true, error results are sent back through the WebSocket */ can_return_error_result: boolean; /** * Optional periodic heartbeat message configuration */ heartbeat?: WebsocketHeartbeat | null; /** * Path to a script or flow to run when the triggered job fails */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type 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 Orvanta path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when a message is received */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; mode?: TriggerMode; /** * Path to a script or flow to run when the triggered job fails */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type 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 Orvanta path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when a message is received */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; mode?: TriggerMode; /** * Path to a script or flow to run when the triggered job fails */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; /** * 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 Orvanta path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when a message is received. */ script_path: string; /** * True if script_path points to a flow, false if it points to a script. */ is_flow: boolean; mode?: TriggerMode; /** * If true, automatically acknowledge messages after processing. */ auto_acknowledge_msg?: boolean; /** * Time in seconds within which the message must be acknowledged. If not provided, defaults to the subscription's acknowledgment deadline (600 seconds). */ ack_deadline?: number; /** * Path to a script or flow to run when the triggered job fails. */ error_handler_path?: string; /** * Arguments to pass to the error handler. */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions. */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type GetAllTopicSubscription = { topic_id: string; }; export type DeleteGcpSubscription = { subscription_id: string; }; /** * Azure Event Grid trigger mode. */ export type AzureMode = 'basic_push' | 'namespace_push' | 'namespace_pull'; /** * An ARM resource the service principal can see. */ export type AzureArmResource = { id: string; name: string; location?: string; type: string; }; export type AzureDeleteSubscription = { azure_mode: AzureMode; scope_resource_id: string; topic_name?: string | null; subscription_name: string; }; /** * An Azure Event Grid trigger that executes a script or flow when events arrive. */ export type AzureTrigger = TriggerExtraProperty & { azure_resource_path: string; azure_mode: AzureMode; /** * ARM resource ID of the topic (basic) or namespace (namespace modes). */ scope_resource_id: string; /** * Topic name within the namespace (namespace modes only). */ topic_name?: string | null; subscription_name: string; event_type_filters?: Array<(string)> | null; server_id?: string; last_server_ping?: string; error?: string; error_handler_path?: string; error_handler_args?: ScriptArgs; retry?: Retry; }; /** * Data for creating or updating an Azure Event Grid trigger. */ export type AzureTriggerData = { azure_resource_path: string; azure_mode: AzureMode; scope_resource_id: string; topic_name?: string | null; subscription_name: string; /** * Base URL for push delivery endpoints (push modes only). */ base_endpoint?: string; event_type_filters?: Array<(string)>; /** * The unique Orvanta path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; script_path: string; is_flow: boolean; mode?: TriggerMode; error_handler_path?: string; error_handler_args?: ScriptArgs; retry?: Retry; permissioned_as?: string; preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type TestAzureConnection = { azure_resource_path: string; }; export type AzureListTopics = { scope_resource_id: string; }; export type AzureListSubscriptions = { scope_resource_id: string; topic_name: string; }; export type AwsAuthResourceType = 'oidc' | 'credentials'; export type SqsTrigger = TriggerExtraProperty & { /** * The full URL of the AWS SQS queue to poll for messages */ queue_url: string; /** * Authentication type - 'credentials' for access key/secret, 'oidc' for OpenID Connect */ aws_auth_resource_type: AwsAuthResourceType; /** * Path to the AWS resource containing credentials or OIDC configuration */ aws_resource_path: string; /** * Array of SQS message attribute names to include with each message */ message_attributes?: Array<(string)> | null; /** * ID of the server currently handling this trigger (internal) */ server_id?: string; /** * Timestamp of last server heartbeat (internal) */ last_server_ping?: string; /** * Last error message if the trigger failed */ error?: string; /** * Path to a script 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 Orvanta path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when a message is received */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; mode?: TriggerMode; /** * Path to a script or flow to run when the triggered job fails */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type 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 Orvanta path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when a message is received */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; mode?: TriggerMode; /** * Path to a script or flow to run when the triggered job fails */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type 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 Orvanta path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when database changes are detected */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; mode?: TriggerMode; /** * Path to the PostgreSQL resource containing connection configuration */ postgres_resource_path: string; /** * Configuration for creating/managing the publication (tables, operations) */ publication?: PublicationData; /** * Path to a script or flow to run when the triggered job fails */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type 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 Orvanta path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when database changes are detected */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; mode?: TriggerMode; /** * Path to the PostgreSQL resource containing connection configuration */ postgres_resource_path: string; /** * Configuration for creating/managing the publication (tables, operations) */ publication?: PublicationData; /** * Path to a script or flow to run when the triggered job fails */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type 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; }>; /** * Logic to apply when evaluating filters. 'and' requires all filters to match, 'or' requires any filter to match. */ filter_logic?: 'and' | 'or'; /** * Initial offset behavior when consumer group has no committed offset. 'latest' starts from new messages only, 'earliest' starts from the beginning. */ auto_offset_reset?: 'latest' | 'earliest'; /** * When true (default), offsets are committed automatically after receiving each message. When false, you must manually commit offsets using the commit_offsets endpoint. */ auto_commit?: boolean; /** * ID of the server currently handling this trigger (internal) */ server_id?: string; /** * Timestamp of last server heartbeat (internal) */ last_server_ping?: string; /** * Last error message if the trigger failed */ error?: string; /** * Path to a script 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 Orvanta path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when a message is received */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; /** * Path to the Kafka resource containing connection configuration */ kafka_resource_path: string; /** * Kafka consumer group ID for this trigger */ group_id: string; /** * Array of Kafka topic names to subscribe to */ topics: Array<(string)>; filters: Array<{ key: string; value: unknown; }>; /** * Logic to apply when evaluating filters. 'and' requires all filters to match, 'or' requires any filter to match. */ filter_logic?: 'and' | 'or'; /** * Initial offset behavior when consumer group has no committed offset. */ auto_offset_reset?: 'latest' | 'earliest'; /** * When true (default), offsets are committed automatically after receiving each message. When false, you must manually commit offsets using the commit_offsets endpoint. */ auto_commit?: boolean; mode?: TriggerMode; /** * Path to a script or flow to run when the triggered job fails */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type 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; }>; /** * Logic to apply when evaluating filters. 'and' requires all filters to match, 'or' requires any filter to match. */ filter_logic?: 'and' | 'or'; /** * Initial offset behavior when consumer group has no committed offset. */ auto_offset_reset?: 'latest' | 'earliest'; /** * When true (default), offsets are committed automatically after receiving each message. When false, you must manually commit offsets using the commit_offsets endpoint. */ auto_commit?: boolean; /** * The unique Orvanta path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when a message is received */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; /** * Path to a script or flow to run when the triggered job fails */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type 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 Orvanta path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when a message is received */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; /** * Path to the NATS resource containing connection configuration */ nats_resource_path: string; /** * If true, uses NATS JetStream for durable message delivery */ use_jetstream: boolean; /** * JetStream stream name (required when use_jetstream is true) */ stream_name?: string | null; /** * JetStream consumer name (required when use_jetstream is true) */ consumer_name?: string | null; /** * Array of NATS subjects to subscribe to */ subjects: Array<(string)>; mode?: TriggerMode; /** * Path to a script or flow to run when the triggered job fails */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type 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 Orvanta path for this trigger. Must be of the form `u//` or `f//`. This is the trigger object path, not the HTTP route path. */ path: string; /** * Path to the script or flow to execute when a message is received */ script_path: string; /** * True if script_path points to a flow, false if it points to a script */ is_flow: boolean; /** * Path to a script or flow to run when the triggered job fails */ error_handler_path?: string; /** * Arguments to pass to the error handler */ error_handler_args?: ScriptArgs; /** * Retry configuration for failed executions */ retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type EmailTrigger = TriggerExtraProperty & { local_part: string; workspaced_local_part?: boolean; error_handler_path?: string; error_handler_args?: ScriptArgs; retry?: Retry; }; export type NewEmailTrigger = { path: string; script_path: string; local_part: string; workspaced_local_part?: boolean; is_flow: boolean; error_handler_path?: string; error_handler_args?: ScriptArgs; retry?: Retry; mode?: TriggerMode; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type EditEmailTrigger = { path: string; script_path: string; local_part?: string; workspaced_local_part?: boolean; is_flow: boolean; error_handler_path?: string; error_handler_args?: ScriptArgs; retry?: Retry; /** * The user or group this trigger runs as. Used during deployment to preserve the original trigger owner. */ permissioned_as?: string; /** * When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it. */ preserve_permissioned_as?: boolean; labels?: Array<(string)>; }; export type Group = { name: string; summary?: string; members?: Array<(string)>; extra_perms?: { [key: string]: (boolean); }; }; export type InstanceGroup = { name: string; summary?: string; emails?: Array<(string)>; instance_role?: 'superadmin' | 'devops' | null; }; export type InstanceGroupWithWorkspaces = { name: string; summary?: string; emails?: Array<(string)>; instance_role?: 'superadmin' | 'devops' | null; workspaces?: Array; }; export type WorkspaceInfo = { workspace_id?: string; workspace_name?: string; role?: string; }; export type Folder = { name: string; owners: Array<(string)>; extra_perms: { [key: string]: (boolean); }; summary?: string; created_by?: string; edited_at?: string; default_permissioned_as?: FolderDefaultPermissionedAs; }; /** * Ordered list of rules applied at create-time when admins or `wm_deployers` members deploy items in this folder. The first rule whose `path_glob` matches the item path (relative to the folder root) wins, and its `permissioned_as` is used as the default. * */ export type FolderDefaultPermissionedAs = Array<{ /** * Glob pattern evaluated against the item path *relative* to the folder root (e.g. "jobs**" matches every item whose full path is `f//jobs/...`). Supports `*`, `**`, `?`, `[abc]`, `{a,b}`. * */ path_glob: string; /** * Target identity the matched item should be permissioned as. Must be `u/`, `g/`, or an email that exists in this workspace. * */ permissioned_as: string; }>; export type WorkerPing = { worker: string; worker_instance: string; last_ping?: number; started_at: string; ip: string; jobs_executed: number; custom_tags?: Array<(string)>; worker_group: string; wm_version: string; last_job_id?: string; last_job_workspace_id?: string; occupancy_rate?: number; occupancy_rate_15s?: number; occupancy_rate_5m?: number; occupancy_rate_30m?: number; memory?: number; vcpus?: number; memory_usage?: number; wm_memory_usage?: number; job_isolation?: string; native_mode?: boolean; }; export type UserWorkspaceList = { email: string; workspaces: Array<{ id: string; name: string; username: string; color: string; operator_settings?: OperatorSettings; parent_workspace_id?: string | null; 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; forked_datatables?: Array<{ /** * Datatable name */ name: string; /** * New database name for the fork */ new_dbname: 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; role_source: 'manual' | 'instance_group'; disabled: 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; labels?: Array<(string)>; }; export type OpenFlowWPath = OpenFlow & { path: string; tag?: string; ws_error_handler_muted?: boolean; priority?: number; dedicated_worker?: boolean; timeout?: number; visible_to_runner_only?: boolean; on_behalf_of_email?: string; /** * 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; labels?: Array<(string)>; }; export type FlowPreview = { value: FlowValue; path?: string; args: ScriptArgs; tag?: string; restarted_from?: RestartedFrom; }; export type RestartedFrom = { flow_job_id?: string; step_id?: string; /** * 0-based iteration index for ForLoop / branch index for BranchAll. Iterations 0..n-1 are preserved; iteration n is restarted. */ branch_or_iteration_n?: number; flow_version?: number; /** * For BranchOne nested restart — the branch that was originally chosen, used to lock branch evaluation. */ branch_chosen?: { type?: 'default' | 'branch'; branch?: number; }; /** * When set, the worker spawns the child for `step_id` as a `RestartedFlow` against `nested.flow_job_id` instead of fresh-launching it. */ nested?: RestartedFrom; }; export type Policy = { triggerables?: { [key: string]: { [key: string]: unknown; }; }; triggerables_v2?: { [key: string]: { [key: string]: unknown; }; }; s3_inputs?: Array<{ [key: string]: unknown; }>; allowed_s3_keys?: Array<{ s3_path?: string; resource?: string; }>; 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; labels?: Array<(string)>; }; export type ScopeDefinition = { value: string; label: string; description?: string | null; requires_resource_path: boolean; }; export type ScopeDomain = { name: string; description?: string | null; scopes: Array; }; export type ListableRawApp = { workspace_id: string; path: string; summary: string; extra_perms: { [key: string]: (boolean); }; starred?: boolean; version: number; edited_at: string; labels?: Array<(string)>; }; export type AppWithLastVersion = { id: number; workspace_id: string; path: string; summary: string; versions: Array<(number)>; created_by: string; created_at: string; value: unknown; policy: Policy; execution_mode: 'viewer' | 'publisher' | 'anonymous'; extra_perms: { [key: string]: (boolean); }; custom_path?: string; raw_app: boolean; bundle_secret?: string; labels?: Array<(string)>; }; 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 BpmnFlow = { workspace_id: string; path: string; summary: string; description: string; bpmn_xml: string; /** * JSON Schema of the process's start variables, derived from the diagram at deploy time unless the deploying client supplied its own. Renders the run form. Absent for flows deployed before start-variable schemas existed. */ schema?: { [key: string]: unknown; }; draft_only?: boolean; labels?: Array<(string)>; archived: boolean; edited_by: string; edited_at: string; extra_perms: ExtraPerms; version_id?: number; }; export type ListableBpmnFlow = { workspace_id: string; path: string; summary: string; description?: string; edited_by?: string; edited_at?: string; archived: boolean; extra_perms: ExtraPerms; starred?: boolean; has_draft: boolean; draft_only?: boolean; labels?: Array<(string)>; }; /** * One projected element (or the process itself) from a BPMN document's * search projection (#659) — id/name plus, on a scriptTask/serviceTask * or businessRuleTask, its script or decision binding. * */ export type SearchBpmnNode = { id: string; name?: string; script_path?: string; script_hash?: string; decision_ref?: string; }; export type BpmnFlowWithDraft = { path: string; summary: string; description: string; bpmn_xml: string; /** * JSON Schema of the deployed version's start variables (see `BpmnFlow.schema`). Always the deployed version's — a draft carries no schema of its own. */ schema?: { [key: string]: unknown; }; extra_perms: ExtraPerms; draft_only?: boolean; draft?: { [key: string]: unknown; }; labels?: Array<(string)>; }; export type NewBpmnFlow = { path: string; summary: string; description?: string; bpmn_xml: string; /** * JSON Schema of the process's start variables (the `flow_input` accepted by `POST /bpmn/run/p/{path}`). Optional: when omitted, it is derived server-side from the deployed diagram — declared start form properties plus variables the process reads but never sets. Supply one only to override that derivation. */ schema?: { [key: string]: unknown; }; draft_only?: boolean; labels?: Array<(string)>; }; /** * One problem found by deploy-time BPMN validation (`backend/orvanta-bpmn/src/validate.rs`). Warnings and errors share this shape and are told apart by `severity`. */ export type BpmnValidationIssue = { /** * The rule that fired, e.g. `MissingScriptBinding`, `IncompleteConditionCoverage`. Stable — branch on this, not on `message`. */ code: string; /** * `error` blocks the deploy (the request is a 400). `warning` does not: the deploy succeeded and the warning is advisory. */ severity: 'error' | 'warning'; /** * A sentence for a human, naming the offending id(s). */ message: string; /** * The elements this problem is *about* — what an editor should mark on the canvas. Empty when the problem names nothing on the canvas (an unnamed unrecognized element, a whole-scope rule on the root process). Never the id of a *referenced* element that is missing: marking that would flag an innocent shape. */ element_ids: Array<(string)>; }; /** * The result of a successful BPMN deploy. `warnings` is empty on a clean deploy; a non-empty list does **not** mean the deploy failed. */ export type BpmnDeployResult = { path: string; warnings: Array; }; /** * Result of seeding the Orvanta Quick Starts Polyglot BPMN process (#1090). */ export type PolyglotBpmnSeedResult = { /** * Workspace path the process was (or already was) deployed at. */ bpmn_path: string; /** * Workspace paths of the five seeded scripts, in template order. */ script_paths: Array<(string)>; /** * `true` when the process already existed and this call created nothing -- the idempotent short-circuit, not an error. */ already_seeded: boolean; }; /** * A rejected BPMN deploy. `issues` carries every problem found, not just the first, so one round trip is enough to fix them all; warnings found alongside the errors are included with `severity: warning`. */ export type BpmnValidationProblem = { /** * A readable summary, for a client that reads one field. */ error: string; /** * Empty for a parse failure — the document never became a model, so there is no element to anchor to. */ issues: Array; }; /** * Which BPMN dialect attribute the delegate key was read from. Part of the lookup key, not decoration: in Flowable, `flowable:class="foo"` and `flowable:delegateExpression="${foo}"` are different constructs, and letting a binding for one satisfy a reference to the other would be a silent semantic mix. */ export type DelegateKeyKind = 'class' | 'bean' | 'expression'; /** * `script` runs the bound script as an ordinary child job. `noop` completes the element immediately, writes `results. = null` and records the skip in the job trace — it grants nothing, which makes it the safest row kind, and its `reason` is mandatory. `fail` is a deploy error naming the element: "we looked and decided not yet", a different state from unbound ("nobody looked"), and the difference is carried entirely by `reason`. */ export type DelegateBindingKind = 'script' | 'noop' | 'fail'; /** * A delegate key mapped to an Orvanta script. `delegate_key` is opaque and compared byte-for-byte; it is never interpreted as a class name, a path or a URL. `path` — not the key — is the ACL anchor that RLS and ownership checks are evaluated against. */ export type BpmnDelegateBinding = { path: string; key_kind: DelegateKeyKind; delegate_key: string; kind: DelegateBindingKind; /** * Present iff `kind` is `script`. */ script_path?: string; /** * Present iff `kind` is `noop` or `fail`; required there. */ reason?: string; /** * #635 `ParamMapping` — how the result lands in process variables. */ outputs?: unknown; /** * `mapException` as a catch-all. */ exception_map?: unknown; summary: string; extra_perms: { [key: string]: (boolean); }; edited_by: string; edited_at: string; }; export type ListedBpmnDelegateBinding = { path: string; key_kind: DelegateKeyKind; delegate_key: string; kind: DelegateBindingKind; script_path?: string; reason?: string; summary: string; edited_by: string; edited_at: string; }; /** * Create/update payload. On update `delegate_key` must equal the stored value — the key is not editable, because deployed models reference it by name and repointing it in place would rebind every one of them. */ export type NewBpmnDelegateBinding = { path: string; key_kind: DelegateKeyKind; delegate_key: string; kind: DelegateBindingKind; script_path?: string; reason?: string; outputs?: unknown; exception_map?: unknown; summary?: string; }; /** * One place a delegate key is referenced from. */ export type DelegateOccurrence = { /** * The `bpmn_flow.path` the reference was read from. */ flow_path: string; /** * The `serviceTask` element id -- what an editor should highlight. */ element_id: string; /** * True when the reference comes from a `draft_only` definition (an imported-but-not-yet-deployable estate) rather than a deployed one. */ draft_only: boolean; }; /** * One row of the unbound-delegate checklist -- a distinct `(key_kind, key)` with no binding row yet, and every place it is referenced from. */ export type UnboundDelegateChecklistEntry = { key_kind: DelegateKeyKind; key: string; occurrences: Array; }; /** * The outcome of a whole-file import: every binding path that was newly created vs. an existing one that was updated in place. */ export type ImportDelegateBindingsResult = { created: Array<(string)>; updated: Array<(string)>; }; export type BpmnFlowVersion = { id: number; created_at: string; }; /** * initial process variables, seeded into the root scope */ export type StartBpmnInstance = { /** * Start variables for this instance, addressed by the process as `flow_input.`. Shape them after the flow's `schema`. */ flow_input?: { [key: string]: unknown; }; }; /** * An inline, possibly-undeployed BPMN diagram plus initial process variables (#710 stage 3) -- the request body for `POST /bpmn/run/preview`. */ export type PreviewBpmnInstance = { /** * the BPMN 2.0 XML as currently open in the editor */ bpmn_xml: string; /** * Optional: only for scope-checking and job attribution (audit log, job list). Never resolved to a deployed `bpmn_flow` row. */ path?: string | null; /** * Start variables for this run, addressed by the process as `flow_input.`. */ flow_input?: { [key: string]: unknown; }; }; export type CancelBpmnInstance = { reason?: string | null; }; /** * one row of the instance list -- cheap columns only, no tokens/activities/variables (see BpmnInstanceDetail) */ export type BpmnInstanceSummary = { id: string; workspace_id: string; bpmn_flow_path?: string | null; bpmn_version?: number | null; created_at: string; created_by: string; started_at?: string | null; completed_at?: string | null; job_status?: string | null; canceled_by?: string | null; /** * process_status.lifecycle's tagged type: running / completed / incident. NULL if the engine has not picked the instance up yet. */ lifecycle?: 'running' | 'completed' | 'incident' | null; }; /** * one option of an enumerated form field (`` / ``) */ export type BpmnUserTaskFormFieldValue = { id: string; name?: string | null; }; /** * One declared field of a user task's form, compiled from * `` or `` (#705). This is the * same model the completion payload is validated against (#833), so a * client that renders exactly these fields and nothing else cannot * submit something the server will reject for being unrecognised. * */ export type BpmnUserTaskFormField = { /** * the field's name in the process's variable space */ id: string; label?: string | null; /** * carried verbatim from the document: string, long, enum, date, boolean, ... */ field_type?: string | null; date_pattern?: string | null; /** * the process variable this field reads/writes when it differs from id */ variable?: string | null; /** * the declared default, as authored (a literal or an expression) */ default?: unknown; required?: boolean; readable: boolean; writable: boolean; values?: Array; origin: 'dialect_form_property' | 'dialect_form_field'; }; /** * One `` parked awaiting a human, with the process context * needed to act on it (#1104). Every field is read off the persisted * process status or the compiled user-task model -- there is no claim * ledger and no `claimed_by`, because the engine records no such thing. * */ export type PendingUserTask = { /** * the process instance -- the `id` path segment of the completion operation */ instance_id: string; workspace_id: string; /** * the `` element id -- the `user_task_id` path segment of the completion operation */ element_id: string; /** * ``, the label an author wrote for a human */ name?: string | null; bpmn_flow_path?: string | null; bpmn_version?: number | null; instance_created_at: string; instance_created_by: string; /** * When the token arrived at this element, from the engine's own * bounded history. Null for a park older than the retained history. * */ parked_at?: string | null; /** * `flowable:assignee` / ``, when written as a literal */ assignee?: string | null; owner?: string | null; candidate_users?: Array<(string)>; candidate_groups?: Array<(string)>; /** * The task declares an assignment written as an expression, which * this path cannot evaluate. The task is still listed (hiding it * would make it unreachable, which is the defect #1104 is about) but * a client must not present it as unassigned. * */ assignment_unresolved?: boolean; /** * presentational only -- nothing schedules on it */ due_date?: string | null; priority?: string | null; /** * `flowable:formKey`, reported but never resolved (#705 phase 4) */ form_key?: string | null; form_fields?: Array; /** * the model set `flowable:formFieldValidation="false"`, so the server will not validate the payload */ form_validation_disabled?: boolean; }; /** * full instance detail -- lifecycle, active tokens/activities/joins/scopes, variables, and incidents */ export type BpmnInstanceDetail = { id: string; workspace_id: string; bpmn_flow_path?: string | null; bpmn_version?: number | null; created_at: string; created_by: string; started_at?: string | null; completed_at?: string | null; job_status?: string | null; canceled_by?: string | null; canceled_reason?: string | null; lifecycle?: 'running' | 'completed' | 'incident' | null; tokens?: Array; activities?: Array; joins?: Array; scopes?: Array; variables?: { [key: string]: unknown; }; incidents?: Array; result?: { [key: string]: unknown; }; }; /** * a token located at an element (never in transit on a sequence flow) */ export type BpmnToken = { id: string; element_id: string; scope_id: string; /** * the incoming sequence-flow id the token used to reach element_id */ arrived_via?: string; state: BpmnTokenState; }; /** * where a token is parked between step passes, tagged by `type` */ export type BpmnTokenState = { type: 'active' | 'waiting_for_job' | 'waiting_for_event' | 'waiting_for_timer' | 'waiting_for_scope' | 'async_before' | 'async_leave' | 'consumed'; /** * only present when type = waiting_for_timer */ fire_at?: string; /** * only present when type = waiting_for_scope */ scope_id?: string; /** * only present when type = async_leave, and only when the element is an exclusive gateway that already chose its outgoing sequence flow: the id of that flow, so the continuation takes it without re-evaluating the gateway's conditions */ via?: string; }; /** * join accounting for a parallel (AND) or structured inclusive (OR) join */ export type BpmnJoinState = { join_id: string; scope_id: string; activation: number; expected: Array<(string)>; arrived: Array<(string)>; }; /** * bookkeeping for one dispatched activity */ export type BpmnActivityState = { element_id: string; scope_id: string; token_id: string; /** * the dispatched child job id */ job_id?: string; activation: number; state: BpmnActivityRunState; }; /** * lifecycle of a single dispatched activity, tagged by `type` */ export type BpmnActivityRunState = { type: 'started' | 'completed' | 'failed'; }; /** * a sub-process activation */ export type BpmnScope = { id: string; element_id: string; parent_scope_id?: string; variables?: { [key: string]: unknown; }; activation: number; }; /** * a parked-process error the operator must see and can retry */ export type BpmnIncident = { kind: BpmnIncidentKind; activity_id?: string; message?: string; /** * the original failed child job's id -- this is the id used by POST .../incidents/{job_id}/retry */ job?: string; at: string; }; /** * One reason a (from_version, to_version) pair is not eligible for an identity migration (#922). `rule` is the discriminant; `rule_number` groups it (1 superset -- every v1 element id, sequence-flow id and message name exists in v2; 2 stable meaning -- an id that survives must still denote the same kind, scope, process, message binding and (for a boundary event) host activity; 3 join stability -- no element's set of incoming sequence flows may change, because `JoinState.expected` is derived once and never refreshed, so a stale one wedges the instance with no error at all). The remaining properties are the rule's own, and which are present depends on `rule`. */ export type BpmnMigrationBlocker = { rule: 'process_id_changed' | 'element_removed' | 'element_kind_changed' | 'element_scope_changed' | 'sequence_flow_removed' | 'message_name_removed' | 'message_binding_changed' | 'boundary_host_changed' | 'incoming_flows_changed'; rule_number: number; /** * the rendered sentence, safe to show an operator as-is */ message: string; element_id?: string; flow_id?: string; message_name?: string; kind?: string; from?: string; to?: string; removed?: Array<(string)>; added?: Array<(string)>; }; /** * Whether an instance pinned to `from_version` may be repinned to `to_version`, and if not, why. A property of the pair, not of an instance. */ export type BpmnMigrationCheck = { from_version: number; to_version: number; bpmn_flow_path: string; eligible: boolean; blockers: Array; }; /** * An operator's assertion about how a source version's elements correspond to a target version's (#925). Elements not named here are implicitly mapped to their own id -- and are then subject to every rule an explicit mapping is. 1:1 only: 1:N is deliberately not representable (it would require the engine to synthesize tokens, and inside an inclusive region the `JoinState` that `inclusive_join` never creates), and N:1 is representable only so that it can be refused with a reason. */ export type BpmnMigrationMapping = { activities?: Array<{ /** * an element id in the source version */ from: string; /** * an element id in the target version */ to: string; }>; }; /** * One reason a mapping document does not hold for a version pair (#925). `rule` is the discriminant; `rule_number` groups it (1 document well-formedness; 2 no silent drop -- an unmapped, deleted element would drop a token; 3 stable meaning -- kind, message binding and correlation names; 4 injectivity -- no N:1 merge, because a join's `arrived` is a set and would absorb the duplicate; 5 scope coherence; 6 edge images -- each source flow needs a unique counterpart between its mapped endpoints; 7 join coherence -- the only *silent* failure, since `JoinState.expected` is derived once and never refreshed; 8 boundary coherence -- the interruption surface of a running activity must not change under it). The remaining properties are the rule's own, and which are present depends on `rule`. */ export type BpmnMappingBlocker = { rule: 'unknown_source' | 'unknown_target' | 'duplicate_source' | 'activity_deleted' | 'mapped_kind_changed' | 'mapped_message_binding_changed' | 'message_name_removed' | 'activities_merged' | 'sequence_flows_merged' | 'mapped_scope_incoherent' | 'sequence_flow_unmapped' | 'sequence_flow_ambiguous' | 'mapped_incoming_flows_changed' | 'boundary_events_changed'; rule_number: number; /** * the rendered sentence, safe to show an operator as-is */ message: string; element_id?: string; flow_id?: string; message_name?: string; kind?: string; from?: string; to?: string; target?: string; target_flow?: string; from_kind?: string; to_kind?: string; from_message?: string; to_message?: string; expected_scope?: string; actual_scope?: string; mapped_source?: string; mapped_target?: string; sources?: Array<(string)>; targets?: Array<(string)>; candidates?: Array<(string)>; missing?: Array<(string)>; unexpected?: Array<(string)>; }; /** * A validated, fully-resolved rewrite: every identifier substitution needed to move an instance's persisted state from the source version's vocabulary to the target's. Only entries that actually change are present, so an empty plan with equal process ids is exactly an identity migration. * A plan is necessary and **not sufficient**. Three things stand outside it: `ActivityState.external_worker` and `RetryState.max_attempts` are dispatch-time snapshots, frozen by decision; `history[]` records what actually executed under the ids it executed under, immutable by decision; and the eight `uuid_v5` derived key formats that embed element and flow ids are **not yet handled** -- every key of `elements` is an element whose derived child-job ids change, which the engine-side applier must re-key. */ export type BpmnMigrationPlan = { /** * the root `Scope.element_id` before the rewrite -- the root scope's element id *is* the ``, and is the only site carrying it, which is why a process-id rename is unambiguous under a document and is resolved rather than refused */ from_process_id: string; to_process_id: string; /** * old element id -> new element id, changed entries only */ elements?: { [key: string]: (string); }; /** * old sequence-flow id -> new sequence-flow id, changed entries only. Derived by matching mapped endpoints, never declared. */ sequence_flows?: { [key: string]: (string); }; }; /** * Whether a mapping document holds for a version pair, and the substitution it resolves to. Nothing is written by the operations that return this. */ export type BpmnMigrationPlanCheck = { from_version: number; to_version: number; bpmn_flow_path: string; /** * the mapping document holds against this pair */ eligible: boolean; /** * the resolved plan rewrites nothing, so the pair is identity-migratable and `process_status` must not be touched */ identity: boolean; /** * this migration can be performed with what exists today. Equal to `identity` until the engine-side applier lands -- a non-identity plan is validated but not yet applicable. */ executable_today: boolean; plan?: BpmnMigrationPlan; blockers: Array; }; /** * One `bpmn_flow_version` with live instances pinned to it (#919), carrying the migratability verdict for (this version -> latest). */ export type BpmnPinnedVersionRollup = { /** * the `bpmn_flow_version.id` these instances resolve their model from */ version: number; /** * null once the version row is gone */ created_at?: string | null; created_by?: string | null; /** * live, uncancelled root instances pinned here */ running_instances: number; is_latest: boolean; /** * how many newer deployed versions of this flow exist; 0 means latest. Null when this version is not in `bpmn_flow.versions` (typically because the flow row is not visible to the caller). */ versions_behind?: number | null; /** * #922's verdict. Null when it was not computed -- because this is already latest, because `check=false`, because the response's check limit was reached, or because a definition would not resolve. `check_error` distinguishes those; a null is never a "no". */ migratable_to_latest?: boolean | null; /** * every reason, named, when `migratable_to_latest` is false. Same shape the migrate endpoints refuse with, so one canvas rendering serves both. Omitted when empty. */ blockers?: Array; /** * why there is no verdict. Omitted whenever there is one. */ check_error?: string; }; /** * one flow's live instances split across the versions they are pinned to */ export type BpmnFlowVersionRollup = { /** * the flow as it is named now, resolved through `bpmn_flow_version.path` so a rename does not produce a dead link */ bpmn_flow_path: string; /** * what a new start would pin to. Null when the flow row is not visible to the caller or has no deployed version. */ latest_version?: number | null; running_instances: number; /** * live instances not on `latest_version` */ outdated_instances: number; /** * newest pinned version first */ versions: Array; }; /** * Running BPMN instances grouped by pinned definition version (#919) -- "we have 340 instances on 12 versions" in one response. */ export type BpmnVersionRollup = { /** * most outdated instances first, then most instances, then path */ flows: Array; running_instances: number; outdated_instances: number; /** * distinct (flow, pinned version) groups */ pinned_versions: number; /** * live root instances that resolve to no `bpmn_flow_version` at all. Preview runs are excluded outright, so this is normally zero; it is reported so the totals reconcile against `/instances/list`. */ unattributed_instances: number; /** * true when the response's per-version check limit was reached and some versions carry no verdict for that reason alone */ checks_truncated: boolean; }; /** * what a migrate call actually moved */ export type BpmnMigrationResult = { from_version: number; to_version: number; bpmn_flow_path: string; dry_run: boolean; /** * the instance ids repinned; empty for a dry run */ migrated: Array<(string)>; }; /** * The 400 body when the contract refuses a swap. Same envelope shape as deploy-time BPMN validation (#743): `error` is a readable sentence for a client that reads one field, `blockers` carries the structure a UI needs to mark the offending shapes. */ export type BpmnMigrationRefusal = { error: string; from_version?: number; to_version?: number; blockers?: Array; }; /** * why a process parked in ProcessLifecycle::Incident, tagged by `type` */ export type BpmnIncidentKind = { type: 'activity_failed' | 'join_starved' | 'no_outgoing_path' | 'unsupported_element' | 'engine_error' | 'stranded'; }; /** * Frontend-facing projection of a process instance's live runtime state (Phase 5 Task 3) -- lifecycle, per-activity status, variables, history, and incidents. Consumed by the live process token overlay via GET .../instances/get/{id}/status. */ export type ProcessInstanceStatus = { instance_id: string; process_status: ProcessStatusValue; updated_at: string; activities: Array; variables: { [key: string]: unknown; }; history: Array; incidents: Array; }; /** * overall status of one process instance, as surfaced to the frontend */ export type ProcessStatusValue = 'running' | 'completed' | 'failed' | 'suspended' | 'canceled'; /** * runtime state of one BPMN element, as surfaced to the frontend overlay */ export type ProcessActivityRuntimeState = 'active' | 'completed' | 'failed' | 'terminated'; /** * error detail attached to a failed ProcessActivityStatus */ export type ProcessActivityError = { message: string; child_job_id?: string; }; /** * automatic-retry detail attached to a ProcessActivityStatus. Present only when the element's most recent dispatch carried a retry policy. next_attempt_at set means the activity failed and is waiting to be retried at that instant -- the process is running, not broken, and no incident exists yet. next_attempt_at absent with attempt == max_attempts means the budget is spent; if the element also carries an error, that is the dead-lettered activity. */ export type ProcessActivityRetry = { /** * 1-based; 1 is the original execution */ attempt: number; /** * total attempts permitted, original included */ max_attempts: number; next_attempt_at?: string; }; /** * one element's projected runtime status */ export type ProcessActivityStatus = { element_id: string; state: ProcessActivityRuntimeState; token_count: number; error?: ProcessActivityError; entered_at?: string; left_at?: string; retry?: ProcessActivityRetry; }; /** * one open, operator-facing incident (flattened projection) */ export type ProcessIncident = { element_id: string; message: string; child_job_id?: string; }; /** * one per-element transition record. Not currently populated by the engine -- always an empty array today (see ProcessInstanceStatus). */ export type ProcessHistoryEntry = { element_id: string; transition: string; /** * why this transition is not what it looks like. Set only by a `noop` delegate binding today (#923): the activity reports `completed` without having run anything, and this carries the binding's mandatory reason. */ note?: string; at: string; }; export type DmnDecision = { workspace_id: string; path: string; summary: string; description: string; /** * The DMN 1.3 XML */ value: string; edited_by: string; edited_at: string; archived: boolean; extra_perms: ExtraPerms; draft_only?: boolean; labels?: Array<(string)>; versions: Array<(number)>; }; export type NewDmnDecision = { path: string; summary: string; description?: string; /** * The DMN 1.3 XML */ value: string; draft_only?: boolean; labels?: Array<(string)>; }; export type ListableDmnDecision = { workspace_id: string; path: string; summary: string; description?: string; edited_by: string | null; edited_at: string | null; archived: boolean; extra_perms: ExtraPerms; has_draft: boolean; draft_only?: boolean; labels?: Array<(string)>; }; export type DmnDecisionWithDraft = { path: string; summary: string; description: string; /** * The DMN 1.3 XML */ value: string; extra_perms: ExtraPerms; draft_only?: boolean; draft?: { [key: string]: unknown; }; labels?: Array<(string)>; }; export type DmnDecisionVersion = { id: number; workspace_id: string; path: string; /** * The DMN 1.3 XML at this version */ value: string | null; created_by: string; created_at: string; }; export type EvaluateRequest = { /** * A saved dmn_decision path to load and evaluate */ decision_id?: string; /** * Input values keyed by FEEL variable name (an input column's `inputExpression` text). * A nested object is flattened into dotted keys -- `{"applicant": {"age": 35}}` supplies * `applicant.age` -- the same mapping a running BPMN businessRuleTask applies to its * process variables, so a decision evaluates identically here and in production. * */ inputs: { [key: string]: unknown; }; /** * Inline DMN 1.3 XML to evaluate instead of a saved decision_id */ xml?: string; /** * In-document `` selector, separate from decision_id (which is the storage * path when loading a saved decision). When set, selects which decision inside the * document to evaluate -- e.g. a decision other than the first in a saved multi-decision * document. When omitted, inline xml falls back to decision_id as its selector and a * stored decision evaluates its first decision element. Optional and backwards-compatible. * */ decision_ref?: string; }; export type EvaluateResponse = { hit_policy: string; /** * The COLLECT aggregator that ran (DMN tBuiltinAggregator). Absent for every hit policy * other than COLLECT, and for a plain un-aggregated COLLECT. When present, outputs holds * a scalar per output column instead of the array a plain COLLECT returns. * */ aggregation?: 'SUM' | 'MIN' | 'MAX' | 'COUNT'; /** * 1-based rule numbers, in the order the hit policy selected them */ matched_rules: Array<(number)>; /** * Output values keyed by output column name (COLLECT yields an array per key) */ outputs: { [key: string]: unknown; }; /** * Inputs that have no FEEL representation and were therefore absent from the context this * decision was evaluated against, each as "`name`: reason". Omitted rather than fatal, so * that the API and a running businessRuleTask evaluate the same decision identically. * Absent when everything mapped. * */ unmapped_inputs?: Array<(string)>; }; /** * Evaluate one `` -- the whole DRD closure below it -- as a unit * (Flowable part2). Deliberately a separate shape from EvaluateRequest: a decision * service has no single hit_policy and no single matched_rules, so folding it into * EvaluateResponse would leave two of that schema's three required fields meaningless. * */ export type EvaluateServiceRequest = { /** * A saved dmn_decision path whose document holds the decision service */ decision_id?: string; /** * Inline DMN 1.3 XML to evaluate instead of a saved decision_id */ xml?: string; /** * The in-document `` to run. Optional only when the document * declares exactly one decision service, which is then resolved automatically (the * same rule a BPMN decision task already applies to a `decisionServiceReference` that * carries no in-document selector). Two or more, and the request is rejected with * every declared service id named: picking the first would make which one ran depend * on element order. * */ decision_service_ref?: string; /** * Input values keyed by FEEL variable name, flattened into dotted keys exactly as for * EvaluateRequest. Each decision's result is then bound into the same context twice: * under each output column's bare name (Flowable parity -- Flowable merges results flat * into one shared variable map and never reads ``), and under the decision's * own `` (single output) or `.` (several outputs), * which cannot collide. * */ inputs: { [key: string]: unknown; }; }; export type EvaluatedDecisionSummary = { decision_id: string; decision_name: string; /** * The `` this decision's result was bound under */ variable: string; /** * True for an `` of the service, false for an `` * whose result feeds other decisions but is not returned. * */ is_output: boolean; hit_policy: string; aggregation?: 'SUM' | 'MIN' | 'MAX' | 'COUNT'; matched_rules: Array<(number)>; /** * The decision's result as a value: the scalar for a single-output table, a * {column: value} object for a multi-output one, null when no rule matched * (DMN 1.3 section 8.2.11 / Table 44). * */ value: unknown; }; export type EvaluateServiceResponse = { service_id: string; /** * One `` returns that decision's value directly; several return an * object keyed by each one's ``. * */ outputs: unknown; /** * Every decision that ran, in topological order -- the audit trail of a DRD run, and * the only way to see why an output came out as it did when several tables fed into it. * */ decisions: Array; /** * Declared `` that a decision in the closure required via a * `` edge but that the request did not supply. A warning, not an error: * a missing name evaluates to null, exactly as everywhere else in this engine. * */ missing_inputs?: Array<(string)>; /** * Bare output-column names that one decision's result overwrote after an earlier * decision (or the request) had already bound them. This is Flowable's documented * behaviour -- one shared variable map, last write wins -- kept for parity but reported * rather than silent. The namespaced `` binding is unaffected, so the * shadowed value is still reachable. * */ shadowed_variables?: Array<(string)>; unmapped_inputs?: Array<(string)>; }; export type SlackToken = { access_token: string; team?: { id: string; name: string; }; }; export type TokenResponse = { access_token: string; expires_in?: number; refresh_token?: string; scope?: Array<(string)>; grant_type?: string; }; export type HubScriptKind = 'script' | 'failure' | 'trigger' | 'approval'; export type PolarsClientKwargs = { region_name: string; }; 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; }; /** * Fork origin info with schema snapshot */ forked_from?: { /** * Schema snapshot at fork time */ schema?: { [key: string]: unknown; }; }; }; }; }; export type DataTableSchema = { datatable_name: string; /** * Hierarchical schema: schema_name -> table_name -> column_name -> compact_type (e.g. 'int4', 'text?', 'int4?=0') */ schemas: { [key: string]: { [key: string]: { [key: string]: (string); }; }; }; error?: string; }; export type DataTableTables = { datatable_name: string; /** * Hierarchical metadata: schema_name -> table_names */ schemas: { [key: string]: Array<(string)>; }; error?: string; }; export type DataTableTableSchema = { datatable_name: string; schema_name: string; table_name: string; /** * Columns in this table: column_name -> compact_type */ columns: { [key: string]: (string); }; }; export type DynamicInputData = { /** * Name of the function to execute for dynamic select */ entrypoint_function: string; /** * Arguments to pass to the function */ args?: { [key: string]: unknown; }; runnable_ref: { source: 'deployed'; /** * Path to the deployed script or flow */ path: string; runnable_kind: RunnableKind; } | { source: 'inline'; /** * Code content for inline execution */ code: string; language?: ScriptLang; }; }; export type OrvantaLargeFile = { s3: string; }; export type OrvantaFileMetadata = { mime_type?: string; size_in_bytes?: number; last_modified?: string; expires?: string; version_id?: string; }; export type OrvantaFilePreview = { 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; 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; }; /** * Instance-wide usage of one language (#190/#255 runtime governance). */ export type RuntimeUsageCount = { language: string; scripts: number; flows: number; apps: number; }; /** * One concrete usage of a language (#190/#255 runtime governance). */ export type RuntimeUsageLocation = { kind: 'script' | 'flow' | 'app'; workspace_id: string; path: string; }; /** * Unified instance configuration combining global settings and worker group configs */ export type InstanceConfig = { /** * Global settings keyed by setting name. Known fields include base_url, license_key, retention_period_secs, smtp_settings, otel, etc. Unknown fields are preserved as-is. * */ global_settings?: { [key: string]: unknown; }; /** * Worker group configurations keyed by group name (e.g. "default", "gpu"). Each value contains worker_tags, init_bash, autoscaling, etc. * */ worker_configs?: { [key: string]: { [key: string]: unknown; }; }; }; export type Config = { name: string; config?: { [key: string]: unknown; }; }; export type ExportedInstanceGroup = { name: string; summary?: string; emails?: Array<(string)>; id?: string; scim_display_name?: string; external_id?: string; instance_role?: 'superadmin' | 'devops' | null; }; /** * A matched completed run. `document` is Tantivy's native `{field: [values, ...]}` shape (every field is multi-valued), with keys `id`, `workspace_id`, `script_path`, `success`, `created_at`. */ export type JobSearchHit = { document?: { [key: string]: unknown; }; /** * Stable per-hit id (the job id) for selection/dedup in the UI. */ search_id?: string; }; /** * A matched service-log line. `document` is Tantivy's native `{field: [values, ...]}` shape, with keys `host`, `mode`, `worker_group`, `file_name`, `line_number`, `timestamp`, `json_fmt`, `logs`. */ export type LogSearchHit = { document?: { [key: string]: unknown; }; /** * Plain-text excerpt around the match, if a snippet could be generated. */ snippet_fragment?: string | null; /** * Character ranges within `snippet_fragment` to highlight. */ snippet_highlighted?: Array<{ start?: number; end?: number; }>; }; export type AutoscalingEvent = { id?: number; worker_group?: string; event_type?: string; desired_workers?: number; reason?: string; applied_at?: string; }; export type CriticalAlert = { /** * Unique identifier for the alert */ id?: number; /** * Type of alert (e.g., critical_error) */ alert_type?: string; /** * The message content of the alert */ message?: string; /** * Time when the alert was created */ created_at?: string; /** * Acknowledgment status of the alert, can be true, false, or null if not set */ acknowledged?: boolean | null; /** * Workspace id if the alert is in the scope of a workspace */ workspace_id?: string | null; }; export type CaptureTriggerKind = 'webhook' | 'http' | 'websocket' | 'kafka' | 'default_email' | 'nats' | 'postgres' | 'sqs' | 'mqtt' | 'gcp' | 'azure' | 'email'; export type Capture = { trigger_kind: CaptureTriggerKind; main_args: unknown; preprocessor_args: unknown; id: number; created_at: string; }; export type CaptureConfig = { trigger_config?: unknown; trigger_kind: CaptureTriggerKind; error?: string; last_server_ping?: string; }; export type OperatorSettings = { /** * Whether operators can view runs */ runs: boolean; /** * Whether operators can view schedules */ schedules: boolean; /** * Whether operators can view resources */ resources: boolean; /** * Whether operators can view variables */ variables: boolean; /** * Whether operators can view assets */ assets: boolean; /** * Whether operators can view audit logs */ audit_logs: boolean; /** * Whether operators can view triggers */ triggers: boolean; /** * Whether operators can view groups page */ groups: boolean; /** * Whether operators can view folders page */ folders: boolean; /** * Whether operators can view workers page */ workers: boolean; } | 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' | 'raw_app' | 'resource' | 'variable' | 'resource_type' | 'folder' | 'schedule' | 'http_trigger' | 'websocket_trigger' | 'kafka_trigger' | 'nats_trigger' | 'postgres_trigger' | 'mqtt_trigger' | 'sqs_trigger' | 'gcp_trigger' | 'azure_trigger' | 'email_trigger'; /** * Path of the item in the workspace */ path: string; /** * Number of versions source is ahead of target */ ahead: number; /** * Number of versions source is behind target */ behind: number; /** * Whether the item has any differences */ has_changes: boolean; /** * If the item exists in the source workspace */ exists_in_source: boolean; /** * If the item exists in the fork workspace */ exists_in_fork: boolean; }; export type CompareSummary = { /** * Total number of items with differences */ total_diffs: number; /** * Total number of ahead changes */ total_ahead: number; /** * Total number of behind changes */ total_behind: number; /** * Number of scripts with differences */ scripts_changed: number; /** * Number of flows with differences */ flows_changed: number; /** * Number of apps with differences */ apps_changed: number; /** * Number of resources with differences */ resources_changed: number; /** * Number of variables with differences */ variables_changed: number; /** * Number of resource types with differences */ resource_types_changed: number; /** * Number of folders with differences */ folders_changed: number; /** * Number of schedules with differences */ schedules_changed: number; /** * Number of triggers with differences (sum across all trigger kinds) */ triggers_changed: number; /** * Number of 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' | 'RestrictDeployToDeployers'; /** * Groups that can bypass this ruleset */ export type RuleBypasserGroups = Array<(string)>; /** * Users that can bypass this ruleset */ export type RuleBypasserUsers = Array<(string)>; export type DeploymentRequestEligibleDeployer = { username: string; email: string; is_admin: boolean; }; export type DeploymentRequestAssignee = { username: string; email: string; }; export type DeploymentRequestComment = { id: number; parent_id?: number | null; author: string; author_email: string; body: string; anchor_kind?: string | null; anchor_path?: string | null; obsolete: boolean; created_at: string; }; export type DeploymentRequest = { id: number; source_workspace_id: string; fork_workspace_id: string; requested_by: string; requested_by_email: string; requested_at: string; assignees: Array; comments: Array; }; export type QuotaInfo = { used: number; limit: number; prunable: number; }; export type NativeServiceName = 'nextcloud' | 'google' | 'github'; /** * A native trigger stored in Orvanta */ export type NativeTrigger = { /** * The unique identifier from the external service */ external_id: string; /** * The workspace this trigger belongs to */ workspace_id: string; service_name: NativeServiceName; /** * The path to the script or flow that will be triggered */ script_path: string; /** * Whether the trigger targets a flow (true) or a script (false) */ is_flow: boolean; /** * Configuration for the trigger including event_type and service_config */ service_config: { [key: string]: unknown; }; /** * Error message if the trigger is in an error state */ error?: string | null; /** * Short summary to be displayed when listed */ summary?: string | null; }; /** * Full trigger response containing both Orvanta data and external service data */ export type NativeTriggerWithExternal = { /** * The unique identifier from the external service */ external_id: string; /** * The workspace this trigger belongs to */ workspace_id: string; service_name: NativeServiceName; /** * The path to the script or flow that will be triggered */ script_path: string; /** * Whether the trigger targets a flow (true) or a script (false) */ is_flow: boolean; /** * Configuration for the trigger including event_type and service_config */ service_config: { [key: string]: unknown; }; /** * Error message if the trigger is in an error state */ error?: string | null; /** * Short summary to be displayed when listed */ summary?: string | null; /** * 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; }; /** * Short summary to be displayed when listed */ summary?: string | null; }; /** * 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_orvanta: number; }; export type NextCloudEventType = { id: string; name: string; description?: string; category?: string; path: string; }; export type GoogleCalendarEntry = { id: string; summary: string; primary?: boolean; }; export type GoogleDriveFile = { id: string; name: string; mime_type: string; is_folder?: boolean; }; export type GoogleDriveFilesResponse = { files: Array; next_page_token?: string; }; export type SharedDriveEntry = { id: string; name: string; }; export type GithubRepoEntry = { full_name: string; name: string; owner: string; private: boolean; }; 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; /** * the failed child job id identifying the incident to retry (Incident.job) */ export type ParameterIncidentJobId = 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 ListFeaturesResponse = { keys: Array<(string)>; beta: boolean; /** * one entry per capability this build actually carries (present in the binary and enabled for this deployment's flavour). Capabilities the binary does not implement are omitted entirely. Additive and deliberately NOT in `required` (#729): during a rolling upgrade an old backend predating this field won't send it, and a generated client that required it would mis-type a valid response as invalid. */ features?: Array<{ key: string; label: string; group: string; /** * the raw catalog flag. `false` here means the entry is only visible because ORVANTA_BETA is on. */ built: boolean; min_tier: 'trial' | 'teams' | 'enterprise'; /** * whether the live licence clears `min_tier` */ entitled: boolean; /** * fully usable; the filter that reproduces `keys` */ available: boolean; }>; }; export type GetLicenseIdResponse = string; export type GetEntitlementsResponse = { tier: 'trial' | 'teams' | 'enterprise'; edition: 'ote' | 'oee'; expires_at?: string | null; limits?: { [key: string]: unknown; }; }; 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 IsPasswordLoginDisabledResponse = 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; /** * Optional. When provided, verified against the caller's current password before the rotation is applied. */ current_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; disabled?: boolean; }; }; export type GlobalUserUpdateResponse = string; export type GlobalUsernameInfoData = { email: string; }; export type GlobalUsernameInfoResponse = { username: string; workspace_usernames: Array<{ workspace_id: string; username: string; }>; }; export type GlobalUserRenameData = { email: string; /** * new username */ requestBody: { new_username: string; }; }; export type GlobalUserRenameResponse = string; export type GlobalUserDeleteData = { email: string; }; export type GlobalUserDeleteResponse = string; export type GlobalUsersOverwriteData = { /** * List of users */ requestBody: Array; }; export type GlobalUsersOverwriteResponse = string; export type GlobalUsersExportResponse = Array; export type ListExtJwtTokensData = { /** * only tokens used in the last 30 days */ activeOnly?: boolean; page?: number; perPage?: number; }; export type ListExtJwtTokensResponse = Array; export type SubmitOnboardingDataData = { requestBody: { touch_point?: string; use_case?: string; }; }; export type SubmitOnboardingDataResponse = string; export type DeleteUserData = { username: string; workspace: string; }; export type DeleteUserResponse = string; export type OffboardPreviewData = { username: string; workspace: string; }; export type OffboardPreviewResponse = OffboardPreview; export type OffboardWorkspaceUserData = { requestBody: OffboardRequest; username: string; workspace: string; }; export type OffboardWorkspaceUserResponse = OffboardResponse; export type GlobalOffboardPreviewData = { email: string; }; export type GlobalOffboardPreviewResponse = GlobalOffboardPreview; export type OffboardGlobalUserData = { email: string; requestBody: GlobalOffboardRequest; }; export type OffboardGlobalUserResponse = OffboardResponse; export type ConvertUserToGroupData = { username: string; workspace: string; }; export type ConvertUserToGroupResponse = string; export type GetCurrentEmailResponse = string; export type RefreshUserTokenData = { ifExpiringInLessThanS?: number; }; export type RefreshUserTokenResponse = string; export type GetTutorialProgressResponse = { progress?: number; skipped_all?: boolean; }; export type UpdateTutorialProgressData = { /** * progress update */ requestBody: { progress?: number; skipped_all?: boolean; }; }; export type UpdateTutorialProgressResponse = string; export type LeaveInstanceResponse = string; export type GetUsageResponse = number; export type GetUserSeatsResponse = { developers: number; operators: number; developer_seats: number; operator_seats: number; total_users: number; users_limit: number; }; export type GetRunnableResponse = { workspace: string; endpoint_async: string; endpoint_sync: string; summary: string; description?: string; kind: string; }; export type GlobalWhoamiResponse = GlobalUserInfo; export type ListWorkspaceInvitesResponse = Array; export type WhoamiData = { workspace: string; }; export type WhoamiResponse = User; export type AcceptInviteData = { /** * accept invite */ requestBody: { workspace_id: string; username?: string; }; }; export type AcceptInviteResponse = string; export type DeclineInviteData = { /** * decline invite */ requestBody: { workspace_id: string; }; }; export type DeclineInviteResponse = string; export type ImpersonateServiceAccountData = { requestBody: { username: string; }; workspace: string; }; export type ImpersonateServiceAccountResponse = string; export type ExitImpersonationData = { requestBody: { token: string; }; workspace: string; }; export type ExitImpersonationResponse = string; export type WhoisData = { username: string; workspace: string; }; export type WhoisResponse = User; export type ExistsEmailData = { email: string; }; export type ExistsEmailResponse = boolean; export type ListUsersAsSuperAdminData = { /** * filter only active users */ activeOnly?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; }; export type ListUsersAsSuperAdminResponse = Array; export type ListUsersData = { workspace: string; }; export type ListUsersResponse = Array; export type 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 UpdateTokenScopesData = { /** * new scopes (null or omitted = full access) */ requestBody: { scopes?: Array<(string)> | null; }; tokenPrefix: string; }; export type UpdateTokenScopesResponse = 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; app_owner?: string | null; }; 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 CreateServiceAccountData = { requestBody: { username: string; }; workspace: string; }; export type CreateServiceAccountResponse = string; export type DeleteInviteData = { /** * WorkspaceInvite */ requestBody: { email: string; is_admin: boolean; operator: boolean; }; workspace: string; }; export type DeleteInviteResponse = string; export type ArchiveWorkspaceData = { workspace: string; }; export type ArchiveWorkspaceResponse = string; export type UnarchiveWorkspaceData = { workspace: string; }; export type UnarchiveWorkspaceResponse = string; export type DeleteWorkspaceData = { onlyDeleteForks?: boolean; workspace: string; }; export type DeleteWorkspaceResponse = string; export type LeaveWorkspaceData = { workspace: string; }; export type LeaveWorkspaceResponse = string; export type GetWorkspaceNameData = { workspace: string; }; export type GetWorkspaceNameResponse = string; export type ChangeWorkspaceNameData = { requestBody?: { new_name?: string; }; workspace: string; }; export type ChangeWorkspaceNameResponse = string; export type ChangeWorkspaceIdData = { requestBody?: { new_id?: string; new_name?: string; }; workspace: string; }; export type ChangeWorkspaceIdResponse = string; export type ChangeWorkspaceColorData = { requestBody?: { color?: string; }; workspace: string; }; export type ChangeWorkspaceColorResponse = string; export type UpdateOperatorSettingsData = { requestBody: OperatorSettings; workspace: string; }; export type UpdateOperatorSettingsResponse = string; export type CompareWorkspacesData = { /** * The ID of the workspace to compare with */ targetWorkspaceId: string; workspace: string; }; export type CompareWorkspacesResponse = WorkspaceComparison; export type ResetDiffTallyData = { /** * The ID of the workspace to compare with */ forkWorkspaceId: string; workspace: string; }; export type ResetDiffTallyResponse = unknown; export type ListPendingInvitesData = { workspace: string; }; export type ListPendingInvitesResponse = Array; export type GetPublicSettingsData = { workspace: string; }; export type GetPublicSettingsResponse = { workspace_id: string; slack_name?: string; slack_team_id?: string; teams_team_id?: string; teams_team_name?: string; teams_team_guid?: string; large_file_storage?: LargeFileStorage; datatable?: DataTableSettings; deploy_ui?: WorkspaceDeployUISettings; mute_critical_alerts?: boolean; }; 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 TarballWorkspaceData = { /** * "zip" or "tar" (default) */ archiveType?: 'zip' | 'tar'; /** * "bun" or "deno" -- selects the .ts extension used for Bun-language scripts */ defaultTs?: 'bun' | 'deno'; /** * Opt-in, default false, added in #729. `dmn_decision` rows are * workspace source code, same as flows -- but unlike flows this * defaults off, matching `include_schedules`/`include_triggers`: * the CLI (#822) has sent this parameter since before the backend * read it, and independently gates its own local sync file map on * a matching `--include-dmn` flag. Both gates exist because a path * present locally but absent from the tarball is indistinguishable * from "deleted upstream" to `sync pull`, and an opt-out default * would have archived every locally-pushed decision on the first * pull after this endpoint started supporting DMN at all. * */ includeDmn?: boolean; includeGroups?: boolean; includeKey?: boolean; includeSchedules?: boolean; includeSettings?: boolean; includeTriggers?: boolean; includeUsers?: boolean; includeWorkspaceDependencies?: boolean; plainSecret?: boolean; /** * "v1" (legacy flat format, default) or "v2" (grouped format) */ settingsVersion?: 'v1' | 'v2'; skipResources?: boolean; skipResourceTypes?: boolean; skipSecrets?: boolean; skipVariables?: boolean; workspace: string; }; export type TarballWorkspaceResponse = (Blob | File); export type GetThresholdAlertData = { workspace: string; }; export type GetThresholdAlertResponse = { threshold_alert_amount?: number; last_alert_sent?: string; }; export type SetThresholdAlertData = { /** * threshold alert info */ requestBody: { threshold_alert_amount?: number; }; workspace: string; }; export type SetThresholdAlertResponse = string; export type RebuildDependencyMapData = { workspace: string; }; export type RebuildDependencyMapResponse = string; export type GetDependentsData = { /** * The imported path to get dependents for */ importedPath: string; workspace: string; }; export type GetDependentsResponse = Array; export type GetImportsData = { /** * The script path to get imports for */ importerPath: string; workspace: string; }; export type GetImportsResponse = Array<(string)>; export type GetDependentsAmountsData = { /** * List of imported paths to get dependents counts for */ requestBody: Array<(string)>; workspace: string; }; export type GetDependentsAmountsResponse = Array; export type GetDependencyMapData = { workspace: string; }; export type GetDependencyMapResponse = Array; export type EditSlackCommandData = { /** * WorkspaceInvite */ requestBody: { slack_command_script?: string; }; workspace: string; }; export type EditSlackCommandResponse = string; export type GetWorkspaceSlackOauthConfigData = { workspace: string; }; export type GetWorkspaceSlackOauthConfigResponse = { slack_oauth_client_id?: string | null; /** * Masked with *** if set */ slack_oauth_client_secret?: string | null; }; export type SetWorkspaceSlackOauthConfigData = { /** * Slack OAuth Configuration */ requestBody: { slack_oauth_client_id: string; slack_oauth_client_secret: string; }; workspace: string; }; export type SetWorkspaceSlackOauthConfigResponse = string; export type DeleteWorkspaceSlackOauthConfigData = { workspace: string; }; export type DeleteWorkspaceSlackOauthConfigResponse = string; export type EditTeamsCommandData = { /** * script/flow to run on the /orvanta Teams command. Omit or null to clear it. */ requestBody: { teams_command_script?: string; }; workspace: string; }; export type EditTeamsCommandResponse = string; export type ListAvailableTeamsIdsData = { /** * Pagination cursor URL from previous response. Pass this to fetch the next page of results. */ nextLink?: string; /** * Search teams by name. If omitted, returns first page of all teams. */ search?: string; workspace: string; }; export type ListAvailableTeamsIdsResponse = { teams?: Array<{ team_name?: string; team_id?: string; }>; /** * Total number of teams across all pages */ total_count?: number; /** * Number of teams per page (configurable via TEAMS_PER_PAGE env var) */ per_page?: number; /** * URL to fetch next page of results. Null if no more pages. */ next_link?: string | null; }; export type ListAvailableTeamsChannelsData = { /** * Microsoft Teams team ID */ teamId: string; workspace: string; }; export type ListAvailableTeamsChannelsResponse = { channels?: Array<{ channel_name?: string; channel_id?: string; }>; total_count?: number; }; export type ConnectTeamsData = { /** * connect teams */ requestBody: { team_id?: string; team_name?: string; }; workspace: string; }; export type ConnectTeamsResponse = string; export type ConnectSlackData = { /** * connect slack with a pre-minted bot token */ requestBody: { /** * xoxb-... bot token obtained at api.slack.com/apps */ bot_token: string; team_id: string; team_name: string; }; workspace: string; }; export type ConnectSlackResponse = unknown; export type RunSlackMessageTestJobData = { /** * path to hub script to run and its corresponding args */ requestBody: { hub_script_path?: string; channel?: string; test_msg?: string; }; workspace: string; }; export type RunSlackMessageTestJobResponse = { job_uuid?: string; }; export type RunTeamsMessageTestJobData = { /** * path to hub script to run and its corresponding args */ requestBody: { hub_script_path?: string; channel?: string; test_msg?: string; }; workspace: string; }; export type RunTeamsMessageTestJobResponse = { job_uuid?: string; }; export type EditDeployToData = { requestBody: { deploy_to?: string; }; workspace: string; }; export type EditDeployToResponse = string; export type EditAutoInviteData = { /** * WorkspaceInvite */ requestBody: { operator?: boolean; invite_all?: boolean; auto_add?: boolean; /** * Explicit auto-invite domain to use instead of deriving one from the caller's own email. A workspace admin may only set their own domain; setting a different domain requires the caller to be a superadmin. Case-insensitive (stored lowercased); non-ASCII is rejected. Omitting this field leaves the currently stored domain unchanged; sending an explicit empty string resets it to the caller's own domain. * */ domain?: string; }; workspace: string; }; export type EditAutoInviteResponse = string; export type EditInstanceGroupsData = { /** * Instance Groups Configuration */ requestBody: { groups?: Array<(string)>; roles?: { [key: string]: (string); }; }; workspace: string; }; export type EditInstanceGroupsResponse = string; export type EditWebhookData = { /** * WorkspaceWebhook */ requestBody: { webhook?: string; }; workspace: string; }; export type EditWebhookResponse = string; export type EditCopilotConfigData = { /** * WorkspaceCopilotConfig */ requestBody: AIConfig; workspace: string; }; export type EditCopilotConfigResponse = { effective_ai_config: AIConfig; has_instance_ai_config: boolean; uses_instance_ai_config: boolean; instance_ai_summary?: InstanceAISummary; }; export type GetCopilotSettingsStateData = { workspace: string; }; export type GetCopilotSettingsStateResponse = { has_instance_ai_config: boolean; uses_instance_ai_config: boolean; instance_ai_summary?: InstanceAISummary; }; export type GetCopilotInfoData = { workspace: string; }; export type GetCopilotInfoResponse = AIConfig; export type EditErrorHandlerData = { /** * WorkspaceErrorHandler */ requestBody: EditErrorHandler; workspace: string; }; export type EditErrorHandlerResponse = string; export type EditSuccessHandlerData = { /** * WorkspaceSuccessHandler */ requestBody: EditSuccessHandler; workspace: string; }; export type EditSuccessHandlerResponse = string; export type EditLargeFileStorageConfigData = { /** * LargeFileStorage info */ requestBody: { large_file_storage?: LargeFileStorage; }; workspace: string; }; export type EditLargeFileStorageConfigResponse = unknown; export type ListDucklakesData = { workspace: string; }; export type ListDucklakesResponse = Array<(string)>; export type ListDataTablesData = { workspace: string; }; export type ListDataTablesResponse = Array<{ name: string; resource_type: 'postgres' | 'instance'; resource_path: string; }>; export type ListDataTableSchemasData = { workspace: string; }; export type ListDataTableSchemasResponse = Array; export type ListDataTableTablesData = { workspace: string; }; export type ListDataTableTablesResponse = Array; export type GetDataTableTableSchemaData = { datatableName: string; schemaName: string; tableName: string; workspace: string; }; export type GetDataTableTableSchemaResponse = DataTableTableSchema; export type EditDucklakeConfigData = { /** * Ducklake settings */ requestBody: { settings: DucklakeSettings; }; workspace: string; }; export type EditDucklakeConfigResponse = unknown; export type EditDataTableConfigData = { /** * DataTable settings */ requestBody: { settings: DataTableSettings; }; workspace: string; }; export type EditDataTableConfigResponse = unknown; export type CreatePgDatabaseData = { /** * Create pg database request */ requestBody: { /** * Datatable source to determine connection info: 'datatable://name' or '$res:path' */ source: string; /** * Name for the new database */ target_dbname: string; }; workspace: string; }; export type CreatePgDatabaseResponse = string; export type DropForkedDatatableDatabasesData = { requestBody: { datatable_names: Array<(string)>; }; workspace: string; }; export type DropForkedDatatableDatabasesResponse = Array<(string)>; export type ImportPgDatabaseData = { /** * Import pg database request */ requestBody: { /** * Source database: 'datatable://name' or '$res:path' */ source: string; /** * Target database: 'datatable://name' or '$res:path' */ target: string; /** * Override the target database name */ target_dbname_override?: string; fork_behavior: 'schema_only' | 'schema_and_data' | 'keep_original'; }; workspace: string; }; export type ImportPgDatabaseResponse = string; export type ExportPgSchemaData = { /** * Export pg schema request */ requestBody: { /** * Source database: 'datatable://name' or '$res:path' */ source: string; }; workspace: string; }; export type ExportPgSchemaResponse = string; export type GetDatatableFullSchemaData = { requestBody: { /** * Source datatable, e.g. 'datatable://main' */ source: string; }; workspace: string; }; export type GetDatatableFullSchemaResponse = { [key: string]: { [key: string]: { name: string; columns: Array<{ name: string; datatype: string; primary_key?: boolean; default_value?: string; nullable?: boolean; }>; foreign_keys: Array<{ target_table?: string; columns: Array<{ source_column?: string; target_column?: string; }>; on_delete: string; on_update: string; fk_constraint_name?: string; }>; pk_constraint_name?: string; }; }; }; export type GetGitSyncEnabledData = { workspace: string; }; export type GetGitSyncEnabledResponse = { enabled?: boolean; reason?: string | null; max_repos?: number | null; user_count?: number | null; max_users?: number | null; }; export type 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; default_app_raw?: boolean; }; export type GetWorkspaceUsageData = { workspace: string; }; export type GetWorkspaceUsageResponse = number; export type GetUsedTriggersData = { workspace: string; }; export type GetUsedTriggersResponse = { http_routes_used: boolean; websocket_used: boolean; kafka_used: boolean; nats_used: boolean; postgres_used: boolean; mqtt_used: boolean; gcp_used: boolean; azure_used: boolean; sqs_used: boolean; email_used: boolean; nextcloud_used: boolean; google_used: boolean; github_used: boolean; }; export type ListProtectionRulesData = { workspace: string; }; export type ListProtectionRulesResponse = Array; export type CreateProtectionRuleData = { /** * New protection rule configuration */ requestBody: { /** * Unique name for the protection rule */ name: string; rules: ProtectionRules; bypass_groups: RuleBypasserGroups; bypass_users: RuleBypasserUsers; }; workspace: string; }; export type CreateProtectionRuleResponse = string; export type UpdateProtectionRuleData = { /** * Updated protection rule configuration */ requestBody: { rules: ProtectionRules; bypass_groups: RuleBypasserGroups; bypass_users: RuleBypasserUsers; }; /** * Name of the protection rule to update */ ruleName: string; workspace: string; }; export type UpdateProtectionRuleResponse = string; export type DeleteProtectionRuleData = { /** * Name of the protection rule to delete */ ruleName: string; workspace: string; }; export type DeleteProtectionRuleResponse = string; export type ListDeploymentRequestEligibleDeployersData = { workspace: string; }; export type ListDeploymentRequestEligibleDeployersResponse = Array; export type GetOpenDeploymentRequestData = { workspace: string; }; export type GetOpenDeploymentRequestResponse = (DeploymentRequest) | null; export type CreateDeploymentRequestData = { requestBody: { /** * Usernames in the parent workspace. Must be admin or wm_deployers. */ assignees: Array<(string)>; }; workspace: string; }; export type CreateDeploymentRequestResponse = DeploymentRequest; export type CancelDeploymentRequestData = { id: number; workspace: string; }; export type CancelDeploymentRequestResponse = string; export type CloseDeploymentRequestMergedData = { id: number; workspace: string; }; export type CloseDeploymentRequestMergedResponse = string; export type CreateDeploymentRequestCommentData = { id: number; requestBody: { body: string; parent_id?: number | null; anchor_kind?: string | null; anchor_path?: string | null; }; workspace: string; }; export type CreateDeploymentRequestCommentResponse = DeploymentRequestComment; export type LogAiChatData = { requestBody: { session_id: string; provider: string; model: string; mode: string; }; workspace: string; }; export type LogAiChatResponse = void; export type GetCloudQuotasData = { workspace: string; }; export type GetCloudQuotasResponse = { scripts: QuotaInfo; flows: QuotaInfo; apps: QuotaInfo; variables: QuotaInfo; resources: QuotaInfo; }; export type PruneVersionsData = { requestBody: { resource_type: 'scripts' | 'flows' | 'apps'; }; workspace: string; }; export type PruneVersionsResponse = { pruned: number; }; export type ListWsSpecificData = { workspace: string; }; export type ListWsSpecificResponse = Array<{ item_kind: string; path: string; }>; export type ListWsSpecificVersionsData = { kind: 'resource' | 'variable'; path: string; workspace: string; }; export type ListWsSpecificVersionsResponse = Array<(string)>; export type GetSharedUiData = { workspace: string; }; export type GetSharedUiResponse = { files: { [key: string]: (string); }; version: number; edited_at: string; edited_by: string; }; export type ListSharedUiData = { workspace: string; }; export type ListSharedUiResponse = { paths: Array<(string)>; sizes: { [key: string]: (number); }; version: number; edited_at: string; edited_by: string; }; export type GetSharedUiVersionData = { workspace: string; }; export type GetSharedUiVersionResponse = { version: number; }; export type UpdateSharedUiData = { requestBody: { files: { [key: string]: (string); }; }; workspace: string; }; export type UpdateSharedUiResponse = string; export type RefreshCustomInstanceUserPwdResponse = { [key: string]: unknown; }; export type ListCustomInstanceDbsResponse = { [key: string]: CustomInstanceDb; }; export type SetupCustomInstanceDbData = { /** * The name of the database to create */ name: string; requestBody: { tag?: CustomInstanceDbTag; }; }; export type SetupCustomInstanceDbResponse = CustomInstanceDb; export type DropCustomInstanceDbData = { /** * The name of the database to drop */ name: string; }; export type DropCustomInstanceDbResponse = string; export type GetGlobalData = { key: string; }; export type GetGlobalResponse = unknown; export type SetGlobalData = { key: string; /** * value set */ requestBody: { value?: unknown; }; }; export type SetGlobalResponse = string; export type GetRuffConfigResponse = string; export type GetLocalResponse = unknown; export type TestSmtpData = { /** * test smtp payload */ requestBody: { to: string; smtp: { host: string; username: string; password: string; port: number; from: string; tls_implicit: boolean; disable_tls: boolean; }; }; }; export type TestSmtpResponse = string; export type TestCriticalChannelsData = { /** * test critical channel payload */ requestBody: Array<{ email?: string; slack_channel?: string; }>; }; export type TestCriticalChannelsResponse = string; export type GetCriticalAlertsData = { acknowledged?: boolean | null; page?: number; pageSize?: number; }; export type GetCriticalAlertsResponse = { alerts?: Array; /** * Total number of rows matching the query. */ total_rows?: number; /** * Total number of pages based on the page size. */ total_pages?: number; }; export type AcknowledgeCriticalAlertData = { /** * The ID of the critical alert to acknowledge */ id: number; }; export type AcknowledgeCriticalAlertResponse = string; export type AcknowledgeAllCriticalAlertsResponse = string; export type TestLicenseKeyData = { /** * test license key */ requestBody: { license_key: string; }; }; export type TestLicenseKeyResponse = string; export type RevalidateLicenseResponse = { /** * licence validated successfully */ ok: boolean; tier?: string; edition?: string; expires_at?: string | null; /** * instance is licence-degraded to read-only */ read_only: boolean; first_failure_at?: string | null; /** * this call cleared a pre-existing failure */ recovered?: boolean; tier_changed?: boolean; }; export type TestObjectStorageConfigData = { /** * test object storage config */ requestBody: { [key: string]: unknown; }; }; export type TestObjectStorageConfigResponse = string; export type GetObjectStorageUsageResponse = { running: boolean; started_at: string; finished_at?: string | null; current_prefix?: string | null; scanned_objects: number; folders: Array<{ prefix: string; size: number; partial?: boolean; }>; error?: string | null; } | null; export type ComputeObjectStorageUsageResponse = string; export type RunLogCleanupResponse = string; export type GetLogCleanupStatusResponse = { running: boolean; started_at: string; finished_at?: string | null; phase: string; total_service: number; processed_service: number; total_jobs: number; processed_jobs: number; s3_deleted: number; orphans_scanned: number; orphans_deleted: number; errors: number; last_error?: string | null; } | null; export type SendStatsResponse = string; export type RestartWorkerGroupData = { /** * the name of the worker group to restart */ workerGroup: string; }; export type RestartWorkerGroupResponse = string; export type RestartWorkerPoolData = { /** * the name of the worker pool to restart */ workerPool: string; }; export type RestartWorkerPoolResponse = string; export type GetStatsResponse = { signature?: string; data?: string; }; export type GetLatestKeyRenewalAttemptResponse = { result: string; attempted_at: string; } | null; export type RenewLicenseKeyData = { licenseKey?: string; }; export type RenewLicenseKeyResponse = string; export type CreateCustomerPortalSessionData = { licenseKey?: string; }; export type CreateCustomerPortalSessionResponse = string; export type TestMetadataData = { /** * test metadata */ requestBody: string; }; export type TestMetadataResponse = string; export type GetSamlSpMetadataResponse = string; export type GetSamlConfigResponse = SamlConfig; export type SaveSamlConfigData = { /** * SAML configuration */ requestBody: SamlConfigRequest; }; export type SaveSamlConfigResponse = SamlConfig; export type DeleteSamlConfigResponse = string; export type InitiateSamlLoginData = { /** * Post-login redirect target, constrained to a same-origin relative path. Held server-side against the request ID; never sent to the IdP. */ relayState?: string; }; export type InitiateSamlLoginGetData = { relayState?: string; }; export type UpdateSamlMetadataResponse = SamlConfig; export type ListGlobalSettingsResponse = Array; export type GetRuntimeUsageResponse = Array; export type GetRuntimeUsageLocationsData = { language: ScriptLang; }; export type GetRuntimeUsageLocationsResponse = 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 TestAzureKvBackendData = { /** * Azure Key Vault settings to test */ requestBody: AzureKeyVaultSettings; }; export type TestAzureKvBackendResponse = string; export type MigrateSecretsToAzureKvData = { /** * Azure Key Vault settings for migration target */ requestBody: AzureKeyVaultSettings; }; export type MigrateSecretsToAzureKvResponse = SecretMigrationReport; export type MigrateSecretsFromAzureKvData = { /** * Azure Key Vault settings for migration source */ requestBody: AzureKeyVaultSettings; }; export type MigrateSecretsFromAzureKvResponse = SecretMigrationReport; export type TestAwsSmBackendData = { requestBody: AwsSecretsManagerSettings; }; export type TestAwsSmBackendResponse = string; export type MigrateSecretsToAwsSmData = { requestBody: AwsSecretsManagerSettings; }; export type MigrateSecretsToAwsSmResponse = SecretMigrationReport; export type MigrateSecretsFromAwsSmData = { requestBody: AwsSecretsManagerSettings; }; export type MigrateSecretsFromAwsSmResponse = SecretMigrationReport; export type GetSecondaryStorageNamesData = { /** * If true, include "_default_" in the list if primary workspace storage is set */ includeDefault?: boolean; workspace: string; }; export type GetSecondaryStorageNamesResponse = Array<(string)>; export type WorkspaceGetCriticalAlertsData = { acknowledged?: boolean | null; page?: number; pageSize?: number; workspace: string; }; export type WorkspaceGetCriticalAlertsResponse = { alerts?: Array; /** * Total number of rows matching the query. */ total_rows?: number; /** * Total number of pages based on the page size. */ total_pages?: number; }; export type WorkspaceAcknowledgeCriticalAlertData = { /** * The ID of the critical alert to acknowledge */ id: number; workspace: string; }; export type WorkspaceAcknowledgeCriticalAlertResponse = string; export type WorkspaceAcknowledgeAllCriticalAlertsData = { workspace: string; }; export type WorkspaceAcknowledgeAllCriticalAlertsResponse = string; export type WorkspaceMuteCriticalAlertsUiData = { /** * Boolean flag to mute critical alerts. */ requestBody: { /** * Whether critical alerts should be muted. */ mute_critical_alerts?: boolean; }; workspace: string; }; export type WorkspaceMuteCriticalAlertsUiResponse = string; export type SetPublicAppRateLimitData = { /** * Public app rate limit configuration */ requestBody: { /** * Rate limit for public app executions per minute per server. NULL or 0 to disable. */ public_app_execution_limit_per_minute?: number; }; workspace: string; }; export type SetPublicAppRateLimitResponse = string; export type 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; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * exact path match filter */ path?: string; /** * filter variables by path prefix */ pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * pattern match filter for non-secret variable values (case-insensitive) */ value?: string; workspace: string; }; export type ListVariableResponse = Array; export type ListContextualVariablesData = { workspace: string; }; export type ListContextualVariablesResponse = Array; export type ConnectSlackInitiateData = { workspace: string; }; export type ConnectSlackCallbackData = { /** * code endpoint */ requestBody: { code: string; state: string; }; workspace: string; }; export type ConnectSlackCallbackResponse = string; export type ConnectSlackCallbackInstanceData = { /** * code endpoint */ requestBody: { code: string; state: string; }; }; export type ConnectSlackCallbackInstanceResponse = string; export type ConnectSlackInstanceData = { /** * connect slack at the instance level with a pre-minted bot token */ requestBody: { /** * xoxb-... bot token obtained at api.slack.com/apps */ bot_token: string; team_id: string; team_name: string; }; }; export type ConnectSlackInstanceResponse = unknown; export type ConnectCallbackData = { clientName: string; /** * code endpoint */ requestBody: { code: string; state: string; }; }; export type ConnectCallbackResponse = TokenResponse; export type CreateAccountData = { /** * code endpoint */ requestBody: { /** * OAuth refresh token. For authorization_code flow, this contains the actual refresh token. For client_credentials flow, this must be set to an empty string. */ refresh_token: string; expires_in: number; client: string; grant_type?: string; /** * OAuth client ID for resource-level credentials (client_credentials flow only) */ cc_client_id?: string; /** * OAuth client secret for resource-level credentials (client_credentials flow only) */ cc_client_secret?: string; /** * 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; /** * OAuth scopes to use for token refresh. Overrides instance-level scopes. */ scopes?: Array<(string)>; }; workspace: string; }; export type CreateAccountResponse = string; export type ConnectClientCredentialsData = { /** * OAuth client name */ client: string; /** * client credentials flow parameters */ requestBody: { scopes?: Array<(string)>; /** * OAuth client ID 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; /** * provider type to auto-redirect to on login (oauth key or "saml") */ auto_login?: 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; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * exact path match filter */ path?: string; /** * filter resources by path prefix */ pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * resource_types to list from, separated by ',', */ resourceType?: string; /** * resource_types to not list from, separated by ',', */ resourceTypeExclude?: string; /** * JSONB subset match filter using base64 encoded JSON */ value?: string; workspace: string; }; export type ListResourceResponse = Array; export type ListSearchResourceData = { workspace: string; }; export type ListSearchResourceResponse = Array<{ path: string; 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 CreateConnectionData = { /** * new connection */ requestBody: CreateResource; /** * update the connection if it already exists (default false) */ updateIfExists?: boolean; workspace: string; }; export type CreateConnectionResponse = string; export type DeleteConnectionData = { path: string; workspace: string; }; export type DeleteConnectionResponse = string; export type DeleteConnectionsBulkData = { /** * paths to delete */ requestBody: { paths: Array<(string)>; }; workspace: string; }; export type DeleteConnectionsBulkResponse = Array<(string)>; export type UpdateConnectionData = { path: string; /** * updated connection */ requestBody: EditResource; workspace: string; }; export type UpdateConnectionResponse = string; export type UpdateConnectionValueData = { path: string; /** * updated connection */ requestBody: { value?: unknown; }; workspace: string; }; export type UpdateConnectionValueResponse = string; export type GetConnectionData = { path: string; workspace: string; }; export type GetConnectionResponse = Resource; export type GetConnectionValueInterpolatedData = { /** * allow getting a cached value for improved performance */ allowCache?: boolean; /** * job id */ jobId?: string; path: string; workspace: string; }; export type GetConnectionValueInterpolatedResponse = unknown; export type GetConnectionValueData = { path: string; workspace: string; }; export type GetConnectionValueResponse = unknown; export type GetGitCommitHashForConnectionData = { gitSshIdentity?: string; path: string; workspace: string; }; export type GetGitCommitHashForConnectionResponse = { /** * Latest commit hash from git ls-remote */ commit_hash: string; }; export type ExistsConnectionData = { path: string; workspace: string; }; export type ExistsConnectionResponse = boolean; export type ListConnectionData = { /** * broad search across multiple fields (case-insensitive substring match) */ broadFilter?: string; /** * connection_types to list from, separated by ',', */ connectionType?: string; /** * connection_types to not list from, separated by ',', */ connectionTypeExclude?: string; /** * pattern match filter for description field (case-insensitive) */ description?: string; /** * Filter by label */ label?: string; /** * which page to return (start at 1, default 1) */ page?: number; /** * exact path match filter */ path?: string; /** * filter connections by path prefix */ pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * JSONB subset match filter using base64 encoded JSON */ value?: string; workspace: string; }; export type ListConnectionResponse = Array; export type ListSearchConnectionData = { workspace: string; }; export type ListSearchConnectionResponse = Array<{ path: string; value: unknown; }>; export type GetMcpToolsForConnectionData = { path: string; workspace: string; }; export type GetMcpToolsForConnectionResponse = Array<{ name: string; description?: string; parameters: { [key: string]: unknown; }; }>; export type ListConnectionNamesData = { name: string; workspace: string; }; export type ListConnectionNamesResponse = Array<{ name: string; path: string; }>; export type CreateConnectionTypeData = { /** * new connection_type */ requestBody: ResourceType; workspace: string; }; export type CreateConnectionTypeResponse = string; export type FileConnectionTypeToFileExtMapData = { workspace: string; }; export type FileConnectionTypeToFileExtMapResponse = { [key: string]: { format_extension?: string | null; is_fileset?: boolean; }; }; export type DeleteConnectionTypeData = { path: string; workspace: string; }; export type DeleteConnectionTypeResponse = string; export type UpdateConnectionTypeData = { path: string; /** * updated connection_type */ requestBody: EditResourceType; workspace: string; }; export type UpdateConnectionTypeResponse = string; export type GetConnectionTypeData = { path: string; workspace: string; }; export type GetConnectionTypeResponse = ResourceType; export type ExistsConnectionTypeData = { path: string; workspace: string; }; export type ExistsConnectionTypeResponse = boolean; export type ListConnectionTypeData = { workspace: string; }; export type ListConnectionTypeResponse = Array; export type ListConnectionTypeNamesData = { workspace: string; }; export type ListConnectionTypeNamesResponse = Array<(string)>; 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; /** * Filter by label */ label?: string; /** * order by desc order (default true) */ orderDesc?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * mask to filter exact matching path */ pathExact?: string; /** * mask to filter matching starting path */ pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * (default false) * show only the archived files. * when multiple archived hash share the same path, only the ones with the latest create_at * are displayed. * */ showArchived?: boolean; /** * (default false) * show only the starred items * */ starredOnly?: boolean; /** * (default false) * include deployment message * */ withDeploymentMsg?: boolean; /** * (default false) * If true, the description field will be omitted from the response. * */ withoutDescription?: boolean; workspace: string; }; export type ListFlowsResponse = Array<(Flow & { 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; /** * Filter by label */ label?: string; /** * order by desc order (default true) */ orderDesc?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * mask to filter exact matching path */ pathExact?: string; /** * mask to filter matching starting path */ pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * (default false) * show only the starred items * */ starredOnly?: boolean; /** * (default false) * include deployment message * */ withDeploymentMsg?: boolean; workspace: string; }; export type ListAppsResponse = Array; export type CreateAppData = { /** * new app */ requestBody: { path: string; value: unknown; summary: string; policy: Policy; 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; labels?: Array<(string)>; }; 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; labels?: Array<(string)>; }; 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; labels?: Array<(string)>; }; 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; labels?: Array<(string)>; }; 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; tag?: string; }; id?: number; force_viewer_static_fields?: { [key: string]: unknown; }; force_viewer_one_of_fields?: { [key: string]: unknown; }; force_viewer_allow_user_resources?: Array<(string)>; force_viewer_sensitive_inputs?: Array<(string)>; force_viewer_delete_after_secs?: number; /** * Runnable query parameters */ run_query_params?: { [key: string]: unknown; }; }; 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 by label */ label?: string; /** * Filter to only include scripts written in the given languages. * Accepts multiple values as a comma-separated list. * */ languages?: string; /** * mask to filter scripts whom last parent in the chain has exact hash. * Beware that each script stores only a limited number of parents. Hence * the last parent hash for a script is not necessarily its top-most parent. * To find the top-most parent you will have to jump from last to last hash * until finding the parent * */ lastParentHash?: string; /** * order by desc order (default true) */ orderDesc?: boolean; /** * which page to return (start at 1, default 1) */ page?: number; /** * is the hash present in the array of stored parent hashes for this script. * The same warning applies than for last_parent_hash. A script only store a * limited number of direct parent * */ parentHash?: string; /** * mask to filter exact matching path */ pathExact?: string; /** * mask to filter matching starting path */ pathStart?: string; /** * number of items to return for a given page (default 30, max 100) */ perPage?: number; /** * (default false) * show only the archived files. * when multiple archived hash share the same path, only the ones with the latest create_at * are * ed. * */ showArchived?: boolean; /** * (default false) * show only the starred items * */ starredOnly?: boolean; /** * (default false) * include deployment message * */ withDeploymentMsg?: boolean; /** * (default false) * If true, the description field will be omitted from the response. * */ withoutDescription?: boolean; workspace: string; }; export type ListScriptsResponse = Array