Visitar URL original
feat(api): api update · unlayer/unlayer-python@aad6e6f · GitHub
Skip to content

Commit aad6e6f

Browse files
feat(api): api update
1 parent 98b4695 commit aad6e6f

3 files changed

Lines changed: 41 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: 51
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/unlayer/unlayer-a96fca229b9908a56f32846b8ac997932655bc35644c267004c3bada5ed3d9fe.yml
3-
openapi_spec_hash: e3c4bccf1cf35f4ba5ec3d8ba207c689
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/unlayer/unlayer-231dfb6902a557101992c19fd91a3cf6d4d187b06c9d6b20f2b70d7df77e664a.yml
3+
openapi_spec_hash: 487c5e8289dd85c5d412f6635c2bc3fc
44
config_hash: 31bbe4c50af7bd9aea5582d9a2ab786d

‎src/unlayer/types/templates/generate_create_params.py‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@
1717
"MessageMetadataAction",
1818
"Output",
1919
"Context",
20+
"ContextAvailableFont",
2021
"ContextBrand",
2122
"ContextBrandColors",
2223
"ContextBrandFonts",
24+
"ContextBrandLogos",
2325
"ContextCustomTool",
2426
"ContextSelection",
2527
]
@@ -116,6 +118,12 @@ class Output(TypedDict, total=False):
116118
schema_version: Annotated[int, PropertyInfo(alias="schemaVersion")]
117119

118120

121+
class ContextAvailableFont(TypedDict, total=False):
122+
label: Required[str]
123+
124+
value: Required[str]
125+
126+
119127
class ContextBrandColors(TypedDict, total=False):
120128
accent: str
121129

@@ -130,6 +138,12 @@ class ContextBrandFonts(TypedDict, total=False):
130138
heading: str
131139

132140

141+
class ContextBrandLogos(TypedDict, total=False):
142+
primary: str
143+
144+
secondary: str
145+
146+
133147
class ContextBrand(TypedDict, total=False):
134148
colors: ContextBrandColors
135149

@@ -139,6 +153,8 @@ class ContextBrand(TypedDict, total=False):
139153

140154
guidelines: str
141155

156+
logos: ContextBrandLogos
157+
142158
product_description: Annotated[str, PropertyInfo(alias="productDescription")]
143159

144160
target_audience: Annotated[str, PropertyInfo(alias="targetAudience")]
@@ -173,9 +189,11 @@ class Context( # type: ignore[call-arg]
173189
total=False,
174190
extra_items=object, # pyright: ignore[reportGeneralTypeIssues]
175191
):
192+
available_fonts: Annotated[Iterable[ContextAvailableFont], PropertyInfo(alias="availableFonts")]
193+
176194
available_tools: Annotated[SequenceNotStr[str], PropertyInfo(alias="availableTools")]
177195

178-
brand: ContextBrand
196+
brand: Optional[ContextBrand]
179197

180198
custom_tools: Annotated[Iterable[ContextCustomTool], PropertyInfo(alias="customTools")]
181199

‎tests/api_resources/templates/test_generate.py‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ def test_method_create_with_all_params(self, client: Unlayer) -> None:
6060
},
6161
project_id="projectId",
6262
context={
63+
"available_fonts": [
64+
{
65+
"label": "x",
66+
"value": "x",
67+
}
68+
],
6369
"available_tools": ["string"],
6470
"brand": {
6571
"colors": {
@@ -73,6 +79,10 @@ def test_method_create_with_all_params(self, client: Unlayer) -> None:
7379
"heading": "heading",
7480
},
7581
"guidelines": "guidelines",
82+
"logos": {
83+
"primary": "https://example.com",
84+
"secondary": "https://example.com",
85+
},
7686
"product_description": "productDescription",
7787
"target_audience": "targetAudience",
7888
"voice": "voice",
@@ -213,6 +223,12 @@ async def test_method_create_with_all_params(self, async_client: AsyncUnlayer) -
213223
},
214224
project_id="projectId",
215225
context={
226+
"available_fonts": [
227+
{
228+
"label": "x",
229+
"value": "x",
230+
}
231+
],
216232
"available_tools": ["string"],
217233
"brand": {
218234
"colors": {
@@ -226,6 +242,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncUnlayer) -
226242
"heading": "heading",
227243
},
228244
"guidelines": "guidelines",
245+
"logos": {
246+
"primary": "https://example.com",
247+
"secondary": "https://example.com",
248+
},
229249
"product_description": "productDescription",
230250
"target_audience": "targetAudience",
231251
"voice": "voice",

0 commit comments

Comments
 (0)