@shotstack/schemas 1.9.6 → 1.9.8
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/dist/api.bundled.json +1492 -3430
- package/dist/json-schema/asset.json +1 -853
- package/dist/json-schema/clip.json +1 -853
- package/dist/json-schema/destinations.json +28 -12
- package/dist/json-schema/edit.json +31 -867
- package/dist/json-schema/output.json +28 -12
- package/dist/json-schema/schemas.json +38 -967
- package/dist/json-schema/svg-asset.json +6 -857
- package/dist/json-schema/timeline.json +2 -854
- package/dist/json-schema/track.json +2 -854
- package/dist/schema.d.ts +914 -2451
- package/dist/zod/zod.gen.cjs +97 -1285
- package/dist/zod/zod.gen.d.ts +613 -12248
- package/dist/zod/zod.gen.js +91 -1277
- package/dist/zod/zod.gen.ts +27 -992
- package/package.json +1 -1
- package/dist/json-schema/svg-arrow-shape.json +0 -49
- package/dist/json-schema/svg-circle-shape.json +0 -28
- package/dist/json-schema/svg-cross-shape.json +0 -42
- package/dist/json-schema/svg-ellipse-shape.json +0 -35
- package/dist/json-schema/svg-fill.json +0 -169
- package/dist/json-schema/svg-gradient-stop.json +0 -25
- package/dist/json-schema/svg-heart-shape.json +0 -28
- package/dist/json-schema/svg-line-shape.json +0 -35
- package/dist/json-schema/svg-linear-gradient-fill.json +0 -80
- package/dist/json-schema/svg-path-shape.json +0 -26
- package/dist/json-schema/svg-polygon-shape.json +0 -35
- package/dist/json-schema/svg-radial-gradient-fill.json +0 -66
- package/dist/json-schema/svg-rectangle-shape.json +0 -49
- package/dist/json-schema/svg-ring-shape.json +0 -35
- package/dist/json-schema/svg-shadow.json +0 -79
- package/dist/json-schema/svg-shape.json +0 -404
- package/dist/json-schema/svg-solid-fill.json +0 -40
- package/dist/json-schema/svg-star-shape.json +0 -42
- package/dist/json-schema/svg-stroke.json +0 -115
- package/dist/json-schema/svg-transform.json +0 -93
package/dist/zod/zod.gen.cjs
CHANGED
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
8
|
-
exports.
|
|
9
|
-
exports.
|
|
10
|
-
exports.getTemplatesResponse = exports.getTemplatesRequest = exports.getRenderResponse = exports.getRenderRequest = exports.postRenderResponse = exports.postRenderRequest = exports.templateSchema = exports.templateTemplateSchema = exports.templateDataResponseSchema = exports.templatedataresponseTemplateDataResponseSchema = exports.templateDataResponseDataSchema = exports.templatedataresponsedataTemplateDataResponseDataSchema = exports.renderResponseSchema = exports.renderresponseRenderResponseSchema = exports.renderResponseDataSchema = exports.renderresponsedataRenderResponseDataSchema = exports.editSchema = exports.editEditSchema = exports.timelineSchema = exports.timelineTimelineSchema = exports.trackSchema = exports.trackTrackSchema = exports.clipSchema = exports.clipClipSchema = exports.assetSchema = exports.assetAssetSchema = exports.videoAssetSchema = exports.videoassetVideoAssetSchema = exports.transformationSchema = exports.transformationTransformationSchema = exports.titleAssetSchema = exports.titleassetTitleAssetSchema = exports.textToSpeechAssetSchema = exports.texttospeechassetTextToSpeechAssetSchema = exports.skewTransformationSchema = exports.skewtransformationSkewTransformationSchema = exports.rotateTransformationSchema = exports.rotatetransformationRotateTransformationSchema = exports.offsetSchema = exports.offsetOffsetSchema = exports.audioAssetSchema = exports.audioassetAudioAssetSchema = exports.tweenSchema = exports.tweenTweenSchema = exports.transitionSchema = exports.transitionTransitionSchema = exports.outputSchema = exports.outputOutputSchema = exports.thumbnailSchema = exports.thumbnailThumbnailSchema = void 0;
|
|
11
|
-
exports.getGeneratedAssetResponse = exports.getGeneratedAssetRequest = exports.postGenerateAssetResponse = exports.postGenerateAssetRequest = exports.getUploadSignedUrlResponse = exports.getUploadSignedUrlRequest = exports.getSourceResponse = exports.getSourceRequest = exports.deleteSourceResponse = exports.deleteSourceRequest = exports.postSourceResponse = exports.postSourceRequest = exports.getSourcesResponse = exports.getSourcesRequest = exports.postServeAssetResponse = exports.postServeAssetRequest = exports.getAssetByRenderIdResponse = exports.getAssetByRenderIdRequest = exports.getAssetResponse = exports.getAssetRequest = exports.deleteAssetResponse = exports.deleteAssetRequest = exports.probeResponse = exports.probeRequest = exports.postTemplateRenderResponse = exports.postTemplateRenderRequest = exports.putTemplateResponse = exports.putTemplateRequest = exports.getTemplateResponse = exports.getTemplateRequest = exports.deleteTemplateResponse = exports.deleteTemplateRequest = exports.postTemplateResponse = exports.postTemplateRequest = void 0;
|
|
4
|
+
exports.tiktokDestinationTiktokDestinationSchema = exports.tiktokDestinationOptionsTiktokDestinationOptionsSchema = exports.shotstackDestinationSchema = exports.shotstackDestinationShotstackDestinationSchema = exports.s3DestinationSchema = exports.s3DestinationS3DestinationSchema = exports.s3DestinationOptionsSchema = exports.s3DestinationOptionsS3DestinationOptionsSchema = exports.muxDestinationSchema = exports.muxDestinationMuxDestinationSchema = exports.muxDestinationOptionsSchema = exports.muxDestinationOptionsMuxDestinationOptionsSchema = exports.googleDriveDestinationSchema = exports.googleDriveDestinationGoogleDriveDestinationSchema = exports.googleDriveDestinationOptionsSchema = exports.googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema = exports.googleCloudStorageDestinationSchema = exports.googleCloudStorageDestinationGoogleCloudStorageDestinationSchema = exports.googleCloudStorageDestinationOptionsSchema = exports.googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOptionsSchema = exports.azureBlobStorageDestinationAzureBlobStorageDestinationSchema = exports.azureBlobStorageDestinationOptionsAzureBlobStorageDestinationOptionsSchema = exports.akamaiNetStorageDestinationAkamaiNetStorageDestinationSchema = exports.akamaiNetStorageDestinationOptionsAkamaiNetStorageDestinationOptionsSchema = exports.cropSchema = exports.cropCropSchema = exports.chromaKeySchema = exports.chromakeyChromaKeySchema = exports.captionAssetSchema = exports.captionassetCaptionAssetSchema = exports.captionMarginSchema = exports.captionpropertiesCaptionMarginSchema = exports.captionFontSchema = exports.captionpropertiesCaptionFontSchema = exports.captionBackgroundSchema = exports.captionpropertiesCaptionBackgroundSchema = exports.uploadRootSchema = exports.templatesrenderRootSchema = exports.templatesidRootSchema = exports.templatesRootSchema = exports.sourcesidRootSchema = exports.sourcesRootSchema = exports.renderidRootSchema = exports.renderRootSchema = exports.probeRootSchema = exports.assetsrenderidRootSchema = exports.assetsidRootSchema = exports.assetsRootSchema = exports.sourceRootSchema = exports.editRootSchema = void 0;
|
|
5
|
+
exports.posterSchema = exports.posterPosterSchema = exports.mergeFieldSchema = exports.mergefieldMergeFieldSchema = exports.lumaAssetSchema = exports.lumaassetLumaAssetSchema = exports.transcriptionSchema = exports.transcriptionTranscriptionSchema = exports.speedSchema = exports.speedSpeedSchema = exports.uploadResponseSchema = exports.uploadresponseUploadResponseSchema = exports.uploadResponseDataSchema = exports.uploadresponsedataUploadResponseDataSchema = exports.uploadResponseAttributesSchema = exports.uploadresponseattributesUploadResponseAttributesSchema = exports.queuedSourceResponseSchema = exports.queuedsourceresponseQueuedSourceResponseSchema = exports.queuedSourceResponseDataSchema = exports.queuedsourceresponsedataQueuedSourceResponseDataSchema = exports.ingestErrorResponseSchema = exports.ingesterrorresponseIngestErrorResponseSchema = exports.ingestErrorResponseDataSchema = exports.ingesterrorresponsedataIngestErrorResponseDataSchema = exports.enhancementsSchema = exports.enhancementsEnhancementsSchema = exports.audioEnhancementSchema = exports.audioEnhancementAudioEnhancementSchema = exports.dolbyEnhancementSchema = exports.dolbyEnhancementDolbyEnhancementSchema = exports.dolbyEnhancementOptionsSchema = exports.dolbyEnhancementOptionsDolbyEnhancementOptionsSchema = exports.imageToVideoAssetSchema = exports.imagetovideoassetImageToVideoAssetSchema = exports.imageAssetSchema = exports.imageassetImageAssetSchema = exports.htmlAssetSchema = exports.htmlassetHtmlAssetSchema = exports.fontSchema = exports.fontFontSchema = exports.flipTransformationSchema = exports.fliptransformationFlipTransformationSchema = exports.destinationsSchema = exports.destinationsDestinationsSchema = exports.vimeoDestinationSchema = exports.vimeoDestinationVimeoDestinationSchema = exports.vimeoDestinationOptionsSchema = exports.vimeoDestinationOptionsVimeoDestinationOptionsSchema = exports.vimeoDestinationPrivacyOptionsSchema = exports.vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema = void 0;
|
|
6
|
+
exports.richCaptionAssetSchema = exports.richcaptionassetRichCaptionAssetSchema = exports.richCaptionActiveSchema = exports.richcaptionpropertiesRichCaptionActiveSchema = exports.richTextStrokeSchema = exports.richtextpropertiesRichTextStrokeSchema = exports.richTextShadowSchema = exports.richtextpropertiesRichTextShadowSchema = exports.richtextpropertiesRichTextPaddingSchema = exports.richcaptionpropertiesRichCaptionStyleSchema = exports.richTextGradientSchema = exports.richtextpropertiesRichTextGradientSchema = exports.richtextpropertiesRichTextBorderSchema = exports.richTextBackgroundSchema = exports.richtextpropertiesRichTextBackgroundSchema = exports.richTextAnimationSchema = exports.richtextpropertiesRichTextAnimationSchema = exports.richTextAlignmentSchema = exports.richtextpropertiesRichTextAlignmentSchema = exports.richcaptionpropertiesRichCaptionFontSchema = exports.richCaptionAnimationSchema = exports.richcaptionpropertiesRichCaptionAnimationSchema = exports.richCaptionActiveFontSchema = exports.richcaptionpropertiesRichCaptionActiveFontSchema = exports.templateResponseSchema = exports.templateresponseTemplateResponseSchema = exports.templateResponseDataSchema = exports.templateresponsedataTemplateResponseDataSchema = exports.templateListResponseSchema = exports.templatelistresponseTemplateListResponseSchema = exports.templateListResponseDataSchema = exports.templatelistresponsedataTemplateListResponseDataSchema = exports.templateListResponseItemSchema = exports.templatelistresponseitemTemplateListResponseItemSchema = exports.queuedResponseSchema = exports.queuedresponseQueuedResponseSchema = exports.queuedResponseDataSchema = exports.queuedresponsedataQueuedResponseDataSchema = exports.probeResponseSchema = exports.proberesponseProbeResponseSchema = exports.assetResponseSchema = exports.assetresponseAssetResponseSchema = exports.assetRenderResponseSchema = exports.assetrenderresponseAssetRenderResponseSchema = exports.assetResponseDataSchema = exports.assetresponsedataAssetResponseDataSchema = exports.assetResponseAttributesSchema = exports.assetresponseattributesAssetResponseAttributesSchema = exports.rangeSchema = exports.rangeRangeSchema = void 0;
|
|
7
|
+
exports.textpropertiesTextStrokeSchema = exports.textFontSchema = exports.textpropertiesTextFontSchema = exports.textBackgroundSchema = exports.textpropertiesTextBackgroundSchema = exports.textpropertiesTextAnimationSchema = exports.textAlignmentSchema = exports.textpropertiesTextAlignmentSchema = exports.templateRenderSchema = exports.templaterenderTemplateRenderSchema = exports.svgAssetSchema = exports.svgassetSvgAssetSchema = exports.soundtrackSchema = exports.soundtrackSoundtrackSchema = exports.sourceSchema = exports.sourceSourceSchema = exports.sourceResponseSchema = exports.sourceresponseSourceResponseSchema = exports.sourceListResponseSchema = exports.sourcelistresponseSourceListResponseSchema = exports.sourceResponseDataSchema = exports.sourceresponsedataSourceResponseDataSchema = exports.sourceResponseAttributesSchema = exports.sourceresponseattributesSourceResponseAttributesSchema = exports.outputsResponseSchema = exports.outputsresponseOutputsResponseSchema = exports.renditionResponseAttributesSchema = exports.renditionresponseattributesRenditionResponseAttributesSchema = exports.outputsSchema = exports.outputsOutputsSchema = exports.renditionSchema = exports.renditionRenditionSchema = exports.sizeSchema = exports.sizeSizeSchema = exports.shapeAssetSchema = exports.shapeassetShapeAssetSchema = exports.transferSchema = exports.transferTransferSchema = exports.transferResponseSchema = exports.transferresponseTransferResponseSchema = exports.transferResponseDataSchema = exports.transferresponsedataTransferResponseDataSchema = exports.transferResponseAttributesSchema = exports.transferresponseattributesTransferResponseAttributesSchema = exports.richTextAssetSchema = exports.richtextassetRichTextAssetSchema = exports.richTextStyleSchema = exports.richtextpropertiesRichTextStyleSchema = exports.richTextFontSchema = exports.richtextpropertiesRichTextFontSchema = void 0;
|
|
8
|
+
exports.postRenderResponse = exports.postRenderRequest = exports.templateSchema = exports.templateTemplateSchema = exports.templateDataResponseSchema = exports.templatedataresponseTemplateDataResponseSchema = exports.templateDataResponseDataSchema = exports.templatedataresponsedataTemplateDataResponseDataSchema = exports.renderResponseSchema = exports.renderresponseRenderResponseSchema = exports.renderResponseDataSchema = exports.renderresponsedataRenderResponseDataSchema = exports.editSchema = exports.editEditSchema = exports.timelineSchema = exports.timelineTimelineSchema = exports.trackSchema = exports.trackTrackSchema = exports.clipSchema = exports.clipClipSchema = exports.assetSchema = exports.assetAssetSchema = exports.videoAssetSchema = exports.videoassetVideoAssetSchema = exports.transformationSchema = exports.transformationTransformationSchema = exports.titleAssetSchema = exports.titleassetTitleAssetSchema = exports.textToSpeechAssetSchema = exports.texttospeechassetTextToSpeechAssetSchema = exports.skewTransformationSchema = exports.skewtransformationSkewTransformationSchema = exports.rotateTransformationSchema = exports.rotatetransformationRotateTransformationSchema = exports.offsetSchema = exports.offsetOffsetSchema = exports.audioAssetSchema = exports.audioassetAudioAssetSchema = exports.tweenSchema = exports.tweenTweenSchema = exports.transitionSchema = exports.transitionTransitionSchema = exports.outputSchema = exports.outputOutputSchema = exports.thumbnailSchema = exports.thumbnailThumbnailSchema = exports.textToImageAssetSchema = exports.texttoimageassetTextToImageAssetSchema = exports.textAssetSchema = exports.textassetTextAssetSchema = void 0;
|
|
9
|
+
exports.getUploadSignedUrlResponse = exports.getUploadSignedUrlRequest = exports.getSourceResponse = exports.getSourceRequest = exports.deleteSourceResponse = exports.deleteSourceRequest = exports.postSourceResponse = exports.postSourceRequest = exports.getSourcesResponse = exports.getSourcesRequest = exports.postServeAssetResponse = exports.postServeAssetRequest = exports.getAssetByRenderIdResponse = exports.getAssetByRenderIdRequest = exports.getAssetResponse = exports.getAssetRequest = exports.deleteAssetResponse = exports.deleteAssetRequest = exports.probeResponse = exports.probeRequest = exports.postTemplateRenderResponse = exports.postTemplateRenderRequest = exports.putTemplateResponse = exports.putTemplateRequest = exports.getTemplateResponse = exports.getTemplateRequest = exports.deleteTemplateResponse = exports.deleteTemplateRequest = exports.postTemplateResponse = exports.postTemplateRequest = exports.getTemplatesResponse = exports.getTemplatesRequest = exports.getRenderResponse = exports.getRenderRequest = void 0;
|
|
12
10
|
const zod_1 = require("zod");
|
|
13
11
|
exports.editRootSchema = zod_1.z.unknown();
|
|
14
12
|
exports.sourceRootSchema = zod_1.z.unknown();
|
|
15
13
|
exports.assetsRootSchema = zod_1.z.unknown();
|
|
16
14
|
exports.assetsidRootSchema = zod_1.z.unknown();
|
|
17
15
|
exports.assetsrenderidRootSchema = zod_1.z.unknown();
|
|
18
|
-
exports.generateassetRootSchema = zod_1.z.unknown();
|
|
19
|
-
exports.generateassetidRootSchema = zod_1.z.unknown();
|
|
20
16
|
exports.probeRootSchema = zod_1.z.unknown();
|
|
21
17
|
exports.renderRootSchema = zod_1.z.unknown();
|
|
22
18
|
exports.renderidRootSchema = zod_1.z.unknown();
|
|
@@ -173,597 +169,6 @@ exports.chromakeyChromaKeySchema = zod_1.z.object({
|
|
|
173
169
|
} return v; }), zod_1.z.number().int().gte(0).lte(250)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
|
|
174
170
|
}).strict();
|
|
175
171
|
exports.chromaKeySchema = exports.chromakeyChromaKeySchema;
|
|
176
|
-
/**
|
|
177
|
-
* 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.
|
|
178
|
-
*/
|
|
179
|
-
exports.didTextToAvatarOptionsDidTextToAvatarOptionsSchema = zod_1.z.object({
|
|
180
|
-
type: zod_1.z.enum(['text-to-avatar']),
|
|
181
|
-
text: zod_1.z.string(),
|
|
182
|
-
avatar: zod_1.z.enum([
|
|
183
|
-
'jack',
|
|
184
|
-
'lana',
|
|
185
|
-
'lily',
|
|
186
|
-
'matt',
|
|
187
|
-
'rian'
|
|
188
|
-
]),
|
|
189
|
-
background: zod_1.z.optional(zod_1.z.string())
|
|
190
|
-
}).strict();
|
|
191
|
-
exports.didTextToAvatarOptionsSchema = exports.didTextToAvatarOptionsDidTextToAvatarOptionsSchema;
|
|
192
|
-
/**
|
|
193
|
-
* Generate assets using the third party D-ID provider AI services.
|
|
194
|
-
*
|
|
195
|
-
* The following AI generation services are available: <ul>
|
|
196
|
-
* <li><a href="#tocs_didtexttoavataroptions">DidTextToAvatarOptions</a></li>
|
|
197
|
-
* </ul>
|
|
198
|
-
*/
|
|
199
|
-
exports.didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema = zod_1.z.object({
|
|
200
|
-
type: zod_1.z.literal('didTextToAvatarOptions_DIDTextToAvatarOptions')
|
|
201
|
-
}).strict().and(exports.didTextToAvatarOptionsDidTextToAvatarOptionsSchema);
|
|
202
|
-
exports.didGeneratedAssetOptionsSchema = exports.didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema;
|
|
203
|
-
/**
|
|
204
|
-
* 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.
|
|
205
|
-
*/
|
|
206
|
-
exports.didGeneratedAssetDidGeneratedAssetSchema = zod_1.z.object({
|
|
207
|
-
provider: zod_1.z.enum(['d-id']),
|
|
208
|
-
options: exports.didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema
|
|
209
|
-
}).strict();
|
|
210
|
-
exports.didGeneratedAssetSchema = exports.didGeneratedAssetDidGeneratedAssetSchema;
|
|
211
|
-
/**
|
|
212
|
-
* 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.
|
|
213
|
-
*/
|
|
214
|
-
exports.elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema = zod_1.z.object({
|
|
215
|
-
type: zod_1.z.enum(['text-to-speech']),
|
|
216
|
-
text: zod_1.z.string(),
|
|
217
|
-
voice: zod_1.z.enum([
|
|
218
|
-
'Adam',
|
|
219
|
-
'Antoni',
|
|
220
|
-
'Arnold',
|
|
221
|
-
'Bella',
|
|
222
|
-
'Domi',
|
|
223
|
-
'Elli',
|
|
224
|
-
'Josh',
|
|
225
|
-
'Rachel',
|
|
226
|
-
'Sam'
|
|
227
|
-
])
|
|
228
|
-
}).strict();
|
|
229
|
-
exports.elevenLabsTextToSpeechOptionsSchema = exports.elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema;
|
|
230
|
-
/**
|
|
231
|
-
* Generate assets using the third party ElevenLabs provider AI services.
|
|
232
|
-
*
|
|
233
|
-
* The following AI generation services are available: <ul>
|
|
234
|
-
* <li><a href="#tocs_elevenlabstexttospeechoptions">ElevenLabsTextToSpeechOptions</a></li>
|
|
235
|
-
* </ul>
|
|
236
|
-
*/
|
|
237
|
-
exports.elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema = zod_1.z.object({
|
|
238
|
-
type: zod_1.z.literal('elevenlabsTextToSpeechOptions_ElevenLabsTextToSpeechOptions')
|
|
239
|
-
}).strict().and(exports.elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema);
|
|
240
|
-
exports.elevenLabsGeneratedAssetOptionsSchema = exports.elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema;
|
|
241
|
-
/**
|
|
242
|
-
* 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.
|
|
243
|
-
*/
|
|
244
|
-
exports.elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema = zod_1.z.object({
|
|
245
|
-
provider: zod_1.z.enum(['elevenlabs']),
|
|
246
|
-
options: exports.elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema
|
|
247
|
-
}).strict();
|
|
248
|
-
exports.elevenLabsGeneratedAssetSchema = exports.elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema;
|
|
249
|
-
/**
|
|
250
|
-
* 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.
|
|
251
|
-
*/
|
|
252
|
-
exports.heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema = zod_1.z.object({
|
|
253
|
-
type: zod_1.z.enum(['text-to-avatar']),
|
|
254
|
-
text: zod_1.z.string(),
|
|
255
|
-
avatar: zod_1.z.enum([
|
|
256
|
-
'Angela',
|
|
257
|
-
'Bill',
|
|
258
|
-
'Daisy',
|
|
259
|
-
'Derek',
|
|
260
|
-
'Eva',
|
|
261
|
-
'Jake',
|
|
262
|
-
'Jeff',
|
|
263
|
-
'Jerome',
|
|
264
|
-
'Joon',
|
|
265
|
-
'Kayla',
|
|
266
|
-
'Kent',
|
|
267
|
-
'Luna',
|
|
268
|
-
'Mark',
|
|
269
|
-
'Matthew',
|
|
270
|
-
'Monica',
|
|
271
|
-
'Peter',
|
|
272
|
-
'Selina',
|
|
273
|
-
'Tanya',
|
|
274
|
-
'Thomas',
|
|
275
|
-
'Tina',
|
|
276
|
-
'Tyler',
|
|
277
|
-
'Vanessa',
|
|
278
|
-
'Vera',
|
|
279
|
-
'Wilson',
|
|
280
|
-
'Zoey'
|
|
281
|
-
]),
|
|
282
|
-
voice: zod_1.z.enum([
|
|
283
|
-
'Abbi - Natural',
|
|
284
|
-
'Adam - Natural',
|
|
285
|
-
'Aiston - Friendly',
|
|
286
|
-
'Alice - Newscaster',
|
|
287
|
-
'Alison - Cheerful',
|
|
288
|
-
'Amber - Friendly',
|
|
289
|
-
'Amy - Warm',
|
|
290
|
-
'Ana - Cheerful',
|
|
291
|
-
'Antoni - Friendly',
|
|
292
|
-
'Aria - Newscaster',
|
|
293
|
-
'Arnold - Cheerful',
|
|
294
|
-
'Arthur - Natural',
|
|
295
|
-
'Bella - Friendly',
|
|
296
|
-
'Belle - Natural',
|
|
297
|
-
'Brandon - Warm',
|
|
298
|
-
'Brian - Natural',
|
|
299
|
-
'Bruce - Natural',
|
|
300
|
-
'Cerise - Cheerful',
|
|
301
|
-
'Christopher - Calm',
|
|
302
|
-
'Clara - Professional',
|
|
303
|
-
'Connor - Natural',
|
|
304
|
-
'Dahlia - Friendly',
|
|
305
|
-
'Davis - Professional',
|
|
306
|
-
'Dean - Natural',
|
|
307
|
-
'Delbert - Cheerful',
|
|
308
|
-
'Edward - Friendly',
|
|
309
|
-
'Elaine - Calm',
|
|
310
|
-
'Emily - Natural',
|
|
311
|
-
'Emma - Newscaster',
|
|
312
|
-
'Eric - Newscaster',
|
|
313
|
-
'Grace - Natural',
|
|
314
|
-
'Hailey - Calm',
|
|
315
|
-
'Indira - Cheerful',
|
|
316
|
-
'Isabella - Cheerful',
|
|
317
|
-
'Jacob - Natural',
|
|
318
|
-
'Jahmai - Friendly',
|
|
319
|
-
'Jane - Serious',
|
|
320
|
-
'Jason - Serious',
|
|
321
|
-
'Jelle - Friendly',
|
|
322
|
-
'Jen - Natural',
|
|
323
|
-
'Jenny - Professional',
|
|
324
|
-
'Jodi - Cheerful',
|
|
325
|
-
'Joey - Calm',
|
|
326
|
-
'Johan - Friendly',
|
|
327
|
-
'Josie - Cheerful',
|
|
328
|
-
'Keanan - Natural',
|
|
329
|
-
'Keith - Cheerful',
|
|
330
|
-
'Kellie - Friendly',
|
|
331
|
-
'Lauren - Friendly',
|
|
332
|
-
'Leah - Natural',
|
|
333
|
-
'Liam - Professional',
|
|
334
|
-
'Libby - Natural',
|
|
335
|
-
'Lily - Professional',
|
|
336
|
-
'Lucas - Natural',
|
|
337
|
-
'Luke - Professional',
|
|
338
|
-
'Luna - Natural',
|
|
339
|
-
'Marieke - Natural',
|
|
340
|
-
'Matthew - Professional',
|
|
341
|
-
'Michelle - Natural',
|
|
342
|
-
'Mitchell - Natural',
|
|
343
|
-
'Molly - Newscaster',
|
|
344
|
-
'Monica - Calm',
|
|
345
|
-
'Natasha - Professional',
|
|
346
|
-
'Neerja - Newscaster',
|
|
347
|
-
'Noah - Serious',
|
|
348
|
-
'Oliver - Newscaster',
|
|
349
|
-
'Olivia - Calm',
|
|
350
|
-
'Paul - Natural',
|
|
351
|
-
'Prabhat - Natural',
|
|
352
|
-
'Raveena - Natural',
|
|
353
|
-
'Rudi - Friendly',
|
|
354
|
-
'Ryan - Professional',
|
|
355
|
-
'Sam - Natural',
|
|
356
|
-
'Sara - Cheerful',
|
|
357
|
-
'Sherry - Friendly',
|
|
358
|
-
'Sonia - Warm',
|
|
359
|
-
'Thomas - Natural',
|
|
360
|
-
'Todd - Professional',
|
|
361
|
-
'Tony - Professional',
|
|
362
|
-
'Tracy - Cheerful',
|
|
363
|
-
'Wayne - Natural',
|
|
364
|
-
'Wilder - Natural',
|
|
365
|
-
'Wille - Natural',
|
|
366
|
-
'William - Friendly'
|
|
367
|
-
]),
|
|
368
|
-
avatarStyle: zod_1.z.optional(zod_1.z.enum(['normal', 'circle'])),
|
|
369
|
-
background: zod_1.z.optional(zod_1.z.string()),
|
|
370
|
-
ratio: zod_1.z.optional(zod_1.z.enum(['16:9', '9:16'])),
|
|
371
|
-
test: zod_1.z.optional(zod_1.z.boolean())
|
|
372
|
-
}).strict();
|
|
373
|
-
exports.heyGenTextToAvatarOptionsSchema = exports.heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema;
|
|
374
|
-
/**
|
|
375
|
-
* Generate assets using the third party HeyGen provider AI services.
|
|
376
|
-
*
|
|
377
|
-
* The following AI generation services are available: <ul>
|
|
378
|
-
* <li><a href="#tocs_heygentexttoavataroptions">HeyGenTextToAvatarOptions</a></li>
|
|
379
|
-
* </ul>
|
|
380
|
-
*/
|
|
381
|
-
exports.heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema = zod_1.z.object({
|
|
382
|
-
type: zod_1.z.literal('heygenTextToAvatarOptions_HeyGenTextToAvatarOptions')
|
|
383
|
-
}).strict().and(exports.heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema);
|
|
384
|
-
exports.heyGenGeneratedAssetOptionsSchema = exports.heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema;
|
|
385
|
-
/**
|
|
386
|
-
* 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.
|
|
387
|
-
*/
|
|
388
|
-
exports.heygenGeneratedAssetHeyGenGeneratedAssetSchema = zod_1.z.object({
|
|
389
|
-
provider: zod_1.z.enum(['heygen']),
|
|
390
|
-
options: exports.heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema
|
|
391
|
-
}).strict();
|
|
392
|
-
exports.heyGenGeneratedAssetSchema = exports.heygenGeneratedAssetHeyGenGeneratedAssetSchema;
|
|
393
|
-
/**
|
|
394
|
-
* 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.
|
|
395
|
-
*/
|
|
396
|
-
exports.openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema = zod_1.z.object({
|
|
397
|
-
type: zod_1.z.enum(['text-generator']),
|
|
398
|
-
prompt: zod_1.z.string(),
|
|
399
|
-
model: zod_1.z.enum(['gpt-3.5-turbo', 'gpt-4']),
|
|
400
|
-
systemPrompt: zod_1.z.optional(zod_1.z.string())
|
|
401
|
-
}).strict();
|
|
402
|
-
exports.openAiTextGeneratorOptionsSchema = exports.openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema;
|
|
403
|
-
/**
|
|
404
|
-
* Generate assets using OpenAI provider AI services.
|
|
405
|
-
*
|
|
406
|
-
* The following AI generation services are available: <ul>
|
|
407
|
-
* <li><a href="#tocs_openaitextgeneratoroptions">OpenAiTextGeneratorOptions</a></li>
|
|
408
|
-
* </ul>
|
|
409
|
-
*/
|
|
410
|
-
exports.openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema = zod_1.z.object({
|
|
411
|
-
type: zod_1.z.literal('openaiTextGeneratorOptions_OpenAiTextGeneratorOptions')
|
|
412
|
-
}).strict().and(exports.openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema);
|
|
413
|
-
exports.openAiGeneratedAssetOptionsSchema = exports.openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema;
|
|
414
|
-
/**
|
|
415
|
-
* 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.
|
|
416
|
-
*/
|
|
417
|
-
exports.openaiGeneratedAssetOpenAiGeneratedAssetSchema = zod_1.z.object({
|
|
418
|
-
provider: zod_1.z.enum(['openai']),
|
|
419
|
-
options: exports.openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema
|
|
420
|
-
}).strict();
|
|
421
|
-
exports.openAiGeneratedAssetSchema = exports.openaiGeneratedAssetOpenAiGeneratedAssetSchema;
|
|
422
|
-
/**
|
|
423
|
-
* Individual errors returned by the Create API.
|
|
424
|
-
*/
|
|
425
|
-
exports.generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema = zod_1.z.object({
|
|
426
|
-
status: zod_1.z.string(),
|
|
427
|
-
title: zod_1.z.string(),
|
|
428
|
-
detail: zod_1.z.string()
|
|
429
|
-
}).strict();
|
|
430
|
-
exports.generatedAssetErrorResponseDataSchema = exports.generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema;
|
|
431
|
-
/**
|
|
432
|
-
* Error response data for validation and other errors returned by the Create API.
|
|
433
|
-
*/
|
|
434
|
-
exports.generatedAssetErrorResponseGeneratedAssetErrorResponseSchema = zod_1.z.object({
|
|
435
|
-
errors: zod_1.z.array(exports.generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema)
|
|
436
|
-
}).strict();
|
|
437
|
-
exports.generatedAssetErrorResponseSchema = exports.generatedAssetErrorResponseGeneratedAssetErrorResponseSchema;
|
|
438
|
-
/**
|
|
439
|
-
* The id and attributes of the generated asset.
|
|
440
|
-
*/
|
|
441
|
-
exports.generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema = zod_1.z.object({
|
|
442
|
-
owner: zod_1.z.string(),
|
|
443
|
-
provider: zod_1.z.enum([
|
|
444
|
-
'shotstack',
|
|
445
|
-
'elevenlabs',
|
|
446
|
-
'heygen',
|
|
447
|
-
'd-id'
|
|
448
|
-
]),
|
|
449
|
-
type: zod_1.z.enum(['text-to-speech', 'text-to-avatar']),
|
|
450
|
-
url: zod_1.z.optional(zod_1.z.string()),
|
|
451
|
-
status: zod_1.z.enum([
|
|
452
|
-
'queued',
|
|
453
|
-
'processing',
|
|
454
|
-
'saving',
|
|
455
|
-
'done',
|
|
456
|
-
'failed'
|
|
457
|
-
]),
|
|
458
|
-
created: zod_1.z.string(),
|
|
459
|
-
updated: zod_1.z.string()
|
|
460
|
-
}).strict();
|
|
461
|
-
exports.generatedAssetResponseAttributesSchema = exports.generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema;
|
|
462
|
-
/**
|
|
463
|
-
* The type of resource (an asset), it's id and attributes of the generated file.
|
|
464
|
-
*/
|
|
465
|
-
exports.generatedAssetResponseDataGeneratedAssetResponseDataSchema = zod_1.z.object({
|
|
466
|
-
type: zod_1.z.string(),
|
|
467
|
-
id: zod_1.z.string(),
|
|
468
|
-
attributes: exports.generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema
|
|
469
|
-
}).strict();
|
|
470
|
-
exports.generatedAssetResponseDataSchema = exports.generatedAssetResponseDataGeneratedAssetResponseDataSchema;
|
|
471
|
-
/**
|
|
472
|
-
* 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.
|
|
473
|
-
*/
|
|
474
|
-
exports.generatedAssetResponseGeneratedAssetResponseSchema = zod_1.z.object({
|
|
475
|
-
data: exports.generatedAssetResponseDataGeneratedAssetResponseDataSchema
|
|
476
|
-
}).strict();
|
|
477
|
-
exports.generatedAssetResponseSchema = exports.generatedAssetResponseGeneratedAssetResponseSchema;
|
|
478
|
-
/**
|
|
479
|
-
* 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.
|
|
480
|
-
*/
|
|
481
|
-
exports.shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema = zod_1.z.object({
|
|
482
|
-
type: zod_1.z.enum(['image-to-video']),
|
|
483
|
-
imageUrl: zod_1.z.string(),
|
|
484
|
-
guidanceScale: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
485
|
-
return undefined; if (Array.isArray(v))
|
|
486
|
-
return v; if (typeof v === 'string') {
|
|
487
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
488
|
-
return v;
|
|
489
|
-
return Number(v);
|
|
490
|
-
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1.8),
|
|
491
|
-
motion: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
492
|
-
return undefined; if (Array.isArray(v))
|
|
493
|
-
return v; if (typeof v === 'string') {
|
|
494
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
495
|
-
return v;
|
|
496
|
-
return Number(v);
|
|
497
|
-
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(127)
|
|
498
|
-
}).strict();
|
|
499
|
-
exports.shotstackImageToVideoOptionsSchema = exports.shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema;
|
|
500
|
-
/**
|
|
501
|
-
* 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.
|
|
502
|
-
*/
|
|
503
|
-
exports.shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema = zod_1.z.object({
|
|
504
|
-
type: zod_1.z.enum(['text-generator']),
|
|
505
|
-
prompt: zod_1.z.string()
|
|
506
|
-
}).strict();
|
|
507
|
-
exports.shotstackTextGeneratorOptionsSchema = exports.shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema;
|
|
508
|
-
/**
|
|
509
|
-
* 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.
|
|
510
|
-
*/
|
|
511
|
-
exports.shotstackTextToImageOptionsShotstackTextToImageOptionsSchema = zod_1.z.object({
|
|
512
|
-
type: zod_1.z.enum(['text-to-image']),
|
|
513
|
-
prompt: zod_1.z.string(),
|
|
514
|
-
width: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
515
|
-
return undefined; if (Array.isArray(v))
|
|
516
|
-
return v; if (typeof v === 'string') {
|
|
517
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
518
|
-
return v;
|
|
519
|
-
return Number(v);
|
|
520
|
-
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
521
|
-
height: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
522
|
-
return undefined; if (Array.isArray(v))
|
|
523
|
-
return v; if (typeof v === 'string') {
|
|
524
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
525
|
-
return v;
|
|
526
|
-
return Number(v);
|
|
527
|
-
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
528
|
-
}).strict();
|
|
529
|
-
exports.shotstackTextToImageOptionsSchema = exports.shotstackTextToImageOptionsShotstackTextToImageOptionsSchema;
|
|
530
|
-
/**
|
|
531
|
-
* 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.
|
|
532
|
-
*/
|
|
533
|
-
exports.shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema = zod_1.z.object({
|
|
534
|
-
type: zod_1.z.enum(['text-to-speech']),
|
|
535
|
-
text: zod_1.z.string(),
|
|
536
|
-
voice: zod_1.z.enum([
|
|
537
|
-
'Hala',
|
|
538
|
-
'Lisa',
|
|
539
|
-
'Arlet',
|
|
540
|
-
'Hiujin',
|
|
541
|
-
'Zhiyu',
|
|
542
|
-
'Sofie',
|
|
543
|
-
'Laura',
|
|
544
|
-
'Olivia',
|
|
545
|
-
'Amy',
|
|
546
|
-
'Emma',
|
|
547
|
-
'Brian',
|
|
548
|
-
'Arthur',
|
|
549
|
-
'Kajal',
|
|
550
|
-
'Niamh',
|
|
551
|
-
'Aria',
|
|
552
|
-
'Ayanda',
|
|
553
|
-
'Ivy',
|
|
554
|
-
'Joanna',
|
|
555
|
-
'Kendra',
|
|
556
|
-
'Kimberly',
|
|
557
|
-
'Salli',
|
|
558
|
-
'Joey',
|
|
559
|
-
'Justin',
|
|
560
|
-
'Kevin',
|
|
561
|
-
'Matthew',
|
|
562
|
-
'Ruth',
|
|
563
|
-
'Stephen',
|
|
564
|
-
'Suvi',
|
|
565
|
-
'Léa',
|
|
566
|
-
'Rémi',
|
|
567
|
-
'Gabrielle',
|
|
568
|
-
'Liam',
|
|
569
|
-
'Vicki',
|
|
570
|
-
'Daniel',
|
|
571
|
-
'Hannah',
|
|
572
|
-
'Kajal',
|
|
573
|
-
'Bianca',
|
|
574
|
-
'Adriano',
|
|
575
|
-
'Takumi',
|
|
576
|
-
'Kazuha',
|
|
577
|
-
'Tomoko',
|
|
578
|
-
'Seoyeon',
|
|
579
|
-
'Ida',
|
|
580
|
-
'Ola',
|
|
581
|
-
'Camila',
|
|
582
|
-
'Vitória',
|
|
583
|
-
'Vitoria',
|
|
584
|
-
'Thiago',
|
|
585
|
-
'Inês',
|
|
586
|
-
'Ines',
|
|
587
|
-
'Lucia',
|
|
588
|
-
'Sergio',
|
|
589
|
-
'Mia',
|
|
590
|
-
'Andrés',
|
|
591
|
-
'Lupe',
|
|
592
|
-
'Pedro',
|
|
593
|
-
'Elin'
|
|
594
|
-
]),
|
|
595
|
-
language: zod_1.z.optional(zod_1.z.enum([
|
|
596
|
-
'cmn-CN',
|
|
597
|
-
'da-DK',
|
|
598
|
-
'de-DE',
|
|
599
|
-
'en-AU',
|
|
600
|
-
'en-GB',
|
|
601
|
-
'en-IN',
|
|
602
|
-
'en-US',
|
|
603
|
-
'es-ES',
|
|
604
|
-
'es-MX',
|
|
605
|
-
'es-US',
|
|
606
|
-
'fr-CA',
|
|
607
|
-
'fr-FR',
|
|
608
|
-
'it-IT',
|
|
609
|
-
'ja-JP',
|
|
610
|
-
'hi-IN',
|
|
611
|
-
'ko-KR',
|
|
612
|
-
'nb-NO',
|
|
613
|
-
'nl-NL',
|
|
614
|
-
'pl-PL',
|
|
615
|
-
'pt-BR',
|
|
616
|
-
'pt-PT',
|
|
617
|
-
'sv-SE',
|
|
618
|
-
'en-NZ',
|
|
619
|
-
'en-ZA',
|
|
620
|
-
'ca-ES',
|
|
621
|
-
'de-AT',
|
|
622
|
-
'yue-CN',
|
|
623
|
-
'ar-AE',
|
|
624
|
-
'fi-FI'
|
|
625
|
-
])),
|
|
626
|
-
newscaster: zod_1.z.optional(zod_1.z.boolean()).default(false)
|
|
627
|
-
}).strict();
|
|
628
|
-
exports.shotstackTextToSpeechOptionsSchema = exports.shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema;
|
|
629
|
-
/**
|
|
630
|
-
* Generate assets using the native Shotstack provider AI services.
|
|
631
|
-
*/
|
|
632
|
-
exports.shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema = zod_1.z.union([
|
|
633
|
-
zod_1.z.object({
|
|
634
|
-
type: zod_1.z.literal('shotstackTextToSpeechOptions_ShotstackTextToSpeechOptions')
|
|
635
|
-
}).strict().and(exports.shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema),
|
|
636
|
-
zod_1.z.object({
|
|
637
|
-
type: zod_1.z.literal('shotstackTextToImageOptions_ShotstackTextToImageOptions')
|
|
638
|
-
}).strict().and(exports.shotstackTextToImageOptionsShotstackTextToImageOptionsSchema),
|
|
639
|
-
zod_1.z.object({
|
|
640
|
-
type: zod_1.z.literal('shotstackTextGeneratorOptions_ShotstackTextGeneratorOptions')
|
|
641
|
-
}).strict().and(exports.shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema),
|
|
642
|
-
zod_1.z.object({
|
|
643
|
-
type: zod_1.z.literal('shotstackImageToVideoOptions_ShotstackImageToVideoOptions')
|
|
644
|
-
}).strict().and(exports.shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema)
|
|
645
|
-
]);
|
|
646
|
-
exports.shotstackGeneratedAssetOptionsSchema = exports.shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema;
|
|
647
|
-
/**
|
|
648
|
-
* 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.
|
|
649
|
-
*/
|
|
650
|
-
exports.shotstackGeneratedAssetShotstackGeneratedAssetSchema = zod_1.z.object({
|
|
651
|
-
provider: zod_1.z.enum(['shotstack']),
|
|
652
|
-
options: exports.shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema
|
|
653
|
-
}).strict();
|
|
654
|
-
exports.shotstackGeneratedAssetSchema = exports.shotstackGeneratedAssetShotstackGeneratedAssetSchema;
|
|
655
|
-
/**
|
|
656
|
-
* 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.
|
|
657
|
-
*/
|
|
658
|
-
exports.stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema = zod_1.z.object({
|
|
659
|
-
type: zod_1.z.enum(['text-to-image']),
|
|
660
|
-
prompt: zod_1.z.string(),
|
|
661
|
-
engine: zod_1.z.optional(zod_1.z.enum([
|
|
662
|
-
'stable-diffusion-xl-1024-v0-9',
|
|
663
|
-
'stable-diffusion-xl-1024-v1-0',
|
|
664
|
-
'stable-diffusion-v1-6',
|
|
665
|
-
'stable-diffusion-512-v2-1',
|
|
666
|
-
'stable-diffusion-xl-beta-v2-2-2'
|
|
667
|
-
])),
|
|
668
|
-
width: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
669
|
-
return undefined; if (Array.isArray(v))
|
|
670
|
-
return v; if (typeof v === 'string') {
|
|
671
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
672
|
-
return v;
|
|
673
|
-
return Number(v);
|
|
674
|
-
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
675
|
-
height: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
676
|
-
return undefined; if (Array.isArray(v))
|
|
677
|
-
return v; if (typeof v === 'string') {
|
|
678
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
679
|
-
return v;
|
|
680
|
-
return Number(v);
|
|
681
|
-
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
682
|
-
steps: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
683
|
-
return undefined; if (Array.isArray(v))
|
|
684
|
-
return v; if (typeof v === 'string') {
|
|
685
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
686
|
-
return v;
|
|
687
|
-
return Number(v);
|
|
688
|
-
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(30),
|
|
689
|
-
seed: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
690
|
-
return undefined; if (Array.isArray(v))
|
|
691
|
-
return v; if (typeof v === 'string') {
|
|
692
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
693
|
-
return v;
|
|
694
|
-
return Number(v);
|
|
695
|
-
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
696
|
-
cfgScale: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
697
|
-
return undefined; if (Array.isArray(v))
|
|
698
|
-
return v; if (typeof v === 'string') {
|
|
699
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
700
|
-
return v;
|
|
701
|
-
return Number(v);
|
|
702
|
-
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(7),
|
|
703
|
-
stylePreset: zod_1.z.optional(zod_1.z.enum([
|
|
704
|
-
'3d-model',
|
|
705
|
-
'analog-film',
|
|
706
|
-
'anime',
|
|
707
|
-
'cinematic',
|
|
708
|
-
'comic-book',
|
|
709
|
-
'digital-art',
|
|
710
|
-
'enhance',
|
|
711
|
-
'fantasy-art',
|
|
712
|
-
'isometric',
|
|
713
|
-
'line-art',
|
|
714
|
-
'low-poly',
|
|
715
|
-
'modeling-compound',
|
|
716
|
-
'neon-punk',
|
|
717
|
-
'origami',
|
|
718
|
-
'photographic',
|
|
719
|
-
'pixel-art',
|
|
720
|
-
'tile-texture'
|
|
721
|
-
]))
|
|
722
|
-
}).strict();
|
|
723
|
-
exports.stabilityAiTextToImageOptionsSchema = exports.stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema;
|
|
724
|
-
/**
|
|
725
|
-
* Generate assets using Stability AI provider AI services.
|
|
726
|
-
*
|
|
727
|
-
* The following AI generation services are available: <ul>
|
|
728
|
-
* <li><a href="#tocs_stabilityaitexttoimageoptions">StabilityAiTextToImageOptions</a></li>
|
|
729
|
-
* </ul>
|
|
730
|
-
*/
|
|
731
|
-
exports.stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema = zod_1.z.object({
|
|
732
|
-
type: zod_1.z.literal('stabilityAiTextToImageOptions_StabilityAiTextToImageOptions')
|
|
733
|
-
}).strict().and(exports.stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema);
|
|
734
|
-
exports.stabilityAiGeneratedAssetOptionsSchema = exports.stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema;
|
|
735
|
-
/**
|
|
736
|
-
* 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.
|
|
737
|
-
*/
|
|
738
|
-
exports.stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema = zod_1.z.object({
|
|
739
|
-
provider: zod_1.z.enum(['stability-ai']),
|
|
740
|
-
options: exports.stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema
|
|
741
|
-
}).strict();
|
|
742
|
-
exports.stabilityAiGeneratedAssetSchema = exports.stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema;
|
|
743
|
-
/**
|
|
744
|
-
* 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.
|
|
745
|
-
*/
|
|
746
|
-
exports.generatedAssetGeneratedAssetSchema = zod_1.z.union([
|
|
747
|
-
zod_1.z.object({
|
|
748
|
-
provider: zod_1.z.literal('shotstackGeneratedAsset_ShotstackGeneratedAsset')
|
|
749
|
-
}).strict().and(exports.shotstackGeneratedAssetShotstackGeneratedAssetSchema),
|
|
750
|
-
zod_1.z.object({
|
|
751
|
-
provider: zod_1.z.literal('didGeneratedAsset_DIDGeneratedAsset')
|
|
752
|
-
}).strict().and(exports.didGeneratedAssetDidGeneratedAssetSchema),
|
|
753
|
-
zod_1.z.object({
|
|
754
|
-
provider: zod_1.z.literal('elevenlabsGeneratedAsset_ElevenLabsGeneratedAsset')
|
|
755
|
-
}).strict().and(exports.elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema),
|
|
756
|
-
zod_1.z.object({
|
|
757
|
-
provider: zod_1.z.literal('heygenGeneratedAsset_HeyGenGeneratedAsset')
|
|
758
|
-
}).strict().and(exports.heygenGeneratedAssetHeyGenGeneratedAssetSchema),
|
|
759
|
-
zod_1.z.object({
|
|
760
|
-
provider: zod_1.z.literal('openaiGeneratedAsset_OpenAiGeneratedAsset')
|
|
761
|
-
}).strict().and(exports.openaiGeneratedAssetOpenAiGeneratedAssetSchema),
|
|
762
|
-
zod_1.z.object({
|
|
763
|
-
provider: zod_1.z.literal('stabilityAiGeneratedAsset_StabilityAiGeneratedAsset')
|
|
764
|
-
}).strict().and(exports.stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema)
|
|
765
|
-
]);
|
|
766
|
-
exports.generatedAssetSchema = exports.generatedAssetGeneratedAssetSchema;
|
|
767
172
|
/**
|
|
768
173
|
* 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.
|
|
769
174
|
*/
|
|
@@ -804,8 +209,14 @@ exports.cropSchema = exports.cropCropSchema;
|
|
|
804
209
|
exports.akamaiNetStorageDestinationOptionsAkamaiNetStorageDestinationOptionsSchema = zod_1.z.object({
|
|
805
210
|
host: zod_1.z.string(),
|
|
806
211
|
cpCode: zod_1.z.string(),
|
|
807
|
-
path: zod_1.z.optional(zod_1.z.
|
|
808
|
-
|
|
212
|
+
path: zod_1.z.optional(zod_1.z.union([
|
|
213
|
+
zod_1.z.string(),
|
|
214
|
+
zod_1.z.null()
|
|
215
|
+
])),
|
|
216
|
+
filename: zod_1.z.optional(zod_1.z.union([
|
|
217
|
+
zod_1.z.string(),
|
|
218
|
+
zod_1.z.null()
|
|
219
|
+
]))
|
|
809
220
|
}).strict();
|
|
810
221
|
/**
|
|
811
222
|
* 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.
|
|
@@ -820,8 +231,14 @@ exports.akamaiNetStorageDestinationAkamaiNetStorageDestinationSchema = zod_1.z.o
|
|
|
820
231
|
exports.azureBlobStorageDestinationOptionsAzureBlobStorageDestinationOptionsSchema = zod_1.z.object({
|
|
821
232
|
accountName: zod_1.z.string(),
|
|
822
233
|
container: zod_1.z.string(),
|
|
823
|
-
prefix: zod_1.z.optional(zod_1.z.
|
|
824
|
-
|
|
234
|
+
prefix: zod_1.z.optional(zod_1.z.union([
|
|
235
|
+
zod_1.z.string(),
|
|
236
|
+
zod_1.z.null()
|
|
237
|
+
])),
|
|
238
|
+
filename: zod_1.z.optional(zod_1.z.union([
|
|
239
|
+
zod_1.z.string(),
|
|
240
|
+
zod_1.z.null()
|
|
241
|
+
]))
|
|
825
242
|
}).strict();
|
|
826
243
|
/**
|
|
827
244
|
* 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.
|
|
@@ -2214,704 +1631,119 @@ exports.soundtrackSoundtrackSchema = zod_1.z.object({
|
|
|
2214
1631
|
}).strict();
|
|
2215
1632
|
exports.soundtrackSchema = exports.soundtrackSoundtrackSchema;
|
|
2216
1633
|
/**
|
|
2217
|
-
*
|
|
2218
|
-
*
|
|
1634
|
+
* The SvgAsset is used to add scalable vector graphics (SVG) to a video using raw SVG markup.
|
|
1635
|
+
*
|
|
1636
|
+
* ```json
|
|
1637
|
+
* {
|
|
1638
|
+
* "type": "svg",
|
|
1639
|
+
* "src": "<svg width=\"100\" height=\"100\"><circle cx=\"50\" cy=\"50\" r=\"40\" fill=\"#FF0000\"/></svg>"
|
|
1640
|
+
* }
|
|
1641
|
+
* ```
|
|
1642
|
+
*
|
|
1643
|
+
* **Supported elements:** `<path>`, `<rect>`, `<circle>`, `<ellipse>`,
|
|
1644
|
+
* `<line>`, `<polygon>`, `<polyline>`
|
|
1645
|
+
*
|
|
1646
|
+
* **Automatically extracted from SVG markup:**
|
|
1647
|
+
* - Path data (converted to a single combined path)
|
|
1648
|
+
* - Fill color (from `fill` attribute or `style`)
|
|
1649
|
+
* - Stroke color and width (from attributes or `style`)
|
|
1650
|
+
* - Dimensions (from `width`/`height` or `viewBox`)
|
|
1651
|
+
* - Opacity (from `opacity` attribute)
|
|
1652
|
+
*
|
|
1653
|
+
* See [W3C SVG 2 Specification](https://www.w3.org/TR/SVG2/) for path data syntax.
|
|
2219
1654
|
*
|
|
2220
1655
|
*/
|
|
2221
|
-
exports.
|
|
2222
|
-
|
|
1656
|
+
exports.svgassetSvgAssetSchema = zod_1.z.object({
|
|
1657
|
+
type: zod_1.z.enum(["svg"]),
|
|
1658
|
+
src: zod_1.z.string().min(1).max(500000),
|
|
1659
|
+
}).strict();
|
|
1660
|
+
exports.svgAssetSchema = exports.svgassetSvgAssetSchema;
|
|
1661
|
+
/**
|
|
1662
|
+
* Configure the id and optional merge fields to render a template by id.
|
|
1663
|
+
*/
|
|
1664
|
+
exports.templaterenderTemplateRenderSchema = zod_1.z.object({
|
|
1665
|
+
id: zod_1.z.string(),
|
|
1666
|
+
merge: zod_1.z.optional(zod_1.z.array(exports.mergefieldMergeFieldSchema))
|
|
1667
|
+
}).strict();
|
|
1668
|
+
exports.templateRenderSchema = exports.templaterenderTemplateRenderSchema;
|
|
1669
|
+
/**
|
|
1670
|
+
* Horizontal and vertical alignment properties for text.
|
|
1671
|
+
*/
|
|
1672
|
+
exports.textpropertiesTextAlignmentSchema = zod_1.z.object({
|
|
1673
|
+
horizontal: zod_1.z.optional(zod_1.z.enum([
|
|
1674
|
+
'left',
|
|
1675
|
+
'center',
|
|
1676
|
+
'right'
|
|
1677
|
+
])),
|
|
1678
|
+
vertical: zod_1.z.optional(zod_1.z.enum([
|
|
1679
|
+
'top',
|
|
1680
|
+
'center',
|
|
1681
|
+
'bottom'
|
|
1682
|
+
]))
|
|
1683
|
+
}).strict();
|
|
1684
|
+
exports.textAlignmentSchema = exports.textpropertiesTextAlignmentSchema;
|
|
1685
|
+
/**
|
|
1686
|
+
* Animation properties for text entrance effects.
|
|
1687
|
+
*/
|
|
1688
|
+
exports.textpropertiesTextAnimationSchema = zod_1.z.object({
|
|
1689
|
+
preset: zod_1.z.enum(['typewriter']),
|
|
1690
|
+
duration: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2223
1691
|
return undefined; if (Array.isArray(v))
|
|
2224
1692
|
return v; if (typeof v === 'string') {
|
|
2225
1693
|
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2226
1694
|
return v;
|
|
2227
1695
|
return Number(v);
|
|
2228
|
-
} return v; }), zod_1.z.number().gte(0).lte(
|
|
2229
|
-
color: zod_1.z.union([zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
1696
|
+
} return v; }), zod_1.z.number().gte(0.1).lte(30)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
|
|
2230
1697
|
}).strict();
|
|
2231
|
-
exports.svgGradientStopSchema = exports.svgpropertiesSvgGradientStopSchema;
|
|
2232
1698
|
/**
|
|
2233
|
-
*
|
|
2234
|
-
* The gradient direction is controlled by the `angle` property.
|
|
2235
|
-
*
|
|
1699
|
+
* Displays a background box behind the text.
|
|
2236
1700
|
*/
|
|
2237
|
-
exports.
|
|
2238
|
-
|
|
2239
|
-
|
|
1701
|
+
exports.textpropertiesTextBackgroundSchema = zod_1.z.object({
|
|
1702
|
+
color: zod_1.z.optional(zod_1.z.union([zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1703
|
+
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2240
1704
|
return undefined; if (Array.isArray(v))
|
|
2241
1705
|
return v; if (typeof v === 'string') {
|
|
2242
1706
|
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2243
1707
|
return v;
|
|
2244
1708
|
return Number(v);
|
|
2245
|
-
} return v; }), zod_1.z.number().gte(0).lte(
|
|
2246
|
-
|
|
2247
|
-
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1709
|
+
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1710
|
+
padding: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2248
1711
|
return undefined; if (Array.isArray(v))
|
|
2249
1712
|
return v; if (typeof v === 'string') {
|
|
2250
1713
|
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2251
1714
|
return v;
|
|
2252
1715
|
return Number(v);
|
|
2253
|
-
} return v; }), zod_1.z.number().gte(0).lte(
|
|
2254
|
-
|
|
2255
|
-
exports.svgLinearGradientFillSchema = exports.svgpropertiesSvgLinearGradientFillSchema;
|
|
2256
|
-
/**
|
|
2257
|
-
* A radial gradient fill that transitions colors radiating outward from a center point.
|
|
2258
|
-
* The gradient creates a circular or elliptical color transition.
|
|
2259
|
-
*
|
|
2260
|
-
*/
|
|
2261
|
-
exports.svgpropertiesSvgRadialGradientFillSchema = zod_1.z.object({
|
|
2262
|
-
type: zod_1.z.enum(['radial']),
|
|
2263
|
-
stops: zod_1.z.array(exports.svgpropertiesSvgGradientStopSchema).min(2),
|
|
2264
|
-
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1716
|
+
} return v; }), zod_1.z.number().gte(0).lte(100)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1717
|
+
borderRadius: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2265
1718
|
return undefined; if (Array.isArray(v))
|
|
2266
1719
|
return v; if (typeof v === 'string') {
|
|
2267
1720
|
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2268
1721
|
return v;
|
|
2269
1722
|
return Number(v);
|
|
2270
|
-
} return v; }), zod_1.z.number().gte(0)
|
|
1723
|
+
} return v; }), zod_1.z.number().gte(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
|
|
2271
1724
|
}).strict();
|
|
2272
|
-
exports.
|
|
1725
|
+
exports.textBackgroundSchema = exports.textpropertiesTextBackgroundSchema;
|
|
2273
1726
|
/**
|
|
2274
|
-
*
|
|
2275
|
-
*
|
|
1727
|
+
* Font properties for text.
|
|
2276
1728
|
*/
|
|
2277
|
-
exports.
|
|
2278
|
-
|
|
1729
|
+
exports.textpropertiesTextFontSchema = zod_1.z.object({
|
|
1730
|
+
family: zod_1.z.optional(zod_1.z.string()),
|
|
1731
|
+
color: zod_1.z.optional(zod_1.z.string()),
|
|
1732
|
+
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2279
1733
|
return undefined; if (Array.isArray(v))
|
|
2280
1734
|
return v; if (typeof v === 'string') {
|
|
2281
1735
|
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2282
1736
|
return v;
|
|
2283
1737
|
return Number(v);
|
|
2284
|
-
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
|
|
2285
|
-
|
|
1738
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1739
|
+
size: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2286
1740
|
return undefined; if (Array.isArray(v))
|
|
2287
1741
|
return v; if (typeof v === 'string') {
|
|
2288
1742
|
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2289
1743
|
return v;
|
|
2290
1744
|
return Number(v);
|
|
2291
|
-
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
|
|
2292
|
-
|
|
2293
|
-
return undefined; if (Array.isArray(v))
|
|
2294
|
-
return v; if (typeof v === 'string') {
|
|
2295
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2296
|
-
return v;
|
|
2297
|
-
return Number(v);
|
|
2298
|
-
} return v; }), zod_1.z.number().gte(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
2299
|
-
color: zod_1.z.optional(zod_1.z.union([zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#000000'),
|
|
2300
|
-
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2301
|
-
return undefined; if (Array.isArray(v))
|
|
2302
|
-
return v; if (typeof v === 'string') {
|
|
2303
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2304
|
-
return v;
|
|
2305
|
-
return Number(v);
|
|
2306
|
-
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5)
|
|
2307
|
-
}).strict();
|
|
2308
|
-
exports.svgShadowSchema = exports.svgpropertiesSvgShadowSchema;
|
|
2309
|
-
/**
|
|
2310
|
-
* A solid color fill for SVG shapes.
|
|
2311
|
-
*/
|
|
2312
|
-
exports.svgpropertiesSvgSolidFillSchema = zod_1.z.object({
|
|
2313
|
-
type: zod_1.z.enum(['solid']),
|
|
2314
|
-
color: zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/).default('#000000'),
|
|
2315
|
-
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2316
|
-
return undefined; if (Array.isArray(v))
|
|
2317
|
-
return v; if (typeof v === 'string') {
|
|
2318
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2319
|
-
return v;
|
|
2320
|
-
return Number(v);
|
|
2321
|
-
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1)
|
|
2322
|
-
}).strict();
|
|
2323
|
-
exports.svgSolidFillSchema = exports.svgpropertiesSvgSolidFillSchema;
|
|
2324
|
-
/**
|
|
2325
|
-
* Fill properties for SVG shapes. Supports solid colors and gradients.
|
|
2326
|
-
* The fill defines how the interior of a shape is painted.
|
|
2327
|
-
*
|
|
2328
|
-
*/
|
|
2329
|
-
exports.svgpropertiesSvgFillSchema = zod_1.z.discriminatedUnion("type", [
|
|
2330
|
-
exports.svgpropertiesSvgSolidFillSchema,
|
|
2331
|
-
exports.svgpropertiesSvgLinearGradientFillSchema,
|
|
2332
|
-
exports.svgpropertiesSvgRadialGradientFillSchema,
|
|
2333
|
-
]);
|
|
2334
|
-
exports.svgFillSchema = exports.svgpropertiesSvgFillSchema;
|
|
2335
|
-
/**
|
|
2336
|
-
* Stroke (outline) properties for SVG shapes. The stroke defines how the outline
|
|
2337
|
-
* of a shape is painted, including its color, width, and line style.
|
|
2338
|
-
*
|
|
2339
|
-
*/
|
|
2340
|
-
exports.svgpropertiesSvgStrokeSchema = zod_1.z.object({
|
|
2341
|
-
color: zod_1.z.optional(zod_1.z.union([zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#000000'),
|
|
2342
|
-
width: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2343
|
-
return undefined; if (Array.isArray(v))
|
|
2344
|
-
return v; if (typeof v === 'string') {
|
|
2345
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2346
|
-
return v;
|
|
2347
|
-
return Number(v);
|
|
2348
|
-
} return v; }), zod_1.z.number().gte(0).lte(100)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
2349
|
-
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2350
|
-
return undefined; if (Array.isArray(v))
|
|
2351
|
-
return v; if (typeof v === 'string') {
|
|
2352
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2353
|
-
return v;
|
|
2354
|
-
return Number(v);
|
|
2355
|
-
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
2356
|
-
lineCap: zod_1.z.optional(zod_1.z.enum([
|
|
2357
|
-
'butt',
|
|
2358
|
-
'round',
|
|
2359
|
-
'square'
|
|
2360
|
-
])),
|
|
2361
|
-
lineJoin: zod_1.z.optional(zod_1.z.enum([
|
|
2362
|
-
'miter',
|
|
2363
|
-
'round',
|
|
2364
|
-
'bevel'
|
|
2365
|
-
])),
|
|
2366
|
-
dashArray: zod_1.z.optional(zod_1.z.array(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2367
|
-
return undefined; if (Array.isArray(v))
|
|
2368
|
-
return v; if (typeof v === 'string') {
|
|
2369
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2370
|
-
return v;
|
|
2371
|
-
return Number(v);
|
|
2372
|
-
} return v; }), zod_1.z.number().gte(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))),
|
|
2373
|
-
dashOffset: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2374
|
-
return undefined; if (Array.isArray(v))
|
|
2375
|
-
return v; if (typeof v === 'string') {
|
|
2376
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2377
|
-
return v;
|
|
2378
|
-
return Number(v);
|
|
2379
|
-
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0)
|
|
2380
|
-
}).strict();
|
|
2381
|
-
exports.svgStrokeSchema = exports.svgpropertiesSvgStrokeSchema;
|
|
2382
|
-
/**
|
|
2383
|
-
* Transformation properties for positioning, rotating, and scaling SVG shapes.
|
|
2384
|
-
*
|
|
2385
|
-
*/
|
|
2386
|
-
exports.svgpropertiesSvgTransformSchema = zod_1.z.object({
|
|
2387
|
-
x: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2388
|
-
return undefined; if (Array.isArray(v))
|
|
2389
|
-
return v; if (typeof v === 'string') {
|
|
2390
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2391
|
-
return v;
|
|
2392
|
-
return Number(v);
|
|
2393
|
-
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
2394
|
-
y: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2395
|
-
return undefined; if (Array.isArray(v))
|
|
2396
|
-
return v; if (typeof v === 'string') {
|
|
2397
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2398
|
-
return v;
|
|
2399
|
-
return Number(v);
|
|
2400
|
-
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
2401
|
-
rotation: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2402
|
-
return undefined; if (Array.isArray(v))
|
|
2403
|
-
return v; if (typeof v === 'string') {
|
|
2404
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2405
|
-
return v;
|
|
2406
|
-
return Number(v);
|
|
2407
|
-
} return v; }), zod_1.z.number().gte(-360).lte(360)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
2408
|
-
scale: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2409
|
-
return undefined; if (Array.isArray(v))
|
|
2410
|
-
return v; if (typeof v === 'string') {
|
|
2411
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2412
|
-
return v;
|
|
2413
|
-
return Number(v);
|
|
2414
|
-
} return v; }), zod_1.z.number().gte(0.01).lte(100)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
2415
|
-
originX: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2416
|
-
return undefined; if (Array.isArray(v))
|
|
2417
|
-
return v; if (typeof v === 'string') {
|
|
2418
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2419
|
-
return v;
|
|
2420
|
-
return Number(v);
|
|
2421
|
-
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5),
|
|
2422
|
-
originY: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2423
|
-
return undefined; if (Array.isArray(v))
|
|
2424
|
-
return v; if (typeof v === 'string') {
|
|
2425
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2426
|
-
return v;
|
|
2427
|
-
return Number(v);
|
|
2428
|
-
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5)
|
|
2429
|
-
}).strict();
|
|
2430
|
-
exports.svgTransformSchema = exports.svgpropertiesSvgTransformSchema;
|
|
2431
|
-
/**
|
|
2432
|
-
* An arrow shape pointing to the right by default.
|
|
2433
|
-
* Use transform rotation to change direction.
|
|
2434
|
-
*
|
|
2435
|
-
*/
|
|
2436
|
-
exports.svgshapesSvgArrowShapeSchema = zod_1.z.object({
|
|
2437
|
-
type: zod_1.z.enum(['arrow']),
|
|
2438
|
-
length: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2439
|
-
return undefined; if (Array.isArray(v))
|
|
2440
|
-
return v; if (typeof v === 'string') {
|
|
2441
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2442
|
-
return v;
|
|
2443
|
-
return Number(v);
|
|
2444
|
-
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2445
|
-
headWidth: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2446
|
-
return undefined; if (Array.isArray(v))
|
|
2447
|
-
return v; if (typeof v === 'string') {
|
|
2448
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2449
|
-
return v;
|
|
2450
|
-
return Number(v);
|
|
2451
|
-
} return v; }), zod_1.z.number().gte(1).lte(1000)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2452
|
-
headLength: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2453
|
-
return undefined; if (Array.isArray(v))
|
|
2454
|
-
return v; if (typeof v === 'string') {
|
|
2455
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2456
|
-
return v;
|
|
2457
|
-
return Number(v);
|
|
2458
|
-
} return v; }), zod_1.z.number().gte(1).lte(1000)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2459
|
-
shaftWidth: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2460
|
-
return undefined; if (Array.isArray(v))
|
|
2461
|
-
return v; if (typeof v === 'string') {
|
|
2462
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2463
|
-
return v;
|
|
2464
|
-
return Number(v);
|
|
2465
|
-
} return v; }), zod_1.z.number().gte(1).lte(1000)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
2466
|
-
}).strict();
|
|
2467
|
-
exports.svgArrowShapeSchema = exports.svgshapesSvgArrowShapeSchema;
|
|
2468
|
-
/**
|
|
2469
|
-
* A perfect circle shape defined by its radius.
|
|
2470
|
-
* The circle is centered at the shape's position.
|
|
2471
|
-
*
|
|
2472
|
-
*/
|
|
2473
|
-
exports.svgshapesSvgCircleShapeSchema = zod_1.z.object({
|
|
2474
|
-
type: zod_1.z.enum(['circle']),
|
|
2475
|
-
radius: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2476
|
-
return undefined; if (Array.isArray(v))
|
|
2477
|
-
return v; if (typeof v === 'string') {
|
|
2478
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2479
|
-
return v;
|
|
2480
|
-
return Number(v);
|
|
2481
|
-
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
2482
|
-
}).strict();
|
|
2483
|
-
exports.svgCircleShapeSchema = exports.svgshapesSvgCircleShapeSchema;
|
|
2484
|
-
/**
|
|
2485
|
-
* A cross or plus shape with equal or different arm lengths.
|
|
2486
|
-
* Can be styled as a plus sign (+) or a cross (x with rotation).
|
|
2487
|
-
*
|
|
2488
|
-
*/
|
|
2489
|
-
exports.svgshapesSvgCrossShapeSchema = zod_1.z.object({
|
|
2490
|
-
type: zod_1.z.enum(['cross']),
|
|
2491
|
-
width: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2492
|
-
return undefined; if (Array.isArray(v))
|
|
2493
|
-
return v; if (typeof v === 'string') {
|
|
2494
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2495
|
-
return v;
|
|
2496
|
-
return Number(v);
|
|
2497
|
-
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2498
|
-
height: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2499
|
-
return undefined; if (Array.isArray(v))
|
|
2500
|
-
return v; if (typeof v === 'string') {
|
|
2501
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2502
|
-
return v;
|
|
2503
|
-
return Number(v);
|
|
2504
|
-
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2505
|
-
thickness: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2506
|
-
return undefined; if (Array.isArray(v))
|
|
2507
|
-
return v; if (typeof v === 'string') {
|
|
2508
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2509
|
-
return v;
|
|
2510
|
-
return Number(v);
|
|
2511
|
-
} return v; }), zod_1.z.number().gte(1).lte(500)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
2512
|
-
}).strict();
|
|
2513
|
-
exports.svgCrossShapeSchema = exports.svgshapesSvgCrossShapeSchema;
|
|
2514
|
-
/**
|
|
2515
|
-
* An ellipse (oval) shape with separate horizontal and vertical radii.
|
|
2516
|
-
* The ellipse is centered at the shape's position.
|
|
2517
|
-
*
|
|
2518
|
-
*/
|
|
2519
|
-
exports.svgshapesSvgEllipseShapeSchema = zod_1.z.object({
|
|
2520
|
-
type: zod_1.z.enum(['ellipse']),
|
|
2521
|
-
radiusX: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2522
|
-
return undefined; if (Array.isArray(v))
|
|
2523
|
-
return v; if (typeof v === 'string') {
|
|
2524
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2525
|
-
return v;
|
|
2526
|
-
return Number(v);
|
|
2527
|
-
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2528
|
-
radiusY: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2529
|
-
return undefined; if (Array.isArray(v))
|
|
2530
|
-
return v; if (typeof v === 'string') {
|
|
2531
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2532
|
-
return v;
|
|
2533
|
-
return Number(v);
|
|
2534
|
-
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
2535
|
-
}).strict();
|
|
2536
|
-
exports.svgEllipseShapeSchema = exports.svgshapesSvgEllipseShapeSchema;
|
|
2537
|
-
/**
|
|
2538
|
-
* A heart shape commonly used for love/like icons.
|
|
2539
|
-
* The heart is defined by a single size parameter.
|
|
2540
|
-
*
|
|
2541
|
-
*/
|
|
2542
|
-
exports.svgshapesSvgHeartShapeSchema = zod_1.z.object({
|
|
2543
|
-
type: zod_1.z.enum(['heart']),
|
|
2544
|
-
size: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2545
|
-
return undefined; if (Array.isArray(v))
|
|
2546
|
-
return v; if (typeof v === 'string') {
|
|
2547
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2548
|
-
return v;
|
|
2549
|
-
return Number(v);
|
|
2550
|
-
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
2551
|
-
}).strict();
|
|
2552
|
-
exports.svgHeartShapeSchema = exports.svgshapesSvgHeartShapeSchema;
|
|
2553
|
-
/**
|
|
2554
|
-
* A straight line shape with a specified length and thickness.
|
|
2555
|
-
* The line is drawn horizontally by default and can be rotated using transform.
|
|
2556
|
-
*
|
|
2557
|
-
*/
|
|
2558
|
-
exports.svgshapesSvgLineShapeSchema = zod_1.z.object({
|
|
2559
|
-
type: zod_1.z.enum(['line']),
|
|
2560
|
-
length: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2561
|
-
return undefined; if (Array.isArray(v))
|
|
2562
|
-
return v; if (typeof v === 'string') {
|
|
2563
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2564
|
-
return v;
|
|
2565
|
-
return Number(v);
|
|
2566
|
-
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2567
|
-
thickness: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2568
|
-
return undefined; if (Array.isArray(v))
|
|
2569
|
-
return v; if (typeof v === 'string') {
|
|
2570
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2571
|
-
return v;
|
|
2572
|
-
return Number(v);
|
|
2573
|
-
} return v; }), zod_1.z.number().gte(1).lte(500)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
2574
|
-
}).strict();
|
|
2575
|
-
exports.svgLineShapeSchema = exports.svgshapesSvgLineShapeSchema;
|
|
2576
|
-
/**
|
|
2577
|
-
* A custom shape defined by SVG path data.
|
|
2578
|
-
* Supports all standard SVG path commands for creating complex shapes.
|
|
2579
|
-
*
|
|
2580
|
-
* **Path Commands:**
|
|
2581
|
-
* - `M x y` / `m dx dy` - Move to (absolute/relative)
|
|
2582
|
-
* - `L x y` / `l dx dy` - Line to
|
|
2583
|
-
* - `H x` / `h dx` - Horizontal line to
|
|
2584
|
-
* - `V y` / `v dy` - Vertical line to
|
|
2585
|
-
* - `C x1 y1 x2 y2 x y` / `c` - Cubic Bezier curve
|
|
2586
|
-
* - `S x2 y2 x y` / `s` - Smooth cubic Bezier
|
|
2587
|
-
* - `Q x1 y1 x y` / `q` - Quadratic Bezier curve
|
|
2588
|
-
* - `T x y` / `t` - Smooth quadratic Bezier
|
|
2589
|
-
* - `A rx ry angle large-arc sweep x y` / `a` - Elliptical arc
|
|
2590
|
-
* - `Z` / `z` - Close path
|
|
2591
|
-
*
|
|
2592
|
-
*/
|
|
2593
|
-
exports.svgshapesSvgPathShapeSchema = zod_1.z.object({
|
|
2594
|
-
type: zod_1.z.enum(['path']),
|
|
2595
|
-
d: zod_1.z.string().min(1).max(100000)
|
|
2596
|
-
}).strict();
|
|
2597
|
-
exports.svgPathShapeSchema = exports.svgshapesSvgPathShapeSchema;
|
|
2598
|
-
/**
|
|
2599
|
-
* A regular polygon shape with a specified number of sides.
|
|
2600
|
-
* Examples: triangle (3), square (4), pentagon (5), hexagon (6), etc.
|
|
2601
|
-
* The polygon is inscribed in a circle of the given radius.
|
|
2602
|
-
*
|
|
2603
|
-
*/
|
|
2604
|
-
exports.svgshapesSvgPolygonShapeSchema = zod_1.z.object({
|
|
2605
|
-
type: zod_1.z.enum(['polygon']),
|
|
2606
|
-
sides: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2607
|
-
return undefined; if (Array.isArray(v))
|
|
2608
|
-
return v; if (typeof v === 'string') {
|
|
2609
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2610
|
-
return v;
|
|
2611
|
-
return Number(v);
|
|
2612
|
-
} return v; }), zod_1.z.number().int().gte(3).lte(100)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2613
|
-
radius: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2614
|
-
return undefined; if (Array.isArray(v))
|
|
2615
|
-
return v; if (typeof v === 'string') {
|
|
2616
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2617
|
-
return v;
|
|
2618
|
-
return Number(v);
|
|
2619
|
-
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
2620
|
-
}).strict();
|
|
2621
|
-
exports.svgPolygonShapeSchema = exports.svgshapesSvgPolygonShapeSchema;
|
|
2622
|
-
/**
|
|
2623
|
-
* A rectangle shape with optional rounded corners.
|
|
2624
|
-
* The rectangle is defined by its width and height dimensions.
|
|
2625
|
-
*
|
|
2626
|
-
*/
|
|
2627
|
-
exports.svgshapesSvgRectangleShapeSchema = zod_1.z.object({
|
|
2628
|
-
type: zod_1.z.enum(['rectangle']),
|
|
2629
|
-
width: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2630
|
-
return undefined; if (Array.isArray(v))
|
|
2631
|
-
return v; if (typeof v === 'string') {
|
|
2632
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2633
|
-
return v;
|
|
2634
|
-
return Number(v);
|
|
2635
|
-
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2636
|
-
height: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2637
|
-
return undefined; if (Array.isArray(v))
|
|
2638
|
-
return v; if (typeof v === 'string') {
|
|
2639
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2640
|
-
return v;
|
|
2641
|
-
return Number(v);
|
|
2642
|
-
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2643
|
-
cornerRadius: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2644
|
-
return undefined; if (Array.isArray(v))
|
|
2645
|
-
return v; if (typeof v === 'string') {
|
|
2646
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2647
|
-
return v;
|
|
2648
|
-
return Number(v);
|
|
2649
|
-
} return v; }), zod_1.z.number().gte(0).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0)
|
|
2650
|
-
}).strict();
|
|
2651
|
-
exports.svgRectangleShapeSchema = exports.svgshapesSvgRectangleShapeSchema;
|
|
2652
|
-
/**
|
|
2653
|
-
* A ring (donut/annulus) shape - a circle with a circular hole in the center.
|
|
2654
|
-
* The ring is defined by outer and inner radii.
|
|
2655
|
-
*
|
|
2656
|
-
*/
|
|
2657
|
-
exports.svgshapesSvgRingShapeSchema = zod_1.z.object({
|
|
2658
|
-
type: zod_1.z.enum(['ring']),
|
|
2659
|
-
outerRadius: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2660
|
-
return undefined; if (Array.isArray(v))
|
|
2661
|
-
return v; if (typeof v === 'string') {
|
|
2662
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2663
|
-
return v;
|
|
2664
|
-
return Number(v);
|
|
2665
|
-
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2666
|
-
innerRadius: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2667
|
-
return undefined; if (Array.isArray(v))
|
|
2668
|
-
return v; if (typeof v === 'string') {
|
|
2669
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2670
|
-
return v;
|
|
2671
|
-
return Number(v);
|
|
2672
|
-
} return v; }), zod_1.z.number().gte(0).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
2673
|
-
}).strict();
|
|
2674
|
-
exports.svgRingShapeSchema = exports.svgshapesSvgRingShapeSchema;
|
|
2675
|
-
/**
|
|
2676
|
-
* A star shape with a specified number of points.
|
|
2677
|
-
* The star is defined by outer and inner radii, creating the characteristic
|
|
2678
|
-
* pointed appearance.
|
|
2679
|
-
*
|
|
2680
|
-
*/
|
|
2681
|
-
exports.svgshapesSvgStarShapeSchema = zod_1.z.object({
|
|
2682
|
-
type: zod_1.z.enum(['star']),
|
|
2683
|
-
points: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2684
|
-
return undefined; if (Array.isArray(v))
|
|
2685
|
-
return v; if (typeof v === 'string') {
|
|
2686
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2687
|
-
return v;
|
|
2688
|
-
return Number(v);
|
|
2689
|
-
} return v; }), zod_1.z.number().int().gte(3).lte(100)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2690
|
-
outerRadius: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2691
|
-
return undefined; if (Array.isArray(v))
|
|
2692
|
-
return v; if (typeof v === 'string') {
|
|
2693
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2694
|
-
return v;
|
|
2695
|
-
return Number(v);
|
|
2696
|
-
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2697
|
-
innerRadius: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2698
|
-
return undefined; if (Array.isArray(v))
|
|
2699
|
-
return v; if (typeof v === 'string') {
|
|
2700
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2701
|
-
return v;
|
|
2702
|
-
return Number(v);
|
|
2703
|
-
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
2704
|
-
}).strict();
|
|
2705
|
-
exports.svgStarShapeSchema = exports.svgshapesSvgStarShapeSchema;
|
|
2706
|
-
/**
|
|
2707
|
-
* The shape definition for an SVG asset. Each shape type has its own specific
|
|
2708
|
-
* properties. The `type` field determines which shape is rendered.
|
|
2709
|
-
*
|
|
2710
|
-
*/
|
|
2711
|
-
exports.svgshapesSvgShapeSchema = zod_1.z.discriminatedUnion("type", [
|
|
2712
|
-
exports.svgshapesSvgRectangleShapeSchema,
|
|
2713
|
-
exports.svgshapesSvgCircleShapeSchema,
|
|
2714
|
-
exports.svgshapesSvgEllipseShapeSchema,
|
|
2715
|
-
exports.svgshapesSvgLineShapeSchema,
|
|
2716
|
-
exports.svgshapesSvgPolygonShapeSchema,
|
|
2717
|
-
exports.svgshapesSvgStarShapeSchema,
|
|
2718
|
-
exports.svgshapesSvgArrowShapeSchema,
|
|
2719
|
-
exports.svgshapesSvgHeartShapeSchema,
|
|
2720
|
-
exports.svgshapesSvgCrossShapeSchema,
|
|
2721
|
-
exports.svgshapesSvgRingShapeSchema,
|
|
2722
|
-
exports.svgshapesSvgPathShapeSchema,
|
|
2723
|
-
]);
|
|
2724
|
-
exports.svgShapeSchema = exports.svgshapesSvgShapeSchema;
|
|
2725
|
-
/**
|
|
2726
|
-
* The SvgAsset is used to add scalable vector graphics (SVG) shapes to a video.
|
|
2727
|
-
* It provides two mutually exclusive ways to define shapes:
|
|
2728
|
-
*
|
|
2729
|
-
* **Option 1: Import SVG markup using `src`**
|
|
2730
|
-
* ```json
|
|
2731
|
-
* {
|
|
2732
|
-
* "type": "svg",
|
|
2733
|
-
* "src": "<svg width=\"100\" height=\"100\"><circle cx=\"50\" cy=\"50\" r=\"40\" fill=\"#FF0000\"/></svg>"
|
|
2734
|
-
* }
|
|
2735
|
-
* ```
|
|
2736
|
-
* When using `src`, no other properties are allowed. The fill, stroke, and dimensions
|
|
2737
|
-
* are automatically extracted from the SVG markup.
|
|
2738
|
-
*
|
|
2739
|
-
* **Option 2: Define shapes programmatically using `shape`**
|
|
2740
|
-
* ```json
|
|
2741
|
-
* {
|
|
2742
|
-
* "type": "svg",
|
|
2743
|
-
* "shape": { "type": "circle", "radius": 50 },
|
|
2744
|
-
* "fill": { "type": "solid", "color": "#FF0000" }
|
|
2745
|
-
* }
|
|
2746
|
-
* ```
|
|
2747
|
-
* When using `shape`, you can customize fill, stroke, shadow, transform, and other properties.
|
|
2748
|
-
* The `src` property is not allowed in this mode.
|
|
2749
|
-
*
|
|
2750
|
-
* **Important:** You must provide either `src` OR `shape`, but not both.
|
|
2751
|
-
* These two modes are mutually exclusive.
|
|
2752
|
-
*
|
|
2753
|
-
* **Available Shapes (Option 2 only):**
|
|
2754
|
-
* - `rectangle` - Rectangles with optional rounded corners
|
|
2755
|
-
* - `circle` - Perfect circles
|
|
2756
|
-
* - `ellipse` - Ellipses/ovals with separate x and y radii
|
|
2757
|
-
* - `line` - Straight lines with configurable thickness
|
|
2758
|
-
* - `polygon` - Regular polygons (triangle, pentagon, hexagon, etc.)
|
|
2759
|
-
* - `star` - Multi-pointed stars
|
|
2760
|
-
* - `arrow` - Directional arrows
|
|
2761
|
-
* - `heart` - Heart shapes
|
|
2762
|
-
* - `cross` - Plus/cross shapes
|
|
2763
|
-
* - `ring` - Donut/ring shapes
|
|
2764
|
-
* - `path` - Custom shapes using SVG path data
|
|
2765
|
-
*
|
|
2766
|
-
* See [W3C SVG 2 Specification](https://www.w3.org/TR/SVG2/) for path data syntax.
|
|
2767
|
-
*
|
|
2768
|
-
*/
|
|
2769
|
-
exports.svgassetSvgAssetSchema = zod_1.z.object({
|
|
2770
|
-
type: zod_1.z.enum(["svg"]),
|
|
2771
|
-
src: zod_1.z.optional(zod_1.z.string().min(1).max(500000)),
|
|
2772
|
-
shape: zod_1.z.optional(exports.svgshapesSvgShapeSchema),
|
|
2773
|
-
fill: zod_1.z.optional(exports.svgpropertiesSvgFillSchema),
|
|
2774
|
-
stroke: zod_1.z.optional(exports.svgpropertiesSvgStrokeSchema),
|
|
2775
|
-
shadow: zod_1.z.optional(exports.svgpropertiesSvgShadowSchema),
|
|
2776
|
-
transform: zod_1.z.optional(exports.svgpropertiesSvgTransformSchema),
|
|
2777
|
-
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2778
|
-
return undefined; if (Array.isArray(v))
|
|
2779
|
-
return v; if (typeof v === 'string') {
|
|
2780
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2781
|
-
return v;
|
|
2782
|
-
return Number(v);
|
|
2783
|
-
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
2784
|
-
width: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2785
|
-
return undefined; if (Array.isArray(v))
|
|
2786
|
-
return v; if (typeof v === 'string') {
|
|
2787
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2788
|
-
return v;
|
|
2789
|
-
return Number(v);
|
|
2790
|
-
} return v; }), zod_1.z.number().int().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2791
|
-
height: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2792
|
-
return undefined; if (Array.isArray(v))
|
|
2793
|
-
return v; if (typeof v === 'string') {
|
|
2794
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2795
|
-
return v;
|
|
2796
|
-
return Number(v);
|
|
2797
|
-
} return v; }), zod_1.z.number().int().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2798
|
-
}).strict().superRefine((data, ctx) => {
|
|
2799
|
-
const hasShape = data.shape !== undefined;
|
|
2800
|
-
const hasSrc = data.src !== undefined && data.src.trim() !== "";
|
|
2801
|
-
if (!hasShape && !hasSrc) {
|
|
2802
|
-
ctx.addIssue({
|
|
2803
|
-
code: zod_1.z.ZodIssueCode.custom,
|
|
2804
|
-
message: "Either 'src' or 'shape' must be provided",
|
|
2805
|
-
path: [],
|
|
2806
|
-
});
|
|
2807
|
-
}
|
|
2808
|
-
if (hasShape && hasSrc) {
|
|
2809
|
-
ctx.addIssue({
|
|
2810
|
-
code: zod_1.z.ZodIssueCode.custom,
|
|
2811
|
-
message: "Provide either 'src' or 'shape', not both",
|
|
2812
|
-
path: ["src"],
|
|
2813
|
-
});
|
|
2814
|
-
}
|
|
2815
|
-
if (hasSrc) {
|
|
2816
|
-
const disallowedProps = ["shape", "fill", "stroke", "shadow", "transform", "width", "height"];
|
|
2817
|
-
for (const prop of disallowedProps) {
|
|
2818
|
-
if (data[prop] !== undefined) {
|
|
2819
|
-
ctx.addIssue({
|
|
2820
|
-
code: zod_1.z.ZodIssueCode.custom,
|
|
2821
|
-
message: `'${prop}' is not allowed when using 'src'. Only 'type' and 'src' are allowed in import mode`,
|
|
2822
|
-
path: [prop],
|
|
2823
|
-
});
|
|
2824
|
-
}
|
|
2825
|
-
}
|
|
2826
|
-
}
|
|
2827
|
-
});
|
|
2828
|
-
exports.svgAssetSchema = exports.svgassetSvgAssetSchema;
|
|
2829
|
-
/**
|
|
2830
|
-
* Configure the id and optional merge fields to render a template by id.
|
|
2831
|
-
*/
|
|
2832
|
-
exports.templaterenderTemplateRenderSchema = zod_1.z.object({
|
|
2833
|
-
id: zod_1.z.string(),
|
|
2834
|
-
merge: zod_1.z.optional(zod_1.z.array(exports.mergefieldMergeFieldSchema))
|
|
2835
|
-
}).strict();
|
|
2836
|
-
exports.templateRenderSchema = exports.templaterenderTemplateRenderSchema;
|
|
2837
|
-
/**
|
|
2838
|
-
* Horizontal and vertical alignment properties for text.
|
|
2839
|
-
*/
|
|
2840
|
-
exports.textpropertiesTextAlignmentSchema = zod_1.z.object({
|
|
2841
|
-
horizontal: zod_1.z.optional(zod_1.z.enum([
|
|
2842
|
-
'left',
|
|
2843
|
-
'center',
|
|
2844
|
-
'right'
|
|
2845
|
-
])),
|
|
2846
|
-
vertical: zod_1.z.optional(zod_1.z.enum([
|
|
2847
|
-
'top',
|
|
2848
|
-
'center',
|
|
2849
|
-
'bottom'
|
|
2850
|
-
]))
|
|
2851
|
-
}).strict();
|
|
2852
|
-
exports.textAlignmentSchema = exports.textpropertiesTextAlignmentSchema;
|
|
2853
|
-
/**
|
|
2854
|
-
* Animation properties for text entrance effects.
|
|
2855
|
-
*/
|
|
2856
|
-
exports.textpropertiesTextAnimationSchema = zod_1.z.object({
|
|
2857
|
-
preset: zod_1.z.enum(['typewriter']),
|
|
2858
|
-
duration: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2859
|
-
return undefined; if (Array.isArray(v))
|
|
2860
|
-
return v; if (typeof v === 'string') {
|
|
2861
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2862
|
-
return v;
|
|
2863
|
-
return Number(v);
|
|
2864
|
-
} return v; }), zod_1.z.number().gte(0.1).lte(30)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
|
|
2865
|
-
}).strict();
|
|
2866
|
-
/**
|
|
2867
|
-
* Displays a background box behind the text.
|
|
2868
|
-
*/
|
|
2869
|
-
exports.textpropertiesTextBackgroundSchema = zod_1.z.object({
|
|
2870
|
-
color: zod_1.z.optional(zod_1.z.union([zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2871
|
-
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2872
|
-
return undefined; if (Array.isArray(v))
|
|
2873
|
-
return v; if (typeof v === 'string') {
|
|
2874
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2875
|
-
return v;
|
|
2876
|
-
return Number(v);
|
|
2877
|
-
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2878
|
-
padding: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2879
|
-
return undefined; if (Array.isArray(v))
|
|
2880
|
-
return v; if (typeof v === 'string') {
|
|
2881
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2882
|
-
return v;
|
|
2883
|
-
return Number(v);
|
|
2884
|
-
} return v; }), zod_1.z.number().gte(0).lte(100)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2885
|
-
borderRadius: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2886
|
-
return undefined; if (Array.isArray(v))
|
|
2887
|
-
return v; if (typeof v === 'string') {
|
|
2888
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2889
|
-
return v;
|
|
2890
|
-
return Number(v);
|
|
2891
|
-
} return v; }), zod_1.z.number().gte(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
|
|
2892
|
-
}).strict();
|
|
2893
|
-
exports.textBackgroundSchema = exports.textpropertiesTextBackgroundSchema;
|
|
2894
|
-
/**
|
|
2895
|
-
* Font properties for text.
|
|
2896
|
-
*/
|
|
2897
|
-
exports.textpropertiesTextFontSchema = zod_1.z.object({
|
|
2898
|
-
family: zod_1.z.optional(zod_1.z.string()),
|
|
2899
|
-
color: zod_1.z.optional(zod_1.z.string()),
|
|
2900
|
-
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2901
|
-
return undefined; if (Array.isArray(v))
|
|
2902
|
-
return v; if (typeof v === 'string') {
|
|
2903
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2904
|
-
return v;
|
|
2905
|
-
return Number(v);
|
|
2906
|
-
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2907
|
-
size: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2908
|
-
return undefined; if (Array.isArray(v))
|
|
2909
|
-
return v; if (typeof v === 'string') {
|
|
2910
|
-
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2911
|
-
return v;
|
|
2912
|
-
return Number(v);
|
|
2913
|
-
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2914
|
-
weight: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1745
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1746
|
+
weight: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2915
1747
|
return undefined; if (Array.isArray(v))
|
|
2916
1748
|
return v; if (typeof v === 'string') {
|
|
2917
1749
|
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
@@ -3966,23 +2798,3 @@ exports.getUploadSignedUrlRequest = zod_1.z.object({
|
|
|
3966
2798
|
* The id and signed URL to upload to.
|
|
3967
2799
|
*/
|
|
3968
2800
|
exports.getUploadSignedUrlResponse = exports.uploadresponseUploadResponseSchema;
|
|
3969
|
-
exports.postGenerateAssetRequest = zod_1.z.object({
|
|
3970
|
-
body: exports.generatedAssetGeneratedAssetSchema,
|
|
3971
|
-
path: zod_1.z.optional(zod_1.z.never()),
|
|
3972
|
-
query: zod_1.z.optional(zod_1.z.never())
|
|
3973
|
-
}).strict();
|
|
3974
|
-
/**
|
|
3975
|
-
* The generated asset details
|
|
3976
|
-
*/
|
|
3977
|
-
exports.postGenerateAssetResponse = exports.generatedAssetResponseGeneratedAssetResponseSchema;
|
|
3978
|
-
exports.getGeneratedAssetRequest = zod_1.z.object({
|
|
3979
|
-
body: zod_1.z.optional(zod_1.z.never()),
|
|
3980
|
-
path: zod_1.z.object({
|
|
3981
|
-
id: zod_1.z.union([zod_1.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}$/), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
|
|
3982
|
-
}),
|
|
3983
|
-
query: zod_1.z.optional(zod_1.z.never())
|
|
3984
|
-
}).strict();
|
|
3985
|
-
/**
|
|
3986
|
-
* The generated asset details
|
|
3987
|
-
*/
|
|
3988
|
-
exports.getGeneratedAssetResponse = exports.generatedAssetResponseGeneratedAssetResponseSchema;
|