Skip to content

Commit 7ce5f5b

Browse files
feat(api): api update
1 parent 90dcf23 commit 7ce5f5b

2 files changed

Lines changed: 38 additions & 4 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-571a58f35555a19e8ca5581dc53e6aeb8f9a8d58ae98e2f3c1a1c06463007a9f.yml
3-
openapi_spec_hash: 4ad9b0a6fc6f6c64a84b531fdafa80bf
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-3020cfc216e9d0b8f59d6ec1c186c857531dc20a6536746e2a28d00261c70ad2.yml
3+
openapi_spec_hash: 6bb12c5f849e2523bb813e9f56804832
44
config_hash: 7d13dca2b2c6f71fc463cb6062efa5ea

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

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

3-
from typing import List
3+
from typing import Dict, List, Optional
4+
from typing_extensions import Literal
5+
6+
from pydantic import Field as FieldInfo
47

58
from .._models import BaseModel
69

7-
__all__ = ["WebExtractFontsResponse", "Font"]
10+
__all__ = ["WebExtractFontsResponse", "Font", "FontLinks"]
811

912

1013
class Font(BaseModel):
@@ -30,6 +33,30 @@ class Font(BaseModel):
3033
"""Array of CSS selectors or element types where this font is used"""
3134

3235

36+
class FontLinks(BaseModel):
37+
files: Dict[str, str]
38+
"""Upright font files keyed by weight string (e.g.
39+
40+
"400" for regular, "500", "700"). Values are absolute URLs.
41+
"""
42+
43+
type: Literal["google", "custom"]
44+
45+
category: Optional[str] = None
46+
"""Google Fonts category when type is google (e.g.
47+
48+
sans-serif, serif, monospace, display, handwriting). Omitted for custom fonts
49+
when unknown.
50+
"""
51+
52+
display_name: Optional[str] = FieldInfo(alias="displayName", default=None)
53+
"""
54+
Present when type is custom: human-readable name derived from the fontLinks key
55+
(strip build/hash suffixes, split camelCase / PascalCase, normalize separators).
56+
Google entries omit this.
57+
"""
58+
59+
3360
class WebExtractFontsResponse(BaseModel):
3461
code: int
3562
"""HTTP status code, e.g., 200"""
@@ -42,3 +69,10 @@ class WebExtractFontsResponse(BaseModel):
4269

4370
status: str
4471
"""Status of the response, e.g., 'ok'"""
72+
73+
font_links: Optional[Dict[str, FontLinks]] = FieldInfo(alias="fontLinks", default=None)
74+
"""
75+
Font assets keyed by family name as it appears in the fonts array (non-generic
76+
names only). Clients match entries in fonts to pick a file URL from files.
77+
Omitted when no families resolve to Google or custom @font-face URLs.
78+
"""

0 commit comments

Comments
 (0)