UNPKG

@thisisagile/easy

Version:

Straightforward library for building domain-driven microservice architectures

17 lines (16 loc) 679 B
import { FetchOptions, Gateway } from '../types/Gateway'; import { PageList } from '../types/PageList'; import { Json, JsonValue } from '../types/Json'; import { Id } from '../types/Id'; import { Optional } from '../types/Types'; export declare class InMemoryGateway extends Gateway { private readonly data; constructor(data: Promise<PageList<Json>>); all(options?: FetchOptions): Promise<PageList<Json>>; byId(id: Id): Promise<Optional<Json>>; by: (key: string, value: JsonValue) => Promise<PageList<Json>>; exists(id: Id): Promise<boolean>; add(item: Json): Promise<Json>; remove(id: Id): Promise<true>; update(item: Json): Promise<Json>; }