@shotstack/schemas 1.8.6 → 1.9.0
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 +76 -75
- package/dist/json-schema/asset.json +137 -100
- package/dist/json-schema/clip.json +137 -100
- package/dist/json-schema/edit.json +137 -100
- package/dist/json-schema/rich-caption-active-font.json +18 -1
- package/dist/json-schema/rich-caption-active.json +105 -1
- package/dist/json-schema/rich-caption-asset.json +278 -241
- package/dist/json-schema/schemas.json +150 -112
- package/dist/json-schema/timeline.json +137 -100
- package/dist/json-schema/track.json +137 -100
- package/dist/schema.d.ts +56 -47
- package/dist/zod/zod.gen.cjs +1116 -970
- package/dist/zod/zod.gen.d.ts +1921 -1709
- package/dist/zod/zod.gen.js +1112 -966
- package/dist/zod/zod.gen.ts +1605 -1674
- package/package.json +95 -79
- package/dist/json-schema/word-timing.json +0 -44
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,133 @@ 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
|
-
export const
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
direction: z.optional(z.enum(["left", "right", "up", "down"])),
|
|
1353
|
+
export const richcaptionpropertiesRichCaptionFontSchema = z.object({
|
|
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
|
+
]))
|
|
1457
1365
|
}).strict();
|
|
1458
1366
|
|
|
1459
|
-
export const richCaptionWordAnimationSchema =
|
|
1460
|
-
richcaptionpropertiesRichCaptionWordAnimationSchema;
|
|
1461
|
-
|
|
1462
1367
|
/**
|
|
1463
|
-
* Word-level
|
|
1368
|
+
* Word-level animation properties for caption effects.
|
|
1464
1369
|
*/
|
|
1465
|
-
export const
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1370
|
+
export const richcaptionpropertiesRichCaptionWordAnimationSchema = z.object({
|
|
1371
|
+
style: z.enum([
|
|
1372
|
+
'karaoke',
|
|
1373
|
+
'highlight',
|
|
1374
|
+
'pop',
|
|
1375
|
+
'fade',
|
|
1376
|
+
'slide',
|
|
1377
|
+
'bounce',
|
|
1378
|
+
'typewriter',
|
|
1379
|
+
'none'
|
|
1380
|
+
]),
|
|
1381
|
+
speed: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0.5).lte(2)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1382
|
+
direction: z.optional(z.enum([
|
|
1383
|
+
'left',
|
|
1384
|
+
'right',
|
|
1385
|
+
'up',
|
|
1386
|
+
'down'
|
|
1387
|
+
]))
|
|
1470
1388
|
}).strict();
|
|
1471
1389
|
|
|
1472
|
-
export const
|
|
1390
|
+
export const richCaptionWordAnimationSchema = richcaptionpropertiesRichCaptionWordAnimationSchema;
|
|
1473
1391
|
|
|
1474
1392
|
/**
|
|
1475
1393
|
* Text alignment properties (horizontal and vertical).
|
|
1476
1394
|
*/
|
|
1477
1395
|
export const richtextpropertiesRichTextAlignmentSchema = z.object({
|
|
1478
|
-
|
|
1479
|
-
|
|
1396
|
+
horizontal: z.optional(z.enum([
|
|
1397
|
+
'left',
|
|
1398
|
+
'center',
|
|
1399
|
+
'right'
|
|
1400
|
+
])),
|
|
1401
|
+
vertical: z.optional(z.enum([
|
|
1402
|
+
'top',
|
|
1403
|
+
'middle',
|
|
1404
|
+
'bottom'
|
|
1405
|
+
]))
|
|
1480
1406
|
}).strict();
|
|
1481
1407
|
|
|
1482
|
-
export const richTextAlignmentSchema =
|
|
1483
|
-
richtextpropertiesRichTextAlignmentSchema;
|
|
1408
|
+
export const richTextAlignmentSchema = richtextpropertiesRichTextAlignmentSchema;
|
|
1484
1409
|
|
|
1485
1410
|
/**
|
|
1486
1411
|
* Animation properties for text entrance effects.
|
|
1487
1412
|
*/
|
|
1488
1413
|
export const richtextpropertiesRichTextAnimationSchema = z.object({
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1414
|
+
preset: z.enum([
|
|
1415
|
+
'fadeIn',
|
|
1416
|
+
'slideIn',
|
|
1417
|
+
'typewriter',
|
|
1418
|
+
'ascend',
|
|
1419
|
+
'shift',
|
|
1420
|
+
'movingLetters'
|
|
1421
|
+
]),
|
|
1422
|
+
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*\}\}$/)])),
|
|
1423
|
+
style: z.optional(z.enum(['character', 'word'])),
|
|
1424
|
+
direction: z.optional(z.enum([
|
|
1425
|
+
'left',
|
|
1426
|
+
'right',
|
|
1427
|
+
'up',
|
|
1428
|
+
'down'
|
|
1429
|
+
]))
|
|
1500
1430
|
}).strict();
|
|
1501
1431
|
|
|
1502
|
-
export const richTextAnimationSchema =
|
|
1503
|
-
richtextpropertiesRichTextAnimationSchema;
|
|
1432
|
+
export const richTextAnimationSchema = richtextpropertiesRichTextAnimationSchema;
|
|
1504
1433
|
|
|
1505
1434
|
/**
|
|
1506
1435
|
* Background styling properties for the text bounding box.
|
|
1507
1436
|
*/
|
|
1508
1437
|
export const richtextpropertiesRichTextBackgroundSchema = z.object({
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1438
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1439
|
+
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),
|
|
1440
|
+
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
1441
|
}).strict();
|
|
1513
1442
|
|
|
1514
|
-
export const richTextBackgroundSchema =
|
|
1515
|
-
richtextpropertiesRichTextBackgroundSchema;
|
|
1443
|
+
export const richTextBackgroundSchema = richtextpropertiesRichTextBackgroundSchema;
|
|
1516
1444
|
|
|
1517
1445
|
/**
|
|
1518
1446
|
* Border styling properties for the text bounding box.
|
|
1519
1447
|
*/
|
|
1520
1448
|
export const richtextpropertiesRichTextBorderSchema = z.object({
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1449
|
+
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),
|
|
1450
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#000000'),
|
|
1451
|
+
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),
|
|
1452
|
+
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
1453
|
}).strict();
|
|
1526
1454
|
|
|
1527
1455
|
/**
|
|
1528
1456
|
* Gradient properties for text fill.
|
|
1529
1457
|
*/
|
|
1530
1458
|
export const richtextpropertiesRichTextGradientSchema = z.object({
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
.array(
|
|
1535
|
-
z.object({
|
|
1459
|
+
type: z.optional(z.enum(['linear', 'radial'])),
|
|
1460
|
+
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),
|
|
1461
|
+
stops: z.array(z.object({
|
|
1536
1462
|
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),
|
|
1463
|
+
color: z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
1464
|
+
})).min(2)
|
|
1541
1465
|
}).strict();
|
|
1542
1466
|
|
|
1543
1467
|
export const richTextGradientSchema = richtextpropertiesRichTextGradientSchema;
|
|
@@ -1546,21 +1470,21 @@ export const richTextGradientSchema = richtextpropertiesRichTextGradientSchema;
|
|
|
1546
1470
|
* Padding properties for individual sides of the text bounding box.
|
|
1547
1471
|
*/
|
|
1548
1472
|
export const richtextpropertiesRichTextPaddingSchema = z.object({
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1473
|
+
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),
|
|
1474
|
+
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),
|
|
1475
|
+
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),
|
|
1476
|
+
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
1477
|
}).strict();
|
|
1554
1478
|
|
|
1555
1479
|
/**
|
|
1556
1480
|
* Text shadow properties.
|
|
1557
1481
|
*/
|
|
1558
1482
|
export const richtextpropertiesRichTextShadowSchema = z.object({
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1483
|
+
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),
|
|
1484
|
+
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),
|
|
1485
|
+
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),
|
|
1486
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#000000'),
|
|
1487
|
+
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
1488
|
}).strict();
|
|
1565
1489
|
|
|
1566
1490
|
export const richTextShadowSchema = richtextpropertiesRichTextShadowSchema;
|
|
@@ -1569,9 +1493,9 @@ export const richTextShadowSchema = richtextpropertiesRichTextShadowSchema;
|
|
|
1569
1493
|
* Text stroke (outline) properties.
|
|
1570
1494
|
*/
|
|
1571
1495
|
export const richtextpropertiesRichTextStrokeSchema = z.object({
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1496
|
+
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),
|
|
1497
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#000000'),
|
|
1498
|
+
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
1499
|
}).strict();
|
|
1576
1500
|
|
|
1577
1501
|
export const richTextStrokeSchema = richtextpropertiesRichTextStrokeSchema;
|
|
@@ -1580,25 +1504,25 @@ export const richTextStrokeSchema = richtextpropertiesRichTextStrokeSchema;
|
|
|
1580
1504
|
* Styling properties for the active/highlighted word.
|
|
1581
1505
|
*/
|
|
1582
1506
|
export const richcaptionpropertiesRichCaptionActiveSchema = z.object({
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1507
|
+
font: z.optional(richcaptionpropertiesRichCaptionActiveFontSchema),
|
|
1508
|
+
stroke: z.optional(richtextpropertiesRichTextStrokeSchema),
|
|
1509
|
+
shadow: z.optional(richtextpropertiesRichTextShadowSchema),
|
|
1510
|
+
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
1511
|
}).strict();
|
|
1587
1512
|
|
|
1588
|
-
export const richCaptionActiveSchema =
|
|
1589
|
-
richcaptionpropertiesRichCaptionActiveSchema;
|
|
1513
|
+
export const richCaptionActiveSchema = richcaptionpropertiesRichCaptionActiveSchema;
|
|
1590
1514
|
|
|
1591
1515
|
/**
|
|
1592
1516
|
* Font properties for rich text.
|
|
1593
1517
|
*/
|
|
1594
1518
|
export const richtextpropertiesRichTextFontSchema = z.object({
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1519
|
+
family: z.optional(z.string()).default('Open Sans'),
|
|
1520
|
+
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),
|
|
1521
|
+
weight: z.optional(z.unknown()).default('400'),
|
|
1522
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#000000'),
|
|
1523
|
+
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),
|
|
1524
|
+
background: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1525
|
+
stroke: z.optional(richtextpropertiesRichTextStrokeSchema)
|
|
1602
1526
|
}).strict();
|
|
1603
1527
|
|
|
1604
1528
|
export const richTextFontSchema = richtextpropertiesRichTextFontSchema;
|
|
@@ -1607,14 +1531,21 @@ export const richTextFontSchema = richtextpropertiesRichTextFontSchema;
|
|
|
1607
1531
|
* Text style properties including spacing, line height, and transformations.
|
|
1608
1532
|
*/
|
|
1609
1533
|
export const richtextpropertiesRichTextStyleSchema = z.object({
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1534
|
+
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),
|
|
1535
|
+
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),
|
|
1536
|
+
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),
|
|
1537
|
+
textTransform: z.optional(z.enum([
|
|
1538
|
+
'none',
|
|
1539
|
+
'uppercase',
|
|
1540
|
+
'lowercase',
|
|
1541
|
+
'capitalize'
|
|
1542
|
+
])),
|
|
1543
|
+
textDecoration: z.optional(z.enum([
|
|
1544
|
+
'none',
|
|
1545
|
+
'underline',
|
|
1546
|
+
'line-through'
|
|
1547
|
+
])),
|
|
1548
|
+
gradient: z.optional(richtextpropertiesRichTextGradientSchema)
|
|
1618
1549
|
}).strict();
|
|
1619
1550
|
|
|
1620
1551
|
export const richTextStyleSchema = richtextpropertiesRichTextStyleSchema;
|
|
@@ -1626,25 +1557,21 @@ export const richTextStyleSchema = richtextpropertiesRichTextStyleSchema;
|
|
|
1626
1557
|
*
|
|
1627
1558
|
*/
|
|
1628
1559
|
export const richcaptionassetRichCaptionAssetSchema = z.object({
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
richcaptionpropertiesRichCaptionWordAnimationSchema
|
|
1644
|
-
),
|
|
1645
|
-
position: z.optional(z.enum(["top", "center", "bottom"])),
|
|
1646
|
-
maxWidth: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0.1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.9),
|
|
1647
|
-
maxLines: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().int().gte(1).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(2),
|
|
1560
|
+
type: z.enum(['rich-caption']),
|
|
1561
|
+
src: z.string().min(1),
|
|
1562
|
+
font: z.optional(richcaptionpropertiesRichCaptionFontSchema),
|
|
1563
|
+
style: z.optional(richtextpropertiesRichTextStyleSchema),
|
|
1564
|
+
stroke: z.optional(richtextpropertiesRichTextStrokeSchema),
|
|
1565
|
+
shadow: z.optional(richtextpropertiesRichTextShadowSchema),
|
|
1566
|
+
background: z.optional(richtextpropertiesRichTextBackgroundSchema),
|
|
1567
|
+
border: z.optional(richtextpropertiesRichTextBorderSchema),
|
|
1568
|
+
padding: z.optional(z.union([
|
|
1569
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
1570
|
+
richtextpropertiesRichTextPaddingSchema
|
|
1571
|
+
])),
|
|
1572
|
+
align: z.optional(richtextpropertiesRichTextAlignmentSchema),
|
|
1573
|
+
active: z.optional(richcaptionpropertiesRichCaptionActiveSchema),
|
|
1574
|
+
wordAnimation: z.optional(richcaptionpropertiesRichCaptionWordAnimationSchema)
|
|
1648
1575
|
}).strict();
|
|
1649
1576
|
|
|
1650
1577
|
export const richCaptionAssetSchema = richcaptionassetRichCaptionAssetSchema;
|
|
@@ -1655,19 +1582,20 @@ export const richCaptionAssetSchema = richcaptionassetRichCaptionAssetSchema;
|
|
|
1655
1582
|
*
|
|
1656
1583
|
*/
|
|
1657
1584
|
export const richtextassetRichTextAssetSchema = z.object({
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1585
|
+
type: z.enum(['rich-text']),
|
|
1586
|
+
text: z.string().max(5000),
|
|
1587
|
+
font: z.optional(richtextpropertiesRichTextFontSchema),
|
|
1588
|
+
style: z.optional(richtextpropertiesRichTextStyleSchema),
|
|
1589
|
+
stroke: z.optional(richtextpropertiesRichTextStrokeSchema),
|
|
1590
|
+
shadow: z.optional(richtextpropertiesRichTextShadowSchema),
|
|
1591
|
+
background: z.optional(richtextpropertiesRichTextBackgroundSchema),
|
|
1592
|
+
border: z.optional(richtextpropertiesRichTextBorderSchema),
|
|
1593
|
+
padding: z.optional(z.union([
|
|
1594
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
1595
|
+
richtextpropertiesRichTextPaddingSchema
|
|
1596
|
+
])),
|
|
1597
|
+
align: z.optional(richtextpropertiesRichTextAlignmentSchema),
|
|
1598
|
+
animation: z.optional(richtextpropertiesRichTextAnimationSchema)
|
|
1671
1599
|
}).strict();
|
|
1672
1600
|
|
|
1673
1601
|
export const richTextAssetSchema = richtextassetRichTextAssetSchema;
|
|
@@ -1675,35 +1603,30 @@ export const richTextAssetSchema = richtextassetRichTextAssetSchema;
|
|
|
1675
1603
|
/**
|
|
1676
1604
|
* The transfer request attributes inlcudling the user specified ID and status. Returned with [TransferResponseData](#tocs_transferresponsedata).
|
|
1677
1605
|
*/
|
|
1678
|
-
export const transferresponseattributesTransferResponseAttributesSchema =
|
|
1679
|
-
z.object({
|
|
1606
|
+
export const transferresponseattributesTransferResponseAttributesSchema = z.object({
|
|
1680
1607
|
id: z.optional(z.string()),
|
|
1681
1608
|
owner: z.optional(z.string()),
|
|
1682
|
-
status: z.optional(z.enum([
|
|
1683
|
-
created: z.optional(z.string())
|
|
1684
|
-
|
|
1609
|
+
status: z.optional(z.enum(['queued', 'failed'])),
|
|
1610
|
+
created: z.optional(z.string())
|
|
1611
|
+
}).strict();
|
|
1685
1612
|
|
|
1686
|
-
export const transferResponseAttributesSchema =
|
|
1687
|
-
transferresponseattributesTransferResponseAttributesSchema;
|
|
1613
|
+
export const transferResponseAttributesSchema = transferresponseattributesTransferResponseAttributesSchema;
|
|
1688
1614
|
|
|
1689
1615
|
/**
|
|
1690
1616
|
* The type of resource (an asset) and the transfer attributes. Returned with [TransferResponse](#tocs_transferresponse).
|
|
1691
1617
|
*/
|
|
1692
1618
|
export const transferresponsedataTransferResponseDataSchema = z.object({
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
transferresponseattributesTransferResponseAttributesSchema,
|
|
1696
|
-
),
|
|
1619
|
+
type: z.optional(z.string()),
|
|
1620
|
+
attributes: z.optional(transferresponseattributesTransferResponseAttributesSchema)
|
|
1697
1621
|
}).strict();
|
|
1698
1622
|
|
|
1699
|
-
export const transferResponseDataSchema =
|
|
1700
|
-
transferresponsedataTransferResponseDataSchema;
|
|
1623
|
+
export const transferResponseDataSchema = transferresponsedataTransferResponseDataSchema;
|
|
1701
1624
|
|
|
1702
1625
|
/**
|
|
1703
1626
|
* 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.
|
|
1704
1627
|
*/
|
|
1705
1628
|
export const transferresponseTransferResponseSchema = z.object({
|
|
1706
|
-
|
|
1629
|
+
data: transferresponsedataTransferResponseDataSchema
|
|
1707
1630
|
}).strict();
|
|
1708
1631
|
|
|
1709
1632
|
export const transferResponseSchema = transferresponseTransferResponseSchema;
|
|
@@ -1712,9 +1635,9 @@ export const transferResponseSchema = transferresponseTransferResponseSchema;
|
|
|
1712
1635
|
* The asset URL to fetch and transfer to a destination.
|
|
1713
1636
|
*/
|
|
1714
1637
|
export const transferTransferSchema = z.object({
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1638
|
+
url: z.string(),
|
|
1639
|
+
id: z.string(),
|
|
1640
|
+
destinations: z.array(destinationsDestinationsSchema)
|
|
1718
1641
|
}).strict();
|
|
1719
1642
|
|
|
1720
1643
|
export const transferSchema = transferTransferSchema;
|
|
@@ -1725,40 +1648,34 @@ export const transferSchema = transferTransferSchema;
|
|
|
1725
1648
|
*
|
|
1726
1649
|
*/
|
|
1727
1650
|
export const shapeassetShapeAssetSchema = z.object({
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
z.object({
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
line: z.optional(
|
|
1757
|
-
z.object({
|
|
1758
|
-
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*\}\}$/)]),
|
|
1759
|
-
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*\}\}$/)]),
|
|
1760
|
-
}),
|
|
1761
|
-
),
|
|
1651
|
+
type: z.enum(['shape']),
|
|
1652
|
+
shape: z.enum([
|
|
1653
|
+
'rectangle',
|
|
1654
|
+
'circle',
|
|
1655
|
+
'line'
|
|
1656
|
+
]),
|
|
1657
|
+
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*\}\}$/)])),
|
|
1658
|
+
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*\}\}$/)])),
|
|
1659
|
+
fill: z.optional(z.object({
|
|
1660
|
+
color: z.optional(z.string()),
|
|
1661
|
+
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*\}\}$/)]))
|
|
1662
|
+
})),
|
|
1663
|
+
stroke: z.optional(z.object({
|
|
1664
|
+
color: z.optional(z.string()),
|
|
1665
|
+
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*\}\}$/)]))
|
|
1666
|
+
})),
|
|
1667
|
+
rectangle: z.optional(z.object({
|
|
1668
|
+
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*\}\}$/)]),
|
|
1669
|
+
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*\}\}$/)]),
|
|
1670
|
+
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*\}\}$/)]))
|
|
1671
|
+
})),
|
|
1672
|
+
circle: z.optional(z.object({
|
|
1673
|
+
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*\}\}$/)])
|
|
1674
|
+
})),
|
|
1675
|
+
line: z.optional(z.object({
|
|
1676
|
+
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*\}\}$/)]),
|
|
1677
|
+
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*\}\}$/)])
|
|
1678
|
+
}))
|
|
1762
1679
|
}).strict();
|
|
1763
1680
|
|
|
1764
1681
|
export const shapeAssetSchema = shapeassetShapeAssetSchema;
|
|
@@ -1767,8 +1684,8 @@ export const shapeAssetSchema = shapeassetShapeAssetSchema;
|
|
|
1767
1684
|
* 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.
|
|
1768
1685
|
*/
|
|
1769
1686
|
export const sizeSizeSchema = z.object({
|
|
1770
|
-
|
|
1771
|
-
|
|
1687
|
+
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*\}\}$/)])),
|
|
1688
|
+
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*\}\}$/)]))
|
|
1772
1689
|
}).strict();
|
|
1773
1690
|
|
|
1774
1691
|
export const sizeSchema = sizeSizeSchema;
|
|
@@ -1777,50 +1694,56 @@ export const sizeSchema = sizeSizeSchema;
|
|
|
1777
1694
|
* 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...
|
|
1778
1695
|
*/
|
|
1779
1696
|
export const renditionRenditionSchema = z.object({
|
|
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
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1697
|
+
format: z.optional(z.enum([
|
|
1698
|
+
'mp4',
|
|
1699
|
+
'webm',
|
|
1700
|
+
'mov',
|
|
1701
|
+
'avi',
|
|
1702
|
+
'mkv',
|
|
1703
|
+
'ogv',
|
|
1704
|
+
'wmv',
|
|
1705
|
+
'avif',
|
|
1706
|
+
'gif',
|
|
1707
|
+
'mp3',
|
|
1708
|
+
'wav',
|
|
1709
|
+
'jpg',
|
|
1710
|
+
'png',
|
|
1711
|
+
'webp',
|
|
1712
|
+
'tif'
|
|
1713
|
+
])),
|
|
1714
|
+
size: z.optional(sizeSizeSchema),
|
|
1715
|
+
fit: z.optional(z.enum([
|
|
1716
|
+
'cover',
|
|
1717
|
+
'contain',
|
|
1718
|
+
'crop'
|
|
1719
|
+
])),
|
|
1720
|
+
resolution: z.optional(z.enum([
|
|
1721
|
+
'preview',
|
|
1722
|
+
'mobile',
|
|
1723
|
+
'sd',
|
|
1724
|
+
'hd',
|
|
1725
|
+
'fhd'
|
|
1726
|
+
])),
|
|
1727
|
+
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*\}\}$/)])),
|
|
1728
|
+
fps: z.optional(z.union([
|
|
1729
|
+
z.literal(12),
|
|
1730
|
+
z.literal(15),
|
|
1731
|
+
z.literal(23.976),
|
|
1732
|
+
z.literal(24),
|
|
1733
|
+
z.literal(25),
|
|
1734
|
+
z.literal(29.97),
|
|
1735
|
+
z.literal(30),
|
|
1736
|
+
z.literal(48),
|
|
1737
|
+
z.literal(50),
|
|
1738
|
+
z.literal(59.94),
|
|
1739
|
+
z.literal(60)
|
|
1740
|
+
])),
|
|
1741
|
+
speed: z.optional(speedSpeedSchema),
|
|
1742
|
+
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*\}\}$/)])),
|
|
1743
|
+
fixOffset: z.optional(z.boolean()),
|
|
1744
|
+
fixRotation: z.optional(z.boolean()),
|
|
1745
|
+
enhance: z.optional(enhancementsEnhancementsSchema),
|
|
1746
|
+
filename: z.optional(z.string())
|
|
1824
1747
|
}).strict();
|
|
1825
1748
|
|
|
1826
1749
|
export const renditionSchema = renditionRenditionSchema;
|
|
@@ -1829,8 +1752,8 @@ export const renditionSchema = renditionRenditionSchema;
|
|
|
1829
1752
|
* The output renditions and transformations that should be generated from the source file.
|
|
1830
1753
|
*/
|
|
1831
1754
|
export const outputsOutputsSchema = z.object({
|
|
1832
|
-
|
|
1833
|
-
|
|
1755
|
+
renditions: z.optional(z.array(renditionRenditionSchema)),
|
|
1756
|
+
transcription: z.optional(transcriptionTranscriptionSchema)
|
|
1834
1757
|
}).strict();
|
|
1835
1758
|
|
|
1836
1759
|
export const outputsSchema = outputsOutputsSchema;
|
|
@@ -1838,38 +1761,32 @@ export const outputsSchema = outputsOutputsSchema;
|
|
|
1838
1761
|
/**
|
|
1839
1762
|
* The id and attributes of the generated rendition file.
|
|
1840
1763
|
*/
|
|
1841
|
-
export const renditionresponseattributesRenditionResponseAttributesSchema =
|
|
1842
|
-
z.object({
|
|
1764
|
+
export const renditionresponseattributesRenditionResponseAttributesSchema = z.object({
|
|
1843
1765
|
id: z.string(),
|
|
1844
|
-
status: z.optional(
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
]),
|
|
1853
|
-
),
|
|
1766
|
+
status: z.optional(z.enum([
|
|
1767
|
+
'queued',
|
|
1768
|
+
'importing',
|
|
1769
|
+
'ready',
|
|
1770
|
+
'failed',
|
|
1771
|
+
'deleted',
|
|
1772
|
+
'overwritten'
|
|
1773
|
+
])),
|
|
1854
1774
|
url: z.optional(z.string()),
|
|
1855
1775
|
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*\}\}$/)])),
|
|
1856
1776
|
transformation: z.optional(renditionRenditionSchema),
|
|
1857
1777
|
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*\}\}$/)])),
|
|
1858
1778
|
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*\}\}$/)])),
|
|
1859
1779
|
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*\}\}$/)])),
|
|
1860
|
-
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*\}\}$/)]))
|
|
1861
|
-
|
|
1780
|
+
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*\}\}$/)]))
|
|
1781
|
+
}).strict();
|
|
1862
1782
|
|
|
1863
|
-
export const renditionResponseAttributesSchema =
|
|
1864
|
-
renditionresponseattributesRenditionResponseAttributesSchema;
|
|
1783
|
+
export const renditionResponseAttributesSchema = renditionresponseattributesRenditionResponseAttributesSchema;
|
|
1865
1784
|
|
|
1866
1785
|
/**
|
|
1867
1786
|
* The list of outputs generated from the source file. Currently supports renditions which are versions of the source file with different transformations applied.
|
|
1868
1787
|
*/
|
|
1869
1788
|
export const outputsresponseOutputsResponseSchema = z.object({
|
|
1870
|
-
|
|
1871
|
-
z.array(renditionresponseattributesRenditionResponseAttributesSchema),
|
|
1872
|
-
),
|
|
1789
|
+
renditions: z.optional(z.array(renditionresponseattributesRenditionResponseAttributesSchema))
|
|
1873
1790
|
}).strict();
|
|
1874
1791
|
|
|
1875
1792
|
export const outputsResponseSchema = outputsresponseOutputsResponseSchema;
|
|
@@ -1878,59 +1795,54 @@ export const outputsResponseSchema = outputsresponseOutputsResponseSchema;
|
|
|
1878
1795
|
* The id and attributes of the source file.
|
|
1879
1796
|
*/
|
|
1880
1797
|
export const sourceresponseattributesSourceResponseAttributesSchema = z.object({
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
created: z.optional(z.string()),
|
|
1901
|
-
updated: z.optional(z.string()),
|
|
1798
|
+
id: z.string(),
|
|
1799
|
+
owner: z.string(),
|
|
1800
|
+
input: z.optional(z.string()),
|
|
1801
|
+
source: z.optional(z.string()),
|
|
1802
|
+
status: z.optional(z.enum([
|
|
1803
|
+
'queued',
|
|
1804
|
+
'importing',
|
|
1805
|
+
'ready',
|
|
1806
|
+
'failed',
|
|
1807
|
+
'deleted',
|
|
1808
|
+
'overwritten'
|
|
1809
|
+
])),
|
|
1810
|
+
outputs: z.optional(outputsresponseOutputsResponseSchema),
|
|
1811
|
+
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*\}\}$/)])),
|
|
1812
|
+
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*\}\}$/)])),
|
|
1813
|
+
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*\}\}$/)])),
|
|
1814
|
+
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*\}\}$/)])),
|
|
1815
|
+
created: z.optional(z.string()),
|
|
1816
|
+
updated: z.optional(z.string())
|
|
1902
1817
|
}).strict();
|
|
1903
1818
|
|
|
1904
|
-
export const sourceResponseAttributesSchema =
|
|
1905
|
-
sourceresponseattributesSourceResponseAttributesSchema;
|
|
1819
|
+
export const sourceResponseAttributesSchema = sourceresponseattributesSourceResponseAttributesSchema;
|
|
1906
1820
|
|
|
1907
1821
|
/**
|
|
1908
1822
|
* The type of resource (a source), it's id and attributes of the source file.
|
|
1909
1823
|
*/
|
|
1910
1824
|
export const sourceresponsedataSourceResponseDataSchema = z.object({
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1825
|
+
type: z.string(),
|
|
1826
|
+
id: z.string(),
|
|
1827
|
+
attributes: sourceresponseattributesSourceResponseAttributesSchema
|
|
1914
1828
|
}).strict();
|
|
1915
1829
|
|
|
1916
|
-
export const sourceResponseDataSchema =
|
|
1917
|
-
sourceresponsedataSourceResponseDataSchema;
|
|
1830
|
+
export const sourceResponseDataSchema = sourceresponsedataSourceResponseDataSchema;
|
|
1918
1831
|
|
|
1919
1832
|
/**
|
|
1920
1833
|
* A list of all ingested source files fetched or uploaded to a users account.
|
|
1921
1834
|
*/
|
|
1922
1835
|
export const sourcelistresponseSourceListResponseSchema = z.object({
|
|
1923
|
-
|
|
1836
|
+
data: z.array(sourceresponsedataSourceResponseDataSchema)
|
|
1924
1837
|
}).strict();
|
|
1925
1838
|
|
|
1926
|
-
export const sourceListResponseSchema =
|
|
1927
|
-
sourcelistresponseSourceListResponseSchema;
|
|
1839
|
+
export const sourceListResponseSchema = sourcelistresponseSourceListResponseSchema;
|
|
1928
1840
|
|
|
1929
1841
|
/**
|
|
1930
1842
|
* 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.
|
|
1931
1843
|
*/
|
|
1932
1844
|
export const sourceresponseSourceResponseSchema = z.object({
|
|
1933
|
-
|
|
1845
|
+
data: sourceresponsedataSourceResponseDataSchema
|
|
1934
1846
|
}).strict();
|
|
1935
1847
|
|
|
1936
1848
|
export const sourceResponseSchema = sourceresponseSourceResponseSchema;
|
|
@@ -1940,10 +1852,10 @@ export const sourceResponseSchema = sourceresponseSourceResponseSchema;
|
|
|
1940
1852
|
* 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.
|
|
1941
1853
|
*/
|
|
1942
1854
|
export const sourceSourceSchema = z.object({
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1855
|
+
url: z.optional(z.string()),
|
|
1856
|
+
outputs: z.optional(outputsOutputsSchema),
|
|
1857
|
+
destinations: z.optional(destinationsDestinationsSchema),
|
|
1858
|
+
callback: z.optional(z.string())
|
|
1947
1859
|
}).strict();
|
|
1948
1860
|
|
|
1949
1861
|
export const sourceSchema = sourceSourceSchema;
|
|
@@ -1952,9 +1864,13 @@ export const sourceSchema = sourceSourceSchema;
|
|
|
1952
1864
|
* 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.
|
|
1953
1865
|
*/
|
|
1954
1866
|
export const soundtrackSoundtrackSchema = z.object({
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1867
|
+
src: z.string().min(1).regex(/\S/),
|
|
1868
|
+
effect: z.optional(z.enum([
|
|
1869
|
+
'fadeIn',
|
|
1870
|
+
'fadeOut',
|
|
1871
|
+
'fadeInFadeOut'
|
|
1872
|
+
])),
|
|
1873
|
+
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*\}\}$/)]))
|
|
1958
1874
|
}).strict();
|
|
1959
1875
|
|
|
1960
1876
|
export const soundtrackSchema = soundtrackSoundtrackSchema;
|
|
@@ -1965,8 +1881,8 @@ export const soundtrackSchema = soundtrackSoundtrackSchema;
|
|
|
1965
1881
|
*
|
|
1966
1882
|
*/
|
|
1967
1883
|
export const svgpropertiesSvgGradientStopSchema = z.object({
|
|
1968
|
-
|
|
1969
|
-
|
|
1884
|
+
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*\}\}$/)]),
|
|
1885
|
+
color: z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
1970
1886
|
}).strict();
|
|
1971
1887
|
|
|
1972
1888
|
export const svgGradientStopSchema = svgpropertiesSvgGradientStopSchema;
|
|
@@ -1977,14 +1893,13 @@ export const svgGradientStopSchema = svgpropertiesSvgGradientStopSchema;
|
|
|
1977
1893
|
*
|
|
1978
1894
|
*/
|
|
1979
1895
|
export const svgpropertiesSvgLinearGradientFillSchema = z.object({
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1896
|
+
type: z.enum(['linear']),
|
|
1897
|
+
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),
|
|
1898
|
+
stops: z.array(svgpropertiesSvgGradientStopSchema).min(2),
|
|
1899
|
+
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)
|
|
1984
1900
|
}).strict();
|
|
1985
1901
|
|
|
1986
|
-
export const svgLinearGradientFillSchema =
|
|
1987
|
-
svgpropertiesSvgLinearGradientFillSchema;
|
|
1902
|
+
export const svgLinearGradientFillSchema = svgpropertiesSvgLinearGradientFillSchema;
|
|
1988
1903
|
|
|
1989
1904
|
/**
|
|
1990
1905
|
* A radial gradient fill that transitions colors radiating outward from a center point.
|
|
@@ -1992,24 +1907,23 @@ export const svgLinearGradientFillSchema =
|
|
|
1992
1907
|
*
|
|
1993
1908
|
*/
|
|
1994
1909
|
export const svgpropertiesSvgRadialGradientFillSchema = z.object({
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1910
|
+
type: z.enum(['radial']),
|
|
1911
|
+
stops: z.array(svgpropertiesSvgGradientStopSchema).min(2),
|
|
1912
|
+
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)
|
|
1998
1913
|
}).strict();
|
|
1999
1914
|
|
|
2000
|
-
export const svgRadialGradientFillSchema =
|
|
2001
|
-
svgpropertiesSvgRadialGradientFillSchema;
|
|
1915
|
+
export const svgRadialGradientFillSchema = svgpropertiesSvgRadialGradientFillSchema;
|
|
2002
1916
|
|
|
2003
1917
|
/**
|
|
2004
1918
|
* Drop shadow properties for SVG shapes. Creates a shadow effect behind the shape.
|
|
2005
1919
|
*
|
|
2006
1920
|
*/
|
|
2007
1921
|
export const svgpropertiesSvgShadowSchema = z.object({
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
1922
|
+
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),
|
|
1923
|
+
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),
|
|
1924
|
+
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),
|
|
1925
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#000000'),
|
|
1926
|
+
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)
|
|
2013
1927
|
}).strict();
|
|
2014
1928
|
|
|
2015
1929
|
export const svgShadowSchema = svgpropertiesSvgShadowSchema;
|
|
@@ -2018,12 +1932,9 @@ export const svgShadowSchema = svgpropertiesSvgShadowSchema;
|
|
|
2018
1932
|
* A solid color fill for SVG shapes.
|
|
2019
1933
|
*/
|
|
2020
1934
|
export const svgpropertiesSvgSolidFillSchema = z.object({
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
.string()
|
|
2024
|
-
.regex(/^#[A-Fa-f0-9]{6}$/)
|
|
2025
|
-
.default("#000000"),
|
|
2026
|
-
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),
|
|
1935
|
+
type: z.enum(['solid']),
|
|
1936
|
+
color: z.string().regex(/^#[A-Fa-f0-9]{6}$/).default('#000000'),
|
|
1937
|
+
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)
|
|
2027
1938
|
}).strict();
|
|
2028
1939
|
|
|
2029
1940
|
export const svgSolidFillSchema = svgpropertiesSvgSolidFillSchema;
|
|
@@ -2047,13 +1958,21 @@ export const svgFillSchema = svgpropertiesSvgFillSchema;
|
|
|
2047
1958
|
*
|
|
2048
1959
|
*/
|
|
2049
1960
|
export const svgpropertiesSvgStrokeSchema = z.object({
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
1961
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#000000'),
|
|
1962
|
+
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),
|
|
1963
|
+
opacity: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1964
|
+
lineCap: z.optional(z.enum([
|
|
1965
|
+
'butt',
|
|
1966
|
+
'round',
|
|
1967
|
+
'square'
|
|
1968
|
+
])),
|
|
1969
|
+
lineJoin: z.optional(z.enum([
|
|
1970
|
+
'miter',
|
|
1971
|
+
'round',
|
|
1972
|
+
'bevel'
|
|
1973
|
+
])),
|
|
1974
|
+
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*\}\}$/)]))),
|
|
1975
|
+
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)
|
|
2057
1976
|
}).strict();
|
|
2058
1977
|
|
|
2059
1978
|
export const svgStrokeSchema = svgpropertiesSvgStrokeSchema;
|
|
@@ -2063,12 +1982,12 @@ export const svgStrokeSchema = svgpropertiesSvgStrokeSchema;
|
|
|
2063
1982
|
*
|
|
2064
1983
|
*/
|
|
2065
1984
|
export const svgpropertiesSvgTransformSchema = z.object({
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
1985
|
+
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),
|
|
1986
|
+
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),
|
|
1987
|
+
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),
|
|
1988
|
+
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),
|
|
1989
|
+
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),
|
|
1990
|
+
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)
|
|
2072
1991
|
}).strict();
|
|
2073
1992
|
|
|
2074
1993
|
export const svgTransformSchema = svgpropertiesSvgTransformSchema;
|
|
@@ -2079,11 +1998,11 @@ export const svgTransformSchema = svgpropertiesSvgTransformSchema;
|
|
|
2079
1998
|
*
|
|
2080
1999
|
*/
|
|
2081
2000
|
export const svgshapesSvgArrowShapeSchema = z.object({
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2001
|
+
type: z.enum(['arrow']),
|
|
2002
|
+
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*\}\}$/)]),
|
|
2003
|
+
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*\}\}$/)]),
|
|
2004
|
+
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*\}\}$/)]),
|
|
2005
|
+
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*\}\}$/)])
|
|
2087
2006
|
}).strict();
|
|
2088
2007
|
|
|
2089
2008
|
export const svgArrowShapeSchema = svgshapesSvgArrowShapeSchema;
|
|
@@ -2094,8 +2013,8 @@ export const svgArrowShapeSchema = svgshapesSvgArrowShapeSchema;
|
|
|
2094
2013
|
*
|
|
2095
2014
|
*/
|
|
2096
2015
|
export const svgshapesSvgCircleShapeSchema = z.object({
|
|
2097
|
-
|
|
2098
|
-
|
|
2016
|
+
type: z.enum(['circle']),
|
|
2017
|
+
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*\}\}$/)])
|
|
2099
2018
|
}).strict();
|
|
2100
2019
|
|
|
2101
2020
|
export const svgCircleShapeSchema = svgshapesSvgCircleShapeSchema;
|
|
@@ -2106,10 +2025,10 @@ export const svgCircleShapeSchema = svgshapesSvgCircleShapeSchema;
|
|
|
2106
2025
|
*
|
|
2107
2026
|
*/
|
|
2108
2027
|
export const svgshapesSvgCrossShapeSchema = z.object({
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2028
|
+
type: z.enum(['cross']),
|
|
2029
|
+
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*\}\}$/)]),
|
|
2030
|
+
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*\}\}$/)]),
|
|
2031
|
+
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*\}\}$/)])
|
|
2113
2032
|
}).strict();
|
|
2114
2033
|
|
|
2115
2034
|
export const svgCrossShapeSchema = svgshapesSvgCrossShapeSchema;
|
|
@@ -2120,9 +2039,9 @@ export const svgCrossShapeSchema = svgshapesSvgCrossShapeSchema;
|
|
|
2120
2039
|
*
|
|
2121
2040
|
*/
|
|
2122
2041
|
export const svgshapesSvgEllipseShapeSchema = z.object({
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2042
|
+
type: z.enum(['ellipse']),
|
|
2043
|
+
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*\}\}$/)]),
|
|
2044
|
+
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*\}\}$/)])
|
|
2126
2045
|
}).strict();
|
|
2127
2046
|
|
|
2128
2047
|
export const svgEllipseShapeSchema = svgshapesSvgEllipseShapeSchema;
|
|
@@ -2133,8 +2052,8 @@ export const svgEllipseShapeSchema = svgshapesSvgEllipseShapeSchema;
|
|
|
2133
2052
|
*
|
|
2134
2053
|
*/
|
|
2135
2054
|
export const svgshapesSvgHeartShapeSchema = z.object({
|
|
2136
|
-
|
|
2137
|
-
|
|
2055
|
+
type: z.enum(['heart']),
|
|
2056
|
+
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*\}\}$/)])
|
|
2138
2057
|
}).strict();
|
|
2139
2058
|
|
|
2140
2059
|
export const svgHeartShapeSchema = svgshapesSvgHeartShapeSchema;
|
|
@@ -2145,9 +2064,9 @@ export const svgHeartShapeSchema = svgshapesSvgHeartShapeSchema;
|
|
|
2145
2064
|
*
|
|
2146
2065
|
*/
|
|
2147
2066
|
export const svgshapesSvgLineShapeSchema = z.object({
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2067
|
+
type: z.enum(['line']),
|
|
2068
|
+
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*\}\}$/)]),
|
|
2069
|
+
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*\}\}$/)])
|
|
2151
2070
|
}).strict();
|
|
2152
2071
|
|
|
2153
2072
|
export const svgLineShapeSchema = svgshapesSvgLineShapeSchema;
|
|
@@ -2170,8 +2089,8 @@ export const svgLineShapeSchema = svgshapesSvgLineShapeSchema;
|
|
|
2170
2089
|
*
|
|
2171
2090
|
*/
|
|
2172
2091
|
export const svgshapesSvgPathShapeSchema = z.object({
|
|
2173
|
-
|
|
2174
|
-
|
|
2092
|
+
type: z.enum(['path']),
|
|
2093
|
+
d: z.string().min(1).max(100000)
|
|
2175
2094
|
}).strict();
|
|
2176
2095
|
|
|
2177
2096
|
export const svgPathShapeSchema = svgshapesSvgPathShapeSchema;
|
|
@@ -2183,9 +2102,9 @@ export const svgPathShapeSchema = svgshapesSvgPathShapeSchema;
|
|
|
2183
2102
|
*
|
|
2184
2103
|
*/
|
|
2185
2104
|
export const svgshapesSvgPolygonShapeSchema = z.object({
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2105
|
+
type: z.enum(['polygon']),
|
|
2106
|
+
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*\}\}$/)]),
|
|
2107
|
+
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*\}\}$/)])
|
|
2189
2108
|
}).strict();
|
|
2190
2109
|
|
|
2191
2110
|
export const svgPolygonShapeSchema = svgshapesSvgPolygonShapeSchema;
|
|
@@ -2196,10 +2115,10 @@ export const svgPolygonShapeSchema = svgshapesSvgPolygonShapeSchema;
|
|
|
2196
2115
|
*
|
|
2197
2116
|
*/
|
|
2198
2117
|
export const svgshapesSvgRectangleShapeSchema = z.object({
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2118
|
+
type: z.enum(['rectangle']),
|
|
2119
|
+
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*\}\}$/)]),
|
|
2120
|
+
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*\}\}$/)]),
|
|
2121
|
+
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)
|
|
2203
2122
|
}).strict();
|
|
2204
2123
|
|
|
2205
2124
|
export const svgRectangleShapeSchema = svgshapesSvgRectangleShapeSchema;
|
|
@@ -2210,9 +2129,9 @@ export const svgRectangleShapeSchema = svgshapesSvgRectangleShapeSchema;
|
|
|
2210
2129
|
*
|
|
2211
2130
|
*/
|
|
2212
2131
|
export const svgshapesSvgRingShapeSchema = z.object({
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2132
|
+
type: z.enum(['ring']),
|
|
2133
|
+
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*\}\}$/)]),
|
|
2134
|
+
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*\}\}$/)])
|
|
2216
2135
|
}).strict();
|
|
2217
2136
|
|
|
2218
2137
|
export const svgRingShapeSchema = svgshapesSvgRingShapeSchema;
|
|
@@ -2224,10 +2143,10 @@ export const svgRingShapeSchema = svgshapesSvgRingShapeSchema;
|
|
|
2224
2143
|
*
|
|
2225
2144
|
*/
|
|
2226
2145
|
export const svgshapesSvgStarShapeSchema = z.object({
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2146
|
+
type: z.enum(['star']),
|
|
2147
|
+
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*\}\}$/)]),
|
|
2148
|
+
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*\}\}$/)]),
|
|
2149
|
+
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*\}\}$/)])
|
|
2231
2150
|
}).strict();
|
|
2232
2151
|
|
|
2233
2152
|
export const svgStarShapeSchema = svgshapesSvgStarShapeSchema;
|
|
@@ -2348,8 +2267,8 @@ export const svgAssetSchema = svgassetSvgAssetSchema;
|
|
|
2348
2267
|
* Configure the id and optional merge fields to render a template by id.
|
|
2349
2268
|
*/
|
|
2350
2269
|
export const templaterenderTemplateRenderSchema = z.object({
|
|
2351
|
-
|
|
2352
|
-
|
|
2270
|
+
id: z.string(),
|
|
2271
|
+
merge: z.optional(z.array(mergefieldMergeFieldSchema))
|
|
2353
2272
|
}).strict();
|
|
2354
2273
|
|
|
2355
2274
|
export const templateRenderSchema = templaterenderTemplateRenderSchema;
|
|
@@ -2358,8 +2277,16 @@ export const templateRenderSchema = templaterenderTemplateRenderSchema;
|
|
|
2358
2277
|
* Horizontal and vertical alignment properties for text.
|
|
2359
2278
|
*/
|
|
2360
2279
|
export const textpropertiesTextAlignmentSchema = z.object({
|
|
2361
|
-
|
|
2362
|
-
|
|
2280
|
+
horizontal: z.optional(z.enum([
|
|
2281
|
+
'left',
|
|
2282
|
+
'center',
|
|
2283
|
+
'right'
|
|
2284
|
+
])),
|
|
2285
|
+
vertical: z.optional(z.enum([
|
|
2286
|
+
'top',
|
|
2287
|
+
'center',
|
|
2288
|
+
'bottom'
|
|
2289
|
+
]))
|
|
2363
2290
|
}).strict();
|
|
2364
2291
|
|
|
2365
2292
|
export const textAlignmentSchema = textpropertiesTextAlignmentSchema;
|
|
@@ -2368,18 +2295,18 @@ export const textAlignmentSchema = textpropertiesTextAlignmentSchema;
|
|
|
2368
2295
|
* Animation properties for text entrance effects.
|
|
2369
2296
|
*/
|
|
2370
2297
|
export const textpropertiesTextAnimationSchema = z.object({
|
|
2371
|
-
|
|
2372
|
-
|
|
2298
|
+
preset: z.enum(['typewriter']),
|
|
2299
|
+
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*\}\}$/)]))
|
|
2373
2300
|
}).strict();
|
|
2374
2301
|
|
|
2375
2302
|
/**
|
|
2376
2303
|
* Displays a background box behind the text.
|
|
2377
2304
|
*/
|
|
2378
2305
|
export const textpropertiesTextBackgroundSchema = z.object({
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2306
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2307
|
+
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*\}\}$/)])),
|
|
2308
|
+
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*\}\}$/)])),
|
|
2309
|
+
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*\}\}$/)]))
|
|
2383
2310
|
}).strict();
|
|
2384
2311
|
|
|
2385
2312
|
export const textBackgroundSchema = textpropertiesTextBackgroundSchema;
|
|
@@ -2388,12 +2315,12 @@ export const textBackgroundSchema = textpropertiesTextBackgroundSchema;
|
|
|
2388
2315
|
* Font properties for text.
|
|
2389
2316
|
*/
|
|
2390
2317
|
export const textpropertiesTextFontSchema = z.object({
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2318
|
+
family: z.optional(z.string()),
|
|
2319
|
+
color: z.optional(z.string()),
|
|
2320
|
+
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*\}\}$/)])),
|
|
2321
|
+
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*\}\}$/)])),
|
|
2322
|
+
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*\}\}$/)])),
|
|
2323
|
+
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*\}\}$/)]))
|
|
2397
2324
|
}).strict();
|
|
2398
2325
|
|
|
2399
2326
|
export const textFontSchema = textpropertiesTextFontSchema;
|
|
@@ -2402,8 +2329,8 @@ export const textFontSchema = textpropertiesTextFontSchema;
|
|
|
2402
2329
|
* Text stroke (outline) properties.
|
|
2403
2330
|
*/
|
|
2404
2331
|
export const textpropertiesTextStrokeSchema = z.object({
|
|
2405
|
-
|
|
2406
|
-
|
|
2332
|
+
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*\}\}$/)])),
|
|
2333
|
+
color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
|
|
2407
2334
|
}).strict();
|
|
2408
2335
|
|
|
2409
2336
|
/**
|
|
@@ -2412,16 +2339,16 @@ export const textpropertiesTextStrokeSchema = z.object({
|
|
|
2412
2339
|
*
|
|
2413
2340
|
*/
|
|
2414
2341
|
export const textassetTextAssetSchema = z.object({
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2342
|
+
type: z.enum(['text']),
|
|
2343
|
+
text: z.string(),
|
|
2344
|
+
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*\}\}$/)])),
|
|
2345
|
+
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*\}\}$/)])),
|
|
2346
|
+
font: z.optional(textpropertiesTextFontSchema),
|
|
2347
|
+
background: z.optional(textpropertiesTextBackgroundSchema),
|
|
2348
|
+
alignment: z.optional(textpropertiesTextAlignmentSchema),
|
|
2349
|
+
stroke: z.optional(textpropertiesTextStrokeSchema),
|
|
2350
|
+
animation: z.optional(textpropertiesTextAnimationSchema),
|
|
2351
|
+
ellipsis: z.optional(z.string())
|
|
2425
2352
|
}).strict();
|
|
2426
2353
|
|
|
2427
2354
|
export const textAssetSchema = textassetTextAssetSchema;
|
|
@@ -2430,11 +2357,11 @@ export const textAssetSchema = textassetTextAssetSchema;
|
|
|
2430
2357
|
* The TextToImageAsset lets you create a dynamic image from a text prompt.
|
|
2431
2358
|
*/
|
|
2432
2359
|
export const texttoimageassetTextToImageAssetSchema = z.object({
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2360
|
+
type: z.enum(['text-to-image']),
|
|
2361
|
+
prompt: z.string(),
|
|
2362
|
+
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*\}\}$/)])),
|
|
2363
|
+
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*\}\}$/)])),
|
|
2364
|
+
crop: z.optional(cropCropSchema)
|
|
2438
2365
|
}).strict();
|
|
2439
2366
|
|
|
2440
2367
|
export const textToImageAssetSchema = texttoimageassetTextToImageAssetSchema;
|
|
@@ -2443,8 +2370,8 @@ export const textToImageAssetSchema = texttoimageassetTextToImageAssetSchema;
|
|
|
2443
2370
|
* Generate a thumbnail image for the video or image at a specific point from the timeline.
|
|
2444
2371
|
*/
|
|
2445
2372
|
export const thumbnailThumbnailSchema = z.object({
|
|
2446
|
-
|
|
2447
|
-
|
|
2373
|
+
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*\}\}$/)]),
|
|
2374
|
+
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*\}\}$/)])
|
|
2448
2375
|
}).strict();
|
|
2449
2376
|
|
|
2450
2377
|
export const thumbnailSchema = thumbnailThumbnailSchema;
|
|
@@ -2453,35 +2380,64 @@ export const thumbnailSchema = thumbnailThumbnailSchema;
|
|
|
2453
2380
|
* The output format, render range and type of media to generate.
|
|
2454
2381
|
*/
|
|
2455
2382
|
export const outputOutputSchema = z.object({
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
z.union([
|
|
2464
|
-
z.literal(12),
|
|
2465
|
-
z.literal(15),
|
|
2466
|
-
z.literal(23.976),
|
|
2467
|
-
z.literal(24),
|
|
2468
|
-
z.literal(25),
|
|
2469
|
-
z.literal(29.97),
|
|
2470
|
-
z.literal(30),
|
|
2471
|
-
z.literal(48),
|
|
2472
|
-
z.literal(50),
|
|
2473
|
-
z.literal(59.94),
|
|
2474
|
-
z.literal(60),
|
|
2383
|
+
format: z.enum([
|
|
2384
|
+
'mp4',
|
|
2385
|
+
'gif',
|
|
2386
|
+
'mp3',
|
|
2387
|
+
'jpg',
|
|
2388
|
+
'png',
|
|
2389
|
+
'bmp'
|
|
2475
2390
|
]),
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2391
|
+
resolution: z.optional(z.enum([
|
|
2392
|
+
'preview',
|
|
2393
|
+
'mobile',
|
|
2394
|
+
'sd',
|
|
2395
|
+
'hd',
|
|
2396
|
+
'1080',
|
|
2397
|
+
'4k'
|
|
2398
|
+
])),
|
|
2399
|
+
aspectRatio: z.optional(z.enum([
|
|
2400
|
+
'16:9',
|
|
2401
|
+
'9:16',
|
|
2402
|
+
'1:1',
|
|
2403
|
+
'4:5',
|
|
2404
|
+
'4:3'
|
|
2405
|
+
])),
|
|
2406
|
+
size: z.optional(sizeSizeSchema),
|
|
2407
|
+
fps: z.optional(z.union([
|
|
2408
|
+
z.literal(12),
|
|
2409
|
+
z.literal(15),
|
|
2410
|
+
z.literal(23.976),
|
|
2411
|
+
z.literal(24),
|
|
2412
|
+
z.literal(25),
|
|
2413
|
+
z.literal(29.97),
|
|
2414
|
+
z.literal(30),
|
|
2415
|
+
z.literal(48),
|
|
2416
|
+
z.literal(50),
|
|
2417
|
+
z.literal(59.94),
|
|
2418
|
+
z.literal(60)
|
|
2419
|
+
])),
|
|
2420
|
+
scaleTo: z.optional(z.enum([
|
|
2421
|
+
'preview',
|
|
2422
|
+
'mobile',
|
|
2423
|
+
'sd',
|
|
2424
|
+
'hd',
|
|
2425
|
+
'1080',
|
|
2426
|
+
'4k'
|
|
2427
|
+
])),
|
|
2428
|
+
quality: z.optional(z.enum([
|
|
2429
|
+
'verylow',
|
|
2430
|
+
'low',
|
|
2431
|
+
'medium',
|
|
2432
|
+
'high',
|
|
2433
|
+
'veryhigh'
|
|
2434
|
+
])),
|
|
2435
|
+
repeat: z.optional(z.boolean()),
|
|
2436
|
+
mute: z.optional(z.boolean()),
|
|
2437
|
+
range: z.optional(rangeRangeSchema),
|
|
2438
|
+
poster: z.optional(posterPosterSchema),
|
|
2439
|
+
thumbnail: z.optional(thumbnailThumbnailSchema),
|
|
2440
|
+
destinations: z.optional(z.array(destinationsDestinationsSchema))
|
|
2485
2441
|
}).strict();
|
|
2486
2442
|
|
|
2487
2443
|
export const outputSchema = outputOutputSchema;
|
|
@@ -2490,138 +2446,134 @@ export const outputSchema = outputOutputSchema;
|
|
|
2490
2446
|
* In and out transitions for a clip - i.e. fade in and fade out
|
|
2491
2447
|
*/
|
|
2492
2448
|
export const transitionTransitionSchema = z.object({
|
|
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
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
"shuffleTopLeftFast",
|
|
2622
|
-
"zoom",
|
|
2623
|
-
]),
|
|
2624
|
-
),
|
|
2449
|
+
in: z.optional(z.enum([
|
|
2450
|
+
'none',
|
|
2451
|
+
'fade',
|
|
2452
|
+
'fadeSlow',
|
|
2453
|
+
'fadeFast',
|
|
2454
|
+
'reveal',
|
|
2455
|
+
'revealSlow',
|
|
2456
|
+
'revealFast',
|
|
2457
|
+
'wipeLeft',
|
|
2458
|
+
'wipeLeftSlow',
|
|
2459
|
+
'wipeLeftFast',
|
|
2460
|
+
'wipeRight',
|
|
2461
|
+
'wipeRightSlow',
|
|
2462
|
+
'wipeRightFast',
|
|
2463
|
+
'slideLeft',
|
|
2464
|
+
'slideLeftSlow',
|
|
2465
|
+
'slideLeftFast',
|
|
2466
|
+
'slideRight',
|
|
2467
|
+
'slideRightSlow',
|
|
2468
|
+
'slideRightFast',
|
|
2469
|
+
'slideUp',
|
|
2470
|
+
'slideUpSlow',
|
|
2471
|
+
'slideUpFast',
|
|
2472
|
+
'slideDown',
|
|
2473
|
+
'slideDownSlow',
|
|
2474
|
+
'slideDownFast',
|
|
2475
|
+
'carouselLeft',
|
|
2476
|
+
'carouselLeftSlow',
|
|
2477
|
+
'carouselLeftFast',
|
|
2478
|
+
'carouselRight',
|
|
2479
|
+
'carouselRightSlow',
|
|
2480
|
+
'carouselRightFast',
|
|
2481
|
+
'carouselUp',
|
|
2482
|
+
'carouselUpSlow',
|
|
2483
|
+
'carouselUpFast',
|
|
2484
|
+
'carouselDown',
|
|
2485
|
+
'carouselDownSlow',
|
|
2486
|
+
'carouselDownFast',
|
|
2487
|
+
'shuffleTopRight',
|
|
2488
|
+
'shuffleTopRightSlow',
|
|
2489
|
+
'shuffleTopRightFast',
|
|
2490
|
+
'shuffleRightTop',
|
|
2491
|
+
'shuffleRightTopSlow',
|
|
2492
|
+
'shuffleRightTopFast',
|
|
2493
|
+
'shuffleRightBottom',
|
|
2494
|
+
'shuffleRightBottomSlow',
|
|
2495
|
+
'shuffleRightBottomFast',
|
|
2496
|
+
'shuffleBottomRight',
|
|
2497
|
+
'shuffleBottomRightSlow',
|
|
2498
|
+
'shuffleBottomRightFast',
|
|
2499
|
+
'shuffleBottomLeft',
|
|
2500
|
+
'shuffleBottomLeftSlow',
|
|
2501
|
+
'shuffleBottomLeftFast',
|
|
2502
|
+
'shuffleLeftBottom',
|
|
2503
|
+
'shuffleLeftBottomSlow',
|
|
2504
|
+
'shuffleLeftBottomFast',
|
|
2505
|
+
'shuffleLeftTop',
|
|
2506
|
+
'shuffleLeftTopSlow',
|
|
2507
|
+
'shuffleLeftTopFast',
|
|
2508
|
+
'shuffleTopLeft',
|
|
2509
|
+
'shuffleTopLeftSlow',
|
|
2510
|
+
'shuffleTopLeftFast',
|
|
2511
|
+
'zoom'
|
|
2512
|
+
])),
|
|
2513
|
+
out: z.optional(z.enum([
|
|
2514
|
+
'none',
|
|
2515
|
+
'fade',
|
|
2516
|
+
'fadeSlow',
|
|
2517
|
+
'fadeFast',
|
|
2518
|
+
'reveal',
|
|
2519
|
+
'revealSlow',
|
|
2520
|
+
'revealFast',
|
|
2521
|
+
'wipeLeft',
|
|
2522
|
+
'wipeLeftSlow',
|
|
2523
|
+
'wipeLeftFast',
|
|
2524
|
+
'wipeRight',
|
|
2525
|
+
'wipeRightSlow',
|
|
2526
|
+
'wipeRightFast',
|
|
2527
|
+
'slideLeft',
|
|
2528
|
+
'slideLeftSlow',
|
|
2529
|
+
'slideLeftFast',
|
|
2530
|
+
'slideRight',
|
|
2531
|
+
'slideRightSlow',
|
|
2532
|
+
'slideRightFast',
|
|
2533
|
+
'slideUp',
|
|
2534
|
+
'slideUpSlow',
|
|
2535
|
+
'slideUpFast',
|
|
2536
|
+
'slideDown',
|
|
2537
|
+
'slideDownSlow',
|
|
2538
|
+
'slideDownFast',
|
|
2539
|
+
'carouselLeft',
|
|
2540
|
+
'carouselLeftSlow',
|
|
2541
|
+
'carouselLeftFast',
|
|
2542
|
+
'carouselRight',
|
|
2543
|
+
'carouselRightSlow',
|
|
2544
|
+
'carouselRightFast',
|
|
2545
|
+
'carouselUp',
|
|
2546
|
+
'carouselUpSlow',
|
|
2547
|
+
'carouselUpFast',
|
|
2548
|
+
'carouselDown',
|
|
2549
|
+
'carouselDownSlow',
|
|
2550
|
+
'carouselDownFast',
|
|
2551
|
+
'shuffleTopRight',
|
|
2552
|
+
'shuffleTopRightSlow',
|
|
2553
|
+
'shuffleTopRightFast',
|
|
2554
|
+
'shuffleRightTop',
|
|
2555
|
+
'shuffleRightTopSlow',
|
|
2556
|
+
'shuffleRightTopFast',
|
|
2557
|
+
'shuffleRightBottom',
|
|
2558
|
+
'shuffleRightBottomSlow',
|
|
2559
|
+
'shuffleRightBottomFast',
|
|
2560
|
+
'shuffleBottomRight',
|
|
2561
|
+
'shuffleBottomRightSlow',
|
|
2562
|
+
'shuffleBottomRightFast',
|
|
2563
|
+
'shuffleBottomLeft',
|
|
2564
|
+
'shuffleBottomLeftSlow',
|
|
2565
|
+
'shuffleBottomLeftFast',
|
|
2566
|
+
'shuffleLeftBottom',
|
|
2567
|
+
'shuffleLeftBottomSlow',
|
|
2568
|
+
'shuffleLeftBottomFast',
|
|
2569
|
+
'shuffleLeftTop',
|
|
2570
|
+
'shuffleLeftTopSlow',
|
|
2571
|
+
'shuffleLeftTopFast',
|
|
2572
|
+
'shuffleTopLeft',
|
|
2573
|
+
'shuffleTopLeftSlow',
|
|
2574
|
+
'shuffleTopLeftFast',
|
|
2575
|
+
'zoom'
|
|
2576
|
+
]))
|
|
2625
2577
|
}).strict();
|
|
2626
2578
|
|
|
2627
2579
|
export const transitionSchema = transitionTransitionSchema;
|
|
@@ -2637,43 +2589,45 @@ export const transitionSchema = transitionTransitionSchema;
|
|
|
2637
2589
|
* </ul>
|
|
2638
2590
|
*/
|
|
2639
2591
|
export const tweenTweenSchema = z.object({
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2592
|
+
from: z.optional(z.unknown()),
|
|
2593
|
+
to: z.optional(z.unknown()),
|
|
2594
|
+
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*\}\}$/)])),
|
|
2595
|
+
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*\}\}$/)])),
|
|
2596
|
+
interpolation: z.optional(z.enum([
|
|
2597
|
+
'linear',
|
|
2598
|
+
'bezier',
|
|
2599
|
+
'constant'
|
|
2600
|
+
])),
|
|
2601
|
+
easing: z.optional(z.enum([
|
|
2602
|
+
'ease',
|
|
2603
|
+
'easeIn',
|
|
2604
|
+
'easeOut',
|
|
2605
|
+
'easeInOut',
|
|
2606
|
+
'easeInQuad',
|
|
2607
|
+
'easeInCubic',
|
|
2608
|
+
'easeInQuart',
|
|
2609
|
+
'easeInQuint',
|
|
2610
|
+
'easeInSine',
|
|
2611
|
+
'easeInExpo',
|
|
2612
|
+
'easeInCirc',
|
|
2613
|
+
'easeInBack',
|
|
2614
|
+
'easeOutQuad',
|
|
2615
|
+
'easeOutCubic',
|
|
2616
|
+
'easeOutQuart',
|
|
2617
|
+
'easeOutQuint',
|
|
2618
|
+
'easeOutSine',
|
|
2619
|
+
'easeOutExpo',
|
|
2620
|
+
'easeOutCirc',
|
|
2621
|
+
'easeOutBack',
|
|
2622
|
+
'easeInOutQuad',
|
|
2623
|
+
'easeInOutCubic',
|
|
2624
|
+
'easeInOutQuart',
|
|
2625
|
+
'easeInOutQuint',
|
|
2626
|
+
'easeInOutSine',
|
|
2627
|
+
'easeInOutExpo',
|
|
2628
|
+
'easeInOutCirc',
|
|
2629
|
+
'easeInOutBack'
|
|
2630
|
+
]))
|
|
2677
2631
|
}).strict();
|
|
2678
2632
|
|
|
2679
2633
|
export const tweenSchema = tweenTweenSchema;
|
|
@@ -2682,14 +2636,20 @@ export const tweenSchema = tweenTweenSchema;
|
|
|
2682
2636
|
* 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.
|
|
2683
2637
|
*/
|
|
2684
2638
|
export const audioassetAudioAssetSchema = z.object({
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2639
|
+
type: z.enum(['audio']),
|
|
2640
|
+
src: z.string().min(1).regex(/\S/),
|
|
2641
|
+
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*\}\}$/)])),
|
|
2642
|
+
volume: z.optional(z.union([
|
|
2643
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
2644
|
+
z.array(tweenTweenSchema)
|
|
2645
|
+
])),
|
|
2646
|
+
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*\}\}$/)])),
|
|
2647
|
+
effect: z.optional(z.enum([
|
|
2648
|
+
'none',
|
|
2649
|
+
'fadeIn',
|
|
2650
|
+
'fadeOut',
|
|
2651
|
+
'fadeInFadeOut'
|
|
2652
|
+
]))
|
|
2693
2653
|
}).strict();
|
|
2694
2654
|
|
|
2695
2655
|
export const audioAssetSchema = audioassetAudioAssetSchema;
|
|
@@ -2698,12 +2658,14 @@ export const audioAssetSchema = audioassetAudioAssetSchema;
|
|
|
2698
2658
|
* Offsets the position of an asset horizontally or vertically by a relative distance.
|
|
2699
2659
|
*/
|
|
2700
2660
|
export const offsetOffsetSchema = z.object({
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2661
|
+
x: z.optional(z.union([
|
|
2662
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
2663
|
+
z.array(tweenTweenSchema)
|
|
2664
|
+
])),
|
|
2665
|
+
y: z.optional(z.union([
|
|
2666
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
2667
|
+
z.array(tweenTweenSchema)
|
|
2668
|
+
]))
|
|
2707
2669
|
}).strict();
|
|
2708
2670
|
|
|
2709
2671
|
export const offsetSchema = offsetOffsetSchema;
|
|
@@ -2712,44 +2674,51 @@ export const offsetSchema = offsetOffsetSchema;
|
|
|
2712
2674
|
* Rotate a clip by the specified angle in degrees. Rotation origin is set based on the clips `position`.
|
|
2713
2675
|
*/
|
|
2714
2676
|
export const rotatetransformationRotateTransformationSchema = z.object({
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2677
|
+
angle: z.optional(z.union([
|
|
2678
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
2679
|
+
z.array(tweenTweenSchema)
|
|
2680
|
+
]))
|
|
2718
2681
|
}).strict();
|
|
2719
2682
|
|
|
2720
|
-
export const rotateTransformationSchema =
|
|
2721
|
-
rotatetransformationRotateTransformationSchema;
|
|
2683
|
+
export const rotateTransformationSchema = rotatetransformationRotateTransformationSchema;
|
|
2722
2684
|
|
|
2723
2685
|
/**
|
|
2724
2686
|
* 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.
|
|
2725
2687
|
*/
|
|
2726
2688
|
export const skewtransformationSkewTransformationSchema = z.object({
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2689
|
+
x: z.optional(z.union([
|
|
2690
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
2691
|
+
z.array(tweenTweenSchema)
|
|
2692
|
+
])),
|
|
2693
|
+
y: z.optional(z.union([
|
|
2694
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
2695
|
+
z.array(tweenTweenSchema)
|
|
2696
|
+
]))
|
|
2733
2697
|
}).strict();
|
|
2734
2698
|
|
|
2735
|
-
export const skewTransformationSchema =
|
|
2736
|
-
skewtransformationSkewTransformationSchema;
|
|
2699
|
+
export const skewTransformationSchema = skewtransformationSkewTransformationSchema;
|
|
2737
2700
|
|
|
2738
2701
|
/**
|
|
2739
2702
|
* 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.
|
|
2740
2703
|
*/
|
|
2741
2704
|
export const texttospeechassetTextToSpeechAssetSchema = z.object({
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2705
|
+
type: z.enum(['text-to-speech']),
|
|
2706
|
+
text: z.string(),
|
|
2707
|
+
voice: z.string(),
|
|
2708
|
+
language: z.optional(z.string()),
|
|
2709
|
+
newscaster: z.optional(z.boolean()).default(false),
|
|
2710
|
+
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*\}\}$/)])),
|
|
2711
|
+
volume: z.optional(z.union([
|
|
2712
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
2713
|
+
z.array(tweenTweenSchema)
|
|
2714
|
+
])),
|
|
2715
|
+
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*\}\}$/)])),
|
|
2716
|
+
effect: z.optional(z.enum([
|
|
2717
|
+
'none',
|
|
2718
|
+
'fadeIn',
|
|
2719
|
+
'fadeOut',
|
|
2720
|
+
'fadeInFadeOut'
|
|
2721
|
+
]))
|
|
2753
2722
|
}).strict();
|
|
2754
2723
|
|
|
2755
2724
|
export const textToSpeechAssetSchema = texttospeechassetTextToSpeechAssetSchema;
|
|
@@ -2763,49 +2732,43 @@ export const textToSpeechAssetSchema = texttospeechassetTextToSpeechAssetSchema;
|
|
|
2763
2732
|
* @deprecated
|
|
2764
2733
|
*/
|
|
2765
2734
|
export const titleassetTitleAssetSchema = z.object({
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
"left",
|
|
2804
|
-
"topLeft",
|
|
2805
|
-
"center",
|
|
2806
|
-
]),
|
|
2807
|
-
),
|
|
2808
|
-
offset: z.optional(offsetOffsetSchema),
|
|
2735
|
+
type: z.enum(['title']),
|
|
2736
|
+
text: z.string(),
|
|
2737
|
+
style: z.optional(z.enum([
|
|
2738
|
+
'minimal',
|
|
2739
|
+
'blockbuster',
|
|
2740
|
+
'vogue',
|
|
2741
|
+
'sketchy',
|
|
2742
|
+
'skinny',
|
|
2743
|
+
'chunk',
|
|
2744
|
+
'chunkLight',
|
|
2745
|
+
'marker',
|
|
2746
|
+
'future',
|
|
2747
|
+
'subtitle'
|
|
2748
|
+
])),
|
|
2749
|
+
color: z.optional(z.string()),
|
|
2750
|
+
size: z.optional(z.enum([
|
|
2751
|
+
'xx-small',
|
|
2752
|
+
'x-small',
|
|
2753
|
+
'small',
|
|
2754
|
+
'medium',
|
|
2755
|
+
'large',
|
|
2756
|
+
'x-large',
|
|
2757
|
+
'xx-large'
|
|
2758
|
+
])),
|
|
2759
|
+
background: z.optional(z.string()),
|
|
2760
|
+
position: z.optional(z.enum([
|
|
2761
|
+
'top',
|
|
2762
|
+
'topRight',
|
|
2763
|
+
'right',
|
|
2764
|
+
'bottomRight',
|
|
2765
|
+
'bottom',
|
|
2766
|
+
'bottomLeft',
|
|
2767
|
+
'left',
|
|
2768
|
+
'topLeft',
|
|
2769
|
+
'center'
|
|
2770
|
+
])),
|
|
2771
|
+
offset: z.optional(offsetOffsetSchema)
|
|
2809
2772
|
}).strict();
|
|
2810
2773
|
|
|
2811
2774
|
export const titleAssetSchema = titleassetTitleAssetSchema;
|
|
@@ -2814,9 +2777,9 @@ export const titleAssetSchema = titleassetTitleAssetSchema;
|
|
|
2814
2777
|
* 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.
|
|
2815
2778
|
*/
|
|
2816
2779
|
export const transformationTransformationSchema = z.object({
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2780
|
+
rotate: z.optional(rotatetransformationRotateTransformationSchema),
|
|
2781
|
+
skew: z.optional(skewtransformationSkewTransformationSchema),
|
|
2782
|
+
flip: z.optional(fliptransformationFlipTransformationSchema)
|
|
2820
2783
|
}).strict();
|
|
2821
2784
|
|
|
2822
2785
|
export const transformationSchema = transformationTransformationSchema;
|
|
@@ -2825,19 +2788,23 @@ export const transformationSchema = transformationTransformationSchema;
|
|
|
2825
2788
|
* 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.
|
|
2826
2789
|
*/
|
|
2827
2790
|
export const videoassetVideoAssetSchema = z.object({
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
z.enum([
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2791
|
+
type: z.enum(['video']),
|
|
2792
|
+
src: z.string().min(1).regex(/\S/),
|
|
2793
|
+
transcode: z.optional(z.boolean()),
|
|
2794
|
+
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*\}\}$/)])),
|
|
2795
|
+
volume: z.optional(z.union([
|
|
2796
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
2797
|
+
z.array(tweenTweenSchema)
|
|
2798
|
+
])),
|
|
2799
|
+
volumeEffect: z.optional(z.enum([
|
|
2800
|
+
'none',
|
|
2801
|
+
'fadeIn',
|
|
2802
|
+
'fadeOut',
|
|
2803
|
+
'fadeInFadeOut'
|
|
2804
|
+
])),
|
|
2805
|
+
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*\}\}$/)])),
|
|
2806
|
+
crop: z.optional(cropCropSchema),
|
|
2807
|
+
chromaKey: z.optional(chromakeyChromaKeySchema)
|
|
2841
2808
|
}).strict();
|
|
2842
2809
|
|
|
2843
2810
|
export const videoAssetSchema = videoassetVideoAssetSchema;
|
|
@@ -2869,72 +2836,77 @@ export const assetSchema = assetAssetSchema;
|
|
|
2869
2836
|
* 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.
|
|
2870
2837
|
*/
|
|
2871
2838
|
export const clipClipSchema = z.object({
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
]),
|
|
2877
|
-
length: z.union([
|
|
2878
|
-
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
2879
|
-
z.union([z.string().regex(/^(auto|end|alias:\/\/[A-Za-z0-9_-]+)$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2880
|
-
]),
|
|
2881
|
-
fit: z.optional(z.enum(["cover", "contain", "crop", "none"])),
|
|
2882
|
-
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)])),
|
|
2883
|
-
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*\}\}$/)])),
|
|
2884
|
-
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*\}\}$/)])),
|
|
2885
|
-
position: z.optional(
|
|
2886
|
-
z.enum([
|
|
2887
|
-
"top",
|
|
2888
|
-
"topRight",
|
|
2889
|
-
"right",
|
|
2890
|
-
"bottomRight",
|
|
2891
|
-
"bottom",
|
|
2892
|
-
"bottomLeft",
|
|
2893
|
-
"left",
|
|
2894
|
-
"topLeft",
|
|
2895
|
-
"center",
|
|
2839
|
+
asset: assetAssetSchema,
|
|
2840
|
+
start: z.union([
|
|
2841
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
2842
|
+
z.union([z.string().regex(/^(auto|alias:\/\/[A-Za-z0-9_-]+)$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
2896
2843
|
]),
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
effect: z.optional(
|
|
2901
|
-
z.enum([
|
|
2902
|
-
"zoomIn",
|
|
2903
|
-
"zoomInSlow",
|
|
2904
|
-
"zoomInFast",
|
|
2905
|
-
"zoomOut",
|
|
2906
|
-
"zoomOutSlow",
|
|
2907
|
-
"zoomOutFast",
|
|
2908
|
-
"slideLeft",
|
|
2909
|
-
"slideLeftSlow",
|
|
2910
|
-
"slideLeftFast",
|
|
2911
|
-
"slideRight",
|
|
2912
|
-
"slideRightSlow",
|
|
2913
|
-
"slideRightFast",
|
|
2914
|
-
"slideUp",
|
|
2915
|
-
"slideUpSlow",
|
|
2916
|
-
"slideUpFast",
|
|
2917
|
-
"slideDown",
|
|
2918
|
-
"slideDownSlow",
|
|
2919
|
-
"slideDownFast",
|
|
2844
|
+
length: z.union([
|
|
2845
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
2846
|
+
z.union([z.string().regex(/^(auto|end|alias:\/\/[A-Za-z0-9_-]+)$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
2920
2847
|
]),
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2848
|
+
fit: z.optional(z.enum([
|
|
2849
|
+
'cover',
|
|
2850
|
+
'contain',
|
|
2851
|
+
'crop',
|
|
2852
|
+
'none'
|
|
2853
|
+
])),
|
|
2854
|
+
scale: z.optional(z.union([
|
|
2855
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
2856
|
+
z.array(tweenTweenSchema)
|
|
2857
|
+
])),
|
|
2858
|
+
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*\}\}$/)])),
|
|
2859
|
+
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*\}\}$/)])),
|
|
2860
|
+
position: z.optional(z.enum([
|
|
2861
|
+
'top',
|
|
2862
|
+
'topRight',
|
|
2863
|
+
'right',
|
|
2864
|
+
'bottomRight',
|
|
2865
|
+
'bottom',
|
|
2866
|
+
'bottomLeft',
|
|
2867
|
+
'left',
|
|
2868
|
+
'topLeft',
|
|
2869
|
+
'center'
|
|
2870
|
+
])),
|
|
2871
|
+
offset: z.optional(offsetOffsetSchema),
|
|
2872
|
+
transition: z.optional(transitionTransitionSchema),
|
|
2873
|
+
effect: z.optional(z.enum([
|
|
2874
|
+
'zoomIn',
|
|
2875
|
+
'zoomInSlow',
|
|
2876
|
+
'zoomInFast',
|
|
2877
|
+
'zoomOut',
|
|
2878
|
+
'zoomOutSlow',
|
|
2879
|
+
'zoomOutFast',
|
|
2880
|
+
'slideLeft',
|
|
2881
|
+
'slideLeftSlow',
|
|
2882
|
+
'slideLeftFast',
|
|
2883
|
+
'slideRight',
|
|
2884
|
+
'slideRightSlow',
|
|
2885
|
+
'slideRightFast',
|
|
2886
|
+
'slideUp',
|
|
2887
|
+
'slideUpSlow',
|
|
2888
|
+
'slideUpFast',
|
|
2889
|
+
'slideDown',
|
|
2890
|
+
'slideDownSlow',
|
|
2891
|
+
'slideDownFast'
|
|
2892
|
+
])),
|
|
2893
|
+
filter: z.optional(z.enum([
|
|
2894
|
+
'none',
|
|
2895
|
+
'blur',
|
|
2896
|
+
'boost',
|
|
2897
|
+
'contrast',
|
|
2898
|
+
'darken',
|
|
2899
|
+
'greyscale',
|
|
2900
|
+
'lighten',
|
|
2901
|
+
'muted',
|
|
2902
|
+
'negative'
|
|
2903
|
+
])),
|
|
2904
|
+
opacity: z.optional(z.union([
|
|
2905
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) 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*\}\}$/)]),
|
|
2906
|
+
z.array(tweenTweenSchema)
|
|
2907
|
+
])),
|
|
2908
|
+
transform: z.optional(transformationTransformationSchema),
|
|
2909
|
+
alias: z.optional(z.union([z.string().regex(/^[A-Za-z0-9_-]+$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
|
|
2938
2910
|
}).strict();
|
|
2939
2911
|
|
|
2940
2912
|
export const clipSchema = clipClipSchema;
|
|
@@ -2956,7 +2928,7 @@ const clipClipSchemaWithFitFilter = clipClipSchema.transform((clip) => {
|
|
|
2956
2928
|
* 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.
|
|
2957
2929
|
*/
|
|
2958
2930
|
export const trackTrackSchema = z.object({
|
|
2959
|
-
|
|
2931
|
+
clips: z.array(clipClipSchemaWithFitFilter).min(1)
|
|
2960
2932
|
}).strict();
|
|
2961
2933
|
|
|
2962
2934
|
export const trackSchema = trackTrackSchema;
|
|
@@ -2965,11 +2937,11 @@ export const trackSchema = trackTrackSchema;
|
|
|
2965
2937
|
* 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.
|
|
2966
2938
|
*/
|
|
2967
2939
|
export const timelineTimelineSchema = z.object({
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2940
|
+
soundtrack: z.optional(soundtrackSoundtrackSchema),
|
|
2941
|
+
background: z.optional(z.string()),
|
|
2942
|
+
fonts: z.optional(z.array(fontFontSchema)),
|
|
2943
|
+
tracks: z.array(trackTrackSchema).min(1),
|
|
2944
|
+
cache: z.optional(z.boolean())
|
|
2973
2945
|
}).strict();
|
|
2974
2946
|
|
|
2975
2947
|
export const timelineSchema = timelineTimelineSchema;
|
|
@@ -2978,12 +2950,16 @@ export const timelineSchema = timelineTimelineSchema;
|
|
|
2978
2950
|
* 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.
|
|
2979
2951
|
*/
|
|
2980
2952
|
export const editEditSchema = z.object({
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2953
|
+
timeline: timelineTimelineSchema,
|
|
2954
|
+
output: outputOutputSchema,
|
|
2955
|
+
merge: z.optional(z.array(mergefieldMergeFieldSchema)),
|
|
2956
|
+
callback: z.optional(z.string()),
|
|
2957
|
+
disk: z.optional(z.enum(['local', 'mount'])),
|
|
2958
|
+
instance: z.optional(z.enum([
|
|
2959
|
+
's1',
|
|
2960
|
+
's2',
|
|
2961
|
+
'a1'
|
|
2962
|
+
]))
|
|
2987
2963
|
}).strict();
|
|
2988
2964
|
|
|
2989
2965
|
export const editSchema = editEditSchema;
|
|
@@ -2992,39 +2968,44 @@ export const editSchema = editEditSchema;
|
|
|
2992
2968
|
* The response data returned with the [RenderResponse](#tocs_renderresponse) including status and URL.
|
|
2993
2969
|
*/
|
|
2994
2970
|
export const renderresponsedataRenderResponseDataSchema = z.object({
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
2971
|
+
id: z.string(),
|
|
2972
|
+
owner: z.string(),
|
|
2973
|
+
plan: z.optional(z.string()),
|
|
2974
|
+
status: z.enum([
|
|
2975
|
+
'queued',
|
|
2976
|
+
'fetching',
|
|
2977
|
+
'preprocessing',
|
|
2978
|
+
'rendering',
|
|
2979
|
+
'saving',
|
|
2980
|
+
'done',
|
|
2981
|
+
'failed'
|
|
2982
|
+
]),
|
|
2983
|
+
error: z.optional(z.string()),
|
|
2984
|
+
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*\}\}$/)])),
|
|
2985
|
+
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*\}\}$/)])),
|
|
2986
|
+
url: z.optional(z.string()),
|
|
2987
|
+
poster: z.optional(z.union([
|
|
2988
|
+
z.string(),
|
|
2989
|
+
z.null()
|
|
2990
|
+
])),
|
|
2991
|
+
thumbnail: z.optional(z.union([
|
|
2992
|
+
z.string(),
|
|
2993
|
+
z.null()
|
|
2994
|
+
])),
|
|
2995
|
+
data: z.optional(editEditSchema),
|
|
2996
|
+
created: z.optional(z.string()),
|
|
2997
|
+
updated: z.optional(z.string())
|
|
2998
|
+
}).strict();
|
|
2999
|
+
|
|
3000
|
+
export const renderResponseDataSchema = renderresponsedataRenderResponseDataSchema;
|
|
3020
3001
|
|
|
3021
3002
|
/**
|
|
3022
3003
|
* 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.
|
|
3023
3004
|
*/
|
|
3024
3005
|
export const renderresponseRenderResponseSchema = z.object({
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3006
|
+
success: z.boolean(),
|
|
3007
|
+
message: z.string(),
|
|
3008
|
+
response: renderresponsedataRenderResponseDataSchema
|
|
3028
3009
|
}).strict();
|
|
3029
3010
|
|
|
3030
3011
|
export const renderResponseSchema = renderresponseRenderResponseSchema;
|
|
@@ -3033,41 +3014,39 @@ export const renderResponseSchema = renderresponseRenderResponseSchema;
|
|
|
3033
3014
|
* The response data returned with the [TemplateDataResponse](#tocs_templatedataresponse).
|
|
3034
3015
|
*/
|
|
3035
3016
|
export const templatedataresponsedataTemplateDataResponseDataSchema = z.object({
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3017
|
+
id: z.string(),
|
|
3018
|
+
name: z.string(),
|
|
3019
|
+
owner: z.string(),
|
|
3020
|
+
template: editEditSchema
|
|
3040
3021
|
}).strict();
|
|
3041
3022
|
|
|
3042
|
-
export const templateDataResponseDataSchema =
|
|
3043
|
-
templatedataresponsedataTemplateDataResponseDataSchema;
|
|
3023
|
+
export const templateDataResponseDataSchema = templatedataresponsedataTemplateDataResponseDataSchema;
|
|
3044
3024
|
|
|
3045
3025
|
/**
|
|
3046
3026
|
* The template data including the template name and [Edit](#tocs_edit).
|
|
3047
3027
|
*/
|
|
3048
3028
|
export const templatedataresponseTemplateDataResponseSchema = z.object({
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3029
|
+
success: z.boolean(),
|
|
3030
|
+
message: z.string(),
|
|
3031
|
+
response: templatedataresponsedataTemplateDataResponseDataSchema
|
|
3052
3032
|
}).strict();
|
|
3053
3033
|
|
|
3054
|
-
export const templateDataResponseSchema =
|
|
3055
|
-
templatedataresponseTemplateDataResponseSchema;
|
|
3034
|
+
export const templateDataResponseSchema = templatedataresponseTemplateDataResponseSchema;
|
|
3056
3035
|
|
|
3057
3036
|
/**
|
|
3058
3037
|
* A template is a saved [Edit](#tocs_edit) than can be loaded and re-used.
|
|
3059
3038
|
*/
|
|
3060
3039
|
export const templateTemplateSchema = z.object({
|
|
3061
|
-
|
|
3062
|
-
|
|
3040
|
+
name: z.string(),
|
|
3041
|
+
template: z.optional(editEditSchema)
|
|
3063
3042
|
}).strict();
|
|
3064
3043
|
|
|
3065
3044
|
export const templateSchema = templateTemplateSchema;
|
|
3066
3045
|
|
|
3067
3046
|
export const postRenderRequest = z.object({
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3047
|
+
body: editEditSchema,
|
|
3048
|
+
path: z.optional(z.never()),
|
|
3049
|
+
query: z.optional(z.never())
|
|
3071
3050
|
}).strict();
|
|
3072
3051
|
|
|
3073
3052
|
/**
|
|
@@ -3076,20 +3055,14 @@ export const postRenderRequest = z.object({
|
|
|
3076
3055
|
export const postRenderResponse = queuedresponseQueuedResponseSchema;
|
|
3077
3056
|
|
|
3078
3057
|
export const getRenderRequest = z.object({
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
.string()
|
|
3083
|
-
.regex(
|
|
3084
|
-
/^[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}$/,
|
|
3085
|
-
),
|
|
3086
|
-
}),
|
|
3087
|
-
query: z.optional(
|
|
3088
|
-
z.object({
|
|
3089
|
-
data: z.optional(z.boolean()),
|
|
3090
|
-
merged: z.optional(z.boolean()),
|
|
3058
|
+
body: z.optional(z.never()),
|
|
3059
|
+
path: z.object({
|
|
3060
|
+
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*\}\}$/)])
|
|
3091
3061
|
}),
|
|
3092
|
-
|
|
3062
|
+
query: z.optional(z.object({
|
|
3063
|
+
data: z.optional(z.boolean()),
|
|
3064
|
+
merged: z.optional(z.boolean())
|
|
3065
|
+
}))
|
|
3093
3066
|
}).strict();
|
|
3094
3067
|
|
|
3095
3068
|
/**
|
|
@@ -3098,21 +3071,20 @@ export const getRenderRequest = z.object({
|
|
|
3098
3071
|
export const getRenderResponse = renderresponseRenderResponseSchema;
|
|
3099
3072
|
|
|
3100
3073
|
export const getTemplatesRequest = z.object({
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3074
|
+
body: z.optional(z.never()),
|
|
3075
|
+
path: z.optional(z.never()),
|
|
3076
|
+
query: z.optional(z.never())
|
|
3104
3077
|
}).strict();
|
|
3105
3078
|
|
|
3106
3079
|
/**
|
|
3107
3080
|
* The list of templates stored against a users account
|
|
3108
3081
|
*/
|
|
3109
|
-
export const getTemplatesResponse =
|
|
3110
|
-
templatelistresponseTemplateListResponseSchema;
|
|
3082
|
+
export const getTemplatesResponse = templatelistresponseTemplateListResponseSchema;
|
|
3111
3083
|
|
|
3112
3084
|
export const postTemplateRequest = z.object({
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3085
|
+
body: templateTemplateSchema,
|
|
3086
|
+
path: z.optional(z.never()),
|
|
3087
|
+
query: z.optional(z.never())
|
|
3116
3088
|
}).strict();
|
|
3117
3089
|
|
|
3118
3090
|
/**
|
|
@@ -3121,15 +3093,11 @@ export const postTemplateRequest = z.object({
|
|
|
3121
3093
|
export const postTemplateResponse = templateresponseTemplateResponseSchema;
|
|
3122
3094
|
|
|
3123
3095
|
export const deleteTemplateRequest = z.object({
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
/^[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}$/,
|
|
3130
|
-
),
|
|
3131
|
-
}),
|
|
3132
|
-
query: z.optional(z.never()),
|
|
3096
|
+
body: z.optional(z.never()),
|
|
3097
|
+
path: z.object({
|
|
3098
|
+
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*\}\}$/)])
|
|
3099
|
+
}),
|
|
3100
|
+
query: z.optional(z.never())
|
|
3133
3101
|
}).strict();
|
|
3134
3102
|
|
|
3135
3103
|
/**
|
|
@@ -3138,33 +3106,24 @@ export const deleteTemplateRequest = z.object({
|
|
|
3138
3106
|
export const deleteTemplateResponse = z.void();
|
|
3139
3107
|
|
|
3140
3108
|
export const getTemplateRequest = z.object({
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
/^[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}$/,
|
|
3147
|
-
),
|
|
3148
|
-
}),
|
|
3149
|
-
query: z.optional(z.never()),
|
|
3109
|
+
body: z.optional(z.never()),
|
|
3110
|
+
path: z.object({
|
|
3111
|
+
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*\}\}$/)])
|
|
3112
|
+
}),
|
|
3113
|
+
query: z.optional(z.never())
|
|
3150
3114
|
}).strict();
|
|
3151
3115
|
|
|
3152
3116
|
/**
|
|
3153
3117
|
* The template details including the [Edit](#tocs_edit)
|
|
3154
3118
|
*/
|
|
3155
|
-
export const getTemplateResponse =
|
|
3156
|
-
templatedataresponseTemplateDataResponseSchema;
|
|
3119
|
+
export const getTemplateResponse = templatedataresponseTemplateDataResponseSchema;
|
|
3157
3120
|
|
|
3158
3121
|
export const putTemplateRequest = z.object({
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
/^[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}$/,
|
|
3165
|
-
),
|
|
3166
|
-
}),
|
|
3167
|
-
query: z.optional(z.never()),
|
|
3122
|
+
body: templateTemplateSchema,
|
|
3123
|
+
path: z.object({
|
|
3124
|
+
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*\}\}$/)])
|
|
3125
|
+
}),
|
|
3126
|
+
query: z.optional(z.never())
|
|
3168
3127
|
}).strict();
|
|
3169
3128
|
|
|
3170
3129
|
/**
|
|
@@ -3173,9 +3132,9 @@ export const putTemplateRequest = z.object({
|
|
|
3173
3132
|
export const putTemplateResponse = templateresponseTemplateResponseSchema;
|
|
3174
3133
|
|
|
3175
3134
|
export const postTemplateRenderRequest = z.object({
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3135
|
+
body: templaterenderTemplateRenderSchema,
|
|
3136
|
+
path: z.optional(z.never()),
|
|
3137
|
+
query: z.optional(z.never())
|
|
3179
3138
|
}).strict();
|
|
3180
3139
|
|
|
3181
3140
|
/**
|
|
@@ -3184,11 +3143,11 @@ export const postTemplateRenderRequest = z.object({
|
|
|
3184
3143
|
export const postTemplateRenderResponse = queuedresponseQueuedResponseSchema;
|
|
3185
3144
|
|
|
3186
3145
|
export const probeRequest = z.object({
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3146
|
+
body: z.optional(z.never()),
|
|
3147
|
+
path: z.object({
|
|
3148
|
+
url: z.string()
|
|
3149
|
+
}),
|
|
3150
|
+
query: z.optional(z.never())
|
|
3192
3151
|
}).strict();
|
|
3193
3152
|
|
|
3194
3153
|
/**
|
|
@@ -3197,15 +3156,11 @@ export const probeRequest = z.object({
|
|
|
3197
3156
|
export const probeResponse = proberesponseProbeResponseSchema;
|
|
3198
3157
|
|
|
3199
3158
|
export const deleteAssetRequest = z.object({
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
3206
|
-
),
|
|
3207
|
-
}),
|
|
3208
|
-
query: z.optional(z.never()),
|
|
3159
|
+
body: z.optional(z.never()),
|
|
3160
|
+
path: z.object({
|
|
3161
|
+
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*\}\}$/)])
|
|
3162
|
+
}),
|
|
3163
|
+
query: z.optional(z.never())
|
|
3209
3164
|
}).strict();
|
|
3210
3165
|
|
|
3211
3166
|
/**
|
|
@@ -3214,15 +3169,11 @@ export const deleteAssetRequest = z.object({
|
|
|
3214
3169
|
export const deleteAssetResponse = z.void();
|
|
3215
3170
|
|
|
3216
3171
|
export const getAssetRequest = z.object({
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
/^[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}$/,
|
|
3223
|
-
),
|
|
3224
|
-
}),
|
|
3225
|
-
query: z.optional(z.never()),
|
|
3172
|
+
body: z.optional(z.never()),
|
|
3173
|
+
path: z.object({
|
|
3174
|
+
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*\}\}$/)])
|
|
3175
|
+
}),
|
|
3176
|
+
query: z.optional(z.never())
|
|
3226
3177
|
}).strict();
|
|
3227
3178
|
|
|
3228
3179
|
/**
|
|
@@ -3231,27 +3182,22 @@ export const getAssetRequest = z.object({
|
|
|
3231
3182
|
export const getAssetResponse = assetresponseAssetResponseSchema;
|
|
3232
3183
|
|
|
3233
3184
|
export const getAssetByRenderIdRequest = z.object({
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
/^[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}$/,
|
|
3240
|
-
),
|
|
3241
|
-
}),
|
|
3242
|
-
query: z.optional(z.never()),
|
|
3185
|
+
body: z.optional(z.never()),
|
|
3186
|
+
path: z.object({
|
|
3187
|
+
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*\}\}$/)])
|
|
3188
|
+
}),
|
|
3189
|
+
query: z.optional(z.never())
|
|
3243
3190
|
}).strict();
|
|
3244
3191
|
|
|
3245
3192
|
/**
|
|
3246
3193
|
* Get one or more assets by render id
|
|
3247
3194
|
*/
|
|
3248
|
-
export const getAssetByRenderIdResponse =
|
|
3249
|
-
assetrenderresponseAssetRenderResponseSchema;
|
|
3195
|
+
export const getAssetByRenderIdResponse = assetrenderresponseAssetRenderResponseSchema;
|
|
3250
3196
|
|
|
3251
3197
|
export const postServeAssetRequest = z.object({
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3198
|
+
body: transferTransferSchema,
|
|
3199
|
+
path: z.optional(z.never()),
|
|
3200
|
+
query: z.optional(z.never())
|
|
3255
3201
|
}).strict();
|
|
3256
3202
|
|
|
3257
3203
|
/**
|
|
@@ -3260,9 +3206,9 @@ export const postServeAssetRequest = z.object({
|
|
|
3260
3206
|
export const postServeAssetResponse = transferresponseTransferResponseSchema;
|
|
3261
3207
|
|
|
3262
3208
|
export const getSourcesRequest = z.object({
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3209
|
+
body: z.optional(z.never()),
|
|
3210
|
+
path: z.optional(z.never()),
|
|
3211
|
+
query: z.optional(z.never())
|
|
3266
3212
|
}).strict();
|
|
3267
3213
|
|
|
3268
3214
|
/**
|
|
@@ -3271,27 +3217,22 @@ export const getSourcesRequest = z.object({
|
|
|
3271
3217
|
export const getSourcesResponse = sourcelistresponseSourceListResponseSchema;
|
|
3272
3218
|
|
|
3273
3219
|
export const postSourceRequest = z.object({
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3220
|
+
body: sourceSourceSchema,
|
|
3221
|
+
path: z.optional(z.never()),
|
|
3222
|
+
query: z.optional(z.never())
|
|
3277
3223
|
}).strict();
|
|
3278
3224
|
|
|
3279
3225
|
/**
|
|
3280
3226
|
* The queued source file details
|
|
3281
3227
|
*/
|
|
3282
|
-
export const postSourceResponse =
|
|
3283
|
-
queuedsourceresponseQueuedSourceResponseSchema;
|
|
3228
|
+
export const postSourceResponse = queuedsourceresponseQueuedSourceResponseSchema;
|
|
3284
3229
|
|
|
3285
3230
|
export const deleteSourceRequest = z.object({
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
/^[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}$/,
|
|
3292
|
-
),
|
|
3293
|
-
}),
|
|
3294
|
-
query: z.optional(z.never()),
|
|
3231
|
+
body: z.optional(z.never()),
|
|
3232
|
+
path: z.object({
|
|
3233
|
+
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*\}\}$/)])
|
|
3234
|
+
}),
|
|
3235
|
+
query: z.optional(z.never())
|
|
3295
3236
|
}).strict();
|
|
3296
3237
|
|
|
3297
3238
|
/**
|
|
@@ -3300,15 +3241,11 @@ export const deleteSourceRequest = z.object({
|
|
|
3300
3241
|
export const deleteSourceResponse = z.void();
|
|
3301
3242
|
|
|
3302
3243
|
export const getSourceRequest = z.object({
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
/^[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}$/,
|
|
3309
|
-
),
|
|
3310
|
-
}),
|
|
3311
|
-
query: z.optional(z.never()),
|
|
3244
|
+
body: z.optional(z.never()),
|
|
3245
|
+
path: z.object({
|
|
3246
|
+
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*\}\}$/)])
|
|
3247
|
+
}),
|
|
3248
|
+
query: z.optional(z.never())
|
|
3312
3249
|
}).strict();
|
|
3313
3250
|
|
|
3314
3251
|
/**
|
|
@@ -3317,9 +3254,9 @@ export const getSourceRequest = z.object({
|
|
|
3317
3254
|
export const getSourceResponse = sourceresponseSourceResponseSchema;
|
|
3318
3255
|
|
|
3319
3256
|
export const getUploadSignedUrlRequest = z.object({
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3257
|
+
body: z.optional(z.never()),
|
|
3258
|
+
path: z.optional(z.never()),
|
|
3259
|
+
query: z.optional(z.never())
|
|
3323
3260
|
}).strict();
|
|
3324
3261
|
|
|
3325
3262
|
/**
|
|
@@ -3328,31 +3265,25 @@ export const getUploadSignedUrlRequest = z.object({
|
|
|
3328
3265
|
export const getUploadSignedUrlResponse = uploadresponseUploadResponseSchema;
|
|
3329
3266
|
|
|
3330
3267
|
export const postGenerateAssetRequest = z.object({
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3268
|
+
body: generatedAssetGeneratedAssetSchema,
|
|
3269
|
+
path: z.optional(z.never()),
|
|
3270
|
+
query: z.optional(z.never())
|
|
3334
3271
|
}).strict();
|
|
3335
3272
|
|
|
3336
3273
|
/**
|
|
3337
3274
|
* The generated asset details
|
|
3338
3275
|
*/
|
|
3339
|
-
export const postGenerateAssetResponse =
|
|
3340
|
-
generatedAssetResponseGeneratedAssetResponseSchema;
|
|
3276
|
+
export const postGenerateAssetResponse = generatedAssetResponseGeneratedAssetResponseSchema;
|
|
3341
3277
|
|
|
3342
3278
|
export const getGeneratedAssetRequest = z.object({
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
/^[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}$/,
|
|
3349
|
-
),
|
|
3350
|
-
}),
|
|
3351
|
-
query: z.optional(z.never()),
|
|
3279
|
+
body: z.optional(z.never()),
|
|
3280
|
+
path: z.object({
|
|
3281
|
+
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*\}\}$/)])
|
|
3282
|
+
}),
|
|
3283
|
+
query: z.optional(z.never())
|
|
3352
3284
|
}).strict();
|
|
3353
3285
|
|
|
3354
3286
|
/**
|
|
3355
3287
|
* The generated asset details
|
|
3356
3288
|
*/
|
|
3357
|
-
export const getGeneratedAssetResponse =
|
|
3358
|
-
generatedAssetResponseGeneratedAssetResponseSchema;
|
|
3289
|
+
export const getGeneratedAssetResponse = generatedAssetResponseGeneratedAssetResponseSchema;
|