codebase-models 2.0.0 → 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/Announcement.d.ts +1 -3
- package/dist/src/models/Announcement.js +1 -1
- package/dist/src/models/AppEvent.d.ts +1 -3
- package/dist/src/models/AppEvent.js +1 -1
- package/dist/src/models/Audience.d.ts +1 -3
- package/dist/src/models/Audience.js +1 -1
- package/dist/src/models/BqPreCompiledData.d.ts +1 -3
- package/dist/src/models/BqPreCompiledData.js +1 -1
- package/dist/src/models/CVRReport.d.ts +1 -3
- package/dist/src/models/CVRReport.js +1 -2
- package/dist/src/models/Client.d.ts +1 -3
- package/dist/src/models/Client.js +1 -1
- package/dist/src/models/ClientAdditionalRevenue.d.ts +1 -3
- package/dist/src/models/ClientAdditionalRevenue.js +1 -1
- package/dist/src/models/ClientLearning.d.ts +1 -3
- package/dist/src/models/ClientLearning.js +1 -1
- package/dist/src/models/ClientLinks.d.ts +1 -3
- package/dist/src/models/ClientLinks.js +1 -1
- package/dist/src/models/ClientNextSteps.d.ts +1 -3
- package/dist/src/models/ClientNextSteps.js +1 -1
- package/dist/src/models/ClientNote.d.ts +1 -3
- package/dist/src/models/ClientNote.js +1 -1
- package/dist/src/models/ClientReportsTemp.d.ts +1 -3
- package/dist/src/models/ClientReportsTemp.js +1 -3
- package/dist/src/models/ClientRetention.d.ts +1 -3
- package/dist/src/models/ClientRetention.js +1 -3
- package/dist/src/models/ClientScript.d.ts +1 -3
- package/dist/src/models/ClientScript.js +1 -2
- package/dist/src/models/ClientStrategy.d.ts +1 -3
- package/dist/src/models/ClientStrategy.js +1 -1
- package/dist/src/models/ClientSurvay.d.ts +1 -7
- package/dist/src/models/ClientSurvay.js +1 -1
- package/dist/src/models/Environment.d.ts +1 -3
- package/dist/src/models/Environment.js +1 -5
- package/dist/src/models/Faqs.d.ts +1 -3
- package/dist/src/models/Faqs.js +1 -1
- package/dist/src/models/Feedback.d.ts +1 -3
- package/dist/src/models/Feedback.js +1 -1
- package/dist/src/models/Goal.d.ts +1 -3
- package/dist/src/models/Goal.js +1 -4
- package/dist/src/models/Hypothesis.d.ts +1 -3
- package/dist/src/models/Hypothesis.js +1 -5
- package/dist/src/models/HypothesisSheet.d.ts +1 -3
- package/dist/src/models/HypothesisSheet.js +1 -1
- package/dist/src/models/LandingPages.d.ts +1 -3
- package/dist/src/models/LandingPages.js +1 -6
- package/dist/src/models/NewIdeas.d.ts +1 -3
- package/dist/src/models/NewIdeas.js +1 -1
- package/dist/src/models/Notification.d.ts +1 -3
- package/dist/src/models/Notification.js +1 -1
- package/dist/src/models/Organization.d.ts +1 -3
- package/dist/src/models/Organization.js +1 -1
- package/dist/src/models/Page.d.ts +1 -3
- package/dist/src/models/Page.js +1 -8
- package/dist/src/models/PageElement.d.ts +1 -3
- package/dist/src/models/PageElement.js +1 -5
- package/dist/src/models/PageTestType.d.ts +1 -3
- package/dist/src/models/PageTestType.js +1 -1
- package/dist/src/models/Portfolio.d.ts +1 -3
- package/dist/src/models/Portfolio.js +1 -1
- package/dist/src/models/PrecalculationFilters.d.ts +1 -3
- package/dist/src/models/PrecalculationFilters.js +2 -1
- package/dist/src/models/QueryLog.d.ts +1 -3
- package/dist/src/models/QueryLog.js +1 -1
- package/dist/src/models/ReadNotification.d.ts +1 -3
- package/dist/src/models/ReadNotification.js +1 -1
- package/dist/src/models/Report.d.ts +1 -3
- package/dist/src/models/Report.js +1 -1
- package/dist/src/models/Role.d.ts +1 -3
- package/dist/src/models/Role.js +1 -1
- package/dist/src/models/SavedSegment.d.ts +1 -3
- package/dist/src/models/SavedSegment.js +1 -1
- package/dist/src/models/Segment.d.ts +1 -3
- package/dist/src/models/Segment.js +1 -1
- package/dist/src/models/SegmentCombination.d.ts +1 -3
- package/dist/src/models/SegmentCombination.js +1 -1
- package/dist/src/models/Snippet.d.ts +1 -3
- package/dist/src/models/Snippet.js +1 -5
- package/dist/src/models/StageInCustomerJourney.d.ts +1 -3
- package/dist/src/models/StageInCustomerJourney.js +1 -1
- package/dist/src/models/Tag.d.ts +1 -3
- package/dist/src/models/Tag.js +1 -1
- package/dist/src/models/Temp.d.ts +1 -3
- package/dist/src/models/Temp.js +1 -1
- package/dist/src/models/Test.d.ts +1 -3
- package/dist/src/models/Test.js +1 -1
- package/dist/src/models/TestSequentialValue.d.ts +1 -3
- package/dist/src/models/TestSequentialValue.js +1 -1
- package/dist/src/models/Tier.d.ts +1 -3
- package/dist/src/models/Tier.js +1 -1
- package/dist/src/models/Trigger.d.ts +1 -3
- package/dist/src/models/Trigger.js +1 -1
- package/dist/src/models/User.d.ts +1 -3
- package/dist/src/models/User.js +1 -1
- package/package.json +1 -1
- package/src/models/Announcement.ts +1 -1
- package/src/models/AppEvent.ts +1 -1
- package/src/models/Audience.ts +1 -1
- package/src/models/BqPreCompiledData.ts +1 -1
- package/src/models/CVRReport.ts +1 -2
- package/src/models/Client.ts +1 -1
- package/src/models/ClientAdditionalRevenue.ts +1 -1
- package/src/models/ClientLearning.ts +1 -1
- package/src/models/ClientLinks.ts +1 -1
- package/src/models/ClientNextSteps.ts +1 -1
- package/src/models/ClientNote.ts +1 -1
- package/src/models/ClientReportsTemp.ts +1 -3
- package/src/models/ClientRetention.ts +1 -3
- package/src/models/ClientScript.ts +1 -2
- package/src/models/ClientStrategy.ts +1 -1
- package/src/models/ClientSurvay.ts +1 -1
- package/src/models/Environment.ts +2 -6
- package/src/models/Faqs.ts +1 -1
- package/src/models/Feedback.ts +1 -1
- package/src/models/Goal.ts +1 -4
- package/src/models/Hypothesis.ts +1 -5
- package/src/models/HypothesisSheet.ts +1 -1
- package/src/models/LandingPages.ts +1 -6
- package/src/models/NewIdeas.ts +1 -1
- package/src/models/Notification.ts +1 -1
- package/src/models/Organization.ts +1 -1
- package/src/models/Page.ts +4 -8
- package/src/models/PageElement.ts +1 -5
- package/src/models/PageTestType.ts +1 -1
- package/src/models/Portfolio.ts +1 -1
- package/src/models/PrecalculationFilters.ts +2 -1
- package/src/models/QueryLog.ts +1 -1
- package/src/models/ReadNotification.ts +1 -1
- package/src/models/Report.ts +1 -1
- package/src/models/Role.ts +1 -1
- package/src/models/SavedSegment.ts +1 -1
- package/src/models/Segment.ts +1 -1
- package/src/models/SegmentCombination.ts +1 -1
- package/src/models/Snippet.ts +1 -5
- package/src/models/StageInCustomerJourney.ts +1 -1
- package/src/models/Tag.ts +1 -1
- package/src/models/Temp.ts +1 -1
- package/src/models/Test.ts +1 -1
- package/src/models/TestSequentialValue.ts +1 -1
- package/src/models/Tier.ts +1 -1
- package/src/models/Trigger.ts +1 -1
- package/src/models/User.ts +1 -1
|
@@ -32,7 +32,5 @@ export interface IAnnouncement extends Document {
|
|
|
32
32
|
readBy?: mongoose.Schema.Types.ObjectId[];
|
|
33
33
|
organizationId?: mongoose.Schema.Types.ObjectId;
|
|
34
34
|
}
|
|
35
|
-
declare const Announcement: mongoose.Model<
|
|
36
|
-
_id: mongoose.Types.ObjectId;
|
|
37
|
-
}, any>;
|
|
35
|
+
declare const Announcement: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
38
36
|
export default Announcement;
|
|
@@ -75,5 +75,5 @@ AnnouncementSchema.index({ title: 1 }, { collation: { locale: 'en', strength: 2
|
|
|
75
75
|
// description: 5
|
|
76
76
|
// }
|
|
77
77
|
// });
|
|
78
|
-
const Announcement = (0, mongoose_1.model)("announcement", AnnouncementSchema);
|
|
78
|
+
const Announcement = mongoose_1.default.models.announcement || (0, mongoose_1.model)("announcement", AnnouncementSchema);
|
|
79
79
|
exports.default = Announcement;
|
|
@@ -50,7 +50,5 @@ export interface IAppEvent extends Document {
|
|
|
50
50
|
performanceMetrics?: IPerformanceMetrics;
|
|
51
51
|
engagementMetrics?: IEngagementMetrics;
|
|
52
52
|
}
|
|
53
|
-
declare const AppEvent: mongoose.Model<
|
|
54
|
-
_id: mongoose.Types.ObjectId;
|
|
55
|
-
}, any>;
|
|
53
|
+
declare const AppEvent: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
56
54
|
export default AppEvent;
|
|
@@ -62,5 +62,5 @@ const AppEventsSchema = new mongoose_1.Schema({
|
|
|
62
62
|
}, {
|
|
63
63
|
timestamps: true,
|
|
64
64
|
});
|
|
65
|
-
const AppEvent = (0, mongoose_1.model)("appevent", AppEventsSchema);
|
|
65
|
+
const AppEvent = mongoose_1.default.models.appevent || (0, mongoose_1.model)("appevent", AppEventsSchema);
|
|
66
66
|
exports.default = AppEvent;
|
|
@@ -29,7 +29,5 @@ export interface IAudience extends Document {
|
|
|
29
29
|
rules_js?: string;
|
|
30
30
|
client?: mongoose.Schema.Types.ObjectId;
|
|
31
31
|
}
|
|
32
|
-
declare const Audience: mongoose.Model<
|
|
33
|
-
_id: mongoose.Types.ObjectId;
|
|
34
|
-
}, any>;
|
|
32
|
+
declare const Audience: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
35
33
|
export default Audience;
|
|
@@ -44,5 +44,5 @@ const AudienceSchema = new mongoose_1.Schema({
|
|
|
44
44
|
}, {
|
|
45
45
|
timestamps: true,
|
|
46
46
|
});
|
|
47
|
-
const Audience = (0, mongoose_1.model)("audience", AudienceSchema);
|
|
47
|
+
const Audience = mongoose_1.default.models.audience || (0, mongoose_1.model)("audience", AudienceSchema);
|
|
48
48
|
exports.default = Audience;
|
|
@@ -34,7 +34,5 @@ export interface IBqPreCompiledData extends Document {
|
|
|
34
34
|
otherFilters: any;
|
|
35
35
|
cloudurl: string;
|
|
36
36
|
}
|
|
37
|
-
declare const BqPreCompiledData: mongoose.Model<
|
|
38
|
-
_id: mongoose.Types.ObjectId;
|
|
39
|
-
}, any>;
|
|
37
|
+
declare const BqPreCompiledData: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
40
38
|
export default BqPreCompiledData;
|
|
@@ -68,5 +68,5 @@ const BqPreCompiledDataSchema = new mongoose_1.Schema({
|
|
|
68
68
|
timestamps: true
|
|
69
69
|
});
|
|
70
70
|
BqPreCompiledDataSchema.index({ organizationId: 1, client: 1 });
|
|
71
|
-
const BqPreCompiledData = (0, mongoose_1.model)("bqprecompileddata", BqPreCompiledDataSchema);
|
|
71
|
+
const BqPreCompiledData = mongoose_1.default.models.bqprecompileddata || (0, mongoose_1.model)("bqprecompileddata", BqPreCompiledDataSchema);
|
|
72
72
|
exports.default = BqPreCompiledData;
|
|
@@ -28,7 +28,5 @@ export interface ICVRReport extends Document {
|
|
|
28
28
|
reportLink?: string;
|
|
29
29
|
client?: mongoose.Schema.Types.ObjectId;
|
|
30
30
|
}
|
|
31
|
-
declare const CVRReport: mongoose.Model<
|
|
32
|
-
_id: mongoose.Types.ObjectId;
|
|
33
|
-
}, any>;
|
|
31
|
+
declare const CVRReport: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
34
32
|
export default CVRReport;
|
|
@@ -38,7 +38,6 @@ const CVRReportSchema = new mongoose_1.Schema({
|
|
|
38
38
|
client: {
|
|
39
39
|
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
40
40
|
ref: "client",
|
|
41
|
-
index: true,
|
|
42
41
|
},
|
|
43
42
|
}, {
|
|
44
43
|
timestamps: true,
|
|
@@ -49,5 +48,5 @@ CVRReportSchema.index({ client: 1 });
|
|
|
49
48
|
CVRReportSchema.index({ reportLink: 1 }, { sparse: true });
|
|
50
49
|
// TTL index for automatic cleanup of old reports (1 year)
|
|
51
50
|
CVRReportSchema.index({ createdAt: 1 }, { expireAfterSeconds: 31536000 });
|
|
52
|
-
const CVRReport = (0, mongoose_1.model)("cvrreport", CVRReportSchema);
|
|
51
|
+
const CVRReport = mongoose_1.default.models.cvrreport || (0, mongoose_1.model)("cvrreport", CVRReportSchema);
|
|
53
52
|
exports.default = CVRReport;
|
|
@@ -47,7 +47,5 @@ export interface IClient extends Document {
|
|
|
47
47
|
retainerValue: number;
|
|
48
48
|
useIntraDayTable: boolean;
|
|
49
49
|
}
|
|
50
|
-
declare const Client: mongoose.Model<
|
|
51
|
-
_id: mongoose.Types.ObjectId;
|
|
52
|
-
}, any>;
|
|
50
|
+
declare const Client: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
53
51
|
export default Client;
|
|
@@ -77,5 +77,5 @@ ClientSchema.index({ name: 1 }, { collation: { locale: 'en', strength: 2 } }); /
|
|
|
77
77
|
ClientSchema.index({ tier: 1, active: 1 }); // For tier-based queries
|
|
78
78
|
ClientSchema.index({ onboardDate: 1 }); // For date-based queries
|
|
79
79
|
ClientSchema.index({ portfolioClient: 1, active: 1 }); // For portfolio client queries
|
|
80
|
-
const Client = (0, mongoose_1.model)("client", ClientSchema);
|
|
80
|
+
const Client = mongoose_1.default.models.client || (0, mongoose_1.model)("client", ClientSchema);
|
|
81
81
|
exports.default = Client;
|
|
@@ -35,7 +35,5 @@ export interface IAdditionalRevenue extends Document {
|
|
|
35
35
|
test?: mongoose.Schema.Types.ObjectId;
|
|
36
36
|
data_to_project?: mongoose.Schema.Types.Mixed;
|
|
37
37
|
}
|
|
38
|
-
declare const ClientAdditionalRevenue: mongoose.Model<
|
|
39
|
-
_id: mongoose.Types.ObjectId;
|
|
40
|
-
}, any>;
|
|
38
|
+
declare const ClientAdditionalRevenue: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
41
39
|
export default ClientAdditionalRevenue;
|
|
@@ -65,5 +65,5 @@ const ClientAdditionalRevenueSchema = new mongoose_1.Schema({
|
|
|
65
65
|
ClientAdditionalRevenueSchema.index({
|
|
66
66
|
client: 1,
|
|
67
67
|
});
|
|
68
|
-
const ClientAdditionalRevenue = (0, mongoose_1.model)("clientadditionalrevenue", ClientAdditionalRevenueSchema);
|
|
68
|
+
const ClientAdditionalRevenue = mongoose_1.default.models.clientadditionalrevenue || (0, mongoose_1.model)("clientadditionalrevenue", ClientAdditionalRevenueSchema);
|
|
69
69
|
exports.default = ClientAdditionalRevenue;
|
|
@@ -30,7 +30,5 @@ export interface IClientLearning extends Document {
|
|
|
30
30
|
viewId?: string;
|
|
31
31
|
createdBy?: mongoose.Schema.Types.ObjectId;
|
|
32
32
|
}
|
|
33
|
-
declare const ClientLearning: mongoose.Model<
|
|
34
|
-
_id: mongoose.Types.ObjectId;
|
|
35
|
-
}, any>;
|
|
33
|
+
declare const ClientLearning: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
36
34
|
export default ClientLearning;
|
|
@@ -55,5 +55,5 @@ ClientLearningSchema.index({ client: 1 });
|
|
|
55
55
|
ClientLearningSchema.index({ organisationId: 1 }, { sparse: true });
|
|
56
56
|
// Case-insensitive index for name
|
|
57
57
|
ClientLearningSchema.index({ name: 1 }, { collation: { locale: 'en', strength: 2 } });
|
|
58
|
-
const ClientLearning = (0, mongoose_1.model)("clientlearning", ClientLearningSchema);
|
|
58
|
+
const ClientLearning = mongoose_1.default.models.clientlearning || (0, mongoose_1.model)("clientlearning", ClientLearningSchema);
|
|
59
59
|
exports.default = ClientLearning;
|
|
@@ -33,7 +33,5 @@ export interface IClientLinks extends Document {
|
|
|
33
33
|
viewId?: string;
|
|
34
34
|
createdBy?: mongoose.Schema.Types.ObjectId;
|
|
35
35
|
}
|
|
36
|
-
declare const ClientLinks: mongoose.Model<
|
|
37
|
-
_id: mongoose.Types.ObjectId;
|
|
38
|
-
}, any>;
|
|
36
|
+
declare const ClientLinks: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
39
37
|
export default ClientLinks;
|
|
@@ -71,5 +71,5 @@ ClientLinksSchema.index({ viewId: 1 }, { sparse: true });
|
|
|
71
71
|
ClientLinksSchema.index({ organisationId: 1 }, { sparse: true });
|
|
72
72
|
// Case-insensitive indexes
|
|
73
73
|
ClientLinksSchema.index({ title: 1 }, { collation: { locale: 'en', strength: 2 } });
|
|
74
|
-
const ClientLinks = (0, mongoose_1.model)("clientlink", ClientLinksSchema);
|
|
74
|
+
const ClientLinks = mongoose_1.default.models.clientlink || (0, mongoose_1.model)("clientlink", ClientLinksSchema);
|
|
75
75
|
exports.default = ClientLinks;
|
|
@@ -30,7 +30,5 @@ export interface IClientNextSteps extends Document {
|
|
|
30
30
|
viewId?: string;
|
|
31
31
|
createdBy?: mongoose.Schema.Types.ObjectId;
|
|
32
32
|
}
|
|
33
|
-
declare const ClientNextStep: mongoose.Model<
|
|
34
|
-
_id: mongoose.Types.ObjectId;
|
|
35
|
-
}, any>;
|
|
33
|
+
declare const ClientNextStep: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
36
34
|
export default ClientNextStep;
|
|
@@ -52,5 +52,5 @@ ClientNextStepsSchema.index({
|
|
|
52
52
|
client: 1,
|
|
53
53
|
viewId: 1,
|
|
54
54
|
});
|
|
55
|
-
const ClientNextStep = (0, mongoose_1.model)("clientnextstep", ClientNextStepsSchema);
|
|
55
|
+
const ClientNextStep = mongoose_1.default.models.clientnextstep || (0, mongoose_1.model)("clientnextstep", ClientNextStepsSchema);
|
|
56
56
|
exports.default = ClientNextStep;
|
|
@@ -34,7 +34,5 @@ export interface IClientNote extends Document {
|
|
|
34
34
|
evidence?: mongoose.Schema.Types.Mixed;
|
|
35
35
|
createdBy?: mongoose.Schema.Types.ObjectId;
|
|
36
36
|
}
|
|
37
|
-
declare const ClientNote: mongoose.Model<
|
|
38
|
-
_id: mongoose.Types.ObjectId;
|
|
39
|
-
}, any>;
|
|
37
|
+
declare const ClientNote: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
40
38
|
export default ClientNote;
|
|
@@ -65,5 +65,5 @@ ClientNoteSchema.index({
|
|
|
65
65
|
client: 1,
|
|
66
66
|
viewId: 1,
|
|
67
67
|
});
|
|
68
|
-
const ClientNote = (0, mongoose_1.model)("clientnote", ClientNoteSchema);
|
|
68
|
+
const ClientNote = mongoose_1.default.models.clientnote || (0, mongoose_1.model)("clientnote", ClientNoteSchema);
|
|
69
69
|
exports.default = ClientNote;
|
|
@@ -35,7 +35,5 @@ export interface IClientReportsTemp extends Document {
|
|
|
35
35
|
deactivated?: boolean;
|
|
36
36
|
createdBy?: mongoose.Schema.Types.ObjectId;
|
|
37
37
|
}
|
|
38
|
-
declare const ClientReportsTemp: mongoose.Model<
|
|
39
|
-
_id: mongoose.Types.ObjectId;
|
|
40
|
-
}, any>;
|
|
38
|
+
declare const ClientReportsTemp: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
41
39
|
export default ClientReportsTemp;
|
|
@@ -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,
|
|
@@ -81,5 +79,5 @@ ClientReportsTempSchema.index({ organisationId: 1 }, { sparse: true });
|
|
|
81
79
|
ClientReportsTempSchema.index({ test: 1 }, { sparse: true });
|
|
82
80
|
// TTL index for automatic cleanup of old reports
|
|
83
81
|
ClientReportsTempSchema.index({ date: 1 }, { expireAfterSeconds: 86400 }); // 24 hours
|
|
84
|
-
const ClientReportsTemp = (0, mongoose_1.model)("clientreportstemp", ClientReportsTempSchema);
|
|
82
|
+
const ClientReportsTemp = mongoose_1.default.models.clientreportstemp || (0, mongoose_1.model)("clientreportstemp", ClientReportsTempSchema);
|
|
85
83
|
exports.default = ClientReportsTemp;
|
|
@@ -37,7 +37,5 @@ export interface IClientRetention extends Document {
|
|
|
37
37
|
otherPayments: Number;
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
declare const ClientRetention: mongoose.Model<
|
|
41
|
-
_id: mongoose.Types.ObjectId;
|
|
42
|
-
}, any>;
|
|
40
|
+
declare const ClientRetention: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
43
41
|
export default ClientRetention;
|
|
@@ -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: [
|
|
@@ -99,5 +97,5 @@ ClientRetentionSchema.index({ viewId: 1 }, { sparse: true });
|
|
|
99
97
|
ClientRetentionSchema.index({ "retentions.active": 1 }, { partialFilterExpression: { "retentions.active": true } });
|
|
100
98
|
// Index for sorting by retainer value
|
|
101
99
|
ClientRetentionSchema.index({ "retentions.retainerValue": -1 });
|
|
102
|
-
const ClientRetention = (0, mongoose_1.model)("ClientRetention", ClientRetentionSchema);
|
|
100
|
+
const ClientRetention = mongoose_1.default.models.clientretention || (0, mongoose_1.model)("ClientRetention", ClientRetentionSchema);
|
|
103
101
|
exports.default = ClientRetention;
|
|
@@ -60,7 +60,5 @@ export interface IClientScript extends Document {
|
|
|
60
60
|
csscode: string;
|
|
61
61
|
is_spa: Boolean;
|
|
62
62
|
}
|
|
63
|
-
declare const ClientScript: mongoose.Model<
|
|
64
|
-
_id: mongoose.Types.ObjectId;
|
|
65
|
-
}, any>;
|
|
63
|
+
declare const ClientScript: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
66
64
|
export default ClientScript;
|
|
@@ -33,7 +33,6 @@ const ClientScriptSchema = new mongoose_1.Schema({
|
|
|
33
33
|
client: {
|
|
34
34
|
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
35
35
|
ref: "client",
|
|
36
|
-
index: true,
|
|
37
36
|
},
|
|
38
37
|
viewId: {
|
|
39
38
|
type: String,
|
|
@@ -155,5 +154,5 @@ ClientScriptSchema.index({ client: 1 });
|
|
|
155
154
|
ClientScriptSchema.index({ organisationId: 1 }, { sparse: true });
|
|
156
155
|
ClientScriptSchema.index({ tracker_url: 1 }, { sparse: true });
|
|
157
156
|
ClientScriptSchema.index({ asset_url: 1 }, { sparse: true });
|
|
158
|
-
const ClientScript = (0, mongoose_1.model)("clientscript", ClientScriptSchema);
|
|
157
|
+
const ClientScript = mongoose_1.default.models.clientscript || (0, mongoose_1.model)("clientscript", ClientScriptSchema);
|
|
159
158
|
exports.default = ClientScript;
|
|
@@ -35,7 +35,5 @@ export interface IClientStrategy extends Document {
|
|
|
35
35
|
viewId?: string;
|
|
36
36
|
createdBy?: mongoose.Schema.Types.ObjectId;
|
|
37
37
|
}
|
|
38
|
-
declare const ClientStrategy: mongoose.Model<
|
|
39
|
-
_id: mongoose.Types.ObjectId;
|
|
40
|
-
}, any>;
|
|
38
|
+
declare const ClientStrategy: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
41
39
|
export default ClientStrategy;
|
|
@@ -70,5 +70,5 @@ ClientStrategySchema.index({
|
|
|
70
70
|
client: 1,
|
|
71
71
|
viewId: 1,
|
|
72
72
|
});
|
|
73
|
-
const ClientStrategy = (0, mongoose_1.model)("clientstrategy", ClientStrategySchema);
|
|
73
|
+
const ClientStrategy = mongoose_1.default.models.clientstrategy || (0, mongoose_1.model)("clientstrategy", ClientStrategySchema);
|
|
74
74
|
exports.default = ClientStrategy;
|
|
@@ -32,11 +32,5 @@ export interface IResponce extends Document {
|
|
|
32
32
|
question?: String;
|
|
33
33
|
answer?: String;
|
|
34
34
|
}
|
|
35
|
-
declare const ClientSurvey: mongoose.Model<
|
|
36
|
-
_id: mongoose.Types.ObjectId;
|
|
37
|
-
}, mongoose.Schema<IClientSurvay, mongoose.Model<IClientSurvay, any, any, any, mongoose.Document<unknown, any, IClientSurvay> & IClientSurvay & {
|
|
38
|
-
_id: mongoose.Types.ObjectId;
|
|
39
|
-
}, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IClientSurvay, mongoose.Document<unknown, {}, mongoose.FlatRecord<IClientSurvay>> & mongoose.FlatRecord<IClientSurvay> & {
|
|
40
|
-
_id: mongoose.Types.ObjectId;
|
|
41
|
-
}>>;
|
|
35
|
+
declare const ClientSurvey: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
42
36
|
export default ClientSurvey;
|
|
@@ -46,5 +46,5 @@ const ClientSurveySchema = new mongoose_1.Schema({
|
|
|
46
46
|
}, {
|
|
47
47
|
timestamps: true,
|
|
48
48
|
});
|
|
49
|
-
const ClientSurvey = (0, mongoose_1.model)("clientsurvey", ClientSurveySchema);
|
|
49
|
+
const ClientSurvey = mongoose_1.default.models.clientsurvey || (0, mongoose_1.model)("clientsurvey", ClientSurveySchema);
|
|
50
50
|
exports.default = ClientSurvey;
|
|
@@ -30,7 +30,5 @@ export interface IEnvironment extends Document {
|
|
|
30
30
|
organizationId?: mongoose.Schema.Types.ObjectId;
|
|
31
31
|
isActive?: boolean;
|
|
32
32
|
}
|
|
33
|
-
declare const Environment: mongoose.Model<
|
|
34
|
-
_id: mongoose.Types.ObjectId;
|
|
35
|
-
}, any>;
|
|
33
|
+
declare const Environment: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
36
34
|
export default Environment;
|
|
@@ -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
|
|
@@ -65,5 +61,5 @@ EnvironmentSchema.index({ organizationId: 1, name: 1 }, {
|
|
|
65
61
|
});
|
|
66
62
|
// Text index for full-text search
|
|
67
63
|
EnvironmentSchema.index({ name: 'text' });
|
|
68
|
-
const Environment = (0, mongoose_1.model)("environment", EnvironmentSchema);
|
|
64
|
+
const Environment = mongoose_1.default.models.environment || (0, mongoose_1.model)("environment", EnvironmentSchema);
|
|
69
65
|
exports.default = Environment;
|
|
@@ -31,7 +31,5 @@ export interface IFaqs extends Document {
|
|
|
31
31
|
updatedAt?: Date;
|
|
32
32
|
organizationId?: mongoose.Schema.Types.ObjectId;
|
|
33
33
|
}
|
|
34
|
-
declare const Faq: mongoose.Model<
|
|
35
|
-
_id: mongoose.Types.ObjectId;
|
|
36
|
-
}, any>;
|
|
34
|
+
declare const Faq: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
37
35
|
export default Faq;
|
package/dist/src/models/Faqs.js
CHANGED
|
@@ -32,7 +32,5 @@ export interface IFeedback extends Document {
|
|
|
32
32
|
createdAt?: Date;
|
|
33
33
|
updatedAt?: Date;
|
|
34
34
|
}
|
|
35
|
-
declare const Feedback: mongoose.Model<
|
|
36
|
-
_id: mongoose.Types.ObjectId;
|
|
37
|
-
}, any>;
|
|
35
|
+
declare const Feedback: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
38
36
|
export default Feedback;
|
|
@@ -55,5 +55,5 @@ const FeedbackSchema = new mongoose_1.Schema({
|
|
|
55
55
|
default: new Date(),
|
|
56
56
|
},
|
|
57
57
|
});
|
|
58
|
-
const Feedback = (0, mongoose_1.model)("feedback", FeedbackSchema);
|
|
58
|
+
const Feedback = mongoose_1.default.models.feedback || (0, mongoose_1.model)("feedback", FeedbackSchema);
|
|
59
59
|
exports.default = Feedback;
|
|
@@ -38,7 +38,5 @@ export interface IGoal extends Document {
|
|
|
38
38
|
createdAt?: Date;
|
|
39
39
|
updatedAt?: Date;
|
|
40
40
|
}
|
|
41
|
-
declare const Goal: mongoose.Model<
|
|
42
|
-
_id: mongoose.Types.ObjectId;
|
|
43
|
-
}, any>;
|
|
41
|
+
declare const Goal: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
44
42
|
export default Goal;
|
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
|
|
@@ -93,5 +90,5 @@ GoalSchema.index({ client: 1 });
|
|
|
93
90
|
GoalSchema.index({ client: 1, isActive: 1 });
|
|
94
91
|
GoalSchema.index({ organizationId: 1, client: 1 });
|
|
95
92
|
GoalSchema.index({ client: 1, name: 1 }, { unique: true });
|
|
96
|
-
const Goal = (0, mongoose_1.model)("goal", GoalSchema);
|
|
93
|
+
const Goal = mongoose_1.default.models.goal || (0, mongoose_1.model)("goal", GoalSchema);
|
|
97
94
|
exports.default = Goal;
|
|
@@ -35,7 +35,5 @@ export interface IHypothesis extends Document {
|
|
|
35
35
|
createdAt?: Date;
|
|
36
36
|
updatedAt?: Date;
|
|
37
37
|
}
|
|
38
|
-
declare const Hypothesis: mongoose.Model<
|
|
39
|
-
_id: mongoose.Types.ObjectId;
|
|
40
|
-
}, any>;
|
|
38
|
+
declare const Hypothesis: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
41
39
|
export default Hypothesis;
|
|
@@ -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
|
|
@@ -74,5 +70,5 @@ const HypothesisSchema = new mongoose_1.Schema({
|
|
|
74
70
|
HypothesisSchema.index({ hypothesisNumber: 1, isActive: 1 });
|
|
75
71
|
HypothesisSchema.index({ tagged: 1, isActive: 1 });
|
|
76
72
|
HypothesisSchema.index({ name: 1, isActive: 1 });
|
|
77
|
-
const Hypothesis = (0, mongoose_1.model)("
|
|
73
|
+
const Hypothesis = mongoose_1.default.models.hypothesis || (0, mongoose_1.model)("hypothesis", HypothesisSchema);
|
|
78
74
|
exports.default = Hypothesis;
|
|
@@ -43,7 +43,5 @@ export interface IHypothesisSheet extends Document {
|
|
|
43
43
|
thoughtsOfTeam?: Number;
|
|
44
44
|
tested?: Boolean;
|
|
45
45
|
}
|
|
46
|
-
declare const HypothesisSheet: mongoose.Model<
|
|
47
|
-
_id: mongoose.Types.ObjectId;
|
|
48
|
-
}, any>;
|
|
46
|
+
declare const HypothesisSheet: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
49
47
|
export default HypothesisSheet;
|
|
@@ -109,5 +109,5 @@ const HypothesisSheetSchema = new mongoose_1.Schema({
|
|
|
109
109
|
}, {
|
|
110
110
|
timestamps: true,
|
|
111
111
|
});
|
|
112
|
-
const HypothesisSheet = (0, mongoose_1.model)("hypothesisSheet", HypothesisSheetSchema);
|
|
112
|
+
const HypothesisSheet = mongoose_1.default.models.hypothesissheet || (0, mongoose_1.model)("hypothesisSheet", HypothesisSheetSchema);
|
|
113
113
|
exports.default = HypothesisSheet;
|
|
@@ -35,7 +35,5 @@ export interface ILandingPages extends Document {
|
|
|
35
35
|
dataPoints?: ILandingPagesData;
|
|
36
36
|
isActive?: boolean;
|
|
37
37
|
}
|
|
38
|
-
declare const LandingPages: mongoose.Model<
|
|
39
|
-
_id: mongoose.Types.ObjectId;
|
|
40
|
-
}, any>;
|
|
38
|
+
declare const LandingPages: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
41
39
|
export default LandingPages;
|
|
@@ -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,
|
|
@@ -79,5 +74,5 @@ LandingPagesSchema.index({ organizationId: 1, title: 1 });
|
|
|
79
74
|
LandingPagesSchema.index({ client: 1, 'dataPoints.conversionRate': -1 });
|
|
80
75
|
// Text index for full-text search
|
|
81
76
|
LandingPagesSchema.index({ title: 'text' });
|
|
82
|
-
const LandingPages = (0, mongoose_1.model)("
|
|
77
|
+
const LandingPages = mongoose_1.default.models.landingpages || (0, mongoose_1.model)("landingpages", LandingPagesSchema);
|
|
83
78
|
exports.default = LandingPages;
|
|
@@ -34,7 +34,5 @@ export interface INewIdeas extends Document {
|
|
|
34
34
|
totalPriority?: string;
|
|
35
35
|
createdBy?: mongoose.Schema.Types.ObjectId;
|
|
36
36
|
}
|
|
37
|
-
declare const NewIdeas: mongoose.Model<
|
|
38
|
-
_id: mongoose.Types.ObjectId;
|
|
39
|
-
}, any>;
|
|
37
|
+
declare const NewIdeas: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
40
38
|
export default NewIdeas;
|
|
@@ -67,5 +67,5 @@ NewIdeasSchema.index({
|
|
|
67
67
|
client: 1,
|
|
68
68
|
viewId: 1,
|
|
69
69
|
});
|
|
70
|
-
const NewIdeas = (0, mongoose_1.model)("
|
|
70
|
+
const NewIdeas = mongoose_1.default.models.newideas || (0, mongoose_1.model)("newideas", NewIdeasSchema);
|
|
71
71
|
exports.default = NewIdeas;
|
|
@@ -33,7 +33,5 @@ export interface INotification extends Document {
|
|
|
33
33
|
moduleData?: string;
|
|
34
34
|
organizationId?: mongoose.Schema.Types.ObjectId;
|
|
35
35
|
}
|
|
36
|
-
declare const Notification: mongoose.Model<
|
|
37
|
-
_id: mongoose.Types.ObjectId;
|
|
38
|
-
}, any>;
|
|
36
|
+
declare const Notification: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
39
37
|
export default Notification;
|
|
@@ -57,5 +57,5 @@ const NotificationSchema = new mongoose_1.Schema({
|
|
|
57
57
|
}, {
|
|
58
58
|
timestamps: true,
|
|
59
59
|
});
|
|
60
|
-
const Notification = (0, mongoose_1.model)("notification", NotificationSchema);
|
|
60
|
+
const Notification = mongoose_1.default.models.notification || (0, mongoose_1.model)("notification", NotificationSchema);
|
|
61
61
|
exports.default = Notification;
|
|
@@ -41,7 +41,5 @@ export interface IOrganization extends Document {
|
|
|
41
41
|
updatedAt: Date;
|
|
42
42
|
isActive: boolean;
|
|
43
43
|
}
|
|
44
|
-
declare const Organization: mongoose.Model<
|
|
45
|
-
_id: mongoose.Types.ObjectId;
|
|
46
|
-
}, any>;
|
|
44
|
+
declare const Organization: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
47
45
|
export default Organization;
|