Files
radicle-explorer/httpd-client/lib/shared.ts
T
Rūdolfs Ošiņš 260cd4c144 Use object instead of strictObject for httpd schema checking
This way we can deploy back-end API changes that are backwards
compatible without breaking the UI.

Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
2023-06-02 15:54:50 +02:00

12 lines
247 B
TypeScript

import type { ZodSchema } from "zod";
import { literal, object } from "zod";
export interface SuccessResponse {
success: true;
}
export const successResponseSchema = object({
success: literal(true),
}) satisfies ZodSchema<SuccessResponse>;