Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@accounts/graphql-client

Package Overview
Dependencies
Maintainers
5
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@accounts/graphql-client - npm Package Compare versions

Comparing version 0.30.0-alpha.1 to 0.30.0

src/utils/replace-user-fragment.ts

63

lib/graphql-client.d.ts
import { AccountsClient, TransportInterface } from '@accounts/client';
import { CreateUser, ImpersonationResult, LoginResult, User, CreateUserResult, Authenticator } from '@accounts/types';
import { CreateUser, ImpersonationResult, LoginResult, User, CreateUserResult } from '@accounts/types';
import { DocumentNode } from 'graphql/language';

@@ -9,43 +9,3 @@ export interface AuthenticateParams {

graphQLClient: any;
/**
* Change the default user fragment.
* Default to:
* ```graphql
* fragment userFields on User {
* id
* emails {
* address
* verified
* }
* username
* }
* ```
*/
userFieldsFragment?: DocumentNode;
/**
* Change the challenge result fragment.
* Default to:
* ```graphql
* fragment challengeResult on ChallengeResult {
* ... on DefaultChallengeResult {
* mfaToken
* authenticatorId
* }
* }
* ```
*/
challengeResultFragment?: DocumentNode;
/**
* Change the association result fragment.
* Default to:
* ```graphql
* fragment associationResult on AssociationResult {
* ... on OTPAssociationResult {
* mfaToken
* authenticatorId
* }
* }
* ```
*/
associationResultFragment?: DocumentNode;
}

@@ -55,3 +15,2 @@ export default class GraphQLClient implements TransportInterface {

private options;
private operationsWithFragments;
constructor(options: OptionsType);

@@ -132,24 +91,4 @@ /**

}): Promise<ImpersonationResult>;
/**
* @inheritDoc
*/
mfaAssociate(type: string, params?: any): Promise<void>;
/**
* @inheritDoc
*/
mfaAssociateByMfaToken(mfaToken: string, type: string, params?: any): Promise<any>;
/**
* @inheritDoc
*/
authenticators(): Promise<Authenticator[]>;
/**
* @inheritDoc
*/
authenticatorsByMfaToken(mfaToken?: string): Promise<Authenticator[]>;
/**
* @inheritDoc
*/
mfaChallenge(mfaToken: string, authenticatorId: string): Promise<any>;
private mutate;
private query;
}

@@ -7,26 +7,6 @@ "use strict";

var GraphQLErrorList_1 = require("./GraphQLErrorList");
var replace_fragment_1 = require("./utils/replace-fragment");
var replace_user_fragment_1 = require("./utils/replace-user-fragment");
var GraphQLClient = /** @class */ (function () {
function GraphQLClient(options) {
this.options = options;
this.operationsWithFragments = {
AuthenticateDocument: this.options.userFieldsFragment
? replace_fragment_1.replaceFragment(graphql_operations_1.AuthenticateDocument, this.options.userFieldsFragment)
: graphql_operations_1.AuthenticateDocument,
CreateUserDocument: this.options.userFieldsFragment
? replace_fragment_1.replaceFragment(graphql_operations_1.CreateUserDocument, this.options.userFieldsFragment)
: graphql_operations_1.CreateUserDocument,
ImpersonateDocument: this.options.userFieldsFragment
? replace_fragment_1.replaceFragment(graphql_operations_1.ImpersonateDocument, this.options.userFieldsFragment)
: graphql_operations_1.ImpersonateDocument,
AssociateDocument: this.options.associationResultFragment
? replace_fragment_1.replaceFragment(graphql_operations_1.AssociateDocument, this.options.associationResultFragment)
: graphql_operations_1.AssociateDocument,
AssociateByMfaTokenDocument: this.options.associationResultFragment
? replace_fragment_1.replaceFragment(graphql_operations_1.AssociateByMfaTokenDocument, this.options.associationResultFragment)
: graphql_operations_1.AssociateByMfaTokenDocument,
ChallengeDocument: this.options.challengeResultFragment
? replace_fragment_1.replaceFragment(graphql_operations_1.ChallengeDocument, this.options.challengeResultFragment)
: graphql_operations_1.ChallengeDocument,
};
}

@@ -43,3 +23,5 @@ /**

return tslib_1.__generator(this, function (_a) {
return [2 /*return*/, this.mutate(this.operationsWithFragments.CreateUserDocument, 'createUser', { user: user })];
return [2 /*return*/, this.mutate(this.options.userFieldsFragment
? replace_user_fragment_1.replaceUserFieldsFragment(graphql_operations_1.CreateUserDocument, this.options.userFieldsFragment)
: graphql_operations_1.CreateUserDocument, 'createUser', { user: user })];
});

@@ -67,3 +49,5 @@ });

