/** * Basic definitions and interfaces for Drizzle Solid Schema. */ export declare const generateNanoId: (size?: number) => string; export interface NamespaceConfig { prefix: string; uri: string; } export type ColumnBuilderDataType = 'string' | 'integer' | 'datetime' | 'boolean' | 'json' | 'object' | 'array' | 'uri'; export type RdfTermInput = string | { value: string; } | { term?: { value: string; }; }; export declare const hasStringValue: (input: unknown) => input is { value: string; }; export declare const hasTermValue: (input: unknown) => input is { term: { value: string; }; }; export declare const resolveTermIri: (input: RdfTermInput) => string; export interface PodColumnOptions { primaryKey?: boolean; required?: boolean; defaultValue?: unknown | ((key?: string, row?: Record) => unknown); predicate?: string; linkTarget?: string; linkTableName?: string; linkTable?: any; notNull?: boolean; baseType?: ColumnBuilderDataType; isArray?: boolean; inverse?: boolean; } export interface SolidSession { info: { isLoggedIn: boolean; webId?: string; sessionId?: string; }; fetch: typeof globalThis.fetch; } export interface HookContext { session: SolidSession; table: any; db: any; } export interface TableHooks { afterInsert?: (ctx: HookContext, record: Record) => Promise; afterUpdate?: (ctx: HookContext, record: Record, changes: Record) => Promise; afterDelete?: (ctx: HookContext, record: Record) => Promise; } export interface PodTableOptions { base?: string; sparqlEndpoint?: string; type: RdfTermInput; namespace?: NamespaceConfig; typeIndex?: 'private' | 'public'; saiRegistryPath?: string; subClassOf?: RdfTermInput | RdfTermInput[]; /** * @deprecated Prefer exact-id mode: omit this field and use base-relative * resource ids such as "post-1.ttl" or "chat/messages.ttl#msg-1". * Keep subjectTemplate only for legacy layouts or explicit compatibility. */ subjectTemplate?: string; resourceMode?: 'ldp' | 'sparql'; autoRegister?: boolean; hooks?: TableHooks; } export type SolidSchemaOptions = Omit; export interface InstantiateTableOptions extends Omit { base: string; } export interface PodColumnMapping { column: string; predicate: string; kind: 'datatype' | 'object'; datatype?: string; linkTarget?: string; isArray?: boolean; inverse?: boolean; } export interface PodTableMapping { name: string; type: string; /** * @deprecated Present only for legacy/explicit template layouts. * New resources should use exact base-relative ids. */ subjectTemplate?: string; namespace?: NamespaceConfig; subClassOf?: string[]; columns: Record; relations?: Record; } //# sourceMappingURL=defs.d.ts.map