Skip to content

Commit 6594f10

Browse files
feat(api): api update (#66)
1 parent 2d3a56a commit 6594f10

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 82
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-8e9dc6bfba12f2eba83e978265436d2d6daabb89b04188ee749a32b3e2a6f55d.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-c4b030c81467ff9b675870c9a966dec4119d6ff1b92c39fc3aab8fac9fcbf1f7.yml

api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,5 +320,5 @@ Methods:
320320
- <code title="post /business-glossary">client.business_glossary.<a href="./src/asktable/resources/business_glossary.py">create</a>(\*\*<a href="src/asktable/types/business_glossary_create_params.py">params</a>) -> <a href="./src/asktable/types/business_glossary_create_response.py">BusinessGlossaryCreateResponse</a></code>
321321
- <code title="get /business-glossary/{entry_id}">client.business_glossary.<a href="./src/asktable/resources/business_glossary.py">retrieve</a>(entry_id) -> <a href="./src/asktable/types/entry_with_definition.py">EntryWithDefinition</a></code>
322322
- <code title="patch /business-glossary/{entry_id}">client.business_glossary.<a href="./src/asktable/resources/business_glossary.py">update</a>(entry_id, \*\*<a href="src/asktable/types/business_glossary_update_params.py">params</a>) -> <a href="./src/asktable/types/entry.py">Entry</a></code>
323-
- <code title="get /business-glossary">client.business_glossary.<a href="./src/asktable/resources/business_glossary.py">list</a>(\*\*<a href="src/asktable/types/business_glossary_list_params.py">params</a>) -> <a href="./src/asktable/types/entry.py">SyncPage[Entry]</a></code>
323+
- <code title="get /business-glossary">client.business_glossary.<a href="./src/asktable/resources/business_glossary.py">list</a>(\*\*<a href="src/asktable/types/business_glossary_list_params.py">params</a>) -> <a href="./src/asktable/types/entry_with_definition.py">SyncPage[EntryWithDefinition]</a></code>
324324
- <code title="delete /business-glossary/{entry_id}">client.business_glossary.<a href="./src/asktable/resources/business_glossary.py">delete</a>(entry_id) -> <a href="./src/asktable/types/business_glossary_delete_response.py">object</a></code>

src/asktable/resources/business_glossary.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def list(
184184
extra_query: Query | None = None,
185185
extra_body: Body | None = None,
186186
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
187-
) -> SyncPage[Entry]:
187+
) -> SyncPage[EntryWithDefinition]:
188188
"""
189189
查询所有业务术语
190190
@@ -205,7 +205,7 @@ def list(
205205
"""
206206
return self._get_api_list(
207207
"/business-glossary",
208-
page=SyncPage[Entry],
208+
page=SyncPage[EntryWithDefinition],
209209
options=make_request_options(
210210
extra_headers=extra_headers,
211211
extra_query=extra_query,
@@ -220,7 +220,7 @@ def list(
220220
business_glossary_list_params.BusinessGlossaryListParams,
221221
),
222222
),
223-
model=Entry,
223+
model=EntryWithDefinition,
224224
)
225225

226226
def delete(
@@ -408,7 +408,7 @@ def list(
408408
extra_query: Query | None = None,
409409
extra_body: Body | None = None,
410410
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
411-
) -> AsyncPaginator[Entry, AsyncPage[Entry]]:
411+
) -> AsyncPaginator[EntryWithDefinition, AsyncPage[EntryWithDefinition]]:
412412
"""
413413
查询所有业务术语
414414
@@ -429,7 +429,7 @@ def list(
429429
"""
430430
return self._get_api_list(
431431
"/business-glossary",
432-
page=AsyncPage[Entry],
432+
page=AsyncPage[EntryWithDefinition],
433433
options=make_request_options(
434434
extra_headers=extra_headers,
435435
extra_query=extra_query,
@@ -444,7 +444,7 @@ def list(
444444
business_glossary_list_params.BusinessGlossaryListParams,
445445
),
446446
),
447-
model=Entry,
447+
model=EntryWithDefinition,
448448
)
449449

