import { InjectionToken } from '@angular/core' ; import { Observable } from 'rxjs' ; import { DaffProduct } from '@daffodil/product' ; import { DaffProductDriverResponse } from '../models/response.interface' ; /**
 * Injection token that serves as a placeholder for any service that implements the DaffProductServiceInterface.
 */ export const DaffProductDriver = new InjectionToken < DaffProductServiceInterface > ( 'DaffProductDriver' ) ; /**
 * An interface for any Product service drivers.
 */ export interface DaffProductServiceInterface < T extends DaffProduct = DaffProduct > { /**
     * Get all products.
     */ getAll ( ) : Observable < T [ ] > ; /**
     * Get best selling products.
     */ getBestSellers ( ) : Observable < T [ ] > ; param productId get ( productId ) : Observable < DaffProductDriverResponse < T > > ; param url getByUrl ( url ) : Observable < DaffProductDriverResponse < T > > ; }