exploderesourceop.ts•3.24 kB
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod";
import { ApiError, ApiError$zodSchema } from "./apierror.js";
import { StorageType, StorageType$zodSchema } from "./storagetype.js";
export type ExplodeResourceGlobals = { cloud_name?: string | undefined };
export const ExplodeResourceGlobals$zodSchema: z.ZodType<
ExplodeResourceGlobals,
z.ZodTypeDef,
unknown
> = z.object({
cloud_name: z.string().describe("The cloud name of your product environment.")
.optional(),
});
/**
* The type of resource to explode. Only "image" is supported.
*/
export const ExplodeResourceResourceType$zodSchema = z.enum([
"image",
]).describe("The type of resource to explode. Only \"image\" is supported.");
export type ExplodeResourceResourceType = z.infer<
typeof ExplodeResourceResourceType$zodSchema
>;
export type ExplodeResourceRequestBody = {
api_key?: string | undefined;
timestamp?: number | undefined;
signature?: string | undefined;
public_id: string;
format?: string | undefined;
transformation: string;
notification_url?: string | undefined;
type?: StorageType | undefined;
};
export const ExplodeResourceRequestBody$zodSchema: z.ZodType<
ExplodeResourceRequestBody,
z.ZodTypeDef,
unknown
> = z.object({
api_key: z.string().optional(),
format: z.string().optional(),
notification_url: z.string().optional(),
public_id: z.string(),
signature: z.string().optional(),
timestamp: z.number().int().optional(),
transformation: z.string(),
type: StorageType$zodSchema.optional(),
});
export type ExplodeResourceRequest = {
resource_type: ExplodeResourceResourceType;
RequestBody: ExplodeResourceRequestBody;
};
export const ExplodeResourceRequest$zodSchema: z.ZodType<
ExplodeResourceRequest,
z.ZodTypeDef,
unknown
> = z.object({
RequestBody: z.lazy(() => ExplodeResourceRequestBody$zodSchema),
resource_type: ExplodeResourceResourceType$zodSchema,
});
/**
* The status of the explode operation.
*/
export const ExplodeResourceStatus$zodSchema = z.enum([
"processing",
]).describe("The status of the explode operation.");
export type ExplodeResourceStatus = z.infer<
typeof ExplodeResourceStatus$zodSchema
>;
/**
* Explode operation started successfully
*/
export type ExplodeResourceResponseBody = {
status?: ExplodeResourceStatus | undefined;
batch_id?: string | undefined;
};
export const ExplodeResourceResponseBody$zodSchema: z.ZodType<
ExplodeResourceResponseBody,
z.ZodTypeDef,
unknown
> = z.object({
batch_id: z.string().optional(),
status: ExplodeResourceStatus$zodSchema.optional(),
}).describe("Explode operation started successfully");
export type ExplodeResourceResponse = {
ContentType: string;
StatusCode: number;
RawResponse: Response;
object?: ExplodeResourceResponseBody | undefined;
api_error?: ApiError | undefined;
};
export const ExplodeResourceResponse$zodSchema: z.ZodType<
ExplodeResourceResponse,
z.ZodTypeDef,
unknown
> = z.object({
ContentType: z.string(),
RawResponse: z.instanceof(Response),
StatusCode: z.number().int(),
api_error: ApiError$zodSchema.optional(),
object: z.lazy(() => ExplodeResourceResponseBody$zodSchema).optional(),
});