@dhyasama/totem-models 6.8.9 → 6.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/.npmignore +14 -0
- package/lib/Account.js +6 -2
- package/lib/Round.js +14 -1
- package/package-lock.json +1829 -0
- package/package.json +1 -1
package/.npmignore
ADDED
package/lib/Account.js
CHANGED
|
@@ -44,7 +44,9 @@ module.exports = function(mongoose, config) {
|
|
|
44
44
|
params: { type: Schema.Types.Mixed },
|
|
45
45
|
profile: { type: Schema.Types.Mixed },
|
|
46
46
|
watch: { type: Schema.Types.Mixed },
|
|
47
|
-
nextSyncToken: { type: String, default: null }
|
|
47
|
+
nextSyncToken: { type: String, default: null },
|
|
48
|
+
requestTokenRefresh: { type: Boolean, default: false },
|
|
49
|
+
requestTokenRefreshEmailSent: { type: Boolean, default: false }
|
|
48
50
|
},
|
|
49
51
|
|
|
50
52
|
microsoft: {
|
|
@@ -53,7 +55,9 @@ module.exports = function(mongoose, config) {
|
|
|
53
55
|
params: { type: Schema.Types.Mixed },
|
|
54
56
|
profile: { type: Schema.Types.Mixed },
|
|
55
57
|
watch: { type: Schema.Types.Mixed },
|
|
56
|
-
deltaLink: { type: String, default: null }
|
|
58
|
+
deltaLink: { type: String, default: null },
|
|
59
|
+
requestTokenRefresh: { type: Boolean, default: false },
|
|
60
|
+
requestTokenRefreshEmailSent: { type: Boolean, default: false }
|
|
57
61
|
}
|
|
58
62
|
|
|
59
63
|
},
|
package/lib/Round.js
CHANGED
|
@@ -160,6 +160,7 @@ module.exports = function(mongoose, config) {
|
|
|
160
160
|
filters: rounds[0].organization.filters,
|
|
161
161
|
status: rounds[0].organization.status,
|
|
162
162
|
preMoneyValuation: rounds[0].preMoneyValuation,
|
|
163
|
+
chairs: rounds[0].organization.chairs,
|
|
163
164
|
funds: funds
|
|
164
165
|
};
|
|
165
166
|
|
|
@@ -644,7 +645,16 @@ module.exports = function(mongoose, config) {
|
|
|
644
645
|
|
|
645
646
|
var query = self.find({ 'vehicles.fund': { $in: fundIds } });
|
|
646
647
|
query.select('organization vehicles preMoneyValuation');
|
|
647
|
-
query.populate('organization', 'name logoUrl description contact filters status ipo closed acquired operating website websiteAliases');
|
|
648
|
+
query.populate('organization', 'name logoUrl description contact chairs filters status ipo closed acquired operating website websiteAliases');
|
|
649
|
+
query.deepPopulate([
|
|
650
|
+
'organization.chairs.first',
|
|
651
|
+
'organization.chairs.second',
|
|
652
|
+
], {
|
|
653
|
+
populate: {
|
|
654
|
+
'organization.chairs.first': { select: 'name avatarUrl title doNotDisplay' },
|
|
655
|
+
'organization.chairs.second': { select: 'name avatarUrl title doNotDisplay' },
|
|
656
|
+
}
|
|
657
|
+
});
|
|
648
658
|
query.populate('vehicles.fund');
|
|
649
659
|
|
|
650
660
|
if (config.CUSTOMER_ID == 'GLOBAL_PROCESS') {
|
|
@@ -902,6 +912,9 @@ module.exports = function(mongoose, config) {
|
|
|
902
912
|
Round.index({ organization: 1, roundName: 1 }, { unique: true, partialFilterExpression : { type :"string" } });
|
|
903
913
|
Round.on('index', function(err) { console.log('error building Round indexes: ' + err); });
|
|
904
914
|
|
|
915
|
+
var deepPopulate = require('mongoose-deep-populate')(mongoose);
|
|
916
|
+
Round.plugin(deepPopulate);
|
|
917
|
+
|
|
905
918
|
mongoose.model('Round', Round);
|
|
906
919
|
|
|
907
920
|
};
|