@resolveio/server-lib 4.4.13-newrole → 4.4.14
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.
|
@@ -51,7 +51,9 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
|
51
51
|
});
|
|
52
52
|
DefaultSchema.index({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
|
|
53
53
|
DefaultSchema.index({ type: 1 });
|
|
54
|
-
DefaultSchema.index({
|
|
54
|
+
DefaultSchema.index({ type: 1, date: 1 });
|
|
55
|
+
DefaultSchema.index({ user: 1, date: 1 });
|
|
56
|
+
DefaultSchema.index({ user: 1, type: 1, date: 1 });
|
|
55
57
|
exports.Logs = index_1.ResolveIOServer.getMainDB().model('logs', DefaultSchema);
|
|
56
58
|
schema._id = {
|
|
57
59
|
type: mongoose_1.Schema.Types.Mixed
|
|
@@ -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
|
|
70
|
-
type: Object
|
|
71
|
-
},
|
|
72
|
-
'roles.approvals.$.name': {
|
|
70
|
+
'roles.$': {
|
|
73
71
|
type: String
|
|
74
72
|
},
|
|
75
|
-
|
|
76
|
-
type: String
|
|
73
|
+
phonenumber: {
|
|
74
|
+
type: String,
|
|
75
|
+
optional: true
|
|
77
76
|
},
|
|
78
|
-
|
|
79
|
-
type:
|
|
77
|
+
other: {
|
|
78
|
+
type: Object,
|
|
79
|
+
blackbox: true,
|
|
80
|
+
optional: true
|
|
80
81
|
},
|
|
81
|
-
|
|
82
|
-
type: Array
|
|
82
|
+
assets: {
|
|
83
|
+
type: Array,
|
|
84
|
+
optional: true
|
|
83
85
|
},
|
|
84
|
-
'
|
|
86
|
+
'assets.$': {
|
|
85
87
|
type: Object
|
|
86
88
|
},
|
|
87
|
-
'
|
|
89
|
+
'assets.$.type': {
|
|
88
90
|
type: String
|
|
89
91
|
},
|
|
90
|
-
'
|
|
91
|
-
type: Array
|
|
92
|
-
},
|
|
93
|
-
'roles.groups.$.views.$': {
|
|
92
|
+
'assets.$.id_asset': {
|
|
94
93
|
type: String
|
|
95
94
|
},
|
|
96
|
-
'
|
|
97
|
-
type: String
|
|
98
|
-
optional: true
|
|
95
|
+
'assets.$.asset_number': {
|
|
96
|
+
type: String
|
|
99
97
|
},
|
|
100
|
-
'
|
|
101
|
-
type:
|
|
98
|
+
'assets.$.ownership': {
|
|
99
|
+
type: String
|
|
102
100
|
},
|
|
103
|
-
'
|
|
101
|
+
'assets.$.ownership_driver': {
|
|
104
102
|
type: String
|
|
105
103
|
},
|
|
106
|
-
'
|
|
107
|
-
type:
|
|
104
|
+
'assets.$.date_start': {
|
|
105
|
+
type: Date
|
|
108
106
|
},
|
|
109
|
-
'
|
|
110
|
-
type:
|
|
107
|
+
'assets.$.date_end': {
|
|
108
|
+
type: Date,
|
|
109
|
+
optional: true
|
|
111
110
|
},
|
|
112
|
-
|
|
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,
|
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 mongoose_1 = require("mongoose");
|
|
41
40
|
var active_subscription_collection_1 = require("../collections/active-subscription.collection");
|
|
41
|
+
var mongoose_1 = require("mongoose");
|
|
42
42
|
function loadServerInit() {
|
|
43
43
|
return __awaiter(this, void 0, void 0, function () {
|
|
44
44
|
var appVersion;
|
package/package.json
CHANGED
|
@@ -174,8 +174,10 @@ function buildTree(current_root, schemaTree, lookup) {
|
|
|
174
174
|
columnName: common_1.toTitleCase(key.replace(/\_/g, ' ')),
|
|
175
175
|
fieldName: key,
|
|
176
176
|
fieldType: schemaTree[key].rbType,
|
|
177
|
+
fieldTypeName: schemaTree[key].rbType === 'String' ? 'Text' : (schemaTree[key].rbType === 'Boolean' ? 'T/F' : schemaTree[key].rbType),
|
|
177
178
|
distinctFieldValues: [],
|
|
178
179
|
fieldPath: lookup ? lookup.lookup_as + '.$.' + key : key,
|
|
180
|
+
fieldPathName: lookup ? (common_1.toTitleCase(lookup.lookup_as.replace(/\.\$\./g, ' (List) -> ').replace(/\./g, ' (Group) -> '))) + ' (List) -> ' + (common_1.toTitleCase(key.replace(/\.\$\./g, ' (List) -> ').replace(/\./g, ' (Group) -> '))) : common_1.toTitleCase(key.replace(/\.\$\./g, ' (List) -> ').replace(/\./g, ' (Group) -> ')),
|
|
179
181
|
lookup_collection: lookup ? lookup.lookup_collection : (schemaTree[key].lookup_collection ? schemaTree[key].lookup_collection : ''),
|
|
180
182
|
lookup_local_key: lookup ? lookup.lookup_local_key : (schemaTree[key].lookup_collection ? schemaTree[key].local_key : ''),
|
|
181
183
|
lookup_foreign_key: lookup ? lookup.lookup_foreign_key : (schemaTree[key].lookup_collection ? schemaTree[key].lookup_key : ''),
|
|
@@ -196,8 +198,10 @@ function buildTree(current_root, schemaTree, lookup) {
|
|
|
196
198
|
columnName: common_1.toTitleCase(key.replace(/\_/g, ' ')),
|
|
197
199
|
fieldName: key,
|
|
198
200
|
fieldType: schemaTree[key].lookup_collection ? 'Lookup' : schemaTree[key].rbType,
|
|
201
|
+
fieldTypeName: schemaTree[key].lookup_collection ? 'Lookup' : (schemaTree[key].rbType === 'Array' ? 'List' : 'Group'),
|
|
199
202
|
distinctFieldValues: [],
|
|
200
203
|
fieldPath: lookup ? lookup.lookup_as + '.$.' + key : key,
|
|
204
|
+
fieldPathName: lookup ? (common_1.toTitleCase(lookup.lookup_as.replace(/\.\$\./g, ' (List) -> ').replace(/\./g, ' (Group) -> '))) + ' (List) -> ' + (common_1.toTitleCase(key.replace(/\.\$\./g, ' (List) -> ').replace(/\./g, ' (Group) -> '))) : common_1.toTitleCase(key.replace(/\.\$\./g, ' (List) -> ').replace(/\./g, ' (Group) -> ')),
|
|
201
205
|
lookup_collection: lookup ? lookup.lookup_collection : (schemaTree[key].lookup_collection ? schemaTree[key].lookup_collection : ''),
|
|
202
206
|
lookup_local_key: lookup ? lookup.lookup_local_key : (schemaTree[key].lookup_collection ? schemaTree[key].local_key : ''),
|
|
203
207
|
lookup_foreign_key: lookup ? lookup.lookup_foreign_key : (schemaTree[key].lookup_collection ? schemaTree[key].lookup_key : ''),
|
|
@@ -231,8 +235,10 @@ function buildTree(current_root, schemaTree, lookup) {
|
|
|
231
235
|
columnName: common_1.toTitleCase(key.replace(/\_/g, ' ')),
|
|
232
236
|
fieldName: layer,
|
|
233
237
|
fieldType: schemaTree[key].rbType,
|
|
238
|
+
fieldTypeName: schemaTree[key].rbType === 'String' ? 'Text' : (schemaTree[key].rbType === 'Boolean' ? 'T/F' : schemaTree[key].rbType),
|
|
234
239
|
distinctFieldValues: [],
|
|
235
240
|
fieldPath: lookup ? lookup.lookup_as + '.$.' + key : key,
|
|
241
|
+
fieldPathName: lookup ? (common_1.toTitleCase(lookup.lookup_as.replace(/\.\$\./g, ' (List) -> ').replace(/\./g, ' (Group) -> '))) + ' (List) -> ' + (common_1.toTitleCase(key.replace(/\.\$\./g, ' (List) -> ').replace(/\./g, ' (Group) -> '))) : common_1.toTitleCase(key.replace(/\.\$\./g, ' (List) -> ').replace(/\./g, ' (Group) -> ')),
|
|
236
242
|
lookup_collection: lookup ? lookup.lookup_collection : (schemaTree[key].lookup_collection ? schemaTree[key].lookup_collection : ''),
|
|
237
243
|
lookup_local_key: lookup ? lookup.lookup_local_key : (schemaTree[key].lookup_collection ? schemaTree[key].local_key : ''),
|
|
238
244
|
lookup_foreign_key: lookup ? lookup.lookup_foreign_key : (schemaTree[key].lookup_collection ? schemaTree[key].lookup_key : ''),
|
|
@@ -253,8 +259,10 @@ function buildTree(current_root, schemaTree, lookup) {
|
|
|
253
259
|
columnName: common_1.toTitleCase(key.replace(/\_/g, ' ')),
|
|
254
260
|
fieldName: layer,
|
|
255
261
|
fieldType: schemaTree[key].lookup_collection ? 'Lookup' : schemaTree[key].rbType,
|
|
262
|
+
fieldTypeName: schemaTree[key].lookup_collection ? 'Lookup' : (schemaTree[key].rbType === 'Array' ? 'List' : 'Group'),
|
|
256
263
|
distinctFieldValues: [],
|
|
257
264
|
fieldPath: lookup ? lookup.lookup_as + '.$.' + key : key,
|
|
265
|
+
fieldPathName: lookup ? (common_1.toTitleCase(lookup.lookup_as.replace(/\.\$\./g, ' (List) -> ').replace(/\./g, ' (Group) -> '))) + ' (List) -> ' + (common_1.toTitleCase(key.replace(/\.\$\./g, ' (List) -> ').replace(/\./g, ' (Group) -> '))) : common_1.toTitleCase(key.replace(/\.\$\./g, ' (List) -> ').replace(/\./g, ' (Group) -> ')),
|
|
258
266
|
lookup_collection: lookup ? lookup.lookup_collection : (schemaTree[key].lookup_collection ? schemaTree[key].lookup_collection : ''),
|
|
259
267
|
lookup_local_key: lookup ? lookup.lookup_local_key : (schemaTree[key].lookup_collection ? schemaTree[key].local_key : ''),
|
|
260
268
|
lookup_foreign_key: lookup ? lookup.lookup_foreign_key : (schemaTree[key].lookup_collection ? schemaTree[key].lookup_key : ''),
|