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:23

Parameters:

NameType
optionsOptionsType

Returns: RestClient

Properties

client

client: AccountsClient

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

Methods

addEmail

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

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

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:58

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:66

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:203

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:140

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:29

Parameters:

NameTypeDefault
routestring-
argsobject-
customHeadersobject{}

Returns: Promise‹any›


getTwoFactorSecret

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

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

Parameters:

NameType
customHeaders?object

Returns: Promise‹any›


getUser

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

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

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:94

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:80

Parameters:

NameType
providerstring
dataany
customHeaders?object

Returns: Promise‹LoginResult›


logout

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

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

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:109

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:148

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:183

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:173

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:225

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:236

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:163

Parameters:

NameType
tokenstring
customHeaders?object

Returns: Promise‹void›