Skip to content

Commit 8f3190c

Browse files
feat(api): manual updates
1 parent 4030b10 commit 8f3190c

10 files changed

Lines changed: 297 additions & 18 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 7
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-2df861cbe235900388f93a2e603090b713f6c5029e4daf2220bddface7882032.yml
3-
openapi_spec_hash: d5a5643aea6c45631d7df49692cf9328
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-a960d67a89f2e62fcb3fb61f13e0cba71a803ff00b378730cf72a8209ae8e36a.yml
3+
openapi_spec_hash: a2c7aa9e4b1e5265d502d3f005ffb5f9
44
config_hash: bb3f3ba0dca413263e40968648f9a1a6

src/brand/dev/resources/brand.py

Lines changed: 134 additions & 10 deletions
Large diffs are not rendered by default.

src/brand/dev/types/brand_ai_query_params.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
from __future__ import annotations
44

55
from typing import Iterable
6-
from typing_extensions import Literal, Required, TypedDict
6+
from typing_extensions import Literal, Required, Annotated, TypedDict
7+
8+
from .._utils import PropertyInfo
79

810
__all__ = ["BrandAIQueryParams", "DataToExtract", "SpecificPages"]
911

@@ -18,6 +20,13 @@ class BrandAIQueryParams(TypedDict, total=False):
1820
specific_pages: SpecificPages
1921
"""Optional object specifying which pages to analyze"""
2022

23+
timeout_ms: Annotated[int, PropertyInfo(alias="timeoutMS")]
24+
"""Optional timeout in milliseconds for the request.
25+
26+
If the request takes longer than this value, it will be aborted with a 408
27+
status code. Maximum allowed value is 300000ms (5 minutes).
28+
"""
29+
2130

2231
class DataToExtract(TypedDict, total=False):
2332
datapoint_description: Required[str]

src/brand/dev/types/brand_identify_from_transaction_params.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,20 @@
22

33
from __future__ import annotations
44

5-
from typing_extensions import Required, TypedDict
5+
from typing_extensions import Required, Annotated, TypedDict
6+
7+
from .._utils import PropertyInfo
68

79
__all__ = ["BrandIdentifyFromTransactionParams"]
810

911

1012
class BrandIdentifyFromTransactionParams(TypedDict, total=False):
1113
transaction_info: Required[str]
1214
"""Transaction information to identify the brand"""
15+
16+
timeout_ms: Annotated[int, PropertyInfo(alias="timeoutMS")]
17+
"""Optional timeout in milliseconds for the request.
18+
19+
If the request takes longer than this value, it will be aborted with a 408
20+
status code. Maximum allowed value is 300000ms (5 minutes).
21+
"""

src/brand/dev/types/brand_prefetch_params.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,20 @@
22

33
from __future__ import annotations
44

5-
from typing_extensions import Required, TypedDict
5+
from typing_extensions import Required, Annotated, TypedDict
6+
7+
from .._utils import PropertyInfo
68

79
__all__ = ["BrandPrefetchParams"]
810

911

1012
class BrandPrefetchParams(TypedDict, total=False):
1113
domain: Required[str]
1214
"""Domain name to prefetch brand data for"""
15+
16+
timeout_ms: Annotated[int, PropertyInfo(alias="timeoutMS")]
17+
"""Optional timeout in milliseconds for the request.
18+
19+
If the request takes longer than this value, it will be aborted with a 408
20+
status code. Maximum allowed value is 300000ms (5 minutes).
21+
"""

src/brand/dev/types/brand_retrieve_by_ticker_params.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,20 @@
22

33
from __future__ import annotations
44

5-
from typing_extensions import Required, TypedDict
5+
from typing_extensions import Required, Annotated, TypedDict
6+
7+
from .._utils import PropertyInfo
68

79
__all__ = ["BrandRetrieveByTickerParams"]
810

911

