@resolveio/server-lib 4.0.15-newrole → 4.0.16
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/log-subscription.collection.d.ts +7 -0
- package/collections/log-subscription.collection.js +55 -0
- package/collections/user.collection.js +32 -39
- package/fixtures/init.js +1 -1
- package/managers/subscription.manager.js +44 -42
- package/methods/logs.js +14 -0
- package/models/log-subscription.model.d.ts +8 -0
- package/models/log-subscription.model.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Model, Document } from 'mongoose';
|
|
2
|
+
import { LogSubscriptionModel } from '../models/log-subscription.model';
|
|
3
|
+
interface ResolveIOModel extends LogSubscriptionModel, Document {
|
|
4
|
+
}
|
|
5
|
+
export declare const LogSubscriptions: Model<ResolveIOModel>;
|
|
6
|
+
export declare const LogSubscriptionVersions: Model<ResolveIOModel>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
type: {
|
|
26
|
+
type: String
|
|
27
|
+
},
|
|
28
|
+
subscription: {
|
|
29
|
+
type: String
|
|
30
|
+
},
|
|
31
|
+
collection: {
|
|
32
|
+
type: String
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
36
|
+
skipVersioning: true,
|
|
37
|
+
versionKey: false,
|
|
38
|
+
timestamps: true
|
|
39
|
+
});
|
|
40
|
+
DefaultSchema.index({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
|
|
41
|
+
DefaultSchema.index({ type: 1 });
|
|
42
|
+
DefaultSchema.index({ subscription: 1 });
|
|
43
|
+
DefaultSchema.index({ collection_name: 1 });
|
|
44
|
+
DefaultSchema.index({ date: 1, type: 1 });
|
|
45
|
+
exports.LogSubscriptions = index_1.ResolveIOServer.getMainDB().model('log-subscriptions', DefaultSchema);
|
|
46
|
+
schema._id = {
|
|
47
|
+
type: mongoose_1.Schema.Types.Mixed
|
|
48
|
+
};
|
|
49
|
+
var VersionSchema = new mongoose_1.Schema(schema, {
|
|
50
|
+
skipVersioning: true,
|
|
51
|
+
versionKey: false,
|
|
52
|
+
timestamps: true
|
|
53
|
+
});
|
|
54
|
+
exports.LogSubscriptions['versionCollection'] = 'log-subscriptions.versions';
|
|
55
|
+
exports.LogSubscriptionVersions = index_1.ResolveIOServer.getMainDB().model(exports.LogSubscriptions['versionCollection'], VersionSchema);
|
|
@@ -21,6 +21,13 @@ var schema = {
|
|
|
21
21
|
type: Date,
|
|
22
22
|
optional: true
|
|
23
23
|
},
|
|
24
|
+
readonly: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
optional: true
|
|
27
|
+
},
|
|
28
|
+
active: {
|
|
29
|
+
type: Boolean
|
|
30
|
+
},
|
|
24
31
|
attempts: {
|
|
25
32
|
type: Number,
|
|
26
33
|
optional: true
|
|
@@ -57,67 +64,53 @@ var schema = {
|
|
|
57
64
|
type: String
|
|
58
65
|
},
|
|
59
66
|
roles: {
|
|
60
|
-
type: Object
|
|
61
|
-
},
|
|
62
|
-
'roles.super_admin': {
|
|
63
|
-
type: Boolean
|
|
64
|
-
},
|
|
65
|
-
'roles.approvals': {
|
|
66
67
|
type: Array
|
|
67
68
|
},
|
|
68
|
-
'roles
|
|
69
|
-
type: Object
|
|
70
|
-
},
|
|
71
|
-
'roles.approvals.$.name': {
|
|
69
|
+
'roles.$': {
|
|
72
70
|
type: String
|
|
73
71
|
},
|
|
74
|
-
|
|
75
|
-
type: String
|
|
72
|
+
phonenumber: {
|
|
73
|
+
type: String,
|
|
74
|
+
optional: true
|
|
76
75
|
},
|
|
77
|
-
|
|
78
|
-
type:
|
|
76
|
+
other: {
|
|
77
|
+
type: Object,
|
|
78
|
+
blackbox: true,
|
|
79
|
+
optional: true
|
|
79
80
|
},
|
|
80
|
-
|
|
81
|
-
type: Array
|
|
81
|
+
assets: {
|
|
82
|
+
type: Array,
|
|
83
|
+
optional: true
|
|
82
84
|
},
|
|
83
|
-
'
|
|
85
|
+
'assets.$': {
|
|
84
86
|
type: Object
|
|
85
87
|
},
|
|
86
|
-
'
|
|
88
|
+
'assets.$.type': {
|
|
87
89
|
type: String
|
|
88
90
|
},
|
|
89
|
-
'
|
|
90
|
-
type: Array
|
|
91
|
-
},
|
|
92
|
-
'roles.groups.$.views.$': {
|
|
91
|
+
'assets.$.id_asset': {
|
|
93
92
|
type: String
|
|
94
93
|
},
|
|
95
|
-
'
|
|
96
|
-
type: String
|
|
97
|
-
optional: true
|
|
94
|
+
'assets.$.asset_number': {
|
|
95
|
+
type: String
|
|
98
96
|
},
|
|
99
|
-
'
|
|
100
|
-
type:
|
|
97
|
+
'assets.$.ownership': {
|
|
98
|
+
type: String
|
|
101
99
|
},
|
|
102
|
-
'
|
|
100
|
+
'assets.$.ownership_driver': {
|
|
103
101
|
type: String
|
|
104
102
|
},
|
|
105
|
-
'
|
|
106
|
-
type:
|
|
103
|
+
'assets.$.date_start': {
|
|
104
|
+
type: Date
|
|
107
105
|
},
|
|
108
|
-
'
|
|
109
|
-
type:
|
|
106
|
+
'assets.$.date_end': {
|
|
107
|
+
type: Date,
|
|
108
|
+
optional: true
|
|
110
109
|
},
|
|
111
|
-
|
|
112
|
-
phonenumber: {
|
|
110
|
+
id_function: {
|
|
113
111
|
type: String,
|
|
114
112
|
optional: true
|
|
115
113
|
},
|
|
116
|
-
other: {
|
|
117
|
-
type: Object,
|
|
118
|
-
optional: true,
|
|
119
|
-
blackbox: true
|
|
120
|
-
},
|
|
121
114
|
customers: {
|
|
122
115
|
type: Array,
|
|
123
116
|
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;
|
|
@@ -51,7 +51,6 @@ var method_responses_1 = require("../publications/method-responses");
|
|
|
51
51
|
var support_tickets_1 = require("../publications/support-tickets");
|
|
52
52
|
var index_1 = require("../index");
|
|
53
53
|
var notifications_1 = require("../publications/notifications");
|
|
54
|
-
var common_1 = require("../util/common");
|
|
55
54
|
var billing_logged_in_users_collection_1 = require("../collections/billing-logged-in-users.collection");
|
|
56
55
|
var moment = require("moment");
|
|
57
56
|
var billing_logged_in_users_1 = require("../publications/billing-logged-in-users");
|
|
@@ -201,7 +200,7 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
201
200
|
sub = that._subscriptions.filter(function (a) { return a.publication === publication && JSON.stringify(a.subscriptionData) === JSON.stringify(subscriptionData); })[0];
|
|
202
201
|
}
|
|
203
202
|
// Send pub data to client who just subscribed only, don't want to send to existing clients since nothing has changed
|
|
204
|
-
that.sendPubDataOnce(ws, messageId, sub);
|
|
203
|
+
that.sendPubDataOnce(ws, messageId, sub, 'newSub', that.getPublicationCollections(publication)[0]);
|
|
205
204
|
if (!(that._publications[sub.publication].preFunction && !sub.preSubscriptionData)) return [3 /*break*/, 3];
|
|
206
205
|
_a = sub;
|
|
207
206
|
return [4 /*yield*/, (_b = that._publications[sub.publication]).preFunction.apply(_b, sub.subscriptionData)];
|
|
@@ -503,29 +502,31 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
503
502
|
SubscriptionManager.prototype.runOpLogQueue = function () {
|
|
504
503
|
var _this = this;
|
|
505
504
|
setInterval(function () {
|
|
506
|
-
var
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
}
|
|
505
|
+
var oplog = _this._oplogQueue.pop();
|
|
506
|
+
_this.checkPubsForChanges(oplog.collection, oplog.doc, oplog.type);
|
|
507
|
+
// let oplogQueue = deepCopy(this._oplogQueue);
|
|
508
|
+
// let uniqueCollectionOplogQueue = oplogQueue.map(a => a.collection).filter((elem, index, self) => {
|
|
509
|
+
// return index === self.indexOf(elem);
|
|
510
|
+
// });
|
|
511
|
+
// uniqueCollectionOplogQueue.forEach(collection => {
|
|
512
|
+
// let oplogQueueFiltered = oplogQueue.filter(a => a.collection === collection);
|
|
513
|
+
// if (oplogQueueFiltered.length === 1) {
|
|
514
|
+
// this.checkPubsForChanges(oplogQueueFiltered[0].collection, oplogQueueFiltered[0].doc);
|
|
515
|
+
// this._oplogQueue.splice(this._oplogQueue.map(a => a.collection).indexOf(collection), 1);
|
|
516
|
+
// }
|
|
517
|
+
// else {
|
|
518
|
+
// oplogQueueFiltered.forEach(item => {
|
|
519
|
+
// this.checkPubsForChanges(item.collection, item.doc, true);
|
|
520
|
+
// });
|
|
521
|
+
// this.checkPubsForChanges(oplogQueueFiltered[oplogQueueFiltered.length - 1].collection, oplogQueueFiltered[oplogQueueFiltered.length - 1].doc, false, true);
|
|
522
|
+
// for (let i = this._oplogQueue.length - 1; i >= 0; i--) {
|
|
523
|
+
// let item = this._oplogQueue[i];
|
|
524
|
+
// if (item.collection === collection) {
|
|
525
|
+
// this._oplogQueue.splice(i, 1);
|
|
526
|
+
// }
|
|
527
|
+
// }
|
|
528
|
+
// }
|
|
529
|
+
// });
|
|
529
530
|
}, 25);
|
|
530
531
|
};
|
|
531
532
|
SubscriptionManager.prototype.resendPubsForDelete = function (collection) {
|
|
@@ -535,20 +536,20 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
535
536
|
sub.clients.forEach(function (client) {
|
|
536
537
|
that._wss.clients.forEach(function (ws) {
|
|
537
538
|
if (ws['id_socket'] === client.id_socket) {
|
|
538
|
-
that.sendPubDataOnce(ws, client.messageId, sub);
|
|
539
|
+
that.sendPubDataOnce(ws, client.messageId, sub, 'delete', collection);
|
|
539
540
|
}
|
|
540
541
|
});
|
|
541
542
|
});
|
|
542
543
|
}
|
|
543
544
|
else {
|
|
544
|
-
that.sendPubData(sub);
|
|
545
|
+
that.sendPubData(sub, 'delete', collection);
|
|
545
546
|
}
|
|
546
547
|
});
|
|
547
548
|
};
|
|
548
549
|
// Document: Inserted/Modified/Deleted Document
|
|
549
550
|
// Collection: Collection Document Lives In
|
|
550
551
|
// Check to see if any pubs need to refetch due to Mongo operation
|
|
551
|
-
SubscriptionManager.prototype.checkPubsForChanges = function (collection, document, fetchFunctionOnly, noFetchFunction) {
|
|
552
|
+
SubscriptionManager.prototype.checkPubsForChanges = function (collection, document, type, fetchFunctionOnly, noFetchFunction) {
|
|
552
553
|
var _this = this;
|
|
553
554
|
if (fetchFunctionOnly === void 0) { fetchFunctionOnly = false; }
|
|
554
555
|
if (noFetchFunction === void 0) { noFetchFunction = false; }
|
|
@@ -574,7 +575,7 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
574
575
|
case 2:
|
|
575
576
|
if (!sub.preSubscriptionData) return [3 /*break*/, 4];
|
|
576
577
|
if (!that._publications[sub.publication].fetchFunction(document, sub.preSubscriptionData)) return [3 /*break*/, 4];
|
|
577
|
-
that.sendPubData(sub);
|
|
578
|
+
that.sendPubData(sub, type, collection);
|
|
578
579
|
_a = sub;
|
|
579
580
|
return [4 /*yield*/, (_c = that._publications[sub.publication]).preFunction.apply(_c, sub.subscriptionData)];
|
|
580
581
|
case 3:
|
|
@@ -588,7 +589,7 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
588
589
|
case 5:
|
|
589
590
|
_b.preSubscriptionData = _e.sent();
|
|
590
591
|
if (that._publications[sub.publication].fetchFunction(document, sub.preSubscriptionData)) {
|
|
591
|
-
that.sendPubData(sub);
|
|
592
|
+
that.sendPubData(sub, type, collection);
|
|
592
593
|
}
|
|
593
594
|
_e.label = 6;
|
|
594
595
|
case 6: return [3 /*break*/, 8];
|
|
@@ -601,7 +602,7 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
601
602
|
if ((_a = that._publications[sub.publication]).fetchFunction.apply(_a, [document, client.id_user].concat(sub.subscriptionData))) {
|
|
602
603
|
that._wss.clients.forEach(function (ws) {
|
|
603
604
|
if (ws['id_socket'] === client.id_socket) {
|
|
604
|
-
that.sendPubDataOnce(ws, client.messageId, sub);
|
|
605
|
+
that.sendPubDataOnce(ws, client.messageId, sub, type, collection);
|
|
605
606
|
}
|
|
606
607
|
});
|
|
607
608
|
}
|
|
@@ -610,7 +611,7 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
610
611
|
else if (!fetchFunctionOnly) {
|
|
611
612
|
that._wss.clients.forEach(function (ws) {
|
|
612
613
|
if (ws['id_socket'] === client.id_socket) {
|
|
613
|
-
that.sendPubDataOnce(ws, client.messageId, sub);
|
|
614
|
+
that.sendPubDataOnce(ws, client.messageId, sub, type, collection);
|
|
614
615
|
}
|
|
615
616
|
});
|
|
616
617
|
}
|
|
@@ -620,12 +621,12 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
620
621
|
if (that._publications[sub.publication].fetchFunction) {
|
|
621
622
|
if (!noFetchFunction) {
|
|
622
623
|
if ((_d = that._publications[sub.publication]).fetchFunction.apply(_d, [document].concat(sub.subscriptionData))) {
|
|
623
|
-
that.sendPubData(sub);
|
|
624
|
+
that.sendPubData(sub, type, collection);
|
|
624
625
|
}
|
|
625
626
|
}
|
|
626
627
|
}
|
|
627
628
|
else if (!fetchFunctionOnly) {
|
|
628
|
-
that.sendPubData(sub);
|
|
629
|
+
that.sendPubData(sub, type, collection);
|
|
629
630
|
}
|
|
630
631
|
}
|
|
631
632
|
_e.label = 8;
|
|
@@ -658,7 +659,7 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
658
659
|
case 2:
|
|
659
660
|
if (!sub.preSubscriptionData) return [3 /*break*/, 4];
|
|
660
661
|
if (!that._publications[sub.publication].fetchFunction(document, sub.preSubscriptionData)) return [3 /*break*/, 4];
|
|
661
|
-
that.sendPubData(sub);
|
|
662
|
+
that.sendPubData(sub, 'support', collection);
|
|
662
663
|
_a = sub;
|
|
663
664
|
return [4 /*yield*/, (_c = that._publications[sub.publication]).preFunction.apply(_c, sub.subscriptionData)];
|
|
664
665
|
case 3:
|
|
@@ -671,7 +672,7 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
671
672
|
case 5:
|
|
672
673
|
_b.preSubscriptionData = _f.sent();
|
|
673
674
|
if (that._publications[sub.publication].fetchFunction(document, sub.preSubscriptionData)) {
|
|
674
|
-
that.sendPubData(sub);
|
|
675
|
+
that.sendPubData(sub, 'support', collection);
|
|
675
676
|
}
|
|
676
677
|
return [3 /*break*/, 7];
|
|
677
678
|
case 6:
|
|
@@ -682,7 +683,7 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
682
683
|
if ((_a = that._publications[sub.publication]).fetchFunction.apply(_a, [document, client.id_user].concat(sub.subscriptionData))) {
|
|
683
684
|
that._wss.clients.forEach(function (ws) {
|
|
684
685
|
if (ws['id_socket'] === client.id_socket) {
|
|
685
|
-
that.sendPubDataOnce(ws, client.messageId, sub);
|
|
686
|
+
that.sendPubDataOnce(ws, client.messageId, sub, 'support', collection);
|
|
686
687
|
}
|
|
687
688
|
});
|
|
688
689
|
}
|
|
@@ -690,7 +691,7 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
690
691
|
else {
|
|
691
692
|
that._wss.clients.forEach(function (ws) {
|
|
692
693
|
if (ws['id_socket'] === client.id_socket) {
|
|
693
|
-
that.sendPubDataOnce(ws, client.messageId, sub);
|
|
694
|
+
that.sendPubDataOnce(ws, client.messageId, sub, 'support', collection);
|
|
694
695
|
}
|
|
695
696
|
});
|
|
696
697
|
}
|
|
@@ -699,11 +700,11 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
699
700
|
else {
|
|
700
701
|
if (that._publications[sub.publication].fetchFunction) {
|
|
701
702
|
if ((_e = that._publications[sub.publication]).fetchFunction.apply(_e, [document].concat(sub.subscriptionData))) {
|
|
702
|
-
that.sendPubData(sub);
|
|
703
|
+
that.sendPubData(sub, 'support', collection);
|
|
703
704
|
}
|
|
704
705
|
}
|
|
705
706
|
else {
|
|
706
|
-
that.sendPubData(sub);
|
|
707
|
+
that.sendPubData(sub, 'support', collection);
|
|
707
708
|
}
|
|
708
709
|
}
|
|
709
710
|
_f.label = 7;
|
|
@@ -713,7 +714,7 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
713
714
|
}); });
|
|
714
715
|
};
|
|
715
716
|
// Fetch pub once, send to all clients linked to this pub
|
|
716
|
-
SubscriptionManager.prototype.sendPubDataOnce = function (ws, messageId, subscription) {
|
|
717
|
+
SubscriptionManager.prototype.sendPubDataOnce = function (ws, messageId, subscription, type, collection) {
|
|
717
718
|
return __awaiter(this, void 0, void 0, function () {
|
|
718
719
|
var that;
|
|
719
720
|
var _a, _b;
|
|
@@ -759,13 +760,14 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
759
760
|
});
|
|
760
761
|
};
|
|
761
762
|
// Fetch pub once, send to all clients linked to this pub
|
|
762
|
-
SubscriptionManager.prototype.sendPubData = function (subscription) {
|
|
763
|
+
SubscriptionManager.prototype.sendPubData = function (subscription, type, collection) {
|
|
763
764
|
return __awaiter(this, void 0, void 0, function () {
|
|
764
765
|
var that;
|
|
765
766
|
var _a;
|
|
766
767
|
var _this = this;
|
|
767
768
|
return __generator(this, function (_b) {
|
|
768
769
|
that = this;
|
|
770
|
+
that._mainServer.getMethodManager().callMethodInternal('insertLogSubscription', type, subscription.publication, collection);
|
|
769
771
|
(_a = that._publications[subscription.publication].function).call.apply(_a, [Object.assign({}, that, SubscriptionManager.prototype)].concat(subscription.subscriptionData)).then(function (res) {
|
|
770
772
|
subscription.clients.forEach(function (client) {
|
|
771
773
|
that._wss.clients.forEach(function (ws) {
|
package/methods/logs.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var mongoose_1 = require("mongoose");
|
|
4
4
|
var log_collection_1 = require("../collections/log.collection");
|
|
5
|
+
var log_subscription_collection_1 = require("../collections/log-subscription.collection");
|
|
5
6
|
var index_1 = require("../index");
|
|
6
7
|
function loadLogMethods(methodManager) {
|
|
7
8
|
methodManager.methods({
|
|
@@ -23,6 +24,19 @@ function loadLogMethods(methodManager) {
|
|
|
23
24
|
});
|
|
24
25
|
},
|
|
25
26
|
skipValidation: true
|
|
27
|
+
},
|
|
28
|
+
insertSubscriptionLog: {
|
|
29
|
+
skipQueue: true,
|
|
30
|
+
function: function (type, subscription, collection_name) {
|
|
31
|
+
return log_subscription_collection_1.LogSubscriptions.create({
|
|
32
|
+
_id: mongoose_1.Types.ObjectId().toHexString(),
|
|
33
|
+
__v: 0,
|
|
34
|
+
date: new Date(),
|
|
35
|
+
type: type,
|
|
36
|
+
subscription: subscription,
|
|
37
|
+
collection_name: collection_name
|
|
38
|
+
});
|
|
39
|
+
}
|
|
26
40
|
}
|
|
27
41
|
});
|
|
28
42
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CollectionDocument } from './collection-document.model';
|
|
2
|
+
export interface LogSubscriptionModel extends CollectionDocument {
|
|
3
|
+
date: Date;
|
|
4
|
+
type: LogSubscriptionType;
|
|
5
|
+
subscription: string;
|
|
6
|
+
collection_name: string;
|
|
7
|
+
}
|
|
8
|
+
export declare type LogSubscriptionType = 'insert' | 'update' | 'delete';
|