codebase-models 2.1.7 → 2.1.9
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/dist/src/models/Audience.d.ts +1 -0
- package/dist/src/models/Audience.js +5 -0
- package/dist/src/models/Environment.d.ts +1 -0
- package/dist/src/models/Environment.js +6 -1
- package/dist/src/models/Goal.d.ts +1 -2
- package/dist/src/models/Goal.js +5 -0
- package/dist/src/models/HypothesisSheet.d.ts +1 -0
- package/dist/src/models/HypothesisSheet.js +5 -0
- package/dist/src/models/Page.d.ts +1 -0
- package/dist/src/models/Page.js +5 -0
- package/dist/src/models/Test.d.ts +2 -1
- package/dist/src/models/Test.js +3 -2
- package/dist/src/models/User.d.ts +1 -0
- package/dist/src/models/User.js +4 -0
- package/package.json +1 -1
- package/src/models/Audience.ts +6 -0
- package/src/models/Environment.ts +7 -1
- package/src/models/Goal.ts +6 -2
- package/src/models/HypothesisSheet.ts +6 -0
- package/src/models/Page.ts +6 -0
- package/src/models/Test.ts +5 -4
- package/src/models/User.ts +5 -0
|
@@ -29,6 +29,7 @@ export interface IAudience extends Document {
|
|
|
29
29
|
name: string;
|
|
30
30
|
rules_js?: string;
|
|
31
31
|
client?: mongoose.Schema.Types.ObjectId;
|
|
32
|
+
createdBy?: mongoose.Schema.Types.ObjectId;
|
|
32
33
|
}
|
|
33
34
|
declare const Audience: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
34
35
|
export default Audience;
|
|
@@ -55,6 +55,11 @@ const AudienceSchema = new mongoose_1.Schema({
|
|
|
55
55
|
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
56
56
|
ref: "client",
|
|
57
57
|
},
|
|
58
|
+
createdBy: {
|
|
59
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
60
|
+
ref: "user",
|
|
61
|
+
default: null,
|
|
62
|
+
},
|
|
58
63
|
}, {
|
|
59
64
|
timestamps: true,
|
|
60
65
|
});
|
|
@@ -32,6 +32,7 @@ export interface IEnvironment extends Document {
|
|
|
32
32
|
isActive?: boolean;
|
|
33
33
|
default?: boolean;
|
|
34
34
|
qa?: boolean;
|
|
35
|
+
createdBy?: mongoose.Schema.Types.ObjectId;
|
|
35
36
|
}
|
|
36
37
|
declare const Environment: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
37
38
|
export default Environment;
|
|
@@ -36,8 +36,7 @@ export interface IGoal extends Document {
|
|
|
36
36
|
api_name: string;
|
|
37
37
|
rules_js: string;
|
|
38
38
|
isActive?: boolean;
|
|
39
|
-
|
|
40
|
-
updatedAt?: Date;
|
|
39
|
+
createdBy?: mongoose.Schema.Types.ObjectId;
|
|
41
40
|
}
|
|
42
41
|
declare const Goal: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
43
42
|
export default Goal;
|
package/dist/src/models/Goal.js
CHANGED
|
@@ -42,6 +42,7 @@ export interface IHypothesisSheet extends Document {
|
|
|
42
42
|
designedToIncreaseUserMotivation?: Number;
|
|
43
43
|
thoughtsOfTeam?: Number;
|
|
44
44
|
tested?: Boolean;
|
|
45
|
+
createdBy?: mongoose.Schema.Types.ObjectId;
|
|
45
46
|
}
|
|
46
47
|
declare const HypothesisSheet: mongoose.Model<IHypothesisSheet, {}, {}, {}, mongoose.Document<unknown, {}, IHypothesisSheet> & IHypothesisSheet & {
|
|
47
48
|
_id: mongoose.Types.ObjectId;
|
|
@@ -106,6 +106,11 @@ const HypothesisSheetSchema = new mongoose_1.Schema({
|
|
|
106
106
|
type: Boolean,
|
|
107
107
|
default: false,
|
|
108
108
|
},
|
|
109
|
+
createdBy: {
|
|
110
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
111
|
+
ref: "user",
|
|
112
|
+
default: null,
|
|
113
|
+
},
|
|
109
114
|
}, {
|
|
110
115
|
timestamps: true,
|
|
111
116
|
});
|
|
@@ -42,6 +42,7 @@ export interface IPage extends Document {
|
|
|
42
42
|
rules_js: string;
|
|
43
43
|
urltargetings: IUrltargetings[];
|
|
44
44
|
isActive?: boolean;
|
|
45
|
+
createdBy?: mongoose.Schema.Types.ObjectId;
|
|
45
46
|
}
|
|
46
47
|
declare const Page: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
47
48
|
export default Page;
|
package/dist/src/models/Page.js
CHANGED
|
@@ -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[];
|
|
@@ -87,10 +88,10 @@ export interface ITest extends Document {
|
|
|
87
88
|
significance: string;
|
|
88
89
|
recommendedsamplesize: number;
|
|
89
90
|
weeks: number;
|
|
90
|
-
dnt: boolean;
|
|
91
91
|
livedate: Date;
|
|
92
92
|
defaultControl: string;
|
|
93
93
|
enddate: Date;
|
|
94
|
+
createdBy: mongoose.Schema.Types.ObjectId;
|
|
94
95
|
}
|
|
95
96
|
declare const Test: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
96
97
|
export default Test;
|
package/dist/src/models/Test.js
CHANGED
|
@@ -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: [] },
|
|
@@ -152,10 +153,10 @@ const TestSchema = new mongoose_1.Schema({
|
|
|
152
153
|
significance: { type: String, default: "" },
|
|
153
154
|
recommendedsamplesize: { type: Number, default: null },
|
|
154
155
|
weeks: { type: Number, default: null },
|
|
155
|
-
dnt: { type: Boolean, default: false },
|
|
156
156
|
livedate: { type: Date, default: null },
|
|
157
157
|
defaultControl: { type: String, default: null },
|
|
158
|
-
enddate: { type: Date, default: null }
|
|
158
|
+
enddate: { type: Date, default: null },
|
|
159
|
+
createdBy: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "user", default: null }
|
|
159
160
|
}, {
|
|
160
161
|
timestamps: true
|
|
161
162
|
});
|
package/dist/src/models/User.js
CHANGED
package/package.json
CHANGED
package/src/models/Audience.ts
CHANGED
|
@@ -7,6 +7,7 @@ export interface IAudience extends Document {
|
|
|
7
7
|
name: string;
|
|
8
8
|
rules_js?: string;
|
|
9
9
|
client?: mongoose.Schema.Types.ObjectId;
|
|
10
|
+
createdBy?: mongoose.Schema.Types.ObjectId;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
const AudienceSchema = new Schema<IAudience>(
|
|
@@ -31,6 +32,11 @@ const AudienceSchema = new Schema<IAudience>(
|
|
|
31
32
|
type: mongoose.Schema.Types.ObjectId,
|
|
32
33
|
ref: "client",
|
|
33
34
|
},
|
|
35
|
+
createdBy: {
|
|
36
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
37
|
+
ref: "user",
|
|
38
|
+
default: null,
|
|
39
|
+
},
|
|
34
40
|
},
|
|
35
41
|
{
|
|
36
42
|
timestamps: true,
|
|
@@ -10,6 +10,7 @@ export interface IEnvironment extends Document {
|
|
|
10
10
|
isActive?: boolean;
|
|
11
11
|
default?: boolean;
|
|
12
12
|
qa?: boolean;
|
|
13
|
+
createdBy?: mongoose.Schema.Types.ObjectId;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
const EnvironmentSchema = new Schema<IEnvironment>({
|
|
@@ -49,7 +50,12 @@ const EnvironmentSchema = new Schema<IEnvironment>({
|
|
|
49
50
|
qa: {
|
|
50
51
|
type: Boolean,
|
|
51
52
|
default: false,
|
|
52
|
-
}
|
|
53
|
+
},
|
|
54
|
+
createdBy: {
|
|
55
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
56
|
+
ref: "user",
|
|
57
|
+
default: null,
|
|
58
|
+
},
|
|
53
59
|
}, {
|
|
54
60
|
timestamps: true
|
|
55
61
|
});
|
package/src/models/Goal.ts
CHANGED
|
@@ -16,8 +16,7 @@ export interface IGoal extends Document {
|
|
|
16
16
|
api_name: string;
|
|
17
17
|
rules_js: string;
|
|
18
18
|
isActive?: boolean;
|
|
19
|
-
|
|
20
|
-
updatedAt?: Date;
|
|
19
|
+
createdBy?: mongoose.Schema.Types.ObjectId;
|
|
21
20
|
}
|
|
22
21
|
|
|
23
22
|
const GoalSchema = new Schema<IGoal>({
|
|
@@ -75,6 +74,11 @@ const GoalSchema = new Schema<IGoal>({
|
|
|
75
74
|
isActive: {
|
|
76
75
|
type: Boolean,
|
|
77
76
|
default: true,
|
|
77
|
+
},
|
|
78
|
+
createdBy: {
|
|
79
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
80
|
+
ref: "user",
|
|
81
|
+
default: null,
|
|
78
82
|
}
|
|
79
83
|
}, {
|
|
80
84
|
timestamps: true
|
|
@@ -20,6 +20,7 @@ export interface IHypothesisSheet extends Document {
|
|
|
20
20
|
designedToIncreaseUserMotivation?: Number;
|
|
21
21
|
thoughtsOfTeam?: Number;
|
|
22
22
|
tested?: Boolean;
|
|
23
|
+
createdBy?: mongoose.Schema.Types.ObjectId;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
const HypothesisSheetSchema = new Schema<IHypothesisSheet>(
|
|
@@ -101,6 +102,11 @@ const HypothesisSheetSchema = new Schema<IHypothesisSheet>(
|
|
|
101
102
|
type: Boolean,
|
|
102
103
|
default: false,
|
|
103
104
|
},
|
|
105
|
+
createdBy: {
|
|
106
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
107
|
+
ref: "user",
|
|
108
|
+
default: null,
|
|
109
|
+
},
|
|
104
110
|
},
|
|
105
111
|
{
|
|
106
112
|
timestamps: true,
|
package/src/models/Page.ts
CHANGED
|
@@ -26,6 +26,7 @@ export interface IPage extends Document {
|
|
|
26
26
|
rules_js: string;
|
|
27
27
|
urltargetings: IUrltargetings[];
|
|
28
28
|
isActive?: boolean;
|
|
29
|
+
createdBy?: mongoose.Schema.Types.ObjectId;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
const UrltargetingsSchema = new Schema<IUrltargetings>({
|
|
@@ -107,6 +108,11 @@ const PageSchema = new Schema<IPage>({
|
|
|
107
108
|
isActive: {
|
|
108
109
|
type: Boolean,
|
|
109
110
|
default: true,
|
|
111
|
+
},
|
|
112
|
+
createdBy: {
|
|
113
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
114
|
+
ref: "user",
|
|
115
|
+
default: null,
|
|
110
116
|
}
|
|
111
117
|
}, {
|
|
112
118
|
timestamps: true
|
package/src/models/Test.ts
CHANGED
|
@@ -24,7 +24,6 @@ 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;
|
|
@@ -64,6 +63,7 @@ export interface ITest extends Document {
|
|
|
64
63
|
testtool: string;
|
|
65
64
|
personalization: boolean;
|
|
66
65
|
qaMode: boolean;
|
|
66
|
+
dnt: boolean;
|
|
67
67
|
kameleoontestdetails: mongoose.Schema.Types.Mixed;
|
|
68
68
|
vwotestdetails: mongoose.Schema.Types.Mixed;
|
|
69
69
|
triggerevents: any[];
|
|
@@ -72,10 +72,10 @@ export interface ITest extends Document {
|
|
|
72
72
|
significance: string;
|
|
73
73
|
recommendedsamplesize: number;
|
|
74
74
|
weeks: number;
|
|
75
|
-
dnt: boolean;
|
|
76
75
|
livedate: Date;
|
|
77
76
|
defaultControl: string;
|
|
78
77
|
enddate: Date;
|
|
78
|
+
createdBy: mongoose.Schema.Types.ObjectId;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
const VariationsSchema = new Schema<IVariations>({
|
|
@@ -194,6 +194,7 @@ const TestSchema = new Schema<ITest>(
|
|
|
194
194
|
testtool: { type: String, default: "" },
|
|
195
195
|
personalization: { type: Boolean, default: false },
|
|
196
196
|
qaMode: { type: Boolean, default: false },
|
|
197
|
+
dnt: { type: Boolean, default: false },
|
|
197
198
|
kameleoontestdetails: { type: mongoose.Schema.Types.Mixed, default: null },
|
|
198
199
|
vwotestdetails: { type: mongoose.Schema.Types.Mixed, default: null },
|
|
199
200
|
triggerevents: { type: [], default: [] },
|
|
@@ -202,10 +203,10 @@ const TestSchema = new Schema<ITest>(
|
|
|
202
203
|
significance: { type: String, default: "" },
|
|
203
204
|
recommendedsamplesize: { type: Number, default: null },
|
|
204
205
|
weeks: { type: Number, default: null },
|
|
205
|
-
dnt: { type: Boolean, default: false },
|
|
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
|
package/src/models/User.ts
CHANGED
|
@@ -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
|
}
|