import { TObject } from "@sinclair/typebox"; import Ajv from "ajv"; import { CRUDEventMap } from "./CRUDEventsManager"; import { PolicyCollection } from "./PolicyExecutor"; export declare class SchemaProvider { private _rootDir; ajv: Ajv.Ajv; constructor(_rootDir: string); /** * List of collection names as inferred from the directory structure in the * `collections/` folder. */ collections: string[]; /** * Map of policies of each CRUD action of each collection. * i.e maps collection -> action -> policy */ policies: PolicyCollection; /** * Map of events of each CRUD action of each collection. * i.e maps collection -> event -> handler */ events: Record; /** * */ documentSchema: Record>; /** * */ migrations: string[]; /** * Reads the directory structure under the `collections/` folder and populates the * schema information. Sample structure, * - collections * |-- blogs * |-- schema.ts * |-- policies * |-- read.ts * |-- create.ts * |-- update.ts * |-- delete.ts * |-- events * |-- created.ts * |-- updated.ts * |-- deleted.ts */ populateFromFs(): void; }