@resolveio/server-lib 6.1.3 → 6.1.5-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.
- package/collections/user.collection.js +39 -32
- package/collections/user.collection.js.map +1 -1
- package/fixtures/init.js +0 -4
- package/fixtures/init.js.map +1 -1
- package/managers/subscription.manager.js +150 -243
- package/managers/subscription.manager.js.map +1 -1
- package/methods/accounts.js.map +1 -1
- package/methods/cron-jobs.js.map +1 -1
- package/package.json +1 -1
- package/publications/super-admin.js +0 -7
- package/publications/super-admin.js.map +1 -1
- package/collections/active-subscription.collection.d.ts +0 -7
- package/collections/active-subscription.collection.js +0 -70
- package/collections/active-subscription.collection.js.map +0 -1
- package/models/active-subscription.model.d.ts +0 -13
- package/models/active-subscription.model.js +0 -4
- package/models/active-subscription.model.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var logged_in_users_collection_1 = require("../collections/logged-in-users.collection");
|
|
4
|
-
var active_subscription_collection_1 = require("../collections/active-subscription.collection");
|
|
5
4
|
function loadSuperAdminPublications(subscriptionManager) {
|
|
6
5
|
subscriptionManager.publications({
|
|
7
6
|
loggedInUsers: {
|
|
@@ -9,12 +8,6 @@ function loadSuperAdminPublications(subscriptionManager) {
|
|
|
9
8
|
return logged_in_users_collection_1.LoggedInUsers.find({}).sort({ user: 1 }).exec();
|
|
10
9
|
},
|
|
11
10
|
collections: ['logged-in-users']
|
|
12
|
-
},
|
|
13
|
-
currentSubscriptions: {
|
|
14
|
-
function: function () {
|
|
15
|
-
return active_subscription_collection_1.ActiveSubscriptions.find({}).sort({ publication: 1 }).exec();
|
|
16
|
-
},
|
|
17
|
-
collections: ['active-subscriptions']
|
|
18
11
|
}
|
|
19
12
|
});
|
|
20
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/publications/super-admin.ts"],"names":[],"mappings":";;AACA,wFAA0E;
|
|
1
|
+
{"version":3,"sources":["../../src/publications/super-admin.ts"],"names":[],"mappings":";;AACA,wFAA0E;AAE1E,SAAgB,0BAA0B,CAAC,mBAAwC;IAClF,mBAAmB,CAAC,YAAY,CAAC;QAChC,aAAa,EAAE;YACd,QAAQ,EAAE;gBACT,OAAO,0CAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC,IAAI,EAAE,CAAC;YACtD,CAAC;YACD,WAAW,EAAE,CAAC,iBAAiB,CAAC;SAChC;KACD,CAAC,CAAC;AACJ,CAAC;AATD,gEASC","file":"super-admin.js","sourcesContent":["import { SubscriptionManager } from '../managers/subscription.manager';\nimport { LoggedInUsers } from '../collections/logged-in-users.collection';\n\nexport function loadSuperAdminPublications(subscriptionManager: SubscriptionManager) {\n\tsubscriptionManager.publications({\n\t\tloggedInUsers: {\n\t\t\tfunction: function() {\n\t\t\t\treturn LoggedInUsers.find({}).sort({user: 1}).exec();\n\t\t\t},\n\t\t\tcollections: ['logged-in-users']\n\t\t}\n\t});\n}"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Model, Document } from 'mongoose';
|
|
2
|
-
import { ActiveSubscriptionModel } from '../models/active-subscription.model';
|
|
3
|
-
interface ResolveIOModel extends ActiveSubscriptionModel, Document {
|
|
4
|
-
}
|
|
5
|
-
export declare const ActiveSubscriptions: Model<ResolveIOModel>;
|
|
6
|
-
export declare const ActiveSubscriptionVersions: Model<ResolveIOModel>;
|
|
7
|
-
export {};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var mongoose_1 = require("mongoose");
|
|
4
|
-
var index_1 = require("../index");
|
|
5
|
-
var schema = {
|
|
6
|
-
_id: {
|
|
7
|
-
type: String,
|
|
8
|
-
optional: true
|
|
9
|
-
},
|
|
10
|
-
__v: {
|
|
11
|
-
type: Number,
|
|
12
|
-
optional: true
|
|
13
|
-
},
|
|
14
|
-
updatedAt: {
|
|
15
|
-
type: Date,
|
|
16
|
-
optional: true
|
|
17
|
-
},
|
|
18
|
-
createdAt: {
|
|
19
|
-
type: Date,
|
|
20
|
-
optional: true
|
|
21
|
-
},
|
|
22
|
-
date: {
|
|
23
|
-
type: Date
|
|
24
|
-
},
|
|
25
|
-
publication: {
|
|
26
|
-
type: String
|
|
27
|
-
},
|
|
28
|
-
subData: {
|
|
29
|
-
type: String
|
|
30
|
-
},
|
|
31
|
-
collections: {
|
|
32
|
-
type: Array
|
|
33
|
-
},
|
|
34
|
-
'collections.$': {
|
|
35
|
-
type: String
|
|
36
|
-
},
|
|
37
|
-
clients: {
|
|
38
|
-
type: Array
|
|
39
|
-
},
|
|
40
|
-
'clients.$': {
|
|
41
|
-
type: Object
|
|
42
|
-
},
|
|
43
|
-
'clients.$.id_user': {
|
|
44
|
-
type: String
|
|
45
|
-
},
|
|
46
|
-
'clients.$.messageId': {
|
|
47
|
-
type: Number
|
|
48
|
-
},
|
|
49
|
-
'clients.$.id_socket': {
|
|
50
|
-
type: String
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
54
|
-
skipVersioning: true,
|
|
55
|
-
versionKey: false,
|
|
56
|
-
timestamps: true
|
|
57
|
-
});
|
|
58
|
-
exports.ActiveSubscriptions = index_1.ResolveIOServer.getMainDB().model('active-subscriptions', DefaultSchema);
|
|
59
|
-
schema._id = {
|
|
60
|
-
type: mongoose_1.Schema.Types.Mixed
|
|
61
|
-
};
|
|
62
|
-
var VersionSchema = new mongoose_1.Schema(schema, {
|
|
63
|
-
skipVersioning: true,
|
|
64
|
-
versionKey: false,
|
|
65
|
-
timestamps: true
|
|
66
|
-
});
|
|
67
|
-
exports.ActiveSubscriptions['versionCollection'] = 'active-subscriptions.versions';
|
|
68
|
-
exports.ActiveSubscriptionVersions = index_1.ResolveIOServer.getMainDB().model(exports.ActiveSubscriptions['versionCollection'], VersionSchema);
|
|
69
|
-
|
|
70
|
-
//# sourceMappingURL=active-subscription.collection.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/active-subscription.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AAEnD,kCAA2C;AAE3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,KAAK;KACX;IACD,eAAe,EAAE;QAChB,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,KAAK;KACX;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,MAAM;KACZ;IACD,mBAAmB,EAAE;QACpB,IAAI,EAAE,MAAM;KACZ;IACD,qBAAqB,EAAE;QACtB,IAAI,EAAE,MAAM;KACZ;IACD,qBAAqB,EAAE;QACtB,IAAI,EAAE,MAAM;KACZ;CACD,CAAC;AAEF,IAAM,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACxC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAGU,QAAA,mBAAmB,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,sBAAsB,EAAE,aAAa,CAAC,CAAC;AAEnI,MAAM,CAAC,GAAG,GAAG;IACZ,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;CACxB,CAAC;AAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACtC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,2BAAmB,CAAC,mBAAmB,CAAC,GAAG,+BAA+B,CAAC;AAE9D,QAAA,0BAA0B,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,2BAAmB,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC","file":"active-subscription.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport { ActiveSubscriptionModel } from '../models/active-subscription.model';\nimport { ResolveIOServer } from '../index';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tpublication: { \n\t\ttype: String\n\t},\n\tsubData: {\n\t\ttype: String\n\t},\n\tcollections: {\n\t\ttype: Array\n\t},\n\t'collections.$': {\n\t\ttype: String\n\t},\n\tclients: {\n\t\ttype: Array\n\t},\n\t'clients.$': {\n\t\ttype: Object\n\t},\n\t'clients.$.id_user': {\n\t\ttype: String\n\t},\n\t'clients.$.messageId': {\n\t\ttype: Number\n\t},\n\t'clients.$.id_socket': {\n\t\ttype: String\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\ninterface ResolveIOModel extends ActiveSubscriptionModel, Document {}\nexport const ActiveSubscriptions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('active-subscriptions', DefaultSchema);\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nActiveSubscriptions['versionCollection'] = 'active-subscriptions.versions';\n\nexport const ActiveSubscriptionVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(ActiveSubscriptions['versionCollection'], VersionSchema);"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { CollectionDocument } from './collection-document.model';
|
|
2
|
-
export interface ActiveSubscriptionModel extends CollectionDocument {
|
|
3
|
-
date: Date;
|
|
4
|
-
publication: string;
|
|
5
|
-
subData: string | Object;
|
|
6
|
-
collections: string[];
|
|
7
|
-
clients: ActiveSubscriptionClientModel[];
|
|
8
|
-
}
|
|
9
|
-
export interface ActiveSubscriptionClientModel {
|
|
10
|
-
id_user: string;
|
|
11
|
-
messageId: number;
|
|
12
|
-
id_socket: string;
|
|
13
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/models/active-subscription.model.ts"],"names":[],"mappings":"","file":"active-subscription.model.js","sourcesContent":["import { CollectionDocument } from './collection-document.model';\n\nexport interface ActiveSubscriptionModel extends CollectionDocument {\n\tdate: Date;\n\tpublication: string;\n\tsubData: string | Object;\n\tcollections: string[];\n\tclients: ActiveSubscriptionClientModel[];\n}\n\nexport interface ActiveSubscriptionClientModel {\n\tid_user: string;\n\tmessageId: number;\n\tid_socket: string;\n}"]}
|