GitHub

DaffCustomerDriverInterface

Type

import { DaffCustomerDriverInterface } from '@daffodil/customer/driver'

The customer driver is responsible for loading customers.

interface DaffCustomerDriverInterface<T extends DaffCustomer = DaffCustomer> {
  get(): any
  update(customer: Partial<T>): any
  changeEmail(
    email: string
    password: string
  ): any
  changePassword(
    oldPassword: string
    newPassword: string
  ): any
}

() Methods

get
any

Get the currently logged-in customer.

update
any

Update the currently logged-in customer.

Parameters
Parametercustomer: Partial
Description

The customer info to update.

changeEmail
any

Change the currently logged-in customer's email.

Parameters
Parameteremail: string
Description
Parameterpassword: string
Description
changePassword
any

Change the currently logged-in customer's password.

Parameters
ParameteroldPassword: string
Description
ParameternewPassword: string
Description