robosystems-client 0.2.9__py3-none-any.whl → 0.2.10__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.
- robosystems_client/api/{user_subscriptions/cancel_shared_repository_subscription.py → subscriptions/cancel_subscription.py} +41 -25
- robosystems_client/api/subscriptions/create_repository_subscription.py +217 -0
- robosystems_client/api/subscriptions/get_graph_subscription.py +197 -0
- robosystems_client/api/{user_subscriptions/upgrade_shared_repository_subscription.py → subscriptions/upgrade_subscription.py} +57 -55
- robosystems_client/api/usage/get_graph_usage_analytics.py +377 -0
- robosystems_client/api/{user_limits/get_user_usage.py → user/get_user_limits.py} +13 -9
- robosystems_client/models/__init__.py +18 -82
- robosystems_client/models/{credits_summary_response_credits_by_addon_type_0_item.py → create_repository_subscription_request.py} +22 -6
- robosystems_client/models/credit_summary.py +55 -89
- robosystems_client/models/{graph_usage_response_storage_usage.py → credit_summary_operation_breakdown.py} +6 -6
- robosystems_client/models/graph_subscription_response.py +200 -0
- robosystems_client/models/graph_usage_response.py +136 -39
- robosystems_client/models/{user_analytics_response_limits.py → graph_usage_response_recent_events_item.py} +6 -6
- robosystems_client/models/performance_insights.py +120 -0
- robosystems_client/models/{graph_usage_response_recent_activity.py → performance_insights_operation_stats.py} +6 -6
- robosystems_client/models/{user_analytics_response_api_usage.py → performance_insights_slow_queries_item.py} +6 -6
- robosystems_client/models/storage_summary.py +100 -0
- robosystems_client/models/{tier_upgrade_request.py → upgrade_subscription_request.py} +12 -14
- {robosystems_client-0.2.9.dist-info → robosystems_client-0.2.10.dist-info}/METADATA +1 -1
- {robosystems_client-0.2.9.dist-info → robosystems_client-0.2.10.dist-info}/RECORD +31 -68
- robosystems_client/api/graph_analytics/get_graph_usage_stats.py +0 -289
- robosystems_client/api/graph_billing/get_current_graph_bill.py +0 -253
- robosystems_client/api/graph_billing/get_graph_billing_history.py +0 -298
- robosystems_client/api/graph_billing/get_graph_monthly_bill.py +0 -284
- robosystems_client/api/graph_billing/get_graph_usage_details.py +0 -320
- robosystems_client/api/user/get_all_credit_summaries.py +0 -169
- robosystems_client/api/user_analytics/__init__.py +0 -1
- robosystems_client/api/user_analytics/get_detailed_user_analytics.py +0 -188
- robosystems_client/api/user_analytics/get_user_usage_overview.py +0 -135
- robosystems_client/api/user_limits/__init__.py +0 -1
- robosystems_client/api/user_limits/get_all_shared_repository_limits.py +0 -141
- robosystems_client/api/user_limits/get_shared_repository_limits.py +0 -213
- robosystems_client/api/user_limits/get_user_limits.py +0 -139
- robosystems_client/api/user_subscriptions/__init__.py +0 -1
- robosystems_client/api/user_subscriptions/get_repository_credits.py +0 -173
- robosystems_client/api/user_subscriptions/get_shared_repository_credits.py +0 -143
- robosystems_client/api/user_subscriptions/get_user_shared_subscriptions.py +0 -181
- robosystems_client/api/user_subscriptions/subscribe_to_shared_repository.py +0 -186
- robosystems_client/models/add_on_credit_info.py +0 -119
- robosystems_client/models/credits_summary_response.py +0 -148
- robosystems_client/models/get_all_credit_summaries_response_getallcreditsummaries.py +0 -44
- robosystems_client/models/get_all_shared_repository_limits_response_getallsharedrepositorylimits.py +0 -46
- robosystems_client/models/get_current_graph_bill_response_getcurrentgraphbill.py +0 -44
- robosystems_client/models/get_graph_billing_history_response_getgraphbillinghistory.py +0 -44
- robosystems_client/models/get_graph_monthly_bill_response_getgraphmonthlybill.py +0 -44
- robosystems_client/models/get_graph_usage_details_response_getgraphusagedetails.py +0 -44
- robosystems_client/models/get_shared_repository_limits_response_getsharedrepositorylimits.py +0 -44
- robosystems_client/models/graph_usage_response_query_statistics.py +0 -44
- robosystems_client/models/repository_credits_response.py +0 -128
- robosystems_client/models/repository_plan.py +0 -10
- robosystems_client/models/repository_type.py +0 -10
- robosystems_client/models/subscription_info.py +0 -152
- robosystems_client/models/subscription_info_metadata.py +0 -44
- robosystems_client/models/subscription_request.py +0 -80
- robosystems_client/models/subscription_response.py +0 -74
- robosystems_client/models/user_analytics_response.py +0 -132
- robosystems_client/models/user_analytics_response_graph_usage.py +0 -44
- robosystems_client/models/user_analytics_response_recent_activity_item.py +0 -44
- robosystems_client/models/user_analytics_response_user_info.py +0 -44
- robosystems_client/models/user_graph_summary.py +0 -134
- robosystems_client/models/user_subscriptions_response.py +0 -90
- robosystems_client/models/user_usage_summary_response.py +0 -130
- robosystems_client/models/user_usage_summary_response_usage_vs_limits.py +0 -44
- /robosystems_client/api/{graph_analytics → credits_}/__init__.py +0 -0
- /robosystems_client/api/{graph_credits → credits_}/check_credit_balance.py +0 -0
- /robosystems_client/api/{graph_credits → credits_}/check_storage_limits.py +0 -0
- /robosystems_client/api/{graph_credits → credits_}/get_credit_summary.py +0 -0
- /robosystems_client/api/{graph_credits → credits_}/get_storage_usage.py +0 -0
- /robosystems_client/api/{graph_credits → credits_}/list_credit_transactions.py +0 -0
- /robosystems_client/api/{graph_billing → subscriptions}/__init__.py +0 -0
- /robosystems_client/api/{graph_credits → usage}/__init__.py +0 -0
- /robosystems_client/api/{graph_analytics → usage}/get_graph_metrics.py +0 -0
- {robosystems_client-0.2.9.dist-info → robosystems_client-0.2.10.dist-info}/WHEEL +0 -0
- {robosystems_client-0.2.9.dist-info → robosystems_client-0.2.10.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,173 +0,0 @@
|
|
|
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 ...models.repository_credits_response import RepositoryCreditsResponse
|
|
10
|
-
from ...types import Response
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def _get_kwargs(
|
|
14
|
-
repository: str,
|
|
15
|
-
) -> dict[str, Any]:
|
|
16
|
-
_kwargs: dict[str, Any] = {
|
|
17
|
-
"method": "get",
|
|
18
|
-
"url": f"/v1/user/subscriptions/shared-repositories/credits/{repository}",
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return _kwargs
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
def _parse_response(
|
|
25
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
26
|
-
) -> Optional[Union[Any, HTTPValidationError, RepositoryCreditsResponse]]:
|
|
27
|
-
if response.status_code == 200:
|
|
28
|
-
response_200 = RepositoryCreditsResponse.from_dict(response.json())
|
|
29
|
-
|
|
30
|
-
return response_200
|
|
31
|
-
|
|
32
|
-
if response.status_code == 401:
|
|
33
|
-
response_401 = cast(Any, None)
|
|
34
|
-
return response_401
|
|
35
|
-
|
|
36
|
-
if response.status_code == 422:
|
|
37
|
-
response_422 = HTTPValidationError.from_dict(response.json())
|
|
38
|
-
|
|
39
|
-
return response_422
|
|
40
|
-
|
|
41
|
-
if response.status_code == 500:
|
|
42
|
-
response_500 = cast(Any, None)
|
|
43
|
-
return response_500
|
|
44
|
-
|
|
45
|
-
if client.raise_on_unexpected_status:
|
|
46
|
-
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
47
|
-
else:
|
|
48
|
-
return None
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
def _build_response(
|
|
52
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
53
|
-
) -> Response[Union[Any, HTTPValidationError, RepositoryCreditsResponse]]:
|
|
54
|
-
return Response(
|
|
55
|
-
status_code=HTTPStatus(response.status_code),
|
|
56
|
-
content=response.content,
|
|
57
|
-
headers=response.headers,
|
|
58
|
-
parsed=_parse_response(client=client, response=response),
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
def sync_detailed(
|
|
63
|
-
repository: str,
|
|
64
|
-
*,
|
|
65
|
-
client: AuthenticatedClient,
|
|
66
|
-
) -> Response[Union[Any, HTTPValidationError, RepositoryCreditsResponse]]:
|
|
67
|
-
"""Get Repository Credits
|
|
68
|
-
|
|
69
|
-
Get credit balance for a specific shared repository
|
|
70
|
-
|
|
71
|
-
Args:
|
|
72
|
-
repository (str):
|
|
73
|
-
|
|
74
|
-
Raises:
|
|
75
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
76
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
77
|
-
|
|
78
|
-
Returns:
|
|
79
|
-
Response[Union[Any, HTTPValidationError, RepositoryCreditsResponse]]
|
|
80
|
-
"""
|
|
81
|
-
|
|
82
|
-
kwargs = _get_kwargs(
|
|
83
|
-
repository=repository,
|
|
84
|
-
)
|
|
85
|
-
|
|
86
|
-
response = client.get_httpx_client().request(
|
|
87
|
-
**kwargs,
|
|
88
|
-
)
|
|
89
|
-
|
|
90
|
-
return _build_response(client=client, response=response)
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
def sync(
|
|
94
|
-
repository: str,
|
|
95
|
-
*,
|
|
96
|
-
client: AuthenticatedClient,
|
|
97
|
-
) -> Optional[Union[Any, HTTPValidationError, RepositoryCreditsResponse]]:
|
|
98
|
-
"""Get Repository Credits
|
|
99
|
-
|
|
100
|
-
Get credit balance for a specific shared repository
|
|
101
|
-
|
|
102
|
-
Args:
|
|
103
|
-
repository (str):
|
|
104
|
-
|
|
105
|
-
Raises:
|
|
106
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
107
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
108
|
-
|
|
109
|
-
Returns:
|
|
110
|
-
Union[Any, HTTPValidationError, RepositoryCreditsResponse]
|
|
111
|
-
"""
|
|
112
|
-
|
|
113
|
-
return sync_detailed(
|
|
114
|
-
repository=repository,
|
|
115
|
-
client=client,
|
|
116
|
-
).parsed
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
async def asyncio_detailed(
|
|
120
|
-
repository: str,
|
|
121
|
-
*,
|
|
122
|
-
client: AuthenticatedClient,
|
|
123
|
-
) -> Response[Union[Any, HTTPValidationError, RepositoryCreditsResponse]]:
|
|
124
|
-
"""Get Repository Credits
|
|
125
|
-
|
|
126
|
-
Get credit balance for a specific shared repository
|
|
127
|
-
|
|
128
|
-
Args:
|
|
129
|
-
repository (str):
|
|
130
|
-
|
|
131
|
-
Raises:
|
|
132
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
133
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
134
|
-
|
|
135
|
-
Returns:
|
|
136
|
-
Response[Union[Any, HTTPValidationError, RepositoryCreditsResponse]]
|
|
137
|
-
"""
|
|
138
|
-
|
|
139
|
-
kwargs = _get_kwargs(
|
|
140
|
-
repository=repository,
|
|
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
|
-
repository: str,
|
|
150
|
-
*,
|
|
151
|
-
client: AuthenticatedClient,
|
|
152
|
-
) -> Optional[Union[Any, HTTPValidationError, RepositoryCreditsResponse]]:
|
|
153
|
-
"""Get Repository Credits
|
|
154
|
-
|
|
155
|
-
Get credit balance for a specific shared repository
|
|
156
|
-
|
|
157
|
-
Args:
|
|
158
|
-
repository (str):
|
|
159
|
-
|
|
160
|
-
Raises:
|
|
161
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
162
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
163
|
-
|
|
164
|
-
Returns:
|
|
165
|
-
Union[Any, HTTPValidationError, RepositoryCreditsResponse]
|
|
166
|
-
"""
|
|
167
|
-
|
|
168
|
-
return (
|
|
169
|
-
await asyncio_detailed(
|
|
170
|
-
repository=repository,
|
|
171
|
-
client=client,
|
|
172
|
-
)
|
|
173
|
-
).parsed
|
|
@@ -1,143 +0,0 @@
|
|
|
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.credits_summary_response import CreditsSummaryResponse
|
|
9
|
-
from ...types import Response
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def _get_kwargs() -> dict[str, Any]:
|
|
13
|
-
_kwargs: dict[str, Any] = {
|
|
14
|
-
"method": "get",
|
|
15
|
-
"url": "/v1/user/subscriptions/shared-repositories/credits",
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return _kwargs
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
def _parse_response(
|
|
22
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
23
|
-
) -> Optional[Union[Any, CreditsSummaryResponse]]:
|
|
24
|
-
if response.status_code == 200:
|
|
25
|
-
response_200 = CreditsSummaryResponse.from_dict(response.json())
|
|
26
|
-
|
|
27
|
-
return response_200
|
|
28
|
-
|
|
29
|
-
if response.status_code == 401:
|
|
30
|
-
response_401 = cast(Any, None)
|
|
31
|
-
return response_401
|
|
32
|
-
|
|
33
|
-
if response.status_code == 500:
|
|
34
|
-
response_500 = cast(Any, None)
|
|
35
|
-
return response_500
|
|
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[Any, CreditsSummaryResponse]]:
|
|
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
|
-
*,
|
|
56
|
-
client: AuthenticatedClient,
|
|
57
|
-
) -> Response[Union[Any, CreditsSummaryResponse]]:
|
|
58
|
-
"""Get Credit Balances
|
|
59
|
-
|
|
60
|
-
Retrieve credit balances for all shared repository subscriptions
|
|
61
|
-
|
|
62
|
-
Raises:
|
|
63
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
64
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
65
|
-
|
|
66
|
-
Returns:
|
|
67
|
-
Response[Union[Any, CreditsSummaryResponse]]
|
|
68
|
-
"""
|
|
69
|
-
|
|
70
|
-
kwargs = _get_kwargs()
|
|
71
|
-
|
|
72
|
-
response = client.get_httpx_client().request(
|
|
73
|
-
**kwargs,
|
|
74
|
-
)
|
|
75
|
-
|
|
76
|
-
return _build_response(client=client, response=response)
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
def sync(
|
|
80
|
-
*,
|
|
81
|
-
client: AuthenticatedClient,
|
|
82
|
-
) -> Optional[Union[Any, CreditsSummaryResponse]]:
|
|
83
|
-
"""Get Credit Balances
|
|
84
|
-
|
|
85
|
-
Retrieve credit balances for all shared repository subscriptions
|
|
86
|
-
|
|
87
|
-
Raises:
|
|
88
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
89
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
90
|
-
|
|
91
|
-
Returns:
|
|
92
|
-
Union[Any, CreditsSummaryResponse]
|
|
93
|
-
"""
|
|
94
|
-
|
|
95
|
-
return sync_detailed(
|
|
96
|
-
client=client,
|
|
97
|
-
).parsed
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
async def asyncio_detailed(
|
|
101
|
-
*,
|
|
102
|
-
client: AuthenticatedClient,
|
|
103
|
-
) -> Response[Union[Any, CreditsSummaryResponse]]:
|
|
104
|
-
"""Get Credit Balances
|
|
105
|
-
|
|
106
|
-
Retrieve credit balances for all shared repository subscriptions
|
|
107
|
-
|
|
108
|
-
Raises:
|
|
109
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
110
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
111
|
-
|
|
112
|
-
Returns:
|
|
113
|
-
Response[Union[Any, CreditsSummaryResponse]]
|
|
114
|
-
"""
|
|
115
|
-
|
|
116
|
-
kwargs = _get_kwargs()
|
|
117
|
-
|
|
118
|
-
response = await client.get_async_httpx_client().request(**kwargs)
|
|
119
|
-
|
|
120
|
-
return _build_response(client=client, response=response)
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
async def asyncio(
|
|
124
|
-
*,
|
|
125
|
-
client: AuthenticatedClient,
|
|
126
|
-
) -> Optional[Union[Any, CreditsSummaryResponse]]:
|
|
127
|
-
"""Get Credit Balances
|
|
128
|
-
|
|
129
|
-
Retrieve credit balances for all shared repository subscriptions
|
|
130
|
-
|
|
131
|
-
Raises:
|
|
132
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
133
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
134
|
-
|
|
135
|
-
Returns:
|
|
136
|
-
Union[Any, CreditsSummaryResponse]
|
|
137
|
-
"""
|
|
138
|
-
|
|
139
|
-
return (
|
|
140
|
-
await asyncio_detailed(
|
|
141
|
-
client=client,
|
|
142
|
-
)
|
|
143
|
-
).parsed
|
|
@@ -1,181 +0,0 @@
|
|
|
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 ...models.user_subscriptions_response import UserSubscriptionsResponse
|
|
10
|
-
from ...types import UNSET, Response, Unset
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def _get_kwargs(
|
|
14
|
-
*,
|
|
15
|
-
active_only: Union[Unset, bool] = True,
|
|
16
|
-
) -> dict[str, Any]:
|
|
17
|
-
params: dict[str, Any] = {}
|
|
18
|
-
|
|
19
|
-
params["active_only"] = active_only
|
|
20
|
-
|
|
21
|
-
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
22
|
-
|
|
23
|
-
_kwargs: dict[str, Any] = {
|
|
24
|
-
"method": "get",
|
|
25
|
-
"url": "/v1/user/subscriptions/shared-repositories",
|
|
26
|
-
"params": params,
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
return _kwargs
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
def _parse_response(
|
|
33
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
34
|
-
) -> Optional[Union[Any, HTTPValidationError, UserSubscriptionsResponse]]:
|
|
35
|
-
if response.status_code == 200:
|
|
36
|
-
response_200 = UserSubscriptionsResponse.from_dict(response.json())
|
|
37
|
-
|
|
38
|
-
return response_200
|
|
39
|
-
|
|
40
|
-
if response.status_code == 401:
|
|
41
|
-
response_401 = cast(Any, None)
|
|
42
|
-
return response_401
|
|
43
|
-
|
|
44
|
-
if response.status_code == 422:
|
|
45
|
-
response_422 = HTTPValidationError.from_dict(response.json())
|
|
46
|
-
|
|
47
|
-
return response_422
|
|
48
|
-
|
|
49
|
-
if response.status_code == 500:
|
|
50
|
-
response_500 = cast(Any, None)
|
|
51
|
-
return response_500
|
|
52
|
-
|
|
53
|
-
if client.raise_on_unexpected_status:
|
|
54
|
-
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
55
|
-
else:
|
|
56
|
-
return None
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
def _build_response(
|
|
60
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
61
|
-
) -> Response[Union[Any, HTTPValidationError, UserSubscriptionsResponse]]:
|
|
62
|
-
return Response(
|
|
63
|
-
status_code=HTTPStatus(response.status_code),
|
|
64
|
-
content=response.content,
|
|
65
|
-
headers=response.headers,
|
|
66
|
-
parsed=_parse_response(client=client, response=response),
|
|
67
|
-
)
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
def sync_detailed(
|
|
71
|
-
*,
|
|
72
|
-
client: AuthenticatedClient,
|
|
73
|
-
active_only: Union[Unset, bool] = True,
|
|
74
|
-
) -> Response[Union[Any, HTTPValidationError, UserSubscriptionsResponse]]:
|
|
75
|
-
"""Get User Subscriptions
|
|
76
|
-
|
|
77
|
-
Retrieve user's current shared repository subscriptions with detailed information
|
|
78
|
-
|
|
79
|
-
Args:
|
|
80
|
-
active_only (Union[Unset, bool]): Only return active subscriptions Default: True.
|
|
81
|
-
|
|
82
|
-
Raises:
|
|
83
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
84
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
85
|
-
|
|
86
|
-
Returns:
|
|
87
|
-
Response[Union[Any, HTTPValidationError, UserSubscriptionsResponse]]
|
|
88
|
-
"""
|
|
89
|
-
|
|
90
|
-
kwargs = _get_kwargs(
|
|
91
|
-
active_only=active_only,
|
|
92
|
-
)
|
|
93
|
-
|
|
94
|
-
response = client.get_httpx_client().request(
|
|
95
|
-
**kwargs,
|
|
96
|
-
)
|
|
97
|
-
|
|
98
|
-
return _build_response(client=client, response=response)
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
def sync(
|
|
102
|
-
*,
|
|
103
|
-
client: AuthenticatedClient,
|
|
104
|
-
active_only: Union[Unset, bool] = True,
|
|
105
|
-
) -> Optional[Union[Any, HTTPValidationError, UserSubscriptionsResponse]]:
|
|
106
|
-
"""Get User Subscriptions
|
|
107
|
-
|
|
108
|
-
Retrieve user's current shared repository subscriptions with detailed information
|
|
109
|
-
|
|
110
|
-
Args:
|
|
111
|
-
active_only (Union[Unset, bool]): Only return active subscriptions Default: True.
|
|
112
|
-
|
|
113
|
-
Raises:
|
|
114
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
115
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
116
|
-
|
|
117
|
-
Returns:
|
|
118
|
-
Union[Any, HTTPValidationError, UserSubscriptionsResponse]
|
|
119
|
-
"""
|
|
120
|
-
|
|
121
|
-
return sync_detailed(
|
|
122
|
-
client=client,
|
|
123
|
-
active_only=active_only,
|
|
124
|
-
).parsed
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
async def asyncio_detailed(
|
|
128
|
-
*,
|
|
129
|
-
client: AuthenticatedClient,
|
|
130
|
-
active_only: Union[Unset, bool] = True,
|
|
131
|
-
) -> Response[Union[Any, HTTPValidationError, UserSubscriptionsResponse]]:
|
|
132
|
-
"""Get User Subscriptions
|
|
133
|
-
|
|
134
|
-
Retrieve user's current shared repository subscriptions with detailed information
|
|
135
|
-
|
|
136
|
-
Args:
|
|
137
|
-
active_only (Union[Unset, bool]): Only return active subscriptions Default: True.
|
|
138
|
-
|
|
139
|
-
Raises:
|
|
140
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
141
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
142
|
-
|
|
143
|
-
Returns:
|
|
144
|
-
Response[Union[Any, HTTPValidationError, UserSubscriptionsResponse]]
|
|
145
|
-
"""
|
|
146
|
-
|
|
147
|
-
kwargs = _get_kwargs(
|
|
148
|
-
active_only=active_only,
|
|
149
|
-
)
|
|
150
|
-
|
|
151
|
-
response = await client.get_async_httpx_client().request(**kwargs)
|
|
152
|
-
|
|
153
|
-
return _build_response(client=client, response=response)
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
async def asyncio(
|
|
157
|
-
*,
|
|
158
|
-
client: AuthenticatedClient,
|
|
159
|
-
active_only: Union[Unset, bool] = True,
|
|
160
|
-
) -> Optional[Union[Any, HTTPValidationError, UserSubscriptionsResponse]]:
|
|
161
|
-
"""Get User Subscriptions
|
|
162
|
-
|
|
163
|
-
Retrieve user's current shared repository subscriptions with detailed information
|
|
164
|
-
|
|
165
|
-
Args:
|
|
166
|
-
active_only (Union[Unset, bool]): Only return active subscriptions Default: True.
|
|
167
|
-
|
|
168
|
-
Raises:
|
|
169
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
170
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
171
|
-
|
|
172
|
-
Returns:
|
|
173
|
-
Union[Any, HTTPValidationError, UserSubscriptionsResponse]
|
|
174
|
-
"""
|
|
175
|
-
|
|
176
|
-
return (
|
|
177
|
-
await asyncio_detailed(
|
|
178
|
-
client=client,
|
|
179
|
-
active_only=active_only,
|
|
180
|
-
)
|
|
181
|
-
).parsed
|
|
@@ -1,186 +0,0 @@
|
|
|
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 ...models.subscription_request import SubscriptionRequest
|
|
10
|
-
from ...models.subscription_response import SubscriptionResponse
|
|
11
|
-
from ...types import Response
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
def _get_kwargs(
|
|
15
|
-
*,
|
|
16
|
-
body: SubscriptionRequest,
|
|
17
|
-
) -> dict[str, Any]:
|
|
18
|
-
headers: dict[str, Any] = {}
|
|
19
|
-
|
|
20
|
-
_kwargs: dict[str, Any] = {
|
|
21
|
-
"method": "post",
|
|
22
|
-
"url": "/v1/user/subscriptions/shared-repositories/subscribe",
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
_kwargs["json"] = body.to_dict()
|
|
26
|
-
|
|
27
|
-
headers["Content-Type"] = "application/json"
|
|
28
|
-
|
|
29
|
-
_kwargs["headers"] = headers
|
|
30
|
-
return _kwargs
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
def _parse_response(
|
|
34
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
35
|
-
) -> Optional[Union[Any, HTTPValidationError, SubscriptionResponse]]:
|
|
36
|
-
if response.status_code == 201:
|
|
37
|
-
response_201 = SubscriptionResponse.from_dict(response.json())
|
|
38
|
-
|
|
39
|
-
return response_201
|
|
40
|
-
|
|
41
|
-
if response.status_code == 400:
|
|
42
|
-
response_400 = cast(Any, None)
|
|
43
|
-
return response_400
|
|
44
|
-
|
|
45
|
-
if response.status_code == 401:
|
|
46
|
-
response_401 = cast(Any, None)
|
|
47
|
-
return response_401
|
|
48
|
-
|
|
49
|
-
if response.status_code == 422:
|
|
50
|
-
response_422 = HTTPValidationError.from_dict(response.json())
|
|
51
|
-
|
|
52
|
-
return response_422
|
|
53
|
-
|
|
54
|
-
if response.status_code == 500:
|
|
55
|
-
response_500 = cast(Any, None)
|
|
56
|
-
return response_500
|
|
57
|
-
|
|
58
|
-
if client.raise_on_unexpected_status:
|
|
59
|
-
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
60
|
-
else:
|
|
61
|
-
return None
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
def _build_response(
|
|
65
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
66
|
-
) -> Response[Union[Any, HTTPValidationError, SubscriptionResponse]]:
|
|
67
|
-
return Response(
|
|
68
|
-
status_code=HTTPStatus(response.status_code),
|
|
69
|
-
content=response.content,
|
|
70
|
-
headers=response.headers,
|
|
71
|
-
parsed=_parse_response(client=client, response=response),
|
|
72
|
-
)
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
def sync_detailed(
|
|
76
|
-
*,
|
|
77
|
-
client: AuthenticatedClient,
|
|
78
|
-
body: SubscriptionRequest,
|
|
79
|
-
) -> Response[Union[Any, HTTPValidationError, SubscriptionResponse]]:
|
|
80
|
-
"""Subscribe to Shared Repository
|
|
81
|
-
|
|
82
|
-
Create a new subscription to a shared repository add-on with specified tier
|
|
83
|
-
|
|
84
|
-
Args:
|
|
85
|
-
body (SubscriptionRequest): Request to create a new subscription.
|
|
86
|
-
|
|
87
|
-
Raises:
|
|
88
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
89
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
90
|
-
|
|
91
|
-
Returns:
|
|
92
|
-
Response[Union[Any, HTTPValidationError, SubscriptionResponse]]
|
|
93
|
-
"""
|
|
94
|
-
|
|
95
|
-
kwargs = _get_kwargs(
|
|
96
|
-
body=body,
|
|
97
|
-
)
|
|
98
|
-
|
|
99
|
-
response = client.get_httpx_client().request(
|
|
100
|
-
**kwargs,
|
|
101
|
-
)
|
|
102
|
-
|
|
103
|
-
return _build_response(client=client, response=response)
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
def sync(
|
|
107
|
-
*,
|
|
108
|
-
client: AuthenticatedClient,
|
|
109
|
-
body: SubscriptionRequest,
|
|
110
|
-
) -> Optional[Union[Any, HTTPValidationError, SubscriptionResponse]]:
|
|
111
|
-
"""Subscribe to Shared Repository
|
|
112
|
-
|
|
113
|
-
Create a new subscription to a shared repository add-on with specified tier
|
|
114
|
-
|
|
115
|
-
Args:
|
|
116
|
-
body (SubscriptionRequest): Request to create a new subscription.
|
|
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[Any, HTTPValidationError, SubscriptionResponse]
|
|
124
|
-
"""
|
|
125
|
-
|
|
126
|
-
return sync_detailed(
|
|
127
|
-
client=client,
|
|
128
|
-
body=body,
|
|
129
|
-
).parsed
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
async def asyncio_detailed(
|
|
133
|
-
*,
|
|
134
|
-
client: AuthenticatedClient,
|
|
135
|
-
body: SubscriptionRequest,
|
|
136
|
-
) -> Response[Union[Any, HTTPValidationError, SubscriptionResponse]]:
|
|
137
|
-
"""Subscribe to Shared Repository
|
|
138
|
-
|
|
139
|
-
Create a new subscription to a shared repository add-on with specified tier
|
|
140
|
-
|
|
141
|
-
Args:
|
|
142
|
-
body (SubscriptionRequest): Request to create a new subscription.
|
|
143
|
-
|
|
144
|
-
Raises:
|
|
145
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
146
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
147
|
-
|
|
148
|
-
Returns:
|
|
149
|
-
Response[Union[Any, HTTPValidationError, SubscriptionResponse]]
|
|
150
|
-
"""
|
|
151
|
-
|
|
152
|
-
kwargs = _get_kwargs(
|
|
153
|
-
body=body,
|
|
154
|
-
)
|
|
155
|
-
|
|
156
|
-
response = await client.get_async_httpx_client().request(**kwargs)
|
|
157
|
-
|
|
158
|
-
return _build_response(client=client, response=response)
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
async def asyncio(
|
|
162
|
-
*,
|
|
163
|
-
client: AuthenticatedClient,
|
|
164
|
-
body: SubscriptionRequest,
|
|
165
|
-
) -> Optional[Union[Any, HTTPValidationError, SubscriptionResponse]]:
|
|
166
|
-
"""Subscribe to Shared Repository
|
|
167
|
-
|
|
168
|
-
Create a new subscription to a shared repository add-on with specified tier
|
|
169
|
-
|
|
170
|
-
Args:
|
|
171
|
-
body (SubscriptionRequest): Request to create a new subscription.
|
|
172
|
-
|
|
173
|
-
Raises:
|
|
174
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
175
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
176
|
-
|
|
177
|
-
Returns:
|
|
178
|
-
Union[Any, HTTPValidationError, SubscriptionResponse]
|
|
179
|
-
"""
|
|
180
|
-
|
|
181
|
-
return (
|
|
182
|
-
await asyncio_detailed(
|
|
183
|
-
client=client,
|
|
184
|
-
body=body,
|
|
185
|
-
)
|
|
186
|
-
).parsed
|