codebase-models 1.0.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/dist/index.d.ts +66 -0
- package/dist/index.js +93 -0
- package/dist/src/constant.d.ts +11 -0
- package/dist/src/constant.js +15 -0
- package/dist/src/models/Announcement.d.ts +37 -0
- package/dist/src/models/Announcement.js +59 -0
- package/dist/src/models/CVRReport.d.ts +33 -0
- package/dist/src/models/CVRReport.js +40 -0
- package/dist/src/models/Client.d.ts +51 -0
- package/dist/src/models/Client.js +95 -0
- package/dist/src/models/ClientAdditionalRevenue.d.ts +41 -0
- package/dist/src/models/ClientAdditionalRevenue.js +68 -0
- package/dist/src/models/ClientLearning.d.ts +36 -0
- package/dist/src/models/ClientLearning.js +55 -0
- package/dist/src/models/ClientLinks.d.ts +39 -0
- package/dist/src/models/ClientLinks.js +66 -0
- package/dist/src/models/ClientNextSteps.d.ts +36 -0
- package/dist/src/models/ClientNextSteps.js +55 -0
- package/dist/src/models/ClientNote.d.ts +40 -0
- package/dist/src/models/ClientNote.js +68 -0
- package/dist/src/models/ClientReportsTemp.d.ts +41 -0
- package/dist/src/models/ClientReportsTemp.js +67 -0
- package/dist/src/models/ClientRetention.d.ts +42 -0
- package/dist/src/models/ClientRetention.js +78 -0
- package/dist/src/models/ClientStrategy.d.ts +41 -0
- package/dist/src/models/ClientStrategy.js +73 -0
- package/dist/src/models/ClientSurvay.d.ts +41 -0
- package/dist/src/models/ClientSurvay.js +45 -0
- package/dist/src/models/Faqs.d.ts +36 -0
- package/dist/src/models/Faqs.js +47 -0
- package/dist/src/models/Feedback.d.ts +38 -0
- package/dist/src/models/Feedback.js +58 -0
- package/dist/src/models/Goal.d.ts +37 -0
- package/dist/src/models/Goal.js +30 -0
- package/dist/src/models/Hypothesis.d.ts +39 -0
- package/dist/src/models/Hypothesis.js +38 -0
- package/dist/src/models/HypothesisSheet.d.ts +49 -0
- package/dist/src/models/HypothesisSheet.js +89 -0
- package/dist/src/models/LandingPages.d.ts +38 -0
- package/dist/src/models/LandingPages.js +54 -0
- package/dist/src/models/NewIdeas.d.ts +40 -0
- package/dist/src/models/NewIdeas.js +70 -0
- package/dist/src/models/Notification.d.ts +38 -0
- package/dist/src/models/Notification.js +33 -0
- package/dist/src/models/PageElement.d.ts +35 -0
- package/dist/src/models/PageElement.js +22 -0
- package/dist/src/models/PageTestType.d.ts +35 -0
- package/dist/src/models/PageTestType.js +24 -0
- package/dist/src/models/Portfolio.d.ts +33 -0
- package/dist/src/models/Portfolio.js +40 -0
- package/dist/src/models/QueryLog.d.ts +35 -0
- package/dist/src/models/QueryLog.js +46 -0
- package/dist/src/models/ReadNotification.d.ts +34 -0
- package/dist/src/models/ReadNotification.js +21 -0
- package/dist/src/models/Report.d.ts +47 -0
- package/dist/src/models/Report.js +89 -0
- package/dist/src/models/Role.d.ts +34 -0
- package/dist/src/models/Role.js +21 -0
- package/dist/src/models/SavedSegment.d.ts +34 -0
- package/dist/src/models/SavedSegment.js +44 -0
- package/dist/src/models/Segment.d.ts +37 -0
- package/dist/src/models/Segment.js +54 -0
- package/dist/src/models/SegmentCombination.d.ts +41 -0
- package/dist/src/models/SegmentCombination.js +68 -0
- package/dist/src/models/Snippet.d.ts +43 -0
- package/dist/src/models/Snippet.js +82 -0
- package/dist/src/models/StageInCustomerJourney.d.ts +35 -0
- package/dist/src/models/StageInCustomerJourney.js +21 -0
- package/dist/src/models/Tag.d.ts +34 -0
- package/dist/src/models/Tag.js +20 -0
- package/dist/src/models/Temp.d.ts +35 -0
- package/dist/src/models/Temp.js +22 -0
- package/dist/src/models/Test.d.ts +68 -0
- package/dist/src/models/Test.js +187 -0
- package/dist/src/models/TestSequentialValue.d.ts +38 -0
- package/dist/src/models/TestSequentialValue.js +54 -0
- package/dist/src/models/Tier.d.ts +36 -0
- package/dist/src/models/Tier.js +27 -0
- package/dist/src/models/Trigger.d.ts +36 -0
- package/dist/src/models/Trigger.js +24 -0
- package/dist/src/models/User.d.ts +42 -0
- package/dist/src/models/User.js +70 -0
- package/global.d.ts +1 -0
- package/index.ts +124 -0
- package/package.json +32 -0
- package/src/constant.ts +14 -0
- package/src/models/Announcement.ts +49 -0
- package/src/models/CVRReport.ts +25 -0
- package/src/models/Client.ts +100 -0
- package/src/models/ClientAdditionalRevenue.ts +67 -0
- package/src/models/ClientLearning.ts +48 -0
- package/src/models/ClientLinks.ts +58 -0
- package/src/models/ClientNextSteps.ts +47 -0
- package/src/models/ClientNote.ts +61 -0
- package/src/models/ClientReportsTemp.ts +64 -0
- package/src/models/ClientRetention.ts +76 -0
- package/src/models/ClientStrategy.ts +70 -0
- package/src/models/ClientSurvay.ts +36 -0
- package/src/models/Faqs.ts +32 -0
- package/src/models/Feedback.ts +46 -0
- package/src/models/Goal.ts +40 -0
- package/src/models/Hypothesis.ts +50 -0
- package/src/models/HypothesisSheet.ts +114 -0
- package/src/models/LandingPages.ts +46 -0
- package/src/models/NewIdeas.ts +63 -0
- package/src/models/Notification.ts +47 -0
- package/src/models/PageElement.ts +30 -0
- package/src/models/PageTestType.ts +32 -0
- package/src/models/Portfolio.ts +26 -0
- package/src/models/QueryLog.ts +34 -0
- package/src/models/ReadNotification.ts +34 -0
- package/src/models/Report.ts +87 -0
- package/src/models/Role.ts +28 -0
- package/src/models/SavedSegment.ts +31 -0
- package/src/models/Segment.ts +44 -0
- package/src/models/SegmentCombination.ts +62 -0
- package/src/models/Snippet.ts +78 -0
- package/src/models/StageInCustomerJourney.ts +35 -0
- package/src/models/Tag.ts +27 -0
- package/src/models/Temp.ts +30 -0
- package/src/models/Test.ts +209 -0
- package/src/models/TestSequentialValue.ts +49 -0
- package/src/models/Tier.ts +36 -0
- package/src/models/Trigger.ts +32 -0
- package/src/models/User.ts +61 -0
- package/tsconfig.json +109 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import mongoose, { Document, Schema, model } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export interface IClientNote extends Document {
|
|
4
|
+
organisationId?: string;
|
|
5
|
+
client?: mongoose.Schema.Types.ObjectId;
|
|
6
|
+
viewId?: string;
|
|
7
|
+
pageType?: mongoose.Schema.Types.ObjectId;
|
|
8
|
+
source: string;
|
|
9
|
+
whatYouSee?: string;
|
|
10
|
+
interpretation?: String;
|
|
11
|
+
evidence?: mongoose.Schema.Types.Mixed;
|
|
12
|
+
createdBy?: mongoose.Schema.Types.ObjectId;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const ClientNoteSchema = new Schema<IClientNote>(
|
|
16
|
+
{
|
|
17
|
+
organisationId: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: null,
|
|
20
|
+
},
|
|
21
|
+
client: {
|
|
22
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
23
|
+
ref: "client",
|
|
24
|
+
},
|
|
25
|
+
viewId: {
|
|
26
|
+
type: String,
|
|
27
|
+
},
|
|
28
|
+
pageType: {
|
|
29
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
30
|
+
ref: "pageelement",
|
|
31
|
+
},
|
|
32
|
+
source: {
|
|
33
|
+
type: String,
|
|
34
|
+
required: true,
|
|
35
|
+
},
|
|
36
|
+
whatYouSee: {
|
|
37
|
+
type: String,
|
|
38
|
+
},
|
|
39
|
+
interpretation: {
|
|
40
|
+
type: String,
|
|
41
|
+
},
|
|
42
|
+
evidence: {
|
|
43
|
+
type: mongoose.Schema.Types.Mixed,
|
|
44
|
+
},
|
|
45
|
+
createdBy: {
|
|
46
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
47
|
+
ref: "user",
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
timestamps: true,
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
ClientNoteSchema.index({
|
|
56
|
+
client: 1,
|
|
57
|
+
viewId: 1,
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
const ClientNote = model<IClientNote>("clientnote", ClientNoteSchema);
|
|
61
|
+
export default ClientNote;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import mongoose, { Schema, model } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export interface IClientReportsTemp extends Document {
|
|
4
|
+
organisationId?: string;
|
|
5
|
+
client?: mongoose.Schema.Types.ObjectId;
|
|
6
|
+
viewId?: string;
|
|
7
|
+
test?: mongoose.Schema.Types.ObjectId;
|
|
8
|
+
filters?: string;
|
|
9
|
+
metricsFilters?: string;
|
|
10
|
+
date?: Date;
|
|
11
|
+
report?: mongoose.Schema.Types.Mixed;
|
|
12
|
+
deactivated?: boolean;
|
|
13
|
+
createdBy?: mongoose.Schema.Types.ObjectId;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const ClientReportsTempSchema = new Schema<IClientReportsTemp>(
|
|
17
|
+
{
|
|
18
|
+
organisationId: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: null,
|
|
21
|
+
},
|
|
22
|
+
client: {
|
|
23
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
24
|
+
ref: "client",
|
|
25
|
+
},
|
|
26
|
+
viewId: {
|
|
27
|
+
type: String,
|
|
28
|
+
},
|
|
29
|
+
test: {
|
|
30
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
31
|
+
ref: "test",
|
|
32
|
+
},
|
|
33
|
+
filters: {
|
|
34
|
+
type: String,
|
|
35
|
+
},
|
|
36
|
+
metricsFilters: {
|
|
37
|
+
type: String,
|
|
38
|
+
},
|
|
39
|
+
date: {
|
|
40
|
+
type: Date,
|
|
41
|
+
},
|
|
42
|
+
report: {
|
|
43
|
+
type: mongoose.Schema.Types.Mixed,
|
|
44
|
+
},
|
|
45
|
+
deactivated: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: false,
|
|
48
|
+
},
|
|
49
|
+
createdBy: {
|
|
50
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
51
|
+
ref: "user",
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
timestamps: true,
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
const ClientReportsTemp = model<IClientReportsTemp>(
|
|
60
|
+
"clientreportstemp",
|
|
61
|
+
ClientReportsTempSchema
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
export default ClientReportsTemp;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import mongoose, { Document, Schema, model } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export interface IClientRetention extends Document {
|
|
4
|
+
client?: mongoose.Schema.Types.ObjectId;
|
|
5
|
+
viewId?: string;
|
|
6
|
+
year: Number;
|
|
7
|
+
retentions?: {
|
|
8
|
+
year: Number;
|
|
9
|
+
month: Number;
|
|
10
|
+
monthName: String;
|
|
11
|
+
active: Boolean;
|
|
12
|
+
retainerValue: Number;
|
|
13
|
+
otherPayments: Number;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const ClientRetentionSchema = new Schema<IClientRetention>(
|
|
18
|
+
{
|
|
19
|
+
client: {
|
|
20
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
21
|
+
ref: "client",
|
|
22
|
+
required: true,
|
|
23
|
+
},
|
|
24
|
+
viewId: {
|
|
25
|
+
type: String,
|
|
26
|
+
ref: "client.gaproperties.viewId",
|
|
27
|
+
},
|
|
28
|
+
year: {
|
|
29
|
+
type: Number,
|
|
30
|
+
required: true,
|
|
31
|
+
},
|
|
32
|
+
retentions: {
|
|
33
|
+
type: [
|
|
34
|
+
{
|
|
35
|
+
_id: false,
|
|
36
|
+
year: {
|
|
37
|
+
type: Number,
|
|
38
|
+
required: true,
|
|
39
|
+
},
|
|
40
|
+
month: {
|
|
41
|
+
type: Number,
|
|
42
|
+
required: true,
|
|
43
|
+
},
|
|
44
|
+
monthName: {
|
|
45
|
+
type: String,
|
|
46
|
+
required: true,
|
|
47
|
+
},
|
|
48
|
+
active: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: true,
|
|
51
|
+
required: true,
|
|
52
|
+
},
|
|
53
|
+
retainerValue: {
|
|
54
|
+
type: Number,
|
|
55
|
+
required: true,
|
|
56
|
+
},
|
|
57
|
+
otherPayments: {
|
|
58
|
+
type: Number,
|
|
59
|
+
required: false,
|
|
60
|
+
default: 0,
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
timestamps: true,
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
const ClientRetention = model<IClientRetention>(
|
|
72
|
+
"ClientRetention",
|
|
73
|
+
ClientRetentionSchema
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
export default ClientRetention;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import mongoose, { Document, Schema, model } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export interface IClientStrategy extends Document {
|
|
4
|
+
year: mongoose.Schema.Types.Mixed;
|
|
5
|
+
month: mongoose.Schema.Types.Mixed;
|
|
6
|
+
startDate?: Date;
|
|
7
|
+
endDate?: Date;
|
|
8
|
+
strategies?: mongoose.Schema.Types.Mixed;
|
|
9
|
+
organisationId?: string;
|
|
10
|
+
client?: mongoose.Schema.Types.ObjectId;
|
|
11
|
+
learningsoftime?: mongoose.Schema.Types.Mixed;
|
|
12
|
+
viewId?: string;
|
|
13
|
+
createdBy?: mongoose.Schema.Types.ObjectId;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const ClientStrategySchema = new Schema<IClientStrategy>(
|
|
17
|
+
{
|
|
18
|
+
year: {
|
|
19
|
+
type: mongoose.Schema.Types.Mixed,
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
month: {
|
|
23
|
+
type: mongoose.Schema.Types.Mixed,
|
|
24
|
+
required: true,
|
|
25
|
+
},
|
|
26
|
+
startDate: {
|
|
27
|
+
type: Date,
|
|
28
|
+
},
|
|
29
|
+
endDate: {
|
|
30
|
+
type: Date,
|
|
31
|
+
},
|
|
32
|
+
strategies: {
|
|
33
|
+
type: mongoose.Schema.Types.Mixed,
|
|
34
|
+
},
|
|
35
|
+
organisationId: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: null,
|
|
38
|
+
},
|
|
39
|
+
client: {
|
|
40
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
41
|
+
ref: "client",
|
|
42
|
+
},
|
|
43
|
+
learningsoftime: {
|
|
44
|
+
type: mongoose.Schema.Types.Mixed,
|
|
45
|
+
},
|
|
46
|
+
viewId: {
|
|
47
|
+
type: String,
|
|
48
|
+
},
|
|
49
|
+
createdBy: {
|
|
50
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
51
|
+
ref: "user",
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
timestamps: true,
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
ClientStrategySchema.index({
|
|
60
|
+
year: 1,
|
|
61
|
+
month: 1,
|
|
62
|
+
client: 1,
|
|
63
|
+
viewId: 1,
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
const ClientStrategy = model<IClientStrategy>(
|
|
67
|
+
"clientstrategy",
|
|
68
|
+
ClientStrategySchema
|
|
69
|
+
);
|
|
70
|
+
export default ClientStrategy;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import mongoose, { Document, Schema, model } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export interface IClientSurvay extends Document {
|
|
4
|
+
responses: IResponce;
|
|
5
|
+
user?: mongoose.Schema.Types.ObjectId;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface IResponce extends Document {
|
|
9
|
+
question?: String;
|
|
10
|
+
answer?: String;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const ResponseSchema = new Schema<IResponce>({
|
|
14
|
+
question: {
|
|
15
|
+
type: String,
|
|
16
|
+
},
|
|
17
|
+
answer: {
|
|
18
|
+
type: String,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const ClientSurveySchema = new Schema<IClientSurvay>(
|
|
23
|
+
{
|
|
24
|
+
responses: [ResponseSchema],
|
|
25
|
+
user: {
|
|
26
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
27
|
+
ref: "user",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
timestamps: true,
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
const ClientSurvey = model("clientsurvey", ClientSurveySchema);
|
|
36
|
+
export default ClientSurvey;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import mongoose, { Document, Schema, model } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export interface IFaqs extends Document {
|
|
4
|
+
title?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
keywords?: mongoose.Schema.Types.Array;
|
|
7
|
+
createdAt?: Date;
|
|
8
|
+
updatedAt?: Date;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const FaqSchema = new Schema<IFaqs>({
|
|
12
|
+
title: {
|
|
13
|
+
type: String,
|
|
14
|
+
},
|
|
15
|
+
description: {
|
|
16
|
+
type: String,
|
|
17
|
+
},
|
|
18
|
+
keywords: {
|
|
19
|
+
type: mongoose.Schema.Types.Array,
|
|
20
|
+
},
|
|
21
|
+
createdAt: {
|
|
22
|
+
type: Date,
|
|
23
|
+
default: new Date(),
|
|
24
|
+
},
|
|
25
|
+
updatedAt: {
|
|
26
|
+
type: Date,
|
|
27
|
+
default: new Date(),
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const Faq = model<IFaqs>("faq", FaqSchema);
|
|
32
|
+
export default Faq;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import mongoose, { Document, Schema, model } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export interface IFeedback extends Document {
|
|
4
|
+
title: string;
|
|
5
|
+
details?: string;
|
|
6
|
+
client?: mongoose.Schema.Types.ObjectId;
|
|
7
|
+
thread?: mongoose.Schema.Types.Mixed;
|
|
8
|
+
organisationId?: string;
|
|
9
|
+
createdAt?: Date;
|
|
10
|
+
updatedAt?: Date;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const FeedbackSchema = new Schema<IFeedback>({
|
|
14
|
+
title: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
details: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "",
|
|
21
|
+
},
|
|
22
|
+
client: {
|
|
23
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
24
|
+
ref: "client",
|
|
25
|
+
},
|
|
26
|
+
thread: {
|
|
27
|
+
type: mongoose.Schema.Types.Mixed,
|
|
28
|
+
default: [],
|
|
29
|
+
},
|
|
30
|
+
organisationId: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: null,
|
|
33
|
+
},
|
|
34
|
+
createdAt: {
|
|
35
|
+
type: Date,
|
|
36
|
+
default: new Date(),
|
|
37
|
+
},
|
|
38
|
+
updatedAt: {
|
|
39
|
+
type: Date,
|
|
40
|
+
default: new Date(),
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const Feedback = model<IFeedback>("feedback", FeedbackSchema);
|
|
45
|
+
|
|
46
|
+
export default Feedback;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import mongoose, { Document, Schema, model } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export interface IGoal extends Document {
|
|
4
|
+
name: string;
|
|
5
|
+
details?: string;
|
|
6
|
+
slug?: string;
|
|
7
|
+
organisationId?: string;
|
|
8
|
+
createdAt?: Date;
|
|
9
|
+
updatedAt?: Date;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const GoalSchema = new Schema<IGoal>({
|
|
13
|
+
name: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: true,
|
|
16
|
+
},
|
|
17
|
+
details: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: "",
|
|
20
|
+
},
|
|
21
|
+
slug: {
|
|
22
|
+
type: String,
|
|
23
|
+
},
|
|
24
|
+
organisationId: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: null,
|
|
27
|
+
},
|
|
28
|
+
createdAt: {
|
|
29
|
+
type: Date,
|
|
30
|
+
default: new Date(),
|
|
31
|
+
},
|
|
32
|
+
updatedAt: {
|
|
33
|
+
type: Date,
|
|
34
|
+
default: new Date(),
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const Goal = model<IGoal>("goal", GoalSchema);
|
|
39
|
+
|
|
40
|
+
export default Goal;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import mongoose, { Document, Schema, model } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export interface IHypothesis extends Document {
|
|
4
|
+
hypothesisNumber?: string;
|
|
5
|
+
name: string;
|
|
6
|
+
action: string;
|
|
7
|
+
result: string;
|
|
8
|
+
expectation: string;
|
|
9
|
+
tagged?: string;
|
|
10
|
+
createdAt?: Date;
|
|
11
|
+
updatedAt?: Date;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const HypothesisSchema = new Schema<IHypothesis>({
|
|
15
|
+
hypothesisNumber: {
|
|
16
|
+
type: String,
|
|
17
|
+
},
|
|
18
|
+
name: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
action: {
|
|
23
|
+
type: String,
|
|
24
|
+
required: true,
|
|
25
|
+
},
|
|
26
|
+
result: {
|
|
27
|
+
type: String,
|
|
28
|
+
required: true,
|
|
29
|
+
},
|
|
30
|
+
expectation: {
|
|
31
|
+
type: String,
|
|
32
|
+
required: true,
|
|
33
|
+
},
|
|
34
|
+
tagged: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: "General Purpose",
|
|
37
|
+
},
|
|
38
|
+
createdAt: {
|
|
39
|
+
type: Date,
|
|
40
|
+
default: new Date(),
|
|
41
|
+
},
|
|
42
|
+
updatedAt: {
|
|
43
|
+
type: Date,
|
|
44
|
+
default: new Date(),
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const Hypothesis = model<IHypothesis>("hypos", HypothesisSchema);
|
|
49
|
+
|
|
50
|
+
export default Hypothesis;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import mongoose, { Document, Schema, model } from "mongoose";
|
|
2
|
+
import HypothesisSheetConstants from "../constant";
|
|
3
|
+
|
|
4
|
+
export interface IHypothesisSheet extends Document {
|
|
5
|
+
organizationId?: string;
|
|
6
|
+
client?: mongoose.Schema.Types.ObjectId;
|
|
7
|
+
viewId?: string;
|
|
8
|
+
pageelement?: mongoose.Schema.Types.ObjectId;
|
|
9
|
+
trigger?: mongoose.Schema.Types.ObjectId;
|
|
10
|
+
hypothesis?: mongoose.Schema.Types.ObjectId;
|
|
11
|
+
test?: mongoose.Schema.Types.ObjectId;
|
|
12
|
+
changeMadeAboveTheFold?: Number;
|
|
13
|
+
discoveredByUserTesting?: Number;
|
|
14
|
+
supportedByQuantitativeData?: Number;
|
|
15
|
+
supportedByHeatMapsOrMouseTracking?: Number;
|
|
16
|
+
changeNoticableWithin5Seconds?: Number;
|
|
17
|
+
levelOfEffortForDev?: Number;
|
|
18
|
+
isItAddingOrRemovingSomething?: Number;
|
|
19
|
+
changeOnPageWithHighTraffic?: Number;
|
|
20
|
+
designedToIncreaseUserMotivation?: Number;
|
|
21
|
+
thoughtsOfTeam?: Number;
|
|
22
|
+
tested?: Boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const HypothesisSheetSchema = new Schema<IHypothesisSheet>(
|
|
26
|
+
{
|
|
27
|
+
organizationId: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: null,
|
|
30
|
+
},
|
|
31
|
+
client: {
|
|
32
|
+
type: Schema.Types.ObjectId,
|
|
33
|
+
ref: "client",
|
|
34
|
+
},
|
|
35
|
+
viewId: {
|
|
36
|
+
type: String,
|
|
37
|
+
},
|
|
38
|
+
pageelement: {
|
|
39
|
+
type: [Schema.Types.ObjectId],
|
|
40
|
+
ref: "pageelement",
|
|
41
|
+
},
|
|
42
|
+
trigger: {
|
|
43
|
+
type: [Schema.Types.ObjectId],
|
|
44
|
+
ref: "trigger",
|
|
45
|
+
default: [],
|
|
46
|
+
},
|
|
47
|
+
hypothesis: {
|
|
48
|
+
type: Schema.Types.ObjectId,
|
|
49
|
+
ref: "hypos",
|
|
50
|
+
},
|
|
51
|
+
test: {
|
|
52
|
+
type: Schema.Types.ObjectId,
|
|
53
|
+
ref: "test",
|
|
54
|
+
},
|
|
55
|
+
changeMadeAboveTheFold: {
|
|
56
|
+
type: Number,
|
|
57
|
+
enum: [HypothesisSheetConstants.YES, HypothesisSheetConstants.NO],
|
|
58
|
+
},
|
|
59
|
+
discoveredByUserTesting: {
|
|
60
|
+
type: Number,
|
|
61
|
+
enum: [HypothesisSheetConstants.YES, HypothesisSheetConstants.NO],
|
|
62
|
+
},
|
|
63
|
+
supportedByQuantitativeData: {
|
|
64
|
+
type: Number,
|
|
65
|
+
enum: [HypothesisSheetConstants.YES, HypothesisSheetConstants.NO],
|
|
66
|
+
},
|
|
67
|
+
supportedByHeatMapsOrMouseTracking: {
|
|
68
|
+
type: Number,
|
|
69
|
+
enum: [HypothesisSheetConstants.YES, HypothesisSheetConstants.NO],
|
|
70
|
+
},
|
|
71
|
+
changeNoticableWithin5Seconds: {
|
|
72
|
+
type: Number,
|
|
73
|
+
enum: [HypothesisSheetConstants.YES_2, HypothesisSheetConstants.NO],
|
|
74
|
+
},
|
|
75
|
+
levelOfEffortForDev: {
|
|
76
|
+
type: Number,
|
|
77
|
+
enum: [HypothesisSheetConstants.DAYS_2, HypothesisSheetConstants.MORE],
|
|
78
|
+
},
|
|
79
|
+
isItAddingOrRemovingSomething: {
|
|
80
|
+
type: Number,
|
|
81
|
+
enum: [HypothesisSheetConstants.YES_2, HypothesisSheetConstants.NO],
|
|
82
|
+
},
|
|
83
|
+
changeOnPageWithHighTraffic: {
|
|
84
|
+
type: Number,
|
|
85
|
+
enum: [HypothesisSheetConstants.YES, HypothesisSheetConstants.NO],
|
|
86
|
+
},
|
|
87
|
+
designedToIncreaseUserMotivation: {
|
|
88
|
+
type: Number,
|
|
89
|
+
enum: [HypothesisSheetConstants.YES, HypothesisSheetConstants.NO],
|
|
90
|
+
},
|
|
91
|
+
thoughtsOfTeam: {
|
|
92
|
+
type: Number,
|
|
93
|
+
enum: [
|
|
94
|
+
HypothesisSheetConstants.LOW,
|
|
95
|
+
HypothesisSheetConstants.MEDIUM,
|
|
96
|
+
HypothesisSheetConstants.GOOD,
|
|
97
|
+
],
|
|
98
|
+
},
|
|
99
|
+
tested: {
|
|
100
|
+
type: Boolean,
|
|
101
|
+
default: false,
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
timestamps: true,
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
|
|
109
|
+
const HypothesisSheet = model<IHypothesisSheet>(
|
|
110
|
+
"hypothesisSheet",
|
|
111
|
+
HypothesisSheetSchema
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
export default HypothesisSheet;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import mongoose, { Document, Schema, model } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export interface ILandingPagesData extends Document {
|
|
4
|
+
conversionRate?: Number;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
const LandingPageDataSchema = new Schema<ILandingPagesData>({
|
|
8
|
+
conversionRate: {
|
|
9
|
+
type: Number,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export interface ILandingPages extends Document {
|
|
14
|
+
title: string;
|
|
15
|
+
client?: mongoose.Schema.Types.ObjectId;
|
|
16
|
+
screenshot?: string;
|
|
17
|
+
dataPoints?: ILandingPagesData;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const LandingPagesSchema = new Schema<ILandingPages>(
|
|
21
|
+
{
|
|
22
|
+
title: {
|
|
23
|
+
type: String,
|
|
24
|
+
required: true,
|
|
25
|
+
},
|
|
26
|
+
client: {
|
|
27
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
28
|
+
ref: "client",
|
|
29
|
+
required: true,
|
|
30
|
+
},
|
|
31
|
+
screenshot: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: null,
|
|
34
|
+
},
|
|
35
|
+
dataPoints: {
|
|
36
|
+
type: LandingPageDataSchema,
|
|
37
|
+
default: {},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
timestamps: true,
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
const LandingPages = model<ILandingPages>("LandingPages", LandingPagesSchema);
|
|
46
|
+
export default LandingPages;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import mongoose, { Document, Schema, model } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export interface INewIdeas extends Document {
|
|
4
|
+
organisationId?: string;
|
|
5
|
+
ideaName: string;
|
|
6
|
+
client?: mongoose.Schema.Types.ObjectId;
|
|
7
|
+
hypothesis?: mongoose.Schema.Types.ObjectId;
|
|
8
|
+
viewId?: string;
|
|
9
|
+
pageType?: mongoose.Schema.Types.ObjectId;
|
|
10
|
+
priorityDetails?: mongoose.Schema.Types.Mixed;
|
|
11
|
+
totalPriority?: string;
|
|
12
|
+
createdBy?: mongoose.Schema.Types.ObjectId;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const NewIdeasSchema = new Schema<INewIdeas>(
|
|
16
|
+
{
|
|
17
|
+
organisationId: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: null,
|
|
20
|
+
},
|
|
21
|
+
ideaName: {
|
|
22
|
+
type: String,
|
|
23
|
+
required: true,
|
|
24
|
+
},
|
|
25
|
+
client: {
|
|
26
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
27
|
+
ref: "client",
|
|
28
|
+
},
|
|
29
|
+
hypothesis: {
|
|
30
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
31
|
+
ref: "hypos",
|
|
32
|
+
},
|
|
33
|
+
viewId: {
|
|
34
|
+
type: String,
|
|
35
|
+
},
|
|
36
|
+
pageType: {
|
|
37
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
38
|
+
ref: "pageelement",
|
|
39
|
+
},
|
|
40
|
+
priorityDetails: {
|
|
41
|
+
type: mongoose.Schema.Types.Mixed,
|
|
42
|
+
},
|
|
43
|
+
totalPriority: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: 0,
|
|
46
|
+
},
|
|
47
|
+
createdBy: {
|
|
48
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
49
|
+
ref: "user",
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
timestamps: true,
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
NewIdeasSchema.index({
|
|
58
|
+
client: 1,
|
|
59
|
+
viewId: 1,
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
const NewIdeas = model<INewIdeas>("Newideas", NewIdeasSchema);
|
|
63
|
+
export default NewIdeas;
|