return tslib_1.__generator(this, function (_a) {
return [2 /*return*/, this.mutate(this.operationsWithFragments.AuthenticateDocument, 'authenticate', {
return [2 /*return*/, this.mutate(this.options.userFieldsFragment
? replace_user_fragment_1.replaceUserFieldsFragment(graphql_operations_1.AuthenticateDocument, this.options.userFieldsFragment)
: graphql_operations_1.AuthenticateDocument, 'authenticate', {
serviceName: service,

@@ -82,3 +66,3 @@ params: authenticateParams,

return [2 /*return*/, this.query(this.options.userFieldsFragment
? replace_fragment_1.replaceFragment(graphql_operations_1.GetUserDocument, this.options.userFieldsFragment)
? replace_user_fragment_1.replaceUserFieldsFragment(graphql_operations_1.GetUserDocument, this.options.userFieldsFragment)
: graphql_operations_1.GetUserDocument, 'getUser')];

@@ -204,3 +188,5 @@ });

return tslib_1.__generator(this, function (_a) {
return [2 /*return*/, this.mutate(this.operationsWithFragments.ImpersonateDocument, 'impersonate', {
return [2 /*return*/, this.mutate(this.options.userFieldsFragment
? replace_user_fragment_1.replaceUserFieldsFragment(graphql_operations_1.ImpersonateDocument, this.options.userFieldsFragment)
: graphql_operations_1.ImpersonateDocument, 'impersonate', {
accessToken: token,

@@ -216,62 +202,2 @@ impersonated: {

};
/**
* @inheritDoc
*/
GraphQLClient.prototype.mfaAssociate = function (type, params) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return tslib_1.__generator(this, function (_a) {
return [2 /*return*/, this.mutate(this.operationsWithFragments.AssociateDocument, 'associate', {
type: type,
params: params,
})];
});
});
};
/**
* @inheritDoc
*/
GraphQLClient.prototype.mfaAssociateByMfaToken = function (mfaToken, type, params) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return tslib_1.__generator(this, function (_a) {
return [2 /*return*/, this.mutate(this.operationsWithFragments.AssociateByMfaTokenDocument, 'associateByMfaToken', {
mfaToken: mfaToken,
type: type,
params: params,
})];
});
});
};
/**
* @inheritDoc
*/
GraphQLClient.prototype.authenticators = function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return tslib_1.__generator(this, function (_a) {
return [2 /*return*/, this.query(graphql_operations_1.AuthenticatorsDocument, 'authenticators')];
});
});
};
/**
* @inheritDoc
*/
GraphQLClient.prototype.authenticatorsByMfaToken = function (mfaToken) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return tslib_1.__generator(this, function (_a) {
return [2 /*return*/, this.query(graphql_operations_1.AuthenticatorsByMfaTokenDocument, 'authenticatorsByMfaToken', { mfaToken: mfaToken })];
});
});
};
/**
* @inheritDoc
*/
GraphQLClient.prototype.mfaChallenge = function (mfaToken, authenticatorId) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return tslib_1.__generator(this, function (_a) {
return [2 /*return*/, this.mutate(this.operationsWithFragments.ChallengeDocument, 'challenge', {
mfaToken: mfaToken,
authenticatorId: authenticatorId,
})];
});
});
};
GraphQLClient.prototype.mutate = function (mutation, resultField, variables) {

@@ -278,0 +204,0 @@ return tslib_1.__awaiter(this, void 0, void 0, function () {

@@ -1,5 +0,6 @@

import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
import { DocumentNode } from 'graphql';
import { TypedDocumentNode } from '@graphql-typed-document-node/core';
export declare type Maybe<T> = T | null;
export declare type Exact<T extends {
[key: string]: unknown;
[key: string]: any;
}> = {

@@ -16,6 +17,2 @@ [K in keyof T]: T[K];

};
export declare type AssociateParamsInput = {
_?: Maybe<Scalars['String']>;
};
export declare type AssociationResult = OtpAssociationResult;
export declare type AuthenticateParamsInput = {

@@ -29,11 +26,2 @@ access_token?: Maybe<Scalars['String']>;

};
export declare type AuthenticationResult = LoginResult | MultiFactorResult;
export declare type Authenticator = {
__typename?: 'Authenticator';
id?: Maybe<Scalars['ID']>;
type?: Maybe<Scalars['String']>;
active?: Maybe<Scalars['Boolean']>;
activatedAt?: Maybe<Scalars['String']>;
};
export declare type ChallengeResult = DefaultChallengeResult;
export declare type CreateUserInput = {

@@ -49,7 +37,2 @@ username?: Maybe<Scalars['String']>;

};
export declare type DefaultChallengeResult = {
__typename?: 'DefaultChallengeResult';
mfaToken?: Maybe<Scalars['String']>;
authenticatorId?: Maybe<Scalars['String']>;
};
export declare type EmailRecord = {

@@ -77,6 +60,2 @@ __typename?: 'EmailRecord';

};
export declare type MultiFactorResult = {
__typename?: 'MultiFactorResult';
mfaToken: Scalars['String'];
};
export declare type Mutation = {

@@ -93,9 +72,6 @@ __typename?: 'Mutation';

twoFactorUnset?: Maybe<Scalars['Boolean']>;
challenge?: Maybe<ChallengeResult>;
associate?: Maybe<AssociationResult>;
associateByMfaToken?: Maybe<AssociationResult>;
impersonate?: Maybe<ImpersonateReturn>;
refreshTokens?: Maybe<LoginResult>;
logout?: Maybe<Scalars['Boolean']>;
authenticate?: Maybe<AuthenticationResult>;
authenticate?: Maybe<LoginResult>;
verifyAuthentication?: Maybe<Scalars['Boolean']>;

@@ -133,15 +109,2 @@ };

};
export declare type MutationChallengeArgs = {
mfaToken: Scalars['String'];
authenticatorId: Scalars['String'];
};
export declare type MutationAssociateArgs = {
type: Scalars['String'];
params?: Maybe<AssociateParamsInput>;
};
export declare type MutationAssociateByMfaTokenArgs = {
mfaToken: Scalars['String'];
type: Scalars['String'];
params?: Maybe<AssociateParamsInput>;
};
export declare type MutationImpersonateArgs = {

@@ -163,17 +126,7 @@ accessToken: Scalars['String'];

};
export declare type OtpAssociationResult = {
__typename?: 'OTPAssociationResult';
mfaToken?: Maybe<Scalars['String']>;
authenticatorId?: Maybe<Scalars['String']>;
};
export declare type Query = {
__typename?: 'Query';
twoFactorSecret?: Maybe<TwoFactorSecretKey>;
authenticators?: Maybe<Array<Maybe<Authenticator>>>;
authenticatorsByMfaToken?: Maybe<Array<Maybe<Authenticator>>>;
getUser?: Maybe<User>;
};
export declare type QueryAuthenticatorsByMfaTokenArgs = {
mfaToken: Scalars['String'];
};
export declare type Tokens = {

@@ -216,62 +169,2 @@ __typename?: 'Tokens';

};
export declare type AssociationResultFragment = ({
__typename?: 'OTPAssociationResult';
} & Pick<OtpAssociationResult, 'mfaToken' | 'authenticatorId'>);
export declare type ChallengeResultFragment = ({
__typename?: 'DefaultChallengeResult';
} & Pick<DefaultChallengeResult, 'mfaToken' | 'authenticatorId'>);
export declare type AssociateMutationVariables = Exact<{
type: Scalars['String'];
params?: Maybe<AssociateParamsInput>;
}>;
export declare type AssociateMutation = ({
__typename?: 'Mutation';
} & {
associate?: Maybe<({
__typename?: 'OTPAssociationResult';
} & AssociationResultFragment)>;
});
export declare type AssociateByMfaTokenMutationVariables = Exact<{
mfaToken: Scalars['String'];
type: Scalars['String'];
params?: Maybe<AssociateParamsInput>;
}>;
export declare type AssociateByMfaTokenMutation = ({
__typename?: 'Mutation';
} & {
associateByMfaToken?: Maybe<({
__typename?: 'OTPAssociationResult';
} & AssociationResultFragment)>;
});
export declare type ChallengeMutationVariables = Exact<{
mfaToken: Scalars['String'];
authenticatorId: Scalars['String'];
}>;
export declare type ChallengeMutation = ({
__typename?: 'Mutation';
} & {
challenge?: Maybe<({
__typename?: 'DefaultChallengeResult';
} & ChallengeResultFragment)>;
});
export declare type AuthenticatorsQueryVariables = Exact<{
[key: string]: never;
}>;
export declare type AuthenticatorsQuery = ({
__typename?: 'Query';
} & {
authenticators?: Maybe<Array<Maybe<({
__typename?: 'Authenticator';
} & Pick<Authenticator, 'id' | 'type' | 'active' | 'activatedAt'>)>>>;
});
export declare type AuthenticatorsByMfaTokenQueryVariables = Exact<{
mfaToken: Scalars['String'];
}>;
export declare type AuthenticatorsByMfaTokenQuery = ({
__typename?: 'Query';
} & {
authenticatorsByMfaToken?: Maybe<Array<Maybe<({
__typename?: 'Authenticator';
} & Pick<Authenticator, 'id' | 'type' | 'active' | 'activatedAt'>)>>>;
});
export declare type UserFieldsFragment = ({

@@ -359,5 +252,3 @@ __typename?: 'User';

} & UserFieldsFragment)>;
}) | {
__typename?: 'MultiFactorResult';
}>;
})>;
});

