@dhyasama/totem-models 12.7.0 → 12.9.0
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/index.js +4 -0
- package/lib/Account.js +14 -14
- package/lib/Activity.js +2 -2
- package/lib/ApiKey.js +3 -3
- package/lib/CalendarEvent.js +14 -14
- package/lib/CapTable.js +11 -11
- package/lib/Deal.js +14 -14
- package/lib/DiffbotArticle.js +3 -3
- package/lib/DiffbotOrganization.js +3 -3
- package/lib/Document.js +7 -7
- package/lib/Event.js +5 -5
- package/lib/EventAttendee.js +4 -4
- package/lib/Financials.js +23 -23
- package/lib/FinancialsAnalysis.js +5 -5
- package/lib/Flag.js +5 -5
- package/lib/Folder.js +4 -4
- package/lib/Fund.js +10 -10
- package/lib/Interaction.js +14 -14
- package/lib/Investment.js +3 -3
- package/lib/LimitedPartner.js +18 -18
- package/lib/LimitedPartnerCampaign.js +6 -6
- package/lib/LimitedPartnerCommunication.js +12 -12
- package/lib/LimitedPartnerContactGroup.js +4 -4
- package/lib/LimitedPartnerReportGenerator.js +2 -2
- package/lib/List.js +8 -8
- package/lib/Meeting.js +6 -6
- package/lib/Message.js +17 -17
- package/lib/MessageRecipient.js +3 -3
- package/lib/News.js +4 -4
- package/lib/Note.js +5 -5
- package/lib/Organization.js +37 -37
- package/lib/Person.js +19 -19
- package/lib/Rate.js +3 -3
- package/lib/Round.js +13 -14
- package/lib/Snapshot.js +2 -2
- package/lib/Sync.js +2 -2
- package/lib/Webhook.js +1 -1
- package/package.json +2 -1
package/lib/Round.js
CHANGED
|
@@ -314,7 +314,7 @@ module.exports = function(mongoose, config) {
|
|
|
314
314
|
return rounds;
|
|
315
315
|
};
|
|
316
316
|
|
|
317
|
-
if (typeof cb === 'function') { run().then(result => cb(null, result)
|
|
317
|
+
if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
|
|
318
318
|
else { return run(); }
|
|
319
319
|
|
|
320
320
|
};
|
|
@@ -372,7 +372,7 @@ module.exports = function(mongoose, config) {
|
|
|
372
372
|
return rounds;
|
|
373
373
|
};
|
|
374
374
|
|
|
375
|
-
if (typeof cb === 'function') { run().then(result => cb(null, result)
|
|
375
|
+
if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
|
|
376
376
|
else { return run(); }
|
|
377
377
|
|
|
378
378
|
};
|
|
@@ -408,7 +408,7 @@ module.exports = function(mongoose, config) {
|
|
|
408
408
|
return rounds;
|
|
409
409
|
};
|
|
410
410
|
|
|
411
|
-
if (typeof cb === 'function') { run().then(result => cb(null, result)
|
|
411
|
+
if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
|
|
412
412
|
else { return run(); }
|
|
413
413
|
|
|
414
414
|
};
|
|
@@ -465,7 +465,7 @@ module.exports = function(mongoose, config) {
|
|
|
465
465
|
return fundInvestments;
|
|
466
466
|
};
|
|
467
467
|
|
|
468
|
-
if (typeof cb === 'function') { run().then(result => cb(null, result)
|
|
468
|
+
if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
|
|
469
469
|
else { return run(); }
|
|
470
470
|
|
|
471
471
|
};
|
|
@@ -533,7 +533,7 @@ module.exports = function(mongoose, config) {
|
|
|
533
533
|
return portfolioInvestments;
|
|
534
534
|
};
|
|
535
535
|
|
|
536
|
-
if (typeof cb === 'function') { run().then(result => cb(null, result)
|
|
536
|
+
if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
|
|
537
537
|
else { return run(); }
|
|
538
538
|
|
|
539
539
|
};
|
|
@@ -574,7 +574,7 @@ module.exports = function(mongoose, config) {
|
|
|
574
574
|
return calculatePerformance(rounds);
|
|
575
575
|
};
|
|
576
576
|
|
|
577
|
-
if (typeof cb === 'function') { run().then(result => cb(null, result)
|
|
577
|
+
if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
|
|
578
578
|
else { return run(); }
|
|
579
579
|
|
|
580
580
|
};
|
|
@@ -625,7 +625,7 @@ module.exports = function(mongoose, config) {
|
|
|
625
625
|
return buildPortfolio(rounds, [fundId]);
|
|
626
626
|
};
|
|
627
627
|
|
|
628
|
-
if (typeof cb === 'function') { run().then(result => cb(null, result)
|
|
628
|
+
if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
|
|
629
629
|
else { return run(); }
|
|
630
630
|
|
|
631
631
|
};
|
|
@@ -685,7 +685,7 @@ module.exports = function(mongoose, config) {
|
|
|
685
685
|
return buildPortfolio(rounds, fundIds);
|
|
686
686
|
};
|
|
687
687
|
|
|
688
|
-
if (typeof cb === 'function') { run().then(result => cb(null, result)
|
|
688
|
+
if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
|
|
689
689
|
else { return run(); }
|
|
690
690
|
|
|
691
691
|
};
|
|
@@ -715,7 +715,6 @@ module.exports = function(mongoose, config) {
|
|
|
715
715
|
|
|
716
716
|
if (!options.isWorkerProcess) {
|
|
717
717
|
_.each(rounds, function(round) {
|
|
718
|
-
round.organization = round.organization.toObject({ virtuals: true });
|
|
719
718
|
round = helpers.cleanRound(round, fundIds, options.CUSTOMER_ID);
|
|
720
719
|
round.organization = helpers.cleanOrg(round.organization, options.CUSTOMER_ID);
|
|
721
720
|
});
|
|
@@ -747,7 +746,7 @@ module.exports = function(mongoose, config) {
|
|
|
747
746
|
return portfolio;
|
|
748
747
|
};
|
|
749
748
|
|
|
750
|
-
if (typeof cb === 'function') { run().then(result => cb(null, result)
|
|
749
|
+
if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
|
|
751
750
|
else { return run(); }
|
|
752
751
|
|
|
753
752
|
};
|
|
@@ -775,7 +774,7 @@ module.exports = function(mongoose, config) {
|
|
|
775
774
|
return result;
|
|
776
775
|
};
|
|
777
776
|
|
|
778
|
-
if (typeof cb === 'function') { run().then(result => cb(null, result)
|
|
777
|
+
if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
|
|
779
778
|
else { return run(); }
|
|
780
779
|
|
|
781
780
|
};
|
|
@@ -792,7 +791,7 @@ module.exports = function(mongoose, config) {
|
|
|
792
791
|
return result;
|
|
793
792
|
};
|
|
794
793
|
|
|
795
|
-
if (typeof cb === 'function') { run().then(result => cb(null, result)
|
|
794
|
+
if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
|
|
796
795
|
else { return run(); }
|
|
797
796
|
|
|
798
797
|
};
|
|
@@ -945,7 +944,7 @@ module.exports = function(mongoose, config) {
|
|
|
945
944
|
return relatedWithRounds;
|
|
946
945
|
};
|
|
947
946
|
|
|
948
|
-
if (typeof cb === 'function') { run().then(result => cb(null, result)
|
|
947
|
+
if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
|
|
949
948
|
else { return run(); }
|
|
950
949
|
|
|
951
950
|
};
|
|
@@ -962,7 +961,7 @@ module.exports = function(mongoose, config) {
|
|
|
962
961
|
return await this.findByIdAndUpdate(_id, update, { new: true });
|
|
963
962
|
};
|
|
964
963
|
|
|
965
|
-
if (typeof cb === 'function') { run().then(result => cb(null, result)
|
|
964
|
+
if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
|
|
966
965
|
else { return run(); }
|
|
967
966
|
|
|
968
967
|
};
|
package/lib/Snapshot.js
CHANGED
|
@@ -20,7 +20,7 @@ module.exports = function(mongoose, config) {
|
|
|
20
20
|
return result;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
if (typeof cb === 'function') { run().then(result => cb(null, result)
|
|
23
|
+
if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
|
|
24
24
|
else { return run(); }
|
|
25
25
|
|
|
26
26
|
};
|
|
@@ -35,7 +35,7 @@ module.exports = function(mongoose, config) {
|
|
|
35
35
|
return await this.findByIdAndUpdate(_id, update, { new: true });
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
-
if (typeof cb === 'function') { run().then(result => cb(null, result)
|
|
38
|
+
if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
|
|
39
39
|
else { return run(); }
|
|
40
40
|
|
|
41
41
|
};
|
package/lib/Sync.js
CHANGED
|
@@ -34,7 +34,7 @@ module.exports = function(mongoose, config) {
|
|
|
34
34
|
return result;
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
if (typeof cb === 'function') { run().then(result => cb(null, result)
|
|
37
|
+
if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
|
|
38
38
|
else { return run(); }
|
|
39
39
|
|
|
40
40
|
};
|
|
@@ -50,7 +50,7 @@ module.exports = function(mongoose, config) {
|
|
|
50
50
|
return await this.findByIdAndUpdate(_id, update, { new: true });
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
-
if (typeof cb === 'function') { run().then(result => cb(null, result)
|
|
53
|
+
if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
|
|
54
54
|
else { return run(); }
|
|
55
55
|
|
|
56
56
|
};
|
package/lib/Webhook.js
CHANGED
|
@@ -27,7 +27,7 @@ module.exports = function(mongoose, config) {
|
|
|
27
27
|
return await this.findByIdAndUpdate(_id, update, { new: true });
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
if (typeof cb === 'function') { run().then(result => cb(null, result)
|
|
30
|
+
if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
|
|
31
31
|
else { return run(); }
|
|
32
32
|
|
|
33
33
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhyasama/totem-models",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.9.0",
|
|
4
4
|
"author": "Jason Reynolds",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"description": "Models for Totem platform",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"awesome-phonenumber": "^1.0.14",
|
|
22
22
|
"escape-string-regexp": "^1.0.5",
|
|
23
23
|
"moment": "^2.30.1",
|
|
24
|
+
"mongoose-lean-virtuals": "^2.1.0",
|
|
24
25
|
"range_check": "^1.4.0",
|
|
25
26
|
"underscore": "^1.13.6",
|
|
26
27
|
"validator": "^13.11.0"
|