@dhyasama/totem-models 8.5.3 → 8.5.5
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/lib/Account.js +1 -1
- package/lib/Activity.js +1 -0
- package/lib/CalendarEvent.js +1 -0
- package/lib/CapTable.js +1 -0
- package/lib/Deal.js +1 -0
- package/lib/Document.js +1 -0
- package/lib/Financials.js +1 -0
- package/lib/Flag.js +1 -0
- package/lib/Fund.js +1 -0
- package/lib/Interaction.js +1 -0
- package/lib/Investment.js +1 -0
- package/lib/LimitedPartner.js +5 -3
- package/lib/List.js +1 -0
- package/lib/Message.js +1 -0
- package/lib/News.js +1 -0
- package/lib/Note.js +1 -0
- package/lib/Organization.js +1 -0
- package/lib/Person.js +1 -0
- package/lib/Round.js +1 -0
- package/lib/Snapshot.js +2 -0
- package/lib/Sync.js +1 -0
- package/lib/Webhook.js +1 -0
- package/package.json +3 -3
- package/test/CapTable.js +8 -8
- package/test/Investment.js +8 -8
- package/test/Round.js +8 -8
package/lib/Account.js
CHANGED
package/lib/Activity.js
CHANGED
package/lib/CalendarEvent.js
CHANGED
|
@@ -177,6 +177,7 @@ module.exports = function(mongoose, config) {
|
|
|
177
177
|
};
|
|
178
178
|
|
|
179
179
|
|
|
180
|
+
CalendarEvent.set('usePushEach', true);
|
|
180
181
|
CalendarEvent.set('autoIndex', false);
|
|
181
182
|
CalendarEvent.on('index', function(err) { console.log('error building calendar event indexes: ' + err); });
|
|
182
183
|
|
package/lib/CapTable.js
CHANGED
|
@@ -418,6 +418,7 @@ module.exports = function(mongoose, config) {
|
|
|
418
418
|
// CONFIG
|
|
419
419
|
///////////////////////////////////////////////////////////////////////////////////////
|
|
420
420
|
|
|
421
|
+
CapTable.set('usePushEach', true);
|
|
421
422
|
CapTable.set('toJSON', { virtuals: true });
|
|
422
423
|
CapTable.set('autoIndex', false);
|
|
423
424
|
|
package/lib/Deal.js
CHANGED
|
@@ -450,6 +450,7 @@ module.exports = function(mongoose, config) {
|
|
|
450
450
|
|
|
451
451
|
Deal.set('toJSON', { virtuals: true });
|
|
452
452
|
Deal.set('autoIndex', false);
|
|
453
|
+
Deal.set('usePushEach', true);
|
|
453
454
|
|
|
454
455
|
Deal.on('index', function(err) { console.log('error building deal indexes: ' + err); });
|
|
455
456
|
|
package/lib/Document.js
CHANGED
|
@@ -202,6 +202,7 @@ module.exports = function(mongoose, config) {
|
|
|
202
202
|
// CONFIG
|
|
203
203
|
///////////////////////////////////////////////////////////////////////////////////////
|
|
204
204
|
|
|
205
|
+
Document.set('usePushEach', true);
|
|
205
206
|
Document.set('toJSON', { virtuals: true });
|
|
206
207
|
Document.set('autoIndex', false);
|
|
207
208
|
Document.on('index', function(err) { console.log('error building document indexes: ' + err); });
|
package/lib/Financials.js
CHANGED
|
@@ -523,6 +523,7 @@ module.exports = function(mongoose, config) {
|
|
|
523
523
|
// CONFIG
|
|
524
524
|
///////////////////////////////////////////////////////////////////////////////////////
|
|
525
525
|
|
|
526
|
+
Financials.set('usePushEach', true);
|
|
526
527
|
Financials.set('toJSON', { virtuals: true });
|
|
527
528
|
Financials.set('autoIndex', false);
|
|
528
529
|
|
package/lib/Flag.js
CHANGED
|
@@ -118,6 +118,7 @@ module.exports = function(mongoose, config) {
|
|
|
118
118
|
self.text = querystring.unescape(self.text);
|
|
119
119
|
});
|
|
120
120
|
|
|
121
|
+
Flag.set('usePushEach', true);
|
|
121
122
|
Flag.set('autoIndex', false);
|
|
122
123
|
Flag.on('index', function(err) { console.log('error building Flag indexes: ' + err); });
|
|
123
124
|
|
package/lib/Fund.js
CHANGED
package/lib/Interaction.js
CHANGED
|
@@ -269,6 +269,7 @@ module.exports = function(mongoose, config) {
|
|
|
269
269
|
|
|
270
270
|
};
|
|
271
271
|
|
|
272
|
+
Interaction.set('usePushEach', true);
|
|
272
273
|
Interaction.set('autoIndex', false);
|
|
273
274
|
Interaction.on('index', function(err) { console.log('error building interaction indexes: ' + err); });
|
|
274
275
|
|
package/lib/Investment.js
CHANGED
|
@@ -170,6 +170,7 @@ module.exports = function(mongoose, config) {
|
|
|
170
170
|
// CONFIG
|
|
171
171
|
///////////////////////////////////////////////////////////////////////////////////////
|
|
172
172
|
|
|
173
|
+
Investment.set('usePushEach', true);
|
|
173
174
|
Investment.set('toJSON', { virtuals: true });
|
|
174
175
|
Investment.set('autoIndex', false);
|
|
175
176
|
|
package/lib/LimitedPartner.js
CHANGED
|
@@ -551,10 +551,11 @@ module.exports = function(mongoose, config) {
|
|
|
551
551
|
|
|
552
552
|
});
|
|
553
553
|
|
|
554
|
+
// todo - fix sorting
|
|
554
555
|
return cb(null, {
|
|
555
|
-
all: helpers.sortPeopleSources(all, options.CUSTOMER_ID),
|
|
556
|
-
current: helpers.sortPeopleSources(current, options.CUSTOMER_ID),
|
|
557
|
-
past: helpers.sortPeopleSources(past, options.CUSTOMER_ID)
|
|
556
|
+
all: all, //helpers.sortPeopleSources(all, options.CUSTOMER_ID),
|
|
557
|
+
current: current, //helpers.sortPeopleSources(current, options.CUSTOMER_ID),
|
|
558
|
+
past: past //helpers.sortPeopleSources(past, options.CUSTOMER_ID)
|
|
558
559
|
});
|
|
559
560
|
|
|
560
561
|
});
|
|
@@ -719,6 +720,7 @@ module.exports = function(mongoose, config) {
|
|
|
719
720
|
|
|
720
721
|
//////////////////////////////
|
|
721
722
|
|
|
723
|
+
LimitedPartner.set('usePushEach', true);
|
|
722
724
|
LimitedPartner.set('autoIndex', false);
|
|
723
725
|
LimitedPartner.on('index', function(err) { console.log('error building limited partner indexes: ' + err); });
|
|
724
726
|
|
package/lib/List.js
CHANGED
package/lib/Message.js
CHANGED
package/lib/News.js
CHANGED
package/lib/Note.js
CHANGED
|
@@ -127,6 +127,7 @@ module.exports = function(mongoose, config) {
|
|
|
127
127
|
self.text = querystring.unescape(self.text);
|
|
128
128
|
});
|
|
129
129
|
|
|
130
|
+
Note.set('usePushEach', true);
|
|
130
131
|
Note.set('autoIndex', false);
|
|
131
132
|
Note.on('index', function(err) { console.log('error building note indexes: ' + err); });
|
|
132
133
|
|
package/lib/Organization.js
CHANGED
|
@@ -2054,6 +2054,7 @@ module.exports = function(mongoose, config) {
|
|
|
2054
2054
|
// CONFIG
|
|
2055
2055
|
///////////////////////////////////////////////////////////////////////////////////////
|
|
2056
2056
|
|
|
2057
|
+
Organization.set('usePushEach', true);
|
|
2057
2058
|
Organization.set('toJSON', { virtuals: true });
|
|
2058
2059
|
Organization.set('autoIndex', false);
|
|
2059
2060
|
|
package/lib/Person.js
CHANGED
|
@@ -1075,6 +1075,7 @@ module.exports = function(mongoose, config) {
|
|
|
1075
1075
|
Person.set('autoIndex', false);
|
|
1076
1076
|
Person.on('index', function(err) { console.log('error building person indexes: ' + err); });
|
|
1077
1077
|
|
|
1078
|
+
Person.set('usePushEach', true);
|
|
1078
1079
|
Person.set('toJSON', { virtuals: true });
|
|
1079
1080
|
|
|
1080
1081
|
mongoose.model('Person', Person);
|
package/lib/Round.js
CHANGED
|
@@ -957,6 +957,7 @@ module.exports = function(mongoose, config) {
|
|
|
957
957
|
// CONFIG
|
|
958
958
|
///////////////////////////////////////////////////////////////////////////////////////
|
|
959
959
|
|
|
960
|
+
Round.set('usePushEach', true);
|
|
960
961
|
Round.set('toJSON', { virtuals: true });
|
|
961
962
|
Round.set('autoIndex', false);
|
|
962
963
|
|
package/lib/Snapshot.js
CHANGED
package/lib/Sync.js
CHANGED
package/lib/Webhook.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhyasama/totem-models",
|
|
3
|
-
"version": "8.5.
|
|
3
|
+
"version": "8.5.5",
|
|
4
4
|
"author": "Jason Reynolds",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"description": "Models for Totem platform",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@dhyasama/totem-utilities": "^3.0.0",
|
|
19
19
|
"async": "^2.6.3",
|
|
20
20
|
"awesome-phonenumber": "^1.0.14",
|
|
21
|
-
"bluebird": "^3.7.
|
|
21
|
+
"bluebird": "^3.7.2",
|
|
22
22
|
"escape-string-regexp": "^1.0.5",
|
|
23
23
|
"moment": "^2.24.0",
|
|
24
24
|
"mongoose-deep-populate": "^3.0.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"mocha": "^5.2.0",
|
|
33
33
|
"mocha-mongoose": "^1.2.0",
|
|
34
|
-
"mongoose": "^4.
|
|
34
|
+
"mongoose": "^4.13.20",
|
|
35
35
|
"nock": "^7.2.2",
|
|
36
36
|
"should": "^11.1.1"
|
|
37
37
|
}
|
package/test/CapTable.js
CHANGED
|
@@ -27,14 +27,14 @@ describe('Cap Tables', function() {
|
|
|
27
27
|
clearDB(done);
|
|
28
28
|
});
|
|
29
29
|
|
|
30
|
-
before(function(done) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
});
|
|
30
|
+
// before(function(done) {
|
|
31
|
+
// CapTable.collection.dropIndexes(function (err, result) {
|
|
32
|
+
// should.not.exist(err);
|
|
33
|
+
// should.exist(result);
|
|
34
|
+
// result.should.equal(true);
|
|
35
|
+
// return done();
|
|
36
|
+
// });
|
|
37
|
+
// });
|
|
38
38
|
|
|
39
39
|
before(function(done) {
|
|
40
40
|
|
package/test/Investment.js
CHANGED
|
@@ -22,14 +22,14 @@ describe('Investments', function() {
|
|
|
22
22
|
clearDB(done);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
|
-
before(function (done) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
});
|
|
25
|
+
// before(function (done) {
|
|
26
|
+
// Investment.collection.dropIndexes(function (err, result) {
|
|
27
|
+
// should.not.exist(err);
|
|
28
|
+
// should.exist(result);
|
|
29
|
+
// result.should.equal(true);
|
|
30
|
+
// return done();
|
|
31
|
+
// });
|
|
32
|
+
// });
|
|
33
33
|
|
|
34
34
|
it('creates an investment', function(done) {
|
|
35
35
|
|
package/test/Round.js
CHANGED
|
@@ -29,14 +29,14 @@ describe('Rounds', function() {
|
|
|
29
29
|
clearDB(done);
|
|
30
30
|
});
|
|
31
31
|
|
|
32
|
-
before(function (done) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
});
|
|
32
|
+
// before(function (done) {
|
|
33
|
+
// Round.collection.dropIndexes(function (err, result) {
|
|
34
|
+
// should.not.exist(err);
|
|
35
|
+
// should.exist(result);
|
|
36
|
+
// result.should.equal(true);
|
|
37
|
+
// return done();
|
|
38
|
+
// });
|
|
39
|
+
// });
|
|
40
40
|
|
|
41
41
|
before(function(done) {
|
|
42
42
|
|