nosql-constraints
Version:
Helpers to manage constrants (i.e. cascade delete) in a NoSQL database
13 lines (12 loc) • 445 B
TypeScript
export type DocumentSchemaChunkType = 'string' | 'number' | 'boolean' | 'date' | 'any' | 'object' | 'array' | 'literal' | 'enum';
export type DocumentSchemaChunk = {
path: string | undefined;
type: DocumentSchemaChunkType;
optional?: boolean;
value?: unknown;
default?: unknown;
properties?: Record<string, DocumentSchemaChunk[]>;
};
export interface DocumentSchemaAdapter {
extractChunks(): DocumentSchemaChunk[];
}