@shotstack/schemas 1.20.0 → 1.20.2
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 +719 -219
- package/dist/json-schema/edit.json +1 -1
- package/dist/json-schema/index.cjs +1 -1
- package/dist/json-schema/index.js +1 -1
- package/dist/schema.d.ts +594 -147
- package/dist/zod/zod.gen.cjs +55 -10
- package/dist/zod/zod.gen.d.ts +154 -6
- package/dist/zod/zod.gen.js +49 -4
- package/dist/zod/zod.gen.ts +39 -4
- package/package.json +3 -2
package/dist/zod/zod.gen.cjs
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.s3DestinationSchema = exports.s3DestinationS3DestinationSchema = exports.s3DestinationOptionsSchema = exports.s3DestinationOptionsS3DestinationOptionsSchema = exports.muxDestinationSchema = exports.muxDestinationMuxDestinationSchema = exports.muxDestinationOptionsSchema = exports.muxDestinationOptionsMuxDestinationOptionsSchema = exports.googleDriveDestinationSchema = exports.googleDriveDestinationGoogleDriveDestinationSchema = exports.googleDriveDestinationOptionsSchema = exports.googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema = exports.googleCloudStorageDestinationSchema = exports.googleCloudStorageDestinationGoogleCloudStorageDestinationSchema = exports.googleCloudStorageDestinationOptionsSchema = exports.googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOptionsSchema = exports.azureBlobStorageDestinationAzureBlobStorageDestinationSchema = exports.azureBlobStorageDestinationOptionsAzureBlobStorageDestinationOptionsSchema = exports.akamaiNetStorageDestinationAkamaiNetStorageDestinationSchema = exports.akamaiNetStorageDestinationOptionsAkamaiNetStorageDestinationOptionsSchema = exports.cropSchema = exports.cropCropSchema = exports.chromaKeySchema = exports.chromakeyChromaKeySchema = exports.captionAssetSchema = exports.captionassetCaptionAssetSchema = exports.captionMarginSchema = exports.captionpropertiesCaptionMarginSchema = exports.captionFontSchema = exports.captionpropertiesCaptionFontSchema = exports.captionBackgroundSchema = exports.captionpropertiesCaptionBackgroundSchema = exports.uploadRootSchema = exports.templatesrenderRootSchema = exports.templatesidRootSchema = exports.templatesRootSchema = exports.sourcesidRootSchema = exports.sourcesRootSchema = exports.renderidRootSchema = exports.renderRootSchema = exports.probeRootSchema = exports.modelsidRootSchema = exports.modelsRootSchema = exports.generateidRootSchema = exports.generateRootSchema = exports.assetsrenderidRootSchema = exports.assetsidRootSchema = exports.assetsRootSchema = exports.sourceRootSchema = exports.editRootSchema = void 0;
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
8
|
-
exports.
|
|
9
|
-
exports.
|
|
10
|
-
exports.getUploadSignedUrlResponse = exports.getUploadSignedUrlRequest = void 0;
|
|
5
|
+
exports.uploadResponseSchema = exports.uploadresponseUploadResponseSchema = exports.uploadResponseDataSchema = exports.uploadresponsedataUploadResponseDataSchema = exports.uploadResponseAttributesSchema = exports.uploadresponseattributesUploadResponseAttributesSchema = exports.queuedSourceResponseSchema = exports.queuedsourceresponseQueuedSourceResponseSchema = exports.queuedSourceResponseDataSchema = exports.queuedsourceresponsedataQueuedSourceResponseDataSchema = exports.ingestErrorResponseSchema = exports.ingesterrorresponseIngestErrorResponseSchema = exports.ingestErrorResponseDataSchema = exports.ingesterrorresponsedataIngestErrorResponseDataSchema = exports.enhancementsSchema = exports.enhancementsEnhancementsSchema = exports.audioEnhancementSchema = exports.audioEnhancementAudioEnhancementSchema = exports.dolbyEnhancementSchema = exports.dolbyEnhancementDolbyEnhancementSchema = exports.dolbyEnhancementOptionsSchema = exports.dolbyEnhancementOptionsDolbyEnhancementOptionsSchema = exports.imageToVideoAssetSchema = exports.imagetovideoassetImageToVideoAssetSchema = exports.imageAssetSchema = exports.imageassetImageAssetSchema = exports.htmlAssetSchema = exports.htmlassetHtmlAssetSchema = exports.html5AssetSchema = exports.html5AssetHtml5AssetSchema = exports.generationModelSchema = exports.generationmodelGenerationModelSchema = exports.generationModelPricingSchema = exports.generationmodelpricingGenerationModelPricingSchema = exports.fontSchema = exports.fontFontSchema = exports.flipTransformationSchema = exports.fliptransformationFlipTransformationSchema = exports.destinationsSchema = exports.destinationsDestinationsSchema = exports.vimeoDestinationSchema = exports.vimeoDestinationVimeoDestinationSchema = exports.vimeoDestinationOptionsSchema = exports.vimeoDestinationOptionsVimeoDestinationOptionsSchema = exports.vimeoDestinationPrivacyOptionsSchema = exports.vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema = exports.tiktokDestinationTiktokDestinationSchema = exports.tiktokDestinationOptionsTiktokDestinationOptionsSchema = exports.shotstackDestinationSchema = exports.shotstackDestinationShotstackDestinationSchema = void 0;
|
|
6
|
+
exports.richtextpropertiesRichTextAlignmentSchema = exports.richcaptionpropertiesRichCaptionFontSchema = exports.richCaptionAnimationSchema = exports.richcaptionpropertiesRichCaptionAnimationSchema = exports.richCaptionActiveFontSchema = exports.richcaptionpropertiesRichCaptionActiveFontSchema = 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.generationResponseSchema = exports.generationresponseGenerationResponseSchema = exports.generationModelListResponseSchema = exports.generationmodellistresponseGenerationModelListResponseSchema = exports.generationModelErrorResponseSchema = exports.generationmodelerrorresponseGenerationModelErrorResponseSchema = exports.generationErrorResponseSchema = exports.generationerrorresponseGenerationErrorResponseSchema = exports.assetResponseSchema = exports.assetresponseAssetResponseSchema = exports.assetRenderResponseSchema = exports.assetrenderresponseAssetRenderResponseSchema = exports.assetResponseDataSchema = exports.assetresponsedataAssetResponseDataSchema = exports.assetResponseAttributesSchema = exports.assetresponseattributesAssetResponseAttributesSchema = exports.rangeSchema = exports.rangeRangeSchema = exports.posterSchema = exports.posterPosterSchema = exports.mergeFieldSchema = exports.mergefieldMergeFieldSchema = exports.lumaAssetSchema = exports.lumaassetLumaAssetSchema = exports.transcriptionSchema = exports.transcriptionTranscriptionSchema = exports.speedSchema = exports.speedSpeedSchema = void 0;
|
|
7
|
+
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 = exports.transferResponseAttributesSchema = exports.transferresponseattributesTransferResponseAttributesSchema = exports.richTextAssetSchema = exports.richtextassetRichTextAssetSchema = exports.richTextStyleSchema = exports.richtextpropertiesRichTextStyleSchema = exports.richTextFontSchema = exports.richtextpropertiesRichTextFontSchema = exports.richCaptionAssetSchema = exports.richcaptionassetRichCaptionAssetSchema = exports.richCaptionActiveSchema = exports.richcaptionpropertiesRichCaptionActiveSchema = exports.richTextStrokeSchema = exports.richtextpropertiesRichTextStrokeSchema = exports.richTextShadowSchema = exports.richtextpropertiesRichTextShadowSchema = exports.richtextpropertiesRichTextPaddingSchema = exports.richcaptionpropertiesRichCaptionStyleSchema = exports.richTextGradientSchema = exports.richtextpropertiesRichTextGradientSchema = exports.richtextpropertiesRichTextBorderSchema = exports.richTextBackgroundSchema = exports.richtextpropertiesRichTextBackgroundSchema = exports.richTextAnimationSchema = exports.richtextpropertiesRichTextAnimationSchema = exports.richTextAlignmentSchema = void 0;
|
|
8
|
+
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 = 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.soundtrackSchema = exports.soundtrackSoundtrackSchema = exports.sourceSchema = exports.sourceSourceSchema = exports.sourceResponseSchema = exports.sourceresponseSourceResponseSchema = void 0;
|
|
9
|
+
exports.postServeAssetResponse = exports.postServeAssetRequest = exports.getAssetByRenderIdResponse = exports.getAssetByRenderIdRequest = exports.getAssetResponse = exports.getAssetRequest = exports.deleteAssetResponse = exports.deleteAssetRequest = exports.getModelResponse = exports.getModelRequest = exports.getModelsResponse = exports.getModelsRequest = exports.getGenerateResponse = exports.getGenerateRequest = exports.postGenerateResponse = exports.postGenerateRequest = 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 = void 0;
|
|
10
|
+
exports.getUploadSignedUrlResponse = exports.getUploadSignedUrlRequest = exports.getSourceResponse = exports.getSourceRequest = exports.deleteSourceResponse = exports.deleteSourceRequest = exports.postSourceResponse = exports.postSourceRequest = exports.getSourcesResponse = exports.getSourcesRequest = void 0;
|
|
11
11
|
const zod_1 = require("zod");
|
|
12
12
|
exports.editRootSchema = zod_1.z.unknown();
|
|
13
13
|
exports.sourceRootSchema = zod_1.z.unknown();
|
|
@@ -440,7 +440,13 @@ exports.generationmodelpricingGenerationModelPricingSchema = zod_1.z.object({
|
|
|
440
440
|
return v;
|
|
441
441
|
return Number(v);
|
|
442
442
|
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
443
|
-
zod_1.z.record(zod_1.z.string(), zod_1.z.
|
|
443
|
+
zod_1.z.record(zod_1.z.string(), zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
444
|
+
return undefined; if (Array.isArray(v))
|
|
445
|
+
return v; if (typeof v === 'string') {
|
|
446
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
447
|
+
return v;
|
|
448
|
+
return Number(v);
|
|
449
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
|
|
444
450
|
]),
|
|
445
451
|
tieredBy: zod_1.z.optional(zod_1.z.object({
|
|
446
452
|
option: zod_1.z.string(),
|
|
@@ -480,6 +486,7 @@ exports.generationmodelpricingGenerationModelPricingSchema = zod_1.z.object({
|
|
|
480
486
|
})),
|
|
481
487
|
effectiveFrom: zod_1.z.string()
|
|
482
488
|
}).strict();
|
|
489
|
+
exports.generationModelPricingSchema = exports.generationmodelpricingGenerationModelPricingSchema;
|
|
483
490
|
/**
|
|
484
491
|
* A generation model available to `prompt`-bearing image, video and audio assets, with the options it accepts and what it costs. Render a model picker and its option fields from this rather than hard coding a model list, so a newly launched model is available without a client release.
|
|
485
492
|
*/
|
|
@@ -501,6 +508,7 @@ exports.generationmodelGenerationModelSchema = zod_1.z.object({
|
|
|
501
508
|
'AiAccessUnavailable'
|
|
502
509
|
]))
|
|
503
510
|
}).strict();
|
|
511
|
+
exports.generationModelSchema = exports.generationmodelGenerationModelSchema;
|
|
504
512
|
/**
|
|
505
513
|
* The Html5Asset renders full HTML5/CSS3/JS.
|
|
506
514
|
*
|
|
@@ -840,12 +848,38 @@ exports.assetresponseAssetResponseSchema = zod_1.z.object({
|
|
|
840
848
|
data: exports.assetresponsedataAssetResponseDataSchema
|
|
841
849
|
}).strict();
|
|
842
850
|
exports.assetResponseSchema = exports.assetresponseAssetResponseSchema;
|
|
851
|
+
/**
|
|
852
|
+
* Why a generation request was not accepted or a job could not be found.
|
|
853
|
+
*/
|
|
854
|
+
exports.generationerrorresponseGenerationErrorResponseSchema = zod_1.z.object({
|
|
855
|
+
error: zod_1.z.string(),
|
|
856
|
+
code: zod_1.z.optional(zod_1.z.string()),
|
|
857
|
+
available: zod_1.z.optional(zod_1.z.union([zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
858
|
+
return undefined; if (Array.isArray(v))
|
|
859
|
+
return v; if (typeof v === 'string') {
|
|
860
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
861
|
+
return v;
|
|
862
|
+
return Number(v);
|
|
863
|
+
} return v; }), zod_1.z.number()), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
|
|
864
|
+
}).strict();
|
|
865
|
+
exports.generationErrorResponseSchema = exports.generationerrorresponseGenerationErrorResponseSchema;
|
|
866
|
+
/**
|
|
867
|
+
* Why a generation model could not be returned.
|
|
868
|
+
*/
|
|
869
|
+
exports.generationmodelerrorresponseGenerationModelErrorResponseSchema = zod_1.z.object({
|
|
870
|
+
error: zod_1.z.object({
|
|
871
|
+
name: zod_1.z.enum(['UnknownGenerationModel', 'WithdrawnGenerationModel']),
|
|
872
|
+
message: zod_1.z.string()
|
|
873
|
+
})
|
|
874
|
+
}).strict();
|
|
875
|
+
exports.generationModelErrorResponseSchema = exports.generationmodelerrorresponseGenerationModelErrorResponseSchema;
|
|
843
876
|
/**
|
|
844
877
|
* The generation models available to this account.
|
|
845
878
|
*/
|
|
846
879
|
exports.generationmodellistresponseGenerationModelListResponseSchema = zod_1.z.object({
|
|
847
880
|
models: zod_1.z.array(exports.generationmodelGenerationModelSchema)
|
|
848
881
|
}).strict();
|
|
882
|
+
exports.generationModelListResponseSchema = exports.generationmodellistresponseGenerationModelListResponseSchema;
|
|
849
883
|
/**
|
|
850
884
|
* The status of an on-demand asset generation job. Completed jobs include the public URL of the generated asset.
|
|
851
885
|
*/
|
|
@@ -860,6 +894,7 @@ exports.generationresponseGenerationResponseSchema = zod_1.z.object({
|
|
|
860
894
|
url: zod_1.z.optional(zod_1.z.string()),
|
|
861
895
|
error: zod_1.z.optional(zod_1.z.string())
|
|
862
896
|
}).strict();
|
|
897
|
+
exports.generationResponseSchema = exports.generationresponseGenerationResponseSchema;
|
|
863
898
|
/**
|
|
864
899
|
* The response received after a [probe request](#inspect-media) is submitted. The probe requests returns data from FFprobe formatted as JSON.
|
|
865
900
|
*/
|
|
@@ -2962,13 +2997,23 @@ exports.postGenerateRequest = zod_1.z.object({
|
|
|
2962
2997
|
exports.imageassetImageAssetSchema,
|
|
2963
2998
|
exports.videoassetVideoAssetSchema,
|
|
2964
2999
|
exports.audioassetAudioAssetSchema
|
|
2965
|
-
])
|
|
3000
|
+
]),
|
|
3001
|
+
length: zod_1.z.optional(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().gt(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
|
|
2966
3008
|
})),
|
|
2967
3009
|
path: zod_1.z.optional(zod_1.z.never()),
|
|
2968
|
-
query: zod_1.z.optional(zod_1.z.never())
|
|
3010
|
+
query: zod_1.z.optional(zod_1.z.never()),
|
|
3011
|
+
headers: zod_1.z.optional(zod_1.z.object({
|
|
3012
|
+
'Idempotency-Key': zod_1.z.optional(zod_1.z.string())
|
|
3013
|
+
}))
|
|
2969
3014
|
}).strict();
|
|
2970
3015
|
/**
|
|
2971
|
-
* The
|
|
3016
|
+
* The asset was generated before: `done` with its URL, or `failed` with the error that ended it.
|
|
2972
3017
|
*/
|
|
2973
3018
|
exports.postGenerateResponse = exports.generationresponseGenerationResponseSchema;
|
|
2974
3019
|
exports.getGenerateRequest = zod_1.z.object({
|
package/dist/zod/zod.gen.d.ts
CHANGED
|
@@ -764,7 +764,28 @@ export declare const fontSchema: z.ZodObject<{
|
|
|
764
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
|
-
credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.
|
|
767
|
+
credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>]>;
|
|
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>>;
|
|
785
|
+
effectiveFrom: z.ZodString;
|
|
786
|
+
}, z.core.$strict>;
|
|
787
|
+
export declare const generationModelPricingSchema: z.ZodObject<{
|
|
788
|
+
credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>]>;
|
|
768
789
|
tieredBy: z.ZodOptional<z.ZodObject<{
|
|
769
790
|
option: z.ZodString;
|
|
770
791
|
default: z.ZodString;
|
|
@@ -797,7 +818,45 @@ export declare const generationmodelGenerationModelSchema: z.ZodObject<{
|
|
|
797
818
|
name: z.ZodOptional<z.ZodString>;
|
|
798
819
|
description: z.ZodOptional<z.ZodString>;
|
|
799
820
|
pricing: z.ZodOptional<z.ZodObject<{
|
|
800
|
-
credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.
|
|
821
|
+
credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>]>;
|
|
822
|
+
tieredBy: z.ZodOptional<z.ZodObject<{
|
|
823
|
+
option: z.ZodString;
|
|
824
|
+
default: z.ZodString;
|
|
825
|
+
}, z.core.$strip>>;
|
|
826
|
+
quantity: z.ZodOptional<z.ZodObject<{
|
|
827
|
+
measure: z.ZodEnum<{
|
|
828
|
+
clipSeconds: "clipSeconds";
|
|
829
|
+
promptCharacters: "promptCharacters";
|
|
830
|
+
}>;
|
|
831
|
+
per: z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>;
|
|
832
|
+
min: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
833
|
+
max: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
834
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
835
|
+
round: z.ZodOptional<z.ZodEnum<{
|
|
836
|
+
up: "up";
|
|
837
|
+
}>>;
|
|
838
|
+
}, z.core.$strip>>;
|
|
839
|
+
effectiveFrom: z.ZodString;
|
|
840
|
+
}, z.core.$strict>>;
|
|
841
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
842
|
+
available: z.ZodOptional<z.ZodBoolean>;
|
|
843
|
+
unavailableReason: z.ZodOptional<z.ZodEnum<{
|
|
844
|
+
AiCapabilityNotIncluded: "AiCapabilityNotIncluded";
|
|
845
|
+
AiDisabled: "AiDisabled";
|
|
846
|
+
AiAccessUnavailable: "AiAccessUnavailable";
|
|
847
|
+
}>>;
|
|
848
|
+
}, z.core.$strict>;
|
|
849
|
+
export declare const generationModelSchema: z.ZodObject<{
|
|
850
|
+
model: z.ZodString;
|
|
851
|
+
type: z.ZodEnum<{
|
|
852
|
+
image: "image";
|
|
853
|
+
video: "video";
|
|
854
|
+
audio: "audio";
|
|
855
|
+
}>;
|
|
856
|
+
name: z.ZodOptional<z.ZodString>;
|
|
857
|
+
description: z.ZodOptional<z.ZodString>;
|
|
858
|
+
pricing: z.ZodOptional<z.ZodObject<{
|
|
859
|
+
credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>]>;
|
|
801
860
|
tieredBy: z.ZodOptional<z.ZodObject<{
|
|
802
861
|
option: z.ZodString;
|
|
803
862
|
default: z.ZodString;
|
|
@@ -1511,6 +1570,40 @@ export declare const assetResponseSchema: z.ZodObject<{
|
|
|
1511
1570
|
}, z.core.$strict>;
|
|
1512
1571
|
}, z.core.$strict>;
|
|
1513
1572
|
}, z.core.$strict>;
|
|
1573
|
+
/**
|
|
1574
|
+
* Why a generation request was not accepted or a job could not be found.
|
|
1575
|
+
*/
|
|
1576
|
+
export declare const generationerrorresponseGenerationErrorResponseSchema: z.ZodObject<{
|
|
1577
|
+
error: z.ZodString;
|
|
1578
|
+
code: z.ZodOptional<z.ZodString>;
|
|
1579
|
+
available: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
1580
|
+
}, z.core.$strict>;
|
|
1581
|
+
export declare const generationErrorResponseSchema: z.ZodObject<{
|
|
1582
|
+
error: z.ZodString;
|
|
1583
|
+
code: z.ZodOptional<z.ZodString>;
|
|
1584
|
+
available: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
1585
|
+
}, z.core.$strict>;
|
|
1586
|
+
/**
|
|
1587
|
+
* Why a generation model could not be returned.
|
|
1588
|
+
*/
|
|
1589
|
+
export declare const generationmodelerrorresponseGenerationModelErrorResponseSchema: z.ZodObject<{
|
|
1590
|
+
error: z.ZodObject<{
|
|
1591
|
+
name: z.ZodEnum<{
|
|
1592
|
+
UnknownGenerationModel: "UnknownGenerationModel";
|
|
1593
|
+
WithdrawnGenerationModel: "WithdrawnGenerationModel";
|
|
1594
|
+
}>;
|
|
1595
|
+
message: z.ZodString;
|
|
1596
|
+
}, z.core.$strip>;
|
|
1597
|
+
}, z.core.$strict>;
|
|
1598
|
+
export declare const generationModelErrorResponseSchema: z.ZodObject<{
|
|
1599
|
+
error: z.ZodObject<{
|
|
1600
|
+
name: z.ZodEnum<{
|
|
1601
|
+
UnknownGenerationModel: "UnknownGenerationModel";
|
|
1602
|
+
WithdrawnGenerationModel: "WithdrawnGenerationModel";
|
|
1603
|
+
}>;
|
|
1604
|
+
message: z.ZodString;
|
|
1605
|
+
}, z.core.$strip>;
|
|
1606
|
+
}, z.core.$strict>;
|
|
1514
1607
|
/**
|
|
1515
1608
|
* The generation models available to this account.
|
|
1516
1609
|
*/
|
|
@@ -1525,7 +1618,47 @@ export declare const generationmodellistresponseGenerationModelListResponseSchem
|
|
|
1525
1618
|
name: z.ZodOptional<z.ZodString>;
|
|
1526
1619
|
description: z.ZodOptional<z.ZodString>;
|
|
1527
1620
|
pricing: z.ZodOptional<z.ZodObject<{
|
|
1528
|
-
credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.
|
|
1621
|
+
credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>]>;
|
|
1622
|
+
tieredBy: z.ZodOptional<z.ZodObject<{
|
|
1623
|
+
option: z.ZodString;
|
|
1624
|
+
default: z.ZodString;
|
|
1625
|
+
}, z.core.$strip>>;
|
|
1626
|
+
quantity: z.ZodOptional<z.ZodObject<{
|
|
1627
|
+
measure: z.ZodEnum<{
|
|
1628
|
+
clipSeconds: "clipSeconds";
|
|
1629
|
+
promptCharacters: "promptCharacters";
|
|
1630
|
+
}>;
|
|
1631
|
+
per: z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>;
|
|
1632
|
+
min: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
1633
|
+
max: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
1634
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
1635
|
+
round: z.ZodOptional<z.ZodEnum<{
|
|
1636
|
+
up: "up";
|
|
1637
|
+
}>>;
|
|
1638
|
+
}, z.core.$strip>>;
|
|
1639
|
+
effectiveFrom: z.ZodString;
|
|
1640
|
+
}, z.core.$strict>>;
|
|
1641
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1642
|
+
available: z.ZodOptional<z.ZodBoolean>;
|
|
1643
|
+
unavailableReason: z.ZodOptional<z.ZodEnum<{
|
|
1644
|
+
AiCapabilityNotIncluded: "AiCapabilityNotIncluded";
|
|
1645
|
+
AiDisabled: "AiDisabled";
|
|
1646
|
+
AiAccessUnavailable: "AiAccessUnavailable";
|
|
1647
|
+
}>>;
|
|
1648
|
+
}, z.core.$strict>>;
|
|
1649
|
+
}, z.core.$strict>;
|
|
1650
|
+
export declare const generationModelListResponseSchema: z.ZodObject<{
|
|
1651
|
+
models: z.ZodArray<z.ZodObject<{
|
|
1652
|
+
model: z.ZodString;
|
|
1653
|
+
type: z.ZodEnum<{
|
|
1654
|
+
image: "image";
|
|
1655
|
+
video: "video";
|
|
1656
|
+
audio: "audio";
|
|
1657
|
+
}>;
|
|
1658
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1659
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1660
|
+
pricing: z.ZodOptional<z.ZodObject<{
|
|
1661
|
+
credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>]>;
|
|
1529
1662
|
tieredBy: z.ZodOptional<z.ZodObject<{
|
|
1530
1663
|
option: z.ZodString;
|
|
1531
1664
|
default: z.ZodString;
|
|
@@ -1568,6 +1701,17 @@ export declare const generationresponseGenerationResponseSchema: z.ZodObject<{
|
|
|
1568
1701
|
url: z.ZodOptional<z.ZodString>;
|
|
1569
1702
|
error: z.ZodOptional<z.ZodString>;
|
|
1570
1703
|
}, z.core.$strict>;
|
|
1704
|
+
export declare const generationResponseSchema: z.ZodObject<{
|
|
1705
|
+
id: z.ZodString;
|
|
1706
|
+
status: z.ZodEnum<{
|
|
1707
|
+
failed: "failed";
|
|
1708
|
+
queued: "queued";
|
|
1709
|
+
processing: "processing";
|
|
1710
|
+
done: "done";
|
|
1711
|
+
}>;
|
|
1712
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1713
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1714
|
+
}, z.core.$strict>;
|
|
1571
1715
|
/**
|
|
1572
1716
|
* The response received after a [probe request](#inspect-media) is submitted. The probe requests returns data from FFprobe formatted as JSON.
|
|
1573
1717
|
*/
|
|
@@ -61897,12 +62041,16 @@ export declare const postGenerateRequest: z.ZodObject<{
|
|
|
61897
62041
|
fadeInFadeOut: "fadeInFadeOut";
|
|
61898
62042
|
}>>;
|
|
61899
62043
|
}, z.core.$strict>]>;
|
|
62044
|
+
length: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
61900
62045
|
}, z.core.$strip>>;
|
|
61901
62046
|
path: z.ZodOptional<z.ZodNever>;
|
|
61902
62047
|
query: z.ZodOptional<z.ZodNever>;
|
|
62048
|
+
headers: z.ZodOptional<z.ZodObject<{
|
|
62049
|
+
'Idempotency-Key': z.ZodOptional<z.ZodString>;
|
|
62050
|
+
}, z.core.$strip>>;
|
|
61903
62051
|
}, z.core.$strict>;
|
|
61904
62052
|
/**
|
|
61905
|
-
* The
|
|
62053
|
+
* The asset was generated before: `done` with its URL, or `failed` with the error that ended it.
|
|
61906
62054
|
*/
|
|
61907
62055
|
export declare const postGenerateResponse: z.ZodObject<{
|
|
61908
62056
|
id: z.ZodString;
|
|
@@ -61959,7 +62107,7 @@ export declare const getModelsResponse: z.ZodObject<{
|
|
|
61959
62107
|
name: z.ZodOptional<z.ZodString>;
|
|
61960
62108
|
description: z.ZodOptional<z.ZodString>;
|
|
61961
62109
|
pricing: z.ZodOptional<z.ZodObject<{
|
|
61962
|
-
credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.
|
|
62110
|
+
credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>]>;
|
|
61963
62111
|
tieredBy: z.ZodOptional<z.ZodObject<{
|
|
61964
62112
|
option: z.ZodString;
|
|
61965
62113
|
default: z.ZodString;
|
|
@@ -62008,7 +62156,7 @@ export declare const getModelResponse: z.ZodObject<{
|
|
|
62008
62156
|
name: z.ZodOptional<z.ZodString>;
|
|
62009
62157
|
description: z.ZodOptional<z.ZodString>;
|
|
62010
62158
|
pricing: z.ZodOptional<z.ZodObject<{
|
|
62011
|
-
credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.
|
|
62159
|
+
credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>]>;
|
|
62012
62160
|
tieredBy: z.ZodOptional<z.ZodObject<{
|
|
62013
62161
|
option: z.ZodString;
|
|
62014
62162
|
default: z.ZodString;
|
package/dist/zod/zod.gen.js
CHANGED
|
@@ -431,7 +431,13 @@ export const generationmodelpricingGenerationModelPricingSchema = z.object({
|
|
|
431
431
|
return v;
|
|
432
432
|
return Number(v);
|
|
433
433
|
} return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
434
|
-
z.record(z.string(), z.
|
|
434
|
+
z.record(z.string(), z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
435
|
+
return undefined; if (Array.isArray(v))
|
|
436
|
+
return v; if (typeof v === 'string') {
|
|
437
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
438
|
+
return v;
|
|
439
|
+
return Number(v);
|
|
440
|
+
} return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
|
|
435
441
|
]),
|
|
436
442
|
tieredBy: z.optional(z.object({
|
|
437
443
|
option: z.string(),
|
|
@@ -471,6 +477,7 @@ export const generationmodelpricingGenerationModelPricingSchema = z.object({
|
|
|
471
477
|
})),
|
|
472
478
|
effectiveFrom: z.string()
|
|
473
479
|
}).strict();
|
|
480
|
+
export const generationModelPricingSchema = generationmodelpricingGenerationModelPricingSchema;
|
|
474
481
|
/**
|
|
475
482
|
* A generation model available to `prompt`-bearing image, video and audio assets, with the options it accepts and what it costs. Render a model picker and its option fields from this rather than hard coding a model list, so a newly launched model is available without a client release.
|
|
476
483
|
*/
|
|
@@ -492,6 +499,7 @@ export const generationmodelGenerationModelSchema = z.object({
|
|
|
492
499
|
'AiAccessUnavailable'
|
|
493
500
|
]))
|
|
494
501
|
}).strict();
|
|
502
|
+
export const generationModelSchema = generationmodelGenerationModelSchema;
|
|
495
503
|
/**
|
|
496
504
|
* The Html5Asset renders full HTML5/CSS3/JS.
|
|
497
505
|
*
|
|
@@ -831,12 +839,38 @@ export const assetresponseAssetResponseSchema = z.object({
|
|
|
831
839
|
data: assetresponsedataAssetResponseDataSchema
|
|
832
840
|
}).strict();
|
|
833
841
|
export const assetResponseSchema = assetresponseAssetResponseSchema;
|
|
842
|
+
/**
|
|
843
|
+
* Why a generation request was not accepted or a job could not be found.
|
|
844
|
+
*/
|
|
845
|
+
export const generationerrorresponseGenerationErrorResponseSchema = z.object({
|
|
846
|
+
error: z.string(),
|
|
847
|
+
code: z.optional(z.string()),
|
|
848
|
+
available: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
849
|
+
return undefined; if (Array.isArray(v))
|
|
850
|
+
return v; if (typeof v === 'string') {
|
|
851
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
852
|
+
return v;
|
|
853
|
+
return Number(v);
|
|
854
|
+
} return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
|
|
855
|
+
}).strict();
|
|
856
|
+
export const generationErrorResponseSchema = generationerrorresponseGenerationErrorResponseSchema;
|
|
857
|
+
/**
|
|
858
|
+
* Why a generation model could not be returned.
|
|
859
|
+
*/
|
|
860
|
+
export const generationmodelerrorresponseGenerationModelErrorResponseSchema = z.object({
|
|
861
|
+
error: z.object({
|
|
862
|
+
name: z.enum(['UnknownGenerationModel', 'WithdrawnGenerationModel']),
|
|
863
|
+
message: z.string()
|
|
864
|
+
})
|
|
865
|
+
}).strict();
|
|
866
|
+
export const generationModelErrorResponseSchema = generationmodelerrorresponseGenerationModelErrorResponseSchema;
|
|
834
867
|
/**
|
|
835
868
|
* The generation models available to this account.
|
|
836
869
|
*/
|
|
837
870
|
export const generationmodellistresponseGenerationModelListResponseSchema = z.object({
|
|
838
871
|
models: z.array(generationmodelGenerationModelSchema)
|
|
839
872
|
}).strict();
|
|
873
|
+
export const generationModelListResponseSchema = generationmodellistresponseGenerationModelListResponseSchema;
|
|
840
874
|
/**
|
|
841
875
|
* The status of an on-demand asset generation job. Completed jobs include the public URL of the generated asset.
|
|
842
876
|
*/
|
|
@@ -851,6 +885,7 @@ export const generationresponseGenerationResponseSchema = z.object({
|
|
|
851
885
|
url: z.optional(z.string()),
|
|
852
886
|
error: z.optional(z.string())
|
|
853
887
|
}).strict();
|
|
888
|
+
export const generationResponseSchema = generationresponseGenerationResponseSchema;
|
|
854
889
|
/**
|
|
855
890
|
* The response received after a [probe request](#inspect-media) is submitted. The probe requests returns data from FFprobe formatted as JSON.
|
|
856
891
|
*/
|
|
@@ -2953,13 +2988,23 @@ export const postGenerateRequest = z.object({
|
|
|
2953
2988
|
imageassetImageAssetSchema,
|
|
2954
2989
|
videoassetVideoAssetSchema,
|
|
2955
2990
|
audioassetAudioAssetSchema
|
|
2956
|
-
])
|
|
2991
|
+
]),
|
|
2992
|
+
length: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2993
|
+
return undefined; if (Array.isArray(v))
|
|
2994
|
+
return v; if (typeof v === 'string') {
|
|
2995
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
2996
|
+
return v;
|
|
2997
|
+
return Number(v);
|
|
2998
|
+
} return v; }), z.number().gt(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
|
|
2957
2999
|
})),
|
|
2958
3000
|
path: z.optional(z.never()),
|
|
2959
|
-
query: z.optional(z.never())
|
|
3001
|
+
query: z.optional(z.never()),
|
|
3002
|
+
headers: z.optional(z.object({
|
|
3003
|
+
'Idempotency-Key': z.optional(z.string())
|
|
3004
|
+
}))
|
|
2960
3005
|
}).strict();
|
|
2961
3006
|
/**
|
|
2962
|
-
* The
|
|
3007
|
+
* The asset was generated before: `done` with its URL, or `failed` with the error that ended it.
|
|
2963
3008
|
*/
|
|
2964
3009
|
export const postGenerateResponse = generationresponseGenerationResponseSchema;
|
|
2965
3010
|
export const getGenerateRequest = z.object({
|
package/dist/zod/zod.gen.ts
CHANGED
|
@@ -385,7 +385,7 @@ export const fontSchema = fontFontSchema;
|
|
|
385
385
|
export const generationmodelpricingGenerationModelPricingSchema = z.object({
|
|
386
386
|
credits: z.union([
|
|
387
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*\}\}$/)]),
|
|
388
|
-
z.record(z.string(), z.unknown())
|
|
388
|
+
z.record(z.string(), 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*\}\}$/)]))
|
|
389
389
|
]),
|
|
390
390
|
tieredBy: z.optional(z.object({
|
|
391
391
|
option: z.string(),
|
|
@@ -402,6 +402,8 @@ export const generationmodelpricingGenerationModelPricingSchema = z.object({
|
|
|
402
402
|
effectiveFrom: z.string()
|
|
403
403
|
}).strict();
|
|
404
404
|
|
|
405
|
+
export const generationModelPricingSchema = generationmodelpricingGenerationModelPricingSchema;
|
|
406
|
+
|
|
405
407
|
/**
|
|
406
408
|
* A generation model available to `prompt`-bearing image, video and audio assets, with the options it accepts and what it costs. Render a model picker and its option fields from this rather than hard coding a model list, so a newly launched model is available without a client release.
|
|
407
409
|
*/
|
|
@@ -424,6 +426,8 @@ export const generationmodelGenerationModelSchema = z.object({
|
|
|
424
426
|
]))
|
|
425
427
|
}).strict();
|
|
426
428
|
|
|
429
|
+
export const generationModelSchema = generationmodelGenerationModelSchema;
|
|
430
|
+
|
|
427
431
|
/**
|
|
428
432
|
* The Html5Asset renders full HTML5/CSS3/JS.
|
|
429
433
|
*
|
|
@@ -765,6 +769,29 @@ export const assetresponseAssetResponseSchema = z.object({
|
|
|
765
769
|
|
|
766
770
|
export const assetResponseSchema = assetresponseAssetResponseSchema;
|
|
767
771
|
|
|
772
|
+
/**
|
|
773
|
+
* Why a generation request was not accepted or a job could not be found.
|
|
774
|
+
*/
|
|
775
|
+
export const generationerrorresponseGenerationErrorResponseSchema = z.object({
|
|
776
|
+
error: z.string(),
|
|
777
|
+
code: z.optional(z.string()),
|
|
778
|
+
available: 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*\}\}$/)]))
|
|
779
|
+
}).strict();
|
|
780
|
+
|
|
781
|
+
export const generationErrorResponseSchema = generationerrorresponseGenerationErrorResponseSchema;
|
|
782
|
+
|
|
783
|
+
/**
|
|
784
|
+
* Why a generation model could not be returned.
|
|
785
|
+
*/
|
|
786
|
+
export const generationmodelerrorresponseGenerationModelErrorResponseSchema = z.object({
|
|
787
|
+
error: z.object({
|
|
788
|
+
name: z.enum(['UnknownGenerationModel', 'WithdrawnGenerationModel']),
|
|
789
|
+
message: z.string()
|
|
790
|
+
})
|
|
791
|
+
}).strict();
|
|
792
|
+
|
|
793
|
+
export const generationModelErrorResponseSchema = generationmodelerrorresponseGenerationModelErrorResponseSchema;
|
|
794
|
+
|
|
768
795
|
/**
|
|
769
796
|
* The generation models available to this account.
|
|
770
797
|
*/
|
|
@@ -772,6 +799,8 @@ export const generationmodellistresponseGenerationModelListResponseSchema = z.ob
|
|
|
772
799
|
models: z.array(generationmodelGenerationModelSchema)
|
|
773
800
|
}).strict();
|
|
774
801
|
|
|
802
|
+
export const generationModelListResponseSchema = generationmodellistresponseGenerationModelListResponseSchema;
|
|
803
|
+
|
|
775
804
|
/**
|
|
776
805
|
* The status of an on-demand asset generation job. Completed jobs include the public URL of the generated asset.
|
|
777
806
|
*/
|
|
@@ -787,6 +816,8 @@ export const generationresponseGenerationResponseSchema = z.object({
|
|
|
787
816
|
error: z.optional(z.string())
|
|
788
817
|
}).strict();
|
|
789
818
|
|
|
819
|
+
export const generationResponseSchema = generationresponseGenerationResponseSchema;
|
|
820
|
+
|
|
790
821
|
/**
|
|
791
822
|
* The response received after a [probe request](#inspect-media) is submitted. The probe requests returns data from FFprobe formatted as JSON.
|
|
792
823
|
*/
|
|
@@ -2470,14 +2501,18 @@ export const postGenerateRequest = z.object({
|
|
|
2470
2501
|
imageassetImageAssetSchema,
|
|
2471
2502
|
videoassetVideoAssetSchema,
|
|
2472
2503
|
audioassetAudioAssetSchema
|
|
2473
|
-
])
|
|
2504
|
+
]),
|
|
2505
|
+
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*\}\}$/)]))
|
|
2474
2506
|
})),
|
|
2475
2507
|
path: z.optional(z.never()),
|
|
2476
|
-
query: z.optional(z.never())
|
|
2508
|
+
query: z.optional(z.never()),
|
|
2509
|
+
headers: z.optional(z.object({
|
|
2510
|
+
'Idempotency-Key': z.optional(z.string())
|
|
2511
|
+
}))
|
|
2477
2512
|
}).strict();
|
|
2478
2513
|
|
|
2479
2514
|
/**
|
|
2480
|
-
* The
|
|
2515
|
+
* The asset was generated before: `done` with its URL, or `failed` with the error that ended it.
|
|
2481
2516
|
*/
|
|
2482
2517
|
export const postGenerateResponse = generationresponseGenerationResponseSchema;
|
|
2483
2518
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shotstack/schemas",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.2",
|
|
4
4
|
"description": "Centralized OpenAPI schemas and TypeScript types for Shotstack API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -42,7 +42,8 @@
|
|
|
42
42
|
"start": "cross-env ./build-docs.sh && http-server build/docs/ -o -c-1",
|
|
43
43
|
"deploy:docs": "aws s3 sync build/docs/ s3://shotstack.io/docs/api",
|
|
44
44
|
"prepublishOnly": "node scripts/publish-guard.cjs && pnpm build && pnpm test",
|
|
45
|
-
"test:smoke": "node tests/smoke.cjs"
|
|
45
|
+
"test:smoke": "node tests/smoke.cjs",
|
|
46
|
+
"test:examples": "node tests/request-examples.cjs"
|
|
46
47
|
},
|
|
47
48
|
"repository": {
|
|
48
49
|
"type": "git",
|