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