import {Instantiable, FactoryProducer} from '../../../di' import {RedemptionCodeRepository} from '../types' import {CacheRedemptionCodeRepository} from './CacheRedemptionCodeRepository' import {ConfiguredSingletonFactory} from '../../../di/factory/ConfiguredSingletonFactory' /** * A dependency injection factory that matches the abstract RedemptionCodeRepository class * and produces an instance of the configured repository driver implementation. */ @FactoryProducer() export class RedemptionCodeRepositoryFactory extends ConfiguredSingletonFactory { protected getConfigKey(): string { return 'oauth2.repository.client' } protected getDefaultImplementation(): Instantiable { return CacheRedemptionCodeRepository } protected getAbstractImplementation(): any { return RedemptionCodeRepository } }