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

This commit is contained in:
Agusti Fernandez Pardo committed 2022-04-01 23:03:03 +02:00
1 parent 55f93cded6
commit 1c19032884
20 files changed
+593 -258

No files matched your search

+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)])
);