Skip to content

Commit 41d3520

Browse files
committed
feat(api): update via SDK Studio
1 parent 16bb664 commit 41d3520

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+74
-4680
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
configured_endpoints: 67
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-0ccf3d2fccc5f32950b790cbff19ab44a505c69a9bcecc05c9db26521e72ce88.yml
1+
configured_endpoints: 51
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-24a3d3655d208471c6d4a8716cb358eb6f6ed3c317428e9ca4d359b79a6c0e36.yml

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ from asktable import Asktable
3131

3232
client = Asktable()
3333

34-
project_model = client.sys.projects.create(
35-
name="name",
34+
project_model = client.sys.projects.retrieve(
35+
"project_id",
3636
)
3737
print(project_model.id)
3838
```
@@ -49,8 +49,8 @@ client = AsyncAsktable()
4949

5050

5151
async def main() -> None:
52-
project_model = await client.sys.projects.create(
53-
name="name",
52+
project_model = await client.sys.projects.retrieve(
53+
"project_id",
5454
)
5555
print(project_model.id)
5656

@@ -85,8 +85,8 @@ from asktable import Asktable
8585
client = Asktable()
8686

8787
try:
88-
client.sys.projects.create(
89-
name="name",
88+
client.sys.projects.retrieve(
89+
"project_id",
9090
)
9191
except asktable.APIConnectionError as e:
9292
print("The server could not be reached")
@@ -130,8 +130,8 @@ client = Asktable(
130130
)
131131

132132
# Or, configure per-request:
133-
client.with_options(max_retries=5).sys.projects.create(
134-
name="name",
133+
client.with_options(max_retries=5).sys.projects.retrieve(
134+
"project_id",
135135
)
136136
```
137137

@@ -155,8 +155,8 @@ client = Asktable(
155155
)
156156

157157
# Override per-request:
158-
client.with_options(timeout=5.0).sys.projects.create(
159-
name="name",
158+
client.with_options(timeout=5.0).sys.projects.retrieve(
159+
"project_id",
160160
)
161161
```
162162

@@ -196,12 +196,12 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
196196
from asktable import Asktable
197197

198198
client = Asktable()
199-
response = client.sys.projects.with_raw_response.create(
200-
name="name",
199+
response = client.sys.projects.with_raw_response.retrieve(
200+
"project_id",
201201
)
202202
print(response.headers.get('X-My-Header'))
203203

204-
project = response.parse() # get the object that `sys.projects.create()` would have returned
204+
project = response.parse() # get the object that `sys.projects.retrieve()` would have returned
205205
print(project.id)
206206
```
207207

@@ -216,8 +216,8 @@ The above interface eagerly reads the full response body when you make the reque
216216
To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
217217

218218
```python
219-
with client.sys.projects.with_streaming_response.create(
220-
name="name",
219+
with client.sys.projects.with_streaming_response.retrieve(
220+
"project_id",
221221
) as response:
222222
print(response.headers.get("X-My-Header"))
223223

api.md

Lines changed: 3 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,23 @@ from asktable.types.sys import PageProjectModel, ProjectModel, ProjectDeleteResp
1616

1717
Methods:
1818

19-
- <code title="post /sys/projects">client.sys.projects.<a href="./src/asktable/resources/sys/projects/projects.py">create</a>(\*\*<a href="src/asktable/types/sys/project_create_params.py">params</a>) -> <a href="./src/asktable/types/sys/project_model.py">ProjectModel</a></code>
2019
- <code title="get /sys/projects/{project_id}">client.sys.projects.<a href="./src/asktable/resources/sys/projects/projects.py">retrieve</a>(project_id) -> <a href="./src/asktable/types/sys/project_model.py">ProjectModel</a></code>
2120
- <code title="patch /sys/projects/{project_id}">client.sys.projects.<a href="./src/asktable/resources/sys/projects/projects.py">update</a>(project_id, \*\*<a href="src/asktable/types/sys/project_update_params.py">params</a>) -> <a href="./src/asktable/types/sys/project_model.py">ProjectModel</a></code>
22-
- <code title="get /sys/projects">client.sys.projects.<a href="./src/asktable/resources/sys/projects/projects.py">list</a>(\*\*<a href="src/asktable/types/sys/project_list_params.py">params</a>) -> <a href="./src/asktable/types/sys/page_project_model.py">PageProjectModel</a></code>
2321
- <code title="delete /sys/projects/{project_id}">client.sys.projects.<a href="./src/asktable/resources/sys/projects/projects.py">delete</a>(project_id) -> <a href="./src/asktable/types/sys/project_delete_response.py">object</a></code>
2422

2523
### APIKeys
2624

2725
Types:
2826

2927
```python
30-
from asktable.types.sys.projects import (
31-
APIKeyCreateOut,
32-
APIKeyOut,
33-
APIKeyListResponse,
34-
APIKeyDeleteResponse,
35-
)
28+
from asktable.types.sys.projects import APIKeyCreateOut, APIKeyOut, APIKeyListResponse
3629
```
3730

3831
Methods:
3932

4033
- <code title="post /sys/projects/{project_id}/api-keys">client.sys.projects.api_keys.<a href="./src/asktable/resources/sys/projects/api_keys.py">create</a>(project_id, \*\*<a href="src/asktable/types/sys/projects/api_key_create_params.py">params</a>) -> <a href="./src/asktable/types/sys/projects/api_key_create_out.py">APIKeyCreateOut</a></code>
4134
- <code title="get /sys/projects/{project_id}/api-keys">client.sys.projects.api_keys.<a href="./src/asktable/resources/sys/projects/api_keys.py">list</a>(project_id) -> <a href="./src/asktable/types/sys/projects/api_key_list_response.py">APIKeyListResponse</a></code>
42-
- <code title="delete /sys/projects/{project_id}/api-keys/{key_id}">client.sys.projects.api_keys.<a href="./src/asktable/resources/sys/projects/api_keys.py">delete</a>(key_id, \*, project_id) -> <a href="./src/asktable/types/sys/projects/api_key_delete_response.py">object</a></code>
35+
- <code title="delete /sys/projects/{project_id}/api-keys/{key_id}">client.sys.projects.api_keys.<a href="./src/asktable/resources/sys/projects/api_keys.py">delete</a>(key_id, \*, project_id) -> None</code>
4336

4437
### Tokens
4538

@@ -88,41 +81,9 @@ Methods:
8881
Types:
8982

9083
```python
91-
from asktable.types.auth import PageRoleModel, RoleModel, RoleDeleteResponse
92-
```
93-
94-
Methods:
95-
96-
- <code title="post /auth/roles">client.auth.roles.<a href="./src/asktable/resources/auth/roles/roles.py">create</a>(\*\*<a href="src/asktable/types/auth/role_create_params.py">params</a>) -> <a href="./src/asktable/types/auth/role_model.py">RoleModel</a></code>
97-
- <code title="get /auth/roles/{role_id}">client.auth.roles.<a href="./src/asktable/resources/auth/roles/roles.py">retrieve</a>(role_id) -> <a href="./src/asktable/types/auth/role_model.py">RoleModel</a></code>
98-
- <code title="patch /auth/roles/{role_id}">client.auth.roles.<a href="./src/asktable/resources/auth/roles/roles.py">update</a>(role_id, \*\*<a href="src/asktable/types/auth/role_update_params.py">params</a>) -> <a href="./src/asktable/types/auth/role_model.py">RoleModel</a></code>
99-
- <code title="get /auth/roles">client.auth.roles.<a href="./src/asktable/resources/auth/roles/roles.py">list</a>(\*\*<a href="src/asktable/types/auth/role_list_params.py">params</a>) -> <a href="./src/asktable/types/auth/page_role_model.py">PageRoleModel</a></code>
100-
- <code title="delete /auth/roles/{role_id}">client.auth.roles.<a href="./src/asktable/resources/auth/roles/roles.py">delete</a>(role_id) -> <a href="./src/asktable/types/auth/role_delete_response.py">object</a></code>
101-
102-
### Policies
103-
104-
Types:
105-
106-
```python
107-
from asktable.types.auth.roles import PolicyListResponse
108-
```
109-
110-
Methods:
111-
112-
- <code title="get /auth/roles/{role_id}/policies">client.auth.roles.policies.<a href="./src/asktable/resources/auth/roles/policies.py">list</a>(role_id) -> <a href="./src/asktable/types/auth/roles/policy_list_response.py">PolicyListResponse</a></code>
113-
114-
### Variables
115-
116-
Types:
117-
118-
```python
119-
from asktable.types.auth.roles import VariableListResponse
84+
from asktable.types.auth import PageRoleModel, RoleModel
12085
```
12186

122-
Methods:
123-
124-
- <code title="get /auth/roles/{role_id}/variables">client.auth.roles.variables.<a href="./src/asktable/resources/auth/roles/variables.py">list</a>(role_id, \*\*<a href="src/asktable/types/auth/roles/variable_list_params.py">params</a>) -> <a href="./src/asktable/types/auth/roles/variable_list_response.py">object</a></code>
125-
12687
## Policies
12788

12889
Types:
@@ -131,14 +92,6 @@ Types:
13192
from asktable.types.auth import PagePolicyOut
13293
```
13394

134-
Methods:
135-
136-
- <code title="post /auth/policies">client.auth.policies.<a href="./src/asktable/resources/auth/policies.py">create</a>(\*\*<a href="src/asktable/types/auth/policy_create_params.py">params</a>) -> <a href="./src/asktable/types/shared/policy_out.py">PolicyOut</a></code>
137-
- <code title="get /auth/policies/{policy_id}">client.auth.policies.<a href="./src/asktable/resources/auth/policies.py">retrieve</a>(policy_id) -> <a href="./src/asktable/types/shared/policy_out.py">PolicyOut</a></code>
138-
- <code title="patch /auth/policies/{policy_id}">client.auth.policies.<a href="./src/asktable/resources/auth/policies.py">update</a>(policy_id, \*\*<a href="src/asktable/types/auth/policy_update_params.py">params</a>) -> <a href="./src/asktable/types/shared/policy_out.py">PolicyOut</a></code>
139-
- <code title="get /auth/policies">client.auth.policies.<a href="./src/asktable/resources/auth/policies.py">list</a>(\*\*<a href="src/asktable/types/auth/policy_list_params.py">params</a>) -> <a href="./src/asktable/types/auth/page_policy_out.py">PagePolicyOut</a></code>
140-
- <code title="delete /auth/policies/{policy_id}">client.auth.policies.<a href="./src/asktable/resources/auth/policies.py">delete</a>(policy_id) -> None</code>
141-
14295
# Chats
14396

14497
Types:
@@ -286,32 +239,6 @@ Methods:
286239
- <code title="get /extapis/{extapi_id}/routes">client.extapis.routes.<a href="./src/asktable/resources/extapis/routes.py">list</a>(extapi_id) -> <a href="./src/asktable/types/extapis/route_list_response.py">RouteListResponse</a></code>
287240
- <code title="delete /extapis/{extapi_id}/routes/{route_id}">client.extapis.routes.<a href="./src/asktable/resources/extapis/routes.py">delete</a>(route_id, \*, extapi_id) -> None</code>
288241

289-
# AtAuth
290-
291-
## Tokens
292-
293-
Types:
294-
295-
```python
296-
from asktable.types.at_auth import TokenCreateResponse
297-
```
298-
299-
Methods:
300-
301-
- <code title="post /at-auth/tokens">client.at_auth.tokens.<a href="./src/asktable/resources/at_auth/tokens.py">create</a>(\*\*<a href="src/asktable/types/at_auth/token_create_params.py">params</a>) -> <a href="./src/asktable/types/at_auth/token_create_response.py">object</a></code>
302-
303-
## Me
304-
305-
Types:
306-
307-
```python
308-
from asktable.types.at_auth import MeRetrieveResponse
309-
```
310-
311-
Methods:
312-
313-
- <code title="get /at-auth/me">client.at_auth.me.<a href="./src/asktable/resources/at_auth/me.py">retrieve</a>() -> <a href="./src/asktable/types/at_auth/me_retrieve_response.py">object</a></code>
314-
315242
# SingleTurn
316243

317244
## Q2a

src/asktable/_client.py

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,10 @@
4848
class Asktable(SyncAPIClient):
4949
sys: resources.SysResource
5050
securetunnels: resources.SecuretunnelsResource
51-
auth: resources.AuthResource
5251
chats: resources.ChatsResource
5352
datasources: resources.DatasourcesResource
5453
bots: resources.BotsResource
5554
extapis: resources.ExtapisResource
56-
at_auth: resources.AtAuthResource
5755
single_turn: resources.SingleTurnResource
5856
caches: resources.CachesResource
5957
integration: resources.IntegrationResource
@@ -103,12 +101,10 @@ def __init__(
103101

104102
self.sys = resources.SysResource(self)
105103
self.securetunnels = resources.SecuretunnelsResource(self)
106-
self.auth = resources.AuthResource(self)
107104
self.chats = resources.ChatsResource(self)
108105
self.datasources = resources.DatasourcesResource(self)
109106
self.bots = resources.BotsResource(self)
110107
self.extapis = resources.ExtapisResource(self)
111-
self.at_auth = resources.AtAuthResource(self)
112108
self.single_turn = resources.SingleTurnResource(self)
113109
self.caches = resources.CachesResource(self)
114110
self.integration = resources.IntegrationResource(self)
@@ -118,7 +114,7 @@ def __init__(
118114
@property
119115
@override
120116
def qs(self) -> Querystring:
121-
return Querystring(array_format="comma")
117+
return Querystring(array_format="repeat")
122118

123119
@property
124120
@override
@@ -215,12 +211,10 @@ def _make_status_error(
215211
class AsyncAsktable(AsyncAPIClient):
216212
sys: resources.AsyncSysResource
217213
securetunnels: resources.AsyncSecuretunnelsResource
218-
auth: resources.AsyncAuthResource
219214
chats: resources.AsyncChatsResource
220215
datasources: resources.AsyncDatasourcesResource
221216
bots: resources.AsyncBotsResource
222217
extapis: resources.AsyncExtapisResource
223-
at_auth: resources.AsyncAtAuthResource
224218
single_turn: resources.AsyncSingleTurnResource
225219
caches: resources.AsyncCachesResource
226220
integration: resources.AsyncIntegrationResource
@@ -270,12 +264,10 @@ def __init__(
270264

271265
self.sys = resources.AsyncSysResource(self)
272266
self.securetunnels = resources.AsyncSecuretunnelsResource(self)
273-
self.auth = resources.AsyncAuthResource(self)
274267
self.chats = resources.AsyncChatsResource(self)
275268
self.datasources = resources.AsyncDatasourcesResource(self)
276269
self.bots = resources.AsyncBotsResource(self)
277270
self.extapis = resources.AsyncExtapisResource(self)
278-
self.at_auth = resources.AsyncAtAuthResource(self)
279271
self.single_turn = resources.AsyncSingleTurnResource(self)
280272
self.caches = resources.AsyncCachesResource(self)
281273
self.integration = resources.AsyncIntegrationResource(self)
@@ -285,7 +277,7 @@ def __init__(
285277
@property
286278
@override
287279
def qs(self) -> Querystring:
288-
return Querystring(array_format="comma")
280+
return Querystring(array_format="repeat")
289281

290282
@property
291283
@override
@@ -383,12 +375,10 @@ class AsktableWithRawResponse:
383375
def __init__(self, client: Asktable) -> None:
384376
self.sys = resources.SysResourceWithRawResponse(client.sys)
385377
self.securetunnels = resources.SecuretunnelsResourceWithRawResponse(client.securetunnels)
386-
self.auth = resources.AuthResourceWithRawResponse(client.auth)
387378
self.chats = resources.ChatsResourceWithRawResponse(client.chats)
388379
self.datasources = resources.DatasourcesResourceWithRawResponse(client.datasources)
389380
self.bots = resources.BotsResourceWithRawResponse(client.bots)
390381
self.extapis = resources.ExtapisResourceWithRawResponse(client.extapis)
391-
self.at_auth = resources.AtAuthResourceWithRawResponse(client.at_auth)
392382
self.single_turn = resources.SingleTurnResourceWithRawResponse(client.single_turn)
393383
self.caches = resources.CachesResourceWithRawResponse(client.caches)
394384
self.integration = resources.IntegrationResourceWithRawResponse(client.integration)
@@ -398,12 +388,10 @@ class AsyncAsktableWithRawResponse:
398388
def __init__(self, client: AsyncAsktable) -> None:
399389
self.sys = resources.AsyncSysResourceWithRawResponse(client.sys)
400390
self.securetunnels = resources.AsyncSecuretunnelsResourceWithRawResponse(client.securetunnels)
401-
self.auth = resources.AsyncAuthResourceWithRawResponse(client.auth)
402391
self.chats = resources.AsyncChatsResourceWithRawResponse(client.chats)
403392
self.datasources = resources.AsyncDatasourcesResourceWithRawResponse(client.datasources)
404393
self.bots = resources.AsyncBotsResourceWithRawResponse(client.bots)
405394
self.extapis = resources.AsyncExtapisResourceWithRawResponse(client.extapis)
406-
self.at_auth = resources.AsyncAtAuthResourceWithRawResponse(client.at_auth)
407395
self.single_turn = resources.AsyncSingleTurnResourceWithRawResponse(client.single_turn)
408396
self.caches = resources.AsyncCachesResourceWithRawResponse(client.caches)
409397
self.integration = resources.AsyncIntegrationResourceWithRawResponse(client.integration)
@@ -413,12 +401,10 @@ class AsktableWithStreamedResponse:
413401
def __init__(self, client: Asktable) -> None:
414402
self.sys = resources.SysResourceWithStreamingResponse(client.sys)
415403
self.securetunnels = resources.SecuretunnelsResourceWithStreamingResponse(client.securetunnels)
416-
self.auth = resources.AuthResourceWithStreamingResponse(client.auth)
417404
self.chats = resources.ChatsResourceWithStreamingResponse(client.chats)
418405
self.datasources = resources.DatasourcesResourceWithStreamingResponse(client.datasources)
419406
self.bots = resources.BotsResourceWithStreamingResponse(client.bots)
420407
self.extapis = resources.ExtapisResourceWithStreamingResponse(client.extapis)
421-
self.at_auth = resources.AtAuthResourceWithStreamingResponse(client.at_auth)
422408
self.single_turn = resources.SingleTurnResourceWithStreamingResponse(client.single_turn)
423409
self.caches = resources.CachesResourceWithStreamingResponse(client.caches)
424410
self.integration = resources.IntegrationResourceWithStreamingResponse(client.integration)
@@ -428,12 +414,10 @@ class AsyncAsktableWithStreamedResponse:
428414
def __init__(self, client: AsyncAsktable) -> None:
429415
self.sys = resources.AsyncSysResourceWithStreamingResponse(client.sys)
430416
self.securetunnels = resources.AsyncSecuretunnelsResourceWithStreamingResponse(client.securetunnels)
431-
self.auth = resources.AsyncAuthResourceWithStreamingResponse(client.auth)
432417
self.chats = resources.AsyncChatsResourceWithStreamingResponse(client.chats)
433418
self.datasources = resources.AsyncDatasourcesResourceWithStreamingResponse(client.datasources)
434419
self.bots = resources.AsyncBotsResourceWithStreamingResponse(client.bots)
435420
self.extapis = resources.AsyncExtapisResourceWithStreamingResponse(client.extapis)
436-
self.at_auth = resources.AsyncAtAuthResourceWithStreamingResponse(client.at_auth)
437421
self.single_turn = resources.AsyncSingleTurnResourceWithStreamingResponse(client.single_turn)
438422
self.caches = resources.AsyncCachesResourceWithStreamingResponse(client.caches)
439423
self.integration = resources.AsyncIntegrationResourceWithStreamingResponse(client.integration)

src/asktable/resources/__init__.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,6 @@
88
SysResourceWithStreamingResponse,
99
AsyncSysResourceWithStreamingResponse,
1010
)
11-
from .auth import (
12-
AuthResource,
13-
AsyncAuthResource,
14-
AuthResourceWithRawResponse,
15-
AsyncAuthResourceWithRawResponse,
16-
AuthResourceWithStreamingResponse,
17-
AsyncAuthResourceWithStreamingResponse,
18-
)
1911
from .bots import (
2012
BotsResource,
2113
AsyncBotsResource,
@@ -40,14 +32,6 @@
4032
CachesResourceWithStreamingResponse,
4133
AsyncCachesResourceWithStreamingResponse,
4234
)
43-
from .at_auth import (
44-
AtAuthResource,
45-
AsyncAtAuthResource,
46-
AtAuthResourceWithRawResponse,
47-
AsyncAtAuthResourceWithRawResponse,
48-
AtAuthResourceWithStreamingResponse,
49-
AsyncAtAuthResourceWithStreamingResponse,
50-
)
5135
from .extapis import (
5236
ExtapisResource,
5337
AsyncExtapisResource,
@@ -102,12 +86,6 @@
10286
"AsyncSecuretunnelsResourceWithRawResponse",
10387
"SecuretunnelsResourceWithStreamingResponse",
10488
"AsyncSecuretunnelsResourceWithStreamingResponse",
105-
"AuthResource",
106-
"AsyncAuthResource",
107-
"AuthResourceWithRawResponse",
108-
"AsyncAuthResourceWithRawResponse",
109-
"AuthResourceWithStreamingResponse",
110-
"AsyncAuthResourceWithStreamingResponse",
11189
"ChatsResource",
11290
"AsyncChatsResource",
11391
"ChatsResourceWithRawResponse",
@@ -132,12 +110,6 @@
132110
"AsyncExtapisResourceWithRawResponse",
133111
"ExtapisResourceWithStreamingResponse",
134112
"AsyncExtapisResourceWithStreamingResponse",
135-
"AtAuthResource",
136-
"AsyncAtAuthResource",
137-
"AtAuthResourceWithRawResponse",
138-
"AsyncAtAuthResourceWithRawResponse",
139-
"AtAuthResourceWithStreamingResponse",
140-
"AsyncAtAuthResourceWithStreamingResponse",
141113
"SingleTurnResource",
142114
"AsyncSingleTurnResource",
143115
"SingleTurnResourceWithRawResponse",

0 commit comments

Comments
 (0)