chore: bring up to date booking references, bookings, and credentials

This commit is contained in:
Agusti Fernandez Pardo
2022-04-01 23:03:03 +02:00
parent 55f93cded6
commit 1c19032884
20 changed files with 593 additions and 258 deletions
+9
View File
@@ -0,0 +1,9 @@
import { z } from "zod";
// Helper schema for JSON fields
type Literal = boolean | number | string;
type Json = Literal | { [key: string]: Json } | Json[];
const literalSchema = z.union([z.string(), z.number(), z.boolean()]);
export const jsonSchema: z.ZodSchema<Json> = z.lazy(() =>
z.union([literalSchema, z.array(jsonSchema), z.record(jsonSchema)])
);