UNPKG

pg-mermaid

Version:

Mermaid diagram generator for PostgreSQL database schema

90 lines (89 loc) 2.34 kB
import { z } from 'zod'; export declare const EntitySchema: z.ZodObject<{ attributes: z.ZodArray<z.ZodObject<{ comment: z.ZodUnion<[z.ZodLiteral<"not null">, z.ZodLiteral<"null">]>; key: z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"PK">, z.ZodLiteral<"FK">]>>; name: z.ZodString; type: z.ZodString; }, "strip", z.ZodTypeAny, { type: string; comment: "null" | "not null"; key: "PK" | "FK" | null; name: string; }, { type: string; comment: "null" | "not null"; key: "PK" | "FK" | null; name: string; }>, "many">; name: z.ZodString; }, "strip", z.ZodTypeAny, { attributes: { type: string; comment: "null" | "not null"; key: "PK" | "FK" | null; name: string; }[]; name: string; }, { attributes: { type: string; comment: "null" | "not null"; key: "PK" | "FK" | null; name: string; }[]; name: string; }>; export type Entity = z.infer<typeof EntitySchema>; export declare const RelationshipSchema: z.ZodObject<{ child: z.ZodObject<{ attributes: z.ZodArray<z.ZodString, "many">; entity: z.ZodString; }, "strip", z.ZodTypeAny, { attributes: string[]; entity: string; }, { attributes: string[]; entity: string; }>; parent: z.ZodObject<{ attributes: z.ZodArray<z.ZodString, "many">; entity: z.ZodString; }, "strip", z.ZodTypeAny, { attributes: string[]; entity: string; }, { attributes: string[]; entity: string; }>; }, "strip", z.ZodTypeAny, { child: { attributes: string[]; entity: string; }; parent: { attributes: string[]; entity: string; }; }, { child: { attributes: string[]; entity: string; }; parent: { attributes: string[]; entity: string; }; }>; export type Relationship = z.infer<typeof RelationshipSchema>; export declare const TableIndexesSchema: z.ZodObject<{ indexes: z.ZodArray<z.ZodString, "many">; name: z.ZodString; }, "strip", z.ZodTypeAny, { name: string; indexes: string[]; }, { name: string; indexes: string[]; }>; export type TableIndexes = z.infer<typeof TableIndexesSchema>;