diff --git a/airflow/api_fastapi/core_api/openapi/v1-generated.yaml b/airflow/api_fastapi/core_api/openapi/v1-generated.yaml index 85e0437b78f35..1df6a5e4796b5 100644 --- a/airflow/api_fastapi/core_api/openapi/v1-generated.yaml +++ b/airflow/api_fastapi/core_api/openapi/v1-generated.yaml @@ -170,6 +170,82 @@ paths: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' + /public/assets/: + get: + tags: + - Asset + summary: Get Assets + description: Get assets. + operationId: get_assets + parameters: + - name: limit + in: query + required: false + schema: + type: integer + default: 100 + title: Limit + - name: offset + in: query + required: false + schema: + type: integer + default: 0 + title: Offset + - name: uri_pattern + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Uri Pattern + - name: dag_ids + in: query + required: false + schema: + type: array + items: + type: string + title: Dag Ids + - name: order_by + in: query + required: false + schema: + type: string + default: id + title: Order By + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/AssetCollectionResponse' + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Unauthorized + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Not Found + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' /public/backfills/: get: tags: @@ -462,97 +538,85 @@ paths: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' - /public/dags/: - get: + /public/connections/{connection_id}: + delete: tags: - - DAG - summary: Get Dags - description: Get all DAGs. - operationId: get_dags + - Connection + summary: Delete Connection + description: Delete a connection entry. + operationId: delete_connection parameters: - - name: limit - in: query - required: false - schema: - type: integer - default: 100 - title: Limit - - name: offset - in: query - required: false - schema: - type: integer - default: 0 - title: Offset - - name: tags - in: query - required: false - schema: - type: array - items: - type: string - title: Tags - - name: owners - in: query - required: false - schema: - type: array - items: - type: string - title: Owners - - name: dag_id_pattern - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Dag Id Pattern - - name: dag_display_name_pattern - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Dag Display Name Pattern - - name: only_active - in: query - required: false - schema: - type: boolean - default: true - title: Only Active - - name: paused - in: query - required: false - schema: - anyOf: - - type: boolean - - type: 'null' - title: Paused - - name: last_dag_run_state - in: query - required: false + - name: connection_id + in: path + required: true schema: - anyOf: - - $ref: '#/components/schemas/DagRunState' - - type: 'null' - title: Last Dag Run State - - name: order_by - in: query - required: false + type: string + title: Connection Id + responses: + '204': + description: Successful Response + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Unauthorized + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Not Found + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + get: + tags: + - Connection + summary: Get Connection + description: Get a connection entry. + operationId: get_connection + parameters: + - name: connection_id + in: path + required: true schema: type: string - default: dag_id - title: Order By + title: Connection Id responses: '200': description: Successful Response content: application/json: schema: - $ref: '#/components/schemas/DAGCollectionResponse' + $ref: '#/components/schemas/ConnectionResponse' + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Unauthorized + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Not Found '422': description: Validation Error content: @@ -561,11 +625,17 @@ paths: $ref: '#/components/schemas/HTTPValidationError' patch: tags: - - DAG - summary: Patch Dags - description: Patch multiple DAGs. - operationId: patch_dags + - Connection + summary: Patch Connection + description: Update a connection entry. + operationId: patch_connection parameters: + - name: connection_id + in: path + required: true + schema: + type: string + title: Connection Id - name: update_mask in: query required: false @@ -576,80 +646,19 @@ paths: type: string - type: 'null' title: Update Mask - - name: limit - in: query - required: false - schema: - type: integer - default: 100 - title: Limit - - name: offset - in: query - required: false - schema: - type: integer - default: 0 - title: Offset - - name: tags - in: query - required: false - schema: - type: array - items: - type: string - title: Tags - - name: owners - in: query - required: false - schema: - type: array - items: - type: string - title: Owners - - name: dag_id_pattern - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Dag Id Pattern - - name: only_active - in: query - required: false - schema: - type: boolean - default: true - title: Only Active - - name: paused - in: query - required: false - schema: - anyOf: - - type: boolean - - type: 'null' - title: Paused - - name: last_dag_run_state - in: query - required: false - schema: - anyOf: - - $ref: '#/components/schemas/DagRunState' - - type: 'null' - title: Last Dag Run State requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/DAGPatchBody' + $ref: '#/components/schemas/ConnectionBody' responses: '200': description: Successful Response content: application/json: schema: - $ref: '#/components/schemas/DAGCollectionResponse' + $ref: '#/components/schemas/ConnectionResponse' '400': content: application/json: @@ -680,13 +689,13 @@ paths: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' - /public/dags/tags: + /public/connections/: get: tags: - - DAG - summary: Get Dag Tags - description: Get all DAG tags. - operationId: get_dag_tags + - Connection + summary: Get Connections + description: Get all connection entries. + operationId: get_connections parameters: - name: limit in: query @@ -707,23 +716,15 @@ paths: required: false schema: type: string - default: name + default: id title: Order By - - name: tag_name_pattern - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Tag Name Pattern responses: '200': description: Successful Response content: application/json: schema: - $ref: '#/components/schemas/DAGTagCollectionResponse' + $ref: '#/components/schemas/ConnectionCollectionResponse' '401': content: application/json: @@ -736,69 +737,114 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Not Found '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' - /public/dags/{dag_id}: - get: + post: tags: - - DAG - summary: Get Dag - description: Get basic information about a DAG. - operationId: get_dag - parameters: - - name: dag_id - in: path + - Connection + summary: Post Connection + description: Create connection entry. + operationId: post_connection + requestBody: required: true - schema: - type: string - title: Dag Id + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectionBody' responses: - '200': + '201': description: Successful Response content: application/json: schema: - $ref: '#/components/schemas/DAGResponse' - '400': + $ref: '#/components/schemas/ConnectionResponse' + '401': content: application/json: schema: $ref: '#/components/schemas/HTTPExceptionResponse' - description: Bad Request - '401': + description: Unauthorized + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Forbidden + '409': content: application/json: schema: $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /public/connections/test: + post: + tags: + - Connection + summary: Test Connection + description: 'Test an API connection. + + + This method first creates an in-memory transient conn_id & exports that to + an env var, + + as some hook classes tries to find out the `conn` from their __init__ method + & errors out if not found. + + It also deletes the conn id env variable after the test.' + operationId: test_connection + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectionBody' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectionTestResponse' + '401': description: Unauthorized - '403': content: application/json: schema: $ref: '#/components/schemas/HTTPExceptionResponse' + '403': description: Forbidden - '404': content: application/json: schema: $ref: '#/components/schemas/HTTPExceptionResponse' - description: Not Found '422': + description: Validation Error content: application/json: schema: - $ref: '#/components/schemas/HTTPExceptionResponse' - description: Unprocessable Entity - patch: + $ref: '#/components/schemas/HTTPValidationError' + /public/dags/{dag_id}/dagRuns/{dag_run_id}: + get: tags: - - DAG - summary: Patch Dag - description: Patch the specific DAG. - operationId: patch_dag + - DagRun + summary: Get Dag Run + operationId: get_dag_run parameters: - name: dag_id in: path @@ -806,35 +852,19 @@ paths: schema: type: string title: Dag Id - - name: update_mask - in: query - required: false - schema: - anyOf: - - type: array - items: - type: string - - type: 'null' - title: Update Mask - requestBody: + - name: dag_run_id + in: path required: true - content: - application/json: - schema: - $ref: '#/components/schemas/DAGPatchBody' + schema: + type: string + title: Dag Run Id responses: '200': description: Successful Response content: application/json: schema: - $ref: '#/components/schemas/DAGResponse' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPExceptionResponse' - description: Bad Request + $ref: '#/components/schemas/DAGRunResponse' '401': content: application/json: @@ -861,10 +891,10 @@ paths: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - - DAG - summary: Delete Dag - description: Delete the specific DAG. - operationId: delete_dag + - DagRun + summary: Delete Dag Run + description: Delete a DAG Run entry. + operationId: delete_dag_run parameters: - name: dag_id in: path @@ -872,12 +902,15 @@ paths: schema: type: string title: Dag Id + - name: dag_run_id + in: path + required: true + schema: + type: string + title: Dag Run Id responses: - '200': + '204': description: Successful Response - content: - application/json: - schema: {} '400': content: application/json: @@ -903,18 +936,17 @@ paths: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found '422': + description: Validation Error content: application/json: schema: - $ref: '#/components/schemas/HTTPExceptionResponse' - description: Unprocessable Entity - /public/dags/{dag_id}/details: - get: + $ref: '#/components/schemas/HTTPValidationError' + patch: tags: - - DAG - summary: Get Dag Details - description: Get details of DAG. - operationId: get_dag_details + - DagRun + summary: Patch Dag Run + description: Modify a DAG Run. + operationId: patch_dag_run parameters: - name: dag_id in: path @@ -922,13 +954,35 @@ paths: schema: type: string title: Dag Id + - name: dag_run_id + in: path + required: true + schema: + type: string + title: Dag Run Id + - name: update_mask + in: query + required: false + schema: + anyOf: + - type: array + items: + type: string + - type: 'null' + title: Update Mask + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/DAGRunPatchBody' responses: '200': description: Successful Response content: application/json: schema: - $ref: '#/components/schemas/DAGDetailsResponse' + $ref: '#/components/schemas/DAGRunResponse' '400': content: application/json: @@ -959,23 +1013,44 @@ paths: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' - /public/connections/{connection_id}: - delete: + /public/dagSources/{file_token}: + get: tags: - - Connection - summary: Delete Connection - description: Delete a connection entry. - operationId: delete_connection + - DagSource + summary: Get Dag Source + description: Get source code using file token. + operationId: get_dag_source parameters: - - name: connection_id + - name: file_token in: path required: true schema: type: string - title: Connection Id + title: File Token + - name: accept + in: header + required: false + schema: + type: string + default: '*/*' + title: Accept responses: - '204': + '200': description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/DAGSourceResponse' + text/plain: + schema: + type: string + example: dag code + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request '401': content: application/json: @@ -994,32 +1069,47 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '406': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Not Acceptable '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' + /public/dagStats/: get: tags: - - Connection - summary: Get Connection - description: Get a connection entry. - operationId: get_connection + - DagStats + summary: Get Dag Stats + description: Get Dag statistics. + operationId: get_dag_stats parameters: - - name: connection_id - in: path - required: true + - name: dag_ids + in: query + required: false schema: - type: string - title: Connection Id + type: array + items: + type: string + title: Dag Ids responses: '200': description: Successful Response content: application/json: schema: - $ref: '#/components/schemas/ConnectionResponse' + $ref: '#/components/schemas/DagStatsCollectionResponse' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request '401': content: application/json: @@ -1044,48 +1134,58 @@ paths: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' - patch: + /public/dagWarnings: + get: tags: - - Connection - summary: Patch Connection - description: Update a connection entry. - operationId: patch_connection + - DagWarning + summary: List Dag Warnings + description: Get a list of DAG warnings. + operationId: list_dag_warnings parameters: - - name: connection_id - in: path - required: true + - name: dag_id + in: query + required: false schema: - type: string - title: Connection Id - - name: update_mask + anyOf: + - type: string + - type: 'null' + title: Dag Id + - name: warning_type in: query required: false schema: anyOf: - - type: array - items: - type: string + - $ref: '#/components/schemas/DagWarningType' - type: 'null' - title: Update Mask - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ConnectionBody' + title: Warning Type + - name: limit + in: query + required: false + schema: + type: integer + default: 100 + title: Limit + - name: offset + in: query + required: false + schema: + type: integer + default: 0 + title: Offset + - name: order_by + in: query + required: false + schema: + type: string + default: dag_id + title: Order By responses: '200': description: Successful Response content: application/json: schema: - $ref: '#/components/schemas/ConnectionResponse' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPExceptionResponse' - description: Bad Request + $ref: '#/components/schemas/DAGWarningCollectionResponse' '401': content: application/json: @@ -1098,25 +1198,19 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Forbidden - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPExceptionResponse' - description: Not Found '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' - /public/connections/: + /public/dags/: get: tags: - - Connection - summary: Get Connections - description: Get all connection entries. - operationId: get_connections + - DAG + summary: Get Dags + description: Get all DAGs. + operationId: get_dags parameters: - name: limit in: query @@ -1132,12 +1226,67 @@ paths: type: integer default: 0 title: Offset + - name: tags + in: query + required: false + schema: + type: array + items: + type: string + title: Tags + - name: owners + in: query + required: false + schema: + type: array + items: + type: string + title: Owners + - name: dag_id_pattern + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Dag Id Pattern + - name: dag_display_name_pattern + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Dag Display Name Pattern + - name: only_active + in: query + required: false + schema: + type: boolean + default: true + title: Only Active + - name: paused + in: query + required: false + schema: + anyOf: + - type: boolean + - type: 'null' + title: Paused + - name: last_dag_run_state + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/DagRunState' + - type: 'null' + title: Last Dag Run State - name: order_by in: query required: false schema: type: string - default: id + default: dag_id title: Order By responses: '200': @@ -1145,50 +1294,110 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ConnectionCollectionResponse' - '401': - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPExceptionResponse' - description: Unauthorized - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPExceptionResponse' - description: Forbidden - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPExceptionResponse' - description: Not Found + $ref: '#/components/schemas/DAGCollectionResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' - post: + patch: tags: - - Connection - summary: Post Connection - description: Create connection entry. - operationId: post_connection + - DAG + summary: Patch Dags + description: Patch multiple DAGs. + operationId: patch_dags + parameters: + - name: update_mask + in: query + required: false + schema: + anyOf: + - type: array + items: + type: string + - type: 'null' + title: Update Mask + - name: limit + in: query + required: false + schema: + type: integer + default: 100 + title: Limit + - name: offset + in: query + required: false + schema: + type: integer + default: 0 + title: Offset + - name: tags + in: query + required: false + schema: + type: array + items: + type: string + title: Tags + - name: owners + in: query + required: false + schema: + type: array + items: + type: string + title: Owners + - name: dag_id_pattern + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Dag Id Pattern + - name: only_active + in: query + required: false + schema: + type: boolean + default: true + title: Only Active + - name: paused + in: query + required: false + schema: + anyOf: + - type: boolean + - type: 'null' + title: Paused + - name: last_dag_run_state + in: query + required: false + schema: + anyOf: + - $ref: '#/components/schemas/DagRunState' + - type: 'null' + title: Last Dag Run State requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/ConnectionBody' + $ref: '#/components/schemas/DAGPatchBody' responses: - '201': + '200': description: Successful Response content: application/json: schema: - $ref: '#/components/schemas/ConnectionResponse' + $ref: '#/components/schemas/DAGCollectionResponse' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request '401': content: application/json: @@ -1201,71 +1410,87 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Forbidden - '409': + '404': content: application/json: schema: $ref: '#/components/schemas/HTTPExceptionResponse' - description: Conflict + description: Not Found '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' - /public/connections/test: - post: + /public/dags/tags: + get: tags: - - Connection - summary: Test Connection - description: 'Test an API connection. - - - This method first creates an in-memory transient conn_id & exports that to - an env var, - - as some hook classes tries to find out the `conn` from their __init__ method - & errors out if not found. - - It also deletes the conn id env variable after the test.' - operationId: test_connection - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ConnectionBody' - required: true + - DAG + summary: Get Dag Tags + description: Get all DAG tags. + operationId: get_dag_tags + parameters: + - name: limit + in: query + required: false + schema: + type: integer + default: 100 + title: Limit + - name: offset + in: query + required: false + schema: + type: integer + default: 0 + title: Offset + - name: order_by + in: query + required: false + schema: + type: string + default: name + title: Order By + - name: tag_name_pattern + in: query + required: false + schema: + anyOf: + - type: string + - type: 'null' + title: Tag Name Pattern responses: '200': description: Successful Response content: application/json: schema: - $ref: '#/components/schemas/ConnectionTestResponse' + $ref: '#/components/schemas/DAGTagCollectionResponse' '401': - description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/HTTPExceptionResponse' + description: Unauthorized '403': - description: Forbidden content: application/json: schema: $ref: '#/components/schemas/HTTPExceptionResponse' + description: Forbidden '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' - /public/dags/{dag_id}/dagRuns/{dag_run_id}: + /public/dags/{dag_id}: get: tags: - - DagRun - summary: Get Dag Run - operationId: get_dag_run + - DAG + summary: Get Dag + description: Get basic information about a DAG. + operationId: get_dag parameters: - name: dag_id in: path @@ -1273,19 +1498,19 @@ paths: schema: type: string title: Dag Id - - name: dag_run_id - in: path - required: true - schema: - type: string - title: Dag Run Id responses: '200': description: Successful Response content: application/json: schema: - $ref: '#/components/schemas/DAGRunResponse' + $ref: '#/components/schemas/DAGResponse' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request '401': content: application/json: @@ -1305,17 +1530,17 @@ paths: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found '422': - description: Validation Error content: application/json: schema: - $ref: '#/components/schemas/HTTPValidationError' - delete: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Unprocessable Entity + patch: tags: - - DagRun - summary: Delete Dag Run - description: Delete a DAG Run entry. - operationId: delete_dag_run + - DAG + summary: Patch Dag + description: Patch the specific DAG. + operationId: patch_dag parameters: - name: dag_id in: path @@ -1323,15 +1548,29 @@ paths: schema: type: string title: Dag Id - - name: dag_run_id - in: path - required: true + - name: update_mask + in: query + required: false schema: - type: string - title: Dag Run Id + anyOf: + - type: array + items: + type: string + - type: 'null' + title: Update Mask + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/DAGPatchBody' responses: - '204': + '200': description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/DAGResponse' '400': content: application/json: @@ -1362,12 +1601,12 @@ paths: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' - patch: + delete: tags: - - DagRun - summary: Patch Dag Run - description: Modify a DAG Run. - operationId: patch_dag_run + - DAG + summary: Delete Dag + description: Delete the specific DAG. + operationId: delete_dag parameters: - name: dag_id in: path @@ -1375,35 +1614,12 @@ paths: schema: type: string title: Dag Id - - name: dag_run_id - in: path - required: true - schema: - type: string - title: Dag Run Id - - name: update_mask - in: query - required: false - schema: - anyOf: - - type: array - items: - type: string - - type: 'null' - title: Update Mask - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/DAGRunPatchBody' responses: '200': description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/DAGRunResponse' + schema: {} '400': content: application/json: @@ -1429,43 +1645,32 @@ paths: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found '422': - description: Validation Error content: application/json: schema: - $ref: '#/components/schemas/HTTPValidationError' - /public/dagSources/{file_token}: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Unprocessable Entity + /public/dags/{dag_id}/details: get: tags: - - DagSource - summary: Get Dag Source - description: Get source code using file token. - operationId: get_dag_source + - DAG + summary: Get Dag Details + description: Get details of DAG. + operationId: get_dag_details parameters: - - name: file_token + - name: dag_id in: path required: true schema: type: string - title: File Token - - name: accept - in: header - required: false - schema: - type: string - default: '*/*' - title: Accept + title: Dag Id responses: '200': description: Successful Response content: application/json: schema: - $ref: '#/components/schemas/DAGSourceResponse' - text/plain: - schema: - type: string - example: dag code + $ref: '#/components/schemas/DAGDetailsResponse' '400': content: application/json: @@ -1490,12 +1695,6 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found - '406': - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPExceptionResponse' - description: Not Acceptable '422': description: Validation Error content: @@ -1774,90 +1973,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ImportErrorCollectionResponse' - '401': - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPExceptionResponse' - description: Unauthorized - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPExceptionResponse' - description: Forbidden - '422': - description: Validation Error - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPValidationError' - /public/monitor/health: - get: - tags: - - Monitor - summary: Get Health - operationId: get_health - responses: - '200': - description: Successful Response - content: - application/json: - schema: - $ref: '#/components/schemas/HealthInfoSchema' - /public/dagWarnings: - get: - tags: - - DagWarning - summary: List Dag Warnings - description: Get a list of DAG warnings. - operationId: list_dag_warnings - parameters: - - name: dag_id - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Dag Id - - name: warning_type - in: query - required: false - schema: - anyOf: - - $ref: '#/components/schemas/DagWarningType' - - type: 'null' - title: Warning Type - - name: limit - in: query - required: false - schema: - type: integer - default: 100 - title: Limit - - name: offset - in: query - required: false - schema: - type: integer - default: 0 - title: Offset - - name: order_by - in: query - required: false - schema: - type: string - default: dag_id - title: Order By - responses: - '200': - description: Successful Response - content: - application/json: - schema: - $ref: '#/components/schemas/DAGWarningCollectionResponse' + $ref: '#/components/schemas/ImportErrorCollectionResponse' '401': content: application/json: @@ -1876,6 +1992,19 @@ paths: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' + /public/monitor/health: + get: + tags: + - Monitor + summary: Get Health + operationId: get_health + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/HealthInfoSchema' /public/plugins/: get: tags: @@ -2842,6 +2971,62 @@ paths: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' + /public/dags/{dag_id}/tasks/{task_id}: + get: + tags: + - Task + summary: Get Task + description: Get simplified representation of a task. + operationId: get_task + parameters: + - name: dag_id + in: path + required: true + schema: + type: string + title: Dag Id + - name: task_id + in: path + required: true + schema: + title: Task Id + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/TaskResponse' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Unauthorized + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Not Found + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' /public/variables/{variable_key}: delete: tags: @@ -3098,59 +3283,6 @@ paths: application/json: schema: $ref: '#/components/schemas/VersionInfo' - /public/dagStats/: - get: - tags: - - DagStats - summary: Get Dag Stats - description: Get Dag statistics. - operationId: get_dag_stats - parameters: - - name: dag_ids - in: query - required: false - schema: - type: array - items: - type: string - title: Dag Ids - responses: - '200': - description: Successful Response - content: - application/json: - schema: - $ref: '#/components/schemas/DagStatsCollectionResponse' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPExceptionResponse' - description: Bad Request - '401': - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPExceptionResponse' - description: Unauthorized - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPExceptionResponse' - description: Forbidden - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPExceptionResponse' - description: Not Found - '422': - description: Validation Error - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPValidationError' /public/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/xcomEntries/{xcom_key}: get: tags: @@ -3245,138 +3377,6 @@ paths: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' - /public/assets/: - get: - tags: - - Asset - summary: Get Assets - description: Get assets. - operationId: get_assets - parameters: - - name: limit - in: query - required: false - schema: - type: integer - default: 100 - title: Limit - - name: offset - in: query - required: false - schema: - type: integer - default: 0 - title: Offset - - name: uri_pattern - in: query - required: false - schema: - anyOf: - - type: string - - type: 'null' - title: Uri Pattern - - name: dag_ids - in: query - required: false - schema: - type: array - items: - type: string - title: Dag Ids - - name: order_by - in: query - required: false - schema: - type: string - default: id - title: Order By - responses: - '200': - description: Successful Response - content: - application/json: - schema: - $ref: '#/components/schemas/AssetCollectionResponse' - '401': - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPExceptionResponse' - description: Unauthorized - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPExceptionResponse' - description: Forbidden - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPExceptionResponse' - description: Not Found - '422': - description: Validation Error - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPValidationError' - /public/dags/{dag_id}/tasks/{task_id}: - get: - tags: - - Task - summary: Get Task - description: Get simplified representation of a task. - operationId: get_task - parameters: - - name: dag_id - in: path - required: true - schema: - type: string - title: Dag Id - - name: task_id - in: path - required: true - schema: - title: Task Id - responses: - '200': - description: Successful Response - content: - application/json: - schema: - $ref: '#/components/schemas/TaskResponse' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPExceptionResponse' - description: Bad Request - '401': - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPExceptionResponse' - description: Unauthorized - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPExceptionResponse' - description: Forbidden - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPExceptionResponse' - description: Not Found - '422': - description: Validation Error - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPValidationError' components: schemas: AppBuilderMenuItemResponse: diff --git a/airflow/api_fastapi/core_api/routes/public/__init__.py b/airflow/api_fastapi/core_api/routes/public/__init__.py index 061af88efb8fa..42baf8188b60c 100644 --- a/airflow/api_fastapi/core_api/routes/public/__init__.py +++ b/airflow/api_fastapi/core_api/routes/public/__init__.py @@ -41,24 +41,22 @@ public_router = AirflowRouter(prefix="/public") +public_router.include_router(assets_router) public_router.include_router(backfills_router) -public_router.include_router(dags_router) public_router.include_router(connections_router) public_router.include_router(dag_run_router) public_router.include_router(dag_sources_router) +public_router.include_router(dag_stats_router) +public_router.include_router(dag_warning_router) public_router.include_router(dags_router) public_router.include_router(event_logs_router) public_router.include_router(import_error_router) public_router.include_router(monitor_router) -public_router.include_router(dag_warning_router) public_router.include_router(plugins_router) public_router.include_router(pools_router) public_router.include_router(providers_router) public_router.include_router(task_instances_router) -public_router.include_router(variables_router) +public_router.include_router(tasks_router) public_router.include_router(variables_router) public_router.include_router(version_router) -public_router.include_router(dag_stats_router) public_router.include_router(xcom_router) -public_router.include_router(assets_router) -public_router.include_router(tasks_router) diff --git a/airflow/ui/openapi-gen/queries/common.ts b/airflow/ui/openapi-gen/queries/common.ts index af8ffb28c106d..51fc4d6d001ee 100644 --- a/airflow/ui/openapi-gen/queries/common.ts +++ b/airflow/ui/openapi-gen/queries/common.ts @@ -183,6 +183,134 @@ export const UseBackfillServiceGetBackfillKeyFn = ( }, queryKey?: Array, ) => [useBackfillServiceGetBackfillKey, ...(queryKey ?? [{ backfillId }])]; +export type ConnectionServiceGetConnectionDefaultResponse = Awaited< + ReturnType +>; +export type ConnectionServiceGetConnectionQueryResult< + TData = ConnectionServiceGetConnectionDefaultResponse, + TError = unknown, +> = UseQueryResult; +export const useConnectionServiceGetConnectionKey = + "ConnectionServiceGetConnection"; +export const UseConnectionServiceGetConnectionKeyFn = ( + { + connectionId, + }: { + connectionId: string; + }, + queryKey?: Array, +) => [ + useConnectionServiceGetConnectionKey, + ...(queryKey ?? [{ connectionId }]), +]; +export type ConnectionServiceGetConnectionsDefaultResponse = Awaited< + ReturnType +>; +export type ConnectionServiceGetConnectionsQueryResult< + TData = ConnectionServiceGetConnectionsDefaultResponse, + TError = unknown, +> = UseQueryResult; +export const useConnectionServiceGetConnectionsKey = + "ConnectionServiceGetConnections"; +export const UseConnectionServiceGetConnectionsKeyFn = ( + { + limit, + offset, + orderBy, + }: { + limit?: number; + offset?: number; + orderBy?: string; + } = {}, + queryKey?: Array, +) => [ + useConnectionServiceGetConnectionsKey, + ...(queryKey ?? [{ limit, offset, orderBy }]), +]; +export type DagRunServiceGetDagRunDefaultResponse = Awaited< + ReturnType +>; +export type DagRunServiceGetDagRunQueryResult< + TData = DagRunServiceGetDagRunDefaultResponse, + TError = unknown, +> = UseQueryResult; +export const useDagRunServiceGetDagRunKey = "DagRunServiceGetDagRun"; +export const UseDagRunServiceGetDagRunKeyFn = ( + { + dagId, + dagRunId, + }: { + dagId: string; + dagRunId: string; + }, + queryKey?: Array, +) => [useDagRunServiceGetDagRunKey, ...(queryKey ?? [{ dagId, dagRunId }])]; +export type DagSourceServiceGetDagSourceDefaultResponse = Awaited< + ReturnType +>; +export type DagSourceServiceGetDagSourceQueryResult< + TData = DagSourceServiceGetDagSourceDefaultResponse, + TError = unknown, +> = UseQueryResult; +export const useDagSourceServiceGetDagSourceKey = + "DagSourceServiceGetDagSource"; +export const UseDagSourceServiceGetDagSourceKeyFn = ( + { + accept, + fileToken, + }: { + accept?: string; + fileToken: string; + }, + queryKey?: Array, +) => [ + useDagSourceServiceGetDagSourceKey, + ...(queryKey ?? [{ accept, fileToken }]), +]; +export type DagStatsServiceGetDagStatsDefaultResponse = Awaited< + ReturnType +>; +export type DagStatsServiceGetDagStatsQueryResult< + TData = DagStatsServiceGetDagStatsDefaultResponse, + TError = unknown, +> = UseQueryResult; +export const useDagStatsServiceGetDagStatsKey = "DagStatsServiceGetDagStats"; +export const UseDagStatsServiceGetDagStatsKeyFn = ( + { + dagIds, + }: { + dagIds?: string[]; + } = {}, + queryKey?: Array, +) => [useDagStatsServiceGetDagStatsKey, ...(queryKey ?? [{ dagIds }])]; +export type DagWarningServiceListDagWarningsDefaultResponse = Awaited< + ReturnType +>; +export type DagWarningServiceListDagWarningsQueryResult< + TData = DagWarningServiceListDagWarningsDefaultResponse, + TError = unknown, +> = UseQueryResult; +export const useDagWarningServiceListDagWarningsKey = + "DagWarningServiceListDagWarnings"; +export const UseDagWarningServiceListDagWarningsKeyFn = ( + { + dagId, + limit, + offset, + orderBy, + warningType, + }: { + dagId?: string; + limit?: number; + offset?: number; + orderBy?: string; + warningType?: DagWarningType; + } = {}, + queryKey?: Array, +) => [ + useDagWarningServiceListDagWarningsKey, + ...(queryKey ?? [{ dagId, limit, offset, orderBy, warningType }]), +]; export type DagServiceGetDagsDefaultResponse = Awaited< ReturnType >; @@ -290,90 +418,6 @@ export const UseDagServiceGetDagDetailsKeyFn = ( }, queryKey?: Array, ) => [useDagServiceGetDagDetailsKey, ...(queryKey ?? [{ dagId }])]; -export type ConnectionServiceGetConnectionDefaultResponse = Awaited< - ReturnType ->; -export type ConnectionServiceGetConnectionQueryResult< - TData = ConnectionServiceGetConnectionDefaultResponse, - TError = unknown, -> = UseQueryResult; -export const useConnectionServiceGetConnectionKey = - "ConnectionServiceGetConnection"; -export const UseConnectionServiceGetConnectionKeyFn = ( - { - connectionId, - }: { - connectionId: string; - }, - queryKey?: Array, -) => [ - useConnectionServiceGetConnectionKey, - ...(queryKey ?? [{ connectionId }]), -]; -export type ConnectionServiceGetConnectionsDefaultResponse = Awaited< - ReturnType ->; -export type ConnectionServiceGetConnectionsQueryResult< - TData = ConnectionServiceGetConnectionsDefaultResponse, - TError = unknown, -> = UseQueryResult; -export const useConnectionServiceGetConnectionsKey = - "ConnectionServiceGetConnections"; -export const UseConnectionServiceGetConnectionsKeyFn = ( - { - limit, - offset, - orderBy, - }: { - limit?: number; - offset?: number; - orderBy?: string; - } = {}, - queryKey?: Array, -) => [ - useConnectionServiceGetConnectionsKey, - ...(queryKey ?? [{ limit, offset, orderBy }]), -]; -export type DagRunServiceGetDagRunDefaultResponse = Awaited< - ReturnType ->; -export type DagRunServiceGetDagRunQueryResult< - TData = DagRunServiceGetDagRunDefaultResponse, - TError = unknown, -> = UseQueryResult; -export const useDagRunServiceGetDagRunKey = "DagRunServiceGetDagRun"; -export const UseDagRunServiceGetDagRunKeyFn = ( - { - dagId, - dagRunId, - }: { - dagId: string; - dagRunId: string; - }, - queryKey?: Array, -) => [useDagRunServiceGetDagRunKey, ...(queryKey ?? [{ dagId, dagRunId }])]; -export type DagSourceServiceGetDagSourceDefaultResponse = Awaited< - ReturnType ->; -export type DagSourceServiceGetDagSourceQueryResult< - TData = DagSourceServiceGetDagSourceDefaultResponse, - TError = unknown, -> = UseQueryResult; -export const useDagSourceServiceGetDagSourceKey = - "DagSourceServiceGetDagSource"; -export const UseDagSourceServiceGetDagSourceKeyFn = ( - { - accept, - fileToken, - }: { - accept?: string; - fileToken: string; - }, - queryKey?: Array, -) => [ - useDagSourceServiceGetDagSourceKey, - ...(queryKey ?? [{ accept, fileToken }]), -]; export type EventLogServiceGetEventLogDefaultResponse = Awaited< ReturnType >; @@ -508,34 +552,6 @@ export const UseMonitorServiceGetHealthKeyFn = (queryKey?: Array) => [ useMonitorServiceGetHealthKey, ...(queryKey ?? []), ]; -export type DagWarningServiceListDagWarningsDefaultResponse = Awaited< - ReturnType ->; -export type DagWarningServiceListDagWarningsQueryResult< - TData = DagWarningServiceListDagWarningsDefaultResponse, - TError = unknown, -> = UseQueryResult; -export const useDagWarningServiceListDagWarningsKey = - "DagWarningServiceListDagWarnings"; -export const UseDagWarningServiceListDagWarningsKeyFn = ( - { - dagId, - limit, - offset, - orderBy, - warningType, - }: { - dagId?: string; - limit?: number; - offset?: number; - orderBy?: string; - warningType?: DagWarningType; - } = {}, - queryKey?: Array, -) => [ - useDagWarningServiceListDagWarningsKey, - ...(queryKey ?? [{ dagId, limit, offset, orderBy, warningType }]), -]; export type PluginServiceGetPluginsDefaultResponse = Awaited< ReturnType >; @@ -867,6 +883,24 @@ export const UseTaskInstanceServiceGetTaskInstancesKeyFn = ( }, ]), ]; +export type TaskServiceGetTaskDefaultResponse = Awaited< + ReturnType +>; +export type TaskServiceGetTaskQueryResult< + TData = TaskServiceGetTaskDefaultResponse, + TError = unknown, +> = UseQueryResult; +export const useTaskServiceGetTaskKey = "TaskServiceGetTask"; +export const UseTaskServiceGetTaskKeyFn = ( + { + dagId, + taskId, + }: { + dagId: string; + taskId: unknown; + }, + queryKey?: Array, +) => [useTaskServiceGetTaskKey, ...(queryKey ?? [{ dagId, taskId }])]; export type VariableServiceGetVariableDefaultResponse = Awaited< ReturnType >; @@ -918,22 +952,6 @@ export const UseVersionServiceGetVersionKeyFn = (queryKey?: Array) => [ useVersionServiceGetVersionKey, ...(queryKey ?? []), ]; -export type DagStatsServiceGetDagStatsDefaultResponse = Awaited< - ReturnType ->; -export type DagStatsServiceGetDagStatsQueryResult< - TData = DagStatsServiceGetDagStatsDefaultResponse, - TError = unknown, -> = UseQueryResult; -export const useDagStatsServiceGetDagStatsKey = "DagStatsServiceGetDagStats"; -export const UseDagStatsServiceGetDagStatsKeyFn = ( - { - dagIds, - }: { - dagIds?: string[]; - } = {}, - queryKey?: Array, -) => [useDagStatsServiceGetDagStatsKey, ...(queryKey ?? [{ dagIds }])]; export type XcomServiceGetXcomEntryDefaultResponse = Awaited< ReturnType >; @@ -967,24 +985,6 @@ export const UseXcomServiceGetXcomEntryKeyFn = ( { dagId, dagRunId, deserialize, mapIndex, stringify, taskId, xcomKey }, ]), ]; -export type TaskServiceGetTaskDefaultResponse = Awaited< - ReturnType ->; -export type TaskServiceGetTaskQueryResult< - TData = TaskServiceGetTaskDefaultResponse, - TError = unknown, -> = UseQueryResult; -export const useTaskServiceGetTaskKey = "TaskServiceGetTask"; -export const UseTaskServiceGetTaskKeyFn = ( - { - dagId, - taskId, - }: { - dagId: string; - taskId: unknown; - }, - queryKey?: Array, -) => [useTaskServiceGetTaskKey, ...(queryKey ?? [{ dagId, taskId }])]; export type BackfillServiceCreateBackfillMutationResult = Awaited< ReturnType >; @@ -1009,33 +1009,33 @@ export type BackfillServiceUnpauseBackfillMutationResult = Awaited< export type BackfillServiceCancelBackfillMutationResult = Awaited< ReturnType >; -export type DagServicePatchDagsMutationResult = Awaited< - ReturnType ->; -export type DagServicePatchDagMutationResult = Awaited< - ReturnType ->; export type ConnectionServicePatchConnectionMutationResult = Awaited< ReturnType >; export type DagRunServicePatchDagRunMutationResult = Awaited< ReturnType >; +export type DagServicePatchDagsMutationResult = Awaited< + ReturnType +>; +export type DagServicePatchDagMutationResult = Awaited< + ReturnType +>; export type PoolServicePatchPoolMutationResult = Awaited< ReturnType >; export type VariableServicePatchVariableMutationResult = Awaited< ReturnType >; -export type DagServiceDeleteDagMutationResult = Awaited< - ReturnType ->; export type ConnectionServiceDeleteConnectionMutationResult = Awaited< ReturnType >; export type DagRunServiceDeleteDagRunMutationResult = Awaited< ReturnType >; +export type DagServiceDeleteDagMutationResult = Awaited< + ReturnType +>; export type PoolServiceDeletePoolMutationResult = Awaited< ReturnType >; diff --git a/airflow/ui/openapi-gen/queries/prefetch.ts b/airflow/ui/openapi-gen/queries/prefetch.ts index 12e95e45ec80d..fc392f2b0d037 100644 --- a/airflow/ui/openapi-gen/queries/prefetch.ts +++ b/airflow/ui/openapi-gen/queries/prefetch.ts @@ -234,6 +234,169 @@ export const prefetchUseBackfillServiceGetBackfill = ( queryKey: Common.UseBackfillServiceGetBackfillKeyFn({ backfillId }), queryFn: () => BackfillService.getBackfill({ backfillId }), }); +/** + * Get Connection + * Get a connection entry. + * @param data The data for the request. + * @param data.connectionId + * @returns ConnectionResponse Successful Response + * @throws ApiError + */ +export const prefetchUseConnectionServiceGetConnection = ( + queryClient: QueryClient, + { + connectionId, + }: { + connectionId: string; + }, +) => + queryClient.prefetchQuery({ + queryKey: Common.UseConnectionServiceGetConnectionKeyFn({ connectionId }), + queryFn: () => ConnectionService.getConnection({ connectionId }), + }); +/** + * Get Connections + * Get all connection entries. + * @param data The data for the request. + * @param data.limit + * @param data.offset + * @param data.orderBy + * @returns ConnectionCollectionResponse Successful Response + * @throws ApiError + */ +export const prefetchUseConnectionServiceGetConnections = ( + queryClient: QueryClient, + { + limit, + offset, + orderBy, + }: { + limit?: number; + offset?: number; + orderBy?: string; + } = {}, +) => + queryClient.prefetchQuery({ + queryKey: Common.UseConnectionServiceGetConnectionsKeyFn({ + limit, + offset, + orderBy, + }), + queryFn: () => ConnectionService.getConnections({ limit, offset, orderBy }), + }); +/** + * Get Dag Run + * @param data The data for the request. + * @param data.dagId + * @param data.dagRunId + * @returns DAGRunResponse Successful Response + * @throws ApiError + */ +export const prefetchUseDagRunServiceGetDagRun = ( + queryClient: QueryClient, + { + dagId, + dagRunId, + }: { + dagId: string; + dagRunId: string; + }, +) => + queryClient.prefetchQuery({ + queryKey: Common.UseDagRunServiceGetDagRunKeyFn({ dagId, dagRunId }), + queryFn: () => DagRunService.getDagRun({ dagId, dagRunId }), + }); +/** + * Get Dag Source + * Get source code using file token. + * @param data The data for the request. + * @param data.fileToken + * @param data.accept + * @returns DAGSourceResponse Successful Response + * @throws ApiError + */ +export const prefetchUseDagSourceServiceGetDagSource = ( + queryClient: QueryClient, + { + accept, + fileToken, + }: { + accept?: string; + fileToken: string; + }, +) => + queryClient.prefetchQuery({ + queryKey: Common.UseDagSourceServiceGetDagSourceKeyFn({ + accept, + fileToken, + }), + queryFn: () => DagSourceService.getDagSource({ accept, fileToken }), + }); +/** + * Get Dag Stats + * Get Dag statistics. + * @param data The data for the request. + * @param data.dagIds + * @returns DagStatsCollectionResponse Successful Response + * @throws ApiError + */ +export const prefetchUseDagStatsServiceGetDagStats = ( + queryClient: QueryClient, + { + dagIds, + }: { + dagIds?: string[]; + } = {}, +) => + queryClient.prefetchQuery({ + queryKey: Common.UseDagStatsServiceGetDagStatsKeyFn({ dagIds }), + queryFn: () => DagStatsService.getDagStats({ dagIds }), + }); +/** + * List Dag Warnings + * Get a list of DAG warnings. + * @param data The data for the request. + * @param data.dagId + * @param data.warningType + * @param data.limit + * @param data.offset + * @param data.orderBy + * @returns DAGWarningCollectionResponse Successful Response + * @throws ApiError + */ +export const prefetchUseDagWarningServiceListDagWarnings = ( + queryClient: QueryClient, + { + dagId, + limit, + offset, + orderBy, + warningType, + }: { + dagId?: string; + limit?: number; + offset?: number; + orderBy?: string; + warningType?: DagWarningType; + } = {}, +) => + queryClient.prefetchQuery({ + queryKey: Common.UseDagWarningServiceListDagWarningsKeyFn({ + dagId, + limit, + offset, + orderBy, + warningType, + }), + queryFn: () => + DagWarningService.listDagWarnings({ + dagId, + limit, + offset, + orderBy, + warningType, + }), + }); /** * Get Dags * Get all DAGs. @@ -379,104 +542,6 @@ export const prefetchUseDagServiceGetDagDetails = ( queryKey: Common.UseDagServiceGetDagDetailsKeyFn({ dagId }), queryFn: () => DagService.getDagDetails({ dagId }), }); -/** - * Get Connection - * Get a connection entry. - * @param data The data for the request. - * @param data.connectionId - * @returns ConnectionResponse Successful Response - * @throws ApiError - */ -export const prefetchUseConnectionServiceGetConnection = ( - queryClient: QueryClient, - { - connectionId, - }: { - connectionId: string; - }, -) => - queryClient.prefetchQuery({ - queryKey: Common.UseConnectionServiceGetConnectionKeyFn({ connectionId }), - queryFn: () => ConnectionService.getConnection({ connectionId }), - }); -/** - * Get Connections - * Get all connection entries. - * @param data The data for the request. - * @param data.limit - * @param data.offset - * @param data.orderBy - * @returns ConnectionCollectionResponse Successful Response - * @throws ApiError - */ -export const prefetchUseConnectionServiceGetConnections = ( - queryClient: QueryClient, - { - limit, - offset, - orderBy, - }: { - limit?: number; - offset?: number; - orderBy?: string; - } = {}, -) => - queryClient.prefetchQuery({ - queryKey: Common.UseConnectionServiceGetConnectionsKeyFn({ - limit, - offset, - orderBy, - }), - queryFn: () => ConnectionService.getConnections({ limit, offset, orderBy }), - }); -/** - * Get Dag Run - * @param data The data for the request. - * @param data.dagId - * @param data.dagRunId - * @returns DAGRunResponse Successful Response - * @throws ApiError - */ -export const prefetchUseDagRunServiceGetDagRun = ( - queryClient: QueryClient, - { - dagId, - dagRunId, - }: { - dagId: string; - dagRunId: string; - }, -) => - queryClient.prefetchQuery({ - queryKey: Common.UseDagRunServiceGetDagRunKeyFn({ dagId, dagRunId }), - queryFn: () => DagRunService.getDagRun({ dagId, dagRunId }), - }); -/** - * Get Dag Source - * Get source code using file token. - * @param data The data for the request. - * @param data.fileToken - * @param data.accept - * @returns DAGSourceResponse Successful Response - * @throws ApiError - */ -export const prefetchUseDagSourceServiceGetDagSource = ( - queryClient: QueryClient, - { - accept, - fileToken, - }: { - accept?: string; - fileToken: string; - }, -) => - queryClient.prefetchQuery({ - queryKey: Common.UseDagSourceServiceGetDagSourceKeyFn({ - accept, - fileToken, - }), - queryFn: () => DagSourceService.getDagSource({ accept, fileToken }), - }); /** * Get Event Log * @param data The data for the request. @@ -649,51 +714,6 @@ export const prefetchUseMonitorServiceGetHealth = (queryClient: QueryClient) => queryKey: Common.UseMonitorServiceGetHealthKeyFn(), queryFn: () => MonitorService.getHealth(), }); -/** - * List Dag Warnings - * Get a list of DAG warnings. - * @param data The data for the request. - * @param data.dagId - * @param data.warningType - * @param data.limit - * @param data.offset - * @param data.orderBy - * @returns DAGWarningCollectionResponse Successful Response - * @throws ApiError - */ -export const prefetchUseDagWarningServiceListDagWarnings = ( - queryClient: QueryClient, - { - dagId, - limit, - offset, - orderBy, - warningType, - }: { - dagId?: string; - limit?: number; - offset?: number; - orderBy?: string; - warningType?: DagWarningType; - } = {}, -) => - queryClient.prefetchQuery({ - queryKey: Common.UseDagWarningServiceListDagWarningsKeyFn({ - dagId, - limit, - offset, - orderBy, - warningType, - }), - queryFn: () => - DagWarningService.listDagWarnings({ - dagId, - limit, - offset, - orderBy, - warningType, - }), - }); /** * Get Plugins * @param data The data for the request. @@ -1174,6 +1194,29 @@ export const prefetchUseTaskInstanceServiceGetTaskInstances = ( updatedAtLte, }), }); +/** + * Get Task + * Get simplified representation of a task. + * @param data The data for the request. + * @param data.dagId + * @param data.taskId + * @returns TaskResponse Successful Response + * @throws ApiError + */ +export const prefetchUseTaskServiceGetTask = ( + queryClient: QueryClient, + { + dagId, + taskId, + }: { + dagId: string; + taskId: unknown; + }, +) => + queryClient.prefetchQuery({ + queryKey: Common.UseTaskServiceGetTaskKeyFn({ dagId, taskId }), + queryFn: () => TaskService.getTask({ dagId, taskId }), + }); /** * Get Variable * Get a variable entry. @@ -1235,26 +1278,6 @@ export const prefetchUseVersionServiceGetVersion = (queryClient: QueryClient) => queryKey: Common.UseVersionServiceGetVersionKeyFn(), queryFn: () => VersionService.getVersion(), }); -/** - * Get Dag Stats - * Get Dag statistics. - * @param data The data for the request. - * @param data.dagIds - * @returns DagStatsCollectionResponse Successful Response - * @throws ApiError - */ -export const prefetchUseDagStatsServiceGetDagStats = ( - queryClient: QueryClient, - { - dagIds, - }: { - dagIds?: string[]; - } = {}, -) => - queryClient.prefetchQuery({ - queryKey: Common.UseDagStatsServiceGetDagStatsKeyFn({ dagIds }), - queryFn: () => DagStatsService.getDagStats({ dagIds }), - }); /** * Get Xcom Entry * Get an XCom entry. @@ -1310,26 +1333,3 @@ export const prefetchUseXcomServiceGetXcomEntry = ( xcomKey, }), }); -/** - * Get Task - * Get simplified representation of a task. - * @param data The data for the request. - * @param data.dagId - * @param data.taskId - * @returns TaskResponse Successful Response - * @throws ApiError - */ -export const prefetchUseTaskServiceGetTask = ( - queryClient: QueryClient, - { - dagId, - taskId, - }: { - dagId: string; - taskId: unknown; - }, -) => - queryClient.prefetchQuery({ - queryKey: Common.UseTaskServiceGetTaskKeyFn({ dagId, taskId }), - queryFn: () => TaskService.getTask({ dagId, taskId }), - }); diff --git a/airflow/ui/openapi-gen/queries/queries.ts b/airflow/ui/openapi-gen/queries/queries.ts index 89c404e25c99a..e18b8c76da47c 100644 --- a/airflow/ui/openapi-gen/queries/queries.ts +++ b/airflow/ui/openapi-gen/queries/queries.ts @@ -293,6 +293,209 @@ export const useBackfillServiceGetBackfill = < queryFn: () => BackfillService.getBackfill({ backfillId }) as TData, ...options, }); +/** + * Get Connection + * Get a connection entry. + * @param data The data for the request. + * @param data.connectionId + * @returns ConnectionResponse Successful Response + * @throws ApiError + */ +export const useConnectionServiceGetConnection = < + TData = Common.ConnectionServiceGetConnectionDefaultResponse, + TError = unknown, + TQueryKey extends Array = unknown[], +>( + { + connectionId, + }: { + connectionId: string; + }, + queryKey?: TQueryKey, + options?: Omit, "queryKey" | "queryFn">, +) => + useQuery({ + queryKey: Common.UseConnectionServiceGetConnectionKeyFn( + { connectionId }, + queryKey, + ), + queryFn: () => ConnectionService.getConnection({ connectionId }) as TData, + ...options, + }); +/** + * Get Connections + * Get all connection entries. + * @param data The data for the request. + * @param data.limit + * @param data.offset + * @param data.orderBy + * @returns ConnectionCollectionResponse Successful Response + * @throws ApiError + */ +export const useConnectionServiceGetConnections = < + TData = Common.ConnectionServiceGetConnectionsDefaultResponse, + TError = unknown, + TQueryKey extends Array = unknown[], +>( + { + limit, + offset, + orderBy, + }: { + limit?: number; + offset?: number; + orderBy?: string; + } = {}, + queryKey?: TQueryKey, + options?: Omit, "queryKey" | "queryFn">, +) => + useQuery({ + queryKey: Common.UseConnectionServiceGetConnectionsKeyFn( + { limit, offset, orderBy }, + queryKey, + ), + queryFn: () => + ConnectionService.getConnections({ limit, offset, orderBy }) as TData, + ...options, + }); +/** + * Get Dag Run + * @param data The data for the request. + * @param data.dagId + * @param data.dagRunId + * @returns DAGRunResponse Successful Response + * @throws ApiError + */ +export const useDagRunServiceGetDagRun = < + TData = Common.DagRunServiceGetDagRunDefaultResponse, + TError = unknown, + TQueryKey extends Array = unknown[], +>( + { + dagId, + dagRunId, + }: { + dagId: string; + dagRunId: string; + }, + queryKey?: TQueryKey, + options?: Omit, "queryKey" | "queryFn">, +) => + useQuery({ + queryKey: Common.UseDagRunServiceGetDagRunKeyFn( + { dagId, dagRunId }, + queryKey, + ), + queryFn: () => DagRunService.getDagRun({ dagId, dagRunId }) as TData, + ...options, + }); +/** + * Get Dag Source + * Get source code using file token. + * @param data The data for the request. + * @param data.fileToken + * @param data.accept + * @returns DAGSourceResponse Successful Response + * @throws ApiError + */ +export const useDagSourceServiceGetDagSource = < + TData = Common.DagSourceServiceGetDagSourceDefaultResponse, + TError = unknown, + TQueryKey extends Array = unknown[], +>( + { + accept, + fileToken, + }: { + accept?: string; + fileToken: string; + }, + queryKey?: TQueryKey, + options?: Omit, "queryKey" | "queryFn">, +) => + useQuery({ + queryKey: Common.UseDagSourceServiceGetDagSourceKeyFn( + { accept, fileToken }, + queryKey, + ), + queryFn: () => + DagSourceService.getDagSource({ accept, fileToken }) as TData, + ...options, + }); +/** + * Get Dag Stats + * Get Dag statistics. + * @param data The data for the request. + * @param data.dagIds + * @returns DagStatsCollectionResponse Successful Response + * @throws ApiError + */ +export const useDagStatsServiceGetDagStats = < + TData = Common.DagStatsServiceGetDagStatsDefaultResponse, + TError = unknown, + TQueryKey extends Array = unknown[], +>( + { + dagIds, + }: { + dagIds?: string[]; + } = {}, + queryKey?: TQueryKey, + options?: Omit, "queryKey" | "queryFn">, +) => + useQuery({ + queryKey: Common.UseDagStatsServiceGetDagStatsKeyFn({ dagIds }, queryKey), + queryFn: () => DagStatsService.getDagStats({ dagIds }) as TData, + ...options, + }); +/** + * List Dag Warnings + * Get a list of DAG warnings. + * @param data The data for the request. + * @param data.dagId + * @param data.warningType + * @param data.limit + * @param data.offset + * @param data.orderBy + * @returns DAGWarningCollectionResponse Successful Response + * @throws ApiError + */ +export const useDagWarningServiceListDagWarnings = < + TData = Common.DagWarningServiceListDagWarningsDefaultResponse, + TError = unknown, + TQueryKey extends Array = unknown[], +>( + { + dagId, + limit, + offset, + orderBy, + warningType, + }: { + dagId?: string; + limit?: number; + offset?: number; + orderBy?: string; + warningType?: DagWarningType; + } = {}, + queryKey?: TQueryKey, + options?: Omit, "queryKey" | "queryFn">, +) => + useQuery({ + queryKey: Common.UseDagWarningServiceListDagWarningsKeyFn( + { dagId, limit, offset, orderBy, warningType }, + queryKey, + ), + queryFn: () => + DagWarningService.listDagWarnings({ + dagId, + limit, + offset, + orderBy, + warningType, + }) as TData, + ...options, + }); /** * Get Dags * Get all DAGs. @@ -468,135 +671,6 @@ export const useDagServiceGetDagDetails = < queryFn: () => DagService.getDagDetails({ dagId }) as TData, ...options, }); -/** - * Get Connection - * Get a connection entry. - * @param data The data for the request. - * @param data.connectionId - * @returns ConnectionResponse Successful Response - * @throws ApiError - */ -export const useConnectionServiceGetConnection = < - TData = Common.ConnectionServiceGetConnectionDefaultResponse, - TError = unknown, - TQueryKey extends Array = unknown[], ->( - { - connectionId, - }: { - connectionId: string; - }, - queryKey?: TQueryKey, - options?: Omit, "queryKey" | "queryFn">, -) => - useQuery({ - queryKey: Common.UseConnectionServiceGetConnectionKeyFn( - { connectionId }, - queryKey, - ), - queryFn: () => ConnectionService.getConnection({ connectionId }) as TData, - ...options, - }); -/** - * Get Connections - * Get all connection entries. - * @param data The data for the request. - * @param data.limit - * @param data.offset - * @param data.orderBy - * @returns ConnectionCollectionResponse Successful Response - * @throws ApiError - */ -export const useConnectionServiceGetConnections = < - TData = Common.ConnectionServiceGetConnectionsDefaultResponse, - TError = unknown, - TQueryKey extends Array = unknown[], ->( - { - limit, - offset, - orderBy, - }: { - limit?: number; - offset?: number; - orderBy?: string; - } = {}, - queryKey?: TQueryKey, - options?: Omit, "queryKey" | "queryFn">, -) => - useQuery({ - queryKey: Common.UseConnectionServiceGetConnectionsKeyFn( - { limit, offset, orderBy }, - queryKey, - ), - queryFn: () => - ConnectionService.getConnections({ limit, offset, orderBy }) as TData, - ...options, - }); -/** - * Get Dag Run - * @param data The data for the request. - * @param data.dagId - * @param data.dagRunId - * @returns DAGRunResponse Successful Response - * @throws ApiError - */ -export const useDagRunServiceGetDagRun = < - TData = Common.DagRunServiceGetDagRunDefaultResponse, - TError = unknown, - TQueryKey extends Array = unknown[], ->( - { - dagId, - dagRunId, - }: { - dagId: string; - dagRunId: string; - }, - queryKey?: TQueryKey, - options?: Omit, "queryKey" | "queryFn">, -) => - useQuery({ - queryKey: Common.UseDagRunServiceGetDagRunKeyFn( - { dagId, dagRunId }, - queryKey, - ), - queryFn: () => DagRunService.getDagRun({ dagId, dagRunId }) as TData, - ...options, - }); -/** - * Get Dag Source - * Get source code using file token. - * @param data The data for the request. - * @param data.fileToken - * @param data.accept - * @returns DAGSourceResponse Successful Response - * @throws ApiError - */ -export const useDagSourceServiceGetDagSource = < - TData = Common.DagSourceServiceGetDagSourceDefaultResponse, - TError = unknown, - TQueryKey extends Array = unknown[], ->( - { - accept, - fileToken, - }: { - accept?: string; - fileToken: string; - }, - queryKey?: TQueryKey, - options?: Omit, "queryKey" | "queryFn">, -) => - useQuery({ - queryKey: Common.UseDagSourceServiceGetDagSourceKeyFn( - { accept, fileToken }, - queryKey, - ), - queryFn: () => - DagSourceService.getDagSource({ accept, fileToken }) as TData, - ...options, - }); /** * Get Event Log * @param data The data for the request. @@ -808,54 +882,6 @@ export const useMonitorServiceGetHealth = < queryFn: () => MonitorService.getHealth() as TData, ...options, }); -/** - * List Dag Warnings - * Get a list of DAG warnings. - * @param data The data for the request. - * @param data.dagId - * @param data.warningType - * @param data.limit - * @param data.offset - * @param data.orderBy - * @returns DAGWarningCollectionResponse Successful Response - * @throws ApiError - */ -export const useDagWarningServiceListDagWarnings = < - TData = Common.DagWarningServiceListDagWarningsDefaultResponse, - TError = unknown, - TQueryKey extends Array = unknown[], ->( - { - dagId, - limit, - offset, - orderBy, - warningType, - }: { - dagId?: string; - limit?: number; - offset?: number; - orderBy?: string; - warningType?: DagWarningType; - } = {}, - queryKey?: TQueryKey, - options?: Omit, "queryKey" | "queryFn">, -) => - useQuery({ - queryKey: Common.UseDagWarningServiceListDagWarningsKeyFn( - { dagId, limit, offset, orderBy, warningType }, - queryKey, - ), - queryFn: () => - DagWarningService.listDagWarnings({ - dagId, - limit, - offset, - orderBy, - warningType, - }) as TData, - ...options, - }); /** * Get Plugins * @param data The data for the request. @@ -1404,6 +1430,35 @@ export const useTaskInstanceServiceGetTaskInstances = < }) as TData, ...options, }); +/** + * Get Task + * Get simplified representation of a task. + * @param data The data for the request. + * @param data.dagId + * @param data.taskId + * @returns TaskResponse Successful Response + * @throws ApiError + */ +export const useTaskServiceGetTask = < + TData = Common.TaskServiceGetTaskDefaultResponse, + TError = unknown, + TQueryKey extends Array = unknown[], +>( + { + dagId, + taskId, + }: { + dagId: string; + taskId: unknown; + }, + queryKey?: TQueryKey, + options?: Omit, "queryKey" | "queryFn">, +) => + useQuery({ + queryKey: Common.UseTaskServiceGetTaskKeyFn({ dagId, taskId }, queryKey), + queryFn: () => TaskService.getTask({ dagId, taskId }) as TData, + ...options, + }); /** * Get Variable * Get a variable entry. @@ -1488,32 +1543,6 @@ export const useVersionServiceGetVersion = < queryFn: () => VersionService.getVersion() as TData, ...options, }); -/** - * Get Dag Stats - * Get Dag statistics. - * @param data The data for the request. - * @param data.dagIds - * @returns DagStatsCollectionResponse Successful Response - * @throws ApiError - */ -export const useDagStatsServiceGetDagStats = < - TData = Common.DagStatsServiceGetDagStatsDefaultResponse, - TError = unknown, - TQueryKey extends Array = unknown[], ->( - { - dagIds, - }: { - dagIds?: string[]; - } = {}, - queryKey?: TQueryKey, - options?: Omit, "queryKey" | "queryFn">, -) => - useQuery({ - queryKey: Common.UseDagStatsServiceGetDagStatsKeyFn({ dagIds }, queryKey), - queryFn: () => DagStatsService.getDagStats({ dagIds }) as TData, - ...options, - }); /** * Get Xcom Entry * Get an XCom entry. @@ -1554,49 +1583,20 @@ export const useXcomServiceGetXcomEntry = < options?: Omit, "queryKey" | "queryFn">, ) => useQuery({ - queryKey: Common.UseXcomServiceGetXcomEntryKeyFn( - { dagId, dagRunId, deserialize, mapIndex, stringify, taskId, xcomKey }, - queryKey, - ), - queryFn: () => - XcomService.getXcomEntry({ - dagId, - dagRunId, - deserialize, - mapIndex, - stringify, - taskId, - xcomKey, - }) as TData, - ...options, - }); -/** - * Get Task - * Get simplified representation of a task. - * @param data The data for the request. - * @param data.dagId - * @param data.taskId - * @returns TaskResponse Successful Response - * @throws ApiError - */ -export const useTaskServiceGetTask = < - TData = Common.TaskServiceGetTaskDefaultResponse, - TError = unknown, - TQueryKey extends Array = unknown[], ->( - { - dagId, - taskId, - }: { - dagId: string; - taskId: unknown; - }, - queryKey?: TQueryKey, - options?: Omit, "queryKey" | "queryFn">, -) => - useQuery({ - queryKey: Common.UseTaskServiceGetTaskKeyFn({ dagId, taskId }, queryKey), - queryFn: () => TaskService.getTask({ dagId, taskId }) as TData, + queryKey: Common.UseXcomServiceGetXcomEntryKeyFn( + { dagId, dagRunId, deserialize, mapIndex, stringify, taskId, xcomKey }, + queryKey, + ), + queryFn: () => + XcomService.getXcomEntry({ + dagId, + dagRunId, + deserialize, + mapIndex, + stringify, + taskId, + xcomKey, + }) as TData, ...options, }); /** @@ -1910,24 +1910,17 @@ export const useBackfillServiceCancelBackfill = < ...options, }); /** - * Patch Dags - * Patch multiple DAGs. + * Patch Connection + * Update a connection entry. * @param data The data for the request. + * @param data.connectionId * @param data.requestBody * @param data.updateMask - * @param data.limit - * @param data.offset - * @param data.tags - * @param data.owners - * @param data.dagIdPattern - * @param data.onlyActive - * @param data.paused - * @param data.lastDagRunState - * @returns DAGCollectionResponse Successful Response + * @returns ConnectionResponse Successful Response * @throws ApiError */ -export const useDagServicePatchDags = < - TData = Common.DagServicePatchDagsMutationResult, +export const useConnectionServicePatchConnection = < + TData = Common.ConnectionServicePatchConnectionMutationResult, TError = unknown, TContext = unknown, >( @@ -1936,15 +1929,8 @@ export const useDagServicePatchDags = < TData, TError, { - dagIdPattern?: string; - lastDagRunState?: DagRunState; - limit?: number; - offset?: number; - onlyActive?: boolean; - owners?: string[]; - paused?: boolean; - requestBody: DAGPatchBody; - tags?: string[]; + connectionId: string; + requestBody: ConnectionBody; updateMask?: string[]; }, TContext @@ -1956,57 +1942,33 @@ export const useDagServicePatchDags = < TData, TError, { - dagIdPattern?: string; - lastDagRunState?: DagRunState; - limit?: number; - offset?: number; - onlyActive?: boolean; - owners?: string[]; - paused?: boolean; - requestBody: DAGPatchBody; - tags?: string[]; + connectionId: string; + requestBody: ConnectionBody; updateMask?: string[]; }, TContext >({ - mutationFn: ({ - dagIdPattern, - lastDagRunState, - limit, - offset, - onlyActive, - owners, - paused, - requestBody, - tags, - updateMask, - }) => - DagService.patchDags({ - dagIdPattern, - lastDagRunState, - limit, - offset, - onlyActive, - owners, - paused, + mutationFn: ({ connectionId, requestBody, updateMask }) => + ConnectionService.patchConnection({ + connectionId, requestBody, - tags, updateMask, }) as unknown as Promise, ...options, }); /** - * Patch Dag - * Patch the specific DAG. + * Patch Dag Run + * Modify a DAG Run. * @param data The data for the request. * @param data.dagId + * @param data.dagRunId * @param data.requestBody * @param data.updateMask - * @returns DAGResponse Successful Response + * @returns DAGRunResponse Successful Response * @throws ApiError */ -export const useDagServicePatchDag = < - TData = Common.DagServicePatchDagMutationResult, +export const useDagRunServicePatchDagRun = < + TData = Common.DagRunServicePatchDagRunMutationResult, TError = unknown, TContext = unknown, >( @@ -2016,7 +1978,8 @@ export const useDagServicePatchDag = < TError, { dagId: string; - requestBody: DAGPatchBody; + dagRunId: string; + requestBody: DAGRunPatchBody; updateMask?: string[]; }, TContext @@ -2029,31 +1992,40 @@ export const useDagServicePatchDag = < TError, { dagId: string; - requestBody: DAGPatchBody; + dagRunId: string; + requestBody: DAGRunPatchBody; updateMask?: string[]; }, TContext >({ - mutationFn: ({ dagId, requestBody, updateMask }) => - DagService.patchDag({ + mutationFn: ({ dagId, dagRunId, requestBody, updateMask }) => + DagRunService.patchDagRun({ dagId, + dagRunId, requestBody, updateMask, }) as unknown as Promise, ...options, }); /** - * Patch Connection - * Update a connection entry. + * Patch Dags + * Patch multiple DAGs. * @param data The data for the request. - * @param data.connectionId * @param data.requestBody * @param data.updateMask - * @returns ConnectionResponse Successful Response + * @param data.limit + * @param data.offset + * @param data.tags + * @param data.owners + * @param data.dagIdPattern + * @param data.onlyActive + * @param data.paused + * @param data.lastDagRunState + * @returns DAGCollectionResponse Successful Response * @throws ApiError */ -export const useConnectionServicePatchConnection = < - TData = Common.ConnectionServicePatchConnectionMutationResult, +export const useDagServicePatchDags = < + TData = Common.DagServicePatchDagsMutationResult, TError = unknown, TContext = unknown, >( @@ -2062,8 +2034,15 @@ export const useConnectionServicePatchConnection = < TData, TError, { - connectionId: string; - requestBody: ConnectionBody; + dagIdPattern?: string; + lastDagRunState?: DagRunState; + limit?: number; + offset?: number; + onlyActive?: boolean; + owners?: string[]; + paused?: boolean; + requestBody: DAGPatchBody; + tags?: string[]; updateMask?: string[]; }, TContext @@ -2075,33 +2054,57 @@ export const useConnectionServicePatchConnection = < TData, TError, { - connectionId: string; - requestBody: ConnectionBody; + dagIdPattern?: string; + lastDagRunState?: DagRunState; + limit?: number; + offset?: number; + onlyActive?: boolean; + owners?: string[]; + paused?: boolean; + requestBody: DAGPatchBody; + tags?: string[]; updateMask?: string[]; }, TContext >({ - mutationFn: ({ connectionId, requestBody, updateMask }) => - ConnectionService.patchConnection({ - connectionId, + mutationFn: ({ + dagIdPattern, + lastDagRunState, + limit, + offset, + onlyActive, + owners, + paused, + requestBody, + tags, + updateMask, + }) => + DagService.patchDags({ + dagIdPattern, + lastDagRunState, + limit, + offset, + onlyActive, + owners, + paused, requestBody, + tags, updateMask, }) as unknown as Promise, ...options, }); /** - * Patch Dag Run - * Modify a DAG Run. + * Patch Dag + * Patch the specific DAG. * @param data The data for the request. * @param data.dagId - * @param data.dagRunId * @param data.requestBody * @param data.updateMask - * @returns DAGRunResponse Successful Response + * @returns DAGResponse Successful Response * @throws ApiError */ -export const useDagRunServicePatchDagRun = < - TData = Common.DagRunServicePatchDagRunMutationResult, +export const useDagServicePatchDag = < + TData = Common.DagServicePatchDagMutationResult, TError = unknown, TContext = unknown, >( @@ -2111,8 +2114,7 @@ export const useDagRunServicePatchDagRun = < TError, { dagId: string; - dagRunId: string; - requestBody: DAGRunPatchBody; + requestBody: DAGPatchBody; updateMask?: string[]; }, TContext @@ -2125,16 +2127,14 @@ export const useDagRunServicePatchDagRun = < TError, { dagId: string; - dagRunId: string; - requestBody: DAGRunPatchBody; + requestBody: DAGPatchBody; updateMask?: string[]; }, TContext >({ - mutationFn: ({ dagId, dagRunId, requestBody, updateMask }) => - DagRunService.patchDagRun({ + mutationFn: ({ dagId, requestBody, updateMask }) => + DagService.patchDag({ dagId, - dagRunId, requestBody, updateMask, }) as unknown as Promise, @@ -2235,15 +2235,15 @@ export const useVariableServicePatchVariable = < ...options, }); /** - * Delete Dag - * Delete the specific DAG. + * Delete Connection + * Delete a connection entry. * @param data The data for the request. - * @param data.dagId - * @returns unknown Successful Response + * @param data.connectionId + * @returns void Successful Response * @throws ApiError */ -export const useDagServiceDeleteDag = < - TData = Common.DagServiceDeleteDagMutationResult, +export const useConnectionServiceDeleteConnection = < + TData = Common.ConnectionServiceDeleteConnectionMutationResult, TError = unknown, TContext = unknown, >( @@ -2252,7 +2252,7 @@ export const useDagServiceDeleteDag = < TData, TError, { - dagId: string; + connectionId: string; }, TContext >, @@ -2263,24 +2263,27 @@ export const useDagServiceDeleteDag = < TData, TError, { - dagId: string; + connectionId: string; }, TContext >({ - mutationFn: ({ dagId }) => - DagService.deleteDag({ dagId }) as unknown as Promise, + mutationFn: ({ connectionId }) => + ConnectionService.deleteConnection({ + connectionId, + }) as unknown as Promise, ...options, }); /** - * Delete Connection - * Delete a connection entry. + * Delete Dag Run + * Delete a DAG Run entry. * @param data The data for the request. - * @param data.connectionId + * @param data.dagId + * @param data.dagRunId * @returns void Successful Response * @throws ApiError */ -export const useConnectionServiceDeleteConnection = < - TData = Common.ConnectionServiceDeleteConnectionMutationResult, +export const useDagRunServiceDeleteDagRun = < + TData = Common.DagRunServiceDeleteDagRunMutationResult, TError = unknown, TContext = unknown, >( @@ -2289,7 +2292,8 @@ export const useConnectionServiceDeleteConnection = < TData, TError, { - connectionId: string; + dagId: string; + dagRunId: string; }, TContext >, @@ -2300,27 +2304,28 @@ export const useConnectionServiceDeleteConnection = < TData, TError, { - connectionId: string; + dagId: string; + dagRunId: string; }, TContext >({ - mutationFn: ({ connectionId }) => - ConnectionService.deleteConnection({ - connectionId, + mutationFn: ({ dagId, dagRunId }) => + DagRunService.deleteDagRun({ + dagId, + dagRunId, }) as unknown as Promise, ...options, }); /** - * Delete Dag Run - * Delete a DAG Run entry. + * Delete Dag + * Delete the specific DAG. * @param data The data for the request. * @param data.dagId - * @param data.dagRunId - * @returns void Successful Response + * @returns unknown Successful Response * @throws ApiError */ -export const useDagRunServiceDeleteDagRun = < - TData = Common.DagRunServiceDeleteDagRunMutationResult, +export const useDagServiceDeleteDag = < + TData = Common.DagServiceDeleteDagMutationResult, TError = unknown, TContext = unknown, >( @@ -2330,7 +2335,6 @@ export const useDagRunServiceDeleteDagRun = < TError, { dagId: string; - dagRunId: string; }, TContext >, @@ -2342,15 +2346,11 @@ export const useDagRunServiceDeleteDagRun = < TError, { dagId: string; - dagRunId: string; }, TContext >({ - mutationFn: ({ dagId, dagRunId }) => - DagRunService.deleteDagRun({ - dagId, - dagRunId, - }) as unknown as Promise, + mutationFn: ({ dagId }) => + DagService.deleteDag({ dagId }) as unknown as Promise, ...options, }); /** diff --git a/airflow/ui/openapi-gen/queries/suspense.ts b/airflow/ui/openapi-gen/queries/suspense.ts index 1b243a76af098..8c0b78c86d776 100644 --- a/airflow/ui/openapi-gen/queries/suspense.ts +++ b/airflow/ui/openapi-gen/queries/suspense.ts @@ -278,6 +278,209 @@ export const useBackfillServiceGetBackfillSuspense = < queryFn: () => BackfillService.getBackfill({ backfillId }) as TData, ...options, }); +/** + * Get Connection + * Get a connection entry. + * @param data The data for the request. + * @param data.connectionId + * @returns ConnectionResponse Successful Response + * @throws ApiError + */ +export const useConnectionServiceGetConnectionSuspense = < + TData = Common.ConnectionServiceGetConnectionDefaultResponse, + TError = unknown, + TQueryKey extends Array = unknown[], +>( + { + connectionId, + }: { + connectionId: string; + }, + queryKey?: TQueryKey, + options?: Omit, "queryKey" | "queryFn">, +) => + useSuspenseQuery({ + queryKey: Common.UseConnectionServiceGetConnectionKeyFn( + { connectionId }, + queryKey, + ), + queryFn: () => ConnectionService.getConnection({ connectionId }) as TData, + ...options, + }); +/** + * Get Connections + * Get all connection entries. + * @param data The data for the request. + * @param data.limit + * @param data.offset + * @param data.orderBy + * @returns ConnectionCollectionResponse Successful Response + * @throws ApiError + */ +export const useConnectionServiceGetConnectionsSuspense = < + TData = Common.ConnectionServiceGetConnectionsDefaultResponse, + TError = unknown, + TQueryKey extends Array = unknown[], +>( + { + limit, + offset, + orderBy, + }: { + limit?: number; + offset?: number; + orderBy?: string; + } = {}, + queryKey?: TQueryKey, + options?: Omit, "queryKey" | "queryFn">, +) => + useSuspenseQuery({ + queryKey: Common.UseConnectionServiceGetConnectionsKeyFn( + { limit, offset, orderBy }, + queryKey, + ), + queryFn: () => + ConnectionService.getConnections({ limit, offset, orderBy }) as TData, + ...options, + }); +/** + * Get Dag Run + * @param data The data for the request. + * @param data.dagId + * @param data.dagRunId + * @returns DAGRunResponse Successful Response + * @throws ApiError + */ +export const useDagRunServiceGetDagRunSuspense = < + TData = Common.DagRunServiceGetDagRunDefaultResponse, + TError = unknown, + TQueryKey extends Array = unknown[], +>( + { + dagId, + dagRunId, + }: { + dagId: string; + dagRunId: string; + }, + queryKey?: TQueryKey, + options?: Omit, "queryKey" | "queryFn">, +) => + useSuspenseQuery({ + queryKey: Common.UseDagRunServiceGetDagRunKeyFn( + { dagId, dagRunId }, + queryKey, + ), + queryFn: () => DagRunService.getDagRun({ dagId, dagRunId }) as TData, + ...options, + }); +/** + * Get Dag Source + * Get source code using file token. + * @param data The data for the request. + * @param data.fileToken + * @param data.accept + * @returns DAGSourceResponse Successful Response + * @throws ApiError + */ +export const useDagSourceServiceGetDagSourceSuspense = < + TData = Common.DagSourceServiceGetDagSourceDefaultResponse, + TError = unknown, + TQueryKey extends Array = unknown[], +>( + { + accept, + fileToken, + }: { + accept?: string; + fileToken: string; + }, + queryKey?: TQueryKey, + options?: Omit, "queryKey" | "queryFn">, +) => + useSuspenseQuery({ + queryKey: Common.UseDagSourceServiceGetDagSourceKeyFn( + { accept, fileToken }, + queryKey, + ), + queryFn: () => + DagSourceService.getDagSource({ accept, fileToken }) as TData, + ...options, + }); +/** + * Get Dag Stats + * Get Dag statistics. + * @param data The data for the request. + * @param data.dagIds + * @returns DagStatsCollectionResponse Successful Response + * @throws ApiError + */ +export const useDagStatsServiceGetDagStatsSuspense = < + TData = Common.DagStatsServiceGetDagStatsDefaultResponse, + TError = unknown, + TQueryKey extends Array = unknown[], +>( + { + dagIds, + }: { + dagIds?: string[]; + } = {}, + queryKey?: TQueryKey, + options?: Omit, "queryKey" | "queryFn">, +) => + useSuspenseQuery({ + queryKey: Common.UseDagStatsServiceGetDagStatsKeyFn({ dagIds }, queryKey), + queryFn: () => DagStatsService.getDagStats({ dagIds }) as TData, + ...options, + }); +/** + * List Dag Warnings + * Get a list of DAG warnings. + * @param data The data for the request. + * @param data.dagId + * @param data.warningType + * @param data.limit + * @param data.offset + * @param data.orderBy + * @returns DAGWarningCollectionResponse Successful Response + * @throws ApiError + */ +export const useDagWarningServiceListDagWarningsSuspense = < + TData = Common.DagWarningServiceListDagWarningsDefaultResponse, + TError = unknown, + TQueryKey extends Array = unknown[], +>( + { + dagId, + limit, + offset, + orderBy, + warningType, + }: { + dagId?: string; + limit?: number; + offset?: number; + orderBy?: string; + warningType?: DagWarningType; + } = {}, + queryKey?: TQueryKey, + options?: Omit, "queryKey" | "queryFn">, +) => + useSuspenseQuery({ + queryKey: Common.UseDagWarningServiceListDagWarningsKeyFn( + { dagId, limit, offset, orderBy, warningType }, + queryKey, + ), + queryFn: () => + DagWarningService.listDagWarnings({ + dagId, + limit, + offset, + orderBy, + warningType, + }) as TData, + ...options, + }); /** * Get Dags * Get all DAGs. @@ -453,135 +656,6 @@ export const useDagServiceGetDagDetailsSuspense = < queryFn: () => DagService.getDagDetails({ dagId }) as TData, ...options, }); -/** - * Get Connection - * Get a connection entry. - * @param data The data for the request. - * @param data.connectionId - * @returns ConnectionResponse Successful Response - * @throws ApiError - */ -export const useConnectionServiceGetConnectionSuspense = < - TData = Common.ConnectionServiceGetConnectionDefaultResponse, - TError = unknown, - TQueryKey extends Array = unknown[], ->( - { - connectionId, - }: { - connectionId: string; - }, - queryKey?: TQueryKey, - options?: Omit, "queryKey" | "queryFn">, -) => - useSuspenseQuery({ - queryKey: Common.UseConnectionServiceGetConnectionKeyFn( - { connectionId }, - queryKey, - ), - queryFn: () => ConnectionService.getConnection({ connectionId }) as TData, - ...options, - }); -/** - * Get Connections - * Get all connection entries. - * @param data The data for the request. - * @param data.limit - * @param data.offset - * @param data.orderBy - * @returns ConnectionCollectionResponse Successful Response - * @throws ApiError - */ -export const useConnectionServiceGetConnectionsSuspense = < - TData = Common.ConnectionServiceGetConnectionsDefaultResponse, - TError = unknown, - TQueryKey extends Array = unknown[], ->( - { - limit, - offset, - orderBy, - }: { - limit?: number; - offset?: number; - orderBy?: string; - } = {}, - queryKey?: TQueryKey, - options?: Omit, "queryKey" | "queryFn">, -) => - useSuspenseQuery({ - queryKey: Common.UseConnectionServiceGetConnectionsKeyFn( - { limit, offset, orderBy }, - queryKey, - ), - queryFn: () => - ConnectionService.getConnections({ limit, offset, orderBy }) as TData, - ...options, - }); -/** - * Get Dag Run - * @param data The data for the request. - * @param data.dagId - * @param data.dagRunId - * @returns DAGRunResponse Successful Response - * @throws ApiError - */ -export const useDagRunServiceGetDagRunSuspense = < - TData = Common.DagRunServiceGetDagRunDefaultResponse, - TError = unknown, - TQueryKey extends Array = unknown[], ->( - { - dagId, - dagRunId, - }: { - dagId: string; - dagRunId: string; - }, - queryKey?: TQueryKey, - options?: Omit, "queryKey" | "queryFn">, -) => - useSuspenseQuery({ - queryKey: Common.UseDagRunServiceGetDagRunKeyFn( - { dagId, dagRunId }, - queryKey, - ), - queryFn: () => DagRunService.getDagRun({ dagId, dagRunId }) as TData, - ...options, - }); -/** - * Get Dag Source - * Get source code using file token. - * @param data The data for the request. - * @param data.fileToken - * @param data.accept - * @returns DAGSourceResponse Successful Response - * @throws ApiError - */ -export const useDagSourceServiceGetDagSourceSuspense = < - TData = Common.DagSourceServiceGetDagSourceDefaultResponse, - TError = unknown, - TQueryKey extends Array = unknown[], ->( - { - accept, - fileToken, - }: { - accept?: string; - fileToken: string; - }, - queryKey?: TQueryKey, - options?: Omit, "queryKey" | "queryFn">, -) => - useSuspenseQuery({ - queryKey: Common.UseDagSourceServiceGetDagSourceKeyFn( - { accept, fileToken }, - queryKey, - ), - queryFn: () => - DagSourceService.getDagSource({ accept, fileToken }) as TData, - ...options, - }); /** * Get Event Log * @param data The data for the request. @@ -793,54 +867,6 @@ export const useMonitorServiceGetHealthSuspense = < queryFn: () => MonitorService.getHealth() as TData, ...options, }); -/** - * List Dag Warnings - * Get a list of DAG warnings. - * @param data The data for the request. - * @param data.dagId - * @param data.warningType - * @param data.limit - * @param data.offset - * @param data.orderBy - * @returns DAGWarningCollectionResponse Successful Response - * @throws ApiError - */ -export const useDagWarningServiceListDagWarningsSuspense = < - TData = Common.DagWarningServiceListDagWarningsDefaultResponse, - TError = unknown, - TQueryKey extends Array = unknown[], ->( - { - dagId, - limit, - offset, - orderBy, - warningType, - }: { - dagId?: string; - limit?: number; - offset?: number; - orderBy?: string; - warningType?: DagWarningType; - } = {}, - queryKey?: TQueryKey, - options?: Omit, "queryKey" | "queryFn">, -) => - useSuspenseQuery({ - queryKey: Common.UseDagWarningServiceListDagWarningsKeyFn( - { dagId, limit, offset, orderBy, warningType }, - queryKey, - ), - queryFn: () => - DagWarningService.listDagWarnings({ - dagId, - limit, - offset, - orderBy, - warningType, - }) as TData, - ...options, - }); /** * Get Plugins * @param data The data for the request. @@ -1389,6 +1415,35 @@ export const useTaskInstanceServiceGetTaskInstancesSuspense = < }) as TData, ...options, }); +/** + * Get Task + * Get simplified representation of a task. + * @param data The data for the request. + * @param data.dagId + * @param data.taskId + * @returns TaskResponse Successful Response + * @throws ApiError + */ +export const useTaskServiceGetTaskSuspense = < + TData = Common.TaskServiceGetTaskDefaultResponse, + TError = unknown, + TQueryKey extends Array = unknown[], +>( + { + dagId, + taskId, + }: { + dagId: string; + taskId: unknown; + }, + queryKey?: TQueryKey, + options?: Omit, "queryKey" | "queryFn">, +) => + useSuspenseQuery({ + queryKey: Common.UseTaskServiceGetTaskKeyFn({ dagId, taskId }, queryKey), + queryFn: () => TaskService.getTask({ dagId, taskId }) as TData, + ...options, + }); /** * Get Variable * Get a variable entry. @@ -1473,32 +1528,6 @@ export const useVersionServiceGetVersionSuspense = < queryFn: () => VersionService.getVersion() as TData, ...options, }); -/** - * Get Dag Stats - * Get Dag statistics. - * @param data The data for the request. - * @param data.dagIds - * @returns DagStatsCollectionResponse Successful Response - * @throws ApiError - */ -export const useDagStatsServiceGetDagStatsSuspense = < - TData = Common.DagStatsServiceGetDagStatsDefaultResponse, - TError = unknown, - TQueryKey extends Array = unknown[], ->( - { - dagIds, - }: { - dagIds?: string[]; - } = {}, - queryKey?: TQueryKey, - options?: Omit, "queryKey" | "queryFn">, -) => - useSuspenseQuery({ - queryKey: Common.UseDagStatsServiceGetDagStatsKeyFn({ dagIds }, queryKey), - queryFn: () => DagStatsService.getDagStats({ dagIds }) as TData, - ...options, - }); /** * Get Xcom Entry * Get an XCom entry. @@ -1555,32 +1584,3 @@ export const useXcomServiceGetXcomEntrySuspense = < }) as TData, ...options, }); -/** - * Get Task - * Get simplified representation of a task. - * @param data The data for the request. - * @param data.dagId - * @param data.taskId - * @returns TaskResponse Successful Response - * @throws ApiError - */ -export const useTaskServiceGetTaskSuspense = < - TData = Common.TaskServiceGetTaskDefaultResponse, - TError = unknown, - TQueryKey extends Array = unknown[], ->( - { - dagId, - taskId, - }: { - dagId: string; - taskId: unknown; - }, - queryKey?: TQueryKey, - options?: Omit, "queryKey" | "queryFn">, -) => - useSuspenseQuery({ - queryKey: Common.UseTaskServiceGetTaskKeyFn({ dagId, taskId }, queryKey), - queryFn: () => TaskService.getTask({ dagId, taskId }) as TData, - ...options, - }); diff --git a/airflow/ui/openapi-gen/requests/services.gen.ts b/airflow/ui/openapi-gen/requests/services.gen.ts index 935200104a429..6115073ea27b6 100644 --- a/airflow/ui/openapi-gen/requests/services.gen.ts +++ b/airflow/ui/openapi-gen/requests/services.gen.ts @@ -23,20 +23,6 @@ import type { UnpauseBackfillResponse, CancelBackfillData, CancelBackfillResponse, - GetDagsData, - GetDagsResponse, - PatchDagsData, - PatchDagsResponse, - GetDagTagsData, - GetDagTagsResponse, - GetDagData, - GetDagResponse, - PatchDagData, - PatchDagResponse, - DeleteDagData, - DeleteDagResponse, - GetDagDetailsData, - GetDagDetailsResponse, DeleteConnectionData, DeleteConnectionResponse, GetConnectionData, @@ -57,6 +43,24 @@ import type { PatchDagRunResponse, GetDagSourceData, GetDagSourceResponse, + GetDagStatsData, + GetDagStatsResponse, + ListDagWarningsData, + ListDagWarningsResponse, + GetDagsData, + GetDagsResponse, + PatchDagsData, + PatchDagsResponse, + GetDagTagsData, + GetDagTagsResponse, + GetDagData, + GetDagResponse, + PatchDagData, + PatchDagResponse, + DeleteDagData, + DeleteDagResponse, + GetDagDetailsData, + GetDagDetailsResponse, GetEventLogData, GetEventLogResponse, GetEventLogsData, @@ -66,8 +70,6 @@ import type { GetImportErrorsData, GetImportErrorsResponse, GetHealthResponse, - ListDagWarningsData, - ListDagWarningsResponse, GetPluginsData, GetPluginsResponse, DeletePoolData, @@ -94,6 +96,8 @@ import type { GetMappedTaskInstanceResponse, GetTaskInstancesData, GetTaskInstancesResponse, + GetTaskData, + GetTaskResponse, DeleteVariableData, DeleteVariableResponse, GetVariableData, @@ -105,12 +109,8 @@ import type { PostVariableData, PostVariableResponse, GetVersionResponse, - GetDagStatsData, - GetDagStatsResponse, GetXcomEntryData, GetXcomEntryResponse, - GetTaskData, - GetTaskResponse, } from "./types.gen"; export class AssetService { @@ -402,81 +402,80 @@ export class BackfillService { } } -export class DagService { +export class ConnectionService { /** - * Get Dags - * Get all DAGs. + * Delete Connection + * Delete a connection entry. * @param data The data for the request. - * @param data.limit - * @param data.offset - * @param data.tags - * @param data.owners - * @param data.dagIdPattern - * @param data.dagDisplayNamePattern - * @param data.onlyActive - * @param data.paused - * @param data.lastDagRunState - * @param data.orderBy - * @returns DAGCollectionResponse Successful Response + * @param data.connectionId + * @returns void Successful Response * @throws ApiError */ - public static getDags( - data: GetDagsData = {}, - ): CancelablePromise { + public static deleteConnection( + data: DeleteConnectionData, + ): CancelablePromise { + return __request(OpenAPI, { + method: "DELETE", + url: "/public/connections/{connection_id}", + path: { + connection_id: data.connectionId, + }, + errors: { + 401: "Unauthorized", + 403: "Forbidden", + 404: "Not Found", + 422: "Validation Error", + }, + }); + } + + /** + * Get Connection + * Get a connection entry. + * @param data The data for the request. + * @param data.connectionId + * @returns ConnectionResponse Successful Response + * @throws ApiError + */ + public static getConnection( + data: GetConnectionData, + ): CancelablePromise { return __request(OpenAPI, { method: "GET", - url: "/public/dags/", - query: { - limit: data.limit, - offset: data.offset, - tags: data.tags, - owners: data.owners, - dag_id_pattern: data.dagIdPattern, - dag_display_name_pattern: data.dagDisplayNamePattern, - only_active: data.onlyActive, - paused: data.paused, - last_dag_run_state: data.lastDagRunState, - order_by: data.orderBy, + url: "/public/connections/{connection_id}", + path: { + connection_id: data.connectionId, }, errors: { + 401: "Unauthorized", + 403: "Forbidden", + 404: "Not Found", 422: "Validation Error", }, }); } /** - * Patch Dags - * Patch multiple DAGs. + * Patch Connection + * Update a connection entry. * @param data The data for the request. + * @param data.connectionId * @param data.requestBody * @param data.updateMask - * @param data.limit - * @param data.offset - * @param data.tags - * @param data.owners - * @param data.dagIdPattern - * @param data.onlyActive - * @param data.paused - * @param data.lastDagRunState - * @returns DAGCollectionResponse Successful Response + * @returns ConnectionResponse Successful Response * @throws ApiError */ - public static patchDags( - data: PatchDagsData, - ): CancelablePromise { + public static patchConnection( + data: PatchConnectionData, + ): CancelablePromise { return __request(OpenAPI, { method: "PATCH", - url: "/public/dags/", + url: "/public/connections/{connection_id}", + path: { + connection_id: data.connectionId, + }, query: { update_mask: data.updateMask, - limit: data.limit, - offset: data.offset, - tags: data.tags, - owners: data.owners, - dag_id_pattern: data.dagIdPattern, - only_active: data.onlyActive, - paused: data.paused, - last_dag_run_state: data.lastDagRunState, }, body: data.requestBody, mediaType: "application/json", @@ -491,87 +490,109 @@ export class DagService { } /** - * Get Dag Tags - * Get all DAG tags. + * Get Connections + * Get all connection entries. * @param data The data for the request. * @param data.limit * @param data.offset * @param data.orderBy - * @param data.tagNamePattern - * @returns DAGTagCollectionResponse Successful Response + * @returns ConnectionCollectionResponse Successful Response * @throws ApiError */ - public static getDagTags( - data: GetDagTagsData = {}, - ): CancelablePromise { + public static getConnections( + data: GetConnectionsData = {}, + ): CancelablePromise { return __request(OpenAPI, { method: "GET", - url: "/public/dags/tags", + url: "/public/connections/", query: { limit: data.limit, offset: data.offset, order_by: data.orderBy, - tag_name_pattern: data.tagNamePattern, }, errors: { 401: "Unauthorized", 403: "Forbidden", + 404: "Not Found", 422: "Validation Error", }, }); } /** - * Get Dag - * Get basic information about a DAG. + * Post Connection + * Create connection entry. * @param data The data for the request. - * @param data.dagId - * @returns DAGResponse Successful Response + * @param data.requestBody + * @returns ConnectionResponse Successful Response * @throws ApiError */ - public static getDag(data: GetDagData): CancelablePromise { + public static postConnection( + data: PostConnectionData, + ): CancelablePromise { return __request(OpenAPI, { - method: "GET", - url: "/public/dags/{dag_id}", - path: { - dag_id: data.dagId, + method: "POST", + url: "/public/connections/", + body: data.requestBody, + mediaType: "application/json", + errors: { + 401: "Unauthorized", + 403: "Forbidden", + 409: "Conflict", + 422: "Validation Error", }, + }); + } + + /** + * Test Connection + * Test an API connection. + * + * This method first creates an in-memory transient conn_id & exports that to an env var, + * as some hook classes tries to find out the `conn` from their __init__ method & errors out if not found. + * It also deletes the conn id env variable after the test. + * @param data The data for the request. + * @param data.requestBody + * @returns ConnectionTestResponse Successful Response + * @throws ApiError + */ + public static testConnection( + data: TestConnectionData, + ): CancelablePromise { + return __request(OpenAPI, { + method: "POST", + url: "/public/connections/test", + body: data.requestBody, + mediaType: "application/json", errors: { - 400: "Bad Request", 401: "Unauthorized", 403: "Forbidden", - 404: "Not Found", - 422: "Unprocessable Entity", + 422: "Validation Error", }, }); } +} +export class DagRunService { /** - * Patch Dag - * Patch the specific DAG. + * Get Dag Run * @param data The data for the request. * @param data.dagId - * @param data.requestBody - * @param data.updateMask - * @returns DAGResponse Successful Response + * @param data.dagRunId + * @returns DAGRunResponse Successful Response * @throws ApiError */ - public static patchDag( - data: PatchDagData, - ): CancelablePromise { + public static getDagRun( + data: GetDagRunData, + ): CancelablePromise { return __request(OpenAPI, { - method: "PATCH", - url: "/public/dags/{dag_id}", + method: "GET", + url: "/public/dags/{dag_id}/dagRuns/{dag_run_id}", path: { dag_id: data.dagId, + dag_run_id: data.dagRunId, }, - query: { - update_mask: data.updateMask, - }, - body: data.requestBody, - mediaType: "application/json", errors: { - 400: "Bad Request", 401: "Unauthorized", 403: "Forbidden", 404: "Not Found", @@ -581,49 +602,60 @@ export class DagService { } /** - * Delete Dag - * Delete the specific DAG. + * Delete Dag Run + * Delete a DAG Run entry. * @param data The data for the request. * @param data.dagId - * @returns unknown Successful Response + * @param data.dagRunId + * @returns void Successful Response * @throws ApiError */ - public static deleteDag( - data: DeleteDagData, - ): CancelablePromise { + public static deleteDagRun( + data: DeleteDagRunData, + ): CancelablePromise { return __request(OpenAPI, { method: "DELETE", - url: "/public/dags/{dag_id}", + url: "/public/dags/{dag_id}/dagRuns/{dag_run_id}", path: { dag_id: data.dagId, + dag_run_id: data.dagRunId, }, errors: { 400: "Bad Request", 401: "Unauthorized", 403: "Forbidden", 404: "Not Found", - 422: "Unprocessable Entity", + 422: "Validation Error", }, }); } /** - * Get Dag Details - * Get details of DAG. + * Patch Dag Run + * Modify a DAG Run. * @param data The data for the request. * @param data.dagId - * @returns DAGDetailsResponse Successful Response + * @param data.dagRunId + * @param data.requestBody + * @param data.updateMask + * @returns DAGRunResponse Successful Response * @throws ApiError */ - public static getDagDetails( - data: GetDagDetailsData, - ): CancelablePromise { + public static patchDagRun( + data: PatchDagRunData, + ): CancelablePromise { return __request(OpenAPI, { - method: "GET", - url: "/public/dags/{dag_id}/details", + method: "PATCH", + url: "/public/dags/{dag_id}/dagRuns/{dag_run_id}", path: { dag_id: data.dagId, + dag_run_id: data.dagRunId, }, + query: { + update_mask: data.updateMask, + }, + body: data.requestBody, + mediaType: "application/json", errors: { 400: "Bad Request", 401: "Unauthorized", @@ -635,51 +667,60 @@ export class DagService { } } -export class ConnectionService { +export class DagSourceService { /** - * Delete Connection - * Delete a connection entry. + * Get Dag Source + * Get source code using file token. * @param data The data for the request. - * @param data.connectionId - * @returns void Successful Response + * @param data.fileToken + * @param data.accept + * @returns DAGSourceResponse Successful Response * @throws ApiError */ - public static deleteConnection( - data: DeleteConnectionData, - ): CancelablePromise { + public static getDagSource( + data: GetDagSourceData, + ): CancelablePromise { return __request(OpenAPI, { - method: "DELETE", - url: "/public/connections/{connection_id}", + method: "GET", + url: "/public/dagSources/{file_token}", path: { - connection_id: data.connectionId, + file_token: data.fileToken, + }, + headers: { + accept: data.accept, }, errors: { + 400: "Bad Request", 401: "Unauthorized", 403: "Forbidden", 404: "Not Found", + 406: "Not Acceptable", 422: "Validation Error", }, }); } +} +export class DagStatsService { /** - * Get Connection - * Get a connection entry. + * Get Dag Stats + * Get Dag statistics. * @param data The data for the request. - * @param data.connectionId - * @returns ConnectionResponse Successful Response + * @param data.dagIds + * @returns DagStatsCollectionResponse Successful Response * @throws ApiError */ - public static getConnection( - data: GetConnectionData, - ): CancelablePromise { + public static getDagStats( + data: GetDagStatsData = {}, + ): CancelablePromise { return __request(OpenAPI, { method: "GET", - url: "/public/connections/{connection_id}", - path: { - connection_id: data.connectionId, + url: "/public/dagStats/", + query: { + dag_ids: data.dagIds, }, errors: { + 400: "Bad Request", 401: "Unauthorized", 403: "Forbidden", 404: "Not Found", @@ -687,116 +728,154 @@ export class ConnectionService { }, }); } +} +export class DagWarningService { /** - * Patch Connection - * Update a connection entry. + * List Dag Warnings + * Get a list of DAG warnings. * @param data The data for the request. - * @param data.connectionId - * @param data.requestBody - * @param data.updateMask - * @returns ConnectionResponse Successful Response + * @param data.dagId + * @param data.warningType + * @param data.limit + * @param data.offset + * @param data.orderBy + * @returns DAGWarningCollectionResponse Successful Response * @throws ApiError */ - public static patchConnection( - data: PatchConnectionData, - ): CancelablePromise { + public static listDagWarnings( + data: ListDagWarningsData = {}, + ): CancelablePromise { return __request(OpenAPI, { - method: "PATCH", - url: "/public/connections/{connection_id}", - path: { - connection_id: data.connectionId, - }, + method: "GET", + url: "/public/dagWarnings", query: { - update_mask: data.updateMask, + dag_id: data.dagId, + warning_type: data.warningType, + limit: data.limit, + offset: data.offset, + order_by: data.orderBy, }, - body: data.requestBody, - mediaType: "application/json", errors: { - 400: "Bad Request", 401: "Unauthorized", 403: "Forbidden", - 404: "Not Found", 422: "Validation Error", }, }); } +} +export class DagService { /** - * Get Connections - * Get all connection entries. + * Get Dags + * Get all DAGs. * @param data The data for the request. * @param data.limit * @param data.offset + * @param data.tags + * @param data.owners + * @param data.dagIdPattern + * @param data.dagDisplayNamePattern + * @param data.onlyActive + * @param data.paused + * @param data.lastDagRunState * @param data.orderBy - * @returns ConnectionCollectionResponse Successful Response + * @returns DAGCollectionResponse Successful Response * @throws ApiError */ - public static getConnections( - data: GetConnectionsData = {}, - ): CancelablePromise { + public static getDags( + data: GetDagsData = {}, + ): CancelablePromise { return __request(OpenAPI, { method: "GET", - url: "/public/connections/", + url: "/public/dags/", query: { limit: data.limit, offset: data.offset, + tags: data.tags, + owners: data.owners, + dag_id_pattern: data.dagIdPattern, + dag_display_name_pattern: data.dagDisplayNamePattern, + only_active: data.onlyActive, + paused: data.paused, + last_dag_run_state: data.lastDagRunState, order_by: data.orderBy, }, errors: { - 401: "Unauthorized", - 403: "Forbidden", - 404: "Not Found", 422: "Validation Error", }, }); } /** - * Post Connection - * Create connection entry. + * Patch Dags + * Patch multiple DAGs. * @param data The data for the request. * @param data.requestBody - * @returns ConnectionResponse Successful Response + * @param data.updateMask + * @param data.limit + * @param data.offset + * @param data.tags + * @param data.owners + * @param data.dagIdPattern + * @param data.onlyActive + * @param data.paused + * @param data.lastDagRunState + * @returns DAGCollectionResponse Successful Response * @throws ApiError */ - public static postConnection( - data: PostConnectionData, - ): CancelablePromise { + public static patchDags( + data: PatchDagsData, + ): CancelablePromise { return __request(OpenAPI, { - method: "POST", - url: "/public/connections/", + method: "PATCH", + url: "/public/dags/", + query: { + update_mask: data.updateMask, + limit: data.limit, + offset: data.offset, + tags: data.tags, + owners: data.owners, + dag_id_pattern: data.dagIdPattern, + only_active: data.onlyActive, + paused: data.paused, + last_dag_run_state: data.lastDagRunState, + }, body: data.requestBody, mediaType: "application/json", errors: { + 400: "Bad Request", 401: "Unauthorized", 403: "Forbidden", - 409: "Conflict", + 404: "Not Found", 422: "Validation Error", }, }); } /** - * Test Connection - * Test an API connection. - * - * This method first creates an in-memory transient conn_id & exports that to an env var, - * as some hook classes tries to find out the `conn` from their __init__ method & errors out if not found. - * It also deletes the conn id env variable after the test. + * Get Dag Tags + * Get all DAG tags. * @param data The data for the request. - * @param data.requestBody - * @returns ConnectionTestResponse Successful Response + * @param data.limit + * @param data.offset + * @param data.orderBy + * @param data.tagNamePattern + * @returns DAGTagCollectionResponse Successful Response * @throws ApiError */ - public static testConnection( - data: TestConnectionData, - ): CancelablePromise { + public static getDagTags( + data: GetDagTagsData = {}, + ): CancelablePromise { return __request(OpenAPI, { - method: "POST", - url: "/public/connections/test", - body: data.requestBody, - mediaType: "application/json", + method: "GET", + url: "/public/dags/tags", + query: { + limit: data.limit, + offset: data.offset, + order_by: data.orderBy, + tag_name_pattern: data.tagNamePattern, + }, errors: { 401: "Unauthorized", 403: "Forbidden", @@ -804,55 +883,56 @@ export class ConnectionService { }, }); } -} -export class DagRunService { /** - * Get Dag Run + * Get Dag + * Get basic information about a DAG. * @param data The data for the request. * @param data.dagId - * @param data.dagRunId - * @returns DAGRunResponse Successful Response + * @returns DAGResponse Successful Response * @throws ApiError */ - public static getDagRun( - data: GetDagRunData, - ): CancelablePromise { + public static getDag(data: GetDagData): CancelablePromise { return __request(OpenAPI, { method: "GET", - url: "/public/dags/{dag_id}/dagRuns/{dag_run_id}", + url: "/public/dags/{dag_id}", path: { dag_id: data.dagId, - dag_run_id: data.dagRunId, }, errors: { + 400: "Bad Request", 401: "Unauthorized", 403: "Forbidden", 404: "Not Found", - 422: "Validation Error", + 422: "Unprocessable Entity", }, }); } /** - * Delete Dag Run - * Delete a DAG Run entry. + * Patch Dag + * Patch the specific DAG. * @param data The data for the request. * @param data.dagId - * @param data.dagRunId - * @returns void Successful Response + * @param data.requestBody + * @param data.updateMask + * @returns DAGResponse Successful Response * @throws ApiError */ - public static deleteDagRun( - data: DeleteDagRunData, - ): CancelablePromise { + public static patchDag( + data: PatchDagData, + ): CancelablePromise { return __request(OpenAPI, { - method: "DELETE", - url: "/public/dags/{dag_id}/dagRuns/{dag_run_id}", + method: "PATCH", + url: "/public/dags/{dag_id}", path: { dag_id: data.dagId, - dag_run_id: data.dagRunId, }, + query: { + update_mask: data.updateMask, + }, + body: data.requestBody, + mediaType: "application/json", errors: { 400: "Bad Request", 401: "Unauthorized", @@ -864,70 +944,54 @@ export class DagRunService { } /** - * Patch Dag Run - * Modify a DAG Run. + * Delete Dag + * Delete the specific DAG. * @param data The data for the request. * @param data.dagId - * @param data.dagRunId - * @param data.requestBody - * @param data.updateMask - * @returns DAGRunResponse Successful Response + * @returns unknown Successful Response * @throws ApiError */ - public static patchDagRun( - data: PatchDagRunData, - ): CancelablePromise { + public static deleteDag( + data: DeleteDagData, + ): CancelablePromise { return __request(OpenAPI, { - method: "PATCH", - url: "/public/dags/{dag_id}/dagRuns/{dag_run_id}", + method: "DELETE", + url: "/public/dags/{dag_id}", path: { dag_id: data.dagId, - dag_run_id: data.dagRunId, - }, - query: { - update_mask: data.updateMask, }, - body: data.requestBody, - mediaType: "application/json", errors: { 400: "Bad Request", 401: "Unauthorized", 403: "Forbidden", 404: "Not Found", - 422: "Validation Error", + 422: "Unprocessable Entity", }, }); } -} -export class DagSourceService { /** - * Get Dag Source - * Get source code using file token. + * Get Dag Details + * Get details of DAG. * @param data The data for the request. - * @param data.fileToken - * @param data.accept - * @returns DAGSourceResponse Successful Response + * @param data.dagId + * @returns DAGDetailsResponse Successful Response * @throws ApiError */ - public static getDagSource( - data: GetDagSourceData, - ): CancelablePromise { + public static getDagDetails( + data: GetDagDetailsData, + ): CancelablePromise { return __request(OpenAPI, { method: "GET", - url: "/public/dagSources/{file_token}", + url: "/public/dags/{dag_id}/details", path: { - file_token: data.fileToken, - }, - headers: { - accept: data.accept, + dag_id: data.dagId, }, errors: { 400: "Bad Request", 401: "Unauthorized", 403: "Forbidden", 404: "Not Found", - 406: "Not Acceptable", 422: "Validation Error", }, }); @@ -1083,41 +1147,6 @@ export class MonitorService { } } -export class DagWarningService { - /** - * List Dag Warnings - * Get a list of DAG warnings. - * @param data The data for the request. - * @param data.dagId - * @param data.warningType - * @param data.limit - * @param data.offset - * @param data.orderBy - * @returns DAGWarningCollectionResponse Successful Response - * @throws ApiError - */ - public static listDagWarnings( - data: ListDagWarningsData = {}, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/public/dagWarnings", - query: { - dag_id: data.dagId, - warning_type: data.warningType, - limit: data.limit, - offset: data.offset, - order_by: data.orderBy, - }, - errors: { - 401: "Unauthorized", - 403: "Forbidden", - 422: "Validation Error", - }, - }); - } -} - export class PluginService { /** * Get Plugins @@ -1575,6 +1604,35 @@ export class TaskInstanceService { } } +export class TaskService { + /** + * Get Task + * Get simplified representation of a task. + * @param data The data for the request. + * @param data.dagId + * @param data.taskId + * @returns TaskResponse Successful Response + * @throws ApiError + */ + public static getTask(data: GetTaskData): CancelablePromise { + return __request(OpenAPI, { + method: "GET", + url: "/public/dags/{dag_id}/tasks/{task_id}", + path: { + dag_id: data.dagId, + task_id: data.taskId, + }, + errors: { + 400: "Bad Request", + 401: "Unauthorized", + 403: "Forbidden", + 404: "Not Found", + 422: "Validation Error", + }, + }); + } +} + export class VariableService { /** * Delete Variable @@ -1731,35 +1789,6 @@ export class VersionService { } } -export class DagStatsService { - /** - * Get Dag Stats - * Get Dag statistics. - * @param data The data for the request. - * @param data.dagIds - * @returns DagStatsCollectionResponse Successful Response - * @throws ApiError - */ - public static getDagStats( - data: GetDagStatsData = {}, - ): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/public/dagStats/", - query: { - dag_ids: data.dagIds, - }, - errors: { - 400: "Bad Request", - 401: "Unauthorized", - 403: "Forbidden", - 404: "Not Found", - 422: "Validation Error", - }, - }); - } -} - export class XcomService { /** * Get Xcom Entry @@ -1802,32 +1831,3 @@ export class XcomService { }); } } - -export class TaskService { - /** - * Get Task - * Get simplified representation of a task. - * @param data The data for the request. - * @param data.dagId - * @param data.taskId - * @returns TaskResponse Successful Response - * @throws ApiError - */ - public static getTask(data: GetTaskData): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/public/dags/{dag_id}/tasks/{task_id}", - path: { - dag_id: data.dagId, - task_id: data.taskId, - }, - errors: { - 400: "Bad Request", - 401: "Unauthorized", - 403: "Forbidden", - 404: "Not Found", - 422: "Validation Error", - }, - }); - } -} diff --git a/airflow/ui/openapi-gen/requests/types.gen.ts b/airflow/ui/openapi-gen/requests/types.gen.ts index 78b8d0c66b9d4..98c29ebdd7962 100644 --- a/airflow/ui/openapi-gen/requests/types.gen.ts +++ b/airflow/ui/openapi-gen/requests/types.gen.ts @@ -964,71 +964,6 @@ export type CancelBackfillData = { export type CancelBackfillResponse = unknown; -export type GetDagsData = { - dagDisplayNamePattern?: string | null; - dagIdPattern?: string | null; - lastDagRunState?: DagRunState | null; - limit?: number; - offset?: number; - onlyActive?: boolean; - orderBy?: string; - owners?: Array; - paused?: boolean | null; - tags?: Array; -}; - -export type GetDagsResponse = DAGCollectionResponse; - -export type PatchDagsData = { - dagIdPattern?: string | null; - lastDagRunState?: DagRunState | null; - limit?: number; - offset?: number; - onlyActive?: boolean; - owners?: Array; - paused?: boolean | null; - requestBody: DAGPatchBody; - tags?: Array; - updateMask?: Array | null; -}; - -export type PatchDagsResponse = DAGCollectionResponse; - -export type GetDagTagsData = { - limit?: number; - offset?: number; - orderBy?: string; - tagNamePattern?: string | null; -}; - -export type GetDagTagsResponse = DAGTagCollectionResponse; - -export type GetDagData = { - dagId: string; -}; - -export type GetDagResponse = DAGResponse; - -export type PatchDagData = { - dagId: string; - requestBody: DAGPatchBody; - updateMask?: Array | null; -}; - -export type PatchDagResponse = DAGResponse; - -export type DeleteDagData = { - dagId: string; -}; - -export type DeleteDagResponse = unknown; - -export type GetDagDetailsData = { - dagId: string; -}; - -export type GetDagDetailsResponse = DAGDetailsResponse; - export type DeleteConnectionData = { connectionId: string; }; @@ -1099,6 +1034,87 @@ export type GetDagSourceData = { export type GetDagSourceResponse = DAGSourceResponse; +export type GetDagStatsData = { + dagIds?: Array; +}; + +export type GetDagStatsResponse = DagStatsCollectionResponse; + +export type ListDagWarningsData = { + dagId?: string | null; + limit?: number; + offset?: number; + orderBy?: string; + warningType?: DagWarningType | null; +}; + +export type ListDagWarningsResponse = DAGWarningCollectionResponse; + +export type GetDagsData = { + dagDisplayNamePattern?: string | null; + dagIdPattern?: string | null; + lastDagRunState?: DagRunState | null; + limit?: number; + offset?: number; + onlyActive?: boolean; + orderBy?: string; + owners?: Array; + paused?: boolean | null; + tags?: Array; +}; + +export type GetDagsResponse = DAGCollectionResponse; + +export type PatchDagsData = { + dagIdPattern?: string | null; + lastDagRunState?: DagRunState | null; + limit?: number; + offset?: number; + onlyActive?: boolean; + owners?: Array; + paused?: boolean | null; + requestBody: DAGPatchBody; + tags?: Array; + updateMask?: Array | null; +}; + +export type PatchDagsResponse = DAGCollectionResponse; + +export type GetDagTagsData = { + limit?: number; + offset?: number; + orderBy?: string; + tagNamePattern?: string | null; +}; + +export type GetDagTagsResponse = DAGTagCollectionResponse; + +export type GetDagData = { + dagId: string; +}; + +export type GetDagResponse = DAGResponse; + +export type PatchDagData = { + dagId: string; + requestBody: DAGPatchBody; + updateMask?: Array | null; +}; + +export type PatchDagResponse = DAGResponse; + +export type DeleteDagData = { + dagId: string; +}; + +export type DeleteDagResponse = unknown; + +export type GetDagDetailsData = { + dagId: string; +}; + +export type GetDagDetailsResponse = DAGDetailsResponse; + export type GetEventLogData = { eventLogId: number; }; @@ -1140,16 +1156,6 @@ export type GetImportErrorsResponse = ImportErrorCollectionResponse; export type GetHealthResponse = HealthInfoSchema; -export type ListDagWarningsData = { - dagId?: string | null; - limit?: number; - offset?: number; - orderBy?: string; - warningType?: DagWarningType | null; -}; - -export type ListDagWarningsResponse = DAGWarningCollectionResponse; - export type GetPluginsData = { limit?: number; offset?: number; @@ -1284,6 +1290,13 @@ export type GetTaskInstancesData = { export type GetTaskInstancesResponse = TaskInstanceCollectionResponse; +export type GetTaskData = { + dagId: string; + taskId: unknown; +}; + +export type GetTaskResponse = TaskResponse; + export type DeleteVariableData = { variableKey: string; }; @@ -1320,12 +1333,6 @@ export type PostVariableResponse = VariableResponse; export type GetVersionResponse = VersionInfo; -export type GetDagStatsData = { - dagIds?: Array; -}; - -export type GetDagStatsResponse = DagStatsCollectionResponse; - export type GetXcomEntryData = { dagId: string; dagRunId: string; @@ -1338,13 +1345,6 @@ export type GetXcomEntryData = { export type GetXcomEntryResponse = XComResponseNative | XComResponseString; -export type GetTaskData = { - dagId: string; - taskId: unknown; -}; - -export type GetTaskResponse = TaskResponse; - export type $OpenApiTs = { "/ui/next_run_assets/{dag_id}": { get: { @@ -1596,14 +1596,51 @@ export type $OpenApiTs = { }; }; }; - "/public/dags/": { + "/public/connections/{connection_id}": { + delete: { + req: DeleteConnectionData; + res: { + /** + * Successful Response + */ + 204: void; + /** + * Unauthorized + */ + 401: HTTPExceptionResponse; + /** + * Forbidden + */ + 403: HTTPExceptionResponse; + /** + * Not Found + */ + 404: HTTPExceptionResponse; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; get: { - req: GetDagsData; + req: GetConnectionData; res: { /** * Successful Response */ - 200: DAGCollectionResponse; + 200: ConnectionResponse; + /** + * Unauthorized + */ + 401: HTTPExceptionResponse; + /** + * Forbidden + */ + 403: HTTPExceptionResponse; + /** + * Not Found + */ + 404: HTTPExceptionResponse; /** * Validation Error */ @@ -1611,12 +1648,12 @@ export type $OpenApiTs = { }; }; patch: { - req: PatchDagsData; + req: PatchConnectionData; res: { /** * Successful Response */ - 200: DAGCollectionResponse; + 200: ConnectionResponse; /** * Bad Request */ @@ -1640,14 +1677,14 @@ export type $OpenApiTs = { }; }; }; - "/public/dags/tags": { + "/public/connections/": { get: { - req: GetDagTagsData; + req: GetConnectionsData; res: { /** * Successful Response */ - 200: DAGTagCollectionResponse; + 200: ConnectionCollectionResponse; /** * Unauthorized */ @@ -1656,25 +1693,23 @@ export type $OpenApiTs = { * Forbidden */ 403: HTTPExceptionResponse; + /** + * Not Found + */ + 404: HTTPExceptionResponse; /** * Validation Error */ 422: HTTPValidationError; }; }; - }; - "/public/dags/{dag_id}": { - get: { - req: GetDagData; + post: { + req: PostConnectionData; res: { /** * Successful Response */ - 200: DAGResponse; - /** - * Bad Request - */ - 400: HTTPExceptionResponse; + 201: ConnectionResponse; /** * Unauthorized */ @@ -1684,26 +1719,47 @@ export type $OpenApiTs = { */ 403: HTTPExceptionResponse; /** - * Not Found + * Conflict */ - 404: HTTPExceptionResponse; + 409: HTTPExceptionResponse; /** - * Unprocessable Entity + * Validation Error */ - 422: HTTPExceptionResponse; + 422: HTTPValidationError; }; }; - patch: { - req: PatchDagData; + }; + "/public/connections/test": { + post: { + req: TestConnectionData; res: { /** * Successful Response */ - 200: DAGResponse; + 200: ConnectionTestResponse; /** - * Bad Request + * Unauthorized + */ + 401: HTTPExceptionResponse; + /** + * Forbidden + */ + 403: HTTPExceptionResponse; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/public/dags/{dag_id}/dagRuns/{dag_run_id}": { + get: { + req: GetDagRunData; + res: { + /** + * Successful Response */ - 400: HTTPExceptionResponse; + 200: DAGRunResponse; /** * Unauthorized */ @@ -1723,12 +1779,12 @@ export type $OpenApiTs = { }; }; delete: { - req: DeleteDagData; + req: DeleteDagRunData; res: { /** * Successful Response */ - 200: unknown; + 204: void; /** * Bad Request */ @@ -1746,20 +1802,18 @@ export type $OpenApiTs = { */ 404: HTTPExceptionResponse; /** - * Unprocessable Entity + * Validation Error */ - 422: HTTPExceptionResponse; + 422: HTTPValidationError; }; }; - }; - "/public/dags/{dag_id}/details": { - get: { - req: GetDagDetailsData; + patch: { + req: PatchDagRunData; res: { /** * Successful Response */ - 200: DAGDetailsResponse; + 200: DAGRunResponse; /** * Bad Request */ @@ -1783,14 +1837,18 @@ export type $OpenApiTs = { }; }; }; - "/public/connections/{connection_id}": { - delete: { - req: DeleteConnectionData; + "/public/dagSources/{file_token}": { + get: { + req: GetDagSourceData; res: { /** * Successful Response */ - 204: void; + 200: DAGSourceResponse; + /** + * Bad Request + */ + 400: HTTPExceptionResponse; /** * Unauthorized */ @@ -1803,19 +1861,29 @@ export type $OpenApiTs = { * Not Found */ 404: HTTPExceptionResponse; + /** + * Not Acceptable + */ + 406: HTTPExceptionResponse; /** * Validation Error */ 422: HTTPValidationError; }; }; + }; + "/public/dagStats/": { get: { - req: GetConnectionData; + req: GetDagStatsData; res: { /** * Successful Response */ - 200: ConnectionResponse; + 200: DagStatsCollectionResponse; + /** + * Bad Request + */ + 400: HTTPExceptionResponse; /** * Unauthorized */ @@ -1834,17 +1902,15 @@ export type $OpenApiTs = { 422: HTTPValidationError; }; }; - patch: { - req: PatchConnectionData; + }; + "/public/dagWarnings": { + get: { + req: ListDagWarningsData; res: { /** * Successful Response */ - 200: ConnectionResponse; - /** - * Bad Request - */ - 400: HTTPExceptionResponse; + 200: DAGWarningCollectionResponse; /** * Unauthorized */ @@ -1853,10 +1919,6 @@ export type $OpenApiTs = { * Forbidden */ 403: HTTPExceptionResponse; - /** - * Not Found - */ - 404: HTTPExceptionResponse; /** * Validation Error */ @@ -1864,39 +1926,31 @@ export type $OpenApiTs = { }; }; }; - "/public/connections/": { + "/public/dags/": { get: { - req: GetConnectionsData; + req: GetDagsData; res: { /** * Successful Response */ - 200: ConnectionCollectionResponse; - /** - * Unauthorized - */ - 401: HTTPExceptionResponse; - /** - * Forbidden - */ - 403: HTTPExceptionResponse; - /** - * Not Found - */ - 404: HTTPExceptionResponse; + 200: DAGCollectionResponse; /** * Validation Error */ 422: HTTPValidationError; }; }; - post: { - req: PostConnectionData; + patch: { + req: PatchDagsData; res: { /** * Successful Response */ - 201: ConnectionResponse; + 200: DAGCollectionResponse; + /** + * Bad Request + */ + 400: HTTPExceptionResponse; /** * Unauthorized */ @@ -1906,9 +1960,9 @@ export type $OpenApiTs = { */ 403: HTTPExceptionResponse; /** - * Conflict + * Not Found */ - 409: HTTPExceptionResponse; + 404: HTTPExceptionResponse; /** * Validation Error */ @@ -1916,14 +1970,14 @@ export type $OpenApiTs = { }; }; }; - "/public/connections/test": { - post: { - req: TestConnectionData; + "/public/dags/tags": { + get: { + req: GetDagTagsData; res: { /** * Successful Response */ - 200: ConnectionTestResponse; + 200: DAGTagCollectionResponse; /** * Unauthorized */ @@ -1939,14 +1993,18 @@ export type $OpenApiTs = { }; }; }; - "/public/dags/{dag_id}/dagRuns/{dag_run_id}": { + "/public/dags/{dag_id}": { get: { - req: GetDagRunData; + req: GetDagData; res: { /** * Successful Response */ - 200: DAGRunResponse; + 200: DAGResponse; + /** + * Bad Request + */ + 400: HTTPExceptionResponse; /** * Unauthorized */ @@ -1960,18 +2018,18 @@ export type $OpenApiTs = { */ 404: HTTPExceptionResponse; /** - * Validation Error + * Unprocessable Entity */ - 422: HTTPValidationError; + 422: HTTPExceptionResponse; }; }; - delete: { - req: DeleteDagRunData; + patch: { + req: PatchDagData; res: { /** * Successful Response */ - 204: void; + 200: DAGResponse; /** * Bad Request */ @@ -1994,13 +2052,13 @@ export type $OpenApiTs = { 422: HTTPValidationError; }; }; - patch: { - req: PatchDagRunData; + delete: { + req: DeleteDagData; res: { /** * Successful Response */ - 200: DAGRunResponse; + 200: unknown; /** * Bad Request */ @@ -2018,20 +2076,20 @@ export type $OpenApiTs = { */ 404: HTTPExceptionResponse; /** - * Validation Error + * Unprocessable Entity */ - 422: HTTPValidationError; + 422: HTTPExceptionResponse; }; }; }; - "/public/dagSources/{file_token}": { + "/public/dags/{dag_id}/details": { get: { - req: GetDagSourceData; + req: GetDagDetailsData; res: { /** * Successful Response */ - 200: DAGSourceResponse; + 200: DAGDetailsResponse; /** * Bad Request */ @@ -2048,10 +2106,6 @@ export type $OpenApiTs = { * Not Found */ 404: HTTPExceptionResponse; - /** - * Not Acceptable - */ - 406: HTTPExceptionResponse; /** * Validation Error */ @@ -2169,29 +2223,6 @@ export type $OpenApiTs = { }; }; }; - "/public/dagWarnings": { - get: { - req: ListDagWarningsData; - res: { - /** - * Successful Response - */ - 200: DAGWarningCollectionResponse; - /** - * Unauthorized - */ - 401: HTTPExceptionResponse; - /** - * Forbidden - */ - 403: HTTPExceptionResponse; - /** - * Validation Error - */ - 422: HTTPValidationError; - }; - }; - }; "/public/plugins/": { get: { req: GetPluginsData; @@ -2517,6 +2548,37 @@ export type $OpenApiTs = { }; }; }; + "/public/dags/{dag_id}/tasks/{task_id}": { + get: { + req: GetTaskData; + res: { + /** + * Successful Response + */ + 200: TaskResponse; + /** + * Bad Request + */ + 400: HTTPExceptionResponse; + /** + * Unauthorized + */ + 401: HTTPExceptionResponse; + /** + * Forbidden + */ + 403: HTTPExceptionResponse; + /** + * Not Found + */ + 404: HTTPExceptionResponse; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; "/public/variables/{variable_key}": { delete: { req: DeleteVariableData; @@ -2652,37 +2714,6 @@ export type $OpenApiTs = { }; }; }; - "/public/dagStats/": { - get: { - req: GetDagStatsData; - res: { - /** - * Successful Response - */ - 200: DagStatsCollectionResponse; - /** - * Bad Request - */ - 400: HTTPExceptionResponse; - /** - * Unauthorized - */ - 401: HTTPExceptionResponse; - /** - * Forbidden - */ - 403: HTTPExceptionResponse; - /** - * Not Found - */ - 404: HTTPExceptionResponse; - /** - * Validation Error - */ - 422: HTTPValidationError; - }; - }; - }; "/public/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/xcomEntries/{xcom_key}": { get: { req: GetXcomEntryData; @@ -2714,35 +2745,4 @@ export type $OpenApiTs = { }; }; }; - "/public/dags/{dag_id}/tasks/{task_id}": { - get: { - req: GetTaskData; - res: { - /** - * Successful Response - */ - 200: TaskResponse; - /** - * Bad Request - */ - 400: HTTPExceptionResponse; - /** - * Unauthorized - */ - 401: HTTPExceptionResponse; - /** - * Forbidden - */ - 403: HTTPExceptionResponse; - /** - * Not Found - */ - 404: HTTPExceptionResponse; - /** - * Validation Error - */ - 422: HTTPValidationError; - }; - }; - }; };