@gudhub/core 1.1.128 → 1.1.129

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,11 +21,13 @@ export class GroupInvitation {
21
21
 
22
22
  async groupInvitationGet(invitationId) {
23
23
  try {
24
- return await this.req.get({
25
- url: "/api/invitation/get",
26
- params: {
27
- invitation_id: invitationId
28
- }
24
+ const params = new URLSearchParams({
25
+ invitation_id: invitationId
26
+ });
27
+
28
+ return await this.req.axiosRequest({
29
+ method: 'GET',
30
+ url: `${this.req.root}/api/invitation/get?${params.toString()}`
29
31
  });
30
32
  } catch (err) {
31
33
  console.log(err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gudhub/core",
3
- "version": "1.1.128",
3
+ "version": "1.1.129",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -339,7 +339,7 @@ var t=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),export
339
339
  },{}],"LS0j":[function(require,module,exports) {
340
340
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GroupSharing=void 0;var r=require("../groupManager/GroupManager.js"),e=require("./AppGroupSharing.js");function t(r){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}function n(){var r,e,t="function"==typeof Symbol?Symbol:{},u=t.iterator||"@@iterator",i=t.toStringTag||"@@toStringTag";function p(t,n,u,i){var p=n&&n.prototype instanceof c?n:c,s=Object.create(p.prototype);return o(s,"_invoke",function(t,n,o){var u,i,p,c=0,s=o||[],f=!1,l={p:0,n:0,v:r,a:y,f:y.bind(r,4),d:function(e,t){return u=e,i=0,p=r,l.n=t,a}};function y(t,n){for(i=t,p=n,e=0;!f&&c&&!o&&e<s.length;e++){var o,u=s[e],y=l.p,g=u[2];t>3?(o=g===n)&&(p=u[(i=u[4])?5:(i=3,3)],u[4]=u[5]=r):u[0]<=y&&((o=t<2&&y<u[1])?(i=0,l.v=n,l.n=u[1]):y<g&&(o=t<3||u[0]>n||n>g)&&(u[4]=t,u[5]=n,l.n=g,i=0))}if(o||t>1)return a;throw f=!0,n}return function(o,s,g){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,g),i=s,p=g;(e=i<2?r:p)||!f;){u||(i?i<3?(i>1&&(l.n=-1),y(i,p)):l.n=p:l.v=p);try{if(c=2,u){if(i||(o="next"),e=u[o]){if(!(e=e.call(u,p)))throw TypeError("iterator result is not an object");if(!e.done)return e;p=e.value,i<2&&(i=0)}else 1===i&&(e=u.return)&&e.call(u),i<2&&(p=TypeError("The iterator does not provide a '"+o+"' method"),i=1);u=r}else if((e=(f=l.n<0)?p:t.call(n,l))!==a)break}catch(e){u=r,i=1,p=e}finally{c=1}}return{value:e,done:f}}}(t,u,i),!0),s}var a={};function c(){}function s(){}function f(){}e=Object.getPrototypeOf;var l=[][u]?e(e([][u]())):(o(e={},u,function(){return this}),e),y=f.prototype=c.prototype=Object.create(l);function g(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,f):(r.__proto__=f,o(r,i,"GeneratorFunction")),r.prototype=Object.create(y),r}return s.prototype=f,o(y,"constructor",f),o(f,"constructor",s),s.displayName="GeneratorFunction",o(f,i,"GeneratorFunction"),o(y),o(y,i,"Generator"),o(y,u,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),(n=function(){return{w:p,m:g}})()}function o(r,e,t,n){var u=Object.defineProperty;try{u({},"",{})}catch(r){u=0}(o=function(r,e,t,n){function i(e,t){o(r,e,function(r){return this._invoke(e,t,r)})}e?u?u(r,e,{value:t,enumerable:!n,configurable:!n,writable:!n}):r[e]=t:(i("next",0),i("throw",1),i("return",2))})(r,e,t,n)}function u(r,e,t,n,o,u,i){try{var p=r[u](i),a=p.value}catch(r){return void t(r)}p.done?e(a):Promise.resolve(a).then(n,o)}function i(r){return function(){var e=this,t=arguments;return new Promise(function(n,o){var i=r.apply(e,t);function p(r){u(i,n,o,p,a,"next",r)}function a(r){u(i,n,o,p,a,"throw",r)}p(void 0)})}}function p(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function a(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,s(n.key),n)}}function c(r,e,t){return e&&a(r.prototype,e),t&&a(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}function s(r){var e=f(r,"string");return"symbol"==t(e)?e:e+""}function f(r,e){if("object"!=t(r)||!r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}var l=exports.GroupSharing=function(){return c(function t(n,o,u){p(this,t),this.req=o,this.gudhub=n,this.pipeService=u,this.groupManager=new r.GroupManager(n,o),this.appGroupSharing=new e.AppGroupSharing(n,o)},[{key:"createGroup",value:function(r){return this.groupManager.createGroupApi(r)}},{key:"updateGroup",value:function(r,e){return this.groupManager.updateGroupApi(r,e)}},{key:"deleteGroup",value:function(r){return this.groupManager.deleteGroupApi(r)}},{key:"addUserToGroup",value:function(){var r=i(n().m(function r(e,t,o){var u;return n().w(function(r){for(;;)switch(r.n){case 0:return r.n=1,this.groupManager.addUserToGroupApi(e,t,o);case 1:return u=r.v,this.pipeService.emit("group_members_add",{app_id:"group_sharing"},u),r.a(2,u)}},r,this)}));return function(e,t,n){return r.apply(this,arguments)}}()},{key:"getUsersByGroup",value:function(r){return this.groupManager.getUsersByGroupApi(r)}},{key:"updateUserInGroup",value:function(){var r=i(n().m(function r(e,t,o){var u;return n().w(function(r){for(;;)switch(r.n){case 0:return r.n=1,this.groupManager.updateUserInGroupApi(e,t,o);case 1:return u=r.v,this.pipeService.emit("group_members_update",{app_id:"group_sharing"},u),r.a(2,u)}},r,this)}));return function(e,t,n){return r.apply(this,arguments)}}()},{key:"deleteUserFromGroup",value:function(){var r=i(n().m(function r(e,t){var o;return n().w(function(r){for(;;)switch(r.n){case 0:return r.n=1,this.groupManager.deleteUserFromGroupApi(e,t);case 1:return o=r.v,this.pipeService.emit("group_members_delete",{app_id:"group_sharing"},o),r.a(2,o)}},r,this)}));return function(e,t){return r.apply(this,arguments)}}()},{key:"getGroupsByUser",value:function(r){return this.groupManager.getGroupsByUserApi(r)}},{key:"addAppToGroup",value:function(r,e,t){return this.appGroupSharing.addAppToGroupApi(r,e,t)}},{key:"getAppsByGroup",value:function(r){return this.appGroupSharing.getAppsByGroupApi(r)}},{key:"updateAppInGroup",value:function(r,e,t){return this.appGroupSharing.updateAppInGroupApi(r,e,t)}},{key:"deleteAppFromGroup",value:function(r,e,t){return this.appGroupSharing.deleteAppFromGroupApi(r,e,t)}},{key:"getGroupsByApp",value:function(r){return this.appGroupSharing.getGroupsByAppApi(r)}}])}();
341
341
  },{"../groupManager/GroupManager.js":"qJXG","./AppGroupSharing.js":"Z7AV"}],"kPfD":[function(require,module,exports) {
342
- "use strict";function t(r){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(r)}function r(){var t,e,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",u=o.toStringTag||"@@toStringTag";function a(r,o,i,u){var a=o&&o.prototype instanceof f?o:f,p=Object.create(a.prototype);return n(p,"_invoke",function(r,n,o){var i,u,a,f=0,p=o||[],l=!1,s={p:0,n:0,v:t,a:v,f:v.bind(t,4),d:function(r,n){return i=r,u=0,a=t,s.n=n,c}};function v(r,n){for(u=r,a=n,e=0;!l&&f&&!o&&e<p.length;e++){var o,i=p[e],v=s.p,y=i[2];r>3?(o=y===n)&&(a=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=v&&((o=r<2&&v<i[1])?(u=0,s.v=n,s.n=i[1]):v<y&&(o=r<3||i[0]>n||n>y)&&(i[4]=r,i[5]=n,s.n=y,u=0))}if(o||r>1)return c;throw l=!0,n}return function(o,p,y){if(f>1)throw TypeError("Generator is already running");for(l&&1===p&&v(p,y),u=p,a=y;(e=u<2?t:a)||!l;){i||(u?u<3?(u>1&&(s.n=-1),v(u,a)):s.n=a:s.v=a);try{if(f=2,i){if(u||(o="next"),e=i[o]){if(!(e=e.call(i,a)))throw TypeError("iterator result is not an object");if(!e.done)return e;a=e.value,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(l=s.n<0)?a:r.call(n,s))!==c)break}catch(e){i=t,u=1,a=e}finally{f=1}}return{value:e,done:l}}}(r,i,u),!0),p}var c={};function f(){}function p(){}function l(){}e=Object.getPrototypeOf;var s=[][i]?e(e([][i]())):(n(e={},i,function(){return this}),e),v=l.prototype=f.prototype=Object.create(s);function y(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,n(t,u,"GeneratorFunction")),t.prototype=Object.create(v),t}return p.prototype=l,n(v,"constructor",l),n(l,"constructor",p),p.displayName="GeneratorFunction",n(l,u,"GeneratorFunction"),n(v),n(v,u,"Generator"),n(v,i,function(){return this}),n(v,"toString",function(){return"[object Generator]"}),(r=function(){return{w:a,m:y}})()}function n(t,r,e,o){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}(n=function(t,r,e,o){function u(r,e){n(t,r,function(t){return this._invoke(r,e,t)})}r?i?i(t,r,{value:e,enumerable:!o,configurable:!o,writable:!o}):t[r]=e:(u("next",0),u("throw",1),u("return",2))})(t,r,e,o)}function e(t,r,n,e,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?r(c):Promise.resolve(c).then(e,o)}function o(t){return function(){var r=this,n=arguments;return new Promise(function(o,i){var u=t.apply(r,n);function a(t){e(u,o,i,a,c,"next",t)}function c(t){e(u,o,i,a,c,"throw",t)}a(void 0)})}}function i(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function u(t,r){for(var n=0;n<r.length;n++){var e=r[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,c(e.key),e)}}function a(t,r,n){return r&&u(t.prototype,r),n&&u(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(r){var n=f(r,"string");return"symbol"==t(n)?n:n+""}function f(r,n){if("object"!=t(r)||!r)return r;var e=r[Symbol.toPrimitive];if(void 0!==e){var o=e.call(r,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.GroupInvitation=void 0;var p=exports.GroupInvitation=function(){return a(function t(r,n){i(this,t),this.req=n,this.gudhub=r},[{key:"groupInvitationCreate",value:function(){var t=o(r().m(function t(n,e){var o;return r().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,this.req.post({url:"/api/invitation/create",form:{sharing_groups:n,actions:e}});case 1:return t.a(2,t.v);case 2:return t.p=2,o=t.v,console.log(o),t.a(2,null)}},t,this,[[0,2]])}));return function(r,n){return t.apply(this,arguments)}}()},{key:"groupInvitationGet",value:function(){var t=o(r().m(function t(n){var e;return r().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,this.req.get({url:"/api/invitation/get",params:{invitation_id:n}});case 1:return t.a(2,t.v);case 2:return t.p=2,e=t.v,console.log(e),t.a(2,null)}},t,this,[[0,2]])}));return function(r){return t.apply(this,arguments)}}()},{key:"groupInvitationAccept",value:function(){var t=o(r().m(function t(n){var e;return r().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,this.req.post({url:"/api/invitation/accept",form:{invitation_id:n}});case 1:return t.a(2,t.v);case 2:return t.p=2,e=t.v,console.log(e),t.a(2,null)}},t,this,[[0,2]])}));return function(r){return t.apply(this,arguments)}}()}])}(),l=exports.default=p;
342
+ "use strict";function t(r){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(r)}function r(){var t,e,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",u=o.toStringTag||"@@toStringTag";function a(r,o,i,u){var a=o&&o.prototype instanceof f?o:f,p=Object.create(a.prototype);return n(p,"_invoke",function(r,n,o){var i,u,a,f=0,p=o||[],s=!1,l={p:0,n:0,v:t,a:v,f:v.bind(t,4),d:function(r,n){return i=r,u=0,a=t,l.n=n,c}};function v(r,n){for(u=r,a=n,e=0;!s&&f&&!o&&e<p.length;e++){var o,i=p[e],v=l.p,y=i[2];r>3?(o=y===n)&&(a=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=v&&((o=r<2&&v<i[1])?(u=0,l.v=n,l.n=i[1]):v<y&&(o=r<3||i[0]>n||n>y)&&(i[4]=r,i[5]=n,l.n=y,u=0))}if(o||r>1)return c;throw s=!0,n}return function(o,p,y){if(f>1)throw TypeError("Generator is already running");for(s&&1===p&&v(p,y),u=p,a=y;(e=u<2?t:a)||!s;){i||(u?u<3?(u>1&&(l.n=-1),v(u,a)):l.n=a:l.v=a);try{if(f=2,i){if(u||(o="next"),e=i[o]){if(!(e=e.call(i,a)))throw TypeError("iterator result is not an object");if(!e.done)return e;a=e.value,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(s=l.n<0)?a:r.call(n,l))!==c)break}catch(e){i=t,u=1,a=e}finally{f=1}}return{value:e,done:s}}}(r,i,u),!0),p}var c={};function f(){}function p(){}function s(){}e=Object.getPrototypeOf;var l=[][i]?e(e([][i]())):(n(e={},i,function(){return this}),e),v=s.prototype=f.prototype=Object.create(l);function y(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,n(t,u,"GeneratorFunction")),t.prototype=Object.create(v),t}return p.prototype=s,n(v,"constructor",s),n(s,"constructor",p),p.displayName="GeneratorFunction",n(s,u,"GeneratorFunction"),n(v),n(v,u,"Generator"),n(v,i,function(){return this}),n(v,"toString",function(){return"[object Generator]"}),(r=function(){return{w:a,m:y}})()}function n(t,r,e,o){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}(n=function(t,r,e,o){function u(r,e){n(t,r,function(t){return this._invoke(r,e,t)})}r?i?i(t,r,{value:e,enumerable:!o,configurable:!o,writable:!o}):t[r]=e:(u("next",0),u("throw",1),u("return",2))})(t,r,e,o)}function e(t,r,n,e,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?r(c):Promise.resolve(c).then(e,o)}function o(t){return function(){var r=this,n=arguments;return new Promise(function(o,i){var u=t.apply(r,n);function a(t){e(u,o,i,a,c,"next",t)}function c(t){e(u,o,i,a,c,"throw",t)}a(void 0)})}}function i(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function u(t,r){for(var n=0;n<r.length;n++){var e=r[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,c(e.key),e)}}function a(t,r,n){return r&&u(t.prototype,r),n&&u(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(r){var n=f(r,"string");return"symbol"==t(n)?n:n+""}function f(r,n){if("object"!=t(r)||!r)return r;var e=r[Symbol.toPrimitive];if(void 0!==e){var o=e.call(r,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.GroupInvitation=void 0;var p=exports.GroupInvitation=function(){return a(function t(r,n){i(this,t),this.req=n,this.gudhub=r},[{key:"groupInvitationCreate",value:function(){var t=o(r().m(function t(n,e){var o;return r().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,this.req.post({url:"/api/invitation/create",form:{sharing_groups:n,actions:e}});case 1:return t.a(2,t.v);case 2:return t.p=2,o=t.v,console.log(o),t.a(2,null)}},t,this,[[0,2]])}));return function(r,n){return t.apply(this,arguments)}}()},{key:"groupInvitationGet",value:function(){var t=o(r().m(function t(n){var e,o;return r().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,e=new URLSearchParams({invitation_id:n}),t.n=1,this.req.axiosRequest({method:"GET",url:"".concat(this.req.root,"/api/invitation/get?").concat(e.toString())});case 1:return t.a(2,t.v);case 2:return t.p=2,o=t.v,console.log(o),t.a(2,null)}},t,this,[[0,2]])}));return function(r){return t.apply(this,arguments)}}()},{key:"groupInvitationAccept",value:function(){var t=o(r().m(function t(n){var e;return r().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,this.req.post({url:"/api/invitation/accept",form:{invitation_id:n}});case 1:return t.a(2,t.v);case 2:return t.p=2,e=t.v,console.log(e),t.a(2,null)}},t,this,[[0,2]])}));return function(r){return t.apply(this,arguments)}}()}])}(),s=exports.default=p;
343
343
  },{}],"XaHW":[function(require,module,exports) {
344
344
  "use strict";function t(r){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(r)}function r(){var t,e,o="function"==typeof Symbol?Symbol:{},u=o.iterator||"@@iterator",i=o.toStringTag||"@@toStringTag";function a(r,o,u,i){var a=o&&o.prototype instanceof s?o:s,f=Object.create(a.prototype);return n(f,"_invoke",function(r,n,o){var u,i,a,s=0,f=o||[],p=!1,l={p:0,n:0,v:t,a:v,f:v.bind(t,4),d:function(r,n){return u=r,i=0,a=t,l.n=n,c}};function v(r,n){for(i=r,a=n,e=0;!p&&s&&!o&&e<f.length;e++){var o,u=f[e],v=l.p,h=u[2];r>3?(o=h===n)&&(a=u[(i=u[4])?5:(i=3,3)],u[4]=u[5]=t):u[0]<=v&&((o=r<2&&v<u[1])?(i=0,l.v=n,l.n=u[1]):v<h&&(o=r<3||u[0]>n||n>h)&&(u[4]=r,u[5]=n,l.n=h,i=0))}if(o||r>1)return c;throw p=!0,n}return function(o,f,h){if(s>1)throw TypeError("Generator is already running");for(p&&1===f&&v(f,h),i=f,a=h;(e=i<2?t:a)||!p;){u||(i?i<3?(i>1&&(l.n=-1),v(i,a)):l.n=a:l.v=a);try{if(s=2,u){if(i||(o="next"),e=u[o]){if(!(e=e.call(u,a)))throw TypeError("iterator result is not an object");if(!e.done)return e;a=e.value,i<2&&(i=0)}else 1===i&&(e=u.return)&&e.call(u),i<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),i=1);u=t}else if((e=(p=l.n<0)?a:r.call(n,l))!==c)break}catch(e){u=t,i=1,a=e}finally{s=1}}return{value:e,done:p}}}(r,u,i),!0),f}var c={};function s(){}function f(){}function p(){}e=Object.getPrototypeOf;var l=[][u]?e(e([][u]())):(n(e={},u,function(){return this}),e),v=p.prototype=s.prototype=Object.create(l);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,n(t,i,"GeneratorFunction")),t.prototype=Object.create(v),t}return f.prototype=p,n(v,"constructor",p),n(p,"constructor",f),f.displayName="GeneratorFunction",n(p,i,"GeneratorFunction"),n(v),n(v,i,"Generator"),n(v,u,function(){return this}),n(v,"toString",function(){return"[object Generator]"}),(r=function(){return{w:a,m:h}})()}function n(t,r,e,o){var u=Object.defineProperty;try{u({},"",{})}catch(t){u=0}(n=function(t,r,e,o){function i(r,e){n(t,r,function(t){return this._invoke(r,e,t)})}r?u?u(t,r,{value:e,enumerable:!o,configurable:!o,writable:!o}):t[r]=e:(i("next",0),i("throw",1),i("return",2))})(t,r,e,o)}function e(t,r,n,e,o,u,i){try{var a=t[u](i),c=a.value}catch(t){return void n(t)}a.done?r(c):Promise.resolve(c).then(e,o)}function o(t){return function(){var r=this,n=arguments;return new Promise(function(o,u){var i=t.apply(r,n);function a(t){e(i,o,u,a,c,"next",t)}function c(t){e(i,o,u,a,c,"throw",t)}a(void 0)})}}function u(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function i(t,r){for(var n=0;n<r.length;n++){var e=r[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,c(e.key),e)}}function a(t,r,n){return r&&i(t.prototype,r),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(r){var n=s(r,"string");return"symbol"==t(n)?n:n+""}function s(r,n){if("object"!=t(r)||!r)return r;var e=r[Symbol.toPrimitive];if(void 0!==e){var o=e.call(r,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Sharing=void 0;var f=exports.Sharing=function(){return a(function t(r,n){u(this,t),this.req=n,this.gudhub=r},[{key:"add",value:function(){var t=o(r().m(function t(n,e,o){var u,i,a,c;return r().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,this.gudhub.auth.getToken();case 1:return a=t.v,u={token:a,app_id:n,user_id:e,sharing_permission:o},t.n=2,this.req.post({url:"/sharing/add",form:u});case 2:return i=t.v,t.a(2,i);case 3:return t.p=3,c=t.v,console.log(c),t.a(2,null)}},t,this,[[0,3]])}));return function(r,n,e){return t.apply(this,arguments)}}()},{key:"update",value:function(){var t=o(r().m(function t(n,e,o){var u,i,a,c;return r().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,this.gudhub.auth.getToken();case 1:return a=t.v,u={token:a,app_id:n,user_id:e,sharing_permission:o},t.n=2,this.req.post({url:"/sharing/update",form:u});case 2:return i=t.v,t.a(2,i);case 3:return t.p=3,c=t.v,console.log(c),t.a(2,null)}},t,this,[[0,3]])}));return function(r,n,e){return t.apply(this,arguments)}}()},{key:"delete",value:function(){var t=o(r().m(function t(n,e){var o,u,i,a;return r().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,this.gudhub.auth.getToken();case 1:return i=t.v,o={token:i,app_id:n,user_id:e},t.n=2,this.req.post({url:"/sharing/delete",form:o});case 2:return u=t.v,t.a(2,u);case 3:return t.p=3,a=t.v,console.log(a),t.a(2,null)}},t,this,[[0,3]])}));return function(r,n){return t.apply(this,arguments)}}()},{key:"getAppUsers",value:function(){var t=o(r().m(function t(n){var e,o,u,i;return r().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,this.gudhub.auth.getToken();case 1:return u=t.v,e={token:u,app_id:n},t.n=2,this.req.post({url:"/sharing/get-app-users",form:e});case 2:return o=t.v,t.a(2,o);case 3:return t.p=3,i=t.v,console.log(i),t.a(2,null)}},t,this,[[0,3]])}));return function(r){return t.apply(this,arguments)}}()},{key:"addInvitation",value:function(){var t=o(r().m(function t(n,e){var o,u,i,a;return r().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,this.gudhub.auth.getToken();case 1:return i=t.v,o={token:i,guests_emails:n,apps:e},t.n=2,this.req.post({url:"/api/invitation/add",form:o});case 2:return u=t.v,t.a(2,u);case 3:return t.p=3,a=t.v,console.log(a),t.a(2,null)}},t,this,[[0,3]])}));return function(r,n){return t.apply(this,arguments)}}()}])}();
345
345
  },{}],"quyV":[function(require,module,exports) {