codebase-models 2.0.1 → 2.0.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.
- package/dist/src/models/CVRReport.js +0 -1
- package/dist/src/models/ClientReportsTemp.js +0 -2
- package/dist/src/models/ClientRetention.js +0 -2
- package/dist/src/models/ClientScript.js +0 -1
- package/dist/src/models/Environment.js +0 -4
- package/dist/src/models/Goal.js +0 -3
- package/dist/src/models/Hypothesis.js +0 -4
- package/dist/src/models/LandingPages.js +0 -5
- package/dist/src/models/Page.js +0 -7
- package/dist/src/models/PageElement.js +0 -4
- package/dist/src/models/Snippet.js +0 -4
- package/package.json +1 -1
- package/src/models/CVRReport.ts +0 -1
- package/src/models/ClientReportsTemp.ts +0 -2
- package/src/models/ClientRetention.ts +0 -2
- package/src/models/ClientScript.ts +0 -1
- package/src/models/Environment.ts +1 -5
- package/src/models/Goal.ts +0 -3
- package/src/models/Hypothesis.ts +0 -4
- package/src/models/LandingPages.ts +0 -5
- package/src/models/Page.ts +3 -7
- package/src/models/PageElement.ts +0 -4
- package/src/models/Snippet.ts +0 -4
|
@@ -51,7 +51,6 @@ const ClientReportsTempSchema = new mongoose_1.Schema({
|
|
|
51
51
|
},
|
|
52
52
|
date: {
|
|
53
53
|
type: Date,
|
|
54
|
-
index: true,
|
|
55
54
|
},
|
|
56
55
|
report: {
|
|
57
56
|
type: mongoose_1.default.Schema.Types.Mixed,
|
|
@@ -59,7 +58,6 @@ const ClientReportsTempSchema = new mongoose_1.Schema({
|
|
|
59
58
|
deactivated: {
|
|
60
59
|
type: Boolean,
|
|
61
60
|
default: false,
|
|
62
|
-
index: true,
|
|
63
61
|
},
|
|
64
62
|
createdBy: {
|
|
65
63
|
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
@@ -34,7 +34,6 @@ const ClientRetentionSchema = new mongoose_1.Schema({
|
|
|
34
34
|
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
35
35
|
ref: "client",
|
|
36
36
|
required: true,
|
|
37
|
-
index: true,
|
|
38
37
|
},
|
|
39
38
|
viewId: {
|
|
40
39
|
type: String,
|
|
@@ -44,7 +43,6 @@ const ClientRetentionSchema = new mongoose_1.Schema({
|
|
|
44
43
|
type: Number,
|
|
45
44
|
required: true,
|
|
46
45
|
default: new Date().getFullYear(),
|
|
47
|
-
index: true,
|
|
48
46
|
},
|
|
49
47
|
retentions: {
|
|
50
48
|
type: [
|
|
@@ -30,18 +30,15 @@ const EnvironmentSchema = new mongoose_1.Schema({
|
|
|
30
30
|
required: true,
|
|
31
31
|
default: 'Default',
|
|
32
32
|
trim: true,
|
|
33
|
-
index: true,
|
|
34
33
|
},
|
|
35
34
|
client: {
|
|
36
35
|
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
37
36
|
ref: "client",
|
|
38
37
|
required: true,
|
|
39
|
-
index: true,
|
|
40
38
|
},
|
|
41
39
|
organizationId: {
|
|
42
40
|
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
43
41
|
ref: "organization",
|
|
44
|
-
index: true,
|
|
45
42
|
},
|
|
46
43
|
rules_js: {
|
|
47
44
|
type: String,
|
|
@@ -51,7 +48,6 @@ const EnvironmentSchema = new mongoose_1.Schema({
|
|
|
51
48
|
isActive: {
|
|
52
49
|
type: Boolean,
|
|
53
50
|
default: true,
|
|
54
|
-
index: true,
|
|
55
51
|
}
|
|
56
52
|
}, {
|
|
57
53
|
timestamps: true
|
package/dist/src/models/Goal.js
CHANGED
|
@@ -50,12 +50,10 @@ const GoalSchema = new mongoose_1.Schema({
|
|
|
50
50
|
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
51
51
|
ref: "organization",
|
|
52
52
|
default: null,
|
|
53
|
-
index: true,
|
|
54
53
|
},
|
|
55
54
|
client: {
|
|
56
55
|
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
57
56
|
ref: "client",
|
|
58
|
-
index: true,
|
|
59
57
|
},
|
|
60
58
|
type: {
|
|
61
59
|
type: String,
|
|
@@ -83,7 +81,6 @@ const GoalSchema = new mongoose_1.Schema({
|
|
|
83
81
|
isActive: {
|
|
84
82
|
type: Boolean,
|
|
85
83
|
default: true,
|
|
86
|
-
index: true,
|
|
87
84
|
}
|
|
88
85
|
}, {
|
|
89
86
|
timestamps: true
|
|
@@ -33,13 +33,11 @@ const HypothesisSchema = new mongoose_1.Schema({
|
|
|
33
33
|
hypothesisNumber: {
|
|
34
34
|
type: String,
|
|
35
35
|
trim: true,
|
|
36
|
-
index: true,
|
|
37
36
|
},
|
|
38
37
|
name: {
|
|
39
38
|
type: String,
|
|
40
39
|
required: true,
|
|
41
40
|
trim: true,
|
|
42
|
-
index: true,
|
|
43
41
|
},
|
|
44
42
|
action: {
|
|
45
43
|
type: String,
|
|
@@ -60,12 +58,10 @@ const HypothesisSchema = new mongoose_1.Schema({
|
|
|
60
58
|
type: String,
|
|
61
59
|
default: "General Purpose",
|
|
62
60
|
trim: true,
|
|
63
|
-
index: true,
|
|
64
61
|
},
|
|
65
62
|
isActive: {
|
|
66
63
|
type: Boolean,
|
|
67
64
|
default: true,
|
|
68
|
-
index: true,
|
|
69
65
|
}
|
|
70
66
|
}, {
|
|
71
67
|
timestamps: true
|
|
@@ -29,7 +29,6 @@ const LandingPageDataSchema = new mongoose_1.Schema({
|
|
|
29
29
|
type: Number,
|
|
30
30
|
min: 0,
|
|
31
31
|
max: 100,
|
|
32
|
-
index: true,
|
|
33
32
|
},
|
|
34
33
|
lastUpdated: {
|
|
35
34
|
type: Date,
|
|
@@ -41,18 +40,15 @@ const LandingPagesSchema = new mongoose_1.Schema({
|
|
|
41
40
|
type: String,
|
|
42
41
|
required: true,
|
|
43
42
|
trim: true,
|
|
44
|
-
index: true,
|
|
45
43
|
},
|
|
46
44
|
client: {
|
|
47
45
|
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
48
46
|
ref: "client",
|
|
49
47
|
required: true,
|
|
50
|
-
index: true,
|
|
51
48
|
},
|
|
52
49
|
organizationId: {
|
|
53
50
|
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
54
51
|
ref: "organization",
|
|
55
|
-
index: true,
|
|
56
52
|
},
|
|
57
53
|
screenshot: {
|
|
58
54
|
type: String,
|
|
@@ -66,7 +62,6 @@ const LandingPagesSchema = new mongoose_1.Schema({
|
|
|
66
62
|
isActive: {
|
|
67
63
|
type: Boolean,
|
|
68
64
|
default: true,
|
|
69
|
-
index: true,
|
|
70
65
|
}
|
|
71
66
|
}, {
|
|
72
67
|
timestamps: true,
|
package/dist/src/models/Page.js
CHANGED
|
@@ -51,25 +51,20 @@ const PageSchema = new mongoose_1.Schema({
|
|
|
51
51
|
type: String,
|
|
52
52
|
required: true,
|
|
53
53
|
trim: true,
|
|
54
|
-
index: true,
|
|
55
54
|
},
|
|
56
55
|
trigger: {
|
|
57
56
|
type: String,
|
|
58
57
|
default: "direct",
|
|
59
58
|
trim: true,
|
|
60
|
-
index: true,
|
|
61
59
|
},
|
|
62
60
|
organizationId: {
|
|
63
61
|
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
64
62
|
ref: "organization",
|
|
65
63
|
default: null,
|
|
66
|
-
index: true,
|
|
67
64
|
},
|
|
68
65
|
client: {
|
|
69
66
|
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
70
67
|
ref: "client",
|
|
71
|
-
required: true,
|
|
72
|
-
index: true,
|
|
73
68
|
},
|
|
74
69
|
trigger_js: {
|
|
75
70
|
type: String,
|
|
@@ -86,7 +81,6 @@ const PageSchema = new mongoose_1.Schema({
|
|
|
86
81
|
poll_on_rules: {
|
|
87
82
|
type: Boolean,
|
|
88
83
|
default: false,
|
|
89
|
-
index: true,
|
|
90
84
|
},
|
|
91
85
|
deactivation_mode: {
|
|
92
86
|
type: String,
|
|
@@ -102,7 +96,6 @@ const PageSchema = new mongoose_1.Schema({
|
|
|
102
96
|
isActive: {
|
|
103
97
|
type: Boolean,
|
|
104
98
|
default: true,
|
|
105
|
-
index: true,
|
|
106
99
|
}
|
|
107
100
|
}, {
|
|
108
101
|
timestamps: true
|
|
@@ -34,7 +34,6 @@ const PageElementSchema = new mongoose_1.Schema({
|
|
|
34
34
|
type: String,
|
|
35
35
|
required: true,
|
|
36
36
|
trim: true,
|
|
37
|
-
index: true,
|
|
38
37
|
},
|
|
39
38
|
slug: {
|
|
40
39
|
type: String,
|
|
@@ -52,13 +51,10 @@ const PageElementSchema = new mongoose_1.Schema({
|
|
|
52
51
|
client: {
|
|
53
52
|
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
54
53
|
ref: "client",
|
|
55
|
-
required: true,
|
|
56
|
-
index: true,
|
|
57
54
|
},
|
|
58
55
|
isActive: {
|
|
59
56
|
type: Boolean,
|
|
60
57
|
default: true,
|
|
61
|
-
index: true,
|
|
62
58
|
}
|
|
63
59
|
}, {
|
|
64
60
|
timestamps: true
|
|
@@ -48,7 +48,6 @@ const SnippetSchema = new mongoose_1.Schema({
|
|
|
48
48
|
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
49
49
|
ref: "client",
|
|
50
50
|
required: true,
|
|
51
|
-
index: true,
|
|
52
51
|
},
|
|
53
52
|
details: {
|
|
54
53
|
type: String,
|
|
@@ -63,7 +62,6 @@ const SnippetSchema = new mongoose_1.Schema({
|
|
|
63
62
|
type: [mongoose_1.default.Schema.Types.ObjectId],
|
|
64
63
|
ref: "tag",
|
|
65
64
|
default: [],
|
|
66
|
-
index: true,
|
|
67
65
|
},
|
|
68
66
|
htmlcode: {
|
|
69
67
|
type: String,
|
|
@@ -88,12 +86,10 @@ const SnippetSchema = new mongoose_1.Schema({
|
|
|
88
86
|
type: String,
|
|
89
87
|
default: "live",
|
|
90
88
|
enum: ["live", "draft", "running", "paused", "preview", "ended"],
|
|
91
|
-
index: true,
|
|
92
89
|
},
|
|
93
90
|
isActive: {
|
|
94
91
|
type: Boolean,
|
|
95
92
|
default: true,
|
|
96
|
-
index: true,
|
|
97
93
|
}
|
|
98
94
|
}, {
|
|
99
95
|
timestamps: true,
|
package/package.json
CHANGED
package/src/models/CVRReport.ts
CHANGED
|
@@ -41,7 +41,6 @@ const ClientReportsTempSchema = new Schema<IClientReportsTemp>(
|
|
|
41
41
|
},
|
|
42
42
|
date: {
|
|
43
43
|
type: Date,
|
|
44
|
-
index: true,
|
|
45
44
|
},
|
|
46
45
|
report: {
|
|
47
46
|
type: mongoose.Schema.Types.Mixed,
|
|
@@ -49,7 +48,6 @@ const ClientReportsTempSchema = new Schema<IClientReportsTemp>(
|
|
|
49
48
|
deactivated: {
|
|
50
49
|
type: Boolean,
|
|
51
50
|
default: false,
|
|
52
|
-
index: true,
|
|
53
51
|
},
|
|
54
52
|
createdBy: {
|
|
55
53
|
type: mongoose.Schema.Types.ObjectId,
|
|
@@ -26,7 +26,6 @@ const ClientRetentionSchema = new Schema<IClientRetention>(
|
|
|
26
26
|
type: mongoose.Schema.Types.ObjectId,
|
|
27
27
|
ref: "client",
|
|
28
28
|
required: true,
|
|
29
|
-
index: true,
|
|
30
29
|
},
|
|
31
30
|
viewId: {
|
|
32
31
|
type: String,
|
|
@@ -36,7 +35,6 @@ const ClientRetentionSchema = new Schema<IClientRetention>(
|
|
|
36
35
|
type: Number,
|
|
37
36
|
required: true,
|
|
38
37
|
default: new Date().getFullYear(),
|
|
39
|
-
index: true,
|
|
40
38
|
},
|
|
41
39
|
retentions: {
|
|
42
40
|
type: [
|
|
@@ -14,18 +14,15 @@ const EnvironmentSchema = new Schema<IEnvironment>({
|
|
|
14
14
|
required: true,
|
|
15
15
|
default: 'Default',
|
|
16
16
|
trim: true,
|
|
17
|
-
index: true,
|
|
18
17
|
},
|
|
19
18
|
client: {
|
|
20
19
|
type: mongoose.Schema.Types.ObjectId,
|
|
21
20
|
ref: "client",
|
|
22
21
|
required: true,
|
|
23
|
-
index: true,
|
|
24
22
|
},
|
|
25
23
|
organizationId: {
|
|
26
24
|
type: mongoose.Schema.Types.ObjectId,
|
|
27
25
|
ref: "organization",
|
|
28
|
-
index: true,
|
|
29
26
|
},
|
|
30
27
|
rules_js: {
|
|
31
28
|
type: String,
|
|
@@ -35,8 +32,7 @@ const EnvironmentSchema = new Schema<IEnvironment>({
|
|
|
35
32
|
isActive: {
|
|
36
33
|
type: Boolean,
|
|
37
34
|
default: true,
|
|
38
|
-
|
|
39
|
-
}
|
|
35
|
+
}
|
|
40
36
|
}, {
|
|
41
37
|
timestamps: true
|
|
42
38
|
});
|
package/src/models/Goal.ts
CHANGED
|
@@ -39,12 +39,10 @@ const GoalSchema = new Schema<IGoal>({
|
|
|
39
39
|
type: mongoose.Schema.Types.ObjectId,
|
|
40
40
|
ref: "organization",
|
|
41
41
|
default: null,
|
|
42
|
-
index: true,
|
|
43
42
|
},
|
|
44
43
|
client: {
|
|
45
44
|
type: mongoose.Schema.Types.ObjectId,
|
|
46
45
|
ref: "client",
|
|
47
|
-
index: true,
|
|
48
46
|
},
|
|
49
47
|
type: {
|
|
50
48
|
type: String,
|
|
@@ -72,7 +70,6 @@ const GoalSchema = new Schema<IGoal>({
|
|
|
72
70
|
isActive: {
|
|
73
71
|
type: Boolean,
|
|
74
72
|
default: true,
|
|
75
|
-
index: true,
|
|
76
73
|
}
|
|
77
74
|
}, {
|
|
78
75
|
timestamps: true
|
package/src/models/Hypothesis.ts
CHANGED
|
@@ -22,13 +22,11 @@ const HypothesisSchema = new Schema<IHypothesis>({
|
|
|
22
22
|
hypothesisNumber: {
|
|
23
23
|
type: String,
|
|
24
24
|
trim: true,
|
|
25
|
-
index: true,
|
|
26
25
|
},
|
|
27
26
|
name: {
|
|
28
27
|
type: String,
|
|
29
28
|
required: true,
|
|
30
29
|
trim: true,
|
|
31
|
-
index: true,
|
|
32
30
|
},
|
|
33
31
|
action: {
|
|
34
32
|
type: String,
|
|
@@ -49,12 +47,10 @@ const HypothesisSchema = new Schema<IHypothesis>({
|
|
|
49
47
|
type: String,
|
|
50
48
|
default: "General Purpose",
|
|
51
49
|
trim: true,
|
|
52
|
-
index: true,
|
|
53
50
|
},
|
|
54
51
|
isActive: {
|
|
55
52
|
type: Boolean,
|
|
56
53
|
default: true,
|
|
57
|
-
index: true,
|
|
58
54
|
}
|
|
59
55
|
}, {
|
|
60
56
|
timestamps: true
|
|
@@ -10,7 +10,6 @@ const LandingPageDataSchema = new Schema<ILandingPagesData>({
|
|
|
10
10
|
type: Number,
|
|
11
11
|
min: 0,
|
|
12
12
|
max: 100,
|
|
13
|
-
index: true,
|
|
14
13
|
},
|
|
15
14
|
lastUpdated: {
|
|
16
15
|
type: Date,
|
|
@@ -33,18 +32,15 @@ const LandingPagesSchema = new Schema<ILandingPages>(
|
|
|
33
32
|
type: String,
|
|
34
33
|
required: true,
|
|
35
34
|
trim: true,
|
|
36
|
-
index: true,
|
|
37
35
|
},
|
|
38
36
|
client: {
|
|
39
37
|
type: mongoose.Schema.Types.ObjectId,
|
|
40
38
|
ref: "client",
|
|
41
39
|
required: true,
|
|
42
|
-
index: true,
|
|
43
40
|
},
|
|
44
41
|
organizationId: {
|
|
45
42
|
type: mongoose.Schema.Types.ObjectId,
|
|
46
43
|
ref: "organization",
|
|
47
|
-
index: true,
|
|
48
44
|
},
|
|
49
45
|
screenshot: {
|
|
50
46
|
type: String,
|
|
@@ -58,7 +54,6 @@ const LandingPagesSchema = new Schema<ILandingPages>(
|
|
|
58
54
|
isActive: {
|
|
59
55
|
type: Boolean,
|
|
60
56
|
default: true,
|
|
61
|
-
index: true,
|
|
62
57
|
}
|
|
63
58
|
},
|
|
64
59
|
{
|
package/src/models/Page.ts
CHANGED
|
@@ -45,25 +45,23 @@ const PageSchema = new Schema<IPage>({
|
|
|
45
45
|
type: String,
|
|
46
46
|
required: true,
|
|
47
47
|
trim: true,
|
|
48
|
-
|
|
48
|
+
|
|
49
49
|
},
|
|
50
50
|
trigger: {
|
|
51
51
|
type: String,
|
|
52
52
|
default: "direct",
|
|
53
53
|
trim: true,
|
|
54
|
-
|
|
54
|
+
|
|
55
55
|
},
|
|
56
56
|
organizationId: {
|
|
57
57
|
type: mongoose.Schema.Types.ObjectId,
|
|
58
58
|
ref: "organization",
|
|
59
59
|
default: null,
|
|
60
|
-
|
|
60
|
+
|
|
61
61
|
},
|
|
62
62
|
client: {
|
|
63
63
|
type: mongoose.Schema.Types.ObjectId,
|
|
64
64
|
ref: "client",
|
|
65
|
-
required: true,
|
|
66
|
-
index: true,
|
|
67
65
|
},
|
|
68
66
|
trigger_js: {
|
|
69
67
|
type: String,
|
|
@@ -80,7 +78,6 @@ const PageSchema = new Schema<IPage>({
|
|
|
80
78
|
poll_on_rules: {
|
|
81
79
|
type: Boolean,
|
|
82
80
|
default: false,
|
|
83
|
-
index: true,
|
|
84
81
|
},
|
|
85
82
|
deactivation_mode: {
|
|
86
83
|
type: String,
|
|
@@ -96,7 +93,6 @@ const PageSchema = new Schema<IPage>({
|
|
|
96
93
|
isActive: {
|
|
97
94
|
type: Boolean,
|
|
98
95
|
default: true,
|
|
99
|
-
index: true,
|
|
100
96
|
}
|
|
101
97
|
}, {
|
|
102
98
|
timestamps: true
|
|
@@ -17,7 +17,6 @@ const PageElementSchema = new Schema<IPageElement>({
|
|
|
17
17
|
type: String,
|
|
18
18
|
required: true,
|
|
19
19
|
trim: true,
|
|
20
|
-
index: true,
|
|
21
20
|
},
|
|
22
21
|
slug: {
|
|
23
22
|
type: String,
|
|
@@ -35,13 +34,10 @@ const PageElementSchema = new Schema<IPageElement>({
|
|
|
35
34
|
client: {
|
|
36
35
|
type: mongoose.Schema.Types.ObjectId,
|
|
37
36
|
ref: "client",
|
|
38
|
-
required: true,
|
|
39
|
-
index: true,
|
|
40
37
|
},
|
|
41
38
|
isActive: {
|
|
42
39
|
type: Boolean,
|
|
43
40
|
default: true,
|
|
44
|
-
index: true,
|
|
45
41
|
}
|
|
46
42
|
}, {
|
|
47
43
|
timestamps: true
|
package/src/models/Snippet.ts
CHANGED
|
@@ -41,7 +41,6 @@ const SnippetSchema = new Schema<ISnippet>(
|
|
|
41
41
|
type: mongoose.Schema.Types.ObjectId,
|
|
42
42
|
ref: "client",
|
|
43
43
|
required: true,
|
|
44
|
-
index: true,
|
|
45
44
|
},
|
|
46
45
|
details: {
|
|
47
46
|
type: String,
|
|
@@ -56,7 +55,6 @@ const SnippetSchema = new Schema<ISnippet>(
|
|
|
56
55
|
type: [mongoose.Schema.Types.ObjectId],
|
|
57
56
|
ref: "tag",
|
|
58
57
|
default: [],
|
|
59
|
-
index: true,
|
|
60
58
|
},
|
|
61
59
|
htmlcode: {
|
|
62
60
|
type: String,
|
|
@@ -81,12 +79,10 @@ const SnippetSchema = new Schema<ISnippet>(
|
|
|
81
79
|
type: String,
|
|
82
80
|
default: "live",
|
|
83
81
|
enum: ["live", "draft","running","paused","preview","ended"],
|
|
84
|
-
index: true,
|
|
85
82
|
},
|
|
86
83
|
isActive: {
|
|
87
84
|
type: Boolean,
|
|
88
85
|
default: true,
|
|
89
|
-
index: true,
|
|
90
86
|
}
|
|
91
87
|
},
|
|
92
88
|
{
|