1- import { z } from "zod" ;
1+ import { z } from "zod/v3 " ;
22
33export const DEElementSchema = z . object ( {
44 type : z
@@ -30,9 +30,7 @@ export const DEElementSchema = z.object({
3030 ) ,
3131 set_text : z
3232 . object ( {
33- text : z
34- . string ( )
35- . describe ( "The text to set on the element." ) ,
33+ text : z . string ( ) . describe ( "The text to set on the element." ) ,
3634 } )
3735 . optional ( )
3836 . describe (
@@ -41,20 +39,9 @@ export const DEElementSchema = z.object({
4139 set_link : z
4240 . object ( {
4341 link_type : z
44- . enum ( [
45- "url" ,
46- "file" ,
47- "page" ,
48- "element" ,
49- "email" ,
50- "phone" ,
51- ] )
52- . describe (
53- "The type of link to set on the element."
54- ) ,
55- link : z
56- . string ( )
57- . describe ( "The link to set on the element." ) ,
42+ . enum ( [ "url" , "file" , "page" , "element" , "email" , "phone" ] )
43+ . describe ( "The type of link to set on the element." ) ,
44+ link : z . string ( ) . describe ( "The link to set on the element." ) ,
5845 } )
5946 . optional ( )
6047 . describe (
@@ -66,21 +53,15 @@ export const DEElementSchema = z.object({
6653 . number ( )
6754 . min ( 1 )
6855 . max ( 6 )
69- . describe (
70- "The heading level to set on the element."
71- ) ,
56+ . describe ( "The heading level to set on the element." ) ,
7257 } )
7358 . optional ( )
74- . describe (
75- "Set heading level on the element. only valid for heading."
76- ) ,
59+ . describe ( "Set heading level on the element. only valid for heading." ) ,
7760 set_image_asset : z
7861 . object ( {
7962 image_asset_id : z
8063 . string ( )
81- . describe (
82- "The image asset id to set on the element."
83- ) ,
64+ . describe ( "The image asset id to set on the element." ) ,
8465 alt_text : z
8566 . string ( )
8667 . optional ( )
@@ -89,9 +70,7 @@ export const DEElementSchema = z.object({
8970 ) ,
9071 } )
9172 . optional ( )
92- . describe (
93- "Set image asset on the element. only valid for image."
94- ) ,
73+ . describe ( "Set image asset on the element. only valid for image." ) ,
9574 set_dom_config : z
9675 . object ( {
9776 dom_tag : z
@@ -101,24 +80,14 @@ export const DEElementSchema = z.object({
10180 ) ,
10281 } )
10382 . optional ( )
104- . describe (
105- "Set DOM config on the element. only valid for DOM element."
106- ) ,
83+ . describe ( "Set DOM config on the element. only valid for DOM element." ) ,
10784 set_attributes : z
10885 . object ( {
10986 attributes : z
11087 . array (
11188 z . object ( {
112- name : z
113- . string ( )
114- . describe (
115- "The name of the attribute to set."
116- ) ,
117- value : z
118- . string ( )
119- . describe (
120- "The value of the attribute to set."
121- ) ,
89+ name : z . string ( ) . describe ( "The name of the attribute to set." ) ,
90+ value : z . string ( ) . describe ( "The value of the attribute to set." ) ,
12291 } )
12392 )
12493 . describe ( "The attributes to set on the element." ) ,
0 commit comments