1012
class BrandRetrieveByTickerParams(TypedDict, total=False):
1113
ticker: Required[str]
1214
"""Stock ticker symbol to retrieve brand data for (e.g. AAPL, TSLA, etc.)"""
15+
16+
timeout_ms: Annotated[int, PropertyInfo(alias="timeoutMS")]
17+
"""Optional timeout in milliseconds for the request.
18+
19+
If the request takes longer than this value, it will be aborted with a 408
20+
status code. Maximum allowed value is 300000ms (5 minutes).
21+
"""

src/brand/dev/types/brand_retrieve_naics_params.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
from __future__ import annotations
44

5-
from typing_extensions import Required, TypedDict
5+
from typing_extensions import Required, Annotated, TypedDict
6+
7+
from .._utils import PropertyInfo
68

79
__all__ = ["BrandRetrieveNaicsParams"]
810

@@ -14,3 +16,10 @@ class BrandRetrieveNaicsParams(TypedDict, total=False):
1416
If a valid domain is provided in `input`, it will be used for classification,
1517
otherwise, we will search for the brand using the provided title.
1618
"""
19+
20+
timeout_ms: Annotated[int, PropertyInfo(alias="timeoutMS")]
21+
"""Optional timeout in milliseconds for the request.
22+
23+
If the request takes longer than this value, it will be aborted with a 408
24+
status code. Maximum allowed value is 300000ms (5 minutes).
25+
"""

src/brand/dev/types/brand_retrieve_params.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,10 @@ class BrandRetrieveParams(TypedDict, total=False):
7575
When set to true, the API will skip time-consuming operations for faster
7676
response at the cost of less comprehensive data.
7777
"""
78+
79+
timeout_ms: Annotated[int, PropertyInfo(alias="timeoutMS")]
80+
"""Optional timeout in milliseconds for the request.
81+
82+
If the request takes longer than this value, it will be aborted with a 408
83+
status code. Maximum allowed value is 300000ms (5 minutes).
84+
"""

src/brand/dev/types/brand_search_params.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,20 @@
22

33
from __future__ import annotations
44

5-
from typing_extensions import Required, TypedDict
5+
from typing_extensions import Required, Annotated, TypedDict
6+
7+
from .._utils import PropertyInfo
68

79
__all__ = ["BrandSearchParams"]
810

911

1012
class BrandSearchParams(TypedDict, total=False):
1113
query: Required[str]
1214
"""Query string to search brands"""
15+
16+
timeout_ms: Annotated[int, PropertyInfo(alias="timeoutMS")]
17+
"""Optional timeout in milliseconds for the request.
18+
19+
If the request takes longer than this value, it will be aborted with a 408
20+
status code. Maximum allowed value is 300000ms (5 minutes).
21+
"""

tests/api_resources/test_brand.py

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def test_method_retrieve_with_all_params(self, client: BrandDev) -> None:
4040
domain="domain",
4141
force_language="albanian",
4242
max_speed=True,
43+
timeout_ms=1,
4344
)
4445
assert_matches_type(BrandRetrieveResponse, brand, path=["response"])
4546

@@ -108,6 +109,7 @@ def test_method_ai_query_with_all_params(self, client: BrandDev) -> None:
108109
"privacy_policy": True,
109110
"terms_and_conditions": True,
110111
},
112+
timeout_ms=1,
111113
)
112114
assert_matches_type(BrandAIQueryResponse, brand, path=["response"])
113115

@@ -161,6 +163,15 @@ def test_method_identify_from_transaction(self, client: BrandDev) -> None:
161163
)
162164
assert_matches_type(BrandIdentifyFromTransactionResponse, brand, path=["response"])
163165

