import { Constructor } from '@noeldemartin/utils'; import { JsonLD } from '@noeldemartin/solid-utils'; import { MagicObject } from '@noeldemartin/utils'; import { NamedNode } from '@rdfjs/types'; import { z } from 'zod'; import { ZodObject } from 'zod'; import { ZodType } from 'zod'; declare namespace coreExtensions { export { rdfProperty, CustomMeta } } declare interface CustomMeta { rdfProperty?: string; } export declare function defineSchema(config: SchemaConfig): SchemaModel; export declare class Model extends MagicObject { static schema: Schema; static(): T; static(property: K): T[K]; url?: string; private __attributes; constructor(attributes?: Record); getAttributes(): Record; toJsonLD(): Promise; toTurtle(): Promise; protected __get(property: string): unknown; } export declare function patchZod(): void; declare function rdfProperty(this: T): string | undefined; declare function rdfProperty(this: T, value: string): T; export declare type Schema = { fields: ZodObject; rdfContext: { default: string; } & Record; rdfClasses: NamedNode[]; rdfDefaultResourceHash: string; rdfFieldProperties: Record; }; export declare interface SchemaConfig { crdts?: boolean; rdfContext?: string; rdfClass?: string; rdfDefaultResourceHash?: string; fields: T; relations?: Record; } export declare type SchemaFields = Record; export declare type SchemaModel = typeof Model & Constructor>>; export declare type ZodCoreExtensions = typeof coreExtensions; export { } declare module 'zod' { interface ZodType extends ZodCoreExtensions { } } declare module 'zod' { interface GlobalMeta extends CustomMeta { } }