codebase-models 2.1.6 → 2.1.8

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.
@@ -79,6 +79,7 @@ export interface ITest extends Document {
79
79
  testtool: string;
80
80
  personalization: boolean;
81
81
  qaMode: boolean;
82
+ dnt: boolean;
82
83
  kameleoontestdetails: mongoose.Schema.Types.Mixed;
83
84
  vwotestdetails: mongoose.Schema.Types.Mixed;
84
85
  triggerevents: any[];
@@ -90,6 +91,7 @@ export interface ITest extends Document {
90
91
  livedate: Date;
91
92
  defaultControl: string;
92
93
  enddate: Date;
94
+ createdBy: mongoose.Schema.Types.ObjectId;
93
95
  }
94
96
  declare const Test: mongoose.Model<any, {}, {}, {}, any, any>;
95
97
  export default Test;
@@ -144,6 +144,7 @@ const TestSchema = new mongoose_1.Schema({
144
144
  testtool: { type: String, default: "" },
145
145
  personalization: { type: Boolean, default: false },
146
146
  qaMode: { type: Boolean, default: false },
147
+ dnt: { type: Boolean, default: false },
147
148
  kameleoontestdetails: { type: mongoose_1.default.Schema.Types.Mixed, default: null },
148
149
  vwotestdetails: { type: mongoose_1.default.Schema.Types.Mixed, default: null },
149
150
  triggerevents: { type: [], default: [] },
@@ -154,7 +155,8 @@ const TestSchema = new mongoose_1.Schema({
154
155
  weeks: { type: Number, default: null },
155
156
  livedate: { type: Date, default: null },
156
157
  defaultControl: { type: String, default: null },
157
- enddate: { type: Date, default: null }
158
+ enddate: { type: Date, default: null },
159
+ createdBy: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "user", default: null }
158
160
  }, {
159
161
  timestamps: true
160
162
  });
@@ -36,6 +36,7 @@ export interface IUser extends Document {
36
36
  updatedAt: Date;
37
37
  resetLink: string;
38
38
  organizationId?: mongoose.Schema.Types.ObjectId;
39
+ external: boolean;
39
40
  }
40
41
  declare const User: mongoose.Model<any, {}, {}, {}, any, any>;
41
42
  export default User;
@@ -61,6 +61,10 @@ const UserSchema = new mongoose_1.Schema({
61
61
  ref: "organization",
62
62
  default: null,
63
63
  },
64
+ external: {
65
+ type: Boolean,
66
+ default: false,
67
+ },
64
68
  }, {
65
69
  timestamps: true,
66
70
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codebase-models",
3
- "version": "2.1.6",
3
+ "version": "2.1.8",
4
4
  "description": "Common models for codebase",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -24,19 +24,16 @@ export interface ITest extends Document {
24
24
  name: string;
25
25
  traffic_allocation: number;
26
26
  audiences_match_type: string;
27
-
28
27
  // Metadata fields
29
28
  metadata_1: mongoose.Schema.Types.Mixed;
30
29
  metadata_2: mongoose.Schema.Types.Mixed;
31
30
  metadata_3: mongoose.Schema.Types.Mixed;
32
31
  integrations_run_mode: mongoose.Schema.Types.Mixed;
33
-
34
32
  // Code fields
35
33
  jscode: string;
36
34
  reset_js: string;
37
35
  csscode: string;
38
36
  htmlcode: string;
39
-
40
37
  // References
41
38
  audiences?: mongoose.Schema.Types.ObjectId[];
42
39
  variations: IVariations[];
@@ -66,6 +63,7 @@ export interface ITest extends Document {
66
63
  testtool: string;
67
64
  personalization: boolean;
68
65
  qaMode: boolean;
66
+ dnt: boolean;
69
67
  kameleoontestdetails: mongoose.Schema.Types.Mixed;
70
68
  vwotestdetails: mongoose.Schema.Types.Mixed;
71
69
  triggerevents: any[];
@@ -77,6 +75,7 @@ export interface ITest extends Document {
77
75
  livedate: Date;
78
76
  defaultControl: string;
79
77
  enddate: Date;
78
+ createdBy: mongoose.Schema.Types.ObjectId;
80
79
  }
81
80
 
82
81
  const VariationsSchema = new Schema<IVariations>({
@@ -195,6 +194,7 @@ const TestSchema = new Schema<ITest>(
195
194
  testtool: { type: String, default: "" },
196
195
  personalization: { type: Boolean, default: false },
197
196
  qaMode: { type: Boolean, default: false },
197
+ dnt: { type: Boolean, default: false },
198
198
  kameleoontestdetails: { type: mongoose.Schema.Types.Mixed, default: null },
199
199
  vwotestdetails: { type: mongoose.Schema.Types.Mixed, default: null },
200
200
  triggerevents: { type: [], default: [] },
@@ -205,7 +205,8 @@ const TestSchema = new Schema<ITest>(
205
205
  weeks: { type: Number, default: null },
206
206
  livedate: { type: Date, default: null },
207
207
  defaultControl: { type: String, default: null },
208
- enddate: { type: Date, default: null }
208
+ enddate: { type: Date, default: null },
209
+ createdBy: { type: mongoose.Schema.Types.ObjectId, ref: "user", default: null }
209
210
  },
210
211
  {
211
212
  timestamps: true
@@ -13,6 +13,7 @@ export interface IUser extends Document {
13
13
  updatedAt: Date;
14
14
  resetLink: string;
15
15
  organizationId?: mongoose.Schema.Types.ObjectId;
16
+ external: boolean;
16
17
  }
17
18
 
18
19
  const UserSchema = new Schema<IUser>({
@@ -52,7 +53,11 @@ const UserSchema = new Schema<IUser>({
52
53
  ref: "organization",
53
54
  default: null,
54
55
  },
56
+ external: {
57
+ type: Boolean,
58
+ default: false,
55
59
  },
60
+ },
56
61
  {
57
62
  timestamps: true,
58
63
  }