166+
@pytest.mark.skip()
167+
@parametrize
168+
def test_method_identify_from_transaction_with_all_params(self, client: BrandDev) -> None:
169+
brand = client.brand.identify_from_transaction(
170+
transaction_info="transaction_info",
171+
timeout_ms=1,
172+
)
173+
assert_matches_type(BrandIdentifyFromTransactionResponse, brand, path=["response"])
174+
164175
@pytest.mark.skip()
165176
@parametrize
166177
def test_raw_response_identify_from_transaction(self, client: BrandDev) -> None:
@@ -195,6 +206,15 @@ def test_method_prefetch(self, client: BrandDev) -> None:
195206
)
196207
assert_matches_type(BrandPrefetchResponse, brand, path=["response"])
197208

209+
@pytest.mark.skip()
210+
@parametrize
211+
def test_method_prefetch_with_all_params(self, client: BrandDev) -> None:
212+
brand = client.brand.prefetch(
213+
domain="domain",
214+
timeout_ms=1,
215+
)
216+
assert_matches_type(BrandPrefetchResponse, brand, path=["response"])
217+
198218
@pytest.mark.skip()
199219
@parametrize
200220
def test_raw_response_prefetch(self, client: BrandDev) -> None:
@@ -229,6 +249,15 @@ def test_method_retrieve_by_ticker(self, client: BrandDev) -> None:
229249
)
230250
assert_matches_type(BrandRetrieveByTickerResponse, brand, path=["response"])
231251

252+
@pytest.mark.skip()
253+
@parametrize
254+
def test_method_retrieve_by_ticker_with_all_params(self, client: BrandDev) -> None:
255+
brand = client.brand.retrieve_by_ticker(
256+
ticker="ticker",
257+
timeout_ms=1,
258+
)
259+
assert_matches_type(BrandRetrieveByTickerResponse, brand, path=["response"])
260+
232261
@pytest.mark.skip()
233262
@parametrize
234263
def test_raw_response_retrieve_by_ticker(self, client: BrandDev) -> None:
@@ -263,6 +292,15 @@ def test_method_retrieve_naics(self, client: BrandDev) -> None:
263292
)
264293
assert_matches_type(BrandRetrieveNaicsResponse, brand, path=["response"])
265294

295+
@pytest.mark.skip()
296+
@parametrize
297+
def test_method_retrieve_naics_with_all_params(self, client: BrandDev) -> None:
298+
brand = client.brand.retrieve_naics(
299+
input="input",
300+
timeout_ms=1,
301+
)
302+
assert_matches_type(BrandRetrieveNaicsResponse, brand, path=["response"])
303+
266304
@pytest.mark.skip()
267305
@parametrize
268306
def test_raw_response_retrieve_naics(self, client: BrandDev) -> None:
@@ -297,6 +335,15 @@ def test_method_search(self, client: BrandDev) -> None:
297335
)
298336
assert_matches_type(BrandSearchResponse, brand, path=["response"])
299337

338+
@pytest.mark.skip()
339+
@parametrize
340+
def test_method_search_with_all_params(self, client: BrandDev) -> None:
341+
brand = client.brand.search(
342+
query="query",
343+
timeout_ms=1,
344+
)
345+
assert_matches_type(BrandSearchResponse, brand, path=["response"])
346+
300347
@pytest.mark.skip()
301348
@parametrize
302349
def test_raw_response_search(self, client: BrandDev) -> None:
@@ -342,6 +389,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncBrandDev
342389
domain="domain",
343390
force_language="albanian",
344391
max_speed=True,
392+
timeout_ms=1,
345393
)
346394
assert_matches_type(BrandRetrieveResponse, brand, path=["response"])
347395

@@ -410,6 +458,7 @@ async def test_method_ai_query_with_all_params(self, async_client: AsyncBrandDev
410458
"privacy_policy": True,
411459
"terms_and_conditions": True,
412460
},
461+
timeout_ms=1,
413462
)
414463
assert_matches_type(BrandAIQueryResponse, brand, path=["response"])
415464

