/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 409a2e038ae1 */ import * as z from "zod"; import { ContextFullResponse, ContextFullResponse$zodSchema, } from "./contextfullresponse.js"; import { CoordinatesResponse, CoordinatesResponse$zodSchema, } from "./coordinatesresponse.js"; /** * The image metadata of the uploaded file. */ export type UploadResponseImageMetadata = {}; export const UploadResponseImageMetadata$zodSchema: z.ZodType< UploadResponseImageMetadata > = z.object({}).describe("The image metadata of the uploaded file."); export type Eager = { transformation?: string | undefined; width?: number | undefined; height?: number | undefined; bytes?: number | undefined; format?: string | undefined; url?: string | undefined; secure_url?: string | undefined; }; export const Eager$zodSchema: z.ZodType = z.object({ bytes: z.int().optional(), format: z.string().optional(), height: z.int().optional(), secure_url: z.string().optional(), transformation: z.string().optional(), url: z.string().optional(), width: z.int().optional(), }); export type UploadResponse = { url?: string | undefined; secure_url?: string | undefined; public_id?: string | undefined; version?: number | undefined; version_id?: string | undefined; signature?: string | undefined; width?: number | undefined; height?: number | undefined; asset_id?: string | undefined; format?: string | undefined; resource_type?: string | undefined; created_at?: string | undefined; tags?: Array | null | undefined; context?: ContextFullResponse | null | undefined; metadata?: { [k: string]: any } | undefined; pages?: number | undefined; bytes?: number | undefined; type?: string | undefined; etag?: string | undefined; placeholder?: boolean | undefined; original_filename?: string | undefined; image_metadata?: UploadResponseImageMetadata | undefined; illustration_score?: number | undefined; semi_transparent?: boolean | undefined; grayscale?: boolean | undefined; faces?: Array> | null | undefined; coordinates?: CoordinatesResponse | null | undefined; eager?: Array | undefined; asset_folder?: string | null | undefined; display_name?: string | undefined; api_key?: string | undefined; }; export const UploadResponse$zodSchema: z.ZodType = z.object({ api_key: z.string().optional().describe( "The API key used to upload the file.", ), asset_folder: z.string().nullable().optional().describe( "The asset folder where the file is stored.", ), asset_id: z.string().optional().describe( "A 32-character hexadecimal asset ID.", ), bytes: z.int().optional().describe("The size of the uploaded file in bytes."), context: ContextFullResponse$zodSchema.nullable().optional().describe( "Contextual metadata grouped by kind. Custom user context appears under the 'custom' key. Other context kinds may also appear as additional keys.", ), coordinates: CoordinatesResponse$zodSchema.nullable().optional().describe( "Coordinate data for faces and custom regions.", ), created_at: z.iso.datetime({ offset: true }).optional().describe( "The date and time the file was uploaded.", ), display_name: z.string().optional().describe( "The display name of the uploaded file.", ), eager: z.array(z.lazy(() => Eager$zodSchema)).optional(), etag: z.string().optional().describe("The ETag of the uploaded file."), faces: z.array(z.array(z.int())).nullable().optional().describe( "Detected face coordinate rectangles [x, y, width, height].", ), format: z.string().optional().describe("The format of the uploaded file."), grayscale: z.boolean().optional().describe( "Whether the uploaded file is grayscale.", ), height: z.int().optional().describe("The height of the uploaded file."), illustration_score: z.number().optional().describe( "The illustration score of the uploaded file.", ), image_metadata: z.lazy(() => UploadResponseImageMetadata$zodSchema).optional() .describe("The image metadata of the uploaded file."), metadata: z.record(z.string(), z.any()).optional().describe( "Structured metadata associated with the uploaded file.", ), original_filename: z.string().optional().describe( "The original filename of the uploaded file.", ), pages: z.int().optional().describe( "The number of pages in the uploaded file.", ), placeholder: z.boolean().optional().describe( "Whether the uploaded file is a placeholder.", ), public_id: z.string().optional().describe( "The public ID of the uploaded file.", ), resource_type: z.string().optional().describe( "The type of resource that was uploaded.", ), secure_url: z.string().optional().describe( "The secure URL of the uploaded file.", ), semi_transparent: z.boolean().optional().describe( "Whether the uploaded file is semi-transparent.", ), signature: z.string().optional().describe( "The signature of the uploaded file.", ), tags: z.array(z.string()).nullable().optional().describe( "Tag names assigned to the asset.", ), type: z.string().optional().describe("The type of the uploaded file."), url: z.string().optional().describe("The URL of the uploaded file."), version: z.int().optional().describe("The version of the uploaded file."), version_id: z.string().optional().describe( "Hexadecimal version ID; length is a positive multiple of 32 (typically 32 or 64).", ), width: z.int().optional().describe("The width of the uploaded file."), });