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.
Files changed (74) hide show
  1. robosystems_client/api/{user_subscriptions/cancel_shared_repository_subscription.py → subscriptions/cancel_subscription.py} +41 -25
  2. robosystems_client/api/subscriptions/create_repository_subscription.py +217 -0
  3. robosystems_client/api/subscriptions/get_graph_subscription.py +197 -0
  4. robosystems_client/api/{user_subscriptions/upgrade_shared_repository_subscription.py → subscriptions/upgrade_subscription.py} +57 -55
  5. robosystems_client/api/usage/get_graph_usage_analytics.py +377 -0
  6. robosystems_client/api/{user_limits/get_user_usage.py → user/get_user_limits.py} +13 -9
  7. robosystems_client/models/__init__.py +18 -82
  8. robosystems_client/models/{credits_summary_response_credits_by_addon_type_0_item.py → create_repository_subscription_request.py} +22 -6
  9. robosystems_client/models/credit_summary.py +55 -89
  10. robosystems_client/models/{graph_usage_response_storage_usage.py → credit_summary_operation_breakdown.py} +6 -6
  11. robosystems_client/models/graph_subscription_response.py +200 -0
  12. robosystems_client/models/graph_usage_response.py +136 -39
  13. robosystems_client/models/{user_analytics_response_limits.py → graph_usage_response_recent_events_item.py} +6 -6
  14. robosystems_client/models/performance_insights.py +120 -0
  15. robosystems_client/models/{graph_usage_response_recent_activity.py → performance_insights_operation_stats.py} +6 -6
  16. robosystems_client/models/{user_analytics_response_api_usage.py → performance_insights_slow_queries_item.py} +6 -6
  17. robosystems_client/models/storage_summary.py +100 -0
  18. robosystems_client/models/{tier_upgrade_request.py → upgrade_subscription_request.py} +12 -14
  19. {robosystems_client-0.2.9.dist-info → robosystems_client-0.2.10.dist-info}/METADATA +1 -1
  20. {robosystems_client-0.2.9.dist-info → robosystems_client-0.2.10.dist-info}/RECORD +31 -68
  21. robosystems_client/api/graph_analytics/get_graph_usage_stats.py +0 -289
  22. robosystems_client/api/graph_billing/get_current_graph_bill.py +0 -253
  23. robosystems_client/api/graph_billing/get_graph_billing_history.py +0 -298
  24. robosystems_client/api/graph_billing/get_graph_monthly_bill.py +0 -284
  25. robosystems_client/api/graph_billing/get_graph_usage_details.py +0 -320
  26. robosystems_client/api/user/get_all_credit_summaries.py +0 -169
  27. robosystems_client/api/user_analytics/__init__.py +0 -1
  28. robosystems_client/api/user_analytics/get_detailed_user_analytics.py +0 -188
  29. robosystems_client/api/user_analytics/get_user_usage_overview.py +0 -135
  30. robosystems_client/api/user_limits/__init__.py +0 -1
  31. robosystems_client/api/user_limits/get_all_shared_repository_limits.py +0 -141
  32. robosystems_client/api/user_limits/get_shared_repository_limits.py +0 -213
  33. robosystems_client/api/user_limits/get_user_limits.py +0 -139
  34. robosystems_client/api/user_subscriptions/__init__.py +0 -1
  35. robosystems_client/api/user_subscriptions/get_repository_credits.py +0 -173
  36. robosystems_client/api/user_subscriptions/get_shared_repository_credits.py +0 -143
  37. robosystems_client/api/user_subscriptions/get_user_shared_subscriptions.py +0 -181
  38. robosystems_client/api/user_subscriptions/subscribe_to_shared_repository.py +0 -186
  39. robosystems_client/models/add_on_credit_info.py +0 -119
  40. robosystems_client/models/credits_summary_response.py +0 -148
  41. robosystems_client/models/get_all_credit_summaries_response_getallcreditsummaries.py +0 -44
  42. robosystems_client/models/get_all_shared_repository_limits_response_getallsharedrepositorylimits.py +0 -46
  43. robosystems_client/models/get_current_graph_bill_response_getcurrentgraphbill.py +0 -44
  44. robosystems_client/models/get_graph_billing_history_response_getgraphbillinghistory.py +0 -44
  45. robosystems_client/models/get_graph_monthly_bill_response_getgraphmonthlybill.py +0 -44
  46. robosystems_client/models/get_graph_usage_details_response_getgraphusagedetails.py +0 -44
  47. robosystems_client/models/get_shared_repository_limits_response_getsharedrepositorylimits.py +0 -44
  48. robosystems_client/models/graph_usage_response_query_statistics.py +0 -44
  49. robosystems_client/models/repository_credits_response.py +0 -128
  50. robosystems_client/models/repository_plan.py +0 -10
  51. robosystems_client/models/repository_type.py +0 -10
  52. robosystems_client/models/subscription_info.py +0 -152
  53. robosystems_client/models/subscription_info_metadata.py +0 -44
  54. robosystems_client/models/subscription_request.py +0 -80
  55. robosystems_client/models/subscription_response.py +0 -74
  56. robosystems_client/models/user_analytics_response.py +0 -132
  57. robosystems_client/models/user_analytics_response_graph_usage.py +0 -44
  58. robosystems_client/models/user_analytics_response_recent_activity_item.py +0 -44
  59. robosystems_client/models/user_analytics_response_user_info.py +0 -44
  60. robosystems_client/models/user_graph_summary.py +0 -134
  61. robosystems_client/models/user_subscriptions_response.py +0 -90
  62. robosystems_client/models/user_usage_summary_response.py +0 -130
  63. robosystems_client/models/user_usage_summary_response_usage_vs_limits.py +0 -44
  64. /robosystems_client/api/{graph_analytics → credits_}/__init__.py +0 -0
  65. /robosystems_client/api/{graph_credits → credits_}/check_credit_balance.py +0 -0
  66. /robosystems_client/api/{graph_credits → credits_}/check_storage_limits.py +0 -0
  67. /robosystems_client/api/{graph_credits → credits_}/get_credit_summary.py +0 -0
  68. /robosystems_client/api/{graph_credits → credits_}/get_storage_usage.py +0 -0
  69. /robosystems_client/api/{graph_credits → credits_}/list_credit_transactions.py +0 -0
  70. /robosystems_client/api/{graph_billing → subscriptions}/__init__.py +0 -0
  71. /robosystems_client/api/{graph_credits → usage}/__init__.py +0 -0
  72. /robosystems_client/api/{graph_analytics → usage}/get_graph_metrics.py +0 -0
  73. {robosystems_client-0.2.9.dist-info → robosystems_client-0.2.10.dist-info}/WHEEL +0 -0
  74. {robosystems_client-0.2.9.dist-info → robosystems_client-0.2.10.dist-info}/licenses/LICENSE +0 -0
