@shotstack/schemas 1.5.2 → 1.5.4
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 +87 -20
- package/dist/schema.d.ts +49 -16
- package/dist/zod/zod.gen.cjs +1425 -858
- package/dist/zod/zod.gen.d.ts +11789 -10061
- 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
|
|
|
@@ -1453,11 +1530,11 @@ export const richtextassetRichTextAssetSchema = z.object({
|
|
|
1453
1530
|
background: z.optional(richtextpropertiesRichTextBackgroundSchema),
|
|
1454
1531
|
border: z.optional(richtextpropertiesRichTextBorderSchema),
|
|
1455
1532
|
padding: z.optional(
|
|
1456
|
-
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1533
|
+
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]),
|
|
1457
1534
|
),
|
|
1458
1535
|
align: z.optional(richtextpropertiesRichTextAlignmentSchema),
|
|
1459
1536
|
animation: z.optional(richtextpropertiesRichTextAnimationSchema),
|
|
1460
|
-
})
|
|
1537
|
+
});
|
|
1461
1538
|
|
|
1462
1539
|
export const richTextAssetSchema = richtextassetRichTextAssetSchema;
|
|
1463
1540
|
|
|
@@ -1470,7 +1547,7 @@ export const transferresponseattributesTransferResponseAttributesSchema =
|
|
|
1470
1547
|
owner: z.optional(z.string()),
|
|
1471
1548
|
status: z.optional(z.enum(["queued", "failed"])),
|
|
1472
1549
|
created: z.optional(z.string()),
|
|
1473
|
-
})
|
|
1550
|
+
});
|
|
1474
1551
|
|
|
1475
1552
|
export const transferResponseAttributesSchema =
|
|
1476
1553
|
transferresponseattributesTransferResponseAttributesSchema;
|
|
@@ -1483,7 +1560,7 @@ export const transferresponsedataTransferResponseDataSchema = z.object({
|
|
|
1483
1560
|
attributes: z.optional(
|
|
1484
1561
|
transferresponseattributesTransferResponseAttributesSchema,
|
|
1485
1562
|
),
|
|
1486
|
-
})
|
|
1563
|
+
});
|
|
1487
1564
|
|
|
1488
1565
|
export const transferResponseDataSchema =
|
|
1489
1566
|
transferresponsedataTransferResponseDataSchema;
|
|
@@ -1493,7 +1570,7 @@ export const transferResponseDataSchema =
|
|
|
1493
1570
|
*/
|
|
1494
1571
|
export const transferresponseTransferResponseSchema = z.object({
|
|
1495
1572
|
data: transferresponsedataTransferResponseDataSchema,
|
|
1496
|
-
})
|
|
1573
|
+
});
|
|
1497
1574
|
|
|
1498
1575
|
export const transferResponseSchema = transferresponseTransferResponseSchema;
|
|
1499
1576
|
|
|
@@ -1504,7 +1581,7 @@ export const transferTransferSchema = z.object({
|
|
|
1504
1581
|
url: z.string(),
|
|
1505
1582
|
id: z.string(),
|
|
1506
1583
|
destinations: z.array(destinationsDestinationsSchema),
|
|
1507
|
-
})
|
|
1584
|
+
});
|
|
1508
1585
|
|
|
1509
1586
|
export const transferSchema = transferTransferSchema;
|
|
1510
1587
|
|
|
@@ -1516,39 +1593,39 @@ export const transferSchema = transferTransferSchema;
|
|
|
1516
1593
|
export const shapeassetShapeAssetSchema = z.object({
|
|
1517
1594
|
type: z.enum(["shape"]),
|
|
1518
1595
|
shape: z.enum(["rectangle", "circle", "line"]),
|
|
1519
|
-
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')
|
|
1520
|
-
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')
|
|
1596
|
+
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*\}\}$/)])),
|
|
1597
|
+
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*\}\}$/)])),
|
|
1521
1598
|
fill: z.optional(
|
|
1522
1599
|
z.object({
|
|
1523
1600
|
color: z.optional(z.string()),
|
|
1524
|
-
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')
|
|
1601
|
+
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*\}\}$/)])),
|
|
1525
1602
|
}),
|
|
1526
1603
|
),
|
|
1527
1604
|
stroke: z.optional(
|
|
1528
1605
|
z.object({
|
|
1529
1606
|
color: z.optional(z.string()),
|
|
1530
|
-
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')
|
|
1607
|
+
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*\}\}$/)])),
|
|
1531
1608
|
}),
|
|
1532
1609
|
),
|
|
1533
1610
|
rectangle: z.optional(
|
|
1534
1611
|
z.object({
|
|
1535
|
-
width: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1536
|
-
height: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1537
|
-
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')
|
|
1612
|
+
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*\}\}$/)]),
|
|
1613
|
+
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*\}\}$/)]),
|
|
1614
|
+
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*\}\}$/)])),
|
|
1538
1615
|
}),
|
|
1539
1616
|
),
|
|
1540
1617
|
circle: z.optional(
|
|
1541
1618
|
z.object({
|
|
1542
|
-
radius: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1619
|
+
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*\}\}$/)]),
|
|
1543
1620
|
}),
|
|
1544
1621
|
),
|
|
1545
1622
|
line: z.optional(
|
|
1546
1623
|
z.object({
|
|
1547
|
-
length: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1548
|
-
thickness: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1624
|
+
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*\}\}$/)]),
|
|
1625
|
+
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*\}\}$/)]),
|
|
1549
1626
|
}),
|
|
1550
1627
|
),
|
|
1551
|
-
})
|
|
1628
|
+
});
|
|
1552
1629
|
|
|
1553
1630
|
export const shapeAssetSchema = shapeassetShapeAssetSchema;
|
|
1554
1631
|
|
|
@@ -1556,9 +1633,9 @@ export const shapeAssetSchema = shapeassetShapeAssetSchema;
|
|
|
1556
1633
|
* 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.
|
|
1557
1634
|
*/
|
|
1558
1635
|
export const sizeSizeSchema = z.object({
|
|
1559
|
-
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')
|
|
1560
|
-
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')
|
|
1561
|
-
})
|
|
1636
|
+
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*\}\}$/)])),
|
|
1637
|
+
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*\}\}$/)])),
|
|
1638
|
+
});
|
|
1562
1639
|
|
|
1563
1640
|
export const sizeSchema = sizeSizeSchema;
|
|
1564
1641
|
|
|
@@ -1588,7 +1665,7 @@ export const renditionRenditionSchema = z.object({
|
|
|
1588
1665
|
size: z.optional(sizeSizeSchema),
|
|
1589
1666
|
fit: z.optional(z.enum(["cover", "contain", "crop"])),
|
|
1590
1667
|
resolution: z.optional(z.enum(["preview", "mobile", "sd", "hd", "fhd"])),
|
|
1591
|
-
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')
|
|
1668
|
+
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*\}\}$/)])),
|
|
1592
1669
|
fps: z.optional(
|
|
1593
1670
|
z.union([
|
|
1594
1671
|
z.literal(12),
|
|
@@ -1605,12 +1682,12 @@ export const renditionRenditionSchema = z.object({
|
|
|
1605
1682
|
]),
|
|
1606
1683
|
),
|
|
1607
1684
|
speed: z.optional(speedSpeedSchema),
|
|
1608
|
-
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')
|
|
1685
|
+
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*\}\}$/)])),
|
|
1609
1686
|
fixOffset: z.optional(z.boolean()),
|
|
1610
1687
|
fixRotation: z.optional(z.boolean()),
|
|
1611
1688
|
enhance: z.optional(enhancementsEnhancementsSchema),
|
|
1612
1689
|
filename: z.optional(z.string()),
|
|
1613
|
-
})
|
|
1690
|
+
});
|
|
1614
1691
|
|
|
1615
1692
|
export const renditionSchema = renditionRenditionSchema;
|
|
1616
1693
|
|
|
@@ -1620,7 +1697,7 @@ export const renditionSchema = renditionRenditionSchema;
|
|
|
1620
1697
|
export const outputsOutputsSchema = z.object({
|
|
1621
1698
|
renditions: z.optional(z.array(renditionRenditionSchema)),
|
|
1622
1699
|
transcription: z.optional(transcriptionTranscriptionSchema),
|
|
1623
|
-
})
|
|
1700
|
+
});
|
|
1624
1701
|
|
|
1625
1702
|
export const outputsSchema = outputsOutputsSchema;
|
|
1626
1703
|
|
|
@@ -1641,13 +1718,13 @@ export const renditionresponseattributesRenditionResponseAttributesSchema =
|
|
|
1641
1718
|
]),
|
|
1642
1719
|
),
|
|
1643
1720
|
url: z.optional(z.string()),
|
|
1644
|
-
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')
|
|
1721
|
+
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*\}\}$/)])),
|
|
1645
1722
|
transformation: z.optional(renditionRenditionSchema),
|
|
1646
|
-
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')
|
|
1647
|
-
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')
|
|
1648
|
-
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')
|
|
1649
|
-
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')
|
|
1650
|
-
})
|
|
1723
|
+
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*\}\}$/)])),
|
|
1724
|
+
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*\}\}$/)])),
|
|
1725
|
+
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*\}\}$/)])),
|
|
1726
|
+
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*\}\}$/)])),
|
|
1727
|
+
});
|
|
1651
1728
|
|
|
1652
1729
|
export const renditionResponseAttributesSchema =
|
|
1653
1730
|
renditionresponseattributesRenditionResponseAttributesSchema;
|
|
@@ -1659,7 +1736,7 @@ export const outputsresponseOutputsResponseSchema = z.object({
|
|
|
1659
1736
|
renditions: z.optional(
|
|
1660
1737
|
z.array(renditionresponseattributesRenditionResponseAttributesSchema),
|
|
1661
1738
|
),
|
|
1662
|
-
})
|
|
1739
|
+
});
|
|
1663
1740
|
|
|
1664
1741
|
export const outputsResponseSchema = outputsresponseOutputsResponseSchema;
|
|
1665
1742
|
|
|
@@ -1682,13 +1759,13 @@ export const sourceresponseattributesSourceResponseAttributesSchema = z.object({
|
|
|
1682
1759
|
]),
|
|
1683
1760
|
),
|
|
1684
1761
|
outputs: z.optional(outputsresponseOutputsResponseSchema),
|
|
1685
|
-
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')
|
|
1686
|
-
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')
|
|
1687
|
-
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')
|
|
1688
|
-
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')
|
|
1762
|
+
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*\}\}$/)])),
|
|
1763
|
+
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*\}\}$/)])),
|
|
1764
|
+
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*\}\}$/)])),
|
|
1765
|
+
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*\}\}$/)])),
|
|
1689
1766
|
created: z.optional(z.string()),
|
|
1690
1767
|
updated: z.optional(z.string()),
|
|
1691
|
-
})
|
|
1768
|
+
});
|
|
1692
1769
|
|
|
1693
1770
|
export const sourceResponseAttributesSchema =
|
|
1694
1771
|
sourceresponseattributesSourceResponseAttributesSchema;
|
|
@@ -1700,7 +1777,7 @@ export const sourceresponsedataSourceResponseDataSchema = z.object({
|
|
|
1700
1777
|
type: z.string(),
|
|
1701
1778
|
id: z.string(),
|
|
1702
1779
|
attributes: sourceresponseattributesSourceResponseAttributesSchema,
|
|
1703
|
-
})
|
|
1780
|
+
});
|
|
1704
1781
|
|
|
1705
1782
|
export const sourceResponseDataSchema =
|
|
1706
1783
|
sourceresponsedataSourceResponseDataSchema;
|
|
@@ -1710,7 +1787,7 @@ export const sourceResponseDataSchema =
|
|
|
1710
1787
|
*/
|
|
1711
1788
|
export const sourcelistresponseSourceListResponseSchema = z.object({
|
|
1712
1789
|
data: z.array(sourceresponsedataSourceResponseDataSchema),
|
|
1713
|
-
})
|
|
1790
|
+
});
|
|
1714
1791
|
|
|
1715
1792
|
export const sourceListResponseSchema =
|
|
1716
1793
|
sourcelistresponseSourceListResponseSchema;
|
|
@@ -1720,7 +1797,7 @@ export const sourceListResponseSchema =
|
|
|
1720
1797
|
*/
|
|
1721
1798
|
export const sourceresponseSourceResponseSchema = z.object({
|
|
1722
1799
|
data: sourceresponsedataSourceResponseDataSchema,
|
|
1723
|
-
})
|
|
1800
|
+
});
|
|
1724
1801
|
|
|
1725
1802
|
export const sourceResponseSchema = sourceresponseSourceResponseSchema;
|
|
1726
1803
|
|
|
@@ -1733,7 +1810,7 @@ export const sourceSourceSchema = z.object({
|
|
|
1733
1810
|
outputs: z.optional(outputsOutputsSchema),
|
|
1734
1811
|
destinations: z.optional(destinationsDestinationsSchema),
|
|
1735
1812
|
callback: z.optional(z.string()),
|
|
1736
|
-
})
|
|
1813
|
+
});
|
|
1737
1814
|
|
|
1738
1815
|
export const sourceSchema = sourceSourceSchema;
|
|
1739
1816
|
|
|
@@ -1743,8 +1820,8 @@ export const sourceSchema = sourceSourceSchema;
|
|
|
1743
1820
|
export const soundtrackSoundtrackSchema = z.object({
|
|
1744
1821
|
src: z.string().min(1).regex(/\S/),
|
|
1745
1822
|
effect: z.optional(z.enum(["fadeIn", "fadeOut", "fadeInFadeOut"])),
|
|
1746
|
-
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')
|
|
1747
|
-
})
|
|
1823
|
+
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*\}\}$/)])),
|
|
1824
|
+
});
|
|
1748
1825
|
|
|
1749
1826
|
export const soundtrackSchema = soundtrackSoundtrackSchema;
|
|
1750
1827
|
|
|
@@ -1754,9 +1831,9 @@ export const soundtrackSchema = soundtrackSoundtrackSchema;
|
|
|
1754
1831
|
*
|
|
1755
1832
|
*/
|
|
1756
1833
|
export const svgpropertiesSvgGradientStopSchema = z.object({
|
|
1757
|
-
offset: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1758
|
-
color: z.string().regex(/^#[A-Fa-f0-9]{6}$/),
|
|
1759
|
-
})
|
|
1834
|
+
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*\}\}$/)]),
|
|
1835
|
+
color: z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1836
|
+
});
|
|
1760
1837
|
|
|
1761
1838
|
export const svgGradientStopSchema = svgpropertiesSvgGradientStopSchema;
|
|
1762
1839
|
|
|
@@ -1767,10 +1844,10 @@ export const svgGradientStopSchema = svgpropertiesSvgGradientStopSchema;
|
|
|
1767
1844
|
*/
|
|
1768
1845
|
export const svgpropertiesSvgLinearGradientFillSchema = z.object({
|
|
1769
1846
|
type: z.enum(["linear"]),
|
|
1770
|
-
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')
|
|
1847
|
+
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),
|
|
1771
1848
|
stops: z.array(svgpropertiesSvgGradientStopSchema).min(2),
|
|
1772
|
-
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')
|
|
1773
|
-
})
|
|
1849
|
+
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),
|
|
1850
|
+
});
|
|
1774
1851
|
|
|
1775
1852
|
export const svgLinearGradientFillSchema =
|
|
1776
1853
|
svgpropertiesSvgLinearGradientFillSchema;
|
|
@@ -1783,8 +1860,8 @@ export const svgLinearGradientFillSchema =
|
|
|
1783
1860
|
export const svgpropertiesSvgRadialGradientFillSchema = z.object({
|
|
1784
1861
|
type: z.enum(["radial"]),
|
|
1785
1862
|
stops: z.array(svgpropertiesSvgGradientStopSchema).min(2),
|
|
1786
|
-
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')
|
|
1787
|
-
})
|
|
1863
|
+
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),
|
|
1864
|
+
});
|
|
1788
1865
|
|
|
1789
1866
|
export const svgRadialGradientFillSchema =
|
|
1790
1867
|
svgpropertiesSvgRadialGradientFillSchema;
|
|
@@ -1794,12 +1871,12 @@ export const svgRadialGradientFillSchema =
|
|
|
1794
1871
|
*
|
|
1795
1872
|
*/
|
|
1796
1873
|
export const svgpropertiesSvgShadowSchema = z.object({
|
|
1797
|
-
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')
|
|
1798
|
-
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')
|
|
1799
|
-
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')
|
|
1800
|
-
color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#000000"),
|
|
1801
|
-
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')
|
|
1802
|
-
})
|
|
1874
|
+
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),
|
|
1875
|
+
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),
|
|
1876
|
+
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),
|
|
1877
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#000000"),
|
|
1878
|
+
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),
|
|
1879
|
+
});
|
|
1803
1880
|
|
|
1804
1881
|
export const svgShadowSchema = svgpropertiesSvgShadowSchema;
|
|
1805
1882
|
|
|
@@ -1812,8 +1889,8 @@ export const svgpropertiesSvgSolidFillSchema = z.object({
|
|
|
1812
1889
|
.string()
|
|
1813
1890
|
.regex(/^#[A-Fa-f0-9]{6}$/)
|
|
1814
1891
|
.default("#000000"),
|
|
1815
|
-
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')
|
|
1816
|
-
})
|
|
1892
|
+
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),
|
|
1893
|
+
});
|
|
1817
1894
|
|
|
1818
1895
|
export const svgSolidFillSchema = svgpropertiesSvgSolidFillSchema;
|
|
1819
1896
|
|
|
@@ -1836,14 +1913,14 @@ export const svgFillSchema = svgpropertiesSvgFillSchema;
|
|
|
1836
1913
|
*
|
|
1837
1914
|
*/
|
|
1838
1915
|
export const svgpropertiesSvgStrokeSchema = z.object({
|
|
1839
|
-
color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#000000"),
|
|
1840
|
-
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')
|
|
1841
|
-
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')
|
|
1916
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#000000"),
|
|
1917
|
+
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),
|
|
1918
|
+
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),
|
|
1842
1919
|
lineCap: z.optional(z.enum(["butt", "round", "square"])),
|
|
1843
1920
|
lineJoin: z.optional(z.enum(["miter", "round", "bevel"])),
|
|
1844
|
-
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')
|
|
1845
|
-
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')
|
|
1846
|
-
})
|
|
1921
|
+
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*\}\}$/)]))),
|
|
1922
|
+
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),
|
|
1923
|
+
});
|
|
1847
1924
|
|
|
1848
1925
|
export const svgStrokeSchema = svgpropertiesSvgStrokeSchema;
|
|
1849
1926
|
|
|
@@ -1852,13 +1929,13 @@ export const svgStrokeSchema = svgpropertiesSvgStrokeSchema;
|
|
|
1852
1929
|
*
|
|
1853
1930
|
*/
|
|
1854
1931
|
export const svgpropertiesSvgTransformSchema = z.object({
|
|
1855
|
-
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')
|
|
1856
|
-
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')
|
|
1857
|
-
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')
|
|
1858
|
-
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')
|
|
1859
|
-
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')
|
|
1860
|
-
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')
|
|
1861
|
-
})
|
|
1932
|
+
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),
|
|
1933
|
+
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),
|
|
1934
|
+
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),
|
|
1935
|
+
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),
|
|
1936
|
+
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),
|
|
1937
|
+
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),
|
|
1938
|
+
});
|
|
1862
1939
|
|
|
1863
1940
|
export const svgTransformSchema = svgpropertiesSvgTransformSchema;
|
|
1864
1941
|
|
|
@@ -1869,11 +1946,11 @@ export const svgTransformSchema = svgpropertiesSvgTransformSchema;
|
|
|
1869
1946
|
*/
|
|
1870
1947
|
export const svgshapesSvgArrowShapeSchema = z.object({
|
|
1871
1948
|
type: z.enum(["arrow"]),
|
|
1872
|
-
length: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1873
|
-
headWidth: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1874
|
-
headLength: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1875
|
-
shaftWidth: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1876
|
-
})
|
|
1949
|
+
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*\}\}$/)]),
|
|
1950
|
+
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*\}\}$/)]),
|
|
1951
|
+
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*\}\}$/)]),
|
|
1952
|
+
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*\}\}$/)]),
|
|
1953
|
+
});
|
|
1877
1954
|
|
|
1878
1955
|
export const svgArrowShapeSchema = svgshapesSvgArrowShapeSchema;
|
|
1879
1956
|
|
|
@@ -1884,8 +1961,8 @@ export const svgArrowShapeSchema = svgshapesSvgArrowShapeSchema;
|
|
|
1884
1961
|
*/
|
|
1885
1962
|
export const svgshapesSvgCircleShapeSchema = z.object({
|
|
1886
1963
|
type: z.enum(["circle"]),
|
|
1887
|
-
radius: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1888
|
-
})
|
|
1964
|
+
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*\}\}$/)]),
|
|
1965
|
+
});
|
|
1889
1966
|
|
|
1890
1967
|
export const svgCircleShapeSchema = svgshapesSvgCircleShapeSchema;
|
|
1891
1968
|
|
|
@@ -1896,10 +1973,10 @@ export const svgCircleShapeSchema = svgshapesSvgCircleShapeSchema;
|
|
|
1896
1973
|
*/
|
|
1897
1974
|
export const svgshapesSvgCrossShapeSchema = z.object({
|
|
1898
1975
|
type: z.enum(["cross"]),
|
|
1899
|
-
width: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1900
|
-
height: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1901
|
-
thickness: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1902
|
-
})
|
|
1976
|
+
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*\}\}$/)]),
|
|
1977
|
+
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*\}\}$/)]),
|
|
1978
|
+
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*\}\}$/)]),
|
|
1979
|
+
});
|
|
1903
1980
|
|
|
1904
1981
|
export const svgCrossShapeSchema = svgshapesSvgCrossShapeSchema;
|
|
1905
1982
|
|
|
@@ -1910,9 +1987,9 @@ export const svgCrossShapeSchema = svgshapesSvgCrossShapeSchema;
|
|
|
1910
1987
|
*/
|
|
1911
1988
|
export const svgshapesSvgEllipseShapeSchema = z.object({
|
|
1912
1989
|
type: z.enum(["ellipse"]),
|
|
1913
|
-
radiusX: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1914
|
-
radiusY: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1915
|
-
})
|
|
1990
|
+
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*\}\}$/)]),
|
|
1991
|
+
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*\}\}$/)]),
|
|
1992
|
+
});
|
|
1916
1993
|
|
|
1917
1994
|
export const svgEllipseShapeSchema = svgshapesSvgEllipseShapeSchema;
|
|
1918
1995
|
|
|
@@ -1923,8 +2000,8 @@ export const svgEllipseShapeSchema = svgshapesSvgEllipseShapeSchema;
|
|
|
1923
2000
|
*/
|
|
1924
2001
|
export const svgshapesSvgHeartShapeSchema = z.object({
|
|
1925
2002
|
type: z.enum(["heart"]),
|
|
1926
|
-
size: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1927
|
-
})
|
|
2003
|
+
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*\}\}$/)]),
|
|
2004
|
+
});
|
|
1928
2005
|
|
|
1929
2006
|
export const svgHeartShapeSchema = svgshapesSvgHeartShapeSchema;
|
|
1930
2007
|
|
|
@@ -1935,9 +2012,9 @@ export const svgHeartShapeSchema = svgshapesSvgHeartShapeSchema;
|
|
|
1935
2012
|
*/
|
|
1936
2013
|
export const svgshapesSvgLineShapeSchema = z.object({
|
|
1937
2014
|
type: z.enum(["line"]),
|
|
1938
|
-
length: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1939
|
-
thickness: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1940
|
-
})
|
|
2015
|
+
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*\}\}$/)]),
|
|
2016
|
+
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*\}\}$/)]),
|
|
2017
|
+
});
|
|
1941
2018
|
|
|
1942
2019
|
export const svgLineShapeSchema = svgshapesSvgLineShapeSchema;
|
|
1943
2020
|
|
|
@@ -1961,7 +2038,7 @@ export const svgLineShapeSchema = svgshapesSvgLineShapeSchema;
|
|
|
1961
2038
|
export const svgshapesSvgPathShapeSchema = z.object({
|
|
1962
2039
|
type: z.enum(["path"]),
|
|
1963
2040
|
d: z.string().min(1).max(100000),
|
|
1964
|
-
})
|
|
2041
|
+
});
|
|
1965
2042
|
|
|
1966
2043
|
export const svgPathShapeSchema = svgshapesSvgPathShapeSchema;
|
|
1967
2044
|
|
|
@@ -1973,9 +2050,9 @@ export const svgPathShapeSchema = svgshapesSvgPathShapeSchema;
|
|
|
1973
2050
|
*/
|
|
1974
2051
|
export const svgshapesSvgPolygonShapeSchema = z.object({
|
|
1975
2052
|
type: z.enum(["polygon"]),
|
|
1976
|
-
sides: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1977
|
-
radius: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1978
|
-
})
|
|
2053
|
+
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*\}\}$/)]),
|
|
2054
|
+
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*\}\}$/)]),
|
|
2055
|
+
});
|
|
1979
2056
|
|
|
1980
2057
|
export const svgPolygonShapeSchema = svgshapesSvgPolygonShapeSchema;
|
|
1981
2058
|
|
|
@@ -1986,10 +2063,10 @@ export const svgPolygonShapeSchema = svgshapesSvgPolygonShapeSchema;
|
|
|
1986
2063
|
*/
|
|
1987
2064
|
export const svgshapesSvgRectangleShapeSchema = z.object({
|
|
1988
2065
|
type: z.enum(["rectangle"]),
|
|
1989
|
-
width: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1990
|
-
height: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
1991
|
-
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')
|
|
1992
|
-
})
|
|
2066
|
+
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*\}\}$/)]),
|
|
2067
|
+
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*\}\}$/)]),
|
|
2068
|
+
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),
|
|
2069
|
+
});
|
|
1993
2070
|
|
|
1994
2071
|
export const svgRectangleShapeSchema = svgshapesSvgRectangleShapeSchema;
|
|
1995
2072
|
|
|
@@ -2000,9 +2077,9 @@ export const svgRectangleShapeSchema = svgshapesSvgRectangleShapeSchema;
|
|
|
2000
2077
|
*/
|
|
2001
2078
|
export const svgshapesSvgRingShapeSchema = z.object({
|
|
2002
2079
|
type: z.enum(["ring"]),
|
|
2003
|
-
outerRadius: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2004
|
-
innerRadius: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2005
|
-
})
|
|
2080
|
+
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*\}\}$/)]),
|
|
2081
|
+
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*\}\}$/)]),
|
|
2082
|
+
});
|
|
2006
2083
|
|
|
2007
2084
|
export const svgRingShapeSchema = svgshapesSvgRingShapeSchema;
|
|
2008
2085
|
|
|
@@ -2014,10 +2091,10 @@ export const svgRingShapeSchema = svgshapesSvgRingShapeSchema;
|
|
|
2014
2091
|
*/
|
|
2015
2092
|
export const svgshapesSvgStarShapeSchema = z.object({
|
|
2016
2093
|
type: z.enum(["star"]),
|
|
2017
|
-
points: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2018
|
-
outerRadius: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2019
|
-
innerRadius: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2020
|
-
})
|
|
2094
|
+
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*\}\}$/)]),
|
|
2095
|
+
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*\}\}$/)]),
|
|
2096
|
+
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*\}\}$/)]),
|
|
2097
|
+
});
|
|
2021
2098
|
|
|
2022
2099
|
export const svgStarShapeSchema = svgshapesSvgStarShapeSchema;
|
|
2023
2100
|
|
|
@@ -2094,10 +2171,10 @@ export const svgassetSvgAssetSchema = z.object({
|
|
|
2094
2171
|
stroke: z.optional(svgpropertiesSvgStrokeSchema),
|
|
2095
2172
|
shadow: z.optional(svgpropertiesSvgShadowSchema),
|
|
2096
2173
|
transform: z.optional(svgpropertiesSvgTransformSchema),
|
|
2097
|
-
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')
|
|
2098
|
-
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')
|
|
2099
|
-
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')
|
|
2100
|
-
}).
|
|
2174
|
+
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),
|
|
2175
|
+
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*\}\}$/)])),
|
|
2176
|
+
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*\}\}$/)])),
|
|
2177
|
+
}).superRefine((data, ctx) => {
|
|
2101
2178
|
const hasShape = data.shape !== undefined;
|
|
2102
2179
|
const hasSrc = data.src !== undefined && data.src.trim() !== "";
|
|
2103
2180
|
|
|
@@ -2130,29 +2207,6 @@ export const svgassetSvgAssetSchema = z.object({
|
|
|
2130
2207
|
}
|
|
2131
2208
|
}
|
|
2132
2209
|
});
|
|
2133
|
-
}
|
|
2134
|
-
|
|
2135
|
-
if (hasShape && hasSrc) {
|
|
2136
|
-
ctx.addIssue({
|
|
2137
|
-
code: z.ZodIssueCode.custom,
|
|
2138
|
-
message: "Provide either 'src' or 'shape', not both",
|
|
2139
|
-
path: ["src"],
|
|
2140
|
-
});
|
|
2141
|
-
}
|
|
2142
|
-
|
|
2143
|
-
if (hasSrc) {
|
|
2144
|
-
const disallowedProps = ["shape", "fill", "stroke", "shadow", "transform", "width", "height"];
|
|
2145
|
-
for (const prop of disallowedProps) {
|
|
2146
|
-
if (data[prop] !== undefined) {
|
|
2147
|
-
ctx.addIssue({
|
|
2148
|
-
code: z.ZodIssueCode.custom,
|
|
2149
|
-
message: `'${prop}' is not allowed when using 'src'. Only 'type' and 'src' are allowed in import mode`,
|
|
2150
|
-
path: [prop],
|
|
2151
|
-
});
|
|
2152
|
-
}
|
|
2153
|
-
}
|
|
2154
|
-
}
|
|
2155
|
-
});
|
|
2156
2210
|
|
|
2157
2211
|
export const svgAssetSchema = svgassetSvgAssetSchema;
|
|
2158
2212
|
|
|
@@ -2162,7 +2216,7 @@ export const svgAssetSchema = svgassetSvgAssetSchema;
|
|
|
2162
2216
|
export const templaterenderTemplateRenderSchema = z.object({
|
|
2163
2217
|
id: z.string(),
|
|
2164
2218
|
merge: z.optional(z.array(mergefieldMergeFieldSchema)),
|
|
2165
|
-
})
|
|
2219
|
+
});
|
|
2166
2220
|
|
|
2167
2221
|
export const templateRenderSchema = templaterenderTemplateRenderSchema;
|
|
2168
2222
|
|
|
@@ -2172,7 +2226,7 @@ export const templateRenderSchema = templaterenderTemplateRenderSchema;
|
|
|
2172
2226
|
export const textpropertiesTextAlignmentSchema = z.object({
|
|
2173
2227
|
horizontal: z.optional(z.enum(["left", "center", "right"])),
|
|
2174
2228
|
vertical: z.optional(z.enum(["top", "center", "bottom"])),
|
|
2175
|
-
})
|
|
2229
|
+
});
|
|
2176
2230
|
|
|
2177
2231
|
export const textAlignmentSchema = textpropertiesTextAlignmentSchema;
|
|
2178
2232
|
|
|
@@ -2181,18 +2235,18 @@ export const textAlignmentSchema = textpropertiesTextAlignmentSchema;
|
|
|
2181
2235
|
*/
|
|
2182
2236
|
export const textpropertiesTextAnimationSchema = z.object({
|
|
2183
2237
|
preset: z.enum(["typewriter"]),
|
|
2184
|
-
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')
|
|
2185
|
-
})
|
|
2238
|
+
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*\}\}$/)])),
|
|
2239
|
+
});
|
|
2186
2240
|
|
|
2187
2241
|
/**
|
|
2188
2242
|
* Displays a background box behind the text.
|
|
2189
2243
|
*/
|
|
2190
2244
|
export const textpropertiesTextBackgroundSchema = z.object({
|
|
2191
|
-
color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)),
|
|
2192
|
-
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')
|
|
2193
|
-
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')
|
|
2194
|
-
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')
|
|
2195
|
-
})
|
|
2245
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2246
|
+
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*\}\}$/)])),
|
|
2247
|
+
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*\}\}$/)])),
|
|
2248
|
+
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*\}\}$/)])),
|
|
2249
|
+
});
|
|
2196
2250
|
|
|
2197
2251
|
export const textBackgroundSchema = textpropertiesTextBackgroundSchema;
|
|
2198
2252
|
|
|
@@ -2202,11 +2256,11 @@ export const textBackgroundSchema = textpropertiesTextBackgroundSchema;
|
|
|
2202
2256
|
export const textpropertiesTextFontSchema = z.object({
|
|
2203
2257
|
family: z.optional(z.string()),
|
|
2204
2258
|
color: z.optional(z.string()),
|
|
2205
|
-
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')
|
|
2206
|
-
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')
|
|
2207
|
-
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')
|
|
2208
|
-
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')
|
|
2209
|
-
})
|
|
2259
|
+
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*\}\}$/)])),
|
|
2260
|
+
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*\}\}$/)])),
|
|
2261
|
+
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*\}\}$/)])),
|
|
2262
|
+
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*\}\}$/)])),
|
|
2263
|
+
});
|
|
2210
2264
|
|
|
2211
2265
|
export const textFontSchema = textpropertiesTextFontSchema;
|
|
2212
2266
|
|
|
@@ -2214,9 +2268,9 @@ export const textFontSchema = textpropertiesTextFontSchema;
|
|
|
2214
2268
|
* Text stroke (outline) properties.
|
|
2215
2269
|
*/
|
|
2216
2270
|
export const textpropertiesTextStrokeSchema = z.object({
|
|
2217
|
-
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')
|
|
2218
|
-
color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)),
|
|
2219
|
-
})
|
|
2271
|
+
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*\}\}$/)])),
|
|
2272
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2273
|
+
});
|
|
2220
2274
|
|
|
2221
2275
|
/**
|
|
2222
2276
|
* The TextAsset is used to add text and titles to a video. The text can be styled with built in and custom
|
|
@@ -2226,15 +2280,15 @@ export const textpropertiesTextStrokeSchema = z.object({
|
|
|
2226
2280
|
export const textassetTextAssetSchema = z.object({
|
|
2227
2281
|
type: z.enum(["text"]),
|
|
2228
2282
|
text: z.string(),
|
|
2229
|
-
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')
|
|
2230
|
-
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')
|
|
2283
|
+
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*\}\}$/)])),
|
|
2284
|
+
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*\}\}$/)])),
|
|
2231
2285
|
font: z.optional(textpropertiesTextFontSchema),
|
|
2232
2286
|
background: z.optional(textpropertiesTextBackgroundSchema),
|
|
2233
2287
|
alignment: z.optional(textpropertiesTextAlignmentSchema),
|
|
2234
2288
|
stroke: z.optional(textpropertiesTextStrokeSchema),
|
|
2235
2289
|
animation: z.optional(textpropertiesTextAnimationSchema),
|
|
2236
2290
|
ellipsis: z.optional(z.string()),
|
|
2237
|
-
})
|
|
2291
|
+
});
|
|
2238
2292
|
|
|
2239
2293
|
export const textAssetSchema = textassetTextAssetSchema;
|
|
2240
2294
|
|
|
@@ -2244,10 +2298,10 @@ export const textAssetSchema = textassetTextAssetSchema;
|
|
|
2244
2298
|
export const texttoimageassetTextToImageAssetSchema = z.object({
|
|
2245
2299
|
type: z.enum(["text-to-image"]),
|
|
2246
2300
|
prompt: z.string(),
|
|
2247
|
-
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')
|
|
2248
|
-
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')
|
|
2301
|
+
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*\}\}$/)])),
|
|
2302
|
+
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*\}\}$/)])),
|
|
2249
2303
|
crop: z.optional(cropCropSchema),
|
|
2250
|
-
})
|
|
2304
|
+
});
|
|
2251
2305
|
|
|
2252
2306
|
export const textToImageAssetSchema = texttoimageassetTextToImageAssetSchema;
|
|
2253
2307
|
|
|
@@ -2255,9 +2309,9 @@ export const textToImageAssetSchema = texttoimageassetTextToImageAssetSchema;
|
|
|
2255
2309
|
* Generate a thumbnail image for the video or image at a specific point from the timeline.
|
|
2256
2310
|
*/
|
|
2257
2311
|
export const thumbnailThumbnailSchema = z.object({
|
|
2258
|
-
capture: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2259
|
-
scale: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2260
|
-
})
|
|
2312
|
+
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*\}\}$/)]),
|
|
2313
|
+
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*\}\}$/)]),
|
|
2314
|
+
});
|
|
2261
2315
|
|
|
2262
2316
|
export const thumbnailSchema = thumbnailThumbnailSchema;
|
|
2263
2317
|
|
|
@@ -2294,7 +2348,7 @@ export const outputOutputSchema = z.object({
|
|
|
2294
2348
|
poster: z.optional(posterPosterSchema),
|
|
2295
2349
|
thumbnail: z.optional(thumbnailThumbnailSchema),
|
|
2296
2350
|
destinations: z.optional(z.array(destinationsDestinationsSchema)),
|
|
2297
|
-
})
|
|
2351
|
+
});
|
|
2298
2352
|
|
|
2299
2353
|
export const outputSchema = outputOutputSchema;
|
|
2300
2354
|
|
|
@@ -2434,7 +2488,7 @@ export const transitionTransitionSchema = z.object({
|
|
|
2434
2488
|
"zoom",
|
|
2435
2489
|
]),
|
|
2436
2490
|
),
|
|
2437
|
-
})
|
|
2491
|
+
});
|
|
2438
2492
|
|
|
2439
2493
|
export const transitionSchema = transitionTransitionSchema;
|
|
2440
2494
|
|
|
@@ -2449,10 +2503,10 @@ export const transitionSchema = transitionTransitionSchema;
|
|
|
2449
2503
|
* </ul>
|
|
2450
2504
|
*/
|
|
2451
2505
|
export const tweenTweenSchema = z.object({
|
|
2452
|
-
from: z.
|
|
2453
|
-
to: z.
|
|
2454
|
-
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')
|
|
2455
|
-
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')
|
|
2506
|
+
from: z.optional(z.unknown()),
|
|
2507
|
+
to: z.optional(z.unknown()),
|
|
2508
|
+
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*\}\}$/)])),
|
|
2509
|
+
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*\}\}$/)])),
|
|
2456
2510
|
interpolation: z.optional(z.enum(["linear", "bezier", "constant"])),
|
|
2457
2511
|
easing: z.optional(
|
|
2458
2512
|
z.enum([
|
|
@@ -2486,7 +2540,7 @@ export const tweenTweenSchema = z.object({
|
|
|
2486
2540
|
"easeInOutBack",
|
|
2487
2541
|
]),
|
|
2488
2542
|
),
|
|
2489
|
-
})
|
|
2543
|
+
});
|
|
2490
2544
|
|
|
2491
2545
|
export const tweenSchema = tweenTweenSchema;
|
|
2492
2546
|
|
|
@@ -2495,14 +2549,14 @@ export const tweenSchema = tweenTweenSchema;
|
|
|
2495
2549
|
*/
|
|
2496
2550
|
export const audioassetAudioAssetSchema = z.object({
|
|
2497
2551
|
type: z.enum(["audio"]),
|
|
2498
|
-
src: z.string().
|
|
2499
|
-
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')
|
|
2552
|
+
src: z.string().min(1).regex(/\S/),
|
|
2553
|
+
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*\}\}$/)])),
|
|
2500
2554
|
volume: z.optional(
|
|
2501
|
-
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2555
|
+
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)]),
|
|
2502
2556
|
),
|
|
2503
|
-
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')
|
|
2557
|
+
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*\}\}$/)])),
|
|
2504
2558
|
effect: z.optional(z.enum(["none", "fadeIn", "fadeOut", "fadeInFadeOut"])),
|
|
2505
|
-
})
|
|
2559
|
+
});
|
|
2506
2560
|
|
|
2507
2561
|
export const audioAssetSchema = audioassetAudioAssetSchema;
|
|
2508
2562
|
|
|
@@ -2511,12 +2565,12 @@ export const audioAssetSchema = audioassetAudioAssetSchema;
|
|
|
2511
2565
|
*/
|
|
2512
2566
|
export const offsetOffsetSchema = z.object({
|
|
2513
2567
|
x: z.optional(
|
|
2514
|
-
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2568
|
+
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)]),
|
|
2515
2569
|
),
|
|
2516
2570
|
y: z.optional(
|
|
2517
|
-
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2571
|
+
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)]),
|
|
2518
2572
|
),
|
|
2519
|
-
})
|
|
2573
|
+
});
|
|
2520
2574
|
|
|
2521
2575
|
export const offsetSchema = offsetOffsetSchema;
|
|
2522
2576
|
|
|
@@ -2525,9 +2579,9 @@ export const offsetSchema = offsetOffsetSchema;
|
|
|
2525
2579
|
*/
|
|
2526
2580
|
export const rotatetransformationRotateTransformationSchema = z.object({
|
|
2527
2581
|
angle: z.optional(
|
|
2528
|
-
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2582
|
+
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)]),
|
|
2529
2583
|
),
|
|
2530
|
-
})
|
|
2584
|
+
});
|
|
2531
2585
|
|
|
2532
2586
|
export const rotateTransformationSchema =
|
|
2533
2587
|
rotatetransformationRotateTransformationSchema;
|
|
@@ -2537,16 +2591,35 @@ export const rotateTransformationSchema =
|
|
|
2537
2591
|
*/
|
|
2538
2592
|
export const skewtransformationSkewTransformationSchema = z.object({
|
|
2539
2593
|
x: z.optional(
|
|
2540
|
-
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2594
|
+
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)]),
|
|
2541
2595
|
),
|
|
2542
2596
|
y: z.optional(
|
|
2543
|
-
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2597
|
+
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)]),
|
|
2544
2598
|
),
|
|
2545
|
-
})
|
|
2599
|
+
});
|
|
2546
2600
|
|
|
2547
2601
|
export const skewTransformationSchema =
|
|
2548
2602
|
skewtransformationSkewTransformationSchema;
|
|
2549
2603
|
|
|
2604
|
+
/**
|
|
2605
|
+
* 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.
|
|
2606
|
+
*/
|
|
2607
|
+
export const texttospeechassetTextToSpeechAssetSchema = z.object({
|
|
2608
|
+
type: z.enum(["text-to-speech"]),
|
|
2609
|
+
text: z.string(),
|
|
2610
|
+
voice: z.string(),
|
|
2611
|
+
language: z.optional(z.string()),
|
|
2612
|
+
newscaster: z.optional(z.boolean()).default(false),
|
|
2613
|
+
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*\}\}$/)])),
|
|
2614
|
+
volume: z.optional(
|
|
2615
|
+
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)]),
|
|
2616
|
+
),
|
|
2617
|
+
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*\}\}$/)])),
|
|
2618
|
+
effect: z.optional(z.enum(["none", "fadeIn", "fadeOut", "fadeInFadeOut"])),
|
|
2619
|
+
});
|
|
2620
|
+
|
|
2621
|
+
export const textToSpeechAssetSchema = texttospeechassetTextToSpeechAssetSchema;
|
|
2622
|
+
|
|
2550
2623
|
/**
|
|
2551
2624
|
* **Notice: The TitleAsset is deprecated, use the [TextAsset](#tocs_textasset) instead.**
|
|
2552
2625
|
*
|
|
@@ -2599,7 +2672,7 @@ export const titleassetTitleAssetSchema = z.object({
|
|
|
2599
2672
|
]),
|
|
2600
2673
|
),
|
|
2601
2674
|
offset: z.optional(offsetOffsetSchema),
|
|
2602
|
-
})
|
|
2675
|
+
});
|
|
2603
2676
|
|
|
2604
2677
|
export const titleAssetSchema = titleassetTitleAssetSchema;
|
|
2605
2678
|
|
|
@@ -2610,7 +2683,7 @@ export const transformationTransformationSchema = z.object({
|
|
|
2610
2683
|
rotate: z.optional(rotatetransformationRotateTransformationSchema),
|
|
2611
2684
|
skew: z.optional(skewtransformationSkewTransformationSchema),
|
|
2612
2685
|
flip: z.optional(fliptransformationFlipTransformationSchema),
|
|
2613
|
-
})
|
|
2686
|
+
});
|
|
2614
2687
|
|
|
2615
2688
|
export const transformationSchema = transformationTransformationSchema;
|
|
2616
2689
|
|
|
@@ -2619,19 +2692,19 @@ export const transformationSchema = transformationTransformationSchema;
|
|
|
2619
2692
|
*/
|
|
2620
2693
|
export const videoassetVideoAssetSchema = z.object({
|
|
2621
2694
|
type: z.enum(["video"]),
|
|
2622
|
-
src: z.string().
|
|
2695
|
+
src: z.string().min(1).regex(/\S/),
|
|
2623
2696
|
transcode: z.optional(z.boolean()),
|
|
2624
|
-
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')
|
|
2697
|
+
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*\}\}$/)])),
|
|
2625
2698
|
volume: z.optional(
|
|
2626
|
-
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string')
|
|
2699
|
+
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)]),
|
|
2627
2700
|
),
|
|
2628
2701
|
volumeEffect: z.optional(
|
|
2629
2702
|
z.enum(["none", "fadeIn", "fadeOut", "fadeInFadeOut"]),
|
|
2630
2703
|
),
|
|
2631
|
-
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')
|
|
2704
|
+
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*\}\}$/)])),
|
|
2632
2705
|
crop: z.optional(cropCropSchema),
|
|
2633
2706
|
chromaKey: z.optional(chromakeyChromaKeySchema),
|
|
2634
|
-
})
|
|
2707
|
+
});
|
|
2635
2708
|
|
|
2636
2709
|
export const videoAssetSchema = videoassetVideoAssetSchema;
|
|
2637
2710
|
|
|
@@ -2652,6 +2725,7 @@ export const assetAssetSchema = z.discriminatedUnion("type", [
|
|
|
2652
2725
|
svgassetSvgAssetSchema,
|
|
2653
2726
|
texttoimageassetTextToImageAssetSchema,
|
|
2654
2727
|
imagetovideoassetImageToVideoAssetSchema,
|
|
2728
|
+
texttospeechassetTextToSpeechAssetSchema,
|
|
2655
2729
|
]);
|
|
2656
2730
|
|
|
2657
2731
|
export const assetSchema = assetAssetSchema;
|
|
@@ -2662,17 +2736,17 @@ export const assetSchema = assetAssetSchema;
|
|
|
2662
2736
|
export const clipClipSchema = z.object({
|
|
2663
2737
|
asset: assetAssetSchema,
|
|
2664
2738
|
start: z.union([
|
|
2665
|
-
z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (
|
|
2666
|
-
z.string().regex(/^(auto|alias:\/\/[A-Za-z0-9_-]+)$/),
|
|
2739
|
+
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*\}\}$/)]),
|
|
2740
|
+
z.union([z.string().regex(/^(auto|alias:\/\/[A-Za-z0-9_-]+)$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2667
2741
|
]),
|
|
2668
2742
|
length: z.union([
|
|
2669
|
-
z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (
|
|
2670
|
-
z.string().regex(/^(auto|end|alias:\/\/[A-Za-z0-9_-]+)$/),
|
|
2743
|
+
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*\}\}$/)]),
|
|
2744
|
+
z.union([z.string().regex(/^(auto|end|alias:\/\/[A-Za-z0-9_-]+)$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2671
2745
|
]),
|
|
2672
2746
|
fit: z.optional(z.enum(["cover", "contain", "crop", "none"])),
|
|
2673
|
-
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')
|
|
2674
|
-
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')
|
|
2675
|
-
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')
|
|
2747
|
+
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)])),
|
|
2748
|
+
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*\}\}$/)])),
|
|
2749
|
+
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*\}\}$/)])),
|
|
2676
2750
|
position: z.optional(
|
|
2677
2751
|
z.enum([
|
|
2678
2752
|
"top",
|
|
@@ -2723,10 +2797,10 @@ export const clipClipSchema = z.object({
|
|
|
2723
2797
|
"negative",
|
|
2724
2798
|
]),
|
|
2725
2799
|
),
|
|
2726
|
-
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')
|
|
2800
|
+
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)])),
|
|
2727
2801
|
transform: z.optional(transformationTransformationSchema),
|
|
2728
|
-
alias: z.optional(z.string().regex(/^[A-Za-z0-9_-]+$/)),
|
|
2729
|
-
})
|
|
2802
|
+
alias: z.optional(z.union([z.string().regex(/^[A-Za-z0-9_-]+$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2803
|
+
});
|
|
2730
2804
|
|
|
2731
2805
|
export const clipSchema = clipClipSchema;
|
|
2732
2806
|
|
|
@@ -2735,7 +2809,7 @@ export const clipSchema = clipClipSchema;
|
|
|
2735
2809
|
*/
|
|
2736
2810
|
export const trackTrackSchema = z.object({
|
|
2737
2811
|
clips: z.array(clipClipSchema).min(1),
|
|
2738
|
-
})
|
|
2812
|
+
});
|
|
2739
2813
|
|
|
2740
2814
|
export const trackSchema = trackTrackSchema;
|
|
2741
2815
|
|
|
@@ -2748,7 +2822,7 @@ export const timelineTimelineSchema = z.object({
|
|
|
2748
2822
|
fonts: z.optional(z.array(fontFontSchema)),
|
|
2749
2823
|
tracks: z.array(trackTrackSchema).min(1),
|
|
2750
2824
|
cache: z.optional(z.boolean()),
|
|
2751
|
-
})
|
|
2825
|
+
});
|
|
2752
2826
|
|
|
2753
2827
|
export const timelineSchema = timelineTimelineSchema;
|
|
2754
2828
|
|
|
@@ -2761,10 +2835,7 @@ export const editEditSchema = z.object({
|
|
|
2761
2835
|
merge: z.optional(z.array(mergefieldMergeFieldSchema)),
|
|
2762
2836
|
callback: z.optional(z.string()),
|
|
2763
2837
|
disk: z.optional(z.enum(["local", "mount"])),
|
|
2764
|
-
|
|
2765
|
-
poster: z.optional(posterPosterSchema),
|
|
2766
|
-
thumbnail: z.optional(thumbnailThumbnailSchema),
|
|
2767
|
-
}).strict();
|
|
2838
|
+
});
|
|
2768
2839
|
|
|
2769
2840
|
export const editSchema = editEditSchema;
|
|
2770
2841
|
|
|
@@ -2785,15 +2856,15 @@ export const renderresponsedataRenderResponseDataSchema = z.object({
|
|
|
2785
2856
|
"failed",
|
|
2786
2857
|
]),
|
|
2787
2858
|
error: z.optional(z.string()),
|
|
2788
|
-
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')
|
|
2789
|
-
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')
|
|
2859
|
+
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*\}\}$/)])),
|
|
2860
|
+
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*\}\}$/)])),
|
|
2790
2861
|
url: z.optional(z.string()),
|
|
2791
2862
|
poster: z.optional(z.union([z.string(), z.null()])),
|
|
2792
2863
|
thumbnail: z.optional(z.union([z.string(), z.null()])),
|
|
2793
2864
|
data: z.optional(editEditSchema),
|
|
2794
2865
|
created: z.optional(z.string()),
|
|
2795
2866
|
updated: z.optional(z.string()),
|
|
2796
|
-
})
|
|
2867
|
+
});
|
|
2797
2868
|
|
|
2798
2869
|
export const renderResponseDataSchema =
|
|
2799
2870
|
renderresponsedataRenderResponseDataSchema;
|
|
@@ -2805,7 +2876,7 @@ export const renderresponseRenderResponseSchema = z.object({
|
|
|
2805
2876
|
success: z.boolean(),
|
|
2806
2877
|
message: z.string(),
|
|
2807
2878
|
response: renderresponsedataRenderResponseDataSchema,
|
|
2808
|
-
})
|
|
2879
|
+
});
|
|
2809
2880
|
|
|
2810
2881
|
export const renderResponseSchema = renderresponseRenderResponseSchema;
|
|
2811
2882
|
|
|
@@ -2817,7 +2888,7 @@ export const templatedataresponsedataTemplateDataResponseDataSchema = z.object({
|
|
|
2817
2888
|
name: z.string(),
|
|
2818
2889
|
owner: z.string(),
|
|
2819
2890
|
template: editEditSchema,
|
|
2820
|
-
})
|
|
2891
|
+
});
|
|
2821
2892
|
|
|
2822
2893
|
export const templateDataResponseDataSchema =
|
|
2823
2894
|
templatedataresponsedataTemplateDataResponseDataSchema;
|
|
@@ -2829,7 +2900,7 @@ export const templatedataresponseTemplateDataResponseSchema = z.object({
|
|
|
2829
2900
|
success: z.boolean(),
|
|
2830
2901
|
message: z.string(),
|
|
2831
2902
|
response: templatedataresponsedataTemplateDataResponseDataSchema,
|
|
2832
|
-
})
|
|
2903
|
+
});
|
|
2833
2904
|
|
|
2834
2905
|
export const templateDataResponseSchema =
|
|
2835
2906
|
templatedataresponseTemplateDataResponseSchema;
|
|
@@ -2840,7 +2911,7 @@ export const templateDataResponseSchema =
|
|
|
2840
2911
|
export const templateTemplateSchema = z.object({
|
|
2841
2912
|
name: z.string(),
|
|
2842
2913
|
template: z.optional(editEditSchema),
|
|
2843
|
-
})
|
|
2914
|
+
});
|
|
2844
2915
|
|
|
2845
2916
|
export const templateSchema = templateTemplateSchema;
|
|
2846
2917
|
|