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