asyncuploadresponse.ts•1.37 kB
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod";
import { ResourceType, ResourceType$zodSchema } from "./resourcetype.js";
import { StorageType, StorageType$zodSchema } from "./storagetype.js";
/**
* The status of the asynchronous upload. Will be 'pending' for async uploads.
*/
export const AsyncUploadResponseStatus$zodSchema = z.enum([
"pending",
]).describe(
"The status of the asynchronous upload. Will be 'pending' for async uploads.",
);
export type AsyncUploadResponseStatus = z.infer<
typeof AsyncUploadResponseStatus$zodSchema
>;
/**
* Response returned when an upload is processed asynchronously (async=true)
*/
export type AsyncUploadResponse = {
status: AsyncUploadResponseStatus;
resource_type?: ResourceType | undefined;
type: StorageType;
public_id?: string | undefined;
batch_id: string;
requester_ip?: string | undefined;
};
export const AsyncUploadResponse$zodSchema: z.ZodType<
AsyncUploadResponse,
z.ZodTypeDef,
unknown
> = z.object({
batch_id: z.string(),
public_id: z.string().optional(),
requester_ip: z.string().optional(),
resource_type: ResourceType$zodSchema.optional(),
status: AsyncUploadResponseStatus$zodSchema,
type: StorageType$zodSchema,
}).describe(
"Response returned when an upload is processed asynchronously (async=true)",
);