@shotstack/schemas 1.18.4 → 1.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/schema.d.ts CHANGED
@@ -271,6 +271,9 @@ export interface paths {
271
271
  *
272
272
  * Option schemas are omitted by default. Request them with `expand=options`.
273
273
  *
274
+ * Each model's `available` reflects the plan of the account behind the calling API
275
+ * key, so offer only the models it marks available.
276
+ *
274
277
  * **Base URL:** <a href="#">https://api.shotstack.io/edit/{version}</a>
275
278
  */
276
279
  get: operations["getModels"];
@@ -745,12 +748,8 @@ export interface components {
745
748
  * @enum {string}
746
749
  */
747
750
  volumeEffect?: "none" | "fadeIn" | "fadeOut" | "fadeInFadeOut";
748
- /**
749
- * Format: float
750
- * @description Adjust the playback speed of the video clip between 0 (paused) and 10 (10x normal speed) where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire video (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire video (i.e. original length / 2).
751
- * @example 1
752
- */
753
- speed?: number;
751
+ /** @description Adjust the playback speed of the video clip. Use a number for a constant speed or an array of [Tween](./#tocs_tween) objects to change speed over time, for example easing from normal speed up to 3x. */
752
+ speed?: number | components["schemas"]["Tween"][];
754
753
  crop?: components["schemas"]["Crop"];
755
754
  chromaKey?: components["schemas"]["ChromaKey"];
756
755
  };
@@ -4120,6 +4119,17 @@ export interface operations {
4120
4119
  options?: {
4121
4120
  [key: string]: unknown;
4122
4121
  };
4122
+ /**
4123
+ * @description Whether the account behind the calling API key can generate with this model. Omitted when that cannot be determined; treat a missing value as unknown, not as available. Generation requests are checked either way.
4124
+ * @example false
4125
+ */
4126
+ available?: boolean;
4127
+ /**
4128
+ * @description Why `available` is false. `AiCapabilityNotIncluded`: the account's plan does not include this kind of generation. `AiDisabled`: AI generation is turned off for the account. `AiAccessUnavailable`: access could not be confirmed; try again later.
4129
+ * @example AiCapabilityNotIncluded
4130
+ * @enum {string}
4131
+ */
4132
+ unavailableReason?: "AiCapabilityNotIncluded" | "AiDisabled" | "AiAccessUnavailable";
4123
4133
  };
4124
4134
  };
4125
4135
  };
@@ -493,7 +493,13 @@ exports.generationmodelGenerationModelSchema = zod_1.z.object({
493
493
  name: zod_1.z.optional(zod_1.z.string()),
494
494
  description: zod_1.z.optional(zod_1.z.string()),
495
495
  pricing: zod_1.z.optional(exports.generationmodelpricingGenerationModelPricingSchema),
496
- options: zod_1.z.optional(zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()))
496
+ options: zod_1.z.optional(zod_1.z.record(zod_1.z.string(), zod_1.z.unknown())),
497
+ available: zod_1.z.optional(zod_1.z.boolean()),
498
+ unavailableReason: zod_1.z.optional(zod_1.z.enum([
499
+ 'AiCapabilityNotIncluded',
500
+ 'AiDisabled',
501
+ 'AiAccessUnavailable'
502
+ ]))
497
503
  }).strict();
498
504
  /**
499
505
  * The Html5Asset renders full HTML5/CSS3/JS.
@@ -2568,13 +2574,16 @@ exports.videoassetVideoAssetSchema = zod_1.z.object({
2568
2574
  'fadeOut',
2569
2575
  'fadeInFadeOut'
2570
2576
  ])),
2571
- speed: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2572
- return undefined; if (Array.isArray(v))
2573
- return v; if (typeof v === 'string') {
2574
- if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2575
- return v;
2576
- return Number(v);
2577
- } return v; }), zod_1.z.number().gte(0).lte(10)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2577
+ speed: zod_1.z.optional(zod_1.z.union([
2578
+ zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2579
+ return undefined; if (Array.isArray(v))
2580
+ return v; if (typeof v === 'string') {
2581
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2582
+ return v;
2583
+ return Number(v);
2584
+ } return v; }), zod_1.z.number().gte(0).lte(10)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2585
+ zod_1.z.array(exports.tweenTweenSchema)
2586
+ ])),
2578
2587
  crop: zod_1.z.optional(exports.cropCropSchema),
2579
2588
  chromaKey: zod_1.z.optional(exports.chromakeyChromaKeySchema)
2580
2589
  }).strict().superRefine((data, ctx) => {