import type { AbstractEntity } from '../../../models/base'; import type { TAnyObjectSchema } from '../../common/schema-builders'; import type { Env, Schema } from 'hono'; import type { TEntityDataObject, TEntityPersistObject, TRouteContext } from '../../common'; import { ReadableCrudController } from './readable'; /** Write tier: create / updateById / updateBy / deleteById / deleteBy. Inherits the read verbs. */ export declare abstract class PersistableCrudController = AbstractEntity, RouteEnv extends Env = Env, RouteSchema extends Schema = {}, BasePath extends string = '/', ConfigurableOptions extends object = {}, TDataObject extends object = TEntityDataObject, TPersistObject extends object = TEntityPersistObject> extends ReadableCrudController { /** POST / */ create(opts: { context: TRouteContext; }): Promise>; /** * 400 when the validated body leaves no field to write - `{}`, or only keys the body schema drops. * The repository would otherwise fail with a 500. */ assertNonEmptyUpdate(opts: { scope: string; data: object; }): void; /** PATCH /:id */ updateById(opts: { context: TRouteContext; }): Promise>; /** PATCH / */ updateBy(opts: { context: TRouteContext; }): Promise; /** DELETE /:id */ deleteById(opts: { context: TRouteContext; }): Promise>; /** DELETE / */ deleteBy(opts: { context: TRouteContext; }): Promise; } //# sourceMappingURL=persistable.d.ts.map