GitHub

DaffProductServiceInterface

Type

import { DaffProductServiceInterface } from '@daffodil/product/driver'

An interface for any Product service drivers.

interface DaffProductServiceInterface<T extends DaffProduct = DaffProduct> {
  getAll(): any
  get(productId: T["id"]): any
  getByUrl(url: string): any
}

() Methods

getAll
any

Get all products.

get
any

Get a product by Id.

Parameters
ParameterproductId: T["id"]
Description

A string of the product ID.

getByUrl
any

Get a product by URL.

Parameters
Parameterurl: string
Description

A string of the product URL.

See DaffLocatable for more information on the requirements for the url argument of DaffProduct.