import { type UndefinableOptional } from "../interface"; import { type IWithIdentity } from "./interface"; export interface IMutationSource, TEntity extends Record> { /** * Creates a new entity by the given request. */ create(create: TCreate): Promise; /** * Patches the given entity. */ patch(patch: UndefinableOptional & IWithIdentity): Promise; /** * Delete given entities by the list of given ids. */ remove(ids: string[]): Promise; /** * Remove all the data from this source and all dependant sources. * * The original use case for this method is an ability to restore data (thus clean * sources used for restoring and importing fresh data). */ truncate(): Promise; } export declare namespace MutationSourceInfer { type Create = T extends IMutationSource ? U : T; type Entity = T extends IMutationSource ? U : T; } //# sourceMappingURL=IMutationSource.d.ts.map