@@ -463,6 +512,15 @@ async def test_method_identify_from_transaction(self, async_client: AsyncBrandDe
463512
)
464513
assert_matches_type(BrandIdentifyFromTransactionResponse, brand, path=["response"])
465514

515+
@pytest.mark.skip()
516+
@parametrize
517+
async def test_method_identify_from_transaction_with_all_params(self, async_client: AsyncBrandDev) -> None:
518+
brand = await async_client.brand.identify_from_transaction(
519+
transaction_info="transaction_info",
520+
timeout_ms=1,
521+
)
522+
assert_matches_type(BrandIdentifyFromTransactionResponse, brand, path=["response"])
523+
466524
@pytest.mark.skip()
467525
@parametrize
468526
async def test_raw_response_identify_from_transaction(self, async_client: AsyncBrandDev) -> None:
@@ -497,6 +555,15 @@ async def test_method_prefetch(self, async_client: AsyncBrandDev) -> None:
497555
)
498556
assert_matches_type(BrandPrefetchResponse, brand, path=["response"])
499557

558+
@pytest.mark.skip()
559+
@parametrize
560+
async def test_method_prefetch_with_all_params(self, async_client: AsyncBrandDev) -> None:
561+
brand = await async_client.brand.prefetch(
562+
domain="domain",
563+
timeout_ms=1,
564+
)
565+
assert_matches_type(BrandPrefetchResponse, brand, path=["response"])
566+
500567
@pytest.mark.skip()
501568
@parametrize
502569
async def test_raw_response_prefetch(self, async_client: AsyncBrandDev) -> None:
@@ -531,6 +598,15 @@ async def test_method_retrieve_by_ticker(self, async_client: AsyncBrandDev) -> N
531598
)
532599
assert_matches_type(BrandRetrieveByTickerResponse, brand, path=["response"])
533600

601+
@pytest.mark.skip()
602+
@parametrize
603+
async def test_method_retrieve_by_ticker_with_all_params(self, async_client: AsyncBrandDev) -> None:
604+
brand = await async_client.brand.retrieve_by_ticker(
605+
ticker="ticker",
606+
timeout_ms=1,
607+
)
608+
assert_matches_type(BrandRetrieveByTickerResponse, brand, path=["response"])
609+
534610
@pytest.mark.skip()
535611
@parametrize
536612
async def test_raw_response_retrieve_by_ticker(self, async_client: AsyncBrandDev) -> None:
@@ -565,6 +641,15 @@ async def test_method_retrieve_naics(self, async_client: AsyncBrandDev) -> None:
565641
)
566642
assert_matches_type(BrandRetrieveNaicsResponse, brand, path=["response"])
567643

644+
@pytest.mark.skip()
645+
@parametrize
646+
async def test_method_retrieve_naics_with_all_params(self, async_client: AsyncBrandDev) -> None:
647+
brand = await async_client.brand.retrieve_naics(
648+
input="input",
649+
timeout_ms=1,
650+
)
651+
assert_matches_type(BrandRetrieveNaicsResponse, brand, path=["response"])
652+
568653
@pytest.mark.skip()
569654
@parametrize
570655
async def test_raw_response_retrieve_naics(self, async_client: AsyncBrandDev) -> None:
@@ -599,6 +684,15 @@ async def test_method_search(self, async_client: AsyncBrandDev) -> None:
599684
)
600685
assert_matches_type(BrandSearchResponse, brand, path=["response"])
601686

687+
@pytest.mark.skip()
688+
@parametrize
689+
async def test_method_search_with_all_params(self, async_client: AsyncBrandDev) -> None:
690+
brand = await async_client.brand.search(
691+
query="query",
692+
timeout_ms=1,
693+
)
694+
assert_matches_type(BrandSearchResponse, brand, path=["response"])
695+
602696
@pytest.mark.skip()
603697
@parametrize
604698
async def test_raw_response_search(self, async_client: AsyncBrandDev) -> None:

0 commit comments

Comments
 (0)