Skip to content

Commit 964c4b0

Browse files
feat(api): api update
1 parent fa060eb commit 964c4b0

4 files changed

Lines changed: 257 additions & 20 deletions

File tree

‎.stats.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 29
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-6fd8cb15c904d1befd41a85ef8ffa3dfda11e60d560e466857e331e177e0c1e1.yml
3-
openapi_spec_hash: 0f969f518e16e4fc41d00a5229705f5f
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-fa5c7cd62da1c7cb2eddf8c6bb1f32ca7f958be5c3c315ade6ca0a669814d75a.yml
3+
openapi_spec_hash: 8358c1a467ab971afd59d615d1e731ee
44
config_hash: ff35e224e809656528c44163aa41bebd

‎src/context/dev/resources/brand.py‎

Lines changed: 134 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,9 @@ def retrieve(
187187
188188
Provide
189189
exactly one lookup identifier in the request body: a domain, company name, email
190-
address, stock ticker, or transaction descriptor.
190+
address, stock ticker, transaction descriptor, or direct URL. Note:
191+
`by_direct_url` fetches brand data only from the provided URL — not from the
192+
entire internet.
191193
192194
Args:
193195
domain: Domain name to retrieve brand data for (e.g., 'stripe.com').
@@ -361,7 +363,9 @@ def retrieve(
361363
362364
Provide
363365
exactly one lookup identifier in the request body: a domain, company name, email
364-
address, stock ticker, or transaction descriptor.
366+
address, stock ticker, transaction descriptor, or direct URL. Note:
367+
`by_direct_url` fetches brand data only from the provided URL — not from the
368+
entire internet.
365369
366370
Args:
367371
name: Company name to retrieve brand data for (e.g., 'Apple Inc').
@@ -537,7 +541,9 @@ def retrieve(
537541
538542
Provide
539543
exactly one lookup identifier in the request body: a domain, company name, email
540-
address, stock ticker, or transaction descriptor.
544+
address, stock ticker, transaction descriptor, or direct URL. Note:
545+
`by_direct_url` fetches brand data only from the provided URL — not from the
546+
entire internet.
541547
542548
Args:
543549
email: Email address to retrieve brand data for (e.g., 'jane@stripe.com').
@@ -711,7 +717,9 @@ def retrieve(
711717
712718
Provide
713719
exactly one lookup identifier in the request body: a domain, company name, email
714-
address, stock ticker, or transaction descriptor.
720+
address, stock ticker, transaction descriptor, or direct URL. Note:
721+
`by_direct_url` fetches brand data only from the provided URL — not from the
722+
entire internet.
715723
716724
Args:
717725
ticker: Stock ticker symbol to retrieve brand data for (e.g., 'AAPL').
@@ -743,6 +751,49 @@ def retrieve(
743751
"""
744752
...
745753

754+
@overload
755+
def retrieve(
756+
self,
757+
*,
758+
direct_url: str,
759+
type: Literal["by_direct_url"],
760+
timeout_ms: int | Omit = omit,
761+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
762+
# The extra values given here take precedence over values defined on the client or passed to this method.
763+
extra_headers: Headers | None = None,
764+
extra_query: Query | None = None,
765+
extra_body: Body | None = None,
766+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
767+
) -> BrandRetrieveResponse:
768+
"""Retrieve logos, backdrops, colors, industry, description, and more.
769+
770+
Provide
771+
exactly one lookup identifier in the request body: a domain, company name, email
772+
address, stock ticker, transaction descriptor, or direct URL. Note:
773+
`by_direct_url` fetches brand data only from the provided URL — not from the
774+
entire internet.
775+
776+
Args:
777+
direct_url: Full http(s) URL to fetch brand data from (e.g.,
778+
'https://stripe.com/enterprise'). Only this URL is fetched — not the entire
779+
internet.
780+
781+
type: Discriminator for direct-URL-based brand retrieval.
782+
783+
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
784+
than this value, it will be aborted with a 408 status code. Maximum allowed
785+
value is 300000ms (5 minutes).
786+
787+
extra_headers: Send extra headers
788+
789+
extra_query: Add additional query parameters to the request
790+
791+
extra_body: Add additional JSON properties to the request
792+
793+
timeout: Override the client-level default timeout for this request, in seconds
794+
"""
795+
...
796+
746797
@overload
747798
def retrieve(
748799
self,
@@ -890,7 +941,9 @@ def retrieve(
890941
891942
Provide
892943
exactly one lookup identifier in the request body: a domain, company name, email
893-
address, stock ticker, or transaction descriptor.
944+
address, stock ticker, transaction descriptor, or direct URL. Note:
945+
`by_direct_url` fetches brand data only from the provided URL — not from the
946+
entire internet.
894947
895948
Args:
896949
transaction_info: Transaction information to identify the brand.
@@ -929,7 +982,12 @@ def retrieve(
929982
...
930983

931984
@required_args(
932-
["domain", "type"], ["name", "type"], ["email", "type"], ["ticker", "type"], ["transaction_info", "type"]
985+
["domain", "type"],
986+
["name", "type"],
987+
["email", "type"],
988+
["ticker", "type"],
989+
["direct_url", "type"],
990+
["transaction_info", "type"],
933991
)
934992
def retrieve(
935993
self,
@@ -939,6 +997,7 @@ def retrieve(
939997
| Literal["by_name"]
940998
| Literal["by_email"]
941999
| Literal["by_ticker"]
1000+
| Literal["by_direct_url"]
9421001
| Literal["by_transaction"],
9431002
force_language: Literal[
9441003
"afrikaans",
@@ -1071,6 +1130,7 @@ def retrieve(
10711130
email: str | Omit = omit,
10721131
ticker: str | Omit = omit,
10731132
ticker_exchange: str | Omit = omit,
1133+
direct_url: str | Omit = omit,
10741134
transaction_info: str | Omit = omit,
10751135
city: str | Omit = omit,
10761136
high_confidence_only: bool | Omit = omit,
@@ -1098,6 +1158,7 @@ def retrieve(
10981158
"email": email,
10991159
"ticker": ticker,
11001160
"ticker_exchange": ticker_exchange,
1161+
"direct_url": direct_url,
11011162
"transaction_info": transaction_info,
11021163
"city": city,
11031164
"high_confidence_only": high_confidence_only,
@@ -1333,7 +1394,9 @@ async def retrieve(
13331394
13341395
Provide
13351396
exactly one lookup identifier in the request body: a domain, company name, email
1336-
address, stock ticker, or transaction descriptor.
1397+
address, stock ticker, transaction descriptor, or direct URL. Note:
1398+
`by_direct_url` fetches brand data only from the provided URL — not from the
1399+
entire internet.
13371400
13381401
Args:
13391402
domain: Domain name to retrieve brand data for (e.g., 'stripe.com').
@@ -1507,7 +1570,9 @@ async def retrieve(
15071570
15081571
Provide
15091572
exactly one lookup identifier in the request body: a domain, company name, email
1510-
address, stock ticker, or transaction descriptor.
1573+
address, stock ticker, transaction descriptor, or direct URL. Note:
1574+
`by_direct_url` fetches brand data only from the provided URL — not from the
1575+
entire internet.
15111576
15121577
Args:
15131578
name: Company name to retrieve brand data for (e.g., 'Apple Inc').
@@ -1683,7 +1748,9 @@ async def retrieve(
16831748
16841749
Provide
16851750
exactly one lookup identifier in the request body: a domain, company name, email
1686-
address, stock ticker, or transaction descriptor.
1751+
address, stock ticker, transaction descriptor, or direct URL. Note:
1752+
`by_direct_url` fetches brand data only from the provided URL — not from the
1753+
entire internet.
16871754
16881755
Args:
16891756
email: Email address to retrieve brand data for (e.g., 'jane@stripe.com').
@@ -1857,7 +1924,9 @@ async def retrieve(
18571924
18581925
Provide
18591926
exactly one lookup identifier in the request body: a domain, company name, email
1860-
address, stock ticker, or transaction descriptor.
1927+
address, stock ticker, transaction descriptor, or direct URL. Note:
1928+
`by_direct_url` fetches brand data only from the provided URL — not from the
1929+
entire internet.
18611930
18621931
Args:
18631932
ticker: Stock ticker symbol to retrieve brand data for (e.g., 'AAPL').
@@ -1889,6 +1958,49 @@ async def retrieve(
18891958
"""
18901959
...
18911960

1961+
@overload
1962+
async def retrieve(
1963+
self,
1964+
*,
1965+
direct_url: str,
1966+
type: Literal["by_direct_url"],
1967+
timeout_ms: int | Omit = omit,
1968+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1969+
# The extra values given here take precedence over values defined on the client or passed to this method.
1970+
extra_headers: Headers | None = None,
1971+
extra_query: Query | None = None,
1972+
extra_body: Body | None = None,
1973+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
1974+
) -> BrandRetrieveResponse:
1975+
"""Retrieve logos, backdrops, colors, industry, description, and more.
1976+
1977+
Provide
1978+
exactly one lookup identifier in the request body: a domain, company name, email
1979+
address, stock ticker, transaction descriptor, or direct URL. Note:
1980+
`by_direct_url` fetches brand data only from the provided URL — not from the
1981+
entire internet.
1982+
1983+
Args:
1984+
direct_url: Full http(s) URL to fetch brand data from (e.g.,
1985+
'https://stripe.com/enterprise'). Only this URL is fetched — not the entire
1986+
internet.
1987+
1988+
type: Discriminator for direct-URL-based brand retrieval.
1989+
1990+
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
1991+
than this value, it will be aborted with a 408 status code. Maximum allowed
1992+
value is 300000ms (5 minutes).
1993+
1994+
extra_headers: Send extra headers
1995+
1996+
extra_query: Add additional query parameters to the request
1997+
1998+
extra_body: Add additional JSON properties to the request
1999+
2000+
timeout: Override the client-level default timeout for this request, in seconds
2001+
"""
2002+
...
2003+
18922004
@overload
18932005
async def retrieve(
18942006
self,
@@ -2036,7 +2148,9 @@ async def retrieve(
20362148
20372149
Provide
20382150
exactly one lookup identifier in the request body: a domain, company name, email
2039-
address, stock ticker, or transaction descriptor.
2151+
address, stock ticker, transaction descriptor, or direct URL. Note:
2152+
`by_direct_url` fetches brand data only from the provided URL — not from the
2153+
entire internet.
20402154
20412155
Args:
20422156
transaction_info: Transaction information to identify the brand.
@@ -2075,7 +2189,12 @@ async def retrieve(
20752189
...
20762190

20772191
@required_args(
2078-
["domain", "type"], ["name", "type"], ["email", "type"], ["ticker", "type"], ["transaction_info", "type"]
2192+
["domain", "type"],
2193+
["name", "type"],
2194+
["email", "type"],
2195+
["ticker", "type"],
2196+
["direct_url", "type"],
2197+
["transaction_info", "type"],
20792198
)
20802199
async def retrieve(
20812200
self,
@@ -2085,6 +2204,7 @@ async def retrieve(
20852204
| Literal["by_name"]
20862205
| Literal["by_email"]
20872206
| Literal["by_ticker"]
2207+
| Literal["by_direct_url"]
20882208
| Literal["by_transaction"],
20892209
force_language: Literal[
20902210
"afrikaans",
@@ -2217,6 +2337,7 @@ async def retrieve(
22172337
email: str | Omit = omit,
22182338
ticker: str | Omit = omit,
22192339
ticker_exchange: str | Omit = omit,
2340+
direct_url: str | Omit = omit,
22202341
transaction_info: str | Omit = omit,
22212342
city: str | Omit = omit,
22222343
high_confidence_only: bool | Omit = omit,
@@ -2244,6 +2365,7 @@ async def retrieve(
22442365
"email": email,
22452366
"ticker": ticker,
22462367
"ticker_exchange": ticker_exchange,
2368+
"direct_url": direct_url,
22472369
"transaction_info": transaction_info,
22482370
"city": city,
22492371
"high_confidence_only": high_confidence_only,

‎src/context/dev/types/brand_retrieve_params.py‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"BrandRetrieveByNameRequest",
1414
"BrandRetrieveByEmailRequest",
1515
"BrandRetrieveByTickerRequest",
16+
"BrandRetrieveByDirectURLRequest",
1617
"BrandRetrieveFromTransactionRequest",
1718
]
1819

@@ -638,6 +639,25 @@ class BrandRetrieveByTickerRequest(TypedDict, total=False):
638639
"""
639640

640641

642+
class BrandRetrieveByDirectURLRequest(TypedDict, total=False):
643+
direct_url: Required[str]
644+
"""
645+
Full http(s) URL to fetch brand data from (e.g.,
646+
'https://stripe.com/enterprise'). Only this URL is fetched — not the entire
647+
internet.
648+
"""
649+
650+
type: Required[Literal["by_direct_url"]]
651+
"""Discriminator for direct-URL-based brand retrieval."""
652+
653+
timeout_ms: Annotated[int, PropertyInfo(alias="timeoutMS")]
654+
"""Optional timeout in milliseconds for the request.
655+
656+
If the request takes longer than this value, it will be aborted with a 408
657+
status code. Maximum allowed value is 300000ms (5 minutes).
658+
"""
659+
660+
641661
class BrandRetrieveFromTransactionRequest(TypedDict, total=False):
642662
transaction_info: Required[str]
643663
"""Transaction information to identify the brand."""
@@ -812,5 +832,6 @@ class BrandRetrieveFromTransactionRequest(TypedDict, total=False):
812832
BrandRetrieveByNameRequest,
813833
BrandRetrieveByEmailRequest,
814834
BrandRetrieveByTickerRequest,
835+
BrandRetrieveByDirectURLRequest,
815836
BrandRetrieveFromTransactionRequest,
816837
]

0 commit comments

Comments
 (0)