@shotstack/schemas 1.6.0 → 1.7.0
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/README.md +89 -89
- package/dist/json-schema/asset.json +3123 -0
- package/dist/json-schema/audio-asset.json +180 -0
- package/dist/json-schema/caption-asset.json +285 -0
- package/dist/json-schema/caption-background.json +61 -0
- package/dist/json-schema/caption-font.json +97 -0
- package/dist/json-schema/caption-margin.json +49 -0
- package/dist/json-schema/chroma-key.json +46 -0
- package/dist/json-schema/clip.json +3575 -0
- package/dist/json-schema/crop.json +69 -0
- package/dist/json-schema/destinations.json +495 -0
- package/dist/json-schema/edit.json +4540 -0
- package/dist/json-schema/flip-transformation.json +37 -0
- package/dist/json-schema/font.json +18 -0
- package/dist/json-schema/google-cloud-storage-destination-options.json +42 -0
- package/dist/json-schema/google-cloud-storage-destination.json +73 -0
- package/dist/json-schema/google-drive-destination-options.json +30 -0
- package/dist/json-schema/google-drive-destination.json +54 -0
- package/dist/json-schema/image-asset.json +104 -0
- package/dist/json-schema/image-to-video-asset.json +151 -0
- package/dist/json-schema/index.cjs +1 -0
- package/dist/json-schema/index.d.ts +6 -0
- package/dist/json-schema/index.js +3 -0
- package/dist/json-schema/luma-asset.json +38 -0
- package/dist/json-schema/merge-field.json +23 -0
- package/dist/json-schema/offset.json +145 -0
- package/dist/json-schema/output.json +771 -0
- package/dist/json-schema/poster.json +18 -0
- package/dist/json-schema/range.json +39 -0
- package/dist/json-schema/rich-caption-active-font.json +54 -0
- package/dist/json-schema/rich-caption-active.json +154 -0
- package/dist/json-schema/rich-caption-asset.json +1098 -0
- package/dist/json-schema/rich-caption-word-animation.json +60 -0
- package/dist/json-schema/rich-text-alignment.json +47 -0
- package/dist/json-schema/rich-text-animation.json +74 -0
- package/dist/json-schema/rich-text-asset.json +737 -0
- package/dist/json-schema/rich-text-background.json +52 -0
- package/dist/json-schema/rich-text-font.json +157 -0
- package/dist/json-schema/rich-text-gradient.json +68 -0
- package/dist/json-schema/rich-text-shadow.json +79 -0
- package/dist/json-schema/rich-text-stroke.json +55 -0
- package/dist/json-schema/rich-text-style.json +165 -0
- package/dist/json-schema/rotate-transformation.json +123 -0
- package/dist/json-schema/s3destination-options.json +59 -0
- package/dist/json-schema/s3destination.json +90 -0
- package/dist/json-schema/schemas.json +4983 -0
- package/dist/json-schema/shape-asset.json +225 -0
- package/dist/json-schema/shotstack-destination.json +33 -0
- package/dist/json-schema/size.json +41 -0
- package/dist/json-schema/skew-transformation.json +145 -0
- package/dist/json-schema/soundtrack.json +47 -0
- package/dist/json-schema/svg-arrow-shape.json +49 -0
- package/dist/json-schema/svg-asset.json +877 -0
- package/dist/json-schema/svg-circle-shape.json +28 -0
- package/dist/json-schema/svg-cross-shape.json +42 -0
- package/dist/json-schema/svg-ellipse-shape.json +35 -0
- package/dist/json-schema/svg-fill.json +169 -0
- package/dist/json-schema/svg-gradient-stop.json +25 -0
- package/dist/json-schema/svg-heart-shape.json +28 -0
- package/dist/json-schema/svg-line-shape.json +35 -0
- package/dist/json-schema/svg-linear-gradient-fill.json +80 -0
- package/dist/json-schema/svg-path-shape.json +26 -0
- package/dist/json-schema/svg-polygon-shape.json +35 -0
- package/dist/json-schema/svg-radial-gradient-fill.json +66 -0
- package/dist/json-schema/svg-rectangle-shape.json +49 -0
- package/dist/json-schema/svg-ring-shape.json +35 -0
- package/dist/json-schema/svg-shadow.json +79 -0
- package/dist/json-schema/svg-shape.json +404 -0
- package/dist/json-schema/svg-solid-fill.json +40 -0
- package/dist/json-schema/svg-star-shape.json +42 -0
- package/dist/json-schema/svg-stroke.json +115 -0
- package/dist/json-schema/svg-transform.json +93 -0
- package/dist/json-schema/text-to-image-asset.json +128 -0
- package/dist/json-schema/text-to-speech-asset.json +209 -0
- package/dist/json-schema/thumbnail.json +25 -0
- package/dist/json-schema/timeline.json +3703 -0
- package/dist/json-schema/track.json +3590 -0
- package/dist/json-schema/transformation.json +251 -0
- package/dist/json-schema/transition.json +37 -0
- package/dist/json-schema/tween.json +90 -0
- package/dist/json-schema/video-asset.json +321 -0
- package/dist/json-schema/vimeo-destination-options.json +149 -0
- package/dist/json-schema/vimeo-destination-privacy-options.json +90 -0
- package/dist/json-schema/vimeo-destination.json +178 -0
- package/dist/json-schema/word-timing.json +44 -0
- package/dist/zod/zod.gen.cjs +1080 -921
- package/dist/zod/zod.gen.d.ts +139 -139
- package/dist/zod/zod.gen.js +1081 -922
- package/dist/zod/zod.gen.ts +1583 -1648
- package/package.json +79 -73
package/dist/zod/zod.gen.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
|
|
3
|
-
import { z } from
|
|
3
|
+
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
export const editRootSchema = z.unknown();
|
|
6
6
|
|
|
@@ -38,10 +38,10 @@ export const uploadRootSchema = z.unknown();
|
|
|
38
38
|
* Displays a background box behind the caption text.
|
|
39
39
|
*/
|
|
40
40
|
export const captionpropertiesCaptionBackgroundSchema = z.object({
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
color: z.optional(z.string()),
|
|
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
45
|
}).strict();
|
|
46
46
|
|
|
47
47
|
export const captionBackgroundSchema = captionpropertiesCaptionBackgroundSchema;
|
|
@@ -50,13 +50,13 @@ export const captionBackgroundSchema = captionpropertiesCaptionBackgroundSchema;
|
|
|
50
50
|
* Font properties for captions text.
|
|
51
51
|
*/
|
|
52
52
|
export const captionpropertiesCaptionFontSchema = z.object({
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
family: z.optional(z.string()),
|
|
54
|
+
color: z.optional(z.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
|
+
stroke: z.optional(z.string()),
|
|
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
60
|
}).strict();
|
|
61
61
|
|
|
62
62
|
export const captionFontSchema = captionpropertiesCaptionFontSchema;
|
|
@@ -65,9 +65,9 @@ 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
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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
71
|
}).strict();
|
|
72
72
|
|
|
73
73
|
export const captionMarginSchema = captionpropertiesCaptionMarginSchema;
|
|
@@ -85,13 +85,13 @@ export const captionMarginSchema = captionpropertiesCaptionMarginSchema;
|
|
|
85
85
|
*
|
|
86
86
|
*/
|
|
87
87
|
export const captionassetCaptionAssetSchema = z.object({
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
88
|
+
type: z.enum(['caption']),
|
|
89
|
+
src: z.string().min(1).regex(/\S/),
|
|
90
|
+
font: z.optional(captionpropertiesCaptionFontSchema),
|
|
91
|
+
background: z.optional(captionpropertiesCaptionBackgroundSchema),
|
|
92
|
+
margin: z.optional(captionpropertiesCaptionMarginSchema),
|
|
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
95
|
}).strict();
|
|
96
96
|
|
|
97
97
|
export const captionAssetSchema = captionassetCaptionAssetSchema;
|
|
@@ -100,9 +100,9 @@ export const captionAssetSchema = captionassetCaptionAssetSchema;
|
|
|
100
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.
|
|
101
101
|
*/
|
|
102
102
|
export const chromakeyChromaKeySchema = z.object({
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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
106
|
}).strict();
|
|
107
107
|
|
|
108
108
|
export const chromaKeySchema = chromakeyChromaKeySchema;
|
|
@@ -111,14 +111,19 @@ export const chromaKeySchema = chromakeyChromaKeySchema;
|
|
|
111
111
|
* Options for the D-ID text-to-avatar service. Set the text to be converted to an avatar and configure the avatar and background. The output will be generated as an MP4 video file.
|
|
112
112
|
*/
|
|
113
113
|
export const didTextToAvatarOptionsDidTextToAvatarOptionsSchema = z.object({
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
114
|
+
type: z.enum(['text-to-avatar']),
|
|
115
|
+
text: z.string(),
|
|
116
|
+
avatar: z.enum([
|
|
117
|
+
'jack',
|
|
118
|
+
'lana',
|
|
119
|
+
'lily',
|
|
120
|
+
'matt',
|
|
121
|
+
'rian'
|
|
122
|
+
]),
|
|
123
|
+
background: z.optional(z.string())
|
|
118
124
|
}).strict();
|
|
119
125
|
|
|
120
|
-
export const didTextToAvatarOptionsSchema =
|
|
121
|
-
didTextToAvatarOptionsDidTextToAvatarOptionsSchema;
|
|
126
|
+
export const didTextToAvatarOptionsSchema = didTextToAvatarOptionsDidTextToAvatarOptionsSchema;
|
|
122
127
|
|
|
123
128
|
/**
|
|
124
129
|
* Generate assets using the third party D-ID provider AI services.
|
|
@@ -127,21 +132,18 @@ export const didTextToAvatarOptionsSchema =
|
|
|
127
132
|
* <li><a href="#tocs_didtexttoavataroptions">DidTextToAvatarOptions</a></li>
|
|
128
133
|
* </ul>
|
|
129
134
|
*/
|
|
130
|
-
export const didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema = z
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
})
|
|
134
|
-
.and(didTextToAvatarOptionsDidTextToAvatarOptionsSchema);
|
|
135
|
+
export const didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema = z.object({
|
|
136
|
+
type: z.literal('didTextToAvatarOptions_DIDTextToAvatarOptions')
|
|
137
|
+
}).strict().and(didTextToAvatarOptionsDidTextToAvatarOptionsSchema);
|
|
135
138
|
|
|
136
|
-
export const didGeneratedAssetOptionsSchema =
|
|
137
|
-
didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema;
|
|
139
|
+
export const didGeneratedAssetOptionsSchema = didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema;
|
|
138
140
|
|
|
139
141
|
/**
|
|
140
142
|
* Generate assets using D-ID. D-ID provide a text-to-avatar service. The D-ID provider works on a bring-your-own-key basis, credentials are required and must be added via the [dashboard](https://dashboard.shotstack.io/integrations/d-id), not in the request.
|
|
141
143
|
*/
|
|
142
144
|
export const didGeneratedAssetDidGeneratedAssetSchema = z.object({
|
|
143
|
-
|
|
144
|
-
|
|
145
|
+
provider: z.enum(['d-id']),
|
|
146
|
+
options: didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema
|
|
145
147
|
}).strict();
|
|
146
148
|
|
|
147
149
|
export const didGeneratedAssetSchema = didGeneratedAssetDidGeneratedAssetSchema;
|
|
@@ -149,25 +151,23 @@ export const didGeneratedAssetSchema = didGeneratedAssetDidGeneratedAssetSchema;
|
|
|
149
151
|
/**
|
|
150
152
|
* Options for the ElevenLabs text-to-speech service. Set the text to be converted to speech and choose a voice to set the speaking style. The output will be generated as an MP3 audio file available at the URL returned in the response.
|
|
151
153
|
*/
|
|
152
|
-
export const elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema =
|
|
153
|
-
|
|
154
|
-
type: z.enum(["text-to-speech"]),
|
|
154
|
+
export const elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema = z.object({
|
|
155
|
+
type: z.enum(['text-to-speech']),
|
|
155
156
|
text: z.string(),
|
|
156
157
|
voice: z.enum([
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
])
|
|
167
|
-
|
|
158
|
+
'Adam',
|
|
159
|
+
'Antoni',
|
|
160
|
+
'Arnold',
|
|
161
|
+
'Bella',
|
|
162
|
+
'Domi',
|
|
163
|
+
'Elli',
|
|
164
|
+
'Josh',
|
|
165
|
+
'Rachel',
|
|
166
|
+
'Sam'
|
|
167
|
+
])
|
|
168
|
+
}).strict();
|
|
168
169
|
|
|
169
|
-
export const elevenLabsTextToSpeechOptionsSchema =
|
|
170
|
-
elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema;
|
|
170
|
+
export const elevenLabsTextToSpeechOptionsSchema = elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema;
|
|
171
171
|
|
|
172
172
|
/**
|
|
173
173
|
* Generate assets using the third party ElevenLabs provider AI services.
|
|
@@ -176,157 +176,148 @@ export const elevenLabsTextToSpeechOptionsSchema =
|
|
|
176
176
|
* <li><a href="#tocs_elevenlabstexttospeechoptions">ElevenLabsTextToSpeechOptions</a></li>
|
|
177
177
|
* </ul>
|
|
178
178
|
*/
|
|
179
|
-
export const elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema =
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
type: z.literal(
|
|
183
|
-
"elevenlabsTextToSpeechOptions_ElevenLabsTextToSpeechOptions",
|
|
184
|
-
),
|
|
185
|
-
})
|
|
186
|
-
.and(elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema);
|
|
179
|
+
export const elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema = z.object({
|
|
180
|
+
type: z.literal('elevenlabsTextToSpeechOptions_ElevenLabsTextToSpeechOptions')
|
|
181
|
+
}).strict().and(elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema);
|
|
187
182
|
|
|
188
|
-
export const elevenLabsGeneratedAssetOptionsSchema =
|
|
189
|
-
elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema;
|
|
183
|
+
export const elevenLabsGeneratedAssetOptionsSchema = elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema;
|
|
190
184
|
|
|
191
185
|
/**
|
|
192
186
|
* Generate assets using ElevenLabs. ElevenLabs provide a text-to-speech service. The ElevenLabs provider works on a bring-your-own-key basis, credentials are required and must be added via the [dashboard](https://dashboard.shotstack.io/integrations/elevenlabs), not in the request.
|
|
193
187
|
*/
|
|
194
188
|
export const elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema = z.object({
|
|
195
|
-
|
|
196
|
-
|
|
189
|
+
provider: z.enum(['elevenlabs']),
|
|
190
|
+
options: elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema
|
|
197
191
|
}).strict();
|
|
198
192
|
|
|
199
|
-
export const elevenLabsGeneratedAssetSchema =
|
|
200
|
-
elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema;
|
|
193
|
+
export const elevenLabsGeneratedAssetSchema = elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema;
|
|
201
194
|
|
|
202
195
|
/**
|
|
203
196
|
* Options for the HeyGen text-to-avatar service. Set the text to be converted to an avatar and configure the avatars voice, speaking style, appearance and background. The output will be generated as an MP4 video file available at the URL returned in the response.
|
|
204
197
|
*/
|
|
205
|
-
export const heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema =
|
|
206
|
-
|
|
207
|
-
type: z.enum(["text-to-avatar"]),
|
|
198
|
+
export const heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema = z.object({
|
|
199
|
+
type: z.enum(['text-to-avatar']),
|
|
208
200
|
text: z.string(),
|
|
209
201
|
avatar: z.enum([
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
202
|
+
'Angela',
|
|
203
|
+
'Bill',
|
|
204
|
+
'Daisy',
|
|
205
|
+
'Derek',
|
|
206
|
+
'Eva',
|
|
207
|
+
'Jake',
|
|
208
|
+
'Jeff',
|
|
209
|
+
'Jerome',
|
|
210
|
+
'Joon',
|
|
211
|
+
'Kayla',
|
|
212
|
+
'Kent',
|
|
213
|
+
'Luna',
|
|
214
|
+
'Mark',
|
|
215
|
+
'Matthew',
|
|
216
|
+
'Monica',
|
|
217
|
+
'Peter',
|
|
218
|
+
'Selina',
|
|
219
|
+
'Tanya',
|
|
220
|
+
'Thomas',
|
|
221
|
+
'Tina',
|
|
222
|
+
'Tyler',
|
|
223
|
+
'Vanessa',
|
|
224
|
+
'Vera',
|
|
225
|
+
'Wilson',
|
|
226
|
+
'Zoey'
|
|
235
227
|
]),
|
|
236
228
|
voice: z.enum([
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
229
|
+
'Abbi - Natural',
|
|
230
|
+
'Adam - Natural',
|
|
231
|
+
'Aiston - Friendly',
|
|
232
|
+
'Alice - Newscaster',
|
|
233
|
+
'Alison - Cheerful',
|
|
234
|
+
'Amber - Friendly',
|
|
235
|
+
'Amy - Warm',
|
|
236
|
+
'Ana - Cheerful',
|
|
237
|
+
'Antoni - Friendly',
|
|
238
|
+
'Aria - Newscaster',
|
|
239
|
+
'Arnold - Cheerful',
|
|
240
|
+
'Arthur - Natural',
|
|
241
|
+
'Bella - Friendly',
|
|
242
|
+
'Belle - Natural',
|
|
243
|
+
'Brandon - Warm',
|
|
244
|
+
'Brian - Natural',
|
|
245
|
+
'Bruce - Natural',
|
|
246
|
+
'Cerise - Cheerful',
|
|
247
|
+
'Christopher - Calm',
|
|
248
|
+
'Clara - Professional',
|
|
249
|
+
'Connor - Natural',
|
|
250
|
+
'Dahlia - Friendly',
|
|
251
|
+
'Davis - Professional',
|
|
252
|
+
'Dean - Natural',
|
|
253
|
+
'Delbert - Cheerful',
|
|
254
|
+
'Edward - Friendly',
|
|
255
|
+
'Elaine - Calm',
|
|
256
|
+
'Emily - Natural',
|
|
257
|
+
'Emma - Newscaster',
|
|
258
|
+
'Eric - Newscaster',
|
|
259
|
+
'Grace - Natural',
|
|
260
|
+
'Hailey - Calm',
|
|
261
|
+
'Indira - Cheerful',
|
|
262
|
+
'Isabella - Cheerful',
|
|
263
|
+
'Jacob - Natural',
|
|
264
|
+
'Jahmai - Friendly',
|
|
265
|
+
'Jane - Serious',
|
|
266
|
+
'Jason - Serious',
|
|
267
|
+
'Jelle - Friendly',
|
|
268
|
+
'Jen - Natural',
|
|
269
|
+
'Jenny - Professional',
|
|
270
|
+
'Jodi - Cheerful',
|
|
271
|
+
'Joey - Calm',
|
|
272
|
+
'Johan - Friendly',
|
|
273
|
+
'Josie - Cheerful',
|
|
274
|
+
'Keanan - Natural',
|
|
275
|
+
'Keith - Cheerful',
|
|
276
|
+
'Kellie - Friendly',
|
|
277
|
+
'Lauren - Friendly',
|
|
278
|
+
'Leah - Natural',
|
|
279
|
+
'Liam - Professional',
|
|
280
|
+
'Libby - Natural',
|
|
281
|
+
'Lily - Professional',
|
|
282
|
+
'Lucas - Natural',
|
|
283
|
+
'Luke - Professional',
|
|
284
|
+
'Luna - Natural',
|
|
285
|
+
'Marieke - Natural',
|
|
286
|
+
'Matthew - Professional',
|
|
287
|
+
'Michelle - Natural',
|
|
288
|
+
'Mitchell - Natural',
|
|
289
|
+
'Molly - Newscaster',
|
|
290
|
+
'Monica - Calm',
|
|
291
|
+
'Natasha - Professional',
|
|
292
|
+
'Neerja - Newscaster',
|
|
293
|
+
'Noah - Serious',
|
|
294
|
+
'Oliver - Newscaster',
|
|
295
|
+
'Olivia - Calm',
|
|
296
|
+
'Paul - Natural',
|
|
297
|
+
'Prabhat - Natural',
|
|
298
|
+
'Raveena - Natural',
|
|
299
|
+
'Rudi - Friendly',
|
|
300
|
+
'Ryan - Professional',
|
|
301
|
+
'Sam - Natural',
|
|
302
|
+
'Sara - Cheerful',
|
|
303
|
+
'Sherry - Friendly',
|
|
304
|
+
'Sonia - Warm',
|
|
305
|
+
'Thomas - Natural',
|
|
306
|
+
'Todd - Professional',
|
|
307
|
+
'Tony - Professional',
|
|
308
|
+
'Tracy - Cheerful',
|
|
309
|
+
'Wayne - Natural',
|
|
310
|
+
'Wilder - Natural',
|
|
311
|
+
'Wille - Natural',
|
|
312
|
+
'William - Friendly'
|
|
321
313
|
]),
|
|
322
|
-
avatarStyle: z.optional(z.enum([
|
|
314
|
+
avatarStyle: z.optional(z.enum(['normal', 'circle'])),
|
|
323
315
|
background: z.optional(z.string()),
|
|
324
|
-
ratio: z.optional(z.enum([
|
|
325
|
-
test: z.optional(z.boolean())
|
|
326
|
-
|
|
316
|
+
ratio: z.optional(z.enum(['16:9', '9:16'])),
|
|
317
|
+
test: z.optional(z.boolean())
|
|
318
|
+
}).strict();
|
|
327
319
|
|
|
328
|
-
export const heyGenTextToAvatarOptionsSchema =
|
|
329
|
-
heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema;
|
|
320
|
+
export const heyGenTextToAvatarOptionsSchema = heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema;
|
|
330
321
|
|
|
331
322
|
/**
|
|
332
323
|
* Generate assets using the third party HeyGen provider AI services.
|
|
@@ -335,39 +326,33 @@ export const heyGenTextToAvatarOptionsSchema =
|
|
|
335
326
|
* <li><a href="#tocs_heygentexttoavataroptions">HeyGenTextToAvatarOptions</a></li>
|
|
336
327
|
* </ul>
|
|
337
328
|
*/
|
|
338
|
-
export const heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema = z
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
})
|
|
342
|
-
.and(heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema);
|
|
329
|
+
export const heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema = z.object({
|
|
330
|
+
type: z.literal('heygenTextToAvatarOptions_HeyGenTextToAvatarOptions')
|
|
331
|
+
}).strict().and(heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema);
|
|
343
332
|
|
|
344
|
-
export const heyGenGeneratedAssetOptionsSchema =
|
|
345
|
-
heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema;
|
|
333
|
+
export const heyGenGeneratedAssetOptionsSchema = heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema;
|
|
346
334
|
|
|
347
335
|
/**
|
|
348
336
|
* Generate assets using HeyGen. HeyGen provide a text-to-avatar service. The HeyGen provider works on a bring-your-own-key basis, credentials are required and must be added via the [dashboard](https://dashboard.shotstack.io/integrations/heygen), not in the request.
|
|
349
337
|
*/
|
|
350
338
|
export const heygenGeneratedAssetHeyGenGeneratedAssetSchema = z.object({
|
|
351
|
-
|
|
352
|
-
|
|
339
|
+
provider: z.enum(['heygen']),
|
|
340
|
+
options: heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema
|
|
353
341
|
}).strict();
|
|
354
342
|
|
|
355
|
-
export const heyGenGeneratedAssetSchema =
|
|
356
|
-
heygenGeneratedAssetHeyGenGeneratedAssetSchema;
|
|
343
|
+
export const heyGenGeneratedAssetSchema = heygenGeneratedAssetHeyGenGeneratedAssetSchema;
|
|
357
344
|
|
|
358
345
|
/**
|
|
359
346
|
* Options for the OpenAI text-generator service. Set a text prompt that will be used to generate a new body of text. The output will be generated as a text (txt) file available at the URL returned in the response.
|
|
360
347
|
*/
|
|
361
|
-
export const openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema =
|
|
362
|
-
|
|
363
|
-
type: z.enum(["text-generator"]),
|
|
348
|
+
export const openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema = z.object({
|
|
349
|
+
type: z.enum(['text-generator']),
|
|
364
350
|
prompt: z.string(),
|
|
365
|
-
model: z.enum([
|
|
366
|
-
systemPrompt: z.optional(z.string())
|
|
367
|
-
|
|
351
|
+
model: z.enum(['gpt-3.5-turbo', 'gpt-4']),
|
|
352
|
+
systemPrompt: z.optional(z.string())
|
|
353
|
+
}).strict();
|
|
368
354
|
|
|
369
|
-
export const openAiTextGeneratorOptionsSchema =
|
|
370
|
-
openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema;
|
|
355
|
+
export const openAiTextGeneratorOptionsSchema = openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema;
|
|
371
356
|
|
|
372
357
|
/**
|
|
373
358
|
* Generate assets using OpenAI provider AI services.
|
|
@@ -376,333 +361,293 @@ export const openAiTextGeneratorOptionsSchema =
|
|
|
376
361
|
* <li><a href="#tocs_openaitextgeneratoroptions">OpenAiTextGeneratorOptions</a></li>
|
|
377
362
|
* </ul>
|
|
378
363
|
*/
|
|
379
|
-
export const openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema = z
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
})
|
|
383
|
-
.and(openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema);
|
|
364
|
+
export const openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema = z.object({
|
|
365
|
+
type: z.literal('openaiTextGeneratorOptions_OpenAiTextGeneratorOptions')
|
|
366
|
+
}).strict().and(openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema);
|
|
384
367
|
|
|
385
|
-
export const openAiGeneratedAssetOptionsSchema =
|
|
386
|
-
openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema;
|
|
368
|
+
export const openAiGeneratedAssetOptionsSchema = openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema;
|
|
387
369
|
|
|
388
370
|
/**
|
|
389
371
|
* Generate assets using OpenAI. OpenAI provide a text generation service using ChatGPT 3.5 and 4. The OpenAI provider works on a bring-your-own-key basis, credentials are required and must be added via the [dashboard](https://dashboard.shotstack.io/integrations/openai), not in the request.
|
|
390
372
|
*/
|
|
391
373
|
export const openaiGeneratedAssetOpenAiGeneratedAssetSchema = z.object({
|
|
392
|
-
|
|
393
|
-
|
|
374
|
+
provider: z.enum(['openai']),
|
|
375
|
+
options: openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema
|
|
394
376
|
}).strict();
|
|
395
377
|
|
|
396
|
-
export const openAiGeneratedAssetSchema =
|
|
397
|
-
openaiGeneratedAssetOpenAiGeneratedAssetSchema;
|
|
378
|
+
export const openAiGeneratedAssetSchema = openaiGeneratedAssetOpenAiGeneratedAssetSchema;
|
|
398
379
|
|
|
399
380
|
/**
|
|
400
381
|
* Individual errors returned by the Create API.
|
|
401
382
|
*/
|
|
402
|
-
export const generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema =
|
|
403
|
-
z.object({
|
|
383
|
+
export const generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema = z.object({
|
|
404
384
|
status: z.string(),
|
|
405
385
|
title: z.string(),
|
|
406
|
-
detail: z.string()
|
|
407
|
-
|
|
386
|
+
detail: z.string()
|
|
387
|
+
}).strict();
|
|
408
388
|
|
|
409
|
-
export const generatedAssetErrorResponseDataSchema =
|
|
410
|
-
generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema;
|
|
389
|
+
export const generatedAssetErrorResponseDataSchema = generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema;
|
|
411
390
|
|
|
412
391
|
/**
|
|
413
392
|
* Error response data for validation and other errors returned by the Create API.
|
|
414
393
|
*/
|
|
415
|
-
export const generatedAssetErrorResponseGeneratedAssetErrorResponseSchema =
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema,
|
|
419
|
-
),
|
|
420
|
-
}).strict();
|
|
394
|
+
export const generatedAssetErrorResponseGeneratedAssetErrorResponseSchema = z.object({
|
|
395
|
+
errors: z.array(generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema)
|
|
396
|
+
}).strict();
|
|
421
397
|
|
|
422
|
-
export const generatedAssetErrorResponseSchema =
|
|
423
|
-
generatedAssetErrorResponseGeneratedAssetErrorResponseSchema;
|
|
398
|
+
export const generatedAssetErrorResponseSchema = generatedAssetErrorResponseGeneratedAssetErrorResponseSchema;
|
|
424
399
|
|
|
425
400
|
/**
|
|
426
401
|
* The id and attributes of the generated asset.
|
|
427
402
|
*/
|
|
428
|
-
export const generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema =
|
|
429
|
-
z.object({
|
|
403
|
+
export const generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema = z.object({
|
|
430
404
|
owner: z.string(),
|
|
431
|
-
provider: z.enum([
|
|
432
|
-
|
|
405
|
+
provider: z.enum([
|
|
406
|
+
'shotstack',
|
|
407
|
+
'elevenlabs',
|
|
408
|
+
'heygen',
|
|
409
|
+
'd-id'
|
|
410
|
+
]),
|
|
411
|
+
type: z.enum(['text-to-speech', 'text-to-avatar']),
|
|
433
412
|
url: z.optional(z.string()),
|
|
434
|
-
status: z.enum([
|
|
413
|
+
status: z.enum([
|
|
414
|
+
'queued',
|
|
415
|
+
'processing',
|
|
416
|
+
'saving',
|
|
417
|
+
'done',
|
|
418
|
+
'failed'
|
|
419
|
+
]),
|
|
435
420
|
created: z.string(),
|
|
436
|
-
updated: z.string()
|
|
437
|
-
|
|
421
|
+
updated: z.string()
|
|
422
|
+
}).strict();
|
|
438
423
|
|
|
439
|
-
export const generatedAssetResponseAttributesSchema =
|
|
440
|
-
generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema;
|
|
424
|
+
export const generatedAssetResponseAttributesSchema = generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema;
|
|
441
425
|
|
|
442
426
|
/**
|
|
443
427
|
* The type of resource (an asset), it's id and attributes of the generated file.
|
|
444
428
|
*/
|
|
445
|
-
export const generatedAssetResponseDataGeneratedAssetResponseDataSchema =
|
|
446
|
-
z.object({
|
|
429
|
+
export const generatedAssetResponseDataGeneratedAssetResponseDataSchema = z.object({
|
|
447
430
|
type: z.string(),
|
|
448
431
|
id: z.string(),
|
|
449
|
-
attributes:
|
|
450
|
-
|
|
451
|
-
}).strict();
|
|
432
|
+
attributes: generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema
|
|
433
|
+
}).strict();
|
|
452
434
|
|
|
453
|
-
export const generatedAssetResponseDataSchema =
|
|
454
|
-
generatedAssetResponseDataGeneratedAssetResponseDataSchema;
|
|
435
|
+
export const generatedAssetResponseDataSchema = generatedAssetResponseDataGeneratedAssetResponseDataSchema;
|
|
455
436
|
|
|
456
437
|
/**
|
|
457
438
|
* The response returned by the Create API [generate asset](#generate-asset) and [get generated asset](#get-generated-asset) requests. Includes status and details of the generated asset. The response follows the [json:api](https://jsonapi.org/) specification.
|
|
458
439
|
*/
|
|
459
440
|
export const generatedAssetResponseGeneratedAssetResponseSchema = z.object({
|
|
460
|
-
|
|
441
|
+
data: generatedAssetResponseDataGeneratedAssetResponseDataSchema
|
|
461
442
|
}).strict();
|
|
462
443
|
|
|
463
|
-
export const generatedAssetResponseSchema =
|
|
464
|
-
generatedAssetResponseGeneratedAssetResponseSchema;
|
|
444
|
+
export const generatedAssetResponseSchema = generatedAssetResponseGeneratedAssetResponseSchema;
|
|
465
445
|
|
|
466
446
|
/**
|
|
467
447
|
* Options for the Shotstack image-to-video service. Set the URL of an image to convert in to a video. The output will be generated as an MP4 file available at the URL returned in the response.
|
|
468
448
|
*/
|
|
469
|
-
export const shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema =
|
|
470
|
-
|
|
471
|
-
type: z.enum(["image-to-video"]),
|
|
449
|
+
export const shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema = z.object({
|
|
450
|
+
type: z.enum(['image-to-video']),
|
|
472
451
|
imageUrl: z.string(),
|
|
473
452
|
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
|
-
|
|
453
|
+
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)
|
|
454
|
+
}).strict();
|
|
476
455
|
|
|
477
|
-
export const shotstackImageToVideoOptionsSchema =
|
|
478
|
-
shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema;
|
|
456
|
+
export const shotstackImageToVideoOptionsSchema = shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema;
|
|
479
457
|
|
|
480
458
|
/**
|
|
481
459
|
* Options for the Shotstack text-generator service. Set a text prompt that will be used to generate a new body of text. The output will be generated as a text (txt) file available at the URL returned in the response.
|
|
482
460
|
*/
|
|
483
|
-
export const shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema =
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
}).strict();
|
|
461
|
+
export const shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema = z.object({
|
|
462
|
+
type: z.enum(['text-generator']),
|
|
463
|
+
prompt: z.string()
|
|
464
|
+
}).strict();
|
|
488
465
|
|
|
489
|
-
export const shotstackTextGeneratorOptionsSchema =
|
|
490
|
-
shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema;
|
|
466
|
+
export const shotstackTextGeneratorOptionsSchema = shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema;
|
|
491
467
|
|
|
492
468
|
/**
|
|
493
469
|
* Options for the Shotstack text-to-image service. Set a text prompt to generate an image from. The output will be generated as a PNG file available at the URL returned in the response.
|
|
494
470
|
*/
|
|
495
|
-
export const shotstackTextToImageOptionsShotstackTextToImageOptionsSchema =
|
|
496
|
-
|
|
497
|
-
type: z.enum(["text-to-image"]),
|
|
471
|
+
export const shotstackTextToImageOptionsShotstackTextToImageOptionsSchema = z.object({
|
|
472
|
+
type: z.enum(['text-to-image']),
|
|
498
473
|
prompt: z.string(),
|
|
499
474
|
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
|
-
|
|
475
|
+
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*\}\}$/)])
|
|
476
|
+
}).strict();
|
|
502
477
|
|
|
503
|
-
export const shotstackTextToImageOptionsSchema =
|
|
504
|
-
shotstackTextToImageOptionsShotstackTextToImageOptionsSchema;
|
|
478
|
+
export const shotstackTextToImageOptionsSchema = shotstackTextToImageOptionsShotstackTextToImageOptionsSchema;
|
|
505
479
|
|
|
506
480
|
/**
|
|
507
481
|
* Options for the Shotstack text-to-speech service. Set the text to be converted to speech and choose a voice to set the speaking style. The output will be generated as an MP3 audio file available at the URL returned in the response.
|
|
508
482
|
*/
|
|
509
|
-
export const shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema =
|
|
510
|
-
|
|
511
|
-
type: z.enum(["text-to-speech"]),
|
|
483
|
+
export const shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema = z.object({
|
|
484
|
+
type: z.enum(['text-to-speech']),
|
|
512
485
|
text: z.string(),
|
|
513
486
|
voice: z.enum([
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
487
|
+
'Hala',
|
|
488
|
+
'Lisa',
|
|
489
|
+
'Arlet',
|
|
490
|
+
'Hiujin',
|
|
491
|
+
'Zhiyu',
|
|
492
|
+
'Sofie',
|
|
493
|
+
'Laura',
|
|
494
|
+
'Olivia',
|
|
495
|
+
'Amy',
|
|
496
|
+
'Emma',
|
|
497
|
+
'Brian',
|
|
498
|
+
'Arthur',
|
|
499
|
+
'Kajal',
|
|
500
|
+
'Niamh',
|
|
501
|
+
'Aria',
|
|
502
|
+
'Ayanda',
|
|
503
|
+
'Ivy',
|
|
504
|
+
'Joanna',
|
|
505
|
+
'Kendra',
|
|
506
|
+
'Kimberly',
|
|
507
|
+
'Salli',
|
|
508
|
+
'Joey',
|
|
509
|
+
'Justin',
|
|
510
|
+
'Kevin',
|
|
511
|
+
'Matthew',
|
|
512
|
+
'Ruth',
|
|
513
|
+
'Stephen',
|
|
514
|
+
'Suvi',
|
|
515
|
+
'Léa',
|
|
516
|
+
'Rémi',
|
|
517
|
+
'Gabrielle',
|
|
518
|
+
'Liam',
|
|
519
|
+
'Vicki',
|
|
520
|
+
'Daniel',
|
|
521
|
+
'Hannah',
|
|
522
|
+
'Kajal',
|
|
523
|
+
'Bianca',
|
|
524
|
+
'Adriano',
|
|
525
|
+
'Takumi',
|
|
526
|
+
'Kazuha',
|
|
527
|
+
'Tomoko',
|
|
528
|
+
'Seoyeon',
|
|
529
|
+
'Ida',
|
|
530
|
+
'Ola',
|
|
531
|
+
'Camila',
|
|
532
|
+
'Vitória',
|
|
533
|
+
'Vitoria',
|
|
534
|
+
'Thiago',
|
|
535
|
+
'Inês',
|
|
536
|
+
'Ines',
|
|
537
|
+
'Lucia',
|
|
538
|
+
'Sergio',
|
|
539
|
+
'Mia',
|
|
540
|
+
'Andrés',
|
|
541
|
+
'Lupe',
|
|
542
|
+
'Pedro',
|
|
543
|
+
'Elin'
|
|
571
544
|
]),
|
|
572
|
-
language: z.optional(
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
export const shotstackTextToSpeechOptionsSchema =
|
|
609
|
-
shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema;
|
|
545
|
+
language: z.optional(z.enum([
|
|
546
|
+
'cmn-CN',
|
|
547
|
+
'da-DK',
|
|
548
|
+
'de-DE',
|
|
549
|
+
'en-AU',
|
|
550
|
+
'en-GB',
|
|
551
|
+
'en-IN',
|
|
552
|
+
'en-US',
|
|
553
|
+
'es-ES',
|
|
554
|
+
'es-MX',
|
|
555
|
+
'es-US',
|
|
556
|
+
'fr-CA',
|
|
557
|
+
'fr-FR',
|
|
558
|
+
'it-IT',
|
|
559
|
+
'ja-JP',
|
|
560
|
+
'hi-IN',
|
|
561
|
+
'ko-KR',
|
|
562
|
+
'nb-NO',
|
|
563
|
+
'nl-NL',
|
|
564
|
+
'pl-PL',
|
|
565
|
+
'pt-BR',
|
|
566
|
+
'pt-PT',
|
|
567
|
+
'sv-SE',
|
|
568
|
+
'en-NZ',
|
|
569
|
+
'en-ZA',
|
|
570
|
+
'ca-ES',
|
|
571
|
+
'de-AT',
|
|
572
|
+
'yue-CN',
|
|
573
|
+
'ar-AE',
|
|
574
|
+
'fi-FI'
|
|
575
|
+
])),
|
|
576
|
+
newscaster: z.optional(z.boolean()).default(false)
|
|
577
|
+
}).strict();
|
|
578
|
+
|
|
579
|
+
export const shotstackTextToSpeechOptionsSchema = shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema;
|
|
610
580
|
|
|
611
581
|
/**
|
|
612
582
|
* Generate assets using the native Shotstack provider AI services.
|
|
613
583
|
*/
|
|
614
|
-
export const shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema =
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
type: z.literal(
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
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),
|
|
644
|
-
]);
|
|
645
|
-
|
|
646
|
-
export const shotstackGeneratedAssetOptionsSchema =
|
|
647
|
-
shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema;
|
|
584
|
+
export const shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema = z.union([
|
|
585
|
+
z.object({
|
|
586
|
+
type: z.literal('shotstackTextToSpeechOptions_ShotstackTextToSpeechOptions')
|
|
587
|
+
}).strict().and(shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema),
|
|
588
|
+
z.object({
|
|
589
|
+
type: z.literal('shotstackTextToImageOptions_ShotstackTextToImageOptions')
|
|
590
|
+
}).strict().and(shotstackTextToImageOptionsShotstackTextToImageOptionsSchema),
|
|
591
|
+
z.object({
|
|
592
|
+
type: z.literal('shotstackTextGeneratorOptions_ShotstackTextGeneratorOptions')
|
|
593
|
+
}).strict().and(shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema),
|
|
594
|
+
z.object({
|
|
595
|
+
type: z.literal('shotstackImageToVideoOptions_ShotstackImageToVideoOptions')
|
|
596
|
+
}).strict().and(shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema)
|
|
597
|
+
]);
|
|
598
|
+
|
|
599
|
+
export const shotstackGeneratedAssetOptionsSchema = shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema;
|
|
648
600
|
|
|
649
601
|
/**
|
|
650
602
|
* Generate assets using the native Shotstack provider. Shotstack provides a text-to-speech and a text-to-image service. The Shotstack provider works natively with your existing API key, no additional credentials are required.
|
|
651
603
|
*/
|
|
652
604
|
export const shotstackGeneratedAssetShotstackGeneratedAssetSchema = z.object({
|
|
653
|
-
|
|
654
|
-
|
|
605
|
+
provider: z.enum(['shotstack']),
|
|
606
|
+
options: shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema
|
|
655
607
|
}).strict();
|
|
656
608
|
|
|
657
|
-
export const shotstackGeneratedAssetSchema =
|
|
658
|
-
shotstackGeneratedAssetShotstackGeneratedAssetSchema;
|
|
609
|
+
export const shotstackGeneratedAssetSchema = shotstackGeneratedAssetShotstackGeneratedAssetSchema;
|
|
659
610
|
|
|
660
611
|
/**
|
|
661
612
|
* Options for the Stability AI text-to-image service. Set a text prompt to generate an image from plus other engine and configuration options. The output will be generated as a JPG file available at the URL returned in the response.
|
|
662
613
|
*/
|
|
663
|
-
export const stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema =
|
|
664
|
-
|
|
665
|
-
type: z.enum(["text-to-image"]),
|
|
614
|
+
export const stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema = z.object({
|
|
615
|
+
type: z.enum(['text-to-image']),
|
|
666
616
|
prompt: z.string(),
|
|
667
|
-
engine: z.optional(
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
]),
|
|
675
|
-
),
|
|
617
|
+
engine: z.optional(z.enum([
|
|
618
|
+
'stable-diffusion-xl-1024-v0-9',
|
|
619
|
+
'stable-diffusion-xl-1024-v1-0',
|
|
620
|
+
'stable-diffusion-v1-6',
|
|
621
|
+
'stable-diffusion-512-v2-1',
|
|
622
|
+
'stable-diffusion-xl-beta-v2-2-2'
|
|
623
|
+
])),
|
|
676
624
|
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
625
|
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
626
|
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
627
|
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
628
|
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),
|
|
681
|
-
stylePreset: z.optional(
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
export const stabilityAiTextToImageOptionsSchema =
|
|
705
|
-
stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema;
|
|
629
|
+
stylePreset: z.optional(z.enum([
|
|
630
|
+
'3d-model',
|
|
631
|
+
'analog-film',
|
|
632
|
+
'anime',
|
|
633
|
+
'cinematic',
|
|
634
|
+
'comic-book',
|
|
635
|
+
'digital-art',
|
|
636
|
+
'enhance',
|
|
637
|
+
'fantasy-art',
|
|
638
|
+
'isometric',
|
|
639
|
+
'line-art',
|
|
640
|
+
'low-poly',
|
|
641
|
+
'modeling-compound',
|
|
642
|
+
'neon-punk',
|
|
643
|
+
'origami',
|
|
644
|
+
'photographic',
|
|
645
|
+
'pixel-art',
|
|
646
|
+
'tile-texture'
|
|
647
|
+
]))
|
|
648
|
+
}).strict();
|
|
649
|
+
|
|
650
|
+
export const stabilityAiTextToImageOptionsSchema = stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema;
|
|
706
651
|
|
|
707
652
|
/**
|
|
708
653
|
* Generate assets using Stability AI provider AI services.
|
|
@@ -711,67 +656,44 @@ export const stabilityAiTextToImageOptionsSchema =
|
|
|
711
656
|
* <li><a href="#tocs_stabilityaitexttoimageoptions">StabilityAiTextToImageOptions</a></li>
|
|
712
657
|
* </ul>
|
|
713
658
|
*/
|
|
714
|
-
export const stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema =
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
type: z.literal(
|
|
718
|
-
"stabilityAiTextToImageOptions_StabilityAiTextToImageOptions",
|
|
719
|
-
),
|
|
720
|
-
})
|
|
721
|
-
.and(stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema);
|
|
659
|
+
export const stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema = z.object({
|
|
660
|
+
type: z.literal('stabilityAiTextToImageOptions_StabilityAiTextToImageOptions')
|
|
661
|
+
}).strict().and(stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema);
|
|
722
662
|
|
|
723
|
-
export const stabilityAiGeneratedAssetOptionsSchema =
|
|
724
|
-
stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema;
|
|
663
|
+
export const stabilityAiGeneratedAssetOptionsSchema = stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema;
|
|
725
664
|
|
|
726
665
|
/**
|
|
727
666
|
* Generate assets using Stability AI. Stability AI provide a text-to-image service using Stable Diffusion. The Stability AI provider works on a bring-your-own-key basis, credentials are required and must be added via the [dashboard](https://dashboard.shotstack.io/integrations/stability-ai), not in the request.
|
|
728
667
|
*/
|
|
729
|
-
export const stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema =
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema,
|
|
734
|
-
}).strict();
|
|
668
|
+
export const stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema = z.object({
|
|
669
|
+
provider: z.enum(['stability-ai']),
|
|
670
|
+
options: stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema
|
|
671
|
+
}).strict();
|
|
735
672
|
|
|
736
|
-
export const stabilityAiGeneratedAssetSchema =
|
|
737
|
-
stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema;
|
|
673
|
+
export const stabilityAiGeneratedAssetSchema = stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema;
|
|
738
674
|
|
|
739
675
|
/**
|
|
740
676
|
* 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.
|
|
741
677
|
*/
|
|
742
678
|
export const generatedAssetGeneratedAssetSchema = z.union([
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
.object({
|
|
750
|
-
|
|
751
|
-
})
|
|
752
|
-
.
|
|
753
|
-
|
|
754
|
-
.
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
.and(
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
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),
|
|
679
|
+
z.object({
|
|
680
|
+
provider: z.literal('shotstackGeneratedAsset_ShotstackGeneratedAsset')
|
|
681
|
+
}).strict().and(shotstackGeneratedAssetShotstackGeneratedAssetSchema),
|
|
682
|
+
z.object({
|
|
683
|
+
provider: z.literal('didGeneratedAsset_DIDGeneratedAsset')
|
|
684
|
+
}).strict().and(didGeneratedAssetDidGeneratedAssetSchema),
|
|
685
|
+
z.object({
|
|
686
|
+
provider: z.literal('elevenlabsGeneratedAsset_ElevenLabsGeneratedAsset')
|
|
687
|
+
}).strict().and(elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema),
|
|
688
|
+
z.object({
|
|
689
|
+
provider: z.literal('heygenGeneratedAsset_HeyGenGeneratedAsset')
|
|
690
|
+
}).strict().and(heygenGeneratedAssetHeyGenGeneratedAssetSchema),
|
|
691
|
+
z.object({
|
|
692
|
+
provider: z.literal('openaiGeneratedAsset_OpenAiGeneratedAsset')
|
|
693
|
+
}).strict().and(openaiGeneratedAssetOpenAiGeneratedAssetSchema),
|
|
694
|
+
z.object({
|
|
695
|
+
provider: z.literal('stabilityAiGeneratedAsset_StabilityAiGeneratedAsset')
|
|
696
|
+
}).strict().and(stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema)
|
|
775
697
|
]);
|
|
776
698
|
|
|
777
699
|
export const generatedAssetSchema = generatedAssetGeneratedAssetSchema;
|
|
@@ -780,10 +702,10 @@ export const generatedAssetSchema = generatedAssetGeneratedAssetSchema;
|
|
|
780
702
|
* 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.
|
|
781
703
|
*/
|
|
782
704
|
export const cropCropSchema = z.object({
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
705
|
+
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*\}\}$/)])),
|
|
706
|
+
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*\}\}$/)])),
|
|
707
|
+
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*\}\}$/)])),
|
|
708
|
+
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
709
|
}).strict();
|
|
788
710
|
|
|
789
711
|
export const cropSchema = cropCropSchema;
|
|
@@ -791,70 +713,60 @@ export const cropSchema = cropCropSchema;
|
|
|
791
713
|
/**
|
|
792
714
|
* Pass additional options to control how files are stored in Google Cloud Storage.
|
|
793
715
|
*/
|
|
794
|
-
export const googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOptionsSchema =
|
|
795
|
-
z.object({
|
|
716
|
+
export const googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOptionsSchema = z.object({
|
|
796
717
|
bucket: z.string(),
|
|
797
718
|
prefix: z.optional(z.string()),
|
|
798
|
-
filename: z.optional(z.string())
|
|
799
|
-
|
|
719
|
+
filename: z.optional(z.string())
|
|
720
|
+
}).strict();
|
|
800
721
|
|
|
801
|
-
export const googleCloudStorageDestinationOptionsSchema =
|
|
802
|
-
googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOptionsSchema;
|
|
722
|
+
export const googleCloudStorageDestinationOptionsSchema = googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOptionsSchema;
|
|
803
723
|
|
|
804
724
|
/**
|
|
805
725
|
* Send videos and assets to a [Google Cloud Storage](https://cloud.google.com/storage) bucket. Send files with your own prefix and filename. Google Cloud credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/google-cloud-storage), not in the request.
|
|
806
726
|
*/
|
|
807
|
-
export const googleCloudStorageDestinationGoogleCloudStorageDestinationSchema =
|
|
808
|
-
z.object({
|
|
727
|
+
export const googleCloudStorageDestinationGoogleCloudStorageDestinationSchema = z.object({
|
|
809
728
|
provider: z.literal("google-cloud-storage"),
|
|
810
|
-
options: z.optional(
|
|
811
|
-
|
|
812
|
-
),
|
|
813
|
-
}).strict();
|
|
729
|
+
options: z.optional(googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOptionsSchema)
|
|
730
|
+
}).strict();
|
|
814
731
|
|
|
815
|
-
export const googleCloudStorageDestinationSchema =
|
|
816
|
-
googleCloudStorageDestinationGoogleCloudStorageDestinationSchema;
|
|
732
|
+
export const googleCloudStorageDestinationSchema = googleCloudStorageDestinationGoogleCloudStorageDestinationSchema;
|
|
817
733
|
|
|
818
734
|
/**
|
|
819
735
|
* Pass the folder ID and options to configure how assets are stored in Google Drive.
|
|
820
736
|
*/
|
|
821
|
-
export const googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema =
|
|
822
|
-
z.object({
|
|
737
|
+
export const googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema = z.object({
|
|
823
738
|
folderId: z.string(),
|
|
824
|
-
filename: z.optional(z.string())
|
|
825
|
-
|
|
739
|
+
filename: z.optional(z.string())
|
|
740
|
+
}).strict();
|
|
826
741
|
|
|
827
|
-
export const googleDriveDestinationOptionsSchema =
|
|
828
|
-
googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema;
|
|
742
|
+
export const googleDriveDestinationOptionsSchema = googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema;
|
|
829
743
|
|
|
830
744
|
/**
|
|
831
745
|
* Send rendered videos and assets to the [Google Drive](https://shotstack.io/docs/guide/serving-assets/destinations/google-drive/) cloud storage service. Google Drive uses OAuth and you must authenticate and link your Google account via [dashboard](https://dashboard.shotstack.io/integrations/google-drive), not in the request.
|
|
832
746
|
*/
|
|
833
747
|
export const googleDriveDestinationGoogleDriveDestinationSchema = z.object({
|
|
834
|
-
|
|
835
|
-
|
|
748
|
+
provider: z.literal("google-drive"),
|
|
749
|
+
options: googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema
|
|
836
750
|
}).strict();
|
|
837
751
|
|
|
838
|
-
export const googleDriveDestinationSchema =
|
|
839
|
-
googleDriveDestinationGoogleDriveDestinationSchema;
|
|
752
|
+
export const googleDriveDestinationSchema = googleDriveDestinationGoogleDriveDestinationSchema;
|
|
840
753
|
|
|
841
754
|
/**
|
|
842
755
|
* Pass additional options to control how Mux processes video. Currently supports playback_policy and passthrough options.
|
|
843
756
|
*/
|
|
844
757
|
export const muxDestinationOptionsMuxDestinationOptionsSchema = z.object({
|
|
845
|
-
|
|
846
|
-
|
|
758
|
+
playbackPolicy: z.optional(z.array(z.enum(['public', 'signed']))),
|
|
759
|
+
passthrough: z.optional(z.string().max(255))
|
|
847
760
|
}).strict();
|
|
848
761
|
|
|
849
|
-
export const muxDestinationOptionsSchema =
|
|
850
|
-
muxDestinationOptionsMuxDestinationOptionsSchema;
|
|
762
|
+
export const muxDestinationOptionsSchema = muxDestinationOptionsMuxDestinationOptionsSchema;
|
|
851
763
|
|
|
852
764
|
/**
|
|
853
765
|
* Send videos to the [Mux](https://shotstack.io/docs/guide/serving-assets/destinations/mux/) video hosting and streaming service. Mux credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/mux), not in the request.
|
|
854
766
|
*/
|
|
855
767
|
export const muxDestinationMuxDestinationSchema = z.object({
|
|
856
|
-
|
|
857
|
-
|
|
768
|
+
provider: z.literal("mux"),
|
|
769
|
+
options: z.optional(muxDestinationOptionsMuxDestinationOptionsSchema)
|
|
858
770
|
}).strict();
|
|
859
771
|
|
|
860
772
|
export const muxDestinationSchema = muxDestinationMuxDestinationSchema;
|
|
@@ -863,22 +775,21 @@ export const muxDestinationSchema = muxDestinationMuxDestinationSchema;
|
|
|
863
775
|
* Pass additional options to control how files are stored in S3.
|
|
864
776
|
*/
|
|
865
777
|
export const s3DestinationOptionsS3DestinationOptionsSchema = z.object({
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
778
|
+
region: z.string(),
|
|
779
|
+
bucket: z.string(),
|
|
780
|
+
prefix: z.optional(z.string()),
|
|
781
|
+
filename: z.optional(z.string()),
|
|
782
|
+
acl: z.optional(z.string())
|
|
871
783
|
}).strict();
|
|
872
784
|
|
|
873
|
-
export const s3DestinationOptionsSchema =
|
|
874
|
-
s3DestinationOptionsS3DestinationOptionsSchema;
|
|
785
|
+
export const s3DestinationOptionsSchema = s3DestinationOptionsS3DestinationOptionsSchema;
|
|
875
786
|
|
|
876
787
|
/**
|
|
877
788
|
* Send videos and assets to an [Amazon S3](https://shotstack.io/docs/guide/serving-assets/destinations/s3/) bucket. Send files to any region with your own prefix and filename. AWS credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/s3), not in the request.
|
|
878
789
|
*/
|
|
879
790
|
export const s3DestinationS3DestinationSchema = z.object({
|
|
880
|
-
|
|
881
|
-
|
|
791
|
+
provider: z.literal("s3"),
|
|
792
|
+
options: z.optional(s3DestinationOptionsS3DestinationOptionsSchema)
|
|
882
793
|
}).strict();
|
|
883
794
|
|
|
884
795
|
export const s3DestinationSchema = s3DestinationS3DestinationSchema;
|
|
@@ -887,70 +798,80 @@ export const s3DestinationSchema = s3DestinationS3DestinationSchema;
|
|
|
887
798
|
* Send videos and assets to the [Shotstack hosting and CDN](https://shotstack.io/docs/guide/serving-assets/destinations/shotstack/) service. This destination is enabled by default.
|
|
888
799
|
*/
|
|
889
800
|
export const shotstackDestinationShotstackDestinationSchema = z.object({
|
|
890
|
-
|
|
891
|
-
|
|
801
|
+
provider: z.literal("shotstack"),
|
|
802
|
+
exclude: z.optional(z.boolean())
|
|
892
803
|
}).strict();
|
|
893
804
|
|
|
894
|
-
export const shotstackDestinationSchema =
|
|
895
|
-
shotstackDestinationShotstackDestinationSchema;
|
|
805
|
+
export const shotstackDestinationSchema = shotstackDestinationShotstackDestinationSchema;
|
|
896
806
|
|
|
897
807
|
/**
|
|
898
808
|
* Pass additional options to control how TikTok publishes video.
|
|
899
809
|
*/
|
|
900
810
|
export const tiktokDestinationOptionsTiktokDestinationOptionsSchema = z.object({
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
811
|
+
title: z.optional(z.string().max(150)),
|
|
812
|
+
privacyLevel: z.optional(z.enum([
|
|
813
|
+
'public',
|
|
814
|
+
'friends',
|
|
815
|
+
'private'
|
|
816
|
+
])),
|
|
817
|
+
disableDuet: z.optional(z.boolean()).default(false),
|
|
818
|
+
disableStitch: z.optional(z.boolean()).default(false),
|
|
819
|
+
disableComment: z.optional(z.boolean()).default(false)
|
|
906
820
|
}).strict();
|
|
907
821
|
|
|
908
822
|
/**
|
|
909
823
|
* Send videos to TikTok. TikTok credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/tiktok), not in the request.
|
|
910
824
|
*/
|
|
911
825
|
export const tiktokDestinationTiktokDestinationSchema = z.object({
|
|
912
|
-
|
|
913
|
-
|
|
826
|
+
provider: z.literal("tiktok"),
|
|
827
|
+
options: z.optional(tiktokDestinationOptionsTiktokDestinationOptionsSchema)
|
|
914
828
|
}).strict();
|
|
915
829
|
|
|
916
830
|
/**
|
|
917
831
|
* Options to control the visibility of videos and privacy features.
|
|
918
832
|
*/
|
|
919
|
-
export const vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema =
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
833
|
+
export const vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema = z.object({
|
|
834
|
+
view: z.optional(z.enum([
|
|
835
|
+
'anybody',
|
|
836
|
+
'nobody',
|
|
837
|
+
'contacts',
|
|
838
|
+
'password',
|
|
839
|
+
'unlisted'
|
|
840
|
+
])),
|
|
841
|
+
embed: z.optional(z.enum([
|
|
842
|
+
'public',
|
|
843
|
+
'private',
|
|
844
|
+
'whitelist'
|
|
845
|
+
])),
|
|
846
|
+
comments: z.optional(z.enum([
|
|
847
|
+
'anybody',
|
|
848
|
+
'nobody',
|
|
849
|
+
'contacts'
|
|
850
|
+
])),
|
|
926
851
|
download: z.optional(z.boolean()),
|
|
927
|
-
add: z.optional(z.boolean())
|
|
928
|
-
|
|
852
|
+
add: z.optional(z.boolean())
|
|
853
|
+
}).strict();
|
|
929
854
|
|
|
930
|
-
export const vimeoDestinationPrivacyOptionsSchema =
|
|
931
|
-
vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema;
|
|
855
|
+
export const vimeoDestinationPrivacyOptionsSchema = vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema;
|
|
932
856
|
|
|
933
857
|
/**
|
|
934
858
|
* Pass additional options to control how Vimeo publishes video, including name, description and privacy settings.
|
|
935
859
|
*/
|
|
936
860
|
export const vimeoDestinationOptionsVimeoDestinationOptionsSchema = z.object({
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
),
|
|
942
|
-
folderUri: z.optional(z.string()),
|
|
861
|
+
name: z.optional(z.string()),
|
|
862
|
+
description: z.optional(z.string()),
|
|
863
|
+
privacy: z.optional(vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema),
|
|
864
|
+
folderUri: z.optional(z.string())
|
|
943
865
|
}).strict();
|
|
944
866
|
|
|
945
|
-
export const vimeoDestinationOptionsSchema =
|
|
946
|
-
vimeoDestinationOptionsVimeoDestinationOptionsSchema;
|
|
867
|
+
export const vimeoDestinationOptionsSchema = vimeoDestinationOptionsVimeoDestinationOptionsSchema;
|
|
947
868
|
|
|
948
869
|
/**
|
|
949
870
|
* Send videos to [Vimeo](https://shotstack.io/docs/guide/serving-assets/destinations/vimeo/) video hosting and streaming service. Vimeo credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/vimeo), not in the request.
|
|
950
871
|
*/
|
|
951
872
|
export const vimeoDestinationVimeoDestinationSchema = z.object({
|
|
952
|
-
|
|
953
|
-
|
|
873
|
+
provider: z.literal("vimeo"),
|
|
874
|
+
options: z.optional(vimeoDestinationOptionsVimeoDestinationOptionsSchema)
|
|
954
875
|
}).strict();
|
|
955
876
|
|
|
956
877
|
export const vimeoDestinationSchema = vimeoDestinationVimeoDestinationSchema;
|
|
@@ -976,18 +897,17 @@ export const destinationsSchema = destinationsDestinationsSchema;
|
|
|
976
897
|
* Flip a clip vertically or horizontally. Acts as a mirror effect of the clip along the selected plane.
|
|
977
898
|
*/
|
|
978
899
|
export const fliptransformationFlipTransformationSchema = z.object({
|
|
979
|
-
|
|
980
|
-
|
|
900
|
+
horizontal: z.optional(z.boolean()),
|
|
901
|
+
vertical: z.optional(z.boolean())
|
|
981
902
|
}).strict();
|
|
982
903
|
|
|
983
|
-
export const flipTransformationSchema =
|
|
984
|
-
fliptransformationFlipTransformationSchema;
|
|
904
|
+
export const flipTransformationSchema = fliptransformationFlipTransformationSchema;
|
|
985
905
|
|
|
986
906
|
/**
|
|
987
907
|
* Download a custom font to use with the HTML asset type, using the font name in the CSS or font tag. See our [custom fonts](https://shotstack.io/learn/html-custom-fonts/) getting started guide for more details.
|
|
988
908
|
*/
|
|
989
909
|
export const fontFontSchema = z.object({
|
|
990
|
-
|
|
910
|
+
src: z.string()
|
|
991
911
|
}).strict();
|
|
992
912
|
|
|
993
913
|
export const fontSchema = fontFontSchema;
|
|
@@ -1003,25 +923,23 @@ export const fontSchema = fontFontSchema;
|
|
|
1003
923
|
* @deprecated
|
|
1004
924
|
*/
|
|
1005
925
|
export const htmlassetHtmlAssetSchema = z.object({
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
]),
|
|
1024
|
-
),
|
|
926
|
+
type: z.enum(['html']),
|
|
927
|
+
html: z.string(),
|
|
928
|
+
css: z.optional(z.string()),
|
|
929
|
+
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*\}\}$/)])),
|
|
930
|
+
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*\}\}$/)])),
|
|
931
|
+
background: z.optional(z.string()),
|
|
932
|
+
position: z.optional(z.enum([
|
|
933
|
+
'top',
|
|
934
|
+
'topRight',
|
|
935
|
+
'right',
|
|
936
|
+
'bottomRight',
|
|
937
|
+
'bottom',
|
|
938
|
+
'bottomLeft',
|
|
939
|
+
'left',
|
|
940
|
+
'topLeft',
|
|
941
|
+
'center'
|
|
942
|
+
]))
|
|
1025
943
|
}).strict();
|
|
1026
944
|
|
|
1027
945
|
export const htmlAssetSchema = htmlassetHtmlAssetSchema;
|
|
@@ -1030,9 +948,9 @@ export const htmlAssetSchema = htmlassetHtmlAssetSchema;
|
|
|
1030
948
|
* The ImageAsset is used to create video from images to compose an image. The src must be a publicly accessible URL to an image resource such as a jpg or png file.
|
|
1031
949
|
*/
|
|
1032
950
|
export const imageassetImageAssetSchema = z.object({
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
951
|
+
type: z.enum(['image']),
|
|
952
|
+
src: z.string().min(1).regex(/\S/),
|
|
953
|
+
crop: z.optional(cropCropSchema)
|
|
1036
954
|
}).strict();
|
|
1037
955
|
|
|
1038
956
|
export const imageAssetSchema = imageassetImageAssetSchema;
|
|
@@ -1041,14 +959,20 @@ export const imageAssetSchema = imageassetImageAssetSchema;
|
|
|
1041
959
|
* The ImageToVideoAsset lets you create a video from an image and a text prompt.
|
|
1042
960
|
*/
|
|
1043
961
|
export const imagetovideoassetImageToVideoAssetSchema = z.object({
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
962
|
+
type: z.enum(['image-to-video']),
|
|
963
|
+
src: z.string().min(1),
|
|
964
|
+
prompt: z.optional(z.string()),
|
|
965
|
+
aspectRatio: z.optional(z.enum([
|
|
966
|
+
'1:1',
|
|
967
|
+
'4:3',
|
|
968
|
+
'16:9',
|
|
969
|
+
'9:16',
|
|
970
|
+
'3:4',
|
|
971
|
+
'21:9',
|
|
972
|
+
'9:21'
|
|
973
|
+
])),
|
|
974
|
+
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*\}\}$/)])),
|
|
975
|
+
crop: z.optional(cropCropSchema)
|
|
1052
976
|
}).strict();
|
|
1053
977
|
|
|
1054
978
|
export const imageToVideoAssetSchema = imagetovideoassetImageToVideoAssetSchema;
|
|
@@ -1057,28 +981,27 @@ export const imageToVideoAssetSchema = imagetovideoassetImageToVideoAssetSchema;
|
|
|
1057
981
|
* Options for the Dolby.io audio enhancement provider.
|
|
1058
982
|
*/
|
|
1059
983
|
export const dolbyEnhancementOptionsDolbyEnhancementOptionsSchema = z.object({
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
984
|
+
preset: z.enum([
|
|
985
|
+
'conference',
|
|
986
|
+
'interview',
|
|
987
|
+
'lecture',
|
|
988
|
+
'meeting',
|
|
989
|
+
'mobile_phone',
|
|
990
|
+
'music',
|
|
991
|
+
'podcast',
|
|
992
|
+
'studio',
|
|
993
|
+
'voice_over'
|
|
994
|
+
])
|
|
1071
995
|
}).strict();
|
|
1072
996
|
|
|
1073
|
-
export const dolbyEnhancementOptionsSchema =
|
|
1074
|
-
dolbyEnhancementOptionsDolbyEnhancementOptionsSchema;
|
|
997
|
+
export const dolbyEnhancementOptionsSchema = dolbyEnhancementOptionsDolbyEnhancementOptionsSchema;
|
|
1075
998
|
|
|
1076
999
|
/**
|
|
1077
1000
|
* Dolby.io audio enhancement provider. Credentials are required and must be added via the [dashboard](https://dashboard.shotstack.io/integrations/dolby), not in the request.
|
|
1078
1001
|
*/
|
|
1079
1002
|
export const dolbyEnhancementDolbyEnhancementSchema = z.object({
|
|
1080
|
-
|
|
1081
|
-
|
|
1003
|
+
provider: z.string().default('dolby'),
|
|
1004
|
+
options: dolbyEnhancementOptionsDolbyEnhancementOptionsSchema
|
|
1082
1005
|
}).strict();
|
|
1083
1006
|
|
|
1084
1007
|
export const dolbyEnhancementSchema = dolbyEnhancementDolbyEnhancementSchema;
|
|
@@ -1089,11 +1012,9 @@ export const dolbyEnhancementSchema = dolbyEnhancementDolbyEnhancementSchema;
|
|
|
1089
1012
|
* <li><a href="#tocs_dolbyenhancement">DolbyEnhancement</a></li>
|
|
1090
1013
|
* </ul>
|
|
1091
1014
|
*/
|
|
1092
|
-
export const audioEnhancementAudioEnhancementSchema = z
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
})
|
|
1096
|
-
.and(dolbyEnhancementDolbyEnhancementSchema);
|
|
1015
|
+
export const audioEnhancementAudioEnhancementSchema = z.object({
|
|
1016
|
+
enhancement: z.literal('dolbyEnhancement_DolbyEnhancement')
|
|
1017
|
+
}).strict().and(dolbyEnhancementDolbyEnhancementSchema);
|
|
1097
1018
|
|
|
1098
1019
|
export const audioEnhancementSchema = audioEnhancementAudioEnhancementSchema;
|
|
1099
1020
|
|
|
@@ -1101,7 +1022,7 @@ export const audioEnhancementSchema = audioEnhancementAudioEnhancementSchema;
|
|
|
1101
1022
|
* Enhancements that can be applied to a rendition. Currently only supports the Dolby audio enhancement.
|
|
1102
1023
|
*/
|
|
1103
1024
|
export const enhancementsEnhancementsSchema = z.object({
|
|
1104
|
-
|
|
1025
|
+
audio: z.optional(audioEnhancementAudioEnhancementSchema)
|
|
1105
1026
|
}).strict();
|
|
1106
1027
|
|
|
1107
1028
|
export const enhancementsSchema = enhancementsEnhancementsSchema;
|
|
@@ -1110,74 +1031,68 @@ export const enhancementsSchema = enhancementsEnhancementsSchema;
|
|
|
1110
1031
|
* Individual errors returned by the Ingest API.
|
|
1111
1032
|
*/
|
|
1112
1033
|
export const ingesterrorresponsedataIngestErrorResponseDataSchema = z.object({
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1034
|
+
status: z.string(),
|
|
1035
|
+
title: z.string(),
|
|
1036
|
+
detail: z.string()
|
|
1116
1037
|
}).strict();
|
|
1117
1038
|
|
|
1118
|
-
export const ingestErrorResponseDataSchema =
|
|
1119
|
-
ingesterrorresponsedataIngestErrorResponseDataSchema;
|
|
1039
|
+
export const ingestErrorResponseDataSchema = ingesterrorresponsedataIngestErrorResponseDataSchema;
|
|
1120
1040
|
|
|
1121
1041
|
/**
|
|
1122
1042
|
* Error response data for validation and other errors returned by the Ingest API.
|
|
1123
1043
|
*/
|
|
1124
1044
|
export const ingesterrorresponseIngestErrorResponseSchema = z.object({
|
|
1125
|
-
|
|
1045
|
+
errors: z.array(ingesterrorresponsedataIngestErrorResponseDataSchema)
|
|
1126
1046
|
}).strict();
|
|
1127
1047
|
|
|
1128
|
-
export const ingestErrorResponseSchema =
|
|
1129
|
-
ingesterrorresponseIngestErrorResponseSchema;
|
|
1048
|
+
export const ingestErrorResponseSchema = ingesterrorresponseIngestErrorResponseSchema;
|
|
1130
1049
|
|
|
1131
1050
|
/**
|
|
1132
1051
|
* The type of resource (a source) and the newly created source id. Returned with [QueuedSourceResponse](#tocs_queuedsourceresponse).
|
|
1133
1052
|
*/
|
|
1134
1053
|
export const queuedsourceresponsedataQueuedSourceResponseDataSchema = z.object({
|
|
1135
|
-
|
|
1136
|
-
|
|
1054
|
+
type: z.string(),
|
|
1055
|
+
id: z.string()
|
|
1137
1056
|
}).strict();
|
|
1138
1057
|
|
|
1139
|
-
export const queuedSourceResponseDataSchema =
|
|
1140
|
-
queuedsourceresponsedataQueuedSourceResponseDataSchema;
|
|
1058
|
+
export const queuedSourceResponseDataSchema = queuedsourceresponsedataQueuedSourceResponseDataSchema;
|
|
1141
1059
|
|
|
1142
1060
|
/**
|
|
1143
1061
|
* The response returned by the Ingest API [fetch source](#fetch-source) request. Includes the id of the source file. The response follows the [json:api](https://jsonapi.org/) specification.
|
|
1144
1062
|
*/
|
|
1145
1063
|
export const queuedsourceresponseQueuedSourceResponseSchema = z.object({
|
|
1146
|
-
|
|
1064
|
+
data: queuedsourceresponsedataQueuedSourceResponseDataSchema
|
|
1147
1065
|
}).strict();
|
|
1148
1066
|
|
|
1149
|
-
export const queuedSourceResponseSchema =
|
|
1150
|
-
queuedsourceresponseQueuedSourceResponseSchema;
|
|
1067
|
+
export const queuedSourceResponseSchema = queuedsourceresponseQueuedSourceResponseSchema;
|
|
1151
1068
|
|
|
1152
1069
|
/**
|
|
1153
1070
|
* The id and attributes of the upload file including the signed URL to send the binary file data to.
|
|
1154
1071
|
*/
|
|
1155
1072
|
export const uploadresponseattributesUploadResponseAttributesSchema = z.object({
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1073
|
+
id: z.string(),
|
|
1074
|
+
url: z.string(),
|
|
1075
|
+
expires: z.string()
|
|
1159
1076
|
}).strict();
|
|
1160
1077
|
|
|
1161
|
-
export const uploadResponseAttributesSchema =
|
|
1162
|
-
uploadresponseattributesUploadResponseAttributesSchema;
|
|
1078
|
+
export const uploadResponseAttributesSchema = uploadresponseattributesUploadResponseAttributesSchema;
|
|
1163
1079
|
|
|
1164
1080
|
/**
|
|
1165
1081
|
* The type of resource (an upload), it's id and attributes of the upload request.
|
|
1166
1082
|
*/
|
|
1167
1083
|
export const uploadresponsedataUploadResponseDataSchema = z.object({
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1084
|
+
type: z.string(),
|
|
1085
|
+
id: z.string(),
|
|
1086
|
+
attributes: uploadresponseattributesUploadResponseAttributesSchema
|
|
1171
1087
|
}).strict();
|
|
1172
1088
|
|
|
1173
|
-
export const uploadResponseDataSchema =
|
|
1174
|
-
uploadresponsedataUploadResponseDataSchema;
|
|
1089
|
+
export const uploadResponseDataSchema = uploadresponsedataUploadResponseDataSchema;
|
|
1175
1090
|
|
|
1176
1091
|
/**
|
|
1177
1092
|
* The response returned by the Ingest API [direct upload](#direct-upload) request. Includes the id of the file and the signed url to send the binary file to. The response follows the [json:api](https://jsonapi.org/) specification.
|
|
1178
1093
|
*/
|
|
1179
1094
|
export const uploadresponseUploadResponseSchema = z.object({
|
|
1180
|
-
|
|
1095
|
+
data: uploadresponsedataUploadResponseDataSchema
|
|
1181
1096
|
}).strict();
|
|
1182
1097
|
|
|
1183
1098
|
export const uploadResponseSchema = uploadresponseUploadResponseSchema;
|
|
@@ -1186,8 +1101,8 @@ export const uploadResponseSchema = uploadresponseUploadResponseSchema;
|
|
|
1186
1101
|
* 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.
|
|
1187
1102
|
*/
|
|
1188
1103
|
export const speedSpeedSchema = z.object({
|
|
1189
|
-
|
|
1190
|
-
|
|
1104
|
+
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*\}\}$/)])),
|
|
1105
|
+
preservePitch: z.optional(z.boolean())
|
|
1191
1106
|
}).strict();
|
|
1192
1107
|
|
|
1193
1108
|
export const speedSchema = speedSpeedSchema;
|
|
@@ -1196,7 +1111,7 @@ export const speedSchema = speedSpeedSchema;
|
|
|
1196
1111
|
* Generate a transcription of the audio in the video. The transcription can be output as a file in SRT or VTT format.
|
|
1197
1112
|
*/
|
|
1198
1113
|
export const transcriptionTranscriptionSchema = z.object({
|
|
1199
|
-
|
|
1114
|
+
format: z.optional(z.enum(['srt', 'vtt']))
|
|
1200
1115
|
}).strict();
|
|
1201
1116
|
|
|
1202
1117
|
export const transcriptionSchema = transcriptionTranscriptionSchema;
|
|
@@ -1205,9 +1120,9 @@ export const transcriptionSchema = transcriptionTranscriptionSchema;
|
|
|
1205
1120
|
* The LumaAsset is used to create luma matte masks, transitions and effects between other assets. A luma matte is a grey scale image or animated video where the black areas are transparent and the white areas solid. The luma matte animation should be provided as an mp4 video file. The src must be a publicly accessible URL to the file.
|
|
1206
1121
|
*/
|
|
1207
1122
|
export const lumaassetLumaAssetSchema = z.object({
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1123
|
+
type: z.enum(['luma']),
|
|
1124
|
+
src: z.string().min(1).regex(/\S/),
|
|
1125
|
+
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
1126
|
}).strict();
|
|
1212
1127
|
|
|
1213
1128
|
export const lumaAssetSchema = lumaassetLumaAssetSchema;
|
|
@@ -1216,8 +1131,8 @@ export const lumaAssetSchema = lumaassetLumaAssetSchema;
|
|
|
1216
1131
|
* A merge field consists of a key; `find`, and a value; `replace`. Merge fields can be used to replace placeholders within the JSON edit to create re-usable templates. Placeholders should be a string with double brace delimiters, i.e. `"{{NAME}}"`. A placeholder can be used for any value within the JSON edit.
|
|
1217
1132
|
*/
|
|
1218
1133
|
export const mergefieldMergeFieldSchema = z.object({
|
|
1219
|
-
|
|
1220
|
-
|
|
1134
|
+
find: z.string(),
|
|
1135
|
+
replace: z.unknown()
|
|
1221
1136
|
}).strict();
|
|
1222
1137
|
|
|
1223
1138
|
export const mergeFieldSchema = mergefieldMergeFieldSchema;
|
|
@@ -1226,7 +1141,7 @@ export const mergeFieldSchema = mergefieldMergeFieldSchema;
|
|
|
1226
1141
|
* 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.
|
|
1227
1142
|
*/
|
|
1228
1143
|
export const posterPosterSchema = z.object({
|
|
1229
|
-
|
|
1144
|
+
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
1145
|
}).strict();
|
|
1231
1146
|
|
|
1232
1147
|
export const posterSchema = posterPosterSchema;
|
|
@@ -1235,8 +1150,8 @@ export const posterSchema = posterPosterSchema;
|
|
|
1235
1150
|
* 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.
|
|
1236
1151
|
*/
|
|
1237
1152
|
export const rangeRangeSchema = z.object({
|
|
1238
|
-
|
|
1239
|
-
|
|
1153
|
+
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*\}\}$/)])),
|
|
1154
|
+
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
1155
|
}).strict();
|
|
1241
1156
|
|
|
1242
1157
|
export const rangeSchema = rangeRangeSchema;
|
|
@@ -1245,27 +1160,31 @@ export const rangeSchema = rangeRangeSchema;
|
|
|
1245
1160
|
* The list of asset attributes and their values.
|
|
1246
1161
|
*/
|
|
1247
1162
|
export const assetresponseattributesAssetResponseAttributesSchema = z.object({
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1163
|
+
id: z.string(),
|
|
1164
|
+
owner: z.string(),
|
|
1165
|
+
region: z.optional(z.string()),
|
|
1166
|
+
renderId: z.optional(z.string()),
|
|
1167
|
+
providerId: z.optional(z.string()),
|
|
1168
|
+
filename: z.optional(z.string()),
|
|
1169
|
+
url: z.optional(z.string()),
|
|
1170
|
+
status: z.enum([
|
|
1171
|
+
'importing',
|
|
1172
|
+
'ready',
|
|
1173
|
+
'failed',
|
|
1174
|
+
'deleted'
|
|
1175
|
+
]),
|
|
1176
|
+
created: z.optional(z.string()),
|
|
1177
|
+
updated: z.optional(z.string())
|
|
1258
1178
|
}).strict();
|
|
1259
1179
|
|
|
1260
|
-
export const assetResponseAttributesSchema =
|
|
1261
|
-
assetresponseattributesAssetResponseAttributesSchema;
|
|
1180
|
+
export const assetResponseAttributesSchema = assetresponseattributesAssetResponseAttributesSchema;
|
|
1262
1181
|
|
|
1263
1182
|
/**
|
|
1264
1183
|
* The type of resource (an asset) and attributes of the asset.
|
|
1265
1184
|
*/
|
|
1266
1185
|
export const assetresponsedataAssetResponseDataSchema = z.object({
|
|
1267
|
-
|
|
1268
|
-
|
|
1186
|
+
type: z.string(),
|
|
1187
|
+
attributes: assetresponseattributesAssetResponseAttributesSchema
|
|
1269
1188
|
}).strict();
|
|
1270
1189
|
|
|
1271
1190
|
export const assetResponseDataSchema = assetresponsedataAssetResponseDataSchema;
|
|
@@ -1274,17 +1193,16 @@ export const assetResponseDataSchema = assetresponsedataAssetResponseDataSchema;
|
|
|
1274
1193
|
* The response returned by the Serve API [get asset by render id](#get-asset-by-render-id) request. The response is an array of asset resources, including video, image, audio, thumbnail and poster image. The response follows the [json:api](https://jsonapi.org/) specification.
|
|
1275
1194
|
*/
|
|
1276
1195
|
export const assetrenderresponseAssetRenderResponseSchema = z.object({
|
|
1277
|
-
|
|
1196
|
+
data: z.array(assetresponsedataAssetResponseDataSchema)
|
|
1278
1197
|
}).strict();
|
|
1279
1198
|
|
|
1280
|
-
export const assetRenderResponseSchema =
|
|
1281
|
-
assetrenderresponseAssetRenderResponseSchema;
|
|
1199
|
+
export const assetRenderResponseSchema = assetrenderresponseAssetRenderResponseSchema;
|
|
1282
1200
|
|
|
1283
1201
|
/**
|
|
1284
1202
|
* The response returned by the Serve API [get asset](#get-asset) request. Includes details of a hosted video, image, audio file, thumbnail or poster image. The response follows the [json:api](https://jsonapi.org/) specification.
|
|
1285
1203
|
*/
|
|
1286
1204
|
export const assetresponseAssetResponseSchema = z.object({
|
|
1287
|
-
|
|
1205
|
+
data: assetresponsedataAssetResponseDataSchema
|
|
1288
1206
|
}).strict();
|
|
1289
1207
|
|
|
1290
1208
|
export const assetResponseSchema = assetresponseAssetResponseSchema;
|
|
@@ -1293,9 +1211,9 @@ export const assetResponseSchema = assetresponseAssetResponseSchema;
|
|
|
1293
1211
|
* The response received after a [probe request](#inspect-media) is submitted. The probe requests returns data from FFprobe formatted as JSON.
|
|
1294
1212
|
*/
|
|
1295
1213
|
export const proberesponseProbeResponseSchema = z.object({
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1214
|
+
success: z.boolean(),
|
|
1215
|
+
message: z.string(),
|
|
1216
|
+
response: z.record(z.string(), z.unknown())
|
|
1299
1217
|
}).strict();
|
|
1300
1218
|
|
|
1301
1219
|
export const probeResponseSchema = proberesponseProbeResponseSchema;
|
|
@@ -1304,20 +1222,19 @@ export const probeResponseSchema = proberesponseProbeResponseSchema;
|
|
|
1304
1222
|
* The response data returned with the [QueuedResponse](#tocs_queuedresponse).
|
|
1305
1223
|
*/
|
|
1306
1224
|
export const queuedresponsedataQueuedResponseDataSchema = z.object({
|
|
1307
|
-
|
|
1308
|
-
|
|
1225
|
+
message: z.string(),
|
|
1226
|
+
id: z.string()
|
|
1309
1227
|
}).strict();
|
|
1310
1228
|
|
|
1311
|
-
export const queuedResponseDataSchema =
|
|
1312
|
-
queuedresponsedataQueuedResponseDataSchema;
|
|
1229
|
+
export const queuedResponseDataSchema = queuedresponsedataQueuedResponseDataSchema;
|
|
1313
1230
|
|
|
1314
1231
|
/**
|
|
1315
1232
|
* The response received after a [render request](#render-asset) or [template render](#render-template) is submitted. The render task is queued for rendering and a unique render id is returned.
|
|
1316
1233
|
*/
|
|
1317
1234
|
export const queuedresponseQueuedResponseSchema = z.object({
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1235
|
+
success: z.boolean(),
|
|
1236
|
+
message: z.string(),
|
|
1237
|
+
response: queuedresponsedataQueuedResponseDataSchema
|
|
1321
1238
|
}).strict();
|
|
1322
1239
|
|
|
1323
1240
|
export const queuedResponseSchema = queuedresponseQueuedResponseSchema;
|
|
@@ -1326,56 +1243,52 @@ export const queuedResponseSchema = queuedresponseQueuedResponseSchema;
|
|
|
1326
1243
|
* The individual template item returned with the [TemplateListResponseData](#tocs_templatelistresponsedata) templates list.
|
|
1327
1244
|
*/
|
|
1328
1245
|
export const templatelistresponseitemTemplateListResponseItemSchema = z.object({
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1246
|
+
id: z.string(),
|
|
1247
|
+
name: z.string(),
|
|
1248
|
+
created: z.optional(z.string()),
|
|
1249
|
+
updated: z.optional(z.string())
|
|
1333
1250
|
}).strict();
|
|
1334
1251
|
|
|
1335
|
-
export const templateListResponseItemSchema =
|
|
1336
|
-
templatelistresponseitemTemplateListResponseItemSchema;
|
|
1252
|
+
export const templateListResponseItemSchema = templatelistresponseitemTemplateListResponseItemSchema;
|
|
1337
1253
|
|
|
1338
1254
|
/**
|
|
1339
1255
|
* The response data returned with the [TemplateListResponse](#tocs_templatelistresponse).
|
|
1340
1256
|
*/
|
|
1341
1257
|
export const templatelistresponsedataTemplateListResponseDataSchema = z.object({
|
|
1342
|
-
|
|
1343
|
-
|
|
1258
|
+
owner: z.string(),
|
|
1259
|
+
templates: z.array(templatelistresponseitemTemplateListResponseItemSchema)
|
|
1344
1260
|
}).strict();
|
|
1345
1261
|
|
|
1346
|
-
export const templateListResponseDataSchema =
|
|
1347
|
-
templatelistresponsedataTemplateListResponseDataSchema;
|
|
1262
|
+
export const templateListResponseDataSchema = templatelistresponsedataTemplateListResponseDataSchema;
|
|
1348
1263
|
|
|
1349
1264
|
/**
|
|
1350
1265
|
* A list of previously saved templates.
|
|
1351
1266
|
*/
|
|
1352
1267
|
export const templatelistresponseTemplateListResponseSchema = z.object({
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1268
|
+
success: z.boolean(),
|
|
1269
|
+
message: z.string(),
|
|
1270
|
+
response: templatelistresponsedataTemplateListResponseDataSchema
|
|
1356
1271
|
}).strict();
|
|
1357
1272
|
|
|
1358
|
-
export const templateListResponseSchema =
|
|
1359
|
-
templatelistresponseTemplateListResponseSchema;
|
|
1273
|
+
export const templateListResponseSchema = templatelistresponseTemplateListResponseSchema;
|
|
1360
1274
|
|
|
1361
1275
|
/**
|
|
1362
1276
|
* The response data returned with the [TemplateResponse](#tocs_templateresponse).
|
|
1363
1277
|
*/
|
|
1364
1278
|
export const templateresponsedataTemplateResponseDataSchema = z.object({
|
|
1365
|
-
|
|
1366
|
-
|
|
1279
|
+
message: z.string(),
|
|
1280
|
+
id: z.string()
|
|
1367
1281
|
}).strict();
|
|
1368
1282
|
|
|
1369
|
-
export const templateResponseDataSchema =
|
|
1370
|
-
templateresponsedataTemplateResponseDataSchema;
|
|
1283
|
+
export const templateResponseDataSchema = templateresponsedataTemplateResponseDataSchema;
|
|
1371
1284
|
|
|
1372
1285
|
/**
|
|
1373
1286
|
* The response received after a [template](#create-template) is submitted. The template is saved and a unique template id is returned.
|
|
1374
1287
|
*/
|
|
1375
1288
|
export const templateresponseTemplateResponseSchema = z.object({
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1289
|
+
success: z.boolean(),
|
|
1290
|
+
message: z.string(),
|
|
1291
|
+
response: templateresponsedataTemplateResponseDataSchema
|
|
1379
1292
|
}).strict();
|
|
1380
1293
|
|
|
1381
1294
|
export const templateResponseSchema = templateresponseTemplateResponseSchema;
|
|
@@ -1384,43 +1297,46 @@ export const templateResponseSchema = templateresponseTemplateResponseSchema;
|
|
|
1384
1297
|
* Font properties for the active/highlighted word.
|
|
1385
1298
|
*/
|
|
1386
1299
|
export const richcaptionpropertiesRichCaptionActiveFontSchema = z.object({
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1300
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#ffff00'),
|
|
1301
|
+
background: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1302
|
+
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)
|
|
1390
1303
|
}).strict();
|
|
1391
1304
|
|
|
1392
|
-
export const richCaptionActiveFontSchema =
|
|
1393
|
-
richcaptionpropertiesRichCaptionActiveFontSchema;
|
|
1305
|
+
export const richCaptionActiveFontSchema = richcaptionpropertiesRichCaptionActiveFontSchema;
|
|
1394
1306
|
|
|
1395
1307
|
/**
|
|
1396
1308
|
* Word-level animation properties for caption effects.
|
|
1397
1309
|
*/
|
|
1398
1310
|
export const richcaptionpropertiesRichCaptionWordAnimationSchema = z.object({
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1311
|
+
style: z.enum([
|
|
1312
|
+
'karaoke',
|
|
1313
|
+
'highlight',
|
|
1314
|
+
'pop',
|
|
1315
|
+
'fade',
|
|
1316
|
+
'slide',
|
|
1317
|
+
'bounce',
|
|
1318
|
+
'typewriter',
|
|
1319
|
+
'none'
|
|
1320
|
+
]),
|
|
1321
|
+
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.5).lte(2)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1322
|
+
direction: z.optional(z.enum([
|
|
1323
|
+
'left',
|
|
1324
|
+
'right',
|
|
1325
|
+
'up',
|
|
1326
|
+
'down'
|
|
1327
|
+
]))
|
|
1411
1328
|
}).strict();
|
|
1412
1329
|
|
|
1413
|
-
export const richCaptionWordAnimationSchema =
|
|
1414
|
-
richcaptionpropertiesRichCaptionWordAnimationSchema;
|
|
1330
|
+
export const richCaptionWordAnimationSchema = richcaptionpropertiesRichCaptionWordAnimationSchema;
|
|
1415
1331
|
|
|
1416
1332
|
/**
|
|
1417
1333
|
* Word-level timing information for caption animation.
|
|
1418
1334
|
*/
|
|
1419
1335
|
export const richcaptionpropertiesWordTimingSchema = z.object({
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1336
|
+
text: z.string().min(1),
|
|
1337
|
+
start: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
1338
|
+
end: z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
1339
|
+
confidence: 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*\}\}$/)]))
|
|
1424
1340
|
}).strict();
|
|
1425
1341
|
|
|
1426
1342
|
export const wordTimingSchema = richcaptionpropertiesWordTimingSchema;
|
|
@@ -1429,69 +1345,75 @@ export const wordTimingSchema = richcaptionpropertiesWordTimingSchema;
|
|
|
1429
1345
|
* Text alignment properties (horizontal and vertical).
|
|
1430
1346
|
*/
|
|
1431
1347
|
export const richtextpropertiesRichTextAlignmentSchema = z.object({
|
|
1432
|
-
|
|
1433
|
-
|
|
1348
|
+
horizontal: z.optional(z.enum([
|
|
1349
|
+
'left',
|
|
1350
|
+
'center',
|
|
1351
|
+
'right'
|
|
1352
|
+
])),
|
|
1353
|
+
vertical: z.optional(z.enum([
|
|
1354
|
+
'top',
|
|
1355
|
+
'middle',
|
|
1356
|
+
'bottom'
|
|
1357
|
+
]))
|
|
1434
1358
|
}).strict();
|
|
1435
1359
|
|
|
1436
|
-
export const richTextAlignmentSchema =
|
|
1437
|
-
richtextpropertiesRichTextAlignmentSchema;
|
|
1360
|
+
export const richTextAlignmentSchema = richtextpropertiesRichTextAlignmentSchema;
|
|
1438
1361
|
|
|
1439
1362
|
/**
|
|
1440
1363
|
* Animation properties for text entrance effects.
|
|
1441
1364
|
*/
|
|
1442
1365
|
export const richtextpropertiesRichTextAnimationSchema = z.object({
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1366
|
+
preset: z.enum([
|
|
1367
|
+
'fadeIn',
|
|
1368
|
+
'slideIn',
|
|
1369
|
+
'typewriter',
|
|
1370
|
+
'ascend',
|
|
1371
|
+
'shift',
|
|
1372
|
+
'movingLetters'
|
|
1373
|
+
]),
|
|
1374
|
+
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*\}\}$/)])),
|
|
1375
|
+
style: z.optional(z.enum(['character', 'word'])),
|
|
1376
|
+
direction: z.optional(z.enum([
|
|
1377
|
+
'left',
|
|
1378
|
+
'right',
|
|
1379
|
+
'up',
|
|
1380
|
+
'down'
|
|
1381
|
+
]))
|
|
1454
1382
|
}).strict();
|
|
1455
1383
|
|
|
1456
|
-
export const richTextAnimationSchema =
|
|
1457
|
-
richtextpropertiesRichTextAnimationSchema;
|
|
1384
|
+
export const richTextAnimationSchema = richtextpropertiesRichTextAnimationSchema;
|
|
1458
1385
|
|
|
1459
1386
|
/**
|
|
1460
1387
|
* Background styling properties for the text bounding box.
|
|
1461
1388
|
*/
|
|
1462
1389
|
export const richtextpropertiesRichTextBackgroundSchema = z.object({
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1390
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1391
|
+
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),
|
|
1392
|
+
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)
|
|
1466
1393
|
}).strict();
|
|
1467
1394
|
|
|
1468
|
-
export const richTextBackgroundSchema =
|
|
1469
|
-
richtextpropertiesRichTextBackgroundSchema;
|
|
1395
|
+
export const richTextBackgroundSchema = richtextpropertiesRichTextBackgroundSchema;
|
|
1470
1396
|
|
|
1471
1397
|
/**
|
|
1472
1398
|
* Border styling properties for the text bounding box.
|
|
1473
1399
|
*/
|
|
1474
1400
|
export const richtextpropertiesRichTextBorderSchema = z.object({
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1401
|
+
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),
|
|
1402
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#000000'),
|
|
1403
|
+
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),
|
|
1404
|
+
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)
|
|
1479
1405
|
}).strict();
|
|
1480
1406
|
|
|
1481
1407
|
/**
|
|
1482
1408
|
* Gradient properties for text fill.
|
|
1483
1409
|
*/
|
|
1484
1410
|
export const richtextpropertiesRichTextGradientSchema = z.object({
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
.array(
|
|
1489
|
-
z.object({
|
|
1411
|
+
type: z.optional(z.enum(['linear', 'radial'])),
|
|
1412
|
+
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),
|
|
1413
|
+
stops: z.array(z.object({
|
|
1490
1414
|
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*\}\}$/)]),
|
|
1491
|
-
color: z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
1492
|
-
|
|
1493
|
-
)
|
|
1494
|
-
.min(2),
|
|
1415
|
+
color: z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
1416
|
+
})).min(2)
|
|
1495
1417
|
}).strict();
|
|
1496
1418
|
|
|
1497
1419
|
export const richTextGradientSchema = richtextpropertiesRichTextGradientSchema;
|
|
@@ -1500,21 +1422,21 @@ export const richTextGradientSchema = richtextpropertiesRichTextGradientSchema;
|
|
|
1500
1422
|
* Padding properties for individual sides of the text bounding box.
|
|
1501
1423
|
*/
|
|
1502
1424
|
export const richtextpropertiesRichTextPaddingSchema = z.object({
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1425
|
+
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),
|
|
1426
|
+
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),
|
|
1427
|
+
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),
|
|
1428
|
+
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)
|
|
1507
1429
|
}).strict();
|
|
1508
1430
|
|
|
1509
1431
|
/**
|
|
1510
1432
|
* Text shadow properties.
|
|
1511
1433
|
*/
|
|
1512
1434
|
export const richtextpropertiesRichTextShadowSchema = z.object({
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1435
|
+
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),
|
|
1436
|
+
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),
|
|
1437
|
+
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),
|
|
1438
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#000000'),
|
|
1439
|
+
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)
|
|
1518
1440
|
}).strict();
|
|
1519
1441
|
|
|
1520
1442
|
export const richTextShadowSchema = richtextpropertiesRichTextShadowSchema;
|
|
@@ -1523,9 +1445,9 @@ export const richTextShadowSchema = richtextpropertiesRichTextShadowSchema;
|
|
|
1523
1445
|
* Text stroke (outline) properties.
|
|
1524
1446
|
*/
|
|
1525
1447
|
export const richtextpropertiesRichTextStrokeSchema = z.object({
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1448
|
+
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),
|
|
1449
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#000000'),
|
|
1450
|
+
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)
|
|
1529
1451
|
}).strict();
|
|
1530
1452
|
|
|
1531
1453
|
export const richTextStrokeSchema = richtextpropertiesRichTextStrokeSchema;
|
|
@@ -1534,25 +1456,24 @@ export const richTextStrokeSchema = richtextpropertiesRichTextStrokeSchema;
|
|
|
1534
1456
|
* Styling properties for the active/highlighted word.
|
|
1535
1457
|
*/
|
|
1536
1458
|
export const richcaptionpropertiesRichCaptionActiveSchema = z.object({
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1459
|
+
font: z.optional(richcaptionpropertiesRichCaptionActiveFontSchema),
|
|
1460
|
+
stroke: z.optional(richtextpropertiesRichTextStrokeSchema),
|
|
1461
|
+
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.5).lte(2)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1)
|
|
1540
1462
|
}).strict();
|
|
1541
1463
|
|
|
1542
|
-
export const richCaptionActiveSchema =
|
|
1543
|
-
richcaptionpropertiesRichCaptionActiveSchema;
|
|
1464
|
+
export const richCaptionActiveSchema = richcaptionpropertiesRichCaptionActiveSchema;
|
|
1544
1465
|
|
|
1545
1466
|
/**
|
|
1546
1467
|
* Font properties for rich text.
|
|
1547
1468
|
*/
|
|
1548
1469
|
export const richtextpropertiesRichTextFontSchema = z.object({
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1470
|
+
family: z.optional(z.string()).default('Open Sans'),
|
|
1471
|
+
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),
|
|
1472
|
+
weight: z.optional(z.unknown()).default('400'),
|
|
1473
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#000000'),
|
|
1474
|
+
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),
|
|
1475
|
+
background: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1476
|
+
stroke: z.optional(richtextpropertiesRichTextStrokeSchema)
|
|
1556
1477
|
}).strict();
|
|
1557
1478
|
|
|
1558
1479
|
export const richTextFontSchema = richtextpropertiesRichTextFontSchema;
|
|
@@ -1561,14 +1482,21 @@ export const richTextFontSchema = richtextpropertiesRichTextFontSchema;
|
|
|
1561
1482
|
* Text style properties including spacing, line height, and transformations.
|
|
1562
1483
|
*/
|
|
1563
1484
|
export const richtextpropertiesRichTextStyleSchema = z.object({
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1485
|
+
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),
|
|
1486
|
+
wordSpacing: 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),
|
|
1487
|
+
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),
|
|
1488
|
+
textTransform: z.optional(z.enum([
|
|
1489
|
+
'none',
|
|
1490
|
+
'uppercase',
|
|
1491
|
+
'lowercase',
|
|
1492
|
+
'capitalize'
|
|
1493
|
+
])),
|
|
1494
|
+
textDecoration: z.optional(z.enum([
|
|
1495
|
+
'none',
|
|
1496
|
+
'underline',
|
|
1497
|
+
'line-through'
|
|
1498
|
+
])),
|
|
1499
|
+
gradient: z.optional(richtextpropertiesRichTextGradientSchema)
|
|
1572
1500
|
}).strict();
|
|
1573
1501
|
|
|
1574
1502
|
export const richTextStyleSchema = richtextpropertiesRichTextStyleSchema;
|
|
@@ -1580,25 +1508,28 @@ export const richTextStyleSchema = richtextpropertiesRichTextStyleSchema;
|
|
|
1580
1508
|
*
|
|
1581
1509
|
*/
|
|
1582
1510
|
export const richcaptionassetRichCaptionAssetSchema = z.object({
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
richcaptionpropertiesRichCaptionWordAnimationSchema,
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1511
|
+
type: z.enum(['rich-caption']),
|
|
1512
|
+
src: z.optional(z.string().min(1)),
|
|
1513
|
+
words: z.optional(z.array(richcaptionpropertiesWordTimingSchema).max(100000)),
|
|
1514
|
+
font: z.optional(richtextpropertiesRichTextFontSchema),
|
|
1515
|
+
style: z.optional(richtextpropertiesRichTextStyleSchema),
|
|
1516
|
+
stroke: z.optional(richtextpropertiesRichTextStrokeSchema),
|
|
1517
|
+
shadow: z.optional(richtextpropertiesRichTextShadowSchema),
|
|
1518
|
+
background: z.optional(richtextpropertiesRichTextBackgroundSchema),
|
|
1519
|
+
padding: z.optional(z.union([
|
|
1520
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
1521
|
+
richtextpropertiesRichTextPaddingSchema
|
|
1522
|
+
])),
|
|
1523
|
+
align: z.optional(richtextpropertiesRichTextAlignmentSchema),
|
|
1524
|
+
active: z.optional(richcaptionpropertiesRichCaptionActiveSchema),
|
|
1525
|
+
wordAnimation: z.optional(richcaptionpropertiesRichCaptionWordAnimationSchema),
|
|
1526
|
+
position: z.optional(z.enum([
|
|
1527
|
+
'top',
|
|
1528
|
+
'center',
|
|
1529
|
+
'bottom'
|
|
1530
|
+
])),
|
|
1531
|
+
maxWidth: 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(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.9),
|
|
1532
|
+
maxLines: 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(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(2)
|
|
1602
1533
|
}).strict();
|
|
1603
1534
|
|
|
1604
1535
|
export const richCaptionAssetSchema = richcaptionassetRichCaptionAssetSchema;
|
|
@@ -1609,19 +1540,20 @@ export const richCaptionAssetSchema = richcaptionassetRichCaptionAssetSchema;
|
|
|
1609
1540
|
*
|
|
1610
1541
|
*/
|
|
1611
1542
|
export const richtextassetRichTextAssetSchema = z.object({
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1543
|
+
type: z.enum(['rich-text']),
|
|
1544
|
+
text: z.string().max(5000),
|
|
1545
|
+
font: z.optional(richtextpropertiesRichTextFontSchema),
|
|
1546
|
+
style: z.optional(richtextpropertiesRichTextStyleSchema),
|
|
1547
|
+
stroke: z.optional(richtextpropertiesRichTextStrokeSchema),
|
|
1548
|
+
shadow: z.optional(richtextpropertiesRichTextShadowSchema),
|
|
1549
|
+
background: z.optional(richtextpropertiesRichTextBackgroundSchema),
|
|
1550
|
+
border: z.optional(richtextpropertiesRichTextBorderSchema),
|
|
1551
|
+
padding: z.optional(z.union([
|
|
1552
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
1553
|
+
richtextpropertiesRichTextPaddingSchema
|
|
1554
|
+
])),
|
|
1555
|
+
align: z.optional(richtextpropertiesRichTextAlignmentSchema),
|
|
1556
|
+
animation: z.optional(richtextpropertiesRichTextAnimationSchema)
|
|
1625
1557
|
}).strict();
|
|
1626
1558
|
|
|
1627
1559
|
export const richTextAssetSchema = richtextassetRichTextAssetSchema;
|
|
@@ -1629,35 +1561,30 @@ export const richTextAssetSchema = richtextassetRichTextAssetSchema;
|
|
|
1629
1561
|
/**
|
|
1630
1562
|
* The transfer request attributes inlcudling the user specified ID and status. Returned with [TransferResponseData](#tocs_transferresponsedata).
|
|
1631
1563
|
*/
|
|
1632
|
-
export const transferresponseattributesTransferResponseAttributesSchema =
|
|
1633
|
-
z.object({
|
|
1564
|
+
export const transferresponseattributesTransferResponseAttributesSchema = z.object({
|
|
1634
1565
|
id: z.optional(z.string()),
|
|
1635
1566
|
owner: z.optional(z.string()),
|
|
1636
|
-
status: z.optional(z.enum([
|
|
1637
|
-
created: z.optional(z.string())
|
|
1638
|
-
|
|
1567
|
+
status: z.optional(z.enum(['queued', 'failed'])),
|
|
1568
|
+
created: z.optional(z.string())
|
|
1569
|
+
}).strict();
|
|
1639
1570
|
|
|
1640
|
-
export const transferResponseAttributesSchema =
|
|
1641
|
-
transferresponseattributesTransferResponseAttributesSchema;
|
|
1571
|
+
export const transferResponseAttributesSchema = transferresponseattributesTransferResponseAttributesSchema;
|
|
1642
1572
|
|
|
1643
1573
|
/**
|
|
1644
1574
|
* The type of resource (an asset) and the transfer attributes. Returned with [TransferResponse](#tocs_transferresponse).
|
|
1645
1575
|
*/
|
|
1646
1576
|
export const transferresponsedataTransferResponseDataSchema = z.object({
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
transferresponseattributesTransferResponseAttributesSchema,
|
|
1650
|
-
),
|
|
1577
|
+
type: z.optional(z.string()),
|
|
1578
|
+
attributes: z.optional(transferresponseattributesTransferResponseAttributesSchema)
|
|
1651
1579
|
}).strict();
|
|
1652
1580
|
|
|
1653
|
-
export const transferResponseDataSchema =
|
|
1654
|
-
transferresponsedataTransferResponseDataSchema;
|
|
1581
|
+
export const transferResponseDataSchema = transferresponsedataTransferResponseDataSchema;
|
|
1655
1582
|
|
|
1656
1583
|
/**
|
|
1657
1584
|
* The response returned by the Serve API [transfer asset](#transfer-asset) request. The response includes the ID and transfer status. The response follows the [json:api](https://jsonapi.org/) specification.
|
|
1658
1585
|
*/
|
|
1659
1586
|
export const transferresponseTransferResponseSchema = z.object({
|
|
1660
|
-
|
|
1587
|
+
data: transferresponsedataTransferResponseDataSchema
|
|
1661
1588
|
}).strict();
|
|
1662
1589
|
|
|
1663
1590
|
export const transferResponseSchema = transferresponseTransferResponseSchema;
|
|
@@ -1666,9 +1593,9 @@ export const transferResponseSchema = transferresponseTransferResponseSchema;
|
|
|
1666
1593
|
* The asset URL to fetch and transfer to a destination.
|
|
1667
1594
|
*/
|
|
1668
1595
|
export const transferTransferSchema = z.object({
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1596
|
+
url: z.string(),
|
|
1597
|
+
id: z.string(),
|
|
1598
|
+
destinations: z.array(destinationsDestinationsSchema)
|
|
1672
1599
|
}).strict();
|
|
1673
1600
|
|
|
1674
1601
|
export const transferSchema = transferTransferSchema;
|
|
@@ -1679,40 +1606,34 @@ export const transferSchema = transferTransferSchema;
|
|
|
1679
1606
|
*
|
|
1680
1607
|
*/
|
|
1681
1608
|
export const shapeassetShapeAssetSchema = z.object({
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
z.object({
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
line: z.optional(
|
|
1711
|
-
z.object({
|
|
1712
|
-
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*\}\}$/)]),
|
|
1713
|
-
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*\}\}$/)]),
|
|
1714
|
-
}),
|
|
1715
|
-
),
|
|
1609
|
+
type: z.enum(['shape']),
|
|
1610
|
+
shape: z.enum([
|
|
1611
|
+
'rectangle',
|
|
1612
|
+
'circle',
|
|
1613
|
+
'line'
|
|
1614
|
+
]),
|
|
1615
|
+
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*\}\}$/)])),
|
|
1616
|
+
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*\}\}$/)])),
|
|
1617
|
+
fill: z.optional(z.object({
|
|
1618
|
+
color: z.optional(z.string()),
|
|
1619
|
+
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*\}\}$/)]))
|
|
1620
|
+
})),
|
|
1621
|
+
stroke: z.optional(z.object({
|
|
1622
|
+
color: z.optional(z.string()),
|
|
1623
|
+
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*\}\}$/)]))
|
|
1624
|
+
})),
|
|
1625
|
+
rectangle: z.optional(z.object({
|
|
1626
|
+
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*\}\}$/)]),
|
|
1627
|
+
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*\}\}$/)]),
|
|
1628
|
+
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*\}\}$/)]))
|
|
1629
|
+
})),
|
|
1630
|
+
circle: z.optional(z.object({
|
|
1631
|
+
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*\}\}$/)])
|
|
1632
|
+
})),
|
|
1633
|
+
line: z.optional(z.object({
|
|
1634
|
+
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*\}\}$/)]),
|
|
1635
|
+
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*\}\}$/)])
|
|
1636
|
+
}))
|
|
1716
1637
|
}).strict();
|
|
1717
1638
|
|
|
1718
1639
|
export const shapeAssetSchema = shapeassetShapeAssetSchema;
|
|
@@ -1721,8 +1642,8 @@ export const shapeAssetSchema = shapeassetShapeAssetSchema;
|
|
|
1721
1642
|
* 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.
|
|
1722
1643
|
*/
|
|
1723
1644
|
export const sizeSizeSchema = z.object({
|
|
1724
|
-
|
|
1725
|
-
|
|
1645
|
+
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*\}\}$/)])),
|
|
1646
|
+
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*\}\}$/)]))
|
|
1726
1647
|
}).strict();
|
|
1727
1648
|
|
|
1728
1649
|
export const sizeSchema = sizeSizeSchema;
|
|
@@ -1731,50 +1652,56 @@ export const sizeSchema = sizeSizeSchema;
|
|
|
1731
1652
|
* A rendition is a new output file that is generated from the source. The rendition can be encoded to a different format and have transformations applied to it such as resizing, cropping, etc...
|
|
1732
1653
|
*/
|
|
1733
1654
|
export const renditionRenditionSchema = z.object({
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1655
|
+
format: z.optional(z.enum([
|
|
1656
|
+
'mp4',
|
|
1657
|
+
'webm',
|
|
1658
|
+
'mov',
|
|
1659
|
+
'avi',
|
|
1660
|
+
'mkv',
|
|
1661
|
+
'ogv',
|
|
1662
|
+
'wmv',
|
|
1663
|
+
'avif',
|
|
1664
|
+
'gif',
|
|
1665
|
+
'mp3',
|
|
1666
|
+
'wav',
|
|
1667
|
+
'jpg',
|
|
1668
|
+
'png',
|
|
1669
|
+
'webp',
|
|
1670
|
+
'tif'
|
|
1671
|
+
])),
|
|
1672
|
+
size: z.optional(sizeSizeSchema),
|
|
1673
|
+
fit: z.optional(z.enum([
|
|
1674
|
+
'cover',
|
|
1675
|
+
'contain',
|
|
1676
|
+
'crop'
|
|
1677
|
+
])),
|
|
1678
|
+
resolution: z.optional(z.enum([
|
|
1679
|
+
'preview',
|
|
1680
|
+
'mobile',
|
|
1681
|
+
'sd',
|
|
1682
|
+
'hd',
|
|
1683
|
+
'fhd'
|
|
1684
|
+
])),
|
|
1685
|
+
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*\}\}$/)])),
|
|
1686
|
+
fps: z.optional(z.union([
|
|
1687
|
+
z.literal(12),
|
|
1688
|
+
z.literal(15),
|
|
1689
|
+
z.literal(23.976),
|
|
1690
|
+
z.literal(24),
|
|
1691
|
+
z.literal(25),
|
|
1692
|
+
z.literal(29.97),
|
|
1693
|
+
z.literal(30),
|
|
1694
|
+
z.literal(48),
|
|
1695
|
+
z.literal(50),
|
|
1696
|
+
z.literal(59.94),
|
|
1697
|
+
z.literal(60)
|
|
1698
|
+
])),
|
|
1699
|
+
speed: z.optional(speedSpeedSchema),
|
|
1700
|
+
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*\}\}$/)])),
|
|
1701
|
+
fixOffset: z.optional(z.boolean()),
|
|
1702
|
+
fixRotation: z.optional(z.boolean()),
|
|
1703
|
+
enhance: z.optional(enhancementsEnhancementsSchema),
|
|
1704
|
+
filename: z.optional(z.string())
|
|
1778
1705
|
}).strict();
|
|
1779
1706
|
|
|
1780
1707
|
export const renditionSchema = renditionRenditionSchema;
|
|
@@ -1783,8 +1710,8 @@ export const renditionSchema = renditionRenditionSchema;
|
|
|
1783
1710
|
* The output renditions and transformations that should be generated from the source file.
|
|
1784
1711
|
*/
|
|
1785
1712
|
export const outputsOutputsSchema = z.object({
|
|
1786
|
-
|
|
1787
|
-
|
|
1713
|
+
renditions: z.optional(z.array(renditionRenditionSchema)),
|
|
1714
|
+
transcription: z.optional(transcriptionTranscriptionSchema)
|
|
1788
1715
|
}).strict();
|
|
1789
1716
|
|
|
1790
1717
|
export const outputsSchema = outputsOutputsSchema;
|
|
@@ -1792,38 +1719,32 @@ export const outputsSchema = outputsOutputsSchema;
|
|
|
1792
1719
|
/**
|
|
1793
1720
|
* The id and attributes of the generated rendition file.
|
|
1794
1721
|
*/
|
|
1795
|
-
export const renditionresponseattributesRenditionResponseAttributesSchema =
|
|
1796
|
-
z.object({
|
|
1722
|
+
export const renditionresponseattributesRenditionResponseAttributesSchema = z.object({
|
|
1797
1723
|
id: z.string(),
|
|
1798
|
-
status: z.optional(
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
]),
|
|
1807
|
-
),
|
|
1724
|
+
status: z.optional(z.enum([
|
|
1725
|
+
'queued',
|
|
1726
|
+
'importing',
|
|
1727
|
+
'ready',
|
|
1728
|
+
'failed',
|
|
1729
|
+
'deleted',
|
|
1730
|
+
'overwritten'
|
|
1731
|
+
])),
|
|
1808
1732
|
url: z.optional(z.string()),
|
|
1809
1733
|
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*\}\}$/)])),
|
|
1810
1734
|
transformation: z.optional(renditionRenditionSchema),
|
|
1811
1735
|
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*\}\}$/)])),
|
|
1812
1736
|
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*\}\}$/)])),
|
|
1813
1737
|
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*\}\}$/)])),
|
|
1814
|
-
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*\}\}$/)]))
|
|
1815
|
-
|
|
1738
|
+
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*\}\}$/)]))
|
|
1739
|
+
}).strict();
|
|
1816
1740
|
|
|
1817
|
-
export const renditionResponseAttributesSchema =
|
|
1818
|
-
renditionresponseattributesRenditionResponseAttributesSchema;
|
|
1741
|
+
export const renditionResponseAttributesSchema = renditionresponseattributesRenditionResponseAttributesSchema;
|
|
1819
1742
|
|
|
1820
1743
|
/**
|
|
1821
1744
|
* The list of outputs generated from the source file. Currently supports renditions which are versions of the source file with different transformations applied.
|
|
1822
1745
|
*/
|
|
1823
1746
|
export const outputsresponseOutputsResponseSchema = z.object({
|
|
1824
|
-
|
|
1825
|
-
z.array(renditionresponseattributesRenditionResponseAttributesSchema),
|
|
1826
|
-
),
|
|
1747
|
+
renditions: z.optional(z.array(renditionresponseattributesRenditionResponseAttributesSchema))
|
|
1827
1748
|
}).strict();
|
|
1828
1749
|
|
|
1829
1750
|
export const outputsResponseSchema = outputsresponseOutputsResponseSchema;
|
|
@@ -1832,59 +1753,54 @@ export const outputsResponseSchema = outputsresponseOutputsResponseSchema;
|
|
|
1832
1753
|
* The id and attributes of the source file.
|
|
1833
1754
|
*/
|
|
1834
1755
|
export const sourceresponseattributesSourceResponseAttributesSchema = z.object({
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
created: z.optional(z.string()),
|
|
1855
|
-
updated: z.optional(z.string()),
|
|
1756
|
+
id: z.string(),
|
|
1757
|
+
owner: z.string(),
|
|
1758
|
+
input: z.optional(z.string()),
|
|
1759
|
+
source: z.optional(z.string()),
|
|
1760
|
+
status: z.optional(z.enum([
|
|
1761
|
+
'queued',
|
|
1762
|
+
'importing',
|
|
1763
|
+
'ready',
|
|
1764
|
+
'failed',
|
|
1765
|
+
'deleted',
|
|
1766
|
+
'overwritten'
|
|
1767
|
+
])),
|
|
1768
|
+
outputs: z.optional(outputsresponseOutputsResponseSchema),
|
|
1769
|
+
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*\}\}$/)])),
|
|
1770
|
+
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*\}\}$/)])),
|
|
1771
|
+
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*\}\}$/)])),
|
|
1772
|
+
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*\}\}$/)])),
|
|
1773
|
+
created: z.optional(z.string()),
|
|
1774
|
+
updated: z.optional(z.string())
|
|
1856
1775
|
}).strict();
|
|
1857
1776
|
|
|
1858
|
-
export const sourceResponseAttributesSchema =
|
|
1859
|
-
sourceresponseattributesSourceResponseAttributesSchema;
|
|
1777
|
+
export const sourceResponseAttributesSchema = sourceresponseattributesSourceResponseAttributesSchema;
|
|
1860
1778
|
|
|
1861
1779
|
/**
|
|
1862
1780
|
* The type of resource (a source), it's id and attributes of the source file.
|
|
1863
1781
|
*/
|
|
1864
1782
|
export const sourceresponsedataSourceResponseDataSchema = z.object({
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1783
|
+
type: z.string(),
|
|
1784
|
+
id: z.string(),
|
|
1785
|
+
attributes: sourceresponseattributesSourceResponseAttributesSchema
|
|
1868
1786
|
}).strict();
|
|
1869
1787
|
|
|
1870
|
-
export const sourceResponseDataSchema =
|
|
1871
|
-
sourceresponsedataSourceResponseDataSchema;
|
|
1788
|
+
export const sourceResponseDataSchema = sourceresponsedataSourceResponseDataSchema;
|
|
1872
1789
|
|
|
1873
1790
|
/**
|
|
1874
1791
|
* A list of all ingested source files fetched or uploaded to a users account.
|
|
1875
1792
|
*/
|
|
1876
1793
|
export const sourcelistresponseSourceListResponseSchema = z.object({
|
|
1877
|
-
|
|
1794
|
+
data: z.array(sourceresponsedataSourceResponseDataSchema)
|
|
1878
1795
|
}).strict();
|
|
1879
1796
|
|
|
1880
|
-
export const sourceListResponseSchema =
|
|
1881
|
-
sourcelistresponseSourceListResponseSchema;
|
|
1797
|
+
export const sourceListResponseSchema = sourcelistresponseSourceListResponseSchema;
|
|
1882
1798
|
|
|
1883
1799
|
/**
|
|
1884
1800
|
* The response returned by the Ingest API [get source](#get-source) request. Includes details of the ingested source file. The response follows the [json:api](https://jsonapi.org/) specification.
|
|
1885
1801
|
*/
|
|
1886
1802
|
export const sourceresponseSourceResponseSchema = z.object({
|
|
1887
|
-
|
|
1803
|
+
data: sourceresponsedataSourceResponseDataSchema
|
|
1888
1804
|
}).strict();
|
|
1889
1805
|
|
|
1890
1806
|
export const sourceResponseSchema = sourceresponseSourceResponseSchema;
|
|
@@ -1894,10 +1810,10 @@ export const sourceResponseSchema = sourceresponseSourceResponseSchema;
|
|
|
1894
1810
|
* A rendition is a new version, generated from the source. This can be used to create new sizes and aspect ratios tht serve different purposes within an application.
|
|
1895
1811
|
*/
|
|
1896
1812
|
export const sourceSourceSchema = z.object({
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1813
|
+
url: z.optional(z.string()),
|
|
1814
|
+
outputs: z.optional(outputsOutputsSchema),
|
|
1815
|
+
destinations: z.optional(destinationsDestinationsSchema),
|
|
1816
|
+
callback: z.optional(z.string())
|
|
1901
1817
|
}).strict();
|
|
1902
1818
|
|
|
1903
1819
|
export const sourceSchema = sourceSourceSchema;
|
|
@@ -1906,9 +1822,13 @@ export const sourceSchema = sourceSourceSchema;
|
|
|
1906
1822
|
* A music or audio file in mp3 format that plays for the duration of the rendered video or the length of the audio file, which ever is shortest.
|
|
1907
1823
|
*/
|
|
1908
1824
|
export const soundtrackSoundtrackSchema = z.object({
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1825
|
+
src: z.string().min(1).regex(/\S/),
|
|
1826
|
+
effect: z.optional(z.enum([
|
|
1827
|
+
'fadeIn',
|
|
1828
|
+
'fadeOut',
|
|
1829
|
+
'fadeInFadeOut'
|
|
1830
|
+
])),
|
|
1831
|
+
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*\}\}$/)]))
|
|
1912
1832
|
}).strict();
|
|
1913
1833
|
|
|
1914
1834
|
export const soundtrackSchema = soundtrackSoundtrackSchema;
|
|
@@ -1919,8 +1839,8 @@ export const soundtrackSchema = soundtrackSoundtrackSchema;
|
|
|
1919
1839
|
*
|
|
1920
1840
|
*/
|
|
1921
1841
|
export const svgpropertiesSvgGradientStopSchema = z.object({
|
|
1922
|
-
|
|
1923
|
-
|
|
1842
|
+
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*\}\}$/)]),
|
|
1843
|
+
color: z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
1924
1844
|
}).strict();
|
|
1925
1845
|
|
|
1926
1846
|
export const svgGradientStopSchema = svgpropertiesSvgGradientStopSchema;
|
|
@@ -1931,14 +1851,13 @@ export const svgGradientStopSchema = svgpropertiesSvgGradientStopSchema;
|
|
|
1931
1851
|
*
|
|
1932
1852
|
*/
|
|
1933
1853
|
export const svgpropertiesSvgLinearGradientFillSchema = z.object({
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1854
|
+
type: z.enum(['linear']),
|
|
1855
|
+
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),
|
|
1856
|
+
stops: z.array(svgpropertiesSvgGradientStopSchema).min(2),
|
|
1857
|
+
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)
|
|
1938
1858
|
}).strict();
|
|
1939
1859
|
|
|
1940
|
-
export const svgLinearGradientFillSchema =
|
|
1941
|
-
svgpropertiesSvgLinearGradientFillSchema;
|
|
1860
|
+
export const svgLinearGradientFillSchema = svgpropertiesSvgLinearGradientFillSchema;
|
|
1942
1861
|
|
|
1943
1862
|
/**
|
|
1944
1863
|
* A radial gradient fill that transitions colors radiating outward from a center point.
|
|
@@ -1946,24 +1865,23 @@ export const svgLinearGradientFillSchema =
|
|
|
1946
1865
|
*
|
|
1947
1866
|
*/
|
|
1948
1867
|
export const svgpropertiesSvgRadialGradientFillSchema = z.object({
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1868
|
+
type: z.enum(['radial']),
|
|
1869
|
+
stops: z.array(svgpropertiesSvgGradientStopSchema).min(2),
|
|
1870
|
+
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)
|
|
1952
1871
|
}).strict();
|
|
1953
1872
|
|
|
1954
|
-
export const svgRadialGradientFillSchema =
|
|
1955
|
-
svgpropertiesSvgRadialGradientFillSchema;
|
|
1873
|
+
export const svgRadialGradientFillSchema = svgpropertiesSvgRadialGradientFillSchema;
|
|
1956
1874
|
|
|
1957
1875
|
/**
|
|
1958
1876
|
* Drop shadow properties for SVG shapes. Creates a shadow effect behind the shape.
|
|
1959
1877
|
*
|
|
1960
1878
|
*/
|
|
1961
1879
|
export const svgpropertiesSvgShadowSchema = z.object({
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1880
|
+
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),
|
|
1881
|
+
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),
|
|
1882
|
+
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),
|
|
1883
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#000000'),
|
|
1884
|
+
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)
|
|
1967
1885
|
}).strict();
|
|
1968
1886
|
|
|
1969
1887
|
export const svgShadowSchema = svgpropertiesSvgShadowSchema;
|
|
@@ -1972,12 +1890,9 @@ export const svgShadowSchema = svgpropertiesSvgShadowSchema;
|
|
|
1972
1890
|
* A solid color fill for SVG shapes.
|
|
1973
1891
|
*/
|
|
1974
1892
|
export const svgpropertiesSvgSolidFillSchema = z.object({
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
.string()
|
|
1978
|
-
.regex(/^#[A-Fa-f0-9]{6}$/)
|
|
1979
|
-
.default("#000000"),
|
|
1980
|
-
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
|
+
type: z.enum(['solid']),
|
|
1894
|
+
color: z.string().regex(/^#[A-Fa-f0-9]{6}$/).default('#000000'),
|
|
1895
|
+
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)
|
|
1981
1896
|
}).strict();
|
|
1982
1897
|
|
|
1983
1898
|
export const svgSolidFillSchema = svgpropertiesSvgSolidFillSchema;
|
|
@@ -2001,13 +1916,21 @@ export const svgFillSchema = svgpropertiesSvgFillSchema;
|
|
|
2001
1916
|
*
|
|
2002
1917
|
*/
|
|
2003
1918
|
export const svgpropertiesSvgStrokeSchema = z.object({
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
1919
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#000000'),
|
|
1920
|
+
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),
|
|
1921
|
+
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),
|
|
1922
|
+
lineCap: z.optional(z.enum([
|
|
1923
|
+
'butt',
|
|
1924
|
+
'round',
|
|
1925
|
+
'square'
|
|
1926
|
+
])),
|
|
1927
|
+
lineJoin: z.optional(z.enum([
|
|
1928
|
+
'miter',
|
|
1929
|
+
'round',
|
|
1930
|
+
'bevel'
|
|
1931
|
+
])),
|
|
1932
|
+
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*\}\}$/)]))),
|
|
1933
|
+
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)
|
|
2011
1934
|
}).strict();
|
|
2012
1935
|
|
|
2013
1936
|
export const svgStrokeSchema = svgpropertiesSvgStrokeSchema;
|
|
@@ -2017,12 +1940,12 @@ export const svgStrokeSchema = svgpropertiesSvgStrokeSchema;
|
|
|
2017
1940
|
*
|
|
2018
1941
|
*/
|
|
2019
1942
|
export const svgpropertiesSvgTransformSchema = z.object({
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
1943
|
+
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),
|
|
1944
|
+
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),
|
|
1945
|
+
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),
|
|
1946
|
+
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),
|
|
1947
|
+
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),
|
|
1948
|
+
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)
|
|
2026
1949
|
}).strict();
|
|
2027
1950
|
|
|
2028
1951
|
export const svgTransformSchema = svgpropertiesSvgTransformSchema;
|
|
@@ -2033,11 +1956,11 @@ export const svgTransformSchema = svgpropertiesSvgTransformSchema;
|
|
|
2033
1956
|
*
|
|
2034
1957
|
*/
|
|
2035
1958
|
export const svgshapesSvgArrowShapeSchema = z.object({
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
1959
|
+
type: z.enum(['arrow']),
|
|
1960
|
+
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*\}\}$/)]),
|
|
1961
|
+
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*\}\}$/)]),
|
|
1962
|
+
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*\}\}$/)]),
|
|
1963
|
+
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*\}\}$/)])
|
|
2041
1964
|
}).strict();
|
|
2042
1965
|
|
|
2043
1966
|
export const svgArrowShapeSchema = svgshapesSvgArrowShapeSchema;
|
|
@@ -2048,8 +1971,8 @@ export const svgArrowShapeSchema = svgshapesSvgArrowShapeSchema;
|
|
|
2048
1971
|
*
|
|
2049
1972
|
*/
|
|
2050
1973
|
export const svgshapesSvgCircleShapeSchema = z.object({
|
|
2051
|
-
|
|
2052
|
-
|
|
1974
|
+
type: z.enum(['circle']),
|
|
1975
|
+
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*\}\}$/)])
|
|
2053
1976
|
}).strict();
|
|
2054
1977
|
|
|
2055
1978
|
export const svgCircleShapeSchema = svgshapesSvgCircleShapeSchema;
|
|
@@ -2060,10 +1983,10 @@ export const svgCircleShapeSchema = svgshapesSvgCircleShapeSchema;
|
|
|
2060
1983
|
*
|
|
2061
1984
|
*/
|
|
2062
1985
|
export const svgshapesSvgCrossShapeSchema = z.object({
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
1986
|
+
type: z.enum(['cross']),
|
|
1987
|
+
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*\}\}$/)]),
|
|
1988
|
+
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*\}\}$/)]),
|
|
1989
|
+
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*\}\}$/)])
|
|
2067
1990
|
}).strict();
|
|
2068
1991
|
|
|
2069
1992
|
export const svgCrossShapeSchema = svgshapesSvgCrossShapeSchema;
|
|
@@ -2074,9 +1997,9 @@ export const svgCrossShapeSchema = svgshapesSvgCrossShapeSchema;
|
|
|
2074
1997
|
*
|
|
2075
1998
|
*/
|
|
2076
1999
|
export const svgshapesSvgEllipseShapeSchema = z.object({
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2000
|
+
type: z.enum(['ellipse']),
|
|
2001
|
+
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*\}\}$/)]),
|
|
2002
|
+
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*\}\}$/)])
|
|
2080
2003
|
}).strict();
|
|
2081
2004
|
|
|
2082
2005
|
export const svgEllipseShapeSchema = svgshapesSvgEllipseShapeSchema;
|
|
@@ -2087,8 +2010,8 @@ export const svgEllipseShapeSchema = svgshapesSvgEllipseShapeSchema;
|
|
|
2087
2010
|
*
|
|
2088
2011
|
*/
|
|
2089
2012
|
export const svgshapesSvgHeartShapeSchema = z.object({
|
|
2090
|
-
|
|
2091
|
-
|
|
2013
|
+
type: z.enum(['heart']),
|
|
2014
|
+
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*\}\}$/)])
|
|
2092
2015
|
}).strict();
|
|
2093
2016
|
|
|
2094
2017
|
export const svgHeartShapeSchema = svgshapesSvgHeartShapeSchema;
|
|
@@ -2099,9 +2022,9 @@ export const svgHeartShapeSchema = svgshapesSvgHeartShapeSchema;
|
|
|
2099
2022
|
*
|
|
2100
2023
|
*/
|
|
2101
2024
|
export const svgshapesSvgLineShapeSchema = z.object({
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2025
|
+
type: z.enum(['line']),
|
|
2026
|
+
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*\}\}$/)]),
|
|
2027
|
+
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*\}\}$/)])
|
|
2105
2028
|
}).strict();
|
|
2106
2029
|
|
|
2107
2030
|
export const svgLineShapeSchema = svgshapesSvgLineShapeSchema;
|
|
@@ -2124,8 +2047,8 @@ export const svgLineShapeSchema = svgshapesSvgLineShapeSchema;
|
|
|
2124
2047
|
*
|
|
2125
2048
|
*/
|
|
2126
2049
|
export const svgshapesSvgPathShapeSchema = z.object({
|
|
2127
|
-
|
|
2128
|
-
|
|
2050
|
+
type: z.enum(['path']),
|
|
2051
|
+
d: z.string().min(1).max(100000)
|
|
2129
2052
|
}).strict();
|
|
2130
2053
|
|
|
2131
2054
|
export const svgPathShapeSchema = svgshapesSvgPathShapeSchema;
|
|
@@ -2137,9 +2060,9 @@ export const svgPathShapeSchema = svgshapesSvgPathShapeSchema;
|
|
|
2137
2060
|
*
|
|
2138
2061
|
*/
|
|
2139
2062
|
export const svgshapesSvgPolygonShapeSchema = z.object({
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2063
|
+
type: z.enum(['polygon']),
|
|
2064
|
+
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*\}\}$/)]),
|
|
2065
|
+
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*\}\}$/)])
|
|
2143
2066
|
}).strict();
|
|
2144
2067
|
|
|
2145
2068
|
export const svgPolygonShapeSchema = svgshapesSvgPolygonShapeSchema;
|
|
@@ -2150,10 +2073,10 @@ export const svgPolygonShapeSchema = svgshapesSvgPolygonShapeSchema;
|
|
|
2150
2073
|
*
|
|
2151
2074
|
*/
|
|
2152
2075
|
export const svgshapesSvgRectangleShapeSchema = z.object({
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2076
|
+
type: z.enum(['rectangle']),
|
|
2077
|
+
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*\}\}$/)]),
|
|
2078
|
+
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*\}\}$/)]),
|
|
2079
|
+
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)
|
|
2157
2080
|
}).strict();
|
|
2158
2081
|
|
|
2159
2082
|
export const svgRectangleShapeSchema = svgshapesSvgRectangleShapeSchema;
|
|
@@ -2164,9 +2087,9 @@ export const svgRectangleShapeSchema = svgshapesSvgRectangleShapeSchema;
|
|
|
2164
2087
|
*
|
|
2165
2088
|
*/
|
|
2166
2089
|
export const svgshapesSvgRingShapeSchema = z.object({
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2090
|
+
type: z.enum(['ring']),
|
|
2091
|
+
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*\}\}$/)]),
|
|
2092
|
+
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*\}\}$/)])
|
|
2170
2093
|
}).strict();
|
|
2171
2094
|
|
|
2172
2095
|
export const svgRingShapeSchema = svgshapesSvgRingShapeSchema;
|
|
@@ -2178,10 +2101,10 @@ export const svgRingShapeSchema = svgshapesSvgRingShapeSchema;
|
|
|
2178
2101
|
*
|
|
2179
2102
|
*/
|
|
2180
2103
|
export const svgshapesSvgStarShapeSchema = z.object({
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2104
|
+
type: z.enum(['star']),
|
|
2105
|
+
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*\}\}$/)]),
|
|
2106
|
+
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*\}\}$/)]),
|
|
2107
|
+
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*\}\}$/)])
|
|
2185
2108
|
}).strict();
|
|
2186
2109
|
|
|
2187
2110
|
export const svgStarShapeSchema = svgshapesSvgStarShapeSchema;
|
|
@@ -2302,8 +2225,8 @@ export const svgAssetSchema = svgassetSvgAssetSchema;
|
|
|
2302
2225
|
* Configure the id and optional merge fields to render a template by id.
|
|
2303
2226
|
*/
|
|
2304
2227
|
export const templaterenderTemplateRenderSchema = z.object({
|
|
2305
|
-
|
|
2306
|
-
|
|
2228
|
+
id: z.string(),
|
|
2229
|
+
merge: z.optional(z.array(mergefieldMergeFieldSchema))
|
|
2307
2230
|
}).strict();
|
|
2308
2231
|
|
|
2309
2232
|
export const templateRenderSchema = templaterenderTemplateRenderSchema;
|
|
@@ -2312,8 +2235,16 @@ export const templateRenderSchema = templaterenderTemplateRenderSchema;
|
|
|
2312
2235
|
* Horizontal and vertical alignment properties for text.
|
|
2313
2236
|
*/
|
|
2314
2237
|
export const textpropertiesTextAlignmentSchema = z.object({
|
|
2315
|
-
|
|
2316
|
-
|
|
2238
|
+
horizontal: z.optional(z.enum([
|
|
2239
|
+
'left',
|
|
2240
|
+
'center',
|
|
2241
|
+
'right'
|
|
2242
|
+
])),
|
|
2243
|
+
vertical: z.optional(z.enum([
|
|
2244
|
+
'top',
|
|
2245
|
+
'center',
|
|
2246
|
+
'bottom'
|
|
2247
|
+
]))
|
|
2317
2248
|
}).strict();
|
|
2318
2249
|
|
|
2319
2250
|
export const textAlignmentSchema = textpropertiesTextAlignmentSchema;
|
|
@@ -2322,18 +2253,18 @@ export const textAlignmentSchema = textpropertiesTextAlignmentSchema;
|
|
|
2322
2253
|
* Animation properties for text entrance effects.
|
|
2323
2254
|
*/
|
|
2324
2255
|
export const textpropertiesTextAnimationSchema = z.object({
|
|
2325
|
-
|
|
2326
|
-
|
|
2256
|
+
preset: z.enum(['typewriter']),
|
|
2257
|
+
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*\}\}$/)]))
|
|
2327
2258
|
}).strict();
|
|
2328
2259
|
|
|
2329
2260
|
/**
|
|
2330
2261
|
* Displays a background box behind the text.
|
|
2331
2262
|
*/
|
|
2332
2263
|
export const textpropertiesTextBackgroundSchema = z.object({
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2264
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2265
|
+
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*\}\}$/)])),
|
|
2266
|
+
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*\}\}$/)])),
|
|
2267
|
+
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*\}\}$/)]))
|
|
2337
2268
|
}).strict();
|
|
2338
2269
|
|
|
2339
2270
|
export const textBackgroundSchema = textpropertiesTextBackgroundSchema;
|
|
@@ -2342,12 +2273,12 @@ export const textBackgroundSchema = textpropertiesTextBackgroundSchema;
|
|
|
2342
2273
|
* Font properties for text.
|
|
2343
2274
|
*/
|
|
2344
2275
|
export const textpropertiesTextFontSchema = z.object({
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2276
|
+
family: z.optional(z.string()),
|
|
2277
|
+
color: z.optional(z.string()),
|
|
2278
|
+
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*\}\}$/)])),
|
|
2279
|
+
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*\}\}$/)])),
|
|
2280
|
+
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*\}\}$/)])),
|
|
2281
|
+
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*\}\}$/)]))
|
|
2351
2282
|
}).strict();
|
|
2352
2283
|
|
|
2353
2284
|
export const textFontSchema = textpropertiesTextFontSchema;
|
|
@@ -2356,8 +2287,8 @@ export const textFontSchema = textpropertiesTextFontSchema;
|
|
|
2356
2287
|
* Text stroke (outline) properties.
|
|
2357
2288
|
*/
|
|
2358
2289
|
export const textpropertiesTextStrokeSchema = z.object({
|
|
2359
|
-
|
|
2360
|
-
|
|
2290
|
+
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*\}\}$/)])),
|
|
2291
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
|
|
2361
2292
|
}).strict();
|
|
2362
2293
|
|
|
2363
2294
|
/**
|
|
@@ -2366,16 +2297,16 @@ export const textpropertiesTextStrokeSchema = z.object({
|
|
|
2366
2297
|
*
|
|
2367
2298
|
*/
|
|
2368
2299
|
export const textassetTextAssetSchema = z.object({
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2300
|
+
type: z.enum(['text']),
|
|
2301
|
+
text: z.string(),
|
|
2302
|
+
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*\}\}$/)])),
|
|
2303
|
+
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*\}\}$/)])),
|
|
2304
|
+
font: z.optional(textpropertiesTextFontSchema),
|
|
2305
|
+
background: z.optional(textpropertiesTextBackgroundSchema),
|
|
2306
|
+
alignment: z.optional(textpropertiesTextAlignmentSchema),
|
|
2307
|
+
stroke: z.optional(textpropertiesTextStrokeSchema),
|
|
2308
|
+
animation: z.optional(textpropertiesTextAnimationSchema),
|
|
2309
|
+
ellipsis: z.optional(z.string())
|
|
2379
2310
|
}).strict();
|
|
2380
2311
|
|
|
2381
2312
|
export const textAssetSchema = textassetTextAssetSchema;
|
|
@@ -2384,11 +2315,11 @@ export const textAssetSchema = textassetTextAssetSchema;
|
|
|
2384
2315
|
* The TextToImageAsset lets you create a dynamic image from a text prompt.
|
|
2385
2316
|
*/
|
|
2386
2317
|
export const texttoimageassetTextToImageAssetSchema = z.object({
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2318
|
+
type: z.enum(['text-to-image']),
|
|
2319
|
+
prompt: z.string(),
|
|
2320
|
+
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*\}\}$/)])),
|
|
2321
|
+
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*\}\}$/)])),
|
|
2322
|
+
crop: z.optional(cropCropSchema)
|
|
2392
2323
|
}).strict();
|
|
2393
2324
|
|
|
2394
2325
|
export const textToImageAssetSchema = texttoimageassetTextToImageAssetSchema;
|
|
@@ -2397,8 +2328,8 @@ export const textToImageAssetSchema = texttoimageassetTextToImageAssetSchema;
|
|
|
2397
2328
|
* Generate a thumbnail image for the video or image at a specific point from the timeline.
|
|
2398
2329
|
*/
|
|
2399
2330
|
export const thumbnailThumbnailSchema = z.object({
|
|
2400
|
-
|
|
2401
|
-
|
|
2331
|
+
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*\}\}$/)]),
|
|
2332
|
+
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*\}\}$/)])
|
|
2402
2333
|
}).strict();
|
|
2403
2334
|
|
|
2404
2335
|
export const thumbnailSchema = thumbnailThumbnailSchema;
|
|
@@ -2407,35 +2338,64 @@ export const thumbnailSchema = thumbnailThumbnailSchema;
|
|
|
2407
2338
|
* The output format, render range and type of media to generate.
|
|
2408
2339
|
*/
|
|
2409
2340
|
export const outputOutputSchema = z.object({
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
z.union([
|
|
2418
|
-
z.literal(12),
|
|
2419
|
-
z.literal(15),
|
|
2420
|
-
z.literal(23.976),
|
|
2421
|
-
z.literal(24),
|
|
2422
|
-
z.literal(25),
|
|
2423
|
-
z.literal(29.97),
|
|
2424
|
-
z.literal(30),
|
|
2425
|
-
z.literal(48),
|
|
2426
|
-
z.literal(50),
|
|
2427
|
-
z.literal(59.94),
|
|
2428
|
-
z.literal(60),
|
|
2341
|
+
format: z.enum([
|
|
2342
|
+
'mp4',
|
|
2343
|
+
'gif',
|
|
2344
|
+
'mp3',
|
|
2345
|
+
'jpg',
|
|
2346
|
+
'png',
|
|
2347
|
+
'bmp'
|
|
2429
2348
|
]),
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2349
|
+
resolution: z.optional(z.enum([
|
|
2350
|
+
'preview',
|
|
2351
|
+
'mobile',
|
|
2352
|
+
'sd',
|
|
2353
|
+
'hd',
|
|
2354
|
+
'1080',
|
|
2355
|
+
'4k'
|
|
2356
|
+
])),
|
|
2357
|
+
aspectRatio: z.optional(z.enum([
|
|
2358
|
+
'16:9',
|
|
2359
|
+
'9:16',
|
|
2360
|
+
'1:1',
|
|
2361
|
+
'4:5',
|
|
2362
|
+
'4:3'
|
|
2363
|
+
])),
|
|
2364
|
+
size: z.optional(sizeSizeSchema),
|
|
2365
|
+
fps: z.optional(z.union([
|
|
2366
|
+
z.literal(12),
|
|
2367
|
+
z.literal(15),
|
|
2368
|
+
z.literal(23.976),
|
|
2369
|
+
z.literal(24),
|
|
2370
|
+
z.literal(25),
|
|
2371
|
+
z.literal(29.97),
|
|
2372
|
+
z.literal(30),
|
|
2373
|
+
z.literal(48),
|
|
2374
|
+
z.literal(50),
|
|
2375
|
+
z.literal(59.94),
|
|
2376
|
+
z.literal(60)
|
|
2377
|
+
])),
|
|
2378
|
+
scaleTo: z.optional(z.enum([
|
|
2379
|
+
'preview',
|
|
2380
|
+
'mobile',
|
|
2381
|
+
'sd',
|
|
2382
|
+
'hd',
|
|
2383
|
+
'1080',
|
|
2384
|
+
'4k'
|
|
2385
|
+
])),
|
|
2386
|
+
quality: z.optional(z.enum([
|
|
2387
|
+
'verylow',
|
|
2388
|
+
'low',
|
|
2389
|
+
'medium',
|
|
2390
|
+
'high',
|
|
2391
|
+
'veryhigh'
|
|
2392
|
+
])),
|
|
2393
|
+
repeat: z.optional(z.boolean()),
|
|
2394
|
+
mute: z.optional(z.boolean()),
|
|
2395
|
+
range: z.optional(rangeRangeSchema),
|
|
2396
|
+
poster: z.optional(posterPosterSchema),
|
|
2397
|
+
thumbnail: z.optional(thumbnailThumbnailSchema),
|
|
2398
|
+
destinations: z.optional(z.array(destinationsDestinationsSchema))
|
|
2439
2399
|
}).strict();
|
|
2440
2400
|
|
|
2441
2401
|
export const outputSchema = outputOutputSchema;
|
|
@@ -2444,138 +2404,134 @@ export const outputSchema = outputOutputSchema;
|
|
|
2444
2404
|
* In and out transitions for a clip - i.e. fade in and fade out
|
|
2445
2405
|
*/
|
|
2446
2406
|
export const transitionTransitionSchema = z.object({
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
"shuffleTopLeftFast",
|
|
2576
|
-
"zoom",
|
|
2577
|
-
]),
|
|
2578
|
-
),
|
|
2407
|
+
in: z.optional(z.enum([
|
|
2408
|
+
'none',
|
|
2409
|
+
'fade',
|
|
2410
|
+
'fadeSlow',
|
|
2411
|
+
'fadeFast',
|
|
2412
|
+
'reveal',
|
|
2413
|
+
'revealSlow',
|
|
2414
|
+
'revealFast',
|
|
2415
|
+
'wipeLeft',
|
|
2416
|
+
'wipeLeftSlow',
|
|
2417
|
+
'wipeLeftFast',
|
|
2418
|
+
'wipeRight',
|
|
2419
|
+
'wipeRightSlow',
|
|
2420
|
+
'wipeRightFast',
|
|
2421
|
+
'slideLeft',
|
|
2422
|
+
'slideLeftSlow',
|
|
2423
|
+
'slideLeftFast',
|
|
2424
|
+
'slideRight',
|
|
2425
|
+
'slideRightSlow',
|
|
2426
|
+
'slideRightFast',
|
|
2427
|
+
'slideUp',
|
|
2428
|
+
'slideUpSlow',
|
|
2429
|
+
'slideUpFast',
|
|
2430
|
+
'slideDown',
|
|
2431
|
+
'slideDownSlow',
|
|
2432
|
+
'slideDownFast',
|
|
2433
|
+
'carouselLeft',
|
|
2434
|
+
'carouselLeftSlow',
|
|
2435
|
+
'carouselLeftFast',
|
|
2436
|
+
'carouselRight',
|
|
2437
|
+
'carouselRightSlow',
|
|
2438
|
+
'carouselRightFast',
|
|
2439
|
+
'carouselUp',
|
|
2440
|
+
'carouselUpSlow',
|
|
2441
|
+
'carouselUpFast',
|
|
2442
|
+
'carouselDown',
|
|
2443
|
+
'carouselDownSlow',
|
|
2444
|
+
'carouselDownFast',
|
|
2445
|
+
'shuffleTopRight',
|
|
2446
|
+
'shuffleTopRightSlow',
|
|
2447
|
+
'shuffleTopRightFast',
|
|
2448
|
+
'shuffleRightTop',
|
|
2449
|
+
'shuffleRightTopSlow',
|
|
2450
|
+
'shuffleRightTopFast',
|
|
2451
|
+
'shuffleRightBottom',
|
|
2452
|
+
'shuffleRightBottomSlow',
|
|
2453
|
+
'shuffleRightBottomFast',
|
|
2454
|
+
'shuffleBottomRight',
|
|
2455
|
+
'shuffleBottomRightSlow',
|
|
2456
|
+
'shuffleBottomRightFast',
|
|
2457
|
+
'shuffleBottomLeft',
|
|
2458
|
+
'shuffleBottomLeftSlow',
|
|
2459
|
+
'shuffleBottomLeftFast',
|
|
2460
|
+
'shuffleLeftBottom',
|
|
2461
|
+
'shuffleLeftBottomSlow',
|
|
2462
|
+
'shuffleLeftBottomFast',
|
|
2463
|
+
'shuffleLeftTop',
|
|
2464
|
+
'shuffleLeftTopSlow',
|
|
2465
|
+
'shuffleLeftTopFast',
|
|
2466
|
+
'shuffleTopLeft',
|
|
2467
|
+
'shuffleTopLeftSlow',
|
|
2468
|
+
'shuffleTopLeftFast',
|
|
2469
|
+
'zoom'
|
|
2470
|
+
])),
|
|
2471
|
+
out: z.optional(z.enum([
|
|
2472
|
+
'none',
|
|
2473
|
+
'fade',
|
|
2474
|
+
'fadeSlow',
|
|
2475
|
+
'fadeFast',
|
|
2476
|
+
'reveal',
|
|
2477
|
+
'revealSlow',
|
|
2478
|
+
'revealFast',
|
|
2479
|
+
'wipeLeft',
|
|
2480
|
+
'wipeLeftSlow',
|
|
2481
|
+
'wipeLeftFast',
|
|
2482
|
+
'wipeRight',
|
|
2483
|
+
'wipeRightSlow',
|
|
2484
|
+
'wipeRightFast',
|
|
2485
|
+
'slideLeft',
|
|
2486
|
+
'slideLeftSlow',
|
|
2487
|
+
'slideLeftFast',
|
|
2488
|
+
'slideRight',
|
|
2489
|
+
'slideRightSlow',
|
|
2490
|
+
'slideRightFast',
|
|
2491
|
+
'slideUp',
|
|
2492
|
+
'slideUpSlow',
|
|
2493
|
+
'slideUpFast',
|
|
2494
|
+
'slideDown',
|
|
2495
|
+
'slideDownSlow',
|
|
2496
|
+
'slideDownFast',
|
|
2497
|
+
'carouselLeft',
|
|
2498
|
+
'carouselLeftSlow',
|
|
2499
|
+
'carouselLeftFast',
|
|
2500
|
+
'carouselRight',
|
|
2501
|
+
'carouselRightSlow',
|
|
2502
|
+
'carouselRightFast',
|
|
2503
|
+
'carouselUp',
|
|
2504
|
+
'carouselUpSlow',
|
|
2505
|
+
'carouselUpFast',
|
|
2506
|
+
'carouselDown',
|
|
2507
|
+
'carouselDownSlow',
|
|
2508
|
+
'carouselDownFast',
|
|
2509
|
+
'shuffleTopRight',
|
|
2510
|
+
'shuffleTopRightSlow',
|
|
2511
|
+
'shuffleTopRightFast',
|
|
2512
|
+
'shuffleRightTop',
|
|
2513
|
+
'shuffleRightTopSlow',
|
|
2514
|
+
'shuffleRightTopFast',
|
|
2515
|
+
'shuffleRightBottom',
|
|
2516
|
+
'shuffleRightBottomSlow',
|
|
2517
|
+
'shuffleRightBottomFast',
|
|
2518
|
+
'shuffleBottomRight',
|
|
2519
|
+
'shuffleBottomRightSlow',
|
|
2520
|
+
'shuffleBottomRightFast',
|
|
2521
|
+
'shuffleBottomLeft',
|
|
2522
|
+
'shuffleBottomLeftSlow',
|
|
2523
|
+
'shuffleBottomLeftFast',
|
|
2524
|
+
'shuffleLeftBottom',
|
|
2525
|
+
'shuffleLeftBottomSlow',
|
|
2526
|
+
'shuffleLeftBottomFast',
|
|
2527
|
+
'shuffleLeftTop',
|
|
2528
|
+
'shuffleLeftTopSlow',
|
|
2529
|
+
'shuffleLeftTopFast',
|
|
2530
|
+
'shuffleTopLeft',
|
|
2531
|
+
'shuffleTopLeftSlow',
|
|
2532
|
+
'shuffleTopLeftFast',
|
|
2533
|
+
'zoom'
|
|
2534
|
+
]))
|
|
2579
2535
|
}).strict();
|
|
2580
2536
|
|
|
2581
2537
|
export const transitionSchema = transitionTransitionSchema;
|
|
@@ -2591,43 +2547,45 @@ export const transitionSchema = transitionTransitionSchema;
|
|
|
2591
2547
|
* </ul>
|
|
2592
2548
|
*/
|
|
2593
2549
|
export const tweenTweenSchema = z.object({
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2550
|
+
from: z.optional(z.unknown()),
|
|
2551
|
+
to: z.optional(z.unknown()),
|
|
2552
|
+
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*\}\}$/)])),
|
|
2553
|
+
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*\}\}$/)])),
|
|
2554
|
+
interpolation: z.optional(z.enum([
|
|
2555
|
+
'linear',
|
|
2556
|
+
'bezier',
|
|
2557
|
+
'constant'
|
|
2558
|
+
])),
|
|
2559
|
+
easing: z.optional(z.enum([
|
|
2560
|
+
'ease',
|
|
2561
|
+
'easeIn',
|
|
2562
|
+
'easeOut',
|
|
2563
|
+
'easeInOut',
|
|
2564
|
+
'easeInQuad',
|
|
2565
|
+
'easeInCubic',
|
|
2566
|
+
'easeInQuart',
|
|
2567
|
+
'easeInQuint',
|
|
2568
|
+
'easeInSine',
|
|
2569
|
+
'easeInExpo',
|
|
2570
|
+
'easeInCirc',
|
|
2571
|
+
'easeInBack',
|
|
2572
|
+
'easeOutQuad',
|
|
2573
|
+
'easeOutCubic',
|
|
2574
|
+
'easeOutQuart',
|
|
2575
|
+
'easeOutQuint',
|
|
2576
|
+
'easeOutSine',
|
|
2577
|
+
'easeOutExpo',
|
|
2578
|
+
'easeOutCirc',
|
|
2579
|
+
'easeOutBack',
|
|
2580
|
+
'easeInOutQuad',
|
|
2581
|
+
'easeInOutCubic',
|
|
2582
|
+
'easeInOutQuart',
|
|
2583
|
+
'easeInOutQuint',
|
|
2584
|
+
'easeInOutSine',
|
|
2585
|
+
'easeInOutExpo',
|
|
2586
|
+
'easeInOutCirc',
|
|
2587
|
+
'easeInOutBack'
|
|
2588
|
+
]))
|
|
2631
2589
|
}).strict();
|
|
2632
2590
|
|
|
2633
2591
|
export const tweenSchema = tweenTweenSchema;
|
|
@@ -2636,14 +2594,20 @@ export const tweenSchema = tweenTweenSchema;
|
|
|
2636
2594
|
* The AudioAsset is used to add sound effects and audio at specific intervals on the timeline. The src must be a publicly accessible URL to an audio resource such as an mp3 file.
|
|
2637
2595
|
*/
|
|
2638
2596
|
export const audioassetAudioAssetSchema = z.object({
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2597
|
+
type: z.enum(['audio']),
|
|
2598
|
+
src: z.string().min(1).regex(/\S/),
|
|
2599
|
+
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*\}\}$/)])),
|
|
2600
|
+
volume: z.optional(z.union([
|
|
2601
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
2602
|
+
z.array(tweenTweenSchema)
|
|
2603
|
+
])),
|
|
2604
|
+
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*\}\}$/)])),
|
|
2605
|
+
effect: z.optional(z.enum([
|
|
2606
|
+
'none',
|
|
2607
|
+
'fadeIn',
|
|
2608
|
+
'fadeOut',
|
|
2609
|
+
'fadeInFadeOut'
|
|
2610
|
+
]))
|
|
2647
2611
|
}).strict();
|
|
2648
2612
|
|
|
2649
2613
|
export const audioAssetSchema = audioassetAudioAssetSchema;
|
|
@@ -2652,12 +2616,14 @@ export const audioAssetSchema = audioassetAudioAssetSchema;
|
|
|
2652
2616
|
* Offsets the position of an asset horizontally or vertically by a relative distance.
|
|
2653
2617
|
*/
|
|
2654
2618
|
export const offsetOffsetSchema = z.object({
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2619
|
+
x: z.optional(z.union([
|
|
2620
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
2621
|
+
z.array(tweenTweenSchema)
|
|
2622
|
+
])),
|
|
2623
|
+
y: z.optional(z.union([
|
|
2624
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
2625
|
+
z.array(tweenTweenSchema)
|
|
2626
|
+
]))
|
|
2661
2627
|
}).strict();
|
|
2662
2628
|
|
|
2663
2629
|
export const offsetSchema = offsetOffsetSchema;
|
|
@@ -2666,44 +2632,51 @@ export const offsetSchema = offsetOffsetSchema;
|
|
|
2666
2632
|
* Rotate a clip by the specified angle in degrees. Rotation origin is set based on the clips `position`.
|
|
2667
2633
|
*/
|
|
2668
2634
|
export const rotatetransformationRotateTransformationSchema = z.object({
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2635
|
+
angle: z.optional(z.union([
|
|
2636
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
2637
|
+
z.array(tweenTweenSchema)
|
|
2638
|
+
]))
|
|
2672
2639
|
}).strict();
|
|
2673
2640
|
|
|
2674
|
-
export const rotateTransformationSchema =
|
|
2675
|
-
rotatetransformationRotateTransformationSchema;
|
|
2641
|
+
export const rotateTransformationSchema = rotatetransformationRotateTransformationSchema;
|
|
2676
2642
|
|
|
2677
2643
|
/**
|
|
2678
2644
|
* Skew a clip so its edges are sheared at an angle. Use values between -100 and 100. Values over 3 or under -3 will skew the clip almost flat.
|
|
2679
2645
|
*/
|
|
2680
2646
|
export const skewtransformationSkewTransformationSchema = z.object({
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2647
|
+
x: z.optional(z.union([
|
|
2648
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
2649
|
+
z.array(tweenTweenSchema)
|
|
2650
|
+
])),
|
|
2651
|
+
y: z.optional(z.union([
|
|
2652
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
2653
|
+
z.array(tweenTweenSchema)
|
|
2654
|
+
]))
|
|
2687
2655
|
}).strict();
|
|
2688
2656
|
|
|
2689
|
-
export const skewTransformationSchema =
|
|
2690
|
-
skewtransformationSkewTransformationSchema;
|
|
2657
|
+
export const skewTransformationSchema = skewtransformationSkewTransformationSchema;
|
|
2691
2658
|
|
|
2692
2659
|
/**
|
|
2693
2660
|
* 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.
|
|
2694
2661
|
*/
|
|
2695
2662
|
export const texttospeechassetTextToSpeechAssetSchema = z.object({
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2663
|
+
type: z.enum(['text-to-speech']),
|
|
2664
|
+
text: z.string(),
|
|
2665
|
+
voice: z.string(),
|
|
2666
|
+
language: z.optional(z.string()),
|
|
2667
|
+
newscaster: z.optional(z.boolean()).default(false),
|
|
2668
|
+
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*\}\}$/)])),
|
|
2669
|
+
volume: z.optional(z.union([
|
|
2670
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
2671
|
+
z.array(tweenTweenSchema)
|
|
2672
|
+
])),
|
|
2673
|
+
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*\}\}$/)])),
|
|
2674
|
+
effect: z.optional(z.enum([
|
|
2675
|
+
'none',
|
|
2676
|
+
'fadeIn',
|
|
2677
|
+
'fadeOut',
|
|
2678
|
+
'fadeInFadeOut'
|
|
2679
|
+
]))
|
|
2707
2680
|
}).strict();
|
|
2708
2681
|
|
|
2709
2682
|
export const textToSpeechAssetSchema = texttospeechassetTextToSpeechAssetSchema;
|
|
@@ -2717,49 +2690,43 @@ export const textToSpeechAssetSchema = texttospeechassetTextToSpeechAssetSchema;
|
|
|
2717
2690
|
* @deprecated
|
|
2718
2691
|
*/
|
|
2719
2692
|
export const titleassetTitleAssetSchema = z.object({
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
"left",
|
|
2758
|
-
"topLeft",
|
|
2759
|
-
"center",
|
|
2760
|
-
]),
|
|
2761
|
-
),
|
|
2762
|
-
offset: z.optional(offsetOffsetSchema),
|
|
2693
|
+
type: z.enum(['title']),
|
|
2694
|
+
text: z.string(),
|
|
2695
|
+
style: z.optional(z.enum([
|
|
2696
|
+
'minimal',
|
|
2697
|
+
'blockbuster',
|
|
2698
|
+
'vogue',
|
|
2699
|
+
'sketchy',
|
|
2700
|
+
'skinny',
|
|
2701
|
+
'chunk',
|
|
2702
|
+
'chunkLight',
|
|
2703
|
+
'marker',
|
|
2704
|
+
'future',
|
|
2705
|
+
'subtitle'
|
|
2706
|
+
])),
|
|
2707
|
+
color: z.optional(z.string()),
|
|
2708
|
+
size: z.optional(z.enum([
|
|
2709
|
+
'xx-small',
|
|
2710
|
+
'x-small',
|
|
2711
|
+
'small',
|
|
2712
|
+
'medium',
|
|
2713
|
+
'large',
|
|
2714
|
+
'x-large',
|
|
2715
|
+
'xx-large'
|
|
2716
|
+
])),
|
|
2717
|
+
background: z.optional(z.string()),
|
|
2718
|
+
position: z.optional(z.enum([
|
|
2719
|
+
'top',
|
|
2720
|
+
'topRight',
|
|
2721
|
+
'right',
|
|
2722
|
+
'bottomRight',
|
|
2723
|
+
'bottom',
|
|
2724
|
+
'bottomLeft',
|
|
2725
|
+
'left',
|
|
2726
|
+
'topLeft',
|
|
2727
|
+
'center'
|
|
2728
|
+
])),
|
|
2729
|
+
offset: z.optional(offsetOffsetSchema)
|
|
2763
2730
|
}).strict();
|
|
2764
2731
|
|
|
2765
2732
|
export const titleAssetSchema = titleassetTitleAssetSchema;
|
|
@@ -2768,9 +2735,9 @@ export const titleAssetSchema = titleassetTitleAssetSchema;
|
|
|
2768
2735
|
* Apply one or more transformations to a clip. Transformations alter the visual properties of a clip and can be combined to create new shapes and effects.
|
|
2769
2736
|
*/
|
|
2770
2737
|
export const transformationTransformationSchema = z.object({
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2738
|
+
rotate: z.optional(rotatetransformationRotateTransformationSchema),
|
|
2739
|
+
skew: z.optional(skewtransformationSkewTransformationSchema),
|
|
2740
|
+
flip: z.optional(fliptransformationFlipTransformationSchema)
|
|
2774
2741
|
}).strict();
|
|
2775
2742
|
|
|
2776
2743
|
export const transformationSchema = transformationTransformationSchema;
|
|
@@ -2779,19 +2746,23 @@ export const transformationSchema = transformationTransformationSchema;
|
|
|
2779
2746
|
* The VideoAsset is used to create video sequences from video files. The src must be a publicly accessible URL to a video resource such as an mp4 file.
|
|
2780
2747
|
*/
|
|
2781
2748
|
export const videoassetVideoAssetSchema = z.object({
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
z.enum([
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2749
|
+
type: z.enum(['video']),
|
|
2750
|
+
src: z.string().min(1).regex(/\S/),
|
|
2751
|
+
transcode: z.optional(z.boolean()),
|
|
2752
|
+
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*\}\}$/)])),
|
|
2753
|
+
volume: z.optional(z.union([
|
|
2754
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
2755
|
+
z.array(tweenTweenSchema)
|
|
2756
|
+
])),
|
|
2757
|
+
volumeEffect: z.optional(z.enum([
|
|
2758
|
+
'none',
|
|
2759
|
+
'fadeIn',
|
|
2760
|
+
'fadeOut',
|
|
2761
|
+
'fadeInFadeOut'
|
|
2762
|
+
])),
|
|
2763
|
+
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*\}\}$/)])),
|
|
2764
|
+
crop: z.optional(cropCropSchema),
|
|
2765
|
+
chromaKey: z.optional(chromakeyChromaKeySchema)
|
|
2795
2766
|
}).strict();
|
|
2796
2767
|
|
|
2797
2768
|
export const videoAssetSchema = videoassetVideoAssetSchema;
|
|
@@ -2823,72 +2794,77 @@ export const assetSchema = assetAssetSchema;
|
|
|
2823
2794
|
* A clip is a container for a specific type of asset, i.e. a title, image, video, audio or html. You use a Clip to define when an asset will display on the timeline, how long it will play for and transitions, filters and effects to apply to it.
|
|
2824
2795
|
*/
|
|
2825
2796
|
export const clipClipSchema = z.object({
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
]),
|
|
2831
|
-
length: z.union([
|
|
2832
|
-
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
2833
|
-
z.union([z.string().regex(/^(auto|end|alias:\/\/[A-Za-z0-9_-]+)$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2834
|
-
]),
|
|
2835
|
-
fit: z.optional(z.enum(["cover", "contain", "crop", "none"])),
|
|
2836
|
-
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)])),
|
|
2837
|
-
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*\}\}$/)])),
|
|
2838
|
-
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*\}\}$/)])),
|
|
2839
|
-
position: z.optional(
|
|
2840
|
-
z.enum([
|
|
2841
|
-
"top",
|
|
2842
|
-
"topRight",
|
|
2843
|
-
"right",
|
|
2844
|
-
"bottomRight",
|
|
2845
|
-
"bottom",
|
|
2846
|
-
"bottomLeft",
|
|
2847
|
-
"left",
|
|
2848
|
-
"topLeft",
|
|
2849
|
-
"center",
|
|
2797
|
+
asset: assetAssetSchema,
|
|
2798
|
+
start: z.union([
|
|
2799
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
2800
|
+
z.union([z.string().regex(/^(auto|alias:\/\/[A-Za-z0-9_-]+)$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
2850
2801
|
]),
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
effect: z.optional(
|
|
2855
|
-
z.enum([
|
|
2856
|
-
"zoomIn",
|
|
2857
|
-
"zoomInSlow",
|
|
2858
|
-
"zoomInFast",
|
|
2859
|
-
"zoomOut",
|
|
2860
|
-
"zoomOutSlow",
|
|
2861
|
-
"zoomOutFast",
|
|
2862
|
-
"slideLeft",
|
|
2863
|
-
"slideLeftSlow",
|
|
2864
|
-
"slideLeftFast",
|
|
2865
|
-
"slideRight",
|
|
2866
|
-
"slideRightSlow",
|
|
2867
|
-
"slideRightFast",
|
|
2868
|
-
"slideUp",
|
|
2869
|
-
"slideUpSlow",
|
|
2870
|
-
"slideUpFast",
|
|
2871
|
-
"slideDown",
|
|
2872
|
-
"slideDownSlow",
|
|
2873
|
-
"slideDownFast",
|
|
2802
|
+
length: z.union([
|
|
2803
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
2804
|
+
z.union([z.string().regex(/^(auto|end|alias:\/\/[A-Za-z0-9_-]+)$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
2874
2805
|
]),
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2806
|
+
fit: z.optional(z.enum([
|
|
2807
|
+
'cover',
|
|
2808
|
+
'contain',
|
|
2809
|
+
'crop',
|
|
2810
|
+
'none'
|
|
2811
|
+
])),
|
|
2812
|
+
scale: z.optional(z.union([
|
|
2813
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
2814
|
+
z.array(tweenTweenSchema)
|
|
2815
|
+
])),
|
|
2816
|
+
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*\}\}$/)])),
|
|
2817
|
+
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*\}\}$/)])),
|
|
2818
|
+
position: z.optional(z.enum([
|
|
2819
|
+
'top',
|
|
2820
|
+
'topRight',
|
|
2821
|
+
'right',
|
|
2822
|
+
'bottomRight',
|
|
2823
|
+
'bottom',
|
|
2824
|
+
'bottomLeft',
|
|
2825
|
+
'left',
|
|
2826
|
+
'topLeft',
|
|
2827
|
+
'center'
|
|
2828
|
+
])),
|
|
2829
|
+
offset: z.optional(offsetOffsetSchema),
|
|
2830
|
+
transition: z.optional(transitionTransitionSchema),
|
|
2831
|
+
effect: z.optional(z.enum([
|
|
2832
|
+
'zoomIn',
|
|
2833
|
+
'zoomInSlow',
|
|
2834
|
+
'zoomInFast',
|
|
2835
|
+
'zoomOut',
|
|
2836
|
+
'zoomOutSlow',
|
|
2837
|
+
'zoomOutFast',
|
|
2838
|
+
'slideLeft',
|
|
2839
|
+
'slideLeftSlow',
|
|
2840
|
+
'slideLeftFast',
|
|
2841
|
+
'slideRight',
|
|
2842
|
+
'slideRightSlow',
|
|
2843
|
+
'slideRightFast',
|
|
2844
|
+
'slideUp',
|
|
2845
|
+
'slideUpSlow',
|
|
2846
|
+
'slideUpFast',
|
|
2847
|
+
'slideDown',
|
|
2848
|
+
'slideDownSlow',
|
|
2849
|
+
'slideDownFast'
|
|
2850
|
+
])),
|
|
2851
|
+
filter: z.optional(z.enum([
|
|
2852
|
+
'none',
|
|
2853
|
+
'blur',
|
|
2854
|
+
'boost',
|
|
2855
|
+
'contrast',
|
|
2856
|
+
'darken',
|
|
2857
|
+
'greyscale',
|
|
2858
|
+
'lighten',
|
|
2859
|
+
'muted',
|
|
2860
|
+
'negative'
|
|
2861
|
+
])),
|
|
2862
|
+
opacity: z.optional(z.union([
|
|
2863
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
2864
|
+
z.array(tweenTweenSchema)
|
|
2865
|
+
])),
|
|
2866
|
+
transform: z.optional(transformationTransformationSchema),
|
|
2867
|
+
alias: z.optional(z.union([z.string().regex(/^[A-Za-z0-9_-]+$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
|
|
2892
2868
|
}).strict();
|
|
2893
2869
|
|
|
2894
2870
|
export const clipSchema = clipClipSchema;
|
|
@@ -2910,7 +2886,7 @@ const clipClipSchemaWithFitFilter = clipClipSchema.transform((clip) => {
|
|
|
2910
2886
|
* A track contains an array of clips. Tracks are layered on top of each other in the order in the array. The top most track will render on top of those below it.
|
|
2911
2887
|
*/
|
|
2912
2888
|
export const trackTrackSchema = z.object({
|
|
2913
|
-
|
|
2889
|
+
clips: z.array(clipClipSchemaWithFitFilter).min(1)
|
|
2914
2890
|
}).strict();
|
|
2915
2891
|
|
|
2916
2892
|
export const trackSchema = trackTrackSchema;
|
|
@@ -2919,11 +2895,11 @@ export const trackSchema = trackTrackSchema;
|
|
|
2919
2895
|
* A timeline represents the contents of a video edit over time, an audio edit over time, in seconds, or an image layout. A timeline consists of layers called tracks. Tracks are composed of titles, images, audio, html or video segments referred to as clips which are placed along the track at specific starting point and lasting for a specific amount of time.
|
|
2920
2896
|
*/
|
|
2921
2897
|
export const timelineTimelineSchema = z.object({
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2898
|
+
soundtrack: z.optional(soundtrackSoundtrackSchema),
|
|
2899
|
+
background: z.optional(z.string()),
|
|
2900
|
+
fonts: z.optional(z.array(fontFontSchema)),
|
|
2901
|
+
tracks: z.array(trackTrackSchema).min(1),
|
|
2902
|
+
cache: z.optional(z.boolean())
|
|
2927
2903
|
}).strict();
|
|
2928
2904
|
|
|
2929
2905
|
export const timelineSchema = timelineTimelineSchema;
|
|
@@ -2932,12 +2908,16 @@ export const timelineSchema = timelineTimelineSchema;
|
|
|
2932
2908
|
* An edit defines the arrangement of a video on a timeline, an audio edit or an image design and the output format. Video assets are automatically preprocessed to fix common compatibility issues before rendering. You can control preprocessing behavior using the `transcode` flag on video assets.
|
|
2933
2909
|
*/
|
|
2934
2910
|
export const editEditSchema = z.object({
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2911
|
+
timeline: timelineTimelineSchema,
|
|
2912
|
+
output: outputOutputSchema,
|
|
2913
|
+
merge: z.optional(z.array(mergefieldMergeFieldSchema)),
|
|
2914
|
+
callback: z.optional(z.string()),
|
|
2915
|
+
disk: z.optional(z.enum(['local', 'mount'])),
|
|
2916
|
+
instance: z.optional(z.enum([
|
|
2917
|
+
's1',
|
|
2918
|
+
's2',
|
|
2919
|
+
'a1'
|
|
2920
|
+
]))
|
|
2941
2921
|
}).strict();
|
|
2942
2922
|
|
|
2943
2923
|
export const editSchema = editEditSchema;
|
|
@@ -2946,39 +2926,44 @@ export const editSchema = editEditSchema;
|
|
|
2946
2926
|
* The response data returned with the [RenderResponse](#tocs_renderresponse) including status and URL.
|
|
2947
2927
|
*/
|
|
2948
2928
|
export const renderresponsedataRenderResponseDataSchema = z.object({
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2929
|
+
id: z.string(),
|
|
2930
|
+
owner: z.string(),
|
|
2931
|
+
plan: z.optional(z.string()),
|
|
2932
|
+
status: z.enum([
|
|
2933
|
+
'queued',
|
|
2934
|
+
'fetching',
|
|
2935
|
+
'preprocessing',
|
|
2936
|
+
'rendering',
|
|
2937
|
+
'saving',
|
|
2938
|
+
'done',
|
|
2939
|
+
'failed'
|
|
2940
|
+
]),
|
|
2941
|
+
error: z.optional(z.string()),
|
|
2942
|
+
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*\}\}$/)])),
|
|
2943
|
+
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*\}\}$/)])),
|
|
2944
|
+
url: z.optional(z.string()),
|
|
2945
|
+
poster: z.optional(z.union([
|
|
2946
|
+
z.string(),
|
|
2947
|
+
z.null()
|
|
2948
|
+
])),
|
|
2949
|
+
thumbnail: z.optional(z.union([
|
|
2950
|
+
z.string(),
|
|
2951
|
+
z.null()
|
|
2952
|
+
])),
|
|
2953
|
+
data: z.optional(editEditSchema),
|
|
2954
|
+
created: z.optional(z.string()),
|
|
2955
|
+
updated: z.optional(z.string())
|
|
2956
|
+
}).strict();
|
|
2957
|
+
|
|
2958
|
+
export const renderResponseDataSchema = renderresponsedataRenderResponseDataSchema;
|
|
2974
2959
|
|
|
2975
2960
|
/**
|
|
2976
2961
|
* The response received after a [render status request](#get-render-status) is submitted. The response includes details about status of a render and the output URL.
|
|
2977
2962
|
*/
|
|
2978
2963
|
export const renderresponseRenderResponseSchema = z.object({
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2964
|
+
success: z.boolean(),
|
|
2965
|
+
message: z.string(),
|
|
2966
|
+
response: renderresponsedataRenderResponseDataSchema
|
|
2982
2967
|
}).strict();
|
|
2983
2968
|
|
|
2984
2969
|
export const renderResponseSchema = renderresponseRenderResponseSchema;
|
|
@@ -2987,41 +2972,39 @@ export const renderResponseSchema = renderresponseRenderResponseSchema;
|
|
|
2987
2972
|
* The response data returned with the [TemplateDataResponse](#tocs_templatedataresponse).
|
|
2988
2973
|
*/
|
|
2989
2974
|
export const templatedataresponsedataTemplateDataResponseDataSchema = z.object({
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2975
|
+
id: z.string(),
|
|
2976
|
+
name: z.string(),
|
|
2977
|
+
owner: z.string(),
|
|
2978
|
+
template: editEditSchema
|
|
2994
2979
|
}).strict();
|
|
2995
2980
|
|
|
2996
|
-
export const templateDataResponseDataSchema =
|
|
2997
|
-
templatedataresponsedataTemplateDataResponseDataSchema;
|
|
2981
|
+
export const templateDataResponseDataSchema = templatedataresponsedataTemplateDataResponseDataSchema;
|
|
2998
2982
|
|
|
2999
2983
|
/**
|
|
3000
2984
|
* The template data including the template name and [Edit](#tocs_edit).
|
|
3001
2985
|
*/
|
|
3002
2986
|
export const templatedataresponseTemplateDataResponseSchema = z.object({
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
2987
|
+
success: z.boolean(),
|
|
2988
|
+
message: z.string(),
|
|
2989
|
+
response: templatedataresponsedataTemplateDataResponseDataSchema
|
|
3006
2990
|
}).strict();
|
|
3007
2991
|
|
|
3008
|
-
export const templateDataResponseSchema =
|
|
3009
|
-
templatedataresponseTemplateDataResponseSchema;
|
|
2992
|
+
export const templateDataResponseSchema = templatedataresponseTemplateDataResponseSchema;
|
|
3010
2993
|
|
|
3011
2994
|
/**
|
|
3012
2995
|
* A template is a saved [Edit](#tocs_edit) than can be loaded and re-used.
|
|
3013
2996
|
*/
|
|
3014
2997
|
export const templateTemplateSchema = z.object({
|
|
3015
|
-
|
|
3016
|
-
|
|
2998
|
+
name: z.string(),
|
|
2999
|
+
template: z.optional(editEditSchema)
|
|
3017
3000
|
}).strict();
|
|
3018
3001
|
|
|
3019
3002
|
export const templateSchema = templateTemplateSchema;
|
|
3020
3003
|
|
|
3021
3004
|
export const postRenderRequest = z.object({
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3005
|
+
body: editEditSchema,
|
|
3006
|
+
path: z.optional(z.never()),
|
|
3007
|
+
query: z.optional(z.never())
|
|
3025
3008
|
}).strict();
|
|
3026
3009
|
|
|
3027
3010
|
/**
|
|
@@ -3030,20 +3013,14 @@ export const postRenderRequest = z.object({
|
|
|
3030
3013
|
export const postRenderResponse = queuedresponseQueuedResponseSchema;
|
|
3031
3014
|
|
|
3032
3015
|
export const getRenderRequest = z.object({
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
.string()
|
|
3037
|
-
.regex(
|
|
3038
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
3039
|
-
),
|
|
3040
|
-
}),
|
|
3041
|
-
query: z.optional(
|
|
3042
|
-
z.object({
|
|
3043
|
-
data: z.optional(z.boolean()),
|
|
3044
|
-
merged: z.optional(z.boolean()),
|
|
3016
|
+
body: z.optional(z.never()),
|
|
3017
|
+
path: z.object({
|
|
3018
|
+
id: z.union([z.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
3045
3019
|
}),
|
|
3046
|
-
|
|
3020
|
+
query: z.optional(z.object({
|
|
3021
|
+
data: z.optional(z.boolean()),
|
|
3022
|
+
merged: z.optional(z.boolean())
|
|
3023
|
+
}))
|
|
3047
3024
|
}).strict();
|
|
3048
3025
|
|
|
3049
3026
|
/**
|
|
@@ -3052,21 +3029,20 @@ export const getRenderRequest = z.object({
|
|
|
3052
3029
|
export const getRenderResponse = renderresponseRenderResponseSchema;
|
|
3053
3030
|
|
|
3054
3031
|
export const getTemplatesRequest = z.object({
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3032
|
+
body: z.optional(z.never()),
|
|
3033
|
+
path: z.optional(z.never()),
|
|
3034
|
+
query: z.optional(z.never())
|
|
3058
3035
|
}).strict();
|
|
3059
3036
|
|
|
3060
3037
|
/**
|
|
3061
3038
|
* The list of templates stored against a users account
|
|
3062
3039
|
*/
|
|
3063
|
-
export const getTemplatesResponse =
|
|
3064
|
-
templatelistresponseTemplateListResponseSchema;
|
|
3040
|
+
export const getTemplatesResponse = templatelistresponseTemplateListResponseSchema;
|
|
3065
3041
|
|
|
3066
3042
|
export const postTemplateRequest = z.object({
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3043
|
+
body: templateTemplateSchema,
|
|
3044
|
+
path: z.optional(z.never()),
|
|
3045
|
+
query: z.optional(z.never())
|
|
3070
3046
|
}).strict();
|
|
3071
3047
|
|
|
3072
3048
|
/**
|
|
@@ -3075,15 +3051,11 @@ export const postTemplateRequest = z.object({
|
|
|
3075
3051
|
export const postTemplateResponse = templateresponseTemplateResponseSchema;
|
|
3076
3052
|
|
|
3077
3053
|
export const deleteTemplateRequest = z.object({
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
3084
|
-
),
|
|
3085
|
-
}),
|
|
3086
|
-
query: z.optional(z.never()),
|
|
3054
|
+
body: z.optional(z.never()),
|
|
3055
|
+
path: z.object({
|
|
3056
|
+
id: z.union([z.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
3057
|
+
}),
|
|
3058
|
+
query: z.optional(z.never())
|
|
3087
3059
|
}).strict();
|
|
3088
3060
|
|
|
3089
3061
|
/**
|
|
@@ -3092,33 +3064,24 @@ export const deleteTemplateRequest = z.object({
|
|
|
3092
3064
|
export const deleteTemplateResponse = z.void();
|
|
3093
3065
|
|
|
3094
3066
|
export const getTemplateRequest = z.object({
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
3101
|
-
),
|
|
3102
|
-
}),
|
|
3103
|
-
query: z.optional(z.never()),
|
|
3067
|
+
body: z.optional(z.never()),
|
|
3068
|
+
path: z.object({
|
|
3069
|
+
id: z.union([z.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
3070
|
+
}),
|
|
3071
|
+
query: z.optional(z.never())
|
|
3104
3072
|
}).strict();
|
|
3105
3073
|
|
|
3106
3074
|
/**
|
|
3107
3075
|
* The template details including the [Edit](#tocs_edit)
|
|
3108
3076
|
*/
|
|
3109
|
-
export const getTemplateResponse =
|
|
3110
|
-
templatedataresponseTemplateDataResponseSchema;
|
|
3077
|
+
export const getTemplateResponse = templatedataresponseTemplateDataResponseSchema;
|
|
3111
3078
|
|
|
3112
3079
|
export const putTemplateRequest = z.object({
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
3119
|
-
),
|
|
3120
|
-
}),
|
|
3121
|
-
query: z.optional(z.never()),
|
|
3080
|
+
body: templateTemplateSchema,
|
|
3081
|
+
path: z.object({
|
|
3082
|
+
id: z.union([z.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
3083
|
+
}),
|
|
3084
|
+
query: z.optional(z.never())
|
|
3122
3085
|
}).strict();
|
|
3123
3086
|
|
|
3124
3087
|
/**
|
|
@@ -3127,9 +3090,9 @@ export const putTemplateRequest = z.object({
|
|
|
3127
3090
|
export const putTemplateResponse = templateresponseTemplateResponseSchema;
|
|
3128
3091
|
|
|
3129
3092
|
export const postTemplateRenderRequest = z.object({
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3093
|
+
body: templaterenderTemplateRenderSchema,
|
|
3094
|
+
path: z.optional(z.never()),
|
|
3095
|
+
query: z.optional(z.never())
|
|
3133
3096
|
}).strict();
|
|
3134
3097
|
|
|
3135
3098
|
/**
|
|
@@ -3138,11 +3101,11 @@ export const postTemplateRenderRequest = z.object({
|
|
|
3138
3101
|
export const postTemplateRenderResponse = queuedresponseQueuedResponseSchema;
|
|
3139
3102
|
|
|
3140
3103
|
export const probeRequest = z.object({
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3104
|
+
body: z.optional(z.never()),
|
|
3105
|
+
path: z.object({
|
|
3106
|
+
url: z.string()
|
|
3107
|
+
}),
|
|
3108
|
+
query: z.optional(z.never())
|
|
3146
3109
|
}).strict();
|
|
3147
3110
|
|
|
3148
3111
|
/**
|
|
@@ -3151,15 +3114,11 @@ export const probeRequest = z.object({
|
|
|
3151
3114
|
export const probeResponse = proberesponseProbeResponseSchema;
|
|
3152
3115
|
|
|
3153
3116
|
export const deleteAssetRequest = z.object({
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
3160
|
-
),
|
|
3161
|
-
}),
|
|
3162
|
-
query: z.optional(z.never()),
|
|
3117
|
+
body: z.optional(z.never()),
|
|
3118
|
+
path: z.object({
|
|
3119
|
+
id: z.union([z.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
3120
|
+
}),
|
|
3121
|
+
query: z.optional(z.never())
|
|
3163
3122
|
}).strict();
|
|
3164
3123
|
|
|
3165
3124
|
/**
|
|
@@ -3168,15 +3127,11 @@ export const deleteAssetRequest = z.object({
|
|
|
3168
3127
|
export const deleteAssetResponse = z.void();
|
|
3169
3128
|
|
|
3170
3129
|
export const getAssetRequest = z.object({
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
3177
|
-
),
|
|
3178
|
-
}),
|
|
3179
|
-
query: z.optional(z.never()),
|
|
3130
|
+
body: z.optional(z.never()),
|
|
3131
|
+
path: z.object({
|
|
3132
|
+
id: z.union([z.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
3133
|
+
}),
|
|
3134
|
+
query: z.optional(z.never())
|
|
3180
3135
|
}).strict();
|
|
3181
3136
|
|
|
3182
3137
|
/**
|
|
@@ -3185,27 +3140,22 @@ export const getAssetRequest = z.object({
|
|
|
3185
3140
|
export const getAssetResponse = assetresponseAssetResponseSchema;
|
|
3186
3141
|
|
|
3187
3142
|
export const getAssetByRenderIdRequest = z.object({
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
3194
|
-
),
|
|
3195
|
-
}),
|
|
3196
|
-
query: z.optional(z.never()),
|
|
3143
|
+
body: z.optional(z.never()),
|
|
3144
|
+
path: z.object({
|
|
3145
|
+
id: z.union([z.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
3146
|
+
}),
|
|
3147
|
+
query: z.optional(z.never())
|
|
3197
3148
|
}).strict();
|
|
3198
3149
|
|
|
3199
3150
|
/**
|
|
3200
3151
|
* Get one or more assets by render id
|
|
3201
3152
|
*/
|
|
3202
|
-
export const getAssetByRenderIdResponse =
|
|
3203
|
-
assetrenderresponseAssetRenderResponseSchema;
|
|
3153
|
+
export const getAssetByRenderIdResponse = assetrenderresponseAssetRenderResponseSchema;
|
|
3204
3154
|
|
|
3205
3155
|
export const postServeAssetRequest = z.object({
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3156
|
+
body: transferTransferSchema,
|
|
3157
|
+
path: z.optional(z.never()),
|
|
3158
|
+
query: z.optional(z.never())
|
|
3209
3159
|
}).strict();
|
|
3210
3160
|
|
|
3211
3161
|
/**
|
|
@@ -3214,9 +3164,9 @@ export const postServeAssetRequest = z.object({
|
|
|
3214
3164
|
export const postServeAssetResponse = transferresponseTransferResponseSchema;
|
|
3215
3165
|
|
|
3216
3166
|
export const getSourcesRequest = z.object({
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3167
|
+
body: z.optional(z.never()),
|
|
3168
|
+
path: z.optional(z.never()),
|
|
3169
|
+
query: z.optional(z.never())
|
|
3220
3170
|
}).strict();
|
|
3221
3171
|
|
|
3222
3172
|
/**
|
|
@@ -3225,27 +3175,22 @@ export const getSourcesRequest = z.object({
|
|
|
3225
3175
|
export const getSourcesResponse = sourcelistresponseSourceListResponseSchema;
|
|
3226
3176
|
|
|
3227
3177
|
export const postSourceRequest = z.object({
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3178
|
+
body: sourceSourceSchema,
|
|
3179
|
+
path: z.optional(z.never()),
|
|
3180
|
+
query: z.optional(z.never())
|
|
3231
3181
|
}).strict();
|
|
3232
3182
|
|
|
3233
3183
|
/**
|
|
3234
3184
|
* The queued source file details
|
|
3235
3185
|
*/
|
|
3236
|
-
export const postSourceResponse =
|
|
3237
|
-
queuedsourceresponseQueuedSourceResponseSchema;
|
|
3186
|
+
export const postSourceResponse = queuedsourceresponseQueuedSourceResponseSchema;
|
|
3238
3187
|
|
|
3239
3188
|
export const deleteSourceRequest = z.object({
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/,
|
|
3246
|
-
),
|
|
3247
|
-
}),
|
|
3248
|
-
query: z.optional(z.never()),
|
|
3189
|
+
body: z.optional(z.never()),
|
|
3190
|
+
path: z.object({
|
|
3191
|
+
id: z.union([z.string().regex(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
3192
|
+
}),
|
|
3193
|
+
query: z.optional(z.never())
|
|
3249
3194
|
}).strict();
|
|
3250
3195
|
|
|
3251
3196
|
/**
|
|
@@ -3254,15 +3199,11 @@ export const deleteSourceRequest = z.object({
|
|
|
3254
3199
|
export const deleteSourceResponse = z.void();
|
|
3255
3200
|
|
|
3256
3201
|
export const getSourceRequest = z.object({
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/,
|
|
3263
|
-
),
|
|
3264
|
-
}),
|
|
3265
|
-
query: z.optional(z.never()),
|
|
3202
|
+
body: z.optional(z.never()),
|
|
3203
|
+
path: z.object({
|
|
3204
|
+
id: z.union([z.string().regex(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
3205
|
+
}),
|
|
3206
|
+
query: z.optional(z.never())
|
|
3266
3207
|
}).strict();
|
|
3267
3208
|
|
|
3268
3209
|
/**
|
|
@@ -3271,9 +3212,9 @@ export const getSourceRequest = z.object({
|
|
|
3271
3212
|
export const getSourceResponse = sourceresponseSourceResponseSchema;
|
|
3272
3213
|
|
|
3273
3214
|
export const getUploadSignedUrlRequest = z.object({
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3215
|
+
body: z.optional(z.never()),
|
|
3216
|
+
path: z.optional(z.never()),
|
|
3217
|
+
query: z.optional(z.never())
|
|
3277
3218
|
}).strict();
|
|
3278
3219
|
|
|
3279
3220
|
/**
|
|
@@ -3282,31 +3223,25 @@ export const getUploadSignedUrlRequest = z.object({
|
|
|
3282
3223
|
export const getUploadSignedUrlResponse = uploadresponseUploadResponseSchema;
|
|
3283
3224
|
|
|
3284
3225
|
export const postGenerateAssetRequest = z.object({
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3226
|
+
body: generatedAssetGeneratedAssetSchema,
|
|
3227
|
+
path: z.optional(z.never()),
|
|
3228
|
+
query: z.optional(z.never())
|
|
3288
3229
|
}).strict();
|
|
3289
3230
|
|
|
3290
3231
|
/**
|
|
3291
3232
|
* The generated asset details
|
|
3292
3233
|
*/
|
|
3293
|
-
export const postGenerateAssetResponse =
|
|
3294
|
-
generatedAssetResponseGeneratedAssetResponseSchema;
|
|
3234
|
+
export const postGenerateAssetResponse = generatedAssetResponseGeneratedAssetResponseSchema;
|
|
3295
3235
|
|
|
3296
3236
|
export const getGeneratedAssetRequest = z.object({
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/,
|
|
3303
|
-
),
|
|
3304
|
-
}),
|
|
3305
|
-
query: z.optional(z.never()),
|
|
3237
|
+
body: z.optional(z.never()),
|
|
3238
|
+
path: z.object({
|
|
3239
|
+
id: z.union([z.string().regex(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
3240
|
+
}),
|
|
3241
|
+
query: z.optional(z.never())
|
|
3306
3242
|
}).strict();
|
|
3307
3243
|
|
|
3308
3244
|
/**
|
|
3309
3245
|
* The generated asset details
|
|
3310
3246
|
*/
|
|
3311
|
-
export const getGeneratedAssetResponse =
|
|
3312
|
-
generatedAssetResponseGeneratedAssetResponseSchema;
|
|
3247
|
+
export const getGeneratedAssetResponse = generatedAssetResponseGeneratedAssetResponseSchema;
|