/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 2d4428cd7790 */ import * as z from "zod"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; import { DeliveryTypeAll, DeliveryTypeAll$zodSchema, } from "./deliverytypeall.js"; import { DirectionEnum, DirectionEnum$zodSchema } from "./directionenum.js"; import { Fields, Fields$zodSchema } from "./fields.js"; import { ListResponse, ListResponse$zodSchema } from "./listresponse.js"; export type ListImagesGlobals = { cloud_name?: string | undefined }; export const ListImagesGlobals$zodSchema: z.ZodType = z .object({ cloud_name: z.string().describe( "The cloud name of your product environment.", ).optional(), }); export type ListImagesRequest = { type?: DeliveryTypeAll | undefined; prefix?: string | undefined; public_ids?: Array | undefined; tags?: boolean | undefined; next_cursor?: string | undefined; max_results?: number | undefined; direction?: DirectionEnum | undefined; start_at?: string | undefined; fields?: Fields | undefined; }; export const ListImagesRequest$zodSchema: z.ZodType = z .object({ direction: DirectionEnum$zodSchema.optional().describe( "The sort direction for the results. Default is \"desc\".", ), fields: Fields$zodSchema.optional().describe( "Additional fields to include in the response. The fields public_id and asset_id are always included.", ), max_results: z.int().describe( "Maximum number of results to return (1-500).", ).optional(), next_cursor: z.string().describe("Cursor for pagination.").optional(), prefix: z.string().describe( "A public_id prefix. When specified, all assets with that prefix are returned.", ).optional(), public_ids: z.array(z.string()).describe( "An array of public IDs to return.", ).optional(), start_at: z.iso.datetime({ offset: true }).describe( "An ISO-8601 formatted timestamp. When specified, returns resources created since that timestamp. Supported only if neither `prefix` nor `public_ids` were passed.", ).optional(), tags: z.boolean().default(false).describe( "Whether to include the list of tag names assigned to each asset. Default is false.", ), type: DeliveryTypeAll$zodSchema.optional().describe( "The delivery type to filter by. When omitted, returns assets of all delivery types.", ), }); export type ListImagesResponse = ApiError | ListResponse; export const ListImagesResponse$zodSchema: z.ZodType = z .union([ ApiError$zodSchema, ListResponse$zodSchema, ]);