@accounts/graphql-client
Advanced tools
Comparing version 0.26.0-alpha.4 to 0.26.0
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'; | ||
export interface AuthenticateParams { | ||
@@ -9,4 +9,2 @@ [key: string]: string | object; | ||
userFieldsFragment?: any; | ||
challengeFieldsFragment?: string; | ||
associateFieldsFragment?: string; | ||
} | ||
@@ -68,13 +66,4 @@ export default class GraphQLClient implements TransportInterface { | ||
changePassword(oldPassword: string, newPassword: string): Promise<void>; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
getTwoFactorSecret(): Promise<any>; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
twoFactorSet(secret: any, code: string): Promise<void>; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
twoFactorUnset(code: string): Promise<void>; | ||
@@ -87,24 +76,4 @@ /** | ||
}): Promise<ImpersonationResult>; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
mfaAssociate(type: string): Promise<void>; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
mfaAssociateByMfaToken(mfaToken: string, type: string): Promise<any>; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
authenticators(): Promise<Authenticator[]>; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
authenticatorsByMfaToken(mfaToken?: string): Promise<Authenticator[]>; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
mfaChallenge(mfaToken: string, authenticatorId: string): Promise<any>; | ||
private mutate; | ||
private query; | ||
} |
@@ -22,7 +22,2 @@ "use strict"; | ||
var verify_email_mutation_1 = require("./graphql/verify-email.mutation"); | ||
var authenticators_query_1 = require("./graphql/accounts-mfa/authenticators.query"); | ||
var authenticatorsByMfaToken_query_1 = require("./graphql/accounts-mfa/authenticatorsByMfaToken.query"); | ||
var challenge_mutation_1 = require("./graphql/accounts-mfa/challenge.mutation"); | ||
var associate_mutation_1 = require("./graphql/accounts-mfa/associate.mutation"); | ||
var associateByMfaToken_mutation_1 = require("./graphql/accounts-mfa/associateByMfaToken.mutation"); | ||
var GraphQLErrorList_1 = require("./GraphQLErrorList"); | ||
@@ -162,5 +157,2 @@ var GraphQLClient = /** @class */ (function () { | ||
}; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
GraphQLClient.prototype.getTwoFactorSecret = function () { | ||
@@ -173,5 +165,2 @@ return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
}; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
GraphQLClient.prototype.twoFactorSet = function (secret, code) { | ||
@@ -184,5 +173,2 @@ return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
}; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
GraphQLClient.prototype.twoFactorUnset = function (code) { | ||
@@ -208,60 +194,2 @@ return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
}; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
GraphQLClient.prototype.mfaAssociate = function (type) { | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
return tslib_1.__generator(this, function (_a) { | ||
return [2 /*return*/, this.mutate(associate_mutation_1.associateMutation(this.options.associateFieldsFragment), 'associate', { | ||
type: type, | ||
})]; | ||
}); | ||
}); | ||
}; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
GraphQLClient.prototype.mfaAssociateByMfaToken = function (mfaToken, type) { | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
return tslib_1.__generator(this, function (_a) { | ||
return [2 /*return*/, this.mutate(associateByMfaToken_mutation_1.associateByMfaTokenMutation(this.options.associateFieldsFragment), 'associateByMfaToken', { | ||
mfaToken: mfaToken, | ||
type: type, | ||
})]; | ||
}); | ||
}); | ||
}; | ||
/** | ||
* @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(authenticators_query_1.authenticatorsQuery, '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(authenticatorsByMfaToken_query_1.authenticatorsByMfaTokenQuery, '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(challenge_mutation_1.challengeMutation(this.options.challengeFieldsFragment), 'challenge', { | ||
mfaToken: mfaToken, | ||
authenticatorId: authenticatorId, | ||
})]; | ||
}); | ||
}); | ||
}; | ||
GraphQLClient.prototype.mutate = function (mutation, resultField, variables) { | ||
@@ -268,0 +196,0 @@ if (variables === void 0) { variables = {}; } |
@@ -1,1 +0,1 @@ | ||
export declare const addEmailMutation: any; | ||
export declare const addEmailMutation: import("graphql").DocumentNode; |
@@ -1,1 +0,1 @@ | ||
export declare const authenticateWithServiceMutation: any; | ||
export declare const authenticateWithServiceMutation: import("graphql").DocumentNode; |
@@ -1,1 +0,1 @@ | ||
export declare const changePasswordMutation: any; | ||
export declare const changePasswordMutation: import("graphql").DocumentNode; |
@@ -1,1 +0,1 @@ | ||
export declare const createUserMutation: (userFieldsFragment: any) => any; | ||
export declare const createUserMutation: (userFieldsFragment: any) => import("graphql").DocumentNode; |
@@ -1,1 +0,1 @@ | ||
export declare const getTwoFactorSecretQuery: any; | ||
export declare const getTwoFactorSecretQuery: import("graphql").DocumentNode; |
@@ -1,1 +0,1 @@ | ||
export declare const getUserQuery: (userFieldsFragment: any) => any; | ||
export declare const getUserQuery: (userFieldsFragment: any) => import("graphql").DocumentNode; |
@@ -1,1 +0,1 @@ | ||
export declare const impersonateMutation: (userFieldsFragment: any) => any; | ||
export declare const impersonateMutation: (userFieldsFragment: any) => import("graphql").DocumentNode; |
@@ -1,1 +0,1 @@ | ||
export declare const loginWithServiceMutation: (userFieldsFragment: any) => any; | ||
export declare const loginWithServiceMutation: (userFieldsFragment: any) => import("graphql").DocumentNode; |
@@ -1,1 +0,1 @@ | ||
export declare const logoutMutation: any; | ||
export declare const logoutMutation: import("graphql").DocumentNode; |
@@ -1,1 +0,1 @@ | ||
export declare const refreshTokensMutation: any; | ||
export declare const refreshTokensMutation: import("graphql").DocumentNode; |
@@ -1,1 +0,1 @@ | ||
export declare const resetPasswordMutation: any; | ||
export declare const resetPasswordMutation: import("graphql").DocumentNode; |
@@ -1,1 +0,1 @@ | ||
export declare const sendResetPasswordEmailMutation: any; | ||
export declare const sendResetPasswordEmailMutation: import("graphql").DocumentNode; |
@@ -1,1 +0,1 @@ | ||
export declare const sendVerificationEmailMutation: any; | ||
export declare const sendVerificationEmailMutation: import("graphql").DocumentNode; |
@@ -1,1 +0,1 @@ | ||
export declare const twoFactorSetMutation: any; | ||
export declare const twoFactorSetMutation: import("graphql").DocumentNode; |
@@ -1,1 +0,1 @@ | ||
export declare const twoFactorUnsetMutation: any; | ||
export declare const twoFactorUnsetMutation: import("graphql").DocumentNode; |
@@ -1,1 +0,1 @@ | ||
export declare const verifyEmailMutation: any; | ||
export declare const verifyEmailMutation: import("graphql").DocumentNode; |
{ | ||
"name": "@accounts/graphql-client", | ||
"version": "0.26.0-alpha.4", | ||
"version": "0.26.0", | ||
"description": "GraphQL client transport for accounts", | ||
@@ -28,11 +28,11 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@types/jest": "25.1.4", | ||
"jest": "25.1.0", | ||
"@types/jest": "25.2.1", | ||
"jest": "26.0.1", | ||
"lodash": "4.17.15" | ||
}, | ||
"dependencies": { | ||
"@accounts/client": "^0.26.0-alpha.4", | ||
"@accounts/types": "^0.26.0-alpha.4", | ||
"@accounts/client": "^0.26.0", | ||
"@accounts/types": "^0.26.0", | ||
"graphql-tag": "^2.10.0", | ||
"tslib": "1.10.0" | ||
"tslib": "1.11.2" | ||
}, | ||
@@ -42,3 +42,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "df64531622ef97718abfe5ed5436873ddf58d164" | ||
"gitHead": "403bd2ea58bc1116c061c5dc1b6e203e20ce2f1b" | ||
} |
Sorry, the diff of this file is not supported yet
41657
60
509
- Removedtslib@1.10.0(transitive)
Updated@accounts/client@^0.26.0
Updated@accounts/types@^0.26.0
Updatedtslib@1.11.2