@shotstack/schemas 1.18.1 → 1.18.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 +66 -28
- package/dist/json-schema/edit.json +3 -3
- package/dist/json-schema/index.cjs +1 -1
- package/dist/json-schema/index.js +1 -1
- package/dist/schema.d.ts +49 -25
- package/dist/zod/zod.gen.cjs +38 -16
- package/dist/zod/zod.gen.d.ts +87 -42
- package/dist/zod/zod.gen.js +38 -16
- package/dist/zod/zod.gen.ts +14 -10
- package/package.json +1 -1
package/dist/schema.d.ts
CHANGED
|
@@ -289,7 +289,7 @@ export interface paths {
|
|
|
289
289
|
path: {
|
|
290
290
|
/**
|
|
291
291
|
* @description The model identifier, as returned by the list endpoint.
|
|
292
|
-
* @example seedance-2.0
|
|
292
|
+
* @example seedance-2.0-text-to-video
|
|
293
293
|
*/
|
|
294
294
|
id: string;
|
|
295
295
|
};
|
|
@@ -709,8 +709,8 @@ export interface components {
|
|
|
709
709
|
*/
|
|
710
710
|
prompt?: string;
|
|
711
711
|
/**
|
|
712
|
-
* @description The generation model to use when `prompt` is set (e.g. `
|
|
713
|
-
* @example seedance-2.0
|
|
712
|
+
* @description The generation model to use when `prompt` is set (e.g. `seedance-2.0-text-to-video`). Defaults to `seedance-2.0-text-to-video` if omitted. `GET /models` lists what is available and the options each accepts.
|
|
713
|
+
* @example seedance-2.0-text-to-video
|
|
714
714
|
*/
|
|
715
715
|
model?: string;
|
|
716
716
|
/**
|
|
@@ -1395,7 +1395,7 @@ export interface components {
|
|
|
1395
1395
|
* @deprecated
|
|
1396
1396
|
* @description **Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)
|
|
1397
1397
|
* with `prompt`, a `model` that accepts a starting image, and that image in
|
|
1398
|
-
* `options.inputSrc` — for example `
|
|
1398
|
+
* `options.inputSrc` — for example `seedance-2.0-image-to-video`.** This type continues to
|
|
1399
1399
|
* function and is internally rewritten to VideoAsset; no behaviour change for
|
|
1400
1400
|
* existing integrations.
|
|
1401
1401
|
*
|
|
@@ -4019,7 +4019,7 @@ export interface operations {
|
|
|
4019
4019
|
path: {
|
|
4020
4020
|
/**
|
|
4021
4021
|
* @description The model identifier, as returned by the list endpoint.
|
|
4022
|
-
* @example seedance-2.0
|
|
4022
|
+
* @example seedance-2.0-text-to-video
|
|
4023
4023
|
*/
|
|
4024
4024
|
id: string;
|
|
4025
4025
|
};
|
|
@@ -4036,7 +4036,7 @@ export interface operations {
|
|
|
4036
4036
|
"application/json": {
|
|
4037
4037
|
/**
|
|
4038
4038
|
* @description The identifier to set as the asset `model`. Carries no provider name, so routing can change without a public rename.
|
|
4039
|
-
* @example seedance-2.0
|
|
4039
|
+
* @example seedance-2.0-text-to-video
|
|
4040
4040
|
*/
|
|
4041
4041
|
model: string;
|
|
4042
4042
|
/**
|
|
@@ -4048,13 +4048,7 @@ export interface operations {
|
|
|
4048
4048
|
/** @description What one generation with this model costs. */
|
|
4049
4049
|
pricing?: {
|
|
4050
4050
|
/**
|
|
4051
|
-
* @description
|
|
4052
|
-
* @example second
|
|
4053
|
-
* @enum {string}
|
|
4054
|
-
*/
|
|
4055
|
-
unit: "render" | "second" | "minute" | "thousandCharacters";
|
|
4056
|
-
/**
|
|
4057
|
-
* @description Credits per unit. A number when the rate is flat, or an object keyed by the values of the options named in `tieredBy`.
|
|
4051
|
+
* @description Credits per unit. A number when the rate is flat, or an object keyed by the values of the option named in `tieredBy`.
|
|
4058
4052
|
* @example {
|
|
4059
4053
|
* "480p": 0.9375,
|
|
4060
4054
|
* "720p": 1.8962,
|
|
@@ -4064,18 +4058,48 @@ export interface operations {
|
|
|
4064
4058
|
credits: number | {
|
|
4065
4059
|
[key: string]: unknown;
|
|
4066
4060
|
};
|
|
4067
|
-
/**
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
/**
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4061
|
+
/** @description The option whose value selects the rate, and the value assumed when the option is absent. Present only when `credits` is keyed. */
|
|
4062
|
+
tieredBy?: {
|
|
4063
|
+
/** @example resolution */
|
|
4064
|
+
option: string;
|
|
4065
|
+
/** @example 720p */
|
|
4066
|
+
default: string;
|
|
4067
|
+
};
|
|
4068
|
+
/** @description How many units a generation consumes. Take the value `measure` names, or `default` when the request carries none, hold it within `min` and `max`, divide by `per`, and round up when `round` is `up`. Absent when one generation is one unit. */
|
|
4069
|
+
quantity?: {
|
|
4070
|
+
/**
|
|
4071
|
+
* @description What the count is taken from, and the scale it is measured in.
|
|
4072
|
+
* @example clipSeconds
|
|
4073
|
+
* @enum {string}
|
|
4074
|
+
*/
|
|
4075
|
+
measure: "clipSeconds" | "promptCharacters";
|
|
4076
|
+
/**
|
|
4077
|
+
* @description How many of `measure` make one billable unit.
|
|
4078
|
+
* @example 60
|
|
4079
|
+
*/
|
|
4080
|
+
per: number;
|
|
4081
|
+
/**
|
|
4082
|
+
* @description Fewest accepted. A smaller request is charged at this.
|
|
4083
|
+
* @example 3
|
|
4084
|
+
*/
|
|
4085
|
+
min?: number;
|
|
4086
|
+
/**
|
|
4087
|
+
* @description Most accepted. A larger request is charged at this.
|
|
4088
|
+
* @example 600
|
|
4089
|
+
*/
|
|
4090
|
+
max?: number;
|
|
4091
|
+
/**
|
|
4092
|
+
* @description Assumed when the request carries no value.
|
|
4093
|
+
* @example 30
|
|
4094
|
+
*/
|
|
4095
|
+
default?: number;
|
|
4096
|
+
/**
|
|
4097
|
+
* @description Present when a partial unit is charged as a whole one. A 61 second track on a per-minute rate is charged as two minutes.
|
|
4098
|
+
* @example up
|
|
4099
|
+
* @enum {string}
|
|
4100
|
+
*/
|
|
4101
|
+
round?: "up";
|
|
4102
|
+
};
|
|
4079
4103
|
/**
|
|
4080
4104
|
* @description The date this rate took effect, or `legacy` for a rate that predates dated pricing.
|
|
4081
4105
|
* @example 2026-08-13
|
package/dist/zod/zod.gen.cjs
CHANGED
|
@@ -429,15 +429,9 @@ exports.fontFontSchema = zod_1.z.object({
|
|
|
429
429
|
}).strict();
|
|
430
430
|
exports.fontSchema = exports.fontFontSchema;
|
|
431
431
|
/**
|
|
432
|
-
* What one generation costs, in credits
|
|
432
|
+
* 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.
|
|
433
433
|
*/
|
|
434
434
|
exports.generationmodelpricingGenerationModelPricingSchema = zod_1.z.object({
|
|
435
|
-
unit: zod_1.z.enum([
|
|
436
|
-
'render',
|
|
437
|
-
'second',
|
|
438
|
-
'minute',
|
|
439
|
-
'thousandCharacters'
|
|
440
|
-
]),
|
|
441
435
|
credits: zod_1.z.union([
|
|
442
436
|
zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
443
437
|
return undefined; if (Array.isArray(v))
|
|
@@ -448,14 +442,42 @@ exports.generationmodelpricingGenerationModelPricingSchema = zod_1.z.object({
|
|
|
448
442
|
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
449
443
|
zod_1.z.record(zod_1.z.string(), zod_1.z.unknown())
|
|
450
444
|
]),
|
|
451
|
-
tieredBy: zod_1.z.optional(zod_1.z.
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
445
|
+
tieredBy: zod_1.z.optional(zod_1.z.object({
|
|
446
|
+
option: zod_1.z.string(),
|
|
447
|
+
default: zod_1.z.string()
|
|
448
|
+
})),
|
|
449
|
+
quantity: zod_1.z.optional(zod_1.z.object({
|
|
450
|
+
measure: zod_1.z.enum(['clipSeconds', 'promptCharacters']),
|
|
451
|
+
per: zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
452
|
+
return undefined; if (Array.isArray(v))
|
|
453
|
+
return v; if (typeof v === 'string') {
|
|
454
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
455
|
+
return v;
|
|
456
|
+
return Number(v);
|
|
457
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
458
|
+
min: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
459
|
+
return undefined; if (Array.isArray(v))
|
|
460
|
+
return v; if (typeof v === 'string') {
|
|
461
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
462
|
+
return v;
|
|
463
|
+
return Number(v);
|
|
464
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
465
|
+
max: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
466
|
+
return undefined; if (Array.isArray(v))
|
|
467
|
+
return v; if (typeof v === 'string') {
|
|
468
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
469
|
+
return v;
|
|
470
|
+
return Number(v);
|
|
471
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
472
|
+
default: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
473
|
+
return undefined; if (Array.isArray(v))
|
|
474
|
+
return v; if (typeof v === 'string') {
|
|
475
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
476
|
+
return v;
|
|
477
|
+
return Number(v);
|
|
478
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
479
|
+
round: zod_1.z.optional(zod_1.z.enum(['up']))
|
|
480
|
+
})),
|
|
459
481
|
effectiveFrom: zod_1.z.string()
|
|
460
482
|
}).strict();
|
|
461
483
|
/**
|
|
@@ -560,7 +582,7 @@ exports.imageAssetSchema = exports.imageassetImageAssetSchema;
|
|
|
560
582
|
/**
|
|
561
583
|
* **Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)
|
|
562
584
|
* with `prompt`, a `model` that accepts a starting image, and that image in
|
|
563
|
-
* `options.inputSrc` — for example `
|
|
585
|
+
* `options.inputSrc` — for example `seedance-2.0-image-to-video`.** This type continues to
|
|
564
586
|
* function and is internally rewritten to VideoAsset; no behaviour change for
|
|
565
587
|
* existing integrations.
|
|
566
588
|
*
|
package/dist/zod/zod.gen.d.ts
CHANGED
|
@@ -761,18 +761,27 @@ export declare const fontSchema: z.ZodObject<{
|
|
|
761
761
|
src: z.ZodString;
|
|
762
762
|
}, z.core.$strict>;
|
|
763
763
|
/**
|
|
764
|
-
* What one generation costs, in credits
|
|
764
|
+
* 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.
|
|
765
765
|
*/
|
|
766
766
|
export declare const generationmodelpricingGenerationModelPricingSchema: z.ZodObject<{
|
|
767
|
-
unit: z.ZodEnum<{
|
|
768
|
-
render: "render";
|
|
769
|
-
second: "second";
|
|
770
|
-
minute: "minute";
|
|
771
|
-
thousandCharacters: "thousandCharacters";
|
|
772
|
-
}>;
|
|
773
767
|
credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
|
|
774
|
-
tieredBy: z.ZodOptional<z.
|
|
775
|
-
|
|
768
|
+
tieredBy: z.ZodOptional<z.ZodObject<{
|
|
769
|
+
option: z.ZodString;
|
|
770
|
+
default: z.ZodString;
|
|
771
|
+
}, z.core.$strip>>;
|
|
772
|
+
quantity: z.ZodOptional<z.ZodObject<{
|
|
773
|
+
measure: z.ZodEnum<{
|
|
774
|
+
clipSeconds: "clipSeconds";
|
|
775
|
+
promptCharacters: "promptCharacters";
|
|
776
|
+
}>;
|
|
777
|
+
per: z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>;
|
|
778
|
+
min: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
779
|
+
max: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
780
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
781
|
+
round: z.ZodOptional<z.ZodEnum<{
|
|
782
|
+
up: "up";
|
|
783
|
+
}>>;
|
|
784
|
+
}, z.core.$strip>>;
|
|
776
785
|
effectiveFrom: z.ZodString;
|
|
777
786
|
}, z.core.$strict>;
|
|
778
787
|
/**
|
|
@@ -786,15 +795,24 @@ export declare const generationmodelGenerationModelSchema: z.ZodObject<{
|
|
|
786
795
|
audio: "audio";
|
|
787
796
|
}>;
|
|
788
797
|
pricing: z.ZodOptional<z.ZodObject<{
|
|
789
|
-
unit: z.ZodEnum<{
|
|
790
|
-
render: "render";
|
|
791
|
-
second: "second";
|
|
792
|
-
minute: "minute";
|
|
793
|
-
thousandCharacters: "thousandCharacters";
|
|
794
|
-
}>;
|
|
795
798
|
credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
|
|
796
|
-
tieredBy: z.ZodOptional<z.
|
|
797
|
-
|
|
799
|
+
tieredBy: z.ZodOptional<z.ZodObject<{
|
|
800
|
+
option: z.ZodString;
|
|
801
|
+
default: z.ZodString;
|
|
802
|
+
}, z.core.$strip>>;
|
|
803
|
+
quantity: z.ZodOptional<z.ZodObject<{
|
|
804
|
+
measure: z.ZodEnum<{
|
|
805
|
+
clipSeconds: "clipSeconds";
|
|
806
|
+
promptCharacters: "promptCharacters";
|
|
807
|
+
}>;
|
|
808
|
+
per: z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>;
|
|
809
|
+
min: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
810
|
+
max: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
811
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
812
|
+
round: z.ZodOptional<z.ZodEnum<{
|
|
813
|
+
up: "up";
|
|
814
|
+
}>>;
|
|
815
|
+
}, z.core.$strip>>;
|
|
798
816
|
effectiveFrom: z.ZodString;
|
|
799
817
|
}, z.core.$strict>>;
|
|
800
818
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -918,7 +936,7 @@ export declare const imageAssetSchema: z.ZodObject<{
|
|
|
918
936
|
/**
|
|
919
937
|
* **Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)
|
|
920
938
|
* with `prompt`, a `model` that accepts a starting image, and that image in
|
|
921
|
-
* `options.inputSrc` — for example `
|
|
939
|
+
* `options.inputSrc` — for example `seedance-2.0-image-to-video`.** This type continues to
|
|
922
940
|
* function and is internally rewritten to VideoAsset; no behaviour change for
|
|
923
941
|
* existing integrations.
|
|
924
942
|
*
|
|
@@ -1497,15 +1515,24 @@ export declare const generationmodellistresponseGenerationModelListResponseSchem
|
|
|
1497
1515
|
audio: "audio";
|
|
1498
1516
|
}>;
|
|
1499
1517
|
pricing: z.ZodOptional<z.ZodObject<{
|
|
1500
|
-
unit: z.ZodEnum<{
|
|
1501
|
-
render: "render";
|
|
1502
|
-
second: "second";
|
|
1503
|
-
minute: "minute";
|
|
1504
|
-
thousandCharacters: "thousandCharacters";
|
|
1505
|
-
}>;
|
|
1506
1518
|
credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
|
|
1507
|
-
tieredBy: z.ZodOptional<z.
|
|
1508
|
-
|
|
1519
|
+
tieredBy: z.ZodOptional<z.ZodObject<{
|
|
1520
|
+
option: z.ZodString;
|
|
1521
|
+
default: z.ZodString;
|
|
1522
|
+
}, z.core.$strip>>;
|
|
1523
|
+
quantity: z.ZodOptional<z.ZodObject<{
|
|
1524
|
+
measure: z.ZodEnum<{
|
|
1525
|
+
clipSeconds: "clipSeconds";
|
|
1526
|
+
promptCharacters: "promptCharacters";
|
|
1527
|
+
}>;
|
|
1528
|
+
per: z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>;
|
|
1529
|
+
min: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
1530
|
+
max: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
1531
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
1532
|
+
round: z.ZodOptional<z.ZodEnum<{
|
|
1533
|
+
up: "up";
|
|
1534
|
+
}>>;
|
|
1535
|
+
}, z.core.$strip>>;
|
|
1509
1536
|
effectiveFrom: z.ZodString;
|
|
1510
1537
|
}, z.core.$strict>>;
|
|
1511
1538
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -60500,15 +60527,24 @@ export declare const getModelsResponse: z.ZodObject<{
|
|
|
60500
60527
|
audio: "audio";
|
|
60501
60528
|
}>;
|
|
60502
60529
|
pricing: z.ZodOptional<z.ZodObject<{
|
|
60503
|
-
unit: z.ZodEnum<{
|
|
60504
|
-
render: "render";
|
|
60505
|
-
second: "second";
|
|
60506
|
-
minute: "minute";
|
|
60507
|
-
thousandCharacters: "thousandCharacters";
|
|
60508
|
-
}>;
|
|
60509
60530
|
credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
|
|
60510
|
-
tieredBy: z.ZodOptional<z.
|
|
60511
|
-
|
|
60531
|
+
tieredBy: z.ZodOptional<z.ZodObject<{
|
|
60532
|
+
option: z.ZodString;
|
|
60533
|
+
default: z.ZodString;
|
|
60534
|
+
}, z.core.$strip>>;
|
|
60535
|
+
quantity: z.ZodOptional<z.ZodObject<{
|
|
60536
|
+
measure: z.ZodEnum<{
|
|
60537
|
+
clipSeconds: "clipSeconds";
|
|
60538
|
+
promptCharacters: "promptCharacters";
|
|
60539
|
+
}>;
|
|
60540
|
+
per: z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>;
|
|
60541
|
+
min: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
60542
|
+
max: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
60543
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
60544
|
+
round: z.ZodOptional<z.ZodEnum<{
|
|
60545
|
+
up: "up";
|
|
60546
|
+
}>>;
|
|
60547
|
+
}, z.core.$strip>>;
|
|
60512
60548
|
effectiveFrom: z.ZodString;
|
|
60513
60549
|
}, z.core.$strict>>;
|
|
60514
60550
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -60532,15 +60568,24 @@ export declare const getModelResponse: z.ZodObject<{
|
|
|
60532
60568
|
audio: "audio";
|
|
60533
60569
|
}>;
|
|
60534
60570
|
pricing: z.ZodOptional<z.ZodObject<{
|
|
60535
|
-
unit: z.ZodEnum<{
|
|
60536
|
-
render: "render";
|
|
60537
|
-
second: "second";
|
|
60538
|
-
minute: "minute";
|
|
60539
|
-
thousandCharacters: "thousandCharacters";
|
|
60540
|
-
}>;
|
|
60541
60571
|
credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
|
|
60542
|
-
tieredBy: z.ZodOptional<z.
|
|
60543
|
-
|
|
60572
|
+
tieredBy: z.ZodOptional<z.ZodObject<{
|
|
60573
|
+
option: z.ZodString;
|
|
60574
|
+
default: z.ZodString;
|
|
60575
|
+
}, z.core.$strip>>;
|
|
60576
|
+
quantity: z.ZodOptional<z.ZodObject<{
|
|
60577
|
+
measure: z.ZodEnum<{
|
|
60578
|
+
clipSeconds: "clipSeconds";
|
|
60579
|
+
promptCharacters: "promptCharacters";
|
|
60580
|
+
}>;
|
|
60581
|
+
per: z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>;
|
|
60582
|
+
min: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
60583
|
+
max: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
60584
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
60585
|
+
round: z.ZodOptional<z.ZodEnum<{
|
|
60586
|
+
up: "up";
|
|
60587
|
+
}>>;
|
|
60588
|
+
}, z.core.$strip>>;
|
|
60544
60589
|
effectiveFrom: z.ZodString;
|
|
60545
60590
|
}, z.core.$strict>>;
|
|
60546
60591
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
package/dist/zod/zod.gen.js
CHANGED
|
@@ -420,15 +420,9 @@ export const fontFontSchema = z.object({
|
|
|
420
420
|
}).strict();
|
|
421
421
|
export const fontSchema = fontFontSchema;
|
|
422
422
|
/**
|
|
423
|
-
* What one generation costs, in credits
|
|
423
|
+
* 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
424
|
*/
|
|
425
425
|
export const generationmodelpricingGenerationModelPricingSchema = z.object({
|
|
426
|
-
unit: z.enum([
|
|
427
|
-
'render',
|
|
428
|
-
'second',
|
|
429
|
-
'minute',
|
|
430
|
-
'thousandCharacters'
|
|
431
|
-
]),
|
|
432
426
|
credits: z.union([
|
|
433
427
|
z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
434
428
|
return undefined; if (Array.isArray(v))
|
|
@@ -439,14 +433,42 @@ export const generationmodelpricingGenerationModelPricingSchema = z.object({
|
|
|
439
433
|
} return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
440
434
|
z.record(z.string(), z.unknown())
|
|
441
435
|
]),
|
|
442
|
-
tieredBy: z.optional(z.
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
436
|
+
tieredBy: z.optional(z.object({
|
|
437
|
+
option: z.string(),
|
|
438
|
+
default: z.string()
|
|
439
|
+
})),
|
|
440
|
+
quantity: z.optional(z.object({
|
|
441
|
+
measure: z.enum(['clipSeconds', 'promptCharacters']),
|
|
442
|
+
per: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
443
|
+
return undefined; if (Array.isArray(v))
|
|
444
|
+
return v; if (typeof v === 'string') {
|
|
445
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
446
|
+
return v;
|
|
447
|
+
return Number(v);
|
|
448
|
+
} return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
449
|
+
min: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
450
|
+
return undefined; if (Array.isArray(v))
|
|
451
|
+
return v; if (typeof v === 'string') {
|
|
452
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
453
|
+
return v;
|
|
454
|
+
return Number(v);
|
|
455
|
+
} return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
456
|
+
max: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
457
|
+
return undefined; if (Array.isArray(v))
|
|
458
|
+
return v; if (typeof v === 'string') {
|
|
459
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
460
|
+
return v;
|
|
461
|
+
return Number(v);
|
|
462
|
+
} return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
463
|
+
default: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
464
|
+
return undefined; if (Array.isArray(v))
|
|
465
|
+
return v; if (typeof v === 'string') {
|
|
466
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
467
|
+
return v;
|
|
468
|
+
return Number(v);
|
|
469
|
+
} return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
470
|
+
round: z.optional(z.enum(['up']))
|
|
471
|
+
})),
|
|
450
472
|
effectiveFrom: z.string()
|
|
451
473
|
}).strict();
|
|
452
474
|
/**
|
|
@@ -551,7 +573,7 @@ export const imageAssetSchema = imageassetImageAssetSchema;
|
|
|
551
573
|
/**
|
|
552
574
|
* **Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)
|
|
553
575
|
* with `prompt`, a `model` that accepts a starting image, and that image in
|
|
554
|
-
* `options.inputSrc` — for example `
|
|
576
|
+
* `options.inputSrc` — for example `seedance-2.0-image-to-video`.** This type continues to
|
|
555
577
|
* function and is internally rewritten to VideoAsset; no behaviour change for
|
|
556
578
|
* existing integrations.
|
|
557
579
|
*
|
package/dist/zod/zod.gen.ts
CHANGED
|
@@ -380,21 +380,25 @@ export const fontFontSchema = z.object({
|
|
|
380
380
|
export const fontSchema = fontFontSchema;
|
|
381
381
|
|
|
382
382
|
/**
|
|
383
|
-
* What one generation costs, in credits
|
|
383
|
+
* 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
384
|
*/
|
|
385
385
|
export const generationmodelpricingGenerationModelPricingSchema = z.object({
|
|
386
|
-
unit: z.enum([
|
|
387
|
-
'render',
|
|
388
|
-
'second',
|
|
389
|
-
'minute',
|
|
390
|
-
'thousandCharacters'
|
|
391
|
-
]),
|
|
392
386
|
credits: z.union([
|
|
393
387
|
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()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
394
388
|
z.record(z.string(), z.unknown())
|
|
395
389
|
]),
|
|
396
|
-
tieredBy: z.optional(z.
|
|
397
|
-
|
|
390
|
+
tieredBy: z.optional(z.object({
|
|
391
|
+
option: z.string(),
|
|
392
|
+
default: z.string()
|
|
393
|
+
})),
|
|
394
|
+
quantity: z.optional(z.object({
|
|
395
|
+
measure: z.enum(['clipSeconds', 'promptCharacters']),
|
|
396
|
+
per: 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()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
397
|
+
min: 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()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
398
|
+
max: 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()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
399
|
+
default: 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()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
400
|
+
round: z.optional(z.enum(['up']))
|
|
401
|
+
})),
|
|
398
402
|
effectiveFrom: z.string()
|
|
399
403
|
}).strict();
|
|
400
404
|
|
|
@@ -495,7 +499,7 @@ export const imageAssetSchema = imageassetImageAssetSchema;
|
|
|
495
499
|
/**
|
|
496
500
|
* **Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)
|
|
497
501
|
* with `prompt`, a `model` that accepts a starting image, and that image in
|
|
498
|
-
* `options.inputSrc` — for example `
|
|
502
|
+
* `options.inputSrc` — for example `seedance-2.0-image-to-video`.** This type continues to
|
|
499
503
|
* function and is internally rewritten to VideoAsset; no behaviour change for
|
|
500
504
|
* existing integrations.
|
|
501
505
|
*
|