@resolveio/server-lib 1.0.0-rc19 → 1.0.0-rc2
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/active-subscription.collection.js +1 -68
- package/collections/app-status.collection.js +1 -43
- package/collections/app-version.collection.js +1 -56
- package/collections/counter.collection.js +1 -73
- package/collections/cron-job-history.collection.js +1 -86
- package/collections/cron-job.collection.js +1 -89
- package/collections/file.collection.js +1 -73
- package/collections/flag.collection.js +1 -47
- package/collections/log.collection.js +1 -64
- package/collections/logged-in-users.collection.js +1 -70
- package/collections/method-call.collection.js +1 -44
- package/collections/method-response.collection.js +1 -48
- package/collections/queue-flag.collection.js +1 -41
- package/collections/queue-method.collection.js +1 -116
- package/collections/queue-response.collection.js +1 -78
- package/collections/support-ticket.collection.js +1 -146
- package/collections/user.collection.js +1 -108
- package/cron/cron.js +1 -160
- package/fixtures/cron-jobs.js +1 -72
- package/fixtures/init.js +1 -73
- package/http/auth.js +1 -472
- package/http/health.js +1 -8
- package/index.js +1 -123
- package/managers/cron.manager.js +1 -193
- package/managers/method.manager.js +1 -513
- package/managers/queue-method.manager.js +1 -239
- package/managers/subscription.manager.js +1 -700
- package/managers/support.manager.js +1 -208
- package/methods/accounts.js +1 -253
- package/methods/aws.js +1 -323
- package/methods/cloudconvert.js +1 -37
- package/methods/collections.js +1 -738
- package/methods/counters.js +1 -404
- package/methods/cron-jobs.js +1 -63
- package/methods/flags.js +1 -6
- package/methods/logs.js +1 -29
- package/methods/pdf.js +1 -303
- package/models/active-subscription.model.js +1 -2
- package/models/app-status.model.js +1 -2
- package/models/app-version.model.js +1 -2
- package/models/collection-document.model.js +1 -2
- package/models/counter.model.js +1 -2
- package/models/cron-job-history.model.js +1 -2
- package/models/cron-job.model.js +1 -2
- package/models/dialog.model.js +1 -2
- package/models/file.model.js +1 -2
- package/models/flag.model.js +1 -2
- package/models/log.model.js +1 -2
- package/models/logged-in-users.model.js +1 -2
- package/models/method-call.model.js +1 -2
- package/models/method-response.model.js +1 -2
- package/models/method.model.js +1 -2
- package/models/pagination.model.js +1 -20
- package/models/permission.model.js +1 -2
- package/models/queue-method.model.js +1 -2
- package/models/queue-response.model.js +1 -2
- package/models/select-data-label.model.js +1 -2
- package/models/server-response.model.js +1 -2
- package/models/subscription.model.js +1 -2
- package/models/support-method.model.js +1 -2
- package/models/support-ticket.model.js +1 -2
- package/models/user.model.js +1 -2
- package/package.json +2 -5
- package/publications/app-status.js +1 -14
- package/publications/app-version.js +1 -14
- package/publications/cron-jobs.js +1 -14
- package/publications/files.js +1 -71
- package/publications/flags.js +1 -23
- package/publications/logs.js +1 -26
- package/publications/method-calls.js +1 -14
- package/publications/method-responses.js +1 -14
- package/publications/super-admin.js +1 -21
- package/publications/support-tickets.js +1 -118
- package/server-app.js +1 -640
- package/support-methods/aws.js +1 -276
- package/support-methods/collections.js +1 -471
- package/support-methods/counters.js +1 -189
- package/support-methods/support.js +1 -19
- package/util/common.js +1 -334
- package/collections/active-subscription.collection.d.ts +0 -8
- package/collections/app-status.collection.d.ts +0 -8
- package/collections/app-version.collection.d.ts +0 -8
- package/collections/counter.collection.d.ts +0 -10
- package/collections/cron-job-history.collection.d.ts +0 -8
- package/collections/cron-job.collection.d.ts +0 -8
- package/collections/file.collection.d.ts +0 -10
- package/collections/flag.collection.d.ts +0 -8
- package/collections/log.collection.d.ts +0 -8
- package/collections/logged-in-users.collection.d.ts +0 -8
- package/collections/method-call.collection.d.ts +0 -7
- package/collections/method-response.collection.d.ts +0 -7
- package/collections/queue-flag.collection.d.ts +0 -8
- package/collections/queue-method.collection.d.ts +0 -8
- package/collections/queue-response.collection.d.ts +0 -8
- package/collections/support-ticket.collection.d.ts +0 -8
- package/collections/user.collection.d.ts +0 -9
- package/cron/cron.d.ts +0 -6
- package/fixtures/cron-jobs.d.ts +0 -2
- package/fixtures/init.d.ts +0 -2
- package/http/auth.d.ts +0 -3
- package/http/health.d.ts +0 -2
- package/index.d.ts +0 -15
- package/managers/cron.manager.d.ts +0 -17
- package/managers/method.manager.d.ts +0 -27
- package/managers/queue-method.manager.d.ts +0 -14
- package/managers/subscription.manager.d.ts +0 -27
- package/managers/support.manager.d.ts +0 -18
- package/methods/accounts.d.ts +0 -3
- package/methods/aws.d.ts +0 -3
- package/methods/cloudconvert.d.ts +0 -3
- package/methods/collections.d.ts +0 -3
- package/methods/counters.d.ts +0 -3
- package/methods/cron-jobs.d.ts +0 -3
- package/methods/flags.d.ts +0 -3
- package/methods/logs.d.ts +0 -3
- package/methods/pdf.d.ts +0 -3
- package/models/active-subscription.model.d.ts +0 -14
- package/models/app-status.model.d.ts +0 -5
- package/models/app-version.model.d.ts +0 -5
- package/models/collection-document.model.d.ts +0 -7
- package/models/counter.model.d.ts +0 -6
- package/models/cron-job-history.model.d.ts +0 -13
- package/models/cron-job.model.d.ts +0 -14
- package/models/dialog.model.d.ts +0 -24
- package/models/file.model.d.ts +0 -10
- package/models/flag.model.d.ts +0 -6
- package/models/log.model.d.ts +0 -12
- package/models/logged-in-users.model.d.ts +0 -10
- package/models/method-call.model.d.ts +0 -8
- package/models/method-response.model.d.ts +0 -9
- package/models/method.model.d.ts +0 -11
- package/models/pagination.model.d.ts +0 -12
- package/models/permission.model.d.ts +0 -13
- package/models/queue-method.model.d.ts +0 -10
- package/models/queue-response.model.d.ts +0 -11
- package/models/select-data-label.model.d.ts +0 -10
- package/models/server-response.model.d.ts +0 -6
- package/models/subscription.model.d.ts +0 -31
- package/models/support-method.model.d.ts +0 -10
- package/models/support-ticket.model.d.ts +0 -40
- package/models/user.model.d.ts +0 -15
- package/publications/app-status.d.ts +0 -3
- package/publications/app-version.d.ts +0 -3
- package/publications/cron-jobs.d.ts +0 -3
- package/publications/files.d.ts +0 -3
- package/publications/flags.d.ts +0 -3
- package/publications/logs.d.ts +0 -3
- package/publications/method-calls.d.ts +0 -3
- package/publications/method-responses.d.ts +0 -3
- package/publications/super-admin.d.ts +0 -3
- package/publications/support-tickets.d.ts +0 -2
- package/server-app.d.ts +0 -33
- package/support-methods/aws.d.ts +0 -3
- package/support-methods/collections.d.ts +0 -3
- package/support-methods/counters.d.ts +0 -3
- package/support-methods/support.d.ts +0 -3
- package/util/common.d.ts +0 -15
|
@@ -1,189 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
-
function step(op) {
|
|
15
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (_) try {
|
|
17
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
-
switch (op[0]) {
|
|
20
|
-
case 0: case 1: t = op; break;
|
|
21
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
-
default:
|
|
25
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
-
if (t[2]) _.ops.pop();
|
|
30
|
-
_.trys.pop(); continue;
|
|
31
|
-
}
|
|
32
|
-
op = body.call(thisArg, _);
|
|
33
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
var mongoose_1 = require("mongoose");
|
|
39
|
-
var counter_collection_1 = require("../collections/counter.collection");
|
|
40
|
-
var simpl_schema_1 = require("simpl-schema");
|
|
41
|
-
var __1 = require("..");
|
|
42
|
-
function loadCounterMethods(supportManager) {
|
|
43
|
-
supportManager.supportMethods({
|
|
44
|
-
incCounter: {
|
|
45
|
-
check: new simpl_schema_1.default({
|
|
46
|
-
counterType: {
|
|
47
|
-
type: String
|
|
48
|
-
}
|
|
49
|
-
}),
|
|
50
|
-
function: function (counterType) {
|
|
51
|
-
var _this = this;
|
|
52
|
-
return new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
|
|
53
|
-
var counter, newCount;
|
|
54
|
-
return __generator(this, function (_a) {
|
|
55
|
-
switch (_a.label) {
|
|
56
|
-
case 0: return [4 /*yield*/, counter_collection_1.SupportCounters.findOne({ type: counterType })];
|
|
57
|
-
case 1:
|
|
58
|
-
counter = _a.sent();
|
|
59
|
-
if (!!counter) return [3 /*break*/, 2];
|
|
60
|
-
counter_collection_1.SupportCounters.create({
|
|
61
|
-
_id: mongoose_1.Types.ObjectId().toHexString(),
|
|
62
|
-
count: 2,
|
|
63
|
-
type: counterType
|
|
64
|
-
});
|
|
65
|
-
resolve(1);
|
|
66
|
-
return [3 /*break*/, 4];
|
|
67
|
-
case 2: return [4 /*yield*/, counter_collection_1.SupportCounters.findOneAndUpdate({ type: counterType }, { $inc: { count: 1 } }).exec()];
|
|
68
|
-
case 3:
|
|
69
|
-
newCount = _a.sent();
|
|
70
|
-
resolve(newCount.count);
|
|
71
|
-
_a.label = 4;
|
|
72
|
-
case 4: return [2 /*return*/];
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
}); });
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
countCollectionWithQuery: {
|
|
79
|
-
check: new simpl_schema_1.default({
|
|
80
|
-
collectionType: {
|
|
81
|
-
type: String
|
|
82
|
-
},
|
|
83
|
-
query: {
|
|
84
|
-
type: Object,
|
|
85
|
-
blackbox: true
|
|
86
|
-
}
|
|
87
|
-
}),
|
|
88
|
-
function: function (collectionType, query) {
|
|
89
|
-
return __1.ResolveIOServer.getSupportDB().model(collectionType).collection.countDocuments(query);
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
countQuery: {
|
|
93
|
-
check: new simpl_schema_1.default({
|
|
94
|
-
collectionType: {
|
|
95
|
-
type: String
|
|
96
|
-
},
|
|
97
|
-
search: {
|
|
98
|
-
type: String,
|
|
99
|
-
optional: true
|
|
100
|
-
},
|
|
101
|
-
filters: simpl_schema_1.default.oneOf({
|
|
102
|
-
type: Array,
|
|
103
|
-
optional: true
|
|
104
|
-
}, {
|
|
105
|
-
type: Object,
|
|
106
|
-
blackbox: true,
|
|
107
|
-
optional: true
|
|
108
|
-
}),
|
|
109
|
-
'filters.$': {
|
|
110
|
-
type: Object,
|
|
111
|
-
optional: true,
|
|
112
|
-
blackbox: true
|
|
113
|
-
},
|
|
114
|
-
subType: {
|
|
115
|
-
type: String,
|
|
116
|
-
optional: true
|
|
117
|
-
}
|
|
118
|
-
}),
|
|
119
|
-
function: function (collectionType, search, filters) {
|
|
120
|
-
if (search === void 0) { search = ''; }
|
|
121
|
-
if (filters === void 0) { filters = []; }
|
|
122
|
-
var query = {};
|
|
123
|
-
if (!search && (!filters || !filters.length)) {
|
|
124
|
-
query = {};
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
if (filters && filters.length) {
|
|
128
|
-
query['$and'] = [];
|
|
129
|
-
filters.forEach(function (filter) {
|
|
130
|
-
var _a;
|
|
131
|
-
query['$and'].push((_a = {}, _a[filter['prop']] = filter['data'], _a));
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
if (search && collectionType === 'support-tickets') {
|
|
135
|
-
var searchRegEx = { '$regex': '.*' + (search || '') + '.*', '$options': 'i' };
|
|
136
|
-
if (query['$and']) {
|
|
137
|
-
query['$and'].push({
|
|
138
|
-
$or: [
|
|
139
|
-
{
|
|
140
|
-
support_ticket_number_string: searchRegEx
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
date_created_string: searchRegEx
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
status: searchRegEx
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
user_created: searchRegEx
|
|
150
|
-
}
|
|
151
|
-
]
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
else {
|
|
155
|
-
query = {
|
|
156
|
-
$or: [
|
|
157
|
-
{
|
|
158
|
-
support_ticket_number_string: searchRegEx
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
date_created_string: searchRegEx
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
status: searchRegEx
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
user_created: searchRegEx
|
|
168
|
-
}
|
|
169
|
-
]
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
return __1.ResolveIOServer.getSupportDB().model(collectionType).collection.countDocuments(query);
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
countCollection: {
|
|
178
|
-
check: new simpl_schema_1.default({
|
|
179
|
-
collectionType: {
|
|
180
|
-
type: String
|
|
181
|
-
}
|
|
182
|
-
}),
|
|
183
|
-
function: function (collectionType) {
|
|
184
|
-
return __1.ResolveIOServer.getSupportDB().model(collectionType).collection.countDocuments();
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
exports.loadCounterMethods = loadCounterMethods;
|
|
1
|
+
"use strict";var __awaiter=this&&this.__awaiter||function(c,u,i,a){return new(i||(i=Promise))(function(e,t){function n(e){try{r(a.next(e))}catch(e){t(e)}}function o(e){try{r(a.throw(e))}catch(e){t(e)}}function r(t){t.done?e(t.value):new i(function(e){e(t.value)}).then(n,o)}r((a=a.apply(c,u||[])).next())})},__generator=this&&this.__generator||function(n,o){var r,c,u,e,i={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,c&&(u=2&t[0]?c.return:t[0]?c.throw||((u=c.return)&&u.call(c),0):c.next)&&!(u=u.call(c,t[1])).done)return u;switch(c=0,u&&(t=[2&t[0],u.value]),t[0]){case 0:case 1:u=t;break;case 4:return i.label++,{value:t[1],done:!1};case 5:i.label++,c=t[1],t=[0];continue;case 7:t=i.ops.pop(),i.trys.pop();continue;default:if(!(u=0<(u=i.trys).length&&u[u.length-1])&&(6===t[0]||2===t[0])){i=0;continue}if(3===t[0]&&(!u||t[1]>u[0]&&t[1]<u[3])){i.label=t[1];break}if(6===t[0]&&i.label<u[1]){i.label=u[1],u=t;break}if(u&&i.label<u[2]){i.label=u[2],i.ops.push(t);break}u[2]&&i.ops.pop(),i.trys.pop();continue}t=o.call(n,i)}catch(e){t=[6,e],c=0}finally{r=u=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}};Object.defineProperty(exports,"__esModule",{value:!0});var mongoose_1=require("mongoose"),counter_collection_1=require("../collections/counter.collection"),simpl_schema_1=require("simpl-schema"),__1=require("..");function loadCounterMethods(e){e.supportMethods({incCounter:{check:new simpl_schema_1.default({counterType:{type:String}}),function:function(o){var t=this;return new Promise(function(n,e){return __awaiter(t,void 0,void 0,function(){var t;return __generator(this,function(e){switch(e.label){case 0:return[4,counter_collection_1.SupportCounters.findOne({type:o})];case 1:return e.sent()?[3,2]:(counter_collection_1.SupportCounters.create({_id:mongoose_1.Types.ObjectId().toHexString(),count:2,type:o}),n(1),[3,4]);case 2:return[4,counter_collection_1.SupportCounters.findOneAndUpdate({type:o},{$inc:{count:1}}).exec()];case 3:t=e.sent(),n(t.count),e.label=4;case 4:return[2]}})})})}},countCollectionWithQuery:{check:new simpl_schema_1.default({collectionType:{type:String},query:{type:Object,blackbox:!0}}),function:function(e,t){return __1.default.getSupportDB().model(e).collection.countDocuments(t)}},countQuery:{check:new simpl_schema_1.default({collectionType:{type:String},search:{type:String,optional:!0},filters:simpl_schema_1.default.oneOf({type:Array,optional:!0},{type:Object,blackbox:!0,optional:!0}),"filters.$":{type:Object,optional:!0,blackbox:!0},subType:{type:String,optional:!0}}),function:function(e,t,n){void 0===t&&(t=""),void 0===n&&(n=[]);var o={};if(t||n&&n.length){if(n&&n.length&&(o.$and=[],n.forEach(function(e){var t;o.$and.push(((t={})[e.prop]=e.data,t))})),t&&"support-tickets"===e){var r={$regex:".*"+(t||"")+".*",$options:"i"};o.$and?o.$and.push({$or:[{support_ticket_number_string:r},{date_created_string:r},{status:r},{user_created:r}]}):o={$or:[{support_ticket_number_string:r},{date_created_string:r},{status:r},{user_created:r}]}}}else o={};return __1.default.getSupportDB().model(e).collection.countDocuments(o)}},countCollection:{check:new simpl_schema_1.default({collectionType:{type:String}}),function:function(e){return __1.default.getSupportDB().model(e).collection.countDocuments()}}})}exports.loadCounterMethods=loadCounterMethods;
|
|
@@ -1,19 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var simpl_schema_1 = require("simpl-schema");
|
|
4
|
-
var support_ticket_collection_1 = require("../collections/support-ticket.collection");
|
|
5
|
-
function loadSupportMethods(supportManager) {
|
|
6
|
-
supportManager.supportMethods({
|
|
7
|
-
testSupportMethods: {
|
|
8
|
-
check: new simpl_schema_1.default({
|
|
9
|
-
test: {
|
|
10
|
-
type: String
|
|
11
|
-
}
|
|
12
|
-
}),
|
|
13
|
-
function: function (test) {
|
|
14
|
-
return support_ticket_collection_1.SupportTickets.findOne({}).exec();
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
exports.loadSupportMethods = loadSupportMethods;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var simpl_schema_1=require("simpl-schema"),support_ticket_collection_1=require("../collections/support-ticket.collection");function loadSupportMethods(t){t.supportMethods({testSupportMethods:{check:new simpl_schema_1.default({test:{type:String}}),function:function(t){return support_ticket_collection_1.SupportTickets.findOne({}).exec()}}})}exports.loadSupportMethods=loadSupportMethods;
|
package/util/common.js
CHANGED
|
@@ -1,334 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var rusDiff = require('rus-diff');
|
|
4
|
-
var deepDiff = require('deep-diff').diff;
|
|
5
|
-
function deepCopy(obj) {
|
|
6
|
-
return JSON.parse(JSON.stringify(obj), dateReviver);
|
|
7
|
-
}
|
|
8
|
-
exports.deepCopy = deepCopy;
|
|
9
|
-
function dateReviver(key, value) {
|
|
10
|
-
if (typeof value === 'string') {
|
|
11
|
-
var a = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
|
|
12
|
-
if (a) {
|
|
13
|
-
return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], +a[5], +a[6].split('.')[0], +a[6].split('.')[1]));
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return value;
|
|
17
|
-
}
|
|
18
|
-
exports.dateReviver = dateReviver;
|
|
19
|
-
function getMongoUpdates(currDoc, modifiedDoc, incVersion) {
|
|
20
|
-
if (currDoc.createdAt) {
|
|
21
|
-
modifiedDoc.createdAt = currDoc.createdAt;
|
|
22
|
-
}
|
|
23
|
-
if (currDoc.updatedAt) {
|
|
24
|
-
modifiedDoc.updatedAt = currDoc.updatedAt;
|
|
25
|
-
}
|
|
26
|
-
var updates = rusDiff.diff(currDoc, modifiedDoc);
|
|
27
|
-
if (updates) {
|
|
28
|
-
if (updates.$set && !Object.keys(updates.$set).length) {
|
|
29
|
-
delete updates.$set;
|
|
30
|
-
}
|
|
31
|
-
if (incVersion) {
|
|
32
|
-
updates.$inc = { __v: 1 };
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
if (incVersion) {
|
|
37
|
-
updates = {
|
|
38
|
-
$inc: { __v: 1 }
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return updates;
|
|
43
|
-
}
|
|
44
|
-
exports.getMongoUpdates = getMongoUpdates;
|
|
45
|
-
function getMongoMergeUpdatedDoc(f_doc, currentDoc, oldDoc) {
|
|
46
|
-
var upDoc = deepCopy(oldDoc);
|
|
47
|
-
upDoc.__v = currentDoc.__v;
|
|
48
|
-
var diff_1 = getDeepDiff(oldDoc, currentDoc);
|
|
49
|
-
var diff_2 = getDeepDiff(oldDoc, f_doc);
|
|
50
|
-
var updates = mergeUpdates(diff_2, diff_1);
|
|
51
|
-
applyMongoUpdate(upDoc, updates);
|
|
52
|
-
return upDoc;
|
|
53
|
-
}
|
|
54
|
-
exports.getMongoMergeUpdatedDoc = getMongoMergeUpdatedDoc;
|
|
55
|
-
function mergeUpdates() {
|
|
56
|
-
var updatesToMerge = [];
|
|
57
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
58
|
-
updatesToMerge[_i] = arguments[_i];
|
|
59
|
-
}
|
|
60
|
-
var merged = {
|
|
61
|
-
$set: {},
|
|
62
|
-
$unset: {},
|
|
63
|
-
$inc: {},
|
|
64
|
-
$push: {},
|
|
65
|
-
$pull: {}
|
|
66
|
-
};
|
|
67
|
-
updatesToMerge.filter(function (a) { return a; }).forEach(function (anUpdate) {
|
|
68
|
-
anUpdate.forEach(function (change) {
|
|
69
|
-
var path = change.path[0];
|
|
70
|
-
for (var i = 1; i < change.path.length; i++) {
|
|
71
|
-
path += '.' + change.path[i];
|
|
72
|
-
}
|
|
73
|
-
if (change.kind === 'E') {
|
|
74
|
-
if (typeof (change.rhs) === 'number' && path.endsWith('quantity')) {
|
|
75
|
-
if (merged.$inc[path]) {
|
|
76
|
-
merged.$inc[path] += change.rhs - change.lhs;
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
merged.$inc[path] = change.rhs - change.lhs;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
merged.$set[path] = change.rhs;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
else if (change.kind === 'A') {
|
|
87
|
-
if (change.item.kind === 'N') {
|
|
88
|
-
if (!merged.$push[path] || JSON.stringify(merged.$push[path]) !== JSON.stringify(change.item.rhs)) {
|
|
89
|
-
if (!merged.$push[path]) {
|
|
90
|
-
merged.$push[path] = [];
|
|
91
|
-
}
|
|
92
|
-
if (!merged.$push[path].filter(function (a) { return JSON.stringify(a) === JSON.stringify(change.item.rhs); }).length) {
|
|
93
|
-
merged.$push[path].push(change.item.rhs);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
else if (change.item.kind === 'D') {
|
|
98
|
-
if (!merged.$pull[path] || JSON.stringify(merged.$pull[path]) !== JSON.stringify(change.item.lhs)) {
|
|
99
|
-
if (!merged.$pull[path]) {
|
|
100
|
-
merged.$pull[path] = [];
|
|
101
|
-
}
|
|
102
|
-
if (!merged.$pull[path].filter(function (a) { return JSON.stringify(a) === JSON.stringify(change.item.lhs); }).length) {
|
|
103
|
-
merged.$pull[path].push(change.item.lhs);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
else if (change.item.kind === 'E') {
|
|
108
|
-
console.log('Condition E not satisfied.');
|
|
109
|
-
// if (!merged.$pull[path] || JSON.stringify(merged.$pull[path]) !== JSON.stringify(change.item.lhs)) {
|
|
110
|
-
// merged.$pull[path] = change.item.lhs;
|
|
111
|
-
// }
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
});
|
|
116
|
-
return merged;
|
|
117
|
-
}
|
|
118
|
-
exports.mergeUpdates = mergeUpdates;
|
|
119
|
-
function getDeepDiff(doc1, doc2) {
|
|
120
|
-
delete doc1._id;
|
|
121
|
-
delete doc1.__v;
|
|
122
|
-
if (doc1.updatedAt) {
|
|
123
|
-
delete doc1.updatedAt;
|
|
124
|
-
}
|
|
125
|
-
if (doc1.createdAt) {
|
|
126
|
-
delete doc1.createdAt;
|
|
127
|
-
}
|
|
128
|
-
delete doc2._id;
|
|
129
|
-
delete doc2.__v;
|
|
130
|
-
if (doc2.updatedAt) {
|
|
131
|
-
delete doc2.updatedAt;
|
|
132
|
-
}
|
|
133
|
-
if (doc2.createdAt) {
|
|
134
|
-
delete doc2.createdAt;
|
|
135
|
-
}
|
|
136
|
-
return deepDiff(doc1, doc2);
|
|
137
|
-
}
|
|
138
|
-
exports.getDeepDiff = getDeepDiff;
|
|
139
|
-
function applyMongoUpdate(uDoc, delta) {
|
|
140
|
-
var orig, k, pathk, vk, n, n1, n2, name, o, o1, o2, ref, ref1, ref2, ref3, ref4, ref5, ref6, ref7, ref8, ref9a, ref9b, ref10, ref11, ref12a, ref12b, ref13, v;
|
|
141
|
-
orig = deepCopy(uDoc);
|
|
142
|
-
if (delta != null) {
|
|
143
|
-
if (delta.$rename != null) {
|
|
144
|
-
ref = delta.$rename;
|
|
145
|
-
// tslint:disable-next-line:forin
|
|
146
|
-
for (k in ref) {
|
|
147
|
-
v = ref[k];
|
|
148
|
-
ref1 = resolve(uDoc, k), o1 = ref1[0], n1 = ref1[1];
|
|
149
|
-
ref2 = resolve(uDoc, v), o2 = ref2[0], n2 = ref2[1];
|
|
150
|
-
if ((o1 != null) && n1.length === 1) {
|
|
151
|
-
if ((o2 != null) && n2.length === 1) {
|
|
152
|
-
o2[n2[0]] = o1[n1[0]];
|
|
153
|
-
delete o1[n1[0]];
|
|
154
|
-
}
|
|
155
|
-
else {
|
|
156
|
-
throw new Error(o2 + '/' + n2 + ' - couldn\'t resolve first for ' + uDoc + ' ' + v);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
else {
|
|
160
|
-
throw new Error(o1 + '/' + n1 + ' - couldn\'t resolve second for ' + uDoc + ' ' + k);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
if (delta.$set != null) {
|
|
165
|
-
ref3 = delta.$set;
|
|
166
|
-
// tslint:disable-next-line:forin
|
|
167
|
-
for (k in ref3) {
|
|
168
|
-
v = ref3[k];
|
|
169
|
-
ref4 = resolve(uDoc, k, {
|
|
170
|
-
force: true
|
|
171
|
-
}), o = ref4[0], n = ref4[1];
|
|
172
|
-
if ((o != null) && n.length === 1) {
|
|
173
|
-
o[n[0]] = v;
|
|
174
|
-
}
|
|
175
|
-
else {
|
|
176
|
-
throw new Error(o + '/' + n + ' - couldn\'t set for ' + uDoc + ' ' + k);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
if (delta.$inc != null) {
|
|
181
|
-
ref5 = delta.$inc;
|
|
182
|
-
// tslint:disable-next-line:forin
|
|
183
|
-
for (k in ref5) {
|
|
184
|
-
v = ref5[k];
|
|
185
|
-
ref6 = resolve(uDoc, k, {
|
|
186
|
-
force: true
|
|
187
|
-
}), o = ref6[0], n = ref6[1];
|
|
188
|
-
if ((o != null) && n.length === 1) {
|
|
189
|
-
if (o[name = n[0]] == null) {
|
|
190
|
-
o[name] = 0;
|
|
191
|
-
}
|
|
192
|
-
o[n[0]] += v;
|
|
193
|
-
}
|
|
194
|
-
else {
|
|
195
|
-
throw new Error(o + '/' + n + ' - couldn\'t set for ' + uDoc + ' ' + k);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
if (delta.$unset != null) {
|
|
200
|
-
ref7 = delta.$unset;
|
|
201
|
-
// tslint:disable-next-line:forin
|
|
202
|
-
for (k in ref7) {
|
|
203
|
-
v = ref7[k];
|
|
204
|
-
ref8 = resolve(uDoc, k), o = ref8[0], n = ref8[1];
|
|
205
|
-
if ((o != null) && n.length === 1) {
|
|
206
|
-
delete o[n[0]];
|
|
207
|
-
}
|
|
208
|
-
else {
|
|
209
|
-
throw new Error(o + '/' + n + ' - couldn\'t unset for ' + uDoc + ' ' + k);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
if (delta.$pull != null) {
|
|
214
|
-
ref9a = delta.$pull;
|
|
215
|
-
// tslint:disable-next-line:forin
|
|
216
|
-
for (pathk in ref9a) { // should only loop 1 time
|
|
217
|
-
ref9b = ref9a[pathk];
|
|
218
|
-
for (var kk = (ref9b.length - 1); kk >= 0; kk--) {
|
|
219
|
-
vk = ref9b[kk];
|
|
220
|
-
ref10 = resolve(uDoc, pathk), o = ref10[0], n = ref10[1];
|
|
221
|
-
ref11 = resolve(orig, pathk), o2 = ref11[0], n2 = ref11[1];
|
|
222
|
-
if ((o != null) && n.length === 1) {
|
|
223
|
-
o[n[0]].splice(o2[n2[0]].findIndex(function (z) { return JSON.stringify(z) === JSON.stringify(vk); }), 1);
|
|
224
|
-
}
|
|
225
|
-
else {
|
|
226
|
-
throw new Error(o + '/' + n + ' - couldn\'t unset for ' + uDoc + ' ' + pathk);
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
if (delta.$push != null) {
|
|
232
|
-
ref12a = delta.$push;
|
|
233
|
-
// tslint:disable-next-line:forin
|
|
234
|
-
for (pathk in ref12a) { // should only loop 1 time
|
|
235
|
-
ref12b = ref12a[pathk];
|
|
236
|
-
// for (let kk = 0; kk < ref12b.length; kk++) {
|
|
237
|
-
for (var kk = (ref12b.length - 1); kk >= 0; kk--) {
|
|
238
|
-
vk = ref12b[kk];
|
|
239
|
-
ref13 = resolve(uDoc, pathk), o = ref13[0], n = ref13[1];
|
|
240
|
-
if ((o != null) && n.length === 1) {
|
|
241
|
-
o[n[0]].push(vk);
|
|
242
|
-
}
|
|
243
|
-
else {
|
|
244
|
-
throw new Error(o + '/' + n + ' - couldn\'t unset for ' + uDoc + ' ' + pathk);
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
return uDoc;
|
|
251
|
-
}
|
|
252
|
-
exports.applyMongoUpdate = applyMongoUpdate;
|
|
253
|
-
function resolve(a, path, options) {
|
|
254
|
-
var e, k, last, stack;
|
|
255
|
-
if (options == null) {
|
|
256
|
-
options = {};
|
|
257
|
-
}
|
|
258
|
-
stack = arrize(path);
|
|
259
|
-
last = [];
|
|
260
|
-
if (stack.length > 0) {
|
|
261
|
-
last.unshift(stack.pop());
|
|
262
|
-
}
|
|
263
|
-
e = a;
|
|
264
|
-
if (e !== null) {
|
|
265
|
-
while ((k = stack.shift()) !== void 0) {
|
|
266
|
-
if (e[k] !== void 0) {
|
|
267
|
-
e = e[k];
|
|
268
|
-
}
|
|
269
|
-
else {
|
|
270
|
-
stack.unshift(k);
|
|
271
|
-
break;
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
if (options.force) {
|
|
276
|
-
while ((k = stack.shift()) !== void 0) {
|
|
277
|
-
if ((typeof stack[0] === 'number') || ((stack.length === 0) && (typeof last[0] === 'number'))) {
|
|
278
|
-
e[k] = [];
|
|
279
|
-
}
|
|
280
|
-
else {
|
|
281
|
-
e[k] = {};
|
|
282
|
-
}
|
|
283
|
-
e = e[k];
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
else {
|
|
287
|
-
while ((k = stack.pop()) !== void 0) {
|
|
288
|
-
last.unshift(k);
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
return [e, last];
|
|
292
|
-
}
|
|
293
|
-
function arrize(path, glue) {
|
|
294
|
-
if (glue == null) {
|
|
295
|
-
glue = '.';
|
|
296
|
-
}
|
|
297
|
-
return ((function () {
|
|
298
|
-
if (Array.isArray(path)) {
|
|
299
|
-
return path.slice(0);
|
|
300
|
-
}
|
|
301
|
-
else {
|
|
302
|
-
switch (path) {
|
|
303
|
-
case void 0:
|
|
304
|
-
case null:
|
|
305
|
-
case false:
|
|
306
|
-
case '':
|
|
307
|
-
return [];
|
|
308
|
-
default:
|
|
309
|
-
return path.toString().split(glue);
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
})()).map(function (e) {
|
|
313
|
-
switch (e) {
|
|
314
|
-
case void 0:
|
|
315
|
-
case null:
|
|
316
|
-
case false:
|
|
317
|
-
case '':
|
|
318
|
-
return null;
|
|
319
|
-
default:
|
|
320
|
-
return e.toString();
|
|
321
|
-
}
|
|
322
|
-
}).filter(function (e) {
|
|
323
|
-
return e != null;
|
|
324
|
-
});
|
|
325
|
-
}
|
|
326
|
-
function getBinarySize(string) {
|
|
327
|
-
if (string) {
|
|
328
|
-
return Buffer.byteLength(string, 'utf8');
|
|
329
|
-
}
|
|
330
|
-
else {
|
|
331
|
-
return 0;
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
exports.getBinarySize = getBinarySize;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var rusDiff=require("rus-diff"),deepDiff=require("deep-diff").diff;function deepCopy(e){return JSON.parse(JSON.stringify(e),dateReviver)}function dateReviver(e,t){if("string"==typeof t){var r=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(t);if(r)return new Date(Date.UTC(+r[1],+r[2]-1,+r[3],+r[4],+r[5],+r[6].split(".")[0],+r[6].split(".")[1]))}return t}function getMongoUpdates(e,t,r){e.createdAt&&(t.createdAt=e.createdAt),e.updatedAt&&(t.updatedAt=e.updatedAt);var n=rusDiff.diff(e,t);return n?(n.$set&&!Object.keys(n.$set).length&&delete n.$set,r&&(n.$inc={__v:1})):r&&(n={$inc:{__v:1}}),n}function getMongoMergeUpdatedDoc(e,t,r){var n=deepCopy(r);n.__v=t.__v;var i=getDeepDiff(r,t);return applyMongoUpdate(n,mergeUpdates(getDeepDiff(r,e),i)),n}function mergeUpdates(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n={$set:{},$unset:{},$inc:{},$push:{},$pull:{}};return e.filter(function(e){return e}).forEach(function(e){e.forEach(function(t){for(var e=t.path[0],r=1;r<t.path.length;r++)e+="."+t.path[r];"E"===t.kind?"number"==typeof t.rhs&&e.endsWith("quantity")?n.$inc[e]?n.$inc[e]+=t.rhs-t.lhs:n.$inc[e]=t.rhs-t.lhs:n.$set[e]=t.rhs:"A"===t.kind&&("N"===t.item.kind?n.$push[e]&&JSON.stringify(n.$push[e])===JSON.stringify(t.item.rhs)||(n.$push[e]||(n.$push[e]=[]),n.$push[e].filter(function(e){return JSON.stringify(e)===JSON.stringify(t.item.rhs)}).length||n.$push[e].push(t.item.rhs)):"D"===t.item.kind?n.$pull[e]&&JSON.stringify(n.$pull[e])===JSON.stringify(t.item.lhs)||(n.$pull[e]||(n.$pull[e]=[]),n.$pull[e].filter(function(e){return JSON.stringify(e)===JSON.stringify(t.item.lhs)}).length||n.$pull[e].push(t.item.lhs)):"E"===t.item.kind&&console.log("Condition E not satisfied."))})}),n}function getDeepDiff(e,t){return delete e._id,delete e.__v,e.updatedAt&&delete e.updatedAt,e.createdAt&&delete e.createdAt,delete t._id,delete t.__v,t.updatedAt&&delete t.updatedAt,t.createdAt&&delete t.createdAt,deepDiff(e,t)}function applyMongoUpdate(e,t){var r,n,i,o,l,f,u,s,d,p,a,c,g,h,v,$,y,D,m,w,A,S,_,U,M,O,N,E;if(r=deepCopy(e),null!=t){if(null!=t.$rename)for(n in c=t.$rename){if(E=c[n],p=(g=resolve(e,n))[0],f=g[1],a=(h=resolve(e,E))[0],u=h[1],null==p||1!==f.length)throw new Error(p+"/"+f+" - couldn't resolve second for "+e+" "+n);if(null==a||1!==u.length)throw new Error(a+"/"+u+" - couldn't resolve first for "+e+" "+E);a[u[0]]=p[f[0]],delete p[f[0]]}if(null!=t.$set)for(n in v=t.$set){if(E=v[n],d=($=resolve(e,n,{force:!0}))[0],l=$[1],null==d||1!==l.length)throw new Error(d+"/"+l+" - couldn't set for "+e+" "+n);d[l[0]]=E}if(null!=t.$inc)for(n in y=t.$inc){if(E=y[n],d=(D=resolve(e,n,{force:!0}))[0],l=D[1],null==d||1!==l.length)throw new Error(d+"/"+l+" - couldn't set for "+e+" "+n);null==d[s=l[0]]&&(d[s]=0),d[l[0]]+=E}if(null!=t.$unset)for(n in m=t.$unset){if(E=m[n],d=(w=resolve(e,n))[0],l=w[1],null==d||1!==l.length)throw new Error(d+"/"+l+" - couldn't unset for "+e+" "+n);delete d[l[0]]}if(null!=t.$pull)for(i in A=t.$pull)for(var J=(S=A[i]).length-1;0<=J;J--){if(o=S[J],d=(_=resolve(e,i))[0],l=_[1],a=(U=resolve(r,i))[0],u=U[1],null==d||1!==l.length)throw new Error(d+"/"+l+" - couldn't unset for "+e+" "+i);d[l[0]].splice(a[u[0]].findIndex(function(e){return JSON.stringify(e)===JSON.stringify(o)}),1)}if(null!=t.$push)for(i in M=t.$push)for(J=(O=M[i]).length-1;0<=J;J--){if(o=O[J],d=(N=resolve(e,i))[0],l=N[1],null==d||1!==l.length)throw new Error(d+"/"+l+" - couldn't unset for "+e+" "+i);d[l[0]].push(o)}}return e}function resolve(e,t,r){var n,i,o,l;if(null==r&&(r={}),o=[],0<(l=arrize(t)).length&&o.unshift(l.pop()),null!==(n=e))for(;void 0!==(i=l.shift());){if(void 0===n[i]){l.unshift(i);break}n=n[i]}if(r.force)for(;void 0!==(i=l.shift());)"number"==typeof l[0]||0===l.length&&"number"==typeof o[0]?n[i]=[]:n[i]={},n=n[i];else for(;void 0!==(i=l.pop());)o.unshift(i);return[n,o]}function arrize(e,t){return null==t&&(t="."),function(){if(Array.isArray(e))return e.slice(0);switch(e){case void 0:case null:case!1:case"":return[];default:return e.toString().split(t)}}().map(function(e){switch(e){case void 0:case null:case!1:case"":return null;default:return e.toString()}}).filter(function(e){return null!=e})}function getBinarySize(e){return e?Buffer.byteLength(e,"utf8"):0}exports.deepCopy=deepCopy,exports.dateReviver=dateReviver,exports.getMongoUpdates=getMongoUpdates,exports.getMongoMergeUpdatedDoc=getMongoMergeUpdatedDoc,exports.mergeUpdates=mergeUpdates,exports.getDeepDiff=getDeepDiff,exports.applyMongoUpdate=applyMongoUpdate,exports.getBinarySize=getBinarySize;
|
|
@@ -1,8 +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 {};
|
|
8
|
-
//# sourceMappingURL=active-subscription.collection.d.ts.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Model, Document } from 'mongoose';
|
|
2
|
-
import { AppStatusModel } from '../models/app-status.model';
|
|
3
|
-
interface ResolveIOModel extends AppStatusModel, Document {
|
|
4
|
-
}
|
|
5
|
-
export declare const AppStatus: Model<ResolveIOModel>;
|
|
6
|
-
export declare const AppStatusVersions: Model<ResolveIOModel>;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=app-status.collection.d.ts.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Model, Document } from 'mongoose';
|
|
2
|
-
import { AppVersionModel } from '../models/app-version.model';
|
|
3
|
-
interface ResolveIOModel extends AppVersionModel, Document {
|
|
4
|
-
}
|
|
5
|
-
export declare const AppVersions: Model<ResolveIOModel>;
|
|
6
|
-
export declare const AppVersionVersions: Model<ResolveIOModel>;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=app-version.collection.d.ts.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Model, Document } from 'mongoose';
|
|
2
|
-
import { CounterModel } from '../models/counter.model';
|
|
3
|
-
interface ResolveIOModel extends CounterModel, Document {
|
|
4
|
-
}
|
|
5
|
-
export declare const Counters: Model<ResolveIOModel>;
|
|
6
|
-
export declare let SupportCounters: Model<ResolveIOModel>;
|
|
7
|
-
export declare const CounterVersions: Model<ResolveIOModel>;
|
|
8
|
-
export declare let SupportCounterVersions: Model<ResolveIOModel>;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=counter.collection.d.ts.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Model, Document } from 'mongoose';
|
|
2
|
-
import { CronJobModel } from '../models/cron-job.model';
|
|
3
|
-
interface ResolveIOModel extends CronJobModel, Document {
|
|
4
|
-
}
|
|
5
|
-
export declare const CronJobHistory: Model<ResolveIOModel>;
|
|
6
|
-
export declare const CronJobHistoryVersions: Model<ResolveIOModel>;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=cron-job-history.collection.d.ts.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Model, Document } from 'mongoose';
|
|
2
|
-
import { CronJobModel } from '../models/cron-job.model';
|
|
3
|
-
interface ResolveIOModel extends CronJobModel, Document {
|
|
4
|
-
}
|
|
5
|
-
export declare const CronJobs: Model<ResolveIOModel>;
|
|
6
|
-
export declare const CronJobVersions: Model<ResolveIOModel>;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=cron-job.collection.d.ts.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Model, Document } from 'mongoose';
|
|
2
|
-
import { FileModel } from '../models/file.model';
|
|
3
|
-
interface ResolveIOModel extends FileModel, Document {
|
|
4
|
-
}
|
|
5
|
-
export declare const Files: Model<ResolveIOModel>;
|
|
6
|
-
export declare let SupportFiles: Model<ResolveIOModel>;
|
|
7
|
-
export declare const FileVersions: Model<ResolveIOModel>;
|
|
8
|
-
export declare let SupportFileVersions: Model<ResolveIOModel>;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=file.collection.d.ts.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Model, Document } from 'mongoose';
|
|
2
|
-
import { FlagModel } from '../models/flag.model';
|
|
3
|
-
interface ResolveIOModel extends FlagModel, Document {
|
|
4
|
-
}
|
|
5
|
-
export declare const Flags: Model<ResolveIOModel>;
|
|
6
|
-
export declare const FlagVersions: Model<ResolveIOModel>;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=flag.collection.d.ts.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Model, Document } from 'mongoose';
|
|
2
|
-
import { LogModel } from '../models/log.model';
|
|
3
|
-
interface ResolveIOModel extends LogModel, Document {
|
|
4
|
-
}
|
|
5
|
-
export declare const Logs: Model<ResolveIOModel>;
|
|
6
|
-
export declare const LogVersions: Model<ResolveIOModel>;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=log.collection.d.ts.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Model, Document } from 'mongoose';
|
|
2
|
-
import { LoggedInUserModel } from '../models/logged-in-users.model';
|
|
3
|
-
interface ResolveIOModel extends LoggedInUserModel, Document {
|
|
4
|
-
}
|
|
5
|
-
export declare const LoggedInUsers: Model<ResolveIOModel>;
|
|
6
|
-
export declare const LoggedInUserVersions: Model<ResolveIOModel>;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=logged-in-users.collection.d.ts.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Model, Document } from 'mongoose';
|
|
2
|
-
import { MethodCallModel } from '../models/method-call.model';
|
|
3
|
-
interface ResolveIOModel extends MethodCallModel, Document {
|
|
4
|
-
}
|
|
5
|
-
export declare const MethodCalls: Model<ResolveIOModel>;
|
|
6
|
-
export {};
|
|
7
|
-
//# sourceMappingURL=method-call.collection.d.ts.map
|