import { DataObject, DefaultTransactionalRepository, Entity, Filter, Getter, juggler, Where } from '@loopback/repository'; import { Count } from '@loopback/repository/src/common-types'; import { Options } from 'loopback-datasource-juggler'; import { SoftDeleteEntity } from '../models'; import { IUser } from '../types'; /** * Soft Delete Repository for loopback's `DefaultTransactionalRepository` * @deprecated Use the {@link SoftCrudRepositoryMixin} instead. * eg. * ```ts * class CustomerRepository extends SoftCrudRepositoryMixin< * Customer, * typeof Customer.prototype.id, * Constructor< * DefaultTransactionalRepository * >, * {} * >(DefaultTransactionalRepository) { * // ... * } * ``` */ export declare abstract class DefaultTransactionSoftCrudRepository extends DefaultTransactionalRepository { protected readonly getCurrentUser?: Getter | undefined; constructor(entityClass: typeof Entity & { prototype: E; }, dataSource: juggler.DataSource, getCurrentUser?: Getter | undefined); find(filter?: Filter, options?: Options): Promise<(E & R)[]>; findAll(filter?: Filter, options?: Options): Promise<(E & R)[]>; findOne(filter?: Filter, options?: Options): Promise<(E & R) | null>; findOneIncludeSoftDelete(filter?: Filter, options?: Options): Promise<(E & R) | null>; findById(id: ID, filter?: Filter, options?: Options): Promise; findByIdIncludeSoftDelete(id: ID, filter?: Filter, options?: Options): Promise; updateAll(data: DataObject, where?: Where, options?: Options): Promise; count(where?: Where, options?: Options): Promise; countAll(where?: Where, options?: Options): Promise; delete(entity: E, options?: Options): Promise; deleteAll(where?: Where, options?: Options): Promise; deleteById(id: ID, options?: Options): Promise; /** * Method to perform hard delete of entries. Take caution. * @param entity * @param options */ deleteHard(entity: E, options?: Options): Promise; /** * Method to perform hard delete of entries. Take caution. * @param entity * @param options */ deleteAllHard(where?: Where, options?: Options): Promise; /** * Method to perform hard delete of entries. Take caution. * @param entity * @param options */ deleteByIdHard(id: ID, options?: Options): Promise; private getUserId; }