@resolveio/server-lib 4.4.12 → 4.4.13-newrole

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.
@@ -22,13 +22,6 @@ var schema = {
22
22
  type: Date,
23
23
  optional: true
24
24
  },
25
- readonly: {
26
- type: Boolean,
27
- optional: true
28
- },
29
- active: {
30
- type: Boolean
31
- },
32
25
  attempts: {
33
26
  type: Number,
34
27
  optional: true
@@ -65,53 +58,67 @@ var schema = {
65
58
  type: String
66
59
  },
67
60
  roles: {
61
+ type: Object
62
+ },
63
+ 'roles.super_admin': {
64
+ type: Boolean
65
+ },
66
+ 'roles.approvals': {
68
67
  type: Array
69
68
  },
70
- 'roles.$': {
69
+ 'roles.approvals.$': {
70
+ type: Object
71
+ },
72
+ 'roles.approvals.$.name': {
71
73
  type: String
72
74
  },
73
- phonenumber: {
74
- type: String,
75
- optional: true
75
+ 'roles.approvals.$.type': {
76
+ type: String
76
77
  },
77
- other: {
78
- type: Object,
79
- blackbox: true,
80
- optional: true
78
+ 'roles.approvals.$.accounting_code': {
79
+ type: String
81
80
  },
82
- assets: {
83
- type: Array,
84
- optional: true
81
+ 'roles.groups': {
82
+ type: Array
85
83
  },
86
- 'assets.$': {
84
+ 'roles.groups.$': {
87
85
  type: Object
88
86
  },
89
- 'assets.$.type': {
87
+ 'roles.groups.$.name': {
90
88
  type: String
91
89
  },
92
- 'assets.$.id_asset': {
93
- type: String
90
+ 'roles.groups.$.views': {
91
+ type: Array
94
92
  },
95
- 'assets.$.asset_number': {
93
+ 'roles.groups.$.views.$': {
96
94
  type: String
97
95
  },
98
- 'assets.$.ownership': {
99
- type: String
96
+ 'roles.groups.$.yard': {
97
+ type: String,
98
+ optional: true
99
+ },
100
+ 'roles.notifications': {
101
+ type: Array
100
102
  },
101
- 'assets.$.ownership_driver': {
103
+ 'roles.notifications.$': {
102
104
  type: String
103
105
  },
104
- 'assets.$.date_start': {
105
- type: Date
106
+ 'roles.miscs': {
107
+ type: Array
106
108
  },
107
- 'assets.$.date_end': {
108
- type: Date,
109
- optional: true
109
+ 'roles.miscs.$': {
110
+ type: String
110
111
  },
111
- id_function: {
112
+ active: Boolean,
113
+ phonenumber: {
112
114
  type: String,
113
115
  optional: true
114
116
  },
117
+ other: {
118
+ type: Object,
119
+ optional: true,
120
+ blackbox: true
121
+ },
115
122
  customers: {
116
123
  type: Array,
117
124
  optional: true,
package/fixtures/init.js CHANGED
@@ -37,8 +37,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
37
37
  Object.defineProperty(exports, "__esModule", { value: true });
38
38
  var app_version_collection_1 = require("../collections/app-version.collection");
39
39
  var logged_in_users_collection_1 = require("../collections/logged-in-users.collection");
40
- var active_subscription_collection_1 = require("../collections/active-subscription.collection");
41
40
  var mongoose_1 = require("mongoose");
41
+ var active_subscription_collection_1 = require("../collections/active-subscription.collection");
42
42
  function loadServerInit() {
43
43
  return __awaiter(this, void 0, void 0, function () {
44
44
  var appVersion;
@@ -211,7 +211,7 @@ var MethodManager = /** @class */ (function () {
211
211
  type: 'client-response',
212
212
  title: 'Client Response',
213
213
  message: 'User: ' + ws['user'] + ', MessageId: ' + sendItem.data.messageId + ', Method: ' + sendItem.method,
214
- payload: JSON.stringify([sendItem.methodData, sendItem.data]),
214
+ payload: JSON.stringify([sendItem.methodData, sendItem.data], null, 2),
215
215
  method: sendItem.method,
216
216
  user: ws['user'],
217
217
  messageId: sendItem.data.messageId
@@ -71,7 +71,7 @@ var QueueMethodManager = /** @class */ (function () {
71
71
  type: 'client-response',
72
72
  title: 'Client Response',
73
73
  message: 'User: ' + ws['user'] + ', MessageId: ' + sendItem.messageId + ', Method: ' + sendItem.method,
74
- payload: JSON.stringify([sendItem.methodData, sendItem.response]),
74
+ payload: JSON.stringify([sendItem.methodData, sendItem.response], null, 2),
75
75
  method: sendItem.method,
76
76
  user: ws['user'],
77
77
  messageId: sendItem.messageId
@@ -59,7 +59,7 @@ var SupportManager = /** @class */ (function () {
59
59
  type: 'client-response',
60
60
  title: 'Client Response - Support',
61
61
  message: 'User: ' + ws['user'] + ', MessageId: ' + sendItem.data.messageId + ', Support Method: ' + sendItem.method,
62
- payload: JSON.stringify([sendItem.methodData, sendItem.data]),
62
+ payload: JSON.stringify([sendItem.methodData, sendItem.data], null, 2),
63
63
  method: sendItem.method,
64
64
  user: ws['user'],
65
65
  messageId: sendItem.data.messageId
@@ -99,7 +99,7 @@ function loadCollectionMethods(methodManager) {
99
99
  type: 'info',
100
100
  title: 'Insert Document',
101
101
  message: 'User: ' + _this.user + ', Collection Type: ' + collection,
102
- payload: JSON.stringify(document),
102
+ payload: JSON.stringify(document, null, 2),
103
103
  method: 'insertDocument',
104
104
  user: _this.user,
105
105
  messageId: ''
@@ -191,7 +191,7 @@ function loadCollectionMethods(methodManager) {
191
191
  type: 'info',
192
192
  title: 'Update Document',
193
193
  message: 'User: ' + _this.user + ', Collection Type: ' + collection,
194
- payload: JSON.stringify(f_document),
194
+ payload: JSON.stringify(f_document, null, 2),
195
195
  method: 'updateDocument',
196
196
  user: _this.user,
197
197
  messageId: ''
@@ -335,7 +335,7 @@ function loadCollectionMethods(methodManager) {
335
335
  type: 'info',
336
336
  title: 'Update Document Props',
337
337
  message: 'User: ' + _this.user + ', Collection Type: ' + collection + ', Id: ' + doc_id + ', ' + 'Version: ' + doc__v,
338
- payload: JSON.stringify(updateParams),
338
+ payload: JSON.stringify(updateParams, null, 2),
339
339
  method: 'updateDocumentProps',
340
340
  user: _this.user,
341
341
  messageId: ''
@@ -468,7 +468,7 @@ function loadCollectionMethods(methodManager) {
468
468
  type: 'info',
469
469
  title: 'Update Document',
470
470
  message: 'User: ' + _this.user + ', Collection Type: ' + collection,
471
- payload: JSON.stringify(f_document),
471
+ payload: JSON.stringify(f_document, null, 2),
472
472
  method: 'updateDocumentOffline',
473
473
  user: _this.user,
474
474
  messageId: ''
@@ -611,7 +611,7 @@ function loadCollectionMethods(methodManager) {
611
611
  type: 'info',
612
612
  title: 'Update Document Props',
613
613
  message: 'User: ' + _this.user + ', Collection Type: ' + collection + ', Id: ' + doc_id + ', ' + 'Version: ' + doc__v,
614
- payload: JSON.stringify(updateParams),
614
+ payload: JSON.stringify(updateParams, null, 2),
615
615
  method: 'updateDocumentPropsOffline',
616
616
  user: _this.user,
617
617
  messageId: ''
@@ -694,7 +694,7 @@ function loadCollectionMethods(methodManager) {
694
694
  type: 'info',
695
695
  title: 'Remove Document',
696
696
  message: 'User: ' + _this.user + ', Collection Type: ' + collection,
697
- payload: JSON.stringify({ _id: doc_id }),
697
+ payload: JSON.stringify({ _id: doc_id }, null, 2),
698
698
  method: 'removeDocument',
699
699
  user: _this.user,
700
700
  messageId: ''
@@ -729,7 +729,7 @@ function loadCollectionMethods(methodManager) {
729
729
  type: 'info',
730
730
  title: 'Remove Document (Query)',
731
731
  message: 'User: ' + _this.user + ', Collection Type: ' + collection,
732
- payload: JSON.stringify({ _id: query }),
732
+ payload: JSON.stringify({ _id: query }, null, 2),
733
733
  method: 'removeDocumentWithQuery',
734
734
  user: _this.user,
735
735
  messageId: ''
package/methods/logs.js CHANGED
@@ -18,7 +18,7 @@ function loadLogMethods(methodManager) {
18
18
  type: 'error',
19
19
  title: 'Error - User: ' + this.user,
20
20
  message: message,
21
- payload: JSON.stringify(data),
21
+ payload: JSON.stringify(data, null, 2),
22
22
  method: '',
23
23
  user: this.user,
24
24
  messageId: ''
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resolveio/server-lib",
3
- "version": "4.4.12",
3
+ "version": "4.4.13-newrole",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "scripts": {
package/server-app.js CHANGED
@@ -372,7 +372,7 @@ var ResolveIOMainServer = /** @class */ (function () {
372
372
  type: 'client-request',
373
373
  title: 'Client Request - Method',
374
374
  message: 'User: ' + ws['user'] + ', Type: ' + type + ', MessageId: ' + messageId + ', Method: ' + method,
375
- payload: JSON.stringify(data),
375
+ payload: JSON.stringify(data, null, 2),
376
376
  method: method,
377
377
  user: ws['user'],
378
378
  messageId: messageId
@@ -493,7 +493,7 @@ var ResolveIOMainServer = /** @class */ (function () {
493
493
  type: 'client-request',
494
494
  title: 'Client Request - Method Retry',
495
495
  message: 'User: ' + ws['user'] + ', Type: ' + type + ', MessageId: ' + messageId + ', Method: ' + method,
496
- payload: JSON.stringify(data),
496
+ payload: JSON.stringify(data, null, 2),
497
497
  method: method,
498
498
  user: ws['user'],
499
499
  messageId: messageId
@@ -580,7 +580,7 @@ var ResolveIOMainServer = /** @class */ (function () {
580
580
  type: 'client-request',
581
581
  title: 'Client Request - Support',
582
582
  message: 'User: ' + ws['user'] + ', Type: ' + type + ', MessageId: ' + messageId + ', Support Method: ' + supportMethod,
583
- payload: JSON.stringify(data),
583
+ payload: JSON.stringify(data, null, 2),
584
584
  method: supportMethod,
585
585
  user: ws['user'],
586
586
  messageId: messageId
@@ -95,7 +95,7 @@ function loadSupportCollectionMethods(supportManager) {
95
95
  type: 'info',
96
96
  title: 'Insert Document',
97
97
  message: 'User: ' + _this.user + ', Collection Type: ' + collection,
98
- payload: JSON.stringify(document),
98
+ payload: JSON.stringify(document, null, 2),
99
99
  method: 'insertDocument',
100
100
  user: _this.user,
101
101
  messageId: ''
@@ -186,7 +186,7 @@ function loadSupportCollectionMethods(supportManager) {
186
186
  type: 'info',
187
187
  title: 'Update Document',
188
188
  message: 'User: ' + _this.user + ', Collection Type: ' + collection,
189
- payload: JSON.stringify(f_document),
189
+ payload: JSON.stringify(f_document, null, 2),
190
190
  method: 'updateDocument',
191
191
  user: _this.user,
192
192
  messageId: ''
@@ -327,7 +327,7 @@ function loadSupportCollectionMethods(supportManager) {
327
327
  type: 'info',
328
328
  title: 'Update Document Props',
329
329
  message: 'User: ' + _this.user + ', Collection Type: ' + collection + ', Id: ' + doc_id + ', ' + 'Version: ' + doc__v,
330
- payload: JSON.stringify(updateParams),
330
+ payload: JSON.stringify(updateParams, null, 2),
331
331
  method: 'updateDocumentProps',
332
332
  user: _this.user,
333
333
  messageId: ''
@@ -415,7 +415,7 @@ function loadSupportCollectionMethods(supportManager) {
415
415
  type: 'info',
416
416
  title: 'Remove Document',
417
417
  message: 'User: ' + _this.user + ', Collection Type: ' + collection,
418
- payload: JSON.stringify({ _id: doc_id }),
418
+ payload: JSON.stringify({ _id: doc_id }, null, 2),
419
419
  method: 'removeDocument',
420
420
  user: _this.user,
421
421
  messageId: ''
@@ -450,7 +450,7 @@ function loadSupportCollectionMethods(supportManager) {
450
450
  type: 'info',
451
451
  title: 'Remove Document (Query)',
452
452
  message: 'User: ' + _this.user + ', Collection Type: ' + collection,
453
- payload: JSON.stringify({ _id: query }),
453
+ payload: JSON.stringify({ _id: query }, null, 2),
454
454
  method: 'removeDocumentWithQuery',
455
455
  user: _this.user,
456
456
  messageId: ''