import { APIResource } from "../../resource.js"; import * as Core from "../../core.js"; import * as FlowRunsAPI from "./flow-runs.js"; import * as Shared from "../shared.js"; export declare class FlowRuns extends APIResource { /** * Create a flow run from a deployment. * * Any parameters not provided will be inferred from the deployment's parameters. * If tags are not provided, the deployment's tags will be used. * * If no state is provided, the flow run will be created in a SCHEDULED state. */ createFlowRun(id: string, params: FlowRunCreateFlowRunParams, options?: Core.RequestOptions): Core.APIPromise; } export interface FlowRunCreateFlowRunParams { /** * Body param: */ context?: unknown; /** * Body param: The empirical policy for the flow run. */ empirical_policy?: FlowRunCreateFlowRunParams.EmpiricalPolicy; /** * Body param: Whether or not to enforce the parameter schema on this run. */ enforce_parameter_schema?: boolean | null; /** * Body param: An optional idempotency key. If a flow run with the same idempotency * key has already been created, the existing flow run will be returned. */ idempotency_key?: string | null; /** * Body param: */ infrastructure_document_id?: string | null; /** * Body param: */ job_variables?: unknown | null; /** * Body param: The name of the flow run. Defaults to a random slug if not * specified. */ name?: string; /** * Body param: */ parameters?: unknown; /** * Body param: */ parent_task_run_id?: string | null; /** * Body param: Data used by the Prefect REST API to create a new state. */ state?: FlowRunCreateFlowRunParams.State | null; /** * Body param: A list of tags for the flow run. */ tags?: Array; /** * Body param: */ work_queue_name?: string | null; /** * Header param: */ 'x-prefect-api-version'?: string; } export declare namespace FlowRunCreateFlowRunParams { /** * The empirical policy for the flow run. */ interface EmpiricalPolicy { /** * @deprecated: The maximum number of retries. Field is not used. Please use * `retries` instead. */ max_retries?: number; /** * Tracks pauses this run has observed. */ pause_keys?: Array | null; /** * Indicates if this run is resuming from a pause. */ resuming?: boolean | null; /** * The number of retries. */ retries?: number | null; /** * The delay time between retries, in seconds. */ retry_delay?: number | null; /** * @deprecated: The delay between retries. Field is not used. Please use * `retry_delay` instead. */ retry_delay_seconds?: number; } /** * Data used by the Prefect REST API to create a new state. */ interface State { /** * The type of the state to create */ type: 'SCHEDULED' | 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'CRASHED' | 'PAUSED' | 'CANCELLING'; /** * The data of the state to create */ data?: unknown | null; /** * The message of the state to create */ message?: string | null; /** * The name of the state to create */ name?: string | null; /** * The details of the state to create */ state_details?: State.StateDetails; } namespace State { /** * The details of the state to create */ interface StateDetails { cache_expiration?: string | null; cache_key?: string | null; child_flow_run_id?: string | null; deferred?: boolean | null; flow_run_id?: string | null; pause_key?: string | null; pause_reschedule?: boolean; pause_timeout?: string | null; refresh_cache?: boolean | null; retriable?: boolean | null; run_input_keyset?: Record | null; scheduled_time?: string | null; task_parameters_id?: string | null; task_run_id?: string | null; transition_id?: string | null; untrackable_result?: boolean; } } } export declare namespace FlowRuns { export import FlowRunCreateFlowRunParams = FlowRunsAPI.FlowRunCreateFlowRunParams; } //# sourceMappingURL=flow-runs.d.ts.map