uploadresponse.ts•3.04 kB
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod";
/**
* The image metadata of the uploaded file.
*/
export type UploadResponseImageMetadata = {};
export const UploadResponseImageMetadata$zodSchema: z.ZodType<
UploadResponseImageMetadata,
z.ZodTypeDef,
unknown
> = 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<Eager, z.ZodTypeDef, unknown> = z
.object({
bytes: z.number().int().optional(),
format: z.string().optional(),
height: z.number().int().optional(),
secure_url: z.string().optional(),
transformation: z.string().optional(),
url: z.string().optional(),
width: z.number().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<string> | 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;
eager?: Array<Eager> | undefined;
api_key?: string | undefined;
};
export const UploadResponse$zodSchema: z.ZodType<
UploadResponse,
z.ZodTypeDef,
unknown
> = z.object({
api_key: z.string().optional(),
asset_id: z.string().optional(),
bytes: z.number().int().optional(),
created_at: z.string().optional(),
eager: z.array(z.lazy(() => Eager$zodSchema)).optional(),
etag: z.string().optional(),
format: z.string().optional(),
grayscale: z.boolean().optional(),
height: z.number().int().optional(),
illustration_score: z.number().optional(),
image_metadata: z.lazy(() => UploadResponseImageMetadata$zodSchema)
.optional(),
original_filename: z.string().optional(),
pages: z.number().int().optional(),
placeholder: z.boolean().optional(),
public_id: z.string().optional(),
resource_type: z.string().optional(),
secure_url: z.string().optional(),
semi_transparent: z.boolean().optional(),
signature: z.string().optional(),
tags: z.array(z.string()).optional(),
type: z.string().optional(),
url: z.string().optional(),
version: z.number().int().optional(),
version_id: z.string().optional(),
width: z.number().int().optional(),
});