robosystems-client 0.2.11__py3-none-any.whl → 0.2.12__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 robosystems-client might be problematic. Click here for more details.
- robosystems_client/api/auth/register_user.py +36 -8
- robosystems_client/api/billing/{cancel_subscription.py → cancel_org_subscription.py} +34 -9
- robosystems_client/api/billing/create_checkout_session.py +28 -20
- robosystems_client/api/billing/get_org_billing_customer.py +189 -0
- robosystems_client/api/billing/{get_subscription.py → get_org_subscription.py} +30 -5
- robosystems_client/api/billing/{get_upcoming_invoice.py → get_org_upcoming_invoice.py} +68 -22
- robosystems_client/api/billing/{list_invoices.py → list_org_invoices.py} +38 -9
- robosystems_client/api/billing/{list_subscriptions.py → list_org_subscriptions.py} +64 -22
- robosystems_client/api/billing/{update_payment_method.py → update_org_payment_method.py} +34 -9
- robosystems_client/api/org/__init__.py +1 -0
- robosystems_client/api/org/create_org.py +174 -0
- robosystems_client/api/{billing/get_billing_customer.py → org/get_org.py} +50 -28
- robosystems_client/api/org/list_org_graphs.py +170 -0
- robosystems_client/api/{user/get_user_limits.py → org/list_user_orgs.py} +21 -25
- robosystems_client/api/org/update_org.py +187 -0
- robosystems_client/api/org_members/__init__.py +1 -0
- robosystems_client/api/org_members/invite_org_member.py +207 -0
- robosystems_client/api/org_members/list_org_members.py +165 -0
- robosystems_client/api/org_members/remove_org_member.py +176 -0
- robosystems_client/api/org_members/update_org_member_role.py +200 -0
- robosystems_client/api/org_usage/__init__.py +1 -0
- robosystems_client/api/org_usage/get_org_limits.py +165 -0
- robosystems_client/api/org_usage/get_org_usage.py +186 -0
- robosystems_client/api/service_offerings/get_service_offerings.py +32 -8
- robosystems_client/api/usage/get_graph_usage_analytics.py +4 -4
- robosystems_client/models/__init__.py +44 -6
- robosystems_client/models/auth_response.py +35 -0
- robosystems_client/models/{user_usage_response_graphs.py → auth_response_org_type_0.py} +6 -6
- robosystems_client/models/billing_customer.py +8 -8
- robosystems_client/models/checkout_response.py +65 -22
- robosystems_client/models/create_org_request.py +79 -0
- robosystems_client/models/graph_subscription_tier.py +40 -48
- robosystems_client/models/graph_subscriptions.py +17 -5
- robosystems_client/models/invite_member_request.py +93 -0
- robosystems_client/models/list_org_graphs_response_200_item.py +44 -0
- robosystems_client/models/org_detail_response.py +174 -0
- robosystems_client/models/org_detail_response_graphs_item.py +44 -0
- robosystems_client/models/org_detail_response_limits_type_0.py +44 -0
- robosystems_client/models/org_detail_response_members_item.py +44 -0
- robosystems_client/models/org_limits_response.py +98 -0
- robosystems_client/models/org_limits_response_current_usage.py +44 -0
- robosystems_client/models/org_list_response.py +82 -0
- robosystems_client/models/org_member_list_response.py +90 -0
- robosystems_client/models/org_member_response.py +104 -0
- robosystems_client/models/org_response.py +121 -0
- robosystems_client/models/org_role.py +10 -0
- robosystems_client/models/org_type.py +10 -0
- robosystems_client/models/org_usage_response.py +146 -0
- robosystems_client/models/org_usage_response_daily_trend_item.py +44 -0
- robosystems_client/models/org_usage_response_graph_details_item.py +44 -0
- robosystems_client/models/org_usage_summary.py +158 -0
- robosystems_client/models/repository_subscriptions.py +15 -4
- robosystems_client/models/service_offerings_response.py +15 -0
- robosystems_client/models/update_member_role_request.py +62 -0
- robosystems_client/models/update_org_request.py +103 -0
- {robosystems_client-0.2.11.dist-info → robosystems_client-0.2.12.dist-info}/METADATA +1 -1
- {robosystems_client-0.2.11.dist-info → robosystems_client-0.2.12.dist-info}/RECORD +59 -27
- robosystems_client/models/user_limits_response.py +0 -95
- robosystems_client/models/user_usage_response.py +0 -90
- {robosystems_client-0.2.11.dist-info → robosystems_client-0.2.12.dist-info}/WHEEL +0 -0
- {robosystems_client-0.2.11.dist-info → robosystems_client-0.2.12.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Optional, Union, cast
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
9
|
+
from ...types import Response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
org_id: str,
|
|
14
|
+
user_id: str,
|
|
15
|
+
) -> dict[str, Any]:
|
|
16
|
+
_kwargs: dict[str, Any] = {
|
|
17
|
+
"method": "delete",
|
|
18
|
+
"url": f"/v1/orgs/{org_id}/members/{user_id}",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return _kwargs
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _parse_response(
|
|
25
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
26
|
+
) -> Optional[Union[Any, HTTPValidationError]]:
|
|
27
|
+
if response.status_code == 204:
|
|
28
|
+
response_204 = cast(Any, None)
|
|
29
|
+
return response_204
|
|
30
|
+
|
|
31
|
+
if response.status_code == 422:
|
|
32
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
33
|
+
|
|
34
|
+
return response_422
|
|
35
|
+
|
|
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(
|
|
43
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
44
|
+
) -> Response[Union[Any, HTTPValidationError]]:
|
|
45
|
+
return Response(
|
|
46
|
+
status_code=HTTPStatus(response.status_code),
|
|
47
|
+
content=response.content,
|
|
48
|
+
headers=response.headers,
|
|
49
|
+
parsed=_parse_response(client=client, response=response),
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def sync_detailed(
|
|
54
|
+
org_id: str,
|
|
55
|
+
user_id: str,
|
|
56
|
+
*,
|
|
57
|
+
client: AuthenticatedClient,
|
|
58
|
+
) -> Response[Union[Any, HTTPValidationError]]:
|
|
59
|
+
"""Remove Member
|
|
60
|
+
|
|
61
|
+
Remove a member from the organization. Requires admin or owner role.
|
|
62
|
+
|
|
63
|
+
Args:
|
|
64
|
+
org_id (str):
|
|
65
|
+
user_id (str):
|
|
66
|
+
|
|
67
|
+
Raises:
|
|
68
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
69
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
70
|
+
|
|
71
|
+
Returns:
|
|
72
|
+
Response[Union[Any, HTTPValidationError]]
|
|
73
|
+
"""
|
|
74
|
+
|
|
75
|
+
kwargs = _get_kwargs(
|
|
76
|
+
org_id=org_id,
|
|
77
|
+
user_id=user_id,
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
response = client.get_httpx_client().request(
|
|
81
|
+
**kwargs,
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
return _build_response(client=client, response=response)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
def sync(
|
|
88
|
+
org_id: str,
|
|
89
|
+
user_id: str,
|
|
90
|
+
*,
|
|
91
|
+
client: AuthenticatedClient,
|
|
92
|
+
) -> Optional[Union[Any, HTTPValidationError]]:
|
|
93
|
+
"""Remove Member
|
|
94
|
+
|
|
95
|
+
Remove a member from the organization. Requires admin or owner role.
|
|
96
|
+
|
|
97
|
+
Args:
|
|
98
|
+
org_id (str):
|
|
99
|
+
user_id (str):
|
|
100
|
+
|
|
101
|
+
Raises:
|
|
102
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
103
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
104
|
+
|
|
105
|
+
Returns:
|
|
106
|
+
Union[Any, HTTPValidationError]
|
|
107
|
+
"""
|
|
108
|
+
|
|
109
|
+
return sync_detailed(
|
|
110
|
+
org_id=org_id,
|
|
111
|
+
user_id=user_id,
|
|
112
|
+
client=client,
|
|
113
|
+
).parsed
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
async def asyncio_detailed(
|
|
117
|
+
org_id: str,
|
|
118
|
+
user_id: str,
|
|
119
|
+
*,
|
|
120
|
+
client: AuthenticatedClient,
|
|
121
|
+
) -> Response[Union[Any, HTTPValidationError]]:
|
|
122
|
+
"""Remove Member
|
|
123
|
+
|
|
124
|
+
Remove a member from the organization. Requires admin or owner role.
|
|
125
|
+
|
|
126
|
+
Args:
|
|
127
|
+
org_id (str):
|
|
128
|
+
user_id (str):
|
|
129
|
+
|
|
130
|
+
Raises:
|
|
131
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
132
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
133
|
+
|
|
134
|
+
Returns:
|
|
135
|
+
Response[Union[Any, HTTPValidationError]]
|
|
136
|
+
"""
|
|
137
|
+
|
|
138
|
+
kwargs = _get_kwargs(
|
|
139
|
+
org_id=org_id,
|
|
140
|
+
user_id=user_id,
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
144
|
+
|
|
145
|
+
return _build_response(client=client, response=response)
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
async def asyncio(
|
|
149
|
+
org_id: str,
|
|
150
|
+
user_id: str,
|
|
151
|
+
*,
|
|
152
|
+
client: AuthenticatedClient,
|
|
153
|
+
) -> Optional[Union[Any, HTTPValidationError]]:
|
|
154
|
+
"""Remove Member
|
|
155
|
+
|
|
156
|
+
Remove a member from the organization. Requires admin or owner role.
|
|
157
|
+
|
|
158
|
+
Args:
|
|
159
|
+
org_id (str):
|
|
160
|
+
user_id (str):
|
|
161
|
+
|
|
162
|
+
Raises:
|
|
163
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
164
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
165
|
+
|
|
166
|
+
Returns:
|
|
167
|
+
Union[Any, HTTPValidationError]
|
|
168
|
+
"""
|
|
169
|
+
|
|
170
|
+
return (
|
|
171
|
+
await asyncio_detailed(
|
|
172
|
+
org_id=org_id,
|
|
173
|
+
user_id=user_id,
|
|
174
|
+
client=client,
|
|
175
|
+
)
|
|
176
|
+
).parsed
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Optional, Union
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
9
|
+
from ...models.org_member_response import OrgMemberResponse
|
|
10
|
+
from ...models.update_member_role_request import UpdateMemberRoleRequest
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
org_id: str,
|
|
16
|
+
user_id: str,
|
|
17
|
+
*,
|
|
18
|
+
body: UpdateMemberRoleRequest,
|
|
19
|
+
) -> dict[str, Any]:
|
|
20
|
+
headers: dict[str, Any] = {}
|
|
21
|
+
|
|
22
|
+
_kwargs: dict[str, Any] = {
|
|
23
|
+
"method": "put",
|
|
24
|
+
"url": f"/v1/orgs/{org_id}/members/{user_id}",
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
_kwargs["json"] = body.to_dict()
|
|
28
|
+
|
|
29
|
+
headers["Content-Type"] = "application/json"
|
|
30
|
+
|
|
31
|
+
_kwargs["headers"] = headers
|
|
32
|
+
return _kwargs
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def _parse_response(
|
|
36
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
37
|
+
) -> Optional[Union[HTTPValidationError, OrgMemberResponse]]:
|
|
38
|
+
if response.status_code == 200:
|
|
39
|
+
response_200 = OrgMemberResponse.from_dict(response.json())
|
|
40
|
+
|
|
41
|
+
return response_200
|
|
42
|
+
|
|
43
|
+
if response.status_code == 422:
|
|
44
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
45
|
+
|
|
46
|
+
return response_422
|
|
47
|
+
|
|
48
|
+
if client.raise_on_unexpected_status:
|
|
49
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
50
|
+
else:
|
|
51
|
+
return None
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def _build_response(
|
|
55
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
56
|
+
) -> Response[Union[HTTPValidationError, OrgMemberResponse]]:
|
|
57
|
+
return Response(
|
|
58
|
+
status_code=HTTPStatus(response.status_code),
|
|
59
|
+
content=response.content,
|
|
60
|
+
headers=response.headers,
|
|
61
|
+
parsed=_parse_response(client=client, response=response),
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def sync_detailed(
|
|
66
|
+
org_id: str,
|
|
67
|
+
user_id: str,
|
|
68
|
+
*,
|
|
69
|
+
client: AuthenticatedClient,
|
|
70
|
+
body: UpdateMemberRoleRequest,
|
|
71
|
+
) -> Response[Union[HTTPValidationError, OrgMemberResponse]]:
|
|
72
|
+
"""Update Member Role
|
|
73
|
+
|
|
74
|
+
Update a member's role in the organization. Requires admin or owner role.
|
|
75
|
+
|
|
76
|
+
Args:
|
|
77
|
+
org_id (str):
|
|
78
|
+
user_id (str):
|
|
79
|
+
body (UpdateMemberRoleRequest): Request to update a member's role.
|
|
80
|
+
|
|
81
|
+
Raises:
|
|
82
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
83
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
84
|
+
|
|
85
|
+
Returns:
|
|
86
|
+
Response[Union[HTTPValidationError, OrgMemberResponse]]
|
|
87
|
+
"""
|
|
88
|
+
|
|
89
|
+
kwargs = _get_kwargs(
|
|
90
|
+
org_id=org_id,
|
|
91
|
+
user_id=user_id,
|
|
92
|
+
body=body,
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
response = client.get_httpx_client().request(
|
|
96
|
+
**kwargs,
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
return _build_response(client=client, response=response)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def sync(
|
|
103
|
+
org_id: str,
|
|
104
|
+
user_id: str,
|
|
105
|
+
*,
|
|
106
|
+
client: AuthenticatedClient,
|
|
107
|
+
body: UpdateMemberRoleRequest,
|
|
108
|
+
) -> Optional[Union[HTTPValidationError, OrgMemberResponse]]:
|
|
109
|
+
"""Update Member Role
|
|
110
|
+
|
|
111
|
+
Update a member's role in the organization. Requires admin or owner role.
|
|
112
|
+
|
|
113
|
+
Args:
|
|
114
|
+
org_id (str):
|
|
115
|
+
user_id (str):
|
|
116
|
+
body (UpdateMemberRoleRequest): Request to update a member's role.
|
|
117
|
+
|
|
118
|
+
Raises:
|
|
119
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
120
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
121
|
+
|
|
122
|
+
Returns:
|
|
123
|
+
Union[HTTPValidationError, OrgMemberResponse]
|
|
124
|
+
"""
|
|
125
|
+
|
|
126
|
+
return sync_detailed(
|
|
127
|
+
org_id=org_id,
|
|
128
|
+
user_id=user_id,
|
|
129
|
+
client=client,
|
|
130
|
+
body=body,
|
|
131
|
+
).parsed
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
async def asyncio_detailed(
|
|
135
|
+
org_id: str,
|
|
136
|
+
user_id: str,
|
|
137
|
+
*,
|
|
138
|
+
client: AuthenticatedClient,
|
|
139
|
+
body: UpdateMemberRoleRequest,
|
|
140
|
+
) -> Response[Union[HTTPValidationError, OrgMemberResponse]]:
|
|
141
|
+
"""Update Member Role
|
|
142
|
+
|
|
143
|
+
Update a member's role in the organization. Requires admin or owner role.
|
|
144
|
+
|
|
145
|
+
Args:
|
|
146
|
+
org_id (str):
|
|
147
|
+
user_id (str):
|
|
148
|
+
body (UpdateMemberRoleRequest): Request to update a member's role.
|
|
149
|
+
|
|
150
|
+
Raises:
|
|
151
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
152
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
153
|
+
|
|
154
|
+
Returns:
|
|
155
|
+
Response[Union[HTTPValidationError, OrgMemberResponse]]
|
|
156
|
+
"""
|
|
157
|
+
|
|
158
|
+
kwargs = _get_kwargs(
|
|
159
|
+
org_id=org_id,
|
|
160
|
+
user_id=user_id,
|
|
161
|
+
body=body,
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
165
|
+
|
|
166
|
+
return _build_response(client=client, response=response)
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
async def asyncio(
|
|
170
|
+
org_id: str,
|
|
171
|
+
user_id: str,
|
|
172
|
+
*,
|
|
173
|
+
client: AuthenticatedClient,
|
|
174
|
+
body: UpdateMemberRoleRequest,
|
|
175
|
+
) -> Optional[Union[HTTPValidationError, OrgMemberResponse]]:
|
|
176
|
+
"""Update Member Role
|
|
177
|
+
|
|
178
|
+
Update a member's role in the organization. Requires admin or owner role.
|
|
179
|
+
|
|
180
|
+
Args:
|
|
181
|
+
org_id (str):
|
|
182
|
+
user_id (str):
|
|
183
|
+
body (UpdateMemberRoleRequest): Request to update a member's role.
|
|
184
|
+
|
|
185
|
+
Raises:
|
|
186
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
187
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
188
|
+
|
|
189
|
+
Returns:
|
|
190
|
+
Union[HTTPValidationError, OrgMemberResponse]
|
|
191
|
+
"""
|
|
192
|
+
|
|
193
|
+
return (
|
|
194
|
+
await asyncio_detailed(
|
|
195
|
+
org_id=org_id,
|
|
196
|
+
user_id=user_id,
|
|
197
|
+
client=client,
|
|
198
|
+
body=body,
|
|
199
|
+
)
|
|
200
|
+
).parsed
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Contains endpoint functions for accessing the API"""
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Optional, Union
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
9
|
+
from ...models.org_limits_response import OrgLimitsResponse
|
|
10
|
+
from ...types import Response
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
org_id: str,
|
|
15
|
+
) -> dict[str, Any]:
|
|
16
|
+
_kwargs: dict[str, Any] = {
|
|
17
|
+
"method": "get",
|
|
18
|
+
"url": f"/v1/orgs/{org_id}/limits",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return _kwargs
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _parse_response(
|
|
25
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
26
|
+
) -> Optional[Union[HTTPValidationError, OrgLimitsResponse]]:
|
|
27
|
+
if response.status_code == 200:
|
|
28
|
+
response_200 = OrgLimitsResponse.from_dict(response.json())
|
|
29
|
+
|
|
30
|
+
return response_200
|
|
31
|
+
|
|
32
|
+
if response.status_code == 422:
|
|
33
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
34
|
+
|
|
35
|
+
return response_422
|
|
36
|
+
|
|
37
|
+
if client.raise_on_unexpected_status:
|
|
38
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
39
|
+
else:
|
|
40
|
+
return None
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def _build_response(
|
|
44
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
45
|
+
) -> Response[Union[HTTPValidationError, OrgLimitsResponse]]:
|
|
46
|
+
return Response(
|
|
47
|
+
status_code=HTTPStatus(response.status_code),
|
|
48
|
+
content=response.content,
|
|
49
|
+
headers=response.headers,
|
|
50
|
+
parsed=_parse_response(client=client, response=response),
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def sync_detailed(
|
|
55
|
+
org_id: str,
|
|
56
|
+
*,
|
|
57
|
+
client: AuthenticatedClient,
|
|
58
|
+
) -> Response[Union[HTTPValidationError, OrgLimitsResponse]]:
|
|
59
|
+
"""Get Organization Limits
|
|
60
|
+
|
|
61
|
+
Get the current limits and quotas for an organization.
|
|
62
|
+
|
|
63
|
+
Args:
|
|
64
|
+
org_id (str):
|
|
65
|
+
|
|
66
|
+
Raises:
|
|
67
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
68
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
69
|
+
|
|
70
|
+
Returns:
|
|
71
|
+
Response[Union[HTTPValidationError, OrgLimitsResponse]]
|
|
72
|
+
"""
|
|
73
|
+
|
|
74
|
+
kwargs = _get_kwargs(
|
|
75
|
+
org_id=org_id,
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
response = client.get_httpx_client().request(
|
|
79
|
+
**kwargs,
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
return _build_response(client=client, response=response)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def sync(
|
|
86
|
+
org_id: str,
|
|
87
|
+
*,
|
|
88
|
+
client: AuthenticatedClient,
|
|
89
|
+
) -> Optional[Union[HTTPValidationError, OrgLimitsResponse]]:
|
|
90
|
+
"""Get Organization Limits
|
|
91
|
+
|
|
92
|
+
Get the current limits and quotas for an organization.
|
|
93
|
+
|
|
94
|
+
Args:
|
|
95
|
+
org_id (str):
|
|
96
|
+
|
|
97
|
+
Raises:
|
|
98
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
99
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
100
|
+
|
|
101
|
+
Returns:
|
|
102
|
+
Union[HTTPValidationError, OrgLimitsResponse]
|
|
103
|
+
"""
|
|
104
|
+
|
|
105
|
+
return sync_detailed(
|
|
106
|
+
org_id=org_id,
|
|
107
|
+
client=client,
|
|
108
|
+
).parsed
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
async def asyncio_detailed(
|
|
112
|
+
org_id: str,
|
|
113
|
+
*,
|
|
114
|
+
client: AuthenticatedClient,
|
|
115
|
+
) -> Response[Union[HTTPValidationError, OrgLimitsResponse]]:
|
|
116
|
+
"""Get Organization Limits
|
|
117
|
+
|
|
118
|
+
Get the current limits and quotas for an organization.
|
|
119
|
+
|
|
120
|
+
Args:
|
|
121
|
+
org_id (str):
|
|
122
|
+
|
|
123
|
+
Raises:
|
|
124
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
125
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
126
|
+
|
|
127
|
+
Returns:
|
|
128
|
+
Response[Union[HTTPValidationError, OrgLimitsResponse]]
|
|
129
|
+
"""
|
|
130
|
+
|
|
131
|
+
kwargs = _get_kwargs(
|
|
132
|
+
org_id=org_id,
|
|
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
|
+
org_id: str,
|
|
142
|
+
*,
|
|
143
|
+
client: AuthenticatedClient,
|
|
144
|
+
) -> Optional[Union[HTTPValidationError, OrgLimitsResponse]]:
|
|
145
|
+
"""Get Organization Limits
|
|
146
|
+
|
|
147
|
+
Get the current limits and quotas for an organization.
|
|
148
|
+
|
|
149
|
+
Args:
|
|
150
|
+
org_id (str):
|
|
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
|
+
Union[HTTPValidationError, OrgLimitsResponse]
|
|
158
|
+
"""
|
|
159
|
+
|
|
160
|
+
return (
|
|
161
|
+
await asyncio_detailed(
|
|
162
|
+
org_id=org_id,
|
|
163
|
+
client=client,
|
|
164
|
+
)
|
|
165
|
+
).parsed
|