Skip to content

Commit 08d9b02

Browse files
feat(api): api update
1 parent b66fcc2 commit 08d9b02

13 files changed

Lines changed: 62 additions & 145 deletions

‎.stats.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 30
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-d49b84cf1125618f171698ff1ee4ff9a8d04151619cb4a56d650103869834465.yml
3-
openapi_spec_hash: 49b7a6f59dcdff1e2bf88feb6474a562
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-8cd70a2b5bd380b75e5f94dc376bd8c704ee0431bdfe8af1b017facc2b883097.yml
3+
openapi_spec_hash: bb1d32ae5c46be85ee8bb3b13f5b1150
44
config_hash: daabb160675d86b354711da1e77e5129

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

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ def extract_product(
6969
younger than this many milliseconds. Defaults to 7 days (604800000 ms) when
7070
omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
7171
72-
tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
73-
request's usage log and can be used to filter usage on the dashboard usage page.
74-
Up to 20 tags, each 1-50 characters.
72+
tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
7573
7674
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
7775
than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -133,9 +131,7 @@ def extract_products(
133131
134132
max_products: Maximum number of products to extract.
135133
136-
tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
137-
request's usage log and can be used to filter usage on the dashboard usage page.
138-
Up to 20 tags, each 1-50 characters.
134+
tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
139135
140136
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
141137
than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -183,9 +179,7 @@ def extract_products(
183179
184180
max_products: Maximum number of products to extract.
185181
186-
tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
187-
request's usage log and can be used to filter usage on the dashboard usage page.
188-
Up to 20 tags, each 1-50 characters.
182+
tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
189183
190184
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
191185
than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -283,9 +277,7 @@ async def extract_product(
283277
younger than this many milliseconds. Defaults to 7 days (604800000 ms) when
284278
omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
285279
286-
tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
287-
request's usage log and can be used to filter usage on the dashboard usage page.
288-
Up to 20 tags, each 1-50 characters.
280+
tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
289281
290282
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
291283
than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -347,9 +339,7 @@ async def extract_products(
347339
348340
max_products: Maximum number of products to extract.
349341
350-
tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
351-
request's usage log and can be used to filter usage on the dashboard usage page.
352-
Up to 20 tags, each 1-50 characters.
342+
tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
353343
354344
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
355345
than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -397,9 +387,7 @@ async def extract_products(
397387
398388
max_products: Maximum number of products to extract.
399389
400-
tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
401-
request's usage log and can be used to filter usage on the dashboard usage page.
402-
Up to 20 tags, each 1-50 characters.
390+
tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
403391
404392
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
405393
than this value, it will be aborted with a 408 status code. Maximum allowed

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

Lines changed: 12 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,7 @@ def retrieve(
209209
the API will skip time-consuming operations for faster response at the cost of
210210
less comprehensive data.
211211
212-
tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
213-
request's usage log and can be used to filter usage on the dashboard usage page.
214-
Up to 20 tags, each 1-50 characters.
212+
tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
215213
216214
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
217215
than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -395,9 +393,7 @@ def retrieve(
395393
the API will skip time-consuming operations for faster response at the cost of
396394
less comprehensive data.
397395
398-
tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
399-
request's usage log and can be used to filter usage on the dashboard usage page.
400-
Up to 20 tags, each 1-50 characters.
396+
tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
401397
402398
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
403399
than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -577,9 +573,7 @@ def retrieve(
577573
the API will skip time-consuming operations for faster response at the cost of
578574
less comprehensive data.
579575
580-
tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
581-
request's usage log and can be used to filter usage on the dashboard usage page.
582-
Up to 20 tags, each 1-50 characters.
576+
tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
583577
584578
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
585579
than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -760,9 +754,7 @@ def retrieve(
760754
the API will skip time-consuming operations for faster response at the cost of
761755
less comprehensive data.
762756
763-
tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
764-
request's usage log and can be used to filter usage on the dashboard usage page.
765-
Up to 20 tags, each 1-50 characters.
757+
tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
766758
767759
ticker_exchange: Optional stock exchange for the ticker. Defaults to NASDAQ if not specified.
768760
@@ -810,9 +802,7 @@ def retrieve(
810802
811803
type: Discriminator for direct-URL-based brand retrieval.
812804
813-
tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
814-
request's usage log and can be used to filter usage on the dashboard usage page.
815-
Up to 20 tags, each 1-50 characters.
805+
tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
816806
817807
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
818808
than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -1004,9 +994,7 @@ def retrieve(
1004994
1005995
phone: Optional phone number from the transaction to help verify brand match.
1006996
1007-
tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
1008-
request's usage log and can be used to filter usage on the dashboard usage page.
1009-
Up to 20 tags, each 1-50 characters.
997+
tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
1010998
1011999
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
10121000
than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -1470,9 +1458,7 @@ async def retrieve(
14701458
the API will skip time-consuming operations for faster response at the cost of
14711459
less comprehensive data.
14721460
1473-
tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
1474-
request's usage log and can be used to filter usage on the dashboard usage page.
1475-
Up to 20 tags, each 1-50 characters.
1461+
tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
14761462
14771463
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
14781464
than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -1656,9 +1642,7 @@ async def retrieve(
16561642
the API will skip time-consuming operations for faster response at the cost of
16571643
less comprehensive data.
16581644
1659-
tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
1660-
request's usage log and can be used to filter usage on the dashboard usage page.
1661-
Up to 20 tags, each 1-50 characters.
1645+
tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
16621646
16631647
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
16641648
than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -1838,9 +1822,7 @@ async def retrieve(
18381822
the API will skip time-consuming operations for faster response at the cost of
18391823
less comprehensive data.
18401824
1841-
tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
1842-
request's usage log and can be used to filter usage on the dashboard usage page.
1843-
Up to 20 tags, each 1-50 characters.
1825+
tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
18441826
18451827
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
18461828
than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -2021,9 +2003,7 @@ async def retrieve(
20212003
the API will skip time-consuming operations for faster response at the cost of
20222004
less comprehensive data.
20232005
2024-
tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
2025-
request's usage log and can be used to filter usage on the dashboard usage page.
2026-
Up to 20 tags, each 1-50 characters.
2006+
tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
20272007
20282008
ticker_exchange: Optional stock exchange for the ticker. Defaults to NASDAQ if not specified.
20292009
@@ -2071,9 +2051,7 @@ async def retrieve(
20712051
20722052
type: Discriminator for direct-URL-based brand retrieval.
20732053
2074-
tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
2075-
request's usage log and can be used to filter usage on the dashboard usage page.
2076-
Up to 20 tags, each 1-50 characters.
2054+
tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
20772055
20782056
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
20792057
than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -2265,9 +2243,7 @@ async def retrieve(
22652243
22662244
phone: Optional phone number from the transaction to help verify brand match.
22672245
2268-
tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
2269-
request's usage log and can be used to filter usage on the dashboard usage page.
2270-
Up to 20 tags, each 1-50 characters.
2246+
tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
22712247
22722248
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
22732249
than this value, it will be aborted with a 408 status code. Maximum allowed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ def prefetch(
6969
7070
type: What to prefetch. Currently only 'brand' is supported.
7171
72-
tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
73-
request's usage log and can be used to filter usage on the dashboard usage page.
74-
Up to 20 tags, each 1-50 characters.
72+
tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
7573
7674
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
7775
than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -149,9 +147,7 @@ async def prefetch(
149147
150148
type: What to prefetch. Currently only 'brand' is supported.
151149
152-
tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
153-
request's usage log and can be used to filter usage on the dashboard usage page.
154-
Up to 20 tags, each 1-50 characters.
150+
tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
155151
156152
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
157153
than this value, it will be aborted with a 408 status code. Maximum allowed

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

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ def extract(
7979
max_depth: int | Omit = omit,
8080
max_pages: int | Omit = omit,
8181
pdf: web_extract_params.Pdf | Omit = omit,
82+
settle_animations: bool | Omit = omit,
8283
stop_after_ms: int | Omit = omit,
8384
tags: SequenceNotStr[str] | Omit = omit,
8485
timeout_ms: int | Omit = omit,
@@ -124,12 +125,14 @@ def extract(
124125
125126
max_pages: Maximum number of pages to analyze for extraction. Hard cap: 50. Defaults to 5.
126127
128+
settle_animations: When true, waits briefly for CSS and transition animations to settle before
129+
extracting each crawled page. Defaults to false. This adds a bit of latency in
130+
exchange for more stable output on animated pages.
131+
127132
stop_after_ms: Soft time budget for the crawl in milliseconds. Min: 10000 (10s). Max: 110000
128133
(110s). Default: 80000 (80s).
129134
130-
tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
131-
request's usage log and can be used to filter usage on the dashboard usage page.
132-
Up to 20 tags, each 1-50 characters.
135+
tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
133136
134137
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
135138
than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -160,6 +163,7 @@ def extract(
160163
"max_depth": max_depth,
161164
"max_pages": max_pages,
162165
"pdf": pdf,
166+
"settle_animations": settle_animations,
163167
"stop_after_ms": stop_after_ms,
164168
"tags": tags,
165169
"timeout_ms": timeout_ms,
@@ -988,9 +992,7 @@ def search(
988992
989993
query_fanout: Expand the query into multiple parallel variants for broader recall.
990994
991-
tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
992-
request's usage log and can be used to filter usage on the dashboard usage page.
993-
Up to 20 tags, each 1-50 characters.
995+
tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
994996
995997
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
996998
than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -1316,9 +1318,7 @@ def web_crawl_md(
13161318
instead of continuing. Min: 10000 (10s). Max: 110000 (110s). Default: 80000
13171319
(80s).
13181320
1319-
tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
1320-
request's usage log and can be used to filter usage on the dashboard usage page.
1321-
Up to 20 tags, each 1-50 characters.
1321+
tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
13221322
13231323
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
13241324
than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -2227,6 +2227,7 @@ async def extract(
22272227
max_depth: int | Omit = omit,
22282228
max_pages: int | Omit = omit,
22292229
pdf: web_extract_params.Pdf | Omit = omit,
2230+
settle_animations: bool | Omit = omit,
22302231
stop_after_ms: int | Omit = omit,
22312232
tags: SequenceNotStr[str] | Omit = omit,
22322233
timeout_ms: int | Omit = omit,
@@ -2272,12 +2273,14 @@ async def extract(
22722273
22732274
max_pages: Maximum number of pages to analyze for extraction. Hard cap: 50. Defaults to 5.
22742275
2276+
settle_animations: When true, waits briefly for CSS and transition animations to settle before
2277+
extracting each crawled page. Defaults to false. This adds a bit of latency in
2278+
exchange for more stable output on animated pages.
2279+
22752280
stop_after_ms: Soft time budget for the crawl in milliseconds. Min: 10000 (10s). Max: 110000
22762281
(110s). Default: 80000 (80s).
22772282
2278-
tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
2279-
request's usage log and can be used to filter usage on the dashboard usage page.
2280-
Up to 20 tags, each 1-50 characters.
2283+
tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
22812284
22822285
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
22832286
than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -2308,6 +2311,7 @@ async def extract(
23082311
"max_depth": max_depth,
23092312
"max_pages": max_pages,
23102313
"pdf": pdf,
2314+
"settle_animations": settle_animations,
23112315
"stop_after_ms": stop_after_ms,
23122316
"tags": tags,
23132317
"timeout_ms": timeout_ms,
@@ -3136,9 +3140,7 @@ async def search(
31363140
31373141
query_fanout: Expand the query into multiple parallel variants for broader recall.
31383142
3139-
tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
3140-
request's usage log and can be used to filter usage on the dashboard usage page.
3141-
Up to 20 tags, each 1-50 characters.
3143+
tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
31423144
31433145
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
31443146
than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -3464,9 +3466,7 @@ async def web_crawl_md(
34643466
instead of continuing. Min: 10000 (10s). Max: 110000 (110s). Default: 80000
34653467
(80s).
34663468
3467-
tags: Optional caller-defined tags for tracking this request. Tags are recorded on the
3468-
request's usage log and can be used to filter usage on the dashboard usage page.
3469-
Up to 20 tags, each 1-50 characters.
3469+
tags: Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
34703470
34713471
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
34723472
than this value, it will be aborted with a 408 status code. Maximum allowed

0 commit comments

Comments
 (0)