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
58from .._models import BaseModel
69
7- __all__ = ["WebExtractFontsResponse" , "Font" ]
10+ __all__ = ["WebExtractFontsResponse" , "Font" , "FontLinks" ]
811
912
1013class 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+
3360class 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