across-server-openapi-python 1.4.0__py3-none-any.whl → 2.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- across/sdk/v1/__init__.py +48 -19
- across/sdk/v1/api/__init__.py +1 -1
- across/sdk/v1/api/auth_api.py +17 -286
- across/sdk/v1/api/broker_alert_api.py +36 -36
- across/sdk/v1/api/broker_event_api.py +20 -20
- across/sdk/v1/api/filter_api.py +20 -20
- across/sdk/v1/api/group_api.py +25 -275
- across/sdk/v1/api/group_invite_api.py +65 -66
- across/sdk/v1/api/group_role_api.py +111 -112
- across/sdk/v1/api/instrument_api.py +20 -20
- across/sdk/v1/api/internal_api.py +19 -20
- across/sdk/v1/api/observation_api.py +106 -109
- across/sdk/v1/api/observation_request_api.py +2108 -0
- across/sdk/v1/api/observatory_api.py +24 -25
- across/sdk/v1/api/permission_api.py +5 -6
- across/sdk/v1/api/schedule_api.py +84 -86
- across/sdk/v1/api/service_account_api.py +121 -122
- across/sdk/v1/api/telescope_api.py +26 -26
- across/sdk/v1/api/tle_api.py +7 -8
- across/sdk/v1/api/tools_api.py +55 -55
- across/sdk/v1/api/user_api.py +100 -349
- across/sdk/v1/api_client.py +111 -47
- across/sdk/v1/configuration.py +106 -33
- across/sdk/v1/exceptions.py +8 -6
- across/sdk/v1/models/__init__.py +24 -10
- across/sdk/v1/models/access_token_response.py +5 -4
- across/sdk/v1/models/across_server_routes_v1_group_invite_schemas_group_invite.py +106 -0
- across/sdk/v1/models/across_server_routes_v1_group_role_schemas_group.py +7 -5
- across/sdk/v1/models/across_server_routes_v1_group_role_schemas_group_role.py +20 -15
- across/sdk/v1/models/across_server_routes_v1_group_role_schemas_service_account.py +107 -0
- across/sdk/v1/models/across_server_routes_v1_group_role_schemas_user.py +7 -5
- across/sdk/v1/models/across_server_routes_v1_group_schemas_group.py +12 -12
- across/sdk/v1/models/across_server_routes_v1_group_schemas_user.py +8 -7
- across/sdk/v1/models/across_server_routes_v1_user_schemas_group.py +11 -10
- across/sdk/v1/models/across_server_routes_v1_user_schemas_group_invite.py +8 -6
- across/sdk/v1/models/across_server_routes_v1_user_schemas_group_role.py +8 -7
- across/sdk/v1/models/across_server_routes_v1_user_schemas_user.py +14 -16
- across/sdk/v1/models/across_server_routes_v1_user_service_account_schemas_service_account.py +8 -7
- across/sdk/v1/models/bandpass.py +1 -1
- across/sdk/v1/models/bandpass_type.py +1 -1
- across/sdk/v1/models/broker_alert.py +8 -6
- across/sdk/v1/models/broker_alert_create.py +6 -6
- across/sdk/v1/models/broker_alert_data_source.py +1 -1
- across/sdk/v1/models/broker_alert_status.py +1 -1
- across/sdk/v1/models/broker_event.py +9 -9
- across/sdk/v1/models/broker_event_type.py +1 -1
- across/sdk/v1/models/constrained_date.py +8 -6
- across/sdk/v1/models/constraint_reason.py +5 -4
- across/sdk/v1/models/constraint_type.py +1 -1
- across/sdk/v1/models/coordinate.py +5 -4
- across/sdk/v1/models/date_range.py +5 -4
- across/sdk/v1/models/date_range_create.py +96 -0
- across/sdk/v1/models/depth_unit.py +1 -1
- across/sdk/v1/models/energy_bandpass.py +5 -4
- across/sdk/v1/models/energy_unit.py +1 -1
- across/sdk/v1/models/ephemeris_type.py +1 -1
- across/sdk/v1/models/filter.py +8 -6
- across/sdk/v1/models/frequency_bandpass.py +5 -4
- across/sdk/v1/models/frequency_unit.py +1 -1
- across/sdk/v1/models/grant_type.py +1 -1
- across/sdk/v1/models/ground_parameters.py +5 -4
- across/sdk/v1/models/group_base.py +7 -5
- across/sdk/v1/models/group_invite_create.py +5 -4
- across/sdk/v1/models/group_invite_group_details.py +7 -5
- across/sdk/v1/models/group_read.py +7 -5
- across/sdk/v1/models/group_role_create.py +7 -5
- across/sdk/v1/models/group_role_read.py +8 -7
- across/sdk/v1/models/http_validation_error.py +6 -6
- across/sdk/v1/models/id_name_schema.py +7 -5
- across/sdk/v1/models/instrument.py +31 -15
- across/sdk/v1/models/ivoa_obs_category.py +1 -1
- across/sdk/v1/models/ivoa_obs_tracking_type.py +1 -1
- across/sdk/v1/models/joint_visibility_result.py +23 -23
- across/sdk/v1/models/jpl_parameters.py +5 -4
- across/sdk/v1/models/localization.py +11 -10
- across/sdk/v1/models/localization_contour_base.py +6 -6
- across/sdk/v1/models/localization_create.py +6 -6
- across/sdk/v1/models/location_inner.py +1 -1
- across/sdk/v1/models/name_resolver.py +5 -4
- across/sdk/v1/models/nullable_date_range.py +5 -4
- across/sdk/v1/models/nullable_end_date_range.py +96 -0
- across/sdk/v1/models/observation.py +11 -10
- across/sdk/v1/models/observation_create.py +9 -8
- across/sdk/v1/models/observation_footprint.py +10 -9
- across/sdk/v1/models/observation_footprint_create.py +6 -6
- across/sdk/v1/models/observation_request.py +202 -0
- across/sdk/v1/models/observation_request_create.py +148 -0
- across/sdk/v1/models/observation_request_create_many.py +95 -0
- across/sdk/v1/models/observation_request_status.py +40 -0
- across/sdk/v1/models/observation_request_update.py +213 -0
- across/sdk/v1/models/observation_request_version.py +99 -0
- across/sdk/v1/models/observation_status.py +1 -1
- across/sdk/v1/models/observation_strategy.py +1 -1
- across/sdk/v1/models/observation_type.py +1 -1
- across/sdk/v1/models/observation_window.py +134 -0
- across/sdk/v1/models/observation_window1.py +140 -0
- across/sdk/v1/models/observatory.py +9 -9
- across/sdk/v1/models/observatory_ephemeris_type.py +5 -4
- across/sdk/v1/models/observatory_type.py +1 -1
- across/sdk/v1/models/observing_proposal.py +93 -0
- across/sdk/v1/models/observing_proposal_create.py +98 -0
- across/sdk/v1/models/page_broker_alert.py +6 -6
- across/sdk/v1/models/page_broker_event.py +6 -6
- across/sdk/v1/models/page_observation.py +6 -6
- across/sdk/v1/models/page_observation_request.py +116 -0
- across/sdk/v1/models/page_schedule.py +6 -6
- across/sdk/v1/models/parameters.py +1 -1
- across/sdk/v1/models/permission.py +7 -5
- across/sdk/v1/models/point.py +5 -4
- across/sdk/v1/models/proper_motion.py +93 -0
- across/sdk/v1/models/role_base.py +7 -5
- across/sdk/v1/models/schedule.py +10 -9
- across/sdk/v1/models/schedule_cadence.py +8 -6
- across/sdk/v1/models/schedule_create.py +8 -7
- across/sdk/v1/models/schedule_create_many.py +9 -8
- across/sdk/v1/models/schedule_fidelity.py +1 -1
- across/sdk/v1/models/schedule_status.py +1 -1
- across/sdk/v1/models/service_account_create.py +5 -4
- across/sdk/v1/models/service_account_secret.py +7 -5
- across/sdk/v1/models/service_account_update.py +5 -4
- across/sdk/v1/models/setting.py +100 -0
- across/sdk/v1/models/setting_type.py +39 -0
- across/sdk/v1/models/spice_parameters.py +5 -4
- across/sdk/v1/models/system_service_account.py +9 -9
- across/sdk/v1/models/telescope.py +9 -9
- across/sdk/v1/models/telescope_instrument.py +31 -15
- across/sdk/v1/models/tle.py +5 -4
- across/sdk/v1/models/tle_create.py +5 -4
- across/sdk/v1/models/tle_parameters.py +5 -4
- across/sdk/v1/models/unit_value.py +5 -4
- across/sdk/v1/models/user_create.py +5 -4
- across/sdk/v1/models/user_info.py +7 -5
- across/sdk/v1/models/user_update.py +5 -4
- across/sdk/v1/models/validation_error.py +21 -12
- across/sdk/v1/models/validation_error_loc_inner.py +1 -1
- across/sdk/v1/models/visibility_result.py +14 -11
- across/sdk/v1/models/visibility_type.py +1 -1
- across/sdk/v1/models/visibility_window.py +5 -4
- across/sdk/v1/models/wavelength_bandpass.py +5 -4
- across/sdk/v1/models/wavelength_unit.py +1 -1
- across/sdk/v1/models/window.py +5 -4
- across/sdk/v1/rest.py +88 -12
- {across_server_openapi_python-1.4.0.dist-info → across_server_openapi_python-2.0.0.dist-info}/METADATA +103 -45
- across_server_openapi_python-2.0.0.dist-info/RECORD +162 -0
- {across_server_openapi_python-1.4.0.dist-info → across_server_openapi_python-2.0.0.dist-info}/WHEEL +1 -1
- across_server_openapi_python-1.4.0.dist-info/RECORD +0 -143
- {across_server_openapi_python-1.4.0.dist-info → across_server_openapi_python-2.0.0.dist-info}/licenses/LICENSE +0 -0
- {across_server_openapi_python-1.4.0.dist-info → across_server_openapi_python-2.0.0.dist-info}/top_level.txt +0 -0
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 2.0.2
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
24
|
+
from pydantic_core import to_jsonable_python
|
|
24
25
|
|
|
25
26
|
class TLEParameters(BaseModel):
|
|
26
27
|
"""
|
|
@@ -31,7 +32,8 @@ class TLEParameters(BaseModel):
|
|
|
31
32
|
__properties: ClassVar[List[str]] = ["norad_id", "norad_satellite_name"]
|
|
32
33
|
|
|
33
34
|
model_config = ConfigDict(
|
|
34
|
-
|
|
35
|
+
validate_by_name=True,
|
|
36
|
+
validate_by_alias=True,
|
|
35
37
|
validate_assignment=True,
|
|
36
38
|
protected_namespaces=(),
|
|
37
39
|
)
|
|
@@ -43,8 +45,7 @@ class TLEParameters(BaseModel):
|
|
|
43
45
|
|
|
44
46
|
def to_json(self) -> str:
|
|
45
47
|
"""Returns the JSON representation of the model using alias"""
|
|
46
|
-
|
|
47
|
-
return json.dumps(self.to_dict())
|
|
48
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
48
49
|
|
|
49
50
|
@classmethod
|
|
50
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 2.0.2
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt
|
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
24
|
+
from pydantic_core import to_jsonable_python
|
|
24
25
|
|
|
25
26
|
class UnitValue(BaseModel):
|
|
26
27
|
"""
|
|
@@ -31,7 +32,8 @@ class UnitValue(BaseModel):
|
|
|
31
32
|
__properties: ClassVar[List[str]] = ["value", "unit"]
|
|
32
33
|
|
|
33
34
|
model_config = ConfigDict(
|
|
34
|
-
|
|
35
|
+
validate_by_name=True,
|
|
36
|
+
validate_by_alias=True,
|
|
35
37
|
validate_assignment=True,
|
|
36
38
|
protected_namespaces=(),
|
|
37
39
|
)
|
|
@@ -43,8 +45,7 @@ class UnitValue(BaseModel):
|
|
|
43
45
|
|
|
44
46
|
def to_json(self) -> str:
|
|
45
47
|
"""Returns the JSON representation of the model using alias"""
|
|
46
|
-
|
|
47
|
-
return json.dumps(self.to_dict())
|
|
48
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
48
49
|
|
|
49
50
|
@classmethod
|
|
50
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 2.0.2
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, StrictStr
|
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
24
|
+
from pydantic_core import to_jsonable_python
|
|
24
25
|
|
|
25
26
|
class UserCreate(BaseModel):
|
|
26
27
|
"""
|
|
@@ -33,7 +34,8 @@ class UserCreate(BaseModel):
|
|
|
33
34
|
__properties: ClassVar[List[str]] = ["username", "first_name", "last_name", "email"]
|
|
34
35
|
|
|
35
36
|
model_config = ConfigDict(
|
|
36
|
-
|
|
37
|
+
validate_by_name=True,
|
|
38
|
+
validate_by_alias=True,
|
|
37
39
|
validate_assignment=True,
|
|
38
40
|
protected_namespaces=(),
|
|
39
41
|
)
|
|
@@ -45,8 +47,7 @@ class UserCreate(BaseModel):
|
|
|
45
47
|
|
|
46
48
|
def to_json(self) -> str:
|
|
47
49
|
"""Returns the JSON representation of the model using alias"""
|
|
48
|
-
|
|
49
|
-
return json.dumps(self.to_dict())
|
|
50
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
50
51
|
|
|
51
52
|
@classmethod
|
|
52
53
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 2.0.2
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -19,8 +19,10 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from uuid import UUID
|
|
22
23
|
from typing import Optional, Set
|
|
23
24
|
from typing_extensions import Self
|
|
25
|
+
from pydantic_core import to_jsonable_python
|
|
24
26
|
|
|
25
27
|
class UserInfo(BaseModel):
|
|
26
28
|
"""
|
|
@@ -30,11 +32,12 @@ class UserInfo(BaseModel):
|
|
|
30
32
|
first_name: StrictStr
|
|
31
33
|
last_name: StrictStr
|
|
32
34
|
email: StrictStr
|
|
33
|
-
id:
|
|
35
|
+
id: UUID
|
|
34
36
|
__properties: ClassVar[List[str]] = ["username", "first_name", "last_name", "email", "id"]
|
|
35
37
|
|
|
36
38
|
model_config = ConfigDict(
|
|
37
|
-
|
|
39
|
+
validate_by_name=True,
|
|
40
|
+
validate_by_alias=True,
|
|
38
41
|
validate_assignment=True,
|
|
39
42
|
protected_namespaces=(),
|
|
40
43
|
)
|
|
@@ -46,8 +49,7 @@ class UserInfo(BaseModel):
|
|
|
46
49
|
|
|
47
50
|
def to_json(self) -> str:
|
|
48
51
|
"""Returns the JSON representation of the model using alias"""
|
|
49
|
-
|
|
50
|
-
return json.dumps(self.to_dict())
|
|
52
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
51
53
|
|
|
52
54
|
@classmethod
|
|
53
55
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 2.0.2
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, StrictStr
|
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
24
|
+
from pydantic_core import to_jsonable_python
|
|
24
25
|
|
|
25
26
|
class UserUpdate(BaseModel):
|
|
26
27
|
"""
|
|
@@ -32,7 +33,8 @@ class UserUpdate(BaseModel):
|
|
|
32
33
|
__properties: ClassVar[List[str]] = ["first_name", "last_name", "username"]
|
|
33
34
|
|
|
34
35
|
model_config = ConfigDict(
|
|
35
|
-
|
|
36
|
+
validate_by_name=True,
|
|
37
|
+
validate_by_alias=True,
|
|
36
38
|
validate_assignment=True,
|
|
37
39
|
protected_namespaces=(),
|
|
38
40
|
)
|
|
@@ -44,8 +46,7 @@ class UserUpdate(BaseModel):
|
|
|
44
46
|
|
|
45
47
|
def to_json(self) -> str:
|
|
46
48
|
"""Returns the JSON representation of the model using alias"""
|
|
47
|
-
|
|
48
|
-
return json.dumps(self.to_dict())
|
|
49
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
49
50
|
|
|
50
51
|
@classmethod
|
|
51
52
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 2.0.2
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -18,22 +18,26 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
|
-
from typing import Any, ClassVar, Dict, List
|
|
22
|
-
from across.sdk.v1.models.
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from across.sdk.v1.models.location_inner import LocationInner
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
|
+
from pydantic_core import to_jsonable_python
|
|
25
26
|
|
|
26
27
|
class ValidationError(BaseModel):
|
|
27
28
|
"""
|
|
28
29
|
ValidationError
|
|
29
30
|
""" # noqa: E501
|
|
30
|
-
loc: List[
|
|
31
|
+
loc: List[LocationInner]
|
|
31
32
|
msg: StrictStr
|
|
32
33
|
type: StrictStr
|
|
33
|
-
|
|
34
|
+
input: Optional[Any] = None
|
|
35
|
+
ctx: Optional[Dict[str, Any]] = None
|
|
36
|
+
__properties: ClassVar[List[str]] = ["loc", "msg", "type", "input", "ctx"]
|
|
34
37
|
|
|
35
38
|
model_config = ConfigDict(
|
|
36
|
-
|
|
39
|
+
validate_by_name=True,
|
|
40
|
+
validate_by_alias=True,
|
|
37
41
|
validate_assignment=True,
|
|
38
42
|
protected_namespaces=(),
|
|
39
43
|
)
|
|
@@ -45,8 +49,7 @@ class ValidationError(BaseModel):
|
|
|
45
49
|
|
|
46
50
|
def to_json(self) -> str:
|
|
47
51
|
"""Returns the JSON representation of the model using alias"""
|
|
48
|
-
|
|
49
|
-
return json.dumps(self.to_dict())
|
|
52
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
50
53
|
|
|
51
54
|
@classmethod
|
|
52
55
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -75,9 +78,13 @@ class ValidationError(BaseModel):
|
|
|
75
78
|
_items = []
|
|
76
79
|
if self.loc:
|
|
77
80
|
for _item_loc in self.loc:
|
|
78
|
-
if _item_loc
|
|
79
|
-
_items.append(_item_loc.to_dict())
|
|
81
|
+
_items.append(_item_loc.to_dict() if _item_loc is not None else None)
|
|
80
82
|
_dict['loc'] = _items
|
|
83
|
+
# set to None if input (nullable) is None
|
|
84
|
+
# and model_fields_set contains the field
|
|
85
|
+
if self.input is None and "input" in self.model_fields_set:
|
|
86
|
+
_dict['input'] = None
|
|
87
|
+
|
|
81
88
|
return _dict
|
|
82
89
|
|
|
83
90
|
@classmethod
|
|
@@ -90,9 +97,11 @@ class ValidationError(BaseModel):
|
|
|
90
97
|
return cls.model_validate(obj)
|
|
91
98
|
|
|
92
99
|
_obj = cls.model_validate({
|
|
93
|
-
"loc": [
|
|
100
|
+
"loc": [LocationInner.from_dict(_item) for _item in obj["loc"]] if obj.get("loc") is not None else None,
|
|
94
101
|
"msg": obj.get("msg"),
|
|
95
|
-
"type": obj.get("type")
|
|
102
|
+
"type": obj.get("type"),
|
|
103
|
+
"input": obj.get("input"),
|
|
104
|
+
"ctx": obj.get("ctx")
|
|
96
105
|
})
|
|
97
106
|
return _obj
|
|
98
107
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 2.0.2
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 2.0.2
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -17,22 +17,26 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
|
-
from typing import Any, ClassVar, Dict, List
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from uuid import UUID
|
|
22
23
|
from across.sdk.v1.models.visibility_window import VisibilityWindow
|
|
23
24
|
from typing import Optional, Set
|
|
24
25
|
from typing_extensions import Self
|
|
26
|
+
from pydantic_core import to_jsonable_python
|
|
25
27
|
|
|
26
28
|
class VisibilityResult(BaseModel):
|
|
27
29
|
"""
|
|
28
30
|
A Pydantic model class representing the visibility calculation parameters. This class is used for visibility calculations in the ACROSS SSA system.
|
|
29
31
|
""" # noqa: E501
|
|
30
|
-
instrument_id:
|
|
32
|
+
instrument_id: UUID
|
|
31
33
|
visibility_windows: List[VisibilityWindow]
|
|
32
|
-
|
|
34
|
+
warnings: Optional[StrictStr] = Field(default='These visibility windows are calculated based on publicly available ephemerides and observatory constraints. As a result, they are rough estimates and will not perfectly reflect the target visibility for each observatory. For detailed visibility windows, we recommend visiting the observatory website or requesting information from the individual science teams.', description="Optional warnings regarding the visibility calculation results")
|
|
35
|
+
__properties: ClassVar[List[str]] = ["instrument_id", "visibility_windows", "warnings"]
|
|
33
36
|
|
|
34
37
|
model_config = ConfigDict(
|
|
35
|
-
|
|
38
|
+
validate_by_name=True,
|
|
39
|
+
validate_by_alias=True,
|
|
36
40
|
validate_assignment=True,
|
|
37
41
|
protected_namespaces=(),
|
|
38
42
|
)
|
|
@@ -44,8 +48,7 @@ class VisibilityResult(BaseModel):
|
|
|
44
48
|
|
|
45
49
|
def to_json(self) -> str:
|
|
46
50
|
"""Returns the JSON representation of the model using alias"""
|
|
47
|
-
|
|
48
|
-
return json.dumps(self.to_dict())
|
|
51
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
49
52
|
|
|
50
53
|
@classmethod
|
|
51
54
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -74,8 +77,7 @@ class VisibilityResult(BaseModel):
|
|
|
74
77
|
_items = []
|
|
75
78
|
if self.visibility_windows:
|
|
76
79
|
for _item_visibility_windows in self.visibility_windows:
|
|
77
|
-
if _item_visibility_windows
|
|
78
|
-
_items.append(_item_visibility_windows.to_dict())
|
|
80
|
+
_items.append(_item_visibility_windows.to_dict() if _item_visibility_windows is not None else None)
|
|
79
81
|
_dict['visibility_windows'] = _items
|
|
80
82
|
return _dict
|
|
81
83
|
|
|
@@ -90,7 +92,8 @@ class VisibilityResult(BaseModel):
|
|
|
90
92
|
|
|
91
93
|
_obj = cls.model_validate({
|
|
92
94
|
"instrument_id": obj.get("instrument_id"),
|
|
93
|
-
"visibility_windows": [VisibilityWindow.from_dict(_item) for _item in obj["visibility_windows"]] if obj.get("visibility_windows") is not None else None
|
|
95
|
+
"visibility_windows": [VisibilityWindow.from_dict(_item) for _item in obj["visibility_windows"]] if obj.get("visibility_windows") is not None else None,
|
|
96
|
+
"warnings": obj.get("warnings") if obj.get("warnings") is not None else 'These visibility windows are calculated based on publicly available ephemerides and observatory constraints. As a result, they are rough estimates and will not perfectly reflect the target visibility for each observatory. For detailed visibility windows, we recommend visiting the observatory website or requesting information from the individual science teams.'
|
|
94
97
|
})
|
|
95
98
|
return _obj
|
|
96
99
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 2.0.2
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 2.0.2
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -23,6 +23,7 @@ from across.sdk.v1.models.constraint_reason import ConstraintReason
|
|
|
23
23
|
from across.sdk.v1.models.window import Window
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
26
|
+
from pydantic_core import to_jsonable_python
|
|
26
27
|
|
|
27
28
|
class VisibilityWindow(BaseModel):
|
|
28
29
|
"""
|
|
@@ -34,7 +35,8 @@ class VisibilityWindow(BaseModel):
|
|
|
34
35
|
__properties: ClassVar[List[str]] = ["window", "max_visibility_duration", "constraint_reason"]
|
|
35
36
|
|
|
36
37
|
model_config = ConfigDict(
|
|
37
|
-
|
|
38
|
+
validate_by_name=True,
|
|
39
|
+
validate_by_alias=True,
|
|
38
40
|
validate_assignment=True,
|
|
39
41
|
protected_namespaces=(),
|
|
40
42
|
)
|
|
@@ -46,8 +48,7 @@ class VisibilityWindow(BaseModel):
|
|
|
46
48
|
|
|
47
49
|
def to_json(self) -> str:
|
|
48
50
|
"""Returns the JSON representation of the model using alias"""
|
|
49
|
-
|
|
50
|
-
return json.dumps(self.to_dict())
|
|
51
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
51
52
|
|
|
52
53
|
@classmethod
|
|
53
54
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 2.0.2
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -22,6 +22,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
|
22
22
|
from across.sdk.v1.models.wavelength_unit import WavelengthUnit
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
|
+
from pydantic_core import to_jsonable_python
|
|
25
26
|
|
|
26
27
|
class WavelengthBandpass(BaseModel):
|
|
27
28
|
"""
|
|
@@ -48,7 +49,8 @@ class WavelengthBandpass(BaseModel):
|
|
|
48
49
|
return value
|
|
49
50
|
|
|
50
51
|
model_config = ConfigDict(
|
|
51
|
-
|
|
52
|
+
validate_by_name=True,
|
|
53
|
+
validate_by_alias=True,
|
|
52
54
|
validate_assignment=True,
|
|
53
55
|
protected_namespaces=(),
|
|
54
56
|
)
|
|
@@ -60,8 +62,7 @@ class WavelengthBandpass(BaseModel):
|
|
|
60
62
|
|
|
61
63
|
def to_json(self) -> str:
|
|
62
64
|
"""Returns the JSON representation of the model using alias"""
|
|
63
|
-
|
|
64
|
-
return json.dumps(self.to_dict())
|
|
65
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
65
66
|
|
|
66
67
|
@classmethod
|
|
67
68
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 2.0.2
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
across/sdk/v1/models/window.py
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 2.0.2
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -22,6 +22,7 @@ from typing import Any, ClassVar, Dict, List
|
|
|
22
22
|
from across.sdk.v1.models.constrained_date import ConstrainedDate
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
|
+
from pydantic_core import to_jsonable_python
|
|
25
26
|
|
|
26
27
|
class Window(BaseModel):
|
|
27
28
|
"""
|
|
@@ -32,7 +33,8 @@ class Window(BaseModel):
|
|
|
32
33
|
__properties: ClassVar[List[str]] = ["begin", "end"]
|
|
33
34
|
|
|
34
35
|
model_config = ConfigDict(
|
|
35
|
-
|
|
36
|
+
validate_by_name=True,
|
|
37
|
+
validate_by_alias=True,
|
|
36
38
|
validate_assignment=True,
|
|
37
39
|
protected_namespaces=(),
|
|
38
40
|
)
|
|
@@ -44,8 +46,7 @@ class Window(BaseModel):
|
|
|
44
46
|
|
|
45
47
|
def to_json(self) -> str:
|
|
46
48
|
"""Returns the JSON representation of the model using alias"""
|
|
47
|
-
|
|
48
|
-
return json.dumps(self.to_dict())
|
|
49
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
49
50
|
|
|
50
51
|
@classmethod
|
|
51
52
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
across/sdk/v1/rest.py
CHANGED
|
@@ -5,17 +5,19 @@
|
|
|
5
5
|
|
|
6
6
|
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 2.0.2
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
12
12
|
""" # noqa: E501
|
|
13
13
|
|
|
14
14
|
|
|
15
|
+
import ipaddress
|
|
15
16
|
import io
|
|
16
17
|
import json
|
|
17
18
|
import re
|
|
18
19
|
import ssl
|
|
20
|
+
from urllib.parse import urlparse
|
|
19
21
|
|
|
20
22
|
import urllib3
|
|
21
23
|
|
|
@@ -34,6 +36,59 @@ def is_socks_proxy_url(url):
|
|
|
34
36
|
else:
|
|
35
37
|
return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES
|
|
36
38
|
|
|
39
|
+
def contenttype_matches(contenttype, maintype, subtype):
|
|
40
|
+
"""Matches the given contenttype against the given type and subtype
|
|
41
|
+
|
|
42
|
+
:param contenttype: the content type to match
|
|
43
|
+
:param maintype: the expected maintype
|
|
44
|
+
:param subtype: the expected subtype
|
|
45
|
+
:return: `true` when the given content type matches the given type and subtype,
|
|
46
|
+
regardless of the presence of mime type parameters, otherwise returns `false`.
|
|
47
|
+
:rtype: bool
|
|
48
|
+
"""
|
|
49
|
+
pattern = '{type}/(?:[^+;]+\\+)?{subtype}(?:[ \t]*;.*)?'.format(
|
|
50
|
+
type = re.escape(maintype),
|
|
51
|
+
subtype = re.escape(subtype),
|
|
52
|
+
)
|
|
53
|
+
return re.fullmatch(pattern, contenttype, re.IGNORECASE) is not None
|
|
54
|
+
|
|
55
|
+
def should_bypass_proxies(url: str, no_proxy: str) -> bool:
|
|
56
|
+
"""Return whether ``url`` matches the comma-separated ``no_proxy`` rules."""
|
|
57
|
+
parsed_url = urlparse(url)
|
|
58
|
+
if not parsed_url.hostname:
|
|
59
|
+
return True
|
|
60
|
+
|
|
61
|
+
host = parsed_url.hostname.lower()
|
|
62
|
+
host_and_port = parsed_url.netloc.lower()
|
|
63
|
+
try:
|
|
64
|
+
host_ip = ipaddress.ip_address(host)
|
|
65
|
+
except ValueError:
|
|
66
|
+
host_ip = None
|
|
67
|
+
|
|
68
|
+
for entry in (entry.strip().lower() for entry in no_proxy.split(',')):
|
|
69
|
+
if not entry:
|
|
70
|
+
continue
|
|
71
|
+
if entry == '*':
|
|
72
|
+
return True
|
|
73
|
+
|
|
74
|
+
if host_ip is not None:
|
|
75
|
+
try:
|
|
76
|
+
if host_ip in ipaddress.ip_network(entry, strict=False):
|
|
77
|
+
return True
|
|
78
|
+
except ValueError:
|
|
79
|
+
pass
|
|
80
|
+
|
|
81
|
+
entry = entry.lstrip('.')
|
|
82
|
+
if (
|
|
83
|
+
host == entry
|
|
84
|
+
or host.endswith('.' + entry)
|
|
85
|
+
or host_and_port == entry
|
|
86
|
+
or host_and_port.endswith('.' + entry)
|
|
87
|
+
):
|
|
88
|
+
return True
|
|
89
|
+
|
|
90
|
+
return False
|
|
91
|
+
|
|
37
92
|
|
|
38
93
|
class RESTResponse(io.IOBase):
|
|
39
94
|
|
|
@@ -48,12 +103,17 @@ class RESTResponse(io.IOBase):
|
|
|
48
103
|
self.data = self.response.data
|
|
49
104
|
return self.data
|
|
50
105
|
|
|
106
|
+
@property
|
|
107
|
+
def headers(self):
|
|
108
|
+
"""Returns a dictionary of response headers."""
|
|
109
|
+
return self.response.headers
|
|
110
|
+
|
|
51
111
|
def getheaders(self):
|
|
52
|
-
"""Returns a dictionary of the response headers."""
|
|
112
|
+
"""Returns a dictionary of the response headers; use ``headers`` instead."""
|
|
53
113
|
return self.response.headers
|
|
54
114
|
|
|
55
115
|
def getheader(self, name, default=None):
|
|
56
|
-
"""Returns a given response header."""
|
|
116
|
+
"""Returns a given response header; use ``headers.get()`` instead."""
|
|
57
117
|
return self.response.headers.get(name, default)
|
|
58
118
|
|
|
59
119
|
|
|
@@ -99,7 +159,9 @@ class RESTClientObject:
|
|
|
99
159
|
# https pool manager
|
|
100
160
|
self.pool_manager: urllib3.PoolManager
|
|
101
161
|
|
|
102
|
-
if configuration.proxy
|
|
162
|
+
if configuration.proxy and not should_bypass_proxies(
|
|
163
|
+
configuration.host, configuration.no_proxy or ''
|
|
164
|
+
):
|
|
103
165
|
if is_socks_proxy_url(configuration.proxy):
|
|
104
166
|
from urllib3.contrib.socks import SOCKSProxyManager
|
|
105
167
|
pool_args["proxy_url"] = configuration.proxy
|
|
@@ -108,6 +170,8 @@ class RESTClientObject:
|
|
|
108
170
|
else:
|
|
109
171
|
pool_args["proxy_url"] = configuration.proxy
|
|
110
172
|
pool_args["proxy_headers"] = configuration.proxy_headers
|
|
173
|
+
if configuration.proxy_ssl_context is not None:
|
|
174
|
+
pool_args["proxy_ssl_context"] = configuration.proxy_ssl_context
|
|
111
175
|
self.pool_manager = urllib3.ProxyManager(**pool_args)
|
|
112
176
|
else:
|
|
113
177
|
self.pool_manager = urllib3.PoolManager(**pool_args)
|
|
@@ -152,7 +216,7 @@ class RESTClientObject:
|
|
|
152
216
|
)
|
|
153
217
|
|
|
154
218
|
post_params = post_params or {}
|
|
155
|
-
headers = headers or {}
|
|
219
|
+
headers = urllib3.HTTPHeaderDict(headers or {})
|
|
156
220
|
|
|
157
221
|
timeout = None
|
|
158
222
|
if _request_timeout:
|
|
@@ -171,12 +235,24 @@ class RESTClientObject:
|
|
|
171
235
|
# For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE`
|
|
172
236
|
if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']:
|
|
173
237
|
|
|
174
|
-
# no content type provided or payload is json
|
|
175
238
|
content_type = headers.get('Content-Type')
|
|
176
|
-
|
|
239
|
+
is_json = (
|
|
177
240
|
not content_type
|
|
178
|
-
or
|
|
179
|
-
)
|
|
241
|
+
or contenttype_matches(content_type, 'application', 'json')
|
|
242
|
+
)
|
|
243
|
+
# JSON is valid YAML 1.2, so structured YAML bodies can use
|
|
244
|
+
# the existing JSON serializer:
|
|
245
|
+
# https://yaml.org/spec/1.2.2/#13-relation-to-json
|
|
246
|
+
is_structured_yaml = (
|
|
247
|
+
content_type
|
|
248
|
+
and (
|
|
249
|
+
contenttype_matches(content_type, 'application', 'yaml')
|
|
250
|
+
or contenttype_matches(content_type, 'text', 'yaml')
|
|
251
|
+
or contenttype_matches(content_type, 'text', 'x-yaml')
|
|
252
|
+
)
|
|
253
|
+
and not isinstance(body, (str, bytes))
|
|
254
|
+
)
|
|
255
|
+
if is_json or is_structured_yaml:
|
|
180
256
|
request_body = None
|
|
181
257
|
if body is not None:
|
|
182
258
|
request_body = json.dumps(body)
|
|
@@ -188,7 +264,7 @@ class RESTClientObject:
|
|
|
188
264
|
headers=headers,
|
|
189
265
|
preload_content=False
|
|
190
266
|
)
|
|
191
|
-
elif content_type
|
|
267
|
+
elif contenttype_matches(content_type, 'application', 'x-www-form-urlencoded'):
|
|
192
268
|
r = self.pool_manager.request(
|
|
193
269
|
method,
|
|
194
270
|
url,
|
|
@@ -198,7 +274,7 @@ class RESTClientObject:
|
|
|
198
274
|
headers=headers,
|
|
199
275
|
preload_content=False
|
|
200
276
|
)
|
|
201
|
-
elif content_type
|
|
277
|
+
elif contenttype_matches(content_type, 'multipart', 'form-data'):
|
|
202
278
|
# must del headers['Content-Type'], or the correct
|
|
203
279
|
# Content-Type which generated by urllib3 will be
|
|
204
280
|
# overwritten.
|
|
@@ -226,7 +302,7 @@ class RESTClientObject:
|
|
|
226
302
|
headers=headers,
|
|
227
303
|
preload_content=False
|
|
228
304
|
)
|
|
229
|
-
elif
|
|
305
|
+
elif content_type.startswith('text/') and isinstance(body, bool):
|
|
230
306
|
request_body = "true" if body else "false"
|
|
231
307
|
r = self.pool_manager.request(
|
|
232
308
|
method,
|