import { PaginatedResponse, ListFindQuery, DataSource, Mutation } from './interface'; export default class MemoryDataSource implements DataSource { private defaultData; private mapData; private relationTable; constructor(defaultData?: any[] | Record); find: (args?: ListFindQuery) => Promise; findOne: ({ where }: { where: Record>; }) => Promise; findOneById: (id: string) => Promise; create: (mutation: Mutation) => Promise; update: (where: Record>, mutation: Mutation) => Promise; delete: (where: Record>) => Promise; findOneByRelation: (foreignKey: string, foreignId: string) => Promise; updateOneRelation: (id: string, foreignKey: string, foreignId: string) => Promise; findManyFromOneRelation: (foreignKey: string, foreignId: string) => Promise; findManyFromManyRelation: (sourceSideName: string, targetSideName: string, sourceSideId: string) => Promise; addIdToManyRelation: (sourceSideName: string, targetSideName: string, sourceSideId: string, targetSideId: string) => Promise; removeIdFromManyRelation: (sourceSideName: string, targetSideName: string, sourceSideId: string, targetSideId: string) => Promise; getMap: () => Promise>; updateMap: (mutation: Mutation) => Promise; private transformMutation; }