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