Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UserWebService

Hierarchy

Implements

Index

Constructors

constructor

Properties

Protected http

http: Http

Protected options

Static Protected instance

instance: UserWebService

Methods

create

  • create(user: UserSchema): Promise<User>
  • Create a new User.

    Parameters

    • user: UserSchema

    Returns Promise<User>

delete

  • delete(id: string): Promise<boolean>
  • Delete an User.

    Parameters

    • id: string

      The User ID.

    Returns Promise<boolean>

findAllByRole

  • findAllByRole(pagination: Pagination, role: UserRole): Promise<PaginatedArray<User>>
  • Find all Users by role.

    Parameters

    • pagination: Pagination
    • role: UserRole

    Returns Promise<PaginatedArray<User>>

findOne

  • findOne(id: string): Promise<User>
  • Find an User.

    Parameters

    • id: string

      The User ID.

    Returns Promise<User>

findWalletsById

  • findWalletsById(id: string): Promise<Wallet[]>
  • Find the Wallets from a User with role Consumer.

    Parameters

    • id: string

      The User ID.

    Returns Promise<Wallet[]>

me

  • me(credentials?: OAuthCredentials): Promise<User>
  • Gets the current User information from the API.

    Parameters

    • Optional credentials: OAuthCredentials

      The OAuth 2.0 credentials for the request

    Returns Promise<User>

reset

  • reset(email: string): Promise<void>
  • Resets a specific account credentials based on its email.

    Parameters

    • email: string

      The email to be reset

    Returns Promise<void>

setPassword

  • setPassword(token: string, password: string): Promise<void>
  • Set a new password using a secret token.

    Parameters

    • token: string
    • password: string

    Returns Promise<void>

update

  • update(id: string, user: Partial<UserSchema>): Promise<User>
  • Partially update an existing User.

    Parameters

    • id: string

      the User ID.

    • user: Partial<UserSchema>

      The partial User schema.

    Returns Promise<User>

Static getInstance

Static initialize

Generated using TypeDoc