@accounts/graphql-client
Advanced tools
Comparing version 0.3.0-beta.25 to 0.3.0-beta.26
@@ -26,7 +26,7 @@ import { TransportInterface, AccountsClient } from '@accounts/client'; | ||
loginWithService(service: string, authenticateParams: IAuthenticateParams): Promise<LoginResult>; | ||
getUser(accessToken: string): Promise<User>; | ||
getUser(): Promise<User>; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
logout(accessToken: string): Promise<void>; | ||
logout(): Promise<void>; | ||
/** | ||
@@ -33,0 +33,0 @@ * @inheritDoc |
@@ -83,6 +83,6 @@ "use strict"; | ||
}; | ||
GraphQLClient.prototype.getUser = function (accessToken) { | ||
GraphQLClient.prototype.getUser = function () { | ||
return __awaiter(this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
return [2 /*return*/, this.query(get_user_query_1.getUserQuery, 'getUser', { accessToken: accessToken })]; | ||
return [2 /*return*/, this.query(get_user_query_1.getUserQuery, 'getUser')]; | ||
}); | ||
@@ -94,6 +94,6 @@ }); | ||
*/ | ||
GraphQLClient.prototype.logout = function (accessToken) { | ||
GraphQLClient.prototype.logout = function () { | ||
return __awaiter(this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
return [2 /*return*/, this.mutate(logout_mutation_1.logoutMutation, 'logout', { accessToken: accessToken })]; | ||
return [2 /*return*/, this.mutate(logout_mutation_1.logoutMutation, 'logout')]; | ||
}); | ||
@@ -197,2 +197,3 @@ }); | ||
GraphQLClient.prototype.mutate = function (mutation, resultField, variables) { | ||
if (variables === void 0) { variables = {}; } | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -238,2 +239,3 @@ var tokens, _a, data, e_1; | ||
GraphQLClient.prototype.query = function (query, resultField, variables) { | ||
if (variables === void 0) { variables = {}; } | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -240,0 +242,0 @@ var tokens, data, e_2; |
@@ -8,4 +8,4 @@ "use strict"; | ||
var graphql_tag_1 = require("graphql-tag"); | ||
exports.getUserQuery = graphql_tag_1.default(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n query($accessToken: String!) {\n getUser(accessToken: $accessToken) {\n id\n emails {\n address\n verified\n }\n username\n }\n }\n"], ["\n query($accessToken: String!) {\n getUser(accessToken: $accessToken) {\n id\n emails {\n address\n verified\n }\n username\n }\n }\n"]))); | ||
exports.getUserQuery = graphql_tag_1.default(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n query {\n getUser {\n id\n emails {\n address\n verified\n }\n username\n }\n }\n"], ["\n query {\n getUser {\n id\n emails {\n address\n verified\n }\n username\n }\n }\n"]))); | ||
var templateObject_1; | ||
//# sourceMappingURL=get-user.query.js.map |
@@ -8,4 +8,4 @@ "use strict"; | ||
var graphql_tag_1 = require("graphql-tag"); | ||
exports.logoutMutation = graphql_tag_1.default(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n mutation logout($accessToken: String!) {\n logout(accessToken: $accessToken)\n }\n"], ["\n mutation logout($accessToken: String!) {\n logout(accessToken: $accessToken)\n }\n"]))); | ||
exports.logoutMutation = graphql_tag_1.default(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n mutation logout {\n logout\n }\n"], ["\n mutation logout {\n logout\n }\n"]))); | ||
var templateObject_1; | ||
//# sourceMappingURL=logout.mutation.js.map |
{ | ||
"name": "@accounts/graphql-client", | ||
"version": "0.3.0-beta.25", | ||
"version": "0.3.0-beta.26", | ||
"description": "GraphQL client transport for accounts", | ||
@@ -40,6 +40,6 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@accounts/client": "^0.3.0-beta.25", | ||
"@accounts/types": "^0.3.0-beta.25", | ||
"@accounts/client": "^0.3.0-beta.26", | ||
"@accounts/types": "^0.3.0-beta.26", | ||
"graphql-tag": "^1.1.2" | ||
} | ||
} |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
36404