@gudhub/core 1.1.120 → 1.1.122

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.
@@ -1,23 +1,18 @@
1
1
  export class GroupInvitation {
2
2
  constructor(gudhub, req) {
3
- this.req = req;
4
- this.gudhub = gudhub;
3
+ this.req = req;
4
+ this.gudhub = gudhub;
5
5
  }
6
6
 
7
7
  async groupInvitationCreate(sharingGroups, actions) {
8
8
  try {
9
- const form = {
10
- sharing_groups: sharingGroups,
11
- actions,
12
- token: await this.gudhub.auth.getToken(),
13
- };
14
-
15
- const groupInventation = await this.req.post({
9
+ return await this.req.post({
16
10
  url: "/api/invitation/create",
17
- form,
11
+ form: {
12
+ sharing_groups: sharingGroups,
13
+ actions
14
+ }
18
15
  });
19
-
20
- return groupInventation;
21
16
  } catch (err) {
22
17
  console.log(err);
23
18
  return null;
@@ -26,16 +21,12 @@ export class GroupInvitation {
26
21
 
27
22
  async groupInvitationGet(invitationId) {
28
23
  try {
29
- const form = {
30
- invitation_id: invitationId
31
- };
32
-
33
- const groupInventation = await this.req.post({
24
+ return await this.req.get({
34
25
  url: "/api/invitation/get",
35
- form,
26
+ params: {
27
+ invitation_id: invitationId
28
+ }
36
29
  });
37
-
38
- return groupInventation;
39
30
  } catch (err) {
40
31
  console.log(err);
41
32
  return null;
@@ -44,16 +35,12 @@ export class GroupInvitation {
44
35
 
45
36
  async groupInvitationAccept(invitationId) {
46
37
  try {
47
- const form = {
48
- invitation_id: invitationId
49
- };
50
-
51
- const groupInventation = await this.req.post({
38
+ return await this.req.get({
52
39
  url: "/api/invitation/accept",
53
- form,
40
+ params: {
41
+ invitation_id: invitationId
42
+ }
54
43
  });
55
-
56
- return groupInventation;
57
44
  } catch (err) {
58
45
  console.log(err);
59
46
  return null;
package/GUDHUB/gudhub.js CHANGED
@@ -47,7 +47,7 @@ export class GudHub {
47
47
  this.auth = new Auth(this.req, this.storage);
48
48
  this.sharing = new Sharing(this, this.req);
49
49
  this.groupSharing = new GroupSharing(this, this.req, this.pipeService);
50
- this.groupInventation = new GroupInvitation(this, this.req);
50
+ this.groupInvitation = new GroupInvitation(this, this.req);
51
51
 
52
52
  // Login with access token - pass to setUser access token and after it user can make requests with access token
53
53
  // This method created for optimize GudHub initialization without auth key
@@ -1,10 +1,7 @@
1
- // import should from "should";
2
1
  import sinon from "sinon";
3
2
  import { GroupInvitation } from "../GUDHUB/Utils/sharing/GroupInvitation.js";
4
3
 
5
4
  describe("Invitation API", function () {
6
- const token = "fgdr5rfd4e5hsjkdrkdemdxm6re5erl";
7
-
8
5
  let gudhub;
9
6
  let req;
10
7
  let api;
@@ -12,12 +9,13 @@ describe("Invitation API", function () {
12
9
  beforeEach(() => {
13
10
  gudhub = {
14
11
  auth: {
15
- getToken: sinon.stub().resolves(token)
12
+ getToken: sinon.stub().resolves("fgdr5rfd4e5hsjkdrkdemdxm6re5erl")
16
13
  }
17
14
  };
18
15
 
19
16
  req = {
20
- post: sinon.stub()
17
+ post: sinon.stub(),
18
+ get: sinon.stub()
21
19
  };
22
20
 
23
21
  api = new GroupInvitation(gudhub, req);
@@ -48,21 +46,23 @@ describe("Invitation API", function () {
48
46
  result.should.have.property("invitation_id", "r5fh587guj7r");
49
47
  result.should.have.property("invitation_status", 0);
50
48
 
51
- gudhub.auth.getToken.calledOnce.should.be.true();
52
49
  req.post.calledOnce.should.be.true();
50
+ req.get.called.should.be.false();
53
51
 
54
52
  const arg = req.post.firstCall.args[0];
55
53
  arg.should.have.property("url", "/api/invitation/create");
56
54
  arg.should.have.property("form");
57
- arg.form.token.should.equal(token);
55
+ arg.form.should.not.have.property("token");
58
56
  arg.form.sharing_groups.should.eql(sharingGroups);
59
57
  arg.form.actions.should.eql(actions);
58
+
59
+ gudhub.auth.getToken.called.should.be.false();
60
60
  });
61
61
 
62
62
  it("groupInvitationGet should return full invitation structure", async function () {
63
63
  const invitationId = "lknvzl3266bkjbkb";
64
64
 
65
- req.post.resolves({
65
+ req.get.resolves({
66
66
  invitation_id: invitationId,
67
67
  invitation_status: 0,
68
68
  Inviter_user: {
@@ -85,18 +85,19 @@ describe("Invitation API", function () {
85
85
  result.Inviter_user.should.have.property("fullname", "Andrii Atlas");
86
86
  result.sharing_groups.should.be.Array();
87
87
 
88
- req.post.calledOnce.should.be.true();
88
+ req.get.calledOnce.should.be.true();
89
+ req.post.called.should.be.false();
89
90
 
90
- const arg = req.post.firstCall.args[0];
91
+ const arg = req.get.firstCall.args[0];
91
92
  arg.should.have.property("url", "/api/invitation/get");
92
- arg.should.have.property("form");
93
- arg.form.invitation_id.should.equal(invitationId);
93
+ arg.should.have.property("params");
94
+ arg.params.invitation_id.should.equal(invitationId);
94
95
  });
95
96
 
96
97
  it("groupInvitationAccept should send invitation id and return accepted status", async function () {
97
98
  const invitationId = "lknvzl3266bkjbkb";
98
99
 
99
- req.post.resolves({
100
+ req.get.resolves({
100
101
  invitation_id: invitationId,
101
102
  invitation_status: 1
102
103
  });
@@ -106,11 +107,12 @@ describe("Invitation API", function () {
106
107
  result.should.have.property("invitation_id", invitationId);
107
108
  result.should.have.property("invitation_status", 1);
108
109
 
109
- req.post.calledOnce.should.be.true();
110
+ req.get.calledOnce.should.be.true();
111
+ req.post.called.should.be.false();
110
112
 
111
- const arg = req.post.firstCall.args[0];
113
+ const arg = req.get.firstCall.args[0];
112
114
  arg.should.have.property("url", "/api/invitation/accept");
113
- arg.should.have.property("form");
114
- arg.form.invitation_id.should.equal(invitationId);
115
+ arg.should.have.property("params");
116
+ arg.params.invitation_id.should.equal(invitationId);
115
117
  });
116
- });
118
+ });
@@ -206,8 +206,8 @@ export default function (app) {
206
206
  });
207
207
  });
208
208
 
209
- app.post('/api/invitation/get', (req, res) => {
210
- const { invitation_id } = req.body;
209
+ app.get('/api/invitation/get', (req, res) => {
210
+ const { invitation_id } = req.query;
211
211
 
212
212
  if (!invitation_id) {
213
213
  return res.status(400).json({ error: "Missing invitation_id" });
@@ -216,26 +216,26 @@ export default function (app) {
216
216
  res.status(200).json({
217
217
  invitation_id,
218
218
  invitation_status: 0,
219
- Inviter_user: {
219
+ inviter_user: {
220
220
  fullname: "Andrii Atlas",
221
221
  avatar_128: "https://gudhub.com/avatars/22_2289_128.jpg",
222
222
  avatar_512: "https://gudhub.com/avatars/22_2289_512.jpg"
223
223
  },
224
224
  sharing_groups: [
225
- {
226
- group_name: "3D Rendering Team",
227
- group_permission: 1
228
- },
229
- {
230
- group_name: "Design Team",
231
- group_permission: 2
232
- }
225
+ {
226
+ group_name: "3D Rendering Team",
227
+ group_permission: 1
228
+ },
229
+ {
230
+ group_name: "Design Team",
231
+ group_permission: 2
232
+ }
233
233
  ]
234
234
  });
235
235
  });
236
236
 
237
- app.post('/api/invitation/accept', (req, res) => {
238
- const { invitation_id } = req.body;
237
+ app.get('/api/invitation/accept', (req, res) => {
238
+ const { invitation_id } = req.query;
239
239
 
240
240
  if (!invitation_id) {
241
241
  return res.status(400).json({ error: "Missing invitation_id" });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gudhub/core",
3
- "version": "1.1.120",
3
+ "version": "1.1.122",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -339,13 +339,13 @@ 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(n){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})(n)}function n(){var t,e,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",u=o.toStringTag||"@@toStringTag";function a(n,o,i,u){var a=o&&o.prototype instanceof f?o:f,p=Object.create(a.prototype);return r(p,"_invoke",function(n,r,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(n,r){return i=n,u=0,a=t,s.n=r,c}};function v(n,r){for(u=n,a=r,e=0;!l&&f&&!o&&e<p.length;e++){var o,i=p[e],v=s.p,y=i[2];n>3?(o=y===r)&&(a=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=v&&((o=n<2&&v<i[1])?(u=0,s.v=r,s.n=i[1]):v<y&&(o=n<3||i[0]>r||r>y)&&(i[4]=n,i[5]=r,s.n=y,u=0))}if(o||n>1)return c;throw l=!0,r}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:n.call(r,s))!==c)break}catch(e){i=t,u=1,a=e}finally{f=1}}return{value:e,done:l}}}(n,i,u),!0),p}var c={};function f(){}function p(){}function l(){}e=Object.getPrototypeOf;var s=[][i]?e(e([][i]())):(r(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,r(t,u,"GeneratorFunction")),t.prototype=Object.create(v),t}return p.prototype=l,r(v,"constructor",l),r(l,"constructor",p),p.displayName="GeneratorFunction",r(l,u,"GeneratorFunction"),r(v),r(v,u,"Generator"),r(v,i,function(){return this}),r(v,"toString",function(){return"[object Generator]"}),(n=function(){return{w:a,m:y}})()}function r(t,n,e,o){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}(r=function(t,n,e,o){function u(n,e){r(t,n,function(t){return this._invoke(n,e,t)})}n?i?i(t,n,{value:e,enumerable:!o,configurable:!o,writable:!o}):t[n]=e:(u("next",0),u("throw",1),u("return",2))})(t,n,e,o)}function e(t,n,r,e,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void r(t)}a.done?n(c):Promise.resolve(c).then(e,o)}function o(t){return function(){var n=this,r=arguments;return new Promise(function(o,i){var u=t.apply(n,r);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,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function u(t,n){for(var r=0;r<n.length;r++){var e=n[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,c(e.key),e)}}function a(t,n,r){return n&&u(t.prototype,n),r&&u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(n){var r=f(n,"string");return"symbol"==t(r)?r:r+""}function f(n,r){if("object"!=t(n)||!n)return n;var e=n[Symbol.toPrimitive];if(void 0!==e){var o=e.call(n,r||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(n)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.GroupInvitation=void 0;var p=exports.GroupInvitation=function(){return a(function t(n,r){i(this,t),this.req=r,this.gudhub=n},[{key:"groupInvitationCreate",value:function(){var t=o(n().m(function t(r,e){var o,i,u,a,c,f;return n().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,u=r,a=e,t.n=1,this.gudhub.auth.getToken();case 1:return c=t.v,o={sharing_groups:u,actions:a,token:c},t.n=2,this.req.post({url:"/api/invitation/create",form:o});case 2:return i=t.v,t.a(2,i);case 3:return t.p=3,f=t.v,console.log(f),t.a(2,null)}},t,this,[[0,3]])}));return function(n,r){return t.apply(this,arguments)}}()},{key:"groupInvitationGet",value:function(){var t=o(n().m(function t(r){var e,o,i;return n().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,e={invitation_id:r},t.n=1,this.req.post({url:"/api/invitation/get",form:e});case 1:return o=t.v,t.a(2,o);case 2:return t.p=2,i=t.v,console.log(i),t.a(2,null)}},t,this,[[0,2]])}));return function(n){return t.apply(this,arguments)}}()},{key:"groupInvitationAccept",value:function(){var t=o(n().m(function t(r){var e,o,i;return n().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,e={invitation_id:r},t.n=1,this.req.post({url:"/api/invitation/accept",form:e});case 1:return o=t.v,t.a(2,o);case 2:return t.p=2,i=t.v,console.log(i),t.a(2,null)}},t,this,[[0,2]])}));return function(n){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||[],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.get({url:"/api/invitation/accept",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)}}()}])}(),l=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) {
346
346
  "use strict";function t(){var e,n,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",u=o.toStringTag||"@@toStringTag";function a(t,o,i,u){var a=o&&o.prototype instanceof f?o:f,s=Object.create(a.prototype);return r(s,"_invoke",function(t,r,o){var i,u,a,f=0,s=o||[],p=!1,l={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,r){return i=t,u=0,a=e,l.n=r,c}};function y(t,r){for(u=t,a=r,n=0;!p&&f&&!o&&n<s.length;n++){var o,i=s[n],y=l.p,b=i[2];t>3?(o=b===r)&&(a=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=y&&((o=t<2&&y<i[1])?(u=0,l.v=r,l.n=i[1]):y<b&&(o=t<3||i[0]>r||r>b)&&(i[4]=t,i[5]=r,l.n=b,u=0))}if(o||t>1)return c;throw p=!0,r}return function(o,s,b){if(f>1)throw TypeError("Generator is already running");for(p&&1===s&&y(s,b),u=s,a=b;(n=u<2?e:a)||!p;){i||(u?u<3?(u>1&&(l.n=-1),y(u,a)):l.n=a:l.v=a);try{if(f=2,i){if(u||(o="next"),n=i[o]){if(!(n=n.call(i,a)))throw TypeError("iterator result is not an object");if(!n.done)return n;a=n.value,u<2&&(u=0)}else 1===u&&(n=i.return)&&n.call(i),u<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=e}else if((n=(p=l.n<0)?a:t.call(r,l))!==c)break}catch(n){i=e,u=1,a=n}finally{f=1}}return{value:n,done:p}}}(t,i,u),!0),s}var c={};function f(){}function s(){}function p(){}n=Object.getPrototypeOf;var l=[][i]?n(n([][i]())):(r(n={},i,function(){return this}),n),y=p.prototype=f.prototype=Object.create(l);function b(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,r(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t}return s.prototype=p,r(y,"constructor",p),r(p,"constructor",s),s.displayName="GeneratorFunction",r(p,u,"GeneratorFunction"),r(y),r(y,u,"Generator"),r(y,i,function(){return this}),r(y,"toString",function(){return"[object Generator]"}),(t=function(){return{w:a,m:b}})()}function r(t,e,n,o){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}(r=function(t,e,n,o){function u(e,n){r(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!o,configurable:!o,writable:!o}):t[e]=n:(u("next",0),u("throw",1),u("return",2))})(t,e,n,o)}function e(t){return(e="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})(t)}function n(t,r,e,n,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void e(t)}a.done?r(c):Promise.resolve(c).then(n,o)}function o(t){return function(){var r=this,e=arguments;return new Promise(function(o,i){var u=t.apply(r,e);function a(t){n(u,o,i,a,c,"next",t)}function c(t){n(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 e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,c(n.key),n)}}function a(t,r,e){return r&&u(t.prototype,r),e&&u(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t){var r=f(t,"string");return"symbol"==e(r)?r:r+""}function f(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.WebSocketEmitter=void 0;var s=exports.WebSocketEmitter=function(){return a(function t(r){i(this,t),this.gudhub=r},[{key:"emitToUser",value:function(){var r=o(t().m(function r(n,o){var i,u;return t().w(function(t){for(;;)switch(t.n){case 0:return i={user_id:n,data:"object"===e(o)?JSON.stringify(o):o},t.n=1,this.gudhub.req.post({url:"/ws/emit-to-user",form:i});case 1:return u=t.v,t.a(2,u)}},r,this)}));return function(t,e){return r.apply(this,arguments)}}()},{key:"broadcastToAppSubscribers",value:function(){var r=o(t().m(function r(e,n,o){var i,u;return t().w(function(t){for(;;)switch(t.n){case 0:return i={app_id:e,data:JSON.stringify({data_type:n,data:o})},t.n=1,this.gudhub.req.post({url:"/ws/broadcast-to-app-subscribers",form:i});case 1:return u=t.v,t.a(2,u)}},r,this)}));return function(t,e,n){return r.apply(this,arguments)}}()}])}();
347
347
  },{}],"U9gy":[function(require,module,exports) {
348
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GudHub=void 0;var e=require("./gudhub-https-service.js"),t=require("./PipeService/PipeService.js"),r=require("./Storage/Storage.js"),i=require("./WebSocket/WebSocket.js"),n=require("./config.js"),o=require("./Utils/Utils.js"),u=require("./Auth/Auth.js"),s=require("./GHConstructor/ghconstructor.js"),a=require("./AppProcessor/AppProcessor.js"),c=require("./ItemProcessor/ItemProcessor.js"),l=require("./FieldProcessor/FieldProcessor.js"),p=require("./FileManager/FileManager.js"),h=require("./ChunksManager/ChunksManager.js"),f=require("./DocumentManager/DocumentManager.js"),d=require("./GHConstructor/interpritate.js"),v=require("./consts.js"),g=require("./WebSocket/WebsocketHandler.js"),y=require("./Utils/sharing/GroupSharing.js"),k=require("./Utils/sharing/GroupInvitation.js"),m=require("./Utils/sharing/Sharing.js"),b=require("./WebSocket/WebSocketEmitter.js");function S(e){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function w(){var e,t,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",n=r.toStringTag||"@@toStringTag";function o(r,i,n,o){var a=i&&i.prototype instanceof s?i:s,c=Object.create(a.prototype);return P(c,"_invoke",function(r,i,n){var o,s,a,c=0,l=n||[],p=!1,h={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,r){return o=t,s=0,a=e,h.n=r,u}};function f(r,i){for(s=r,a=i,t=0;!p&&c&&!n&&t<l.length;t++){var n,o=l[t],f=h.p,d=o[2];r>3?(n=d===i)&&(a=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=f&&((n=r<2&&f<o[1])?(s=0,h.v=i,h.n=o[1]):f<d&&(n=r<3||o[0]>i||i>d)&&(o[4]=r,o[5]=i,h.n=d,s=0))}if(n||r>1)return u;throw p=!0,i}return function(n,l,d){if(c>1)throw TypeError("Generator is already running");for(p&&1===l&&f(l,d),s=l,a=d;(t=s<2?e:a)||!p;){o||(s?s<3?(s>1&&(h.n=-1),f(s,a)):h.n=a:h.v=a);try{if(c=2,o){if(s||(n="next"),t=o[n]){if(!(t=t.call(o,a)))throw TypeError("iterator result is not an object");if(!t.done)return t;a=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(a=TypeError("The iterator does not provide a '"+n+"' method"),s=1);o=e}else if((t=(p=h.n<0)?a:r.call(i,h))!==u)break}catch(t){o=e,s=1,a=t}finally{c=1}}return{value:t,done:p}}}(r,n,o),!0),c}var u={};function s(){}function a(){}function c(){}t=Object.getPrototypeOf;var l=[][i]?t(t([][i]())):(P(t={},i,function(){return this}),t),p=c.prototype=s.prototype=Object.create(l);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,P(e,n,"GeneratorFunction")),e.prototype=Object.create(p),e}return a.prototype=c,P(p,"constructor",c),P(c,"constructor",a),a.displayName="GeneratorFunction",P(c,n,"GeneratorFunction"),P(p),P(p,n,"Generator"),P(p,i,function(){return this}),P(p,"toString",function(){return"[object Generator]"}),(w=function(){return{w:o,m:h}})()}function P(e,t,r,i){var n=Object.defineProperty;try{n({},"",{})}catch(e){n=0}(P=function(e,t,r,i){function o(t,r){P(e,t,function(e){return this._invoke(t,r,e)})}t?n?n(e,t,{value:r,enumerable:!i,configurable:!i,writable:!i}):e[t]=r:(o("next",0),o("throw",1),o("return",2))})(e,t,r,i)}function F(e,t,r,i,n,o,u){try{var s=e[o](u),a=s.value}catch(e){return void r(e)}s.done?t(a):Promise.resolve(a).then(i,n)}function I(e){return function(){var t=this,r=arguments;return new Promise(function(i,n){var o=e.apply(t,r);function u(e){F(o,i,n,u,s,"next",e)}function s(e){F(o,i,n,u,s,"throw",e)}u(void 0)})}}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,W(i.key),i)}}function q(e,t,r){return t&&j(e.prototype,t),r&&j(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function W(e){var t=A(e,"string");return"symbol"==S(t)?t:t+""}function A(e,t){if("object"!=S(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=S(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var M=exports.GudHub=function(){return q(function v(S){var w=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{server_url:n.server_url,wss_url:n.wss_url,node_server_url:n.node_server_url,initWebsocket:!1,activateSW:!1,swLink:"",async_modules_path:n.async_modules_path,file_server_url:n.file_server_url,automation_modules_path:n.automation_modules_path,accesstoken:this.accesstoken,expirydate:this.expirydate};_(this,v),this.config=w,this.ghconstructor=new s.GHConstructor(this),this.interpritate=new d.Interpritate(this),this.pipeService=new t.PipeService,this.storage=new r.Storage(w.async_modules_path,w.file_server_url,w.automation_modules_path),this.util=new o.Utils(this),this.req=new e.GudHubHttpsService(w.server_url),this.auth=new u.Auth(this.req,this.storage),this.sharing=new m.Sharing(this,this.req),this.groupSharing=new y.GroupSharing(this,this.req,this.pipeService),this.groupInventation=new k.GroupInvitation(this,this.req),S?this.storage.setUser({auth_key:S}):w.accesstoken&&w.expirydate&&this.storage.setUser({accesstoken:w.accesstoken,expirydate:w.expirydate}),this.req.init(this.auth.getToken.bind(this.auth)),this.ws=new i.WebSocketApi(w.wss_url,this.auth),this.chunksManager=new h.ChunksManager(this.storage,this.pipeService,this.req,this.util),this.appProcessor=new a.AppProcessor(this.storage,this.pipeService,this.req,this.ws,this.chunksManager,this.util,w.activateSW),this.itemProcessor=new c.ItemProcessor(this.storage,this.pipeService,this.req,this.appProcessor,this.util),this.fieldProcessor=new l.FieldProcessor(this.storage,this.req,this.appProcessor,this.itemProcessor,this.pipeService),this.fileManager=new p.FileManager(this.storage,this.pipeService,this.req,this.appProcessor),this.documentManager=new f.DocumentManager(this.req,this.pipeService),this.websocketsemitter=new b.WebSocketEmitter(this),w.initWebsocket&&this.ws.initWebSocket(g.WebsocketHandler.bind(this,this),this.appProcessor.refreshApps.bind(this.appProcessor));w.activateSW&&this.activateSW(w.swLink)},[{key:"activateSW",value:function(){var e=I(w().m(function e(t){var r,i;return w().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!(v.IS_WEB&&"serviceWorker"in window.navigator)){e.n=5;break}return e.p=1,e.n=2,window.navigator.serviceWorker.register(t);case 2:(r=e.v).update().then(function(){return console.log("%cSW ->>> Service worker successful updated","display: inline-block ; background-color: #689f38 ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;")}).catch(function(){return console.warn("SW ->>> Service worker is not updated")}),console.log("%cSW ->>> Service worker is registered","display: inline-block ; background-color: #689f38 ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;",r),e.n=4;break;case 3:e.p=3,i=e.v,console.warn("%cSW ->>> Service worker is not registered","display: inline-block ; background-color: #d32f2f ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;",i);case 4:e.n=6;break;case 5:console.log("%cSW ->>> ServiceWorkers not supported","display: inline-block ; background-color: #d32f2f ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;");case 6:return e.a(2)}},e,null,[[1,3]])}));return function(t){return e.apply(this,arguments)}}()},{key:"on",value:function(e,t,r){return this.pipeService.on(e,t,r),this}},{key:"emit",value:function(e,t,r,i){return this.pipeService.emit(e,t,r,i),this}},{key:"destroy",value:function(e,t,r){return this.pipeService.destroy(e,t,r),this}},{key:"prefilter",value:function(e,t){return this.util.prefilter(e,t)}},{key:"debounce",value:function(e,t){return this.util.debounce(e,t)}},{key:"emitToUser",value:function(e,t){return this.websocketsemitter.emitToUser(e,t)}},{key:"broadcastToAppSubscribers",value:function(e,t,r){return this.websocketsemitter.broadcastToAppSubscribers(e,t,r)}},{key:"getInterpretation",value:function(e,t,r,i,n,o,u){return this.interpritate.getInterpretation(e,t,r,i,n,o,u)}},{key:"getInterpretationById",value:function(e,t,r,i,n,o){return this.interpritate.getInterpretationById(e,t,r,i,n,o)}},{key:"filter",value:function(e,t){return this.util.filter(e,t)}},{key:"mergeFilters",value:function(e,t){return this.util.mergeFilters(e,t)}},{key:"group",value:function(e,t){return this.util.group(e,t)}},{key:"getFilteredItems",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.util.getFilteredItems(e,t,r.element_app_id,r.app_id,r.item_id,r.field_group,r.search,r.search_params)}},{key:"sortItems",value:function(e,t){return this.util.sortItems(e,t)}},{key:"jsonToItems",value:function(e,t){return this.util.jsonToItems(e,t)}},{key:"getDate",value:function(e){return this.util.getDate(e)}},{key:"populateWithDate",value:function(e,t){return this.util.populateWithDate(e,t)}},{key:"checkRecurringDate",value:function(e,t){return this.util.checkRecurringDate(e,t)}},{key:"populateItems",value:function(e,t,r){return this.util.populateItems(e,t,r)}},{key:"populateWithItemRef",value:function(e,t,r,i,n,o){return this.util.populateWithItemRef(e,t,r,i,n,o)}},{key:"compareItems",value:function(e,t,r){return this.util.compareItems(e,t,r)}},{key:"mergeItems",value:function(e,t,r){return this.util.mergeItems(e,t,r)}},{key:"mergeObjects",value:function(e,t){return this.util.mergeObjects(e,t)}},{key:"makeNestedList",value:function(e,t,r,i,n){return this.util.makeNestedList(e,t,r,i,n)}},{key:"jsonConstructor",value:function(e,t,r,i){return this.util.jsonConstructor(e,t,r,i)}},{key:"getAppsList",value:function(){return this.appProcessor.getAppsList()}},{key:"getAppInfo",value:function(e){return this.appProcessor.getAppInfo(e)}},{key:"deleteApp",value:function(e){return this.appProcessor.deleteApp(e)}},{key:"getApp",value:function(e){return this.appProcessor.getApp(e)}},{key:"updateApp",value:function(e){return this.appProcessor.updateApp(e)}},{key:"updateAppInfo",value:function(e){return this.appProcessor.updateAppInfo(e)}},{key:"createNewApp",value:function(e){return this.appProcessor.createNewApp(e)}},{key:"getItems",value:function(e){return this.itemProcessor.getItems(e)}},{key:"getItem",value:function(){var e=I(w().m(function e(t,r){var i;return w().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getItems(t);case 1:if(!(i=e.v)){e.n=2;break}return e.a(2,i.find(function(e){return e.item_id==r}));case 2:return e.a(2)}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"addNewItems",value:function(e,t){return this.itemProcessor.addNewItems(e,t)}},{key:"updateItems",value:function(e,t){return this.itemProcessor.updateItems(e,t)}},{key:"deleteItems",value:function(e,t){return this.itemProcessor.deleteItems(e,t)}},{key:"restoreItems",value:function(e,t){return this.itemProcessor.restoreItems(e,t)}},{key:"getField",value:function(e,t){return this.fieldProcessor.getField(e,t)}},{key:"getFieldIdByNameSpace",value:function(e,t){return this.fieldProcessor.getFieldIdByNameSpace(e,t)}},{key:"getFieldModels",value:function(e){return this.fieldProcessor.getFieldModels(e)}},{key:"updateField",value:function(e,t){return this.fieldProcessor.updateField(e,t)}},{key:"deleteField",value:function(e,t){return this.fieldProcessor.deleteField(e,t)}},{key:"getFieldValue",value:function(e,t,r){return this.fieldProcessor.getFieldValue(e,t,r)}},{key:"setFieldValue",value:function(e,t,r,i){return this.fieldProcessor.setFieldValue(e,t,r,i)}},{key:"getFile",value:function(e,t){return this.fileManager.getFile(e,t)}},{key:"getFiles",value:function(e,t){return this.fileManager.getFiles(e,t)}},{key:"uploadFile",value:function(e,t,r){return this.fileManager.uploadFile(e,t,r)}},{key:"uploadFileFromString",value:function(e,t,r,i,n,o,u){return this.fileManager.uploadFileFromString(e,t,r,i,n,o,u)}},{key:"updateFileFromString",value:function(e,t,r,i,n,o,u){return this.fileManager.updateFileFromString(e,t,r,i,n,o,u)}},{key:"deleteFile",value:function(e,t){return this.fileManager.deleteFile(e,t)}},{key:"duplicateFile",value:function(e){return this.fileManager.duplicateFile(e)}},{key:"downloadFileFromString",value:function(e,t){return this.fileManager.downloadFileFromString(e,t)}},{key:"createDocument",value:function(e){return this.documentManager.createDocument(e)}},{key:"getDocument",value:function(e){return this.documentManager.getDocument(e)}},{key:"getDocuments",value:function(e){return this.documentManager.getDocuments(e)}},{key:"deleteDocument",value:function(e){return this.documentManager.deleteDocument(e)}},{key:"login",value:function(e){return this.auth.login(e)}},{key:"loginWithToken",value:function(e){return this.auth.loginWithToken(e)}},{key:"logout",value:function(e){return this.appProcessor.clearAppProcessor(),this.auth.logout(e)}},{key:"signup",value:function(e){return this.auth.signup(e)}},{key:"getUsersList",value:function(e){return this.auth.getUsersList(e)}},{key:"updateToken",value:function(e){return this.auth.updateToken(e)}},{key:"avatarUploadApi",value:function(e){return this.auth.avatarUploadApi(e)}},{key:"getVersion",value:function(){return this.auth.getVersion()}},{key:"getUserById",value:function(e){return this.auth.getUserById(e)}},{key:"getToken",value:function(){return this.auth.getToken()}},{key:"updateUser",value:function(e){return this.auth.updateUser(e)}},{key:"updateAvatar",value:function(e){return this.auth.updateAvatar(e)}}])}();
348
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GudHub=void 0;var e=require("./gudhub-https-service.js"),t=require("./PipeService/PipeService.js"),r=require("./Storage/Storage.js"),i=require("./WebSocket/WebSocket.js"),n=require("./config.js"),o=require("./Utils/Utils.js"),u=require("./Auth/Auth.js"),s=require("./GHConstructor/ghconstructor.js"),a=require("./AppProcessor/AppProcessor.js"),c=require("./ItemProcessor/ItemProcessor.js"),l=require("./FieldProcessor/FieldProcessor.js"),p=require("./FileManager/FileManager.js"),h=require("./ChunksManager/ChunksManager.js"),f=require("./DocumentManager/DocumentManager.js"),d=require("./GHConstructor/interpritate.js"),v=require("./consts.js"),g=require("./WebSocket/WebsocketHandler.js"),y=require("./Utils/sharing/GroupSharing.js"),k=require("./Utils/sharing/GroupInvitation.js"),m=require("./Utils/sharing/Sharing.js"),b=require("./WebSocket/WebSocketEmitter.js");function S(e){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function w(){var e,t,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",n=r.toStringTag||"@@toStringTag";function o(r,i,n,o){var a=i&&i.prototype instanceof s?i:s,c=Object.create(a.prototype);return P(c,"_invoke",function(r,i,n){var o,s,a,c=0,l=n||[],p=!1,h={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,r){return o=t,s=0,a=e,h.n=r,u}};function f(r,i){for(s=r,a=i,t=0;!p&&c&&!n&&t<l.length;t++){var n,o=l[t],f=h.p,d=o[2];r>3?(n=d===i)&&(a=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=f&&((n=r<2&&f<o[1])?(s=0,h.v=i,h.n=o[1]):f<d&&(n=r<3||o[0]>i||i>d)&&(o[4]=r,o[5]=i,h.n=d,s=0))}if(n||r>1)return u;throw p=!0,i}return function(n,l,d){if(c>1)throw TypeError("Generator is already running");for(p&&1===l&&f(l,d),s=l,a=d;(t=s<2?e:a)||!p;){o||(s?s<3?(s>1&&(h.n=-1),f(s,a)):h.n=a:h.v=a);try{if(c=2,o){if(s||(n="next"),t=o[n]){if(!(t=t.call(o,a)))throw TypeError("iterator result is not an object");if(!t.done)return t;a=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(a=TypeError("The iterator does not provide a '"+n+"' method"),s=1);o=e}else if((t=(p=h.n<0)?a:r.call(i,h))!==u)break}catch(t){o=e,s=1,a=t}finally{c=1}}return{value:t,done:p}}}(r,n,o),!0),c}var u={};function s(){}function a(){}function c(){}t=Object.getPrototypeOf;var l=[][i]?t(t([][i]())):(P(t={},i,function(){return this}),t),p=c.prototype=s.prototype=Object.create(l);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,P(e,n,"GeneratorFunction")),e.prototype=Object.create(p),e}return a.prototype=c,P(p,"constructor",c),P(c,"constructor",a),a.displayName="GeneratorFunction",P(c,n,"GeneratorFunction"),P(p),P(p,n,"Generator"),P(p,i,function(){return this}),P(p,"toString",function(){return"[object Generator]"}),(w=function(){return{w:o,m:h}})()}function P(e,t,r,i){var n=Object.defineProperty;try{n({},"",{})}catch(e){n=0}(P=function(e,t,r,i){function o(t,r){P(e,t,function(e){return this._invoke(t,r,e)})}t?n?n(e,t,{value:r,enumerable:!i,configurable:!i,writable:!i}):e[t]=r:(o("next",0),o("throw",1),o("return",2))})(e,t,r,i)}function F(e,t,r,i,n,o,u){try{var s=e[o](u),a=s.value}catch(e){return void r(e)}s.done?t(a):Promise.resolve(a).then(i,n)}function I(e){return function(){var t=this,r=arguments;return new Promise(function(i,n){var o=e.apply(t,r);function u(e){F(o,i,n,u,s,"next",e)}function s(e){F(o,i,n,u,s,"throw",e)}u(void 0)})}}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,W(i.key),i)}}function q(e,t,r){return t&&j(e.prototype,t),r&&j(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function W(e){var t=A(e,"string");return"symbol"==S(t)?t:t+""}function A(e,t){if("object"!=S(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=S(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var M=exports.GudHub=function(){return q(function v(S){var w=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{server_url:n.server_url,wss_url:n.wss_url,node_server_url:n.node_server_url,initWebsocket:!1,activateSW:!1,swLink:"",async_modules_path:n.async_modules_path,file_server_url:n.file_server_url,automation_modules_path:n.automation_modules_path,accesstoken:this.accesstoken,expirydate:this.expirydate};_(this,v),this.config=w,this.ghconstructor=new s.GHConstructor(this),this.interpritate=new d.Interpritate(this),this.pipeService=new t.PipeService,this.storage=new r.Storage(w.async_modules_path,w.file_server_url,w.automation_modules_path),this.util=new o.Utils(this),this.req=new e.GudHubHttpsService(w.server_url),this.auth=new u.Auth(this.req,this.storage),this.sharing=new m.Sharing(this,this.req),this.groupSharing=new y.GroupSharing(this,this.req,this.pipeService),this.groupInvitation=new k.GroupInvitation(this,this.req),S?this.storage.setUser({auth_key:S}):w.accesstoken&&w.expirydate&&this.storage.setUser({accesstoken:w.accesstoken,expirydate:w.expirydate}),this.req.init(this.auth.getToken.bind(this.auth)),this.ws=new i.WebSocketApi(w.wss_url,this.auth),this.chunksManager=new h.ChunksManager(this.storage,this.pipeService,this.req,this.util),this.appProcessor=new a.AppProcessor(this.storage,this.pipeService,this.req,this.ws,this.chunksManager,this.util,w.activateSW),this.itemProcessor=new c.ItemProcessor(this.storage,this.pipeService,this.req,this.appProcessor,this.util),this.fieldProcessor=new l.FieldProcessor(this.storage,this.req,this.appProcessor,this.itemProcessor,this.pipeService),this.fileManager=new p.FileManager(this.storage,this.pipeService,this.req,this.appProcessor),this.documentManager=new f.DocumentManager(this.req,this.pipeService),this.websocketsemitter=new b.WebSocketEmitter(this),w.initWebsocket&&this.ws.initWebSocket(g.WebsocketHandler.bind(this,this),this.appProcessor.refreshApps.bind(this.appProcessor));w.activateSW&&this.activateSW(w.swLink)},[{key:"activateSW",value:function(){var e=I(w().m(function e(t){var r,i;return w().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!(v.IS_WEB&&"serviceWorker"in window.navigator)){e.n=5;break}return e.p=1,e.n=2,window.navigator.serviceWorker.register(t);case 2:(r=e.v).update().then(function(){return console.log("%cSW ->>> Service worker successful updated","display: inline-block ; background-color: #689f38 ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;")}).catch(function(){return console.warn("SW ->>> Service worker is not updated")}),console.log("%cSW ->>> Service worker is registered","display: inline-block ; background-color: #689f38 ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;",r),e.n=4;break;case 3:e.p=3,i=e.v,console.warn("%cSW ->>> Service worker is not registered","display: inline-block ; background-color: #d32f2f ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;",i);case 4:e.n=6;break;case 5:console.log("%cSW ->>> ServiceWorkers not supported","display: inline-block ; background-color: #d32f2f ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;");case 6:return e.a(2)}},e,null,[[1,3]])}));return function(t){return e.apply(this,arguments)}}()},{key:"on",value:function(e,t,r){return this.pipeService.on(e,t,r),this}},{key:"emit",value:function(e,t,r,i){return this.pipeService.emit(e,t,r,i),this}},{key:"destroy",value:function(e,t,r){return this.pipeService.destroy(e,t,r),this}},{key:"prefilter",value:function(e,t){return this.util.prefilter(e,t)}},{key:"debounce",value:function(e,t){return this.util.debounce(e,t)}},{key:"emitToUser",value:function(e,t){return this.websocketsemitter.emitToUser(e,t)}},{key:"broadcastToAppSubscribers",value:function(e,t,r){return this.websocketsemitter.broadcastToAppSubscribers(e,t,r)}},{key:"getInterpretation",value:function(e,t,r,i,n,o,u){return this.interpritate.getInterpretation(e,t,r,i,n,o,u)}},{key:"getInterpretationById",value:function(e,t,r,i,n,o){return this.interpritate.getInterpretationById(e,t,r,i,n,o)}},{key:"filter",value:function(e,t){return this.util.filter(e,t)}},{key:"mergeFilters",value:function(e,t){return this.util.mergeFilters(e,t)}},{key:"group",value:function(e,t){return this.util.group(e,t)}},{key:"getFilteredItems",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.util.getFilteredItems(e,t,r.element_app_id,r.app_id,r.item_id,r.field_group,r.search,r.search_params)}},{key:"sortItems",value:function(e,t){return this.util.sortItems(e,t)}},{key:"jsonToItems",value:function(e,t){return this.util.jsonToItems(e,t)}},{key:"getDate",value:function(e){return this.util.getDate(e)}},{key:"populateWithDate",value:function(e,t){return this.util.populateWithDate(e,t)}},{key:"checkRecurringDate",value:function(e,t){return this.util.checkRecurringDate(e,t)}},{key:"populateItems",value:function(e,t,r){return this.util.populateItems(e,t,r)}},{key:"populateWithItemRef",value:function(e,t,r,i,n,o){return this.util.populateWithItemRef(e,t,r,i,n,o)}},{key:"compareItems",value:function(e,t,r){return this.util.compareItems(e,t,r)}},{key:"mergeItems",value:function(e,t,r){return this.util.mergeItems(e,t,r)}},{key:"mergeObjects",value:function(e,t){return this.util.mergeObjects(e,t)}},{key:"makeNestedList",value:function(e,t,r,i,n){return this.util.makeNestedList(e,t,r,i,n)}},{key:"jsonConstructor",value:function(e,t,r,i){return this.util.jsonConstructor(e,t,r,i)}},{key:"getAppsList",value:function(){return this.appProcessor.getAppsList()}},{key:"getAppInfo",value:function(e){return this.appProcessor.getAppInfo(e)}},{key:"deleteApp",value:function(e){return this.appProcessor.deleteApp(e)}},{key:"getApp",value:function(e){return this.appProcessor.getApp(e)}},{key:"updateApp",value:function(e){return this.appProcessor.updateApp(e)}},{key:"updateAppInfo",value:function(e){return this.appProcessor.updateAppInfo(e)}},{key:"createNewApp",value:function(e){return this.appProcessor.createNewApp(e)}},{key:"getItems",value:function(e){return this.itemProcessor.getItems(e)}},{key:"getItem",value:function(){var e=I(w().m(function e(t,r){var i;return w().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getItems(t);case 1:if(!(i=e.v)){e.n=2;break}return e.a(2,i.find(function(e){return e.item_id==r}));case 2:return e.a(2)}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"addNewItems",value:function(e,t){return this.itemProcessor.addNewItems(e,t)}},{key:"updateItems",value:function(e,t){return this.itemProcessor.updateItems(e,t)}},{key:"deleteItems",value:function(e,t){return this.itemProcessor.deleteItems(e,t)}},{key:"restoreItems",value:function(e,t){return this.itemProcessor.restoreItems(e,t)}},{key:"getField",value:function(e,t){return this.fieldProcessor.getField(e,t)}},{key:"getFieldIdByNameSpace",value:function(e,t){return this.fieldProcessor.getFieldIdByNameSpace(e,t)}},{key:"getFieldModels",value:function(e){return this.fieldProcessor.getFieldModels(e)}},{key:"updateField",value:function(e,t){return this.fieldProcessor.updateField(e,t)}},{key:"deleteField",value:function(e,t){return this.fieldProcessor.deleteField(e,t)}},{key:"getFieldValue",value:function(e,t,r){return this.fieldProcessor.getFieldValue(e,t,r)}},{key:"setFieldValue",value:function(e,t,r,i){return this.fieldProcessor.setFieldValue(e,t,r,i)}},{key:"getFile",value:function(e,t){return this.fileManager.getFile(e,t)}},{key:"getFiles",value:function(e,t){return this.fileManager.getFiles(e,t)}},{key:"uploadFile",value:function(e,t,r){return this.fileManager.uploadFile(e,t,r)}},{key:"uploadFileFromString",value:function(e,t,r,i,n,o,u){return this.fileManager.uploadFileFromString(e,t,r,i,n,o,u)}},{key:"updateFileFromString",value:function(e,t,r,i,n,o,u){return this.fileManager.updateFileFromString(e,t,r,i,n,o,u)}},{key:"deleteFile",value:function(e,t){return this.fileManager.deleteFile(e,t)}},{key:"duplicateFile",value:function(e){return this.fileManager.duplicateFile(e)}},{key:"downloadFileFromString",value:function(e,t){return this.fileManager.downloadFileFromString(e,t)}},{key:"createDocument",value:function(e){return this.documentManager.createDocument(e)}},{key:"getDocument",value:function(e){return this.documentManager.getDocument(e)}},{key:"getDocuments",value:function(e){return this.documentManager.getDocuments(e)}},{key:"deleteDocument",value:function(e){return this.documentManager.deleteDocument(e)}},{key:"login",value:function(e){return this.auth.login(e)}},{key:"loginWithToken",value:function(e){return this.auth.loginWithToken(e)}},{key:"logout",value:function(e){return this.appProcessor.clearAppProcessor(),this.auth.logout(e)}},{key:"signup",value:function(e){return this.auth.signup(e)}},{key:"getUsersList",value:function(e){return this.auth.getUsersList(e)}},{key:"updateToken",value:function(e){return this.auth.updateToken(e)}},{key:"avatarUploadApi",value:function(e){return this.auth.avatarUploadApi(e)}},{key:"getVersion",value:function(){return this.auth.getVersion()}},{key:"getUserById",value:function(e){return this.auth.getUserById(e)}},{key:"getToken",value:function(){return this.auth.getToken()}},{key:"updateUser",value:function(e){return this.auth.updateUser(e)}},{key:"updateAvatar",value:function(e){return this.auth.updateAvatar(e)}}])}();
349
349
  },{"./gudhub-https-service.js":"hDvy","./PipeService/PipeService.js":"E3xI","./Storage/Storage.js":"CSHe","./WebSocket/WebSocket.js":"pHMV","./config.js":"TPH7","./Utils/Utils.js":"mWlG","./Auth/Auth.js":"rK64","./GHConstructor/ghconstructor.js":"Htuh","./AppProcessor/AppProcessor.js":"q0my","./ItemProcessor/ItemProcessor.js":"UUd3","./FieldProcessor/FieldProcessor.js":"PoPF","./FileManager/FileManager.js":"XUT2","./ChunksManager/ChunksManager.js":"KHGc","./DocumentManager/DocumentManager.js":"K1Gs","./GHConstructor/interpritate.js":"X4Dt","./consts.js":"UV2u","./WebSocket/WebsocketHandler.js":"sPce","./Utils/sharing/GroupSharing.js":"LS0j","./Utils/sharing/GroupInvitation.js":"kPfD","./Utils/sharing/Sharing.js":"XaHW","./WebSocket/WebSocketEmitter.js":"quyV"}],"iRRN":[function(require,module,exports) {
350
350
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"GudHub",{enumerable:!0,get:function(){return e.GudHub}}),exports.default=void 0,require("regenerator-runtime/runtime.js");var e=require("./GUDHUB/gudhub.js"),r=exports.default=e.GudHub;
351
351
  },{"regenerator-runtime/runtime.js":"KA2S","./GUDHUB/gudhub.js":"U9gy"}]},{},["iRRN"], "GudHubLibrary")