// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../resource'; import { isRequestOptions } from '../../core'; import * as Core from '../../core'; import * as ArtifactsAPI from './artifacts'; import * as LatestAPI from './latest'; export class Artifacts extends APIResource { latest: LatestAPI.Latest = new LatestAPI.Latest(this._client); /** * Create Artifact */ create(params: ArtifactCreateParams, options?: Core.RequestOptions): Core.APIPromise { const { 'x-prefect-api-version': xPrefectAPIVersion, ...body } = params; return this._client.post('/api/artifacts/', { body, ...options, headers: { ...(xPrefectAPIVersion != null ? { 'x-prefect-api-version': xPrefectAPIVersion } : undefined), ...options?.headers, }, }); } /** * Retrieve an artifact from the database. */ retrieve( id: string, params?: ArtifactRetrieveParams, options?: Core.RequestOptions, ): Core.APIPromise; retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise; retrieve( id: string, params: ArtifactRetrieveParams | Core.RequestOptions = {}, options?: Core.RequestOptions, ): Core.APIPromise { if (isRequestOptions(params)) { return this.retrieve(id, {}, params); } const { 'x-prefect-api-version': xPrefectAPIVersion } = params; return this._client.get(`/api/artifacts/${id}`, { ...options, headers: { ...(xPrefectAPIVersion != null ? { 'x-prefect-api-version': xPrefectAPIVersion } : undefined), ...options?.headers, }, }); } /** * Update an artifact in the database. */ update(id: string, params: ArtifactUpdateParams, options?: Core.RequestOptions): Core.APIPromise { const { 'x-prefect-api-version': xPrefectAPIVersion, ...body } = params; return this._client.patch(`/api/artifacts/${id}`, { body, ...options, headers: { Accept: '*/*', ...(xPrefectAPIVersion != null ? { 'x-prefect-api-version': xPrefectAPIVersion } : undefined), ...options?.headers, }, }); } /** * Delete an artifact from the database. */ delete(id: string, params?: ArtifactDeleteParams, options?: Core.RequestOptions): Core.APIPromise; delete(id: string, options?: Core.RequestOptions): Core.APIPromise; delete( id: string, params: ArtifactDeleteParams | Core.RequestOptions = {}, options?: Core.RequestOptions, ): Core.APIPromise { if (isRequestOptions(params)) { return this.delete(id, {}, params); } const { 'x-prefect-api-version': xPrefectAPIVersion } = params; return this._client.delete(`/api/artifacts/${id}`, { ...options, headers: { Accept: '*/*', ...(xPrefectAPIVersion != null ? { 'x-prefect-api-version': xPrefectAPIVersion } : undefined), ...options?.headers, }, }); } /** * Count artifacts from the database. */ count(params?: ArtifactCountParams, options?: Core.RequestOptions): Core.APIPromise; count(options?: Core.RequestOptions): Core.APIPromise; count( params: ArtifactCountParams | Core.RequestOptions = {}, options?: Core.RequestOptions, ): Core.APIPromise { if (isRequestOptions(params)) { return this.count({}, params); } const { 'x-prefect-api-version': xPrefectAPIVersion, ...body } = params; return this._client.post('/api/artifacts/count', { body, ...options, headers: { ...(xPrefectAPIVersion != null ? { 'x-prefect-api-version': xPrefectAPIVersion } : undefined), ...options?.headers, }, }); } /** * Retrieve artifacts from the database. */ filter( params?: ArtifactFilterParams, options?: Core.RequestOptions, ): Core.APIPromise; filter(options?: Core.RequestOptions): Core.APIPromise; filter( params: ArtifactFilterParams | Core.RequestOptions = {}, options?: Core.RequestOptions, ): Core.APIPromise { if (isRequestOptions(params)) { return this.filter({}, params); } const { 'x-prefect-api-version': xPrefectAPIVersion, ...body } = params; return this._client.post('/api/artifacts/filter', { body, ...options, headers: { ...(xPrefectAPIVersion != null ? { 'x-prefect-api-version': xPrefectAPIVersion } : undefined), ...options?.headers, }, }); } } export interface Artifact { id?: string; created?: string | null; /** * Data associated with the artifact, e.g. a result.; structure depends on the * artifact type. */ data?: unknown | unknown | null; /** * A markdown-enabled description of the artifact. */ description?: string | null; /** * The flow run associated with the artifact. */ flow_run_id?: string | null; /** * An optional unique reference key for this artifact. */ key?: string | null; /** * User-defined artifact metadata. Content must be string key and value pairs. */ metadata_?: Record | null; /** * The task run associated with the artifact. */ task_run_id?: string | null; /** * An identifier that describes the shape of the data field. e.g. 'result', * 'table', 'markdown' */ type?: string | null; updated?: string | null; } export type ArtifactCountResponse = number; export type ArtifactFilterResponse = Array; export interface ArtifactCreateParams { /** * Body param: Data associated with the artifact, e.g. a result.; structure depends * on the artifact type. */ data?: unknown | unknown | null; /** * Body param: A markdown-enabled description of the artifact. */ description?: string | null; /** * Body param: The flow run associated with the artifact. */ flow_run_id?: string | null; /** * Body param: An optional unique reference key for this artifact. */ key?: string | null; /** * Body param: User-defined artifact metadata. Content must be string key and value * pairs. */ metadata_?: Record | null; /** * Body param: The task run associated with the artifact. */ task_run_id?: string | null; /** * Body param: An identifier that describes the shape of the data field. e.g. * 'result', 'table', 'markdown' */ type?: string | null; /** * Header param: */ 'x-prefect-api-version'?: string; } export interface ArtifactRetrieveParams { 'x-prefect-api-version'?: string; } export interface ArtifactUpdateParams { /** * Body param: */ data?: unknown | unknown | null; /** * Body param: */ description?: string | null; /** * Body param: */ metadata_?: Record | null; /** * Header param: */ 'x-prefect-api-version'?: string; } export interface ArtifactDeleteParams { 'x-prefect-api-version'?: string; } export interface ArtifactCountParams { /** * Body param: Filter artifacts. Only artifacts matching all criteria will be * returned */ artifacts?: ArtifactCountParams.Artifacts; /** * Body param: Filter for deployments. Only deployments matching all criteria will * be returned. */ deployments?: ArtifactCountParams.Deployments; /** * Body param: Filter flow runs. Only flow runs matching all criteria will be * returned */ flow_runs?: ArtifactCountParams.FlowRuns; /** * Body param: Filter for flows. Only flows matching all criteria will be returned. */ flows?: ArtifactCountParams.Flows; /** * Body param: Filter task runs. Only task runs matching all criteria will be * returned */ task_runs?: ArtifactCountParams.TaskRuns; /** * Header param: */ 'x-prefect-api-version'?: string; } export namespace ArtifactCountParams { /** * Filter artifacts. Only artifacts matching all criteria will be returned */ export interface Artifacts { /** * Filter by `Artifact.id`. */ id?: Artifacts.ID | null; /** * Filter by `Artifact.flow_run_id`. */ flow_run_id?: Artifacts.FlowRunID | null; /** * Filter by `Artifact.key`. */ key?: Artifacts.Key | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; /** * Filter by `Artifact.task_run_id`. */ task_run_id?: Artifacts.TaskRunID | null; /** * Filter by `Artifact.type`. */ type?: Artifacts.Type | null; } export namespace Artifacts { /** * Filter by `Artifact.id`. */ export interface ID { /** * A list of artifact ids to include */ any_?: Array | null; } /** * Filter by `Artifact.flow_run_id`. */ export interface FlowRunID { /** * A list of flow run IDs to include */ any_?: Array | null; } /** * Filter by `Artifact.key`. */ export interface Key { /** * A list of artifact keys to include */ any_?: Array | null; /** * If `true`, only include artifacts with a non-null key. If `false`, only include * artifacts with a null key. */ exists_?: boolean | null; /** * A string to match artifact keys against. This can include SQL wildcard * characters like `%` and `_`. */ like_?: string | null; } /** * Filter by `Artifact.task_run_id`. */ export interface TaskRunID { /** * A list of task run IDs to include */ any_?: Array | null; } /** * Filter by `Artifact.type`. */ export interface Type { /** * A list of artifact types to include */ any_?: Array | null; /** * A list of artifact types to exclude */ not_any_?: Array | null; } } /** * Filter for deployments. Only deployments matching all criteria will be returned. */ export interface Deployments { /** * Filter by `Deployment.id`. */ id?: Deployments.ID | null; /** * Filter by `Deployment.concurrency_limit`. */ concurrency_limit?: Deployments.ConcurrencyLimit | null; /** * Filter by `Deployment.name` or `Flow.name` with a single input string for ilike * filtering. */ flow_or_deployment_name?: Deployments.FlowOrDeploymentName | null; /** * Filter by `Deployment.name`. */ name?: Deployments.Name | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; /** * Filter by `Deployment.paused`. */ paused?: Deployments.Paused | null; /** * Filter by `Deployment.tags`. */ tags?: Deployments.Tags | null; /** * Filter by `Deployment.work_queue_name`. */ work_queue_name?: Deployments.WorkQueueName | null; } export namespace Deployments { /** * Filter by `Deployment.id`. */ export interface ID { /** * A list of deployment ids to include */ any_?: Array | null; } /** * Filter by `Deployment.concurrency_limit`. */ export interface ConcurrencyLimit { /** * Only include deployments with a concurrency limit greater than or equal to this * value */ ge_?: number | null; /** * If true, only include deployments without a concurrency limit */ is_null_?: boolean | null; /** * Only include deployments with a concurrency limit less than or equal to this * value */ le_?: number | null; } /** * Filter by `Deployment.name` or `Flow.name` with a single input string for ilike * filtering. */ export interface FlowOrDeploymentName { /** * A case-insensitive partial match on deployment or flow names. For example, * passing 'example' might match deployments or flows with 'example' in their * names. */ like_?: string | null; } /** * Filter by `Deployment.name`. */ export interface Name { /** * A list of deployment names to include */ any_?: Array | null; /** * A case-insensitive partial match. For example, passing 'marvin' will match * 'marvin', 'sad-Marvin', and 'marvin-robot'. */ like_?: string | null; } /** * Filter by `Deployment.paused`. */ export interface Paused { /** * Only returns where deployment is/is not paused */ eq_?: boolean | null; } /** * Filter by `Deployment.tags`. */ export interface Tags { /** * A list of tags. Deployments will be returned only if their tags are a superset * of the list */ all_?: Array | null; /** * If true, only include deployments without tags */ is_null_?: boolean | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; } /** * Filter by `Deployment.work_queue_name`. */ export interface WorkQueueName { /** * A list of work queue names to include */ any_?: Array | null; } } /** * Filter flow runs. Only flow runs matching all criteria will be returned */ export interface FlowRuns { /** * Filter by `FlowRun.id`. */ id?: FlowRuns.ID | null; /** * Filter by `FlowRun.deployment_id`. */ deployment_id?: FlowRuns.DeploymentID | null; /** * Filter by `FlowRun.expected_start_time`. */ expected_start_time?: FlowRuns.ExpectedStartTime | null; /** * Filter by `FlowRun.flow_version`. */ flow_version?: FlowRuns.FlowVersion | null; /** * Filter by FlowRun.idempotency_key. */ idempotency_key?: FlowRuns.IdempotencyKey | null; /** * Filter by `FlowRun.name`. */ name?: FlowRuns.Name | null; /** * Filter by `FlowRun.next_scheduled_start_time`. */ next_scheduled_start_time?: FlowRuns.NextScheduledStartTime | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; /** * Filter for subflows of a given flow run */ parent_flow_run_id?: FlowRuns.ParentFlowRunID | null; /** * Filter by `FlowRun.parent_task_run_id`. */ parent_task_run_id?: FlowRuns.ParentTaskRunID | null; /** * Filter by `FlowRun.start_time`. */ start_time?: FlowRuns.StartTime | null; /** * Filter by `FlowRun.state_type` and `FlowRun.state_name`. */ state?: FlowRuns.State | null; /** * Filter by `FlowRun.tags`. */ tags?: FlowRuns.Tags | null; /** * Filter by `FlowRun.work_queue_name`. */ work_queue_name?: FlowRuns.WorkQueueName | null; } export namespace FlowRuns { /** * Filter by `FlowRun.id`. */ export interface ID { /** * A list of flow run ids to include */ any_?: Array | null; /** * A list of flow run ids to exclude */ not_any_?: Array | null; } /** * Filter by `FlowRun.deployment_id`. */ export interface DeploymentID { /** * A list of flow run deployment ids to include */ any_?: Array | null; /** * If true, only include flow runs without deployment ids */ is_null_?: boolean | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; } /** * Filter by `FlowRun.expected_start_time`. */ export interface ExpectedStartTime { /** * Only include flow runs scheduled to start at or after this time */ after_?: string | null; /** * Only include flow runs scheduled to start at or before this time */ before_?: string | null; } /** * Filter by `FlowRun.flow_version`. */ export interface FlowVersion { /** * A list of flow run flow_versions to include */ any_?: Array | null; } /** * Filter by FlowRun.idempotency_key. */ export interface IdempotencyKey { /** * A list of flow run idempotency keys to include */ any_?: Array | null; /** * A list of flow run idempotency keys to exclude */ not_any_?: Array | null; } /** * Filter by `FlowRun.name`. */ export interface Name { /** * A list of flow run names to include */ any_?: Array | null; /** * A case-insensitive partial match. For example, passing 'marvin' will match * 'marvin', 'sad-Marvin', and 'marvin-robot'. */ like_?: string | null; } /** * Filter by `FlowRun.next_scheduled_start_time`. */ export interface NextScheduledStartTime { /** * Only include flow runs with a next_scheduled_start_time at or after this time */ after_?: string | null; /** * Only include flow runs with a next_scheduled_start_time or before this time */ before_?: string | null; } /** * Filter for subflows of a given flow run */ export interface ParentFlowRunID { /** * A list of parent flow run ids to include */ any_?: Array | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; } /** * Filter by `FlowRun.parent_task_run_id`. */ export interface ParentTaskRunID { /** * A list of flow run parent_task_run_ids to include */ any_?: Array | null; /** * If true, only include flow runs without parent_task_run_id */ is_null_?: boolean | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; } /** * Filter by `FlowRun.start_time`. */ export interface StartTime { /** * Only include flow runs starting at or after this time */ after_?: string | null; /** * Only include flow runs starting at or before this time */ before_?: string | null; /** * If true, only return flow runs without a start time */ is_null_?: boolean | null; } /** * Filter by `FlowRun.state_type` and `FlowRun.state_name`. */ export interface State { /** * Filter by `FlowRun.state_name`. */ name?: State.Name | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; /** * Filter by `FlowRun.state_type`. */ type?: State.Type | null; } export namespace State { /** * Filter by `FlowRun.state_name`. */ export interface Name { /** * A list of flow run state names to include */ any_?: Array | null; /** * A list of flow run state names to exclude */ not_any_?: Array | null; } /** * Filter by `FlowRun.state_type`. */ export interface Type { /** * A list of flow run state types to include */ any_?: Array< | 'SCHEDULED' | 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'CRASHED' | 'PAUSED' | 'CANCELLING' > | null; /** * A list of flow run state types to exclude */ not_any_?: Array< | 'SCHEDULED' | 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'CRASHED' | 'PAUSED' | 'CANCELLING' > | null; } } /** * Filter by `FlowRun.tags`. */ export interface Tags { /** * A list of tags. Flow runs will be returned only if their tags are a superset of * the list */ all_?: Array | null; /** * If true, only include flow runs without tags */ is_null_?: boolean | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; } /** * Filter by `FlowRun.work_queue_name`. */ export interface WorkQueueName { /** * A list of work queue names to include */ any_?: Array | null; /** * If true, only include flow runs without work queue names */ is_null_?: boolean | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; } } /** * Filter for flows. Only flows matching all criteria will be returned. */ export interface Flows { /** * Filter by `Flow.id`. */ id?: Flows.ID | null; /** * Filter by flows by deployment */ deployment?: Flows.Deployment | null; /** * Filter by `Flow.name`. */ name?: Flows.Name | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; /** * Filter by `Flow.tags`. */ tags?: Flows.Tags | null; } export namespace Flows { /** * Filter by `Flow.id`. */ export interface ID { /** * A list of flow ids to include */ any_?: Array | null; } /** * Filter by flows by deployment */ export interface Deployment { /** * If true, only include flows without deployments */ is_null_?: boolean | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; } /** * Filter by `Flow.name`. */ export interface Name { /** * A list of flow names to include */ any_?: Array | null; /** * A case-insensitive partial match. For example, passing 'marvin' will match * 'marvin', 'sad-Marvin', and 'marvin-robot'. */ like_?: string | null; } /** * Filter by `Flow.tags`. */ export interface Tags { /** * A list of tags. Flows will be returned only if their tags are a superset of the * list */ all_?: Array | null; /** * If true, only include flows without tags */ is_null_?: boolean | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; } } /** * Filter task runs. Only task runs matching all criteria will be returned */ export interface TaskRuns { /** * Filter by `TaskRun.id`. */ id?: TaskRuns.ID | null; /** * Filter by `TaskRun.expected_start_time`. */ expected_start_time?: TaskRuns.ExpectedStartTime | null; /** * Filter by `TaskRun.flow_run_id`. */ flow_run_id?: TaskRuns.FlowRunID | null; /** * Filter by `TaskRun.name`. */ name?: TaskRuns.Name | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; /** * Filter by `TaskRun.start_time`. */ start_time?: TaskRuns.StartTime | null; /** * Filter by `TaskRun.type` and `TaskRun.name`. */ state?: TaskRuns.State | null; /** * Filter by `TaskRun.subflow_run`. */ subflow_runs?: TaskRuns.SubflowRuns | null; /** * Filter by `TaskRun.tags`. */ tags?: TaskRuns.Tags | null; } export namespace TaskRuns { /** * Filter by `TaskRun.id`. */ export interface ID { /** * A list of task run ids to include */ any_?: Array | null; } /** * Filter by `TaskRun.expected_start_time`. */ export interface ExpectedStartTime { /** * Only include task runs expected to start at or after this time */ after_?: string | null; /** * Only include task runs expected to start at or before this time */ before_?: string | null; } /** * Filter by `TaskRun.flow_run_id`. */ export interface FlowRunID { /** * A list of task run flow run ids to include */ any_?: Array | null; /** * Filter for task runs with None as their flow run id */ is_null_?: boolean | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; } /** * Filter by `TaskRun.name`. */ export interface Name { /** * A list of task run names to include */ any_?: Array | null; /** * A case-insensitive partial match. For example, passing 'marvin' will match * 'marvin', 'sad-Marvin', and 'marvin-robot'. */ like_?: string | null; } /** * Filter by `TaskRun.start_time`. */ export interface StartTime { /** * Only include task runs starting at or after this time */ after_?: string | null; /** * Only include task runs starting at or before this time */ before_?: string | null; /** * If true, only return task runs without a start time */ is_null_?: boolean | null; } /** * Filter by `TaskRun.type` and `TaskRun.name`. */ export interface State { /** * Filter by `TaskRun.state_name`. */ name?: State.Name | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; /** * Filter by `TaskRun.state_type`. */ type?: State.Type | null; } export namespace State { /** * Filter by `TaskRun.state_name`. */ export interface Name { /** * A list of task run state names to include */ any_?: Array | null; } /** * Filter by `TaskRun.state_type`. */ export interface Type { /** * A list of task run state types to include */ any_?: Array< | 'SCHEDULED' | 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'CRASHED' | 'PAUSED' | 'CANCELLING' > | null; } } /** * Filter by `TaskRun.subflow_run`. */ export interface SubflowRuns { /** * If true, only include task runs that are subflow run parents; if false, exclude * parent task runs */ exists_?: boolean | null; } /** * Filter by `TaskRun.tags`. */ export interface Tags { /** * A list of tags. Task runs will be returned only if their tags are a superset of * the list */ all_?: Array | null; /** * If true, only include task runs without tags */ is_null_?: boolean | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; } } } export interface ArtifactFilterParams { /** * Body param: Filter artifacts. Only artifacts matching all criteria will be * returned */ artifacts?: ArtifactFilterParams.Artifacts; /** * Body param: Filter for deployments. Only deployments matching all criteria will * be returned. */ deployments?: ArtifactFilterParams.Deployments; /** * Body param: Filter flow runs. Only flow runs matching all criteria will be * returned */ flow_runs?: ArtifactFilterParams.FlowRuns; /** * Body param: Filter for flows. Only flows matching all criteria will be returned. */ flows?: ArtifactFilterParams.Flows; /** * Body param: Defaults to PREFECT_API_DEFAULT_LIMIT if not provided. */ limit?: number; /** * Body param: */ offset?: number; /** * Body param: Defines artifact sorting options. */ sort?: 'CREATED_DESC' | 'UPDATED_DESC' | 'ID_DESC' | 'KEY_DESC' | 'KEY_ASC'; /** * Body param: Filter task runs. Only task runs matching all criteria will be * returned */ task_runs?: ArtifactFilterParams.TaskRuns; /** * Header param: */ 'x-prefect-api-version'?: string; } export namespace ArtifactFilterParams { /** * Filter artifacts. Only artifacts matching all criteria will be returned */ export interface Artifacts { /** * Filter by `Artifact.id`. */ id?: Artifacts.ID | null; /** * Filter by `Artifact.flow_run_id`. */ flow_run_id?: Artifacts.FlowRunID | null; /** * Filter by `Artifact.key`. */ key?: Artifacts.Key | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; /** * Filter by `Artifact.task_run_id`. */ task_run_id?: Artifacts.TaskRunID | null; /** * Filter by `Artifact.type`. */ type?: Artifacts.Type | null; } export namespace Artifacts { /** * Filter by `Artifact.id`. */ export interface ID { /** * A list of artifact ids to include */ any_?: Array | null; } /** * Filter by `Artifact.flow_run_id`. */ export interface FlowRunID { /** * A list of flow run IDs to include */ any_?: Array | null; } /** * Filter by `Artifact.key`. */ export interface Key { /** * A list of artifact keys to include */ any_?: Array | null; /** * If `true`, only include artifacts with a non-null key. If `false`, only include * artifacts with a null key. */ exists_?: boolean | null; /** * A string to match artifact keys against. This can include SQL wildcard * characters like `%` and `_`. */ like_?: string | null; } /** * Filter by `Artifact.task_run_id`. */ export interface TaskRunID { /** * A list of task run IDs to include */ any_?: Array | null; } /** * Filter by `Artifact.type`. */ export interface Type { /** * A list of artifact types to include */ any_?: Array | null; /** * A list of artifact types to exclude */ not_any_?: Array | null; } } /** * Filter for deployments. Only deployments matching all criteria will be returned. */ export interface Deployments { /** * Filter by `Deployment.id`. */ id?: Deployments.ID | null; /** * Filter by `Deployment.concurrency_limit`. */ concurrency_limit?: Deployments.ConcurrencyLimit | null; /** * Filter by `Deployment.name` or `Flow.name` with a single input string for ilike * filtering. */ flow_or_deployment_name?: Deployments.FlowOrDeploymentName | null; /** * Filter by `Deployment.name`. */ name?: Deployments.Name | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; /** * Filter by `Deployment.paused`. */ paused?: Deployments.Paused | null; /** * Filter by `Deployment.tags`. */ tags?: Deployments.Tags | null; /** * Filter by `Deployment.work_queue_name`. */ work_queue_name?: Deployments.WorkQueueName | null; } export namespace Deployments { /** * Filter by `Deployment.id`. */ export interface ID { /** * A list of deployment ids to include */ any_?: Array | null; } /** * Filter by `Deployment.concurrency_limit`. */ export interface ConcurrencyLimit { /** * Only include deployments with a concurrency limit greater than or equal to this * value */ ge_?: number | null; /** * If true, only include deployments without a concurrency limit */ is_null_?: boolean | null; /** * Only include deployments with a concurrency limit less than or equal to this * value */ le_?: number | null; } /** * Filter by `Deployment.name` or `Flow.name` with a single input string for ilike * filtering. */ export interface FlowOrDeploymentName { /** * A case-insensitive partial match on deployment or flow names. For example, * passing 'example' might match deployments or flows with 'example' in their * names. */ like_?: string | null; } /** * Filter by `Deployment.name`. */ export interface Name { /** * A list of deployment names to include */ any_?: Array | null; /** * A case-insensitive partial match. For example, passing 'marvin' will match * 'marvin', 'sad-Marvin', and 'marvin-robot'. */ like_?: string | null; } /** * Filter by `Deployment.paused`. */ export interface Paused { /** * Only returns where deployment is/is not paused */ eq_?: boolean | null; } /** * Filter by `Deployment.tags`. */ export interface Tags { /** * A list of tags. Deployments will be returned only if their tags are a superset * of the list */ all_?: Array | null; /** * If true, only include deployments without tags */ is_null_?: boolean | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; } /** * Filter by `Deployment.work_queue_name`. */ export interface WorkQueueName { /** * A list of work queue names to include */ any_?: Array | null; } } /** * Filter flow runs. Only flow runs matching all criteria will be returned */ export interface FlowRuns { /** * Filter by `FlowRun.id`. */ id?: FlowRuns.ID | null; /** * Filter by `FlowRun.deployment_id`. */ deployment_id?: FlowRuns.DeploymentID | null; /** * Filter by `FlowRun.expected_start_time`. */ expected_start_time?: FlowRuns.ExpectedStartTime | null; /** * Filter by `FlowRun.flow_version`. */ flow_version?: FlowRuns.FlowVersion | null; /** * Filter by FlowRun.idempotency_key. */ idempotency_key?: FlowRuns.IdempotencyKey | null; /** * Filter by `FlowRun.name`. */ name?: FlowRuns.Name | null; /** * Filter by `FlowRun.next_scheduled_start_time`. */ next_scheduled_start_time?: FlowRuns.NextScheduledStartTime | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; /** * Filter for subflows of a given flow run */ parent_flow_run_id?: FlowRuns.ParentFlowRunID | null; /** * Filter by `FlowRun.parent_task_run_id`. */ parent_task_run_id?: FlowRuns.ParentTaskRunID | null; /** * Filter by `FlowRun.start_time`. */ start_time?: FlowRuns.StartTime | null; /** * Filter by `FlowRun.state_type` and `FlowRun.state_name`. */ state?: FlowRuns.State | null; /** * Filter by `FlowRun.tags`. */ tags?: FlowRuns.Tags | null; /** * Filter by `FlowRun.work_queue_name`. */ work_queue_name?: FlowRuns.WorkQueueName | null; } export namespace FlowRuns { /** * Filter by `FlowRun.id`. */ export interface ID { /** * A list of flow run ids to include */ any_?: Array | null; /** * A list of flow run ids to exclude */ not_any_?: Array | null; } /** * Filter by `FlowRun.deployment_id`. */ export interface DeploymentID { /** * A list of flow run deployment ids to include */ any_?: Array | null; /** * If true, only include flow runs without deployment ids */ is_null_?: boolean | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; } /** * Filter by `FlowRun.expected_start_time`. */ export interface ExpectedStartTime { /** * Only include flow runs scheduled to start at or after this time */ after_?: string | null; /** * Only include flow runs scheduled to start at or before this time */ before_?: string | null; } /** * Filter by `FlowRun.flow_version`. */ export interface FlowVersion { /** * A list of flow run flow_versions to include */ any_?: Array | null; } /** * Filter by FlowRun.idempotency_key. */ export interface IdempotencyKey { /** * A list of flow run idempotency keys to include */ any_?: Array | null; /** * A list of flow run idempotency keys to exclude */ not_any_?: Array | null; } /** * Filter by `FlowRun.name`. */ export interface Name { /** * A list of flow run names to include */ any_?: Array | null; /** * A case-insensitive partial match. For example, passing 'marvin' will match * 'marvin', 'sad-Marvin', and 'marvin-robot'. */ like_?: string | null; } /** * Filter by `FlowRun.next_scheduled_start_time`. */ export interface NextScheduledStartTime { /** * Only include flow runs with a next_scheduled_start_time at or after this time */ after_?: string | null; /** * Only include flow runs with a next_scheduled_start_time or before this time */ before_?: string | null; } /** * Filter for subflows of a given flow run */ export interface ParentFlowRunID { /** * A list of parent flow run ids to include */ any_?: Array | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; } /** * Filter by `FlowRun.parent_task_run_id`. */ export interface ParentTaskRunID { /** * A list of flow run parent_task_run_ids to include */ any_?: Array | null; /** * If true, only include flow runs without parent_task_run_id */ is_null_?: boolean | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; } /** * Filter by `FlowRun.start_time`. */ export interface StartTime { /** * Only include flow runs starting at or after this time */ after_?: string | null; /** * Only include flow runs starting at or before this time */ before_?: string | null; /** * If true, only return flow runs without a start time */ is_null_?: boolean | null; } /** * Filter by `FlowRun.state_type` and `FlowRun.state_name`. */ export interface State { /** * Filter by `FlowRun.state_name`. */ name?: State.Name | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; /** * Filter by `FlowRun.state_type`. */ type?: State.Type | null; } export namespace State { /** * Filter by `FlowRun.state_name`. */ export interface Name { /** * A list of flow run state names to include */ any_?: Array | null; /** * A list of flow run state names to exclude */ not_any_?: Array | null; } /** * Filter by `FlowRun.state_type`. */ export interface Type { /** * A list of flow run state types to include */ any_?: Array< | 'SCHEDULED' | 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'CRASHED' | 'PAUSED' | 'CANCELLING' > | null; /** * A list of flow run state types to exclude */ not_any_?: Array< | 'SCHEDULED' | 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'CRASHED' | 'PAUSED' | 'CANCELLING' > | null; } } /** * Filter by `FlowRun.tags`. */ export interface Tags { /** * A list of tags. Flow runs will be returned only if their tags are a superset of * the list */ all_?: Array | null; /** * If true, only include flow runs without tags */ is_null_?: boolean | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; } /** * Filter by `FlowRun.work_queue_name`. */ export interface WorkQueueName { /** * A list of work queue names to include */ any_?: Array | null; /** * If true, only include flow runs without work queue names */ is_null_?: boolean | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; } } /** * Filter for flows. Only flows matching all criteria will be returned. */ export interface Flows { /** * Filter by `Flow.id`. */ id?: Flows.ID | null; /** * Filter by flows by deployment */ deployment?: Flows.Deployment | null; /** * Filter by `Flow.name`. */ name?: Flows.Name | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; /** * Filter by `Flow.tags`. */ tags?: Flows.Tags | null; } export namespace Flows { /** * Filter by `Flow.id`. */ export interface ID { /** * A list of flow ids to include */ any_?: Array | null; } /** * Filter by flows by deployment */ export interface Deployment { /** * If true, only include flows without deployments */ is_null_?: boolean | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; } /** * Filter by `Flow.name`. */ export interface Name { /** * A list of flow names to include */ any_?: Array | null; /** * A case-insensitive partial match. For example, passing 'marvin' will match * 'marvin', 'sad-Marvin', and 'marvin-robot'. */ like_?: string | null; } /** * Filter by `Flow.tags`. */ export interface Tags { /** * A list of tags. Flows will be returned only if their tags are a superset of the * list */ all_?: Array | null; /** * If true, only include flows without tags */ is_null_?: boolean | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; } } /** * Filter task runs. Only task runs matching all criteria will be returned */ export interface TaskRuns { /** * Filter by `TaskRun.id`. */ id?: TaskRuns.ID | null; /** * Filter by `TaskRun.expected_start_time`. */ expected_start_time?: TaskRuns.ExpectedStartTime | null; /** * Filter by `TaskRun.flow_run_id`. */ flow_run_id?: TaskRuns.FlowRunID | null; /** * Filter by `TaskRun.name`. */ name?: TaskRuns.Name | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; /** * Filter by `TaskRun.start_time`. */ start_time?: TaskRuns.StartTime | null; /** * Filter by `TaskRun.type` and `TaskRun.name`. */ state?: TaskRuns.State | null; /** * Filter by `TaskRun.subflow_run`. */ subflow_runs?: TaskRuns.SubflowRuns | null; /** * Filter by `TaskRun.tags`. */ tags?: TaskRuns.Tags | null; } export namespace TaskRuns { /** * Filter by `TaskRun.id`. */ export interface ID { /** * A list of task run ids to include */ any_?: Array | null; } /** * Filter by `TaskRun.expected_start_time`. */ export interface ExpectedStartTime { /** * Only include task runs expected to start at or after this time */ after_?: string | null; /** * Only include task runs expected to start at or before this time */ before_?: string | null; } /** * Filter by `TaskRun.flow_run_id`. */ export interface FlowRunID { /** * A list of task run flow run ids to include */ any_?: Array | null; /** * Filter for task runs with None as their flow run id */ is_null_?: boolean | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; } /** * Filter by `TaskRun.name`. */ export interface Name { /** * A list of task run names to include */ any_?: Array | null; /** * A case-insensitive partial match. For example, passing 'marvin' will match * 'marvin', 'sad-Marvin', and 'marvin-robot'. */ like_?: string | null; } /** * Filter by `TaskRun.start_time`. */ export interface StartTime { /** * Only include task runs starting at or after this time */ after_?: string | null; /** * Only include task runs starting at or before this time */ before_?: string | null; /** * If true, only return task runs without a start time */ is_null_?: boolean | null; } /** * Filter by `TaskRun.type` and `TaskRun.name`. */ export interface State { /** * Filter by `TaskRun.state_name`. */ name?: State.Name | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; /** * Filter by `TaskRun.state_type`. */ type?: State.Type | null; } export namespace State { /** * Filter by `TaskRun.state_name`. */ export interface Name { /** * A list of task run state names to include */ any_?: Array | null; } /** * Filter by `TaskRun.state_type`. */ export interface Type { /** * A list of task run state types to include */ any_?: Array< | 'SCHEDULED' | 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'CRASHED' | 'PAUSED' | 'CANCELLING' > | null; } } /** * Filter by `TaskRun.subflow_run`. */ export interface SubflowRuns { /** * If true, only include task runs that are subflow run parents; if false, exclude * parent task runs */ exists_?: boolean | null; } /** * Filter by `TaskRun.tags`. */ export interface Tags { /** * A list of tags. Task runs will be returned only if their tags are a superset of * the list */ all_?: Array | null; /** * If true, only include task runs without tags */ is_null_?: boolean | null; /** * Operator for combining filter criteria. Defaults to 'and\_'. */ operator?: 'and_' | 'or_'; } } } export namespace Artifacts { export import Artifact = ArtifactsAPI.Artifact; export import ArtifactCountResponse = ArtifactsAPI.ArtifactCountResponse; export import ArtifactFilterResponse = ArtifactsAPI.ArtifactFilterResponse; export import ArtifactCreateParams = ArtifactsAPI.ArtifactCreateParams; export import ArtifactRetrieveParams = ArtifactsAPI.ArtifactRetrieveParams; export import ArtifactUpdateParams = ArtifactsAPI.ArtifactUpdateParams; export import ArtifactDeleteParams = ArtifactsAPI.ArtifactDeleteParams; export import ArtifactCountParams = ArtifactsAPI.ArtifactCountParams; export import ArtifactFilterParams = ArtifactsAPI.ArtifactFilterParams; export import Latest = LatestAPI.Latest; export import ArtifactCollection = LatestAPI.ArtifactCollection; export import LatestCountResponse = LatestAPI.LatestCountResponse; export import LatestFilterResponse = LatestAPI.LatestFilterResponse; export import LatestRetrieveParams = LatestAPI.LatestRetrieveParams; export import LatestCountParams = LatestAPI.LatestCountParams; export import LatestFilterParams = LatestAPI.LatestFilterParams; }