@accounts/graphql-client
Advanced tools
Comparing version 0.27.0 to 0.28.0-alpha.0
import { AccountsClient, TransportInterface } from '@accounts/client'; | ||
import { CreateUser, ImpersonationResult, LoginResult, User, CreateUserResult } from '@accounts/types'; | ||
import { CreateUser, ImpersonationResult, LoginResult, User, CreateUserResult, Authenticator } from '@accounts/types'; | ||
export interface AuthenticateParams { | ||
@@ -9,2 +9,4 @@ [key: string]: string | object; | ||
userFieldsFragment?: any; | ||
challengeFieldsFragment?: string; | ||
associateFieldsFragment?: string; | ||
} | ||
@@ -66,4 +68,13 @@ 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>; | ||
@@ -76,4 +87,24 @@ /** | ||
}): 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; | ||
} |
@@ -22,2 +22,7 @@ "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"); | ||
@@ -157,2 +162,5 @@ var GraphQLClient = /** @class */ (function () { | ||
}; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
GraphQLClient.prototype.getTwoFactorSecret = function () { | ||
@@ -165,2 +173,5 @@ return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
}; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
GraphQLClient.prototype.twoFactorSet = function (secret, code) { | ||
@@ -173,2 +184,5 @@ return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
}; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
GraphQLClient.prototype.twoFactorUnset = function (code) { | ||
@@ -194,2 +208,62 @@ return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
}; | ||
/** | ||
* @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(associate_mutation_1.associateMutation(this.options.associateFieldsFragment), '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(associateByMfaToken_mutation_1.associateByMfaTokenMutation(this.options.associateFieldsFragment), '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(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) { | ||
@@ -196,0 +270,0 @@ if (variables === void 0) { variables = {}; } |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.addEmailMutation = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -4,0 +5,0 @@ var graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag")); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.authenticateWithServiceMutation = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -4,0 +5,0 @@ var graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag")); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.changePasswordMutation = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -4,0 +5,0 @@ var graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag")); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createUserMutation = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -4,0 +5,0 @@ var graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag")); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getTwoFactorSecretQuery = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -4,0 +5,0 @@ var graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag")); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getUserQuery = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -4,0 +5,0 @@ var graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag")); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.impersonateMutation = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -4,0 +5,0 @@ var graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag")); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.loginWithServiceMutation = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -4,0 +5,0 @@ var graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag")); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.logoutMutation = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -4,0 +5,0 @@ var graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag")); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.refreshTokensMutation = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -4,0 +5,0 @@ var graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag")); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.resetPasswordMutation = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -4,0 +5,0 @@ var graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag")); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.sendResetPasswordEmailMutation = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -4,0 +5,0 @@ var graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag")); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.sendVerificationEmailMutation = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -4,0 +5,0 @@ var graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag")); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.twoFactorSetMutation = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -4,0 +5,0 @@ var graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag")); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.twoFactorUnsetMutation = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -4,0 +5,0 @@ var graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag")); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.verifyEmailMutation = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -4,0 +5,0 @@ var graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag")); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.GraphQLErrorList = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -4,0 +5,0 @@ var GraphQLErrorList = /** @class */ (function (_super) { |
@@ -6,5 +6,5 @@ "use strict"; | ||
var graphql_client_1 = require("./graphql-client"); | ||
exports.AccountsGraphQLClient = graphql_client_1.default; | ||
exports.default = graphql_client_1.default; | ||
Object.defineProperty(exports, "AccountsGraphQLClient", { enumerable: true, get: function () { return graphql_client_1.default; } }); | ||
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return graphql_client_1.default; } }); | ||
tslib_1.__exportStar(require("./GraphQLErrorList"), exports); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@accounts/graphql-client", | ||
"version": "0.27.0", | ||
"version": "0.28.0-alpha.0", | ||
"description": "GraphQL client transport for accounts", | ||
@@ -33,6 +33,6 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@accounts/client": "^0.27.0", | ||
"@accounts/types": "^0.27.0", | ||
"@accounts/client": "^0.28.0-alpha.0", | ||
"@accounts/types": "^0.28.0-alpha.0", | ||
"graphql-tag": "^2.10.0", | ||
"tslib": "1.11.2" | ||
"tslib": "2.0.0" | ||
}, | ||
@@ -42,3 +42,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "3f2f184f7d1f4229bfefb4ed99283de05a60d985" | ||
"gitHead": "9d3a051504a7c8a1698fd3c9cd8b1dbb11fcd906" | ||
} |
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
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
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
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
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
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
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53403
75
679
+ Added@accounts/client@0.28.0(transitive)
+ Added@accounts/types@0.28.0(transitive)
+ Addedtslib@2.0.0(transitive)
- Removed@accounts/client@0.27.0(transitive)
- Removed@accounts/types@0.27.0(transitive)
- Removedtslib@1.11.2(transitive)
Updatedtslib@2.0.0