Skip to content

Commit b9374f5

Browse files
feat(api): api update
1 parent ba47230 commit b9374f5

2 files changed

Lines changed: 35 additions & 3 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: 21
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-8c7755d44545e3f10ee595024c331242e5428ba79df4710c8e02e8802219d3b6.yml
3-
openapi_spec_hash: 699ef094c46d731c3234408056b06aef
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-86caee6743259bcab1e72868d17acdfc8a515d51b6d9b1e9a1dca49cdd3bd8da.yml
3+
openapi_spec_hash: c0855025a8590139f57db43dd3e1bad1
44
config_hash: 682b89b02a20f5d1c13e2c91ecbcf5ce

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

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import List, Optional
3+
from typing import Dict, List, Optional
44
from typing_extensions import Literal
55

66
from pydantic import Field as FieldInfo
@@ -18,6 +18,7 @@
1818
"StyleguideComponentsButtonSecondary",
1919
"StyleguideComponentsCard",
2020
"StyleguideElementSpacing",
21+
"StyleguideFontLinks",
2122
"StyleguideShadows",
2223
"StyleguideTypography",
2324
"StyleguideTypographyHeadings",
@@ -244,6 +245,30 @@ class StyleguideElementSpacing(BaseModel):
244245
xs: str
245246

246247

248+
class StyleguideFontLinks(BaseModel):
249+
files: Dict[str, str]
250+
"""Upright font files keyed by weight string (e.g.
251+
252+
"400" for regular, "500", "700"). Values are absolute URLs.
253+
"""
254+
255+
type: Literal["google", "custom"]
256+
257+
category: Optional[str] = None
258+
"""Google Fonts category when type is google (e.g.
259+
260+
sans-serif, serif, monospace, display, handwriting). Omitted for custom fonts
261+
when unknown.
262+
"""
263+
264+
display_name: Optional[str] = FieldInfo(alias="displayName", default=None)
265+
"""
266+
Present when type is custom: human-readable name derived from the fontLinks key
267+
(strip build/hash suffixes, split camelCase / PascalCase, normalize separators).
268+
Google entries omit this.
269+
"""
270+
271+
247272
class StyleguideShadows(BaseModel):
248273
"""Shadow styles used on the website"""
249274

@@ -371,6 +396,13 @@ class Styleguide(BaseModel):
371396
element_spacing: StyleguideElementSpacing = FieldInfo(alias="elementSpacing")
372397
"""Spacing system used on the website"""
373398

399+
font_links: Dict[str, StyleguideFontLinks] = FieldInfo(alias="fontLinks")
400+
"""
401+
Font assets keyed by family name as it appears in fontFamily/fontFallbacks
402+
(non-generic names only). Clients match typography.fontFamily / fontWeight or
403+
button styles to pick a file URL from files.
404+
"""
405+
374406
mode: Literal["light", "dark"]
375407
"""The primary color mode of the website design"""
376408

0 commit comments

Comments
 (0)