@shotstack/schemas 1.5.1 → 1.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.bundled.json +86 -19
- package/dist/schema.d.ts +48 -15
- package/dist/zod/zod.gen.cjs +1425 -858
- package/dist/zod/zod.gen.d.ts +11680 -9952
- package/dist/zod/zod.gen.js +1423 -856
- package/dist/zod/zod.gen.ts +448 -377
- package/package.json +2 -7
package/dist/zod/zod.gen.ts
CHANGED
|
@@ -39,10 +39,10 @@ export const uploadRootSchema = z.unknown();
|
|
|
39
39
|
*/
|
|
40
40
|
export const captionpropertiesCaptionBackgroundSchema = z.object({
|
|
41
41
|
color: z.optional(z.string()),
|
|
42
|
-
opacity: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
43
|
-
padding: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
44
|
-
borderRadius: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
45
|
-
})
|
|
42
|
+
opacity: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
43
|
+
padding: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
44
|
+
borderRadius: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
45
|
+
});
|
|
46
46
|
|
|
47
47
|
export const captionBackgroundSchema = captionpropertiesCaptionBackgroundSchema;
|
|
48
48
|
|
|
@@ -52,12 +52,12 @@ export const captionBackgroundSchema = captionpropertiesCaptionBackgroundSchema;
|
|
|
52
52
|
export const captionpropertiesCaptionFontSchema = z.object({
|
|
53
53
|
family: z.optional(z.string()),
|
|
54
54
|
color: z.optional(z.string()),
|
|
55
|
-
opacity: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
56
|
-
size: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
57
|
-
lineHeight: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
55
|
+
opacity: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
56
|
+
size: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
57
|
+
lineHeight: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
58
58
|
stroke: z.optional(z.string()),
|
|
59
|
-
strokeWidth: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
60
|
-
})
|
|
59
|
+
strokeWidth: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
60
|
+
});
|
|
61
61
|
|
|
62
62
|
export const captionFontSchema = captionpropertiesCaptionFontSchema;
|
|
63
63
|
|
|
@@ -65,11 +65,10 @@ export const captionFontSchema = captionpropertiesCaptionFontSchema;
|
|
|
65
65
|
* The margin properties for captions. Margins are used to position the caption text and background on the screen.
|
|
66
66
|
*/
|
|
67
67
|
export const captionpropertiesCaptionMarginSchema = z.object({
|
|
68
|
-
top: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}).strict();
|
|
68
|
+
top: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
69
|
+
left: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
70
|
+
right: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
71
|
+
});
|
|
73
72
|
|
|
74
73
|
export const captionMarginSchema = captionpropertiesCaptionMarginSchema;
|
|
75
74
|
|
|
@@ -87,13 +86,13 @@ export const captionMarginSchema = captionpropertiesCaptionMarginSchema;
|
|
|
87
86
|
*/
|
|
88
87
|
export const captionassetCaptionAssetSchema = z.object({
|
|
89
88
|
type: z.enum(["caption"]),
|
|
90
|
-
src: z.string().
|
|
89
|
+
src: z.string().min(1).regex(/\S/),
|
|
91
90
|
font: z.optional(captionpropertiesCaptionFontSchema),
|
|
92
91
|
background: z.optional(captionpropertiesCaptionBackgroundSchema),
|
|
93
92
|
margin: z.optional(captionpropertiesCaptionMarginSchema),
|
|
94
|
-
trim: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
95
|
-
speed: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
96
|
-
})
|
|
93
|
+
trim: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
94
|
+
speed: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
95
|
+
});
|
|
97
96
|
|
|
98
97
|
export const captionAssetSchema = captionassetCaptionAssetSchema;
|
|
99
98
|
|
|
@@ -101,10 +100,10 @@ export const captionAssetSchema = captionassetCaptionAssetSchema;
|
|
|
101
100
|
* Chroma key is a technique that replaces a specific color in a video with a different background image or video, enabling seamless integration of diverse environments. Commonly used for green screen and blue screen effects.
|
|
102
101
|
*/
|
|
103
102
|
export const chromakeyChromaKeySchema = z.object({
|
|
104
|
-
color: z.string().regex(/^#[0-9a-fA-F]{6}$/),
|
|
105
|
-
threshold: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
106
|
-
halo: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
107
|
-
})
|
|
103
|
+
color: z.union([z.string().regex(/^#[0-9a-fA-F]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
104
|
+
threshold: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int().gte(0).lte(250)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
105
|
+
halo: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int().gte(0).lte(250)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
106
|
+
});
|
|
108
107
|
|
|
109
108
|
export const chromaKeySchema = chromakeyChromaKeySchema;
|
|
110
109
|
|
|
@@ -116,7 +115,7 @@ export const didTextToAvatarOptionsDidTextToAvatarOptionsSchema = z.object({
|
|
|
116
115
|
text: z.string(),
|
|
117
116
|
avatar: z.enum(["jack", "lana", "lily", "matt", "rian"]),
|
|
118
117
|
background: z.optional(z.string()),
|
|
119
|
-
})
|
|
118
|
+
});
|
|
120
119
|
|
|
121
120
|
export const didTextToAvatarOptionsSchema =
|
|
122
121
|
didTextToAvatarOptionsDidTextToAvatarOptionsSchema;
|
|
@@ -128,7 +127,11 @@ export const didTextToAvatarOptionsSchema =
|
|
|
128
127
|
* <li><a href="#tocs_didtexttoavataroptions">DidTextToAvatarOptions</a></li>
|
|
129
128
|
* </ul>
|
|
130
129
|
*/
|
|
131
|
-
export const didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema =
|
|
130
|
+
export const didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema = z
|
|
131
|
+
.object({
|
|
132
|
+
type: z.literal("didTextToAvatarOptions_DIDTextToAvatarOptions"),
|
|
133
|
+
})
|
|
134
|
+
.and(didTextToAvatarOptionsDidTextToAvatarOptionsSchema);
|
|
132
135
|
|
|
133
136
|
export const didGeneratedAssetOptionsSchema =
|
|
134
137
|
didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema;
|
|
@@ -139,7 +142,7 @@ export const didGeneratedAssetOptionsSchema =
|
|
|
139
142
|
export const didGeneratedAssetDidGeneratedAssetSchema = z.object({
|
|
140
143
|
provider: z.enum(["d-id"]),
|
|
141
144
|
options: didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema,
|
|
142
|
-
})
|
|
145
|
+
});
|
|
143
146
|
|
|
144
147
|
export const didGeneratedAssetSchema = didGeneratedAssetDidGeneratedAssetSchema;
|
|
145
148
|
|
|
@@ -161,7 +164,7 @@ export const elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema =
|
|
|
161
164
|
"Rachel",
|
|
162
165
|
"Sam",
|
|
163
166
|
]),
|
|
164
|
-
})
|
|
167
|
+
});
|
|
165
168
|
|
|
166
169
|
export const elevenLabsTextToSpeechOptionsSchema =
|
|
167
170
|
elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema;
|
|
@@ -174,7 +177,13 @@ export const elevenLabsTextToSpeechOptionsSchema =
|
|
|
174
177
|
* </ul>
|
|
175
178
|
*/
|
|
176
179
|
export const elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema =
|
|
177
|
-
|
|
180
|
+
z
|
|
181
|
+
.object({
|
|
182
|
+
type: z.literal(
|
|
183
|
+
"elevenlabsTextToSpeechOptions_ElevenLabsTextToSpeechOptions",
|
|
184
|
+
),
|
|
185
|
+
})
|
|
186
|
+
.and(elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema);
|
|
178
187
|
|
|
179
188
|
export const elevenLabsGeneratedAssetOptionsSchema =
|
|
180
189
|
elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema;
|
|
@@ -185,7 +194,7 @@ export const elevenLabsGeneratedAssetOptionsSchema =
|
|
|
185
194
|
export const elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema = z.object({
|
|
186
195
|
provider: z.enum(["elevenlabs"]),
|
|
187
196
|
options: elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema,
|
|
188
|
-
})
|
|
197
|
+
});
|
|
189
198
|
|
|
190
199
|
export const elevenLabsGeneratedAssetSchema =
|
|
191
200
|
elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema;
|
|
@@ -314,7 +323,7 @@ export const heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema =
|
|
|
314
323
|
background: z.optional(z.string()),
|
|
315
324
|
ratio: z.optional(z.enum(["16:9", "9:16"])),
|
|
316
325
|
test: z.optional(z.boolean()),
|
|
317
|
-
})
|
|
326
|
+
});
|
|
318
327
|
|
|
319
328
|
export const heyGenTextToAvatarOptionsSchema =
|
|
320
329
|
heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema;
|
|
@@ -326,7 +335,11 @@ export const heyGenTextToAvatarOptionsSchema =
|
|
|
326
335
|
* <li><a href="#tocs_heygentexttoavataroptions">HeyGenTextToAvatarOptions</a></li>
|
|
327
336
|
* </ul>
|
|
328
337
|
*/
|
|
329
|
-
export const heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema =
|
|
338
|
+
export const heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema = z
|
|
339
|
+
.object({
|
|
340
|
+
type: z.literal("heygenTextToAvatarOptions_HeyGenTextToAvatarOptions"),
|
|
341
|
+
})
|
|
342
|
+
.and(heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema);
|
|
330
343
|
|
|
331
344
|
export const heyGenGeneratedAssetOptionsSchema =
|
|
332
345
|
heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema;
|
|
@@ -337,7 +350,7 @@ export const heyGenGeneratedAssetOptionsSchema =
|
|
|
337
350
|
export const heygenGeneratedAssetHeyGenGeneratedAssetSchema = z.object({
|
|
338
351
|
provider: z.enum(["heygen"]),
|
|
339
352
|
options: heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema,
|
|
340
|
-
})
|
|
353
|
+
});
|
|
341
354
|
|
|
342
355
|
export const heyGenGeneratedAssetSchema =
|
|
343
356
|
heygenGeneratedAssetHeyGenGeneratedAssetSchema;
|
|
@@ -351,7 +364,7 @@ export const openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema =
|
|
|
351
364
|
prompt: z.string(),
|
|
352
365
|
model: z.enum(["gpt-3.5-turbo", "gpt-4"]),
|
|
353
366
|
systemPrompt: z.optional(z.string()),
|
|
354
|
-
})
|
|
367
|
+
});
|
|
355
368
|
|
|
356
369
|
export const openAiTextGeneratorOptionsSchema =
|
|
357
370
|
openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema;
|
|
@@ -363,7 +376,11 @@ export const openAiTextGeneratorOptionsSchema =
|
|
|
363
376
|
* <li><a href="#tocs_openaitextgeneratoroptions">OpenAiTextGeneratorOptions</a></li>
|
|
364
377
|
* </ul>
|
|
365
378
|
*/
|
|
366
|
-
export const openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema =
|
|
379
|
+
export const openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema = z
|
|
380
|
+
.object({
|
|
381
|
+
type: z.literal("openaiTextGeneratorOptions_OpenAiTextGeneratorOptions"),
|
|
382
|
+
})
|
|
383
|
+
.and(openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema);
|
|
367
384
|
|
|
368
385
|
export const openAiGeneratedAssetOptionsSchema =
|
|
369
386
|
openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema;
|
|
@@ -374,7 +391,7 @@ export const openAiGeneratedAssetOptionsSchema =
|
|
|
374
391
|
export const openaiGeneratedAssetOpenAiGeneratedAssetSchema = z.object({
|
|
375
392
|
provider: z.enum(["openai"]),
|
|
376
393
|
options: openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema,
|
|
377
|
-
})
|
|
394
|
+
});
|
|
378
395
|
|
|
379
396
|
export const openAiGeneratedAssetSchema =
|
|
380
397
|
openaiGeneratedAssetOpenAiGeneratedAssetSchema;
|
|
@@ -387,7 +404,7 @@ export const generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchem
|
|
|
387
404
|
status: z.string(),
|
|
388
405
|
title: z.string(),
|
|
389
406
|
detail: z.string(),
|
|
390
|
-
})
|
|
407
|
+
});
|
|
391
408
|
|
|
392
409
|
export const generatedAssetErrorResponseDataSchema =
|
|
393
410
|
generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema;
|
|
@@ -400,7 +417,7 @@ export const generatedAssetErrorResponseGeneratedAssetErrorResponseSchema =
|
|
|
400
417
|
errors: z.array(
|
|
401
418
|
generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema,
|
|
402
419
|
),
|
|
403
|
-
})
|
|
420
|
+
});
|
|
404
421
|
|
|
405
422
|
export const generatedAssetErrorResponseSchema =
|
|
406
423
|
generatedAssetErrorResponseGeneratedAssetErrorResponseSchema;
|
|
@@ -417,7 +434,7 @@ export const generatedAssetResponseAttributesGeneratedAssetResponseAttributesSch
|
|
|
417
434
|
status: z.enum(["queued", "processing", "saving", "done", "failed"]),
|
|
418
435
|
created: z.string(),
|
|
419
436
|
updated: z.string(),
|
|
420
|
-
})
|
|
437
|
+
});
|
|
421
438
|
|
|
422
439
|
export const generatedAssetResponseAttributesSchema =
|
|
423
440
|
generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema;
|
|
@@ -431,7 +448,7 @@ export const generatedAssetResponseDataGeneratedAssetResponseDataSchema =
|
|
|
431
448
|
id: z.string(),
|
|
432
449
|
attributes:
|
|
433
450
|
generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema,
|
|
434
|
-
})
|
|
451
|
+
});
|
|
435
452
|
|
|
436
453
|
export const generatedAssetResponseDataSchema =
|
|
437
454
|
generatedAssetResponseDataGeneratedAssetResponseDataSchema;
|
|
@@ -441,7 +458,7 @@ export const generatedAssetResponseDataSchema =
|
|
|
441
458
|
*/
|
|
442
459
|
export const generatedAssetResponseGeneratedAssetResponseSchema = z.object({
|
|
443
460
|
data: generatedAssetResponseDataGeneratedAssetResponseDataSchema,
|
|
444
|
-
})
|
|
461
|
+
});
|
|
445
462
|
|
|
446
463
|
export const generatedAssetResponseSchema =
|
|
447
464
|
generatedAssetResponseGeneratedAssetResponseSchema;
|
|
@@ -453,9 +470,9 @@ export const shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema =
|
|
|
453
470
|
z.object({
|
|
454
471
|
type: z.enum(["image-to-video"]),
|
|
455
472
|
imageUrl: z.string(),
|
|
456
|
-
guidanceScale: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
457
|
-
motion: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
458
|
-
})
|
|
473
|
+
guidanceScale: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1.8),
|
|
474
|
+
motion: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(127),
|
|
475
|
+
});
|
|
459
476
|
|
|
460
477
|
export const shotstackImageToVideoOptionsSchema =
|
|
461
478
|
shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema;
|
|
@@ -467,7 +484,7 @@ export const shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema =
|
|
|
467
484
|
z.object({
|
|
468
485
|
type: z.enum(["text-generator"]),
|
|
469
486
|
prompt: z.string(),
|
|
470
|
-
})
|
|
487
|
+
});
|
|
471
488
|
|
|
472
489
|
export const shotstackTextGeneratorOptionsSchema =
|
|
473
490
|
shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema;
|
|
@@ -479,9 +496,9 @@ export const shotstackTextToImageOptionsShotstackTextToImageOptionsSchema =
|
|
|
479
496
|
z.object({
|
|
480
497
|
type: z.enum(["text-to-image"]),
|
|
481
498
|
prompt: z.string(),
|
|
482
|
-
width: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
483
|
-
height: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
484
|
-
})
|
|
499
|
+
width: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
500
|
+
height: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
501
|
+
});
|
|
485
502
|
|
|
486
503
|
export const shotstackTextToImageOptionsSchema =
|
|
487
504
|
shotstackTextToImageOptionsShotstackTextToImageOptionsSchema;
|
|
@@ -586,7 +603,7 @@ export const shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema =
|
|
|
586
603
|
]),
|
|
587
604
|
),
|
|
588
605
|
newscaster: z.optional(z.boolean()).default(false),
|
|
589
|
-
})
|
|
606
|
+
});
|
|
590
607
|
|
|
591
608
|
export const shotstackTextToSpeechOptionsSchema =
|
|
592
609
|
shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema;
|
|
@@ -596,10 +613,34 @@ export const shotstackTextToSpeechOptionsSchema =
|
|
|
596
613
|
*/
|
|
597
614
|
export const shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema =
|
|
598
615
|
z.union([
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
616
|
+
z
|
|
617
|
+
.object({
|
|
618
|
+
type: z.literal(
|
|
619
|
+
"shotstackTextToSpeechOptions_ShotstackTextToSpeechOptions",
|
|
620
|
+
),
|
|
621
|
+
})
|
|
622
|
+
.and(shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema),
|
|
623
|
+
z
|
|
624
|
+
.object({
|
|
625
|
+
type: z.literal(
|
|
626
|
+
"shotstackTextToImageOptions_ShotstackTextToImageOptions",
|
|
627
|
+
),
|
|
628
|
+
})
|
|
629
|
+
.and(shotstackTextToImageOptionsShotstackTextToImageOptionsSchema),
|
|
630
|
+
z
|
|
631
|
+
.object({
|
|
632
|
+
type: z.literal(
|
|
633
|
+
"shotstackTextGeneratorOptions_ShotstackTextGeneratorOptions",
|
|
634
|
+
),
|
|
635
|
+
})
|
|
636
|
+
.and(shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema),
|
|
637
|
+
z
|
|
638
|
+
.object({
|
|
639
|
+
type: z.literal(
|
|
640
|
+
"shotstackImageToVideoOptions_ShotstackImageToVideoOptions",
|
|
641
|
+
),
|
|
642
|
+
})
|
|
643
|
+
.and(shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema),
|
|
603
644
|
]);
|
|
604
645
|
|
|
605
646
|
export const shotstackGeneratedAssetOptionsSchema =
|
|
@@ -611,7 +652,7 @@ export const shotstackGeneratedAssetOptionsSchema =
|
|
|
611
652
|
export const shotstackGeneratedAssetShotstackGeneratedAssetSchema = z.object({
|
|
612
653
|
provider: z.enum(["shotstack"]),
|
|
613
654
|
options: shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema,
|
|
614
|
-
})
|
|
655
|
+
});
|
|
615
656
|
|
|
616
657
|
export const shotstackGeneratedAssetSchema =
|
|
617
658
|
shotstackGeneratedAssetShotstackGeneratedAssetSchema;
|
|
@@ -632,11 +673,11 @@ export const stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema =
|
|
|
632
673
|
"stable-diffusion-xl-beta-v2-2-2",
|
|
633
674
|
]),
|
|
634
675
|
),
|
|
635
|
-
width: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
636
|
-
height: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
637
|
-
steps: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
638
|
-
seed: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
639
|
-
cfgScale: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
676
|
+
width: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
677
|
+
height: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
678
|
+
steps: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(30),
|
|
679
|
+
seed: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
680
|
+
cfgScale: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(7),
|
|
640
681
|
stylePreset: z.optional(
|
|
641
682
|
z.enum([
|
|
642
683
|
"3d-model",
|
|
@@ -658,7 +699,7 @@ export const stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema =
|
|
|
658
699
|
"tile-texture",
|
|
659
700
|
]),
|
|
660
701
|
),
|
|
661
|
-
})
|
|
702
|
+
});
|
|
662
703
|
|
|
663
704
|
export const stabilityAiTextToImageOptionsSchema =
|
|
664
705
|
stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema;
|
|
@@ -671,7 +712,13 @@ export const stabilityAiTextToImageOptionsSchema =
|
|
|
671
712
|
* </ul>
|
|
672
713
|
*/
|
|
673
714
|
export const stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema =
|
|
674
|
-
|
|
715
|
+
z
|
|
716
|
+
.object({
|
|
717
|
+
type: z.literal(
|
|
718
|
+
"stabilityAiTextToImageOptions_StabilityAiTextToImageOptions",
|
|
719
|
+
),
|
|
720
|
+
})
|
|
721
|
+
.and(stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema);
|
|
675
722
|
|
|
676
723
|
export const stabilityAiGeneratedAssetOptionsSchema =
|
|
677
724
|
stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema;
|
|
@@ -684,7 +731,7 @@ export const stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema =
|
|
|
684
731
|
provider: z.enum(["stability-ai"]),
|
|
685
732
|
options:
|
|
686
733
|
stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema,
|
|
687
|
-
})
|
|
734
|
+
});
|
|
688
735
|
|
|
689
736
|
export const stabilityAiGeneratedAssetSchema =
|
|
690
737
|
stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema;
|
|
@@ -693,12 +740,38 @@ export const stabilityAiGeneratedAssetSchema =
|
|
|
693
740
|
* A generated asset is a media asset created by the Create API. You can use native or third party providers to generate video, audio and image files using Generative AI services like text-to-speech and text-to-avatar.
|
|
694
741
|
*/
|
|
695
742
|
export const generatedAssetGeneratedAssetSchema = z.union([
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
743
|
+
z
|
|
744
|
+
.object({
|
|
745
|
+
provider: z.literal("shotstackGeneratedAsset_ShotstackGeneratedAsset"),
|
|
746
|
+
})
|
|
747
|
+
.and(shotstackGeneratedAssetShotstackGeneratedAssetSchema),
|
|
748
|
+
z
|
|
749
|
+
.object({
|
|
750
|
+
provider: z.literal("didGeneratedAsset_DIDGeneratedAsset"),
|
|
751
|
+
})
|
|
752
|
+
.and(didGeneratedAssetDidGeneratedAssetSchema),
|
|
753
|
+
z
|
|
754
|
+
.object({
|
|
755
|
+
provider: z.literal("elevenlabsGeneratedAsset_ElevenLabsGeneratedAsset"),
|
|
756
|
+
})
|
|
757
|
+
.and(elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema),
|
|
758
|
+
z
|
|
759
|
+
.object({
|
|
760
|
+
provider: z.literal("heygenGeneratedAsset_HeyGenGeneratedAsset"),
|
|
761
|
+
})
|
|
762
|
+
.and(heygenGeneratedAssetHeyGenGeneratedAssetSchema),
|
|
763
|
+
z
|
|
764
|
+
.object({
|
|
765
|
+
provider: z.literal("openaiGeneratedAsset_OpenAiGeneratedAsset"),
|
|
766
|
+
})
|
|
767
|
+
.and(openaiGeneratedAssetOpenAiGeneratedAssetSchema),
|
|
768
|
+
z
|
|
769
|
+
.object({
|
|
770
|
+
provider: z.literal(
|
|
771
|
+
"stabilityAiGeneratedAsset_StabilityAiGeneratedAsset",
|
|
772
|
+
),
|
|
773
|
+
})
|
|
774
|
+
.and(stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema),
|
|
702
775
|
]);
|
|
703
776
|
|
|
704
777
|
export const generatedAssetSchema = generatedAssetGeneratedAssetSchema;
|
|
@@ -707,11 +780,11 @@ export const generatedAssetSchema = generatedAssetGeneratedAssetSchema;
|
|
|
707
780
|
* Crop the sides of an asset by a relative amount. The size of the crop is specified using a scale between 0 and 1, relative to the screen width - i.e a left crop of 0.5 will crop half of the asset from the left, a top crop of 0.25 will crop the top by quarter of the asset.
|
|
708
781
|
*/
|
|
709
782
|
export const cropCropSchema = z.object({
|
|
710
|
-
top: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
711
|
-
bottom: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
712
|
-
left: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
713
|
-
right: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
714
|
-
})
|
|
783
|
+
top: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
784
|
+
bottom: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
785
|
+
left: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
786
|
+
right: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
787
|
+
});
|
|
715
788
|
|
|
716
789
|
export const cropSchema = cropCropSchema;
|
|
717
790
|
|
|
@@ -723,7 +796,7 @@ export const googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOp
|
|
|
723
796
|
bucket: z.string(),
|
|
724
797
|
prefix: z.optional(z.string()),
|
|
725
798
|
filename: z.optional(z.string()),
|
|
726
|
-
})
|
|
799
|
+
});
|
|
727
800
|
|
|
728
801
|
export const googleCloudStorageDestinationOptionsSchema =
|
|
729
802
|
googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOptionsSchema;
|
|
@@ -737,7 +810,7 @@ export const googleCloudStorageDestinationGoogleCloudStorageDestinationSchema =
|
|
|
737
810
|
options: z.optional(
|
|
738
811
|
googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOptionsSchema,
|
|
739
812
|
),
|
|
740
|
-
})
|
|
813
|
+
});
|
|
741
814
|
|
|
742
815
|
export const googleCloudStorageDestinationSchema =
|
|
743
816
|
googleCloudStorageDestinationGoogleCloudStorageDestinationSchema;
|
|
@@ -749,7 +822,7 @@ export const googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema =
|
|
|
749
822
|
z.object({
|
|
750
823
|
folderId: z.string(),
|
|
751
824
|
filename: z.optional(z.string()),
|
|
752
|
-
})
|
|
825
|
+
});
|
|
753
826
|
|
|
754
827
|
export const googleDriveDestinationOptionsSchema =
|
|
755
828
|
googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema;
|
|
@@ -760,7 +833,7 @@ export const googleDriveDestinationOptionsSchema =
|
|
|
760
833
|
export const googleDriveDestinationGoogleDriveDestinationSchema = z.object({
|
|
761
834
|
provider: z.literal("google-drive"),
|
|
762
835
|
options: googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema,
|
|
763
|
-
})
|
|
836
|
+
});
|
|
764
837
|
|
|
765
838
|
export const googleDriveDestinationSchema =
|
|
766
839
|
googleDriveDestinationGoogleDriveDestinationSchema;
|
|
@@ -771,7 +844,7 @@ export const googleDriveDestinationSchema =
|
|
|
771
844
|
export const muxDestinationOptionsMuxDestinationOptionsSchema = z.object({
|
|
772
845
|
playbackPolicy: z.optional(z.array(z.enum(["public", "signed"]))),
|
|
773
846
|
passthrough: z.optional(z.string().max(255)),
|
|
774
|
-
})
|
|
847
|
+
});
|
|
775
848
|
|
|
776
849
|
export const muxDestinationOptionsSchema =
|
|
777
850
|
muxDestinationOptionsMuxDestinationOptionsSchema;
|
|
@@ -782,7 +855,7 @@ export const muxDestinationOptionsSchema =
|
|
|
782
855
|
export const muxDestinationMuxDestinationSchema = z.object({
|
|
783
856
|
provider: z.literal("mux"),
|
|
784
857
|
options: z.optional(muxDestinationOptionsMuxDestinationOptionsSchema),
|
|
785
|
-
})
|
|
858
|
+
});
|
|
786
859
|
|
|
787
860
|
export const muxDestinationSchema = muxDestinationMuxDestinationSchema;
|
|
788
861
|
|
|
@@ -795,7 +868,7 @@ export const s3DestinationOptionsS3DestinationOptionsSchema = z.object({
|
|
|
795
868
|
prefix: z.optional(z.string()),
|
|
796
869
|
filename: z.optional(z.string()),
|
|
797
870
|
acl: z.optional(z.string()),
|
|
798
|
-
})
|
|
871
|
+
});
|
|
799
872
|
|
|
800
873
|
export const s3DestinationOptionsSchema =
|
|
801
874
|
s3DestinationOptionsS3DestinationOptionsSchema;
|
|
@@ -806,7 +879,7 @@ export const s3DestinationOptionsSchema =
|
|
|
806
879
|
export const s3DestinationS3DestinationSchema = z.object({
|
|
807
880
|
provider: z.literal("s3"),
|
|
808
881
|
options: z.optional(s3DestinationOptionsS3DestinationOptionsSchema),
|
|
809
|
-
})
|
|
882
|
+
});
|
|
810
883
|
|
|
811
884
|
export const s3DestinationSchema = s3DestinationS3DestinationSchema;
|
|
812
885
|
|
|
@@ -816,7 +889,7 @@ export const s3DestinationSchema = s3DestinationS3DestinationSchema;
|
|
|
816
889
|
export const shotstackDestinationShotstackDestinationSchema = z.object({
|
|
817
890
|
provider: z.literal("shotstack"),
|
|
818
891
|
exclude: z.optional(z.boolean()),
|
|
819
|
-
})
|
|
892
|
+
});
|
|
820
893
|
|
|
821
894
|
export const shotstackDestinationSchema =
|
|
822
895
|
shotstackDestinationShotstackDestinationSchema;
|
|
@@ -830,7 +903,7 @@ export const tiktokDestinationOptionsTiktokDestinationOptionsSchema = z.object({
|
|
|
830
903
|
disableDuet: z.optional(z.boolean()).default(false),
|
|
831
904
|
disableStitch: z.optional(z.boolean()).default(false),
|
|
832
905
|
disableComment: z.optional(z.boolean()).default(false),
|
|
833
|
-
})
|
|
906
|
+
});
|
|
834
907
|
|
|
835
908
|
/**
|
|
836
909
|
* Send videos to TikTok. TikTok credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/tiktok), not in the request.
|
|
@@ -838,7 +911,7 @@ export const tiktokDestinationOptionsTiktokDestinationOptionsSchema = z.object({
|
|
|
838
911
|
export const tiktokDestinationTiktokDestinationSchema = z.object({
|
|
839
912
|
provider: z.literal("tiktok"),
|
|
840
913
|
options: z.optional(tiktokDestinationOptionsTiktokDestinationOptionsSchema),
|
|
841
|
-
})
|
|
914
|
+
});
|
|
842
915
|
|
|
843
916
|
/**
|
|
844
917
|
* Options to control the visibility of videos and privacy features.
|
|
@@ -852,7 +925,7 @@ export const vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema
|
|
|
852
925
|
comments: z.optional(z.enum(["anybody", "nobody", "contacts"])),
|
|
853
926
|
download: z.optional(z.boolean()),
|
|
854
927
|
add: z.optional(z.boolean()),
|
|
855
|
-
})
|
|
928
|
+
});
|
|
856
929
|
|
|
857
930
|
export const vimeoDestinationPrivacyOptionsSchema =
|
|
858
931
|
vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema;
|
|
@@ -867,7 +940,7 @@ export const vimeoDestinationOptionsVimeoDestinationOptionsSchema = z.object({
|
|
|
867
940
|
vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema,
|
|
868
941
|
),
|
|
869
942
|
folderUri: z.optional(z.string()),
|
|
870
|
-
})
|
|
943
|
+
});
|
|
871
944
|
|
|
872
945
|
export const vimeoDestinationOptionsSchema =
|
|
873
946
|
vimeoDestinationOptionsVimeoDestinationOptionsSchema;
|
|
@@ -878,7 +951,7 @@ export const vimeoDestinationOptionsSchema =
|
|
|
878
951
|
export const vimeoDestinationVimeoDestinationSchema = z.object({
|
|
879
952
|
provider: z.literal("vimeo"),
|
|
880
953
|
options: z.optional(vimeoDestinationOptionsVimeoDestinationOptionsSchema),
|
|
881
|
-
})
|
|
954
|
+
});
|
|
882
955
|
|
|
883
956
|
export const vimeoDestinationSchema = vimeoDestinationVimeoDestinationSchema;
|
|
884
957
|
|
|
@@ -905,7 +978,7 @@ export const destinationsSchema = destinationsDestinationsSchema;
|
|
|
905
978
|
export const fliptransformationFlipTransformationSchema = z.object({
|
|
906
979
|
horizontal: z.optional(z.boolean()),
|
|
907
980
|
vertical: z.optional(z.boolean()),
|
|
908
|
-
})
|
|
981
|
+
});
|
|
909
982
|
|
|
910
983
|
export const flipTransformationSchema =
|
|
911
984
|
fliptransformationFlipTransformationSchema;
|
|
@@ -915,7 +988,7 @@ export const flipTransformationSchema =
|
|
|
915
988
|
*/
|
|
916
989
|
export const fontFontSchema = z.object({
|
|
917
990
|
src: z.string(),
|
|
918
|
-
})
|
|
991
|
+
});
|
|
919
992
|
|
|
920
993
|
export const fontSchema = fontFontSchema;
|
|
921
994
|
|
|
@@ -933,8 +1006,8 @@ export const htmlassetHtmlAssetSchema = z.object({
|
|
|
933
1006
|
type: z.enum(["html"]),
|
|
934
1007
|
html: z.string(),
|
|
935
1008
|
css: z.optional(z.string()),
|
|
936
|
-
width: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
937
|
-
height: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1009
|
+
width: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1010
|
+
height: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
938
1011
|
background: z.optional(z.string()),
|
|
939
1012
|
position: z.optional(
|
|
940
1013
|
z.enum([
|
|
@@ -949,7 +1022,7 @@ export const htmlassetHtmlAssetSchema = z.object({
|
|
|
949
1022
|
"center",
|
|
950
1023
|
]),
|
|
951
1024
|
),
|
|
952
|
-
})
|
|
1025
|
+
});
|
|
953
1026
|
|
|
954
1027
|
export const htmlAssetSchema = htmlassetHtmlAssetSchema;
|
|
955
1028
|
|
|
@@ -958,9 +1031,9 @@ export const htmlAssetSchema = htmlassetHtmlAssetSchema;
|
|
|
958
1031
|
*/
|
|
959
1032
|
export const imageassetImageAssetSchema = z.object({
|
|
960
1033
|
type: z.enum(["image"]),
|
|
961
|
-
src: z.string().
|
|
1034
|
+
src: z.string().min(1).regex(/\S/),
|
|
962
1035
|
crop: z.optional(cropCropSchema),
|
|
963
|
-
})
|
|
1036
|
+
});
|
|
964
1037
|
|
|
965
1038
|
export const imageAssetSchema = imageassetImageAssetSchema;
|
|
966
1039
|
|
|
@@ -974,9 +1047,9 @@ export const imagetovideoassetImageToVideoAssetSchema = z.object({
|
|
|
974
1047
|
aspectRatio: z.optional(
|
|
975
1048
|
z.enum(["1:1", "4:3", "16:9", "9:16", "3:4", "21:9", "9:21"]),
|
|
976
1049
|
),
|
|
977
|
-
speed: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1050
|
+
speed: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
978
1051
|
crop: z.optional(cropCropSchema),
|
|
979
|
-
})
|
|
1052
|
+
});
|
|
980
1053
|
|
|
981
1054
|
export const imageToVideoAssetSchema = imagetovideoassetImageToVideoAssetSchema;
|
|
982
1055
|
|
|
@@ -995,7 +1068,7 @@ export const dolbyEnhancementOptionsDolbyEnhancementOptionsSchema = z.object({
|
|
|
995
1068
|
"studio",
|
|
996
1069
|
"voice_over",
|
|
997
1070
|
]),
|
|
998
|
-
})
|
|
1071
|
+
});
|
|
999
1072
|
|
|
1000
1073
|
export const dolbyEnhancementOptionsSchema =
|
|
1001
1074
|
dolbyEnhancementOptionsDolbyEnhancementOptionsSchema;
|
|
@@ -1006,7 +1079,7 @@ export const dolbyEnhancementOptionsSchema =
|
|
|
1006
1079
|
export const dolbyEnhancementDolbyEnhancementSchema = z.object({
|
|
1007
1080
|
provider: z.string().default("dolby"),
|
|
1008
1081
|
options: dolbyEnhancementOptionsDolbyEnhancementOptionsSchema,
|
|
1009
|
-
})
|
|
1082
|
+
});
|
|
1010
1083
|
|
|
1011
1084
|
export const dolbyEnhancementSchema = dolbyEnhancementDolbyEnhancementSchema;
|
|
1012
1085
|
|
|
@@ -1016,7 +1089,11 @@ export const dolbyEnhancementSchema = dolbyEnhancementDolbyEnhancementSchema;
|
|
|
1016
1089
|
* <li><a href="#tocs_dolbyenhancement">DolbyEnhancement</a></li>
|
|
1017
1090
|
* </ul>
|
|
1018
1091
|
*/
|
|
1019
|
-
export const audioEnhancementAudioEnhancementSchema =
|
|
1092
|
+
export const audioEnhancementAudioEnhancementSchema = z
|
|
1093
|
+
.object({
|
|
1094
|
+
enhancement: z.literal("dolbyEnhancement_DolbyEnhancement"),
|
|
1095
|
+
})
|
|
1096
|
+
.and(dolbyEnhancementDolbyEnhancementSchema);
|
|
1020
1097
|
|
|
1021
1098
|
export const audioEnhancementSchema = audioEnhancementAudioEnhancementSchema;
|
|
1022
1099
|
|
|
@@ -1025,7 +1102,7 @@ export const audioEnhancementSchema = audioEnhancementAudioEnhancementSchema;
|
|
|
1025
1102
|
*/
|
|
1026
1103
|
export const enhancementsEnhancementsSchema = z.object({
|
|
1027
1104
|
audio: z.optional(audioEnhancementAudioEnhancementSchema),
|
|
1028
|
-
})
|
|
1105
|
+
});
|
|
1029
1106
|
|
|
1030
1107
|
export const enhancementsSchema = enhancementsEnhancementsSchema;
|
|
1031
1108
|
|
|
@@ -1036,7 +1113,7 @@ export const ingesterrorresponsedataIngestErrorResponseDataSchema = z.object({
|
|
|
1036
1113
|
status: z.string(),
|
|
1037
1114
|
title: z.string(),
|
|
1038
1115
|
detail: z.string(),
|
|
1039
|
-
})
|
|
1116
|
+
});
|
|
1040
1117
|
|
|
1041
1118
|
export const ingestErrorResponseDataSchema =
|
|
1042
1119
|
ingesterrorresponsedataIngestErrorResponseDataSchema;
|
|
@@ -1046,7 +1123,7 @@ export const ingestErrorResponseDataSchema =
|
|
|
1046
1123
|
*/
|
|
1047
1124
|
export const ingesterrorresponseIngestErrorResponseSchema = z.object({
|
|
1048
1125
|
errors: z.array(ingesterrorresponsedataIngestErrorResponseDataSchema),
|
|
1049
|
-
})
|
|
1126
|
+
});
|
|
1050
1127
|
|
|
1051
1128
|
export const ingestErrorResponseSchema =
|
|
1052
1129
|
ingesterrorresponseIngestErrorResponseSchema;
|
|
@@ -1057,7 +1134,7 @@ export const ingestErrorResponseSchema =
|
|
|
1057
1134
|
export const queuedsourceresponsedataQueuedSourceResponseDataSchema = z.object({
|
|
1058
1135
|
type: z.string(),
|
|
1059
1136
|
id: z.string(),
|
|
1060
|
-
})
|
|
1137
|
+
});
|
|
1061
1138
|
|
|
1062
1139
|
export const queuedSourceResponseDataSchema =
|
|
1063
1140
|
queuedsourceresponsedataQueuedSourceResponseDataSchema;
|
|
@@ -1067,7 +1144,7 @@ export const queuedSourceResponseDataSchema =
|
|
|
1067
1144
|
*/
|
|
1068
1145
|
export const queuedsourceresponseQueuedSourceResponseSchema = z.object({
|
|
1069
1146
|
data: queuedsourceresponsedataQueuedSourceResponseDataSchema,
|
|
1070
|
-
})
|
|
1147
|
+
});
|
|
1071
1148
|
|
|
1072
1149
|
export const queuedSourceResponseSchema =
|
|
1073
1150
|
queuedsourceresponseQueuedSourceResponseSchema;
|
|
@@ -1079,7 +1156,7 @@ export const uploadresponseattributesUploadResponseAttributesSchema = z.object({
|
|
|
1079
1156
|
id: z.string(),
|
|
1080
1157
|
url: z.string(),
|
|
1081
1158
|
expires: z.string(),
|
|
1082
|
-
})
|
|
1159
|
+
});
|
|
1083
1160
|
|
|
1084
1161
|
export const uploadResponseAttributesSchema =
|
|
1085
1162
|
uploadresponseattributesUploadResponseAttributesSchema;
|
|
@@ -1091,7 +1168,7 @@ export const uploadresponsedataUploadResponseDataSchema = z.object({
|
|
|
1091
1168
|
type: z.string(),
|
|
1092
1169
|
id: z.string(),
|
|
1093
1170
|
attributes: uploadresponseattributesUploadResponseAttributesSchema,
|
|
1094
|
-
})
|
|
1171
|
+
});
|
|
1095
1172
|
|
|
1096
1173
|
export const uploadResponseDataSchema =
|
|
1097
1174
|
uploadresponsedataUploadResponseDataSchema;
|
|
@@ -1101,7 +1178,7 @@ export const uploadResponseDataSchema =
|
|
|
1101
1178
|
*/
|
|
1102
1179
|
export const uploadresponseUploadResponseSchema = z.object({
|
|
1103
1180
|
data: uploadresponsedataUploadResponseDataSchema,
|
|
1104
|
-
})
|
|
1181
|
+
});
|
|
1105
1182
|
|
|
1106
1183
|
export const uploadResponseSchema = uploadresponseUploadResponseSchema;
|
|
1107
1184
|
|
|
@@ -1109,9 +1186,9 @@ export const uploadResponseSchema = uploadresponseUploadResponseSchema;
|
|
|
1109
1186
|
* Set the playback speed of a video or audio file. Allows you to preserve the pitch of the audio so that it is sped up without sounding too high pitched or too low.
|
|
1110
1187
|
*/
|
|
1111
1188
|
export const speedSpeedSchema = z.object({
|
|
1112
|
-
speed: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1189
|
+
speed: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1113
1190
|
preservePitch: z.optional(z.boolean()),
|
|
1114
|
-
})
|
|
1191
|
+
});
|
|
1115
1192
|
|
|
1116
1193
|
export const speedSchema = speedSpeedSchema;
|
|
1117
1194
|
|
|
@@ -1120,7 +1197,7 @@ export const speedSchema = speedSpeedSchema;
|
|
|
1120
1197
|
*/
|
|
1121
1198
|
export const transcriptionTranscriptionSchema = z.object({
|
|
1122
1199
|
format: z.optional(z.enum(["srt", "vtt"])),
|
|
1123
|
-
})
|
|
1200
|
+
});
|
|
1124
1201
|
|
|
1125
1202
|
export const transcriptionSchema = transcriptionTranscriptionSchema;
|
|
1126
1203
|
|
|
@@ -1129,9 +1206,9 @@ export const transcriptionSchema = transcriptionTranscriptionSchema;
|
|
|
1129
1206
|
*/
|
|
1130
1207
|
export const lumaassetLumaAssetSchema = z.object({
|
|
1131
1208
|
type: z.enum(["luma"]),
|
|
1132
|
-
src: z.string().
|
|
1133
|
-
trim: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1134
|
-
})
|
|
1209
|
+
src: z.string().min(1).regex(/\S/),
|
|
1210
|
+
trim: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1211
|
+
});
|
|
1135
1212
|
|
|
1136
1213
|
export const lumaAssetSchema = lumaassetLumaAssetSchema;
|
|
1137
1214
|
|
|
@@ -1140,8 +1217,8 @@ export const lumaAssetSchema = lumaassetLumaAssetSchema;
|
|
|
1140
1217
|
*/
|
|
1141
1218
|
export const mergefieldMergeFieldSchema = z.object({
|
|
1142
1219
|
find: z.string(),
|
|
1143
|
-
replace: z.union([z.string(), z.
|
|
1144
|
-
})
|
|
1220
|
+
replace: z.union([z.string(), z.number(), z.boolean(), z.null(), z.record(z.string(), z.unknown()), z.array(z.unknown())]),
|
|
1221
|
+
});
|
|
1145
1222
|
|
|
1146
1223
|
export const mergeFieldSchema = mergefieldMergeFieldSchema;
|
|
1147
1224
|
|
|
@@ -1149,8 +1226,8 @@ export const mergeFieldSchema = mergefieldMergeFieldSchema;
|
|
|
1149
1226
|
* Generate a poster image for the video at a specific point from the timeline. The poster image size will match the size of the output video.
|
|
1150
1227
|
*/
|
|
1151
1228
|
export const posterPosterSchema = z.object({
|
|
1152
|
-
capture: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1153
|
-
})
|
|
1229
|
+
capture: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1230
|
+
});
|
|
1154
1231
|
|
|
1155
1232
|
export const posterSchema = posterPosterSchema;
|
|
1156
1233
|
|
|
@@ -1158,9 +1235,9 @@ export const posterSchema = posterPosterSchema;
|
|
|
1158
1235
|
* Specify a time range to render, i.e. to render only a portion of a video or audio file. Omit this setting to export the entire video. Range can also be used to render a frame at a specific time point - setting a range and output format as `jpg` will output a single frame image at the range `start` point.
|
|
1159
1236
|
*/
|
|
1160
1237
|
export const rangeRangeSchema = z.object({
|
|
1161
|
-
start: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1162
|
-
length: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1163
|
-
})
|
|
1238
|
+
start: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1239
|
+
length: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1240
|
+
});
|
|
1164
1241
|
|
|
1165
1242
|
export const rangeSchema = rangeRangeSchema;
|
|
1166
1243
|
|
|
@@ -1178,7 +1255,7 @@ export const assetresponseattributesAssetResponseAttributesSchema = z.object({
|
|
|
1178
1255
|
status: z.enum(["importing", "ready", "failed", "deleted"]),
|
|
1179
1256
|
created: z.optional(z.string()),
|
|
1180
1257
|
updated: z.optional(z.string()),
|
|
1181
|
-
})
|
|
1258
|
+
});
|
|
1182
1259
|
|
|
1183
1260
|
export const assetResponseAttributesSchema =
|
|
1184
1261
|
assetresponseattributesAssetResponseAttributesSchema;
|
|
@@ -1189,7 +1266,7 @@ export const assetResponseAttributesSchema =
|
|
|
1189
1266
|
export const assetresponsedataAssetResponseDataSchema = z.object({
|
|
1190
1267
|
type: z.string(),
|
|
1191
1268
|
attributes: assetresponseattributesAssetResponseAttributesSchema,
|
|
1192
|
-
})
|
|
1269
|
+
});
|
|
1193
1270
|
|
|
1194
1271
|
export const assetResponseDataSchema = assetresponsedataAssetResponseDataSchema;
|
|
1195
1272
|
|
|
@@ -1198,7 +1275,7 @@ export const assetResponseDataSchema = assetresponsedataAssetResponseDataSchema;
|
|
|
1198
1275
|
*/
|
|
1199
1276
|
export const assetrenderresponseAssetRenderResponseSchema = z.object({
|
|
1200
1277
|
data: z.array(assetresponsedataAssetResponseDataSchema),
|
|
1201
|
-
})
|
|
1278
|
+
});
|
|
1202
1279
|
|
|
1203
1280
|
export const assetRenderResponseSchema =
|
|
1204
1281
|
assetrenderresponseAssetRenderResponseSchema;
|
|
@@ -1208,7 +1285,7 @@ export const assetRenderResponseSchema =
|
|
|
1208
1285
|
*/
|
|
1209
1286
|
export const assetresponseAssetResponseSchema = z.object({
|
|
1210
1287
|
data: assetresponsedataAssetResponseDataSchema,
|
|
1211
|
-
})
|
|
1288
|
+
});
|
|
1212
1289
|
|
|
1213
1290
|
export const assetResponseSchema = assetresponseAssetResponseSchema;
|
|
1214
1291
|
|
|
@@ -1219,7 +1296,7 @@ export const proberesponseProbeResponseSchema = z.object({
|
|
|
1219
1296
|
success: z.boolean(),
|
|
1220
1297
|
message: z.string(),
|
|
1221
1298
|
response: z.record(z.string(), z.unknown()),
|
|
1222
|
-
})
|
|
1299
|
+
});
|
|
1223
1300
|
|
|
1224
1301
|
export const probeResponseSchema = proberesponseProbeResponseSchema;
|
|
1225
1302
|
|
|
@@ -1229,7 +1306,7 @@ export const probeResponseSchema = proberesponseProbeResponseSchema;
|
|
|
1229
1306
|
export const queuedresponsedataQueuedResponseDataSchema = z.object({
|
|
1230
1307
|
message: z.string(),
|
|
1231
1308
|
id: z.string(),
|
|
1232
|
-
})
|
|
1309
|
+
});
|
|
1233
1310
|
|
|
1234
1311
|
export const queuedResponseDataSchema =
|
|
1235
1312
|
queuedresponsedataQueuedResponseDataSchema;
|
|
@@ -1241,7 +1318,7 @@ export const queuedresponseQueuedResponseSchema = z.object({
|
|
|
1241
1318
|
success: z.boolean(),
|
|
1242
1319
|
message: z.string(),
|
|
1243
1320
|
response: queuedresponsedataQueuedResponseDataSchema,
|
|
1244
|
-
})
|
|
1321
|
+
});
|
|
1245
1322
|
|
|
1246
1323
|
export const queuedResponseSchema = queuedresponseQueuedResponseSchema;
|
|
1247
1324
|
|
|
@@ -1253,7 +1330,7 @@ export const templatelistresponseitemTemplateListResponseItemSchema = z.object({
|
|
|
1253
1330
|
name: z.string(),
|
|
1254
1331
|
created: z.optional(z.string()),
|
|
1255
1332
|
updated: z.optional(z.string()),
|
|
1256
|
-
})
|
|
1333
|
+
});
|
|
1257
1334
|
|
|
1258
1335
|
export const templateListResponseItemSchema =
|
|
1259
1336
|
templatelistresponseitemTemplateListResponseItemSchema;
|
|
@@ -1264,7 +1341,7 @@ export const templateListResponseItemSchema =
|
|
|
1264
1341
|
export const templatelistresponsedataTemplateListResponseDataSchema = z.object({
|
|
1265
1342
|
owner: z.string(),
|
|
1266
1343
|
templates: z.array(templatelistresponseitemTemplateListResponseItemSchema),
|
|
1267
|
-
})
|
|
1344
|
+
});
|
|
1268
1345
|
|
|
1269
1346
|
export const templateListResponseDataSchema =
|
|
1270
1347
|
templatelistresponsedataTemplateListResponseDataSchema;
|
|
@@ -1276,7 +1353,7 @@ export const templatelistresponseTemplateListResponseSchema = z.object({
|
|
|
1276
1353
|
success: z.boolean(),
|
|
1277
1354
|
message: z.string(),
|
|
1278
1355
|
response: templatelistresponsedataTemplateListResponseDataSchema,
|
|
1279
|
-
})
|
|
1356
|
+
});
|
|
1280
1357
|
|
|
1281
1358
|
export const templateListResponseSchema =
|
|
1282
1359
|
templatelistresponseTemplateListResponseSchema;
|
|
@@ -1287,7 +1364,7 @@ export const templateListResponseSchema =
|
|
|
1287
1364
|
export const templateresponsedataTemplateResponseDataSchema = z.object({
|
|
1288
1365
|
message: z.string(),
|
|
1289
1366
|
id: z.string(),
|
|
1290
|
-
})
|
|
1367
|
+
});
|
|
1291
1368
|
|
|
1292
1369
|
export const templateResponseDataSchema =
|
|
1293
1370
|
templateresponsedataTemplateResponseDataSchema;
|
|
@@ -1299,7 +1376,7 @@ export const templateresponseTemplateResponseSchema = z.object({
|
|
|
1299
1376
|
success: z.boolean(),
|
|
1300
1377
|
message: z.string(),
|
|
1301
1378
|
response: templateresponsedataTemplateResponseDataSchema,
|
|
1302
|
-
})
|
|
1379
|
+
});
|
|
1303
1380
|
|
|
1304
1381
|
export const templateResponseSchema = templateresponseTemplateResponseSchema;
|
|
1305
1382
|
|
|
@@ -1309,7 +1386,7 @@ export const templateResponseSchema = templateresponseTemplateResponseSchema;
|
|
|
1309
1386
|
export const richtextpropertiesRichTextAlignmentSchema = z.object({
|
|
1310
1387
|
horizontal: z.optional(z.enum(["left", "center", "right"])),
|
|
1311
1388
|
vertical: z.optional(z.enum(["top", "middle", "bottom"])),
|
|
1312
|
-
})
|
|
1389
|
+
});
|
|
1313
1390
|
|
|
1314
1391
|
export const richTextAlignmentSchema =
|
|
1315
1392
|
richtextpropertiesRichTextAlignmentSchema;
|
|
@@ -1326,10 +1403,10 @@ export const richtextpropertiesRichTextAnimationSchema = z.object({
|
|
|
1326
1403
|
"shift",
|
|
1327
1404
|
"movingLetters",
|
|
1328
1405
|
]),
|
|
1329
|
-
duration: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1406
|
+
duration: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0.1).lte(30)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1330
1407
|
style: z.optional(z.enum(["character", "word"])),
|
|
1331
1408
|
direction: z.optional(z.enum(["left", "right", "up", "down"])),
|
|
1332
|
-
})
|
|
1409
|
+
});
|
|
1333
1410
|
|
|
1334
1411
|
export const richTextAnimationSchema =
|
|
1335
1412
|
richtextpropertiesRichTextAnimationSchema;
|
|
@@ -1338,10 +1415,10 @@ export const richTextAnimationSchema =
|
|
|
1338
1415
|
* Background styling properties for the text bounding box.
|
|
1339
1416
|
*/
|
|
1340
1417
|
export const richtextpropertiesRichTextBackgroundSchema = z.object({
|
|
1341
|
-
color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)),
|
|
1342
|
-
opacity: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1343
|
-
borderRadius: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1344
|
-
})
|
|
1418
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1419
|
+
opacity: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1420
|
+
borderRadius: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1421
|
+
});
|
|
1345
1422
|
|
|
1346
1423
|
export const richTextBackgroundSchema =
|
|
1347
1424
|
richtextpropertiesRichTextBackgroundSchema;
|
|
@@ -1350,27 +1427,27 @@ export const richTextBackgroundSchema =
|
|
|
1350
1427
|
* Border styling properties for the text bounding box.
|
|
1351
1428
|
*/
|
|
1352
1429
|
export const richtextpropertiesRichTextBorderSchema = z.object({
|
|
1353
|
-
width: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1354
|
-
color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#000000"),
|
|
1355
|
-
opacity: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1356
|
-
radius: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1357
|
-
})
|
|
1430
|
+
width: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1431
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#000000"),
|
|
1432
|
+
opacity: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1433
|
+
radius: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1434
|
+
});
|
|
1358
1435
|
|
|
1359
1436
|
/**
|
|
1360
1437
|
* Gradient properties for text fill.
|
|
1361
1438
|
*/
|
|
1362
1439
|
export const richtextpropertiesRichTextGradientSchema = z.object({
|
|
1363
1440
|
type: z.optional(z.enum(["linear", "radial"])),
|
|
1364
|
-
angle: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1441
|
+
angle: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(360)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1365
1442
|
stops: z
|
|
1366
1443
|
.array(
|
|
1367
1444
|
z.object({
|
|
1368
|
-
offset: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1369
|
-
color: z.string().regex(/^#[A-Fa-f0-9]{6}$/),
|
|
1445
|
+
offset: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1446
|
+
color: z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1370
1447
|
}),
|
|
1371
1448
|
)
|
|
1372
1449
|
.min(2),
|
|
1373
|
-
})
|
|
1450
|
+
});
|
|
1374
1451
|
|
|
1375
1452
|
export const richTextGradientSchema = richtextpropertiesRichTextGradientSchema;
|
|
1376
1453
|
|
|
@@ -1378,22 +1455,22 @@ export const richTextGradientSchema = richtextpropertiesRichTextGradientSchema;
|
|
|
1378
1455
|
* Padding properties for individual sides of the text bounding box.
|
|
1379
1456
|
*/
|
|
1380
1457
|
export const richtextpropertiesRichTextPaddingSchema = z.object({
|
|
1381
|
-
top: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1382
|
-
right: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1383
|
-
bottom: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1384
|
-
left: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1385
|
-
})
|
|
1458
|
+
top: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1459
|
+
right: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1460
|
+
bottom: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1461
|
+
left: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1462
|
+
});
|
|
1386
1463
|
|
|
1387
1464
|
/**
|
|
1388
1465
|
* Text shadow properties.
|
|
1389
1466
|
*/
|
|
1390
1467
|
export const richtextpropertiesRichTextShadowSchema = z.object({
|
|
1391
|
-
offsetX: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1392
|
-
offsetY: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1393
|
-
blur: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1394
|
-
color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#000000"),
|
|
1395
|
-
opacity: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1396
|
-
})
|
|
1468
|
+
offsetX: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1469
|
+
offsetY: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1470
|
+
blur: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1471
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#000000"),
|
|
1472
|
+
opacity: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5),
|
|
1473
|
+
});
|
|
1397
1474
|
|
|
1398
1475
|
export const richTextShadowSchema = richtextpropertiesRichTextShadowSchema;
|
|
1399
1476
|
|
|
@@ -1401,10 +1478,10 @@ export const richTextShadowSchema = richtextpropertiesRichTextShadowSchema;
|
|
|
1401
1478
|
* Text stroke (outline) properties.
|
|
1402
1479
|
*/
|
|
1403
1480
|
export const richtextpropertiesRichTextStrokeSchema = z.object({
|
|
1404
|
-
width: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1405
|
-
color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#000000"),
|
|
1406
|
-
opacity: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1407
|
-
})
|
|
1481
|
+
width: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1482
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#000000"),
|
|
1483
|
+
opacity: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1484
|
+
});
|
|
1408
1485
|
|
|
1409
1486
|
export const richTextStrokeSchema = richtextpropertiesRichTextStrokeSchema;
|
|
1410
1487
|
|
|
@@ -1413,13 +1490,13 @@ export const richTextStrokeSchema = richtextpropertiesRichTextStrokeSchema;
|
|
|
1413
1490
|
*/
|
|
1414
1491
|
export const richtextpropertiesRichTextFontSchema = z.object({
|
|
1415
1492
|
family: z.optional(z.string()).default("Open Sans"),
|
|
1416
|
-
size: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1493
|
+
size: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int().gte(1).lte(500)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(24),
|
|
1417
1494
|
weight: z.optional(z.unknown()).default("400"),
|
|
1418
|
-
color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#ffffff"),
|
|
1419
|
-
opacity: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1420
|
-
background: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)),
|
|
1495
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#ffffff"),
|
|
1496
|
+
opacity: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1497
|
+
background: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1421
1498
|
stroke: z.optional(richtextpropertiesRichTextStrokeSchema),
|
|
1422
|
-
})
|
|
1499
|
+
});
|
|
1423
1500
|
|
|
1424
1501
|
export const richTextFontSchema = richtextpropertiesRichTextFontSchema;
|
|
1425
1502
|
|
|
@@ -1427,14 +1504,14 @@ export const richTextFontSchema = richtextpropertiesRichTextFontSchema;
|
|
|
1427
1504
|
* Text style properties including spacing, line height, and transformations.
|
|
1428
1505
|
*/
|
|
1429
1506
|
export const richtextpropertiesRichTextStyleSchema = z.object({
|
|
1430
|
-
letterSpacing: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1431
|
-
lineHeight: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1507
|
+
letterSpacing: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1508
|
+
lineHeight: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1.2),
|
|
1432
1509
|
textTransform: z.optional(
|
|
1433
1510
|
z.enum(["none", "uppercase", "lowercase", "capitalize"]),
|
|
1434
1511
|
),
|
|
1435
1512
|
textDecoration: z.optional(z.enum(["none", "underline", "line-through"])),
|
|
1436
1513
|
gradient: z.optional(richtextpropertiesRichTextGradientSchema),
|
|
1437
|
-
})
|
|
1514
|
+
});
|
|
1438
1515
|
|
|
1439
1516
|
export const richTextStyleSchema = richtextpropertiesRichTextStyleSchema;
|
|
1440
1517
|
|
|
@@ -1452,11 +1529,11 @@ export const richtextassetRichTextAssetSchema = z.object({
|
|
|
1452
1529
|
background: z.optional(richtextpropertiesRichTextBackgroundSchema),
|
|
1453
1530
|
border: z.optional(richtextpropertiesRichTextBorderSchema),
|
|
1454
1531
|
padding: z.optional(
|
|
1455
|
-
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1532
|
+
z.union([z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), richtextpropertiesRichTextPaddingSchema]),
|
|
1456
1533
|
),
|
|
1457
1534
|
align: z.optional(richtextpropertiesRichTextAlignmentSchema),
|
|
1458
1535
|
animation: z.optional(richtextpropertiesRichTextAnimationSchema),
|
|
1459
|
-
})
|
|
1536
|
+
});
|
|
1460
1537
|
|
|
1461
1538
|
export const richTextAssetSchema = richtextassetRichTextAssetSchema;
|
|
1462
1539
|
|
|
@@ -1469,7 +1546,7 @@ export const transferresponseattributesTransferResponseAttributesSchema =
|
|
|
1469
1546
|
owner: z.optional(z.string()),
|
|
1470
1547
|
status: z.optional(z.enum(["queued", "failed"])),
|
|
1471
1548
|
created: z.optional(z.string()),
|
|
1472
|
-
})
|
|
1549
|
+
});
|
|
1473
1550
|
|
|
1474
1551
|
export const transferResponseAttributesSchema =
|
|
1475
1552
|
transferresponseattributesTransferResponseAttributesSchema;
|
|
@@ -1482,7 +1559,7 @@ export const transferresponsedataTransferResponseDataSchema = z.object({
|
|
|
1482
1559
|
attributes: z.optional(
|
|
1483
1560
|
transferresponseattributesTransferResponseAttributesSchema,
|
|
1484
1561
|
),
|
|
1485
|
-
})
|
|
1562
|
+
});
|
|
1486
1563
|
|
|
1487
1564
|
export const transferResponseDataSchema =
|
|
1488
1565
|
transferresponsedataTransferResponseDataSchema;
|
|
@@ -1492,7 +1569,7 @@ export const transferResponseDataSchema =
|
|
|
1492
1569
|
*/
|
|
1493
1570
|
export const transferresponseTransferResponseSchema = z.object({
|
|
1494
1571
|
data: transferresponsedataTransferResponseDataSchema,
|
|
1495
|
-
})
|
|
1572
|
+
});
|
|
1496
1573
|
|
|
1497
1574
|
export const transferResponseSchema = transferresponseTransferResponseSchema;
|
|
1498
1575
|
|
|
@@ -1503,7 +1580,7 @@ export const transferTransferSchema = z.object({
|
|
|
1503
1580
|
url: z.string(),
|
|
1504
1581
|
id: z.string(),
|
|
1505
1582
|
destinations: z.array(destinationsDestinationsSchema),
|
|
1506
|
-
})
|
|
1583
|
+
});
|
|
1507
1584
|
|
|
1508
1585
|
export const transferSchema = transferTransferSchema;
|
|
1509
1586
|
|
|
@@ -1515,39 +1592,39 @@ export const transferSchema = transferTransferSchema;
|
|
|
1515
1592
|
export const shapeassetShapeAssetSchema = z.object({
|
|
1516
1593
|
type: z.enum(["shape"]),
|
|
1517
1594
|
shape: z.enum(["rectangle", "circle", "line"]),
|
|
1518
|
-
width: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1519
|
-
height: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1595
|
+
width: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1596
|
+
height: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1520
1597
|
fill: z.optional(
|
|
1521
1598
|
z.object({
|
|
1522
1599
|
color: z.optional(z.string()),
|
|
1523
|
-
opacity: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1600
|
+
opacity: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1524
1601
|
}),
|
|
1525
1602
|
),
|
|
1526
1603
|
stroke: z.optional(
|
|
1527
1604
|
z.object({
|
|
1528
1605
|
color: z.optional(z.string()),
|
|
1529
|
-
width: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1606
|
+
width: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1530
1607
|
}),
|
|
1531
1608
|
),
|
|
1532
1609
|
rectangle: z.optional(
|
|
1533
1610
|
z.object({
|
|
1534
|
-
width: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1535
|
-
height: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1536
|
-
cornerRadius: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1611
|
+
width: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1612
|
+
height: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1613
|
+
cornerRadius: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1537
1614
|
}),
|
|
1538
1615
|
),
|
|
1539
1616
|
circle: z.optional(
|
|
1540
1617
|
z.object({
|
|
1541
|
-
radius: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1618
|
+
radius: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1542
1619
|
}),
|
|
1543
1620
|
),
|
|
1544
1621
|
line: z.optional(
|
|
1545
1622
|
z.object({
|
|
1546
|
-
length: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1547
|
-
thickness: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1623
|
+
length: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1624
|
+
thickness: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1548
1625
|
}),
|
|
1549
1626
|
),
|
|
1550
|
-
})
|
|
1627
|
+
});
|
|
1551
1628
|
|
|
1552
1629
|
export const shapeAssetSchema = shapeassetShapeAssetSchema;
|
|
1553
1630
|
|
|
@@ -1555,9 +1632,9 @@ export const shapeAssetSchema = shapeassetShapeAssetSchema;
|
|
|
1555
1632
|
* Set a custom size for a video or image in pixels. When using a custom size omit the `resolution` and `aspectRatio`. Custom sizes must be divisible by 2 based on the encoder specifications.
|
|
1556
1633
|
*/
|
|
1557
1634
|
export const sizeSizeSchema = z.object({
|
|
1558
|
-
width: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1559
|
-
height: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1560
|
-
})
|
|
1635
|
+
width: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1636
|
+
height: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1637
|
+
});
|
|
1561
1638
|
|
|
1562
1639
|
export const sizeSchema = sizeSizeSchema;
|
|
1563
1640
|
|
|
@@ -1587,7 +1664,7 @@ export const renditionRenditionSchema = z.object({
|
|
|
1587
1664
|
size: z.optional(sizeSizeSchema),
|
|
1588
1665
|
fit: z.optional(z.enum(["cover", "contain", "crop"])),
|
|
1589
1666
|
resolution: z.optional(z.enum(["preview", "mobile", "sd", "hd", "fhd"])),
|
|
1590
|
-
quality: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1667
|
+
quality: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int().gte(1).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1591
1668
|
fps: z.optional(
|
|
1592
1669
|
z.union([
|
|
1593
1670
|
z.literal(12),
|
|
@@ -1604,12 +1681,12 @@ export const renditionRenditionSchema = z.object({
|
|
|
1604
1681
|
]),
|
|
1605
1682
|
),
|
|
1606
1683
|
speed: z.optional(speedSpeedSchema),
|
|
1607
|
-
keyframeInterval: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1684
|
+
keyframeInterval: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int().gte(1).lte(300)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1608
1685
|
fixOffset: z.optional(z.boolean()),
|
|
1609
1686
|
fixRotation: z.optional(z.boolean()),
|
|
1610
1687
|
enhance: z.optional(enhancementsEnhancementsSchema),
|
|
1611
1688
|
filename: z.optional(z.string()),
|
|
1612
|
-
})
|
|
1689
|
+
});
|
|
1613
1690
|
|
|
1614
1691
|
export const renditionSchema = renditionRenditionSchema;
|
|
1615
1692
|
|
|
@@ -1619,7 +1696,7 @@ export const renditionSchema = renditionRenditionSchema;
|
|
|
1619
1696
|
export const outputsOutputsSchema = z.object({
|
|
1620
1697
|
renditions: z.optional(z.array(renditionRenditionSchema)),
|
|
1621
1698
|
transcription: z.optional(transcriptionTranscriptionSchema),
|
|
1622
|
-
})
|
|
1699
|
+
});
|
|
1623
1700
|
|
|
1624
1701
|
export const outputsSchema = outputsOutputsSchema;
|
|
1625
1702
|
|
|
@@ -1640,13 +1717,13 @@ export const renditionresponseattributesRenditionResponseAttributesSchema =
|
|
|
1640
1717
|
]),
|
|
1641
1718
|
),
|
|
1642
1719
|
url: z.optional(z.string()),
|
|
1643
|
-
executionTime: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1720
|
+
executionTime: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1644
1721
|
transformation: z.optional(renditionRenditionSchema),
|
|
1645
|
-
width: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1646
|
-
height: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1647
|
-
duration: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1648
|
-
fps: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1649
|
-
})
|
|
1722
|
+
width: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1723
|
+
height: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1724
|
+
duration: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1725
|
+
fps: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1726
|
+
});
|
|
1650
1727
|
|
|
1651
1728
|
export const renditionResponseAttributesSchema =
|
|
1652
1729
|
renditionresponseattributesRenditionResponseAttributesSchema;
|
|
@@ -1658,7 +1735,7 @@ export const outputsresponseOutputsResponseSchema = z.object({
|
|
|
1658
1735
|
renditions: z.optional(
|
|
1659
1736
|
z.array(renditionresponseattributesRenditionResponseAttributesSchema),
|
|
1660
1737
|
),
|
|
1661
|
-
})
|
|
1738
|
+
});
|
|
1662
1739
|
|
|
1663
1740
|
export const outputsResponseSchema = outputsresponseOutputsResponseSchema;
|
|
1664
1741
|
|
|
@@ -1681,13 +1758,13 @@ export const sourceresponseattributesSourceResponseAttributesSchema = z.object({
|
|
|
1681
1758
|
]),
|
|
1682
1759
|
),
|
|
1683
1760
|
outputs: z.optional(outputsresponseOutputsResponseSchema),
|
|
1684
|
-
width: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1685
|
-
height: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1686
|
-
duration: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1687
|
-
fps: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1761
|
+
width: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1762
|
+
height: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1763
|
+
duration: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1764
|
+
fps: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1688
1765
|
created: z.optional(z.string()),
|
|
1689
1766
|
updated: z.optional(z.string()),
|
|
1690
|
-
})
|
|
1767
|
+
});
|
|
1691
1768
|
|
|
1692
1769
|
export const sourceResponseAttributesSchema =
|
|
1693
1770
|
sourceresponseattributesSourceResponseAttributesSchema;
|
|
@@ -1699,7 +1776,7 @@ export const sourceresponsedataSourceResponseDataSchema = z.object({
|
|
|
1699
1776
|
type: z.string(),
|
|
1700
1777
|
id: z.string(),
|
|
1701
1778
|
attributes: sourceresponseattributesSourceResponseAttributesSchema,
|
|
1702
|
-
})
|
|
1779
|
+
});
|
|
1703
1780
|
|
|
1704
1781
|
export const sourceResponseDataSchema =
|
|
1705
1782
|
sourceresponsedataSourceResponseDataSchema;
|
|
@@ -1709,7 +1786,7 @@ export const sourceResponseDataSchema =
|
|
|
1709
1786
|
*/
|
|
1710
1787
|
export const sourcelistresponseSourceListResponseSchema = z.object({
|
|
1711
1788
|
data: z.array(sourceresponsedataSourceResponseDataSchema),
|
|
1712
|
-
})
|
|
1789
|
+
});
|
|
1713
1790
|
|
|
1714
1791
|
export const sourceListResponseSchema =
|
|
1715
1792
|
sourcelistresponseSourceListResponseSchema;
|
|
@@ -1719,7 +1796,7 @@ export const sourceListResponseSchema =
|
|
|
1719
1796
|
*/
|
|
1720
1797
|
export const sourceresponseSourceResponseSchema = z.object({
|
|
1721
1798
|
data: sourceresponsedataSourceResponseDataSchema,
|
|
1722
|
-
})
|
|
1799
|
+
});
|
|
1723
1800
|
|
|
1724
1801
|
export const sourceResponseSchema = sourceresponseSourceResponseSchema;
|
|
1725
1802
|
|
|
@@ -1732,7 +1809,7 @@ export const sourceSourceSchema = z.object({
|
|
|
1732
1809
|
outputs: z.optional(outputsOutputsSchema),
|
|
1733
1810
|
destinations: z.optional(destinationsDestinationsSchema),
|
|
1734
1811
|
callback: z.optional(z.string()),
|
|
1735
|
-
})
|
|
1812
|
+
});
|
|
1736
1813
|
|
|
1737
1814
|
export const sourceSchema = sourceSourceSchema;
|
|
1738
1815
|
|
|
@@ -1742,8 +1819,8 @@ export const sourceSchema = sourceSourceSchema;
|
|
|
1742
1819
|
export const soundtrackSoundtrackSchema = z.object({
|
|
1743
1820
|
src: z.string().min(1).regex(/\S/),
|
|
1744
1821
|
effect: z.optional(z.enum(["fadeIn", "fadeOut", "fadeInFadeOut"])),
|
|
1745
|
-
volume: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1746
|
-
})
|
|
1822
|
+
volume: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1823
|
+
});
|
|
1747
1824
|
|
|
1748
1825
|
export const soundtrackSchema = soundtrackSoundtrackSchema;
|
|
1749
1826
|
|
|
@@ -1753,9 +1830,9 @@ export const soundtrackSchema = soundtrackSoundtrackSchema;
|
|
|
1753
1830
|
*
|
|
1754
1831
|
*/
|
|
1755
1832
|
export const svgpropertiesSvgGradientStopSchema = z.object({
|
|
1756
|
-
offset: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1757
|
-
color: z.string().regex(/^#[A-Fa-f0-9]{6}$/),
|
|
1758
|
-
})
|
|
1833
|
+
offset: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1834
|
+
color: z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1835
|
+
});
|
|
1759
1836
|
|
|
1760
1837
|
export const svgGradientStopSchema = svgpropertiesSvgGradientStopSchema;
|
|
1761
1838
|
|
|
@@ -1766,10 +1843,10 @@ export const svgGradientStopSchema = svgpropertiesSvgGradientStopSchema;
|
|
|
1766
1843
|
*/
|
|
1767
1844
|
export const svgpropertiesSvgLinearGradientFillSchema = z.object({
|
|
1768
1845
|
type: z.enum(["linear"]),
|
|
1769
|
-
angle: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1846
|
+
angle: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(360)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1770
1847
|
stops: z.array(svgpropertiesSvgGradientStopSchema).min(2),
|
|
1771
|
-
opacity: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1772
|
-
})
|
|
1848
|
+
opacity: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1849
|
+
});
|
|
1773
1850
|
|
|
1774
1851
|
export const svgLinearGradientFillSchema =
|
|
1775
1852
|
svgpropertiesSvgLinearGradientFillSchema;
|
|
@@ -1782,8 +1859,8 @@ export const svgLinearGradientFillSchema =
|
|
|
1782
1859
|
export const svgpropertiesSvgRadialGradientFillSchema = z.object({
|
|
1783
1860
|
type: z.enum(["radial"]),
|
|
1784
1861
|
stops: z.array(svgpropertiesSvgGradientStopSchema).min(2),
|
|
1785
|
-
opacity: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1786
|
-
})
|
|
1862
|
+
opacity: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1863
|
+
});
|
|
1787
1864
|
|
|
1788
1865
|
export const svgRadialGradientFillSchema =
|
|
1789
1866
|
svgpropertiesSvgRadialGradientFillSchema;
|
|
@@ -1793,12 +1870,12 @@ export const svgRadialGradientFillSchema =
|
|
|
1793
1870
|
*
|
|
1794
1871
|
*/
|
|
1795
1872
|
export const svgpropertiesSvgShadowSchema = z.object({
|
|
1796
|
-
offsetX: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1797
|
-
offsetY: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1798
|
-
blur: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1799
|
-
color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#000000"),
|
|
1800
|
-
opacity: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1801
|
-
})
|
|
1873
|
+
offsetX: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1874
|
+
offsetY: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1875
|
+
blur: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1876
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#000000"),
|
|
1877
|
+
opacity: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5),
|
|
1878
|
+
});
|
|
1802
1879
|
|
|
1803
1880
|
export const svgShadowSchema = svgpropertiesSvgShadowSchema;
|
|
1804
1881
|
|
|
@@ -1811,8 +1888,8 @@ export const svgpropertiesSvgSolidFillSchema = z.object({
|
|
|
1811
1888
|
.string()
|
|
1812
1889
|
.regex(/^#[A-Fa-f0-9]{6}$/)
|
|
1813
1890
|
.default("#000000"),
|
|
1814
|
-
opacity: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1815
|
-
})
|
|
1891
|
+
opacity: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1892
|
+
});
|
|
1816
1893
|
|
|
1817
1894
|
export const svgSolidFillSchema = svgpropertiesSvgSolidFillSchema;
|
|
1818
1895
|
|
|
@@ -1835,14 +1912,14 @@ export const svgFillSchema = svgpropertiesSvgFillSchema;
|
|
|
1835
1912
|
*
|
|
1836
1913
|
*/
|
|
1837
1914
|
export const svgpropertiesSvgStrokeSchema = z.object({
|
|
1838
|
-
color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#000000"),
|
|
1839
|
-
width: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1840
|
-
opacity: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1915
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#000000"),
|
|
1916
|
+
width: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1917
|
+
opacity: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1841
1918
|
lineCap: z.optional(z.enum(["butt", "round", "square"])),
|
|
1842
1919
|
lineJoin: z.optional(z.enum(["miter", "round", "bevel"])),
|
|
1843
|
-
dashArray: z.optional(z.array(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1844
|
-
dashOffset: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1845
|
-
})
|
|
1920
|
+
dashArray: z.optional(z.array(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))),
|
|
1921
|
+
dashOffset: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1922
|
+
});
|
|
1846
1923
|
|
|
1847
1924
|
export const svgStrokeSchema = svgpropertiesSvgStrokeSchema;
|
|
1848
1925
|
|
|
@@ -1851,13 +1928,13 @@ export const svgStrokeSchema = svgpropertiesSvgStrokeSchema;
|
|
|
1851
1928
|
*
|
|
1852
1929
|
*/
|
|
1853
1930
|
export const svgpropertiesSvgTransformSchema = z.object({
|
|
1854
|
-
x: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1855
|
-
y: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1856
|
-
rotation: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1857
|
-
scale: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1858
|
-
originX: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1859
|
-
originY: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1860
|
-
})
|
|
1931
|
+
x: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1932
|
+
y: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1933
|
+
rotation: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(-360).lte(360)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1934
|
+
scale: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0.01).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1935
|
+
originX: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5),
|
|
1936
|
+
originY: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5),
|
|
1937
|
+
});
|
|
1861
1938
|
|
|
1862
1939
|
export const svgTransformSchema = svgpropertiesSvgTransformSchema;
|
|
1863
1940
|
|
|
@@ -1868,11 +1945,11 @@ export const svgTransformSchema = svgpropertiesSvgTransformSchema;
|
|
|
1868
1945
|
*/
|
|
1869
1946
|
export const svgshapesSvgArrowShapeSchema = z.object({
|
|
1870
1947
|
type: z.enum(["arrow"]),
|
|
1871
|
-
length: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1872
|
-
headWidth: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1873
|
-
headLength: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1874
|
-
shaftWidth: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1875
|
-
})
|
|
1948
|
+
length: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1949
|
+
headWidth: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(1000)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1950
|
+
headLength: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(1000)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1951
|
+
shaftWidth: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(1000)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1952
|
+
});
|
|
1876
1953
|
|
|
1877
1954
|
export const svgArrowShapeSchema = svgshapesSvgArrowShapeSchema;
|
|
1878
1955
|
|
|
@@ -1883,8 +1960,8 @@ export const svgArrowShapeSchema = svgshapesSvgArrowShapeSchema;
|
|
|
1883
1960
|
*/
|
|
1884
1961
|
export const svgshapesSvgCircleShapeSchema = z.object({
|
|
1885
1962
|
type: z.enum(["circle"]),
|
|
1886
|
-
radius: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1887
|
-
})
|
|
1963
|
+
radius: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1964
|
+
});
|
|
1888
1965
|
|
|
1889
1966
|
export const svgCircleShapeSchema = svgshapesSvgCircleShapeSchema;
|
|
1890
1967
|
|
|
@@ -1895,10 +1972,10 @@ export const svgCircleShapeSchema = svgshapesSvgCircleShapeSchema;
|
|
|
1895
1972
|
*/
|
|
1896
1973
|
export const svgshapesSvgCrossShapeSchema = z.object({
|
|
1897
1974
|
type: z.enum(["cross"]),
|
|
1898
|
-
width: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1899
|
-
height: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1900
|
-
thickness: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1901
|
-
})
|
|
1975
|
+
width: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1976
|
+
height: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1977
|
+
thickness: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(500)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1978
|
+
});
|
|
1902
1979
|
|
|
1903
1980
|
export const svgCrossShapeSchema = svgshapesSvgCrossShapeSchema;
|
|
1904
1981
|
|
|
@@ -1909,9 +1986,9 @@ export const svgCrossShapeSchema = svgshapesSvgCrossShapeSchema;
|
|
|
1909
1986
|
*/
|
|
1910
1987
|
export const svgshapesSvgEllipseShapeSchema = z.object({
|
|
1911
1988
|
type: z.enum(["ellipse"]),
|
|
1912
|
-
radiusX: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1913
|
-
radiusY: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1914
|
-
})
|
|
1989
|
+
radiusX: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1990
|
+
radiusY: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1991
|
+
});
|
|
1915
1992
|
|
|
1916
1993
|
export const svgEllipseShapeSchema = svgshapesSvgEllipseShapeSchema;
|
|
1917
1994
|
|
|
@@ -1922,8 +1999,8 @@ export const svgEllipseShapeSchema = svgshapesSvgEllipseShapeSchema;
|
|
|
1922
1999
|
*/
|
|
1923
2000
|
export const svgshapesSvgHeartShapeSchema = z.object({
|
|
1924
2001
|
type: z.enum(["heart"]),
|
|
1925
|
-
size: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1926
|
-
})
|
|
2002
|
+
size: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2003
|
+
});
|
|
1927
2004
|
|
|
1928
2005
|
export const svgHeartShapeSchema = svgshapesSvgHeartShapeSchema;
|
|
1929
2006
|
|
|
@@ -1934,9 +2011,9 @@ export const svgHeartShapeSchema = svgshapesSvgHeartShapeSchema;
|
|
|
1934
2011
|
*/
|
|
1935
2012
|
export const svgshapesSvgLineShapeSchema = z.object({
|
|
1936
2013
|
type: z.enum(["line"]),
|
|
1937
|
-
length: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1938
|
-
thickness: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1939
|
-
})
|
|
2014
|
+
length: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2015
|
+
thickness: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(500)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2016
|
+
});
|
|
1940
2017
|
|
|
1941
2018
|
export const svgLineShapeSchema = svgshapesSvgLineShapeSchema;
|
|
1942
2019
|
|
|
@@ -1960,7 +2037,7 @@ export const svgLineShapeSchema = svgshapesSvgLineShapeSchema;
|
|
|
1960
2037
|
export const svgshapesSvgPathShapeSchema = z.object({
|
|
1961
2038
|
type: z.enum(["path"]),
|
|
1962
2039
|
d: z.string().min(1).max(100000),
|
|
1963
|
-
})
|
|
2040
|
+
});
|
|
1964
2041
|
|
|
1965
2042
|
export const svgPathShapeSchema = svgshapesSvgPathShapeSchema;
|
|
1966
2043
|
|
|
@@ -1972,9 +2049,9 @@ export const svgPathShapeSchema = svgshapesSvgPathShapeSchema;
|
|
|
1972
2049
|
*/
|
|
1973
2050
|
export const svgshapesSvgPolygonShapeSchema = z.object({
|
|
1974
2051
|
type: z.enum(["polygon"]),
|
|
1975
|
-
sides: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1976
|
-
radius: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1977
|
-
})
|
|
2052
|
+
sides: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int().gte(3).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2053
|
+
radius: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2054
|
+
});
|
|
1978
2055
|
|
|
1979
2056
|
export const svgPolygonShapeSchema = svgshapesSvgPolygonShapeSchema;
|
|
1980
2057
|
|
|
@@ -1985,10 +2062,10 @@ export const svgPolygonShapeSchema = svgshapesSvgPolygonShapeSchema;
|
|
|
1985
2062
|
*/
|
|
1986
2063
|
export const svgshapesSvgRectangleShapeSchema = z.object({
|
|
1987
2064
|
type: z.enum(["rectangle"]),
|
|
1988
|
-
width: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1989
|
-
height: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1990
|
-
cornerRadius: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1991
|
-
})
|
|
2065
|
+
width: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2066
|
+
height: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2067
|
+
cornerRadius: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
2068
|
+
});
|
|
1992
2069
|
|
|
1993
2070
|
export const svgRectangleShapeSchema = svgshapesSvgRectangleShapeSchema;
|
|
1994
2071
|
|
|
@@ -1999,9 +2076,9 @@ export const svgRectangleShapeSchema = svgshapesSvgRectangleShapeSchema;
|
|
|
1999
2076
|
*/
|
|
2000
2077
|
export const svgshapesSvgRingShapeSchema = z.object({
|
|
2001
2078
|
type: z.enum(["ring"]),
|
|
2002
|
-
outerRadius: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2003
|
-
innerRadius: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2004
|
-
})
|
|
2079
|
+
outerRadius: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2080
|
+
innerRadius: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2081
|
+
});
|
|
2005
2082
|
|
|
2006
2083
|
export const svgRingShapeSchema = svgshapesSvgRingShapeSchema;
|
|
2007
2084
|
|
|
@@ -2013,10 +2090,10 @@ export const svgRingShapeSchema = svgshapesSvgRingShapeSchema;
|
|
|
2013
2090
|
*/
|
|
2014
2091
|
export const svgshapesSvgStarShapeSchema = z.object({
|
|
2015
2092
|
type: z.enum(["star"]),
|
|
2016
|
-
points: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2017
|
-
outerRadius: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2018
|
-
innerRadius: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2019
|
-
})
|
|
2093
|
+
points: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int().gte(3).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2094
|
+
outerRadius: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2095
|
+
innerRadius: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2096
|
+
});
|
|
2020
2097
|
|
|
2021
2098
|
export const svgStarShapeSchema = svgshapesSvgStarShapeSchema;
|
|
2022
2099
|
|
|
@@ -2093,10 +2170,10 @@ export const svgassetSvgAssetSchema = z.object({
|
|
|
2093
2170
|
stroke: z.optional(svgpropertiesSvgStrokeSchema),
|
|
2094
2171
|
shadow: z.optional(svgpropertiesSvgShadowSchema),
|
|
2095
2172
|
transform: z.optional(svgpropertiesSvgTransformSchema),
|
|
2096
|
-
opacity: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2097
|
-
width: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2098
|
-
height: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2099
|
-
}).
|
|
2173
|
+
opacity: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
2174
|
+
width: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2175
|
+
height: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2176
|
+
}).superRefine((data, ctx) => {
|
|
2100
2177
|
const hasShape = data.shape !== undefined;
|
|
2101
2178
|
const hasSrc = data.src !== undefined && data.src.trim() !== "";
|
|
2102
2179
|
|
|
@@ -2129,29 +2206,6 @@ export const svgassetSvgAssetSchema = z.object({
|
|
|
2129
2206
|
}
|
|
2130
2207
|
}
|
|
2131
2208
|
});
|
|
2132
|
-
}
|
|
2133
|
-
|
|
2134
|
-
if (hasShape && hasSrc) {
|
|
2135
|
-
ctx.addIssue({
|
|
2136
|
-
code: z.ZodIssueCode.custom,
|
|
2137
|
-
message: "Provide either 'src' or 'shape', not both",
|
|
2138
|
-
path: ["src"],
|
|
2139
|
-
});
|
|
2140
|
-
}
|
|
2141
|
-
|
|
2142
|
-
if (hasSrc) {
|
|
2143
|
-
const disallowedProps = ["shape", "fill", "stroke", "shadow", "transform", "width", "height"];
|
|
2144
|
-
for (const prop of disallowedProps) {
|
|
2145
|
-
if (data[prop] !== undefined) {
|
|
2146
|
-
ctx.addIssue({
|
|
2147
|
-
code: z.ZodIssueCode.custom,
|
|
2148
|
-
message: `'${prop}' is not allowed when using 'src'. Only 'type' and 'src' are allowed in import mode`,
|
|
2149
|
-
path: [prop],
|
|
2150
|
-
});
|
|
2151
|
-
}
|
|
2152
|
-
}
|
|
2153
|
-
}
|
|
2154
|
-
});
|
|
2155
2209
|
|
|
2156
2210
|
export const svgAssetSchema = svgassetSvgAssetSchema;
|
|
2157
2211
|
|
|
@@ -2161,7 +2215,7 @@ export const svgAssetSchema = svgassetSvgAssetSchema;
|
|
|
2161
2215
|
export const templaterenderTemplateRenderSchema = z.object({
|
|
2162
2216
|
id: z.string(),
|
|
2163
2217
|
merge: z.optional(z.array(mergefieldMergeFieldSchema)),
|
|
2164
|
-
})
|
|
2218
|
+
});
|
|
2165
2219
|
|
|
2166
2220
|
export const templateRenderSchema = templaterenderTemplateRenderSchema;
|
|
2167
2221
|
|
|
@@ -2171,7 +2225,7 @@ export const templateRenderSchema = templaterenderTemplateRenderSchema;
|
|
|
2171
2225
|
export const textpropertiesTextAlignmentSchema = z.object({
|
|
2172
2226
|
horizontal: z.optional(z.enum(["left", "center", "right"])),
|
|
2173
2227
|
vertical: z.optional(z.enum(["top", "center", "bottom"])),
|
|
2174
|
-
})
|
|
2228
|
+
});
|
|
2175
2229
|
|
|
2176
2230
|
export const textAlignmentSchema = textpropertiesTextAlignmentSchema;
|
|
2177
2231
|
|
|
@@ -2180,18 +2234,18 @@ export const textAlignmentSchema = textpropertiesTextAlignmentSchema;
|
|
|
2180
2234
|
*/
|
|
2181
2235
|
export const textpropertiesTextAnimationSchema = z.object({
|
|
2182
2236
|
preset: z.enum(["typewriter"]),
|
|
2183
|
-
duration: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2184
|
-
})
|
|
2237
|
+
duration: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0.1).lte(30)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2238
|
+
});
|
|
2185
2239
|
|
|
2186
2240
|
/**
|
|
2187
2241
|
* Displays a background box behind the text.
|
|
2188
2242
|
*/
|
|
2189
2243
|
export const textpropertiesTextBackgroundSchema = z.object({
|
|
2190
|
-
color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)),
|
|
2191
|
-
opacity: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2192
|
-
padding: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2193
|
-
borderRadius: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2194
|
-
})
|
|
2244
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2245
|
+
opacity: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2246
|
+
padding: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2247
|
+
borderRadius: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2248
|
+
});
|
|
2195
2249
|
|
|
2196
2250
|
export const textBackgroundSchema = textpropertiesTextBackgroundSchema;
|
|
2197
2251
|
|
|
@@ -2201,11 +2255,11 @@ export const textBackgroundSchema = textpropertiesTextBackgroundSchema;
|
|
|
2201
2255
|
export const textpropertiesTextFontSchema = z.object({
|
|
2202
2256
|
family: z.optional(z.string()),
|
|
2203
2257
|
color: z.optional(z.string()),
|
|
2204
|
-
opacity: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2205
|
-
size: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2206
|
-
weight: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2207
|
-
lineHeight: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2208
|
-
})
|
|
2258
|
+
opacity: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2259
|
+
size: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2260
|
+
weight: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2261
|
+
lineHeight: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2262
|
+
});
|
|
2209
2263
|
|
|
2210
2264
|
export const textFontSchema = textpropertiesTextFontSchema;
|
|
2211
2265
|
|
|
@@ -2213,9 +2267,9 @@ export const textFontSchema = textpropertiesTextFontSchema;
|
|
|
2213
2267
|
* Text stroke (outline) properties.
|
|
2214
2268
|
*/
|
|
2215
2269
|
export const textpropertiesTextStrokeSchema = z.object({
|
|
2216
|
-
width: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2217
|
-
color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)),
|
|
2218
|
-
})
|
|
2270
|
+
width: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2271
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2272
|
+
});
|
|
2219
2273
|
|
|
2220
2274
|
/**
|
|
2221
2275
|
* The TextAsset is used to add text and titles to a video. The text can be styled with built in and custom
|
|
@@ -2225,15 +2279,15 @@ export const textpropertiesTextStrokeSchema = z.object({
|
|
|
2225
2279
|
export const textassetTextAssetSchema = z.object({
|
|
2226
2280
|
type: z.enum(["text"]),
|
|
2227
2281
|
text: z.string(),
|
|
2228
|
-
width: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2229
|
-
height: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2282
|
+
width: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2283
|
+
height: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2230
2284
|
font: z.optional(textpropertiesTextFontSchema),
|
|
2231
2285
|
background: z.optional(textpropertiesTextBackgroundSchema),
|
|
2232
2286
|
alignment: z.optional(textpropertiesTextAlignmentSchema),
|
|
2233
2287
|
stroke: z.optional(textpropertiesTextStrokeSchema),
|
|
2234
2288
|
animation: z.optional(textpropertiesTextAnimationSchema),
|
|
2235
2289
|
ellipsis: z.optional(z.string()),
|
|
2236
|
-
})
|
|
2290
|
+
});
|
|
2237
2291
|
|
|
2238
2292
|
export const textAssetSchema = textassetTextAssetSchema;
|
|
2239
2293
|
|
|
@@ -2243,10 +2297,10 @@ export const textAssetSchema = textassetTextAssetSchema;
|
|
|
2243
2297
|
export const texttoimageassetTextToImageAssetSchema = z.object({
|
|
2244
2298
|
type: z.enum(["text-to-image"]),
|
|
2245
2299
|
prompt: z.string(),
|
|
2246
|
-
width: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2247
|
-
height: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2300
|
+
width: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2301
|
+
height: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2248
2302
|
crop: z.optional(cropCropSchema),
|
|
2249
|
-
})
|
|
2303
|
+
});
|
|
2250
2304
|
|
|
2251
2305
|
export const textToImageAssetSchema = texttoimageassetTextToImageAssetSchema;
|
|
2252
2306
|
|
|
@@ -2254,9 +2308,9 @@ export const textToImageAssetSchema = texttoimageassetTextToImageAssetSchema;
|
|
|
2254
2308
|
* Generate a thumbnail image for the video or image at a specific point from the timeline.
|
|
2255
2309
|
*/
|
|
2256
2310
|
export const thumbnailThumbnailSchema = z.object({
|
|
2257
|
-
capture: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2258
|
-
scale: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2259
|
-
})
|
|
2311
|
+
capture: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2312
|
+
scale: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2313
|
+
});
|
|
2260
2314
|
|
|
2261
2315
|
export const thumbnailSchema = thumbnailThumbnailSchema;
|
|
2262
2316
|
|
|
@@ -2293,7 +2347,7 @@ export const outputOutputSchema = z.object({
|
|
|
2293
2347
|
poster: z.optional(posterPosterSchema),
|
|
2294
2348
|
thumbnail: z.optional(thumbnailThumbnailSchema),
|
|
2295
2349
|
destinations: z.optional(z.array(destinationsDestinationsSchema)),
|
|
2296
|
-
})
|
|
2350
|
+
});
|
|
2297
2351
|
|
|
2298
2352
|
export const outputSchema = outputOutputSchema;
|
|
2299
2353
|
|
|
@@ -2433,7 +2487,7 @@ export const transitionTransitionSchema = z.object({
|
|
|
2433
2487
|
"zoom",
|
|
2434
2488
|
]),
|
|
2435
2489
|
),
|
|
2436
|
-
})
|
|
2490
|
+
});
|
|
2437
2491
|
|
|
2438
2492
|
export const transitionSchema = transitionTransitionSchema;
|
|
2439
2493
|
|
|
@@ -2448,10 +2502,10 @@ export const transitionSchema = transitionTransitionSchema;
|
|
|
2448
2502
|
* </ul>
|
|
2449
2503
|
*/
|
|
2450
2504
|
export const tweenTweenSchema = z.object({
|
|
2451
|
-
from: z.
|
|
2452
|
-
to: z.
|
|
2453
|
-
start: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2454
|
-
length: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2505
|
+
from: z.optional(z.unknown()),
|
|
2506
|
+
to: z.optional(z.unknown()),
|
|
2507
|
+
start: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2508
|
+
length: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2455
2509
|
interpolation: z.optional(z.enum(["linear", "bezier", "constant"])),
|
|
2456
2510
|
easing: z.optional(
|
|
2457
2511
|
z.enum([
|
|
@@ -2485,7 +2539,7 @@ export const tweenTweenSchema = z.object({
|
|
|
2485
2539
|
"easeInOutBack",
|
|
2486
2540
|
]),
|
|
2487
2541
|
),
|
|
2488
|
-
})
|
|
2542
|
+
});
|
|
2489
2543
|
|
|
2490
2544
|
export const tweenSchema = tweenTweenSchema;
|
|
2491
2545
|
|
|
@@ -2494,14 +2548,14 @@ export const tweenSchema = tweenTweenSchema;
|
|
|
2494
2548
|
*/
|
|
2495
2549
|
export const audioassetAudioAssetSchema = z.object({
|
|
2496
2550
|
type: z.enum(["audio"]),
|
|
2497
|
-
src: z.string().
|
|
2498
|
-
trim: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2551
|
+
src: z.string().min(1).regex(/\S/),
|
|
2552
|
+
trim: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2499
2553
|
volume: z.optional(
|
|
2500
|
-
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2554
|
+
z.union([z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)]),
|
|
2501
2555
|
),
|
|
2502
|
-
speed: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2556
|
+
speed: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2503
2557
|
effect: z.optional(z.enum(["none", "fadeIn", "fadeOut", "fadeInFadeOut"])),
|
|
2504
|
-
})
|
|
2558
|
+
});
|
|
2505
2559
|
|
|
2506
2560
|
export const audioAssetSchema = audioassetAudioAssetSchema;
|
|
2507
2561
|
|
|
@@ -2510,12 +2564,12 @@ export const audioAssetSchema = audioassetAudioAssetSchema;
|
|
|
2510
2564
|
*/
|
|
2511
2565
|
export const offsetOffsetSchema = z.object({
|
|
2512
2566
|
x: z.optional(
|
|
2513
|
-
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2567
|
+
z.union([z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(-10).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)]),
|
|
2514
2568
|
),
|
|
2515
2569
|
y: z.optional(
|
|
2516
|
-
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2570
|
+
z.union([z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(-10).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)]),
|
|
2517
2571
|
),
|
|
2518
|
-
})
|
|
2572
|
+
});
|
|
2519
2573
|
|
|
2520
2574
|
export const offsetSchema = offsetOffsetSchema;
|
|
2521
2575
|
|
|
@@ -2524,9 +2578,9 @@ export const offsetSchema = offsetOffsetSchema;
|
|
|
2524
2578
|
*/
|
|
2525
2579
|
export const rotatetransformationRotateTransformationSchema = z.object({
|
|
2526
2580
|
angle: z.optional(
|
|
2527
|
-
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2581
|
+
z.union([z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(-360).lte(360)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)]),
|
|
2528
2582
|
),
|
|
2529
|
-
})
|
|
2583
|
+
});
|
|
2530
2584
|
|
|
2531
2585
|
export const rotateTransformationSchema =
|
|
2532
2586
|
rotatetransformationRotateTransformationSchema;
|
|
@@ -2536,16 +2590,35 @@ export const rotateTransformationSchema =
|
|
|
2536
2590
|
*/
|
|
2537
2591
|
export const skewtransformationSkewTransformationSchema = z.object({
|
|
2538
2592
|
x: z.optional(
|
|
2539
|
-
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2593
|
+
z.union([z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(-100).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)]),
|
|
2540
2594
|
),
|
|
2541
2595
|
y: z.optional(
|
|
2542
|
-
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2596
|
+
z.union([z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(-100).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)]),
|
|
2543
2597
|
),
|
|
2544
|
-
})
|
|
2598
|
+
});
|
|
2545
2599
|
|
|
2546
2600
|
export const skewTransformationSchema =
|
|
2547
2601
|
skewtransformationSkewTransformationSchema;
|
|
2548
2602
|
|
|
2603
|
+
/**
|
|
2604
|
+
* The TextToSpeechAsset lets you generate a voice over from text using a text-to-speech service. The generated audio can be trimmed, faded and have its volume and speed adjusted using the same properties available on the AudioAsset.
|
|
2605
|
+
*/
|
|
2606
|
+
export const texttospeechassetTextToSpeechAssetSchema = z.object({
|
|
2607
|
+
type: z.enum(["text-to-speech"]),
|
|
2608
|
+
text: z.string(),
|
|
2609
|
+
voice: z.string(),
|
|
2610
|
+
language: z.optional(z.string()),
|
|
2611
|
+
newscaster: z.optional(z.boolean()).default(false),
|
|
2612
|
+
trim: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2613
|
+
volume: z.optional(
|
|
2614
|
+
z.union([z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)]),
|
|
2615
|
+
),
|
|
2616
|
+
speed: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2617
|
+
effect: z.optional(z.enum(["none", "fadeIn", "fadeOut", "fadeInFadeOut"])),
|
|
2618
|
+
});
|
|
2619
|
+
|
|
2620
|
+
export const textToSpeechAssetSchema = texttospeechassetTextToSpeechAssetSchema;
|
|
2621
|
+
|
|
2549
2622
|
/**
|
|
2550
2623
|
* **Notice: The TitleAsset is deprecated, use the [TextAsset](#tocs_textasset) instead.**
|
|
2551
2624
|
*
|
|
@@ -2598,7 +2671,7 @@ export const titleassetTitleAssetSchema = z.object({
|
|
|
2598
2671
|
]),
|
|
2599
2672
|
),
|
|
2600
2673
|
offset: z.optional(offsetOffsetSchema),
|
|
2601
|
-
})
|
|
2674
|
+
});
|
|
2602
2675
|
|
|
2603
2676
|
export const titleAssetSchema = titleassetTitleAssetSchema;
|
|
2604
2677
|
|
|
@@ -2609,7 +2682,7 @@ export const transformationTransformationSchema = z.object({
|
|
|
2609
2682
|
rotate: z.optional(rotatetransformationRotateTransformationSchema),
|
|
2610
2683
|
skew: z.optional(skewtransformationSkewTransformationSchema),
|
|
2611
2684
|
flip: z.optional(fliptransformationFlipTransformationSchema),
|
|
2612
|
-
})
|
|
2685
|
+
});
|
|
2613
2686
|
|
|
2614
2687
|
export const transformationSchema = transformationTransformationSchema;
|
|
2615
2688
|
|
|
@@ -2618,19 +2691,19 @@ export const transformationSchema = transformationTransformationSchema;
|
|
|
2618
2691
|
*/
|
|
2619
2692
|
export const videoassetVideoAssetSchema = z.object({
|
|
2620
2693
|
type: z.enum(["video"]),
|
|
2621
|
-
src: z.string().
|
|
2694
|
+
src: z.string().min(1).regex(/\S/),
|
|
2622
2695
|
transcode: z.optional(z.boolean()),
|
|
2623
|
-
trim: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2696
|
+
trim: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2624
2697
|
volume: z.optional(
|
|
2625
|
-
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2698
|
+
z.union([z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)]),
|
|
2626
2699
|
),
|
|
2627
2700
|
volumeEffect: z.optional(
|
|
2628
2701
|
z.enum(["none", "fadeIn", "fadeOut", "fadeInFadeOut"]),
|
|
2629
2702
|
),
|
|
2630
|
-
speed: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2703
|
+
speed: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2631
2704
|
crop: z.optional(cropCropSchema),
|
|
2632
2705
|
chromaKey: z.optional(chromakeyChromaKeySchema),
|
|
2633
|
-
})
|
|
2706
|
+
});
|
|
2634
2707
|
|
|
2635
2708
|
export const videoAssetSchema = videoassetVideoAssetSchema;
|
|
2636
2709
|
|
|
@@ -2651,6 +2724,7 @@ export const assetAssetSchema = z.discriminatedUnion("type", [
|
|
|
2651
2724
|
svgassetSvgAssetSchema,
|
|
2652
2725
|
texttoimageassetTextToImageAssetSchema,
|
|
2653
2726
|
imagetovideoassetImageToVideoAssetSchema,
|
|
2727
|
+
texttospeechassetTextToSpeechAssetSchema,
|
|
2654
2728
|
]);
|
|
2655
2729
|
|
|
2656
2730
|
export const assetSchema = assetAssetSchema;
|
|
@@ -2661,17 +2735,17 @@ export const assetSchema = assetAssetSchema;
|
|
|
2661
2735
|
export const clipClipSchema = z.object({
|
|
2662
2736
|
asset: assetAssetSchema,
|
|
2663
2737
|
start: z.union([
|
|
2664
|
-
z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (
|
|
2665
|
-
z.string().regex(/^(auto|alias:\/\/[A-Za-z0-9_-]+)$/),
|
|
2738
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2739
|
+
z.union([z.string().regex(/^(auto|alias:\/\/[A-Za-z0-9_-]+)$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2666
2740
|
]),
|
|
2667
2741
|
length: z.union([
|
|
2668
|
-
z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (
|
|
2669
|
-
z.string().regex(/^(auto|end|alias:\/\/[A-Za-z0-9_-]+)$/),
|
|
2742
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2743
|
+
z.union([z.string().regex(/^(auto|end|alias:\/\/[A-Za-z0-9_-]+)$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2670
2744
|
]),
|
|
2671
2745
|
fit: z.optional(z.enum(["cover", "contain", "crop", "none"])),
|
|
2672
|
-
scale: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2673
|
-
width: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2674
|
-
height: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2746
|
+
scale: z.optional(z.union([z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)])),
|
|
2747
|
+
width: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(3840)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2748
|
+
height: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(1).lte(2160)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2675
2749
|
position: z.optional(
|
|
2676
2750
|
z.enum([
|
|
2677
2751
|
"top",
|
|
@@ -2722,10 +2796,10 @@ export const clipClipSchema = z.object({
|
|
|
2722
2796
|
"negative",
|
|
2723
2797
|
]),
|
|
2724
2798
|
),
|
|
2725
|
-
opacity: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2799
|
+
opacity: z.optional(z.union([z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)])),
|
|
2726
2800
|
transform: z.optional(transformationTransformationSchema),
|
|
2727
|
-
alias: z.optional(z.string().regex(/^[A-Za-z0-9_-]+$/)),
|
|
2728
|
-
})
|
|
2801
|
+
alias: z.optional(z.union([z.string().regex(/^[A-Za-z0-9_-]+$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2802
|
+
});
|
|
2729
2803
|
|
|
2730
2804
|
export const clipSchema = clipClipSchema;
|
|
2731
2805
|
|
|
@@ -2734,7 +2808,7 @@ export const clipSchema = clipClipSchema;
|
|
|
2734
2808
|
*/
|
|
2735
2809
|
export const trackTrackSchema = z.object({
|
|
2736
2810
|
clips: z.array(clipClipSchema).min(1),
|
|
2737
|
-
})
|
|
2811
|
+
});
|
|
2738
2812
|
|
|
2739
2813
|
export const trackSchema = trackTrackSchema;
|
|
2740
2814
|
|
|
@@ -2747,7 +2821,7 @@ export const timelineTimelineSchema = z.object({
|
|
|
2747
2821
|
fonts: z.optional(z.array(fontFontSchema)),
|
|
2748
2822
|
tracks: z.array(trackTrackSchema).min(1),
|
|
2749
2823
|
cache: z.optional(z.boolean()),
|
|
2750
|
-
})
|
|
2824
|
+
});
|
|
2751
2825
|
|
|
2752
2826
|
export const timelineSchema = timelineTimelineSchema;
|
|
2753
2827
|
|
|
@@ -2760,10 +2834,7 @@ export const editEditSchema = z.object({
|
|
|
2760
2834
|
merge: z.optional(z.array(mergefieldMergeFieldSchema)),
|
|
2761
2835
|
callback: z.optional(z.string()),
|
|
2762
2836
|
disk: z.optional(z.enum(["local", "mount"])),
|
|
2763
|
-
|
|
2764
|
-
poster: z.optional(posterPosterSchema),
|
|
2765
|
-
thumbnail: z.optional(thumbnailThumbnailSchema),
|
|
2766
|
-
}).strict();
|
|
2837
|
+
});
|
|
2767
2838
|
|
|
2768
2839
|
export const editSchema = editEditSchema;
|
|
2769
2840
|
|
|
@@ -2784,15 +2855,15 @@ export const renderresponsedataRenderResponseDataSchema = z.object({
|
|
|
2784
2855
|
"failed",
|
|
2785
2856
|
]),
|
|
2786
2857
|
error: z.optional(z.string()),
|
|
2787
|
-
duration: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2788
|
-
renderTime: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2858
|
+
duration: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2859
|
+
renderTime: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2789
2860
|
url: z.optional(z.string()),
|
|
2790
2861
|
poster: z.optional(z.union([z.string(), z.null()])),
|
|
2791
2862
|
thumbnail: z.optional(z.union([z.string(), z.null()])),
|
|
2792
2863
|
data: z.optional(editEditSchema),
|
|
2793
2864
|
created: z.optional(z.string()),
|
|
2794
2865
|
updated: z.optional(z.string()),
|
|
2795
|
-
})
|
|
2866
|
+
});
|
|
2796
2867
|
|
|
2797
2868
|
export const renderResponseDataSchema =
|
|
2798
2869
|
renderresponsedataRenderResponseDataSchema;
|
|
@@ -2804,7 +2875,7 @@ export const renderresponseRenderResponseSchema = z.object({
|
|
|
2804
2875
|
success: z.boolean(),
|
|
2805
2876
|
message: z.string(),
|
|
2806
2877
|
response: renderresponsedataRenderResponseDataSchema,
|
|
2807
|
-
})
|
|
2878
|
+
});
|
|
2808
2879
|
|
|
2809
2880
|
export const renderResponseSchema = renderresponseRenderResponseSchema;
|
|
2810
2881
|
|
|
@@ -2816,7 +2887,7 @@ export const templatedataresponsedataTemplateDataResponseDataSchema = z.object({
|
|
|
2816
2887
|
name: z.string(),
|
|
2817
2888
|
owner: z.string(),
|
|
2818
2889
|
template: editEditSchema,
|
|
2819
|
-
})
|
|
2890
|
+
});
|
|
2820
2891
|
|
|
2821
2892
|
export const templateDataResponseDataSchema =
|
|
2822
2893
|
templatedataresponsedataTemplateDataResponseDataSchema;
|
|
@@ -2828,7 +2899,7 @@ export const templatedataresponseTemplateDataResponseSchema = z.object({
|
|
|
2828
2899
|
success: z.boolean(),
|
|
2829
2900
|
message: z.string(),
|
|
2830
2901
|
response: templatedataresponsedataTemplateDataResponseDataSchema,
|
|
2831
|
-
})
|
|
2902
|
+
});
|
|
2832
2903
|
|
|
2833
2904
|
export const templateDataResponseSchema =
|
|
2834
2905
|
templatedataresponseTemplateDataResponseSchema;
|
|
@@ -2839,7 +2910,7 @@ export const templateDataResponseSchema =
|
|
|
2839
2910
|
export const templateTemplateSchema = z.object({
|
|
2840
2911
|
name: z.string(),
|
|
2841
2912
|
template: z.optional(editEditSchema),
|
|
2842
|
-
})
|
|
2913
|
+
});
|
|
2843
2914
|
|
|
2844
2915
|
export const templateSchema = templateTemplateSchema;
|
|
2845
2916
|
|