@dhyasama/totem-models 4.6.0 → 4.7.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 ADDED
@@ -0,0 +1,14 @@
1
+ lib-cov
2
+ *.seed
3
+ *.log
4
+ *.csv
5
+ *.dat
6
+ *.out
7
+ *.pid
8
+ *.gz
9
+
10
+ npm-debug.log
11
+ node_modules
12
+
13
+ .DS_Store
14
+ .idea
package/lib/Document.js CHANGED
@@ -28,7 +28,11 @@ module.exports = function(mongoose, config) {
28
28
  s3: {
29
29
  bucket: { type: String, required: true, trim: true },
30
30
  key: { type: String, required: true, trim: true }
31
- }
31
+ },
32
+
33
+ type: { type: String, required: true, enum: ['deals', 'portfolio', 'other'] },
34
+
35
+ subtype: { type: String, enum: ['deck'] },
32
36
 
33
37
  });
34
38
 
package/lib/Message.js CHANGED
@@ -17,7 +17,7 @@ module.exports = function(mongoose, config) {
17
17
  createdOn: { type: Date, required: true },
18
18
  webhook: { type: Schema.ObjectId, ref: 'Webhook', required: true },
19
19
  type: { type: String, required: true, enum: ['email'], default: 'email' }, // for future options
20
- subtype: { type: String, required: true, enum: ['boards', 'updates', 'deals'] },
20
+ subtype: { type: String, required: true, enum: ['boards', 'updates', 'deals', 'portfolio'] },
21
21
  customer: { type: Schema.ObjectId, ref: 'Organization', required: true },
22
22
  organization: { type: Schema.ObjectId, ref: 'Organization' },
23
23
  originalMessageDate: { type: Date, required: false, default: null },
@@ -144,6 +144,10 @@ module.exports = function(mongoose, config) {
144
144
  customer: { type: Schema.ObjectId, ref: 'Organization' }
145
145
  }],
146
146
 
147
+ clearbit: {
148
+ uuid: { type: String, unique: true, partialFilterExpression : { type : "string" }, trim: true }
149
+ },
150
+
147
151
  crunchbase: {
148
152
  uuid: { type: String, unique: true, partialFilterExpression : { type : "string" }, trim: true },
149
153
  url: { type: String, unique: true, partialFilterExpression : { type :"string" }, trim: true }
package/lib/Person.js CHANGED
@@ -43,7 +43,7 @@ module.exports = function(mongoose, config) {
43
43
 
44
44
  email: [{
45
45
  type: { type: String, enum: ['personal', 'work', 'assistant', 'other'] },
46
- email: { type: String, default: '', trim: true, lowercase: true },
46
+ email: { type: String, unique: true, partialFilterExpression : { type :"string" }, trim: true, lowercase: true },
47
47
  primary: { type: Boolean, default: false },
48
48
  inactive: { type: Boolean, default: false }
49
49
  }],
@@ -69,6 +69,10 @@ module.exports = function(mongoose, config) {
69
69
 
70
70
  website: { type: String, default: null, required: false, trim: true, lowercase: true },
71
71
 
72
+ clearbit: {
73
+ uuid: { type: String, unique: true, partialFilterExpression : { type : "string" }, trim: true }
74
+ },
75
+
72
76
  crunchbase: {
73
77
  uuid: { type: String, unique: true, required: false, partialFilterExpression : { type :"string" }, trim: true }
74
78
  },