deriveddestroyresponse.ts•1.09 kB
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod";
export const Deleted$zodSchema = z.enum([
"deleted",
"not_found",
]);
export type Deleted = z.infer<typeof Deleted$zodSchema>;
export type Invalidation = {
took?: number | undefined;
urls?: Array<string> | undefined;
};
export const Invalidation$zodSchema: z.ZodType<
Invalidation,
z.ZodTypeDef,
unknown
> = z.object({
took: z.number().optional(),
urls: z.array(z.string()).optional(),
});
/**
* Response for derived resource deletion
*/
export type DerivedDestroyResponse = {
deleted?: { [k: string]: Deleted } | undefined;
unauthorized?: Array<string> | undefined;
invalidation?: Invalidation | undefined;
};
export const DerivedDestroyResponse$zodSchema: z.ZodType<
DerivedDestroyResponse,
z.ZodTypeDef,
unknown
> = z.object({
deleted: z.record(Deleted$zodSchema).optional(),
invalidation: z.lazy(() => Invalidation$zodSchema).optional(),
unauthorized: z.array(z.string()).optional(),
}).describe("Response for derived resource deletion");