@cool-digital-solutions/interferir-models 1.1.27 → 1.1.29
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 +5 -3
- package/dist/index.js +3 -1
- package/dist/schemas/ai-assistant.schema.js +5 -2
- package/dist/schemas/ai-company-tracking-task.schema.js +5 -2
- package/dist/schemas/ai-conversation-message.schema.js +5 -2
- package/dist/schemas/ai-conversation.schema.js +5 -2
- package/dist/schemas/backend-error.schema.js +5 -2
- package/dist/schemas/badge.schema.js +5 -2
- package/dist/schemas/batch-history.schema.js +5 -4
- package/dist/schemas/bookmark.schema.js +5 -2
- package/dist/schemas/company-cluster.schema.js +5 -2
- package/dist/schemas/company-marketing.schema.js +5 -2
- package/dist/schemas/competitor.schema.js +3 -1
- package/dist/schemas/contact-message.schema.js +5 -2
- package/dist/schemas/contact-startup.schema.js +22 -0
- package/dist/schemas/content.schema.js +5 -2
- package/dist/schemas/draft-version.schema.js +5 -2
- package/dist/schemas/evidence-layout.schema.js +5 -2
- package/dist/schemas/evidence.schema.js +5 -2
- package/dist/schemas/faq.schema.js +5 -2
- package/dist/schemas/featured-theme.schema.js +5 -2
- package/dist/schemas/foam-tree.schema.js +5 -2
- package/dist/schemas/follow-content.schema.js +5 -2
- package/dist/schemas/highlight.schema.js +5 -2
- package/dist/schemas/image.schema.js +5 -2
- package/dist/schemas/index.d.ts +2 -1
- package/dist/schemas/index.js +3 -1
- package/dist/schemas/industry.schema.js +5 -2
- package/dist/schemas/like.schema.js +5 -2
- package/dist/schemas/related-theme.schema.js +5 -2
- package/dist/schemas/search-history.schema.js +5 -2
- package/dist/schemas/sf-category.schema.js +5 -2
- package/dist/schemas/sf-sub-category.schema.js +5 -2
- package/dist/schemas/sf-tag.schema.js +5 -2
- package/dist/schemas/spark-use-case.schema.js +5 -2
- package/dist/schemas/startup-vector-any-entity.schema.js +5 -2
- package/dist/schemas/team.schema.d.ts +28 -0
- package/dist/schemas/team.schema.js +40 -0
- package/dist/schemas/technology.schema.js +5 -2
- package/dist/schemas/use-case-discovery-problem.schema.js +5 -2
- package/dist/schemas/use-case-discovery.schema.js +5 -2
- package/dist/schemas/use-case.schema.js +5 -2
- package/dist/schemas/user-token.schema.js +5 -2
- package/dist/schemas/user-visit.schema.js +5 -2
- package/dist/schemas/user.schema.js +3 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/team.type.d.ts +41 -0
- package/dist/types/team.type.js +8 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -56,6 +56,8 @@ import { IFoamTree, IFoamTreeModel } from './types/foam-tree.type';
|
|
|
56
56
|
import { ICompetitorGrid, ICompetitorGridModel } from './types/competitor-grid.type';
|
|
57
57
|
import { IHighlight, IHighlightModel } from './types/highlight.type';
|
|
58
58
|
import { INewsHub, INewsHubModel } from './types/news-hub.type';
|
|
59
|
+
import { IAiAssistant, IAiAssistantModel } from './types/ai-assistant.type';
|
|
60
|
+
import { ITeam, ITeamModel } from './types/team.type';
|
|
59
61
|
import ThemeSchema from './schemas/theme.schema';
|
|
60
62
|
import ProblemSchema from './schemas/problem.schema';
|
|
61
63
|
import SFTagSchema from './schemas/sf-tag.schema';
|
|
@@ -114,6 +116,6 @@ import FeaturedThemeSchema from './schemas/featured-theme.schema';
|
|
|
114
116
|
import CompetitorGridSchema from './schemas/competitor-grid.schema';
|
|
115
117
|
import HighlightSchema from './schemas/highlight.schema';
|
|
116
118
|
import NewsHubSchema from './schemas/news-hub.schema';
|
|
117
|
-
import
|
|
118
|
-
export { IAiConversation, IAiConversationModel, IAiConversationMessage, IAiConversationMessageModel, IAiConversationTrackingTask, IAiConversationTrackingTaskModel, IAiAssistant, IAiAssistantModel, IBackendError, IBackendErrorModel, IBadge, IBadgeModel, IBatchHistory, IBookmark, IBookmarkModel, ICompany, ICompanyModel, ICompanyCluster, ICompanyClusterModel, ICompanyMarketing, ICompanyMarketingModel, ICompanyFundingRound, ICompanyFundingRoundModel, ICompetitor, ICompetitorModel, ICompetitorAnalysis, ICompetitorAnalysisModel, IContactMessage, IContactMessageModel, IContactStartup, IContactStartupModel, IContent, IContentModel, IDraftVersion, IDraftVersionModel, IEvidenceLayout, IEvidenceLayoutModel, IEvidence, IEvidenceModel, IFaq, IFaqModel, IFeaturedTheme, IFeaturedThemeModel, IFollowContent, IFollowContentModel, IGeneralConfigSub, IGeneralConfigSubModel, IGeneralConfig, IGeneralConfigModel, IImage, IImageModel, IIndustry, IIndustryModel, IInstantResearch, IInstantResearchModel, IInvestor, IInvestorModel, ILike, ILikeModel, INews, INewsModel, INotification, INotificationModel, IOtp, IOtpModel, IPortiaArticle, IPortiaArticleModel, IProblem, IProblemModel, IRelatedTheme, IRelatedThemeModel, ISearchHistory, ISearchHistoryModel, ISFCategory, ISFCategoryModel, ISFSubCategory, ISFSubCategoryModel, ISFTag, ISFTagModel, ISiteMapCache, ISiteMapCacheModel, ISparkUseCase, ISparkUseCaseModel, ISpark, ISparkModel, IStartupVectorAnyEntity, IStartupVectorAnyEntityModel, ISuggest, ISuggestModel, ITechnology, ITechnologyModel, ITheme, IThemeModel, IToken, ITokenModel, IUpdateJob, IUpdateJobModel, IUseCase, IUseCaseModel, IUseCaseDiscovery, IUseCaseDiscoveryModel, IUseCaseDiscoveryProblem, IUseCaseDiscoveryProblemModel, IUserToken, IUserTokenModel, IUserVisit, IUserVisitModel, IUser, IUserModel, IFoamTree, IFoamTreeModel, ICompetitorGrid, ICompetitorGridModel, IHighlight, IHighlightModel, INewsHub, INewsHubModel, };
|
|
119
|
-
export { ThemeSchema, ProblemSchema, SFTagSchema, SFCategorySchema, SFSubCategorySchema, TechnologySchema, IndustrySchema, BackendErrorSchema, EvidenceSchema, EvidenceLayoutSchema, ImageSchema, SearchHistorySchema, TokenSchema, UserTokenSchema, UserSchema, CompanySchema, PortiaArticleSchema, InstantResearchSchema, ContactMessageSchema, ContactStartupSchema, BadgeSchema, ContentSchema, FaqSchema, UseCaseSchema, NewsSchema, LikeSchema, SparkSchema, SparkUseCaseSchema, FollowContentSchema, SiteMapCacheSchema, GeneralConfigSchema, GeneralConfigSubSchema, DraftVersionSchema, NotificationSchema, OtpSchema, SuggestSchema, UserVisitSchema, CompetitorSchema, CompanyFundingRoundSchema, BookmarkSchema, AiConversationSchema, AiConversationMessageSchema, AiConversationTrackingTaskSchema, CompanyClusterSchema, CompanyMarketingSchema, InvestorSchema, RelatedThemeSchema, StartupVectorAnyEntitySchema, UpdateJobSchema, UseCaseDiscoverySchema, UseCaseDiscoveryProblemSchema, CompetitorAnalysisSchema, FoamTreeSchema, FeaturedThemeSchema, CompetitorGridSchema, HighlightSchema, NewsHubSchema, AiAssistantSchema, };
|
|
119
|
+
import TeamSchema from './schemas/team.schema';
|
|
120
|
+
export { IAiConversation, IAiConversationModel, IAiConversationMessage, IAiConversationMessageModel, IAiConversationTrackingTask, IAiConversationTrackingTaskModel, IAiAssistant, IAiAssistantModel, IBackendError, IBackendErrorModel, IBadge, IBadgeModel, IBatchHistory, IBookmark, IBookmarkModel, ICompany, ICompanyModel, ICompanyCluster, ICompanyClusterModel, ICompanyMarketing, ICompanyMarketingModel, ICompanyFundingRound, ICompanyFundingRoundModel, ICompetitor, ICompetitorModel, ICompetitorAnalysis, ICompetitorAnalysisModel, IContactMessage, IContactMessageModel, IContactStartup, IContactStartupModel, IContent, IContentModel, IDraftVersion, IDraftVersionModel, IEvidenceLayout, IEvidenceLayoutModel, IEvidence, IEvidenceModel, IFaq, IFaqModel, IFeaturedTheme, IFeaturedThemeModel, IFollowContent, IFollowContentModel, IGeneralConfigSub, IGeneralConfigSubModel, IGeneralConfig, IGeneralConfigModel, IImage, IImageModel, IIndustry, IIndustryModel, IInstantResearch, IInstantResearchModel, IInvestor, IInvestorModel, ILike, ILikeModel, INews, INewsModel, INotification, INotificationModel, IOtp, IOtpModel, IPortiaArticle, IPortiaArticleModel, IProblem, IProblemModel, IRelatedTheme, IRelatedThemeModel, ISearchHistory, ISearchHistoryModel, ISFCategory, ISFCategoryModel, ISFSubCategory, ISFSubCategoryModel, ISFTag, ISFTagModel, ISiteMapCache, ISiteMapCacheModel, ISparkUseCase, ISparkUseCaseModel, ISpark, ISparkModel, IStartupVectorAnyEntity, IStartupVectorAnyEntityModel, ISuggest, ISuggestModel, ITechnology, ITechnologyModel, ITheme, IThemeModel, IToken, ITokenModel, IUpdateJob, IUpdateJobModel, IUseCase, IUseCaseModel, IUseCaseDiscovery, IUseCaseDiscoveryModel, IUseCaseDiscoveryProblem, IUseCaseDiscoveryProblemModel, IUserToken, IUserTokenModel, IUserVisit, IUserVisitModel, IUser, IUserModel, IFoamTree, IFoamTreeModel, ICompetitorGrid, ICompetitorGridModel, IHighlight, IHighlightModel, INewsHub, INewsHubModel, ITeam, ITeamModel, };
|
|
121
|
+
export { ThemeSchema, ProblemSchema, SFTagSchema, SFCategorySchema, SFSubCategorySchema, TechnologySchema, IndustrySchema, BackendErrorSchema, EvidenceSchema, EvidenceLayoutSchema, ImageSchema, SearchHistorySchema, TokenSchema, UserTokenSchema, UserSchema, CompanySchema, PortiaArticleSchema, InstantResearchSchema, ContactMessageSchema, ContactStartupSchema, BadgeSchema, ContentSchema, FaqSchema, UseCaseSchema, NewsSchema, LikeSchema, SparkSchema, SparkUseCaseSchema, FollowContentSchema, SiteMapCacheSchema, GeneralConfigSchema, GeneralConfigSubSchema, DraftVersionSchema, NotificationSchema, OtpSchema, SuggestSchema, UserVisitSchema, CompetitorSchema, CompanyFundingRoundSchema, BookmarkSchema, AiConversationSchema, AiConversationMessageSchema, AiConversationTrackingTaskSchema, CompanyClusterSchema, CompanyMarketingSchema, InvestorSchema, RelatedThemeSchema, StartupVectorAnyEntitySchema, UpdateJobSchema, UseCaseDiscoverySchema, UseCaseDiscoveryProblemSchema, CompetitorAnalysisSchema, FoamTreeSchema, FeaturedThemeSchema, CompetitorGridSchema, HighlightSchema, NewsHubSchema, AiAssistantSchema, TeamSchema, };
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.UseCaseDiscoverySchema = exports.UpdateJobSchema = exports.StartupVectorAnyEntitySchema = exports.RelatedThemeSchema = exports.InvestorSchema = exports.CompanyMarketingSchema = exports.CompanyClusterSchema = exports.AiConversationTrackingTaskSchema = exports.AiConversationMessageSchema = exports.AiConversationSchema = exports.BookmarkSchema = exports.CompanyFundingRoundSchema = exports.CompetitorSchema = exports.UserVisitSchema = exports.SuggestSchema = exports.OtpSchema = exports.NotificationSchema = exports.DraftVersionSchema = exports.GeneralConfigSubSchema = exports.GeneralConfigSchema = exports.SiteMapCacheSchema = exports.FollowContentSchema = exports.SparkUseCaseSchema = exports.SparkSchema = exports.LikeSchema = exports.NewsSchema = exports.UseCaseSchema = exports.FaqSchema = exports.ContentSchema = exports.BadgeSchema = exports.ContactStartupSchema = exports.ContactMessageSchema = exports.InstantResearchSchema = exports.PortiaArticleSchema = exports.CompanySchema = exports.UserSchema = exports.UserTokenSchema = exports.TokenSchema = exports.SearchHistorySchema = exports.ImageSchema = exports.EvidenceLayoutSchema = exports.EvidenceSchema = exports.BackendErrorSchema = exports.IndustrySchema = exports.TechnologySchema = exports.SFSubCategorySchema = exports.SFCategorySchema = exports.SFTagSchema = exports.ProblemSchema = exports.ThemeSchema = void 0;
|
|
7
|
-
exports.AiAssistantSchema = exports.NewsHubSchema = exports.HighlightSchema = exports.CompetitorGridSchema = exports.FeaturedThemeSchema = exports.FoamTreeSchema = exports.CompetitorAnalysisSchema = exports.UseCaseDiscoveryProblemSchema = void 0;
|
|
7
|
+
exports.TeamSchema = exports.AiAssistantSchema = exports.NewsHubSchema = exports.HighlightSchema = exports.CompetitorGridSchema = exports.FeaturedThemeSchema = exports.FoamTreeSchema = exports.CompetitorAnalysisSchema = exports.UseCaseDiscoveryProblemSchema = void 0;
|
|
8
8
|
const theme_schema_1 = __importDefault(require("./schemas/theme.schema"));
|
|
9
9
|
exports.ThemeSchema = theme_schema_1.default;
|
|
10
10
|
const problem_schema_1 = __importDefault(require("./schemas/problem.schema"));
|
|
@@ -121,3 +121,5 @@ const highlight_schema_1 = __importDefault(require("./schemas/highlight.schema")
|
|
|
121
121
|
exports.HighlightSchema = highlight_schema_1.default;
|
|
122
122
|
const news_hub_schema_1 = __importDefault(require("./schemas/news-hub.schema"));
|
|
123
123
|
exports.NewsHubSchema = news_hub_schema_1.default;
|
|
124
|
+
const team_schema_1 = __importDefault(require("./schemas/team.schema"));
|
|
125
|
+
exports.TeamSchema = team_schema_1.default;
|
|
@@ -19,16 +19,19 @@ const aiAssistantSchema = new mongoose_1.Schema({
|
|
|
19
19
|
}, _config_1.schemaOptions);
|
|
20
20
|
aiAssistantSchema.pre('save', function (next) {
|
|
21
21
|
const user = express_http_context_1.default.get('user');
|
|
22
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
22
23
|
if (user) {
|
|
23
24
|
if (!this.createdBy)
|
|
24
25
|
this.createdBy = user._id;
|
|
25
|
-
|
|
26
|
+
if (!notUpdatedBy)
|
|
27
|
+
this.updatedBy = user._id;
|
|
26
28
|
}
|
|
27
29
|
next();
|
|
28
30
|
});
|
|
29
31
|
aiAssistantSchema.pre('findOneAndUpdate', function (next) {
|
|
30
32
|
const user = express_http_context_1.default.get('user');
|
|
31
|
-
|
|
33
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
34
|
+
if (user && !notUpdatedBy)
|
|
32
35
|
this._update.updatedBy = user._id;
|
|
33
36
|
next();
|
|
34
37
|
});
|
|
@@ -22,16 +22,19 @@ const aiConversationTrackingTaskSchema = new mongoose_1.Schema({
|
|
|
22
22
|
}, _config_1.schemaOptions);
|
|
23
23
|
aiConversationTrackingTaskSchema.pre('save', function (next) {
|
|
24
24
|
const user = express_http_context_1.default.get('user');
|
|
25
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
25
26
|
if (user) {
|
|
26
27
|
if (!this.createdBy)
|
|
27
28
|
this.createdBy = user._id;
|
|
28
|
-
|
|
29
|
+
if (!notUpdatedBy)
|
|
30
|
+
this.updatedBy = user._id;
|
|
29
31
|
}
|
|
30
32
|
next();
|
|
31
33
|
});
|
|
32
34
|
aiConversationTrackingTaskSchema.pre('findOneAndUpdate', function (next) {
|
|
33
35
|
const user = express_http_context_1.default.get('user');
|
|
34
|
-
|
|
36
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
37
|
+
if (user && !notUpdatedBy)
|
|
35
38
|
this._update.updatedBy = user._id;
|
|
36
39
|
next();
|
|
37
40
|
});
|
|
@@ -37,16 +37,19 @@ const aiConversationMessageSchema = new mongoose_1.Schema({
|
|
|
37
37
|
}, _config_1.schemaOptions);
|
|
38
38
|
aiConversationMessageSchema.pre('save', function (next) {
|
|
39
39
|
const user = express_http_context_1.default.get('user');
|
|
40
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
40
41
|
if (user) {
|
|
41
42
|
if (!this.createdBy)
|
|
42
43
|
this.createdBy = user._id;
|
|
43
|
-
|
|
44
|
+
if (!notUpdatedBy)
|
|
45
|
+
this.updatedBy = user._id;
|
|
44
46
|
}
|
|
45
47
|
next();
|
|
46
48
|
});
|
|
47
49
|
aiConversationMessageSchema.pre('findOneAndUpdate', function (next) {
|
|
48
50
|
const user = express_http_context_1.default.get('user');
|
|
49
|
-
|
|
51
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
52
|
+
if (user && !notUpdatedBy)
|
|
50
53
|
this._update.updatedBy = user._id;
|
|
51
54
|
next();
|
|
52
55
|
});
|
|
@@ -19,16 +19,19 @@ const aiConversationSchema = new mongoose_1.Schema({
|
|
|
19
19
|
}, _config_1.schemaOptions);
|
|
20
20
|
aiConversationSchema.pre('save', function (next) {
|
|
21
21
|
const user = express_http_context_1.default.get('user');
|
|
22
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
22
23
|
if (user) {
|
|
23
24
|
if (!this.createdBy)
|
|
24
25
|
this.createdBy = user._id;
|
|
25
|
-
|
|
26
|
+
if (!notUpdatedBy)
|
|
27
|
+
this.updatedBy = user._id;
|
|
26
28
|
}
|
|
27
29
|
next();
|
|
28
30
|
});
|
|
29
31
|
aiConversationSchema.pre('findOneAndUpdate', function (next) {
|
|
30
32
|
const user = express_http_context_1.default.get('user');
|
|
31
|
-
|
|
33
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
34
|
+
if (user && !notUpdatedBy)
|
|
32
35
|
this._update.updatedBy = user._id;
|
|
33
36
|
next();
|
|
34
37
|
});
|
|
@@ -23,16 +23,19 @@ const backendErrorSchema = new mongoose_1.Schema({
|
|
|
23
23
|
}, _config_1.schemaOptions);
|
|
24
24
|
backendErrorSchema.pre('save', function (next) {
|
|
25
25
|
const user = express_http_context_1.default.get('user');
|
|
26
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
26
27
|
if (user) {
|
|
27
28
|
if (!this.createdBy)
|
|
28
29
|
this.createdBy = user._id;
|
|
29
|
-
|
|
30
|
+
if (!notUpdatedBy)
|
|
31
|
+
this.updatedBy = user._id;
|
|
30
32
|
}
|
|
31
33
|
next();
|
|
32
34
|
});
|
|
33
35
|
backendErrorSchema.pre('findOneAndUpdate', function (next) {
|
|
34
36
|
const user = express_http_context_1.default.get('user');
|
|
35
|
-
|
|
37
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
38
|
+
if (user && !notUpdatedBy)
|
|
36
39
|
this._update.updatedBy = user._id;
|
|
37
40
|
next();
|
|
38
41
|
});
|
|
@@ -26,16 +26,19 @@ const badgeSchema = new mongoose_1.Schema({
|
|
|
26
26
|
}, _config_1.schemaOptions);
|
|
27
27
|
badgeSchema.pre('save', function (next) {
|
|
28
28
|
const user = express_http_context_1.default.get('user');
|
|
29
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
29
30
|
if (user) {
|
|
30
31
|
if (!this.createdBy)
|
|
31
32
|
this.createdBy = user._id;
|
|
32
|
-
|
|
33
|
+
if (!notUpdatedBy)
|
|
34
|
+
this.updatedBy = user._id;
|
|
33
35
|
}
|
|
34
36
|
next();
|
|
35
37
|
});
|
|
36
38
|
badgeSchema.pre('findOneAndUpdate', function (next) {
|
|
37
39
|
const user = express_http_context_1.default.get('user');
|
|
38
|
-
|
|
40
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
41
|
+
if (user && !notUpdatedBy)
|
|
39
42
|
this._update.updatedBy = user._id;
|
|
40
43
|
next();
|
|
41
44
|
});
|
|
@@ -20,19 +20,20 @@ const batchHistorySchema = new mongoose_1.Schema({
|
|
|
20
20
|
}, _config_1.schemaOptions);
|
|
21
21
|
batchHistorySchema.pre('save', function (next) {
|
|
22
22
|
const user = express_http_context_1.default.get('user');
|
|
23
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
23
24
|
if (user) {
|
|
24
25
|
if (!this.createdBy)
|
|
25
26
|
this.createdBy = user._id;
|
|
26
|
-
|
|
27
|
+
if (!notUpdatedBy)
|
|
28
|
+
this.updatedBy = user._id;
|
|
27
29
|
}
|
|
28
30
|
next();
|
|
29
31
|
});
|
|
30
32
|
batchHistorySchema.pre('findOneAndUpdate', function (next) {
|
|
31
33
|
const user = express_http_context_1.default.get('user');
|
|
32
|
-
|
|
34
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
35
|
+
if (user && !notUpdatedBy)
|
|
33
36
|
this._update.updatedBy = user._id;
|
|
34
|
-
this._update.documentLastUpdateDate = new Date().getTime();
|
|
35
|
-
}
|
|
36
37
|
next();
|
|
37
38
|
});
|
|
38
39
|
exports.default = batchHistorySchema;
|
|
@@ -27,16 +27,19 @@ const bookmarkSchema = new mongoose_1.Schema({
|
|
|
27
27
|
}, _config_1.schemaOptions);
|
|
28
28
|
bookmarkSchema.pre('save', function (next) {
|
|
29
29
|
const user = express_http_context_1.default.get('user');
|
|
30
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
30
31
|
if (user) {
|
|
31
32
|
if (!this.createdBy)
|
|
32
33
|
this.createdBy = user._id;
|
|
33
|
-
|
|
34
|
+
if (!notUpdatedBy)
|
|
35
|
+
this.updatedBy = user._id;
|
|
34
36
|
}
|
|
35
37
|
next();
|
|
36
38
|
});
|
|
37
39
|
bookmarkSchema.pre('findOneAndUpdate', function (next) {
|
|
38
40
|
const user = express_http_context_1.default.get('user');
|
|
39
|
-
|
|
41
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
42
|
+
if (user && !notUpdatedBy)
|
|
40
43
|
this._update.updatedBy = user._id;
|
|
41
44
|
next();
|
|
42
45
|
});
|
|
@@ -31,16 +31,19 @@ const companyClusterSchema = new mongoose_1.Schema({
|
|
|
31
31
|
}, _config_1.schemaOptions);
|
|
32
32
|
companyClusterSchema.pre('save', function (next) {
|
|
33
33
|
const user = express_http_context_1.default.get('user');
|
|
34
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
34
35
|
if (user) {
|
|
35
36
|
if (!this.createdBy)
|
|
36
37
|
this.createdBy = user._id;
|
|
37
|
-
|
|
38
|
+
if (!notUpdatedBy)
|
|
39
|
+
this.updatedBy = user._id;
|
|
38
40
|
}
|
|
39
41
|
next();
|
|
40
42
|
});
|
|
41
43
|
companyClusterSchema.pre('findOneAndUpdate', function (next) {
|
|
42
44
|
const user = express_http_context_1.default.get('user');
|
|
43
|
-
|
|
45
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
46
|
+
if (user && !notUpdatedBy)
|
|
44
47
|
this._update.updatedBy = user._id;
|
|
45
48
|
next();
|
|
46
49
|
});
|
|
@@ -25,16 +25,19 @@ const companyMarketingSchema = new mongoose_1.Schema({
|
|
|
25
25
|
}, _config_1.schemaOptions);
|
|
26
26
|
companyMarketingSchema.pre('save', function (next) {
|
|
27
27
|
const user = express_http_context_1.default.get('user');
|
|
28
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
28
29
|
if (user) {
|
|
29
30
|
if (!this.createdBy)
|
|
30
31
|
this.createdBy = user._id;
|
|
31
|
-
|
|
32
|
+
if (!notUpdatedBy)
|
|
33
|
+
this.updatedBy = user._id;
|
|
32
34
|
}
|
|
33
35
|
next();
|
|
34
36
|
});
|
|
35
37
|
companyMarketingSchema.pre('findOneAndUpdate', function (next) {
|
|
36
38
|
const user = express_http_context_1.default.get('user');
|
|
37
|
-
|
|
39
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
40
|
+
if (user && !notUpdatedBy)
|
|
38
41
|
this._update.updatedBy = user._id;
|
|
39
42
|
next();
|
|
40
43
|
});
|
|
@@ -50,10 +50,12 @@ const competitorSchema = new mongoose_1.Schema({
|
|
|
50
50
|
competitorSchema.index({ company: 1, competitor: 1 }, { unique: true });
|
|
51
51
|
competitorSchema.pre('save', function (next) {
|
|
52
52
|
const user = express_http_context_1.default.get('user');
|
|
53
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
53
54
|
if (user) {
|
|
54
55
|
if (!this.createdBy)
|
|
55
56
|
this.createdBy = user._id;
|
|
56
|
-
|
|
57
|
+
if (!notUpdatedBy)
|
|
58
|
+
this.updatedBy = user._id;
|
|
57
59
|
}
|
|
58
60
|
next();
|
|
59
61
|
});
|
|
@@ -23,16 +23,19 @@ const contactMessageSchema = new mongoose_1.Schema({
|
|
|
23
23
|
}, _config_1.schemaOptions);
|
|
24
24
|
contactMessageSchema.pre('save', function (next) {
|
|
25
25
|
const user = express_http_context_1.default.get('user');
|
|
26
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
26
27
|
if (user) {
|
|
27
28
|
if (!this.createdBy)
|
|
28
29
|
this.createdBy = user._id;
|
|
29
|
-
|
|
30
|
+
if (!notUpdatedBy)
|
|
31
|
+
this.updatedBy = user._id;
|
|
30
32
|
}
|
|
31
33
|
next();
|
|
32
34
|
});
|
|
33
35
|
contactMessageSchema.pre('findOneAndUpdate', function (next) {
|
|
34
36
|
const user = express_http_context_1.default.get('user');
|
|
35
|
-
|
|
37
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
38
|
+
if (user && !notUpdatedBy)
|
|
36
39
|
this._update.updatedBy = user._id;
|
|
37
40
|
next();
|
|
38
41
|
});
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
const mongoose_1 = require("mongoose");
|
|
7
|
+
const express_http_context_1 = __importDefault(require("express-http-context"));
|
|
4
8
|
const contact_startup_type_1 = require("../types/contact-startup.type");
|
|
5
9
|
const _config_1 = require("../config");
|
|
6
10
|
const contactStartupSchema = new mongoose_1.Schema({
|
|
@@ -25,4 +29,22 @@ const contactStartupSchema = new mongoose_1.Schema({
|
|
|
25
29
|
updatedDate: { type: Number, index: -1 },
|
|
26
30
|
createdDate: { type: Number, index: -1 },
|
|
27
31
|
}, _config_1.schemaOptions);
|
|
32
|
+
contactStartupSchema.pre('save', function (next) {
|
|
33
|
+
const user = express_http_context_1.default.get('user');
|
|
34
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
35
|
+
if (user) {
|
|
36
|
+
if (!this.createdBy)
|
|
37
|
+
this.createdBy = user._id;
|
|
38
|
+
if (!notUpdatedBy)
|
|
39
|
+
this.updatedBy = user._id;
|
|
40
|
+
}
|
|
41
|
+
next();
|
|
42
|
+
});
|
|
43
|
+
contactStartupSchema.pre('findOneAndUpdate', function (next) {
|
|
44
|
+
const user = express_http_context_1.default.get('user');
|
|
45
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
46
|
+
if (user && !notUpdatedBy)
|
|
47
|
+
this._update.updatedBy = user._id;
|
|
48
|
+
next();
|
|
49
|
+
});
|
|
28
50
|
exports.default = contactStartupSchema;
|
|
@@ -24,16 +24,19 @@ const contentSchema = new mongoose_1.Schema({
|
|
|
24
24
|
}, schemaOptions);
|
|
25
25
|
contentSchema.pre('save', function (next) {
|
|
26
26
|
const user = express_http_context_1.default.get('user');
|
|
27
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
27
28
|
if (user) {
|
|
28
29
|
if (!this.createdBy)
|
|
29
30
|
this.createdBy = user._id;
|
|
30
|
-
|
|
31
|
+
if (!notUpdatedBy)
|
|
32
|
+
this.updatedBy = user._id;
|
|
31
33
|
}
|
|
32
34
|
next();
|
|
33
35
|
});
|
|
34
36
|
contentSchema.pre('findOneAndUpdate', function (next) {
|
|
35
37
|
const user = express_http_context_1.default.get('user');
|
|
36
|
-
|
|
38
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
39
|
+
if (user && !notUpdatedBy)
|
|
37
40
|
this._update.updatedBy = user._id;
|
|
38
41
|
next();
|
|
39
42
|
});
|
|
@@ -18,16 +18,19 @@ const draftVersionSchema = new mongoose_1.Schema({
|
|
|
18
18
|
}, _config_1.schemaOptions);
|
|
19
19
|
draftVersionSchema.pre('save', function (next) {
|
|
20
20
|
const user = express_http_context_1.default.get('user');
|
|
21
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
21
22
|
if (user) {
|
|
22
23
|
if (!this.createdBy)
|
|
23
24
|
this.createdBy = user._id;
|
|
24
|
-
|
|
25
|
+
if (!notUpdatedBy)
|
|
26
|
+
this.updatedBy = user._id;
|
|
25
27
|
}
|
|
26
28
|
next();
|
|
27
29
|
});
|
|
28
30
|
draftVersionSchema.pre('findOneAndUpdate', function (next) {
|
|
29
31
|
const user = express_http_context_1.default.get('user');
|
|
30
|
-
|
|
32
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
33
|
+
if (user && !notUpdatedBy)
|
|
31
34
|
this._update.updatedBy = user._id;
|
|
32
35
|
next();
|
|
33
36
|
});
|
|
@@ -22,16 +22,19 @@ const evidenceLayoutSchema = new mongoose_1.Schema({
|
|
|
22
22
|
}, _config_1.schemaOptions);
|
|
23
23
|
evidenceLayoutSchema.pre('save', function (next) {
|
|
24
24
|
const user = express_http_context_1.default.get('user');
|
|
25
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
25
26
|
if (user) {
|
|
26
27
|
if (!this.createdBy)
|
|
27
28
|
this.createdBy = user._id;
|
|
28
|
-
|
|
29
|
+
if (!notUpdatedBy)
|
|
30
|
+
this.updatedBy = user._id;
|
|
29
31
|
}
|
|
30
32
|
next();
|
|
31
33
|
});
|
|
32
34
|
evidenceLayoutSchema.pre('findOneAndUpdate', function (next) {
|
|
33
35
|
const user = express_http_context_1.default.get('user');
|
|
34
|
-
|
|
36
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
37
|
+
if (user && !notUpdatedBy)
|
|
35
38
|
this._update.updatedBy = user._id;
|
|
36
39
|
next();
|
|
37
40
|
});
|
|
@@ -92,16 +92,19 @@ const evidenceSchema = new mongoose_1.Schema({
|
|
|
92
92
|
}, _config_1.schemaOptions);
|
|
93
93
|
evidenceSchema.pre('save', function (next) {
|
|
94
94
|
const user = express_http_context_1.default.get('user');
|
|
95
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
95
96
|
if (user) {
|
|
96
97
|
if (!this.createdBy)
|
|
97
98
|
this.createdBy = user._id;
|
|
98
|
-
|
|
99
|
+
if (!notUpdatedBy)
|
|
100
|
+
this.updatedBy = user._id;
|
|
99
101
|
}
|
|
100
102
|
next();
|
|
101
103
|
});
|
|
102
104
|
evidenceSchema.pre('findOneAndUpdate', function (next) {
|
|
103
105
|
const user = express_http_context_1.default.get('user');
|
|
104
|
-
|
|
106
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
107
|
+
if (user && !notUpdatedBy)
|
|
105
108
|
this._update.updatedBy = user._id;
|
|
106
109
|
next();
|
|
107
110
|
});
|
|
@@ -18,16 +18,19 @@ const faqSchema = new mongoose_1.Schema({
|
|
|
18
18
|
}, _config_1.schemaOptions);
|
|
19
19
|
faqSchema.pre('save', function (next) {
|
|
20
20
|
const user = express_http_context_1.default.get('user');
|
|
21
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
21
22
|
if (user) {
|
|
22
23
|
if (!this.createdBy)
|
|
23
24
|
this.createdBy = user._id;
|
|
24
|
-
|
|
25
|
+
if (!notUpdatedBy)
|
|
26
|
+
this.updatedBy = user._id;
|
|
25
27
|
}
|
|
26
28
|
next();
|
|
27
29
|
});
|
|
28
30
|
faqSchema.pre('findOneAndUpdate', function (next) {
|
|
29
31
|
const user = express_http_context_1.default.get('user');
|
|
30
|
-
|
|
32
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
33
|
+
if (user && !notUpdatedBy)
|
|
31
34
|
this._update.updatedBy = user._id;
|
|
32
35
|
next();
|
|
33
36
|
});
|
|
@@ -16,16 +16,19 @@ const featuredThemeSchema = new mongoose_1.Schema({
|
|
|
16
16
|
}, _config_1.schemaOptions);
|
|
17
17
|
featuredThemeSchema.pre('save', function (next) {
|
|
18
18
|
const user = express_http_context_1.default.get('user');
|
|
19
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
19
20
|
if (user) {
|
|
20
21
|
if (!this.createdBy)
|
|
21
22
|
this.createdBy = user._id;
|
|
22
|
-
|
|
23
|
+
if (!notUpdatedBy)
|
|
24
|
+
this.updatedBy = user._id;
|
|
23
25
|
}
|
|
24
26
|
next();
|
|
25
27
|
});
|
|
26
28
|
featuredThemeSchema.pre('findOneAndUpdate', function (next) {
|
|
27
29
|
const user = express_http_context_1.default.get('user');
|
|
28
|
-
|
|
30
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
31
|
+
if (user && !notUpdatedBy)
|
|
29
32
|
this._update.updatedBy = user._id;
|
|
30
33
|
next();
|
|
31
34
|
});
|
|
@@ -26,16 +26,19 @@ const foamTreeSchema = new mongoose_1.Schema({
|
|
|
26
26
|
}, _config_1.schemaOptions);
|
|
27
27
|
foamTreeSchema.pre('save', function (next) {
|
|
28
28
|
const user = express_http_context_1.default.get('user');
|
|
29
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
29
30
|
if (user) {
|
|
30
31
|
if (!this.createdBy)
|
|
31
32
|
this.createdBy = user._id;
|
|
32
|
-
|
|
33
|
+
if (!notUpdatedBy)
|
|
34
|
+
this.updatedBy = user._id;
|
|
33
35
|
}
|
|
34
36
|
next();
|
|
35
37
|
});
|
|
36
38
|
foamTreeSchema.pre('findOneAndUpdate', function (next) {
|
|
37
39
|
const user = express_http_context_1.default.get('user');
|
|
38
|
-
|
|
40
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
41
|
+
if (user && !notUpdatedBy)
|
|
39
42
|
this._update.updatedBy = user._id;
|
|
40
43
|
next();
|
|
41
44
|
});
|
|
@@ -20,16 +20,19 @@ const followContentSchema = new mongoose_1.Schema({
|
|
|
20
20
|
}, _config_1.schemaOptions);
|
|
21
21
|
followContentSchema.pre('save', function (next) {
|
|
22
22
|
const user = express_http_context_1.default.get('user');
|
|
23
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
23
24
|
if (user) {
|
|
24
25
|
if (!this.createdBy)
|
|
25
26
|
this.createdBy = user._id;
|
|
26
|
-
|
|
27
|
+
if (!notUpdatedBy)
|
|
28
|
+
this.updatedBy = user._id;
|
|
27
29
|
}
|
|
28
30
|
next();
|
|
29
31
|
});
|
|
30
32
|
followContentSchema.pre('findOneAndUpdate', function (next) {
|
|
31
33
|
const user = express_http_context_1.default.get('user');
|
|
32
|
-
|
|
34
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
35
|
+
if (user && !notUpdatedBy)
|
|
33
36
|
this._update.updatedBy = user._id;
|
|
34
37
|
next();
|
|
35
38
|
});
|
|
@@ -30,16 +30,19 @@ const aiIHighlightSchema = new mongoose_1.Schema({
|
|
|
30
30
|
}, _config_1.schemaOptions);
|
|
31
31
|
aiIHighlightSchema.pre('save', function (next) {
|
|
32
32
|
const user = express_http_context_1.default.get('user');
|
|
33
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
33
34
|
if (user) {
|
|
34
35
|
if (!this.createdBy)
|
|
35
36
|
this.createdBy = user._id;
|
|
36
|
-
|
|
37
|
+
if (!notUpdatedBy)
|
|
38
|
+
this.updatedBy = user._id;
|
|
37
39
|
}
|
|
38
40
|
next();
|
|
39
41
|
});
|
|
40
42
|
aiIHighlightSchema.pre('findOneAndUpdate', function (next) {
|
|
41
43
|
const user = express_http_context_1.default.get('user');
|
|
42
|
-
|
|
44
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
45
|
+
if (user && !notUpdatedBy)
|
|
43
46
|
this._update.updatedBy = user._id;
|
|
44
47
|
next();
|
|
45
48
|
});
|
|
@@ -29,16 +29,19 @@ const imageSchema = new mongoose_1.Schema({
|
|
|
29
29
|
}, _config_1.schemaOptions);
|
|
30
30
|
imageSchema.pre('save', function (next) {
|
|
31
31
|
const user = express_http_context_1.default.get('user');
|
|
32
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
32
33
|
if (user) {
|
|
33
34
|
if (!this.createdBy)
|
|
34
35
|
this.createdBy = user._id;
|
|
35
|
-
|
|
36
|
+
if (!notUpdatedBy)
|
|
37
|
+
this.updatedBy = user._id;
|
|
36
38
|
}
|
|
37
39
|
next();
|
|
38
40
|
});
|
|
39
41
|
imageSchema.pre('findOneAndUpdate', function (next) {
|
|
40
42
|
const user = express_http_context_1.default.get('user');
|
|
41
|
-
|
|
43
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
44
|
+
if (user && !notUpdatedBy)
|
|
42
45
|
this._update.updatedBy = user._id;
|
|
43
46
|
next();
|
|
44
47
|
});
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -55,4 +55,5 @@ import FeaturedThemeSchema from './featured-theme.schema';
|
|
|
55
55
|
import HighlightSchema from './highlight.schema';
|
|
56
56
|
import NewsHubSchema from './news-hub.schema';
|
|
57
57
|
import AiAssistantSchema from './ai-assistant.schema';
|
|
58
|
-
|
|
58
|
+
import TeamSchema from './team.schema';
|
|
59
|
+
export { ThemeSchema, ProblemSchema, SFTagSchema, SFCategorySchema, SFSubCategorySchema, TechnologySchema, IndustrySchema, BackendErrorSchema, EvidenceSchema, EvidenceLayoutSchema, ImageSchema, SearchHistorySchema, TokenSchema, UserTokenSchema, UserSchema, CompanySchema, PortiaArticleSchema, InstantResearchSchema, ContactMessageSchema, ContactStartupSchema, BadgeSchema, ContentSchema, FaqSchema, UseCaseSchema, NewsSchema, LikeSchema, SparkSchema, SparkUseCaseSchema, FollowContentSchema, SiteMapCacheSchema, GeneralConfigSchema, GeneralConfigSubSchema, DraftVersionSchema, NotificationSchema, OtpSchema, SuggestSchema, UserVisitSchema, CompetitorSchema, CompanyFundingRoundSchema, BookmarkSchema, AiConversationSchema, AiConversationMessageSchema, AiConversationTrackingTaskSchema, BatchHistorySchema, CompanyClusterSchema, CompanyMarketingSchema, InvestorSchema, RelatedThemeSchema, StartupVectorAnyEntitySchema, UpdateJobSchema, UseCaseDiscoverySchema, UseCaseDiscoveryProblemSchema, CompetitorAnalysisSchema, FeaturedThemeSchema, HighlightSchema, NewsHubSchema, AiAssistantSchema, TeamSchema, };
|
package/dist/schemas/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.UpdateJobSchema = exports.StartupVectorAnyEntitySchema = exports.RelatedThemeSchema = exports.InvestorSchema = exports.CompanyMarketingSchema = exports.CompanyClusterSchema = exports.BatchHistorySchema = exports.AiConversationTrackingTaskSchema = exports.AiConversationMessageSchema = exports.AiConversationSchema = exports.BookmarkSchema = exports.CompanyFundingRoundSchema = exports.CompetitorSchema = exports.UserVisitSchema = exports.SuggestSchema = exports.OtpSchema = exports.NotificationSchema = exports.DraftVersionSchema = exports.GeneralConfigSubSchema = exports.GeneralConfigSchema = exports.SiteMapCacheSchema = exports.FollowContentSchema = exports.SparkUseCaseSchema = exports.SparkSchema = exports.LikeSchema = exports.NewsSchema = exports.UseCaseSchema = exports.FaqSchema = exports.ContentSchema = exports.BadgeSchema = exports.ContactStartupSchema = exports.ContactMessageSchema = exports.InstantResearchSchema = exports.PortiaArticleSchema = exports.CompanySchema = exports.UserSchema = exports.UserTokenSchema = exports.TokenSchema = exports.SearchHistorySchema = exports.ImageSchema = exports.EvidenceLayoutSchema = exports.EvidenceSchema = exports.BackendErrorSchema = exports.IndustrySchema = exports.TechnologySchema = exports.SFSubCategorySchema = exports.SFCategorySchema = exports.SFTagSchema = exports.ProblemSchema = exports.ThemeSchema = void 0;
|
|
7
|
-
exports.AiAssistantSchema = exports.NewsHubSchema = exports.HighlightSchema = exports.FeaturedThemeSchema = exports.CompetitorAnalysisSchema = exports.UseCaseDiscoveryProblemSchema = exports.UseCaseDiscoverySchema = void 0;
|
|
7
|
+
exports.TeamSchema = exports.AiAssistantSchema = exports.NewsHubSchema = exports.HighlightSchema = exports.FeaturedThemeSchema = exports.CompetitorAnalysisSchema = exports.UseCaseDiscoveryProblemSchema = exports.UseCaseDiscoverySchema = void 0;
|
|
8
8
|
const theme_schema_1 = __importDefault(require("./theme.schema"));
|
|
9
9
|
exports.ThemeSchema = theme_schema_1.default;
|
|
10
10
|
const problem_schema_1 = __importDefault(require("./problem.schema"));
|
|
@@ -119,3 +119,5 @@ const news_hub_schema_1 = __importDefault(require("./news-hub.schema"));
|
|
|
119
119
|
exports.NewsHubSchema = news_hub_schema_1.default;
|
|
120
120
|
const ai_assistant_schema_1 = __importDefault(require("./ai-assistant.schema"));
|
|
121
121
|
exports.AiAssistantSchema = ai_assistant_schema_1.default;
|
|
122
|
+
const team_schema_1 = __importDefault(require("./team.schema"));
|
|
123
|
+
exports.TeamSchema = team_schema_1.default;
|
|
@@ -17,16 +17,19 @@ const industrySchema = new mongoose_1.Schema({
|
|
|
17
17
|
}, _config_1.schemaOptions);
|
|
18
18
|
industrySchema.pre('save', function (next) {
|
|
19
19
|
const user = express_http_context_1.default.get('user');
|
|
20
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
20
21
|
if (user) {
|
|
21
22
|
if (!this.createdBy)
|
|
22
23
|
this.createdBy = user._id;
|
|
23
|
-
|
|
24
|
+
if (!notUpdatedBy)
|
|
25
|
+
this.updatedBy = user._id;
|
|
24
26
|
}
|
|
25
27
|
next();
|
|
26
28
|
});
|
|
27
29
|
industrySchema.pre('findOneAndUpdate', function (next) {
|
|
28
30
|
const user = express_http_context_1.default.get('user');
|
|
29
|
-
|
|
31
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
32
|
+
if (user && !notUpdatedBy)
|
|
30
33
|
this._update.updatedBy = user._id;
|
|
31
34
|
next();
|
|
32
35
|
});
|
|
@@ -27,16 +27,19 @@ const likeSchema = new mongoose_1.Schema({
|
|
|
27
27
|
}, _config_1.schemaOptions);
|
|
28
28
|
likeSchema.pre('save', function (next) {
|
|
29
29
|
const user = express_http_context_1.default.get('user');
|
|
30
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
30
31
|
if (user) {
|
|
31
32
|
if (!this.createdBy)
|
|
32
33
|
this.createdBy = user._id;
|
|
33
|
-
|
|
34
|
+
if (!notUpdatedBy)
|
|
35
|
+
this.updatedBy = user._id;
|
|
34
36
|
}
|
|
35
37
|
next();
|
|
36
38
|
});
|
|
37
39
|
likeSchema.pre('findOneAndUpdate', function (next) {
|
|
38
40
|
const user = express_http_context_1.default.get('user');
|
|
39
|
-
|
|
41
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
42
|
+
if (user && !notUpdatedBy)
|
|
40
43
|
this._update.updatedBy = user._id;
|
|
41
44
|
next();
|
|
42
45
|
});
|
|
@@ -16,16 +16,19 @@ const relatedThemeSchema = new mongoose_1.Schema({
|
|
|
16
16
|
}, _config_1.schemaOptions);
|
|
17
17
|
relatedThemeSchema.pre('save', function (next) {
|
|
18
18
|
const user = express_http_context_1.default.get('user');
|
|
19
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
19
20
|
if (user) {
|
|
20
21
|
if (!this.createdBy)
|
|
21
22
|
this.createdBy = user._id;
|
|
22
|
-
|
|
23
|
+
if (!notUpdatedBy)
|
|
24
|
+
this.updatedBy = user._id;
|
|
23
25
|
}
|
|
24
26
|
next();
|
|
25
27
|
});
|
|
26
28
|
relatedThemeSchema.pre('findOneAndUpdate', function (next) {
|
|
27
29
|
const user = express_http_context_1.default.get('user');
|
|
28
|
-
|
|
30
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
31
|
+
if (user && !notUpdatedBy)
|
|
29
32
|
this._update.updatedBy = user._id;
|
|
30
33
|
next();
|
|
31
34
|
});
|
|
@@ -23,16 +23,19 @@ const searchHistorySchema = new mongoose_1.Schema({
|
|
|
23
23
|
}, _config_1.schemaOptions);
|
|
24
24
|
searchHistorySchema.pre('save', function (next) {
|
|
25
25
|
const user = express_http_context_1.default.get('user');
|
|
26
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
26
27
|
if (user) {
|
|
27
28
|
if (!this.createdBy)
|
|
28
29
|
this.createdBy = user._id;
|
|
29
|
-
|
|
30
|
+
if (!notUpdatedBy)
|
|
31
|
+
this.updatedBy = user._id;
|
|
30
32
|
}
|
|
31
33
|
next();
|
|
32
34
|
});
|
|
33
35
|
searchHistorySchema.pre('findOneAndUpdate', function (next) {
|
|
34
36
|
const user = express_http_context_1.default.get('user');
|
|
35
|
-
|
|
37
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
38
|
+
if (user && !notUpdatedBy)
|
|
36
39
|
this._update.updatedBy = user._id;
|
|
37
40
|
next();
|
|
38
41
|
});
|
|
@@ -19,16 +19,19 @@ const sfCategorySchema = new mongoose_1.Schema({
|
|
|
19
19
|
}, _config_1.schemaOptions);
|
|
20
20
|
sfCategorySchema.pre('save', function (next) {
|
|
21
21
|
const user = express_http_context_1.default.get('user');
|
|
22
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
22
23
|
if (user) {
|
|
23
24
|
if (!this.createdBy)
|
|
24
25
|
this.createdBy = user._id;
|
|
25
|
-
|
|
26
|
+
if (!notUpdatedBy)
|
|
27
|
+
this.updatedBy = user._id;
|
|
26
28
|
}
|
|
27
29
|
next();
|
|
28
30
|
});
|
|
29
31
|
sfCategorySchema.pre('findOneAndUpdate', function (next) {
|
|
30
32
|
const user = express_http_context_1.default.get('user');
|
|
31
|
-
|
|
33
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
34
|
+
if (user && !notUpdatedBy)
|
|
32
35
|
this._update.updatedBy = user._id;
|
|
33
36
|
next();
|
|
34
37
|
});
|
|
@@ -18,16 +18,19 @@ const sfSubCategorySchema = new mongoose_1.Schema({
|
|
|
18
18
|
}, _config_1.schemaOptions);
|
|
19
19
|
sfSubCategorySchema.pre('save', function (next) {
|
|
20
20
|
const user = express_http_context_1.default.get('user');
|
|
21
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
21
22
|
if (user) {
|
|
22
23
|
if (!this.createdBy)
|
|
23
24
|
this.createdBy = user._id;
|
|
24
|
-
|
|
25
|
+
if (!notUpdatedBy)
|
|
26
|
+
this.updatedBy = user._id;
|
|
25
27
|
}
|
|
26
28
|
next();
|
|
27
29
|
});
|
|
28
30
|
sfSubCategorySchema.pre('findOneAndUpdate', function (next) {
|
|
29
31
|
const user = express_http_context_1.default.get('user');
|
|
30
|
-
|
|
32
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
33
|
+
if (user && !notUpdatedBy)
|
|
31
34
|
this._update.updatedBy = user._id;
|
|
32
35
|
next();
|
|
33
36
|
});
|
|
@@ -17,16 +17,19 @@ const sfTagSchema = new mongoose_1.Schema({
|
|
|
17
17
|
}, _config_1.schemaOptions);
|
|
18
18
|
sfTagSchema.pre('save', function (next) {
|
|
19
19
|
const user = express_http_context_1.default.get('user');
|
|
20
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
20
21
|
if (user) {
|
|
21
22
|
if (!this.createdBy)
|
|
22
23
|
this.createdBy = user._id;
|
|
23
|
-
|
|
24
|
+
if (!notUpdatedBy)
|
|
25
|
+
this.updatedBy = user._id;
|
|
24
26
|
}
|
|
25
27
|
next();
|
|
26
28
|
});
|
|
27
29
|
sfTagSchema.pre('findOneAndUpdate', function (next) {
|
|
28
30
|
const user = express_http_context_1.default.get('user');
|
|
29
|
-
|
|
31
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
32
|
+
if (user && !notUpdatedBy)
|
|
30
33
|
this._update.updatedBy = user._id;
|
|
31
34
|
next();
|
|
32
35
|
});
|
|
@@ -71,16 +71,19 @@ const sparkUseCaseSchema = new mongoose_1.Schema({
|
|
|
71
71
|
}, _config_1.schemaOptions);
|
|
72
72
|
sparkUseCaseSchema.pre('save', function (next) {
|
|
73
73
|
const user = express_http_context_1.default.get('user');
|
|
74
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
74
75
|
if (user) {
|
|
75
76
|
if (!this.createdBy)
|
|
76
77
|
this.createdBy = user._id;
|
|
77
|
-
|
|
78
|
+
if (!notUpdatedBy)
|
|
79
|
+
this.updatedBy = user._id;
|
|
78
80
|
}
|
|
79
81
|
next();
|
|
80
82
|
});
|
|
81
83
|
sparkUseCaseSchema.pre('findOneAndUpdate', function (next) {
|
|
82
84
|
const user = express_http_context_1.default.get('user');
|
|
83
|
-
|
|
85
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
86
|
+
if (user && !notUpdatedBy)
|
|
84
87
|
this._update.updatedBy = user._id;
|
|
85
88
|
next();
|
|
86
89
|
});
|
|
@@ -23,16 +23,19 @@ const startupAnyEntitySchema = new mongoose_1.Schema({
|
|
|
23
23
|
}, _config_1.schemaOptions);
|
|
24
24
|
startupAnyEntitySchema.pre('save', function (next) {
|
|
25
25
|
const user = express_http_context_1.default.get('user');
|
|
26
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
26
27
|
if (user) {
|
|
27
28
|
if (!this.createdBy)
|
|
28
29
|
this.createdBy = user._id;
|
|
29
|
-
|
|
30
|
+
if (!notUpdatedBy)
|
|
31
|
+
this.updatedBy = user._id;
|
|
30
32
|
}
|
|
31
33
|
next();
|
|
32
34
|
});
|
|
33
35
|
startupAnyEntitySchema.pre('findOneAndUpdate', function (next) {
|
|
34
36
|
const user = express_http_context_1.default.get('user');
|
|
35
|
-
|
|
37
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
38
|
+
if (user && !notUpdatedBy)
|
|
36
39
|
this._update.updatedBy = user._id;
|
|
37
40
|
next();
|
|
38
41
|
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
import { Schema } from 'mongoose';
|
|
26
|
+
import { ITeam, ITeamModel } from '../types';
|
|
27
|
+
declare const teamSchema: Schema<ITeam, ITeamModel, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ITeam>;
|
|
28
|
+
export default teamSchema;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const mongoose_1 = require("mongoose");
|
|
7
|
+
const express_http_context_1 = __importDefault(require("express-http-context"));
|
|
8
|
+
const _config_1 = require("../config");
|
|
9
|
+
const team_type_1 = require("../types/team.type");
|
|
10
|
+
const teamSchema = new mongoose_1.Schema({
|
|
11
|
+
name: { type: String, required: true },
|
|
12
|
+
company: { type: mongoose_1.Schema.Types.ObjectId, ref: 'Company', required: true },
|
|
13
|
+
user: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', required: true },
|
|
14
|
+
logo: { type: mongoose_1.Schema.Types.ObjectId, ref: 'Image', default: null },
|
|
15
|
+
plan: { type: String, enum: Object.values(team_type_1.Plan), required: true },
|
|
16
|
+
maxSize: { type: Number },
|
|
17
|
+
createdBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
|
|
18
|
+
updatedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
|
|
19
|
+
updatedDate: Number,
|
|
20
|
+
createdDate: Number,
|
|
21
|
+
}, _config_1.schemaOptions);
|
|
22
|
+
teamSchema.pre('save', function (next) {
|
|
23
|
+
const user = express_http_context_1.default.get('user');
|
|
24
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
25
|
+
if (user) {
|
|
26
|
+
if (!this.createdBy)
|
|
27
|
+
this.createdBy = user._id;
|
|
28
|
+
if (!notUpdatedBy)
|
|
29
|
+
this.updatedBy = user._id;
|
|
30
|
+
}
|
|
31
|
+
next();
|
|
32
|
+
});
|
|
33
|
+
teamSchema.pre('findOneAndUpdate', function (next) {
|
|
34
|
+
const user = express_http_context_1.default.get('user');
|
|
35
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
36
|
+
if (user && !notUpdatedBy)
|
|
37
|
+
this._update.updatedBy = user._id;
|
|
38
|
+
next();
|
|
39
|
+
});
|
|
40
|
+
exports.default = teamSchema;
|
|
@@ -17,16 +17,19 @@ const technologySchema = new mongoose_1.Schema({
|
|
|
17
17
|
}, _config_1.schemaOptions);
|
|
18
18
|
technologySchema.pre('save', function (next) {
|
|
19
19
|
const user = express_http_context_1.default.get('user');
|
|
20
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
20
21
|
if (user) {
|
|
21
22
|
if (!this.createdBy)
|
|
22
23
|
this.createdBy = user._id;
|
|
23
|
-
|
|
24
|
+
if (!notUpdatedBy)
|
|
25
|
+
this.updatedBy = user._id;
|
|
24
26
|
}
|
|
25
27
|
next();
|
|
26
28
|
});
|
|
27
29
|
technologySchema.pre('findOneAndUpdate', function (next) {
|
|
28
30
|
const user = express_http_context_1.default.get('user');
|
|
29
|
-
|
|
31
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
32
|
+
if (user && !notUpdatedBy)
|
|
30
33
|
this._update.updatedBy = user._id;
|
|
31
34
|
next();
|
|
32
35
|
});
|
|
@@ -16,16 +16,19 @@ const useCaseDiscoveryProblemSchema = new mongoose_1.Schema({
|
|
|
16
16
|
}, _config_1.schemaOptions);
|
|
17
17
|
useCaseDiscoveryProblemSchema.pre('save', function (next) {
|
|
18
18
|
const user = express_http_context_1.default.get('user');
|
|
19
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
19
20
|
if (user) {
|
|
20
21
|
if (!this.createdBy)
|
|
21
22
|
this.createdBy = user._id;
|
|
22
|
-
|
|
23
|
+
if (!notUpdatedBy)
|
|
24
|
+
this.updatedBy = user._id;
|
|
23
25
|
}
|
|
24
26
|
next();
|
|
25
27
|
});
|
|
26
28
|
useCaseDiscoveryProblemSchema.pre('findOneAndUpdate', function (next) {
|
|
27
29
|
const user = express_http_context_1.default.get('user');
|
|
28
|
-
|
|
30
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
31
|
+
if (user && !notUpdatedBy)
|
|
29
32
|
this._update.updatedBy = user._id;
|
|
30
33
|
next();
|
|
31
34
|
});
|
|
@@ -33,16 +33,19 @@ const useCaseDiscoverySchema = new mongoose_1.Schema({
|
|
|
33
33
|
}, _config_1.schemaOptions);
|
|
34
34
|
useCaseDiscoverySchema.pre('save', function (next) {
|
|
35
35
|
const user = express_http_context_1.default.get('user');
|
|
36
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
36
37
|
if (user) {
|
|
37
38
|
if (!this.createdBy)
|
|
38
39
|
this.createdBy = user._id;
|
|
39
|
-
|
|
40
|
+
if (!notUpdatedBy)
|
|
41
|
+
this.updatedBy = user._id;
|
|
40
42
|
}
|
|
41
43
|
next();
|
|
42
44
|
});
|
|
43
45
|
useCaseDiscoverySchema.pre('findOneAndUpdate', function (next) {
|
|
44
46
|
const user = express_http_context_1.default.get('user');
|
|
45
|
-
|
|
47
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
48
|
+
if (user && !notUpdatedBy)
|
|
46
49
|
this._update.updatedBy = user._id;
|
|
47
50
|
next();
|
|
48
51
|
});
|
|
@@ -79,16 +79,19 @@ const useCaseSchema = new mongoose_1.Schema({
|
|
|
79
79
|
}, _config_1.schemaOptions);
|
|
80
80
|
useCaseSchema.pre('save', function (next) {
|
|
81
81
|
const user = express_http_context_1.default.get('user');
|
|
82
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
82
83
|
if (user) {
|
|
83
84
|
if (!this.createdBy)
|
|
84
85
|
this.createdBy = user._id;
|
|
85
|
-
|
|
86
|
+
if (!notUpdatedBy)
|
|
87
|
+
this.updatedBy = user._id;
|
|
86
88
|
}
|
|
87
89
|
next();
|
|
88
90
|
});
|
|
89
91
|
useCaseSchema.pre('findOneAndUpdate', function (next) {
|
|
90
92
|
const user = express_http_context_1.default.get('user');
|
|
91
|
-
|
|
93
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
94
|
+
if (user && !notUpdatedBy)
|
|
92
95
|
this._update.updatedBy = user._id;
|
|
93
96
|
next();
|
|
94
97
|
});
|
|
@@ -16,16 +16,19 @@ const userTokenSchema = new mongoose_1.Schema({
|
|
|
16
16
|
}, _config_1.schemaOptions);
|
|
17
17
|
userTokenSchema.pre('save', function (next) {
|
|
18
18
|
const user = express_http_context_1.default.get('user');
|
|
19
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
19
20
|
if (user) {
|
|
20
21
|
if (!this.createdBy)
|
|
21
22
|
this.createdBy = user._id;
|
|
22
|
-
|
|
23
|
+
if (!notUpdatedBy)
|
|
24
|
+
this.updatedBy = user._id;
|
|
23
25
|
}
|
|
24
26
|
next();
|
|
25
27
|
});
|
|
26
28
|
userTokenSchema.pre('findOneAndUpdate', function (next) {
|
|
27
29
|
const user = express_http_context_1.default.get('user');
|
|
28
|
-
|
|
30
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
31
|
+
if (user && !notUpdatedBy)
|
|
29
32
|
this._update.updatedBy = user._id;
|
|
30
33
|
next();
|
|
31
34
|
});
|
|
@@ -18,16 +18,19 @@ const userVisitSchema = new mongoose_1.Schema({
|
|
|
18
18
|
}, _config_1.schemaOptions);
|
|
19
19
|
userVisitSchema.pre('save', function (next) {
|
|
20
20
|
const user = express_http_context_1.default.get('user');
|
|
21
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
21
22
|
if (user) {
|
|
22
23
|
if (!this.createdBy)
|
|
23
24
|
this.createdBy = user._id;
|
|
24
|
-
|
|
25
|
+
if (!notUpdatedBy)
|
|
26
|
+
this.updatedBy = user._id;
|
|
25
27
|
}
|
|
26
28
|
next();
|
|
27
29
|
});
|
|
28
30
|
userVisitSchema.pre('findOneAndUpdate', function (next) {
|
|
29
31
|
const user = express_http_context_1.default.get('user');
|
|
30
|
-
|
|
32
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
33
|
+
if (user && !notUpdatedBy)
|
|
31
34
|
this._update.updatedBy = user._id;
|
|
32
35
|
next();
|
|
33
36
|
});
|
|
@@ -64,10 +64,12 @@ userSchema.pre('save', function (next) {
|
|
|
64
64
|
if (this.email)
|
|
65
65
|
this.email = this.email.toLowerCase();
|
|
66
66
|
const user = express_http_context_1.default.get('user');
|
|
67
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
67
68
|
if (user) {
|
|
68
69
|
if (!this.createdBy)
|
|
69
70
|
this.createdBy = user._id;
|
|
70
|
-
|
|
71
|
+
if (!notUpdatedBy)
|
|
72
|
+
this.updatedBy = user._id;
|
|
71
73
|
}
|
|
72
74
|
next();
|
|
73
75
|
});
|
package/dist/types/index.d.ts
CHANGED
|
@@ -57,4 +57,5 @@ import { IAiConversationTrackingTask, IAiConversationTrackingTaskModel } from '.
|
|
|
57
57
|
import { IHighlight, IHighlightModel } from './highlight.type';
|
|
58
58
|
import { INewsHub, INewsHubModel } from './news-hub.type';
|
|
59
59
|
import { IAiAssistant, IAiAssistantModel } from './ai-assistant.type';
|
|
60
|
-
|
|
60
|
+
import { ITeam, ITeamModel } from './team.type';
|
|
61
|
+
export { IAiConversation, IAiConversationModel, IAiAssistant, IAiAssistantModel, IAiConversationMessage, IAiConversationMessageModel, IAiConversationTrackingTask, IAiConversationTrackingTaskModel, IBackendError, IBackendErrorModel, IBadge, IBadgeModel, IBatchHistory, IBookmark, IBookmarkModel, ICompany, ICompanyModel, ICompanyCluster, ICompanyClusterModel, ICompanyFundingRound, ICompanyFundingRoundModel, ICompanyMarketing, ICompanyMarketingModel, ICompetitor, ICompetitorModel, ICompetitorAnalysis, ICompetitorAnalysisModel, IContactMessage, IContactMessageModel, IContactStartup, IContactStartupModel, IContent, IContentModel, IDraftVersion, IDraftVersionModel, IEvidenceLayout, IEvidenceLayoutModel, IEvidence, IEvidenceModel, IFaq, IFaqModel, IFeaturedTheme, IFeaturedThemeModel, IFoamTree, IFoamTreeModel, IFollowContent, IFollowContentModel, IGeneralConfigSub, IGeneralConfigSubModel, IGeneralConfig, IGeneralConfigModel, IImage, IImageModel, IIndustry, IIndustryModel, IInstantResearch, IInstantResearchModel, IInvestor, IInvestorModel, ILike, ILikeModel, INews, INewsModel, INotification, INotificationModel, IOtp, IOtpModel, IPortiaArticle, IPortiaArticleModel, IProblem, IProblemModel, IRelatedTheme, IRelatedThemeModel, ISearchHistory, ISearchHistoryModel, ISFCategory, ISFCategoryModel, ISFSubCategory, ISFSubCategoryModel, ISFTag, ISFTagModel, ISiteMapCache, ISiteMapCacheModel, ISparkUseCase, ISparkUseCaseModel, ISpark, ISparkModel, IStartupVectorAnyEntity, IStartupVectorAnyEntityModel, ISuggest, ISuggestModel, ITechnology, ITechnologyModel, ITheme, IThemeModel, IToken, ITokenModel, IUpdateJob, IUpdateJobModel, IUseCaseDiscovery, IUseCaseDiscoveryModel, IUseCaseDiscoveryProblem, IUseCaseDiscoveryProblemModel, IUseCase, IUseCaseModel, IUserToken, IUserTokenModel, IUserVisit, IUserVisitModel, IUser, IUserModel, ICompetitorGrid, ICompetitorGridModel, AIStatus, IHighlight, IHighlightModel, INewsHub, INewsHubModel, ITeam, ITeamModel, };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
import { Types } from 'mongoose';
|
|
26
|
+
import { ICompany, IImage, IUser } from './';
|
|
27
|
+
import { BaseModel, BaseSchema } from '../config';
|
|
28
|
+
export declare enum Plan {
|
|
29
|
+
PRO = "pro",
|
|
30
|
+
TRIAL = "trial"
|
|
31
|
+
}
|
|
32
|
+
export interface ITeam extends BaseSchema {
|
|
33
|
+
name: string;
|
|
34
|
+
company: Types.ObjectId | ICompany;
|
|
35
|
+
user: Types.ObjectId | IUser;
|
|
36
|
+
logo: Types.ObjectId | IImage;
|
|
37
|
+
plan: Plan;
|
|
38
|
+
maxSize: number;
|
|
39
|
+
}
|
|
40
|
+
export interface ITeamModel extends BaseModel<ITeam> {
|
|
41
|
+
}
|