450450
async def delete(

tests/api_resources/test_business_glossary.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def test_path_params_update(self, client: Asktable) -> None:
158158
@parametrize
159159
def test_method_list(self, client: Asktable) -> None:
160160
business_glossary = client.business_glossary.list()
161-
assert_matches_type(SyncPage[Entry], business_glossary, path=["response"])
161+
assert_matches_type(SyncPage[EntryWithDefinition], business_glossary, path=["response"])
162162

163163
@parametrize
164164
def test_method_list_with_all_params(self, client: Asktable) -> None:
@@ -167,7 +167,7 @@ def test_method_list_with_all_params(self, client: Asktable) -> None:
167167
size=1,
168168
term="term",
169169
)
170-
assert_matches_type(SyncPage[Entry], business_glossary, path=["response"])
170+
assert_matches_type(SyncPage[EntryWithDefinition], business_glossary, path=["response"])
171171

172172
@parametrize
173173
def test_raw_response_list(self, client: Asktable) -> None:
@@ -176,7 +176,7 @@ def test_raw_response_list(self, client: Asktable) -> None:
176176
assert response.is_closed is True
177177
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
178178
business_glossary = response.parse()
179-
assert_matches_type(SyncPage[Entry], business_glossary, path=["response"])
179+
assert_matches_type(SyncPage[EntryWithDefinition], business_glossary, path=["response"])
180180

181181
@parametrize
182182
def test_streaming_response_list(self, client: Asktable) -> None:
@@ -185,7 +185,7 @@ def test_streaming_response_list(self, client: Asktable) -> None:
185185
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
186186

187187
business_glossary = response.parse()
188-
assert_matches_type(SyncPage[Entry], business_glossary, path=["response"])
188+
assert_matches_type(SyncPage[EntryWithDefinition], business_glossary, path=["response"])
189189

190190
assert cast(Any, response.is_closed) is True
191191

@@ -367,7 +367,7 @@ async def test_path_params_update(self, async_client: AsyncAsktable) -> None:
367367
@parametrize
368368
async def test_method_list(self, async_client: AsyncAsktable) -> None:
369369
business_glossary = await async_client.business_glossary.list()
370-
assert_matches_type(AsyncPage[Entry], business_glossary, path=["response"])
370+
assert_matches_type(AsyncPage[EntryWithDefinition], business_glossary, path=["response"])
371371

372372
@parametrize
373373
async def test_method_list_with_all_params(self, async_client: AsyncAsktable) -> None:
@@ -376,7 +376,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncAsktable) ->
376376
size=1,
377377
term="term",
378378
)
379-
assert_matches_type(AsyncPage[Entry], business_glossary, path=["response"])
379+
assert_matches_type(AsyncPage[EntryWithDefinition], business_glossary, path=["response"])
380380

381381
@parametrize
382382
async def test_raw_response_list(self, async_client: AsyncAsktable) -> None:
@@ -385,7 +385,7 @@ async def test_raw_response_list(self, async_client: AsyncAsktable) -> None:
385385
assert response.is_closed is True
386386
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
387387
business_glossary = await response.parse()
388-
assert_matches_type(AsyncPage[Entry], business_glossary, path=["response"])
388+
assert_matches_type(AsyncPage[EntryWithDefinition], business_glossary, path=["response"])
389389

390390
@parametrize
391391
async def test_streaming_response_list(self, async_client: AsyncAsktable) -> None:
@@ -394,7 +394,7 @@ async def test_streaming_response_list(self, async_client: AsyncAsktable) -> Non
394394
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
395395

396396
business_glossary = await response.parse()
397-
assert_matches_type(AsyncPage[Entry], business_glossary, path=["response"])
397+
assert_matches_type(AsyncPage[EntryWithDefinition], business_glossary, path=["response"])
398398

399399
assert cast(Any, response.is_closed) is True
400400

0 commit comments

Comments
 (0)