RestClient

@accounts/rest-clientGlobalsRestClient

Hierarchy

  • RestClient

Implements

  • TransportInterface

Index

Constructors

Properties

Methods

Constructors

constructor

+ new RestClient(options: OptionsType): RestClient

Defined in packages/rest-client/src/rest-client.ts:24

Parameters:

NameType
optionsOptionsType

Returns: RestClient

Properties

client

client: AccountsClient

Defined in packages/rest-client/src/rest-client.ts:23

Methods

addEmail

addEmail(newEmail: string, customHeaders?: object): Promise‹void›

Defined in packages/rest-client/src/rest-client.ts:191

Parameters:

NameType
newEmailstring
customHeaders?object

Returns: Promise‹void›


authFetch

authFetch(route: string, args: object, customHeaders: object): Promise‹any›

Defined in packages/rest-client/src/rest-client.ts:56

Parameters:

NameTypeDefault
routestring-
argsobject-
customHeadersobject{}

Returns: Promise‹any›


authenticateWithService

authenticateWithService(provider: string, data: any, customHeaders?: object): Promise‹boolean›

Defined in packages/rest-client/src/rest-client.ts:64

Parameters:

NameType
providerstring
dataany
customHeaders?object

Returns: Promise‹boolean›


changePassword

changePassword(oldPassword: string, newPassword: string, customHeaders?: object): Promise‹void›

Defined in packages/rest-client/src/rest-client.ts:201

Parameters:

NameType
oldPasswordstring
newPasswordstring
customHeaders?object

Returns: Promise‹void›


createUser

createUser(user: CreateUser, customHeaders?: object): Promise‹CreateUserResult›

Defined in packages/rest-client/src/rest-client.ts:138

Parameters:

NameType
userCreateUser
customHeaders?object

Returns: Promise‹CreateUserResult›


fetch

fetch(route: string, args: object, customHeaders: object): Promise‹any›

Defined in packages/rest-client/src/rest-client.ts:30

Parameters:

NameTypeDefault
routestring-
argsobject-
customHeadersobject{}

Returns: Promise‹any›


getTwoFactorSecret

getTwoFactorSecret(customHeaders?: object): Promise‹any›

Defined in packages/rest-client/src/rest-client.ts:216

Parameters:

NameType
customHeaders?object

Returns: Promise‹any›


getUser

getUser(customHeaders?: object): Promise‹User›

Defined in packages/rest-client/src/rest-client.ts:130

Parameters:

NameType
customHeaders?object

Returns: Promise‹User›


impersonate

impersonate(accessToken: string, impersonated: ImpersonationUserIdentity, customHeaders?: object): Promise‹ImpersonationResult›

Defined in packages/rest-client/src/rest-client.ts:92

Parameters:

NameType
accessTokenstring
impersonatedImpersonationUserIdentity
customHeaders?object

Returns: Promise‹ImpersonationResult›


loginWithService

loginWithService(provider: string, data: any, customHeaders?: object): Promise‹LoginResult›

Defined in packages/rest-client/src/rest-client.ts:78

Parameters:

NameType
providerstring
dataany
customHeaders?object

Returns: Promise‹LoginResult›


logout

logout(customHeaders?: object): Promise‹void›

Defined in packages/rest-client/src/rest-client.ts:122

Parameters:

NameType
customHeaders?object

Returns: Promise‹void›


refreshTokens

refreshTokens(accessToken: string, refreshToken: string, customHeaders?: object): Promise‹LoginResult›

Defined in packages/rest-client/src/rest-client.ts:107

Parameters:

NameType
accessTokenstring
refreshTokenstring
customHeaders?object

Returns: Promise‹LoginResult›


resetPassword

resetPassword(token: string, newPassword: string, customHeaders?: object): Promise‹LoginResult | null›

Defined in packages/rest-client/src/rest-client.ts:146

Parameters:

NameType
tokenstring
newPasswordstring
customHeaders?object

Returns: Promise‹LoginResult | null›


sendResetPasswordEmail

sendResetPasswordEmail(email: string, customHeaders?: object): Promise‹void›

Defined in packages/rest-client/src/rest-client.ts:181

Parameters:

NameType
emailstring
customHeaders?object

Returns: Promise‹void›


sendVerificationEmail

sendVerificationEmail(email: string, customHeaders?: object): Promise‹void›

Defined in packages/rest-client/src/rest-client.ts:171

Parameters:

NameType
emailstring
customHeaders?object

Returns: Promise‹void›


twoFactorSet

twoFactorSet(secret: any, code: string, customHeaders?: object): Promise‹void›

Defined in packages/rest-client/src/rest-client.ts:223

Parameters:

NameType
secretany
codestring
customHeaders?object

Returns: Promise‹void›


twoFactorUnset

twoFactorUnset(code: string, customHeaders?: object): Promise‹void›

Defined in packages/rest-client/src/rest-client.ts:234

Parameters:

NameType
codestring
customHeaders?object

Returns: Promise‹void›


verifyEmail

verifyEmail(token: string, customHeaders?: object): Promise‹void›

Defined in packages/rest-client/src/rest-client.ts:161

Parameters:

NameType
tokenstring
customHeaders?object

Returns: Promise‹void›