import { Struct } from './Struct'; import { FetchOptions, Gateway } from '../types/Gateway'; import { Repository } from '../types/Repository'; import { Constructor } from '../types/Constructor'; import { Json, JsonValue } from '../types/Json'; import { PageList } from '../types/PageList'; import { Id, Key } from '../types/Id'; import { List } from '../types/List'; 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; }