windmill-api 1.497.2__py3-none-any.whl → 1.499.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.
Potentially problematic release.
This version of windmill-api might be problematic. Click here for more details.
- windmill_api/api/openapi/__init__.py +0 -0
- windmill_api/api/openapi/download_openapi_spec.py +166 -0
- windmill_api/api/openapi/generate_openapi_spec.py +105 -0
- windmill_api/models/create_http_trigger_json_body.py +16 -0
- windmill_api/models/create_http_triggers_json_body_item.py +16 -0
- windmill_api/models/download_openapi_spec_json_body.py +150 -0
- windmill_api/models/download_openapi_spec_json_body_http_route_filters_item.py +72 -0
- windmill_api/models/download_openapi_spec_json_body_info.py +122 -0
- windmill_api/models/download_openapi_spec_json_body_info_contact.py +74 -0
- windmill_api/models/download_openapi_spec_json_body_info_license.py +76 -0
- windmill_api/models/download_openapi_spec_json_body_openapi_spec_format.py +9 -0
- windmill_api/models/download_openapi_spec_json_body_webhook_filters_item.py +89 -0
- windmill_api/models/download_openapi_spec_json_body_webhook_filters_item_runnable_kind.py +9 -0
- windmill_api/models/download_openapi_spec_json_body_webhook_filters_item_user_or_folder_regex.py +10 -0
- windmill_api/models/edit_http_trigger.py +16 -0
- windmill_api/models/generate_openapi_spec.py +140 -0
- windmill_api/models/generate_openapi_spec_http_route_filters_item.py +72 -0
- windmill_api/models/generate_openapi_spec_info.py +122 -0
- windmill_api/models/generate_openapi_spec_info_contact.py +74 -0
- windmill_api/models/generate_openapi_spec_info_license.py +76 -0
- windmill_api/models/generate_openapi_spec_json_body.py +150 -0
- windmill_api/models/generate_openapi_spec_json_body_http_route_filters_item.py +72 -0
- windmill_api/models/generate_openapi_spec_json_body_info.py +122 -0
- windmill_api/models/generate_openapi_spec_json_body_info_contact.py +74 -0
- windmill_api/models/generate_openapi_spec_json_body_info_license.py +76 -0
- windmill_api/models/generate_openapi_spec_json_body_openapi_spec_format.py +9 -0
- windmill_api/models/generate_openapi_spec_json_body_webhook_filters_item.py +89 -0
- windmill_api/models/generate_openapi_spec_json_body_webhook_filters_item_runnable_kind.py +9 -0
- windmill_api/models/generate_openapi_spec_json_body_webhook_filters_item_user_or_folder_regex.py +10 -0
- windmill_api/models/generate_openapi_spec_openapi_spec_format.py +9 -0
- windmill_api/models/generate_openapi_spec_webhook_filters_item.py +87 -0
- windmill_api/models/generate_openapi_spec_webhook_filters_item_runnable_kind.py +9 -0
- windmill_api/models/generate_openapi_spec_webhook_filters_item_user_or_folder_regex.py +10 -0
- windmill_api/models/get_http_trigger_response_200.py +16 -0
- windmill_api/models/http_trigger.py +16 -0
- windmill_api/models/list_http_triggers_response_200_item.py +16 -0
- windmill_api/models/new_http_trigger.py +16 -0
- windmill_api/models/openapi_http_route_filters.py +72 -0
- windmill_api/models/openapi_spec_format.py +9 -0
- windmill_api/models/openapi_v3_info.py +122 -0
- windmill_api/models/openapi_v3_info_contact.py +74 -0
- windmill_api/models/openapi_v3_info_license.py +76 -0
- windmill_api/models/runnable_kind.py +9 -0
- windmill_api/models/update_http_trigger_json_body.py +16 -0
- windmill_api/models/webhook_filters.py +83 -0
- windmill_api/models/webhook_filters_runnable_kind.py +9 -0
- windmill_api/models/webhook_filters_user_or_folder_regex.py +10 -0
- {windmill_api-1.497.2.dist-info → windmill_api-1.499.0.dist-info}/METADATA +1 -1
- {windmill_api-1.497.2.dist-info → windmill_api-1.499.0.dist-info}/RECORD +51 -12
- {windmill_api-1.497.2.dist-info → windmill_api-1.499.0.dist-info}/LICENSE +0 -0
- {windmill_api-1.497.2.dist-info → windmill_api-1.499.0.dist-info}/WHEEL +0 -0
|
File without changes
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from io import BytesIO
|
|
3
|
+
from typing import Any, Dict, Optional, Union
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ... import errors
|
|
8
|
+
from ...client import AuthenticatedClient, Client
|
|
9
|
+
from ...models.download_openapi_spec_json_body import DownloadOpenapiSpecJsonBody
|
|
10
|
+
from ...types import File, Response
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
workspace: str,
|
|
15
|
+
*,
|
|
16
|
+
json_body: DownloadOpenapiSpecJsonBody,
|
|
17
|
+
) -> Dict[str, Any]:
|
|
18
|
+
pass
|
|
19
|
+
|
|
20
|
+
json_json_body = json_body.to_dict()
|
|
21
|
+
|
|
22
|
+
return {
|
|
23
|
+
"method": "post",
|
|
24
|
+
"url": "/w/{workspace}/openapi/download".format(
|
|
25
|
+
workspace=workspace,
|
|
26
|
+
),
|
|
27
|
+
"json": json_json_body,
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[File]:
|
|
32
|
+
if response.status_code == HTTPStatus.OK:
|
|
33
|
+
response_200 = File(payload=BytesIO(response.content))
|
|
34
|
+
|
|
35
|
+
return response_200
|
|
36
|
+
if client.raise_on_unexpected_status:
|
|
37
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
38
|
+
else:
|
|
39
|
+
return None
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[File]:
|
|
43
|
+
return Response(
|
|
44
|
+
status_code=HTTPStatus(response.status_code),
|
|
45
|
+
content=response.content,
|
|
46
|
+
headers=response.headers,
|
|
47
|
+
parsed=_parse_response(client=client, response=response),
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def sync_detailed(
|
|
52
|
+
workspace: str,
|
|
53
|
+
*,
|
|
54
|
+
client: Union[AuthenticatedClient, Client],
|
|
55
|
+
json_body: DownloadOpenapiSpecJsonBody,
|
|
56
|
+
) -> Response[File]:
|
|
57
|
+
"""Download the OpenAPI v3.1 spec as a file
|
|
58
|
+
|
|
59
|
+
Args:
|
|
60
|
+
workspace (str):
|
|
61
|
+
json_body (DownloadOpenapiSpecJsonBody):
|
|
62
|
+
|
|
63
|
+
Raises:
|
|
64
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
65
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
66
|
+
|
|
67
|
+
Returns:
|
|
68
|
+
Response[File]
|
|
69
|
+
"""
|
|
70
|
+
|
|
71
|
+
kwargs = _get_kwargs(
|
|
72
|
+
workspace=workspace,
|
|
73
|
+
json_body=json_body,
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
response = client.get_httpx_client().request(
|
|
77
|
+
**kwargs,
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
return _build_response(client=client, response=response)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def sync(
|
|
84
|
+
workspace: str,
|
|
85
|
+
*,
|
|
86
|
+
client: Union[AuthenticatedClient, Client],
|
|
87
|
+
json_body: DownloadOpenapiSpecJsonBody,
|
|
88
|
+
) -> Optional[File]:
|
|
89
|
+
"""Download the OpenAPI v3.1 spec as a file
|
|
90
|
+
|
|
91
|
+
Args:
|
|
92
|
+
workspace (str):
|
|
93
|
+
json_body (DownloadOpenapiSpecJsonBody):
|
|
94
|
+
|
|
95
|
+
Raises:
|
|
96
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
97
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
98
|
+
|
|
99
|
+
Returns:
|
|
100
|
+
File
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
return sync_detailed(
|
|
104
|
+
workspace=workspace,
|
|
105
|
+
client=client,
|
|
106
|
+
json_body=json_body,
|
|
107
|
+
).parsed
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
async def asyncio_detailed(
|
|
111
|
+
workspace: str,
|
|
112
|
+
*,
|
|
113
|
+
client: Union[AuthenticatedClient, Client],
|
|
114
|
+
json_body: DownloadOpenapiSpecJsonBody,
|
|
115
|
+
) -> Response[File]:
|
|
116
|
+
"""Download the OpenAPI v3.1 spec as a file
|
|
117
|
+
|
|
118
|
+
Args:
|
|
119
|
+
workspace (str):
|
|
120
|
+
json_body (DownloadOpenapiSpecJsonBody):
|
|
121
|
+
|
|
122
|
+
Raises:
|
|
123
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
124
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
125
|
+
|
|
126
|
+
Returns:
|
|
127
|
+
Response[File]
|
|
128
|
+
"""
|
|
129
|
+
|
|
130
|
+
kwargs = _get_kwargs(
|
|
131
|
+
workspace=workspace,
|
|
132
|
+
json_body=json_body,
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
136
|
+
|
|
137
|
+
return _build_response(client=client, response=response)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
async def asyncio(
|
|
141
|
+
workspace: str,
|
|
142
|
+
*,
|
|
143
|
+
client: Union[AuthenticatedClient, Client],
|
|
144
|
+
json_body: DownloadOpenapiSpecJsonBody,
|
|
145
|
+
) -> Optional[File]:
|
|
146
|
+
"""Download the OpenAPI v3.1 spec as a file
|
|
147
|
+
|
|
148
|
+
Args:
|
|
149
|
+
workspace (str):
|
|
150
|
+
json_body (DownloadOpenapiSpecJsonBody):
|
|
151
|
+
|
|
152
|
+
Raises:
|
|
153
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
154
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
155
|
+
|
|
156
|
+
Returns:
|
|
157
|
+
File
|
|
158
|
+
"""
|
|
159
|
+
|
|
160
|
+
return (
|
|
161
|
+
await asyncio_detailed(
|
|
162
|
+
workspace=workspace,
|
|
163
|
+
client=client,
|
|
164
|
+
json_body=json_body,
|
|
165
|
+
)
|
|
166
|
+
).parsed
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Dict, Optional, Union
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.generate_openapi_spec_json_body import GenerateOpenapiSpecJsonBody
|
|
9
|
+
from ...types import Response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
workspace: str,
|
|
14
|
+
*,
|
|
15
|
+
json_body: GenerateOpenapiSpecJsonBody,
|
|
16
|
+
) -> Dict[str, Any]:
|
|
17
|
+
pass
|
|
18
|
+
|
|
19
|
+
json_json_body = json_body.to_dict()
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
"method": "post",
|
|
23
|
+
"url": "/w/{workspace}/openapi/generate".format(
|
|
24
|
+
workspace=workspace,
|
|
25
|
+
),
|
|
26
|
+
"json": json_json_body,
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
|
|
31
|
+
if client.raise_on_unexpected_status:
|
|
32
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
33
|
+
else:
|
|
34
|
+
return None
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
|
|
38
|
+
return Response(
|
|
39
|
+
status_code=HTTPStatus(response.status_code),
|
|
40
|
+
content=response.content,
|
|
41
|
+
headers=response.headers,
|
|
42
|
+
parsed=_parse_response(client=client, response=response),
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def sync_detailed(
|
|
47
|
+
workspace: str,
|
|
48
|
+
*,
|
|
49
|
+
client: Union[AuthenticatedClient, Client],
|
|
50
|
+
json_body: GenerateOpenapiSpecJsonBody,
|
|
51
|
+
) -> Response[Any]:
|
|
52
|
+
"""generate openapi spec from http routes/webhook
|
|
53
|
+
|
|
54
|
+
Args:
|
|
55
|
+
workspace (str):
|
|
56
|
+
json_body (GenerateOpenapiSpecJsonBody):
|
|
57
|
+
|
|
58
|
+
Raises:
|
|
59
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
60
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
61
|
+
|
|
62
|
+
Returns:
|
|
63
|
+
Response[Any]
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
kwargs = _get_kwargs(
|
|
67
|
+
workspace=workspace,
|
|
68
|
+
json_body=json_body,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
response = client.get_httpx_client().request(
|
|
72
|
+
**kwargs,
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
return _build_response(client=client, response=response)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
async def asyncio_detailed(
|
|
79
|
+
workspace: str,
|
|
80
|
+
*,
|
|
81
|
+
client: Union[AuthenticatedClient, Client],
|
|
82
|
+
json_body: GenerateOpenapiSpecJsonBody,
|
|
83
|
+
) -> Response[Any]:
|
|
84
|
+
"""generate openapi spec from http routes/webhook
|
|
85
|
+
|
|
86
|
+
Args:
|
|
87
|
+
workspace (str):
|
|
88
|
+
json_body (GenerateOpenapiSpecJsonBody):
|
|
89
|
+
|
|
90
|
+
Raises:
|
|
91
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
92
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
93
|
+
|
|
94
|
+
Returns:
|
|
95
|
+
Response[Any]
|
|
96
|
+
"""
|
|
97
|
+
|
|
98
|
+
kwargs = _get_kwargs(
|
|
99
|
+
workspace=workspace,
|
|
100
|
+
json_body=json_body,
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
104
|
+
|
|
105
|
+
return _build_response(client=client, response=response)
|
|
@@ -27,6 +27,8 @@ class CreateHttpTriggerJsonBody:
|
|
|
27
27
|
authentication_method (CreateHttpTriggerJsonBodyAuthenticationMethod):
|
|
28
28
|
is_static_website (bool):
|
|
29
29
|
workspaced_route (Union[Unset, bool]):
|
|
30
|
+
summary (Union[Unset, str]):
|
|
31
|
+
description (Union[Unset, str]):
|
|
30
32
|
static_asset_config (Union[Unset, CreateHttpTriggerJsonBodyStaticAssetConfig]):
|
|
31
33
|
authentication_resource_path (Union[Unset, str]):
|
|
32
34
|
wrap_body (Union[Unset, bool]):
|
|
@@ -42,6 +44,8 @@ class CreateHttpTriggerJsonBody:
|
|
|
42
44
|
authentication_method: CreateHttpTriggerJsonBodyAuthenticationMethod
|
|
43
45
|
is_static_website: bool
|
|
44
46
|
workspaced_route: Union[Unset, bool] = UNSET
|
|
47
|
+
summary: Union[Unset, str] = UNSET
|
|
48
|
+
description: Union[Unset, str] = UNSET
|
|
45
49
|
static_asset_config: Union[Unset, "CreateHttpTriggerJsonBodyStaticAssetConfig"] = UNSET
|
|
46
50
|
authentication_resource_path: Union[Unset, str] = UNSET
|
|
47
51
|
wrap_body: Union[Unset, bool] = UNSET
|
|
@@ -60,6 +64,8 @@ class CreateHttpTriggerJsonBody:
|
|
|
60
64
|
|
|
61
65
|
is_static_website = self.is_static_website
|
|
62
66
|
workspaced_route = self.workspaced_route
|
|
67
|
+
summary = self.summary
|
|
68
|
+
description = self.description
|
|
63
69
|
static_asset_config: Union[Unset, Dict[str, Any]] = UNSET
|
|
64
70
|
if not isinstance(self.static_asset_config, Unset):
|
|
65
71
|
static_asset_config = self.static_asset_config.to_dict()
|
|
@@ -84,6 +90,10 @@ class CreateHttpTriggerJsonBody:
|
|
|
84
90
|
)
|
|
85
91
|
if workspaced_route is not UNSET:
|
|
86
92
|
field_dict["workspaced_route"] = workspaced_route
|
|
93
|
+
if summary is not UNSET:
|
|
94
|
+
field_dict["summary"] = summary
|
|
95
|
+
if description is not UNSET:
|
|
96
|
+
field_dict["description"] = description
|
|
87
97
|
if static_asset_config is not UNSET:
|
|
88
98
|
field_dict["static_asset_config"] = static_asset_config
|
|
89
99
|
if authentication_resource_path is not UNSET:
|
|
@@ -120,6 +130,10 @@ class CreateHttpTriggerJsonBody:
|
|
|
120
130
|
|
|
121
131
|
workspaced_route = d.pop("workspaced_route", UNSET)
|
|
122
132
|
|
|
133
|
+
summary = d.pop("summary", UNSET)
|
|
134
|
+
|
|
135
|
+
description = d.pop("description", UNSET)
|
|
136
|
+
|
|
123
137
|
_static_asset_config = d.pop("static_asset_config", UNSET)
|
|
124
138
|
static_asset_config: Union[Unset, CreateHttpTriggerJsonBodyStaticAssetConfig]
|
|
125
139
|
if isinstance(_static_asset_config, Unset):
|
|
@@ -143,6 +157,8 @@ class CreateHttpTriggerJsonBody:
|
|
|
143
157
|
authentication_method=authentication_method,
|
|
144
158
|
is_static_website=is_static_website,
|
|
145
159
|
workspaced_route=workspaced_route,
|
|
160
|
+
summary=summary,
|
|
161
|
+
description=description,
|
|
146
162
|
static_asset_config=static_asset_config,
|
|
147
163
|
authentication_resource_path=authentication_resource_path,
|
|
148
164
|
wrap_body=wrap_body,
|
|
@@ -31,6 +31,8 @@ class CreateHttpTriggersJsonBodyItem:
|
|
|
31
31
|
authentication_method (CreateHttpTriggersJsonBodyItemAuthenticationMethod):
|
|
32
32
|
is_static_website (bool):
|
|
33
33
|
workspaced_route (Union[Unset, bool]):
|
|
34
|
+
summary (Union[Unset, str]):
|
|
35
|
+
description (Union[Unset, str]):
|
|
34
36
|
static_asset_config (Union[Unset, CreateHttpTriggersJsonBodyItemStaticAssetConfig]):
|
|
35
37
|
authentication_resource_path (Union[Unset, str]):
|
|
36
38
|
wrap_body (Union[Unset, bool]):
|
|
@@ -46,6 +48,8 @@ class CreateHttpTriggersJsonBodyItem:
|
|
|
46
48
|
authentication_method: CreateHttpTriggersJsonBodyItemAuthenticationMethod
|
|
47
49
|
is_static_website: bool
|
|
48
50
|
workspaced_route: Union[Unset, bool] = UNSET
|
|
51
|
+
summary: Union[Unset, str] = UNSET
|
|
52
|
+
description: Union[Unset, str] = UNSET
|
|
49
53
|
static_asset_config: Union[Unset, "CreateHttpTriggersJsonBodyItemStaticAssetConfig"] = UNSET
|
|
50
54
|
authentication_resource_path: Union[Unset, str] = UNSET
|
|
51
55
|
wrap_body: Union[Unset, bool] = UNSET
|
|
@@ -64,6 +68,8 @@ class CreateHttpTriggersJsonBodyItem:
|
|
|
64
68
|
|
|
65
69
|
is_static_website = self.is_static_website
|
|
66
70
|
workspaced_route = self.workspaced_route
|
|
71
|
+
summary = self.summary
|
|
72
|
+
description = self.description
|
|
67
73
|
static_asset_config: Union[Unset, Dict[str, Any]] = UNSET
|
|
68
74
|
if not isinstance(self.static_asset_config, Unset):
|
|
69
75
|
static_asset_config = self.static_asset_config.to_dict()
|
|
@@ -88,6 +94,10 @@ class CreateHttpTriggersJsonBodyItem:
|
|
|
88
94
|
)
|
|
89
95
|
if workspaced_route is not UNSET:
|
|
90
96
|
field_dict["workspaced_route"] = workspaced_route
|
|
97
|
+
if summary is not UNSET:
|
|
98
|
+
field_dict["summary"] = summary
|
|
99
|
+
if description is not UNSET:
|
|
100
|
+
field_dict["description"] = description
|
|
91
101
|
if static_asset_config is not UNSET:
|
|
92
102
|
field_dict["static_asset_config"] = static_asset_config
|
|
93
103
|
if authentication_resource_path is not UNSET:
|
|
@@ -124,6 +134,10 @@ class CreateHttpTriggersJsonBodyItem:
|
|
|
124
134
|
|
|
125
135
|
workspaced_route = d.pop("workspaced_route", UNSET)
|
|
126
136
|
|
|
137
|
+
summary = d.pop("summary", UNSET)
|
|
138
|
+
|
|
139
|
+
description = d.pop("description", UNSET)
|
|
140
|
+
|
|
127
141
|
_static_asset_config = d.pop("static_asset_config", UNSET)
|
|
128
142
|
static_asset_config: Union[Unset, CreateHttpTriggersJsonBodyItemStaticAssetConfig]
|
|
129
143
|
if isinstance(_static_asset_config, Unset):
|
|
@@ -147,6 +161,8 @@ class CreateHttpTriggersJsonBodyItem:
|
|
|
147
161
|
authentication_method=authentication_method,
|
|
148
162
|
is_static_website=is_static_website,
|
|
149
163
|
workspaced_route=workspaced_route,
|
|
164
|
+
summary=summary,
|
|
165
|
+
description=description,
|
|
150
166
|
static_asset_config=static_asset_config,
|
|
151
167
|
authentication_resource_path=authentication_resource_path,
|
|
152
168
|
wrap_body=wrap_body,
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
|
|
2
|
+
|
|
3
|
+
from attrs import define as _attrs_define
|
|
4
|
+
from attrs import field as _attrs_field
|
|
5
|
+
|
|
6
|
+
from ..models.download_openapi_spec_json_body_openapi_spec_format import DownloadOpenapiSpecJsonBodyOpenapiSpecFormat
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ..models.download_openapi_spec_json_body_http_route_filters_item import (
|
|
11
|
+
DownloadOpenapiSpecJsonBodyHttpRouteFiltersItem,
|
|
12
|
+
)
|
|
13
|
+
from ..models.download_openapi_spec_json_body_info import DownloadOpenapiSpecJsonBodyInfo
|
|
14
|
+
from ..models.download_openapi_spec_json_body_webhook_filters_item import (
|
|
15
|
+
DownloadOpenapiSpecJsonBodyWebhookFiltersItem,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
T = TypeVar("T", bound="DownloadOpenapiSpecJsonBody")
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@_attrs_define
|
|
23
|
+
class DownloadOpenapiSpecJsonBody:
|
|
24
|
+
"""
|
|
25
|
+
Attributes:
|
|
26
|
+
info (Union[Unset, DownloadOpenapiSpecJsonBodyInfo]):
|
|
27
|
+
url (Union[Unset, str]):
|
|
28
|
+
openapi_spec_format (Union[Unset, DownloadOpenapiSpecJsonBodyOpenapiSpecFormat]):
|
|
29
|
+
http_route_filters (Union[Unset, List['DownloadOpenapiSpecJsonBodyHttpRouteFiltersItem']]):
|
|
30
|
+
webhook_filters (Union[Unset, List['DownloadOpenapiSpecJsonBodyWebhookFiltersItem']]):
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
info: Union[Unset, "DownloadOpenapiSpecJsonBodyInfo"] = UNSET
|
|
34
|
+
url: Union[Unset, str] = UNSET
|
|
35
|
+
openapi_spec_format: Union[Unset, DownloadOpenapiSpecJsonBodyOpenapiSpecFormat] = UNSET
|
|
36
|
+
http_route_filters: Union[Unset, List["DownloadOpenapiSpecJsonBodyHttpRouteFiltersItem"]] = UNSET
|
|
37
|
+
webhook_filters: Union[Unset, List["DownloadOpenapiSpecJsonBodyWebhookFiltersItem"]] = UNSET
|
|
38
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
39
|
+
|
|
40
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
41
|
+
info: Union[Unset, Dict[str, Any]] = UNSET
|
|
42
|
+
if not isinstance(self.info, Unset):
|
|
43
|
+
info = self.info.to_dict()
|
|
44
|
+
|
|
45
|
+
url = self.url
|
|
46
|
+
openapi_spec_format: Union[Unset, str] = UNSET
|
|
47
|
+
if not isinstance(self.openapi_spec_format, Unset):
|
|
48
|
+
openapi_spec_format = self.openapi_spec_format.value
|
|
49
|
+
|
|
50
|
+
http_route_filters: Union[Unset, List[Dict[str, Any]]] = UNSET
|
|
51
|
+
if not isinstance(self.http_route_filters, Unset):
|
|
52
|
+
http_route_filters = []
|
|
53
|
+
for http_route_filters_item_data in self.http_route_filters:
|
|
54
|
+
http_route_filters_item = http_route_filters_item_data.to_dict()
|
|
55
|
+
|
|
56
|
+
http_route_filters.append(http_route_filters_item)
|
|
57
|
+
|
|
58
|
+
webhook_filters: Union[Unset, List[Dict[str, Any]]] = UNSET
|
|
59
|
+
if not isinstance(self.webhook_filters, Unset):
|
|
60
|
+
webhook_filters = []
|
|
61
|
+
for webhook_filters_item_data in self.webhook_filters:
|
|
62
|
+
webhook_filters_item = webhook_filters_item_data.to_dict()
|
|
63
|
+
|
|
64
|
+
webhook_filters.append(webhook_filters_item)
|
|
65
|
+
|
|
66
|
+
field_dict: Dict[str, Any] = {}
|
|
67
|
+
field_dict.update(self.additional_properties)
|
|
68
|
+
field_dict.update({})
|
|
69
|
+
if info is not UNSET:
|
|
70
|
+
field_dict["info"] = info
|
|
71
|
+
if url is not UNSET:
|
|
72
|
+
field_dict["url"] = url
|
|
73
|
+
if openapi_spec_format is not UNSET:
|
|
74
|
+
field_dict["openapi_spec_format"] = openapi_spec_format
|
|
75
|
+
if http_route_filters is not UNSET:
|
|
76
|
+
field_dict["http_route_filters"] = http_route_filters
|
|
77
|
+
if webhook_filters is not UNSET:
|
|
78
|
+
field_dict["webhook_filters"] = webhook_filters
|
|
79
|
+
|
|
80
|
+
return field_dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
84
|
+
from ..models.download_openapi_spec_json_body_http_route_filters_item import (
|
|
85
|
+
DownloadOpenapiSpecJsonBodyHttpRouteFiltersItem,
|
|
86
|
+
)
|
|
87
|
+
from ..models.download_openapi_spec_json_body_info import DownloadOpenapiSpecJsonBodyInfo
|
|
88
|
+
from ..models.download_openapi_spec_json_body_webhook_filters_item import (
|
|
89
|
+
DownloadOpenapiSpecJsonBodyWebhookFiltersItem,
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
d = src_dict.copy()
|
|
93
|
+
_info = d.pop("info", UNSET)
|
|
94
|
+
info: Union[Unset, DownloadOpenapiSpecJsonBodyInfo]
|
|
95
|
+
if isinstance(_info, Unset):
|
|
96
|
+
info = UNSET
|
|
97
|
+
else:
|
|
98
|
+
info = DownloadOpenapiSpecJsonBodyInfo.from_dict(_info)
|
|
99
|
+
|
|
100
|
+
url = d.pop("url", UNSET)
|
|
101
|
+
|
|
102
|
+
_openapi_spec_format = d.pop("openapi_spec_format", UNSET)
|
|
103
|
+
openapi_spec_format: Union[Unset, DownloadOpenapiSpecJsonBodyOpenapiSpecFormat]
|
|
104
|
+
if isinstance(_openapi_spec_format, Unset):
|
|
105
|
+
openapi_spec_format = UNSET
|
|
106
|
+
else:
|
|
107
|
+
openapi_spec_format = DownloadOpenapiSpecJsonBodyOpenapiSpecFormat(_openapi_spec_format)
|
|
108
|
+
|
|
109
|
+
http_route_filters = []
|
|
110
|
+
_http_route_filters = d.pop("http_route_filters", UNSET)
|
|
111
|
+
for http_route_filters_item_data in _http_route_filters or []:
|
|
112
|
+
http_route_filters_item = DownloadOpenapiSpecJsonBodyHttpRouteFiltersItem.from_dict(
|
|
113
|
+
http_route_filters_item_data
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
http_route_filters.append(http_route_filters_item)
|
|
117
|
+
|
|
118
|
+
webhook_filters = []
|
|
119
|
+
_webhook_filters = d.pop("webhook_filters", UNSET)
|
|
120
|
+
for webhook_filters_item_data in _webhook_filters or []:
|
|
121
|
+
webhook_filters_item = DownloadOpenapiSpecJsonBodyWebhookFiltersItem.from_dict(webhook_filters_item_data)
|
|
122
|
+
|
|
123
|
+
webhook_filters.append(webhook_filters_item)
|
|
124
|
+
|
|
125
|
+
download_openapi_spec_json_body = cls(
|
|
126
|
+
info=info,
|
|
127
|
+
url=url,
|
|
128
|
+
openapi_spec_format=openapi_spec_format,
|
|
129
|
+
http_route_filters=http_route_filters,
|
|
130
|
+
webhook_filters=webhook_filters,
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
download_openapi_spec_json_body.additional_properties = d
|
|
134
|
+
return download_openapi_spec_json_body
|
|
135
|
+
|
|
136
|
+
@property
|
|
137
|
+
def additional_keys(self) -> List[str]:
|
|
138
|
+
return list(self.additional_properties.keys())
|
|
139
|
+
|
|
140
|
+
def __getitem__(self, key: str) -> Any:
|
|
141
|
+
return self.additional_properties[key]
|
|
142
|
+
|
|
143
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
144
|
+
self.additional_properties[key] = value
|
|
145
|
+
|
|
146
|
+
def __delitem__(self, key: str) -> None:
|
|
147
|
+
del self.additional_properties[key]
|
|
148
|
+
|
|
149
|
+
def __contains__(self, key: str) -> bool:
|
|
150
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
from typing import Any, Dict, List, Type, TypeVar
|
|
2
|
+
|
|
3
|
+
from attrs import define as _attrs_define
|
|
4
|
+
from attrs import field as _attrs_field
|
|
5
|
+
|
|
6
|
+
T = TypeVar("T", bound="DownloadOpenapiSpecJsonBodyHttpRouteFiltersItem")
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@_attrs_define
|
|
10
|
+
class DownloadOpenapiSpecJsonBodyHttpRouteFiltersItem:
|
|
11
|
+
"""
|
|
12
|
+
Attributes:
|
|
13
|
+
folder_regex (str):
|
|
14
|
+
path_regex (str):
|
|
15
|
+
route_path_regex (str):
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
folder_regex: str
|
|
19
|
+
path_regex: str
|
|
20
|
+
route_path_regex: str
|
|
21
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
22
|
+
|
|
23
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
24
|
+
folder_regex = self.folder_regex
|
|
25
|
+
path_regex = self.path_regex
|
|
26
|
+
route_path_regex = self.route_path_regex
|
|
27
|
+
|
|
28
|
+
field_dict: Dict[str, Any] = {}
|
|
29
|
+
field_dict.update(self.additional_properties)
|
|
30
|
+
field_dict.update(
|
|
31
|
+
{
|
|
32
|
+
"folder_regex": folder_regex,
|
|
33
|
+
"path_regex": path_regex,
|
|
34
|
+
"route_path_regex": route_path_regex,
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
return field_dict
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
42
|
+
d = src_dict.copy()
|
|
43
|
+
folder_regex = d.pop("folder_regex")
|
|
44
|
+
|
|
45
|
+
path_regex = d.pop("path_regex")
|
|
46
|
+
|
|
47
|
+
route_path_regex = d.pop("route_path_regex")
|
|
48
|
+
|
|
49
|
+
download_openapi_spec_json_body_http_route_filters_item = cls(
|
|
50
|
+
folder_regex=folder_regex,
|
|
51
|
+
path_regex=path_regex,
|
|
52
|
+
route_path_regex=route_path_regex,
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
download_openapi_spec_json_body_http_route_filters_item.additional_properties = d
|
|
56
|
+
return download_openapi_spec_json_body_http_route_filters_item
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def additional_keys(self) -> List[str]:
|
|
60
|
+
return list(self.additional_properties.keys())
|
|
61
|
+
|
|
62
|
+
def __getitem__(self, key: str) -> Any:
|
|
63
|
+
return self.additional_properties[key]
|
|
64
|
+
|
|
65
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
66
|
+
self.additional_properties[key] = value
|
|
67
|
+
|
|
68
|
+
def __delitem__(self, key: str) -> None:
|
|
69
|
+
del self.additional_properties[key]
|
|
70
|
+
|
|
71
|
+
def __contains__(self, key: str) -> bool:
|
|
72
|
+
return key in self.additional_properties
|