@shotstack/schemas 1.4.0 → 1.4.2
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 +16 -3
- package/dist/schema.d.ts +2 -5
- package/dist/zod/zod.gen.cjs +1668 -1032
- package/dist/zod/zod.gen.d.ts +6110 -5190
- package/dist/zod/zod.gen.js +1669 -1033
- package/dist/zod/zod.gen.ts +1552 -1640
- 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()),
|
|
475
|
+
height: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()),
|
|
625
|
+
height: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()),
|
|
1546
|
+
height: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()),
|
|
1554
|
+
thickness: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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;
|
|
@@ -2198,9 +2101,9 @@ export const svgassetSvgAssetSchema = z.object({
|
|
|
2198
2101
|
stroke: z.optional(svgpropertiesSvgStrokeSchema),
|
|
2199
2102
|
shadow: z.optional(svgpropertiesSvgShadowSchema),
|
|
2200
2103
|
transform: z.optional(svgpropertiesSvgTransformSchema),
|
|
2201
|
-
opacity: z.optional(z.preprocess(((v: unknown) => v === '' || Array.isArray(v)
|
|
2202
|
-
width: z.optional(z.preprocess(((v: unknown) => v === '' || Array.isArray(v)
|
|
2203
|
-
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) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int().gte(1).lte(4096)))),
|
|
2204
2107
|
}).superRefine((data, ctx) => {
|
|
2205
2108
|
const hasShape = data.shape !== undefined;
|
|
2206
2109
|
const hasSrc = data.src !== undefined && data.src.trim() !== "";
|
|
@@ -2241,8 +2144,8 @@ export const svgAssetSchema = svgassetSvgAssetSchema;
|
|
|
2241
2144
|
* Configure the id and optional merge fields to render a template by id.
|
|
2242
2145
|
*/
|
|
2243
2146
|
export const templaterenderTemplateRenderSchema = z.object({
|
|
2244
|
-
|
|
2245
|
-
|
|
2147
|
+
id: z.string(),
|
|
2148
|
+
merge: z.optional(z.array(mergefieldMergeFieldSchema))
|
|
2246
2149
|
});
|
|
2247
2150
|
|
|
2248
2151
|
export const templateRenderSchema = templaterenderTemplateRenderSchema;
|
|
@@ -2251,8 +2154,16 @@ export const templateRenderSchema = templaterenderTemplateRenderSchema;
|
|
|
2251
2154
|
* Horizontal and vertical alignment properties for text.
|
|
2252
2155
|
*/
|
|
2253
2156
|
export const textpropertiesTextAlignmentSchema = z.object({
|
|
2254
|
-
|
|
2255
|
-
|
|
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
|
+
]))
|
|
2256
2167
|
});
|
|
2257
2168
|
|
|
2258
2169
|
export const textAlignmentSchema = textpropertiesTextAlignmentSchema;
|
|
@@ -2261,18 +2172,18 @@ export const textAlignmentSchema = textpropertiesTextAlignmentSchema;
|
|
|
2261
2172
|
* Animation properties for text entrance effects.
|
|
2262
2173
|
*/
|
|
2263
2174
|
export const textpropertiesTextAnimationSchema = z.object({
|
|
2264
|
-
|
|
2265
|
-
|
|
2175
|
+
preset: z.enum(['typewriter']),
|
|
2176
|
+
duration: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0.1).lte(30)))
|
|
2266
2177
|
});
|
|
2267
2178
|
|
|
2268
2179
|
/**
|
|
2269
2180
|
* Displays a background box behind the text.
|
|
2270
2181
|
*/
|
|
2271
2182
|
export const textpropertiesTextBackgroundSchema = z.object({
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0)))
|
|
2276
2187
|
});
|
|
2277
2188
|
|
|
2278
2189
|
export const textBackgroundSchema = textpropertiesTextBackgroundSchema;
|
|
@@ -2281,12 +2192,12 @@ export const textBackgroundSchema = textpropertiesTextBackgroundSchema;
|
|
|
2281
2192
|
* Font properties for text.
|
|
2282
2193
|
*/
|
|
2283
2194
|
export const textpropertiesTextFontSchema = z.object({
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))
|
|
2290
2201
|
});
|
|
2291
2202
|
|
|
2292
2203
|
export const textFontSchema = textpropertiesTextFontSchema;
|
|
@@ -2295,8 +2206,8 @@ export const textFontSchema = textpropertiesTextFontSchema;
|
|
|
2295
2206
|
* Text stroke (outline) properties.
|
|
2296
2207
|
*/
|
|
2297
2208
|
export const textpropertiesTextStrokeSchema = z.object({
|
|
2298
|
-
|
|
2299
|
-
|
|
2209
|
+
width: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(10))),
|
|
2210
|
+
color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/))
|
|
2300
2211
|
});
|
|
2301
2212
|
|
|
2302
2213
|
/**
|
|
@@ -2305,16 +2216,16 @@ export const textpropertiesTextStrokeSchema = z.object({
|
|
|
2305
2216
|
*
|
|
2306
2217
|
*/
|
|
2307
2218
|
export const textassetTextAssetSchema = z.object({
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2219
|
+
type: z.enum(['text']),
|
|
2220
|
+
text: z.string(),
|
|
2221
|
+
width: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int())),
|
|
2222
|
+
height: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') 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())
|
|
2318
2229
|
});
|
|
2319
2230
|
|
|
2320
2231
|
export const textAssetSchema = textassetTextAssetSchema;
|
|
@@ -2323,11 +2234,11 @@ export const textAssetSchema = textassetTextAssetSchema;
|
|
|
2323
2234
|
* The TextToImageAsset lets you create a dynamic image from a text prompt.
|
|
2324
2235
|
*/
|
|
2325
2236
|
export const texttoimageassetTextToImageAssetSchema = z.object({
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int())),
|
|
2241
|
+
crop: z.optional(cropCropSchema)
|
|
2331
2242
|
});
|
|
2332
2243
|
|
|
2333
2244
|
export const textToImageAssetSchema = texttoimageassetTextToImageAssetSchema;
|
|
@@ -2336,8 +2247,8 @@ export const textToImageAssetSchema = texttoimageassetTextToImageAssetSchema;
|
|
|
2336
2247
|
* Generate a thumbnail image for the video or image at a specific point from the timeline.
|
|
2337
2248
|
*/
|
|
2338
2249
|
export const thumbnailThumbnailSchema = z.object({
|
|
2339
|
-
|
|
2340
|
-
|
|
2250
|
+
capture: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()),
|
|
2251
|
+
scale: z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1))
|
|
2341
2252
|
});
|
|
2342
2253
|
|
|
2343
2254
|
export const thumbnailSchema = thumbnailThumbnailSchema;
|
|
@@ -2346,35 +2257,64 @@ export const thumbnailSchema = thumbnailThumbnailSchema;
|
|
|
2346
2257
|
* The output format, render range and type of media to generate.
|
|
2347
2258
|
*/
|
|
2348
2259
|
export const outputOutputSchema = z.object({
|
|
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
|
-
|
|
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))
|
|
2378
2318
|
});
|
|
2379
2319
|
|
|
2380
2320
|
export const outputSchema = outputOutputSchema;
|
|
@@ -2383,138 +2323,134 @@ export const outputSchema = outputOutputSchema;
|
|
|
2383
2323
|
* In and out transitions for a clip - i.e. fade in and fade out
|
|
2384
2324
|
*/
|
|
2385
2325
|
export const transitionTransitionSchema = z.object({
|
|
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
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
"shuffleTopLeftFast",
|
|
2515
|
-
"zoom",
|
|
2516
|
-
])
|
|
2517
|
-
),
|
|
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
|
+
]))
|
|
2518
2454
|
});
|
|
2519
2455
|
|
|
2520
2456
|
export const transitionSchema = transitionTransitionSchema;
|
|
@@ -2530,43 +2466,45 @@ export const transitionSchema = transitionTransitionSchema;
|
|
|
2530
2466
|
* </ul>
|
|
2531
2467
|
*/
|
|
2532
2468
|
export const tweenTweenSchema = z.object({
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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
|
+
]))
|
|
2570
2508
|
});
|
|
2571
2509
|
|
|
2572
2510
|
export const tweenSchema = tweenTweenSchema;
|
|
@@ -2575,14 +2513,20 @@ export const tweenSchema = tweenTweenSchema;
|
|
|
2575
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.
|
|
2576
2514
|
*/
|
|
2577
2515
|
export const audioassetAudioAssetSchema = z.object({
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2516
|
+
type: z.enum(['audio']),
|
|
2517
|
+
src: z.string(),
|
|
2518
|
+
trim: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number())),
|
|
2519
|
+
volume: z.optional(z.union([
|
|
2520
|
+
z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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
|
+
]))
|
|
2586
2530
|
});
|
|
2587
2531
|
|
|
2588
2532
|
export const audioAssetSchema = audioassetAudioAssetSchema;
|
|
@@ -2591,12 +2535,14 @@ export const audioAssetSchema = audioassetAudioAssetSchema;
|
|
|
2591
2535
|
* Offsets the position of an asset horizontally or vertically by a relative distance.
|
|
2592
2536
|
*/
|
|
2593
2537
|
export const offsetOffsetSchema = z.object({
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2538
|
+
x: z.optional(z.union([
|
|
2539
|
+
z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(-10).lte(10)),
|
|
2544
|
+
z.array(tweenTweenSchema)
|
|
2545
|
+
]))
|
|
2600
2546
|
});
|
|
2601
2547
|
|
|
2602
2548
|
export const offsetSchema = offsetOffsetSchema;
|
|
@@ -2605,28 +2551,29 @@ export const offsetSchema = offsetOffsetSchema;
|
|
|
2605
2551
|
* Rotate a clip by the specified angle in degrees. Rotation origin is set based on the clips `position`.
|
|
2606
2552
|
*/
|
|
2607
2553
|
export const rotatetransformationRotateTransformationSchema = z.object({
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2554
|
+
angle: z.optional(z.union([
|
|
2555
|
+
z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(-360).lte(360)),
|
|
2556
|
+
z.array(tweenTweenSchema)
|
|
2557
|
+
]))
|
|
2611
2558
|
});
|
|
2612
2559
|
|
|
2613
|
-
export const rotateTransformationSchema =
|
|
2614
|
-
rotatetransformationRotateTransformationSchema;
|
|
2560
|
+
export const rotateTransformationSchema = rotatetransformationRotateTransformationSchema;
|
|
2615
2561
|
|
|
2616
2562
|
/**
|
|
2617
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.
|
|
2618
2564
|
*/
|
|
2619
2565
|
export const skewtransformationSkewTransformationSchema = z.object({
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2566
|
+
x: z.optional(z.union([
|
|
2567
|
+
z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(-100).lte(100)),
|
|
2572
|
+
z.array(tweenTweenSchema)
|
|
2573
|
+
]))
|
|
2626
2574
|
});
|
|
2627
2575
|
|
|
2628
|
-
export const skewTransformationSchema =
|
|
2629
|
-
skewtransformationSkewTransformationSchema;
|
|
2576
|
+
export const skewTransformationSchema = skewtransformationSkewTransformationSchema;
|
|
2630
2577
|
|
|
2631
2578
|
/**
|
|
2632
2579
|
* **Notice: The TitleAsset is deprecated, use the [TextAsset](#tocs_textasset) instead.**
|
|
@@ -2637,49 +2584,43 @@ export const skewTransformationSchema =
|
|
|
2637
2584
|
* @deprecated
|
|
2638
2585
|
*/
|
|
2639
2586
|
export const titleassetTitleAssetSchema = z.object({
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
"left",
|
|
2678
|
-
"topLeft",
|
|
2679
|
-
"center",
|
|
2680
|
-
])
|
|
2681
|
-
),
|
|
2682
|
-
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)
|
|
2683
2624
|
});
|
|
2684
2625
|
|
|
2685
2626
|
export const titleAssetSchema = titleassetTitleAssetSchema;
|
|
@@ -2688,9 +2629,9 @@ export const titleAssetSchema = titleassetTitleAssetSchema;
|
|
|
2688
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.
|
|
2689
2630
|
*/
|
|
2690
2631
|
export const transformationTransformationSchema = z.object({
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2632
|
+
rotate: z.optional(rotatetransformationRotateTransformationSchema),
|
|
2633
|
+
skew: z.optional(skewtransformationSkewTransformationSchema),
|
|
2634
|
+
flip: z.optional(fliptransformationFlipTransformationSchema)
|
|
2694
2635
|
});
|
|
2695
2636
|
|
|
2696
2637
|
export const transformationSchema = transformationTransformationSchema;
|
|
@@ -2699,19 +2640,23 @@ export const transformationSchema = transformationTransformationSchema;
|
|
|
2699
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.
|
|
2700
2641
|
*/
|
|
2701
2642
|
export const videoassetVideoAssetSchema = z.object({
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
z.enum([
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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)
|
|
2715
2660
|
});
|
|
2716
2661
|
|
|
2717
2662
|
export const videoAssetSchema = videoassetVideoAssetSchema;
|
|
@@ -2741,66 +2686,78 @@ export const assetSchema = assetAssetSchema;
|
|
|
2741
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.
|
|
2742
2687
|
*/
|
|
2743
2688
|
export const clipClipSchema = z.object({
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2689
|
+
asset: assetAssetSchema,
|
|
2690
|
+
start: z.union([
|
|
2691
|
+
z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; 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) return undefined; if (Array.isArray(v)) return v; 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.union([
|
|
2706
|
+
z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()),
|
|
2707
|
+
z.array(tweenTweenSchema)
|
|
2708
|
+
])),
|
|
2709
|
+
width: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int().gte(1).lte(3840))),
|
|
2710
|
+
height: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int().gte(1).lte(2160))),
|
|
2711
|
+
position: z.optional(z.enum([
|
|
2712
|
+
'top',
|
|
2713
|
+
'topRight',
|
|
2714
|
+
'right',
|
|
2715
|
+
'bottomRight',
|
|
2716
|
+
'bottom',
|
|
2717
|
+
'bottomLeft',
|
|
2718
|
+
'left',
|
|
2719
|
+
'topLeft',
|
|
2720
|
+
'center'
|
|
2721
|
+
])),
|
|
2722
|
+
offset: z.optional(offsetOffsetSchema),
|
|
2723
|
+
transition: z.optional(transitionTransitionSchema),
|
|
2724
|
+
effect: z.optional(z.enum([
|
|
2725
|
+
'zoomIn',
|
|
2726
|
+
'zoomInSlow',
|
|
2727
|
+
'zoomInFast',
|
|
2728
|
+
'zoomOut',
|
|
2729
|
+
'zoomOutSlow',
|
|
2730
|
+
'zoomOutFast',
|
|
2731
|
+
'slideLeft',
|
|
2732
|
+
'slideLeftSlow',
|
|
2733
|
+
'slideLeftFast',
|
|
2734
|
+
'slideRight',
|
|
2735
|
+
'slideRightSlow',
|
|
2736
|
+
'slideRightFast',
|
|
2737
|
+
'slideUp',
|
|
2738
|
+
'slideUpSlow',
|
|
2739
|
+
'slideUpFast',
|
|
2740
|
+
'slideDown',
|
|
2741
|
+
'slideDownSlow',
|
|
2742
|
+
'slideDownFast'
|
|
2743
|
+
])),
|
|
2744
|
+
filter: z.optional(z.enum([
|
|
2745
|
+
'none',
|
|
2746
|
+
'blur',
|
|
2747
|
+
'boost',
|
|
2748
|
+
'contrast',
|
|
2749
|
+
'darken',
|
|
2750
|
+
'greyscale',
|
|
2751
|
+
'lighten',
|
|
2752
|
+
'muted',
|
|
2753
|
+
'negative'
|
|
2754
|
+
])),
|
|
2755
|
+
opacity: z.optional(z.union([
|
|
2756
|
+
z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()),
|
|
2757
|
+
z.array(tweenTweenSchema)
|
|
2758
|
+
])),
|
|
2759
|
+
transform: z.optional(transformationTransformationSchema),
|
|
2760
|
+
alias: z.optional(z.string().regex(/^[A-Za-z0-9_-]+$/))
|
|
2804
2761
|
});
|
|
2805
2762
|
|
|
2806
2763
|
export const clipSchema = clipClipSchema;
|
|
@@ -2809,7 +2766,7 @@ export const clipSchema = clipClipSchema;
|
|
|
2809
2766
|
* 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.
|
|
2810
2767
|
*/
|
|
2811
2768
|
export const trackTrackSchema = z.object({
|
|
2812
|
-
|
|
2769
|
+
clips: z.array(clipClipSchema)
|
|
2813
2770
|
});
|
|
2814
2771
|
|
|
2815
2772
|
export const trackSchema = trackTrackSchema;
|
|
@@ -2818,11 +2775,11 @@ export const trackSchema = trackTrackSchema;
|
|
|
2818
2775
|
* 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.
|
|
2819
2776
|
*/
|
|
2820
2777
|
export const timelineTimelineSchema = z.object({
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2778
|
+
soundtrack: z.optional(soundtrackSoundtrackSchema),
|
|
2779
|
+
background: z.optional(z.string()),
|
|
2780
|
+
fonts: z.optional(z.array(fontFontSchema)),
|
|
2781
|
+
tracks: z.array(trackTrackSchema),
|
|
2782
|
+
cache: z.optional(z.boolean())
|
|
2826
2783
|
});
|
|
2827
2784
|
|
|
2828
2785
|
export const timelineSchema = timelineTimelineSchema;
|
|
@@ -2831,11 +2788,11 @@ export const timelineSchema = timelineTimelineSchema;
|
|
|
2831
2788
|
* 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.
|
|
2832
2789
|
*/
|
|
2833
2790
|
export const editEditSchema = z.object({
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2791
|
+
timeline: timelineTimelineSchema,
|
|
2792
|
+
output: outputOutputSchema,
|
|
2793
|
+
merge: z.optional(z.array(mergefieldMergeFieldSchema)),
|
|
2794
|
+
callback: z.optional(z.string()),
|
|
2795
|
+
disk: z.optional(z.enum(['local', 'mount']))
|
|
2839
2796
|
});
|
|
2840
2797
|
|
|
2841
2798
|
export const editSchema = editEditSchema;
|
|
@@ -2844,39 +2801,44 @@ export const editSchema = editEditSchema;
|
|
|
2844
2801
|
* The response data returned with the [RenderResponse](#tocs_renderresponse) including status and URL.
|
|
2845
2802
|
*/
|
|
2846
2803
|
export const renderresponsedataRenderResponseDataSchema = z.object({
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2804
|
+
id: z.string(),
|
|
2805
|
+
owner: z.string(),
|
|
2806
|
+
plan: z.optional(z.string()),
|
|
2807
|
+
status: z.enum([
|
|
2808
|
+
'queued',
|
|
2809
|
+
'fetching',
|
|
2810
|
+
'preprocessing',
|
|
2811
|
+
'rendering',
|
|
2812
|
+
'saving',
|
|
2813
|
+
'done',
|
|
2814
|
+
'failed'
|
|
2815
|
+
]),
|
|
2816
|
+
error: z.optional(z.string()),
|
|
2817
|
+
duration: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number())),
|
|
2818
|
+
renderTime: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number())),
|
|
2819
|
+
url: z.optional(z.string()),
|
|
2820
|
+
poster: z.optional(z.union([
|
|
2821
|
+
z.string(),
|
|
2822
|
+
z.null()
|
|
2823
|
+
])),
|
|
2824
|
+
thumbnail: z.optional(z.union([
|
|
2825
|
+
z.string(),
|
|
2826
|
+
z.null()
|
|
2827
|
+
])),
|
|
2828
|
+
data: z.optional(editEditSchema),
|
|
2829
|
+
created: z.optional(z.string()),
|
|
2830
|
+
updated: z.optional(z.string())
|
|
2831
|
+
});
|
|
2832
|
+
|
|
2833
|
+
export const renderResponseDataSchema = renderresponsedataRenderResponseDataSchema;
|
|
2872
2834
|
|
|
2873
2835
|
/**
|
|
2874
2836
|
* 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.
|
|
2875
2837
|
*/
|
|
2876
2838
|
export const renderresponseRenderResponseSchema = z.object({
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2839
|
+
success: z.boolean(),
|
|
2840
|
+
message: z.string(),
|
|
2841
|
+
response: renderresponsedataRenderResponseDataSchema
|
|
2880
2842
|
});
|
|
2881
2843
|
|
|
2882
2844
|
export const renderResponseSchema = renderresponseRenderResponseSchema;
|
|
@@ -2885,41 +2847,39 @@ export const renderResponseSchema = renderresponseRenderResponseSchema;
|
|
|
2885
2847
|
* The response data returned with the [TemplateDataResponse](#tocs_templatedataresponse).
|
|
2886
2848
|
*/
|
|
2887
2849
|
export const templatedataresponsedataTemplateDataResponseDataSchema = z.object({
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2850
|
+
id: z.string(),
|
|
2851
|
+
name: z.string(),
|
|
2852
|
+
owner: z.string(),
|
|
2853
|
+
template: editEditSchema
|
|
2892
2854
|
});
|
|
2893
2855
|
|
|
2894
|
-
export const templateDataResponseDataSchema =
|
|
2895
|
-
templatedataresponsedataTemplateDataResponseDataSchema;
|
|
2856
|
+
export const templateDataResponseDataSchema = templatedataresponsedataTemplateDataResponseDataSchema;
|
|
2896
2857
|
|
|
2897
2858
|
/**
|
|
2898
2859
|
* The template data including the template name and [Edit](#tocs_edit).
|
|
2899
2860
|
*/
|
|
2900
2861
|
export const templatedataresponseTemplateDataResponseSchema = z.object({
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2862
|
+
success: z.boolean(),
|
|
2863
|
+
message: z.string(),
|
|
2864
|
+
response: templatedataresponsedataTemplateDataResponseDataSchema
|
|
2904
2865
|
});
|
|
2905
2866
|
|
|
2906
|
-
export const templateDataResponseSchema =
|
|
2907
|
-
templatedataresponseTemplateDataResponseSchema;
|
|
2867
|
+
export const templateDataResponseSchema = templatedataresponseTemplateDataResponseSchema;
|
|
2908
2868
|
|
|
2909
2869
|
/**
|
|
2910
2870
|
* A template is a saved [Edit](#tocs_edit) than can be loaded and re-used.
|
|
2911
2871
|
*/
|
|
2912
2872
|
export const templateTemplateSchema = z.object({
|
|
2913
|
-
|
|
2914
|
-
|
|
2873
|
+
name: z.string(),
|
|
2874
|
+
template: z.optional(editEditSchema)
|
|
2915
2875
|
});
|
|
2916
2876
|
|
|
2917
2877
|
export const templateSchema = templateTemplateSchema;
|
|
2918
2878
|
|
|
2919
2879
|
export const postRenderRequest = z.object({
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2880
|
+
body: editEditSchema,
|
|
2881
|
+
path: z.optional(z.never()),
|
|
2882
|
+
query: z.optional(z.never())
|
|
2923
2883
|
});
|
|
2924
2884
|
|
|
2925
2885
|
/**
|
|
@@ -2928,20 +2888,14 @@ export const postRenderRequest = z.object({
|
|
|
2928
2888
|
export const postRenderResponse = queuedresponseQueuedResponseSchema;
|
|
2929
2889
|
|
|
2930
2890
|
export const getRenderRequest = z.object({
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
query: z.optional(
|
|
2940
|
-
z.object({
|
|
2941
|
-
data: z.optional(z.boolean()),
|
|
2942
|
-
merged: z.optional(z.boolean()),
|
|
2943
|
-
})
|
|
2944
|
-
),
|
|
2891
|
+
body: z.optional(z.never()),
|
|
2892
|
+
path: z.object({
|
|
2893
|
+
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}$/)
|
|
2894
|
+
}),
|
|
2895
|
+
query: z.optional(z.object({
|
|
2896
|
+
data: z.optional(z.boolean()),
|
|
2897
|
+
merged: z.optional(z.boolean())
|
|
2898
|
+
}))
|
|
2945
2899
|
});
|
|
2946
2900
|
|
|
2947
2901
|
/**
|
|
@@ -2950,21 +2904,20 @@ export const getRenderRequest = z.object({
|
|
|
2950
2904
|
export const getRenderResponse = renderresponseRenderResponseSchema;
|
|
2951
2905
|
|
|
2952
2906
|
export const getTemplatesRequest = z.object({
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2907
|
+
body: z.optional(z.never()),
|
|
2908
|
+
path: z.optional(z.never()),
|
|
2909
|
+
query: z.optional(z.never())
|
|
2956
2910
|
});
|
|
2957
2911
|
|
|
2958
2912
|
/**
|
|
2959
2913
|
* The list of templates stored against a users account
|
|
2960
2914
|
*/
|
|
2961
|
-
export const getTemplatesResponse =
|
|
2962
|
-
templatelistresponseTemplateListResponseSchema;
|
|
2915
|
+
export const getTemplatesResponse = templatelistresponseTemplateListResponseSchema;
|
|
2963
2916
|
|
|
2964
2917
|
export const postTemplateRequest = z.object({
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2918
|
+
body: templateTemplateSchema,
|
|
2919
|
+
path: z.optional(z.never()),
|
|
2920
|
+
query: z.optional(z.never())
|
|
2968
2921
|
});
|
|
2969
2922
|
|
|
2970
2923
|
/**
|
|
@@ -2973,15 +2926,11 @@ export const postTemplateRequest = z.object({
|
|
|
2973
2926
|
export const postTemplateResponse = templateresponseTemplateResponseSchema;
|
|
2974
2927
|
|
|
2975
2928
|
export const deleteTemplateRequest = z.object({
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
/^[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}$/
|
|
2982
|
-
),
|
|
2983
|
-
}),
|
|
2984
|
-
query: z.optional(z.never()),
|
|
2929
|
+
body: z.optional(z.never()),
|
|
2930
|
+
path: z.object({
|
|
2931
|
+
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}$/)
|
|
2932
|
+
}),
|
|
2933
|
+
query: z.optional(z.never())
|
|
2985
2934
|
});
|
|
2986
2935
|
|
|
2987
2936
|
/**
|
|
@@ -2990,33 +2939,24 @@ export const deleteTemplateRequest = z.object({
|
|
|
2990
2939
|
export const deleteTemplateResponse = z.void();
|
|
2991
2940
|
|
|
2992
2941
|
export const getTemplateRequest = z.object({
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
/^[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}$/
|
|
2999
|
-
),
|
|
3000
|
-
}),
|
|
3001
|
-
query: z.optional(z.never()),
|
|
2942
|
+
body: z.optional(z.never()),
|
|
2943
|
+
path: z.object({
|
|
2944
|
+
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}$/)
|
|
2945
|
+
}),
|
|
2946
|
+
query: z.optional(z.never())
|
|
3002
2947
|
});
|
|
3003
2948
|
|
|
3004
2949
|
/**
|
|
3005
2950
|
* The template details including the [Edit](#tocs_edit)
|
|
3006
2951
|
*/
|
|
3007
|
-
export const getTemplateResponse =
|
|
3008
|
-
templatedataresponseTemplateDataResponseSchema;
|
|
2952
|
+
export const getTemplateResponse = templatedataresponseTemplateDataResponseSchema;
|
|
3009
2953
|
|
|
3010
2954
|
export const putTemplateRequest = z.object({
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
/^[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}$/
|
|
3017
|
-
),
|
|
3018
|
-
}),
|
|
3019
|
-
query: z.optional(z.never()),
|
|
2955
|
+
body: templateTemplateSchema,
|
|
2956
|
+
path: z.object({
|
|
2957
|
+
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}$/)
|
|
2958
|
+
}),
|
|
2959
|
+
query: z.optional(z.never())
|
|
3020
2960
|
});
|
|
3021
2961
|
|
|
3022
2962
|
/**
|
|
@@ -3025,9 +2965,9 @@ export const putTemplateRequest = z.object({
|
|
|
3025
2965
|
export const putTemplateResponse = templateresponseTemplateResponseSchema;
|
|
3026
2966
|
|
|
3027
2967
|
export const postTemplateRenderRequest = z.object({
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
2968
|
+
body: templaterenderTemplateRenderSchema,
|
|
2969
|
+
path: z.optional(z.never()),
|
|
2970
|
+
query: z.optional(z.never())
|
|
3031
2971
|
});
|
|
3032
2972
|
|
|
3033
2973
|
/**
|
|
@@ -3036,11 +2976,11 @@ export const postTemplateRenderRequest = z.object({
|
|
|
3036
2976
|
export const postTemplateRenderResponse = queuedresponseQueuedResponseSchema;
|
|
3037
2977
|
|
|
3038
2978
|
export const probeRequest = z.object({
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
2979
|
+
body: z.optional(z.never()),
|
|
2980
|
+
path: z.object({
|
|
2981
|
+
url: z.string()
|
|
2982
|
+
}),
|
|
2983
|
+
query: z.optional(z.never())
|
|
3044
2984
|
});
|
|
3045
2985
|
|
|
3046
2986
|
/**
|
|
@@ -3049,15 +2989,11 @@ export const probeRequest = z.object({
|
|
|
3049
2989
|
export const probeResponse = proberesponseProbeResponseSchema;
|
|
3050
2990
|
|
|
3051
2991
|
export const deleteAssetRequest = z.object({
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
/^[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}$/
|
|
3058
|
-
),
|
|
3059
|
-
}),
|
|
3060
|
-
query: z.optional(z.never()),
|
|
2992
|
+
body: z.optional(z.never()),
|
|
2993
|
+
path: z.object({
|
|
2994
|
+
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}$/)
|
|
2995
|
+
}),
|
|
2996
|
+
query: z.optional(z.never())
|
|
3061
2997
|
});
|
|
3062
2998
|
|
|
3063
2999
|
/**
|
|
@@ -3066,15 +3002,11 @@ export const deleteAssetRequest = z.object({
|
|
|
3066
3002
|
export const deleteAssetResponse = z.void();
|
|
3067
3003
|
|
|
3068
3004
|
export const getAssetRequest = z.object({
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
/^[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}$/
|
|
3075
|
-
),
|
|
3076
|
-
}),
|
|
3077
|
-
query: z.optional(z.never()),
|
|
3005
|
+
body: z.optional(z.never()),
|
|
3006
|
+
path: z.object({
|
|
3007
|
+
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}$/)
|
|
3008
|
+
}),
|
|
3009
|
+
query: z.optional(z.never())
|
|
3078
3010
|
});
|
|
3079
3011
|
|
|
3080
3012
|
/**
|
|
@@ -3083,27 +3015,22 @@ export const getAssetRequest = z.object({
|
|
|
3083
3015
|
export const getAssetResponse = assetresponseAssetResponseSchema;
|
|
3084
3016
|
|
|
3085
3017
|
export const getAssetByRenderIdRequest = z.object({
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
/^[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}$/
|
|
3092
|
-
),
|
|
3093
|
-
}),
|
|
3094
|
-
query: z.optional(z.never()),
|
|
3018
|
+
body: z.optional(z.never()),
|
|
3019
|
+
path: z.object({
|
|
3020
|
+
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}$/)
|
|
3021
|
+
}),
|
|
3022
|
+
query: z.optional(z.never())
|
|
3095
3023
|
});
|
|
3096
3024
|
|
|
3097
3025
|
/**
|
|
3098
3026
|
* Get one or more assets by render id
|
|
3099
3027
|
*/
|
|
3100
|
-
export const getAssetByRenderIdResponse =
|
|
3101
|
-
assetrenderresponseAssetRenderResponseSchema;
|
|
3028
|
+
export const getAssetByRenderIdResponse = assetrenderresponseAssetRenderResponseSchema;
|
|
3102
3029
|
|
|
3103
3030
|
export const postServeAssetRequest = z.object({
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3031
|
+
body: transferTransferSchema,
|
|
3032
|
+
path: z.optional(z.never()),
|
|
3033
|
+
query: z.optional(z.never())
|
|
3107
3034
|
});
|
|
3108
3035
|
|
|
3109
3036
|
/**
|
|
@@ -3112,9 +3039,9 @@ export const postServeAssetRequest = z.object({
|
|
|
3112
3039
|
export const postServeAssetResponse = transferresponseTransferResponseSchema;
|
|
3113
3040
|
|
|
3114
3041
|
export const getSourcesRequest = z.object({
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3042
|
+
body: z.optional(z.never()),
|
|
3043
|
+
path: z.optional(z.never()),
|
|
3044
|
+
query: z.optional(z.never())
|
|
3118
3045
|
});
|
|
3119
3046
|
|
|
3120
3047
|
/**
|
|
@@ -3123,27 +3050,22 @@ export const getSourcesRequest = z.object({
|
|
|
3123
3050
|
export const getSourcesResponse = sourcelistresponseSourceListResponseSchema;
|
|
3124
3051
|
|
|
3125
3052
|
export const postSourceRequest = z.object({
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3053
|
+
body: sourceSourceSchema,
|
|
3054
|
+
path: z.optional(z.never()),
|
|
3055
|
+
query: z.optional(z.never())
|
|
3129
3056
|
});
|
|
3130
3057
|
|
|
3131
3058
|
/**
|
|
3132
3059
|
* The queued source file details
|
|
3133
3060
|
*/
|
|
3134
|
-
export const postSourceResponse =
|
|
3135
|
-
queuedsourceresponseQueuedSourceResponseSchema;
|
|
3061
|
+
export const postSourceResponse = queuedsourceresponseQueuedSourceResponseSchema;
|
|
3136
3062
|
|
|
3137
3063
|
export const deleteSourceRequest = z.object({
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
/^[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}$/
|
|
3144
|
-
),
|
|
3145
|
-
}),
|
|
3146
|
-
query: z.optional(z.never()),
|
|
3064
|
+
body: z.optional(z.never()),
|
|
3065
|
+
path: z.object({
|
|
3066
|
+
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}$/)
|
|
3067
|
+
}),
|
|
3068
|
+
query: z.optional(z.never())
|
|
3147
3069
|
});
|
|
3148
3070
|
|
|
3149
3071
|
/**
|
|
@@ -3152,15 +3074,11 @@ export const deleteSourceRequest = z.object({
|
|
|
3152
3074
|
export const deleteSourceResponse = z.void();
|
|
3153
3075
|
|
|
3154
3076
|
export const getSourceRequest = z.object({
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
/^[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}$/
|
|
3161
|
-
),
|
|
3162
|
-
}),
|
|
3163
|
-
query: z.optional(z.never()),
|
|
3077
|
+
body: z.optional(z.never()),
|
|
3078
|
+
path: z.object({
|
|
3079
|
+
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}$/)
|
|
3080
|
+
}),
|
|
3081
|
+
query: z.optional(z.never())
|
|
3164
3082
|
});
|
|
3165
3083
|
|
|
3166
3084
|
/**
|
|
@@ -3169,9 +3087,9 @@ export const getSourceRequest = z.object({
|
|
|
3169
3087
|
export const getSourceResponse = sourceresponseSourceResponseSchema;
|
|
3170
3088
|
|
|
3171
3089
|
export const getUploadSignedUrlRequest = z.object({
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3090
|
+
body: z.optional(z.never()),
|
|
3091
|
+
path: z.optional(z.never()),
|
|
3092
|
+
query: z.optional(z.never())
|
|
3175
3093
|
});
|
|
3176
3094
|
|
|
3177
3095
|
/**
|
|
@@ -3180,31 +3098,25 @@ export const getUploadSignedUrlRequest = z.object({
|
|
|
3180
3098
|
export const getUploadSignedUrlResponse = uploadresponseUploadResponseSchema;
|
|
3181
3099
|
|
|
3182
3100
|
export const postGenerateAssetRequest = z.object({
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3101
|
+
body: generatedAssetGeneratedAssetSchema,
|
|
3102
|
+
path: z.optional(z.never()),
|
|
3103
|
+
query: z.optional(z.never())
|
|
3186
3104
|
});
|
|
3187
3105
|
|
|
3188
3106
|
/**
|
|
3189
3107
|
* The generated asset details
|
|
3190
3108
|
*/
|
|
3191
|
-
export const postGenerateAssetResponse =
|
|
3192
|
-
generatedAssetResponseGeneratedAssetResponseSchema;
|
|
3109
|
+
export const postGenerateAssetResponse = generatedAssetResponseGeneratedAssetResponseSchema;
|
|
3193
3110
|
|
|
3194
3111
|
export const getGeneratedAssetRequest = z.object({
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
/^[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}$/
|
|
3201
|
-
),
|
|
3202
|
-
}),
|
|
3203
|
-
query: z.optional(z.never()),
|
|
3112
|
+
body: z.optional(z.never()),
|
|
3113
|
+
path: z.object({
|
|
3114
|
+
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}$/)
|
|
3115
|
+
}),
|
|
3116
|
+
query: z.optional(z.never())
|
|
3204
3117
|
});
|
|
3205
3118
|
|
|
3206
3119
|
/**
|
|
3207
3120
|
* The generated asset details
|
|
3208
3121
|
*/
|
|
3209
|
-
export const getGeneratedAssetResponse =
|
|
3210
|
-
generatedAssetResponseGeneratedAssetResponseSchema;
|
|
3122
|
+
export const getGeneratedAssetResponse = generatedAssetResponseGeneratedAssetResponseSchema;
|