/** * Extended CRUD type definitions with relationship support. * * All methods return RunnableEffect (Effect with .runPromise convenience) * instead of the legacy Promise>. */ import type { ForeignKeyError, NotFoundError, OperationError, ValidationError } from "../errors/crud-errors.js"; import type { CreateWithRelationshipsInput, DeleteWithRelationshipsOptions, DeleteWithRelationshipsResult, UpdateWithRelationshipsInput } from "../types/crud-relationship-types.js"; import type { MinimalEntity } from "../types/crud-types.js"; import type { RelationshipDef } from "../types/types.js"; import type { CrudMethods } from "./crud-factory.js"; import type { RunnableEffect } from "./database-effect.js"; export interface CrudMethodsWithRelationships> = Record>> extends CrudMethods { readonly createWithRelationships: (input: CreateWithRelationshipsInput) => RunnableEffect; readonly updateWithRelationships: (id: string, input: UpdateWithRelationshipsInput) => RunnableEffect; readonly deleteWithRelationships: (id: string, options?: DeleteWithRelationshipsOptions) => RunnableEffect, NotFoundError | ValidationError | OperationError>; readonly deleteManyWithRelationships: (predicate: (entity: T) => boolean, options?: DeleteWithRelationshipsOptions & { readonly limit?: number; }) => RunnableEffect<{ readonly count: number; readonly deleted: ReadonlyArray; readonly cascaded?: Record; }>; }, ValidationError | OperationError>; } //# sourceMappingURL=crud-factory-with-relationships.d.ts.map