@dhyasama/totem-models 8.50.0 → 8.52.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.
@@ -657,6 +657,24 @@ module.exports = function(mongoose, config) {
657
657
 
658
658
  };
659
659
 
660
+ LimitedPartner.statics.removeCustomerPeople = function removeCustomerPeople(customerId, cb) {
661
+
662
+ const self = this;
663
+
664
+ if (!cb) { throw new Error('cb is required'); }
665
+ if (!customerId) { return cb(new Error('customerId is required'), null); }
666
+ if (!mongoose.Types.ObjectId.isValid(customerId)) { return cb(new Error('customerId is not a valid ObjectId'), null); }
667
+
668
+ let query = self.update(
669
+ { 'customer': customerId },
670
+ { $set: { people: [] } },
671
+ { multi : true }
672
+ );
673
+
674
+ query.exec(cb);
675
+
676
+ };
677
+
660
678
  LimitedPartner.statics.search = function (terms, options, cb) {
661
679
 
662
680
  const self = this;
@@ -253,8 +253,9 @@ module.exports = function(mongoose, config) {
253
253
  investmentsSheet: {
254
254
  sheet: { type: String, trim: true, unique: true, partialFilterExpression : { type :"string" } },
255
255
  format: {
256
- proceedsConsolidated: { type: Boolean },
257
- unrealizedConsolidated: { type: Boolean }
256
+ transformRounds: { type: Boolean, default: false },
257
+ transformUnrealized: { type: Boolean, default: false },
258
+ transformRealized: { type: Boolean, default: false }
258
259
  },
259
260
  googleSheetCreds: {
260
261
  private_key_id: { type: String, trim: true, unique: true, partialFilterExpression : { type :"string" } },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "8.50.0",
3
+ "version": "8.52.0",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",