GraphQLClient

@accounts/graphql-clientGlobalsGraphQLClient

Hierarchy

  • GraphQLClient

Implements

  • TransportInterface

Index

Constructors

Properties

Methods

Constructors

constructor

+ new GraphQLClient(options: OptionsType): GraphQLClient

Defined in packages/graphql-client/src/graphql-client.ts:40

Parameters:

NameType
optionsOptionsType

Returns: GraphQLClient

Properties

client

client: AccountsClient

Defined in packages/graphql-client/src/graphql-client.ts:39

Methods

addEmail

addEmail(newEmail: string): Promise‹void›

Defined in packages/graphql-client/src/graphql-client.ts:144

inheritdoc

Parameters:

NameType
newEmailstring

Returns: Promise‹void›


authenticateWithService

authenticateWithService(service: string, authenticateParams: object): Promise‹boolean›

Defined in packages/graphql-client/src/graphql-client.ts:72

inheritdoc

Parameters:

NameType
servicestring
authenticateParamsobject

Returns: Promise‹boolean›


changePassword

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

Defined in packages/graphql-client/src/graphql-client.ts:151

inheritdoc

Parameters:

NameType
oldPasswordstring
newPasswordstring

Returns: Promise‹void›


createUser

createUser(user: CreateUser): Promise‹CreateUserResult›

Defined in packages/graphql-client/src/graphql-client.ts:65

Create a user with basic user info

memberof GraphQLClient

Parameters:

NameTypeDescription
userCreateUseruser object

Returns: Promise‹CreateUserResult›

contains user's ID and LoginResult object if autologin is enabled


getTwoFactorSecret

getTwoFactorSecret(): Promise‹any›

Defined in packages/graphql-client/src/graphql-client.ts:155

Returns: Promise‹any›


getUser

getUser(): Promise‹User›

Defined in packages/graphql-client/src/graphql-client.ts:95

Returns: Promise‹User›


impersonate

impersonate(token: string, impersonated: object): Promise‹ImpersonationResult›

Defined in packages/graphql-client/src/graphql-client.ts:170

inheritdoc

Parameters:

token: string

impersonated: object

NameType
username?string

Returns: Promise‹ImpersonationResult›


loginWithService

loginWithService(service: string, authenticateParams: AuthenticateParams): Promise‹LoginResult›

Defined in packages/graphql-client/src/graphql-client.ts:85

inheritdoc

Parameters:

NameType
servicestring
authenticateParamsAuthenticateParams

Returns: Promise‹LoginResult›


logout

logout(): Promise‹void›

Defined in packages/graphql-client/src/graphql-client.ts:102

inheritdoc

Returns: Promise‹void›


refreshTokens

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

Defined in packages/graphql-client/src/graphql-client.ts:109

inheritdoc

Parameters:

NameType
accessTokenstring
refreshTokenstring

Returns: Promise‹LoginResult›


resetPassword

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

Defined in packages/graphql-client/src/graphql-client.ts:137

inheritdoc

Parameters:

NameType
tokenstring
newPasswordstring

Returns: Promise‹LoginResult | null›


sendResetPasswordEmail

sendResetPasswordEmail(email: string): Promise‹void›

Defined in packages/graphql-client/src/graphql-client.ts:123

inheritdoc

Parameters:

NameType
emailstring

Returns: Promise‹void›


sendVerificationEmail

sendVerificationEmail(email: string): Promise‹void›

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

inheritdoc

Parameters:

NameType
emailstring

Returns: Promise‹void›


twoFactorSet

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

Defined in packages/graphql-client/src/graphql-client.ts:159

Parameters:

NameType
secretany
codestring

Returns: Promise‹void›


twoFactorUnset

twoFactorUnset(code: string): Promise‹void›

Defined in packages/graphql-client/src/graphql-client.ts:163

Parameters:

NameType
codestring

Returns: Promise‹void›


verifyEmail

verifyEmail(token: string): Promise‹void›

Defined in packages/graphql-client/src/graphql-client.ts:116

inheritdoc

Parameters:

NameType
tokenstring

Returns: Promise‹void›