@accounts/graphql-client
Advanced tools
Comparing version 0.1.1-alpha.25a9dd2d to 0.1.1-alpha.f5a64250
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babel-runtime/helpers/taggedTemplateLiteral"),require("graphql-tag"),require("babel-runtime/core-js/object/define-property"),require("babel-runtime/core-js/object/keys"),require("babel-runtime/core-js/object/assign"),require("babel-runtime/helpers/asyncToGenerator"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/createClass"),require("babel-runtime/regenerator")):"function"==typeof define&&define.amd?define(["babel-runtime/helpers/taggedTemplateLiteral","graphql-tag","babel-runtime/core-js/object/define-property","babel-runtime/core-js/object/keys","babel-runtime/core-js/object/assign","babel-runtime/helpers/asyncToGenerator","babel-runtime/helpers/classCallCheck","babel-runtime/helpers/createClass","babel-runtime/regenerator"],t):"object"==typeof exports?exports["@accounts/graphql-api"]=t(require("babel-runtime/helpers/taggedTemplateLiteral"),require("graphql-tag"),require("babel-runtime/core-js/object/define-property"),require("babel-runtime/core-js/object/keys"),require("babel-runtime/core-js/object/assign"),require("babel-runtime/helpers/asyncToGenerator"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/createClass"),require("babel-runtime/regenerator")):e["@accounts/graphql-api"]=t(e["babel-runtime/helpers/taggedTemplateLiteral"],e["graphql-tag"],e["babel-runtime/core-js/object/define-property"],e["babel-runtime/core-js/object/keys"],e["babel-runtime/core-js/object/assign"],e["babel-runtime/helpers/asyncToGenerator"],e["babel-runtime/helpers/classCallCheck"],e["babel-runtime/helpers/createClass"],e["babel-runtime/regenerator"])}(this,function(e,t,n,r,a,u,s,i,o){return function(e){function t(r){if(n[r])return n[r].exports;var a=n[r]={exports:{},id:r,loaded:!1};return e[r].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var a=n(4),u=r(a),s=n(5),i=r(s);Object.defineProperty(t,"__esModule",{value:!0});var o=n(6);(0,i.default)(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,u.default)(t,e,{enumerable:!0,get:function(){return o[e]}})})},function(e,t){e.exports=require("babel-runtime/helpers/taggedTemplateLiteral")},function(e,t){e.exports=require("graphql-tag")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.loginFieldsFragment=void 0;var a=n(1),u=r(a),s=(0,u.default)(["\n fragment LoginFields on LoginReturn {\n tokens {\n refreshToken\n accessToken\n }\n }\n "],["\n fragment LoginFields on LoginReturn {\n tokens {\n refreshToken\n accessToken\n }\n }\n "]),i=n(2),o=r(i);t.loginFieldsFragment=(0,o.default)(s)},function(e,t){e.exports=require("babel-runtime/core-js/object/define-property")},function(e,t){e.exports=require("babel-runtime/core-js/object/keys")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLClient=void 0;var a=n(22),u=r(a),s=n(19),i=r(s),o=n(1),l=r(o),c=n(18),f=r(c),d=n(20),p=r(d),m=n(21),h=r(m),b=(0,l.default)(["",""],["",""]),g=n(2),v=r(g),k=n(9),_=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((0,p.default)(this,e),this.options=(0,f.default)({graphQLClient:null,userFieldsFragment:k.defaultUserFieldsFragment},t),this.options.userFieldsFragment=(0,v.default)(b,this.options.userFieldsFragment),!this.options.graphQLClient||!this.options.graphQLClient.query||!this.options.graphQLClient.mutate)throw new Error("Invalid GraphQL client provided: missing 'query' and 'mutate' methods!")}return(0,h.default)(e,[{key:"mutate",value:function(){function e(e,n,r){return t.apply(this,arguments)}var t=(0,i.default)(u.default.mark(function e(t,n,r){return u.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.options.graphQLClient.mutate({mutation:t,variables:r}).then(function(e){var t=e.data;return t[n]}).catch(function(e){throw new Error(e.message)});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return e}()},{key:"query",value:function(){function e(e,n,r){return t.apply(this,arguments)}var t=(0,i.default)(u.default.mark(function e(t,n,r){return u.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.options.graphQLClient.query({query:t,variables:r}).then(function(e){var t=e.data;return t[n]}).catch(function(e){throw new Error(e.message)});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return e}()},{key:"loginWithPassword",value:function(){function e(e,n){return t.apply(this,arguments)}var t=(0,i.default)(u.default.mark(function e(t,n){var r;return u.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=(0,k.createLoginMutation)(this.options.userFieldsFragment),e.next=3,this.mutate(r,"loginWithPassword",{user:t,password:n});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e,this)}));return e}()},{key:"impersonate",value:function(){function e(e,n){return t.apply(this,arguments)}var t=(0,i.default)(u.default.mark(function e(t,n){var r;return u.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=(0,k.createImpersonateMutation)(this.options.userFieldsFragment),e.next=3,this.mutate(r,"impersonate",{accessToken:t,username:n});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e,this)}));return e}()},{key:"createUser",value:function(){function e(e){return t.apply(this,arguments)}var t=(0,i.default)(u.default.mark(function e(t){return u.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mutate(k.createUserMutation,"createUser",{user:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return e}()},{key:"refreshTokens",value:function(){function e(e,n){return t.apply(this,arguments)}var t=(0,i.default)(u.default.mark(function e(t,n){var r;return u.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=(0,k.createRefreshTokenMutation)(this.options.userFieldsFragment),e.next=3,this.mutate(r,"refreshTokens",{accessToken:t,refreshToken:n});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e,this)}));return e}()},{key:"logout",value:function(){function e(e){return t.apply(this,arguments)}var t=(0,i.default)(u.default.mark(function e(t){return u.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mutate(k.logoutMutation,"logout",{accessToken:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return e}()},{key:"verifyEmail",value:function(){function e(e){return t.apply(this,arguments)}var t=(0,i.default)(u.default.mark(function e(t){return u.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mutate(k.verifyEmailMutation,"verifyEmail",{token:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return e}()},{key:"resetPassword",value:function(){function e(e,n){return t.apply(this,arguments)}var t=(0,i.default)(u.default.mark(function e(t,n){return u.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mutate(k.resetPasswordMutation,"resetPassword",{token:t,newPassword:n});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return e}()},{key:"sendVerificationEmail",value:function(){function e(e){return t.apply(this,arguments)}var t=(0,i.default)(u.default.mark(function e(t){return u.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mutate(k.sendVerificationEmailMutation,"sendVerificationEmail",{email:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return e}()},{key:"sendResetPasswordEmail",value:function(){function e(e){return t.apply(this,arguments)}var t=(0,i.default)(u.default.mark(function e(t){return u.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mutate(k.sendResetPasswordEmailMutation,"sendResetPasswordEmail",{email:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return e}()}]),e}();t.GraphQLClient=_},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.createUserMutation=void 0;var a=n(1),u=r(a),s=(0,u.default)([" \n mutation($user: CreateUserInput!) {\n createUser(user: $user)\n }\n"],[" \n mutation($user: CreateUserInput!) {\n createUser(user: $user)\n }\n"]),i=n(2),o=r(i);t.createUserMutation=(0,o.default)(s)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.createImpersonateMutation=void 0;var a=n(1),u=r(a),s=(0,u.default)(["\n mutation($accessToken: String! $username: String!) {\n impersonate(accessToken: $accessToken, username: $username) {\n authorized\n ...LoginFields\n user {\n id\n ...UserFields\n }\n }\n }\n \n ","\n ","\n"],["\n mutation($accessToken: String! $username: String!) {\n impersonate(accessToken: $accessToken, username: $username) {\n authorized\n ...LoginFields\n user {\n id\n ...UserFields\n }\n }\n }\n \n ","\n ","\n"]),i=n(2),o=r(i),l=n(3);t.createImpersonateMutation=function(e){return(0,o.default)(s,e,l.loginFieldsFragment)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var a=n(4),u=r(a),s=n(5),i=r(s);Object.defineProperty(t,"__esModule",{value:!0});var o=n(10);(0,i.default)(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,u.default)(t,e,{enumerable:!0,get:function(){return o[e]}})});var l=n(12);(0,i.default)(l).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,u.default)(t,e,{enumerable:!0,get:function(){return l[e]}})});var c=n(7);(0,i.default)(c).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,u.default)(t,e,{enumerable:!0,get:function(){return c[e]}})});var f=n(11);(0,i.default)(f).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,u.default)(t,e,{enumerable:!0,get:function(){return f[e]}})});var d=n(17);(0,i.default)(d).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,u.default)(t,e,{enumerable:!0,get:function(){return d[e]}})});var p=n(13);(0,i.default)(p).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,u.default)(t,e,{enumerable:!0,get:function(){return p[e]}})});var m=n(15);(0,i.default)(m).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,u.default)(t,e,{enumerable:!0,get:function(){return m[e]}})});var h=n(14);(0,i.default)(h).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,u.default)(t,e,{enumerable:!0,get:function(){return h[e]}})});var b=n(16);(0,i.default)(b).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,u.default)(t,e,{enumerable:!0,get:function(){return b[e]}})});var g=n(8);(0,i.default)(g).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,u.default)(t,e,{enumerable:!0,get:function(){return g[e]}})})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.createLoginMutation=void 0;var a=n(1),u=r(a),s=(0,u.default)(["\n mutation($user: UserInput!, $password: String!) {\n loginWithPassword(user: $user, password: $password) {\n sessionId\n ...LoginFields\n user {\n id\n ...UserFields\n }\n }\n }\n \n ","\n ","\n"],["\n mutation($user: UserInput!, $password: String!) {\n loginWithPassword(user: $user, password: $password) {\n sessionId\n ...LoginFields\n user {\n id\n ...UserFields\n }\n }\n }\n \n ","\n ","\n"]),i=n(2),o=r(i),l=n(3);t.createLoginMutation=function(e){return(0,o.default)(s,e,l.loginFieldsFragment)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.logoutMutation=void 0;var a=n(1),u=r(a),s=(0,u.default)(["\n mutation logout($accessToken: String!) {\n logout(accessToken: $accessToken)\n }\n"],["\n mutation logout($accessToken: String!) {\n logout(accessToken: $accessToken)\n }\n"]),i=n(2),o=r(i);t.logoutMutation=(0,o.default)(s)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.createRefreshTokenMutation=void 0;var a=n(1),u=r(a),s=(0,u.default)(["\n mutation($accessToken: String!, $refreshToken: String!) {\n refreshTokens(accessToken: $accessToken, refreshToken: $refreshToken) {\n ...LoginFields\n user {\n id\n ...UserFields\n }\n }\n }\n\n ","\n ","\n"],["\n mutation($accessToken: String!, $refreshToken: String!) {\n refreshTokens(accessToken: $accessToken, refreshToken: $refreshToken) {\n ...LoginFields\n user {\n id\n ...UserFields\n }\n }\n }\n\n ","\n ","\n"]),i=n(2),o=r(i),l=n(3);t.createRefreshTokenMutation=function(e){return(0,o.default)(s,e,l.loginFieldsFragment)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.resetPasswordMutation=void 0;var a=n(1),u=r(a),s=(0,u.default)(["\n mutation($token: String!, $password: PasswordInput!) {\n resetPassword(token: $token, password: $password)\n }\n"],["\n mutation($token: String!, $password: PasswordInput!) {\n resetPassword(token: $token, password: $password)\n }\n"]),i=n(2),o=r(i);t.resetPasswordMutation=(0,o.default)(s)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.sendResetPasswordEmailMutation=void 0;var a=n(1),u=r(a),s=(0,u.default)(["\n mutation($email: String!) {\n sendResetPasswordEmail(email: $email)\n }\n"],["\n mutation($email: String!) {\n sendResetPasswordEmail(email: $email)\n }\n"]),i=n(2),o=r(i);t.sendResetPasswordEmailMutation=(0,o.default)(s)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.sendVerificationEmailMutation=void 0;var a=n(1),u=r(a),s=(0,u.default)(["\n mutation($email: String!) {\n sendVerificationEmail(email: $email)\n }\n"],["\n mutation($email: String!) {\n sendVerificationEmail(email: $email)\n }\n"]),i=n(2),o=r(i);t.sendVerificationEmailMutation=(0,o.default)(s)},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.defaultUserFieldsFragment="\n fragment UserFields on User {\n email\n username\n }\n"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.verifyEmailMutation=void 0;var a=n(1),u=r(a),s=(0,u.default)(["\n mutation($token: String!) {\n verifyEmail(token: $token)\n }\n"],["\n mutation($token: String!) {\n verifyEmail(token: $token)\n }\n"]),i=n(2),o=r(i);t.verifyEmailMutation=(0,o.default)(s)},function(e,t){e.exports=require("babel-runtime/core-js/object/assign")},function(e,t){e.exports=require("babel-runtime/helpers/asyncToGenerator")},function(e,t){e.exports=require("babel-runtime/helpers/classCallCheck")},function(e,t){e.exports=require("babel-runtime/helpers/createClass")},function(e,t){e.exports=require("babel-runtime/regenerator")}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babel-runtime/helpers/taggedTemplateLiteral"),require("graphql-tag"),require("babel-runtime/core-js/object/define-property"),require("babel-runtime/core-js/object/keys"),require("babel-runtime/core-js/object/assign"),require("babel-runtime/helpers/asyncToGenerator"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/createClass"),require("babel-runtime/regenerator")):"function"==typeof define&&define.amd?define(["babel-runtime/helpers/taggedTemplateLiteral","graphql-tag","babel-runtime/core-js/object/define-property","babel-runtime/core-js/object/keys","babel-runtime/core-js/object/assign","babel-runtime/helpers/asyncToGenerator","babel-runtime/helpers/classCallCheck","babel-runtime/helpers/createClass","babel-runtime/regenerator"],t):"object"==typeof exports?exports["@accounts/graphql-api"]=t(require("babel-runtime/helpers/taggedTemplateLiteral"),require("graphql-tag"),require("babel-runtime/core-js/object/define-property"),require("babel-runtime/core-js/object/keys"),require("babel-runtime/core-js/object/assign"),require("babel-runtime/helpers/asyncToGenerator"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/createClass"),require("babel-runtime/regenerator")):e["@accounts/graphql-api"]=t(e["babel-runtime/helpers/taggedTemplateLiteral"],e["graphql-tag"],e["babel-runtime/core-js/object/define-property"],e["babel-runtime/core-js/object/keys"],e["babel-runtime/core-js/object/assign"],e["babel-runtime/helpers/asyncToGenerator"],e["babel-runtime/helpers/classCallCheck"],e["babel-runtime/helpers/createClass"],e["babel-runtime/regenerator"])}(this,function(e,t,n,r,u,a,s,i,o){return function(e){function t(r){if(n[r])return n[r].exports;var u=n[r]={exports:{},id:r,loaded:!1};return e[r].call(u.exports,u,u.exports,t),u.loaded=!0,u.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var u=n(4),a=r(u),s=n(5),i=r(s);Object.defineProperty(t,"__esModule",{value:!0});var o=n(6);(0,i.default)(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,a.default)(t,e,{enumerable:!0,get:function(){return o[e]}})})},function(e,t){e.exports=require("babel-runtime/helpers/taggedTemplateLiteral")},function(e,t){e.exports=require("graphql-tag")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.loginFieldsFragment=void 0;var u=n(1),a=r(u),s=(0,a.default)(["\n fragment LoginFields on LoginReturn {\n tokens {\n refreshToken\n accessToken\n }\n }\n "],["\n fragment LoginFields on LoginReturn {\n tokens {\n refreshToken\n accessToken\n }\n }\n "]),i=n(2),o=r(i);t.loginFieldsFragment=(0,o.default)(s)},function(e,t){e.exports=require("babel-runtime/core-js/object/define-property")},function(e,t){e.exports=require("babel-runtime/core-js/object/keys")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLClient=void 0;var u=n(22),a=r(u),s=n(19),i=r(s),o=n(1),l=r(o),c=n(18),f=r(c),d=n(20),p=r(d),m=n(21),h=r(m),b=(0,l.default)(["",""],["",""]),g=n(2),v=r(g),k=n(9),_=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((0,p.default)(this,e),this.options=(0,f.default)({graphQLClient:null,userFieldsFragment:k.defaultUserFieldsFragment},t),this.options.userFieldsFragment=(0,v.default)(b,this.options.userFieldsFragment),!this.options.graphQLClient||!this.options.graphQLClient.query||!this.options.graphQLClient.mutate)throw new Error("Invalid GraphQL client provided: missing 'query' and 'mutate' methods!")}return(0,h.default)(e,[{key:"mutate",value:function(){function e(e,n,r){return t.apply(this,arguments)}var t=(0,i.default)(a.default.mark(function e(t,n,r){return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.options.graphQLClient.mutate({mutation:t,variables:r}).then(function(e){var t=e.data;return t[n]}).catch(function(e){throw new Error(e.message)});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return e}()},{key:"query",value:function(){function e(e,n,r){return t.apply(this,arguments)}var t=(0,i.default)(a.default.mark(function e(t,n,r){return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.options.graphQLClient.query({query:t,variables:r}).then(function(e){var t=e.data;return t[n]}).catch(function(e){throw new Error(e.message)});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return e}()},{key:"loginWithPassword",value:function(){function e(e,n){return t.apply(this,arguments)}var t=(0,i.default)(a.default.mark(function e(t,n){var r;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=(0,k.createLoginMutation)(this.options.userFieldsFragment),e.next=3,this.mutate(r,"loginWithPassword",{user:t,password:n});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e,this)}));return e}()},{key:"impersonate",value:function(){function e(e,n){return t.apply(this,arguments)}var t=(0,i.default)(a.default.mark(function e(t,n){var r;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=(0,k.createImpersonateMutation)(this.options.userFieldsFragment),e.next=3,this.mutate(r,"impersonate",{accessToken:t,username:n});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e,this)}));return e}()},{key:"createUser",value:function(){function e(e){return t.apply(this,arguments)}var t=(0,i.default)(a.default.mark(function e(t){return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mutate(k.createUserMutation,"createUser",{user:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return e}()},{key:"refreshTokens",value:function(){function e(e,n){return t.apply(this,arguments)}var t=(0,i.default)(a.default.mark(function e(t,n){var r;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=(0,k.createRefreshTokenMutation)(this.options.userFieldsFragment),e.next=3,this.mutate(r,"refreshTokens",{accessToken:t,refreshToken:n});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e,this)}));return e}()},{key:"logout",value:function(){function e(e){return t.apply(this,arguments)}var t=(0,i.default)(a.default.mark(function e(t){return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mutate(k.logoutMutation,"logout",{accessToken:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return e}()},{key:"verifyEmail",value:function(){function e(e){return t.apply(this,arguments)}var t=(0,i.default)(a.default.mark(function e(t){return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mutate(k.verifyEmailMutation,"verifyEmail",{token:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return e}()},{key:"resetPassword",value:function(){function e(e,n){return t.apply(this,arguments)}var t=(0,i.default)(a.default.mark(function e(t,n){return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mutate(k.resetPasswordMutation,"resetPassword",{token:t,newPassword:n});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return e}()},{key:"sendVerificationEmail",value:function(){function e(e){return t.apply(this,arguments)}var t=(0,i.default)(a.default.mark(function e(t){return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mutate(k.sendVerificationEmailMutation,"sendVerificationEmail",{email:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return e}()},{key:"sendResetPasswordEmail",value:function(){function e(e){return t.apply(this,arguments)}var t=(0,i.default)(a.default.mark(function e(t){return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mutate(k.sendResetPasswordEmailMutation,"sendResetPasswordEmail",{email:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return e}()}]),e}();t.GraphQLClient=_},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.createUserMutation=void 0;var u=n(1),a=r(u),s=(0,a.default)([" \n mutation($user: CreateUserInput!) {\n createUser(user: $user)\n }\n"],[" \n mutation($user: CreateUserInput!) {\n createUser(user: $user)\n }\n"]),i=n(2),o=r(i);t.createUserMutation=(0,o.default)(s)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.createImpersonateMutation=void 0;var u=n(1),a=r(u),s=(0,a.default)(["\n mutation($accessToken: String! $username: String!) {\n impersonate(accessToken: $accessToken, username: $username) {\n authorized\n ...LoginFields\n user {\n id\n ...UserFields\n }\n }\n }\n \n ","\n ","\n"],["\n mutation($accessToken: String! $username: String!) {\n impersonate(accessToken: $accessToken, username: $username) {\n authorized\n ...LoginFields\n user {\n id\n ...UserFields\n }\n }\n }\n \n ","\n ","\n"]),i=n(2),o=r(i),l=n(3);t.createImpersonateMutation=function(e){return(0,o.default)(s,e,l.loginFieldsFragment)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var u=n(4),a=r(u),s=n(5),i=r(s);Object.defineProperty(t,"__esModule",{value:!0});var o=n(10);(0,i.default)(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,a.default)(t,e,{enumerable:!0,get:function(){return o[e]}})});var l=n(12);(0,i.default)(l).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,a.default)(t,e,{enumerable:!0,get:function(){return l[e]}})});var c=n(7);(0,i.default)(c).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,a.default)(t,e,{enumerable:!0,get:function(){return c[e]}})});var f=n(11);(0,i.default)(f).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,a.default)(t,e,{enumerable:!0,get:function(){return f[e]}})});var d=n(17);(0,i.default)(d).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,a.default)(t,e,{enumerable:!0,get:function(){return d[e]}})});var p=n(13);(0,i.default)(p).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,a.default)(t,e,{enumerable:!0,get:function(){return p[e]}})});var m=n(15);(0,i.default)(m).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,a.default)(t,e,{enumerable:!0,get:function(){return m[e]}})});var h=n(14);(0,i.default)(h).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,a.default)(t,e,{enumerable:!0,get:function(){return h[e]}})});var b=n(16);(0,i.default)(b).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,a.default)(t,e,{enumerable:!0,get:function(){return b[e]}})});var g=n(8);(0,i.default)(g).forEach(function(e){"default"!==e&&"__esModule"!==e&&(0,a.default)(t,e,{enumerable:!0,get:function(){return g[e]}})})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.createLoginMutation=void 0;var u=n(1),a=r(u),s=(0,a.default)(["\n mutation($user: String, $userInput: UserInput, $password: String!) {\n loginWithPassword(user: $user, userInput: $userInput, password: $password) {\n sessionId\n ...LoginFields\n user {\n id\n ...UserFields\n }\n }\n }\n \n ","\n ","\n"],["\n mutation($user: String, $userInput: UserInput, $password: String!) {\n loginWithPassword(user: $user, userInput: $userInput, password: $password) {\n sessionId\n ...LoginFields\n user {\n id\n ...UserFields\n }\n }\n }\n \n ","\n ","\n"]),i=n(2),o=r(i),l=n(3);t.createLoginMutation=function(e){return(0,o.default)(s,e,l.loginFieldsFragment)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.logoutMutation=void 0;var u=n(1),a=r(u),s=(0,a.default)(["\n mutation logout($accessToken: String!) {\n logout(accessToken: $accessToken)\n }\n"],["\n mutation logout($accessToken: String!) {\n logout(accessToken: $accessToken)\n }\n"]),i=n(2),o=r(i);t.logoutMutation=(0,o.default)(s)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.createRefreshTokenMutation=void 0;var u=n(1),a=r(u),s=(0,a.default)(["\n mutation($accessToken: String!, $refreshToken: String!) {\n refreshTokens(accessToken: $accessToken, refreshToken: $refreshToken) {\n ...LoginFields\n user {\n id\n ...UserFields\n }\n }\n }\n\n ","\n ","\n"],["\n mutation($accessToken: String!, $refreshToken: String!) {\n refreshTokens(accessToken: $accessToken, refreshToken: $refreshToken) {\n ...LoginFields\n user {\n id\n ...UserFields\n }\n }\n }\n\n ","\n ","\n"]),i=n(2),o=r(i),l=n(3);t.createRefreshTokenMutation=function(e){return(0,o.default)(s,e,l.loginFieldsFragment)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.resetPasswordMutation=void 0;var u=n(1),a=r(u),s=(0,a.default)(["\n mutation($token: String!, $password: PasswordInput!) {\n resetPassword(token: $token, password: $password)\n }\n"],["\n mutation($token: String!, $password: PasswordInput!) {\n resetPassword(token: $token, password: $password)\n }\n"]),i=n(2),o=r(i);t.resetPasswordMutation=(0,o.default)(s)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.sendResetPasswordEmailMutation=void 0;var u=n(1),a=r(u),s=(0,a.default)(["\n mutation($email: String!) {\n sendResetPasswordEmail(email: $email)\n }\n"],["\n mutation($email: String!) {\n sendResetPasswordEmail(email: $email)\n }\n"]),i=n(2),o=r(i);t.sendResetPasswordEmailMutation=(0,o.default)(s)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.sendVerificationEmailMutation=void 0;var u=n(1),a=r(u),s=(0,a.default)(["\n mutation($email: String!) {\n sendVerificationEmail(email: $email)\n }\n"],["\n mutation($email: String!) {\n sendVerificationEmail(email: $email)\n }\n"]),i=n(2),o=r(i);t.sendVerificationEmailMutation=(0,o.default)(s)},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.defaultUserFieldsFragment="\n fragment UserFields on User {\n email\n username\n }\n"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.verifyEmailMutation=void 0;var u=n(1),a=r(u),s=(0,a.default)(["\n mutation($token: String!) {\n verifyEmail(token: $token)\n }\n"],["\n mutation($token: String!) {\n verifyEmail(token: $token)\n }\n"]),i=n(2),o=r(i);t.verifyEmailMutation=(0,o.default)(s)},function(e,t){e.exports=require("babel-runtime/core-js/object/assign")},function(e,t){e.exports=require("babel-runtime/helpers/asyncToGenerator")},function(e,t){e.exports=require("babel-runtime/helpers/classCallCheck")},function(e,t){e.exports=require("babel-runtime/helpers/createClass")},function(e,t){e.exports=require("babel-runtime/regenerator")}])}); |
{ | ||
"name": "@accounts/graphql-client", | ||
"version": "0.1.1-alpha.25a9dd2d", | ||
"version": "0.1.1-alpha.f5a64250", | ||
"description": "GraphQL client transport for accounts", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
20106