Skip to content

Commit 85ac787

Browse files
author
stlc-bot
committed
fix(api): honour maxAgeMs=0 on brand retrieve, styleguide and fonts endpoints (#998)
Stainless-Generated-From: 95e9fcb
1 parent 309f8f9 commit 85ac787

6 files changed

Lines changed: 63 additions & 63 deletions

File tree

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

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,9 @@ def retrieve(
202202
type: Discriminator for domain-based brand retrieval.
203203
204204
max_age_ms: Maximum age in milliseconds for cached brand data before the API performs a hard
205-
refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
206-
are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
207-
year.
205+
refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
206+
refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
207+
are clamped to 1 year.
208208
209209
max_speed: Optional parameter to optimize the API call for maximum speed. When set to true,
210210
the API will skip time-consuming operations for faster response at the cost of
@@ -386,9 +386,9 @@ def retrieve(
386386
by company name.
387387
388388
max_age_ms: Maximum age in milliseconds for cached brand data before the API performs a hard
389-
refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
390-
are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
391-
year.
389+
refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
390+
refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
391+
are clamped to 1 year.
392392
393393
max_speed: Optional parameter to optimize the API call for maximum speed. When set to true,
394394
the API will skip time-consuming operations for faster response at the cost of
@@ -566,9 +566,9 @@ def retrieve(
566566
type: Discriminator for email-based brand retrieval.
567567
568568
max_age_ms: Maximum age in milliseconds for cached brand data before the API performs a hard
569-
refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
570-
are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
571-
year.
569+
refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
570+
refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
571+
are clamped to 1 year.
572572
573573
max_speed: Optional parameter to optimize the API call for maximum speed. When set to true,
574574
the API will skip time-consuming operations for faster response at the cost of
@@ -747,9 +747,9 @@ def retrieve(
747747
type: Discriminator for ticker-based brand retrieval.
748748
749749
max_age_ms: Maximum age in milliseconds for cached brand data before the API performs a hard
750-
refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
751-
are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
752-
year.
750+
refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
751+
refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
752+
are clamped to 1 year.
753753
754754
max_speed: Optional parameter to optimize the API call for maximum speed. When set to true,
755755
the API will skip time-consuming operations for faster response at the cost of
@@ -1231,9 +1231,9 @@ def retrieve_simplified(
12311231
domain: Domain name to retrieve simplified brand data for
12321232
12331233
max_age_ms: Maximum age in milliseconds for cached brand data before the API performs a hard
1234-
refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
1235-
are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
1236-
year.
1234+
refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
1235+
refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
1236+
are clamped to 1 year.
12371237
12381238
tags: Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50
12391239
characters.
@@ -1513,9 +1513,9 @@ async def retrieve(
15131513
type: Discriminator for domain-based brand retrieval.
15141514
15151515
max_age_ms: Maximum age in milliseconds for cached brand data before the API performs a hard
1516-
refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
1517-
are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
1518-
year.
1516+
refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
1517+
refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
1518+
are clamped to 1 year.
15191519
15201520
max_speed: Optional parameter to optimize the API call for maximum speed. When set to true,
15211521
the API will skip time-consuming operations for faster response at the cost of
@@ -1697,9 +1697,9 @@ async def retrieve(
16971697
by company name.
16981698
16991699
max_age_ms: Maximum age in milliseconds for cached brand data before the API performs a hard
1700-
refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
1701-
are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
1702-
year.
1700+
refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
1701+
refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
1702+
are clamped to 1 year.
17031703
17041704
max_speed: Optional parameter to optimize the API call for maximum speed. When set to true,
17051705
the API will skip time-consuming operations for faster response at the cost of
@@ -1877,9 +1877,9 @@ async def retrieve(
18771877
type: Discriminator for email-based brand retrieval.
18781878
18791879
max_age_ms: Maximum age in milliseconds for cached brand data before the API performs a hard
1880-
refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
1881-
are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
1882-
year.
1880+
refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
1881+
refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
1882+
are clamped to 1 year.
18831883
18841884
max_speed: Optional parameter to optimize the API call for maximum speed. When set to true,
18851885
the API will skip time-consuming operations for faster response at the cost of
@@ -2058,9 +2058,9 @@ async def retrieve(
20582058
type: Discriminator for ticker-based brand retrieval.
20592059
20602060
max_age_ms: Maximum age in milliseconds for cached brand data before the API performs a hard
2061-
refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
2062-
are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
2063-
year.
2061+
refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
2062+
refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
2063+
are clamped to 1 year.
20642064
20652065
max_speed: Optional parameter to optimize the API call for maximum speed. When set to true,
20662066
the API will skip time-consuming operations for faster response at the cost of
@@ -2542,9 +2542,9 @@ async def retrieve_simplified(
25422542
domain: Domain name to retrieve simplified brand data for
25432543
25442544
max_age_ms: Maximum age in milliseconds for cached brand data before the API performs a hard
2545-
refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
2546-
are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
2547-
year.
2545+
refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
2546+
refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
2547+
are clamped to 1 year.
25482548
25492549
tags: Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50
25502550
characters.

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@ def extract_fonts(
275275
'domain' or 'directUrl', but not both.
276276
277277
max_age_ms: Maximum age in milliseconds for cached brand data before the API performs a hard
278-
refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
279-
are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
280-
year.
278+
refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
279+
refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
280+
are clamped to 1 year.
281281
282282
tags: Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50
283283
characters.
@@ -349,9 +349,9 @@ def extract_styleguide(
349349
'domain' or 'directUrl', but not both.
350350
351351
max_age_ms: Maximum age in milliseconds for cached brand data before the API performs a hard
352-
refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
353-
are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
354-
year.
352+
refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
353+
refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
354+
are clamped to 1 year.
355355
356356
tags: Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50
357357
characters.
@@ -2530,9 +2530,9 @@ async def extract_fonts(
25302530
'domain' or 'directUrl', but not both.
25312531
25322532
max_age_ms: Maximum age in milliseconds for cached brand data before the API performs a hard
2533-
refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
2534-
are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
2535-
year.
2533+
refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
2534+
refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
2535+
are clamped to 1 year.
25362536
25372537
tags: Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50
25382538
characters.
@@ -2604,9 +2604,9 @@ async def extract_styleguide(
26042604
'domain' or 'directUrl', but not both.
26052605
26062606
max_age_ms: Maximum age in milliseconds for cached brand data before the API performs a hard
2607-
refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
2608-
are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
2609-
year.
2607+
refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
2608+
refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
2609+
are clamped to 1 year.
26102610
26112611
tags: Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50
26122612
characters.

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ class BrandRetrieveByDomainRequest(TypedDict, total=False):
154154
max_age_ms: Annotated[int, PropertyInfo(alias="maxAgeMs")]
155155
"""
156156
Maximum age in milliseconds for cached brand data before the API performs a hard
157-
refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
158-
are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
159-
year.
157+
refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
158+
refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
159+
are clamped to 1 year.
160160
"""
161161

162162
max_speed: Annotated[bool, PropertyInfo(alias="maxSpeed")]
@@ -318,9 +318,9 @@ class BrandRetrieveByNameRequest(TypedDict, total=False):
318318
max_age_ms: Annotated[int, PropertyInfo(alias="maxAgeMs")]
319319
"""
320320
Maximum age in milliseconds for cached brand data before the API performs a hard
321-
refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
322-
are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
323-
year.
321+
refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
322+
refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
323+
are clamped to 1 year.
324324
"""
325325

326326
max_speed: Annotated[bool, PropertyInfo(alias="maxSpeed")]
@@ -476,9 +476,9 @@ class BrandRetrieveByEmailRequest(TypedDict, total=False):
476476
max_age_ms: Annotated[int, PropertyInfo(alias="maxAgeMs")]
477477
"""
478478
Maximum age in milliseconds for cached brand data before the API performs a hard
479-
refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
480-
are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
481-
year.
479+
refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
480+
refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
481+
are clamped to 1 year.
482482
"""
483483

484484
max_speed: Annotated[bool, PropertyInfo(alias="maxSpeed")]
@@ -634,9 +634,9 @@ class BrandRetrieveByTickerRequest(TypedDict, total=False):
634634
max_age_ms: Annotated[int, PropertyInfo(alias="maxAgeMs")]
635635
"""
636636
Maximum age in milliseconds for cached brand data before the API performs a hard
637-
refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
638-
are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
639-
year.
637+
refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
638+
refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
639+
are clamped to 1 year.
640640
"""
641641

642642
max_speed: Annotated[bool, PropertyInfo(alias="maxSpeed")]

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ class BrandRetrieveSimplifiedParams(TypedDict, total=False):
1818
max_age_ms: Annotated[Optional[int], PropertyInfo(alias="maxAgeMs")]
1919
"""
2020
Maximum age in milliseconds for cached brand data before the API performs a hard
21-
refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
22-
are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
23-
year.
21+
refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
22+
refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
23+
are clamped to 1 year.
2424
"""
2525

2626
tags: SequenceNotStr[str]

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ class WebExtractFontsParams(TypedDict, total=False):
2929
max_age_ms: Annotated[Optional[int], PropertyInfo(alias="maxAgeMs")]
3030
"""
3131
Maximum age in milliseconds for cached brand data before the API performs a hard
32-
refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
33-
are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
34-
year.
32+
refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
33+
refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
34+
are clamped to 1 year.
3535
"""
3636

3737
tags: SequenceNotStr[str]

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ class WebExtractStyleguideParams(TypedDict, total=False):
3636
max_age_ms: Annotated[Optional[int], PropertyInfo(alias="maxAgeMs")]
3737
"""
3838
Maximum age in milliseconds for cached brand data before the API performs a hard
39-
refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
40-
are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
41-
year.
39+
refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
40+
refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
41+
are clamped to 1 year.
4242
"""
4343

4444
tags: SequenceNotStr[str]

0 commit comments

Comments
 (0)