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

Commit 98b4695

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

3 files changed

Lines changed: 69 additions & 2 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-d939bc17efff27c8a66b48b80e6ef9d5790105eed03bbddf57642c65a22ad16c.yml
3-
openapi_spec_hash: f60ac2085adb51c5a437684028a065b2
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/unlayer/unlayer-a96fca229b9908a56f32846b8ac997932655bc35644c267004c3bada5ed3d9fe.yml
3+
openapi_spec_hash: e3c4bccf1cf35f4ba5ec3d8ba207c689
44
config_hash: 31bbe4c50af7bd9aea5582d9a2ab786d

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

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
"MessageMetadataAction",
1818
"Output",
1919
"Context",
20+
"ContextBrand",
21+
"ContextBrandColors",
22+
"ContextBrandFonts",
2023
"ContextCustomTool",
2124
"ContextSelection",
2225
]
@@ -113,6 +116,36 @@ class Output(TypedDict, total=False):
113116
schema_version: Annotated[int, PropertyInfo(alias="schemaVersion")]
114117

115118

119+
class ContextBrandColors(TypedDict, total=False):
120+
accent: str
121+
122+
primary: str
123+
124+
secondary: str
125+
126+
127+
class ContextBrandFonts(TypedDict, total=False):
128+
body: str
129+
130+
heading: str
131+
132+
133+
class ContextBrand(TypedDict, total=False):
134+
colors: ContextBrandColors
135+
136+
company_name: Annotated[str, PropertyInfo(alias="companyName")]
137+
138+
fonts: ContextBrandFonts
139+
140+
guidelines: str
141+
142+
product_description: Annotated[str, PropertyInfo(alias="productDescription")]
143+
144+
target_audience: Annotated[str, PropertyInfo(alias="targetAudience")]
145+
146+
voice: str
147+
148+
116149
class ContextCustomTool( # type: ignore[call-arg]
117150
TypedDict,
118151
total=False,
@@ -142,6 +175,8 @@ class Context( # type: ignore[call-arg]
142175
):
143176
available_tools: Annotated[SequenceNotStr[str], PropertyInfo(alias="availableTools")]
144177

178+
brand: ContextBrand
179+
145180
custom_tools: Annotated[Iterable[ContextCustomTool], PropertyInfo(alias="customTools")]
146181

147182
full_design: Annotated[Optional[Dict[str, object]], PropertyInfo(alias="fullDesign")]

‎tests/api_resources/templates/test_generate.py‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,22 @@ def test_method_create_with_all_params(self, client: Unlayer) -> None:
6161
project_id="projectId",
6262
context={
6363
"available_tools": ["string"],
64+
"brand": {
65+
"colors": {
66+
"accent": "accent",
67+
"primary": "primary",
68+
"secondary": "secondary",
69+
},
70+
"company_name": "companyName",
71+
"fonts": {
72+
"body": "body",
73+
"heading": "heading",
74+
},
75+
"guidelines": "guidelines",
76+
"product_description": "productDescription",
77+
"target_audience": "targetAudience",
78+
"voice": "voice",
79+
},
6480
"custom_tools": [
6581
{
6682
"options": {"foo": "bar"},
@@ -198,6 +214,22 @@ async def test_method_create_with_all_params(self, async_client: AsyncUnlayer) -
198214
project_id="projectId",
199215
context={
200216
"available_tools": ["string"],
217+
"brand": {
218+
"colors": {
219+
"accent": "accent",
220+
"primary": "primary",
221+
"secondary": "secondary",
222+
},
223+
"company_name": "companyName",
224+
"fonts": {
225+
"body": "body",
226+
"heading": "heading",
227+
},
228+
"guidelines": "guidelines",
229+
"product_description": "productDescription",
230+
"target_audience": "targetAudience",
231+
"voice": "voice",
232+
},
201233
"custom_tools": [
202234
{
203235
"options": {"foo": "bar"},

0 commit comments

Comments
 (0)