11// generated with @7nohe/openapi-react-query-codegen@1.6.2
22
33import { UseMutationOptions , UseQueryOptions , useMutation , useQuery } from "@tanstack/react-query" ;
4- import { AssetService , AuthLinksService , BackfillService , CalendarService , ConfigService , ConnectionService , DagParsingService , DagReportService , DagRunService , DagService , DagSourceService , DagStatsService , DagVersionService , DagWarningService , DashboardService , DependenciesService , EventLogService , ExtraLinksService , GridService , ImportErrorService , JobService , LoginService , MonitorService , PluginService , PoolService , ProviderService , StructureService , TaskInstanceService , TaskService , VariableService , VersionService , XcomService } from "../requests/services.gen" ;
4+ import { AssetService , AuthLinksService , BackfillService , CalendarService , ConfigService , ConnectionService , DagParsingService , DagReportService , DagRunService , DagService , DagSourceService , DagStatsService , DagVersionService , DagWarningService , DashboardService , DependenciesService , EventLogService , ExperimentalService , ExtraLinksService , GridService , ImportErrorService , JobService , LoginService , MonitorService , PluginService , PoolService , ProviderService , StructureService , TaskInstanceService , TaskService , VariableService , VersionService , XcomService } from "../requests/services.gen" ;
55import { BackfillPostBody , BulkBody_BulkTaskInstanceBody_ , BulkBody_ConnectionBody_ , BulkBody_PoolBody_ , BulkBody_VariableBody_ , ClearTaskInstancesBody , ConnectionBody , CreateAssetEventsBody , DAGPatchBody , DAGRunClearBody , DAGRunPatchBody , DAGRunsBatchBody , DagRunState , DagWarningType , PatchTaskInstanceBody , PoolBody , PoolPatchBody , TaskInstancesBatchBody , TriggerDAGRunPostBody , VariableBody , XComCreateBody , XComUpdateBody } from "../requests/types.gen" ;
66import * as Common from "./common" ;
77/**
@@ -294,8 +294,8 @@ export const useDagRunServiceGetDagRuns = <TData = Common.DagRunServiceGetDagRun
294294 updatedAtLte ?: string ;
295295} , queryKey ?: TQueryKey , options ?: Omit < UseQueryOptions < TData , TError > , "queryKey" | "queryFn" > ) => useQuery < TData , TError > ( { queryKey : Common . UseDagRunServiceGetDagRunsKeyFn ( { dagId, endDateGte, endDateLte, limit, logicalDateGte, logicalDateLte, offset, orderBy, runAfterGte, runAfterLte, runType, startDateGte, startDateLte, state, updatedAtGte, updatedAtLte } , queryKey ) , queryFn : ( ) => DagRunService . getDagRuns ( { dagId, endDateGte, endDateLte, limit, logicalDateGte, logicalDateLte, offset, orderBy, runAfterGte, runAfterLte, runType, startDateGte, startDateLte, state, updatedAtGte, updatedAtLte } ) as TData , ...options } ) ;
296296/**
297- * Wait Dag Run Until Finished
298- * Wait for a dag run until it finishes, and return its return value .
297+ * Experimental: Wait for a dag run to complete, and return task results if requested.
298+ * 🚧 This is an experimental endpoint and may change or be removed without notice .
299299* @param data The data for the request.
300300* @param data.dagId
301301* @param data.dagRunId
@@ -311,6 +311,23 @@ export const useDagRunServiceWaitDagRunUntilFinished = <TData = Common.DagRunSer
311311 interval : number ;
312312} , queryKey ?: TQueryKey , options ?: Omit < UseQueryOptions < TData , TError > , "queryKey" | "queryFn" > ) => useQuery < TData , TError > ( { queryKey : Common . UseDagRunServiceWaitDagRunUntilFinishedKeyFn ( { collect, dagId, dagRunId, interval } , queryKey ) , queryFn : ( ) => DagRunService . waitDagRunUntilFinished ( { collect, dagId, dagRunId, interval } ) as TData , ...options } ) ;
313313/**
314+ * Experimental: Wait for a dag run to complete, and return task results if requested.
315+ * 🚧 This is an experimental endpoint and may change or be removed without notice.
316+ * @param data The data for the request.
317+ * @param data.dagId
318+ * @param data.dagRunId
319+ * @param data.interval Seconds to wait between dag run state checks
320+ * @param data.collect Collect return value XCom from task. Can be set multiple times.
321+ * @returns unknown Successful Response
322+ * @throws ApiError
323+ */
324+ export const useExperimentalServiceWaitDagRunUntilFinished = < TData = Common . ExperimentalServiceWaitDagRunUntilFinishedDefaultResponse , TError = unknown , TQueryKey extends Array < unknown > = unknown [ ] > ( { collect, dagId, dagRunId, interval } : {
325+ collect ?: string [ ] ;
326+ dagId : string ;
327+ dagRunId : string ;
328+ interval : number ;
329+ } , queryKey ?: TQueryKey , options ?: Omit < UseQueryOptions < TData , TError > , "queryKey" | "queryFn" > ) => useQuery < TData , TError > ( { queryKey : Common . UseExperimentalServiceWaitDagRunUntilFinishedKeyFn ( { collect, dagId, dagRunId, interval } , queryKey ) , queryFn : ( ) => ExperimentalService . waitDagRunUntilFinished ( { collect, dagId, dagRunId, interval } ) as TData , ...options } ) ;
330+ /**
314331* Get Dag Source
315332* Get source code using file token.
316333* @param data The data for the request.
0 commit comments