@@ -451,25 +342,18 @@ export declare type LogoutMutationVariables = Exact<{

});
export declare const AssociationResultFragmentDoc: DocumentNode<AssociationResultFragment, unknown>;
export declare const ChallengeResultFragmentDoc: DocumentNode<ChallengeResultFragment, unknown>;
export declare const UserFieldsFragmentDoc: DocumentNode<UserFieldsFragment, unknown>;
export declare const AssociateDocument: DocumentNode<AssociateMutation, AssociateMutationVariables>;
export declare const AssociateByMfaTokenDocument: DocumentNode<AssociateByMfaTokenMutation, AssociateByMfaTokenMutationVariables>;
export declare const ChallengeDocument: DocumentNode<ChallengeMutation, ChallengeMutationVariables>;
export declare const AuthenticatorsDocument: DocumentNode<AuthenticatorsQuery, AuthenticatorsQueryVariables>;
export declare const AuthenticatorsByMfaTokenDocument: DocumentNode<AuthenticatorsByMfaTokenQuery, AuthenticatorsByMfaTokenQueryVariables>;
export declare const AddEmailDocument: DocumentNode<AddEmailMutation, AddEmailMutationVariables>;
export declare const AuthenticateWithServiceDocument: DocumentNode<AuthenticateWithServiceMutation, AuthenticateWithServiceMutationVariables>;
export declare const ChangePasswordDocument: DocumentNode<ChangePasswordMutation, ChangePasswordMutationVariables>;
export declare const CreateUserDocument: DocumentNode<CreateUserMutation, CreateUserMutationVariables>;
export declare const ImpersonateDocument: DocumentNode<ImpersonateMutation, ImpersonateMutationVariables>;
export declare const AuthenticateDocument: DocumentNode<AuthenticateMutation, AuthenticateMutationVariables>;
export declare const LogoutDocument: DocumentNode<LogoutMutation, LogoutMutationVariables>;
export declare const RefreshTokensDocument: DocumentNode<RefreshTokensMutation, RefreshTokensMutationVariables>;
export declare const ResetPasswordDocument: DocumentNode<ResetPasswordMutation, ResetPasswordMutationVariables>;
export declare const SendResetPasswordEmailDocument: DocumentNode<SendResetPasswordEmailMutation, SendResetPasswordEmailMutationVariables>;
export declare const SendVerificationEmailDocument: DocumentNode<SendVerificationEmailMutation, SendVerificationEmailMutationVariables>;
export declare const TwoFactorSetDocument: DocumentNode<TwoFactorSetMutation, TwoFactorSetMutationVariables>;
export declare const TwoFactorUnsetDocument: DocumentNode<TwoFactorUnsetMutation, TwoFactorUnsetMutationVariables>;
export declare const VerifyEmailDocument: DocumentNode<VerifyEmailMutation, VerifyEmailMutationVariables>;
export declare const GetTwoFactorSecretDocument: DocumentNode<GetTwoFactorSecretQuery, GetTwoFactorSecretQueryVariables>;
export declare const GetUserDocument: DocumentNode<GetUserQuery, GetUserQueryVariables>;
export declare const UserFieldsFragmentDoc: DocumentNode;
export declare const AddEmailDocument: TypedDocumentNode<AddEmailMutation, AddEmailMutationVariables>;
export declare const AuthenticateWithServiceDocument: TypedDocumentNode<AuthenticateWithServiceMutation, AuthenticateWithServiceMutationVariables>;
export declare const ChangePasswordDocument: TypedDocumentNode<ChangePasswordMutation, ChangePasswordMutationVariables>;
export declare const CreateUserDocument: TypedDocumentNode<CreateUserMutation, CreateUserMutationVariables>;
export declare const ImpersonateDocument: TypedDocumentNode<ImpersonateMutation, ImpersonateMutationVariables>;
export declare const AuthenticateDocument: TypedDocumentNode<AuthenticateMutation, AuthenticateMutationVariables>;
export declare const LogoutDocument: TypedDocumentNode<LogoutMutation, LogoutMutationVariables>;
export declare const RefreshTokensDocument: TypedDocumentNode<RefreshTokensMutation, RefreshTokensMutationVariables>;
export declare const ResetPasswordDocument: TypedDocumentNode<ResetPasswordMutation, ResetPasswordMutationVariables>;
export declare const SendResetPasswordEmailDocument: TypedDocumentNode<SendResetPasswordEmailMutation, SendResetPasswordEmailMutationVariables>;
export declare const SendVerificationEmailDocument: TypedDocumentNode<SendVerificationEmailMutation, SendVerificationEmailMutationVariables>;
export declare const TwoFactorSetDocument: TypedDocumentNode<TwoFactorSetMutation, TwoFactorSetMutationVariables>;
export declare const TwoFactorUnsetDocument: TypedDocumentNode<TwoFactorUnsetMutation, TwoFactorUnsetMutationVariables>;
export declare const VerifyEmailDocument: TypedDocumentNode<VerifyEmailMutation, VerifyEmailMutationVariables>;
export declare const GetTwoFactorSecretDocument: TypedDocumentNode<GetTwoFactorSecretQuery, GetTwoFactorSecretQueryVariables>;
export declare const GetUserDocument: TypedDocumentNode<GetUserQuery, GetUserQueryVariables>;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetUserDocument = exports.GetTwoFactorSecretDocument = exports.VerifyEmailDocument = exports.TwoFactorUnsetDocument = exports.TwoFactorSetDocument = exports.SendVerificationEmailDocument = exports.SendResetPasswordEmailDocument = exports.ResetPasswordDocument = exports.RefreshTokensDocument = exports.LogoutDocument = exports.AuthenticateDocument = exports.ImpersonateDocument = exports.CreateUserDocument = exports.ChangePasswordDocument = exports.AuthenticateWithServiceDocument = exports.AddEmailDocument = exports.AuthenticatorsByMfaTokenDocument = exports.AuthenticatorsDocument = exports.ChallengeDocument = exports.AssociateByMfaTokenDocument = exports.AssociateDocument = exports.UserFieldsFragmentDoc = exports.ChallengeResultFragmentDoc = exports.AssociationResultFragmentDoc = void 0;
exports.GetUserDocument = exports.GetTwoFactorSecretDocument = exports.VerifyEmailDocument = exports.TwoFactorUnsetDocument = exports.TwoFactorSetDocument = exports.SendVerificationEmailDocument = exports.SendResetPasswordEmailDocument = exports.ResetPasswordDocument = exports.RefreshTokensDocument = exports.LogoutDocument = exports.AuthenticateDocument = exports.ImpersonateDocument = exports.CreateUserDocument = exports.ChangePasswordDocument = exports.AuthenticateWithServiceDocument = exports.AddEmailDocument = exports.UserFieldsFragmentDoc = void 0;
var tslib_1 = require("tslib");
exports.AssociationResultFragmentDoc = { "kind": "Document", "definitions": [{ "kind": "FragmentDefinition", "name": { "kind": "Name", "value": "associationResult" }, "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "AssociationResult" } }, "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "OTPAssociationResult" } }, "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "mfaToken" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "authenticatorId" }, "arguments": [], "directives": [] }] } }] } }] };
exports.ChallengeResultFragmentDoc = { "kind": "Document", "definitions": [{ "kind": "FragmentDefinition", "name": { "kind": "Name", "value": "challengeResult" }, "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "ChallengeResult" } }, "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "DefaultChallengeResult" } }, "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "mfaToken" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "authenticatorId" }, "arguments": [], "directives": [] }] } }] } }] };
exports.UserFieldsFragmentDoc = { "kind": "Document", "definitions": [{ "kind": "FragmentDefinition", "name": { "kind": "Name", "value": "userFields" }, "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "User" } }, "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "emails" }, "arguments": [], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "address" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "verified" }, "arguments": [], "directives": [] }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "username" }, "arguments": [], "directives": [] }] } }] };
exports.AssociateDocument = { "kind": "Document", "definitions": tslib_1.__spreadArrays([{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "associate" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "type" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, "directives": [] }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "params" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "AssociateParamsInput" } }, "directives": [] }], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "associate" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "type" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "type" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "params" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "params" } } }], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "FragmentSpread", "name": { "kind": "Name", "value": "associationResult" }, "directives": [] }] } }] } }], exports.AssociationResultFragmentDoc.definitions) };
exports.AssociateByMfaTokenDocument = { "kind": "Document", "definitions": tslib_1.__spreadArrays([{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "associateByMfaToken" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "mfaToken" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, "directives": [] }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "type" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, "directives": [] }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "params" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "AssociateParamsInput" } }, "directives": [] }], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "associateByMfaToken" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "mfaToken" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "mfaToken" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "type" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "type" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "params" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "params" } } }], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "FragmentSpread", "name": { "kind": "Name", "value": "associationResult" }, "directives": [] }] } }] } }], exports.AssociationResultFragmentDoc.definitions) };
exports.ChallengeDocument = { "kind": "Document", "definitions": tslib_1.__spreadArrays([{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "challenge" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "mfaToken" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, "directives": [] }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "authenticatorId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, "directives": [] }], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "challenge" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "mfaToken" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "mfaToken" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "authenticatorId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "authenticatorId" } } }], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "FragmentSpread", "name": { "kind": "Name", "value": "challengeResult" }, "directives": [] }] } }] } }], exports.ChallengeResultFragmentDoc.definitions) };
exports.AuthenticatorsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "authenticators" }, "variableDefinitions": [], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "authenticators" }, "arguments": [], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "type" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "active" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "activatedAt" }, "arguments": [], "directives": [] }] } }] } }] };
exports.AuthenticatorsByMfaTokenDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "authenticatorsByMfaToken" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "mfaToken" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, "directives": [] }], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "authenticatorsByMfaToken" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "mfaToken" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "mfaToken" } } }], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "type" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "active" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "activatedAt" }, "arguments": [], "directives": [] }] } }] } }] };
exports.AddEmailDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "addEmail" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "newEmail" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, "directives": [] }], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "addEmail" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "newEmail" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "newEmail" } } }], "directives": [] }] } }] };

