tower 0.3.4__py3-none-linux_armv6l.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.
- tower/__init__.py +4 -0
- tower/__main__.py +38 -0
- tower/client.py +115 -0
- tower/tower_api_client/__init__.py +7 -0
- tower/tower_api_client/api/__init__.py +1 -0
- tower/tower_api_client/api/default/__init__.py +0 -0
- tower/tower_api_client/api/default/accept_invitation.py +150 -0
- tower/tower_api_client/api/default/cancel_run.py +159 -0
- tower/tower_api_client/api/default/claim_device_login_ticket.py +154 -0
- tower/tower_api_client/api/default/create_account.py +150 -0
- tower/tower_api_client/api/default/create_api_key.py +142 -0
- tower/tower_api_client/api/default/create_apps.py +150 -0
- tower/tower_api_client/api/default/create_device_login_ticket.py +131 -0
- tower/tower_api_client/api/default/create_secret.py +150 -0
- tower/tower_api_client/api/default/create_session.py +150 -0
- tower/tower_api_client/api/default/create_team.py +150 -0
- tower/tower_api_client/api/default/delete_api_key.py +142 -0
- tower/tower_api_client/api/default/delete_app.py +146 -0
- tower/tower_api_client/api/default/delete_secret.py +104 -0
- tower/tower_api_client/api/default/delete_team.py +150 -0
- tower/tower_api_client/api/default/delete_team_invitation.py +167 -0
- tower/tower_api_client/api/default/deploy_app.py +166 -0
- tower/tower_api_client/api/default/describe_app.py +165 -0
- tower/tower_api_client/api/default/describe_app_version.py +163 -0
- tower/tower_api_client/api/default/describe_device_login_session.py +154 -0
- tower/tower_api_client/api/default/describe_run.py +172 -0
- tower/tower_api_client/api/default/describe_secrets_key.py +160 -0
- tower/tower_api_client/api/default/describe_session.py +125 -0
- tower/tower_api_client/api/default/export_secrets.py +218 -0
- tower/tower_api_client/api/default/generate_app_statistics.py +129 -0
- tower/tower_api_client/api/default/generate_run_statistics.py +160 -0
- tower/tower_api_client/api/default/get_app_run_logs.py +159 -0
- tower/tower_api_client/api/default/invite_team_member.py +163 -0
- tower/tower_api_client/api/default/leave_team.py +150 -0
- tower/tower_api_client/api/default/list_api_keys.py +125 -0
- tower/tower_api_client/api/default/list_app_environments.py +150 -0
- tower/tower_api_client/api/default/list_app_versions.py +146 -0
- tower/tower_api_client/api/default/list_apps.py +247 -0
- tower/tower_api_client/api/default/list_my_team_invitations.py +129 -0
- tower/tower_api_client/api/default/list_runs.py +184 -0
- tower/tower_api_client/api/default/list_secret_environments.py +129 -0
- tower/tower_api_client/api/default/list_secrets.py +201 -0
- tower/tower_api_client/api/default/list_team_invitations.py +150 -0
- tower/tower_api_client/api/default/list_team_members.py +146 -0
- tower/tower_api_client/api/default/list_teams.py +125 -0
- tower/tower_api_client/api/default/refresh_session.py +129 -0
- tower/tower_api_client/api/default/remove_team_member.py +163 -0
- tower/tower_api_client/api/default/resend_team_invitation.py +167 -0
- tower/tower_api_client/api/default/run_app.py +176 -0
- tower/tower_api_client/api/default/stream_app_run_logs.py +100 -0
- tower/tower_api_client/api/default/update_account_slug.py +163 -0
- tower/tower_api_client/api/default/update_my_team_invitation.py +154 -0
- tower/tower_api_client/api/default/update_team.py +167 -0
- tower/tower_api_client/api/default/update_user.py +150 -0
- tower/tower_api_client/client.py +51 -0
- tower/tower_api_client/models/__init__.py +193 -0
- tower/tower_api_client/models/accept_invitation_params.py +49 -0
- tower/tower_api_client/models/accept_invitation_response.py +56 -0
- tower/tower_api_client/models/account.py +45 -0
- tower/tower_api_client/models/api_key.py +67 -0
- tower/tower_api_client/models/app.py +122 -0
- tower/tower_api_client/models/app_statistics.py +66 -0
- tower/tower_api_client/models/app_summary.py +81 -0
- tower/tower_api_client/models/app_version.py +71 -0
- tower/tower_api_client/models/cancel_run_response.py +56 -0
- tower/tower_api_client/models/claim_device_login_ticket_params.py +49 -0
- tower/tower_api_client/models/claim_device_login_ticket_response.py +49 -0
- tower/tower_api_client/models/create_account_params.py +91 -0
- tower/tower_api_client/models/create_account_params_flags_struct.py +38 -0
- tower/tower_api_client/models/create_account_response.py +56 -0
- tower/tower_api_client/models/create_api_key_params.py +49 -0
- tower/tower_api_client/models/create_api_key_response.py +56 -0
- tower/tower_api_client/models/create_app_params.py +57 -0
- tower/tower_api_client/models/create_app_response.py +56 -0
- tower/tower_api_client/models/create_device_login_ticket_response.py +94 -0
- tower/tower_api_client/models/create_secret_params.py +70 -0
- tower/tower_api_client/models/create_secret_response.py +56 -0
- tower/tower_api_client/models/create_session_params.py +56 -0
- tower/tower_api_client/models/create_session_response.py +56 -0
- tower/tower_api_client/models/create_team_params.py +56 -0
- tower/tower_api_client/models/create_team_response.py +56 -0
- tower/tower_api_client/models/delete_api_key_params.py +49 -0
- tower/tower_api_client/models/delete_api_key_response.py +56 -0
- tower/tower_api_client/models/delete_app_response.py +56 -0
- tower/tower_api_client/models/delete_team_invitation_params.py +49 -0
- tower/tower_api_client/models/delete_team_invitation_response.py +56 -0
- tower/tower_api_client/models/delete_team_params.py +49 -0
- tower/tower_api_client/models/delete_team_response.py +56 -0
- tower/tower_api_client/models/deploy_app_response.py +56 -0
- tower/tower_api_client/models/describe_app_response.py +75 -0
- tower/tower_api_client/models/describe_app_version_response.py +56 -0
- tower/tower_api_client/models/describe_device_login_session_response.py +56 -0
- tower/tower_api_client/models/describe_run_response.py +56 -0
- tower/tower_api_client/models/describe_secrets_key_response.py +49 -0
- tower/tower_api_client/models/describe_session_response.py +56 -0
- tower/tower_api_client/models/error_detail.py +54 -0
- tower/tower_api_client/models/error_model.py +109 -0
- tower/tower_api_client/models/export_secrets_response.py +75 -0
- tower/tower_api_client/models/export_user_secrets_params.py +49 -0
- tower/tower_api_client/models/exported_secret.py +62 -0
- tower/tower_api_client/models/generate_app_statistics_response.py +56 -0
- tower/tower_api_client/models/generate_run_statistics_response.py +85 -0
- tower/tower_api_client/models/get_run_log_line.py +47 -0
- tower/tower_api_client/models/get_run_logs_output_body.py +65 -0
- tower/tower_api_client/models/invite_team_member_params.py +58 -0
- tower/tower_api_client/models/invite_team_member_response.py +65 -0
- tower/tower_api_client/models/leave_team_response.py +56 -0
- tower/tower_api_client/models/list_api_keys_response.py +65 -0
- tower/tower_api_client/models/list_app_environments_response.py +50 -0
- tower/tower_api_client/models/list_app_versions_response.py +65 -0
- tower/tower_api_client/models/list_apps_response.py +75 -0
- tower/tower_api_client/models/list_apps_status_item.py +11 -0
- tower/tower_api_client/models/list_my_team_invitations_response.py +65 -0
- tower/tower_api_client/models/list_runs_response.py +75 -0
- tower/tower_api_client/models/list_secret_environments_response.py +50 -0
- tower/tower_api_client/models/list_secrets_response.py +75 -0
- tower/tower_api_client/models/list_team_invitations_response.py +65 -0
- tower/tower_api_client/models/list_team_members_response.py +65 -0
- tower/tower_api_client/models/list_teams_response.py +65 -0
- tower/tower_api_client/models/log_line.py +62 -0
- tower/tower_api_client/models/log_line_error.py +47 -0
- tower/tower_api_client/models/pagination.py +59 -0
- tower/tower_api_client/models/parameter.py +52 -0
- tower/tower_api_client/models/refresh_session_response.py +66 -0
- tower/tower_api_client/models/remove_team_member_params.py +49 -0
- tower/tower_api_client/models/remove_team_member_response.py +56 -0
- tower/tower_api_client/models/resend_team_invitation_params.py +57 -0
- tower/tower_api_client/models/resend_team_invitation_response.py +56 -0
- tower/tower_api_client/models/run.py +129 -0
- tower/tower_api_client/models/run_app_params.py +72 -0
- tower/tower_api_client/models/run_app_params_parameters.py +43 -0
- tower/tower_api_client/models/run_app_response.py +56 -0
- tower/tower_api_client/models/run_results.py +73 -0
- tower/tower_api_client/models/run_statistics.py +52 -0
- tower/tower_api_client/models/secret.py +62 -0
- tower/tower_api_client/models/series_point.py +52 -0
- tower/tower_api_client/models/session.py +73 -0
- tower/tower_api_client/models/statistics_settings.py +38 -0
- tower/tower_api_client/models/team.py +75 -0
- tower/tower_api_client/models/team_invitation.py +61 -0
- tower/tower_api_client/models/token.py +38 -0
- tower/tower_api_client/models/update_account_slug_params.py +49 -0
- tower/tower_api_client/models/update_account_slug_response.py +56 -0
- tower/tower_api_client/models/update_my_team_invitation_params.py +56 -0
- tower/tower_api_client/models/update_my_team_invitation_response.py +39 -0
- tower/tower_api_client/models/update_team_params.py +58 -0
- tower/tower_api_client/models/update_team_response.py +56 -0
- tower/tower_api_client/models/update_user_params.py +71 -0
- tower/tower_api_client/models/update_user_response.py +56 -0
- tower/tower_api_client/models/user.py +90 -0
- tower/tower_api_client/types.py +44 -0
- tower-0.3.4.data/scripts/tower +0 -0
- tower-0.3.4.dist-info/METADATA +115 -0
- tower-0.3.4.dist-info/RECORD +156 -0
- tower-0.3.4.dist-info/WHEEL +4 -0
- tower-0.3.4.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Dict, Optional, Union
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ...client import AuthenticatedClient
|
|
7
|
+
from ...models.list_runs_response import ListRunsResponse
|
|
8
|
+
from ...types import UNSET, Response, Unset
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _get_kwargs(
|
|
12
|
+
name: str,
|
|
13
|
+
*,
|
|
14
|
+
client: AuthenticatedClient,
|
|
15
|
+
page: Union[Unset, None, int] = UNSET,
|
|
16
|
+
page_size: Union[Unset, None, int] = UNSET,
|
|
17
|
+
) -> Dict[str, Any]:
|
|
18
|
+
url = "{}/apps/{name}/runs".format(client.base_url, name=name)
|
|
19
|
+
|
|
20
|
+
headers: Dict[str, str] = client.get_headers()
|
|
21
|
+
cookies: Dict[str, Any] = client.get_cookies()
|
|
22
|
+
|
|
23
|
+
params: Dict[str, Any] = {}
|
|
24
|
+
params["page"] = page
|
|
25
|
+
|
|
26
|
+
params["page_size"] = page_size
|
|
27
|
+
|
|
28
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
29
|
+
|
|
30
|
+
return {
|
|
31
|
+
"method": "get",
|
|
32
|
+
"url": url,
|
|
33
|
+
"headers": headers,
|
|
34
|
+
"cookies": cookies,
|
|
35
|
+
"timeout": client.get_timeout(),
|
|
36
|
+
"params": params,
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def _parse_response(*, response: httpx.Response) -> Optional[ListRunsResponse]:
|
|
41
|
+
if response.status_code == 200:
|
|
42
|
+
response_200 = ListRunsResponse.from_dict(response.json())
|
|
43
|
+
|
|
44
|
+
return response_200
|
|
45
|
+
return None
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def _build_response(*, response: httpx.Response) -> Response[ListRunsResponse]:
|
|
49
|
+
return Response(
|
|
50
|
+
status_code=HTTPStatus(response.status_code),
|
|
51
|
+
content=response.content,
|
|
52
|
+
headers=response.headers,
|
|
53
|
+
parsed=_parse_response(response=response),
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def sync_detailed(
|
|
58
|
+
name: str,
|
|
59
|
+
*,
|
|
60
|
+
client: AuthenticatedClient,
|
|
61
|
+
page: Union[Unset, None, int] = UNSET,
|
|
62
|
+
page_size: Union[Unset, None, int] = UNSET,
|
|
63
|
+
) -> Response[ListRunsResponse]:
|
|
64
|
+
"""List runs
|
|
65
|
+
|
|
66
|
+
Generates a list of all the runs for a given app. The list is paginated based on the query string
|
|
67
|
+
parameters passed in.
|
|
68
|
+
|
|
69
|
+
Args:
|
|
70
|
+
name (str): The name of the app to fetch runs for.
|
|
71
|
+
page (Union[Unset, None, int]): The page number to fetch.
|
|
72
|
+
page_size (Union[Unset, None, int]): The number of records to fetch on each page.
|
|
73
|
+
|
|
74
|
+
Returns:
|
|
75
|
+
Response[ListRunsResponse]
|
|
76
|
+
"""
|
|
77
|
+
|
|
78
|
+
kwargs = _get_kwargs(
|
|
79
|
+
name=name,
|
|
80
|
+
client=client,
|
|
81
|
+
page=page,
|
|
82
|
+
page_size=page_size,
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
response = httpx.request(
|
|
86
|
+
verify=client.verify_ssl,
|
|
87
|
+
**kwargs,
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
return _build_response(response=response)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def sync(
|
|
94
|
+
name: str,
|
|
95
|
+
*,
|
|
96
|
+
client: AuthenticatedClient,
|
|
97
|
+
page: Union[Unset, None, int] = UNSET,
|
|
98
|
+
page_size: Union[Unset, None, int] = UNSET,
|
|
99
|
+
) -> Optional[ListRunsResponse]:
|
|
100
|
+
"""List runs
|
|
101
|
+
|
|
102
|
+
Generates a list of all the runs for a given app. The list is paginated based on the query string
|
|
103
|
+
parameters passed in.
|
|
104
|
+
|
|
105
|
+
Args:
|
|
106
|
+
name (str): The name of the app to fetch runs for.
|
|
107
|
+
page (Union[Unset, None, int]): The page number to fetch.
|
|
108
|
+
page_size (Union[Unset, None, int]): The number of records to fetch on each page.
|
|
109
|
+
|
|
110
|
+
Returns:
|
|
111
|
+
Response[ListRunsResponse]
|
|
112
|
+
"""
|
|
113
|
+
|
|
114
|
+
return sync_detailed(
|
|
115
|
+
name=name,
|
|
116
|
+
client=client,
|
|
117
|
+
page=page,
|
|
118
|
+
page_size=page_size,
|
|
119
|
+
).parsed
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
async def asyncio_detailed(
|
|
123
|
+
name: str,
|
|
124
|
+
*,
|
|
125
|
+
client: AuthenticatedClient,
|
|
126
|
+
page: Union[Unset, None, int] = UNSET,
|
|
127
|
+
page_size: Union[Unset, None, int] = UNSET,
|
|
128
|
+
) -> Response[ListRunsResponse]:
|
|
129
|
+
"""List runs
|
|
130
|
+
|
|
131
|
+
Generates a list of all the runs for a given app. The list is paginated based on the query string
|
|
132
|
+
parameters passed in.
|
|
133
|
+
|
|
134
|
+
Args:
|
|
135
|
+
name (str): The name of the app to fetch runs for.
|
|
136
|
+
page (Union[Unset, None, int]): The page number to fetch.
|
|
137
|
+
page_size (Union[Unset, None, int]): The number of records to fetch on each page.
|
|
138
|
+
|
|
139
|
+
Returns:
|
|
140
|
+
Response[ListRunsResponse]
|
|
141
|
+
"""
|
|
142
|
+
|
|
143
|
+
kwargs = _get_kwargs(
|
|
144
|
+
name=name,
|
|
145
|
+
client=client,
|
|
146
|
+
page=page,
|
|
147
|
+
page_size=page_size,
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
151
|
+
response = await _client.request(**kwargs)
|
|
152
|
+
|
|
153
|
+
return _build_response(response=response)
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
async def asyncio(
|
|
157
|
+
name: str,
|
|
158
|
+
*,
|
|
159
|
+
client: AuthenticatedClient,
|
|
160
|
+
page: Union[Unset, None, int] = UNSET,
|
|
161
|
+
page_size: Union[Unset, None, int] = UNSET,
|
|
162
|
+
) -> Optional[ListRunsResponse]:
|
|
163
|
+
"""List runs
|
|
164
|
+
|
|
165
|
+
Generates a list of all the runs for a given app. The list is paginated based on the query string
|
|
166
|
+
parameters passed in.
|
|
167
|
+
|
|
168
|
+
Args:
|
|
169
|
+
name (str): The name of the app to fetch runs for.
|
|
170
|
+
page (Union[Unset, None, int]): The page number to fetch.
|
|
171
|
+
page_size (Union[Unset, None, int]): The number of records to fetch on each page.
|
|
172
|
+
|
|
173
|
+
Returns:
|
|
174
|
+
Response[ListRunsResponse]
|
|
175
|
+
"""
|
|
176
|
+
|
|
177
|
+
return (
|
|
178
|
+
await asyncio_detailed(
|
|
179
|
+
name=name,
|
|
180
|
+
client=client,
|
|
181
|
+
page=page,
|
|
182
|
+
page_size=page_size,
|
|
183
|
+
)
|
|
184
|
+
).parsed
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Dict, Optional
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ...client import AuthenticatedClient
|
|
7
|
+
from ...models.list_secret_environments_response import ListSecretEnvironmentsResponse
|
|
8
|
+
from ...types import Response
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _get_kwargs(
|
|
12
|
+
*,
|
|
13
|
+
client: AuthenticatedClient,
|
|
14
|
+
) -> Dict[str, Any]:
|
|
15
|
+
url = "{}/secrets/environments".format(client.base_url)
|
|
16
|
+
|
|
17
|
+
headers: Dict[str, str] = client.get_headers()
|
|
18
|
+
cookies: Dict[str, Any] = client.get_cookies()
|
|
19
|
+
|
|
20
|
+
return {
|
|
21
|
+
"method": "get",
|
|
22
|
+
"url": url,
|
|
23
|
+
"headers": headers,
|
|
24
|
+
"cookies": cookies,
|
|
25
|
+
"timeout": client.get_timeout(),
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _parse_response(
|
|
30
|
+
*, response: httpx.Response
|
|
31
|
+
) -> Optional[ListSecretEnvironmentsResponse]:
|
|
32
|
+
if response.status_code == 200:
|
|
33
|
+
response_200 = ListSecretEnvironmentsResponse.from_dict(response.json())
|
|
34
|
+
|
|
35
|
+
return response_200
|
|
36
|
+
return None
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def _build_response(
|
|
40
|
+
*, response: httpx.Response
|
|
41
|
+
) -> Response[ListSecretEnvironmentsResponse]:
|
|
42
|
+
return Response(
|
|
43
|
+
status_code=HTTPStatus(response.status_code),
|
|
44
|
+
content=response.content,
|
|
45
|
+
headers=response.headers,
|
|
46
|
+
parsed=_parse_response(response=response),
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def sync_detailed(
|
|
51
|
+
*,
|
|
52
|
+
client: AuthenticatedClient,
|
|
53
|
+
) -> Response[ListSecretEnvironmentsResponse]:
|
|
54
|
+
"""List secret environments
|
|
55
|
+
|
|
56
|
+
Lists all the environments associated with secrets.
|
|
57
|
+
|
|
58
|
+
Returns:
|
|
59
|
+
Response[ListSecretEnvironmentsResponse]
|
|
60
|
+
"""
|
|
61
|
+
|
|
62
|
+
kwargs = _get_kwargs(
|
|
63
|
+
client=client,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
response = httpx.request(
|
|
67
|
+
verify=client.verify_ssl,
|
|
68
|
+
**kwargs,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
return _build_response(response=response)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def sync(
|
|
75
|
+
*,
|
|
76
|
+
client: AuthenticatedClient,
|
|
77
|
+
) -> Optional[ListSecretEnvironmentsResponse]:
|
|
78
|
+
"""List secret environments
|
|
79
|
+
|
|
80
|
+
Lists all the environments associated with secrets.
|
|
81
|
+
|
|
82
|
+
Returns:
|
|
83
|
+
Response[ListSecretEnvironmentsResponse]
|
|
84
|
+
"""
|
|
85
|
+
|
|
86
|
+
return sync_detailed(
|
|
87
|
+
client=client,
|
|
88
|
+
).parsed
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
async def asyncio_detailed(
|
|
92
|
+
*,
|
|
93
|
+
client: AuthenticatedClient,
|
|
94
|
+
) -> Response[ListSecretEnvironmentsResponse]:
|
|
95
|
+
"""List secret environments
|
|
96
|
+
|
|
97
|
+
Lists all the environments associated with secrets.
|
|
98
|
+
|
|
99
|
+
Returns:
|
|
100
|
+
Response[ListSecretEnvironmentsResponse]
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
kwargs = _get_kwargs(
|
|
104
|
+
client=client,
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
108
|
+
response = await _client.request(**kwargs)
|
|
109
|
+
|
|
110
|
+
return _build_response(response=response)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
async def asyncio(
|
|
114
|
+
*,
|
|
115
|
+
client: AuthenticatedClient,
|
|
116
|
+
) -> Optional[ListSecretEnvironmentsResponse]:
|
|
117
|
+
"""List secret environments
|
|
118
|
+
|
|
119
|
+
Lists all the environments associated with secrets.
|
|
120
|
+
|
|
121
|
+
Returns:
|
|
122
|
+
Response[ListSecretEnvironmentsResponse]
|
|
123
|
+
"""
|
|
124
|
+
|
|
125
|
+
return (
|
|
126
|
+
await asyncio_detailed(
|
|
127
|
+
client=client,
|
|
128
|
+
)
|
|
129
|
+
).parsed
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Dict, Optional, Union
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ...client import AuthenticatedClient
|
|
7
|
+
from ...models.list_secrets_response import ListSecretsResponse
|
|
8
|
+
from ...types import UNSET, Response, Unset
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _get_kwargs(
|
|
12
|
+
*,
|
|
13
|
+
client: AuthenticatedClient,
|
|
14
|
+
environment: Union[Unset, None, str] = UNSET,
|
|
15
|
+
all_: Union[Unset, None, bool] = UNSET,
|
|
16
|
+
page: Union[Unset, None, int] = UNSET,
|
|
17
|
+
page_size: Union[Unset, None, int] = UNSET,
|
|
18
|
+
) -> Dict[str, Any]:
|
|
19
|
+
url = "{}/secrets".format(client.base_url)
|
|
20
|
+
|
|
21
|
+
headers: Dict[str, str] = client.get_headers()
|
|
22
|
+
cookies: Dict[str, Any] = client.get_cookies()
|
|
23
|
+
|
|
24
|
+
params: Dict[str, Any] = {}
|
|
25
|
+
params["environment"] = environment
|
|
26
|
+
|
|
27
|
+
params["all"] = all_
|
|
28
|
+
|
|
29
|
+
params["page"] = page
|
|
30
|
+
|
|
31
|
+
params["page_size"] = page_size
|
|
32
|
+
|
|
33
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
34
|
+
|
|
35
|
+
return {
|
|
36
|
+
"method": "get",
|
|
37
|
+
"url": url,
|
|
38
|
+
"headers": headers,
|
|
39
|
+
"cookies": cookies,
|
|
40
|
+
"timeout": client.get_timeout(),
|
|
41
|
+
"params": params,
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def _parse_response(*, response: httpx.Response) -> Optional[ListSecretsResponse]:
|
|
46
|
+
if response.status_code == 200:
|
|
47
|
+
response_200 = ListSecretsResponse.from_dict(response.json())
|
|
48
|
+
|
|
49
|
+
return response_200
|
|
50
|
+
return None
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def _build_response(*, response: httpx.Response) -> Response[ListSecretsResponse]:
|
|
54
|
+
return Response(
|
|
55
|
+
status_code=HTTPStatus(response.status_code),
|
|
56
|
+
content=response.content,
|
|
57
|
+
headers=response.headers,
|
|
58
|
+
parsed=_parse_response(response=response),
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def sync_detailed(
|
|
63
|
+
*,
|
|
64
|
+
client: AuthenticatedClient,
|
|
65
|
+
environment: Union[Unset, None, str] = UNSET,
|
|
66
|
+
all_: Union[Unset, None, bool] = UNSET,
|
|
67
|
+
page: Union[Unset, None, int] = UNSET,
|
|
68
|
+
page_size: Union[Unset, None, int] = UNSET,
|
|
69
|
+
) -> Response[ListSecretsResponse]:
|
|
70
|
+
"""List secrets
|
|
71
|
+
|
|
72
|
+
Lists all the secrets associated with your current account.
|
|
73
|
+
|
|
74
|
+
Args:
|
|
75
|
+
environment (Union[Unset, None, str]): The environment to filter by.
|
|
76
|
+
all_ (Union[Unset, None, bool]): Whether to fetch all secrets or only the ones that are
|
|
77
|
+
not marked as deleted.
|
|
78
|
+
page (Union[Unset, None, int]): The page number to fetch.
|
|
79
|
+
page_size (Union[Unset, None, int]): The number of records to fetch on each page.
|
|
80
|
+
|
|
81
|
+
Returns:
|
|
82
|
+
Response[ListSecretsResponse]
|
|
83
|
+
"""
|
|
84
|
+
|
|
85
|
+
kwargs = _get_kwargs(
|
|
86
|
+
client=client,
|
|
87
|
+
environment=environment,
|
|
88
|
+
all_=all_,
|
|
89
|
+
page=page,
|
|
90
|
+
page_size=page_size,
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
response = httpx.request(
|
|
94
|
+
verify=client.verify_ssl,
|
|
95
|
+
**kwargs,
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
return _build_response(response=response)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def sync(
|
|
102
|
+
*,
|
|
103
|
+
client: AuthenticatedClient,
|
|
104
|
+
environment: Union[Unset, None, str] = UNSET,
|
|
105
|
+
all_: Union[Unset, None, bool] = UNSET,
|
|
106
|
+
page: Union[Unset, None, int] = UNSET,
|
|
107
|
+
page_size: Union[Unset, None, int] = UNSET,
|
|
108
|
+
) -> Optional[ListSecretsResponse]:
|
|
109
|
+
"""List secrets
|
|
110
|
+
|
|
111
|
+
Lists all the secrets associated with your current account.
|
|
112
|
+
|
|
113
|
+
Args:
|
|
114
|
+
environment (Union[Unset, None, str]): The environment to filter by.
|
|
115
|
+
all_ (Union[Unset, None, bool]): Whether to fetch all secrets or only the ones that are
|
|
116
|
+
not marked as deleted.
|
|
117
|
+
page (Union[Unset, None, int]): The page number to fetch.
|
|
118
|
+
page_size (Union[Unset, None, int]): The number of records to fetch on each page.
|
|
119
|
+
|
|
120
|
+
Returns:
|
|
121
|
+
Response[ListSecretsResponse]
|
|
122
|
+
"""
|
|
123
|
+
|
|
124
|
+
return sync_detailed(
|
|
125
|
+
client=client,
|
|
126
|
+
environment=environment,
|
|
127
|
+
all_=all_,
|
|
128
|
+
page=page,
|
|
129
|
+
page_size=page_size,
|
|
130
|
+
).parsed
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
async def asyncio_detailed(
|
|
134
|
+
*,
|
|
135
|
+
client: AuthenticatedClient,
|
|
136
|
+
environment: Union[Unset, None, str] = UNSET,
|
|
137
|
+
all_: Union[Unset, None, bool] = UNSET,
|
|
138
|
+
page: Union[Unset, None, int] = UNSET,
|
|
139
|
+
page_size: Union[Unset, None, int] = UNSET,
|
|
140
|
+
) -> Response[ListSecretsResponse]:
|
|
141
|
+
"""List secrets
|
|
142
|
+
|
|
143
|
+
Lists all the secrets associated with your current account.
|
|
144
|
+
|
|
145
|
+
Args:
|
|
146
|
+
environment (Union[Unset, None, str]): The environment to filter by.
|
|
147
|
+
all_ (Union[Unset, None, bool]): Whether to fetch all secrets or only the ones that are
|
|
148
|
+
not marked as deleted.
|
|
149
|
+
page (Union[Unset, None, int]): The page number to fetch.
|
|
150
|
+
page_size (Union[Unset, None, int]): The number of records to fetch on each page.
|
|
151
|
+
|
|
152
|
+
Returns:
|
|
153
|
+
Response[ListSecretsResponse]
|
|
154
|
+
"""
|
|
155
|
+
|
|
156
|
+
kwargs = _get_kwargs(
|
|
157
|
+
client=client,
|
|
158
|
+
environment=environment,
|
|
159
|
+
all_=all_,
|
|
160
|
+
page=page,
|
|
161
|
+
page_size=page_size,
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
165
|
+
response = await _client.request(**kwargs)
|
|
166
|
+
|
|
167
|
+
return _build_response(response=response)
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
async def asyncio(
|
|
171
|
+
*,
|
|
172
|
+
client: AuthenticatedClient,
|
|
173
|
+
environment: Union[Unset, None, str] = UNSET,
|
|
174
|
+
all_: Union[Unset, None, bool] = UNSET,
|
|
175
|
+
page: Union[Unset, None, int] = UNSET,
|
|
176
|
+
page_size: Union[Unset, None, int] = UNSET,
|
|
177
|
+
) -> Optional[ListSecretsResponse]:
|
|
178
|
+
"""List secrets
|
|
179
|
+
|
|
180
|
+
Lists all the secrets associated with your current account.
|
|
181
|
+
|
|
182
|
+
Args:
|
|
183
|
+
environment (Union[Unset, None, str]): The environment to filter by.
|
|
184
|
+
all_ (Union[Unset, None, bool]): Whether to fetch all secrets or only the ones that are
|
|
185
|
+
not marked as deleted.
|
|
186
|
+
page (Union[Unset, None, int]): The page number to fetch.
|
|
187
|
+
page_size (Union[Unset, None, int]): The number of records to fetch on each page.
|
|
188
|
+
|
|
189
|
+
Returns:
|
|
190
|
+
Response[ListSecretsResponse]
|
|
191
|
+
"""
|
|
192
|
+
|
|
193
|
+
return (
|
|
194
|
+
await asyncio_detailed(
|
|
195
|
+
client=client,
|
|
196
|
+
environment=environment,
|
|
197
|
+
all_=all_,
|
|
198
|
+
page=page,
|
|
199
|
+
page_size=page_size,
|
|
200
|
+
)
|
|
201
|
+
).parsed
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Dict, Optional
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ...client import AuthenticatedClient
|
|
7
|
+
from ...models.list_team_invitations_response import ListTeamInvitationsResponse
|
|
8
|
+
from ...types import Response
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _get_kwargs(
|
|
12
|
+
slug: str,
|
|
13
|
+
*,
|
|
14
|
+
client: AuthenticatedClient,
|
|
15
|
+
) -> Dict[str, Any]:
|
|
16
|
+
url = "{}/teams/{slug}/invites".format(client.base_url, slug=slug)
|
|
17
|
+
|
|
18
|
+
headers: Dict[str, str] = client.get_headers()
|
|
19
|
+
cookies: Dict[str, Any] = client.get_cookies()
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
"method": "get",
|
|
23
|
+
"url": url,
|
|
24
|
+
"headers": headers,
|
|
25
|
+
"cookies": cookies,
|
|
26
|
+
"timeout": client.get_timeout(),
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def _parse_response(
|
|
31
|
+
*, response: httpx.Response
|
|
32
|
+
) -> Optional[ListTeamInvitationsResponse]:
|
|
33
|
+
if response.status_code == 200:
|
|
34
|
+
response_200 = ListTeamInvitationsResponse.from_dict(response.json())
|
|
35
|
+
|
|
36
|
+
return response_200
|
|
37
|
+
return None
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def _build_response(
|
|
41
|
+
*, response: httpx.Response
|
|
42
|
+
) -> Response[ListTeamInvitationsResponse]:
|
|
43
|
+
return Response(
|
|
44
|
+
status_code=HTTPStatus(response.status_code),
|
|
45
|
+
content=response.content,
|
|
46
|
+
headers=response.headers,
|
|
47
|
+
parsed=_parse_response(response=response),
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def sync_detailed(
|
|
52
|
+
slug: str,
|
|
53
|
+
*,
|
|
54
|
+
client: AuthenticatedClient,
|
|
55
|
+
) -> Response[ListTeamInvitationsResponse]:
|
|
56
|
+
"""List Team Invitations
|
|
57
|
+
|
|
58
|
+
List the pending invitations for a team
|
|
59
|
+
|
|
60
|
+
Args:
|
|
61
|
+
slug (str): The slug of the team to list members for
|
|
62
|
+
|
|
63
|
+
Returns:
|
|
64
|
+
Response[ListTeamInvitationsResponse]
|
|
65
|
+
"""
|
|
66
|
+
|
|
67
|
+
kwargs = _get_kwargs(
|
|
68
|
+
slug=slug,
|
|
69
|
+
client=client,
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
response = httpx.request(
|
|
73
|
+
verify=client.verify_ssl,
|
|
74
|
+
**kwargs,
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
return _build_response(response=response)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def sync(
|
|
81
|
+
slug: str,
|
|
82
|
+
*,
|
|
83
|
+
client: AuthenticatedClient,
|
|
84
|
+
) -> Optional[ListTeamInvitationsResponse]:
|
|
85
|
+
"""List Team Invitations
|
|
86
|
+
|
|
87
|
+
List the pending invitations for a team
|
|
88
|
+
|
|
89
|
+
Args:
|
|
90
|
+
slug (str): The slug of the team to list members for
|
|
91
|
+
|
|
92
|
+
Returns:
|
|
93
|
+
Response[ListTeamInvitationsResponse]
|
|
94
|
+
"""
|
|
95
|
+
|
|
96
|
+
return sync_detailed(
|
|
97
|
+
slug=slug,
|
|
98
|
+
client=client,
|
|
99
|
+
).parsed
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
async def asyncio_detailed(
|
|
103
|
+
slug: str,
|
|
104
|
+
*,
|
|
105
|
+
client: AuthenticatedClient,
|
|
106
|
+
) -> Response[ListTeamInvitationsResponse]:
|
|
107
|
+
"""List Team Invitations
|
|
108
|
+
|
|
109
|
+
List the pending invitations for a team
|
|
110
|
+
|
|
111
|
+
Args:
|
|
112
|
+
slug (str): The slug of the team to list members for
|
|
113
|
+
|
|
114
|
+
Returns:
|
|
115
|
+
Response[ListTeamInvitationsResponse]
|
|
116
|
+
"""
|
|
117
|
+
|
|
118
|
+
kwargs = _get_kwargs(
|
|
119
|
+
slug=slug,
|
|
120
|
+
client=client,
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
124
|
+
response = await _client.request(**kwargs)
|
|
125
|
+
|
|
126
|
+
return _build_response(response=response)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
async def asyncio(
|
|
130
|
+
slug: str,
|
|
131
|
+
*,
|
|
132
|
+
client: AuthenticatedClient,
|
|
133
|
+
) -> Optional[ListTeamInvitationsResponse]:
|
|
134
|
+
"""List Team Invitations
|
|
135
|
+
|
|
136
|
+
List the pending invitations for a team
|
|
137
|
+
|
|
138
|
+
Args:
|
|
139
|
+
slug (str): The slug of the team to list members for
|
|
140
|
+
|
|
141
|
+
Returns:
|
|
142
|
+
Response[ListTeamInvitationsResponse]
|
|
143
|
+
"""
|
|
144
|
+
|
|
145
|
+
return (
|
|
146
|
+
await asyncio_detailed(
|
|
147
|
+
slug=slug,
|
|
148
|
+
client=client,
|
|
149
|
+
)
|
|
150
|
+
).parsed
|