@shotstack/schemas 1.3.5 → 1.3.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 +836 -0
- package/dist/schema.d.ts +633 -1
- package/dist/zod/zod.gen.cjs +414 -121
- package/dist/zod/zod.gen.d.ts +8009 -3776
- package/dist/zod/zod.gen.js +410 -118
- package/dist/zod/zod.gen.ts +454 -118
- package/package.json +1 -1
package/dist/zod/zod.gen.cjs
CHANGED
|
@@ -5,9 +5,10 @@ exports.openAiGeneratedAssetSchema = exports.openaiGeneratedAssetOpenAiGenerated
|
|
|
5
5
|
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.cropSchema = exports.cropCropSchema = exports.generatedAssetSchema = exports.generatedAssetGeneratedAssetSchema = exports.stabilityAiGeneratedAssetSchema = exports.stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema = exports.stabilityAiGeneratedAssetOptionsSchema = exports.stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema = exports.stabilityAiTextToImageOptionsSchema = exports.stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema = exports.shotstackGeneratedAssetSchema = exports.shotstackGeneratedAssetShotstackGeneratedAssetSchema = exports.shotstackGeneratedAssetOptionsSchema = exports.shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema = exports.shotstackTextToSpeechOptionsSchema = exports.shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema = exports.shotstackTextToImageOptionsSchema = exports.shotstackTextToImageOptionsShotstackTextToImageOptionsSchema = exports.shotstackTextGeneratorOptionsSchema = exports.shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema = exports.shotstackImageToVideoOptionsSchema = exports.shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema = exports.generatedAssetResponseSchema = exports.generatedAssetResponseGeneratedAssetResponseSchema = exports.generatedAssetResponseDataSchema = exports.generatedAssetResponseDataGeneratedAssetResponseDataSchema = exports.generatedAssetResponseAttributesSchema = exports.generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema = exports.generatedAssetErrorResponseSchema = exports.generatedAssetErrorResponseGeneratedAssetErrorResponseSchema = exports.generatedAssetErrorResponseDataSchema = exports.generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema = void 0;
|
|
6
6
|
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 = exports.tiktokDestinationTiktokDestinationSchema = exports.tiktokDestinationOptionsTiktokDestinationOptionsSchema = void 0;
|
|
7
7
|
exports.transferResponseAttributesSchema = exports.transferresponseattributesTransferResponseAttributesSchema = exports.richTextAssetSchema = exports.richtextassetRichTextAssetSchema = exports.richTextStyleSchema = exports.richtextpropertiesRichTextStyleSchema = exports.richTextFontSchema = exports.richtextpropertiesRichTextFontSchema = exports.richTextStrokeSchema = exports.richtextpropertiesRichTextStrokeSchema = exports.richTextShadowSchema = exports.richtextpropertiesRichTextShadowSchema = exports.richtextpropertiesRichTextPaddingSchema = exports.richTextGradientSchema = exports.richtextpropertiesRichTextGradientSchema = exports.richtextpropertiesRichTextBorderSchema = exports.richTextBackgroundSchema = exports.richtextpropertiesRichTextBackgroundSchema = exports.richTextAnimationSchema = exports.richtextpropertiesRichTextAnimationSchema = exports.richTextAlignmentSchema = exports.richtextpropertiesRichTextAlignmentSchema = 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 = exports.posterSchema = exports.posterPosterSchema = void 0;
|
|
8
|
-
exports.
|
|
9
|
-
exports.
|
|
10
|
-
exports.
|
|
8
|
+
exports.svgCircleShapeSchema = exports.svgshapesSvgCircleShapeSchema = exports.svgArrowShapeSchema = exports.svgshapesSvgArrowShapeSchema = exports.svgTransformSchema = exports.svgpropertiesSvgTransformSchema = exports.svgStrokeSchema = exports.svgpropertiesSvgStrokeSchema = exports.svgFillSchema = exports.svgpropertiesSvgFillSchema = exports.svgSolidFillSchema = exports.svgpropertiesSvgSolidFillSchema = exports.svgShadowSchema = exports.svgpropertiesSvgShadowSchema = exports.svgRadialGradientFillSchema = exports.svgpropertiesSvgRadialGradientFillSchema = exports.svgLinearGradientFillSchema = exports.svgpropertiesSvgLinearGradientFillSchema = exports.svgGradientStopSchema = exports.svgpropertiesSvgGradientStopSchema = 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 = void 0;
|
|
9
|
+
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 = 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.svgShapeSchema = exports.svgshapesSvgShapeSchema = exports.svgStarShapeSchema = exports.svgshapesSvgStarShapeSchema = exports.svgRingShapeSchema = exports.svgshapesSvgRingShapeSchema = exports.svgRectangleShapeSchema = exports.svgshapesSvgRectangleShapeSchema = exports.svgPolygonShapeSchema = exports.svgshapesSvgPolygonShapeSchema = exports.svgPathShapeSchema = exports.svgshapesSvgPathShapeSchema = exports.svgLineShapeSchema = exports.svgshapesSvgLineShapeSchema = exports.svgHeartShapeSchema = exports.svgshapesSvgHeartShapeSchema = exports.svgEllipseShapeSchema = exports.svgshapesSvgEllipseShapeSchema = exports.svgCrossShapeSchema = exports.svgshapesSvgCrossShapeSchema = void 0;
|
|
10
|
+
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 = 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.skewTransformationSchema = exports.skewtransformationSkewTransformationSchema = 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 = void 0;
|
|
11
12
|
const zod_1 = require("zod");
|
|
12
13
|
exports.editRootSchema = zod_1.z.unknown();
|
|
13
14
|
exports.sourceRootSchema = zod_1.z.unknown();
|
|
@@ -30,9 +31,9 @@ exports.uploadRootSchema = zod_1.z.unknown();
|
|
|
30
31
|
*/
|
|
31
32
|
exports.captionpropertiesCaptionBackgroundSchema = zod_1.z.object({
|
|
32
33
|
color: zod_1.z.optional(zod_1.z.string()),
|
|
33
|
-
opacity: zod_1.z.optional(zod_1.z.number()),
|
|
34
|
-
padding: zod_1.z.optional(zod_1.z.int()),
|
|
35
|
-
borderRadius: zod_1.z.optional(zod_1.z.int()),
|
|
34
|
+
opacity: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())),
|
|
35
|
+
padding: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int())),
|
|
36
|
+
borderRadius: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int())),
|
|
36
37
|
});
|
|
37
38
|
exports.captionBackgroundSchema = exports.captionpropertiesCaptionBackgroundSchema;
|
|
38
39
|
/**
|
|
@@ -41,20 +42,20 @@ exports.captionBackgroundSchema = exports.captionpropertiesCaptionBackgroundSche
|
|
|
41
42
|
exports.captionpropertiesCaptionFontSchema = zod_1.z.object({
|
|
42
43
|
family: zod_1.z.optional(zod_1.z.string()),
|
|
43
44
|
color: zod_1.z.optional(zod_1.z.string()),
|
|
44
|
-
opacity: zod_1.z.optional(zod_1.z.number()),
|
|
45
|
-
size: zod_1.z.optional(zod_1.z.int()),
|
|
46
|
-
lineHeight: zod_1.z.optional(zod_1.z.number()),
|
|
45
|
+
opacity: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())),
|
|
46
|
+
size: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int())),
|
|
47
|
+
lineHeight: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())),
|
|
47
48
|
stroke: zod_1.z.optional(zod_1.z.string()),
|
|
48
|
-
strokeWidth: zod_1.z.optional(zod_1.z.number()),
|
|
49
|
+
strokeWidth: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())),
|
|
49
50
|
});
|
|
50
51
|
exports.captionFontSchema = exports.captionpropertiesCaptionFontSchema;
|
|
51
52
|
/**
|
|
52
53
|
* The margin properties for captions. Margins are used to position the caption text and background on the screen.
|
|
53
54
|
*/
|
|
54
55
|
exports.captionpropertiesCaptionMarginSchema = zod_1.z.object({
|
|
55
|
-
top: zod_1.z.optional(zod_1.z.number()),
|
|
56
|
-
left: zod_1.z.optional(zod_1.z.number()),
|
|
57
|
-
right: zod_1.z.optional(zod_1.z.number()),
|
|
56
|
+
top: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())),
|
|
57
|
+
left: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())),
|
|
58
|
+
right: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())),
|
|
58
59
|
});
|
|
59
60
|
exports.captionMarginSchema = exports.captionpropertiesCaptionMarginSchema;
|
|
60
61
|
/**
|
|
@@ -75,8 +76,8 @@ exports.captionassetCaptionAssetSchema = zod_1.z.object({
|
|
|
75
76
|
font: zod_1.z.optional(exports.captionpropertiesCaptionFontSchema),
|
|
76
77
|
background: zod_1.z.optional(exports.captionpropertiesCaptionBackgroundSchema),
|
|
77
78
|
margin: zod_1.z.optional(exports.captionpropertiesCaptionMarginSchema),
|
|
78
|
-
trim: zod_1.z.optional(zod_1.z.preprocess((
|
|
79
|
-
speed: zod_1.z.optional(zod_1.z.preprocess((
|
|
79
|
+
trim: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())),
|
|
80
|
+
speed: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(10))),
|
|
80
81
|
});
|
|
81
82
|
exports.captionAssetSchema = exports.captionassetCaptionAssetSchema;
|
|
82
83
|
/**
|
|
@@ -84,8 +85,8 @@ exports.captionAssetSchema = exports.captionassetCaptionAssetSchema;
|
|
|
84
85
|
*/
|
|
85
86
|
exports.chromakeyChromaKeySchema = zod_1.z.object({
|
|
86
87
|
color: zod_1.z.optional(zod_1.z.string()),
|
|
87
|
-
threshold: zod_1.z.optional(zod_1.z.int().gte(0).lte(250)),
|
|
88
|
-
halo: zod_1.z.optional(zod_1.z.int().gte(0).lte(250)),
|
|
88
|
+
threshold: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int().gte(0).lte(250))),
|
|
89
|
+
halo: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int().gte(0).lte(250))),
|
|
89
90
|
});
|
|
90
91
|
exports.chromaKeySchema = exports.chromakeyChromaKeySchema;
|
|
91
92
|
/**
|
|
@@ -387,8 +388,8 @@ exports.generatedAssetResponseSchema = exports.generatedAssetResponseGeneratedAs
|
|
|
387
388
|
exports.shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema = zod_1.z.object({
|
|
388
389
|
type: zod_1.z.enum(["image-to-video"]),
|
|
389
390
|
imageUrl: zod_1.z.string(),
|
|
390
|
-
guidanceScale: zod_1.z.optional(zod_1.z.number()).default(1.8),
|
|
391
|
-
motion: zod_1.z.optional(zod_1.z.int()).default(127),
|
|
391
|
+
guidanceScale: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())).default(1.8),
|
|
392
|
+
motion: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int())).default(127),
|
|
392
393
|
});
|
|
393
394
|
exports.shotstackImageToVideoOptionsSchema = exports.shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema;
|
|
394
395
|
/**
|
|
@@ -405,8 +406,8 @@ exports.shotstackTextGeneratorOptionsSchema = exports.shotstackTextGeneratorOpti
|
|
|
405
406
|
exports.shotstackTextToImageOptionsShotstackTextToImageOptionsSchema = zod_1.z.object({
|
|
406
407
|
type: zod_1.z.enum(["text-to-image"]),
|
|
407
408
|
prompt: zod_1.z.string(),
|
|
408
|
-
width: zod_1.z.int(),
|
|
409
|
-
height: zod_1.z.int(),
|
|
409
|
+
width: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int()),
|
|
410
|
+
height: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int()),
|
|
410
411
|
});
|
|
411
412
|
exports.shotstackTextToImageOptionsSchema = exports.shotstackTextToImageOptionsShotstackTextToImageOptionsSchema;
|
|
412
413
|
/**
|
|
@@ -555,11 +556,11 @@ exports.stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema = zod_1
|
|
|
555
556
|
"stable-diffusion-512-v2-1",
|
|
556
557
|
"stable-diffusion-xl-beta-v2-2-2",
|
|
557
558
|
])),
|
|
558
|
-
width: zod_1.z.int(),
|
|
559
|
-
height: zod_1.z.int(),
|
|
560
|
-
steps: zod_1.z.optional(zod_1.z.int()).default(30),
|
|
561
|
-
seed: zod_1.z.optional(zod_1.z.int()).default(0),
|
|
562
|
-
cfgScale: zod_1.z.optional(zod_1.z.number()).default(7),
|
|
559
|
+
width: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int()),
|
|
560
|
+
height: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int()),
|
|
561
|
+
steps: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int())).default(30),
|
|
562
|
+
seed: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int())).default(0),
|
|
563
|
+
cfgScale: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())).default(7),
|
|
563
564
|
stylePreset: zod_1.z.optional(zod_1.z.enum([
|
|
564
565
|
"3d-model",
|
|
565
566
|
"analog-film",
|
|
@@ -642,10 +643,10 @@ exports.generatedAssetSchema = exports.generatedAssetGeneratedAssetSchema;
|
|
|
642
643
|
* 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.
|
|
643
644
|
*/
|
|
644
645
|
exports.cropCropSchema = zod_1.z.object({
|
|
645
|
-
top: zod_1.z.optional(zod_1.z.number().gte(0).lte(1)),
|
|
646
|
-
bottom: zod_1.z.optional(zod_1.z.number().gte(0).lte(1)),
|
|
647
|
-
left: zod_1.z.optional(zod_1.z.number().gte(0).lte(1)),
|
|
648
|
-
right: zod_1.z.optional(zod_1.z.number().gte(0).lte(1)),
|
|
646
|
+
top: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(1))),
|
|
647
|
+
bottom: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(1))),
|
|
648
|
+
left: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(1))),
|
|
649
|
+
right: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(1))),
|
|
649
650
|
});
|
|
650
651
|
exports.cropSchema = exports.cropCropSchema;
|
|
651
652
|
/**
|
|
@@ -840,8 +841,8 @@ exports.htmlassetHtmlAssetSchema = zod_1.z.object({
|
|
|
840
841
|
type: zod_1.z.enum(["html"]),
|
|
841
842
|
html: zod_1.z.string(),
|
|
842
843
|
css: zod_1.z.optional(zod_1.z.string()),
|
|
843
|
-
width: zod_1.z.optional(zod_1.z.int()),
|
|
844
|
-
height: zod_1.z.optional(zod_1.z.int()),
|
|
844
|
+
width: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int())),
|
|
845
|
+
height: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int())),
|
|
845
846
|
background: zod_1.z.optional(zod_1.z.string()),
|
|
846
847
|
position: zod_1.z.optional(zod_1.z.enum([
|
|
847
848
|
"top",
|
|
@@ -873,7 +874,7 @@ exports.imagetovideoassetImageToVideoAssetSchema = zod_1.z.object({
|
|
|
873
874
|
src: zod_1.z.optional(zod_1.z.string()),
|
|
874
875
|
prompt: zod_1.z.optional(zod_1.z.string()),
|
|
875
876
|
aspectRatio: zod_1.z.optional(zod_1.z.enum(["1:1", "4:3", "16:9", "9:16", "3:4", "21:9", "9:21"])),
|
|
876
|
-
speed: zod_1.z.optional(zod_1.z.preprocess((
|
|
877
|
+
speed: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(10))),
|
|
877
878
|
crop: zod_1.z.optional(exports.cropCropSchema),
|
|
878
879
|
});
|
|
879
880
|
exports.imageToVideoAssetSchema = exports.imagetovideoassetImageToVideoAssetSchema;
|
|
@@ -981,7 +982,7 @@ exports.uploadResponseSchema = exports.uploadresponseUploadResponseSchema;
|
|
|
981
982
|
* Set the playback speed of a video or audio file. Allows you to preserve the pitch of the audio so that it is sped up without sounding too high pitched or too low.
|
|
982
983
|
*/
|
|
983
984
|
exports.speedSpeedSchema = zod_1.z.object({
|
|
984
|
-
speed: zod_1.z.optional(zod_1.z.preprocess((
|
|
985
|
+
speed: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(10))),
|
|
985
986
|
preservePitch: zod_1.z.optional(zod_1.z.boolean()),
|
|
986
987
|
});
|
|
987
988
|
exports.speedSchema = exports.speedSpeedSchema;
|
|
@@ -998,7 +999,7 @@ exports.transcriptionSchema = exports.transcriptionTranscriptionSchema;
|
|
|
998
999
|
exports.lumaassetLumaAssetSchema = zod_1.z.object({
|
|
999
1000
|
type: zod_1.z.enum(["luma"]),
|
|
1000
1001
|
src: zod_1.z.string(),
|
|
1001
|
-
trim: zod_1.z.optional(zod_1.z.preprocess((
|
|
1002
|
+
trim: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())),
|
|
1002
1003
|
});
|
|
1003
1004
|
exports.lumaAssetSchema = exports.lumaassetLumaAssetSchema;
|
|
1004
1005
|
/**
|
|
@@ -1013,15 +1014,15 @@ exports.mergeFieldSchema = exports.mergefieldMergeFieldSchema;
|
|
|
1013
1014
|
* Generate a poster image for the video at a specific point from the timeline. The poster image size will match the size of the output video.
|
|
1014
1015
|
*/
|
|
1015
1016
|
exports.posterPosterSchema = zod_1.z.object({
|
|
1016
|
-
capture: zod_1.z.number(),
|
|
1017
|
+
capture: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number()),
|
|
1017
1018
|
});
|
|
1018
1019
|
exports.posterSchema = exports.posterPosterSchema;
|
|
1019
1020
|
/**
|
|
1020
1021
|
* Specify a time range to render, i.e. to render only a portion of a video or audio file. Omit this setting to export the entire video. Range can also be used to render a frame at a specific time point - setting a range and output format as `jpg` will output a single frame image at the range `start` point.
|
|
1021
1022
|
*/
|
|
1022
1023
|
exports.rangeRangeSchema = zod_1.z.object({
|
|
1023
|
-
start: zod_1.z.optional(zod_1.z.number().gte(0)),
|
|
1024
|
-
length: zod_1.z.optional(zod_1.z.number().gte(0)),
|
|
1024
|
+
start: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0))),
|
|
1025
|
+
length: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0))),
|
|
1025
1026
|
});
|
|
1026
1027
|
exports.rangeSchema = exports.rangeRangeSchema;
|
|
1027
1028
|
/**
|
|
@@ -1152,8 +1153,8 @@ exports.richtextpropertiesRichTextAnimationSchema = zod_1.z.object({
|
|
|
1152
1153
|
"shift",
|
|
1153
1154
|
"movingLetters",
|
|
1154
1155
|
]),
|
|
1155
|
-
speed: zod_1.z.optional(zod_1.z.number().gte(0.1).lte(10)).default(1),
|
|
1156
|
-
duration: zod_1.z.optional(zod_1.z.number().gte(0.1).lte(30)),
|
|
1156
|
+
speed: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0.1).lte(10))).default(1),
|
|
1157
|
+
duration: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0.1).lte(30))),
|
|
1157
1158
|
style: zod_1.z.optional(zod_1.z.enum(["character", "word"])),
|
|
1158
1159
|
direction: zod_1.z.optional(zod_1.z.enum(["left", "right", "up", "down"])),
|
|
1159
1160
|
});
|
|
@@ -1163,28 +1164,28 @@ exports.richTextAnimationSchema = exports.richtextpropertiesRichTextAnimationSch
|
|
|
1163
1164
|
*/
|
|
1164
1165
|
exports.richtextpropertiesRichTextBackgroundSchema = zod_1.z.object({
|
|
1165
1166
|
color: zod_1.z.optional(zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/)),
|
|
1166
|
-
opacity: zod_1.z.optional(zod_1.z.number().gte(0).lte(1)).default(1),
|
|
1167
|
-
borderRadius: zod_1.z.optional(zod_1.z.number().gte(0)).default(0),
|
|
1167
|
+
opacity: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(1))).default(1),
|
|
1168
|
+
borderRadius: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0))).default(0),
|
|
1168
1169
|
});
|
|
1169
1170
|
exports.richTextBackgroundSchema = exports.richtextpropertiesRichTextBackgroundSchema;
|
|
1170
1171
|
/**
|
|
1171
1172
|
* Border styling properties for the text bounding box.
|
|
1172
1173
|
*/
|
|
1173
1174
|
exports.richtextpropertiesRichTextBorderSchema = zod_1.z.object({
|
|
1174
|
-
width: zod_1.z.optional(zod_1.z.number().gte(0)).default(0),
|
|
1175
|
+
width: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0))).default(0),
|
|
1175
1176
|
color: zod_1.z.optional(zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#000000"),
|
|
1176
|
-
opacity: zod_1.z.optional(zod_1.z.number().gte(0).lte(1)).default(1),
|
|
1177
|
-
radius: zod_1.z.optional(zod_1.z.number().gte(0)).default(0),
|
|
1177
|
+
opacity: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(1))).default(1),
|
|
1178
|
+
radius: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0))).default(0),
|
|
1178
1179
|
});
|
|
1179
1180
|
/**
|
|
1180
1181
|
* Gradient properties for text fill.
|
|
1181
1182
|
*/
|
|
1182
1183
|
exports.richtextpropertiesRichTextGradientSchema = zod_1.z.object({
|
|
1183
1184
|
type: zod_1.z.optional(zod_1.z.enum(["linear", "radial"])),
|
|
1184
|
-
angle: zod_1.z.optional(zod_1.z.number().gte(0).lte(360)).default(0),
|
|
1185
|
+
angle: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(360))).default(0),
|
|
1185
1186
|
stops: zod_1.z
|
|
1186
1187
|
.array(zod_1.z.object({
|
|
1187
|
-
offset: zod_1.z.number().gte(0).lte(1),
|
|
1188
|
+
offset: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(1)),
|
|
1188
1189
|
color: zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/),
|
|
1189
1190
|
}))
|
|
1190
1191
|
.min(2),
|
|
@@ -1194,29 +1195,29 @@ exports.richTextGradientSchema = exports.richtextpropertiesRichTextGradientSchem
|
|
|
1194
1195
|
* Padding properties for individual sides of the text bounding box.
|
|
1195
1196
|
*/
|
|
1196
1197
|
exports.richtextpropertiesRichTextPaddingSchema = zod_1.z.object({
|
|
1197
|
-
top: zod_1.z.optional(zod_1.z.number().gte(0)).default(0),
|
|
1198
|
-
right: zod_1.z.optional(zod_1.z.number().gte(0)).default(0),
|
|
1199
|
-
bottom: zod_1.z.optional(zod_1.z.number().gte(0)).default(0),
|
|
1200
|
-
left: zod_1.z.optional(zod_1.z.number().gte(0)).default(0),
|
|
1198
|
+
top: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0))).default(0),
|
|
1199
|
+
right: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0))).default(0),
|
|
1200
|
+
bottom: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0))).default(0),
|
|
1201
|
+
left: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0))).default(0),
|
|
1201
1202
|
});
|
|
1202
1203
|
/**
|
|
1203
1204
|
* Text shadow properties.
|
|
1204
1205
|
*/
|
|
1205
1206
|
exports.richtextpropertiesRichTextShadowSchema = zod_1.z.object({
|
|
1206
|
-
offsetX: zod_1.z.optional(zod_1.z.number()).default(0),
|
|
1207
|
-
offsetY: zod_1.z.optional(zod_1.z.number()).default(0),
|
|
1208
|
-
blur: zod_1.z.optional(zod_1.z.number().gte(0)).default(0),
|
|
1207
|
+
offsetX: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())).default(0),
|
|
1208
|
+
offsetY: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())).default(0),
|
|
1209
|
+
blur: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0))).default(0),
|
|
1209
1210
|
color: zod_1.z.optional(zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#000000"),
|
|
1210
|
-
opacity: zod_1.z.optional(zod_1.z.number().gte(0).lte(1)).default(0.5),
|
|
1211
|
+
opacity: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(1))).default(0.5),
|
|
1211
1212
|
});
|
|
1212
1213
|
exports.richTextShadowSchema = exports.richtextpropertiesRichTextShadowSchema;
|
|
1213
1214
|
/**
|
|
1214
1215
|
* Text stroke (outline) properties.
|
|
1215
1216
|
*/
|
|
1216
1217
|
exports.richtextpropertiesRichTextStrokeSchema = zod_1.z.object({
|
|
1217
|
-
width: zod_1.z.optional(zod_1.z.number().gte(0)).default(0),
|
|
1218
|
+
width: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0))).default(0),
|
|
1218
1219
|
color: zod_1.z.optional(zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#000000"),
|
|
1219
|
-
opacity: zod_1.z.optional(zod_1.z.number().gte(0).lte(1)).default(1),
|
|
1220
|
+
opacity: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(1))).default(1),
|
|
1220
1221
|
});
|
|
1221
1222
|
exports.richTextStrokeSchema = exports.richtextpropertiesRichTextStrokeSchema;
|
|
1222
1223
|
/**
|
|
@@ -1224,10 +1225,10 @@ exports.richTextStrokeSchema = exports.richtextpropertiesRichTextStrokeSchema;
|
|
|
1224
1225
|
*/
|
|
1225
1226
|
exports.richtextpropertiesRichTextFontSchema = zod_1.z.object({
|
|
1226
1227
|
family: zod_1.z.optional(zod_1.z.string()).default("Open Sans"),
|
|
1227
|
-
size: zod_1.z.optional(zod_1.z.int().gte(1).lte(500)).default(24),
|
|
1228
|
+
size: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int().gte(1).lte(500))).default(24),
|
|
1228
1229
|
weight: zod_1.z.optional(zod_1.z.unknown()).default("400"),
|
|
1229
1230
|
color: zod_1.z.optional(zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#ffffff"),
|
|
1230
|
-
opacity: zod_1.z.optional(zod_1.z.number().gte(0).lte(1)).default(1),
|
|
1231
|
+
opacity: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(1))).default(1),
|
|
1231
1232
|
background: zod_1.z.optional(zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/)),
|
|
1232
1233
|
stroke: zod_1.z.optional(exports.richtextpropertiesRichTextStrokeSchema),
|
|
1233
1234
|
});
|
|
@@ -1236,8 +1237,8 @@ exports.richTextFontSchema = exports.richtextpropertiesRichTextFontSchema;
|
|
|
1236
1237
|
* Text style properties including spacing, line height, and transformations.
|
|
1237
1238
|
*/
|
|
1238
1239
|
exports.richtextpropertiesRichTextStyleSchema = zod_1.z.object({
|
|
1239
|
-
letterSpacing: zod_1.z.optional(zod_1.z.number()).default(0),
|
|
1240
|
-
lineHeight: zod_1.z.optional(zod_1.z.number().gte(0).lte(10)).default(1.2),
|
|
1240
|
+
letterSpacing: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())).default(0),
|
|
1241
|
+
lineHeight: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(10))).default(1.2),
|
|
1241
1242
|
textTransform: zod_1.z.optional(zod_1.z.enum(["none", "uppercase", "lowercase", "capitalize"])),
|
|
1242
1243
|
textDecoration: zod_1.z.optional(zod_1.z.enum(["none", "underline", "line-through"])),
|
|
1243
1244
|
gradient: zod_1.z.optional(exports.richtextpropertiesRichTextGradientSchema),
|
|
@@ -1256,7 +1257,7 @@ exports.richtextassetRichTextAssetSchema = zod_1.z.object({
|
|
|
1256
1257
|
shadow: zod_1.z.optional(exports.richtextpropertiesRichTextShadowSchema),
|
|
1257
1258
|
background: zod_1.z.optional(exports.richtextpropertiesRichTextBackgroundSchema),
|
|
1258
1259
|
border: zod_1.z.optional(exports.richtextpropertiesRichTextBorderSchema),
|
|
1259
|
-
padding: zod_1.z.optional(zod_1.z.union([zod_1.z.number().gte(0), exports.richtextpropertiesRichTextPaddingSchema])),
|
|
1260
|
+
padding: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0)), exports.richtextpropertiesRichTextPaddingSchema])),
|
|
1260
1261
|
align: zod_1.z.optional(exports.richtextpropertiesRichTextAlignmentSchema),
|
|
1261
1262
|
animation: zod_1.z.optional(exports.richtextpropertiesRichTextAnimationSchema),
|
|
1262
1263
|
});
|
|
@@ -1303,27 +1304,27 @@ exports.transferSchema = exports.transferTransferSchema;
|
|
|
1303
1304
|
exports.shapeassetShapeAssetSchema = zod_1.z.object({
|
|
1304
1305
|
type: zod_1.z.enum(["shape"]),
|
|
1305
1306
|
shape: zod_1.z.enum(["rectangle", "circle", "line"]),
|
|
1306
|
-
width: zod_1.z.optional(zod_1.z.int()),
|
|
1307
|
-
height: zod_1.z.optional(zod_1.z.int()),
|
|
1307
|
+
width: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int())),
|
|
1308
|
+
height: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int())),
|
|
1308
1309
|
fill: zod_1.z.optional(zod_1.z.object({
|
|
1309
1310
|
color: zod_1.z.optional(zod_1.z.string()),
|
|
1310
|
-
opacity: zod_1.z.optional(zod_1.z.number()),
|
|
1311
|
+
opacity: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())),
|
|
1311
1312
|
})),
|
|
1312
1313
|
stroke: zod_1.z.optional(zod_1.z.object({
|
|
1313
1314
|
color: zod_1.z.optional(zod_1.z.string()),
|
|
1314
|
-
width: zod_1.z.optional(zod_1.z.number()),
|
|
1315
|
+
width: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())),
|
|
1315
1316
|
})),
|
|
1316
1317
|
rectangle: zod_1.z.optional(zod_1.z.object({
|
|
1317
|
-
width: zod_1.z.int(),
|
|
1318
|
-
height: zod_1.z.int(),
|
|
1319
|
-
cornerRadius: zod_1.z.optional(zod_1.z.int()),
|
|
1318
|
+
width: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int()),
|
|
1319
|
+
height: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int()),
|
|
1320
|
+
cornerRadius: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int())),
|
|
1320
1321
|
})),
|
|
1321
1322
|
circle: zod_1.z.optional(zod_1.z.object({
|
|
1322
|
-
radius: zod_1.z.int(),
|
|
1323
|
+
radius: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int()),
|
|
1323
1324
|
})),
|
|
1324
1325
|
line: zod_1.z.optional(zod_1.z.object({
|
|
1325
|
-
length: zod_1.z.int(),
|
|
1326
|
-
thickness: zod_1.z.int(),
|
|
1326
|
+
length: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int()),
|
|
1327
|
+
thickness: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int()),
|
|
1327
1328
|
})),
|
|
1328
1329
|
});
|
|
1329
1330
|
exports.shapeAssetSchema = exports.shapeassetShapeAssetSchema;
|
|
@@ -1331,8 +1332,8 @@ exports.shapeAssetSchema = exports.shapeassetShapeAssetSchema;
|
|
|
1331
1332
|
* Set a custom size for a video or image in pixels. When using a custom size omit the `resolution` and `aspectRatio`. Custom sizes must be divisible by 2 based on the encoder specifications.
|
|
1332
1333
|
*/
|
|
1333
1334
|
exports.sizeSizeSchema = zod_1.z.object({
|
|
1334
|
-
width: zod_1.z.optional(zod_1.z.int().gte(1).lte(4096)),
|
|
1335
|
-
height: zod_1.z.optional(zod_1.z.int().gte(1).lte(4096)),
|
|
1335
|
+
width: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int().gte(1).lte(4096))),
|
|
1336
|
+
height: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int().gte(1).lte(4096))),
|
|
1336
1337
|
});
|
|
1337
1338
|
exports.sizeSchema = exports.sizeSizeSchema;
|
|
1338
1339
|
/**
|
|
@@ -1359,7 +1360,7 @@ exports.renditionRenditionSchema = zod_1.z.object({
|
|
|
1359
1360
|
size: zod_1.z.optional(exports.sizeSizeSchema),
|
|
1360
1361
|
fit: zod_1.z.optional(zod_1.z.enum(["cover", "contain", "crop"])),
|
|
1361
1362
|
resolution: zod_1.z.optional(zod_1.z.enum(["preview", "mobile", "sd", "hd", "fhd"])),
|
|
1362
|
-
quality: zod_1.z.optional(zod_1.z.int().gte(1).lte(100)),
|
|
1363
|
+
quality: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int().gte(1).lte(100))),
|
|
1363
1364
|
fps: zod_1.z.optional(zod_1.z.union([
|
|
1364
1365
|
zod_1.z.literal(12),
|
|
1365
1366
|
zod_1.z.literal(15),
|
|
@@ -1374,7 +1375,7 @@ exports.renditionRenditionSchema = zod_1.z.object({
|
|
|
1374
1375
|
zod_1.z.literal(60),
|
|
1375
1376
|
])),
|
|
1376
1377
|
speed: zod_1.z.optional(exports.speedSpeedSchema),
|
|
1377
|
-
keyframeInterval: zod_1.z.optional(zod_1.z.int().gte(1).lte(300)),
|
|
1378
|
+
keyframeInterval: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int().gte(1).lte(300))),
|
|
1378
1379
|
fixOffset: zod_1.z.optional(zod_1.z.boolean()),
|
|
1379
1380
|
fixRotation: zod_1.z.optional(zod_1.z.boolean()),
|
|
1380
1381
|
enhance: zod_1.z.optional(exports.enhancementsEnhancementsSchema),
|
|
@@ -1403,12 +1404,12 @@ exports.renditionresponseattributesRenditionResponseAttributesSchema = zod_1.z.o
|
|
|
1403
1404
|
"overwritten",
|
|
1404
1405
|
])),
|
|
1405
1406
|
url: zod_1.z.optional(zod_1.z.string()),
|
|
1406
|
-
executionTime: zod_1.z.optional(zod_1.z.number()),
|
|
1407
|
+
executionTime: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())),
|
|
1407
1408
|
transformation: zod_1.z.optional(exports.renditionRenditionSchema),
|
|
1408
|
-
width: zod_1.z.optional(zod_1.z.int()),
|
|
1409
|
-
height: zod_1.z.optional(zod_1.z.int()),
|
|
1410
|
-
duration: zod_1.z.optional(zod_1.z.number()),
|
|
1411
|
-
fps: zod_1.z.optional(zod_1.z.number()),
|
|
1409
|
+
width: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int())),
|
|
1410
|
+
height: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int())),
|
|
1411
|
+
duration: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())),
|
|
1412
|
+
fps: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())),
|
|
1412
1413
|
});
|
|
1413
1414
|
exports.renditionResponseAttributesSchema = exports.renditionresponseattributesRenditionResponseAttributesSchema;
|
|
1414
1415
|
/**
|
|
@@ -1428,10 +1429,10 @@ exports.sourceresponseattributesSourceResponseAttributesSchema = zod_1.z.object(
|
|
|
1428
1429
|
source: zod_1.z.optional(zod_1.z.string()),
|
|
1429
1430
|
status: zod_1.z.optional(zod_1.z.enum(["queued", "importing", "ready", "failed", "deleted", "overwritten"])),
|
|
1430
1431
|
outputs: zod_1.z.optional(exports.outputsresponseOutputsResponseSchema),
|
|
1431
|
-
width: zod_1.z.optional(zod_1.z.int()),
|
|
1432
|
+
width: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int())),
|
|
1432
1433
|
height: zod_1.z.optional(zod_1.z.string()),
|
|
1433
|
-
duration: zod_1.z.optional(zod_1.z.number()),
|
|
1434
|
-
fps: zod_1.z.optional(zod_1.z.number()),
|
|
1434
|
+
duration: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())),
|
|
1435
|
+
fps: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())),
|
|
1435
1436
|
created: zod_1.z.optional(zod_1.z.string()),
|
|
1436
1437
|
updated: zod_1.z.optional(zod_1.z.string()),
|
|
1437
1438
|
});
|
|
@@ -1476,9 +1477,300 @@ exports.sourceSchema = exports.sourceSourceSchema;
|
|
|
1476
1477
|
exports.soundtrackSoundtrackSchema = zod_1.z.object({
|
|
1477
1478
|
src: zod_1.z.string(),
|
|
1478
1479
|
effect: zod_1.z.optional(zod_1.z.enum(["fadeIn", "fadeOut", "fadeInFadeOut"])),
|
|
1479
|
-
volume: zod_1.z.optional(zod_1.z.number()),
|
|
1480
|
+
volume: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())),
|
|
1480
1481
|
});
|
|
1481
1482
|
exports.soundtrackSchema = exports.soundtrackSoundtrackSchema;
|
|
1483
|
+
/**
|
|
1484
|
+
* A color stop in a gradient. Each stop defines a color at a specific position
|
|
1485
|
+
* along the gradient vector. Gradients require at least 2 stops.
|
|
1486
|
+
*
|
|
1487
|
+
*/
|
|
1488
|
+
exports.svgpropertiesSvgGradientStopSchema = zod_1.z.object({
|
|
1489
|
+
offset: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(1)),
|
|
1490
|
+
color: zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/),
|
|
1491
|
+
});
|
|
1492
|
+
exports.svgGradientStopSchema = exports.svgpropertiesSvgGradientStopSchema;
|
|
1493
|
+
/**
|
|
1494
|
+
* A linear gradient fill that transitions colors along a straight line.
|
|
1495
|
+
* The gradient direction is controlled by the `angle` property.
|
|
1496
|
+
*
|
|
1497
|
+
*/
|
|
1498
|
+
exports.svgpropertiesSvgLinearGradientFillSchema = zod_1.z.object({
|
|
1499
|
+
type: zod_1.z.enum(["linear"]),
|
|
1500
|
+
angle: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(360))).default(0),
|
|
1501
|
+
stops: zod_1.z.array(exports.svgpropertiesSvgGradientStopSchema).min(2),
|
|
1502
|
+
opacity: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(1))).default(1),
|
|
1503
|
+
});
|
|
1504
|
+
exports.svgLinearGradientFillSchema = exports.svgpropertiesSvgLinearGradientFillSchema;
|
|
1505
|
+
/**
|
|
1506
|
+
* A radial gradient fill that transitions colors radiating outward from a center point.
|
|
1507
|
+
* The gradient creates a circular or elliptical color transition.
|
|
1508
|
+
*
|
|
1509
|
+
*/
|
|
1510
|
+
exports.svgpropertiesSvgRadialGradientFillSchema = zod_1.z.object({
|
|
1511
|
+
type: zod_1.z.enum(["radial"]),
|
|
1512
|
+
stops: zod_1.z.array(exports.svgpropertiesSvgGradientStopSchema).min(2),
|
|
1513
|
+
opacity: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(1))).default(1),
|
|
1514
|
+
});
|
|
1515
|
+
exports.svgRadialGradientFillSchema = exports.svgpropertiesSvgRadialGradientFillSchema;
|
|
1516
|
+
/**
|
|
1517
|
+
* Drop shadow properties for SVG shapes. Creates a shadow effect behind the shape.
|
|
1518
|
+
*
|
|
1519
|
+
*/
|
|
1520
|
+
exports.svgpropertiesSvgShadowSchema = zod_1.z.object({
|
|
1521
|
+
offsetX: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())).default(0),
|
|
1522
|
+
offsetY: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())).default(0),
|
|
1523
|
+
blur: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0))).default(0),
|
|
1524
|
+
color: zod_1.z.optional(zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#000000"),
|
|
1525
|
+
opacity: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(1))).default(0.5),
|
|
1526
|
+
});
|
|
1527
|
+
exports.svgShadowSchema = exports.svgpropertiesSvgShadowSchema;
|
|
1528
|
+
/**
|
|
1529
|
+
* A solid color fill for SVG shapes.
|
|
1530
|
+
*/
|
|
1531
|
+
exports.svgpropertiesSvgSolidFillSchema = zod_1.z.object({
|
|
1532
|
+
type: zod_1.z.enum(["solid"]),
|
|
1533
|
+
color: zod_1.z
|
|
1534
|
+
.string()
|
|
1535
|
+
.regex(/^#[A-Fa-f0-9]{6}$/)
|
|
1536
|
+
.default("#000000"),
|
|
1537
|
+
opacity: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(1))).default(1),
|
|
1538
|
+
});
|
|
1539
|
+
exports.svgSolidFillSchema = exports.svgpropertiesSvgSolidFillSchema;
|
|
1540
|
+
/**
|
|
1541
|
+
* Fill properties for SVG shapes. Supports solid colors and gradients.
|
|
1542
|
+
* The fill defines how the interior of a shape is painted.
|
|
1543
|
+
*
|
|
1544
|
+
*/
|
|
1545
|
+
exports.svgpropertiesSvgFillSchema = zod_1.z.discriminatedUnion("type", [
|
|
1546
|
+
exports.svgpropertiesSvgSolidFillSchema,
|
|
1547
|
+
exports.svgpropertiesSvgLinearGradientFillSchema,
|
|
1548
|
+
exports.svgpropertiesSvgRadialGradientFillSchema,
|
|
1549
|
+
]);
|
|
1550
|
+
exports.svgFillSchema = exports.svgpropertiesSvgFillSchema;
|
|
1551
|
+
/**
|
|
1552
|
+
* Stroke (outline) properties for SVG shapes. The stroke defines how the outline
|
|
1553
|
+
* of a shape is painted, including its color, width, and line style.
|
|
1554
|
+
*
|
|
1555
|
+
*/
|
|
1556
|
+
exports.svgpropertiesSvgStrokeSchema = zod_1.z.object({
|
|
1557
|
+
color: zod_1.z.optional(zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#000000"),
|
|
1558
|
+
width: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(100))).default(1),
|
|
1559
|
+
opacity: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(1))).default(1),
|
|
1560
|
+
lineCap: zod_1.z.optional(zod_1.z.enum(["butt", "round", "square"])),
|
|
1561
|
+
lineJoin: zod_1.z.optional(zod_1.z.enum(["miter", "round", "bevel"])),
|
|
1562
|
+
dashArray: zod_1.z.optional(zod_1.z.array(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0)))),
|
|
1563
|
+
dashOffset: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())).default(0),
|
|
1564
|
+
});
|
|
1565
|
+
exports.svgStrokeSchema = exports.svgpropertiesSvgStrokeSchema;
|
|
1566
|
+
/**
|
|
1567
|
+
* Transformation properties for positioning, rotating, and scaling SVG shapes.
|
|
1568
|
+
*
|
|
1569
|
+
*/
|
|
1570
|
+
exports.svgpropertiesSvgTransformSchema = zod_1.z.object({
|
|
1571
|
+
x: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())).default(0),
|
|
1572
|
+
y: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())).default(0),
|
|
1573
|
+
rotation: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(-360).lte(360))).default(0),
|
|
1574
|
+
scale: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0.01).lte(100))).default(1),
|
|
1575
|
+
originX: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(1))).default(0.5),
|
|
1576
|
+
originY: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(1))).default(0.5),
|
|
1577
|
+
});
|
|
1578
|
+
exports.svgTransformSchema = exports.svgpropertiesSvgTransformSchema;
|
|
1579
|
+
/**
|
|
1580
|
+
* An arrow shape pointing to the right by default.
|
|
1581
|
+
* Use transform rotation to change direction.
|
|
1582
|
+
*
|
|
1583
|
+
*/
|
|
1584
|
+
exports.svgshapesSvgArrowShapeSchema = zod_1.z.object({
|
|
1585
|
+
type: zod_1.z.enum(["arrow"]),
|
|
1586
|
+
length: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(1).lte(4096)),
|
|
1587
|
+
headWidth: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(1).lte(1000)),
|
|
1588
|
+
headLength: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(1).lte(1000)),
|
|
1589
|
+
shaftWidth: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(1).lte(1000)),
|
|
1590
|
+
});
|
|
1591
|
+
exports.svgArrowShapeSchema = exports.svgshapesSvgArrowShapeSchema;
|
|
1592
|
+
/**
|
|
1593
|
+
* A perfect circle shape defined by its radius.
|
|
1594
|
+
* The circle is centered at the shape's position.
|
|
1595
|
+
*
|
|
1596
|
+
*/
|
|
1597
|
+
exports.svgshapesSvgCircleShapeSchema = zod_1.z.object({
|
|
1598
|
+
type: zod_1.z.enum(["circle"]),
|
|
1599
|
+
radius: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(1).lte(2048)),
|
|
1600
|
+
});
|
|
1601
|
+
exports.svgCircleShapeSchema = exports.svgshapesSvgCircleShapeSchema;
|
|
1602
|
+
/**
|
|
1603
|
+
* A cross or plus shape with equal or different arm lengths.
|
|
1604
|
+
* Can be styled as a plus sign (+) or a cross (x with rotation).
|
|
1605
|
+
*
|
|
1606
|
+
*/
|
|
1607
|
+
exports.svgshapesSvgCrossShapeSchema = zod_1.z.object({
|
|
1608
|
+
type: zod_1.z.enum(["cross"]),
|
|
1609
|
+
width: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(1).lte(4096)),
|
|
1610
|
+
height: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(1).lte(4096)),
|
|
1611
|
+
thickness: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(1).lte(500)),
|
|
1612
|
+
});
|
|
1613
|
+
exports.svgCrossShapeSchema = exports.svgshapesSvgCrossShapeSchema;
|
|
1614
|
+
/**
|
|
1615
|
+
* An ellipse (oval) shape with separate horizontal and vertical radii.
|
|
1616
|
+
* The ellipse is centered at the shape's position.
|
|
1617
|
+
*
|
|
1618
|
+
*/
|
|
1619
|
+
exports.svgshapesSvgEllipseShapeSchema = zod_1.z.object({
|
|
1620
|
+
type: zod_1.z.enum(["ellipse"]),
|
|
1621
|
+
radiusX: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(1).lte(2048)),
|
|
1622
|
+
radiusY: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(1).lte(2048)),
|
|
1623
|
+
});
|
|
1624
|
+
exports.svgEllipseShapeSchema = exports.svgshapesSvgEllipseShapeSchema;
|
|
1625
|
+
/**
|
|
1626
|
+
* A heart shape commonly used for love/like icons.
|
|
1627
|
+
* The heart is defined by a single size parameter.
|
|
1628
|
+
*
|
|
1629
|
+
*/
|
|
1630
|
+
exports.svgshapesSvgHeartShapeSchema = zod_1.z.object({
|
|
1631
|
+
type: zod_1.z.enum(["heart"]),
|
|
1632
|
+
size: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(1).lte(4096)),
|
|
1633
|
+
});
|
|
1634
|
+
exports.svgHeartShapeSchema = exports.svgshapesSvgHeartShapeSchema;
|
|
1635
|
+
/**
|
|
1636
|
+
* A straight line shape with a specified length and thickness.
|
|
1637
|
+
* The line is drawn horizontally by default and can be rotated using transform.
|
|
1638
|
+
*
|
|
1639
|
+
*/
|
|
1640
|
+
exports.svgshapesSvgLineShapeSchema = zod_1.z.object({
|
|
1641
|
+
type: zod_1.z.enum(["line"]),
|
|
1642
|
+
length: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(1).lte(4096)),
|
|
1643
|
+
thickness: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(1).lte(500)),
|
|
1644
|
+
});
|
|
1645
|
+
exports.svgLineShapeSchema = exports.svgshapesSvgLineShapeSchema;
|
|
1646
|
+
/**
|
|
1647
|
+
* A custom shape defined by SVG path data.
|
|
1648
|
+
* Supports all standard SVG path commands for creating complex shapes.
|
|
1649
|
+
*
|
|
1650
|
+
* **Path Commands:**
|
|
1651
|
+
* - `M x y` / `m dx dy` - Move to (absolute/relative)
|
|
1652
|
+
* - `L x y` / `l dx dy` - Line to
|
|
1653
|
+
* - `H x` / `h dx` - Horizontal line to
|
|
1654
|
+
* - `V y` / `v dy` - Vertical line to
|
|
1655
|
+
* - `C x1 y1 x2 y2 x y` / `c` - Cubic Bezier curve
|
|
1656
|
+
* - `S x2 y2 x y` / `s` - Smooth cubic Bezier
|
|
1657
|
+
* - `Q x1 y1 x y` / `q` - Quadratic Bezier curve
|
|
1658
|
+
* - `T x y` / `t` - Smooth quadratic Bezier
|
|
1659
|
+
* - `A rx ry angle large-arc sweep x y` / `a` - Elliptical arc
|
|
1660
|
+
* - `Z` / `z` - Close path
|
|
1661
|
+
*
|
|
1662
|
+
*/
|
|
1663
|
+
exports.svgshapesSvgPathShapeSchema = zod_1.z.object({
|
|
1664
|
+
type: zod_1.z.enum(["path"]),
|
|
1665
|
+
d: zod_1.z.string().min(1).max(100000),
|
|
1666
|
+
});
|
|
1667
|
+
exports.svgPathShapeSchema = exports.svgshapesSvgPathShapeSchema;
|
|
1668
|
+
/**
|
|
1669
|
+
* A regular polygon shape with a specified number of sides.
|
|
1670
|
+
* Examples: triangle (3), square (4), pentagon (5), hexagon (6), etc.
|
|
1671
|
+
* The polygon is inscribed in a circle of the given radius.
|
|
1672
|
+
*
|
|
1673
|
+
*/
|
|
1674
|
+
exports.svgshapesSvgPolygonShapeSchema = zod_1.z.object({
|
|
1675
|
+
type: zod_1.z.enum(["polygon"]),
|
|
1676
|
+
sides: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int().gte(3).lte(100)),
|
|
1677
|
+
radius: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(1).lte(2048)),
|
|
1678
|
+
});
|
|
1679
|
+
exports.svgPolygonShapeSchema = exports.svgshapesSvgPolygonShapeSchema;
|
|
1680
|
+
/**
|
|
1681
|
+
* A rectangle shape with optional rounded corners.
|
|
1682
|
+
* The rectangle is defined by its width and height dimensions.
|
|
1683
|
+
*
|
|
1684
|
+
*/
|
|
1685
|
+
exports.svgshapesSvgRectangleShapeSchema = zod_1.z.object({
|
|
1686
|
+
type: zod_1.z.enum(["rectangle"]),
|
|
1687
|
+
width: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(1).lte(4096)),
|
|
1688
|
+
height: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(1).lte(4096)),
|
|
1689
|
+
cornerRadius: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(2048))).default(0),
|
|
1690
|
+
});
|
|
1691
|
+
exports.svgRectangleShapeSchema = exports.svgshapesSvgRectangleShapeSchema;
|
|
1692
|
+
/**
|
|
1693
|
+
* A ring (donut/annulus) shape - a circle with a circular hole in the center.
|
|
1694
|
+
* The ring is defined by outer and inner radii.
|
|
1695
|
+
*
|
|
1696
|
+
*/
|
|
1697
|
+
exports.svgshapesSvgRingShapeSchema = zod_1.z.object({
|
|
1698
|
+
type: zod_1.z.enum(["ring"]),
|
|
1699
|
+
outerRadius: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(1).lte(2048)),
|
|
1700
|
+
innerRadius: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(2048)),
|
|
1701
|
+
});
|
|
1702
|
+
exports.svgRingShapeSchema = exports.svgshapesSvgRingShapeSchema;
|
|
1703
|
+
/**
|
|
1704
|
+
* A star shape with a specified number of points.
|
|
1705
|
+
* The star is defined by outer and inner radii, creating the characteristic
|
|
1706
|
+
* pointed appearance.
|
|
1707
|
+
*
|
|
1708
|
+
*/
|
|
1709
|
+
exports.svgshapesSvgStarShapeSchema = zod_1.z.object({
|
|
1710
|
+
type: zod_1.z.enum(["star"]),
|
|
1711
|
+
points: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int().gte(3).lte(100)),
|
|
1712
|
+
outerRadius: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(1).lte(2048)),
|
|
1713
|
+
innerRadius: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(1).lte(2048)),
|
|
1714
|
+
});
|
|
1715
|
+
exports.svgStarShapeSchema = exports.svgshapesSvgStarShapeSchema;
|
|
1716
|
+
/**
|
|
1717
|
+
* The shape definition for an SVG asset. Each shape type has its own specific
|
|
1718
|
+
* properties. The `type` field determines which shape is rendered.
|
|
1719
|
+
*
|
|
1720
|
+
*/
|
|
1721
|
+
exports.svgshapesSvgShapeSchema = zod_1.z.discriminatedUnion("type", [
|
|
1722
|
+
exports.svgshapesSvgRectangleShapeSchema,
|
|
1723
|
+
exports.svgshapesSvgCircleShapeSchema,
|
|
1724
|
+
exports.svgshapesSvgEllipseShapeSchema,
|
|
1725
|
+
exports.svgshapesSvgLineShapeSchema,
|
|
1726
|
+
exports.svgshapesSvgPolygonShapeSchema,
|
|
1727
|
+
exports.svgshapesSvgStarShapeSchema,
|
|
1728
|
+
exports.svgshapesSvgArrowShapeSchema,
|
|
1729
|
+
exports.svgshapesSvgHeartShapeSchema,
|
|
1730
|
+
exports.svgshapesSvgCrossShapeSchema,
|
|
1731
|
+
exports.svgshapesSvgRingShapeSchema,
|
|
1732
|
+
exports.svgshapesSvgPathShapeSchema,
|
|
1733
|
+
]);
|
|
1734
|
+
exports.svgShapeSchema = exports.svgshapesSvgShapeSchema;
|
|
1735
|
+
/**
|
|
1736
|
+
* The SvgAsset is used to add scalable vector graphics (SVG) shapes to a video.
|
|
1737
|
+
* It provides a comprehensive set of primitive shapes and custom paths with full
|
|
1738
|
+
* styling support including fills, strokes, gradients, and shadows.
|
|
1739
|
+
*
|
|
1740
|
+
* **Available Shapes:**
|
|
1741
|
+
* - `rectangle` - Rectangles with optional rounded corners
|
|
1742
|
+
* - `circle` - Perfect circles
|
|
1743
|
+
* - `ellipse` - Ellipses/ovals with separate x and y radii
|
|
1744
|
+
* - `line` - Straight lines with configurable thickness
|
|
1745
|
+
* - `polygon` - Regular polygons (triangle, pentagon, hexagon, etc.)
|
|
1746
|
+
* - `star` - Multi-pointed stars
|
|
1747
|
+
* - `arrow` - Directional arrows
|
|
1748
|
+
* - `heart` - Heart shapes
|
|
1749
|
+
* - `cross` - Plus/cross shapes
|
|
1750
|
+
* - `ring` - Donut/ring shapes
|
|
1751
|
+
* - `path` - Custom shapes using SVG path data
|
|
1752
|
+
*
|
|
1753
|
+
* **Styling Options:**
|
|
1754
|
+
* - Fill with solid colors or linear/radial gradients
|
|
1755
|
+
* - Stroke with configurable width, color, dash patterns, and line caps/joins
|
|
1756
|
+
* - Drop shadows with blur, offset, and opacity
|
|
1757
|
+
* - Transform properties for positioning, rotation, and scaling
|
|
1758
|
+
*
|
|
1759
|
+
* See [W3C SVG 2 Specification](https://www.w3.org/TR/SVG2/) for path data syntax.
|
|
1760
|
+
*
|
|
1761
|
+
*/
|
|
1762
|
+
exports.svgassetSvgAssetSchema = zod_1.z.object({
|
|
1763
|
+
type: zod_1.z.enum(["svg"]),
|
|
1764
|
+
shape: exports.svgshapesSvgShapeSchema,
|
|
1765
|
+
fill: zod_1.z.optional(exports.svgpropertiesSvgFillSchema),
|
|
1766
|
+
stroke: zod_1.z.optional(exports.svgpropertiesSvgStrokeSchema),
|
|
1767
|
+
shadow: zod_1.z.optional(exports.svgpropertiesSvgShadowSchema),
|
|
1768
|
+
transform: zod_1.z.optional(exports.svgpropertiesSvgTransformSchema),
|
|
1769
|
+
opacity: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(1))).default(1),
|
|
1770
|
+
width: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int().gte(1).lte(4096))),
|
|
1771
|
+
height: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int().gte(1).lte(4096))),
|
|
1772
|
+
});
|
|
1773
|
+
exports.svgAssetSchema = exports.svgassetSvgAssetSchema;
|
|
1482
1774
|
/**
|
|
1483
1775
|
* Configure the id and optional merge fields to render a template by id.
|
|
1484
1776
|
*/
|
|
@@ -1500,16 +1792,16 @@ exports.textAlignmentSchema = exports.textpropertiesTextAlignmentSchema;
|
|
|
1500
1792
|
*/
|
|
1501
1793
|
exports.textpropertiesTextAnimationSchema = zod_1.z.object({
|
|
1502
1794
|
preset: zod_1.z.enum(["typewriter"]),
|
|
1503
|
-
duration: zod_1.z.optional(zod_1.z.number().gte(0.1).lte(30)),
|
|
1795
|
+
duration: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0.1).lte(30))),
|
|
1504
1796
|
});
|
|
1505
1797
|
/**
|
|
1506
1798
|
* Displays a background box behind the text.
|
|
1507
1799
|
*/
|
|
1508
1800
|
exports.textpropertiesTextBackgroundSchema = zod_1.z.object({
|
|
1509
1801
|
color: zod_1.z.optional(zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/)),
|
|
1510
|
-
opacity: zod_1.z.optional(zod_1.z.number().gte(0).lte(1)),
|
|
1511
|
-
padding: zod_1.z.optional(zod_1.z.number().gte(0).lte(100)),
|
|
1512
|
-
borderRadius: zod_1.z.optional(zod_1.z.number().gte(0)),
|
|
1802
|
+
opacity: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(1))),
|
|
1803
|
+
padding: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(100))),
|
|
1804
|
+
borderRadius: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0))),
|
|
1513
1805
|
});
|
|
1514
1806
|
exports.textBackgroundSchema = exports.textpropertiesTextBackgroundSchema;
|
|
1515
1807
|
/**
|
|
@@ -1518,17 +1810,17 @@ exports.textBackgroundSchema = exports.textpropertiesTextBackgroundSchema;
|
|
|
1518
1810
|
exports.textpropertiesTextFontSchema = zod_1.z.object({
|
|
1519
1811
|
family: zod_1.z.optional(zod_1.z.string()),
|
|
1520
1812
|
color: zod_1.z.optional(zod_1.z.string()),
|
|
1521
|
-
opacity: zod_1.z.optional(zod_1.z.number()),
|
|
1522
|
-
size: zod_1.z.optional(zod_1.z.int()),
|
|
1523
|
-
weight: zod_1.z.optional(zod_1.z.int()),
|
|
1524
|
-
lineHeight: zod_1.z.optional(zod_1.z.number()),
|
|
1813
|
+
opacity: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())),
|
|
1814
|
+
size: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int())),
|
|
1815
|
+
weight: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int())),
|
|
1816
|
+
lineHeight: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())),
|
|
1525
1817
|
});
|
|
1526
1818
|
exports.textFontSchema = exports.textpropertiesTextFontSchema;
|
|
1527
1819
|
/**
|
|
1528
1820
|
* Text stroke (outline) properties.
|
|
1529
1821
|
*/
|
|
1530
1822
|
exports.textpropertiesTextStrokeSchema = zod_1.z.object({
|
|
1531
|
-
width: zod_1.z.optional(zod_1.z.number().gte(0).lte(10)),
|
|
1823
|
+
width: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(10))),
|
|
1532
1824
|
color: zod_1.z.optional(zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/)),
|
|
1533
1825
|
});
|
|
1534
1826
|
/**
|
|
@@ -1539,8 +1831,8 @@ exports.textpropertiesTextStrokeSchema = zod_1.z.object({
|
|
|
1539
1831
|
exports.textassetTextAssetSchema = zod_1.z.object({
|
|
1540
1832
|
type: zod_1.z.enum(["text"]),
|
|
1541
1833
|
text: zod_1.z.string(),
|
|
1542
|
-
width: zod_1.z.optional(zod_1.z.int()),
|
|
1543
|
-
height: zod_1.z.optional(zod_1.z.int()),
|
|
1834
|
+
width: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int())),
|
|
1835
|
+
height: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int())),
|
|
1544
1836
|
font: zod_1.z.optional(exports.textpropertiesTextFontSchema),
|
|
1545
1837
|
background: zod_1.z.optional(exports.textpropertiesTextBackgroundSchema),
|
|
1546
1838
|
alignment: zod_1.z.optional(exports.textpropertiesTextAlignmentSchema),
|
|
@@ -1555,8 +1847,8 @@ exports.textAssetSchema = exports.textassetTextAssetSchema;
|
|
|
1555
1847
|
exports.texttoimageassetTextToImageAssetSchema = zod_1.z.object({
|
|
1556
1848
|
type: zod_1.z.enum(["text-to-image"]),
|
|
1557
1849
|
prompt: zod_1.z.string(),
|
|
1558
|
-
width: zod_1.z.optional(zod_1.z.int()),
|
|
1559
|
-
height: zod_1.z.optional(zod_1.z.int()),
|
|
1850
|
+
width: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int())),
|
|
1851
|
+
height: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int())),
|
|
1560
1852
|
crop: zod_1.z.optional(exports.cropCropSchema),
|
|
1561
1853
|
});
|
|
1562
1854
|
exports.textToImageAssetSchema = exports.texttoimageassetTextToImageAssetSchema;
|
|
@@ -1564,8 +1856,8 @@ exports.textToImageAssetSchema = exports.texttoimageassetTextToImageAssetSchema;
|
|
|
1564
1856
|
* Generate a thumbnail image for the video or image at a specific point from the timeline.
|
|
1565
1857
|
*/
|
|
1566
1858
|
exports.thumbnailThumbnailSchema = zod_1.z.object({
|
|
1567
|
-
capture: zod_1.z.number(),
|
|
1568
|
-
scale: zod_1.z.number().gte(0).lte(1),
|
|
1859
|
+
capture: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number()),
|
|
1860
|
+
scale: zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(1)),
|
|
1569
1861
|
});
|
|
1570
1862
|
exports.thumbnailSchema = exports.thumbnailThumbnailSchema;
|
|
1571
1863
|
/**
|
|
@@ -1746,8 +2038,8 @@ exports.transitionSchema = exports.transitionTransitionSchema;
|
|
|
1746
2038
|
exports.tweenTweenSchema = zod_1.z.object({
|
|
1747
2039
|
from: zod_1.z.optional(zod_1.z.unknown()),
|
|
1748
2040
|
to: zod_1.z.optional(zod_1.z.unknown()),
|
|
1749
|
-
start: zod_1.z.optional(zod_1.z.number()),
|
|
1750
|
-
length: zod_1.z.optional(zod_1.z.number()),
|
|
2041
|
+
start: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())),
|
|
2042
|
+
length: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())),
|
|
1751
2043
|
interpolation: zod_1.z.optional(zod_1.z.enum(["linear", "bezier", "constant"])),
|
|
1752
2044
|
easing: zod_1.z.optional(zod_1.z.enum([
|
|
1753
2045
|
"ease",
|
|
@@ -1787,9 +2079,9 @@ exports.tweenSchema = exports.tweenTweenSchema;
|
|
|
1787
2079
|
exports.audioassetAudioAssetSchema = zod_1.z.object({
|
|
1788
2080
|
type: zod_1.z.enum(["audio"]),
|
|
1789
2081
|
src: zod_1.z.string(),
|
|
1790
|
-
trim: zod_1.z.optional(zod_1.z.preprocess((
|
|
1791
|
-
volume: zod_1.z.optional(zod_1.z.union([zod_1.z.number().gte(0).lte(1), zod_1.z.array(exports.tweenTweenSchema)])),
|
|
1792
|
-
speed: zod_1.z.optional(zod_1.z.preprocess((
|
|
2082
|
+
trim: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())),
|
|
2083
|
+
volume: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(1)), zod_1.z.array(exports.tweenTweenSchema)])),
|
|
2084
|
+
speed: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(10))),
|
|
1793
2085
|
effect: zod_1.z.optional(zod_1.z.enum(["none", "fadeIn", "fadeOut", "fadeInFadeOut"])),
|
|
1794
2086
|
});
|
|
1795
2087
|
exports.audioAssetSchema = exports.audioassetAudioAssetSchema;
|
|
@@ -1797,23 +2089,23 @@ exports.audioAssetSchema = exports.audioassetAudioAssetSchema;
|
|
|
1797
2089
|
* Offsets the position of an asset horizontally or vertically by a relative distance.
|
|
1798
2090
|
*/
|
|
1799
2091
|
exports.offsetOffsetSchema = zod_1.z.object({
|
|
1800
|
-
x: zod_1.z.optional(zod_1.z.union([zod_1.z.number().gte(-10).lte(10), zod_1.z.array(exports.tweenTweenSchema)])),
|
|
1801
|
-
y: zod_1.z.optional(zod_1.z.union([zod_1.z.number().gte(-10).lte(10), zod_1.z.array(exports.tweenTweenSchema)])),
|
|
2092
|
+
x: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(-10).lte(10)), zod_1.z.array(exports.tweenTweenSchema)])),
|
|
2093
|
+
y: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(-10).lte(10)), zod_1.z.array(exports.tweenTweenSchema)])),
|
|
1802
2094
|
});
|
|
1803
2095
|
exports.offsetSchema = exports.offsetOffsetSchema;
|
|
1804
2096
|
/**
|
|
1805
2097
|
* Rotate a clip by the specified angle in degrees. Rotation origin is set based on the clips `position`.
|
|
1806
2098
|
*/
|
|
1807
2099
|
exports.rotatetransformationRotateTransformationSchema = zod_1.z.object({
|
|
1808
|
-
angle: zod_1.z.optional(zod_1.z.union([zod_1.z.int().gte(-360).lte(360), zod_1.z.array(exports.tweenTweenSchema)])),
|
|
2100
|
+
angle: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int().gte(-360).lte(360)), zod_1.z.array(exports.tweenTweenSchema)])),
|
|
1809
2101
|
});
|
|
1810
2102
|
exports.rotateTransformationSchema = exports.rotatetransformationRotateTransformationSchema;
|
|
1811
2103
|
/**
|
|
1812
2104
|
* Skew a clip so its edges are sheared at an angle. Use values between -100 and 100. Values over 3 or under -3 will skew the clip almost flat.
|
|
1813
2105
|
*/
|
|
1814
2106
|
exports.skewtransformationSkewTransformationSchema = zod_1.z.object({
|
|
1815
|
-
x: zod_1.z.optional(zod_1.z.union([zod_1.z.number().gte(-100).lte(100), zod_1.z.array(exports.tweenTweenSchema)])),
|
|
1816
|
-
y: zod_1.z.optional(zod_1.z.union([zod_1.z.number().gte(-100).lte(100), zod_1.z.array(exports.tweenTweenSchema)])),
|
|
2107
|
+
x: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(-100).lte(100)), zod_1.z.array(exports.tweenTweenSchema)])),
|
|
2108
|
+
y: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(-100).lte(100)), zod_1.z.array(exports.tweenTweenSchema)])),
|
|
1817
2109
|
});
|
|
1818
2110
|
exports.skewTransformationSchema = exports.skewtransformationSkewTransformationSchema;
|
|
1819
2111
|
/**
|
|
@@ -1880,10 +2172,10 @@ exports.videoassetVideoAssetSchema = zod_1.z.object({
|
|
|
1880
2172
|
type: zod_1.z.enum(["video"]),
|
|
1881
2173
|
src: zod_1.z.string(),
|
|
1882
2174
|
transcode: zod_1.z.optional(zod_1.z.boolean()),
|
|
1883
|
-
trim: zod_1.z.optional(zod_1.z.preprocess((
|
|
1884
|
-
volume: zod_1.z.optional(zod_1.z.union([zod_1.z.number().gte(0).lte(1), zod_1.z.array(exports.tweenTweenSchema)])),
|
|
2175
|
+
trim: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())),
|
|
2176
|
+
volume: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(1)), zod_1.z.array(exports.tweenTweenSchema)])),
|
|
1885
2177
|
volumeEffect: zod_1.z.optional(zod_1.z.enum(["none", "fadeIn", "fadeOut", "fadeInFadeOut"])),
|
|
1886
|
-
speed: zod_1.z.optional(zod_1.z.preprocess((
|
|
2178
|
+
speed: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().gte(0).lte(10))),
|
|
1887
2179
|
crop: zod_1.z.optional(exports.cropCropSchema),
|
|
1888
2180
|
chromaKey: zod_1.z.optional(exports.chromakeyChromaKeySchema),
|
|
1889
2181
|
});
|
|
@@ -1902,6 +2194,7 @@ exports.assetAssetSchema = zod_1.z.discriminatedUnion("type", [
|
|
|
1902
2194
|
exports.htmlassetHtmlAssetSchema,
|
|
1903
2195
|
exports.titleassetTitleAssetSchema,
|
|
1904
2196
|
exports.shapeassetShapeAssetSchema,
|
|
2197
|
+
exports.svgassetSvgAssetSchema,
|
|
1905
2198
|
exports.texttoimageassetTextToImageAssetSchema,
|
|
1906
2199
|
exports.imagetovideoassetImageToVideoAssetSchema,
|
|
1907
2200
|
]);
|
|
@@ -1911,12 +2204,12 @@ exports.assetSchema = exports.assetAssetSchema;
|
|
|
1911
2204
|
*/
|
|
1912
2205
|
exports.clipClipSchema = zod_1.z.object({
|
|
1913
2206
|
asset: exports.assetAssetSchema,
|
|
1914
|
-
start: zod_1.z.union([zod_1.z.preprocess((
|
|
1915
|
-
length: zod_1.z.union([zod_1.z.preprocess((
|
|
2207
|
+
start: zod_1.z.union([zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number()), zod_1.z.enum(["auto"])]),
|
|
2208
|
+
length: zod_1.z.union([zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number()), zod_1.z.literal("auto"), zod_1.z.literal("end")]),
|
|
1916
2209
|
fit: zod_1.z.optional(zod_1.z.enum(["cover", "contain", "crop", "none"])),
|
|
1917
|
-
scale: zod_1.z.optional(zod_1.z.preprocess((
|
|
1918
|
-
width: zod_1.z.optional(zod_1.z.int().gte(1).lte(3840)),
|
|
1919
|
-
height: zod_1.z.optional(zod_1.z.int().gte(1).lte(2160)),
|
|
2210
|
+
scale: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())),
|
|
2211
|
+
width: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int().gte(1).lte(3840))),
|
|
2212
|
+
height: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number().int().gte(1).lte(2160))),
|
|
1920
2213
|
position: zod_1.z.optional(zod_1.z.enum([
|
|
1921
2214
|
"top",
|
|
1922
2215
|
"topRight",
|
|
@@ -1961,7 +2254,7 @@ exports.clipClipSchema = zod_1.z.object({
|
|
|
1961
2254
|
"muted",
|
|
1962
2255
|
"negative",
|
|
1963
2256
|
])),
|
|
1964
|
-
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.number(), zod_1.z.array(exports.tweenTweenSchema)])),
|
|
2257
|
+
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number()), zod_1.z.array(exports.tweenTweenSchema)])),
|
|
1965
2258
|
transform: zod_1.z.optional(exports.transformationTransformationSchema),
|
|
1966
2259
|
alias: zod_1.z.optional(zod_1.z.string().regex(/^[A-Za-z0-9_-]+$/)),
|
|
1967
2260
|
});
|
|
@@ -2012,8 +2305,8 @@ exports.renderresponsedataRenderResponseDataSchema = zod_1.z.object({
|
|
|
2012
2305
|
"failed",
|
|
2013
2306
|
]),
|
|
2014
2307
|
error: zod_1.z.optional(zod_1.z.string()),
|
|
2015
|
-
duration: zod_1.z.optional(zod_1.z.number()),
|
|
2016
|
-
renderTime: zod_1.z.optional(zod_1.z.number()),
|
|
2308
|
+
duration: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())),
|
|
2309
|
+
renderTime: zod_1.z.optional(zod_1.z.preprocess(((v) => v === '' || Array.isArray(v) ? NaN : v), zod_1.z.coerce.number())),
|
|
2017
2310
|
url: zod_1.z.optional(zod_1.z.string()),
|
|
2018
2311
|
poster: zod_1.z.optional(zod_1.z.union([zod_1.z.string(), zod_1.z.null()])),
|
|
2019
2312
|
thumbnail: zod_1.z.optional(zod_1.z.union([zod_1.z.string(), zod_1.z.null()])),
|