import { Json, JsonValue } from "../types/Json.js"; import { Id, Key } from "../types/Id.js"; import { Constructor } from "../types/Constructor.js"; import { List } from "../types/List.js"; import { PageList } from "../types/PageList.js"; import { FetchOptions, Gateway } from "../types/Gateway.js"; import { Struct } from "./Struct.js"; import { Repository } from "../types/Repository.js"; //#region src/domain/Repo.d.ts export type RepoAction = 'add' | 'update' | 'remove'; export declare class Repo extends Repository { protected ctor: Constructor; private readonly gateway; constructor(ctor: Constructor, gateway: Gateway); create: (item: T | Json) => T; all(options?: Options): Promise>; byId(id: Id): Promise; byIds(...ids: Id[]): Promise>; byKey(key: Key, options?: Options): Promise>; by(key: keyof T, value: JsonValue, options?: Options): Promise>; search(q: JsonValue, options?: Options): Promise>; filter(options?: Options): Promise>; exists(id: Id): Promise; add(t: T | Json): Promise; update(id: Id, json: Json): Promise; remove(id: Id): Promise; extend(item: T, _action?: RepoAction): Promise; validate(item: T, _action?: RepoAction): Promise; upsert(id: Id, item: Json): Promise; } //#endregion //# sourceMappingURL=Repo.d.ts.map