Coverage for /home/airflow/.local/lib/python3.12/site-packages/airflow/api_fastapi/auth/managers/models/batch_apis.py: 85%

18 statements  

« prev     ^ index     » next       coverage.py v7.15.2, created at 2026-10-07 14:22 +0000

1# 

2# Licensed to the Apache Software Foundation (ASF) under one 

3# or more contributor license agreements. See the NOTICE file 

4# distributed with this work for additional information 

5# regarding copyright ownership. The ASF licenses this file 

6# to you under the Apache License, Version 2.0 (the 

7# "License"); you may not use this file except in compliance 

8# with the License. You may obtain a copy of the License at 

9# 

10# http://www.apache.org/licenses/LICENSE-2.0 

11# 

12# Unless required by applicable law or agreed to in writing, 

13# software distributed under the License is distributed on an 

14# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 

15# KIND, either express or implied. See the License for the 

16# specific language governing permissions and limitations 

17# under the License. 

18from __future__ import annotations 

19 

20from typing import TYPE_CHECKING, TypedDict 

21 

22if TYPE_CHECKING: 22 ↛ 23line 22 didn't jump to line 23 because the condition on line 22 was never true

23 from airflow.api_fastapi.auth.managers.base_auth_manager import ResourceMethod 

24 from airflow.api_fastapi.auth.managers.models.resource_details import ( 

25 ConnectionDetails, 

26 DagAccessEntity, 

27 DagDetails, 

28 PoolDetails, 

29 VariableDetails, 

30 ) 

31 

32 

33class IsAuthorizedConnectionRequest(TypedDict, total=False): 

34 """Represent the parameters of ``is_authorized_connection`` API in the auth manager.""" 

35 

36 method: ResourceMethod 

37 details: ConnectionDetails | None 

38 

39 

40class IsAuthorizedDagRequest(TypedDict, total=False): 

41 """Represent the parameters of ``is_authorized_dag`` API in the auth manager.""" 

42 

43 method: ResourceMethod 

44 access_entity: DagAccessEntity | None 

45 details: DagDetails | None 

46 

47 

48class IsAuthorizedPoolRequest(TypedDict, total=False): 

49 """Represent the parameters of ``is_authorized_pool`` API in the auth manager.""" 

50 

51 method: ResourceMethod 

52 details: PoolDetails | None 

53 

54 

55class IsAuthorizedVariableRequest(TypedDict, total=False): 

56 """Represent the parameters of ``is_authorized_variable`` API in the auth manager.""" 

57 

58 method: ResourceMethod 

59 details: VariableDetails | None