@resolveio/server-lib 5.2.21-newrole → 5.2.22

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,6 +22,13 @@ 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
+ },
25
32
  attempts: {
26
33
  type: Number,
27
34
  optional: true
@@ -58,67 +65,53 @@ var schema = {
58
65
  type: String
59
66
  },
60
67
  roles: {
61
- type: Object
62
- },
63
- 'roles.super_admin': {
64
- type: Boolean
65
- },
66
- 'roles.approvals': {
67
68
  type: Array
68
69
  },
69
- 'roles.approvals.$': {
70
- type: Object
71
- },
72
- 'roles.approvals.$.name': {
70
+ 'roles.$': {
73
71
  type: String
74
72
  },
75
- 'roles.approvals.$.type': {
76
- type: String
73
+ phonenumber: {
74
+ type: String,
75
+ optional: true
77
76
  },
78
- 'roles.approvals.$.accounting_code': {
79
- type: String
77
+ other: {
78
+ type: Object,
79
+ blackbox: true,
80
+ optional: true
80
81
  },
81
- 'roles.groups': {
82
- type: Array
82
+ assets: {
83
+ type: Array,
84
+ optional: true
83
85
  },
84
- 'roles.groups.$': {
86
+ 'assets.$': {
85
87
  type: Object
86
88
  },
87
- 'roles.groups.$.name': {
89
+ 'assets.$.type': {
88
90
  type: String
89
91
  },
90
- 'roles.groups.$.views': {
91
- type: Array
92
- },
93
- 'roles.groups.$.views.$': {
92
+ 'assets.$.id_asset': {
94
93
  type: String
95
94
  },
96
- 'roles.groups.$.yard': {
97
- type: String,
98
- optional: true
95
+ 'assets.$.asset_number': {
96
+ type: String
99
97
  },
100
- 'roles.notifications': {
101
- type: Array
98
+ 'assets.$.ownership': {
99
+ type: String
102
100
  },
103
- 'roles.notifications.$': {
101
+ 'assets.$.ownership_driver': {
104
102
  type: String
105
103
  },
106
- 'roles.miscs': {
107
- type: Array
104
+ 'assets.$.date_start': {
105
+ type: Date
108
106
  },
109
- 'roles.miscs.$': {
110
- type: String
107
+ 'assets.$.date_end': {
108
+ type: Date,
109
+ optional: true
111
110
  },
112
- active: Boolean,
113
- phonenumber: {
111
+ id_function: {
114
112
  type: String,
115
113
  optional: true
116
114
  },
117
- other: {
118
- type: Object,
119
- optional: true,
120
- blackbox: true
121
- },
122
115
  customers: {
123
116
  type: Array,
124
117
  optional: true,
@@ -601,7 +601,7 @@ var SubscriptionManager = /** @class */ (function () {
601
601
  if (!sub.collections.includes(oplog.collection)) return [3 /*break*/, 16];
602
602
  if (!sub.preSubscriptionData) return [3 /*break*/, 5];
603
603
  if (!that._publications[sub.publication].fetchFunction(oplog.doc, sub.preSubscriptionData)) return [3 /*break*/, 5];
604
- if (!!uniquePubs.filter(function (a) { return a.publication === sub.publication && JSON.stringify(a.subscriptionData) === JSON.stringify(sub.subscriptionData); }).length) return [3 /*break*/, 4];
604
+ if (!!uniquePubs.filter(function (a) { return a.publication === sub.publication && JSON.stringify(a.subscriptionData) === JSON.stringify(sub.subscriptionData) && JSON.stringify(a.preSubscriptionData) === JSON.stringify(sub.preSubscriptionData); }).length) return [3 /*break*/, 4];
605
605
  if (!!sub.clients.length) return [3 /*break*/, 2];
606
606
  that._subscriptions.splice(j, 1);
607
607
  return [4 /*yield*/, active_subscription_collection_1.ActiveSubscriptions.deleteOne({
@@ -642,7 +642,7 @@ var SubscriptionManager = /** @class */ (function () {
642
642
  }
643
643
  return [3 /*break*/, 8];
644
644
  case 7:
645
- if (!uniquePubs.filter(function (a) { return a.publication === sub.publication && JSON.stringify(a.subscriptionData) === JSON.stringify(sub.subscriptionData); }).length) {
645
+ if (!uniquePubs.filter(function (a) { return a.publication === sub.publication && JSON.stringify(a.subscriptionData) === JSON.stringify(sub.subscriptionData) && JSON.stringify(a.preSubscriptionData) === JSON.stringify(sub.preSubscriptionData); }).length) {
646
646
  sub['oplog'] = oplog;
647
647
  uniquePubs.push(sub);
648
648
  }
@@ -651,7 +651,7 @@ var SubscriptionManager = /** @class */ (function () {
651
651
  case 9:
652
652
  if (!that._publications[sub.publication].fetchFunction) return [3 /*break*/, 13];
653
653
  if (!(_a = that._publications[sub.publication]).fetchFunction.apply(_a, [oplog.doc].concat(sub.subscriptionData))) return [3 /*break*/, 12];
654
- if (!!uniquePubs.filter(function (a) { return a.publication === sub.publication && JSON.stringify(a.subscriptionData) === JSON.stringify(sub.subscriptionData); }).length) return [3 /*break*/, 12];
654
+ if (!!uniquePubs.filter(function (a) { return a.publication === sub.publication && JSON.stringify(a.subscriptionData) === JSON.stringify(sub.subscriptionData) && JSON.stringify(a.preSubscriptionData) === JSON.stringify(sub.preSubscriptionData); }).length) return [3 /*break*/, 12];
655
655
  if (!!sub.clients.length) return [3 /*break*/, 11];
656
656
  that._subscriptions.splice(j, 1);
657
657
  return [4 /*yield*/, active_subscription_collection_1.ActiveSubscriptions.deleteOne({
@@ -673,7 +673,7 @@ var SubscriptionManager = /** @class */ (function () {
673
673
  _b.label = 12;
674
674
  case 12: return [3 /*break*/, 16];
675
675
  case 13:
676
- if (!!uniquePubs.filter(function (a) { return a.publication === sub.publication && JSON.stringify(a.subscriptionData) === JSON.stringify(sub.subscriptionData); }).length) return [3 /*break*/, 16];
676
+ if (!!uniquePubs.filter(function (a) { return a.publication === sub.publication && JSON.stringify(a.subscriptionData) === JSON.stringify(sub.subscriptionData) && JSON.stringify(a.preSubscriptionData) === JSON.stringify(sub.preSubscriptionData); }).length) return [3 /*break*/, 16];
677
677
  if (!!sub.clients.length) return [3 /*break*/, 15];
678
678
  that._subscriptions.splice(j, 1);
679
679
  return [4 /*yield*/, active_subscription_collection_1.ActiveSubscriptions.deleteOne({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resolveio/server-lib",
3
- "version": "5.2.21-newrole",
3
+ "version": "5.2.22",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "scripts": {