Class UserDefaultAdapterApi<CustomFields>

Type Parameters

  • CustomFields = unknown

Hierarchy

Implements

Constructors

Properties

serviceEndpoint: string
sessionService: SessionService

Methods

  • On setup, we can call getRequiredVersion and ping() to confirm that the service exists and that it is of a matching version semantically E.g. if required version is ~2.5 and the api returns 2.6.3, then no issue If returns 3.0.1, should log a warning If returns 1.0.2, should throw error saying it isn't new enough

    Returns string

  • Reset the password for a user.

    Requires a password reset token generated by the sendResetPasswordEmail method.

    Parameters

    • input: {
          password: string;
          token: string;
      }
      • password: string
      • token: string

    Returns Promise<void>

  • Trigger a password reset email to be sent to the user. Will throw errors if the email does not match or the feature is disabled.

    Parameters

    • input: {
          email: string;
      }
      • email: string

    Returns Promise<void>

  • Trigger a email verification for the user. If user id isn't provided, defaults to currently logged in user.

    Parameters

    • Optional input: {
          userId?: string;
      }
      • Optional userId?: string

    Returns Promise<void>

  • Verify the change of email for a user. This will update the email in the user's profile.

    Parameters

    • input: {
          token: string;
      }
      • token: string

    Returns Promise<void>

  • Verify the email for a user. User id is contained inside the given token. This id does not need to match the current user at all (cookies vs bearer auth have no effect).

    Parameters

    • input: {
          token: string;
      }
      • token: string

    Returns Promise<void>

Generated using TypeDoc