/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 2d92c68fa5b0 */ import * as z from "zod"; import { ClosedEnum } from "../types/enums.js"; import { ResourceType, ResourceType$zodSchema } from "./resourcetype.js"; import { UploadDeliveryType, UploadDeliveryType$zodSchema, } from "./uploaddeliverytype.js"; /** * The status of the asynchronous upload. Will be 'pending' for async uploads. */ export const AsyncUploadResponseStatus = { Pending: "pending", } as const; /** * The status of the asynchronous upload. Will be 'pending' for async uploads. */ export type AsyncUploadResponseStatus = ClosedEnum< typeof AsyncUploadResponseStatus >; export const AsyncUploadResponseStatus$zodSchema = z.enum([ "pending", ]).describe( "The status of the asynchronous upload. Will be 'pending' for async uploads.", ); /** * Response returned when an upload is processed asynchronously (async=true) */ export type AsyncUploadResponse = { status: AsyncUploadResponseStatus; resource_type?: ResourceType | undefined; type: UploadDeliveryType; public_id?: string | undefined; batch_id: string; requester_ip?: string | undefined; }; export const AsyncUploadResponse$zodSchema: z.ZodType = z .object({ batch_id: z.string().describe( "A unique identifier for the asynchronous upload job.", ), public_id: z.string().optional().describe( "The public ID assigned to the upload. May be omitted if it will be auto-generated.", ), requester_ip: z.string().optional().describe( "The IP address of the requester. This is only included if a product environment has requester_ip tracking enabled.", ), resource_type: ResourceType$zodSchema.optional().describe( "The type of resource.", ), status: AsyncUploadResponseStatus$zodSchema.describe( "The status of the asynchronous upload. Will be 'pending' for async uploads.", ), type: UploadDeliveryType$zodSchema.describe( "Delivery types accepted by upload and rename operations.", ), }).describe( "Response returned when an upload is processed asynchronously (async=true)", );