@dhyasama/totem-models 2.2.0 → 2.2.2

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.
@@ -90,7 +90,7 @@ module.exports = function(mongoose, config) {
90
90
  // because it will alter the pages
91
91
  options.sort = options.sort || {'startTime': -1};
92
92
  options.before = options.before || moment().toISOString();
93
- options.after = options.after || moment().subtract(2, 'year').toISOString();
93
+ options.after = options.after || moment().subtract(20, 'year').toISOString();
94
94
 
95
95
  var query = self.find({ totemCustomerId: config.CUSTOMER_ID });
96
96
 
package/lib/Person.js CHANGED
@@ -191,6 +191,9 @@ module.exports = function(mongoose, config) {
191
191
 
192
192
  Person.virtual('allNotes').get(function () {
193
193
 
194
+ // todo - calendarEventNotes are now stored in the Interactions collection
195
+ // todo - should this be deprecated? research where it's used.
196
+
194
197
  // combine direct person notes and notes from events this person attended
195
198
  // sort reverse chronologically
196
199
 
@@ -746,19 +749,6 @@ module.exports = function(mongoose, config) {
746
749
 
747
750
  };
748
751
 
749
- // Person.statics.getInteractedWith = function getInteractedWith(personId, cb) {
750
- //
751
- // var self = this;
752
- // var query = self.find({
753
- // $or: [
754
- // { 'calendarEventSummaries.attendees.internal': personId },
755
- // { 'calendarEventSummaries.attendees.external': personId }
756
- // ]
757
- // });
758
- // query.exec(cb);
759
- //
760
- // };
761
-
762
752
  Person.statics.getNotes = function getNotes(personId, cb) {
763
753
 
764
754
  var self = this;
@@ -802,12 +792,6 @@ module.exports = function(mongoose, config) {
802
792
  .exec(cb);
803
793
  };
804
794
 
805
- // Person.statics.findByProviderEventId = function (id, cb) {
806
- // this
807
- // .find({ 'calendarEventSummaries.providerEventId': id })
808
- // .exec(cb);
809
- // };
810
-
811
795
  Person.statics.findBySlug = function (slug, cb) {
812
796
  this
813
797
  .find({ slug: new RegExp(slug, 'i'), 'deleted': {$ne: true} })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",