robosystems-client 0.2.12__py3-none-any.whl → 0.2.14__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of robosystems-client might be problematic. Click here for more details.
- robosystems_client/api/agent/auto_select_agent.py +81 -9
- robosystems_client/api/agent/execute_specific_agent.py +73 -5
- robosystems_client/api/agent/get_agent_metadata.py +1 -1
- robosystems_client/api/agent/list_agents.py +1 -1
- robosystems_client/api/billing/{update_org_payment_method.py → create_portal_session.py} +57 -47
- robosystems_client/api/credits_/list_credit_transactions.py +4 -4
- robosystems_client/api/subgraphs/create_subgraph.py +4 -4
- robosystems_client/api/subgraphs/delete_subgraph.py +8 -8
- robosystems_client/extensions/__init__.py +25 -0
- robosystems_client/extensions/agent_client.py +526 -0
- robosystems_client/extensions/extensions.py +3 -0
- robosystems_client/models/__init__.py +2 -6
- robosystems_client/models/checkout_status_response.py +2 -1
- robosystems_client/models/create_checkout_request.py +2 -1
- robosystems_client/models/create_checkout_request_resource_config.py +4 -1
- robosystems_client/models/create_subgraph_request.py +5 -26
- robosystems_client/models/graph_subscription_response.py +21 -0
- robosystems_client/models/list_subgraphs_response.py +9 -0
- robosystems_client/models/{update_payment_method_request.py → portal_session_response.py} +12 -12
- {robosystems_client-0.2.12.dist-info → robosystems_client-0.2.14.dist-info}/METADATA +1 -1
- {robosystems_client-0.2.12.dist-info → robosystems_client-0.2.14.dist-info}/RECORD +23 -25
- robosystems_client/api/subscriptions/cancel_subscription.py +0 -193
- robosystems_client/models/cancellation_response.py +0 -76
- robosystems_client/models/update_payment_method_response.py +0 -74
- {robosystems_client-0.2.12.dist-info → robosystems_client-0.2.14.dist-info}/WHEEL +0 -0
- {robosystems_client-0.2.12.dist-info → robosystems_client-0.2.14.dist-info}/licenses/LICENSE +0 -0
|
@@ -6,36 +6,26 @@ import httpx
|
|
|
6
6
|
from ... import errors
|
|
7
7
|
from ...client import AuthenticatedClient, Client
|
|
8
8
|
from ...models.http_validation_error import HTTPValidationError
|
|
9
|
-
from ...models.
|
|
10
|
-
from ...models.update_payment_method_response import UpdatePaymentMethodResponse
|
|
9
|
+
from ...models.portal_session_response import PortalSessionResponse
|
|
11
10
|
from ...types import Response
|
|
12
11
|
|
|
13
12
|
|
|
14
13
|
def _get_kwargs(
|
|
15
14
|
org_id: str,
|
|
16
|
-
*,
|
|
17
|
-
body: UpdatePaymentMethodRequest,
|
|
18
15
|
) -> dict[str, Any]:
|
|
19
|
-
headers: dict[str, Any] = {}
|
|
20
|
-
|
|
21
16
|
_kwargs: dict[str, Any] = {
|
|
22
17
|
"method": "post",
|
|
23
|
-
"url": f"/v1/billing/customer/{org_id}/
|
|
18
|
+
"url": f"/v1/billing/customer/{org_id}/portal",
|
|
24
19
|
}
|
|
25
20
|
|
|
26
|
-
_kwargs["json"] = body.to_dict()
|
|
27
|
-
|
|
28
|
-
headers["Content-Type"] = "application/json"
|
|
29
|
-
|
|
30
|
-
_kwargs["headers"] = headers
|
|
31
21
|
return _kwargs
|
|
32
22
|
|
|
33
23
|
|
|
34
24
|
def _parse_response(
|
|
35
25
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
36
|
-
) -> Optional[Union[HTTPValidationError,
|
|
26
|
+
) -> Optional[Union[HTTPValidationError, PortalSessionResponse]]:
|
|
37
27
|
if response.status_code == 200:
|
|
38
|
-
response_200 =
|
|
28
|
+
response_200 = PortalSessionResponse.from_dict(response.json())
|
|
39
29
|
|
|
40
30
|
return response_200
|
|
41
31
|
|
|
@@ -52,7 +42,7 @@ def _parse_response(
|
|
|
52
42
|
|
|
53
43
|
def _build_response(
|
|
54
44
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
55
|
-
) -> Response[Union[HTTPValidationError,
|
|
45
|
+
) -> Response[Union[HTTPValidationError, PortalSessionResponse]]:
|
|
56
46
|
return Response(
|
|
57
47
|
status_code=HTTPStatus(response.status_code),
|
|
58
48
|
content=response.content,
|
|
@@ -65,32 +55,37 @@ def sync_detailed(
|
|
|
65
55
|
org_id: str,
|
|
66
56
|
*,
|
|
67
57
|
client: AuthenticatedClient,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
"""Update Organization Default Payment Method
|
|
58
|
+
) -> Response[Union[HTTPValidationError, PortalSessionResponse]]:
|
|
59
|
+
"""Create Customer Portal Session
|
|
71
60
|
|
|
72
|
-
|
|
61
|
+
Create a Stripe Customer Portal session for managing payment methods.
|
|
73
62
|
|
|
74
|
-
|
|
63
|
+
The portal allows users to:
|
|
64
|
+
- Add new payment methods
|
|
65
|
+
- Remove existing payment methods
|
|
66
|
+
- Update default payment method
|
|
67
|
+
- View billing history
|
|
68
|
+
|
|
69
|
+
The user will be redirected to Stripe's hosted portal page and returned to the billing page when
|
|
70
|
+
done.
|
|
75
71
|
|
|
76
72
|
**Requirements:**
|
|
77
73
|
- User must be an OWNER of the organization
|
|
74
|
+
- Organization must have a Stripe customer ID (i.e., has gone through checkout at least once)
|
|
78
75
|
|
|
79
76
|
Args:
|
|
80
77
|
org_id (str):
|
|
81
|
-
body (UpdatePaymentMethodRequest): Request to update default payment method.
|
|
82
78
|
|
|
83
79
|
Raises:
|
|
84
80
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
85
81
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
86
82
|
|
|
87
83
|
Returns:
|
|
88
|
-
Response[Union[HTTPValidationError,
|
|
84
|
+
Response[Union[HTTPValidationError, PortalSessionResponse]]
|
|
89
85
|
"""
|
|
90
86
|
|
|
91
87
|
kwargs = _get_kwargs(
|
|
92
88
|
org_id=org_id,
|
|
93
|
-
body=body,
|
|
94
89
|
)
|
|
95
90
|
|
|
96
91
|
response = client.get_httpx_client().request(
|
|
@@ -104,33 +99,38 @@ def sync(
|
|
|
104
99
|
org_id: str,
|
|
105
100
|
*,
|
|
106
101
|
client: AuthenticatedClient,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
102
|
+
) -> Optional[Union[HTTPValidationError, PortalSessionResponse]]:
|
|
103
|
+
"""Create Customer Portal Session
|
|
104
|
+
|
|
105
|
+
Create a Stripe Customer Portal session for managing payment methods.
|
|
110
106
|
|
|
111
|
-
|
|
107
|
+
The portal allows users to:
|
|
108
|
+
- Add new payment methods
|
|
109
|
+
- Remove existing payment methods
|
|
110
|
+
- Update default payment method
|
|
111
|
+
- View billing history
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
The user will be redirected to Stripe's hosted portal page and returned to the billing page when
|
|
114
|
+
done.
|
|
114
115
|
|
|
115
116
|
**Requirements:**
|
|
116
117
|
- User must be an OWNER of the organization
|
|
118
|
+
- Organization must have a Stripe customer ID (i.e., has gone through checkout at least once)
|
|
117
119
|
|
|
118
120
|
Args:
|
|
119
121
|
org_id (str):
|
|
120
|
-
body (UpdatePaymentMethodRequest): Request to update default payment method.
|
|
121
122
|
|
|
122
123
|
Raises:
|
|
123
124
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
124
125
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
125
126
|
|
|
126
127
|
Returns:
|
|
127
|
-
Union[HTTPValidationError,
|
|
128
|
+
Union[HTTPValidationError, PortalSessionResponse]
|
|
128
129
|
"""
|
|
129
130
|
|
|
130
131
|
return sync_detailed(
|
|
131
132
|
org_id=org_id,
|
|
132
133
|
client=client,
|
|
133
|
-
body=body,
|
|
134
134
|
).parsed
|
|
135
135
|
|
|
136
136
|
|
|
@@ -138,32 +138,37 @@ async def asyncio_detailed(
|
|
|
138
138
|
org_id: str,
|
|
139
139
|
*,
|
|
140
140
|
client: AuthenticatedClient,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
"""Update Organization Default Payment Method
|
|
141
|
+
) -> Response[Union[HTTPValidationError, PortalSessionResponse]]:
|
|
142
|
+
"""Create Customer Portal Session
|
|
144
143
|
|
|
145
|
-
|
|
144
|
+
Create a Stripe Customer Portal session for managing payment methods.
|
|
146
145
|
|
|
147
|
-
|
|
146
|
+
The portal allows users to:
|
|
147
|
+
- Add new payment methods
|
|
148
|
+
- Remove existing payment methods
|
|
149
|
+
- Update default payment method
|
|
150
|
+
- View billing history
|
|
151
|
+
|
|
152
|
+
The user will be redirected to Stripe's hosted portal page and returned to the billing page when
|
|
153
|
+
done.
|
|
148
154
|
|
|
149
155
|
**Requirements:**
|
|
150
156
|
- User must be an OWNER of the organization
|
|
157
|
+
- Organization must have a Stripe customer ID (i.e., has gone through checkout at least once)
|
|
151
158
|
|
|
152
159
|
Args:
|
|
153
160
|
org_id (str):
|
|
154
|
-
body (UpdatePaymentMethodRequest): Request to update default payment method.
|
|
155
161
|
|
|
156
162
|
Raises:
|
|
157
163
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
158
164
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
159
165
|
|
|
160
166
|
Returns:
|
|
161
|
-
Response[Union[HTTPValidationError,
|
|
167
|
+
Response[Union[HTTPValidationError, PortalSessionResponse]]
|
|
162
168
|
"""
|
|
163
169
|
|
|
164
170
|
kwargs = _get_kwargs(
|
|
165
171
|
org_id=org_id,
|
|
166
|
-
body=body,
|
|
167
172
|
)
|
|
168
173
|
|
|
169
174
|
response = await client.get_async_httpx_client().request(**kwargs)
|
|
@@ -175,33 +180,38 @@ async def asyncio(
|
|
|
175
180
|
org_id: str,
|
|
176
181
|
*,
|
|
177
182
|
client: AuthenticatedClient,
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
183
|
+
) -> Optional[Union[HTTPValidationError, PortalSessionResponse]]:
|
|
184
|
+
"""Create Customer Portal Session
|
|
185
|
+
|
|
186
|
+
Create a Stripe Customer Portal session for managing payment methods.
|
|
181
187
|
|
|
182
|
-
|
|
188
|
+
The portal allows users to:
|
|
189
|
+
- Add new payment methods
|
|
190
|
+
- Remove existing payment methods
|
|
191
|
+
- Update default payment method
|
|
192
|
+
- View billing history
|
|
183
193
|
|
|
184
|
-
|
|
194
|
+
The user will be redirected to Stripe's hosted portal page and returned to the billing page when
|
|
195
|
+
done.
|
|
185
196
|
|
|
186
197
|
**Requirements:**
|
|
187
198
|
- User must be an OWNER of the organization
|
|
199
|
+
- Organization must have a Stripe customer ID (i.e., has gone through checkout at least once)
|
|
188
200
|
|
|
189
201
|
Args:
|
|
190
202
|
org_id (str):
|
|
191
|
-
body (UpdatePaymentMethodRequest): Request to update default payment method.
|
|
192
203
|
|
|
193
204
|
Raises:
|
|
194
205
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
195
206
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
196
207
|
|
|
197
208
|
Returns:
|
|
198
|
-
Union[HTTPValidationError,
|
|
209
|
+
Union[HTTPValidationError, PortalSessionResponse]
|
|
199
210
|
"""
|
|
200
211
|
|
|
201
212
|
return (
|
|
202
213
|
await asyncio_detailed(
|
|
203
214
|
org_id=org_id,
|
|
204
215
|
client=client,
|
|
205
|
-
body=body,
|
|
206
216
|
)
|
|
207
217
|
).parsed
|
|
@@ -141,7 +141,7 @@ def sync_detailed(
|
|
|
141
141
|
No credits are consumed for viewing transaction history.
|
|
142
142
|
|
|
143
143
|
Args:
|
|
144
|
-
graph_id (str):
|
|
144
|
+
graph_id (str): Graph database identifier
|
|
145
145
|
transaction_type (Union[None, Unset, str]): Filter by transaction type (allocation,
|
|
146
146
|
consumption, bonus, refund)
|
|
147
147
|
operation_type (Union[None, Unset, str]): Filter by operation type (e.g., entity_lookup,
|
|
@@ -206,7 +206,7 @@ def sync(
|
|
|
206
206
|
No credits are consumed for viewing transaction history.
|
|
207
207
|
|
|
208
208
|
Args:
|
|
209
|
-
graph_id (str):
|
|
209
|
+
graph_id (str): Graph database identifier
|
|
210
210
|
transaction_type (Union[None, Unset, str]): Filter by transaction type (allocation,
|
|
211
211
|
consumption, bonus, refund)
|
|
212
212
|
operation_type (Union[None, Unset, str]): Filter by operation type (e.g., entity_lookup,
|
|
@@ -266,7 +266,7 @@ async def asyncio_detailed(
|
|
|
266
266
|
No credits are consumed for viewing transaction history.
|
|
267
267
|
|
|
268
268
|
Args:
|
|
269
|
-
graph_id (str):
|
|
269
|
+
graph_id (str): Graph database identifier
|
|
270
270
|
transaction_type (Union[None, Unset, str]): Filter by transaction type (allocation,
|
|
271
271
|
consumption, bonus, refund)
|
|
272
272
|
operation_type (Union[None, Unset, str]): Filter by operation type (e.g., entity_lookup,
|
|
@@ -329,7 +329,7 @@ async def asyncio(
|
|
|
329
329
|
No credits are consumed for viewing transaction history.
|
|
330
330
|
|
|
331
331
|
Args:
|
|
332
|
-
graph_id (str):
|
|
332
|
+
graph_id (str): Graph database identifier
|
|
333
333
|
transaction_type (Union[None, Unset, str]): Filter by transaction type (allocation,
|
|
334
334
|
consumption, bonus, refund)
|
|
335
335
|
operation_type (Union[None, Unset, str]): Filter by operation type (e.g., entity_lookup,
|
|
@@ -75,7 +75,7 @@ def sync_detailed(
|
|
|
75
75
|
- Valid authentication
|
|
76
76
|
- Parent graph must exist and be accessible to the user
|
|
77
77
|
- User must have 'admin' permission on the parent graph
|
|
78
|
-
- Parent graph tier must support subgraphs (
|
|
78
|
+
- Parent graph tier must support subgraphs (Kuzu Large/XLarge or Neo4j Enterprise XLarge)
|
|
79
79
|
- Must be within subgraph quota limits
|
|
80
80
|
- Subgraph name must be unique within the parent graph
|
|
81
81
|
|
|
@@ -120,7 +120,7 @@ def sync(
|
|
|
120
120
|
- Valid authentication
|
|
121
121
|
- Parent graph must exist and be accessible to the user
|
|
122
122
|
- User must have 'admin' permission on the parent graph
|
|
123
|
-
- Parent graph tier must support subgraphs (
|
|
123
|
+
- Parent graph tier must support subgraphs (Kuzu Large/XLarge or Neo4j Enterprise XLarge)
|
|
124
124
|
- Must be within subgraph quota limits
|
|
125
125
|
- Subgraph name must be unique within the parent graph
|
|
126
126
|
|
|
@@ -160,7 +160,7 @@ async def asyncio_detailed(
|
|
|
160
160
|
- Valid authentication
|
|
161
161
|
- Parent graph must exist and be accessible to the user
|
|
162
162
|
- User must have 'admin' permission on the parent graph
|
|
163
|
-
- Parent graph tier must support subgraphs (
|
|
163
|
+
- Parent graph tier must support subgraphs (Kuzu Large/XLarge or Neo4j Enterprise XLarge)
|
|
164
164
|
- Must be within subgraph quota limits
|
|
165
165
|
- Subgraph name must be unique within the parent graph
|
|
166
166
|
|
|
@@ -203,7 +203,7 @@ async def asyncio(
|
|
|
203
203
|
- Valid authentication
|
|
204
204
|
- Parent graph must exist and be accessible to the user
|
|
205
205
|
- User must have 'admin' permission on the parent graph
|
|
206
|
-
- Parent graph tier must support subgraphs (
|
|
206
|
+
- Parent graph tier must support subgraphs (Kuzu Large/XLarge or Neo4j Enterprise XLarge)
|
|
207
207
|
- Must be within subgraph quota limits
|
|
208
208
|
- Subgraph name must be unique within the parent graph
|
|
209
209
|
|
|
@@ -111,8 +111,8 @@ def sync_detailed(
|
|
|
111
111
|
All data in the subgraph will be lost.
|
|
112
112
|
|
|
113
113
|
**Backup Location:**
|
|
114
|
-
If backup requested, stored in S3 at:
|
|
115
|
-
`s3://
|
|
114
|
+
If backup requested, stored in S3 Kuzu database bucket at:
|
|
115
|
+
`s3://{kuzu_s3_bucket}/{instance_id}/{database_name}_{timestamp}.backup`
|
|
116
116
|
|
|
117
117
|
Args:
|
|
118
118
|
graph_id (str):
|
|
@@ -165,8 +165,8 @@ def sync(
|
|
|
165
165
|
All data in the subgraph will be lost.
|
|
166
166
|
|
|
167
167
|
**Backup Location:**
|
|
168
|
-
If backup requested, stored in S3 at:
|
|
169
|
-
`s3://
|
|
168
|
+
If backup requested, stored in S3 Kuzu database bucket at:
|
|
169
|
+
`s3://{kuzu_s3_bucket}/{instance_id}/{database_name}_{timestamp}.backup`
|
|
170
170
|
|
|
171
171
|
Args:
|
|
172
172
|
graph_id (str):
|
|
@@ -214,8 +214,8 @@ async def asyncio_detailed(
|
|
|
214
214
|
All data in the subgraph will be lost.
|
|
215
215
|
|
|
216
216
|
**Backup Location:**
|
|
217
|
-
If backup requested, stored in S3 at:
|
|
218
|
-
`s3://
|
|
217
|
+
If backup requested, stored in S3 Kuzu database bucket at:
|
|
218
|
+
`s3://{kuzu_s3_bucket}/{instance_id}/{database_name}_{timestamp}.backup`
|
|
219
219
|
|
|
220
220
|
Args:
|
|
221
221
|
graph_id (str):
|
|
@@ -266,8 +266,8 @@ async def asyncio(
|
|
|
266
266
|
All data in the subgraph will be lost.
|
|
267
267
|
|
|
268
268
|
**Backup Location:**
|
|
269
|
-
If backup requested, stored in S3 at:
|
|
270
|
-
`s3://
|
|
269
|
+
If backup requested, stored in S3 Kuzu database bucket at:
|
|
270
|
+
`s3://{kuzu_s3_bucket}/{instance_id}/{database_name}_{timestamp}.backup`
|
|
271
271
|
|
|
272
272
|
Args:
|
|
273
273
|
graph_id (str):
|
|
@@ -14,6 +14,14 @@ from .query_client import (
|
|
|
14
14
|
QueryOptions,
|
|
15
15
|
QueuedQueryError,
|
|
16
16
|
)
|
|
17
|
+
from .agent_client import (
|
|
18
|
+
AgentClient,
|
|
19
|
+
AgentResult,
|
|
20
|
+
QueuedAgentResponse,
|
|
21
|
+
AgentQueryRequest,
|
|
22
|
+
AgentOptions,
|
|
23
|
+
QueuedAgentError,
|
|
24
|
+
)
|
|
17
25
|
from .operation_client import (
|
|
18
26
|
OperationClient,
|
|
19
27
|
OperationStatus,
|
|
@@ -118,6 +126,13 @@ __all__ = [
|
|
|
118
126
|
"QueryRequest",
|
|
119
127
|
"QueryOptions",
|
|
120
128
|
"QueuedQueryError",
|
|
129
|
+
# Agent Client
|
|
130
|
+
"AgentClient",
|
|
131
|
+
"AgentResult",
|
|
132
|
+
"QueuedAgentResponse",
|
|
133
|
+
"AgentQueryRequest",
|
|
134
|
+
"AgentOptions",
|
|
135
|
+
"QueuedAgentError",
|
|
121
136
|
# Operation Client
|
|
122
137
|
"OperationClient",
|
|
123
138
|
"OperationStatus",
|
|
@@ -189,6 +204,16 @@ def stream_query(graph_id: str, query: str, parameters=None, chunk_size=None):
|
|
|
189
204
|
return extensions.query.stream_query(graph_id, query, parameters, chunk_size)
|
|
190
205
|
|
|
191
206
|
|
|
207
|
+
def agent_query(graph_id: str, message: str, context=None):
|
|
208
|
+
"""Execute an agent query using the default extensions instance"""
|
|
209
|
+
return extensions.agent.query(graph_id, message, context)
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
def analyze_financials(graph_id: str, message: str, on_progress=None):
|
|
213
|
+
"""Execute financial agent using the default extensions instance"""
|
|
214
|
+
return extensions.agent.analyze_financials(graph_id, message, on_progress)
|
|
215
|
+
|
|
216
|
+
|
|
192
217
|
# DataFrame convenience functions (if pandas is available)
|
|
193
218
|
if (
|
|
194
219
|
HAS_PANDAS
|