@@ -18,3 +11,3 @@ exports.AuthenticateWithServiceDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "authenticateWithService" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "serviceName" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, "directives": [] }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "params" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "AuthenticateParamsInput" } } }, "directives": [] }], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "verifyAuthentication" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "serviceName" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "serviceName" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "params" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "params" } } }], "directives": [] }] } }] };

exports.ImpersonateDocument = { "kind": "Document", "definitions": tslib_1.__spreadArrays([{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "impersonate" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "accessToken" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, "directives": [] }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "impersonated" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ImpersonationUserIdentityInput" } } }, "directives": [] }], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "impersonate" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "accessToken" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "accessToken" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "impersonated" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "impersonated" } } }], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "authorized" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "tokens" }, "arguments": [], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "refreshToken" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "accessToken" }, "arguments": [], "directives": [] }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "user" }, "arguments": [], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "FragmentSpread", "name": { "kind": "Name", "value": "userFields" }, "directives": [] }] } }] } }] } }], exports.UserFieldsFragmentDoc.definitions) };
exports.AuthenticateDocument = { "kind": "Document", "definitions": tslib_1.__spreadArrays([{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "authenticate" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "serviceName" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, "directives": [] }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "params" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "AuthenticateParamsInput" } } }, "directives": [] }], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "authenticate" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "serviceName" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "serviceName" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "params" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "params" } } }], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "LoginResult" } }, "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "sessionId" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "tokens" }, "arguments": [], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "refreshToken" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "accessToken" }, "arguments": [], "directives": [] }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "user" }, "arguments": [], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "FragmentSpread", "name": { "kind": "Name", "value": "userFields" }, "directives": [] }] } }] } }] } }] } }], exports.UserFieldsFragmentDoc.definitions) };
exports.AuthenticateDocument = { "kind": "Document", "definitions": tslib_1.__spreadArrays([{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "authenticate" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "serviceName" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, "directives": [] }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "params" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "AuthenticateParamsInput" } } }, "directives": [] }], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "authenticate" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "serviceName" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "serviceName" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "params" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "params" } } }], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "sessionId" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "tokens" }, "arguments": [], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "refreshToken" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "accessToken" }, "arguments": [], "directives": [] }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "user" }, "arguments": [], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "FragmentSpread", "name": { "kind": "Name", "value": "userFields" }, "directives": [] }] } }] } }] } }], exports.UserFieldsFragmentDoc.definitions) };
exports.LogoutDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "logout" }, "variableDefinitions": [], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "logout" }, "arguments": [], "directives": [] }] } }] };

@@ -21,0 +14,0 @@ exports.RefreshTokensDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "refreshTokens" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "accessToken" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, "directives": [] }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "refreshToken" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, "directives": [] }], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "refreshTokens" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "accessToken" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "accessToken" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "refreshToken" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "refreshToken" } } }], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "sessionId" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "tokens" }, "arguments": [], "directives": [], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "refreshToken" }, "arguments": [], "directives": [] }, { "kind": "Field", "name": { "kind": "Name", "value": "accessToken" }, "arguments": [], "directives": [] }] } }] } }] } }] };

{
"name": "@accounts/graphql-client",
"version": "0.30.0-alpha.1",
"version": "0.30.0",
"description": "GraphQL client transport for accounts",

@@ -36,19 +36,18 @@ "main": "lib/index.js",

"dependencies": {
"@accounts/client": "^0.30.0-alpha.1",
"@accounts/types": "^0.30.0-alpha.1",
"@graphql-typed-document-node/core": "3.0.0",
"tslib": "2.0.1"
"@accounts/client": "^0.30.0",
"@accounts/types": "^0.30.0",
"@graphql-typed-document-node/core": "0.0.1",
"tslib": "2.0.0"
},
"devDependencies": {
"@graphql-codegen/add": "1.17.7",
"@graphql-codegen/cli": "1.17.7",
"@graphql-codegen/typed-document-node": "1.17.8",
"@graphql-codegen/typescript": "1.17.7",
"@graphql-codegen/typescript-operations": "1.17.7",
"@types/jest": "26.0.9",
"graphql": "14.7.0",
"jest": "26.3.0",
"lodash": "4.17.20"
"@graphql-codegen/add": "1.17.4",
"@graphql-codegen/cli": "1.17.4",
"@graphql-codegen/typed-document-node": "1.17.4",
"@graphql-codegen/typescript": "1.17.4",
"@graphql-codegen/typescript-operations": "1.17.4",
"@types/jest": "25.2.3",
"graphql": "14.6.0",
"jest": "26.0.1"
},
"gitHead": "eb9750193707aecb771b63d29540a8b6c316ebe0"
"gitHead": "a883d3b90c481e9c73a7655ef2aadac092fc6b0e"
}

@@ -8,3 +8,2 @@ import { AccountsClient, TransportInterface } from '@accounts/client';

CreateUserResult,
Authenticator,
} from '@accounts/types';

@@ -30,10 +29,5 @@ import { print, DocumentNode } from 'graphql/language';

