import { MaybeContextualArg, Repository } from "@decaf-ts/core"; import { Model } from "@decaf-ts/decorator-validation"; import { Constructor } from "@decaf-ts/decoration"; import type { CouchDBAdapter } from "./adapter.d.cts"; import { ContextOf } from "@decaf-ts/core"; import type { PrimaryKeyType } from "@decaf-ts/db-decorators"; export declare class CouchDBRepository> extends Repository { constructor(adapter: A, model: Constructor, force?: boolean); protected assignMetadata(model: M, source?: M): M; protected assignMetadata(models: M[], source?: M[]): M[]; create(model: M, ...args: MaybeContextualArg>): Promise; createAll(models: M[], ...args: MaybeContextualArg>): Promise; read(id: PrimaryKeyType, ...args: MaybeContextualArg>): Promise; readAll(ids: PrimaryKeyType[], ...args: MaybeContextualArg>): Promise; update(model: M, ...args: MaybeContextualArg>): Promise; updateAll(models: M[], ...args: MaybeContextualArg>): Promise; delete(id: PrimaryKeyType, ...args: MaybeContextualArg>): Promise; deleteAll(ids: PrimaryKeyType[], ...args: MaybeContextualArg>): Promise; /** * @description Prepares a model for update. * @summary Validates the model and prepares it for update in the database. * @param {M} model - The model to update. * @param {...any[]} args - Additional arguments. * @return The prepared model and context arguments. * @throws {InternalError} If the model has no primary key value. * @throws {ValidationError} If the model fails validation. */ protected updatePrefix(model: M, ...args: MaybeContextualArg>): Promise<[M, ...args: any[], ContextOf, M | undefined]>; /** * @description Prepares multiple models for update. * @summary Validates multiple models and prepares them for update in the database. * @param {M[]} models - The models to update. * @param {...any[]} args - Additional arguments. * @return {Promise} The prepared models and context arguments. * @throws {InternalError} If any model has no primary key value. * @throws {ValidationError} If any model fails validation. */ protected updateAllPrefix(models: M[], ...args: MaybeContextualArg>): Promise<[M[], ...args: any[], ContextOf, M[] | undefined]>; }