@shotstack/schemas 1.20.3 → 1.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.bundled.json +57 -20
- package/dist/json-schema/edit.json +10 -6
- package/dist/json-schema/index.cjs +1 -1
- package/dist/json-schema/index.js +1 -1
- package/dist/schema.d.ts +50 -10
- package/dist/zod/zod.gen.cjs +38 -15
- package/dist/zod/zod.gen.d.ts +43 -178
- package/dist/zod/zod.gen.js +32 -9
- package/dist/zod/zod.gen.ts +34 -9
- package/package.json +1 -1
package/dist/zod/zod.gen.js
CHANGED
|
@@ -281,7 +281,10 @@ export const googleDriveDestinationGoogleDriveDestinationSchema = z.object({
|
|
|
281
281
|
}).strict();
|
|
282
282
|
export const googleDriveDestinationSchema = googleDriveDestinationGoogleDriveDestinationSchema;
|
|
283
283
|
/**
|
|
284
|
+
* **Notice: MuxDestinationOptions, like the Mux destination, is deprecated.** It continues to work, with no behaviour change for existing integrations.
|
|
284
285
|
* Pass additional options to control how Mux processes video. Currently supports playback_policy and passthrough options.
|
|
286
|
+
*
|
|
287
|
+
* @deprecated
|
|
285
288
|
*/
|
|
286
289
|
export const muxDestinationOptionsMuxDestinationOptionsSchema = z.object({
|
|
287
290
|
playbackPolicy: z.optional(z.array(z.enum(['public', 'signed']))),
|
|
@@ -289,7 +292,10 @@ export const muxDestinationOptionsMuxDestinationOptionsSchema = z.object({
|
|
|
289
292
|
}).strict();
|
|
290
293
|
export const muxDestinationOptionsSchema = muxDestinationOptionsMuxDestinationOptionsSchema;
|
|
291
294
|
/**
|
|
295
|
+
* **Notice: The Mux destination is deprecated.** It continues to work, with no behaviour change for existing integrations.
|
|
292
296
|
* Send videos to the [Mux](https://www.mux.com/docs) video hosting and streaming service. Mux credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/mux), not in the request.
|
|
297
|
+
*
|
|
298
|
+
* @deprecated
|
|
293
299
|
*/
|
|
294
300
|
export const muxDestinationMuxDestinationSchema = z.object({
|
|
295
301
|
provider: z.literal("mux"),
|
|
@@ -324,7 +330,10 @@ export const shotstackDestinationShotstackDestinationSchema = z.object({
|
|
|
324
330
|
}).strict();
|
|
325
331
|
export const shotstackDestinationSchema = shotstackDestinationShotstackDestinationSchema;
|
|
326
332
|
/**
|
|
333
|
+
* **Notice: TiktokDestinationOptions, like the TikTok destination, is deprecated.** It continues to work, with no behaviour change for existing integrations.
|
|
327
334
|
* Pass additional options to control how TikTok publishes video.
|
|
335
|
+
*
|
|
336
|
+
* @deprecated
|
|
328
337
|
*/
|
|
329
338
|
export const tiktokDestinationOptionsTiktokDestinationOptionsSchema = z.object({
|
|
330
339
|
title: z.optional(z.string().max(150)),
|
|
@@ -338,7 +347,10 @@ export const tiktokDestinationOptionsTiktokDestinationOptionsSchema = z.object({
|
|
|
338
347
|
disableComment: z.optional(z.boolean()).default(false)
|
|
339
348
|
}).strict();
|
|
340
349
|
/**
|
|
350
|
+
* **Notice: The TikTok destination is deprecated.** It continues to work, with no behaviour change for existing integrations.
|
|
341
351
|
* Send videos to TikTok. TikTok credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/tiktok), not in the request.
|
|
352
|
+
*
|
|
353
|
+
* @deprecated
|
|
342
354
|
*/
|
|
343
355
|
export const tiktokDestinationTiktokDestinationSchema = z.object({
|
|
344
356
|
provider: z.literal("tiktok"),
|
|
@@ -419,6 +431,20 @@ export const fontFontSchema = z.object({
|
|
|
419
431
|
src: z.string()
|
|
420
432
|
}).strict();
|
|
421
433
|
export const fontSchema = fontFontSchema;
|
|
434
|
+
/**
|
|
435
|
+
* An image, video or audio asset to generate from a text prompt.
|
|
436
|
+
*/
|
|
437
|
+
export const generationassetGenerationAssetSchema = z.object({
|
|
438
|
+
type: z.enum([
|
|
439
|
+
'image',
|
|
440
|
+
'video',
|
|
441
|
+
'audio'
|
|
442
|
+
]),
|
|
443
|
+
prompt: z.string().min(1).max(4000).regex(/\S/),
|
|
444
|
+
model: z.optional(z.string()),
|
|
445
|
+
options: z.optional(z.record(z.string(), z.unknown()))
|
|
446
|
+
}).strict();
|
|
447
|
+
export const generationAssetSchema = generationassetGenerationAssetSchema;
|
|
422
448
|
/**
|
|
423
449
|
* What one generation costs, in credits: the rate multiplied by the units consumed. `quantity` says how to count the units, and is absent when one generation is one unit. Where a model charges differently per option value, `credits` is an object keyed by that value and `tieredBy` names the option that selects it.
|
|
424
450
|
*/
|
|
@@ -589,7 +615,7 @@ export const imageAssetSchema = imageassetImageAssetSchema;
|
|
|
589
615
|
/**
|
|
590
616
|
* **Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)
|
|
591
617
|
* with `prompt`, a `model` that accepts a starting image, and that image in
|
|
592
|
-
* `options.
|
|
618
|
+
* `options.startSrc` — for example `seedance-2.0-image-to-video`.** This type continues to
|
|
593
619
|
* function and is internally rewritten to VideoAsset; no behaviour change for
|
|
594
620
|
* existing integrations.
|
|
595
621
|
*
|
|
@@ -2564,7 +2590,8 @@ export const transformationSchema = transformationTransformationSchema;
|
|
|
2564
2590
|
* - **Source URL:** set `src` to the URL of an mp4 (or compatible) video file.
|
|
2565
2591
|
* - **Generated:** set `prompt` to describe the motion. Choose a generator
|
|
2566
2592
|
* with `model` and configure it with model-specific `options`. Models that
|
|
2567
|
-
* animate
|
|
2593
|
+
* animate an image take it as `options.startSrc` (the original
|
|
2594
|
+
* image-to-video models use `options.inputSrc`); the default model
|
|
2568
2595
|
* generates from the prompt alone. The generated `src` is filled in
|
|
2569
2596
|
* automatically.
|
|
2570
2597
|
* - **Both:** `src` acts as a preview placeholder while `prompt` drives
|
|
@@ -2985,12 +3012,8 @@ export const probeRequest = z.object({
|
|
|
2985
3012
|
*/
|
|
2986
3013
|
export const probeResponse = proberesponseProbeResponseSchema;
|
|
2987
3014
|
export const postGenerateRequest = z.object({
|
|
2988
|
-
body: z.
|
|
2989
|
-
asset:
|
|
2990
|
-
imageassetImageAssetSchema,
|
|
2991
|
-
videoassetVideoAssetSchema,
|
|
2992
|
-
audioassetAudioAssetSchema
|
|
2993
|
-
]),
|
|
3015
|
+
body: z.object({
|
|
3016
|
+
asset: generationassetGenerationAssetSchema,
|
|
2994
3017
|
length: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2995
3018
|
return undefined; if (Array.isArray(v))
|
|
2996
3019
|
return v; if (typeof v === 'string') {
|
|
@@ -2998,7 +3021,7 @@ export const postGenerateRequest = z.object({
|
|
|
2998
3021
|
return v;
|
|
2999
3022
|
return Number(v);
|
|
3000
3023
|
} return v; }), z.number().gt(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
|
|
3001
|
-
})
|
|
3024
|
+
}),
|
|
3002
3025
|
path: z.optional(z.never()),
|
|
3003
3026
|
query: z.optional(z.never()),
|
|
3004
3027
|
headers: z.optional(z.object({
|
package/dist/zod/zod.gen.ts
CHANGED
|
@@ -217,7 +217,10 @@ export const googleDriveDestinationGoogleDriveDestinationSchema = z.object({
|
|
|
217
217
|
export const googleDriveDestinationSchema = googleDriveDestinationGoogleDriveDestinationSchema;
|
|
218
218
|
|
|
219
219
|
/**
|
|
220
|
+
* **Notice: MuxDestinationOptions, like the Mux destination, is deprecated.** It continues to work, with no behaviour change for existing integrations.
|
|
220
221
|
* Pass additional options to control how Mux processes video. Currently supports playback_policy and passthrough options.
|
|
222
|
+
*
|
|
223
|
+
* @deprecated
|
|
221
224
|
*/
|
|
222
225
|
export const muxDestinationOptionsMuxDestinationOptionsSchema = z.object({
|
|
223
226
|
playbackPolicy: z.optional(z.array(z.enum(['public', 'signed']))),
|
|
@@ -227,7 +230,10 @@ export const muxDestinationOptionsMuxDestinationOptionsSchema = z.object({
|
|
|
227
230
|
export const muxDestinationOptionsSchema = muxDestinationOptionsMuxDestinationOptionsSchema;
|
|
228
231
|
|
|
229
232
|
/**
|
|
233
|
+
* **Notice: The Mux destination is deprecated.** It continues to work, with no behaviour change for existing integrations.
|
|
230
234
|
* Send videos to the [Mux](https://www.mux.com/docs) video hosting and streaming service. Mux credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/mux), not in the request.
|
|
235
|
+
*
|
|
236
|
+
* @deprecated
|
|
231
237
|
*/
|
|
232
238
|
export const muxDestinationMuxDestinationSchema = z.object({
|
|
233
239
|
provider: z.literal("mux"),
|
|
@@ -270,7 +276,10 @@ export const shotstackDestinationShotstackDestinationSchema = z.object({
|
|
|
270
276
|
export const shotstackDestinationSchema = shotstackDestinationShotstackDestinationSchema;
|
|
271
277
|
|
|
272
278
|
/**
|
|
279
|
+
* **Notice: TiktokDestinationOptions, like the TikTok destination, is deprecated.** It continues to work, with no behaviour change for existing integrations.
|
|
273
280
|
* Pass additional options to control how TikTok publishes video.
|
|
281
|
+
*
|
|
282
|
+
* @deprecated
|
|
274
283
|
*/
|
|
275
284
|
export const tiktokDestinationOptionsTiktokDestinationOptionsSchema = z.object({
|
|
276
285
|
title: z.optional(z.string().max(150)),
|
|
@@ -285,7 +294,10 @@ export const tiktokDestinationOptionsTiktokDestinationOptionsSchema = z.object({
|
|
|
285
294
|
}).strict();
|
|
286
295
|
|
|
287
296
|
/**
|
|
297
|
+
* **Notice: The TikTok destination is deprecated.** It continues to work, with no behaviour change for existing integrations.
|
|
288
298
|
* Send videos to TikTok. TikTok credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/tiktok), not in the request.
|
|
299
|
+
*
|
|
300
|
+
* @deprecated
|
|
289
301
|
*/
|
|
290
302
|
export const tiktokDestinationTiktokDestinationSchema = z.object({
|
|
291
303
|
provider: z.literal("tiktok"),
|
|
@@ -379,6 +391,22 @@ export const fontFontSchema = z.object({
|
|
|
379
391
|
|
|
380
392
|
export const fontSchema = fontFontSchema;
|
|
381
393
|
|
|
394
|
+
/**
|
|
395
|
+
* An image, video or audio asset to generate from a text prompt.
|
|
396
|
+
*/
|
|
397
|
+
export const generationassetGenerationAssetSchema = z.object({
|
|
398
|
+
type: z.enum([
|
|
399
|
+
'image',
|
|
400
|
+
'video',
|
|
401
|
+
'audio'
|
|
402
|
+
]),
|
|
403
|
+
prompt: z.string().min(1).max(4000).regex(/\S/),
|
|
404
|
+
model: z.optional(z.string()),
|
|
405
|
+
options: z.optional(z.record(z.string(), z.unknown()))
|
|
406
|
+
}).strict();
|
|
407
|
+
|
|
408
|
+
export const generationAssetSchema = generationassetGenerationAssetSchema;
|
|
409
|
+
|
|
382
410
|
/**
|
|
383
411
|
* What one generation costs, in credits: the rate multiplied by the units consumed. `quantity` says how to count the units, and is absent when one generation is one unit. Where a model charges differently per option value, `credits` is an object keyed by that value and `tieredBy` names the option that selects it.
|
|
384
412
|
*/
|
|
@@ -511,7 +539,7 @@ export const imageAssetSchema = imageassetImageAssetSchema;
|
|
|
511
539
|
/**
|
|
512
540
|
* **Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)
|
|
513
541
|
* with `prompt`, a `model` that accepts a starting image, and that image in
|
|
514
|
-
* `options.
|
|
542
|
+
* `options.startSrc` — for example `seedance-2.0-image-to-video`.** This type continues to
|
|
515
543
|
* function and is internally rewritten to VideoAsset; no behaviour change for
|
|
516
544
|
* existing integrations.
|
|
517
545
|
*
|
|
@@ -2104,7 +2132,8 @@ export const transformationSchema = transformationTransformationSchema;
|
|
|
2104
2132
|
* - **Source URL:** set `src` to the URL of an mp4 (or compatible) video file.
|
|
2105
2133
|
* - **Generated:** set `prompt` to describe the motion. Choose a generator
|
|
2106
2134
|
* with `model` and configure it with model-specific `options`. Models that
|
|
2107
|
-
* animate
|
|
2135
|
+
* animate an image take it as `options.startSrc` (the original
|
|
2136
|
+
* image-to-video models use `options.inputSrc`); the default model
|
|
2108
2137
|
* generates from the prompt alone. The generated `src` is filled in
|
|
2109
2138
|
* automatically.
|
|
2110
2139
|
* - **Both:** `src` acts as a preview placeholder while `prompt` drives
|
|
@@ -2500,14 +2529,10 @@ export const probeRequest = z.object({
|
|
|
2500
2529
|
export const probeResponse = proberesponseProbeResponseSchema;
|
|
2501
2530
|
|
|
2502
2531
|
export const postGenerateRequest = z.object({
|
|
2503
|
-
body: z.
|
|
2504
|
-
asset:
|
|
2505
|
-
imageassetImageAssetSchema,
|
|
2506
|
-
videoassetVideoAssetSchema,
|
|
2507
|
-
audioassetAudioAssetSchema
|
|
2508
|
-
]),
|
|
2532
|
+
body: z.object({
|
|
2533
|
+
asset: generationassetGenerationAssetSchema,
|
|
2509
2534
|
length: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gt(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
|
|
2510
|
-
})
|
|
2535
|
+
}),
|
|
2511
2536
|
path: z.optional(z.never()),
|
|
2512
2537
|
query: z.optional(z.never()),
|
|
2513
2538
|
headers: z.optional(z.object({
|