/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: e8b735f037d4 */ import * as z from "zod"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; import { DeliveryTypeAll, DeliveryTypeAll$zodSchema, } from "./deliverytypeall.js"; import { DestroyResponse, DestroyResponse$zodSchema, } from "./destroyresponse.js"; import { ResourceType, ResourceType$zodSchema } from "./resourcetype.js"; export type DestroyAssetGlobals = { cloud_name?: string | undefined }; export const DestroyAssetGlobals$zodSchema: z.ZodType = z .object({ cloud_name: z.string().describe( "The cloud name of your product environment.", ).optional(), }); /** * The asset to destroy and related options. */ export type DestroyAssetRequestBody = { public_id: string; type?: DeliveryTypeAll | undefined; invalidate?: boolean | undefined; notification_url?: string | undefined; }; export const DestroyAssetRequestBody$zodSchema: z.ZodType< DestroyAssetRequestBody > = z.object({ invalidate: z.boolean().default(false).describe( "Whether to invalidate CDN cached copies of the asset.", ), notification_url: z.string().optional().describe( "URL to receive a notification when the operation is complete.", ), public_id: z.string().describe("The public ID of the asset to destroy."), type: DeliveryTypeAll$zodSchema.optional().describe( "All supported delivery types.", ), }).describe("The asset to destroy and related options."); export type DestroyAssetRequest = { resource_type: ResourceType; RequestBody: DestroyAssetRequestBody; }; export const DestroyAssetRequest$zodSchema: z.ZodType = z .object({ RequestBody: z.lazy(() => DestroyAssetRequestBody$zodSchema).describe( "The asset to destroy and related options.", ), resource_type: ResourceType$zodSchema.describe( "The type of resource (image, video, or raw).", ), }); export type DestroyAssetResponse = ApiError | DestroyResponse; export const DestroyAssetResponse$zodSchema: z.ZodType = z .union([ ApiError$zodSchema, DestroyResponse$zodSchema, ]);