AuthenticateDocument,
ChallengeDocument,
AuthenticatorsDocument,
AuthenticatorsByMfaTokenDocument,
AssociateDocument,
AssociateByMfaTokenDocument,
} from './graphql-operations';
import { GraphQLErrorList } from './GraphQLErrorList';
import { replaceFragment } from './utils/replace-fragment';
import { replaceUserFieldsFragment } from './utils/replace-user-fragment';

@@ -46,43 +40,3 @@ export interface AuthenticateParams {

graphQLClient: any;
/**
* Change the default user fragment.
* Default to:
* ```graphql
* fragment userFields on User {
* id
* emails {
* address
* verified
* }
* username
* }
* ```
*/
userFieldsFragment?: DocumentNode;
/**
* Change the challenge result fragment.
* Default to:
* ```graphql
* fragment challengeResult on ChallengeResult {
* ... on DefaultChallengeResult {
* mfaToken
* authenticatorId
* }
* }
* ```
*/
challengeResultFragment?: DocumentNode;
/**
* Change the association result fragment.
* Default to:
* ```graphql
* fragment associationResult on AssociationResult {
* ... on OTPAssociationResult {
* mfaToken
* authenticatorId
* }
* }
* ```
*/
associationResultFragment?: DocumentNode;
}

@@ -93,33 +47,5 @@

private options: OptionsType;
private operationsWithFragments: {
AuthenticateDocument: DocumentNode;
CreateUserDocument: DocumentNode;
ImpersonateDocument: DocumentNode;
AssociateDocument: DocumentNode;
AssociateByMfaTokenDocument: DocumentNode;
ChallengeDocument: DocumentNode;
};
constructor(options: OptionsType) {
this.options = options;
this.operationsWithFragments = {
AuthenticateDocument: this.options.userFieldsFragment
? replaceFragment(AuthenticateDocument, this.options.userFieldsFragment)
: AuthenticateDocument,
CreateUserDocument: this.options.userFieldsFragment
? replaceFragment(CreateUserDocument, this.options.userFieldsFragment)
: CreateUserDocument,
ImpersonateDocument: this.options.userFieldsFragment
? replaceFragment(ImpersonateDocument, this.options.userFieldsFragment)
: ImpersonateDocument,
AssociateDocument: this.options.associationResultFragment
? replaceFragment(AssociateDocument, this.options.associationResultFragment)
: AssociateDocument,
AssociateByMfaTokenDocument: this.options.associationResultFragment
? replaceFragment(AssociateByMfaTokenDocument, this.options.associationResultFragment)
: AssociateByMfaTokenDocument,
ChallengeDocument: this.options.challengeResultFragment
? replaceFragment(ChallengeDocument, this.options.challengeResultFragment)
: ChallengeDocument,
};
}

@@ -135,3 +61,9 @@

public async createUser(user: CreateUser): Promise<CreateUserResult> {
return this.mutate(this.operationsWithFragments.CreateUserDocument, 'createUser', { user });
return this.mutate(
this.options.userFieldsFragment
? replaceUserFieldsFragment(CreateUserDocument, this.options.userFieldsFragment)
: CreateUserDocument,
'createUser',
{ user }
);
}

@@ -159,6 +91,12 @@

): Promise<LoginResult> {
return this.mutate(this.operationsWithFragments.AuthenticateDocument, 'authenticate', {
serviceName: service,
params: authenticateParams,
});
return this.mutate(
this.options.userFieldsFragment
? replaceUserFieldsFragment(AuthenticateDocument, this.options.userFieldsFragment)
: AuthenticateDocument,
'authenticate',
{
serviceName: service,
params: authenticateParams,
}
);
}

@@ -172,3 +110,3 @@

this.options.userFieldsFragment
? replaceFragment(GetUserDocument, this.options.userFieldsFragment)
? replaceUserFieldsFragment(GetUserDocument, this.options.userFieldsFragment)
: GetUserDocument,

