import { Injectable } from '@nestjs/common' ; import { FindManyOptions , FindConditions , ObjectID , FindOneOptions , DeepPartial , SaveOptions , UpdateResult , DeleteResult , InsertResult , RemoveOptions , } from 'typeorm' ; import { QueryDeepPartialEntity } from 'typeorm/query-builder/QueryPartialEntity' ; @ Injectable ( ) export abstract class IRepository < Entity > { abstract hasId ( entity ) ; abstract getId ( entity ) ; abstract create ( ) ; abstract create ( entityLikeArray ) ; abstract create ( entityLike ) ; abstract create ( plainEntityLikeOrPlainEntityLikes ? ) ; abstract merge ( mergeIntoEntity , ... entityLikes ) ; abstract preload ( entityLike ) ; abstract save < T extends DeepPartial < Entity > > ( entities , options ) ; abstract save < T extends DeepPartial < Entity > > ( entities , options ? ) ; abstract save < T extends DeepPartial < Entity > > ( entity , options ) ; abstract save < T extends DeepPartial < Entity > > ( entity , options ? ) ; abstract save < T extends DeepPartial < Entity > > ( entityOrEntities , options ? ) ; abstract remove ( entities , options ? ) ; abstract remove ( entity , options ? ) ; abstract remove ( entityOrEntities , options ? ) ; abstract softRemove < T extends DeepPartial < Entity > > ( entities , options ) ; abstract softRemove < T extends DeepPartial < Entity > > ( entities , options ? ) ; abstract softRemove < T extends DeepPartial < Entity > > ( entity , options ) ; abstract softRemove < T extends DeepPartial < Entity > > ( entity , options ? ) ; abstract softRemove < T extends DeepPartial < Entity > > ( entityOrEntities , options ? ) ; abstract recover < T extends DeepPartial < Entity > > ( entities , options ) ; abstract recover < T extends DeepPartial < Entity > > ( entities , options ? ) ; abstract recover < T extends DeepPartial < Entity > > ( entity , options ) ; abstract recover < T extends DeepPartial < Entity > > ( entity , options ? ) ; abstract recover < T extends DeepPartial < Entity > > ( entityOrEntities , options ? ) ; abstract insert ( entity ) ; abstract update ( criteria , partialEntity ) ; abstract delete ( criteria ) ; abstract softDelete ( criteria ) ; abstract restore ( criteria ) ; abstract count ( options ? ) ; abstract count ( conditions ? ) ; abstract count ( optionsOrConditions ? ) ; abstract find ( options ? ) ; abstract find ( conditions ? ) ; abstract find ( optionsOrConditions ? ) ; abstract findAndCount ( options ? ) ; abstract findAndCount ( conditions ? ) ; abstract findAndCount ( optionsOrConditions ? ) ; abstract findByIds ( ids , options ? ) ; abstract findByIds ( ids , conditions ? ) ; abstract findByIds ( ids , optionsOrConditions ? ) ; abstract findOne ( id ? , options ? ) ; abstract findOne ( options ? ) ; abstract findOne ( conditions ? , options ? ) ; abstract findOne ( optionsOrConditions ? , maybeOptions ? ) ; abstract findOneOrFail ( id ? , options ? ) ; abstract findOneOrFail ( options ? ) ; abstract findOneOrFail ( conditions ? , options ? ) ; abstract findOneOrFail ( optionsOrConditions ? , maybeOptions ? ) ; abstract query ( query , parameters ? ) ; abstract clear ( ) ; abstract increment ( conditions , propertyPath , value ) ; abstract decrement ( conditions , propertyPath , value ) ; abstract transaction < T > ( operation ) ; }