Skip to content

Commit 16bb664

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

File tree

84 files changed

+1942
-1179
lines changed

Some content is hidden

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

84 files changed

+1942
-1179
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
configured_endpoints: 64
1+
configured_endpoints: 67
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-0ccf3d2fccc5f32950b790cbff19ab44a505c69a9bcecc05c9db26521e72ce88.yml

README.md

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

3232
client = Asktable()
3333

34-
project = client.sys.projects.create(
34+
project_model = client.sys.projects.create(
3535
name="name",
3636
)
37-
print(project.id)
37+
print(project_model.id)
3838
```
3939

4040
## Async usage
@@ -49,10 +49,10 @@ client = AsyncAsktable()
4949

5050

5151
async def main() -> None:
52-
project = await client.sys.projects.create(
52+
project_model = await client.sys.projects.create(
5353
name="name",
5454
)
55-
print(project.id)
55+
print(project_model.id)
5656

5757

5858
asyncio.run(main())

api.md

Lines changed: 63 additions & 49 deletions
Large diffs are not rendered by default.

src/asktable/_client.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class Asktable(SyncAPIClient):
5656
at_auth: resources.AtAuthResource
5757
single_turn: resources.SingleTurnResource
5858
caches: resources.CachesResource
59+
integration: resources.IntegrationResource
5960
with_raw_response: AsktableWithRawResponse
6061
with_streaming_response: AsktableWithStreamedResponse
6162

@@ -110,6 +111,7 @@ def __init__(
110111
self.at_auth = resources.AtAuthResource(self)
111112
self.single_turn = resources.SingleTurnResource(self)
112113
self.caches = resources.CachesResource(self)
114+
self.integration = resources.IntegrationResource(self)
113115
self.with_raw_response = AsktableWithRawResponse(self)
114116
self.with_streaming_response = AsktableWithStreamedResponse(self)
115117

@@ -221,6 +223,7 @@ class AsyncAsktable(AsyncAPIClient):
221223
at_auth: resources.AsyncAtAuthResource
222224
single_turn: resources.AsyncSingleTurnResource
223225
caches: resources.AsyncCachesResource
226+
integration: resources.AsyncIntegrationResource
224227
with_raw_response: AsyncAsktableWithRawResponse
225228
with_streaming_response: AsyncAsktableWithStreamedResponse
226229

@@ -275,6 +278,7 @@ def __init__(
275278
self.at_auth = resources.AsyncAtAuthResource(self)
276279
self.single_turn = resources.AsyncSingleTurnResource(self)
277280
self.caches = resources.AsyncCachesResource(self)
281+
self.integration = resources.AsyncIntegrationResource(self)
278282
self.with_raw_response = AsyncAsktableWithRawResponse(self)
279283
self.with_streaming_response = AsyncAsktableWithStreamedResponse(self)
280284

@@ -387,6 +391,7 @@ def __init__(self, client: Asktable) -> None:
387391
self.at_auth = resources.AtAuthResourceWithRawResponse(client.at_auth)
388392
self.single_turn = resources.SingleTurnResourceWithRawResponse(client.single_turn)
389393
self.caches = resources.CachesResourceWithRawResponse(client.caches)
394+
self.integration = resources.IntegrationResourceWithRawResponse(client.integration)
390395

391396

392397
class AsyncAsktableWithRawResponse:
@@ -401,6 +406,7 @@ def __init__(self, client: AsyncAsktable) -> None:
401406
self.at_auth = resources.AsyncAtAuthResourceWithRawResponse(client.at_auth)
402407
self.single_turn = resources.AsyncSingleTurnResourceWithRawResponse(client.single_turn)
403408
self.caches = resources.AsyncCachesResourceWithRawResponse(client.caches)
409+
self.integration = resources.AsyncIntegrationResourceWithRawResponse(client.integration)
404410

405411

406412
class AsktableWithStreamedResponse:
@@ -415,6 +421,7 @@ def __init__(self, client: Asktable) -> None:
415421
self.at_auth = resources.AtAuthResourceWithStreamingResponse(client.at_auth)
416422
self.single_turn = resources.SingleTurnResourceWithStreamingResponse(client.single_turn)
417423
self.caches = resources.CachesResourceWithStreamingResponse(client.caches)
424+
self.integration = resources.IntegrationResourceWithStreamingResponse(client.integration)
418425

419426

420427
class AsyncAsktableWithStreamedResponse:
@@ -429,6 +436,7 @@ def __init__(self, client: AsyncAsktable) -> None:
429436
self.at_auth = resources.AsyncAtAuthResourceWithStreamingResponse(client.at_auth)
430437
self.single_turn = resources.AsyncSingleTurnResourceWithStreamingResponse(client.single_turn)
431438
self.caches = resources.AsyncCachesResourceWithStreamingResponse(client.caches)
439+
self.integration = resources.AsyncIntegrationResourceWithStreamingResponse(client.integration)
432440

433441

434442
Client = Asktable

src/asktable/resources/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@
6464
DatasourcesResourceWithStreamingResponse,
6565
AsyncDatasourcesResourceWithStreamingResponse,
6666
)
67+
from .integration import (
68+
IntegrationResource,
69+
AsyncIntegrationResource,
70+
IntegrationResourceWithRawResponse,
71+
AsyncIntegrationResourceWithRawResponse,
72+
IntegrationResourceWithStreamingResponse,
73+
AsyncIntegrationResourceWithStreamingResponse,
74+
)
6775
from .single_turn import (
6876
SingleTurnResource,
6977
AsyncSingleTurnResource,
@@ -142,4 +150,10 @@
142150
"AsyncCachesResourceWithRawResponse",
143151
"CachesResourceWithStreamingResponse",
144152
"AsyncCachesResourceWithStreamingResponse",
153+
"IntegrationResource",
154+
"AsyncIntegrationResource",
155+
"IntegrationResourceWithRawResponse",
156+
"AsyncIntegrationResourceWithRawResponse",
157+
"IntegrationResourceWithStreamingResponse",
158+
"AsyncIntegrationResourceWithStreamingResponse",
145159
]

src/asktable/resources/auth/policies.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
)
2323
from ...types.auth import policy_list_params, policy_create_params, policy_update_params
2424
from ..._base_client import make_request_options
25-
from ...types.shared.policy import Policy
26-
from ...types.auth.policy_list_response import PolicyListResponse
25+
from ...types.shared.policy_out import PolicyOut
26+
from ...types.auth.page_policy_out import PagePolicyOut
2727

2828
__all__ = ["PoliciesResource", "AsyncPoliciesResource"]
2929

@@ -60,7 +60,7 @@ def create(
6060
extra_query: Query | None = None,
6161
extra_body: Body | None = None,
6262
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
63-
) -> Policy:
63+
) -> PolicyOut:
6464
"""
6565
定义一个新的策略
6666
@@ -92,7 +92,7 @@ def create(
9292
options=make_request_options(
9393
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
9494
),
95-
cast_to=Policy,
95+
cast_to=PolicyOut,
9696
)
9797

9898
def retrieve(
@@ -105,7 +105,7 @@ def retrieve(
105105
extra_query: Query | None = None,
106106
extra_body: Body | None = None,
107107
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
108-
) -> Policy:
108+
) -> PolicyOut:
109109
"""
110110
获取某个策略
111111
@@ -125,7 +125,7 @@ def retrieve(
125125
options=make_request_options(
126126
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
127127
),
128-
cast_to=Policy,
128+
cast_to=PolicyOut,
129129
)
130130

131131
def update(
@@ -141,7 +141,7 @@ def update(
141141
extra_query: Query | None = None,
142142
extra_body: Body | None = None,
143143
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
144-
) -> Policy:
144+
) -> PolicyOut:
145145
"""
146146
更新某个策略
147147
@@ -175,7 +175,7 @@ def update(
175175
options=make_request_options(
176176
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
177177
),
178-
cast_to=Policy,
178+
cast_to=PolicyOut,
179179
)
180180

181181
def list(
@@ -190,7 +190,7 @@ def list(
190190
extra_query: Query | None = None,
191191
extra_body: Body | None = None,
192192
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
193-
) -> PolicyListResponse:
193+
) -> PagePolicyOut:
194194
"""
195195
查询所有策略
196196
@@ -225,7 +225,7 @@ def list(
225225
policy_list_params.PolicyListParams,
226226
),
227227
),
228-
cast_to=PolicyListResponse,
228+
cast_to=PagePolicyOut,
229229
)
230230

231231
def delete(
@@ -295,7 +295,7 @@ async def create(
295295
extra_query: Query | None = None,
296296
extra_body: Body | None = None,
297297
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
298-
) -> Policy:
298+
) -> PolicyOut:
299299
"""
300300
定义一个新的策略
301301
@@ -327,7 +327,7 @@ async def create(
327327
options=make_request_options(
328328
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
329329
),
330-
cast_to=Policy,
330+
cast_to=PolicyOut,
331331
)
332332

333333
async def retrieve(
@@ -340,7 +340,7 @@ async def retrieve(
340340
extra_query: Query | None = None,
341341
extra_body: Body | None = None,
342342
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
343-
) -> Policy:
343+
) -> PolicyOut:
344344
"""
345345
获取某个策略
346346
@@ -360,7 +360,7 @@ async def retrieve(
360360
options=make_request_options(
361361
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
362362
),
363-
cast_to=Policy,
363+
cast_to=PolicyOut,
364364
)
365365

366366
async def update(
@@ -376,7 +376,7 @@ async def update(
376376
extra_query: Query | None = None,
377377
extra_body: Body | None = None,
378378
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
379-
) -> Policy:
379+
) -> PolicyOut:
380380
"""
381381
更新某个策略
382382
@@ -410,7 +410,7 @@ async def update(
410410
options=make_request_options(
411411
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
412412
),
413-
cast_to=Policy,
413+
cast_to=PolicyOut,
414414
)
415415

416416
async def list(
@@ -425,7 +425,7 @@ async def list(
425425
extra_query: Query | None = None,
426426
extra_body: Body | None = None,
427427
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
428-
) -> PolicyListResponse:
428+
) -> PagePolicyOut:
429429
"""
430430
查询所有策略
431431
@@ -460,7 +460,7 @@ async def list(
460460
policy_list_params.PolicyListParams,
461461
),
462462
),
463-
cast_to=PolicyListResponse,
463+
cast_to=PagePolicyOut,
464464
)
465465

466466
async def delete(

0 commit comments

Comments
 (0)