@@ -267,33 +205,14 @@ 'getUser'

): Promise<ImpersonationResult> {
return this.mutate(this.operationsWithFragments.ImpersonateDocument, 'impersonate', {
accessToken: token,
impersonated: {
userId: impersonated.userId,
username: impersonated.username,
email: impersonated.email,
},
});
}
/**
* @inheritDoc
*/
public async mfaAssociate(type: string, params?: any): Promise<void> {
return this.mutate(this.operationsWithFragments.AssociateDocument, 'associate', {
type,
params,
});
}
/**
* @inheritDoc
*/
public async mfaAssociateByMfaToken(mfaToken: string, type: string, params?: any): Promise<any> {
return this.mutate(
this.operationsWithFragments.AssociateByMfaTokenDocument,
'associateByMfaToken',
this.options.userFieldsFragment
? replaceUserFieldsFragment(ImpersonateDocument, this.options.userFieldsFragment)
: ImpersonateDocument,
'impersonate',
{
mfaToken,
type,
params,
accessToken: token,
impersonated: {
userId: impersonated.userId,
username: impersonated.username,
email: impersonated.email,
},
}

@@ -303,26 +222,2 @@ );

/**
* @inheritDoc
*/
public async authenticators(): Promise<Authenticator[]> {
return this.query(AuthenticatorsDocument, 'authenticators');
}
/**
* @inheritDoc
*/
public async authenticatorsByMfaToken(mfaToken?: string): Promise<Authenticator[]> {
return this.query(AuthenticatorsByMfaTokenDocument, 'authenticatorsByMfaToken', { mfaToken });
}
/**
* @inheritDoc
*/
public async mfaChallenge(mfaToken: string, authenticatorId: string): Promise<any> {
return this.mutate(this.operationsWithFragments.ChallengeDocument, 'challenge', {
mfaToken,
authenticatorId,
});
}
private async mutate<TData = any, TVariables = Record<string, any>>(

@@ -329,0 +224,0 @@ mutation: TypedDocumentNode<TData, TVariables>,

/* eslint-disable */
import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
import { DocumentNode } from 'graphql';
import { TypedDocumentNode } from '@graphql-typed-document-node/core';
export type Maybe<T> = T | null;
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
export type Exact<T extends { [key: string]: any }> = { [K in keyof T]: T[K] };

@@ -15,8 +16,2 @@ /** All built-in and custom scalars, mapped to their actual values */

export type AssociateParamsInput = {
_?: Maybe<Scalars['String']>;
};
export type AssociationResult = OtpAssociationResult;
export type AuthenticateParamsInput = {

@@ -31,14 +26,2 @@ access_token?: Maybe<Scalars['String']>;

export type AuthenticationResult = LoginResult | MultiFactorResult;
export type Authenticator = {
__typename?: 'Authenticator';
id?: Maybe<Scalars['ID']>;
type?: Maybe<Scalars['String']>;
active?: Maybe<Scalars['Boolean']>;
activatedAt?: Maybe<Scalars['String']>;
};
export type ChallengeResult = DefaultChallengeResult;
export type CreateUserInput = {

@@ -56,8 +39,2 @@ username?: Maybe<Scalars['String']>;

export type DefaultChallengeResult = {
__typename?: 'DefaultChallengeResult';
mfaToken?: Maybe<Scalars['String']>;
authenticatorId?: Maybe<Scalars['String']>;
};
export type EmailRecord = {

@@ -89,7 +66,2 @@ __typename?: 'EmailRecord';

export type MultiFactorResult = {
__typename?: 'MultiFactorResult';
mfaToken: Scalars['String'];
};
export type Mutation = {

@@ -106,9 +78,6 @@ __typename?: 'Mutation';

twoFactorUnset?: Maybe<Scalars['Boolean']>;
challenge?: Maybe<ChallengeResult>;
associate?: Maybe<AssociationResult>;
associateByMfaToken?: Maybe<AssociationResult>;
impersonate?: Maybe<ImpersonateReturn>;
refreshTokens?: Maybe<LoginResult>;
logout?: Maybe<Scalars['Boolean']>;
authenticate?: Maybe<AuthenticationResult>;
authenticate?: Maybe<LoginResult>;
verifyAuthentication?: Maybe<Scalars['Boolean']>;

@@ -166,21 +135,2 @@ };

export type MutationChallengeArgs = {
mfaToken: Scalars['String'];
authenticatorId: Scalars['String'];
};
export type MutationAssociateArgs = {
type: Scalars['String'];
params?: Maybe<AssociateParamsInput>;
};
export type MutationAssociateByMfaTokenArgs = {
mfaToken: Scalars['String'];
type: Scalars['String'];
params?: Maybe<AssociateParamsInput>;
};
export type MutationImpersonateArgs = {

@@ -209,21 +159,8 @@ accessToken: Scalars['String'];

export type OtpAssociationResult = {
__typename?: 'OTPAssociationResult';
mfaToken?: Maybe<Scalars['String']>;
authenticatorId?: Maybe<Scalars['String']>;
};
export type Query = {
__typename?: 'Query';
twoFactorSecret?: Maybe<TwoFactorSecretKey>;
authenticators?: Maybe<Array<Maybe<Authenticator>>>;
authenticatorsByMfaToken?: Maybe<Array<Maybe<Authenticator>>>;
getUser?: Maybe<User>;
};
export type QueryAuthenticatorsByMfaTokenArgs = {
mfaToken: Scalars['String'];
};
export type Tokens = {

@@ -271,79 +208,2 @@ __typename?: 'Tokens';

export type AssociationResultFragment = (
{ __typename?: 'OTPAssociationResult' }
& Pick<OtpAssociationResult, 'mfaToken' | 'authenticatorId'>
);
export type ChallengeResultFragment = (
{ __typename?: 'DefaultChallengeResult' }
& Pick<DefaultChallengeResult, 'mfaToken' | 'authenticatorId'>
);
export type AssociateMutationVariables = Exact<{
type: Scalars['String'];
params?: Maybe<AssociateParamsInput>;
}>;
export type AssociateMutation = (
{ __typename?: 'Mutation' }
& { associate?: Maybe<(
{ __typename?: 'OTPAssociationResult' }
& AssociationResultFragment
)> }
);
export type AssociateByMfaTokenMutationVariables = Exact<{
mfaToken: Scalars['String'];
type: Scalars['String'];
params?: Maybe<AssociateParamsInput>;
}>;
export type AssociateByMfaTokenMutation = (
{ __typename?: 'Mutation' }
& { associateByMfaToken?: Maybe<(
{ __typename?: 'OTPAssociationResult' }
& AssociationResultFragment
)> }
);
export type ChallengeMutationVariables = Exact<{
mfaToken: Scalars['String'];
authenticatorId: Scalars['String'];
}>;
export type ChallengeMutation = (
{ __typename?: 'Mutation' }
& { challenge?: Maybe<(
{ __typename?: 'DefaultChallengeResult' }
& ChallengeResultFragment
)> }
);
export type AuthenticatorsQueryVariables = Exact<{ [key: string]: never; }>;
export type AuthenticatorsQuery = (
{ __typename?: 'Query' }
& { authenticators?: Maybe<Array<Maybe<(
{ __typename?: 'Authenticator' }
& Pick<Authenticator, 'id' | 'type' | 'active' | 'activatedAt'>
)>>> }
);
export type AuthenticatorsByMfaTokenQueryVariables = Exact<{
mfaToken: Scalars['String'];
}>;
export type AuthenticatorsByMfaTokenQuery = (
{ __typename?: 'Query' }
& { authenticatorsByMfaToken?: Maybe<Array<Maybe<(
{ __typename?: 'Authenticator' }
& Pick<Authenticator, 'id' | 'type' | 'active' | 'activatedAt'>
)>>> }
);
export type UserFieldsFragment = (

@@ -453,3 +313,3 @@ { __typename?: 'User' }

)> }
) | { __typename?: 'MultiFactorResult' }> }
)> }
);

@@ -574,25 +434,18 @@

export const AssociationResultFragmentDoc: DocumentNode<AssociationResultFragment, unknown> = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"associationResult"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AssociationResult"}},"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OTPAssociationResult"}},"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"mfaToken"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"authenticatorId"},"arguments":[],"directives":[]}]}}]}}]};
export const ChallengeResultFragmentDoc: DocumentNode<ChallengeResultFragment, unknown> = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"challengeResult"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ChallengeResult"}},"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefaultChallengeResult"}},"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"mfaToken"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"authenticatorId"},"arguments":[],"directives":[]}]}}]}}]};
export const UserFieldsFragmentDoc: DocumentNode<UserFieldsFragment, unknown> = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"userFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"emails"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"address"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"verified"},"arguments":[],"directives":[]}]}},{"kind":"Field","name":{"kind":"Name","value":"username"},"arguments":[],"directives":[]}]}}]};
export const AssociateDocument: DocumentNode<AssociateMutation, AssociateMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"associate"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"type"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"params"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"AssociateParamsInput"}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"associate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"type"},"value":{"kind":"Variable","name":{"kind":"Name","value":"type"}}},{"kind":"Argument","name":{"kind":"Name","value":"params"},"value":{"kind":"Variable","name":{"kind":"Name","value":"params"}}}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"associationResult"},"directives":[]}]}}]}},...AssociationResultFragmentDoc.definitions]};
export const AssociateByMfaTokenDocument: DocumentNode<AssociateByMfaTokenMutation, AssociateByMfaTokenMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"associateByMfaToken"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"mfaToken"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"type"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"params"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"AssociateParamsInput"}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"associateByMfaToken"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"mfaToken"},"value":{"kind":"Variable","name":{"kind":"Name","value":"mfaToken"}}},{"kind":"Argument","name":{"kind":"Name","value":"type"},"value":{"kind":"Variable","name":{"kind":"Name","value":"type"}}},{"kind":"Argument","name":{"kind":"Name","value":"params"},"value":{"kind":"Variable","name":{"kind":"Name","value":"params"}}}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"associationResult"},"directives":[]}]}}]}},...AssociationResultFragmentDoc.definitions]};
export const ChallengeDocument: DocumentNode<ChallengeMutation, ChallengeMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"challenge"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"mfaToken"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"authenticatorId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"challenge"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"mfaToken"},"value":{"kind":"Variable","name":{"kind":"Name","value":"mfaToken"}}},{"kind":"Argument","name":{"kind":"Name","value":"authenticatorId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"authenticatorId"}}}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"challengeResult"},"directives":[]}]}}]}},...ChallengeResultFragmentDoc.definitions]};
export const AuthenticatorsDocument: DocumentNode<AuthenticatorsQuery, AuthenticatorsQueryVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"authenticators"},"variableDefinitions":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"authenticators"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"type"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"active"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"activatedAt"},"arguments":[],"directives":[]}]}}]}}]};
export const AuthenticatorsByMfaTokenDocument: DocumentNode<AuthenticatorsByMfaTokenQuery, AuthenticatorsByMfaTokenQueryVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"authenticatorsByMfaToken"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"mfaToken"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"authenticatorsByMfaToken"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"mfaToken"},"value":{"kind":"Variable","name":{"kind":"Name","value":"mfaToken"}}}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"type"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"active"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"activatedAt"},"arguments":[],"directives":[]}]}}]}}]};
export const AddEmailDocument: DocumentNode<AddEmailMutation, AddEmailMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"addEmail"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"newEmail"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"addEmail"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"newEmail"},"value":{"kind":"Variable","name":{"kind":"Name","value":"newEmail"}}}],"directives":[]}]}}]};
export const AuthenticateWithServiceDocument: DocumentNode<AuthenticateWithServiceMutation, AuthenticateWithServiceMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"authenticateWithService"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"serviceName"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"params"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"AuthenticateParamsInput"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"verifyAuthentication"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"serviceName"},"value":{"kind":"Variable","name":{"kind":"Name","value":"serviceName"}}},{"kind":"Argument","name":{"kind":"Name","value":"params"},"value":{"kind":"Variable","name":{"kind":"Name","value":"params"}}}],"directives":[]}]}}]};
export const ChangePasswordDocument: DocumentNode<ChangePasswordMutation, ChangePasswordMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"changePassword"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"oldPassword"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"newPassword"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"changePassword"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"oldPassword"},"value":{"kind":"Variable","name":{"kind":"Name","value":"oldPassword"}}},{"kind":"Argument","name":{"kind":"Name","value":"newPassword"},"value":{"kind":"Variable","name":{"kind":"Name","value":"newPassword"}}}],"directives":[]}]}}]};
export const CreateUserDocument: DocumentNode<CreateUserMutation, CreateUserMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"createUser"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"user"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateUserInput"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createUser"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"user"},"value":{"kind":"Variable","name":{"kind":"Name","value":"user"}}}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"userId"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"loginResult"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"tokens"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"refreshToken"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"accessToken"},"arguments":[],"directives":[]}]}},{"kind":"Field","name":{"kind":"Name","value":"user"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"userFields"},"directives":[]}]}}]}}]}}]}},...UserFieldsFragmentDoc.definitions]};
export const ImpersonateDocument: DocumentNode<ImpersonateMutation, ImpersonateMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"impersonate"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"accessToken"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"impersonated"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ImpersonationUserIdentityInput"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"impersonate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"accessToken"},"value":{"kind":"Variable","name":{"kind":"Name","value":"accessToken"}}},{"kind":"Argument","name":{"kind":"Name","value":"impersonated"},"value":{"kind":"Variable","name":{"kind":"Name","value":"impersonated"}}}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"authorized"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"tokens"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"refreshToken"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"accessToken"},"arguments":[],"directives":[]}]}},{"kind":"Field","name":{"kind":"Name","value":"user"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"userFields"},"directives":[]}]}}]}}]}},...UserFieldsFragmentDoc.definitions]};
export const AuthenticateDocument: DocumentNode<AuthenticateMutation, AuthenticateMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"authenticate"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"serviceName"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"params"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"AuthenticateParamsInput"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"authenticate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"serviceName"},"value":{"kind":"Variable","name":{"kind":"Name","value":"serviceName"}}},{"kind":"Argument","name":{"kind":"Name","value":"params"},"value":{"kind":"Variable","name":{"kind":"Name","value":"params"}}}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LoginResult"}},"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"tokens"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"refreshToken"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"accessToken"},"arguments":[],"directives":[]}]}},{"kind":"Field","name":{"kind":"Name","value":"user"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"userFields"},"directives":[]}]}}]}}]}}]}},...UserFieldsFragmentDoc.definitions]};
export const LogoutDocument: DocumentNode<LogoutMutation, LogoutMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"logout"},"variableDefinitions":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"logout"},"arguments":[],"directives":[]}]}}]};
export const RefreshTokensDocument: DocumentNode<RefreshTokensMutation, RefreshTokensMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"refreshTokens"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"accessToken"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"refreshToken"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"refreshTokens"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"accessToken"},"value":{"kind":"Variable","name":{"kind":"Name","value":"accessToken"}}},{"kind":"Argument","name":{"kind":"Name","value":"refreshToken"},"value":{"kind":"Variable","name":{"kind":"Name","value":"refreshToken"}}}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"tokens"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"refreshToken"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"accessToken"},"arguments":[],"directives":[]}]}}]}}]}}]};
export const ResetPasswordDocument: DocumentNode<ResetPasswordMutation, ResetPasswordMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"resetPassword"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"token"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"newPassword"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"resetPassword"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"token"},"value":{"kind":"Variable","name":{"kind":"Name","value":"token"}}},{"kind":"Argument","name":{"kind":"Name","value":"newPassword"},"value":{"kind":"Variable","name":{"kind":"Name","value":"newPassword"}}}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"tokens"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"refreshToken"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"accessToken"},"arguments":[],"directives":[]}]}}]}}]}}]};
export const SendResetPasswordEmailDocument: DocumentNode<SendResetPasswordEmailMutation, SendResetPasswordEmailMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"sendResetPasswordEmail"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"email"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sendResetPasswordEmail"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"email"},"value":{"kind":"Variable","name":{"kind":"Name","value":"email"}}}],"directives":[]}]}}]};
export const SendVerificationEmailDocument: DocumentNode<SendVerificationEmailMutation, SendVerificationEmailMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"sendVerificationEmail"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"email"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sendVerificationEmail"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"email"},"value":{"kind":"Variable","name":{"kind":"Name","value":"email"}}}],"directives":[]}]}}]};
export const TwoFactorSetDocument: DocumentNode<TwoFactorSetMutation, TwoFactorSetMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"twoFactorSet"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"secret"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"TwoFactorSecretKeyInput"}}},"directives":[]},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"code"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"twoFactorSet"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"secret"},"value":{"kind":"Variable","name":{"kind":"Name","value":"secret"}}},{"kind":"Argument","name":{"kind":"Name","value":"code"},"value":{"kind":"Variable","name":{"kind":"Name","value":"code"}}}],"directives":[]}]}}]};
export const TwoFactorUnsetDocument: DocumentNode<TwoFactorUnsetMutation, TwoFactorUnsetMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"twoFactorUnset"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"code"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"twoFactorUnset"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"code"},"value":{"kind":"Variable","name":{"kind":"Name","value":"code"}}}],"directives":[]}]}}]};
export const VerifyEmailDocument: DocumentNode<VerifyEmailMutation, VerifyEmailMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"verifyEmail"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"token"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"verifyEmail"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"token"},"value":{"kind":"Variable","name":{"kind":"Name","value":"token"}}}],"directives":[]}]}}]};
export const GetTwoFactorSecretDocument: DocumentNode<GetTwoFactorSecretQuery, GetTwoFactorSecretQueryVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"getTwoFactorSecret"},"variableDefinitions":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"twoFactorSecret"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"ascii"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"base32"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"hex"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"qr_code_ascii"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"qr_code_hex"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"qr_code_base32"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"google_auth_qr"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"otpauth_url"},"arguments":[],"directives":[]}]}}]}}]};
export const GetUserDocument: DocumentNode<GetUserQuery, GetUserQueryVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"getUser"},"variableDefinitions":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getUser"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"userFields"},"directives":[]}]}}]}},...UserFieldsFragmentDoc.definitions]};
export const UserFieldsFragmentDoc: DocumentNode = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"userFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"emails"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"address"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"verified"},"arguments":[],"directives":[]}]}},{"kind":"Field","name":{"kind":"Name","value":"username"},"arguments":[],"directives":[]}]}}]};
export const AddEmailDocument: TypedDocumentNode<AddEmailMutation, AddEmailMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"addEmail"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"newEmail"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"addEmail"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"newEmail"},"value":{"kind":"Variable","name":{"kind":"Name","value":"newEmail"}}}],"directives":[]}]}}]};
export const AuthenticateWithServiceDocument: TypedDocumentNode<AuthenticateWithServiceMutation, AuthenticateWithServiceMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"authenticateWithService"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"serviceName"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"params"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"AuthenticateParamsInput"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"verifyAuthentication"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"serviceName"},"value":{"kind":"Variable","name":{"kind":"Name","value":"serviceName"}}},{"kind":"Argument","name":{"kind":"Name","value":"params"},"value":{"kind":"Variable","name":{"kind":"Name","value":"params"}}}],"directives":[]}]}}]};
export const ChangePasswordDocument: TypedDocumentNode<ChangePasswordMutation, ChangePasswordMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"changePassword"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"oldPassword"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"newPassword"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"changePassword"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"oldPassword"},"value":{"kind":"Variable","name":{"kind":"Name","value":"oldPassword"}}},{"kind":"Argument","name":{"kind":"Name","value":"newPassword"},"value":{"kind":"Variable","name":{"kind":"Name","value":"newPassword"}}}],"directives":[]}]}}]};
export const CreateUserDocument: TypedDocumentNode<CreateUserMutation, CreateUserMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"createUser"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"user"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateUserInput"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createUser"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"user"},"value":{"kind":"Variable","name":{"kind":"Name","value":"user"}}}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"userId"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"loginResult"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"tokens"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"refreshToken"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"accessToken"},"arguments":[],"directives":[]}]}},{"kind":"Field","name":{"kind":"Name","value":"user"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"userFields"},"directives":[]}]}}]}}]}}]}},...UserFieldsFragmentDoc.definitions]};
export const ImpersonateDocument: TypedDocumentNode<ImpersonateMutation, ImpersonateMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"impersonate"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"accessToken"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"impersonated"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ImpersonationUserIdentityInput"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"impersonate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"accessToken"},"value":{"kind":"Variable","name":{"kind":"Name","value":"accessToken"}}},{"kind":"Argument","name":{"kind":"Name","value":"impersonated"},"value":{"kind":"Variable","name":{"kind":"Name","value":"impersonated"}}}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"authorized"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"tokens"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"refreshToken"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"accessToken"},"arguments":[],"directives":[]}]}},{"kind":"Field","name":{"kind":"Name","value":"user"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"userFields"},"directives":[]}]}}]}}]}},...UserFieldsFragmentDoc.definitions]};
export const AuthenticateDocument: TypedDocumentNode<AuthenticateMutation, AuthenticateMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"authenticate"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"serviceName"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"params"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"AuthenticateParamsInput"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"authenticate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"serviceName"},"value":{"kind":"Variable","name":{"kind":"Name","value":"serviceName"}}},{"kind":"Argument","name":{"kind":"Name","value":"params"},"value":{"kind":"Variable","name":{"kind":"Name","value":"params"}}}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"tokens"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"refreshToken"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"accessToken"},"arguments":[],"directives":[]}]}},{"kind":"Field","name":{"kind":"Name","value":"user"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"userFields"},"directives":[]}]}}]}}]}},...UserFieldsFragmentDoc.definitions]};
export const LogoutDocument: TypedDocumentNode<LogoutMutation, LogoutMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"logout"},"variableDefinitions":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"logout"},"arguments":[],"directives":[]}]}}]};
export const RefreshTokensDocument: TypedDocumentNode<RefreshTokensMutation, RefreshTokensMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"refreshTokens"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"accessToken"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"refreshToken"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"refreshTokens"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"accessToken"},"value":{"kind":"Variable","name":{"kind":"Name","value":"accessToken"}}},{"kind":"Argument","name":{"kind":"Name","value":"refreshToken"},"value":{"kind":"Variable","name":{"kind":"Name","value":"refreshToken"}}}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"tokens"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"refreshToken"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"accessToken"},"arguments":[],"directives":[]}]}}]}}]}}]};
export const ResetPasswordDocument: TypedDocumentNode<ResetPasswordMutation, ResetPasswordMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"resetPassword"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"token"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"newPassword"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"resetPassword"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"token"},"value":{"kind":"Variable","name":{"kind":"Name","value":"token"}}},{"kind":"Argument","name":{"kind":"Name","value":"newPassword"},"value":{"kind":"Variable","name":{"kind":"Name","value":"newPassword"}}}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"tokens"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"refreshToken"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"accessToken"},"arguments":[],"directives":[]}]}}]}}]}}]};
export const SendResetPasswordEmailDocument: TypedDocumentNode<SendResetPasswordEmailMutation, SendResetPasswordEmailMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"sendResetPasswordEmail"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"email"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sendResetPasswordEmail"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"email"},"value":{"kind":"Variable","name":{"kind":"Name","value":"email"}}}],"directives":[]}]}}]};
export const SendVerificationEmailDocument: TypedDocumentNode<SendVerificationEmailMutation, SendVerificationEmailMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"sendVerificationEmail"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"email"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sendVerificationEmail"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"email"},"value":{"kind":"Variable","name":{"kind":"Name","value":"email"}}}],"directives":[]}]}}]};
export const TwoFactorSetDocument: TypedDocumentNode<TwoFactorSetMutation, TwoFactorSetMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"twoFactorSet"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"secret"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"TwoFactorSecretKeyInput"}}},"directives":[]},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"code"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"twoFactorSet"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"secret"},"value":{"kind":"Variable","name":{"kind":"Name","value":"secret"}}},{"kind":"Argument","name":{"kind":"Name","value":"code"},"value":{"kind":"Variable","name":{"kind":"Name","value":"code"}}}],"directives":[]}]}}]};
export const TwoFactorUnsetDocument: TypedDocumentNode<TwoFactorUnsetMutation, TwoFactorUnsetMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"twoFactorUnset"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"code"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"twoFactorUnset"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"code"},"value":{"kind":"Variable","name":{"kind":"Name","value":"code"}}}],"directives":[]}]}}]};
export const VerifyEmailDocument: TypedDocumentNode<VerifyEmailMutation, VerifyEmailMutationVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"verifyEmail"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"token"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"verifyEmail"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"token"},"value":{"kind":"Variable","name":{"kind":"Name","value":"token"}}}],"directives":[]}]}}]};
export const GetTwoFactorSecretDocument: TypedDocumentNode<GetTwoFactorSecretQuery, GetTwoFactorSecretQueryVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"getTwoFactorSecret"},"variableDefinitions":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"twoFactorSecret"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"ascii"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"base32"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"hex"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"qr_code_ascii"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"qr_code_hex"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"qr_code_base32"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"google_auth_qr"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"otpauth_url"},"arguments":[],"directives":[]}]}}]}}]};
export const GetUserDocument: TypedDocumentNode<GetUserQuery, GetUserQueryVariables> = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"getUser"},"variableDefinitions":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getUser"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"userFields"},"directives":[]}]}}]}},...UserFieldsFragmentDoc.definitions]};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc