import type { DeepMutable, DeepReadonly, HashFunction, MaybeReadonly, RxDocumentData, RxJsonSchema, StringKeys } from './types/index.d.ts'; export declare class RxSchema { readonly jsonSchema: RxJsonSchema>; readonly hashFunction: HashFunction; indexes: MaybeReadonly[]; readonly primaryPath: StringKeys>; finalFields: string[]; constructor(jsonSchema: RxJsonSchema>, hashFunction: HashFunction); get version(): number; get defaultValues(): { [P in keyof RxDocType]: RxDocType[P]; }; getJsonSchemaWithoutMeta(): RxJsonSchema>; /** * @overrides itself on the first call */ get hash(): Promise; /** * checks if a given change on a document is allowed * Ensures that: * - final fields are not modified * @throws {Error} if not valid */ validateChange(dataBefore: any, dataAfter: any): void; /** * creates the schema-based document-prototype, * see RxCollection.getDocumentPrototype() */ getDocumentPrototype(): any; getPrimaryOfDocumentData(documentData: Partial): string; } export declare function getIndexes(jsonSchema: RxJsonSchema): MaybeReadonly[]; /** * array with previous version-numbers */ export declare function getPreviousVersions(schema: RxJsonSchema): number[]; export declare function createRxSchema(jsonSchema: RxJsonSchema, hashFunction: HashFunction, runPreCreateHooks?: boolean): RxSchema; export declare function isRxSchema(obj: any): boolean; /** * Used as helper function the generate the document type out of the schema via typescript. * @link https://github.com/pubkey/rxdb/discussions/3467 */ export declare function toTypedRxJsonSchema>>(schema: T): DeepMutable;