@@ -5,21 +5,22 @@ import httpx
5
5
 
6
6
  from ... import errors
7
7
  from ...client import AuthenticatedClient, Client
8
+ from ...models.graph_subscription_response import GraphSubscriptionResponse
8
9
  from ...models.http_validation_error import HTTPValidationError
9
- from ...models.tier_upgrade_request import TierUpgradeRequest
10
+ from ...models.upgrade_subscription_request import UpgradeSubscriptionRequest
10
11
  from ...types import Response
11
12
 
12
13
 
13
14
  def _get_kwargs(
14
- subscription_id: str,
15
+ graph_id: str,
15
16
  *,
16
- body: TierUpgradeRequest,
17
+ body: UpgradeSubscriptionRequest,
17
18
  ) -> dict[str, Any]:
18
19
  headers: dict[str, Any] = {}
19
20
 
20
21
  _kwargs: dict[str, Any] = {
21
22
  "method": "put",
22
- "url": f"/v1/user/subscriptions/shared-repositories/{subscription_id}/upgrade",
23
+ "url": f"/v1/graphs/{graph_id}/subscriptions/upgrade",
23
24
  }
24
25
 
25
26
  _kwargs["json"] = body.to_dict()
@@ -32,18 +33,11 @@ def _get_kwargs(
32
33
 
33
34
  def _parse_response(
34
35
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
35
- ) -> Optional[Union[Any, HTTPValidationError]]:
36
+ ) -> Optional[Union[Any, GraphSubscriptionResponse, HTTPValidationError]]:
36
37
  if response.status_code == 200:
37
- response_200 = response.json()
38
- return response_200
39
-
40
- if response.status_code == 400:
41
- response_400 = cast(Any, None)
42
- return response_400
38
+ response_200 = GraphSubscriptionResponse.from_dict(response.json())
43
39
 
44
- if response.status_code == 401:
45
- response_401 = cast(Any, None)
46
- return response_401
40
+ return response_200
47
41
 
48
42
  if response.status_code == 404:
49
43
  response_404 = cast(Any, None)
@@ -54,10 +48,6 @@ def _parse_response(
54
48
 
55
49
  return response_422
56
50
 
57
- if response.status_code == 500:
58
- response_500 = cast(Any, None)
59
- return response_500
60
-
61
51
  if client.raise_on_unexpected_status:
62
52
  raise errors.UnexpectedStatus(response.status_code, response.content)
63
53
  else:
@@ -66,7 +56,7 @@ def _parse_response(
66
56
 
67
57
  def _build_response(
68
58
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
69
- ) -> Response[Union[Any, HTTPValidationError]]:
59
+ ) -> Response[Union[Any, GraphSubscriptionResponse, HTTPValidationError]]:
70
60
  return Response(
71
61
  status_code=HTTPStatus(response.status_code),
72
62
  content=response.content,
@@ -76,29 +66,32 @@ def _build_response(
76
66
 
77
67
 
78
68
  def sync_detailed(
79
- subscription_id: str,
69
+ graph_id: str,
80
70
  *,
81
71
  client: AuthenticatedClient,
82
- body: TierUpgradeRequest,
83
- ) -> Response[Union[Any, HTTPValidationError]]:
84
- """Upgrade Subscription Tier
72
+ body: UpgradeSubscriptionRequest,
73
+ ) -> Response[Union[Any, GraphSubscriptionResponse, HTTPValidationError]]:
74
+ """Upgrade Subscription
85
75
 
86
- Upgrade a subscription to a higher tier with immediate credit adjustment
76
+ Upgrade a subscription to a different plan.
77
+
78
+ Works for both user graphs and shared repositories.
79
+ The subscription will be immediately updated to the new plan and pricing.
87
80
 
88
81
  Args:
89
- subscription_id (str):
90
- body (TierUpgradeRequest): Request to upgrade subscription tier.
82
+ graph_id (str): Graph ID or repository name
83
+ body (UpgradeSubscriptionRequest): Request to upgrade a subscription.
91
84
 
92
85
  Raises:
93
86
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
94
87
  httpx.TimeoutException: If the request takes longer than Client.timeout.
95
88
 
96
89
  Returns:
97
- Response[Union[Any, HTTPValidationError]]
90
+ Response[Union[Any, GraphSubscriptionResponse, HTTPValidationError]]
98
91
  """
99
92
 
100
93
  kwargs = _get_kwargs(
101
- subscription_id=subscription_id,
94
+ graph_id=graph_id,
102
95
  body=body,
103
96
  )
104
97
 
@@ -110,58 +103,64 @@ def sync_detailed(
110
103
 
111
104
 
112
105
  def sync(
113
- subscription_id: str,
106
+ graph_id: str,
114
107
  *,
115
108
  client: AuthenticatedClient,
116
- body: TierUpgradeRequest,
117
- ) -> Optional[Union[Any, HTTPValidationError]]:
118
- """Upgrade Subscription Tier
109
+ body: UpgradeSubscriptionRequest,
110
+ ) -> Optional[Union[Any, GraphSubscriptionResponse, HTTPValidationError]]:
111
+ """Upgrade Subscription
112
+
113
+ Upgrade a subscription to a different plan.
119
114
 
120
- Upgrade a subscription to a higher tier with immediate credit adjustment
115
+ Works for both user graphs and shared repositories.
116
+ The subscription will be immediately updated to the new plan and pricing.
121
117
 
122
118
  Args:
123
- subscription_id (str):
124
- body (TierUpgradeRequest): Request to upgrade subscription tier.
119
+ graph_id (str): Graph ID or repository name
120
+ body (UpgradeSubscriptionRequest): Request to upgrade a subscription.
125
121
 
126
122
  Raises:
127
123
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
128
124
  httpx.TimeoutException: If the request takes longer than Client.timeout.
129
125
 
130
126
  Returns:
131
- Union[Any, HTTPValidationError]
127
+ Union[Any, GraphSubscriptionResponse, HTTPValidationError]
132
128
  """
133
129
 
134
130
  return sync_detailed(
135
- subscription_id=subscription_id,
131
+ graph_id=graph_id,
136
132
  client=client,
137
133
  body=body,
138
134
  ).parsed
139
135
 
140
136
 
141
137
  async def asyncio_detailed(
142
- subscription_id: str,
138
+ graph_id: str,
143
139
  *,
144
140
  client: AuthenticatedClient,
145
- body: TierUpgradeRequest,
146
- ) -> Response[Union[Any, HTTPValidationError]]:
147
- """Upgrade Subscription Tier
141
+ body: UpgradeSubscriptionRequest,
142
+ ) -> Response[Union[Any, GraphSubscriptionResponse, HTTPValidationError]]:
143
+ """Upgrade Subscription
148
144
 
149
- Upgrade a subscription to a higher tier with immediate credit adjustment
145
+ Upgrade a subscription to a different plan.
146
+
147
+ Works for both user graphs and shared repositories.
148
+ The subscription will be immediately updated to the new plan and pricing.
150
149
 
151
150
  Args:
152
- subscription_id (str):
153
- body (TierUpgradeRequest): Request to upgrade subscription tier.
151
+ graph_id (str): Graph ID or repository name
152
+ body (UpgradeSubscriptionRequest): Request to upgrade a subscription.
154
153
 
155
154
  Raises:
156
155
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
157
156
  httpx.TimeoutException: If the request takes longer than Client.timeout.
158
157
 
159
158
  Returns:
160
- Response[Union[Any, HTTPValidationError]]
159
+ Response[Union[Any, GraphSubscriptionResponse, HTTPValidationError]]
161
160
  """
162
161
 
163
162
  kwargs = _get_kwargs(
164
- subscription_id=subscription_id,
163
+ graph_id=graph_id,
165
164
  body=body,
166
165
  )
167
166
 
@@ -171,30 +170,33 @@ async def asyncio_detailed(
171
170
 
172
171
 
173
172
  async def asyncio(
174
- subscription_id: str,
173
+ graph_id: str,
175
174
  *,
176
175
  client: AuthenticatedClient,
177
- body: TierUpgradeRequest,
178
- ) -> Optional[Union[Any, HTTPValidationError]]:
179
- """Upgrade Subscription Tier
176
+ body: UpgradeSubscriptionRequest,
177
+ ) -> Optional[Union[Any, GraphSubscriptionResponse, HTTPValidationError]]:
178
+ """Upgrade Subscription
179
+
180
+ Upgrade a subscription to a different plan.
180
181
 
181
- Upgrade a subscription to a higher tier with immediate credit adjustment
182
+ Works for both user graphs and shared repositories.
183
+ The subscription will be immediately updated to the new plan and pricing.
182
184
 
183
185
  Args:
184
- subscription_id (str):
185
- body (TierUpgradeRequest): Request to upgrade subscription tier.
186
+ graph_id (str): Graph ID or repository name
187
+ body (UpgradeSubscriptionRequest): Request to upgrade a subscription.
186
188
 
187
189
  Raises:
188
190
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
189
191
  httpx.TimeoutException: If the request takes longer than Client.timeout.
190
192
 
191
193
  Returns:
192
- Union[Any, HTTPValidationError]
194
+ Union[Any, GraphSubscriptionResponse, HTTPValidationError]
193
195
  """
194
196
 
195
197
  return (
196
198
  await asyncio_detailed(
197
- subscription_id=subscription_id,
199
+ graph_id=graph_id,
198
200
  client=client,
199
201
  body=body,
200
202
  )
@@ -0,0 +1,377 @@
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.graph_usage_response import GraphUsageResponse
10
+ from ...models.http_validation_error import HTTPValidationError
11
+ from ...types import UNSET, Response, Unset
12
+
13
+
14
+ def _get_kwargs(
15
+ graph_id: str,
16
+ *,
17
+ time_range: Union[Unset, str] = "30d",
18
+ include_storage: Union[Unset, bool] = True,
19
+ include_credits: Union[Unset, bool] = True,
20
+ include_performance: Union[Unset, bool] = False,
21
+ include_events: Union[Unset, bool] = False,
22
+ ) -> dict[str, Any]:
23
+ params: dict[str, Any] = {}
24
+
25
+ params["time_range"] = time_range
26
+
27
+ params["include_storage"] = include_storage
28
+
29
+ params["include_credits"] = include_credits
30
+
31
+ params["include_performance"] = include_performance
32
+
33
+ params["include_events"] = include_events
34
+
35
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
36
+
37
+ _kwargs: dict[str, Any] = {
38
+ "method": "get",
39
+ "url": f"/v1/graphs/{graph_id}/analytics/usage",
40
+ "params": params,
41
+ }
42
+
43
+ return _kwargs
44
+
45
+
46
+ def _parse_response(
47
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
48
+ ) -> Optional[Union[ErrorResponse, GraphUsageResponse, HTTPValidationError]]:
49
+ if response.status_code == 200:
50
+ response_200 = GraphUsageResponse.from_dict(response.json())
51
+
52
+ return response_200
53
+
54
+ if response.status_code == 403:
55
+ response_403 = ErrorResponse.from_dict(response.json())
56
+
57
+ return response_403
58
+
59
+ if response.status_code == 422:
60
+ response_422 = HTTPValidationError.from_dict(response.json())
61
+
62
+ return response_422
63
+
64
+ if response.status_code == 500:
65
+ response_500 = ErrorResponse.from_dict(response.json())
66
+
67
+ return response_500
68
+
69
+ if client.raise_on_unexpected_status:
70
+ raise errors.UnexpectedStatus(response.status_code, response.content)
71
+ else:
72
+ return None
73
+
74
+
75
+ def _build_response(
76
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
77
+ ) -> Response[Union[ErrorResponse, GraphUsageResponse, HTTPValidationError]]:
78
+ return Response(
79
+ status_code=HTTPStatus(response.status_code),
80
+ content=response.content,
81
+ headers=response.headers,
82
+ parsed=_parse_response(client=client, response=response),
83
+ )
84
+
85
+
86
+ def sync_detailed(
87
+ graph_id: str,
88
+ *,
89
+ client: AuthenticatedClient,
90
+ time_range: Union[Unset, str] = "30d",
91
+ include_storage: Union[Unset, bool] = True,
92
+ include_credits: Union[Unset, bool] = True,
93
+ include_performance: Union[Unset, bool] = False,
94
+ include_events: Union[Unset, bool] = False,
95
+ ) -> Response[Union[ErrorResponse, GraphUsageResponse, HTTPValidationError]]:
96
+ """Get Graph Usage Analytics
97
+
98
+ Get comprehensive usage analytics tracked by the GraphUsageTracking model.
99
+
100
+ Provides temporal usage patterns including:
101
+ - **Storage Analytics**: GB-hours for billing, breakdown by type (files, tables, graphs, subgraphs)
102
+ - **Credit Analytics**: Consumption patterns, operation breakdown, cached vs billable
103
+ - **Performance Insights**: Operation stats, slow queries, performance scoring
104
+ - **Recent Events**: Latest usage events with full details
105
+
106
+ Time ranges available:
107
+ - `24h` - Last 24 hours (hourly breakdown)
108
+ - `7d` - Last 7 days (daily breakdown)
109
+ - `30d` - Last 30 days (daily breakdown)
110
+ - `current_month` - Current billing month
111
+ - `last_month` - Previous billing month
112
+
113
+ Include options:
114
+ - `storage` - Storage usage summary (GB-hours, averages, peaks)
115
+ - `credits` - Credit consumption analytics
116
+ - `performance` - Performance insights and optimization opportunities
117
+ - `events` - Recent usage events (last 50)
118
+
119
+ Useful for:
120
+ - Billing and cost analysis
121
+ - Capacity planning
122
+ - Performance optimization
123
+ - Usage trend analysis
124
+
125
+ Note:
126
+ This operation is included - no credit consumption required.
127
+
128
+ Args:
129
+ graph_id (str):
130
+ time_range (Union[Unset, str]): Time range: 24h, 7d, 30d, current_month, last_month
131
+ Default: '30d'.
132
+ include_storage (Union[Unset, bool]): Include storage usage summary Default: True.
133
+ include_credits (Union[Unset, bool]): Include credit consumption summary Default: True.
134
+ include_performance (Union[Unset, bool]): Include performance insights (may be slower)
135
+ Default: False.
136
+ include_events (Union[Unset, bool]): Include recent usage events Default: False.
137
+
138
+ Raises:
139
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
140
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
141
+
142
+ Returns:
143
+ Response[Union[ErrorResponse, GraphUsageResponse, HTTPValidationError]]
144
+ """
145
+
146
+ kwargs = _get_kwargs(
147
+ graph_id=graph_id,
148
+ time_range=time_range,
149
+ include_storage=include_storage,
150
+ include_credits=include_credits,
151
+ include_performance=include_performance,
152
+ include_events=include_events,
153
+ )
154
+
155
+ response = client.get_httpx_client().request(
156
+ **kwargs,
157
+ )
158
+
159
+ return _build_response(client=client, response=response)
160
+
161
+
162
+ def sync(
163
+ graph_id: str,
164
+ *,
165
+ client: AuthenticatedClient,
166
+ time_range: Union[Unset, str] = "30d",
167
+ include_storage: Union[Unset, bool] = True,
168
+ include_credits: Union[Unset, bool] = True,
169
+ include_performance: Union[Unset, bool] = False,
170
+ include_events: Union[Unset, bool] = False,
171
+ ) -> Optional[Union[ErrorResponse, GraphUsageResponse, HTTPValidationError]]:
172
+ """Get Graph Usage Analytics
173
+
174
+ Get comprehensive usage analytics tracked by the GraphUsageTracking model.
175
+
176
+ Provides temporal usage patterns including:
177
+ - **Storage Analytics**: GB-hours for billing, breakdown by type (files, tables, graphs, subgraphs)
178
+ - **Credit Analytics**: Consumption patterns, operation breakdown, cached vs billable
179
+ - **Performance Insights**: Operation stats, slow queries, performance scoring
180
+ - **Recent Events**: Latest usage events with full details
181
+
182
+ Time ranges available:
183
+ - `24h` - Last 24 hours (hourly breakdown)
184
+ - `7d` - Last 7 days (daily breakdown)
185
+ - `30d` - Last 30 days (daily breakdown)
186
+ - `current_month` - Current billing month
187
+ - `last_month` - Previous billing month
188
+
189
+ Include options:
190
+ - `storage` - Storage usage summary (GB-hours, averages, peaks)
191
+ - `credits` - Credit consumption analytics
192
+ - `performance` - Performance insights and optimization opportunities
193
+ - `events` - Recent usage events (last 50)
194
+
195
+ Useful for:
196
+ - Billing and cost analysis
197
+ - Capacity planning
198
+ - Performance optimization
199
+ - Usage trend analysis
200
+
201
+ Note:
202
+ This operation is included - no credit consumption required.
203
+
204
+ Args:
205
+ graph_id (str):
206
+ time_range (Union[Unset, str]): Time range: 24h, 7d, 30d, current_month, last_month
207
+ Default: '30d'.
208
+ include_storage (Union[Unset, bool]): Include storage usage summary Default: True.
209
+ include_credits (Union[Unset, bool]): Include credit consumption summary Default: True.
210
+ include_performance (Union[Unset, bool]): Include performance insights (may be slower)
211
+ Default: False.
212
+ include_events (Union[Unset, bool]): Include recent usage events Default: False.
213
+
214
+ Raises:
215
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
216
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
217
+
218
+ Returns:
219
+ Union[ErrorResponse, GraphUsageResponse, HTTPValidationError]
220
+ """
221
+
222
+ return sync_detailed(
223
+ graph_id=graph_id,
224
+ client=client,
225
+ time_range=time_range,
226
+ include_storage=include_storage,
227
+ include_credits=include_credits,
228
+ include_performance=include_performance,
229
+ include_events=include_events,
230
+ ).parsed
231
+
232
+
233
+ async def asyncio_detailed(
234
+ graph_id: str,
235
+ *,
236
+ client: AuthenticatedClient,
237
+ time_range: Union[Unset, str] = "30d",
238
+ include_storage: Union[Unset, bool] = True,
239
+ include_credits: Union[Unset, bool] = True,
240
+ include_performance: Union[Unset, bool] = False,
241
+ include_events: Union[Unset, bool] = False,
242
+ ) -> Response[Union[ErrorResponse, GraphUsageResponse, HTTPValidationError]]:
243
+ """Get Graph Usage Analytics
244
+
245
+ Get comprehensive usage analytics tracked by the GraphUsageTracking model.
246
+
247
+ Provides temporal usage patterns including:
248
+ - **Storage Analytics**: GB-hours for billing, breakdown by type (files, tables, graphs, subgraphs)
249
+ - **Credit Analytics**: Consumption patterns, operation breakdown, cached vs billable
250
+ - **Performance Insights**: Operation stats, slow queries, performance scoring
251
+ - **Recent Events**: Latest usage events with full details
252
+
253
+ Time ranges available:
254
+ - `24h` - Last 24 hours (hourly breakdown)
255
+ - `7d` - Last 7 days (daily breakdown)
256
+ - `30d` - Last 30 days (daily breakdown)
257
+ - `current_month` - Current billing month
258
+ - `last_month` - Previous billing month
259
+
260
+ Include options:
261
+ - `storage` - Storage usage summary (GB-hours, averages, peaks)
262
+ - `credits` - Credit consumption analytics
263
+ - `performance` - Performance insights and optimization opportunities
264
+ - `events` - Recent usage events (last 50)
265
+
266
+ Useful for:
267
+ - Billing and cost analysis
268
+ - Capacity planning
269
+ - Performance optimization
270
+ - Usage trend analysis
271
+
272
+ Note:
273
+ This operation is included - no credit consumption required.
274
+
275
+ Args:
276
+ graph_id (str):
277
+ time_range (Union[Unset, str]): Time range: 24h, 7d, 30d, current_month, last_month
278
+ Default: '30d'.
279
+ include_storage (Union[Unset, bool]): Include storage usage summary Default: True.
280
+ include_credits (Union[Unset, bool]): Include credit consumption summary Default: True.
281
+ include_performance (Union[Unset, bool]): Include performance insights (may be slower)
282
+ Default: False.
283
+ include_events (Union[Unset, bool]): Include recent usage events Default: False.
284
+
285
+ Raises:
286
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
287
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
288
+
289
+ Returns:
290
+ Response[Union[ErrorResponse, GraphUsageResponse, HTTPValidationError]]
291
+ """
292
+
293
+ kwargs = _get_kwargs(
294
+ graph_id=graph_id,
295
+ time_range=time_range,
296
+ include_storage=include_storage,
297
+ include_credits=include_credits,
298
+ include_performance=include_performance,
299
+ include_events=include_events,
300
+ )
301
+
302
+ response = await client.get_async_httpx_client().request(**kwargs)
303
+
304
+ return _build_response(client=client, response=response)
305
+
306
+
307
+ async def asyncio(
308
+ graph_id: str,
309
+ *,
310
+ client: AuthenticatedClient,
311
+ time_range: Union[Unset, str] = "30d",
312
+ include_storage: Union[Unset, bool] = True,
313
+ include_credits: Union[Unset, bool] = True,
314
+ include_performance: Union[Unset, bool] = False,
315
+ include_events: Union[Unset, bool] = False,
316
+ ) -> Optional[Union[ErrorResponse, GraphUsageResponse, HTTPValidationError]]:
317
+ """Get Graph Usage Analytics
318
+
319
+ Get comprehensive usage analytics tracked by the GraphUsageTracking model.
320
+
321
+ Provides temporal usage patterns including:
322
+ - **Storage Analytics**: GB-hours for billing, breakdown by type (files, tables, graphs, subgraphs)
323
+ - **Credit Analytics**: Consumption patterns, operation breakdown, cached vs billable
324
+ - **Performance Insights**: Operation stats, slow queries, performance scoring
325
+ - **Recent Events**: Latest usage events with full details
326
+
327
+ Time ranges available:
328
+ - `24h` - Last 24 hours (hourly breakdown)
329
+ - `7d` - Last 7 days (daily breakdown)
330
+ - `30d` - Last 30 days (daily breakdown)
331
+ - `current_month` - Current billing month
332
+ - `last_month` - Previous billing month
333
+
334
+ Include options:
335
+ - `storage` - Storage usage summary (GB-hours, averages, peaks)
336
+ - `credits` - Credit consumption analytics
337
+ - `performance` - Performance insights and optimization opportunities
338
+ - `events` - Recent usage events (last 50)
339
+
340
+ Useful for:
341
+ - Billing and cost analysis
342
+ - Capacity planning
343
+ - Performance optimization
344
+ - Usage trend analysis
345
+
346
+ Note:
347
+ This operation is included - no credit consumption required.
348
+
349
+ Args:
350
+ graph_id (str):
351
+ time_range (Union[Unset, str]): Time range: 24h, 7d, 30d, current_month, last_month
352
+ Default: '30d'.
353
+ include_storage (Union[Unset, bool]): Include storage usage summary Default: True.
354
+ include_credits (Union[Unset, bool]): Include credit consumption summary Default: True.
355
+ include_performance (Union[Unset, bool]): Include performance insights (may be slower)
356
+ Default: False.
357
+ include_events (Union[Unset, bool]): Include recent usage events Default: False.
358
+
359
+ Raises:
360
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
361
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
362
+
363
+ Returns:
364
+ Union[ErrorResponse, GraphUsageResponse, HTTPValidationError]
365
+ """
366
+
367
+ return (
368
+ await asyncio_detailed(
369
+ graph_id=graph_id,
370
+ client=client,
371
+ time_range=time_range,
372
+ include_storage=include_storage,
373
+ include_credits=include_credits,
374
+ include_performance=include_performance,
375
+ include_events=include_events,
376
+ )
377
+ ).parsed
@@ -12,7 +12,7 @@ from ...types import Response
12
12
  def _get_kwargs() -> dict[str, Any]:
13
13
  _kwargs: dict[str, Any] = {
14
14
  "method": "get",
15
- "url": "/v1/user/limits/usage",
15
+ "url": "/v1/user/limits",
16
16
  }
17
17
 
18
18
  return _kwargs
@@ -47,9 +47,10 @@ def sync_detailed(
47
47
  *,
48
48
  client: AuthenticatedClient,
49
49
  ) -> Response[UserUsageResponse]:
50
- """Get user usage statistics
50
+ """Get user limits and usage
51
51
 
52
- Retrieve current usage statistics and remaining limits for the authenticated user
52
+ Retrieve current limits and usage statistics for the authenticated user (simple safety valve for
53
+ graph creation)
53
54
 
54
55
  Raises:
55
56
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -72,9 +73,10 @@ def sync(
72
73
  *,
73
74
  client: AuthenticatedClient,
74
75
  ) -> Optional[UserUsageResponse]:
75
- """Get user usage statistics
76
+ """Get user limits and usage
76
77
 
77
- Retrieve current usage statistics and remaining limits for the authenticated user
78
+ Retrieve current limits and usage statistics for the authenticated user (simple safety valve for
79
+ graph creation)
78
80
 
79
81
  Raises:
80
82
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -93,9 +95,10 @@ async def asyncio_detailed(
93
95
  *,
94
96
  client: AuthenticatedClient,
95
97
  ) -> Response[UserUsageResponse]:
96
- """Get user usage statistics
98
+ """Get user limits and usage
97
99
 
98
- Retrieve current usage statistics and remaining limits for the authenticated user
100
+ Retrieve current limits and usage statistics for the authenticated user (simple safety valve for
101
+ graph creation)
99
102
 
100
103
  Raises:
101
104
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -116,9 +119,10 @@ async def asyncio(
116
119
  *,
117
120
  client: AuthenticatedClient,
118
121
  ) -> Optional[UserUsageResponse]:
119
- """Get user usage statistics
122
+ """Get user limits and usage
120
123
 
121
- Retrieve current usage statistics and remaining limits for the authenticated user
124
+ Retrieve current limits and usage statistics for the authenticated user (simple safety valve for
125
+ graph creation)
122
126
 
123
127
  Raises:
124
128
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.