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,146 @@
|
|
|
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_members_response import ListTeamMembersResponse
|
|
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}/members".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(*, response: httpx.Response) -> Optional[ListTeamMembersResponse]:
|
|
31
|
+
if response.status_code == 200:
|
|
32
|
+
response_200 = ListTeamMembersResponse.from_dict(response.json())
|
|
33
|
+
|
|
34
|
+
return response_200
|
|
35
|
+
return None
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def _build_response(*, response: httpx.Response) -> Response[ListTeamMembersResponse]:
|
|
39
|
+
return Response(
|
|
40
|
+
status_code=HTTPStatus(response.status_code),
|
|
41
|
+
content=response.content,
|
|
42
|
+
headers=response.headers,
|
|
43
|
+
parsed=_parse_response(response=response),
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def sync_detailed(
|
|
48
|
+
slug: str,
|
|
49
|
+
*,
|
|
50
|
+
client: AuthenticatedClient,
|
|
51
|
+
) -> Response[ListTeamMembersResponse]:
|
|
52
|
+
"""List Team Members
|
|
53
|
+
|
|
54
|
+
List the members of a team
|
|
55
|
+
|
|
56
|
+
Args:
|
|
57
|
+
slug (str): The slug of the team to list members for
|
|
58
|
+
|
|
59
|
+
Returns:
|
|
60
|
+
Response[ListTeamMembersResponse]
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
kwargs = _get_kwargs(
|
|
64
|
+
slug=slug,
|
|
65
|
+
client=client,
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
response = httpx.request(
|
|
69
|
+
verify=client.verify_ssl,
|
|
70
|
+
**kwargs,
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
return _build_response(response=response)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def sync(
|
|
77
|
+
slug: str,
|
|
78
|
+
*,
|
|
79
|
+
client: AuthenticatedClient,
|
|
80
|
+
) -> Optional[ListTeamMembersResponse]:
|
|
81
|
+
"""List Team Members
|
|
82
|
+
|
|
83
|
+
List the members of a team
|
|
84
|
+
|
|
85
|
+
Args:
|
|
86
|
+
slug (str): The slug of the team to list members for
|
|
87
|
+
|
|
88
|
+
Returns:
|
|
89
|
+
Response[ListTeamMembersResponse]
|
|
90
|
+
"""
|
|
91
|
+
|
|
92
|
+
return sync_detailed(
|
|
93
|
+
slug=slug,
|
|
94
|
+
client=client,
|
|
95
|
+
).parsed
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
async def asyncio_detailed(
|
|
99
|
+
slug: str,
|
|
100
|
+
*,
|
|
101
|
+
client: AuthenticatedClient,
|
|
102
|
+
) -> Response[ListTeamMembersResponse]:
|
|
103
|
+
"""List Team Members
|
|
104
|
+
|
|
105
|
+
List the members of a team
|
|
106
|
+
|
|
107
|
+
Args:
|
|
108
|
+
slug (str): The slug of the team to list members for
|
|
109
|
+
|
|
110
|
+
Returns:
|
|
111
|
+
Response[ListTeamMembersResponse]
|
|
112
|
+
"""
|
|
113
|
+
|
|
114
|
+
kwargs = _get_kwargs(
|
|
115
|
+
slug=slug,
|
|
116
|
+
client=client,
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
120
|
+
response = await _client.request(**kwargs)
|
|
121
|
+
|
|
122
|
+
return _build_response(response=response)
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
async def asyncio(
|
|
126
|
+
slug: str,
|
|
127
|
+
*,
|
|
128
|
+
client: AuthenticatedClient,
|
|
129
|
+
) -> Optional[ListTeamMembersResponse]:
|
|
130
|
+
"""List Team Members
|
|
131
|
+
|
|
132
|
+
List the members of a team
|
|
133
|
+
|
|
134
|
+
Args:
|
|
135
|
+
slug (str): The slug of the team to list members for
|
|
136
|
+
|
|
137
|
+
Returns:
|
|
138
|
+
Response[ListTeamMembersResponse]
|
|
139
|
+
"""
|
|
140
|
+
|
|
141
|
+
return (
|
|
142
|
+
await asyncio_detailed(
|
|
143
|
+
slug=slug,
|
|
144
|
+
client=client,
|
|
145
|
+
)
|
|
146
|
+
).parsed
|
|
@@ -0,0 +1,125 @@
|
|
|
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_teams_response import ListTeamsResponse
|
|
8
|
+
from ...types import Response
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _get_kwargs(
|
|
12
|
+
*,
|
|
13
|
+
client: AuthenticatedClient,
|
|
14
|
+
) -> Dict[str, Any]:
|
|
15
|
+
url = "{}/teams".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(*, response: httpx.Response) -> Optional[ListTeamsResponse]:
|
|
30
|
+
if response.status_code == 200:
|
|
31
|
+
response_200 = ListTeamsResponse.from_dict(response.json())
|
|
32
|
+
|
|
33
|
+
return response_200
|
|
34
|
+
return None
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def _build_response(*, response: httpx.Response) -> Response[ListTeamsResponse]:
|
|
38
|
+
return Response(
|
|
39
|
+
status_code=HTTPStatus(response.status_code),
|
|
40
|
+
content=response.content,
|
|
41
|
+
headers=response.headers,
|
|
42
|
+
parsed=_parse_response(response=response),
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def sync_detailed(
|
|
47
|
+
*,
|
|
48
|
+
client: AuthenticatedClient,
|
|
49
|
+
) -> Response[ListTeamsResponse]:
|
|
50
|
+
"""List Teams
|
|
51
|
+
|
|
52
|
+
List all the teams that the user is a member of.
|
|
53
|
+
|
|
54
|
+
Returns:
|
|
55
|
+
Response[ListTeamsResponse]
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
kwargs = _get_kwargs(
|
|
59
|
+
client=client,
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
response = httpx.request(
|
|
63
|
+
verify=client.verify_ssl,
|
|
64
|
+
**kwargs,
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
return _build_response(response=response)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def sync(
|
|
71
|
+
*,
|
|
72
|
+
client: AuthenticatedClient,
|
|
73
|
+
) -> Optional[ListTeamsResponse]:
|
|
74
|
+
"""List Teams
|
|
75
|
+
|
|
76
|
+
List all the teams that the user is a member of.
|
|
77
|
+
|
|
78
|
+
Returns:
|
|
79
|
+
Response[ListTeamsResponse]
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
return sync_detailed(
|
|
83
|
+
client=client,
|
|
84
|
+
).parsed
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
async def asyncio_detailed(
|
|
88
|
+
*,
|
|
89
|
+
client: AuthenticatedClient,
|
|
90
|
+
) -> Response[ListTeamsResponse]:
|
|
91
|
+
"""List Teams
|
|
92
|
+
|
|
93
|
+
List all the teams that the user is a member of.
|
|
94
|
+
|
|
95
|
+
Returns:
|
|
96
|
+
Response[ListTeamsResponse]
|
|
97
|
+
"""
|
|
98
|
+
|
|
99
|
+
kwargs = _get_kwargs(
|
|
100
|
+
client=client,
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
104
|
+
response = await _client.request(**kwargs)
|
|
105
|
+
|
|
106
|
+
return _build_response(response=response)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
async def asyncio(
|
|
110
|
+
*,
|
|
111
|
+
client: AuthenticatedClient,
|
|
112
|
+
) -> Optional[ListTeamsResponse]:
|
|
113
|
+
"""List Teams
|
|
114
|
+
|
|
115
|
+
List all the teams that the user is a member of.
|
|
116
|
+
|
|
117
|
+
Returns:
|
|
118
|
+
Response[ListTeamsResponse]
|
|
119
|
+
"""
|
|
120
|
+
|
|
121
|
+
return (
|
|
122
|
+
await asyncio_detailed(
|
|
123
|
+
client=client,
|
|
124
|
+
)
|
|
125
|
+
).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.refresh_session_response import RefreshSessionResponse
|
|
8
|
+
from ...types import Response
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _get_kwargs(
|
|
12
|
+
*,
|
|
13
|
+
client: AuthenticatedClient,
|
|
14
|
+
) -> Dict[str, Any]:
|
|
15
|
+
url = "{}/session/refresh".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": "post",
|
|
22
|
+
"url": url,
|
|
23
|
+
"headers": headers,
|
|
24
|
+
"cookies": cookies,
|
|
25
|
+
"timeout": client.get_timeout(),
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _parse_response(*, response: httpx.Response) -> Optional[RefreshSessionResponse]:
|
|
30
|
+
if response.status_code == 200:
|
|
31
|
+
response_200 = RefreshSessionResponse.from_dict(response.json())
|
|
32
|
+
|
|
33
|
+
return response_200
|
|
34
|
+
return None
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def _build_response(*, response: httpx.Response) -> Response[RefreshSessionResponse]:
|
|
38
|
+
return Response(
|
|
39
|
+
status_code=HTTPStatus(response.status_code),
|
|
40
|
+
content=response.content,
|
|
41
|
+
headers=response.headers,
|
|
42
|
+
parsed=_parse_response(response=response),
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def sync_detailed(
|
|
47
|
+
*,
|
|
48
|
+
client: AuthenticatedClient,
|
|
49
|
+
) -> Response[RefreshSessionResponse]:
|
|
50
|
+
"""Refresh session
|
|
51
|
+
|
|
52
|
+
Returns a new session based on the supplied authentication context. This is helpful when clients
|
|
53
|
+
want to use POST instead of GET to check session information.
|
|
54
|
+
|
|
55
|
+
Returns:
|
|
56
|
+
Response[RefreshSessionResponse]
|
|
57
|
+
"""
|
|
58
|
+
|
|
59
|
+
kwargs = _get_kwargs(
|
|
60
|
+
client=client,
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
response = httpx.request(
|
|
64
|
+
verify=client.verify_ssl,
|
|
65
|
+
**kwargs,
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
return _build_response(response=response)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def sync(
|
|
72
|
+
*,
|
|
73
|
+
client: AuthenticatedClient,
|
|
74
|
+
) -> Optional[RefreshSessionResponse]:
|
|
75
|
+
"""Refresh session
|
|
76
|
+
|
|
77
|
+
Returns a new session based on the supplied authentication context. This is helpful when clients
|
|
78
|
+
want to use POST instead of GET to check session information.
|
|
79
|
+
|
|
80
|
+
Returns:
|
|
81
|
+
Response[RefreshSessionResponse]
|
|
82
|
+
"""
|
|
83
|
+
|
|
84
|
+
return sync_detailed(
|
|
85
|
+
client=client,
|
|
86
|
+
).parsed
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
async def asyncio_detailed(
|
|
90
|
+
*,
|
|
91
|
+
client: AuthenticatedClient,
|
|
92
|
+
) -> Response[RefreshSessionResponse]:
|
|
93
|
+
"""Refresh session
|
|
94
|
+
|
|
95
|
+
Returns a new session based on the supplied authentication context. This is helpful when clients
|
|
96
|
+
want to use POST instead of GET to check session information.
|
|
97
|
+
|
|
98
|
+
Returns:
|
|
99
|
+
Response[RefreshSessionResponse]
|
|
100
|
+
"""
|
|
101
|
+
|
|
102
|
+
kwargs = _get_kwargs(
|
|
103
|
+
client=client,
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
107
|
+
response = await _client.request(**kwargs)
|
|
108
|
+
|
|
109
|
+
return _build_response(response=response)
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
async def asyncio(
|
|
113
|
+
*,
|
|
114
|
+
client: AuthenticatedClient,
|
|
115
|
+
) -> Optional[RefreshSessionResponse]:
|
|
116
|
+
"""Refresh session
|
|
117
|
+
|
|
118
|
+
Returns a new session based on the supplied authentication context. This is helpful when clients
|
|
119
|
+
want to use POST instead of GET to check session information.
|
|
120
|
+
|
|
121
|
+
Returns:
|
|
122
|
+
Response[RefreshSessionResponse]
|
|
123
|
+
"""
|
|
124
|
+
|
|
125
|
+
return (
|
|
126
|
+
await asyncio_detailed(
|
|
127
|
+
client=client,
|
|
128
|
+
)
|
|
129
|
+
).parsed
|
|
@@ -0,0 +1,163 @@
|
|
|
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.remove_team_member_params import RemoveTeamMemberParams
|
|
8
|
+
from ...models.remove_team_member_response import RemoveTeamMemberResponse
|
|
9
|
+
from ...types import Response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
slug: str,
|
|
14
|
+
*,
|
|
15
|
+
client: AuthenticatedClient,
|
|
16
|
+
json_body: RemoveTeamMemberParams,
|
|
17
|
+
) -> Dict[str, Any]:
|
|
18
|
+
url = "{}/teams/{slug}/members".format(client.base_url, slug=slug)
|
|
19
|
+
|
|
20
|
+
headers: Dict[str, str] = client.get_headers()
|
|
21
|
+
cookies: Dict[str, Any] = client.get_cookies()
|
|
22
|
+
|
|
23
|
+
json_json_body = json_body.to_dict()
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
"method": "delete",
|
|
27
|
+
"url": url,
|
|
28
|
+
"headers": headers,
|
|
29
|
+
"cookies": cookies,
|
|
30
|
+
"timeout": client.get_timeout(),
|
|
31
|
+
"json": json_json_body,
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def _parse_response(*, response: httpx.Response) -> Optional[RemoveTeamMemberResponse]:
|
|
36
|
+
if response.status_code == 200:
|
|
37
|
+
response_200 = RemoveTeamMemberResponse.from_dict(response.json())
|
|
38
|
+
|
|
39
|
+
return response_200
|
|
40
|
+
return None
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def _build_response(*, response: httpx.Response) -> Response[RemoveTeamMemberResponse]:
|
|
44
|
+
return Response(
|
|
45
|
+
status_code=HTTPStatus(response.status_code),
|
|
46
|
+
content=response.content,
|
|
47
|
+
headers=response.headers,
|
|
48
|
+
parsed=_parse_response(response=response),
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def sync_detailed(
|
|
53
|
+
slug: str,
|
|
54
|
+
*,
|
|
55
|
+
client: AuthenticatedClient,
|
|
56
|
+
json_body: RemoveTeamMemberParams,
|
|
57
|
+
) -> Response[RemoveTeamMemberResponse]:
|
|
58
|
+
"""Remove Team Member
|
|
59
|
+
|
|
60
|
+
Remove a new team
|
|
61
|
+
|
|
62
|
+
Args:
|
|
63
|
+
slug (str): The slug of the team to remove someone from
|
|
64
|
+
json_body (RemoveTeamMemberParams):
|
|
65
|
+
|
|
66
|
+
Returns:
|
|
67
|
+
Response[RemoveTeamMemberResponse]
|
|
68
|
+
"""
|
|
69
|
+
|
|
70
|
+
kwargs = _get_kwargs(
|
|
71
|
+
slug=slug,
|
|
72
|
+
client=client,
|
|
73
|
+
json_body=json_body,
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
response = httpx.request(
|
|
77
|
+
verify=client.verify_ssl,
|
|
78
|
+
**kwargs,
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
return _build_response(response=response)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def sync(
|
|
85
|
+
slug: str,
|
|
86
|
+
*,
|
|
87
|
+
client: AuthenticatedClient,
|
|
88
|
+
json_body: RemoveTeamMemberParams,
|
|
89
|
+
) -> Optional[RemoveTeamMemberResponse]:
|
|
90
|
+
"""Remove Team Member
|
|
91
|
+
|
|
92
|
+
Remove a new team
|
|
93
|
+
|
|
94
|
+
Args:
|
|
95
|
+
slug (str): The slug of the team to remove someone from
|
|
96
|
+
json_body (RemoveTeamMemberParams):
|
|
97
|
+
|
|
98
|
+
Returns:
|
|
99
|
+
Response[RemoveTeamMemberResponse]
|
|
100
|
+
"""
|
|
101
|
+
|
|
102
|
+
return sync_detailed(
|
|
103
|
+
slug=slug,
|
|
104
|
+
client=client,
|
|
105
|
+
json_body=json_body,
|
|
106
|
+
).parsed
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
async def asyncio_detailed(
|
|
110
|
+
slug: str,
|
|
111
|
+
*,
|
|
112
|
+
client: AuthenticatedClient,
|
|
113
|
+
json_body: RemoveTeamMemberParams,
|
|
114
|
+
) -> Response[RemoveTeamMemberResponse]:
|
|
115
|
+
"""Remove Team Member
|
|
116
|
+
|
|
117
|
+
Remove a new team
|
|
118
|
+
|
|
119
|
+
Args:
|
|
120
|
+
slug (str): The slug of the team to remove someone from
|
|
121
|
+
json_body (RemoveTeamMemberParams):
|
|
122
|
+
|
|
123
|
+
Returns:
|
|
124
|
+
Response[RemoveTeamMemberResponse]
|
|
125
|
+
"""
|
|
126
|
+
|
|
127
|
+
kwargs = _get_kwargs(
|
|
128
|
+
slug=slug,
|
|
129
|
+
client=client,
|
|
130
|
+
json_body=json_body,
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
134
|
+
response = await _client.request(**kwargs)
|
|
135
|
+
|
|
136
|
+
return _build_response(response=response)
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
async def asyncio(
|
|
140
|
+
slug: str,
|
|
141
|
+
*,
|
|
142
|
+
client: AuthenticatedClient,
|
|
143
|
+
json_body: RemoveTeamMemberParams,
|
|
144
|
+
) -> Optional[RemoveTeamMemberResponse]:
|
|
145
|
+
"""Remove Team Member
|
|
146
|
+
|
|
147
|
+
Remove a new team
|
|
148
|
+
|
|
149
|
+
Args:
|
|
150
|
+
slug (str): The slug of the team to remove someone from
|
|
151
|
+
json_body (RemoveTeamMemberParams):
|
|
152
|
+
|
|
153
|
+
Returns:
|
|
154
|
+
Response[RemoveTeamMemberResponse]
|
|
155
|
+
"""
|
|
156
|
+
|
|
157
|
+
return (
|
|
158
|
+
await asyncio_detailed(
|
|
159
|
+
slug=slug,
|
|
160
|
+
client=client,
|
|
161
|
+
json_body=json_body,
|
|
162
|
+
)
|
|
163
|
+
).parsed
|