@shotstack/schemas 1.5.2 → 1.5.3
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 +86 -23
- package/dist/schema.d.ts +48 -17
- package/dist/zod/zod.gen.cjs +1425 -859
- package/dist/zod/zod.gen.d.ts +11680 -10087
- package/dist/zod/zod.gen.js +1423 -857
- package/dist/zod/zod.gen.ts +448 -378
- package/package.json +2 -7
package/dist/zod/zod.gen.cjs
CHANGED
|
@@ -7,8 +7,8 @@ exports.mergeFieldSchema = exports.mergefieldMergeFieldSchema = exports.lumaAsse
|
|
|
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
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
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.
|
|
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;
|
|
10
|
+
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.textToSpeechAssetSchema = exports.texttospeechassetTextToSpeechAssetSchema = 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 = exports.getAssetResponse = exports.getAssetRequest = void 0;
|
|
12
12
|
const zod_1 = require("zod");
|
|
13
13
|
exports.editRootSchema = zod_1.z.unknown();
|
|
14
14
|
exports.sourceRootSchema = zod_1.z.unknown();
|
|
@@ -31,19 +31,28 @@ exports.uploadRootSchema = zod_1.z.unknown();
|
|
|
31
31
|
*/
|
|
32
32
|
exports.captionpropertiesCaptionBackgroundSchema = zod_1.z.object({
|
|
33
33
|
color: zod_1.z.optional(zod_1.z.string()),
|
|
34
|
-
opacity: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return v;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
34
|
+
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
35
|
+
return undefined; if (Array.isArray(v))
|
|
36
|
+
return v; if (typeof v === 'string') {
|
|
37
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
38
|
+
return v;
|
|
39
|
+
return Number(v);
|
|
40
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
41
|
+
padding: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
42
|
+
return undefined; if (Array.isArray(v))
|
|
43
|
+
return v; if (typeof v === 'string') {
|
|
44
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
45
|
+
return v;
|
|
46
|
+
return Number(v);
|
|
47
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
48
|
+
borderRadius: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
49
|
+
return undefined; if (Array.isArray(v))
|
|
50
|
+
return v; if (typeof v === 'string') {
|
|
51
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
52
|
+
return v;
|
|
53
|
+
return Number(v);
|
|
54
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
55
|
+
});
|
|
47
56
|
exports.captionBackgroundSchema = exports.captionpropertiesCaptionBackgroundSchema;
|
|
48
57
|
/**
|
|
49
58
|
* Font properties for captions text.
|
|
@@ -51,46 +60,63 @@ exports.captionBackgroundSchema = exports.captionpropertiesCaptionBackgroundSche
|
|
|
51
60
|
exports.captionpropertiesCaptionFontSchema = zod_1.z.object({
|
|
52
61
|
family: zod_1.z.optional(zod_1.z.string()),
|
|
53
62
|
color: zod_1.z.optional(zod_1.z.string()),
|
|
54
|
-
opacity: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return v;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
64
|
+
return undefined; if (Array.isArray(v))
|
|
65
|
+
return v; if (typeof v === 'string') {
|
|
66
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
67
|
+
return v;
|
|
68
|
+
return Number(v);
|
|
69
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
70
|
+
size: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
71
|
+
return undefined; if (Array.isArray(v))
|
|
72
|
+
return v; if (typeof v === 'string') {
|
|
73
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
74
|
+
return v;
|
|
75
|
+
return Number(v);
|
|
76
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
77
|
+
lineHeight: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
78
|
+
return undefined; if (Array.isArray(v))
|
|
79
|
+
return v; if (typeof v === 'string') {
|
|
80
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
81
|
+
return v;
|
|
82
|
+
return Number(v);
|
|
83
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
66
84
|
stroke: zod_1.z.optional(zod_1.z.string()),
|
|
67
|
-
strokeWidth: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
85
|
+
strokeWidth: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
86
|
+
return undefined; if (Array.isArray(v))
|
|
87
|
+
return v; if (typeof v === 'string') {
|
|
88
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
89
|
+
return v;
|
|
90
|
+
return Number(v);
|
|
91
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
92
|
+
});
|
|
72
93
|
exports.captionFontSchema = exports.captionpropertiesCaptionFontSchema;
|
|
73
94
|
/**
|
|
74
95
|
* The margin properties for captions. Margins are used to position the caption text and background on the screen.
|
|
75
96
|
*/
|
|
76
97
|
exports.captionpropertiesCaptionMarginSchema = zod_1.z.object({
|
|
77
|
-
top: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
return v;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
return
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
98
|
+
top: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
99
|
+
return undefined; if (Array.isArray(v))
|
|
100
|
+
return v; if (typeof v === 'string') {
|
|
101
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
102
|
+
return v;
|
|
103
|
+
return Number(v);
|
|
104
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
105
|
+
left: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
106
|
+
return undefined; if (Array.isArray(v))
|
|
107
|
+
return v; if (typeof v === 'string') {
|
|
108
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
109
|
+
return v;
|
|
110
|
+
return Number(v);
|
|
111
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
112
|
+
right: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
113
|
+
return undefined; if (Array.isArray(v))
|
|
114
|
+
return v; if (typeof v === 'string') {
|
|
115
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
116
|
+
return v;
|
|
117
|
+
return Number(v);
|
|
118
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
119
|
+
});
|
|
94
120
|
exports.captionMarginSchema = exports.captionpropertiesCaptionMarginSchema;
|
|
95
121
|
/**
|
|
96
122
|
* The CaptionAsset is used to add captions (subtitles) to a video. It uses a supplied SRT or VTT file which will
|
|
@@ -106,34 +132,46 @@ exports.captionMarginSchema = exports.captionpropertiesCaptionMarginSchema;
|
|
|
106
132
|
*/
|
|
107
133
|
exports.captionassetCaptionAssetSchema = zod_1.z.object({
|
|
108
134
|
type: zod_1.z.enum(["caption"]),
|
|
109
|
-
src: zod_1.z.string().
|
|
135
|
+
src: zod_1.z.string().min(1).regex(/\S/),
|
|
110
136
|
font: zod_1.z.optional(exports.captionpropertiesCaptionFontSchema),
|
|
111
137
|
background: zod_1.z.optional(exports.captionpropertiesCaptionBackgroundSchema),
|
|
112
138
|
margin: zod_1.z.optional(exports.captionpropertiesCaptionMarginSchema),
|
|
113
|
-
trim: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
return v;
|
|
120
|
-
|
|
121
|
-
|
|
139
|
+
trim: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
140
|
+
return undefined; if (Array.isArray(v))
|
|
141
|
+
return v; if (typeof v === 'string') {
|
|
142
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
143
|
+
return v;
|
|
144
|
+
return Number(v);
|
|
145
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
146
|
+
speed: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
147
|
+
return undefined; if (Array.isArray(v))
|
|
148
|
+
return v; if (typeof v === 'string') {
|
|
149
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
150
|
+
return v;
|
|
151
|
+
return Number(v);
|
|
152
|
+
} return v; }), zod_1.z.number().gte(0).lte(10)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
153
|
+
});
|
|
122
154
|
exports.captionAssetSchema = exports.captionassetCaptionAssetSchema;
|
|
123
155
|
/**
|
|
124
156
|
* Chroma key is a technique that replaces a specific color in a video with a different background image or video, enabling seamless integration of diverse environments. Commonly used for green screen and blue screen effects.
|
|
125
157
|
*/
|
|
126
158
|
exports.chromakeyChromaKeySchema = zod_1.z.object({
|
|
127
|
-
color: zod_1.z.string().regex(/^#[0-9a-fA-F]{6}$/),
|
|
128
|
-
threshold: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
return v;
|
|
135
|
-
|
|
136
|
-
|
|
159
|
+
color: zod_1.z.union([zod_1.z.string().regex(/^#[0-9a-fA-F]{6}$/), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
160
|
+
threshold: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
161
|
+
return undefined; if (Array.isArray(v))
|
|
162
|
+
return v; if (typeof v === 'string') {
|
|
163
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
164
|
+
return v;
|
|
165
|
+
return Number(v);
|
|
166
|
+
} return v; }), zod_1.z.number().int().gte(0).lte(250)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
167
|
+
halo: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
168
|
+
return undefined; if (Array.isArray(v))
|
|
169
|
+
return v; if (typeof v === 'string') {
|
|
170
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
171
|
+
return v;
|
|
172
|
+
return Number(v);
|
|
173
|
+
} return v; }), zod_1.z.number().int().gte(0).lte(250)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
174
|
+
});
|
|
137
175
|
exports.chromaKeySchema = exports.chromakeyChromaKeySchema;
|
|
138
176
|
/**
|
|
139
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.
|
|
@@ -143,7 +181,7 @@ exports.didTextToAvatarOptionsDidTextToAvatarOptionsSchema = zod_1.z.object({
|
|
|
143
181
|
text: zod_1.z.string(),
|
|
144
182
|
avatar: zod_1.z.enum(["jack", "lana", "lily", "matt", "rian"]),
|
|
145
183
|
background: zod_1.z.optional(zod_1.z.string()),
|
|
146
|
-
})
|
|
184
|
+
});
|
|
147
185
|
exports.didTextToAvatarOptionsSchema = exports.didTextToAvatarOptionsDidTextToAvatarOptionsSchema;
|
|
148
186
|
/**
|
|
149
187
|
* Generate assets using the third party D-ID provider AI services.
|
|
@@ -152,7 +190,11 @@ exports.didTextToAvatarOptionsSchema = exports.didTextToAvatarOptionsDidTextToAv
|
|
|
152
190
|
* <li><a href="#tocs_didtexttoavataroptions">DidTextToAvatarOptions</a></li>
|
|
153
191
|
* </ul>
|
|
154
192
|
*/
|
|
155
|
-
exports.didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema =
|
|
193
|
+
exports.didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema = zod_1.z
|
|
194
|
+
.object({
|
|
195
|
+
type: zod_1.z.literal("didTextToAvatarOptions_DIDTextToAvatarOptions"),
|
|
196
|
+
})
|
|
197
|
+
.and(exports.didTextToAvatarOptionsDidTextToAvatarOptionsSchema);
|
|
156
198
|
exports.didGeneratedAssetOptionsSchema = exports.didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema;
|
|
157
199
|
/**
|
|
158
200
|
* 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.
|
|
@@ -160,7 +202,7 @@ exports.didGeneratedAssetOptionsSchema = exports.didGeneratedAssetOptionsDidGene
|
|
|
160
202
|
exports.didGeneratedAssetDidGeneratedAssetSchema = zod_1.z.object({
|
|
161
203
|
provider: zod_1.z.enum(["d-id"]),
|
|
162
204
|
options: exports.didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema,
|
|
163
|
-
})
|
|
205
|
+
});
|
|
164
206
|
exports.didGeneratedAssetSchema = exports.didGeneratedAssetDidGeneratedAssetSchema;
|
|
165
207
|
/**
|
|
166
208
|
* 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.
|
|
@@ -179,7 +221,7 @@ exports.elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema = zod_1
|
|
|
179
221
|
"Rachel",
|
|
180
222
|
"Sam",
|
|
181
223
|
]),
|
|
182
|
-
})
|
|
224
|
+
});
|
|
183
225
|
exports.elevenLabsTextToSpeechOptionsSchema = exports.elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema;
|
|
184
226
|
/**
|
|
185
227
|
* Generate assets using the third party ElevenLabs provider AI services.
|
|
@@ -188,7 +230,11 @@ exports.elevenLabsTextToSpeechOptionsSchema = exports.elevenlabsTextToSpeechOpti
|
|
|
188
230
|
* <li><a href="#tocs_elevenlabstexttospeechoptions">ElevenLabsTextToSpeechOptions</a></li>
|
|
189
231
|
* </ul>
|
|
190
232
|
*/
|
|
191
|
-
exports.elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema =
|
|
233
|
+
exports.elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema = zod_1.z
|
|
234
|
+
.object({
|
|
235
|
+
type: zod_1.z.literal("elevenlabsTextToSpeechOptions_ElevenLabsTextToSpeechOptions"),
|
|
236
|
+
})
|
|
237
|
+
.and(exports.elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema);
|
|
192
238
|
exports.elevenLabsGeneratedAssetOptionsSchema = exports.elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema;
|
|
193
239
|
/**
|
|
194
240
|
* 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.
|
|
@@ -196,7 +242,7 @@ exports.elevenLabsGeneratedAssetOptionsSchema = exports.elevenlabsGeneratedAsset
|
|
|
196
242
|
exports.elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema = zod_1.z.object({
|
|
197
243
|
provider: zod_1.z.enum(["elevenlabs"]),
|
|
198
244
|
options: exports.elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema,
|
|
199
|
-
})
|
|
245
|
+
});
|
|
200
246
|
exports.elevenLabsGeneratedAssetSchema = exports.elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema;
|
|
201
247
|
/**
|
|
202
248
|
* 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.
|
|
@@ -321,7 +367,7 @@ exports.heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema = zod_1.z.objec
|
|
|
321
367
|
background: zod_1.z.optional(zod_1.z.string()),
|
|
322
368
|
ratio: zod_1.z.optional(zod_1.z.enum(["16:9", "9:16"])),
|
|
323
369
|
test: zod_1.z.optional(zod_1.z.boolean()),
|
|
324
|
-
})
|
|
370
|
+
});
|
|
325
371
|
exports.heyGenTextToAvatarOptionsSchema = exports.heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema;
|
|
326
372
|
/**
|
|
327
373
|
* Generate assets using the third party HeyGen provider AI services.
|
|
@@ -330,7 +376,11 @@ exports.heyGenTextToAvatarOptionsSchema = exports.heygenTextToAvatarOptionsHeyGe
|
|
|
330
376
|
* <li><a href="#tocs_heygentexttoavataroptions">HeyGenTextToAvatarOptions</a></li>
|
|
331
377
|
* </ul>
|
|
332
378
|
*/
|
|
333
|
-
exports.heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema =
|
|
379
|
+
exports.heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema = zod_1.z
|
|
380
|
+
.object({
|
|
381
|
+
type: zod_1.z.literal("heygenTextToAvatarOptions_HeyGenTextToAvatarOptions"),
|
|
382
|
+
})
|
|
383
|
+
.and(exports.heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema);
|
|
334
384
|
exports.heyGenGeneratedAssetOptionsSchema = exports.heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema;
|
|
335
385
|
/**
|
|
336
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.
|
|
@@ -338,7 +388,7 @@ exports.heyGenGeneratedAssetOptionsSchema = exports.heygenGeneratedAssetOptionsH
|
|
|
338
388
|
exports.heygenGeneratedAssetHeyGenGeneratedAssetSchema = zod_1.z.object({
|
|
339
389
|
provider: zod_1.z.enum(["heygen"]),
|
|
340
390
|
options: exports.heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema,
|
|
341
|
-
})
|
|
391
|
+
});
|
|
342
392
|
exports.heyGenGeneratedAssetSchema = exports.heygenGeneratedAssetHeyGenGeneratedAssetSchema;
|
|
343
393
|
/**
|
|
344
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.
|
|
@@ -348,7 +398,7 @@ exports.openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema = zod_1.z.obj
|
|
|
348
398
|
prompt: zod_1.z.string(),
|
|
349
399
|
model: zod_1.z.enum(["gpt-3.5-turbo", "gpt-4"]),
|
|
350
400
|
systemPrompt: zod_1.z.optional(zod_1.z.string()),
|
|
351
|
-
})
|
|
401
|
+
});
|
|
352
402
|
exports.openAiTextGeneratorOptionsSchema = exports.openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema;
|
|
353
403
|
/**
|
|
354
404
|
* Generate assets using OpenAI provider AI services.
|
|
@@ -357,7 +407,11 @@ exports.openAiTextGeneratorOptionsSchema = exports.openaiTextGeneratorOptionsOpe
|
|
|
357
407
|
* <li><a href="#tocs_openaitextgeneratoroptions">OpenAiTextGeneratorOptions</a></li>
|
|
358
408
|
* </ul>
|
|
359
409
|
*/
|
|
360
|
-
exports.openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema =
|
|
410
|
+
exports.openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema = zod_1.z
|
|
411
|
+
.object({
|
|
412
|
+
type: zod_1.z.literal("openaiTextGeneratorOptions_OpenAiTextGeneratorOptions"),
|
|
413
|
+
})
|
|
414
|
+
.and(exports.openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema);
|
|
361
415
|
exports.openAiGeneratedAssetOptionsSchema = exports.openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema;
|
|
362
416
|
/**
|
|
363
417
|
* 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.
|
|
@@ -365,7 +419,7 @@ exports.openAiGeneratedAssetOptionsSchema = exports.openaiGeneratedAssetOptionsO
|
|
|
365
419
|
exports.openaiGeneratedAssetOpenAiGeneratedAssetSchema = zod_1.z.object({
|
|
366
420
|
provider: zod_1.z.enum(["openai"]),
|
|
367
421
|
options: exports.openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema,
|
|
368
|
-
})
|
|
422
|
+
});
|
|
369
423
|
exports.openAiGeneratedAssetSchema = exports.openaiGeneratedAssetOpenAiGeneratedAssetSchema;
|
|
370
424
|
/**
|
|
371
425
|
* Individual errors returned by the Create API.
|
|
@@ -374,14 +428,14 @@ exports.generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema = z
|
|
|
374
428
|
status: zod_1.z.string(),
|
|
375
429
|
title: zod_1.z.string(),
|
|
376
430
|
detail: zod_1.z.string(),
|
|
377
|
-
})
|
|
431
|
+
});
|
|
378
432
|
exports.generatedAssetErrorResponseDataSchema = exports.generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema;
|
|
379
433
|
/**
|
|
380
434
|
* Error response data for validation and other errors returned by the Create API.
|
|
381
435
|
*/
|
|
382
436
|
exports.generatedAssetErrorResponseGeneratedAssetErrorResponseSchema = zod_1.z.object({
|
|
383
437
|
errors: zod_1.z.array(exports.generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema),
|
|
384
|
-
})
|
|
438
|
+
});
|
|
385
439
|
exports.generatedAssetErrorResponseSchema = exports.generatedAssetErrorResponseGeneratedAssetErrorResponseSchema;
|
|
386
440
|
/**
|
|
387
441
|
* The id and attributes of the generated asset.
|
|
@@ -394,7 +448,7 @@ exports.generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema =
|
|
|
394
448
|
status: zod_1.z.enum(["queued", "processing", "saving", "done", "failed"]),
|
|
395
449
|
created: zod_1.z.string(),
|
|
396
450
|
updated: zod_1.z.string(),
|
|
397
|
-
})
|
|
451
|
+
});
|
|
398
452
|
exports.generatedAssetResponseAttributesSchema = exports.generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema;
|
|
399
453
|
/**
|
|
400
454
|
* The type of resource (an asset), it's id and attributes of the generated file.
|
|
@@ -403,14 +457,14 @@ exports.generatedAssetResponseDataGeneratedAssetResponseDataSchema = zod_1.z.obj
|
|
|
403
457
|
type: zod_1.z.string(),
|
|
404
458
|
id: zod_1.z.string(),
|
|
405
459
|
attributes: exports.generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema,
|
|
406
|
-
})
|
|
460
|
+
});
|
|
407
461
|
exports.generatedAssetResponseDataSchema = exports.generatedAssetResponseDataGeneratedAssetResponseDataSchema;
|
|
408
462
|
/**
|
|
409
463
|
* 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.
|
|
410
464
|
*/
|
|
411
465
|
exports.generatedAssetResponseGeneratedAssetResponseSchema = zod_1.z.object({
|
|
412
466
|
data: exports.generatedAssetResponseDataGeneratedAssetResponseDataSchema,
|
|
413
|
-
})
|
|
467
|
+
});
|
|
414
468
|
exports.generatedAssetResponseSchema = exports.generatedAssetResponseGeneratedAssetResponseSchema;
|
|
415
469
|
/**
|
|
416
470
|
* 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.
|
|
@@ -418,15 +472,21 @@ exports.generatedAssetResponseSchema = exports.generatedAssetResponseGeneratedAs
|
|
|
418
472
|
exports.shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema = zod_1.z.object({
|
|
419
473
|
type: zod_1.z.enum(["image-to-video"]),
|
|
420
474
|
imageUrl: zod_1.z.string(),
|
|
421
|
-
guidanceScale: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
return v;
|
|
428
|
-
|
|
429
|
-
|
|
475
|
+
guidanceScale: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
476
|
+
return undefined; if (Array.isArray(v))
|
|
477
|
+
return v; if (typeof v === 'string') {
|
|
478
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
479
|
+
return v;
|
|
480
|
+
return Number(v);
|
|
481
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1.8),
|
|
482
|
+
motion: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
483
|
+
return undefined; if (Array.isArray(v))
|
|
484
|
+
return v; if (typeof v === 'string') {
|
|
485
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
486
|
+
return v;
|
|
487
|
+
return Number(v);
|
|
488
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(127),
|
|
489
|
+
});
|
|
430
490
|
exports.shotstackImageToVideoOptionsSchema = exports.shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema;
|
|
431
491
|
/**
|
|
432
492
|
* 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.
|
|
@@ -434,7 +494,7 @@ exports.shotstackImageToVideoOptionsSchema = exports.shotstackImageToVideoOption
|
|
|
434
494
|
exports.shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema = zod_1.z.object({
|
|
435
495
|
type: zod_1.z.enum(["text-generator"]),
|
|
436
496
|
prompt: zod_1.z.string(),
|
|
437
|
-
})
|
|
497
|
+
});
|
|
438
498
|
exports.shotstackTextGeneratorOptionsSchema = exports.shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema;
|
|
439
499
|
/**
|
|
440
500
|
* 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.
|
|
@@ -442,15 +502,21 @@ exports.shotstackTextGeneratorOptionsSchema = exports.shotstackTextGeneratorOpti
|
|
|
442
502
|
exports.shotstackTextToImageOptionsShotstackTextToImageOptionsSchema = zod_1.z.object({
|
|
443
503
|
type: zod_1.z.enum(["text-to-image"]),
|
|
444
504
|
prompt: zod_1.z.string(),
|
|
445
|
-
width: zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
return v;
|
|
452
|
-
|
|
453
|
-
|
|
505
|
+
width: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
506
|
+
return undefined; if (Array.isArray(v))
|
|
507
|
+
return v; if (typeof v === 'string') {
|
|
508
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
509
|
+
return v;
|
|
510
|
+
return Number(v);
|
|
511
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
512
|
+
height: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
513
|
+
return undefined; if (Array.isArray(v))
|
|
514
|
+
return v; if (typeof v === 'string') {
|
|
515
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
516
|
+
return v;
|
|
517
|
+
return Number(v);
|
|
518
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
519
|
+
});
|
|
454
520
|
exports.shotstackTextToImageOptionsSchema = exports.shotstackTextToImageOptionsShotstackTextToImageOptionsSchema;
|
|
455
521
|
/**
|
|
456
522
|
* 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.
|
|
@@ -549,16 +615,32 @@ exports.shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema = zod_1.z
|
|
|
549
615
|
"fi-FI",
|
|
550
616
|
])),
|
|
551
617
|
newscaster: zod_1.z.optional(zod_1.z.boolean()).default(false),
|
|
552
|
-
})
|
|
618
|
+
});
|
|
553
619
|
exports.shotstackTextToSpeechOptionsSchema = exports.shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema;
|
|
554
620
|
/**
|
|
555
621
|
* Generate assets using the native Shotstack provider AI services.
|
|
556
622
|
*/
|
|
557
623
|
exports.shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema = zod_1.z.union([
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
624
|
+
zod_1.z
|
|
625
|
+
.object({
|
|
626
|
+
type: zod_1.z.literal("shotstackTextToSpeechOptions_ShotstackTextToSpeechOptions"),
|
|
627
|
+
})
|
|
628
|
+
.and(exports.shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema),
|
|
629
|
+
zod_1.z
|
|
630
|
+
.object({
|
|
631
|
+
type: zod_1.z.literal("shotstackTextToImageOptions_ShotstackTextToImageOptions"),
|
|
632
|
+
})
|
|
633
|
+
.and(exports.shotstackTextToImageOptionsShotstackTextToImageOptionsSchema),
|
|
634
|
+
zod_1.z
|
|
635
|
+
.object({
|
|
636
|
+
type: zod_1.z.literal("shotstackTextGeneratorOptions_ShotstackTextGeneratorOptions"),
|
|
637
|
+
})
|
|
638
|
+
.and(exports.shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema),
|
|
639
|
+
zod_1.z
|
|
640
|
+
.object({
|
|
641
|
+
type: zod_1.z.literal("shotstackImageToVideoOptions_ShotstackImageToVideoOptions"),
|
|
642
|
+
})
|
|
643
|
+
.and(exports.shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema),
|
|
562
644
|
]);
|
|
563
645
|
exports.shotstackGeneratedAssetOptionsSchema = exports.shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema;
|
|
564
646
|
/**
|
|
@@ -567,7 +649,7 @@ exports.shotstackGeneratedAssetOptionsSchema = exports.shotstackGeneratedAssetOp
|
|
|
567
649
|
exports.shotstackGeneratedAssetShotstackGeneratedAssetSchema = zod_1.z.object({
|
|
568
650
|
provider: zod_1.z.enum(["shotstack"]),
|
|
569
651
|
options: exports.shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema,
|
|
570
|
-
})
|
|
652
|
+
});
|
|
571
653
|
exports.shotstackGeneratedAssetSchema = exports.shotstackGeneratedAssetShotstackGeneratedAssetSchema;
|
|
572
654
|
/**
|
|
573
655
|
* 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.
|
|
@@ -582,26 +664,41 @@ exports.stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema = zod_1
|
|
|
582
664
|
"stable-diffusion-512-v2-1",
|
|
583
665
|
"stable-diffusion-xl-beta-v2-2-2",
|
|
584
666
|
])),
|
|
585
|
-
width: zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
return v;
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
return
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
667
|
+
width: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
668
|
+
return undefined; if (Array.isArray(v))
|
|
669
|
+
return v; if (typeof v === 'string') {
|
|
670
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
671
|
+
return v;
|
|
672
|
+
return Number(v);
|
|
673
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
674
|
+
height: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
675
|
+
return undefined; if (Array.isArray(v))
|
|
676
|
+
return v; if (typeof v === 'string') {
|
|
677
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
678
|
+
return v;
|
|
679
|
+
return Number(v);
|
|
680
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
681
|
+
steps: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
682
|
+
return undefined; if (Array.isArray(v))
|
|
683
|
+
return v; if (typeof v === 'string') {
|
|
684
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
685
|
+
return v;
|
|
686
|
+
return Number(v);
|
|
687
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(30),
|
|
688
|
+
seed: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
689
|
+
return undefined; if (Array.isArray(v))
|
|
690
|
+
return v; if (typeof v === 'string') {
|
|
691
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
692
|
+
return v;
|
|
693
|
+
return Number(v);
|
|
694
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
695
|
+
cfgScale: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
696
|
+
return undefined; if (Array.isArray(v))
|
|
697
|
+
return v; if (typeof v === 'string') {
|
|
698
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
699
|
+
return v;
|
|
700
|
+
return Number(v);
|
|
701
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(7),
|
|
605
702
|
stylePreset: zod_1.z.optional(zod_1.z.enum([
|
|
606
703
|
"3d-model",
|
|
607
704
|
"analog-film",
|
|
@@ -621,7 +718,7 @@ exports.stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema = zod_1
|
|
|
621
718
|
"pixel-art",
|
|
622
719
|
"tile-texture",
|
|
623
720
|
])),
|
|
624
|
-
})
|
|
721
|
+
});
|
|
625
722
|
exports.stabilityAiTextToImageOptionsSchema = exports.stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema;
|
|
626
723
|
/**
|
|
627
724
|
* Generate assets using Stability AI provider AI services.
|
|
@@ -630,7 +727,11 @@ exports.stabilityAiTextToImageOptionsSchema = exports.stabilityAiTextToImageOpti
|
|
|
630
727
|
* <li><a href="#tocs_stabilityaitexttoimageoptions">StabilityAiTextToImageOptions</a></li>
|
|
631
728
|
* </ul>
|
|
632
729
|
*/
|
|
633
|
-
exports.stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema =
|
|
730
|
+
exports.stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema = zod_1.z
|
|
731
|
+
.object({
|
|
732
|
+
type: zod_1.z.literal("stabilityAiTextToImageOptions_StabilityAiTextToImageOptions"),
|
|
733
|
+
})
|
|
734
|
+
.and(exports.stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema);
|
|
634
735
|
exports.stabilityAiGeneratedAssetOptionsSchema = exports.stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema;
|
|
635
736
|
/**
|
|
636
737
|
* 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.
|
|
@@ -638,41 +739,77 @@ exports.stabilityAiGeneratedAssetOptionsSchema = exports.stabilityAiGeneratedAss
|
|
|
638
739
|
exports.stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema = zod_1.z.object({
|
|
639
740
|
provider: zod_1.z.enum(["stability-ai"]),
|
|
640
741
|
options: exports.stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema,
|
|
641
|
-
})
|
|
742
|
+
});
|
|
642
743
|
exports.stabilityAiGeneratedAssetSchema = exports.stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema;
|
|
643
744
|
/**
|
|
644
745
|
* 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.
|
|
645
746
|
*/
|
|
646
747
|
exports.generatedAssetGeneratedAssetSchema = zod_1.z.union([
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
748
|
+
zod_1.z
|
|
749
|
+
.object({
|
|
750
|
+
provider: zod_1.z.literal("shotstackGeneratedAsset_ShotstackGeneratedAsset"),
|
|
751
|
+
})
|
|
752
|
+
.and(exports.shotstackGeneratedAssetShotstackGeneratedAssetSchema),
|
|
753
|
+
zod_1.z
|
|
754
|
+
.object({
|
|
755
|
+
provider: zod_1.z.literal("didGeneratedAsset_DIDGeneratedAsset"),
|
|
756
|
+
})
|
|
757
|
+
.and(exports.didGeneratedAssetDidGeneratedAssetSchema),
|
|
758
|
+
zod_1.z
|
|
759
|
+
.object({
|
|
760
|
+
provider: zod_1.z.literal("elevenlabsGeneratedAsset_ElevenLabsGeneratedAsset"),
|
|
761
|
+
})
|
|
762
|
+
.and(exports.elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema),
|
|
763
|
+
zod_1.z
|
|
764
|
+
.object({
|
|
765
|
+
provider: zod_1.z.literal("heygenGeneratedAsset_HeyGenGeneratedAsset"),
|
|
766
|
+
})
|
|
767
|
+
.and(exports.heygenGeneratedAssetHeyGenGeneratedAssetSchema),
|
|
768
|
+
zod_1.z
|
|
769
|
+
.object({
|
|
770
|
+
provider: zod_1.z.literal("openaiGeneratedAsset_OpenAiGeneratedAsset"),
|
|
771
|
+
})
|
|
772
|
+
.and(exports.openaiGeneratedAssetOpenAiGeneratedAssetSchema),
|
|
773
|
+
zod_1.z
|
|
774
|
+
.object({
|
|
775
|
+
provider: zod_1.z.literal("stabilityAiGeneratedAsset_StabilityAiGeneratedAsset"),
|
|
776
|
+
})
|
|
777
|
+
.and(exports.stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema),
|
|
653
778
|
]);
|
|
654
779
|
exports.generatedAssetSchema = exports.generatedAssetGeneratedAssetSchema;
|
|
655
780
|
/**
|
|
656
781
|
* 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.
|
|
657
782
|
*/
|
|
658
783
|
exports.cropCropSchema = zod_1.z.object({
|
|
659
|
-
top: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
return v;
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
return
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
784
|
+
top: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
785
|
+
return undefined; if (Array.isArray(v))
|
|
786
|
+
return v; if (typeof v === 'string') {
|
|
787
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
788
|
+
return v;
|
|
789
|
+
return Number(v);
|
|
790
|
+
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
791
|
+
bottom: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
792
|
+
return undefined; if (Array.isArray(v))
|
|
793
|
+
return v; if (typeof v === 'string') {
|
|
794
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
795
|
+
return v;
|
|
796
|
+
return Number(v);
|
|
797
|
+
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
798
|
+
left: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
799
|
+
return undefined; if (Array.isArray(v))
|
|
800
|
+
return v; if (typeof v === 'string') {
|
|
801
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
802
|
+
return v;
|
|
803
|
+
return Number(v);
|
|
804
|
+
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
805
|
+
right: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
806
|
+
return undefined; if (Array.isArray(v))
|
|
807
|
+
return v; if (typeof v === 'string') {
|
|
808
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
809
|
+
return v;
|
|
810
|
+
return Number(v);
|
|
811
|
+
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
812
|
+
});
|
|
676
813
|
exports.cropSchema = exports.cropCropSchema;
|
|
677
814
|
/**
|
|
678
815
|
* Pass additional options to control how files are stored in Google Cloud Storage.
|
|
@@ -681,7 +818,7 @@ exports.googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOptions
|
|
|
681
818
|
bucket: zod_1.z.string(),
|
|
682
819
|
prefix: zod_1.z.optional(zod_1.z.string()),
|
|
683
820
|
filename: zod_1.z.optional(zod_1.z.string()),
|
|
684
|
-
})
|
|
821
|
+
});
|
|
685
822
|
exports.googleCloudStorageDestinationOptionsSchema = exports.googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOptionsSchema;
|
|
686
823
|
/**
|
|
687
824
|
* Send videos and assets to a [Google Cloud Storage](https://cloud.google.com/storage) bucket. Send files with your own prefix and filename. Google Cloud credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/google-cloud-storage), not in the request.
|
|
@@ -689,7 +826,7 @@ exports.googleCloudStorageDestinationOptionsSchema = exports.googleCloudStorageD
|
|
|
689
826
|
exports.googleCloudStorageDestinationGoogleCloudStorageDestinationSchema = zod_1.z.object({
|
|
690
827
|
provider: zod_1.z.literal("google-cloud-storage"),
|
|
691
828
|
options: zod_1.z.optional(exports.googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOptionsSchema),
|
|
692
|
-
})
|
|
829
|
+
});
|
|
693
830
|
exports.googleCloudStorageDestinationSchema = exports.googleCloudStorageDestinationGoogleCloudStorageDestinationSchema;
|
|
694
831
|
/**
|
|
695
832
|
* Pass the folder ID and options to configure how assets are stored in Google Drive.
|
|
@@ -697,7 +834,7 @@ exports.googleCloudStorageDestinationSchema = exports.googleCloudStorageDestinat
|
|
|
697
834
|
exports.googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema = zod_1.z.object({
|
|
698
835
|
folderId: zod_1.z.string(),
|
|
699
836
|
filename: zod_1.z.optional(zod_1.z.string()),
|
|
700
|
-
})
|
|
837
|
+
});
|
|
701
838
|
exports.googleDriveDestinationOptionsSchema = exports.googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema;
|
|
702
839
|
/**
|
|
703
840
|
* Send rendered videos and assets to the [Google Drive](https://shotstack.io/docs/guide/serving-assets/destinations/google-drive/) cloud storage service. Google Drive uses OAuth and you must authenticate and link your Google account via [dashboard](https://dashboard.shotstack.io/integrations/google-drive), not in the request.
|
|
@@ -705,7 +842,7 @@ exports.googleDriveDestinationOptionsSchema = exports.googleDriveDestinationOpti
|
|
|
705
842
|
exports.googleDriveDestinationGoogleDriveDestinationSchema = zod_1.z.object({
|
|
706
843
|
provider: zod_1.z.literal("google-drive"),
|
|
707
844
|
options: exports.googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema,
|
|
708
|
-
})
|
|
845
|
+
});
|
|
709
846
|
exports.googleDriveDestinationSchema = exports.googleDriveDestinationGoogleDriveDestinationSchema;
|
|
710
847
|
/**
|
|
711
848
|
* Pass additional options to control how Mux processes video. Currently supports playback_policy and passthrough options.
|
|
@@ -713,7 +850,7 @@ exports.googleDriveDestinationSchema = exports.googleDriveDestinationGoogleDrive
|
|
|
713
850
|
exports.muxDestinationOptionsMuxDestinationOptionsSchema = zod_1.z.object({
|
|
714
851
|
playbackPolicy: zod_1.z.optional(zod_1.z.array(zod_1.z.enum(["public", "signed"]))),
|
|
715
852
|
passthrough: zod_1.z.optional(zod_1.z.string().max(255)),
|
|
716
|
-
})
|
|
853
|
+
});
|
|
717
854
|
exports.muxDestinationOptionsSchema = exports.muxDestinationOptionsMuxDestinationOptionsSchema;
|
|
718
855
|
/**
|
|
719
856
|
* Send videos to the [Mux](https://shotstack.io/docs/guide/serving-assets/destinations/mux/) video hosting and streaming service. Mux credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/mux), not in the request.
|
|
@@ -721,7 +858,7 @@ exports.muxDestinationOptionsSchema = exports.muxDestinationOptionsMuxDestinatio
|
|
|
721
858
|
exports.muxDestinationMuxDestinationSchema = zod_1.z.object({
|
|
722
859
|
provider: zod_1.z.literal("mux"),
|
|
723
860
|
options: zod_1.z.optional(exports.muxDestinationOptionsMuxDestinationOptionsSchema),
|
|
724
|
-
})
|
|
861
|
+
});
|
|
725
862
|
exports.muxDestinationSchema = exports.muxDestinationMuxDestinationSchema;
|
|
726
863
|
/**
|
|
727
864
|
* Pass additional options to control how files are stored in S3.
|
|
@@ -732,7 +869,7 @@ exports.s3DestinationOptionsS3DestinationOptionsSchema = zod_1.z.object({
|
|
|
732
869
|
prefix: zod_1.z.optional(zod_1.z.string()),
|
|
733
870
|
filename: zod_1.z.optional(zod_1.z.string()),
|
|
734
871
|
acl: zod_1.z.optional(zod_1.z.string()),
|
|
735
|
-
})
|
|
872
|
+
});
|
|
736
873
|
exports.s3DestinationOptionsSchema = exports.s3DestinationOptionsS3DestinationOptionsSchema;
|
|
737
874
|
/**
|
|
738
875
|
* Send videos and assets to an [Amazon S3](https://shotstack.io/docs/guide/serving-assets/destinations/s3/) bucket. Send files to any region with your own prefix and filename. AWS credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/s3), not in the request.
|
|
@@ -740,7 +877,7 @@ exports.s3DestinationOptionsSchema = exports.s3DestinationOptionsS3DestinationOp
|
|
|
740
877
|
exports.s3DestinationS3DestinationSchema = zod_1.z.object({
|
|
741
878
|
provider: zod_1.z.literal("s3"),
|
|
742
879
|
options: zod_1.z.optional(exports.s3DestinationOptionsS3DestinationOptionsSchema),
|
|
743
|
-
})
|
|
880
|
+
});
|
|
744
881
|
exports.s3DestinationSchema = exports.s3DestinationS3DestinationSchema;
|
|
745
882
|
/**
|
|
746
883
|
* Send videos and assets to the [Shotstack hosting and CDN](https://shotstack.io/docs/guide/serving-assets/destinations/shotstack/) service. This destination is enabled by default.
|
|
@@ -748,7 +885,7 @@ exports.s3DestinationSchema = exports.s3DestinationS3DestinationSchema;
|
|
|
748
885
|
exports.shotstackDestinationShotstackDestinationSchema = zod_1.z.object({
|
|
749
886
|
provider: zod_1.z.literal("shotstack"),
|
|
750
887
|
exclude: zod_1.z.optional(zod_1.z.boolean()),
|
|
751
|
-
})
|
|
888
|
+
});
|
|
752
889
|
exports.shotstackDestinationSchema = exports.shotstackDestinationShotstackDestinationSchema;
|
|
753
890
|
/**
|
|
754
891
|
* Pass additional options to control how TikTok publishes video.
|
|
@@ -759,14 +896,14 @@ exports.tiktokDestinationOptionsTiktokDestinationOptionsSchema = zod_1.z.object(
|
|
|
759
896
|
disableDuet: zod_1.z.optional(zod_1.z.boolean()).default(false),
|
|
760
897
|
disableStitch: zod_1.z.optional(zod_1.z.boolean()).default(false),
|
|
761
898
|
disableComment: zod_1.z.optional(zod_1.z.boolean()).default(false),
|
|
762
|
-
})
|
|
899
|
+
});
|
|
763
900
|
/**
|
|
764
901
|
* Send videos to TikTok. TikTok credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/tiktok), not in the request.
|
|
765
902
|
*/
|
|
766
903
|
exports.tiktokDestinationTiktokDestinationSchema = zod_1.z.object({
|
|
767
904
|
provider: zod_1.z.literal("tiktok"),
|
|
768
905
|
options: zod_1.z.optional(exports.tiktokDestinationOptionsTiktokDestinationOptionsSchema),
|
|
769
|
-
})
|
|
906
|
+
});
|
|
770
907
|
/**
|
|
771
908
|
* Options to control the visibility of videos and privacy features.
|
|
772
909
|
*/
|
|
@@ -776,7 +913,7 @@ exports.vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema = zod
|
|
|
776
913
|
comments: zod_1.z.optional(zod_1.z.enum(["anybody", "nobody", "contacts"])),
|
|
777
914
|
download: zod_1.z.optional(zod_1.z.boolean()),
|
|
778
915
|
add: zod_1.z.optional(zod_1.z.boolean()),
|
|
779
|
-
})
|
|
916
|
+
});
|
|
780
917
|
exports.vimeoDestinationPrivacyOptionsSchema = exports.vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema;
|
|
781
918
|
/**
|
|
782
919
|
* Pass additional options to control how Vimeo publishes video, including name, description and privacy settings.
|
|
@@ -786,7 +923,7 @@ exports.vimeoDestinationOptionsVimeoDestinationOptionsSchema = zod_1.z.object({
|
|
|
786
923
|
description: zod_1.z.optional(zod_1.z.string()),
|
|
787
924
|
privacy: zod_1.z.optional(exports.vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema),
|
|
788
925
|
folderUri: zod_1.z.optional(zod_1.z.string()),
|
|
789
|
-
})
|
|
926
|
+
});
|
|
790
927
|
exports.vimeoDestinationOptionsSchema = exports.vimeoDestinationOptionsVimeoDestinationOptionsSchema;
|
|
791
928
|
/**
|
|
792
929
|
* Send videos to [Vimeo](https://shotstack.io/docs/guide/serving-assets/destinations/vimeo/) video hosting and streaming service. Vimeo credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/vimeo), not in the request.
|
|
@@ -794,7 +931,7 @@ exports.vimeoDestinationOptionsSchema = exports.vimeoDestinationOptionsVimeoDest
|
|
|
794
931
|
exports.vimeoDestinationVimeoDestinationSchema = zod_1.z.object({
|
|
795
932
|
provider: zod_1.z.literal("vimeo"),
|
|
796
933
|
options: zod_1.z.optional(exports.vimeoDestinationOptionsVimeoDestinationOptionsSchema),
|
|
797
|
-
})
|
|
934
|
+
});
|
|
798
935
|
exports.vimeoDestinationSchema = exports.vimeoDestinationVimeoDestinationSchema;
|
|
799
936
|
/**
|
|
800
937
|
* A destination is a location where assets can be sent to for serving or hosting. Videos, images and audio files that are rendered by the [Edit API](#shotstack-edit) and [source](#tocs_source) and [rendition](#tocs_rendition) files generated by the [Ingest API](#shotstack-ingest) can be sent to destinations. You can also fetch a file from any public URL and [transfer](#transfer-asset) it to a destination. A file can be sent to one or more destinations including 3rd party destinations.
|
|
@@ -817,14 +954,14 @@ exports.destinationsSchema = exports.destinationsDestinationsSchema;
|
|
|
817
954
|
exports.fliptransformationFlipTransformationSchema = zod_1.z.object({
|
|
818
955
|
horizontal: zod_1.z.optional(zod_1.z.boolean()),
|
|
819
956
|
vertical: zod_1.z.optional(zod_1.z.boolean()),
|
|
820
|
-
})
|
|
957
|
+
});
|
|
821
958
|
exports.flipTransformationSchema = exports.fliptransformationFlipTransformationSchema;
|
|
822
959
|
/**
|
|
823
960
|
* Download a custom font to use with the HTML asset type, using the font name in the CSS or font tag. See our [custom fonts](https://shotstack.io/learn/html-custom-fonts/) getting started guide for more details.
|
|
824
961
|
*/
|
|
825
962
|
exports.fontFontSchema = zod_1.z.object({
|
|
826
963
|
src: zod_1.z.string(),
|
|
827
|
-
})
|
|
964
|
+
});
|
|
828
965
|
exports.fontSchema = exports.fontFontSchema;
|
|
829
966
|
/**
|
|
830
967
|
* **Notice: The HtmlAsset is deprecated, use the [TextAsset](#tocs_textasset) instead.**
|
|
@@ -840,14 +977,20 @@ exports.htmlassetHtmlAssetSchema = zod_1.z.object({
|
|
|
840
977
|
type: zod_1.z.enum(["html"]),
|
|
841
978
|
html: zod_1.z.string(),
|
|
842
979
|
css: zod_1.z.optional(zod_1.z.string()),
|
|
843
|
-
width: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
return v;
|
|
850
|
-
|
|
980
|
+
width: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
981
|
+
return undefined; if (Array.isArray(v))
|
|
982
|
+
return v; if (typeof v === 'string') {
|
|
983
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
984
|
+
return v;
|
|
985
|
+
return Number(v);
|
|
986
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
987
|
+
height: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
988
|
+
return undefined; if (Array.isArray(v))
|
|
989
|
+
return v; if (typeof v === 'string') {
|
|
990
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
991
|
+
return v;
|
|
992
|
+
return Number(v);
|
|
993
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
851
994
|
background: zod_1.z.optional(zod_1.z.string()),
|
|
852
995
|
position: zod_1.z.optional(zod_1.z.enum([
|
|
853
996
|
"top",
|
|
@@ -860,16 +1003,16 @@ exports.htmlassetHtmlAssetSchema = zod_1.z.object({
|
|
|
860
1003
|
"topLeft",
|
|
861
1004
|
"center",
|
|
862
1005
|
])),
|
|
863
|
-
})
|
|
1006
|
+
});
|
|
864
1007
|
exports.htmlAssetSchema = exports.htmlassetHtmlAssetSchema;
|
|
865
1008
|
/**
|
|
866
1009
|
* The ImageAsset is used to create video from images to compose an image. The src must be a publicly accessible URL to an image resource such as a jpg or png file.
|
|
867
1010
|
*/
|
|
868
1011
|
exports.imageassetImageAssetSchema = zod_1.z.object({
|
|
869
1012
|
type: zod_1.z.enum(["image"]),
|
|
870
|
-
src: zod_1.z.string().
|
|
1013
|
+
src: zod_1.z.string().min(1).regex(/\S/),
|
|
871
1014
|
crop: zod_1.z.optional(exports.cropCropSchema),
|
|
872
|
-
})
|
|
1015
|
+
});
|
|
873
1016
|
exports.imageAssetSchema = exports.imageassetImageAssetSchema;
|
|
874
1017
|
/**
|
|
875
1018
|
* The ImageToVideoAsset lets you create a video from an image and a text prompt.
|
|
@@ -879,12 +1022,15 @@ exports.imagetovideoassetImageToVideoAssetSchema = zod_1.z.object({
|
|
|
879
1022
|
src: zod_1.z.string().min(1),
|
|
880
1023
|
prompt: zod_1.z.optional(zod_1.z.string()),
|
|
881
1024
|
aspectRatio: zod_1.z.optional(zod_1.z.enum(["1:1", "4:3", "16:9", "9:16", "3:4", "21:9", "9:21"])),
|
|
882
|
-
speed: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
1025
|
+
speed: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1026
|
+
return undefined; if (Array.isArray(v))
|
|
1027
|
+
return v; if (typeof v === 'string') {
|
|
1028
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1029
|
+
return v;
|
|
1030
|
+
return Number(v);
|
|
1031
|
+
} return v; }), zod_1.z.number().gte(0).lte(10)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
886
1032
|
crop: zod_1.z.optional(exports.cropCropSchema),
|
|
887
|
-
})
|
|
1033
|
+
});
|
|
888
1034
|
exports.imageToVideoAssetSchema = exports.imagetovideoassetImageToVideoAssetSchema;
|
|
889
1035
|
/**
|
|
890
1036
|
* Options for the Dolby.io audio enhancement provider.
|
|
@@ -901,7 +1047,7 @@ exports.dolbyEnhancementOptionsDolbyEnhancementOptionsSchema = zod_1.z.object({
|
|
|
901
1047
|
"studio",
|
|
902
1048
|
"voice_over",
|
|
903
1049
|
]),
|
|
904
|
-
})
|
|
1050
|
+
});
|
|
905
1051
|
exports.dolbyEnhancementOptionsSchema = exports.dolbyEnhancementOptionsDolbyEnhancementOptionsSchema;
|
|
906
1052
|
/**
|
|
907
1053
|
* Dolby.io audio enhancement provider. Credentials are required and must be added via the [dashboard](https://dashboard.shotstack.io/integrations/dolby), not in the request.
|
|
@@ -909,7 +1055,7 @@ exports.dolbyEnhancementOptionsSchema = exports.dolbyEnhancementOptionsDolbyEnha
|
|
|
909
1055
|
exports.dolbyEnhancementDolbyEnhancementSchema = zod_1.z.object({
|
|
910
1056
|
provider: zod_1.z.string().default("dolby"),
|
|
911
1057
|
options: exports.dolbyEnhancementOptionsDolbyEnhancementOptionsSchema,
|
|
912
|
-
})
|
|
1058
|
+
});
|
|
913
1059
|
exports.dolbyEnhancementSchema = exports.dolbyEnhancementDolbyEnhancementSchema;
|
|
914
1060
|
/**
|
|
915
1061
|
* An audio enhancement that can be applied to the audio content of a rendition.
|
|
@@ -917,14 +1063,18 @@ exports.dolbyEnhancementSchema = exports.dolbyEnhancementDolbyEnhancementSchema;
|
|
|
917
1063
|
* <li><a href="#tocs_dolbyenhancement">DolbyEnhancement</a></li>
|
|
918
1064
|
* </ul>
|
|
919
1065
|
*/
|
|
920
|
-
exports.audioEnhancementAudioEnhancementSchema =
|
|
1066
|
+
exports.audioEnhancementAudioEnhancementSchema = zod_1.z
|
|
1067
|
+
.object({
|
|
1068
|
+
enhancement: zod_1.z.literal("dolbyEnhancement_DolbyEnhancement"),
|
|
1069
|
+
})
|
|
1070
|
+
.and(exports.dolbyEnhancementDolbyEnhancementSchema);
|
|
921
1071
|
exports.audioEnhancementSchema = exports.audioEnhancementAudioEnhancementSchema;
|
|
922
1072
|
/**
|
|
923
1073
|
* Enhancements that can be applied to a rendition. Currently only supports the Dolby audio enhancement.
|
|
924
1074
|
*/
|
|
925
1075
|
exports.enhancementsEnhancementsSchema = zod_1.z.object({
|
|
926
1076
|
audio: zod_1.z.optional(exports.audioEnhancementAudioEnhancementSchema),
|
|
927
|
-
})
|
|
1077
|
+
});
|
|
928
1078
|
exports.enhancementsSchema = exports.enhancementsEnhancementsSchema;
|
|
929
1079
|
/**
|
|
930
1080
|
* Individual errors returned by the Ingest API.
|
|
@@ -933,14 +1083,14 @@ exports.ingesterrorresponsedataIngestErrorResponseDataSchema = zod_1.z.object({
|
|
|
933
1083
|
status: zod_1.z.string(),
|
|
934
1084
|
title: zod_1.z.string(),
|
|
935
1085
|
detail: zod_1.z.string(),
|
|
936
|
-
})
|
|
1086
|
+
});
|
|
937
1087
|
exports.ingestErrorResponseDataSchema = exports.ingesterrorresponsedataIngestErrorResponseDataSchema;
|
|
938
1088
|
/**
|
|
939
1089
|
* Error response data for validation and other errors returned by the Ingest API.
|
|
940
1090
|
*/
|
|
941
1091
|
exports.ingesterrorresponseIngestErrorResponseSchema = zod_1.z.object({
|
|
942
1092
|
errors: zod_1.z.array(exports.ingesterrorresponsedataIngestErrorResponseDataSchema),
|
|
943
|
-
})
|
|
1093
|
+
});
|
|
944
1094
|
exports.ingestErrorResponseSchema = exports.ingesterrorresponseIngestErrorResponseSchema;
|
|
945
1095
|
/**
|
|
946
1096
|
* The type of resource (a source) and the newly created source id. Returned with [QueuedSourceResponse](#tocs_queuedsourceresponse).
|
|
@@ -948,14 +1098,14 @@ exports.ingestErrorResponseSchema = exports.ingesterrorresponseIngestErrorRespon
|
|
|
948
1098
|
exports.queuedsourceresponsedataQueuedSourceResponseDataSchema = zod_1.z.object({
|
|
949
1099
|
type: zod_1.z.string(),
|
|
950
1100
|
id: zod_1.z.string(),
|
|
951
|
-
})
|
|
1101
|
+
});
|
|
952
1102
|
exports.queuedSourceResponseDataSchema = exports.queuedsourceresponsedataQueuedSourceResponseDataSchema;
|
|
953
1103
|
/**
|
|
954
1104
|
* The response returned by the Ingest API [fetch source](#fetch-source) request. Includes the id of the source file. The response follows the [json:api](https://jsonapi.org/) specification.
|
|
955
1105
|
*/
|
|
956
1106
|
exports.queuedsourceresponseQueuedSourceResponseSchema = zod_1.z.object({
|
|
957
1107
|
data: exports.queuedsourceresponsedataQueuedSourceResponseDataSchema,
|
|
958
|
-
})
|
|
1108
|
+
});
|
|
959
1109
|
exports.queuedSourceResponseSchema = exports.queuedsourceresponseQueuedSourceResponseSchema;
|
|
960
1110
|
/**
|
|
961
1111
|
* The id and attributes of the upload file including the signed URL to send the binary file data to.
|
|
@@ -964,7 +1114,7 @@ exports.uploadresponseattributesUploadResponseAttributesSchema = zod_1.z.object(
|
|
|
964
1114
|
id: zod_1.z.string(),
|
|
965
1115
|
url: zod_1.z.string(),
|
|
966
1116
|
expires: zod_1.z.string(),
|
|
967
|
-
})
|
|
1117
|
+
});
|
|
968
1118
|
exports.uploadResponseAttributesSchema = exports.uploadresponseattributesUploadResponseAttributesSchema;
|
|
969
1119
|
/**
|
|
970
1120
|
* The type of resource (an upload), it's id and attributes of the upload request.
|
|
@@ -973,76 +1123,91 @@ exports.uploadresponsedataUploadResponseDataSchema = zod_1.z.object({
|
|
|
973
1123
|
type: zod_1.z.string(),
|
|
974
1124
|
id: zod_1.z.string(),
|
|
975
1125
|
attributes: exports.uploadresponseattributesUploadResponseAttributesSchema,
|
|
976
|
-
})
|
|
1126
|
+
});
|
|
977
1127
|
exports.uploadResponseDataSchema = exports.uploadresponsedataUploadResponseDataSchema;
|
|
978
1128
|
/**
|
|
979
1129
|
* The response returned by the Ingest API [direct upload](#direct-upload) request. Includes the id of the file and the signed url to send the binary file to. The response follows the [json:api](https://jsonapi.org/) specification.
|
|
980
1130
|
*/
|
|
981
1131
|
exports.uploadresponseUploadResponseSchema = zod_1.z.object({
|
|
982
1132
|
data: exports.uploadresponsedataUploadResponseDataSchema,
|
|
983
|
-
})
|
|
1133
|
+
});
|
|
984
1134
|
exports.uploadResponseSchema = exports.uploadresponseUploadResponseSchema;
|
|
985
1135
|
/**
|
|
986
1136
|
* 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.
|
|
987
1137
|
*/
|
|
988
1138
|
exports.speedSpeedSchema = zod_1.z.object({
|
|
989
|
-
speed: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
1139
|
+
speed: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1140
|
+
return undefined; if (Array.isArray(v))
|
|
1141
|
+
return v; if (typeof v === 'string') {
|
|
1142
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1143
|
+
return v;
|
|
1144
|
+
return Number(v);
|
|
1145
|
+
} return v; }), zod_1.z.number().gte(0).lte(10)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
993
1146
|
preservePitch: zod_1.z.optional(zod_1.z.boolean()),
|
|
994
|
-
})
|
|
1147
|
+
});
|
|
995
1148
|
exports.speedSchema = exports.speedSpeedSchema;
|
|
996
1149
|
/**
|
|
997
1150
|
* Generate a transcription of the audio in the video. The transcription can be output as a file in SRT or VTT format.
|
|
998
1151
|
*/
|
|
999
1152
|
exports.transcriptionTranscriptionSchema = zod_1.z.object({
|
|
1000
1153
|
format: zod_1.z.optional(zod_1.z.enum(["srt", "vtt"])),
|
|
1001
|
-
})
|
|
1154
|
+
});
|
|
1002
1155
|
exports.transcriptionSchema = exports.transcriptionTranscriptionSchema;
|
|
1003
1156
|
/**
|
|
1004
1157
|
* The LumaAsset is used to create luma matte masks, transitions and effects between other assets. A luma matte is a grey scale image or animated video where the black areas are transparent and the white areas solid. The luma matte animation should be provided as an mp4 video file. The src must be a publicly accessible URL to the file.
|
|
1005
1158
|
*/
|
|
1006
1159
|
exports.lumaassetLumaAssetSchema = zod_1.z.object({
|
|
1007
1160
|
type: zod_1.z.enum(["luma"]),
|
|
1008
|
-
src: zod_1.z.string().
|
|
1009
|
-
trim: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1161
|
+
src: zod_1.z.string().min(1).regex(/\S/),
|
|
1162
|
+
trim: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1163
|
+
return undefined; if (Array.isArray(v))
|
|
1164
|
+
return v; if (typeof v === 'string') {
|
|
1165
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1166
|
+
return v;
|
|
1167
|
+
return Number(v);
|
|
1168
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1169
|
+
});
|
|
1014
1170
|
exports.lumaAssetSchema = exports.lumaassetLumaAssetSchema;
|
|
1015
1171
|
/**
|
|
1016
1172
|
* A merge field consists of a key; `find`, and a value; `replace`. Merge fields can be used to replace placeholders within the JSON edit to create re-usable templates. Placeholders should be a string with double brace delimiters, i.e. `"{{NAME}}"`. A placeholder can be used for any value within the JSON edit.
|
|
1017
1173
|
*/
|
|
1018
1174
|
exports.mergefieldMergeFieldSchema = zod_1.z.object({
|
|
1019
1175
|
find: zod_1.z.string(),
|
|
1020
|
-
replace: zod_1.z.union([zod_1.z.string(), zod_1.z.
|
|
1021
|
-
})
|
|
1176
|
+
replace: zod_1.z.union([zod_1.z.string(), zod_1.z.number(), zod_1.z.boolean(), zod_1.z.null(), zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()), zod_1.z.array(zod_1.z.unknown())]),
|
|
1177
|
+
});
|
|
1022
1178
|
exports.mergeFieldSchema = exports.mergefieldMergeFieldSchema;
|
|
1023
1179
|
/**
|
|
1024
1180
|
* 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.
|
|
1025
1181
|
*/
|
|
1026
1182
|
exports.posterPosterSchema = zod_1.z.object({
|
|
1027
|
-
capture: zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1183
|
+
capture: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1184
|
+
return undefined; if (Array.isArray(v))
|
|
1185
|
+
return v; if (typeof v === 'string') {
|
|
1186
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1187
|
+
return v;
|
|
1188
|
+
return Number(v);
|
|
1189
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1190
|
+
});
|
|
1032
1191
|
exports.posterSchema = exports.posterPosterSchema;
|
|
1033
1192
|
/**
|
|
1034
1193
|
* 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.
|
|
1035
1194
|
*/
|
|
1036
1195
|
exports.rangeRangeSchema = zod_1.z.object({
|
|
1037
|
-
start: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
return v;
|
|
1044
|
-
|
|
1045
|
-
|
|
1196
|
+
start: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1197
|
+
return undefined; if (Array.isArray(v))
|
|
1198
|
+
return v; if (typeof v === 'string') {
|
|
1199
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1200
|
+
return v;
|
|
1201
|
+
return Number(v);
|
|
1202
|
+
} return v; }), zod_1.z.number().gte(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1203
|
+
length: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1204
|
+
return undefined; if (Array.isArray(v))
|
|
1205
|
+
return v; if (typeof v === 'string') {
|
|
1206
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1207
|
+
return v;
|
|
1208
|
+
return Number(v);
|
|
1209
|
+
} return v; }), zod_1.z.number().gte(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1210
|
+
});
|
|
1046
1211
|
exports.rangeSchema = exports.rangeRangeSchema;
|
|
1047
1212
|
/**
|
|
1048
1213
|
* The list of asset attributes and their values.
|
|
@@ -1058,7 +1223,7 @@ exports.assetresponseattributesAssetResponseAttributesSchema = zod_1.z.object({
|
|
|
1058
1223
|
status: zod_1.z.enum(["importing", "ready", "failed", "deleted"]),
|
|
1059
1224
|
created: zod_1.z.optional(zod_1.z.string()),
|
|
1060
1225
|
updated: zod_1.z.optional(zod_1.z.string()),
|
|
1061
|
-
})
|
|
1226
|
+
});
|
|
1062
1227
|
exports.assetResponseAttributesSchema = exports.assetresponseattributesAssetResponseAttributesSchema;
|
|
1063
1228
|
/**
|
|
1064
1229
|
* The type of resource (an asset) and attributes of the asset.
|
|
@@ -1066,21 +1231,21 @@ exports.assetResponseAttributesSchema = exports.assetresponseattributesAssetResp
|
|
|
1066
1231
|
exports.assetresponsedataAssetResponseDataSchema = zod_1.z.object({
|
|
1067
1232
|
type: zod_1.z.string(),
|
|
1068
1233
|
attributes: exports.assetresponseattributesAssetResponseAttributesSchema,
|
|
1069
|
-
})
|
|
1234
|
+
});
|
|
1070
1235
|
exports.assetResponseDataSchema = exports.assetresponsedataAssetResponseDataSchema;
|
|
1071
1236
|
/**
|
|
1072
1237
|
* The response returned by the Serve API [get asset by render id](#get-asset-by-render-id) request. The response is an array of asset resources, including video, image, audio, thumbnail and poster image. The response follows the [json:api](https://jsonapi.org/) specification.
|
|
1073
1238
|
*/
|
|
1074
1239
|
exports.assetrenderresponseAssetRenderResponseSchema = zod_1.z.object({
|
|
1075
1240
|
data: zod_1.z.array(exports.assetresponsedataAssetResponseDataSchema),
|
|
1076
|
-
})
|
|
1241
|
+
});
|
|
1077
1242
|
exports.assetRenderResponseSchema = exports.assetrenderresponseAssetRenderResponseSchema;
|
|
1078
1243
|
/**
|
|
1079
1244
|
* The response returned by the Serve API [get asset](#get-asset) request. Includes details of a hosted video, image, audio file, thumbnail or poster image. The response follows the [json:api](https://jsonapi.org/) specification.
|
|
1080
1245
|
*/
|
|
1081
1246
|
exports.assetresponseAssetResponseSchema = zod_1.z.object({
|
|
1082
1247
|
data: exports.assetresponsedataAssetResponseDataSchema,
|
|
1083
|
-
})
|
|
1248
|
+
});
|
|
1084
1249
|
exports.assetResponseSchema = exports.assetresponseAssetResponseSchema;
|
|
1085
1250
|
/**
|
|
1086
1251
|
* The response received after a [probe request](#inspect-media) is submitted. The probe requests returns data from FFprobe formatted as JSON.
|
|
@@ -1089,7 +1254,7 @@ exports.proberesponseProbeResponseSchema = zod_1.z.object({
|
|
|
1089
1254
|
success: zod_1.z.boolean(),
|
|
1090
1255
|
message: zod_1.z.string(),
|
|
1091
1256
|
response: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()),
|
|
1092
|
-
})
|
|
1257
|
+
});
|
|
1093
1258
|
exports.probeResponseSchema = exports.proberesponseProbeResponseSchema;
|
|
1094
1259
|
/**
|
|
1095
1260
|
* The response data returned with the [QueuedResponse](#tocs_queuedresponse).
|
|
@@ -1097,7 +1262,7 @@ exports.probeResponseSchema = exports.proberesponseProbeResponseSchema;
|
|
|
1097
1262
|
exports.queuedresponsedataQueuedResponseDataSchema = zod_1.z.object({
|
|
1098
1263
|
message: zod_1.z.string(),
|
|
1099
1264
|
id: zod_1.z.string(),
|
|
1100
|
-
})
|
|
1265
|
+
});
|
|
1101
1266
|
exports.queuedResponseDataSchema = exports.queuedresponsedataQueuedResponseDataSchema;
|
|
1102
1267
|
/**
|
|
1103
1268
|
* The response received after a [render request](#render-asset) or [template render](#render-template) is submitted. The render task is queued for rendering and a unique render id is returned.
|
|
@@ -1106,7 +1271,7 @@ exports.queuedresponseQueuedResponseSchema = zod_1.z.object({
|
|
|
1106
1271
|
success: zod_1.z.boolean(),
|
|
1107
1272
|
message: zod_1.z.string(),
|
|
1108
1273
|
response: exports.queuedresponsedataQueuedResponseDataSchema,
|
|
1109
|
-
})
|
|
1274
|
+
});
|
|
1110
1275
|
exports.queuedResponseSchema = exports.queuedresponseQueuedResponseSchema;
|
|
1111
1276
|
/**
|
|
1112
1277
|
* The individual template item returned with the [TemplateListResponseData](#tocs_templatelistresponsedata) templates list.
|
|
@@ -1116,7 +1281,7 @@ exports.templatelistresponseitemTemplateListResponseItemSchema = zod_1.z.object(
|
|
|
1116
1281
|
name: zod_1.z.string(),
|
|
1117
1282
|
created: zod_1.z.optional(zod_1.z.string()),
|
|
1118
1283
|
updated: zod_1.z.optional(zod_1.z.string()),
|
|
1119
|
-
})
|
|
1284
|
+
});
|
|
1120
1285
|
exports.templateListResponseItemSchema = exports.templatelistresponseitemTemplateListResponseItemSchema;
|
|
1121
1286
|
/**
|
|
1122
1287
|
* The response data returned with the [TemplateListResponse](#tocs_templatelistresponse).
|
|
@@ -1124,7 +1289,7 @@ exports.templateListResponseItemSchema = exports.templatelistresponseitemTemplat
|
|
|
1124
1289
|
exports.templatelistresponsedataTemplateListResponseDataSchema = zod_1.z.object({
|
|
1125
1290
|
owner: zod_1.z.string(),
|
|
1126
1291
|
templates: zod_1.z.array(exports.templatelistresponseitemTemplateListResponseItemSchema),
|
|
1127
|
-
})
|
|
1292
|
+
});
|
|
1128
1293
|
exports.templateListResponseDataSchema = exports.templatelistresponsedataTemplateListResponseDataSchema;
|
|
1129
1294
|
/**
|
|
1130
1295
|
* A list of previously saved templates.
|
|
@@ -1133,7 +1298,7 @@ exports.templatelistresponseTemplateListResponseSchema = zod_1.z.object({
|
|
|
1133
1298
|
success: zod_1.z.boolean(),
|
|
1134
1299
|
message: zod_1.z.string(),
|
|
1135
1300
|
response: exports.templatelistresponsedataTemplateListResponseDataSchema,
|
|
1136
|
-
})
|
|
1301
|
+
});
|
|
1137
1302
|
exports.templateListResponseSchema = exports.templatelistresponseTemplateListResponseSchema;
|
|
1138
1303
|
/**
|
|
1139
1304
|
* The response data returned with the [TemplateResponse](#tocs_templateresponse).
|
|
@@ -1141,7 +1306,7 @@ exports.templateListResponseSchema = exports.templatelistresponseTemplateListRes
|
|
|
1141
1306
|
exports.templateresponsedataTemplateResponseDataSchema = zod_1.z.object({
|
|
1142
1307
|
message: zod_1.z.string(),
|
|
1143
1308
|
id: zod_1.z.string(),
|
|
1144
|
-
})
|
|
1309
|
+
});
|
|
1145
1310
|
exports.templateResponseDataSchema = exports.templateresponsedataTemplateResponseDataSchema;
|
|
1146
1311
|
/**
|
|
1147
1312
|
* The response received after a [template](#create-template) is submitted. The template is saved and a unique template id is returned.
|
|
@@ -1150,7 +1315,7 @@ exports.templateresponseTemplateResponseSchema = zod_1.z.object({
|
|
|
1150
1315
|
success: zod_1.z.boolean(),
|
|
1151
1316
|
message: zod_1.z.string(),
|
|
1152
1317
|
response: exports.templateresponsedataTemplateResponseDataSchema,
|
|
1153
|
-
})
|
|
1318
|
+
});
|
|
1154
1319
|
exports.templateResponseSchema = exports.templateresponseTemplateResponseSchema;
|
|
1155
1320
|
/**
|
|
1156
1321
|
* Text alignment properties (horizontal and vertical).
|
|
@@ -1158,7 +1323,7 @@ exports.templateResponseSchema = exports.templateresponseTemplateResponseSchema;
|
|
|
1158
1323
|
exports.richtextpropertiesRichTextAlignmentSchema = zod_1.z.object({
|
|
1159
1324
|
horizontal: zod_1.z.optional(zod_1.z.enum(["left", "center", "right"])),
|
|
1160
1325
|
vertical: zod_1.z.optional(zod_1.z.enum(["top", "middle", "bottom"])),
|
|
1161
|
-
})
|
|
1326
|
+
});
|
|
1162
1327
|
exports.richTextAlignmentSchema = exports.richtextpropertiesRichTextAlignmentSchema;
|
|
1163
1328
|
/**
|
|
1164
1329
|
* Animation properties for text entrance effects.
|
|
@@ -1172,161 +1337,227 @@ exports.richtextpropertiesRichTextAnimationSchema = zod_1.z.object({
|
|
|
1172
1337
|
"shift",
|
|
1173
1338
|
"movingLetters",
|
|
1174
1339
|
]),
|
|
1175
|
-
duration: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1340
|
+
duration: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1341
|
+
return undefined; if (Array.isArray(v))
|
|
1342
|
+
return v; if (typeof v === 'string') {
|
|
1343
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1344
|
+
return v;
|
|
1345
|
+
return Number(v);
|
|
1346
|
+
} return v; }), zod_1.z.number().gte(0.1).lte(30)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1179
1347
|
style: zod_1.z.optional(zod_1.z.enum(["character", "word"])),
|
|
1180
1348
|
direction: zod_1.z.optional(zod_1.z.enum(["left", "right", "up", "down"])),
|
|
1181
|
-
})
|
|
1349
|
+
});
|
|
1182
1350
|
exports.richTextAnimationSchema = exports.richtextpropertiesRichTextAnimationSchema;
|
|
1183
1351
|
/**
|
|
1184
1352
|
* Background styling properties for the text bounding box.
|
|
1185
1353
|
*/
|
|
1186
1354
|
exports.richtextpropertiesRichTextBackgroundSchema = zod_1.z.object({
|
|
1187
|
-
color: zod_1.z.optional(zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/)),
|
|
1188
|
-
opacity: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
return v;
|
|
1195
|
-
|
|
1196
|
-
|
|
1355
|
+
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*\}\}$/)])),
|
|
1356
|
+
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1357
|
+
return undefined; if (Array.isArray(v))
|
|
1358
|
+
return v; if (typeof v === 'string') {
|
|
1359
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1360
|
+
return v;
|
|
1361
|
+
return Number(v);
|
|
1362
|
+
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1363
|
+
borderRadius: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1364
|
+
return undefined; if (Array.isArray(v))
|
|
1365
|
+
return v; if (typeof v === 'string') {
|
|
1366
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1367
|
+
return v;
|
|
1368
|
+
return Number(v);
|
|
1369
|
+
} return v; }), zod_1.z.number().gte(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1370
|
+
});
|
|
1197
1371
|
exports.richTextBackgroundSchema = exports.richtextpropertiesRichTextBackgroundSchema;
|
|
1198
1372
|
/**
|
|
1199
1373
|
* Border styling properties for the text bounding box.
|
|
1200
1374
|
*/
|
|
1201
1375
|
exports.richtextpropertiesRichTextBorderSchema = zod_1.z.object({
|
|
1202
|
-
width: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
return
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1376
|
+
width: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1377
|
+
return undefined; if (Array.isArray(v))
|
|
1378
|
+
return v; if (typeof v === 'string') {
|
|
1379
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1380
|
+
return v;
|
|
1381
|
+
return Number(v);
|
|
1382
|
+
} return v; }), zod_1.z.number().gte(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1383
|
+
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"),
|
|
1384
|
+
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1385
|
+
return undefined; if (Array.isArray(v))
|
|
1386
|
+
return v; if (typeof v === 'string') {
|
|
1387
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1388
|
+
return v;
|
|
1389
|
+
return Number(v);
|
|
1390
|
+
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1391
|
+
radius: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1392
|
+
return undefined; if (Array.isArray(v))
|
|
1393
|
+
return v; if (typeof v === 'string') {
|
|
1394
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1395
|
+
return v;
|
|
1396
|
+
return Number(v);
|
|
1397
|
+
} return v; }), zod_1.z.number().gte(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1398
|
+
});
|
|
1216
1399
|
/**
|
|
1217
1400
|
* Gradient properties for text fill.
|
|
1218
1401
|
*/
|
|
1219
1402
|
exports.richtextpropertiesRichTextGradientSchema = zod_1.z.object({
|
|
1220
1403
|
type: zod_1.z.optional(zod_1.z.enum(["linear", "radial"])),
|
|
1221
|
-
angle: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1404
|
+
angle: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1405
|
+
return undefined; if (Array.isArray(v))
|
|
1406
|
+
return v; if (typeof v === 'string') {
|
|
1407
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1408
|
+
return v;
|
|
1409
|
+
return Number(v);
|
|
1410
|
+
} return v; }), zod_1.z.number().gte(0).lte(360)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1225
1411
|
stops: zod_1.z
|
|
1226
1412
|
.array(zod_1.z.object({
|
|
1227
|
-
offset: zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1413
|
+
offset: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1414
|
+
return undefined; if (Array.isArray(v))
|
|
1415
|
+
return v; if (typeof v === 'string') {
|
|
1416
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1417
|
+
return v;
|
|
1418
|
+
return Number(v);
|
|
1419
|
+
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1420
|
+
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*\}\}$/)]),
|
|
1232
1421
|
}))
|
|
1233
1422
|
.min(2),
|
|
1234
|
-
})
|
|
1423
|
+
});
|
|
1235
1424
|
exports.richTextGradientSchema = exports.richtextpropertiesRichTextGradientSchema;
|
|
1236
1425
|
/**
|
|
1237
1426
|
* Padding properties for individual sides of the text bounding box.
|
|
1238
1427
|
*/
|
|
1239
1428
|
exports.richtextpropertiesRichTextPaddingSchema = zod_1.z.object({
|
|
1240
|
-
top: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
return v;
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
return
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1429
|
+
top: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1430
|
+
return undefined; if (Array.isArray(v))
|
|
1431
|
+
return v; if (typeof v === 'string') {
|
|
1432
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1433
|
+
return v;
|
|
1434
|
+
return Number(v);
|
|
1435
|
+
} return v; }), zod_1.z.number().gte(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1436
|
+
right: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1437
|
+
return undefined; if (Array.isArray(v))
|
|
1438
|
+
return v; if (typeof v === 'string') {
|
|
1439
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1440
|
+
return v;
|
|
1441
|
+
return Number(v);
|
|
1442
|
+
} return v; }), zod_1.z.number().gte(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1443
|
+
bottom: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1444
|
+
return undefined; if (Array.isArray(v))
|
|
1445
|
+
return v; if (typeof v === 'string') {
|
|
1446
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1447
|
+
return v;
|
|
1448
|
+
return Number(v);
|
|
1449
|
+
} return v; }), zod_1.z.number().gte(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1450
|
+
left: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1451
|
+
return undefined; if (Array.isArray(v))
|
|
1452
|
+
return v; if (typeof v === 'string') {
|
|
1453
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1454
|
+
return v;
|
|
1455
|
+
return Number(v);
|
|
1456
|
+
} return v; }), zod_1.z.number().gte(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1457
|
+
});
|
|
1257
1458
|
/**
|
|
1258
1459
|
* Text shadow properties.
|
|
1259
1460
|
*/
|
|
1260
1461
|
exports.richtextpropertiesRichTextShadowSchema = zod_1.z.object({
|
|
1261
|
-
offsetX: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
return v;
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
}
|
|
1462
|
+
offsetX: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1463
|
+
return undefined; if (Array.isArray(v))
|
|
1464
|
+
return v; if (typeof v === 'string') {
|
|
1465
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1466
|
+
return v;
|
|
1467
|
+
return Number(v);
|
|
1468
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1469
|
+
offsetY: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1470
|
+
return undefined; if (Array.isArray(v))
|
|
1471
|
+
return v; if (typeof v === 'string') {
|
|
1472
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1473
|
+
return v;
|
|
1474
|
+
return Number(v);
|
|
1475
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1476
|
+
blur: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1477
|
+
return undefined; if (Array.isArray(v))
|
|
1478
|
+
return v; if (typeof v === 'string') {
|
|
1479
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1480
|
+
return v;
|
|
1481
|
+
return Number(v);
|
|
1482
|
+
} return v; }), zod_1.z.number().gte(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1483
|
+
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"),
|
|
1484
|
+
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1485
|
+
return undefined; if (Array.isArray(v))
|
|
1486
|
+
return v; if (typeof v === 'string') {
|
|
1487
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1488
|
+
return v;
|
|
1489
|
+
return Number(v);
|
|
1490
|
+
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5),
|
|
1491
|
+
});
|
|
1279
1492
|
exports.richTextShadowSchema = exports.richtextpropertiesRichTextShadowSchema;
|
|
1280
1493
|
/**
|
|
1281
1494
|
* Text stroke (outline) properties.
|
|
1282
1495
|
*/
|
|
1283
1496
|
exports.richtextpropertiesRichTextStrokeSchema = zod_1.z.object({
|
|
1284
|
-
width: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
return
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1497
|
+
width: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1498
|
+
return undefined; if (Array.isArray(v))
|
|
1499
|
+
return v; if (typeof v === 'string') {
|
|
1500
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1501
|
+
return v;
|
|
1502
|
+
return Number(v);
|
|
1503
|
+
} return v; }), zod_1.z.number().gte(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1504
|
+
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"),
|
|
1505
|
+
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1506
|
+
return undefined; if (Array.isArray(v))
|
|
1507
|
+
return v; if (typeof v === 'string') {
|
|
1508
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1509
|
+
return v;
|
|
1510
|
+
return Number(v);
|
|
1511
|
+
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1512
|
+
});
|
|
1294
1513
|
exports.richTextStrokeSchema = exports.richtextpropertiesRichTextStrokeSchema;
|
|
1295
1514
|
/**
|
|
1296
1515
|
* Font properties for rich text.
|
|
1297
1516
|
*/
|
|
1298
1517
|
exports.richtextpropertiesRichTextFontSchema = zod_1.z.object({
|
|
1299
1518
|
family: zod_1.z.optional(zod_1.z.string()).default("Open Sans"),
|
|
1300
|
-
size: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1519
|
+
size: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1520
|
+
return undefined; if (Array.isArray(v))
|
|
1521
|
+
return v; if (typeof v === 'string') {
|
|
1522
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1523
|
+
return v;
|
|
1524
|
+
return Number(v);
|
|
1525
|
+
} return v; }), zod_1.z.number().int().gte(1).lte(500)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(24),
|
|
1304
1526
|
weight: zod_1.z.optional(zod_1.z.unknown()).default("400"),
|
|
1305
|
-
color: zod_1.z.optional(zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#ffffff"),
|
|
1306
|
-
opacity: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1527
|
+
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("#ffffff"),
|
|
1528
|
+
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1529
|
+
return undefined; if (Array.isArray(v))
|
|
1530
|
+
return v; if (typeof v === 'string') {
|
|
1531
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1532
|
+
return v;
|
|
1533
|
+
return Number(v);
|
|
1534
|
+
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1535
|
+
background: 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*\}\}$/)])),
|
|
1311
1536
|
stroke: zod_1.z.optional(exports.richtextpropertiesRichTextStrokeSchema),
|
|
1312
|
-
})
|
|
1537
|
+
});
|
|
1313
1538
|
exports.richTextFontSchema = exports.richtextpropertiesRichTextFontSchema;
|
|
1314
1539
|
/**
|
|
1315
1540
|
* Text style properties including spacing, line height, and transformations.
|
|
1316
1541
|
*/
|
|
1317
1542
|
exports.richtextpropertiesRichTextStyleSchema = zod_1.z.object({
|
|
1318
|
-
letterSpacing: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
return v;
|
|
1325
|
-
|
|
1543
|
+
letterSpacing: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1544
|
+
return undefined; if (Array.isArray(v))
|
|
1545
|
+
return v; if (typeof v === 'string') {
|
|
1546
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1547
|
+
return v;
|
|
1548
|
+
return Number(v);
|
|
1549
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1550
|
+
lineHeight: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1551
|
+
return undefined; if (Array.isArray(v))
|
|
1552
|
+
return v; if (typeof v === 'string') {
|
|
1553
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1554
|
+
return v;
|
|
1555
|
+
return Number(v);
|
|
1556
|
+
} return v; }), zod_1.z.number().gte(0).lte(10)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1.2),
|
|
1326
1557
|
textTransform: zod_1.z.optional(zod_1.z.enum(["none", "uppercase", "lowercase", "capitalize"])),
|
|
1327
1558
|
textDecoration: zod_1.z.optional(zod_1.z.enum(["none", "underline", "line-through"])),
|
|
1328
1559
|
gradient: zod_1.z.optional(exports.richtextpropertiesRichTextGradientSchema),
|
|
1329
|
-
})
|
|
1560
|
+
});
|
|
1330
1561
|
exports.richTextStyleSchema = exports.richtextpropertiesRichTextStyleSchema;
|
|
1331
1562
|
/**
|
|
1332
1563
|
* The RichTextAsset provides advanced text rendering with support for custom fonts, gradients, shadows, strokes,
|
|
@@ -1338,17 +1569,19 @@ exports.richtextassetRichTextAssetSchema = zod_1.z.object({
|
|
|
1338
1569
|
text: zod_1.z.string().max(5000),
|
|
1339
1570
|
font: zod_1.z.optional(exports.richtextpropertiesRichTextFontSchema),
|
|
1340
1571
|
style: zod_1.z.optional(exports.richtextpropertiesRichTextStyleSchema),
|
|
1341
|
-
stroke: zod_1.z.optional(exports.richtextpropertiesRichTextStrokeSchema),
|
|
1342
1572
|
shadow: zod_1.z.optional(exports.richtextpropertiesRichTextShadowSchema),
|
|
1343
1573
|
background: zod_1.z.optional(exports.richtextpropertiesRichTextBackgroundSchema),
|
|
1344
1574
|
border: zod_1.z.optional(exports.richtextpropertiesRichTextBorderSchema),
|
|
1345
|
-
padding: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1575
|
+
padding: zod_1.z.optional(zod_1.z.union([zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1576
|
+
return undefined; if (Array.isArray(v))
|
|
1577
|
+
return v; if (typeof v === 'string') {
|
|
1578
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1579
|
+
return v;
|
|
1580
|
+
return Number(v);
|
|
1581
|
+
} return v; }), zod_1.z.number().gte(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), exports.richtextpropertiesRichTextPaddingSchema])),
|
|
1349
1582
|
align: zod_1.z.optional(exports.richtextpropertiesRichTextAlignmentSchema),
|
|
1350
1583
|
animation: zod_1.z.optional(exports.richtextpropertiesRichTextAnimationSchema),
|
|
1351
|
-
})
|
|
1584
|
+
});
|
|
1352
1585
|
exports.richTextAssetSchema = exports.richtextassetRichTextAssetSchema;
|
|
1353
1586
|
/**
|
|
1354
1587
|
* The transfer request attributes inlcudling the user specified ID and status. Returned with [TransferResponseData](#tocs_transferresponsedata).
|
|
@@ -1358,7 +1591,7 @@ exports.transferresponseattributesTransferResponseAttributesSchema = zod_1.z.obj
|
|
|
1358
1591
|
owner: zod_1.z.optional(zod_1.z.string()),
|
|
1359
1592
|
status: zod_1.z.optional(zod_1.z.enum(["queued", "failed"])),
|
|
1360
1593
|
created: zod_1.z.optional(zod_1.z.string()),
|
|
1361
|
-
})
|
|
1594
|
+
});
|
|
1362
1595
|
exports.transferResponseAttributesSchema = exports.transferresponseattributesTransferResponseAttributesSchema;
|
|
1363
1596
|
/**
|
|
1364
1597
|
* The type of resource (an asset) and the transfer attributes. Returned with [TransferResponse](#tocs_transferresponse).
|
|
@@ -1366,14 +1599,14 @@ exports.transferResponseAttributesSchema = exports.transferresponseattributesTra
|
|
|
1366
1599
|
exports.transferresponsedataTransferResponseDataSchema = zod_1.z.object({
|
|
1367
1600
|
type: zod_1.z.optional(zod_1.z.string()),
|
|
1368
1601
|
attributes: zod_1.z.optional(exports.transferresponseattributesTransferResponseAttributesSchema),
|
|
1369
|
-
})
|
|
1602
|
+
});
|
|
1370
1603
|
exports.transferResponseDataSchema = exports.transferresponsedataTransferResponseDataSchema;
|
|
1371
1604
|
/**
|
|
1372
1605
|
* The response returned by the Serve API [transfer asset](#transfer-asset) request. The response includes the ID and transfer status. The response follows the [json:api](https://jsonapi.org/) specification.
|
|
1373
1606
|
*/
|
|
1374
1607
|
exports.transferresponseTransferResponseSchema = zod_1.z.object({
|
|
1375
1608
|
data: exports.transferresponsedataTransferResponseDataSchema,
|
|
1376
|
-
})
|
|
1609
|
+
});
|
|
1377
1610
|
exports.transferResponseSchema = exports.transferresponseTransferResponseSchema;
|
|
1378
1611
|
/**
|
|
1379
1612
|
* The asset URL to fetch and transfer to a destination.
|
|
@@ -1382,7 +1615,7 @@ exports.transferTransferSchema = zod_1.z.object({
|
|
|
1382
1615
|
url: zod_1.z.string(),
|
|
1383
1616
|
id: zod_1.z.string(),
|
|
1384
1617
|
destinations: zod_1.z.array(exports.destinationsDestinationsSchema),
|
|
1385
|
-
})
|
|
1618
|
+
});
|
|
1386
1619
|
exports.transferSchema = exports.transferTransferSchema;
|
|
1387
1620
|
/**
|
|
1388
1621
|
* The ShapeAsset is used to add shapes to a video. The shape can be styled with a fill and a stroke.
|
|
@@ -1392,73 +1625,109 @@ exports.transferSchema = exports.transferTransferSchema;
|
|
|
1392
1625
|
exports.shapeassetShapeAssetSchema = zod_1.z.object({
|
|
1393
1626
|
type: zod_1.z.enum(["shape"]),
|
|
1394
1627
|
shape: zod_1.z.enum(["rectangle", "circle", "line"]),
|
|
1395
|
-
width: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
return v;
|
|
1402
|
-
|
|
1628
|
+
width: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1629
|
+
return undefined; if (Array.isArray(v))
|
|
1630
|
+
return v; if (typeof v === 'string') {
|
|
1631
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1632
|
+
return v;
|
|
1633
|
+
return Number(v);
|
|
1634
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1635
|
+
height: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1636
|
+
return undefined; if (Array.isArray(v))
|
|
1637
|
+
return v; if (typeof v === 'string') {
|
|
1638
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1639
|
+
return v;
|
|
1640
|
+
return Number(v);
|
|
1641
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1403
1642
|
fill: zod_1.z.optional(zod_1.z.object({
|
|
1404
1643
|
color: zod_1.z.optional(zod_1.z.string()),
|
|
1405
|
-
opacity: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1644
|
+
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1645
|
+
return undefined; if (Array.isArray(v))
|
|
1646
|
+
return v; if (typeof v === 'string') {
|
|
1647
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1648
|
+
return v;
|
|
1649
|
+
return Number(v);
|
|
1650
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1409
1651
|
})),
|
|
1410
1652
|
stroke: zod_1.z.optional(zod_1.z.object({
|
|
1411
1653
|
color: zod_1.z.optional(zod_1.z.string()),
|
|
1412
|
-
width: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1654
|
+
width: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1655
|
+
return undefined; if (Array.isArray(v))
|
|
1656
|
+
return v; if (typeof v === 'string') {
|
|
1657
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1658
|
+
return v;
|
|
1659
|
+
return Number(v);
|
|
1660
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1416
1661
|
})),
|
|
1417
1662
|
rectangle: zod_1.z.optional(zod_1.z.object({
|
|
1418
|
-
width: zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
return v;
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1663
|
+
width: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1664
|
+
return undefined; if (Array.isArray(v))
|
|
1665
|
+
return v; if (typeof v === 'string') {
|
|
1666
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1667
|
+
return v;
|
|
1668
|
+
return Number(v);
|
|
1669
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1670
|
+
height: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1671
|
+
return undefined; if (Array.isArray(v))
|
|
1672
|
+
return v; if (typeof v === 'string') {
|
|
1673
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1674
|
+
return v;
|
|
1675
|
+
return Number(v);
|
|
1676
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1677
|
+
cornerRadius: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1678
|
+
return undefined; if (Array.isArray(v))
|
|
1679
|
+
return v; if (typeof v === 'string') {
|
|
1680
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1681
|
+
return v;
|
|
1682
|
+
return Number(v);
|
|
1683
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1430
1684
|
})),
|
|
1431
1685
|
circle: zod_1.z.optional(zod_1.z.object({
|
|
1432
|
-
radius: zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1686
|
+
radius: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1687
|
+
return undefined; if (Array.isArray(v))
|
|
1688
|
+
return v; if (typeof v === 'string') {
|
|
1689
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1690
|
+
return v;
|
|
1691
|
+
return Number(v);
|
|
1692
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1436
1693
|
})),
|
|
1437
1694
|
line: zod_1.z.optional(zod_1.z.object({
|
|
1438
|
-
length: zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
return v;
|
|
1445
|
-
|
|
1695
|
+
length: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1696
|
+
return undefined; if (Array.isArray(v))
|
|
1697
|
+
return v; if (typeof v === 'string') {
|
|
1698
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1699
|
+
return v;
|
|
1700
|
+
return Number(v);
|
|
1701
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1702
|
+
thickness: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1703
|
+
return undefined; if (Array.isArray(v))
|
|
1704
|
+
return v; if (typeof v === 'string') {
|
|
1705
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1706
|
+
return v;
|
|
1707
|
+
return Number(v);
|
|
1708
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1446
1709
|
})),
|
|
1447
|
-
})
|
|
1710
|
+
});
|
|
1448
1711
|
exports.shapeAssetSchema = exports.shapeassetShapeAssetSchema;
|
|
1449
1712
|
/**
|
|
1450
1713
|
* 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.
|
|
1451
1714
|
*/
|
|
1452
1715
|
exports.sizeSizeSchema = zod_1.z.object({
|
|
1453
|
-
width: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
return v;
|
|
1460
|
-
|
|
1461
|
-
|
|
1716
|
+
width: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1717
|
+
return undefined; if (Array.isArray(v))
|
|
1718
|
+
return v; if (typeof v === 'string') {
|
|
1719
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1720
|
+
return v;
|
|
1721
|
+
return Number(v);
|
|
1722
|
+
} return v; }), zod_1.z.number().int().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1723
|
+
height: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1724
|
+
return undefined; if (Array.isArray(v))
|
|
1725
|
+
return v; if (typeof v === 'string') {
|
|
1726
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1727
|
+
return v;
|
|
1728
|
+
return Number(v);
|
|
1729
|
+
} return v; }), zod_1.z.number().int().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1730
|
+
});
|
|
1462
1731
|
exports.sizeSchema = exports.sizeSizeSchema;
|
|
1463
1732
|
/**
|
|
1464
1733
|
* A rendition is a new output file that is generated from the source. The rendition can be encoded to a different format and have transformations applied to it such as resizing, cropping, etc...
|
|
@@ -1484,10 +1753,13 @@ exports.renditionRenditionSchema = zod_1.z.object({
|
|
|
1484
1753
|
size: zod_1.z.optional(exports.sizeSizeSchema),
|
|
1485
1754
|
fit: zod_1.z.optional(zod_1.z.enum(["cover", "contain", "crop"])),
|
|
1486
1755
|
resolution: zod_1.z.optional(zod_1.z.enum(["preview", "mobile", "sd", "hd", "fhd"])),
|
|
1487
|
-
quality: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1756
|
+
quality: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1757
|
+
return undefined; if (Array.isArray(v))
|
|
1758
|
+
return v; if (typeof v === 'string') {
|
|
1759
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1760
|
+
return v;
|
|
1761
|
+
return Number(v);
|
|
1762
|
+
} return v; }), zod_1.z.number().int().gte(1).lte(100)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1491
1763
|
fps: zod_1.z.optional(zod_1.z.union([
|
|
1492
1764
|
zod_1.z.literal(12),
|
|
1493
1765
|
zod_1.z.literal(15),
|
|
@@ -1502,15 +1774,18 @@ exports.renditionRenditionSchema = zod_1.z.object({
|
|
|
1502
1774
|
zod_1.z.literal(60),
|
|
1503
1775
|
])),
|
|
1504
1776
|
speed: zod_1.z.optional(exports.speedSpeedSchema),
|
|
1505
|
-
keyframeInterval: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1777
|
+
keyframeInterval: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1778
|
+
return undefined; if (Array.isArray(v))
|
|
1779
|
+
return v; if (typeof v === 'string') {
|
|
1780
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1781
|
+
return v;
|
|
1782
|
+
return Number(v);
|
|
1783
|
+
} return v; }), zod_1.z.number().int().gte(1).lte(300)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1509
1784
|
fixOffset: zod_1.z.optional(zod_1.z.boolean()),
|
|
1510
1785
|
fixRotation: zod_1.z.optional(zod_1.z.boolean()),
|
|
1511
1786
|
enhance: zod_1.z.optional(exports.enhancementsEnhancementsSchema),
|
|
1512
1787
|
filename: zod_1.z.optional(zod_1.z.string()),
|
|
1513
|
-
})
|
|
1788
|
+
});
|
|
1514
1789
|
exports.renditionSchema = exports.renditionRenditionSchema;
|
|
1515
1790
|
/**
|
|
1516
1791
|
* The output renditions and transformations that should be generated from the source file.
|
|
@@ -1518,7 +1793,7 @@ exports.renditionSchema = exports.renditionRenditionSchema;
|
|
|
1518
1793
|
exports.outputsOutputsSchema = zod_1.z.object({
|
|
1519
1794
|
renditions: zod_1.z.optional(zod_1.z.array(exports.renditionRenditionSchema)),
|
|
1520
1795
|
transcription: zod_1.z.optional(exports.transcriptionTranscriptionSchema),
|
|
1521
|
-
})
|
|
1796
|
+
});
|
|
1522
1797
|
exports.outputsSchema = exports.outputsOutputsSchema;
|
|
1523
1798
|
/**
|
|
1524
1799
|
* The id and attributes of the generated rendition file.
|
|
@@ -1534,35 +1809,50 @@ exports.renditionresponseattributesRenditionResponseAttributesSchema = zod_1.z.o
|
|
|
1534
1809
|
"overwritten",
|
|
1535
1810
|
])),
|
|
1536
1811
|
url: zod_1.z.optional(zod_1.z.string()),
|
|
1537
|
-
executionTime: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1812
|
+
executionTime: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1813
|
+
return undefined; if (Array.isArray(v))
|
|
1814
|
+
return v; if (typeof v === 'string') {
|
|
1815
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1816
|
+
return v;
|
|
1817
|
+
return Number(v);
|
|
1818
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1541
1819
|
transformation: zod_1.z.optional(exports.renditionRenditionSchema),
|
|
1542
|
-
width: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
return v;
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
return
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1820
|
+
width: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1821
|
+
return undefined; if (Array.isArray(v))
|
|
1822
|
+
return v; if (typeof v === 'string') {
|
|
1823
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1824
|
+
return v;
|
|
1825
|
+
return Number(v);
|
|
1826
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1827
|
+
height: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1828
|
+
return undefined; if (Array.isArray(v))
|
|
1829
|
+
return v; if (typeof v === 'string') {
|
|
1830
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1831
|
+
return v;
|
|
1832
|
+
return Number(v);
|
|
1833
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1834
|
+
duration: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1835
|
+
return undefined; if (Array.isArray(v))
|
|
1836
|
+
return v; if (typeof v === 'string') {
|
|
1837
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1838
|
+
return v;
|
|
1839
|
+
return Number(v);
|
|
1840
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1841
|
+
fps: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1842
|
+
return undefined; if (Array.isArray(v))
|
|
1843
|
+
return v; if (typeof v === 'string') {
|
|
1844
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1845
|
+
return v;
|
|
1846
|
+
return Number(v);
|
|
1847
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1848
|
+
});
|
|
1559
1849
|
exports.renditionResponseAttributesSchema = exports.renditionresponseattributesRenditionResponseAttributesSchema;
|
|
1560
1850
|
/**
|
|
1561
1851
|
* The list of outputs generated from the source file. Currently supports renditions which are versions of the source file with different transformations applied.
|
|
1562
1852
|
*/
|
|
1563
1853
|
exports.outputsresponseOutputsResponseSchema = zod_1.z.object({
|
|
1564
1854
|
renditions: zod_1.z.optional(zod_1.z.array(exports.renditionresponseattributesRenditionResponseAttributesSchema)),
|
|
1565
|
-
})
|
|
1855
|
+
});
|
|
1566
1856
|
exports.outputsResponseSchema = exports.outputsresponseOutputsResponseSchema;
|
|
1567
1857
|
/**
|
|
1568
1858
|
* The id and attributes of the source file.
|
|
@@ -1581,25 +1871,37 @@ exports.sourceresponseattributesSourceResponseAttributesSchema = zod_1.z.object(
|
|
|
1581
1871
|
"overwritten",
|
|
1582
1872
|
])),
|
|
1583
1873
|
outputs: zod_1.z.optional(exports.outputsresponseOutputsResponseSchema),
|
|
1584
|
-
width: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
return v;
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
return
|
|
1598
|
-
|
|
1599
|
-
|
|
1874
|
+
width: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1875
|
+
return undefined; if (Array.isArray(v))
|
|
1876
|
+
return v; if (typeof v === 'string') {
|
|
1877
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1878
|
+
return v;
|
|
1879
|
+
return Number(v);
|
|
1880
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1881
|
+
height: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1882
|
+
return undefined; if (Array.isArray(v))
|
|
1883
|
+
return v; if (typeof v === 'string') {
|
|
1884
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1885
|
+
return v;
|
|
1886
|
+
return Number(v);
|
|
1887
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1888
|
+
duration: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1889
|
+
return undefined; if (Array.isArray(v))
|
|
1890
|
+
return v; if (typeof v === 'string') {
|
|
1891
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1892
|
+
return v;
|
|
1893
|
+
return Number(v);
|
|
1894
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1895
|
+
fps: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1896
|
+
return undefined; if (Array.isArray(v))
|
|
1897
|
+
return v; if (typeof v === 'string') {
|
|
1898
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1899
|
+
return v;
|
|
1900
|
+
return Number(v);
|
|
1901
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1600
1902
|
created: zod_1.z.optional(zod_1.z.string()),
|
|
1601
1903
|
updated: zod_1.z.optional(zod_1.z.string()),
|
|
1602
|
-
})
|
|
1904
|
+
});
|
|
1603
1905
|
exports.sourceResponseAttributesSchema = exports.sourceresponseattributesSourceResponseAttributesSchema;
|
|
1604
1906
|
/**
|
|
1605
1907
|
* The type of resource (a source), it's id and attributes of the source file.
|
|
@@ -1608,21 +1910,21 @@ exports.sourceresponsedataSourceResponseDataSchema = zod_1.z.object({
|
|
|
1608
1910
|
type: zod_1.z.string(),
|
|
1609
1911
|
id: zod_1.z.string(),
|
|
1610
1912
|
attributes: exports.sourceresponseattributesSourceResponseAttributesSchema,
|
|
1611
|
-
})
|
|
1913
|
+
});
|
|
1612
1914
|
exports.sourceResponseDataSchema = exports.sourceresponsedataSourceResponseDataSchema;
|
|
1613
1915
|
/**
|
|
1614
1916
|
* A list of all ingested source files fetched or uploaded to a users account.
|
|
1615
1917
|
*/
|
|
1616
1918
|
exports.sourcelistresponseSourceListResponseSchema = zod_1.z.object({
|
|
1617
1919
|
data: zod_1.z.array(exports.sourceresponsedataSourceResponseDataSchema),
|
|
1618
|
-
})
|
|
1920
|
+
});
|
|
1619
1921
|
exports.sourceListResponseSchema = exports.sourcelistresponseSourceListResponseSchema;
|
|
1620
1922
|
/**
|
|
1621
1923
|
* The response returned by the Ingest API [get source](#get-source) request. Includes details of the ingested source file. The response follows the [json:api](https://jsonapi.org/) specification.
|
|
1622
1924
|
*/
|
|
1623
1925
|
exports.sourceresponseSourceResponseSchema = zod_1.z.object({
|
|
1624
1926
|
data: exports.sourceresponsedataSourceResponseDataSchema,
|
|
1625
|
-
})
|
|
1927
|
+
});
|
|
1626
1928
|
exports.sourceResponseSchema = exports.sourceresponseSourceResponseSchema;
|
|
1627
1929
|
/**
|
|
1628
1930
|
* The details of the file to be ingested and any transformations to be applied. Once the source file has been ingested, new renditions can be created from it. The renditions are specified in the **outputs** property.
|
|
@@ -1633,7 +1935,7 @@ exports.sourceSourceSchema = zod_1.z.object({
|
|
|
1633
1935
|
outputs: zod_1.z.optional(exports.outputsOutputsSchema),
|
|
1634
1936
|
destinations: zod_1.z.optional(exports.destinationsDestinationsSchema),
|
|
1635
1937
|
callback: zod_1.z.optional(zod_1.z.string()),
|
|
1636
|
-
})
|
|
1938
|
+
});
|
|
1637
1939
|
exports.sourceSchema = exports.sourceSourceSchema;
|
|
1638
1940
|
/**
|
|
1639
1941
|
* A music or audio file in mp3 format that plays for the duration of the rendered video or the length of the audio file, which ever is shortest.
|
|
@@ -1641,11 +1943,14 @@ exports.sourceSchema = exports.sourceSourceSchema;
|
|
|
1641
1943
|
exports.soundtrackSoundtrackSchema = zod_1.z.object({
|
|
1642
1944
|
src: zod_1.z.string().min(1).regex(/\S/),
|
|
1643
1945
|
effect: zod_1.z.optional(zod_1.z.enum(["fadeIn", "fadeOut", "fadeInFadeOut"])),
|
|
1644
|
-
volume: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1946
|
+
volume: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1947
|
+
return undefined; if (Array.isArray(v))
|
|
1948
|
+
return v; if (typeof v === 'string') {
|
|
1949
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1950
|
+
return v;
|
|
1951
|
+
return Number(v);
|
|
1952
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1953
|
+
});
|
|
1649
1954
|
exports.soundtrackSchema = exports.soundtrackSoundtrackSchema;
|
|
1650
1955
|
/**
|
|
1651
1956
|
* A color stop in a gradient. Each stop defines a color at a specific position
|
|
@@ -1653,12 +1958,15 @@ exports.soundtrackSchema = exports.soundtrackSoundtrackSchema;
|
|
|
1653
1958
|
*
|
|
1654
1959
|
*/
|
|
1655
1960
|
exports.svgpropertiesSvgGradientStopSchema = zod_1.z.object({
|
|
1656
|
-
offset: zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1961
|
+
offset: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1962
|
+
return undefined; if (Array.isArray(v))
|
|
1963
|
+
return v; if (typeof v === 'string') {
|
|
1964
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1965
|
+
return v;
|
|
1966
|
+
return Number(v);
|
|
1967
|
+
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
1968
|
+
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*\}\}$/)]),
|
|
1969
|
+
});
|
|
1662
1970
|
exports.svgGradientStopSchema = exports.svgpropertiesSvgGradientStopSchema;
|
|
1663
1971
|
/**
|
|
1664
1972
|
* A linear gradient fill that transitions colors along a straight line.
|
|
@@ -1667,16 +1975,22 @@ exports.svgGradientStopSchema = exports.svgpropertiesSvgGradientStopSchema;
|
|
|
1667
1975
|
*/
|
|
1668
1976
|
exports.svgpropertiesSvgLinearGradientFillSchema = zod_1.z.object({
|
|
1669
1977
|
type: zod_1.z.enum(["linear"]),
|
|
1670
|
-
angle: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1978
|
+
angle: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1979
|
+
return undefined; if (Array.isArray(v))
|
|
1980
|
+
return v; if (typeof v === 'string') {
|
|
1981
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1982
|
+
return v;
|
|
1983
|
+
return Number(v);
|
|
1984
|
+
} return v; }), zod_1.z.number().gte(0).lte(360)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
1674
1985
|
stops: zod_1.z.array(exports.svgpropertiesSvgGradientStopSchema).min(2),
|
|
1675
|
-
opacity: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1986
|
+
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1987
|
+
return undefined; if (Array.isArray(v))
|
|
1988
|
+
return v; if (typeof v === 'string') {
|
|
1989
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1990
|
+
return v;
|
|
1991
|
+
return Number(v);
|
|
1992
|
+
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1993
|
+
});
|
|
1680
1994
|
exports.svgLinearGradientFillSchema = exports.svgpropertiesSvgLinearGradientFillSchema;
|
|
1681
1995
|
/**
|
|
1682
1996
|
* A radial gradient fill that transitions colors radiating outward from a center point.
|
|
@@ -1686,35 +2000,50 @@ exports.svgLinearGradientFillSchema = exports.svgpropertiesSvgLinearGradientFill
|
|
|
1686
2000
|
exports.svgpropertiesSvgRadialGradientFillSchema = zod_1.z.object({
|
|
1687
2001
|
type: zod_1.z.enum(["radial"]),
|
|
1688
2002
|
stops: zod_1.z.array(exports.svgpropertiesSvgGradientStopSchema).min(2),
|
|
1689
|
-
opacity: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
2003
|
+
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2004
|
+
return undefined; if (Array.isArray(v))
|
|
2005
|
+
return v; if (typeof v === 'string') {
|
|
2006
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2007
|
+
return v;
|
|
2008
|
+
return Number(v);
|
|
2009
|
+
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
2010
|
+
});
|
|
1694
2011
|
exports.svgRadialGradientFillSchema = exports.svgpropertiesSvgRadialGradientFillSchema;
|
|
1695
2012
|
/**
|
|
1696
2013
|
* Drop shadow properties for SVG shapes. Creates a shadow effect behind the shape.
|
|
1697
2014
|
*
|
|
1698
2015
|
*/
|
|
1699
2016
|
exports.svgpropertiesSvgShadowSchema = zod_1.z.object({
|
|
1700
|
-
offsetX: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
return v;
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
}
|
|
2017
|
+
offsetX: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2018
|
+
return undefined; if (Array.isArray(v))
|
|
2019
|
+
return v; if (typeof v === 'string') {
|
|
2020
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2021
|
+
return v;
|
|
2022
|
+
return Number(v);
|
|
2023
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
2024
|
+
offsetY: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2025
|
+
return undefined; if (Array.isArray(v))
|
|
2026
|
+
return v; if (typeof v === 'string') {
|
|
2027
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2028
|
+
return v;
|
|
2029
|
+
return Number(v);
|
|
2030
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
2031
|
+
blur: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2032
|
+
return undefined; if (Array.isArray(v))
|
|
2033
|
+
return v; if (typeof v === 'string') {
|
|
2034
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2035
|
+
return v;
|
|
2036
|
+
return Number(v);
|
|
2037
|
+
} return v; }), zod_1.z.number().gte(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
2038
|
+
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"),
|
|
2039
|
+
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2040
|
+
return undefined; if (Array.isArray(v))
|
|
2041
|
+
return v; if (typeof v === 'string') {
|
|
2042
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2043
|
+
return v;
|
|
2044
|
+
return Number(v);
|
|
2045
|
+
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5),
|
|
2046
|
+
});
|
|
1718
2047
|
exports.svgShadowSchema = exports.svgpropertiesSvgShadowSchema;
|
|
1719
2048
|
/**
|
|
1720
2049
|
* A solid color fill for SVG shapes.
|
|
@@ -1725,11 +2054,14 @@ exports.svgpropertiesSvgSolidFillSchema = zod_1.z.object({
|
|
|
1725
2054
|
.string()
|
|
1726
2055
|
.regex(/^#[A-Fa-f0-9]{6}$/)
|
|
1727
2056
|
.default("#000000"),
|
|
1728
|
-
opacity: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
2057
|
+
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2058
|
+
return undefined; if (Array.isArray(v))
|
|
2059
|
+
return v; if (typeof v === 'string') {
|
|
2060
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2061
|
+
return v;
|
|
2062
|
+
return Number(v);
|
|
2063
|
+
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
2064
|
+
});
|
|
1733
2065
|
exports.svgSolidFillSchema = exports.svgpropertiesSvgSolidFillSchema;
|
|
1734
2066
|
/**
|
|
1735
2067
|
* Fill properties for SVG shapes. Supports solid colors and gradients.
|
|
@@ -1748,57 +2080,87 @@ exports.svgFillSchema = exports.svgpropertiesSvgFillSchema;
|
|
|
1748
2080
|
*
|
|
1749
2081
|
*/
|
|
1750
2082
|
exports.svgpropertiesSvgStrokeSchema = zod_1.z.object({
|
|
1751
|
-
color: zod_1.z.optional(zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#000000"),
|
|
1752
|
-
width: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
return v;
|
|
1759
|
-
|
|
2083
|
+
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"),
|
|
2084
|
+
width: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2085
|
+
return undefined; if (Array.isArray(v))
|
|
2086
|
+
return v; if (typeof v === 'string') {
|
|
2087
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2088
|
+
return v;
|
|
2089
|
+
return Number(v);
|
|
2090
|
+
} return v; }), zod_1.z.number().gte(0).lte(100)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
2091
|
+
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2092
|
+
return undefined; if (Array.isArray(v))
|
|
2093
|
+
return v; if (typeof v === 'string') {
|
|
2094
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2095
|
+
return v;
|
|
2096
|
+
return Number(v);
|
|
2097
|
+
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
1760
2098
|
lineCap: zod_1.z.optional(zod_1.z.enum(["butt", "round", "square"])),
|
|
1761
2099
|
lineJoin: zod_1.z.optional(zod_1.z.enum(["miter", "round", "bevel"])),
|
|
1762
|
-
dashArray: zod_1.z.optional(zod_1.z.array(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
return v;
|
|
1769
|
-
|
|
1770
|
-
|
|
2100
|
+
dashArray: zod_1.z.optional(zod_1.z.array(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2101
|
+
return undefined; if (Array.isArray(v))
|
|
2102
|
+
return v; if (typeof v === 'string') {
|
|
2103
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2104
|
+
return v;
|
|
2105
|
+
return Number(v);
|
|
2106
|
+
} return v; }), zod_1.z.number().gte(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))),
|
|
2107
|
+
dashOffset: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2108
|
+
return undefined; if (Array.isArray(v))
|
|
2109
|
+
return v; if (typeof v === 'string') {
|
|
2110
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2111
|
+
return v;
|
|
2112
|
+
return Number(v);
|
|
2113
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
2114
|
+
});
|
|
1771
2115
|
exports.svgStrokeSchema = exports.svgpropertiesSvgStrokeSchema;
|
|
1772
2116
|
/**
|
|
1773
2117
|
* Transformation properties for positioning, rotating, and scaling SVG shapes.
|
|
1774
2118
|
*
|
|
1775
2119
|
*/
|
|
1776
2120
|
exports.svgpropertiesSvgTransformSchema = zod_1.z.object({
|
|
1777
|
-
x: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
return v;
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
return
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
}
|
|
2121
|
+
x: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2122
|
+
return undefined; if (Array.isArray(v))
|
|
2123
|
+
return v; if (typeof v === 'string') {
|
|
2124
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2125
|
+
return v;
|
|
2126
|
+
return Number(v);
|
|
2127
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
2128
|
+
y: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2129
|
+
return undefined; if (Array.isArray(v))
|
|
2130
|
+
return v; if (typeof v === 'string') {
|
|
2131
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2132
|
+
return v;
|
|
2133
|
+
return Number(v);
|
|
2134
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
2135
|
+
rotation: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2136
|
+
return undefined; if (Array.isArray(v))
|
|
2137
|
+
return v; if (typeof v === 'string') {
|
|
2138
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2139
|
+
return v;
|
|
2140
|
+
return Number(v);
|
|
2141
|
+
} return v; }), zod_1.z.number().gte(-360).lte(360)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
2142
|
+
scale: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2143
|
+
return undefined; if (Array.isArray(v))
|
|
2144
|
+
return v; if (typeof v === 'string') {
|
|
2145
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2146
|
+
return v;
|
|
2147
|
+
return Number(v);
|
|
2148
|
+
} return v; }), zod_1.z.number().gte(0.01).lte(100)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
2149
|
+
originX: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2150
|
+
return undefined; if (Array.isArray(v))
|
|
2151
|
+
return v; if (typeof v === 'string') {
|
|
2152
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2153
|
+
return v;
|
|
2154
|
+
return Number(v);
|
|
2155
|
+
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5),
|
|
2156
|
+
originY: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2157
|
+
return undefined; if (Array.isArray(v))
|
|
2158
|
+
return v; if (typeof v === 'string') {
|
|
2159
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2160
|
+
return v;
|
|
2161
|
+
return Number(v);
|
|
2162
|
+
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5),
|
|
2163
|
+
});
|
|
1802
2164
|
exports.svgTransformSchema = exports.svgpropertiesSvgTransformSchema;
|
|
1803
2165
|
/**
|
|
1804
2166
|
* An arrow shape pointing to the right by default.
|
|
@@ -1807,23 +2169,35 @@ exports.svgTransformSchema = exports.svgpropertiesSvgTransformSchema;
|
|
|
1807
2169
|
*/
|
|
1808
2170
|
exports.svgshapesSvgArrowShapeSchema = zod_1.z.object({
|
|
1809
2171
|
type: zod_1.z.enum(["arrow"]),
|
|
1810
|
-
length: zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
return v;
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
return
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
2172
|
+
length: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2173
|
+
return undefined; if (Array.isArray(v))
|
|
2174
|
+
return v; if (typeof v === 'string') {
|
|
2175
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2176
|
+
return v;
|
|
2177
|
+
return Number(v);
|
|
2178
|
+
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2179
|
+
headWidth: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2180
|
+
return undefined; if (Array.isArray(v))
|
|
2181
|
+
return v; if (typeof v === 'string') {
|
|
2182
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2183
|
+
return v;
|
|
2184
|
+
return Number(v);
|
|
2185
|
+
} return v; }), zod_1.z.number().gte(1).lte(1000)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2186
|
+
headLength: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2187
|
+
return undefined; if (Array.isArray(v))
|
|
2188
|
+
return v; if (typeof v === 'string') {
|
|
2189
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2190
|
+
return v;
|
|
2191
|
+
return Number(v);
|
|
2192
|
+
} return v; }), zod_1.z.number().gte(1).lte(1000)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2193
|
+
shaftWidth: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2194
|
+
return undefined; if (Array.isArray(v))
|
|
2195
|
+
return v; if (typeof v === 'string') {
|
|
2196
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2197
|
+
return v;
|
|
2198
|
+
return Number(v);
|
|
2199
|
+
} return v; }), zod_1.z.number().gte(1).lte(1000)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2200
|
+
});
|
|
1827
2201
|
exports.svgArrowShapeSchema = exports.svgshapesSvgArrowShapeSchema;
|
|
1828
2202
|
/**
|
|
1829
2203
|
* A perfect circle shape defined by its radius.
|
|
@@ -1832,11 +2206,14 @@ exports.svgArrowShapeSchema = exports.svgshapesSvgArrowShapeSchema;
|
|
|
1832
2206
|
*/
|
|
1833
2207
|
exports.svgshapesSvgCircleShapeSchema = zod_1.z.object({
|
|
1834
2208
|
type: zod_1.z.enum(["circle"]),
|
|
1835
|
-
radius: zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
2209
|
+
radius: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2210
|
+
return undefined; if (Array.isArray(v))
|
|
2211
|
+
return v; if (typeof v === 'string') {
|
|
2212
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2213
|
+
return v;
|
|
2214
|
+
return Number(v);
|
|
2215
|
+
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2216
|
+
});
|
|
1840
2217
|
exports.svgCircleShapeSchema = exports.svgshapesSvgCircleShapeSchema;
|
|
1841
2218
|
/**
|
|
1842
2219
|
* A cross or plus shape with equal or different arm lengths.
|
|
@@ -1845,19 +2222,28 @@ exports.svgCircleShapeSchema = exports.svgshapesSvgCircleShapeSchema;
|
|
|
1845
2222
|
*/
|
|
1846
2223
|
exports.svgshapesSvgCrossShapeSchema = zod_1.z.object({
|
|
1847
2224
|
type: zod_1.z.enum(["cross"]),
|
|
1848
|
-
width: zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
return v;
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
2225
|
+
width: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2226
|
+
return undefined; if (Array.isArray(v))
|
|
2227
|
+
return v; if (typeof v === 'string') {
|
|
2228
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2229
|
+
return v;
|
|
2230
|
+
return Number(v);
|
|
2231
|
+
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2232
|
+
height: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2233
|
+
return undefined; if (Array.isArray(v))
|
|
2234
|
+
return v; if (typeof v === 'string') {
|
|
2235
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2236
|
+
return v;
|
|
2237
|
+
return Number(v);
|
|
2238
|
+
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2239
|
+
thickness: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2240
|
+
return undefined; if (Array.isArray(v))
|
|
2241
|
+
return v; if (typeof v === 'string') {
|
|
2242
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2243
|
+
return v;
|
|
2244
|
+
return Number(v);
|
|
2245
|
+
} return v; }), zod_1.z.number().gte(1).lte(500)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2246
|
+
});
|
|
1861
2247
|
exports.svgCrossShapeSchema = exports.svgshapesSvgCrossShapeSchema;
|
|
1862
2248
|
/**
|
|
1863
2249
|
* An ellipse (oval) shape with separate horizontal and vertical radii.
|
|
@@ -1866,15 +2252,21 @@ exports.svgCrossShapeSchema = exports.svgshapesSvgCrossShapeSchema;
|
|
|
1866
2252
|
*/
|
|
1867
2253
|
exports.svgshapesSvgEllipseShapeSchema = zod_1.z.object({
|
|
1868
2254
|
type: zod_1.z.enum(["ellipse"]),
|
|
1869
|
-
radiusX: zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
return v;
|
|
1876
|
-
|
|
1877
|
-
|
|
2255
|
+
radiusX: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2256
|
+
return undefined; if (Array.isArray(v))
|
|
2257
|
+
return v; if (typeof v === 'string') {
|
|
2258
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2259
|
+
return v;
|
|
2260
|
+
return Number(v);
|
|
2261
|
+
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2262
|
+
radiusY: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2263
|
+
return undefined; if (Array.isArray(v))
|
|
2264
|
+
return v; if (typeof v === 'string') {
|
|
2265
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2266
|
+
return v;
|
|
2267
|
+
return Number(v);
|
|
2268
|
+
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2269
|
+
});
|
|
1878
2270
|
exports.svgEllipseShapeSchema = exports.svgshapesSvgEllipseShapeSchema;
|
|
1879
2271
|
/**
|
|
1880
2272
|
* A heart shape commonly used for love/like icons.
|
|
@@ -1883,11 +2275,14 @@ exports.svgEllipseShapeSchema = exports.svgshapesSvgEllipseShapeSchema;
|
|
|
1883
2275
|
*/
|
|
1884
2276
|
exports.svgshapesSvgHeartShapeSchema = zod_1.z.object({
|
|
1885
2277
|
type: zod_1.z.enum(["heart"]),
|
|
1886
|
-
size: zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
2278
|
+
size: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2279
|
+
return undefined; if (Array.isArray(v))
|
|
2280
|
+
return v; if (typeof v === 'string') {
|
|
2281
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2282
|
+
return v;
|
|
2283
|
+
return Number(v);
|
|
2284
|
+
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2285
|
+
});
|
|
1891
2286
|
exports.svgHeartShapeSchema = exports.svgshapesSvgHeartShapeSchema;
|
|
1892
2287
|
/**
|
|
1893
2288
|
* A straight line shape with a specified length and thickness.
|
|
@@ -1896,15 +2291,21 @@ exports.svgHeartShapeSchema = exports.svgshapesSvgHeartShapeSchema;
|
|
|
1896
2291
|
*/
|
|
1897
2292
|
exports.svgshapesSvgLineShapeSchema = zod_1.z.object({
|
|
1898
2293
|
type: zod_1.z.enum(["line"]),
|
|
1899
|
-
length: zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
return v;
|
|
1906
|
-
|
|
1907
|
-
|
|
2294
|
+
length: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2295
|
+
return undefined; if (Array.isArray(v))
|
|
2296
|
+
return v; if (typeof v === 'string') {
|
|
2297
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2298
|
+
return v;
|
|
2299
|
+
return Number(v);
|
|
2300
|
+
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2301
|
+
thickness: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2302
|
+
return undefined; if (Array.isArray(v))
|
|
2303
|
+
return v; if (typeof v === 'string') {
|
|
2304
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2305
|
+
return v;
|
|
2306
|
+
return Number(v);
|
|
2307
|
+
} return v; }), zod_1.z.number().gte(1).lte(500)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2308
|
+
});
|
|
1908
2309
|
exports.svgLineShapeSchema = exports.svgshapesSvgLineShapeSchema;
|
|
1909
2310
|
/**
|
|
1910
2311
|
* A custom shape defined by SVG path data.
|
|
@@ -1926,7 +2327,7 @@ exports.svgLineShapeSchema = exports.svgshapesSvgLineShapeSchema;
|
|
|
1926
2327
|
exports.svgshapesSvgPathShapeSchema = zod_1.z.object({
|
|
1927
2328
|
type: zod_1.z.enum(["path"]),
|
|
1928
2329
|
d: zod_1.z.string().min(1).max(100000),
|
|
1929
|
-
})
|
|
2330
|
+
});
|
|
1930
2331
|
exports.svgPathShapeSchema = exports.svgshapesSvgPathShapeSchema;
|
|
1931
2332
|
/**
|
|
1932
2333
|
* A regular polygon shape with a specified number of sides.
|
|
@@ -1936,15 +2337,21 @@ exports.svgPathShapeSchema = exports.svgshapesSvgPathShapeSchema;
|
|
|
1936
2337
|
*/
|
|
1937
2338
|
exports.svgshapesSvgPolygonShapeSchema = zod_1.z.object({
|
|
1938
2339
|
type: zod_1.z.enum(["polygon"]),
|
|
1939
|
-
sides: zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
return v;
|
|
1946
|
-
|
|
1947
|
-
|
|
2340
|
+
sides: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2341
|
+
return undefined; if (Array.isArray(v))
|
|
2342
|
+
return v; if (typeof v === 'string') {
|
|
2343
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2344
|
+
return v;
|
|
2345
|
+
return Number(v);
|
|
2346
|
+
} return v; }), zod_1.z.number().int().gte(3).lte(100)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2347
|
+
radius: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2348
|
+
return undefined; if (Array.isArray(v))
|
|
2349
|
+
return v; if (typeof v === 'string') {
|
|
2350
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2351
|
+
return v;
|
|
2352
|
+
return Number(v);
|
|
2353
|
+
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2354
|
+
});
|
|
1948
2355
|
exports.svgPolygonShapeSchema = exports.svgshapesSvgPolygonShapeSchema;
|
|
1949
2356
|
/**
|
|
1950
2357
|
* A rectangle shape with optional rounded corners.
|
|
@@ -1953,19 +2360,28 @@ exports.svgPolygonShapeSchema = exports.svgshapesSvgPolygonShapeSchema;
|
|
|
1953
2360
|
*/
|
|
1954
2361
|
exports.svgshapesSvgRectangleShapeSchema = zod_1.z.object({
|
|
1955
2362
|
type: zod_1.z.enum(["rectangle"]),
|
|
1956
|
-
width: zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
return v;
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
2363
|
+
width: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2364
|
+
return undefined; if (Array.isArray(v))
|
|
2365
|
+
return v; if (typeof v === 'string') {
|
|
2366
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2367
|
+
return v;
|
|
2368
|
+
return Number(v);
|
|
2369
|
+
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2370
|
+
height: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2371
|
+
return undefined; if (Array.isArray(v))
|
|
2372
|
+
return v; if (typeof v === 'string') {
|
|
2373
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2374
|
+
return v;
|
|
2375
|
+
return Number(v);
|
|
2376
|
+
} return v; }), zod_1.z.number().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2377
|
+
cornerRadius: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2378
|
+
return undefined; if (Array.isArray(v))
|
|
2379
|
+
return v; if (typeof v === 'string') {
|
|
2380
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2381
|
+
return v;
|
|
2382
|
+
return Number(v);
|
|
2383
|
+
} return v; }), zod_1.z.number().gte(0).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
|
|
2384
|
+
});
|
|
1969
2385
|
exports.svgRectangleShapeSchema = exports.svgshapesSvgRectangleShapeSchema;
|
|
1970
2386
|
/**
|
|
1971
2387
|
* A ring (donut/annulus) shape - a circle with a circular hole in the center.
|
|
@@ -1974,15 +2390,21 @@ exports.svgRectangleShapeSchema = exports.svgshapesSvgRectangleShapeSchema;
|
|
|
1974
2390
|
*/
|
|
1975
2391
|
exports.svgshapesSvgRingShapeSchema = zod_1.z.object({
|
|
1976
2392
|
type: zod_1.z.enum(["ring"]),
|
|
1977
|
-
outerRadius: zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
return v;
|
|
1984
|
-
|
|
1985
|
-
|
|
2393
|
+
outerRadius: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2394
|
+
return undefined; if (Array.isArray(v))
|
|
2395
|
+
return v; if (typeof v === 'string') {
|
|
2396
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2397
|
+
return v;
|
|
2398
|
+
return Number(v);
|
|
2399
|
+
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2400
|
+
innerRadius: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2401
|
+
return undefined; if (Array.isArray(v))
|
|
2402
|
+
return v; if (typeof v === 'string') {
|
|
2403
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2404
|
+
return v;
|
|
2405
|
+
return Number(v);
|
|
2406
|
+
} return v; }), zod_1.z.number().gte(0).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2407
|
+
});
|
|
1986
2408
|
exports.svgRingShapeSchema = exports.svgshapesSvgRingShapeSchema;
|
|
1987
2409
|
/**
|
|
1988
2410
|
* A star shape with a specified number of points.
|
|
@@ -1992,19 +2414,28 @@ exports.svgRingShapeSchema = exports.svgshapesSvgRingShapeSchema;
|
|
|
1992
2414
|
*/
|
|
1993
2415
|
exports.svgshapesSvgStarShapeSchema = zod_1.z.object({
|
|
1994
2416
|
type: zod_1.z.enum(["star"]),
|
|
1995
|
-
points: zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
return v;
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2417
|
+
points: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2418
|
+
return undefined; if (Array.isArray(v))
|
|
2419
|
+
return v; if (typeof v === 'string') {
|
|
2420
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2421
|
+
return v;
|
|
2422
|
+
return Number(v);
|
|
2423
|
+
} return v; }), zod_1.z.number().int().gte(3).lte(100)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2424
|
+
outerRadius: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2425
|
+
return undefined; if (Array.isArray(v))
|
|
2426
|
+
return v; if (typeof v === 'string') {
|
|
2427
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2428
|
+
return v;
|
|
2429
|
+
return Number(v);
|
|
2430
|
+
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2431
|
+
innerRadius: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2432
|
+
return undefined; if (Array.isArray(v))
|
|
2433
|
+
return v; if (typeof v === 'string') {
|
|
2434
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2435
|
+
return v;
|
|
2436
|
+
return Number(v);
|
|
2437
|
+
} return v; }), zod_1.z.number().gte(1).lte(2048)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2438
|
+
});
|
|
2008
2439
|
exports.svgStarShapeSchema = exports.svgshapesSvgStarShapeSchema;
|
|
2009
2440
|
/**
|
|
2010
2441
|
* The shape definition for an SVG asset. Each shape type has its own specific
|
|
@@ -2077,28 +2508,28 @@ exports.svgassetSvgAssetSchema = zod_1.z.object({
|
|
|
2077
2508
|
stroke: zod_1.z.optional(exports.svgpropertiesSvgStrokeSchema),
|
|
2078
2509
|
shadow: zod_1.z.optional(exports.svgpropertiesSvgShadowSchema),
|
|
2079
2510
|
transform: zod_1.z.optional(exports.svgpropertiesSvgTransformSchema),
|
|
2080
|
-
opacity: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
width: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
height: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
}).
|
|
2511
|
+
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2512
|
+
return undefined; if (Array.isArray(v))
|
|
2513
|
+
return v; if (typeof v === 'string') {
|
|
2514
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2515
|
+
return v;
|
|
2516
|
+
return Number(v);
|
|
2517
|
+
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
|
|
2518
|
+
width: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2519
|
+
return undefined; if (Array.isArray(v))
|
|
2520
|
+
return v; if (typeof v === 'string') {
|
|
2521
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2522
|
+
return v;
|
|
2523
|
+
return Number(v);
|
|
2524
|
+
} return v; }), zod_1.z.number().int().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2525
|
+
height: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2526
|
+
return undefined; if (Array.isArray(v))
|
|
2527
|
+
return v; if (typeof v === 'string') {
|
|
2528
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2529
|
+
return v;
|
|
2530
|
+
return Number(v);
|
|
2531
|
+
} return v; }), zod_1.z.number().int().gte(1).lte(4096)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2532
|
+
}).superRefine((data, ctx) => {
|
|
2102
2533
|
const hasShape = data.shape !== undefined;
|
|
2103
2534
|
const hasSrc = data.src !== undefined && data.src.trim() !== "";
|
|
2104
2535
|
if (!hasShape && !hasSrc) {
|
|
@@ -2135,7 +2566,7 @@ exports.svgAssetSchema = exports.svgassetSvgAssetSchema;
|
|
|
2135
2566
|
exports.templaterenderTemplateRenderSchema = zod_1.z.object({
|
|
2136
2567
|
id: zod_1.z.string(),
|
|
2137
2568
|
merge: zod_1.z.optional(zod_1.z.array(exports.mergefieldMergeFieldSchema)),
|
|
2138
|
-
})
|
|
2569
|
+
});
|
|
2139
2570
|
exports.templateRenderSchema = exports.templaterenderTemplateRenderSchema;
|
|
2140
2571
|
/**
|
|
2141
2572
|
* Horizontal and vertical alignment properties for text.
|
|
@@ -2143,36 +2574,48 @@ exports.templateRenderSchema = exports.templaterenderTemplateRenderSchema;
|
|
|
2143
2574
|
exports.textpropertiesTextAlignmentSchema = zod_1.z.object({
|
|
2144
2575
|
horizontal: zod_1.z.optional(zod_1.z.enum(["left", "center", "right"])),
|
|
2145
2576
|
vertical: zod_1.z.optional(zod_1.z.enum(["top", "center", "bottom"])),
|
|
2146
|
-
})
|
|
2577
|
+
});
|
|
2147
2578
|
exports.textAlignmentSchema = exports.textpropertiesTextAlignmentSchema;
|
|
2148
2579
|
/**
|
|
2149
2580
|
* Animation properties for text entrance effects.
|
|
2150
2581
|
*/
|
|
2151
2582
|
exports.textpropertiesTextAnimationSchema = zod_1.z.object({
|
|
2152
2583
|
preset: zod_1.z.enum(["typewriter"]),
|
|
2153
|
-
duration: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2584
|
+
duration: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2585
|
+
return undefined; if (Array.isArray(v))
|
|
2586
|
+
return v; if (typeof v === 'string') {
|
|
2587
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2588
|
+
return v;
|
|
2589
|
+
return Number(v);
|
|
2590
|
+
} return v; }), zod_1.z.number().gte(0.1).lte(30)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2591
|
+
});
|
|
2158
2592
|
/**
|
|
2159
2593
|
* Displays a background box behind the text.
|
|
2160
2594
|
*/
|
|
2161
2595
|
exports.textpropertiesTextBackgroundSchema = zod_1.z.object({
|
|
2162
|
-
color: zod_1.z.optional(zod_1.z.string().regex(/^#[A-Fa-f0-9]{6}$/)),
|
|
2163
|
-
opacity: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
return v;
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2596
|
+
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*\}\}$/)])),
|
|
2597
|
+
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2598
|
+
return undefined; if (Array.isArray(v))
|
|
2599
|
+
return v; if (typeof v === 'string') {
|
|
2600
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2601
|
+
return v;
|
|
2602
|
+
return Number(v);
|
|
2603
|
+
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2604
|
+
padding: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2605
|
+
return undefined; if (Array.isArray(v))
|
|
2606
|
+
return v; if (typeof v === 'string') {
|
|
2607
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2608
|
+
return v;
|
|
2609
|
+
return Number(v);
|
|
2610
|
+
} return v; }), zod_1.z.number().gte(0).lte(100)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2611
|
+
borderRadius: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2612
|
+
return undefined; if (Array.isArray(v))
|
|
2613
|
+
return v; if (typeof v === 'string') {
|
|
2614
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2615
|
+
return v;
|
|
2616
|
+
return Number(v);
|
|
2617
|
+
} return v; }), zod_1.z.number().gte(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2618
|
+
});
|
|
2176
2619
|
exports.textBackgroundSchema = exports.textpropertiesTextBackgroundSchema;
|
|
2177
2620
|
/**
|
|
2178
2621
|
* Font properties for text.
|
|
@@ -2180,34 +2623,49 @@ exports.textBackgroundSchema = exports.textpropertiesTextBackgroundSchema;
|
|
|
2180
2623
|
exports.textpropertiesTextFontSchema = zod_1.z.object({
|
|
2181
2624
|
family: zod_1.z.optional(zod_1.z.string()),
|
|
2182
2625
|
color: zod_1.z.optional(zod_1.z.string()),
|
|
2183
|
-
opacity: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
return v;
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
return
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2626
|
+
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2627
|
+
return undefined; if (Array.isArray(v))
|
|
2628
|
+
return v; if (typeof v === 'string') {
|
|
2629
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2630
|
+
return v;
|
|
2631
|
+
return Number(v);
|
|
2632
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2633
|
+
size: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2634
|
+
return undefined; if (Array.isArray(v))
|
|
2635
|
+
return v; if (typeof v === 'string') {
|
|
2636
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2637
|
+
return v;
|
|
2638
|
+
return Number(v);
|
|
2639
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2640
|
+
weight: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2641
|
+
return undefined; if (Array.isArray(v))
|
|
2642
|
+
return v; if (typeof v === 'string') {
|
|
2643
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2644
|
+
return v;
|
|
2645
|
+
return Number(v);
|
|
2646
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2647
|
+
lineHeight: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2648
|
+
return undefined; if (Array.isArray(v))
|
|
2649
|
+
return v; if (typeof v === 'string') {
|
|
2650
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2651
|
+
return v;
|
|
2652
|
+
return Number(v);
|
|
2653
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2654
|
+
});
|
|
2200
2655
|
exports.textFontSchema = exports.textpropertiesTextFontSchema;
|
|
2201
2656
|
/**
|
|
2202
2657
|
* Text stroke (outline) properties.
|
|
2203
2658
|
*/
|
|
2204
2659
|
exports.textpropertiesTextStrokeSchema = zod_1.z.object({
|
|
2205
|
-
width: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2660
|
+
width: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2661
|
+
return undefined; if (Array.isArray(v))
|
|
2662
|
+
return v; if (typeof v === 'string') {
|
|
2663
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2664
|
+
return v;
|
|
2665
|
+
return Number(v);
|
|
2666
|
+
} return v; }), zod_1.z.number().gte(0).lte(10)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2667
|
+
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*\}\}$/)])),
|
|
2668
|
+
});
|
|
2211
2669
|
/**
|
|
2212
2670
|
* The TextAsset is used to add text and titles to a video. The text can be styled with built in and custom
|
|
2213
2671
|
* [Fonts](#tocs_font). You can also add a background bounding box used to control wrapping and overflow. Emoticons are also supported.
|
|
@@ -2216,21 +2674,27 @@ exports.textpropertiesTextStrokeSchema = zod_1.z.object({
|
|
|
2216
2674
|
exports.textassetTextAssetSchema = zod_1.z.object({
|
|
2217
2675
|
type: zod_1.z.enum(["text"]),
|
|
2218
2676
|
text: zod_1.z.string(),
|
|
2219
|
-
width: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
return v;
|
|
2226
|
-
|
|
2677
|
+
width: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2678
|
+
return undefined; if (Array.isArray(v))
|
|
2679
|
+
return v; if (typeof v === 'string') {
|
|
2680
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2681
|
+
return v;
|
|
2682
|
+
return Number(v);
|
|
2683
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2684
|
+
height: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2685
|
+
return undefined; if (Array.isArray(v))
|
|
2686
|
+
return v; if (typeof v === 'string') {
|
|
2687
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2688
|
+
return v;
|
|
2689
|
+
return Number(v);
|
|
2690
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2227
2691
|
font: zod_1.z.optional(exports.textpropertiesTextFontSchema),
|
|
2228
2692
|
background: zod_1.z.optional(exports.textpropertiesTextBackgroundSchema),
|
|
2229
2693
|
alignment: zod_1.z.optional(exports.textpropertiesTextAlignmentSchema),
|
|
2230
2694
|
stroke: zod_1.z.optional(exports.textpropertiesTextStrokeSchema),
|
|
2231
2695
|
animation: zod_1.z.optional(exports.textpropertiesTextAnimationSchema),
|
|
2232
2696
|
ellipsis: zod_1.z.optional(zod_1.z.string()),
|
|
2233
|
-
})
|
|
2697
|
+
});
|
|
2234
2698
|
exports.textAssetSchema = exports.textassetTextAssetSchema;
|
|
2235
2699
|
/**
|
|
2236
2700
|
* The TextToImageAsset lets you create a dynamic image from a text prompt.
|
|
@@ -2238,30 +2702,42 @@ exports.textAssetSchema = exports.textassetTextAssetSchema;
|
|
|
2238
2702
|
exports.texttoimageassetTextToImageAssetSchema = zod_1.z.object({
|
|
2239
2703
|
type: zod_1.z.enum(["text-to-image"]),
|
|
2240
2704
|
prompt: zod_1.z.string(),
|
|
2241
|
-
width: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
return v;
|
|
2248
|
-
|
|
2705
|
+
width: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2706
|
+
return undefined; if (Array.isArray(v))
|
|
2707
|
+
return v; if (typeof v === 'string') {
|
|
2708
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2709
|
+
return v;
|
|
2710
|
+
return Number(v);
|
|
2711
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2712
|
+
height: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2713
|
+
return undefined; if (Array.isArray(v))
|
|
2714
|
+
return v; if (typeof v === 'string') {
|
|
2715
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2716
|
+
return v;
|
|
2717
|
+
return Number(v);
|
|
2718
|
+
} return v; }), zod_1.z.number().int()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2249
2719
|
crop: zod_1.z.optional(exports.cropCropSchema),
|
|
2250
|
-
})
|
|
2720
|
+
});
|
|
2251
2721
|
exports.textToImageAssetSchema = exports.texttoimageassetTextToImageAssetSchema;
|
|
2252
2722
|
/**
|
|
2253
2723
|
* Generate a thumbnail image for the video or image at a specific point from the timeline.
|
|
2254
2724
|
*/
|
|
2255
2725
|
exports.thumbnailThumbnailSchema = zod_1.z.object({
|
|
2256
|
-
capture: zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
return v;
|
|
2263
|
-
|
|
2264
|
-
|
|
2726
|
+
capture: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2727
|
+
return undefined; if (Array.isArray(v))
|
|
2728
|
+
return v; if (typeof v === 'string') {
|
|
2729
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2730
|
+
return v;
|
|
2731
|
+
return Number(v);
|
|
2732
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2733
|
+
scale: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2734
|
+
return undefined; if (Array.isArray(v))
|
|
2735
|
+
return v; if (typeof v === 'string') {
|
|
2736
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2737
|
+
return v;
|
|
2738
|
+
return Number(v);
|
|
2739
|
+
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2740
|
+
});
|
|
2265
2741
|
exports.thumbnailSchema = exports.thumbnailThumbnailSchema;
|
|
2266
2742
|
/**
|
|
2267
2743
|
* The output format, render range and type of media to generate.
|
|
@@ -2292,7 +2768,7 @@ exports.outputOutputSchema = zod_1.z.object({
|
|
|
2292
2768
|
poster: zod_1.z.optional(exports.posterPosterSchema),
|
|
2293
2769
|
thumbnail: zod_1.z.optional(exports.thumbnailThumbnailSchema),
|
|
2294
2770
|
destinations: zod_1.z.optional(zod_1.z.array(exports.destinationsDestinationsSchema)),
|
|
2295
|
-
})
|
|
2771
|
+
});
|
|
2296
2772
|
exports.outputSchema = exports.outputOutputSchema;
|
|
2297
2773
|
/**
|
|
2298
2774
|
* In and out transitions for a clip - i.e. fade in and fade out
|
|
@@ -2426,7 +2902,7 @@ exports.transitionTransitionSchema = zod_1.z.object({
|
|
|
2426
2902
|
"shuffleTopLeftFast",
|
|
2427
2903
|
"zoom",
|
|
2428
2904
|
])),
|
|
2429
|
-
})
|
|
2905
|
+
});
|
|
2430
2906
|
exports.transitionSchema = exports.transitionTransitionSchema;
|
|
2431
2907
|
/**
|
|
2432
2908
|
* Use a Tween to [animate properties over time](/docs/guide/architecting-an-application/animations/). The following properties are currently supported and can be animated:
|
|
@@ -2439,22 +2915,22 @@ exports.transitionSchema = exports.transitionTransitionSchema;
|
|
|
2439
2915
|
* </ul>
|
|
2440
2916
|
*/
|
|
2441
2917
|
exports.tweenTweenSchema = zod_1.z.object({
|
|
2442
|
-
from: zod_1.z.
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2918
|
+
from: zod_1.z.optional(zod_1.z.unknown()),
|
|
2919
|
+
to: zod_1.z.optional(zod_1.z.unknown()),
|
|
2920
|
+
start: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2921
|
+
return undefined; if (Array.isArray(v))
|
|
2922
|
+
return v; if (typeof v === 'string') {
|
|
2923
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2924
|
+
return v;
|
|
2925
|
+
return Number(v);
|
|
2926
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2927
|
+
length: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2928
|
+
return undefined; if (Array.isArray(v))
|
|
2929
|
+
return v; if (typeof v === 'string') {
|
|
2930
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2931
|
+
return v;
|
|
2932
|
+
return Number(v);
|
|
2933
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2458
2934
|
interpolation: zod_1.z.optional(zod_1.z.enum(["linear", "bezier", "constant"])),
|
|
2459
2935
|
easing: zod_1.z.optional(zod_1.z.enum([
|
|
2460
2936
|
"ease",
|
|
@@ -2486,67 +2962,124 @@ exports.tweenTweenSchema = zod_1.z.object({
|
|
|
2486
2962
|
"easeInOutCirc",
|
|
2487
2963
|
"easeInOutBack",
|
|
2488
2964
|
])),
|
|
2489
|
-
})
|
|
2965
|
+
});
|
|
2490
2966
|
exports.tweenSchema = exports.tweenTweenSchema;
|
|
2491
2967
|
/**
|
|
2492
2968
|
* The AudioAsset is used to add sound effects and audio at specific intervals on the timeline. The src must be a publicly accessible URL to an audio resource such as an mp3 file.
|
|
2493
2969
|
*/
|
|
2494
2970
|
exports.audioassetAudioAssetSchema = zod_1.z.object({
|
|
2495
2971
|
type: zod_1.z.enum(["audio"]),
|
|
2496
|
-
src: zod_1.z.string().
|
|
2497
|
-
trim: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2972
|
+
src: zod_1.z.string().min(1).regex(/\S/),
|
|
2973
|
+
trim: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2974
|
+
return undefined; if (Array.isArray(v))
|
|
2975
|
+
return v; if (typeof v === 'string') {
|
|
2976
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2977
|
+
return v;
|
|
2978
|
+
return Number(v);
|
|
2979
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2980
|
+
volume: zod_1.z.optional(zod_1.z.union([zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2981
|
+
return undefined; if (Array.isArray(v))
|
|
2982
|
+
return v; if (typeof v === 'string') {
|
|
2983
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2984
|
+
return v;
|
|
2985
|
+
return Number(v);
|
|
2986
|
+
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), zod_1.z.array(exports.tweenTweenSchema)])),
|
|
2987
|
+
speed: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2502
2988
|
return undefined; if (Array.isArray(v))
|
|
2503
|
-
return v; if (typeof v === 'string')
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
return v;
|
|
2508
|
-
return Number(v); return v; }), zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), zod_1.z.number().gte(0).lte(10)))),
|
|
2989
|
+
return v; if (typeof v === 'string') {
|
|
2990
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2991
|
+
return v;
|
|
2992
|
+
return Number(v);
|
|
2993
|
+
} return v; }), zod_1.z.number().gte(0).lte(10)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2509
2994
|
effect: zod_1.z.optional(zod_1.z.enum(["none", "fadeIn", "fadeOut", "fadeInFadeOut"])),
|
|
2510
|
-
})
|
|
2995
|
+
});
|
|
2511
2996
|
exports.audioAssetSchema = exports.audioassetAudioAssetSchema;
|
|
2512
2997
|
/**
|
|
2513
2998
|
* Offsets the position of an asset horizontally or vertically by a relative distance.
|
|
2514
2999
|
*/
|
|
2515
3000
|
exports.offsetOffsetSchema = zod_1.z.object({
|
|
2516
|
-
x: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
return v;
|
|
2523
|
-
|
|
2524
|
-
|
|
3001
|
+
x: zod_1.z.optional(zod_1.z.union([zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
3002
|
+
return undefined; if (Array.isArray(v))
|
|
3003
|
+
return v; if (typeof v === 'string') {
|
|
3004
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
3005
|
+
return v;
|
|
3006
|
+
return Number(v);
|
|
3007
|
+
} return v; }), zod_1.z.number().gte(-10).lte(10)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), zod_1.z.array(exports.tweenTweenSchema)])),
|
|
3008
|
+
y: zod_1.z.optional(zod_1.z.union([zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
3009
|
+
return undefined; if (Array.isArray(v))
|
|
3010
|
+
return v; if (typeof v === 'string') {
|
|
3011
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
3012
|
+
return v;
|
|
3013
|
+
return Number(v);
|
|
3014
|
+
} return v; }), zod_1.z.number().gte(-10).lte(10)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), zod_1.z.array(exports.tweenTweenSchema)])),
|
|
3015
|
+
});
|
|
2525
3016
|
exports.offsetSchema = exports.offsetOffsetSchema;
|
|
2526
3017
|
/**
|
|
2527
3018
|
* Rotate a clip by the specified angle in degrees. Rotation origin is set based on the clips `position`.
|
|
2528
3019
|
*/
|
|
2529
3020
|
exports.rotatetransformationRotateTransformationSchema = zod_1.z.object({
|
|
2530
|
-
angle: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
3021
|
+
angle: zod_1.z.optional(zod_1.z.union([zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
3022
|
+
return undefined; if (Array.isArray(v))
|
|
3023
|
+
return v; if (typeof v === 'string') {
|
|
3024
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
3025
|
+
return v;
|
|
3026
|
+
return Number(v);
|
|
3027
|
+
} return v; }), zod_1.z.number().gte(-360).lte(360)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), zod_1.z.array(exports.tweenTweenSchema)])),
|
|
3028
|
+
});
|
|
2535
3029
|
exports.rotateTransformationSchema = exports.rotatetransformationRotateTransformationSchema;
|
|
2536
3030
|
/**
|
|
2537
3031
|
* 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.
|
|
2538
3032
|
*/
|
|
2539
3033
|
exports.skewtransformationSkewTransformationSchema = zod_1.z.object({
|
|
2540
|
-
x: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
3034
|
+
x: zod_1.z.optional(zod_1.z.union([zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
3035
|
+
return undefined; if (Array.isArray(v))
|
|
3036
|
+
return v; if (typeof v === 'string') {
|
|
3037
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
3038
|
+
return v;
|
|
3039
|
+
return Number(v);
|
|
3040
|
+
} return v; }), zod_1.z.number().gte(-100).lte(100)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), zod_1.z.array(exports.tweenTweenSchema)])),
|
|
3041
|
+
y: zod_1.z.optional(zod_1.z.union([zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
3042
|
+
return undefined; if (Array.isArray(v))
|
|
3043
|
+
return v; if (typeof v === 'string') {
|
|
3044
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
3045
|
+
return v;
|
|
3046
|
+
return Number(v);
|
|
3047
|
+
} return v; }), zod_1.z.number().gte(-100).lte(100)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), zod_1.z.array(exports.tweenTweenSchema)])),
|
|
3048
|
+
});
|
|
3049
|
+
exports.skewTransformationSchema = exports.skewtransformationSkewTransformationSchema;
|
|
3050
|
+
/**
|
|
3051
|
+
* The TextToSpeechAsset lets you generate a voice over from text using a text-to-speech service. The generated audio can be trimmed, faded and have its volume and speed adjusted using the same properties available on the AudioAsset.
|
|
3052
|
+
*/
|
|
3053
|
+
exports.texttospeechassetTextToSpeechAssetSchema = zod_1.z.object({
|
|
3054
|
+
type: zod_1.z.enum(["text-to-speech"]),
|
|
3055
|
+
text: zod_1.z.string(),
|
|
3056
|
+
voice: zod_1.z.string(),
|
|
3057
|
+
language: zod_1.z.optional(zod_1.z.string()),
|
|
3058
|
+
newscaster: zod_1.z.optional(zod_1.z.boolean()).default(false),
|
|
3059
|
+
trim: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2541
3060
|
return undefined; if (Array.isArray(v))
|
|
2542
|
-
return v; if (typeof v === 'string')
|
|
2543
|
-
|
|
2544
|
-
|
|
3061
|
+
return v; if (typeof v === 'string') {
|
|
3062
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
3063
|
+
return v;
|
|
3064
|
+
return Number(v);
|
|
3065
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
3066
|
+
volume: zod_1.z.optional(zod_1.z.union([zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
3067
|
+
return undefined; if (Array.isArray(v))
|
|
3068
|
+
return v; if (typeof v === 'string') {
|
|
3069
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
3070
|
+
return v;
|
|
3071
|
+
return Number(v);
|
|
3072
|
+
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), zod_1.z.array(exports.tweenTweenSchema)])),
|
|
3073
|
+
speed: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2545
3074
|
return undefined; if (Array.isArray(v))
|
|
2546
|
-
return v; if (typeof v === 'string')
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
3075
|
+
return v; if (typeof v === 'string') {
|
|
3076
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
3077
|
+
return v;
|
|
3078
|
+
return Number(v);
|
|
3079
|
+
} return v; }), zod_1.z.number().gte(0).lte(10)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
3080
|
+
effect: zod_1.z.optional(zod_1.z.enum(["none", "fadeIn", "fadeOut", "fadeInFadeOut"])),
|
|
3081
|
+
});
|
|
3082
|
+
exports.textToSpeechAssetSchema = exports.texttospeechassetTextToSpeechAssetSchema;
|
|
2550
3083
|
/**
|
|
2551
3084
|
* **Notice: The TitleAsset is deprecated, use the [TextAsset](#tocs_textasset) instead.**
|
|
2552
3085
|
*
|
|
@@ -2593,7 +3126,7 @@ exports.titleassetTitleAssetSchema = zod_1.z.object({
|
|
|
2593
3126
|
"center",
|
|
2594
3127
|
])),
|
|
2595
3128
|
offset: zod_1.z.optional(exports.offsetOffsetSchema),
|
|
2596
|
-
})
|
|
3129
|
+
});
|
|
2597
3130
|
exports.titleAssetSchema = exports.titleassetTitleAssetSchema;
|
|
2598
3131
|
/**
|
|
2599
3132
|
* Apply one or more transformations to a clip. Transformations alter the visual properties of a clip and can be combined to create new shapes and effects.
|
|
@@ -2602,31 +3135,40 @@ exports.transformationTransformationSchema = zod_1.z.object({
|
|
|
2602
3135
|
rotate: zod_1.z.optional(exports.rotatetransformationRotateTransformationSchema),
|
|
2603
3136
|
skew: zod_1.z.optional(exports.skewtransformationSkewTransformationSchema),
|
|
2604
3137
|
flip: zod_1.z.optional(exports.fliptransformationFlipTransformationSchema),
|
|
2605
|
-
})
|
|
3138
|
+
});
|
|
2606
3139
|
exports.transformationSchema = exports.transformationTransformationSchema;
|
|
2607
3140
|
/**
|
|
2608
3141
|
* The VideoAsset is used to create video sequences from video files. The src must be a publicly accessible URL to a video resource such as an mp4 file.
|
|
2609
3142
|
*/
|
|
2610
3143
|
exports.videoassetVideoAssetSchema = zod_1.z.object({
|
|
2611
3144
|
type: zod_1.z.enum(["video"]),
|
|
2612
|
-
src: zod_1.z.string().
|
|
3145
|
+
src: zod_1.z.string().min(1).regex(/\S/),
|
|
2613
3146
|
transcode: zod_1.z.optional(zod_1.z.boolean()),
|
|
2614
|
-
trim: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2615
|
-
return undefined; if (Array.isArray(v))
|
|
2616
|
-
return v; if (typeof v === 'string')
|
|
2617
|
-
return Number(v); return v; }), zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), zod_1.z.number()))),
|
|
2618
|
-
volume: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
3147
|
+
trim: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2619
3148
|
return undefined; if (Array.isArray(v))
|
|
2620
|
-
return v; if (typeof v === 'string')
|
|
2621
|
-
|
|
3149
|
+
return v; if (typeof v === 'string') {
|
|
3150
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
3151
|
+
return v;
|
|
3152
|
+
return Number(v);
|
|
3153
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
3154
|
+
volume: zod_1.z.optional(zod_1.z.union([zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
3155
|
+
return undefined; if (Array.isArray(v))
|
|
3156
|
+
return v; if (typeof v === 'string') {
|
|
3157
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
3158
|
+
return v;
|
|
3159
|
+
return Number(v);
|
|
3160
|
+
} return v; }), zod_1.z.number().gte(0).lte(1)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), zod_1.z.array(exports.tweenTweenSchema)])),
|
|
2622
3161
|
volumeEffect: zod_1.z.optional(zod_1.z.enum(["none", "fadeIn", "fadeOut", "fadeInFadeOut"])),
|
|
2623
|
-
speed: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
3162
|
+
speed: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
3163
|
+
return undefined; if (Array.isArray(v))
|
|
3164
|
+
return v; if (typeof v === 'string') {
|
|
3165
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
3166
|
+
return v;
|
|
3167
|
+
return Number(v);
|
|
3168
|
+
} return v; }), zod_1.z.number().gte(0).lte(10)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2627
3169
|
crop: zod_1.z.optional(exports.cropCropSchema),
|
|
2628
3170
|
chromaKey: zod_1.z.optional(exports.chromakeyChromaKeySchema),
|
|
2629
|
-
})
|
|
3171
|
+
});
|
|
2630
3172
|
exports.videoAssetSchema = exports.videoassetVideoAssetSchema;
|
|
2631
3173
|
/**
|
|
2632
3174
|
* The type of asset to display for the duration of the Clip, i.e. a video clip or an image. Choose from one of the available asset types below.
|
|
@@ -2645,6 +3187,7 @@ exports.assetAssetSchema = zod_1.z.discriminatedUnion("type", [
|
|
|
2645
3187
|
exports.svgassetSvgAssetSchema,
|
|
2646
3188
|
exports.texttoimageassetTextToImageAssetSchema,
|
|
2647
3189
|
exports.imagetovideoassetImageToVideoAssetSchema,
|
|
3190
|
+
exports.texttospeechassetTextToSpeechAssetSchema,
|
|
2648
3191
|
]);
|
|
2649
3192
|
exports.assetSchema = exports.assetAssetSchema;
|
|
2650
3193
|
/**
|
|
@@ -2653,30 +3196,47 @@ exports.assetSchema = exports.assetAssetSchema;
|
|
|
2653
3196
|
exports.clipClipSchema = zod_1.z.object({
|
|
2654
3197
|
asset: exports.assetAssetSchema,
|
|
2655
3198
|
start: zod_1.z.union([
|
|
2656
|
-
zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
3199
|
+
zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
3200
|
+
return undefined; if (Array.isArray(v))
|
|
3201
|
+
return v; if (typeof v === 'string') {
|
|
3202
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
3203
|
+
return v;
|
|
3204
|
+
return Number(v);
|
|
3205
|
+
} return v; }), zod_1.z.number().gte(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
3206
|
+
zod_1.z.union([zod_1.z.string().regex(/^(auto|alias:\/\/[A-Za-z0-9_-]+)$/), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2660
3207
|
]),
|
|
2661
3208
|
length: zod_1.z.union([
|
|
2662
|
-
zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
3209
|
+
zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
3210
|
+
return undefined; if (Array.isArray(v))
|
|
3211
|
+
return v; if (typeof v === 'string') {
|
|
3212
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
3213
|
+
return v;
|
|
3214
|
+
return Number(v);
|
|
3215
|
+
} return v; }), zod_1.z.number().gte(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
3216
|
+
zod_1.z.union([zod_1.z.string().regex(/^(auto|end|alias:\/\/[A-Za-z0-9_-]+)$/), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
2666
3217
|
]),
|
|
2667
3218
|
fit: zod_1.z.optional(zod_1.z.enum(["cover", "contain", "crop", "none"])),
|
|
2668
|
-
scale: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
3219
|
+
scale: zod_1.z.optional(zod_1.z.union([zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
3220
|
+
return undefined; if (Array.isArray(v))
|
|
3221
|
+
return v; if (typeof v === 'string') {
|
|
3222
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
3223
|
+
return v;
|
|
3224
|
+
return Number(v);
|
|
3225
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), zod_1.z.array(exports.tweenTweenSchema)])),
|
|
3226
|
+
width: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
3227
|
+
return undefined; if (Array.isArray(v))
|
|
3228
|
+
return v; if (typeof v === 'string') {
|
|
3229
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
3230
|
+
return v;
|
|
3231
|
+
return Number(v);
|
|
3232
|
+
} return v; }), zod_1.z.number().gte(1).lte(3840)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
3233
|
+
height: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2669
3234
|
return undefined; if (Array.isArray(v))
|
|
2670
|
-
return v; if (typeof v === 'string')
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
return v;
|
|
2675
|
-
return Number(v); return v; }), zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), zod_1.z.number().gte(1).lte(3840)))),
|
|
2676
|
-
height: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2677
|
-
return undefined; if (Array.isArray(v))
|
|
2678
|
-
return v; if (typeof v === 'string')
|
|
2679
|
-
return Number(v); return v; }), zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), zod_1.z.number().gte(1).lte(2160)))),
|
|
3235
|
+
return v; if (typeof v === 'string') {
|
|
3236
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
3237
|
+
return v;
|
|
3238
|
+
return Number(v);
|
|
3239
|
+
} return v; }), zod_1.z.number().gte(1).lte(2160)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2680
3240
|
position: zod_1.z.optional(zod_1.z.enum([
|
|
2681
3241
|
"top",
|
|
2682
3242
|
"topRight",
|
|
@@ -2721,20 +3281,23 @@ exports.clipClipSchema = zod_1.z.object({
|
|
|
2721
3281
|
"muted",
|
|
2722
3282
|
"negative",
|
|
2723
3283
|
])),
|
|
2724
|
-
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
3284
|
+
opacity: zod_1.z.optional(zod_1.z.union([zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
3285
|
+
return undefined; if (Array.isArray(v))
|
|
3286
|
+
return v; if (typeof v === 'string') {
|
|
3287
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
3288
|
+
return v;
|
|
3289
|
+
return Number(v);
|
|
3290
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), zod_1.z.array(exports.tweenTweenSchema)])),
|
|
2728
3291
|
transform: zod_1.z.optional(exports.transformationTransformationSchema),
|
|
2729
|
-
alias: zod_1.z.optional(zod_1.z.string().regex(/^[A-Za-z0-9_-]+$/)),
|
|
2730
|
-
})
|
|
3292
|
+
alias: zod_1.z.optional(zod_1.z.union([zod_1.z.string().regex(/^[A-Za-z0-9_-]+$/), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
3293
|
+
});
|
|
2731
3294
|
exports.clipSchema = exports.clipClipSchema;
|
|
2732
3295
|
/**
|
|
2733
3296
|
* A track contains an array of clips. Tracks are layered on top of each other in the order in the array. The top most track will render on top of those below it.
|
|
2734
3297
|
*/
|
|
2735
3298
|
exports.trackTrackSchema = zod_1.z.object({
|
|
2736
3299
|
clips: zod_1.z.array(exports.clipClipSchema).min(1),
|
|
2737
|
-
})
|
|
3300
|
+
});
|
|
2738
3301
|
exports.trackSchema = exports.trackTrackSchema;
|
|
2739
3302
|
/**
|
|
2740
3303
|
* A timeline represents the contents of a video edit over time, an audio edit over time, in seconds, or an image layout. A timeline consists of layers called tracks. Tracks are composed of titles, images, audio, html or video segments referred to as clips which are placed along the track at specific starting point and lasting for a specific amount of time.
|
|
@@ -2745,7 +3308,7 @@ exports.timelineTimelineSchema = zod_1.z.object({
|
|
|
2745
3308
|
fonts: zod_1.z.optional(zod_1.z.array(exports.fontFontSchema)),
|
|
2746
3309
|
tracks: zod_1.z.array(exports.trackTrackSchema).min(1),
|
|
2747
3310
|
cache: zod_1.z.optional(zod_1.z.boolean()),
|
|
2748
|
-
})
|
|
3311
|
+
});
|
|
2749
3312
|
exports.timelineSchema = exports.timelineTimelineSchema;
|
|
2750
3313
|
/**
|
|
2751
3314
|
* An edit defines the arrangement of a video on a timeline, an audio edit or an image design and the output format. Video assets are automatically preprocessed to fix common compatibility issues before rendering. You can control preprocessing behavior using the `transcode` flag on video assets.
|
|
@@ -2756,10 +3319,7 @@ exports.editEditSchema = zod_1.z.object({
|
|
|
2756
3319
|
merge: zod_1.z.optional(zod_1.z.array(exports.mergefieldMergeFieldSchema)),
|
|
2757
3320
|
callback: zod_1.z.optional(zod_1.z.string()),
|
|
2758
3321
|
disk: zod_1.z.optional(zod_1.z.enum(["local", "mount"])),
|
|
2759
|
-
|
|
2760
|
-
poster: zod_1.z.optional(exports.posterPosterSchema),
|
|
2761
|
-
thumbnail: zod_1.z.optional(exports.thumbnailThumbnailSchema),
|
|
2762
|
-
}).strict();
|
|
3322
|
+
});
|
|
2763
3323
|
exports.editSchema = exports.editEditSchema;
|
|
2764
3324
|
/**
|
|
2765
3325
|
* The response data returned with the [RenderResponse](#tocs_renderresponse) including status and URL.
|
|
@@ -2778,21 +3338,27 @@ exports.renderresponsedataRenderResponseDataSchema = zod_1.z.object({
|
|
|
2778
3338
|
"failed",
|
|
2779
3339
|
]),
|
|
2780
3340
|
error: zod_1.z.optional(zod_1.z.string()),
|
|
2781
|
-
duration: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
return v;
|
|
2788
|
-
|
|
3341
|
+
duration: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
3342
|
+
return undefined; if (Array.isArray(v))
|
|
3343
|
+
return v; if (typeof v === 'string') {
|
|
3344
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
3345
|
+
return v;
|
|
3346
|
+
return Number(v);
|
|
3347
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
3348
|
+
renderTime: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
3349
|
+
return undefined; if (Array.isArray(v))
|
|
3350
|
+
return v; if (typeof v === 'string') {
|
|
3351
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
3352
|
+
return v;
|
|
3353
|
+
return Number(v);
|
|
3354
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
2789
3355
|
url: zod_1.z.optional(zod_1.z.string()),
|
|
2790
3356
|
poster: zod_1.z.optional(zod_1.z.union([zod_1.z.string(), zod_1.z.null()])),
|
|
2791
3357
|
thumbnail: zod_1.z.optional(zod_1.z.union([zod_1.z.string(), zod_1.z.null()])),
|
|
2792
3358
|
data: zod_1.z.optional(exports.editEditSchema),
|
|
2793
3359
|
created: zod_1.z.optional(zod_1.z.string()),
|
|
2794
3360
|
updated: zod_1.z.optional(zod_1.z.string()),
|
|
2795
|
-
})
|
|
3361
|
+
});
|
|
2796
3362
|
exports.renderResponseDataSchema = exports.renderresponsedataRenderResponseDataSchema;
|
|
2797
3363
|
/**
|
|
2798
3364
|
* The response received after a [render status request](#get-render-status) is submitted. The response includes details about status of a render and the output URL.
|
|
@@ -2801,7 +3367,7 @@ exports.renderresponseRenderResponseSchema = zod_1.z.object({
|
|
|
2801
3367
|
success: zod_1.z.boolean(),
|
|
2802
3368
|
message: zod_1.z.string(),
|
|
2803
3369
|
response: exports.renderresponsedataRenderResponseDataSchema,
|
|
2804
|
-
})
|
|
3370
|
+
});
|
|
2805
3371
|
exports.renderResponseSchema = exports.renderresponseRenderResponseSchema;
|
|
2806
3372
|
/**
|
|
2807
3373
|
* The response data returned with the [TemplateDataResponse](#tocs_templatedataresponse).
|
|
@@ -2811,7 +3377,7 @@ exports.templatedataresponsedataTemplateDataResponseDataSchema = zod_1.z.object(
|
|
|
2811
3377
|
name: zod_1.z.string(),
|
|
2812
3378
|
owner: zod_1.z.string(),
|
|
2813
3379
|
template: exports.editEditSchema,
|
|
2814
|
-
})
|
|
3380
|
+
});
|
|
2815
3381
|
exports.templateDataResponseDataSchema = exports.templatedataresponsedataTemplateDataResponseDataSchema;
|
|
2816
3382
|
/**
|
|
2817
3383
|
* The template data including the template name and [Edit](#tocs_edit).
|
|
@@ -2820,7 +3386,7 @@ exports.templatedataresponseTemplateDataResponseSchema = zod_1.z.object({
|
|
|
2820
3386
|
success: zod_1.z.boolean(),
|
|
2821
3387
|
message: zod_1.z.string(),
|
|
2822
3388
|
response: exports.templatedataresponsedataTemplateDataResponseDataSchema,
|
|
2823
|
-
})
|
|
3389
|
+
});
|
|
2824
3390
|
exports.templateDataResponseSchema = exports.templatedataresponseTemplateDataResponseSchema;
|
|
2825
3391
|
/**
|
|
2826
3392
|
* A template is a saved [Edit](#tocs_edit) than can be loaded and re-used.
|
|
@@ -2828,7 +3394,7 @@ exports.templateDataResponseSchema = exports.templatedataresponseTemplateDataRes
|
|
|
2828
3394
|
exports.templateTemplateSchema = zod_1.z.object({
|
|
2829
3395
|
name: zod_1.z.string(),
|
|
2830
3396
|
template: zod_1.z.optional(exports.editEditSchema),
|
|
2831
|
-
})
|
|
3397
|
+
});
|
|
2832
3398
|
exports.templateSchema = exports.templateTemplateSchema;
|
|
2833
3399
|
exports.postRenderRequest = zod_1.z.object({
|
|
2834
3400
|
body: exports.editEditSchema,
|
|
@@ -2849,7 +3415,7 @@ exports.getRenderRequest = zod_1.z.object({
|
|
|
2849
3415
|
query: zod_1.z.optional(zod_1.z.object({
|
|
2850
3416
|
data: zod_1.z.optional(zod_1.z.boolean()),
|
|
2851
3417
|
merged: zod_1.z.optional(zod_1.z.boolean()),
|
|
2852
|
-
})
|
|
3418
|
+
})),
|
|
2853
3419
|
});
|
|
2854
3420
|
/**
|
|
2855
3421
|
* The render status details
|