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