GitHub

DaffCustomerDriverInterface

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

The customer driver is responsible for loading customers.

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

() Methods

get
Observable<T>

Get the currently logged-in customer.

update
Observable<T>

Update the currently logged-in customer.

Parameters
Parametercustomer: Partial
Description

The customer info to update.

changeEmail
Observable<T>

Change the currently logged-in customer's email.

Parameters
Parameteremail: string
Description
Parameterpassword: string
Description
changePassword
Observable<void>

Change the currently logged-in customer's password.

Parameters
ParameteroldPassword: string
Description
ParameternewPassword: string
Description