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,320 +0,0 @@
|
|
|
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.error_response import ErrorResponse
|
|
9
|
-
from ...models.get_graph_usage_details_response_getgraphusagedetails import (
|
|
10
|
-
GetGraphUsageDetailsResponseGetgraphusagedetails,
|
|
11
|
-
)
|
|
12
|
-
from ...models.http_validation_error import HTTPValidationError
|
|
13
|
-
from ...types import UNSET, Response, Unset
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
def _get_kwargs(
|
|
17
|
-
graph_id: str,
|
|
18
|
-
*,
|
|
19
|
-
year: Union[None, Unset, int] = UNSET,
|
|
20
|
-
month: Union[None, Unset, int] = UNSET,
|
|
21
|
-
) -> dict[str, Any]:
|
|
22
|
-
params: dict[str, Any] = {}
|
|
23
|
-
|
|
24
|
-
json_year: Union[None, Unset, int]
|
|
25
|
-
if isinstance(year, Unset):
|
|
26
|
-
json_year = UNSET
|
|
27
|
-
else:
|
|
28
|
-
json_year = year
|
|
29
|
-
params["year"] = json_year
|
|
30
|
-
|
|
31
|
-
json_month: Union[None, Unset, int]
|
|
32
|
-
if isinstance(month, Unset):
|
|
33
|
-
json_month = UNSET
|
|
34
|
-
else:
|
|
35
|
-
json_month = month
|
|
36
|
-
params["month"] = json_month
|
|
37
|
-
|
|
38
|
-
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
39
|
-
|
|
40
|
-
_kwargs: dict[str, Any] = {
|
|
41
|
-
"method": "get",
|
|
42
|
-
"url": f"/v1/graphs/{graph_id}/billing/usage",
|
|
43
|
-
"params": params,
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return _kwargs
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
def _parse_response(
|
|
50
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
51
|
-
) -> Optional[
|
|
52
|
-
Union[
|
|
53
|
-
ErrorResponse, GetGraphUsageDetailsResponseGetgraphusagedetails, HTTPValidationError
|
|
54
|
-
]
|
|
55
|
-
]:
|
|
56
|
-
if response.status_code == 200:
|
|
57
|
-
response_200 = GetGraphUsageDetailsResponseGetgraphusagedetails.from_dict(
|
|
58
|
-
response.json()
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
return response_200
|
|
62
|
-
|
|
63
|
-
if response.status_code == 400:
|
|
64
|
-
response_400 = ErrorResponse.from_dict(response.json())
|
|
65
|
-
|
|
66
|
-
return response_400
|
|
67
|
-
|
|
68
|
-
if response.status_code == 403:
|
|
69
|
-
response_403 = ErrorResponse.from_dict(response.json())
|
|
70
|
-
|
|
71
|
-
return response_403
|
|
72
|
-
|
|
73
|
-
if response.status_code == 404:
|
|
74
|
-
response_404 = ErrorResponse.from_dict(response.json())
|
|
75
|
-
|
|
76
|
-
return response_404
|
|
77
|
-
|
|
78
|
-
if response.status_code == 422:
|
|
79
|
-
response_422 = HTTPValidationError.from_dict(response.json())
|
|
80
|
-
|
|
81
|
-
return response_422
|
|
82
|
-
|
|
83
|
-
if response.status_code == 500:
|
|
84
|
-
response_500 = ErrorResponse.from_dict(response.json())
|
|
85
|
-
|
|
86
|
-
return response_500
|
|
87
|
-
|
|
88
|
-
if client.raise_on_unexpected_status:
|
|
89
|
-
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
90
|
-
else:
|
|
91
|
-
return None
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
def _build_response(
|
|
95
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
96
|
-
) -> Response[
|
|
97
|
-
Union[
|
|
98
|
-
ErrorResponse, GetGraphUsageDetailsResponseGetgraphusagedetails, HTTPValidationError
|
|
99
|
-
]
|
|
100
|
-
]:
|
|
101
|
-
return Response(
|
|
102
|
-
status_code=HTTPStatus(response.status_code),
|
|
103
|
-
content=response.content,
|
|
104
|
-
headers=response.headers,
|
|
105
|
-
parsed=_parse_response(client=client, response=response),
|
|
106
|
-
)
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
def sync_detailed(
|
|
110
|
-
graph_id: str,
|
|
111
|
-
*,
|
|
112
|
-
client: AuthenticatedClient,
|
|
113
|
-
year: Union[None, Unset, int] = UNSET,
|
|
114
|
-
month: Union[None, Unset, int] = UNSET,
|
|
115
|
-
) -> Response[
|
|
116
|
-
Union[
|
|
117
|
-
ErrorResponse, GetGraphUsageDetailsResponseGetgraphusagedetails, HTTPValidationError
|
|
118
|
-
]
|
|
119
|
-
]:
|
|
120
|
-
"""Get Usage Details
|
|
121
|
-
|
|
122
|
-
Get detailed usage metrics for the graph.
|
|
123
|
-
|
|
124
|
-
Provides granular usage information including:
|
|
125
|
-
- **Daily Credit Consumption**: Track credit usage patterns
|
|
126
|
-
- **Storage Growth**: Monitor database size over time
|
|
127
|
-
- **Operation Breakdown**: Credits by operation type
|
|
128
|
-
- **Peak Usage Times**: Identify high-activity periods
|
|
129
|
-
- **API Call Volumes**: Request counts and patterns
|
|
130
|
-
|
|
131
|
-
Useful for:
|
|
132
|
-
- Optimizing credit consumption
|
|
133
|
-
- Capacity planning
|
|
134
|
-
- Usage trend analysis
|
|
135
|
-
- Cost optimization
|
|
136
|
-
|
|
137
|
-
ℹ️ No credits are consumed for viewing usage details.
|
|
138
|
-
|
|
139
|
-
Args:
|
|
140
|
-
graph_id (str):
|
|
141
|
-
year (Union[None, Unset, int]): Year (defaults to current)
|
|
142
|
-
month (Union[None, Unset, int]): Month (defaults to current)
|
|
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[ErrorResponse, GetGraphUsageDetailsResponseGetgraphusagedetails, HTTPValidationError]]
|
|
150
|
-
"""
|
|
151
|
-
|
|
152
|
-
kwargs = _get_kwargs(
|
|
153
|
-
graph_id=graph_id,
|
|
154
|
-
year=year,
|
|
155
|
-
month=month,
|
|
156
|
-
)
|
|
157
|
-
|
|
158
|
-
response = client.get_httpx_client().request(
|
|
159
|
-
**kwargs,
|
|
160
|
-
)
|
|
161
|
-
|
|
162
|
-
return _build_response(client=client, response=response)
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
def sync(
|
|
166
|
-
graph_id: str,
|
|
167
|
-
*,
|
|
168
|
-
client: AuthenticatedClient,
|
|
169
|
-
year: Union[None, Unset, int] = UNSET,
|
|
170
|
-
month: Union[None, Unset, int] = UNSET,
|
|
171
|
-
) -> Optional[
|
|
172
|
-
Union[
|
|
173
|
-
ErrorResponse, GetGraphUsageDetailsResponseGetgraphusagedetails, HTTPValidationError
|
|
174
|
-
]
|
|
175
|
-
]:
|
|
176
|
-
"""Get Usage Details
|
|
177
|
-
|
|
178
|
-
Get detailed usage metrics for the graph.
|
|
179
|
-
|
|
180
|
-
Provides granular usage information including:
|
|
181
|
-
- **Daily Credit Consumption**: Track credit usage patterns
|
|
182
|
-
- **Storage Growth**: Monitor database size over time
|
|
183
|
-
- **Operation Breakdown**: Credits by operation type
|
|
184
|
-
- **Peak Usage Times**: Identify high-activity periods
|
|
185
|
-
- **API Call Volumes**: Request counts and patterns
|
|
186
|
-
|
|
187
|
-
Useful for:
|
|
188
|
-
- Optimizing credit consumption
|
|
189
|
-
- Capacity planning
|
|
190
|
-
- Usage trend analysis
|
|
191
|
-
- Cost optimization
|
|
192
|
-
|
|
193
|
-
ℹ️ No credits are consumed for viewing usage details.
|
|
194
|
-
|
|
195
|
-
Args:
|
|
196
|
-
graph_id (str):
|
|
197
|
-
year (Union[None, Unset, int]): Year (defaults to current)
|
|
198
|
-
month (Union[None, Unset, int]): Month (defaults to current)
|
|
199
|
-
|
|
200
|
-
Raises:
|
|
201
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
202
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
203
|
-
|
|
204
|
-
Returns:
|
|
205
|
-
Union[ErrorResponse, GetGraphUsageDetailsResponseGetgraphusagedetails, HTTPValidationError]
|
|
206
|
-
"""
|
|
207
|
-
|
|
208
|
-
return sync_detailed(
|
|
209
|
-
graph_id=graph_id,
|
|
210
|
-
client=client,
|
|
211
|
-
year=year,
|
|
212
|
-
month=month,
|
|
213
|
-
).parsed
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
async def asyncio_detailed(
|
|
217
|
-
graph_id: str,
|
|
218
|
-
*,
|
|
219
|
-
client: AuthenticatedClient,
|
|
220
|
-
year: Union[None, Unset, int] = UNSET,
|
|
221
|
-
month: Union[None, Unset, int] = UNSET,
|
|
222
|
-
) -> Response[
|
|
223
|
-
Union[
|
|
224
|
-
ErrorResponse, GetGraphUsageDetailsResponseGetgraphusagedetails, HTTPValidationError
|
|
225
|
-
]
|
|
226
|
-
]:
|
|
227
|
-
"""Get Usage Details
|
|
228
|
-
|
|
229
|
-
Get detailed usage metrics for the graph.
|
|
230
|
-
|
|
231
|
-
Provides granular usage information including:
|
|
232
|
-
- **Daily Credit Consumption**: Track credit usage patterns
|
|
233
|
-
- **Storage Growth**: Monitor database size over time
|
|
234
|
-
- **Operation Breakdown**: Credits by operation type
|
|
235
|
-
- **Peak Usage Times**: Identify high-activity periods
|
|
236
|
-
- **API Call Volumes**: Request counts and patterns
|
|
237
|
-
|
|
238
|
-
Useful for:
|
|
239
|
-
- Optimizing credit consumption
|
|
240
|
-
- Capacity planning
|
|
241
|
-
- Usage trend analysis
|
|
242
|
-
- Cost optimization
|
|
243
|
-
|
|
244
|
-
ℹ️ No credits are consumed for viewing usage details.
|
|
245
|
-
|
|
246
|
-
Args:
|
|
247
|
-
graph_id (str):
|
|
248
|
-
year (Union[None, Unset, int]): Year (defaults to current)
|
|
249
|
-
month (Union[None, Unset, int]): Month (defaults to current)
|
|
250
|
-
|
|
251
|
-
Raises:
|
|
252
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
253
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
254
|
-
|
|
255
|
-
Returns:
|
|
256
|
-
Response[Union[ErrorResponse, GetGraphUsageDetailsResponseGetgraphusagedetails, HTTPValidationError]]
|
|
257
|
-
"""
|
|
258
|
-
|
|
259
|
-
kwargs = _get_kwargs(
|
|
260
|
-
graph_id=graph_id,
|
|
261
|
-
year=year,
|
|
262
|
-
month=month,
|
|
263
|
-
)
|
|
264
|
-
|
|
265
|
-
response = await client.get_async_httpx_client().request(**kwargs)
|
|
266
|
-
|
|
267
|
-
return _build_response(client=client, response=response)
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
async def asyncio(
|
|
271
|
-
graph_id: str,
|
|
272
|
-
*,
|
|
273
|
-
client: AuthenticatedClient,
|
|
274
|
-
year: Union[None, Unset, int] = UNSET,
|
|
275
|
-
month: Union[None, Unset, int] = UNSET,
|
|
276
|
-
) -> Optional[
|
|
277
|
-
Union[
|
|
278
|
-
ErrorResponse, GetGraphUsageDetailsResponseGetgraphusagedetails, HTTPValidationError
|
|
279
|
-
]
|
|
280
|
-
]:
|
|
281
|
-
"""Get Usage Details
|
|
282
|
-
|
|
283
|
-
Get detailed usage metrics for the graph.
|
|
284
|
-
|
|
285
|
-
Provides granular usage information including:
|
|
286
|
-
- **Daily Credit Consumption**: Track credit usage patterns
|
|
287
|
-
- **Storage Growth**: Monitor database size over time
|
|
288
|
-
- **Operation Breakdown**: Credits by operation type
|
|
289
|
-
- **Peak Usage Times**: Identify high-activity periods
|
|
290
|
-
- **API Call Volumes**: Request counts and patterns
|
|
291
|
-
|
|
292
|
-
Useful for:
|
|
293
|
-
- Optimizing credit consumption
|
|
294
|
-
- Capacity planning
|
|
295
|
-
- Usage trend analysis
|
|
296
|
-
- Cost optimization
|
|
297
|
-
|
|
298
|
-
ℹ️ No credits are consumed for viewing usage details.
|
|
299
|
-
|
|
300
|
-
Args:
|
|
301
|
-
graph_id (str):
|
|
302
|
-
year (Union[None, Unset, int]): Year (defaults to current)
|
|
303
|
-
month (Union[None, Unset, int]): Month (defaults to current)
|
|
304
|
-
|
|
305
|
-
Raises:
|
|
306
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
307
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
308
|
-
|
|
309
|
-
Returns:
|
|
310
|
-
Union[ErrorResponse, GetGraphUsageDetailsResponseGetgraphusagedetails, HTTPValidationError]
|
|
311
|
-
"""
|
|
312
|
-
|
|
313
|
-
return (
|
|
314
|
-
await asyncio_detailed(
|
|
315
|
-
graph_id=graph_id,
|
|
316
|
-
client=client,
|
|
317
|
-
year=year,
|
|
318
|
-
month=month,
|
|
319
|
-
)
|
|
320
|
-
).parsed
|
|
@@ -1,169 +0,0 @@
|
|
|
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.error_response import ErrorResponse
|
|
9
|
-
from ...models.get_all_credit_summaries_response_getallcreditsummaries import (
|
|
10
|
-
GetAllCreditSummariesResponseGetallcreditsummaries,
|
|
11
|
-
)
|
|
12
|
-
from ...types import Response
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def _get_kwargs() -> dict[str, Any]:
|
|
16
|
-
_kwargs: dict[str, Any] = {
|
|
17
|
-
"method": "get",
|
|
18
|
-
"url": "/v1/user/credits",
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return _kwargs
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
def _parse_response(
|
|
25
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
26
|
-
) -> Optional[Union[ErrorResponse, GetAllCreditSummariesResponseGetallcreditsummaries]]:
|
|
27
|
-
if response.status_code == 200:
|
|
28
|
-
response_200 = GetAllCreditSummariesResponseGetallcreditsummaries.from_dict(
|
|
29
|
-
response.json()
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
return response_200
|
|
33
|
-
|
|
34
|
-
if response.status_code == 500:
|
|
35
|
-
response_500 = ErrorResponse.from_dict(response.json())
|
|
36
|
-
|
|
37
|
-
return response_500
|
|
38
|
-
|
|
39
|
-
if client.raise_on_unexpected_status:
|
|
40
|
-
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
41
|
-
else:
|
|
42
|
-
return None
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
def _build_response(
|
|
46
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
47
|
-
) -> Response[Union[ErrorResponse, GetAllCreditSummariesResponseGetallcreditsummaries]]:
|
|
48
|
-
return Response(
|
|
49
|
-
status_code=HTTPStatus(response.status_code),
|
|
50
|
-
content=response.content,
|
|
51
|
-
headers=response.headers,
|
|
52
|
-
parsed=_parse_response(client=client, response=response),
|
|
53
|
-
)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
def sync_detailed(
|
|
57
|
-
*,
|
|
58
|
-
client: AuthenticatedClient,
|
|
59
|
-
) -> Response[Union[ErrorResponse, GetAllCreditSummariesResponseGetallcreditsummaries]]:
|
|
60
|
-
"""Get All Credit Summaries
|
|
61
|
-
|
|
62
|
-
Get credit summaries for all graphs owned by the user.
|
|
63
|
-
|
|
64
|
-
This endpoint provides a consolidated view of credit usage across
|
|
65
|
-
all graphs where the user has access, helping to monitor overall
|
|
66
|
-
credit consumption and plan usage.
|
|
67
|
-
|
|
68
|
-
No credits are consumed for viewing summaries.
|
|
69
|
-
|
|
70
|
-
Raises:
|
|
71
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
72
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
73
|
-
|
|
74
|
-
Returns:
|
|
75
|
-
Response[Union[ErrorResponse, GetAllCreditSummariesResponseGetallcreditsummaries]]
|
|
76
|
-
"""
|
|
77
|
-
|
|
78
|
-
kwargs = _get_kwargs()
|
|
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
|
-
*,
|
|
89
|
-
client: AuthenticatedClient,
|
|
90
|
-
) -> Optional[Union[ErrorResponse, GetAllCreditSummariesResponseGetallcreditsummaries]]:
|
|
91
|
-
"""Get All Credit Summaries
|
|
92
|
-
|
|
93
|
-
Get credit summaries for all graphs owned by the user.
|
|
94
|
-
|
|
95
|
-
This endpoint provides a consolidated view of credit usage across
|
|
96
|
-
all graphs where the user has access, helping to monitor overall
|
|
97
|
-
credit consumption and plan usage.
|
|
98
|
-
|
|
99
|
-
No credits are consumed for viewing summaries.
|
|
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[ErrorResponse, GetAllCreditSummariesResponseGetallcreditsummaries]
|
|
107
|
-
"""
|
|
108
|
-
|
|
109
|
-
return sync_detailed(
|
|
110
|
-
client=client,
|
|
111
|
-
).parsed
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
async def asyncio_detailed(
|
|
115
|
-
*,
|
|
116
|
-
client: AuthenticatedClient,
|
|
117
|
-
) -> Response[Union[ErrorResponse, GetAllCreditSummariesResponseGetallcreditsummaries]]:
|
|
118
|
-
"""Get All Credit Summaries
|
|
119
|
-
|
|
120
|
-
Get credit summaries for all graphs owned by the user.
|
|
121
|
-
|
|
122
|
-
This endpoint provides a consolidated view of credit usage across
|
|
123
|
-
all graphs where the user has access, helping to monitor overall
|
|
124
|
-
credit consumption and plan usage.
|
|
125
|
-
|
|
126
|
-
No credits are consumed for viewing summaries.
|
|
127
|
-
|
|
128
|
-
Raises:
|
|
129
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
130
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
131
|
-
|
|
132
|
-
Returns:
|
|
133
|
-
Response[Union[ErrorResponse, GetAllCreditSummariesResponseGetallcreditsummaries]]
|
|
134
|
-
"""
|
|
135
|
-
|
|
136
|
-
kwargs = _get_kwargs()
|
|
137
|
-
|
|
138
|
-
response = await client.get_async_httpx_client().request(**kwargs)
|
|
139
|
-
|
|
140
|
-
return _build_response(client=client, response=response)
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
async def asyncio(
|
|
144
|
-
*,
|
|
145
|
-
client: AuthenticatedClient,
|
|
146
|
-
) -> Optional[Union[ErrorResponse, GetAllCreditSummariesResponseGetallcreditsummaries]]:
|
|
147
|
-
"""Get All Credit Summaries
|
|
148
|
-
|
|
149
|
-
Get credit summaries for all graphs owned by the user.
|
|
150
|
-
|
|
151
|
-
This endpoint provides a consolidated view of credit usage across
|
|
152
|
-
all graphs where the user has access, helping to monitor overall
|
|
153
|
-
credit consumption and plan usage.
|
|
154
|
-
|
|
155
|
-
No credits are consumed for viewing summaries.
|
|
156
|
-
|
|
157
|
-
Raises:
|
|
158
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
159
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
160
|
-
|
|
161
|
-
Returns:
|
|
162
|
-
Union[ErrorResponse, GetAllCreditSummariesResponseGetallcreditsummaries]
|
|
163
|
-
"""
|
|
164
|
-
|
|
165
|
-
return (
|
|
166
|
-
await asyncio_detailed(
|
|
167
|
-
client=client,
|
|
168
|
-
)
|
|
169
|
-
).parsed
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"""Contains endpoint functions for accessing the API"""
|
|
@@ -1,188 +0,0 @@
|
|
|
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.user_analytics_response import UserAnalyticsResponse
|
|
10
|
-
from ...types import UNSET, Response, Unset
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def _get_kwargs(
|
|
14
|
-
*,
|
|
15
|
-
include_api_stats: Union[Unset, bool] = True,
|
|
16
|
-
include_recent_activity: Union[Unset, bool] = True,
|
|
17
|
-
) -> dict[str, Any]:
|
|
18
|
-
params: dict[str, Any] = {}
|
|
19
|
-
|
|
20
|
-
params["include_api_stats"] = include_api_stats
|
|
21
|
-
|
|
22
|
-
params["include_recent_activity"] = include_recent_activity
|
|
23
|
-
|
|
24
|
-
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
25
|
-
|
|
26
|
-
_kwargs: dict[str, Any] = {
|
|
27
|
-
"method": "get",
|
|
28
|
-
"url": "/v1/user/analytics/detailed",
|
|
29
|
-
"params": params,
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return _kwargs
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
def _parse_response(
|
|
36
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
37
|
-
) -> Optional[Union[HTTPValidationError, UserAnalyticsResponse]]:
|
|
38
|
-
if response.status_code == 200:
|
|
39
|
-
response_200 = UserAnalyticsResponse.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, UserAnalyticsResponse]]:
|
|
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
|
-
*,
|
|
67
|
-
client: AuthenticatedClient,
|
|
68
|
-
include_api_stats: Union[Unset, bool] = True,
|
|
69
|
-
include_recent_activity: Union[Unset, bool] = True,
|
|
70
|
-
) -> Response[Union[HTTPValidationError, UserAnalyticsResponse]]:
|
|
71
|
-
"""Get Detailed User Analytics
|
|
72
|
-
|
|
73
|
-
Get comprehensive analytics for the current user including API usage and recent activity.
|
|
74
|
-
|
|
75
|
-
Args:
|
|
76
|
-
include_api_stats (Union[Unset, bool]): Include API usage statistics Default: True.
|
|
77
|
-
include_recent_activity (Union[Unset, bool]): Include recent activity Default: True.
|
|
78
|
-
|
|
79
|
-
Raises:
|
|
80
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
81
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
82
|
-
|
|
83
|
-
Returns:
|
|
84
|
-
Response[Union[HTTPValidationError, UserAnalyticsResponse]]
|
|
85
|
-
"""
|
|
86
|
-
|
|
87
|
-
kwargs = _get_kwargs(
|
|
88
|
-
include_api_stats=include_api_stats,
|
|
89
|
-
include_recent_activity=include_recent_activity,
|
|
90
|
-
)
|
|
91
|
-
|
|
92
|
-
response = client.get_httpx_client().request(
|
|
93
|
-
**kwargs,
|
|
94
|
-
)
|
|
95
|
-
|
|
96
|
-
return _build_response(client=client, response=response)
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
def sync(
|
|
100
|
-
*,
|
|
101
|
-
client: AuthenticatedClient,
|
|
102
|
-
include_api_stats: Union[Unset, bool] = True,
|
|
103
|
-
include_recent_activity: Union[Unset, bool] = True,
|
|
104
|
-
) -> Optional[Union[HTTPValidationError, UserAnalyticsResponse]]:
|
|
105
|
-
"""Get Detailed User Analytics
|
|
106
|
-
|
|
107
|
-
Get comprehensive analytics for the current user including API usage and recent activity.
|
|
108
|
-
|
|
109
|
-
Args:
|
|
110
|
-
include_api_stats (Union[Unset, bool]): Include API usage statistics Default: True.
|
|
111
|
-
include_recent_activity (Union[Unset, bool]): Include recent activity 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[HTTPValidationError, UserAnalyticsResponse]
|
|
119
|
-
"""
|
|
120
|
-
|
|
121
|
-
return sync_detailed(
|
|
122
|
-
client=client,
|
|
123
|
-
include_api_stats=include_api_stats,
|
|
124
|
-
include_recent_activity=include_recent_activity,
|
|
125
|
-
).parsed
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
async def asyncio_detailed(
|
|
129
|
-
*,
|
|
130
|
-
client: AuthenticatedClient,
|
|
131
|
-
include_api_stats: Union[Unset, bool] = True,
|
|
132
|
-
include_recent_activity: Union[Unset, bool] = True,
|
|
133
|
-
) -> Response[Union[HTTPValidationError, UserAnalyticsResponse]]:
|
|
134
|
-
"""Get Detailed User Analytics
|
|
135
|
-
|
|
136
|
-
Get comprehensive analytics for the current user including API usage and recent activity.
|
|
137
|
-
|
|
138
|
-
Args:
|
|
139
|
-
include_api_stats (Union[Unset, bool]): Include API usage statistics Default: True.
|
|
140
|
-
include_recent_activity (Union[Unset, bool]): Include recent activity Default: True.
|
|
141
|
-
|
|
142
|
-
Raises:
|
|
143
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
144
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
145
|
-
|
|
146
|
-
Returns:
|
|
147
|
-
Response[Union[HTTPValidationError, UserAnalyticsResponse]]
|
|
148
|
-
"""
|
|
149
|
-
|
|
150
|
-
kwargs = _get_kwargs(
|
|
151
|
-
include_api_stats=include_api_stats,
|
|
152
|
-
include_recent_activity=include_recent_activity,
|
|
153
|
-
)
|
|
154
|
-
|
|
155
|
-
response = await client.get_async_httpx_client().request(**kwargs)
|
|
156
|
-
|
|
157
|
-
return _build_response(client=client, response=response)
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
async def asyncio(
|
|
161
|
-
*,
|
|
162
|
-
client: AuthenticatedClient,
|
|
163
|
-
include_api_stats: Union[Unset, bool] = True,
|
|
164
|
-
include_recent_activity: Union[Unset, bool] = True,
|
|
165
|
-
) -> Optional[Union[HTTPValidationError, UserAnalyticsResponse]]:
|
|
166
|
-
"""Get Detailed User Analytics
|
|
167
|
-
|
|
168
|
-
Get comprehensive analytics for the current user including API usage and recent activity.
|
|
169
|
-
|
|
170
|
-
Args:
|
|
171
|
-
include_api_stats (Union[Unset, bool]): Include API usage statistics Default: True.
|
|
172
|
-
include_recent_activity (Union[Unset, bool]): Include recent activity Default: True.
|
|
173
|
-
|
|
174
|
-
Raises:
|
|
175
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
176
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
177
|
-
|
|
178
|
-
Returns:
|
|
179
|
-
Union[HTTPValidationError, UserAnalyticsResponse]
|
|
180
|
-
"""
|
|
181
|
-
|
|
182
|
-
return (
|
|
183
|
-
await asyncio_detailed(
|
|
184
|
-
client=client,
|
|
185
|
-
include_api_stats=include_api_stats,
|
|
186
|
-
include_recent_activity=include_recent_activity,
|
|
187
|
-
)
|
|
188
|
-
).parsed
|