/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 5b8dcd950c40 */ import * as z from "zod"; import { ClosedEnum } from "../types/enums.js"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; import { ExplodeResponse, ExplodeResponse$zodSchema, } from "./exploderesponse.js"; import { ManagedDeliveryType, ManagedDeliveryType$zodSchema, } from "./manageddeliverytype.js"; export type ExplodeResourceGlobals = { cloud_name?: string | undefined }; export const ExplodeResourceGlobals$zodSchema: z.ZodType< ExplodeResourceGlobals > = z.object({ cloud_name: z.string().describe("The cloud name of your product environment.") .optional(), }); /** * The type of resource to explode. Only "image" is supported. */ export const ExplodeResourceResourceType = { Image: "image", } as const; /** * The type of resource to explode. Only "image" is supported. */ export type ExplodeResourceResourceType = ClosedEnum< typeof ExplodeResourceResourceType >; export const ExplodeResourceResourceType$zodSchema = z.enum([ "image", ]).describe("The type of resource to explode. Only \"image\" is supported."); /** * The explode operation parameters. */ export type ExplodeResourceRequestBody = { public_id: string; format?: string | undefined; transformation: string; notification_url?: string | undefined; type?: ManagedDeliveryType | undefined; }; export const ExplodeResourceRequestBody$zodSchema: z.ZodType< ExplodeResourceRequestBody > = z.object({ format: z.string().optional().describe( "The format for the generated derived images. Default: png", ), notification_url: z.string().optional().describe( "The webhook URL to notify when the operation is complete.", ), public_id: z.string().describe( "The public ID of the PDF or animated image to generate from.", ), transformation: z.string().describe( "The transformation to apply. Must contain exactly one pg_all transformation parameter.", ), type: ManagedDeliveryType$zodSchema.optional().describe( "Managed delivery types for assets uploaded and stored by Cloudinary.", ), }).describe("The explode operation parameters."); export type ExplodeResourceRequest = { resource_type: ExplodeResourceResourceType; RequestBody: ExplodeResourceRequestBody; }; export const ExplodeResourceRequest$zodSchema: z.ZodType< ExplodeResourceRequest > = z.object({ RequestBody: z.lazy(() => ExplodeResourceRequestBody$zodSchema).describe( "The explode operation parameters.", ), resource_type: ExplodeResourceResourceType$zodSchema.describe( "The type of resource to explode. Only \"image\" is supported.", ), }); export type ExplodeResourceResponse = ApiError | ExplodeResponse; export const ExplodeResourceResponse$zodSchema: z.ZodType< ExplodeResourceResponse > = z.union([ ApiError$zodSchema, ExplodeResponse$zodSchema, ]);