@cool-digital-solutions/interferir-models 1.0.48 → 1.0.49
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 +4 -2
- package/dist/index.js +3 -1
- package/dist/schemas/featured-theme.schema.d.ts +28 -0
- package/dist/schemas/featured-theme.schema.js +32 -0
- package/dist/schemas/index.d.ts +2 -1
- package/dist/schemas/index.js +3 -1
- package/dist/types/featured-theme.type.d.ts +9 -0
- package/dist/types/featured-theme.type.js +2 -0
- package/dist/types/index.d.ts +3 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ import { IDraftVersion, IDraftVersionModel } from './types/draft-version.type';
|
|
|
16
16
|
import { IEvidenceLayout, IEvidenceLayoutModel } from './types/evidence-layout.type';
|
|
17
17
|
import { IEvidence, IEvidenceModel } from './types/evidence.type';
|
|
18
18
|
import { IFaq, IFaqModel } from './types/faq.type';
|
|
19
|
+
import { IFeaturedTheme, IFeaturedThemeModel } from './types/featured-theme.type';
|
|
19
20
|
import { IFollowContent, IFollowContentModel } from './types/follow-content.type';
|
|
20
21
|
import { IGeneralConfigSub, IGeneralConfigSubModel } from './types/general-config-sub.type';
|
|
21
22
|
import { IGeneralConfig, IGeneralConfigModel } from './types/general-config.type';
|
|
@@ -101,5 +102,6 @@ import UseCaseDiscoverySchema from './schemas/use-case-discovery.schema';
|
|
|
101
102
|
import UseCaseDiscoveryProblemSchema from './schemas/use-case-discovery-problem.schema';
|
|
102
103
|
import CompetitorAnalysisSchema from './schemas/competitor-analysis.schema';
|
|
103
104
|
import FoamTreeSchema from './schemas/foam-tree.schema';
|
|
104
|
-
|
|
105
|
-
export {
|
|
105
|
+
import FeaturedThemeSchema from './schemas/featured-theme.schema';
|
|
106
|
+
export { IAiConversation, IAiConversationModel, 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, };
|
|
107
|
+
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, CompanyClusterSchema, CompanyMarketingSchema, InvestorSchema, RelatedThemeSchema, StartupVectorAnyEntitySchema, UpdateJobSchema, UseCaseDiscoverySchema, UseCaseDiscoveryProblemSchema, CompetitorAnalysisSchema, FoamTreeSchema, FeaturedThemeSchema, };
|
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.CompetitorAnalysisSchema = exports.UseCaseDiscoveryProblemSchema = exports.UseCaseDiscoverySchema = exports.UpdateJobSchema = exports.StartupVectorAnyEntitySchema = exports.RelatedThemeSchema = exports.InvestorSchema = exports.CompanyMarketingSchema = exports.CompanyClusterSchema = 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.FoamTreeSchema = void 0;
|
|
7
|
+
exports.FeaturedThemeSchema = exports.FoamTreeSchema = 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"));
|
|
@@ -107,3 +107,5 @@ const competitor_analysis_schema_1 = __importDefault(require("./schemas/competit
|
|
|
107
107
|
exports.CompetitorAnalysisSchema = competitor_analysis_schema_1.default;
|
|
108
108
|
const foam_tree_schema_1 = __importDefault(require("./schemas/foam-tree.schema"));
|
|
109
109
|
exports.FoamTreeSchema = foam_tree_schema_1.default;
|
|
110
|
+
const featured_theme_schema_1 = __importDefault(require("./schemas/featured-theme.schema"));
|
|
111
|
+
exports.FeaturedThemeSchema = featured_theme_schema_1.default;
|
|
@@ -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 { IFeaturedTheme, IFeaturedThemeModel } from 'src/types/featured-theme.type';
|
|
27
|
+
declare const featuredThemeSchema: Schema<IFeaturedTheme, IFeaturedThemeModel, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IFeaturedTheme>;
|
|
28
|
+
export default featuredThemeSchema;
|
|
@@ -0,0 +1,32 @@
|
|
|
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 featuredThemeSchema = new mongoose_1.Schema({
|
|
10
|
+
user: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
|
|
11
|
+
theme: { type: mongoose_1.Schema.Types.ObjectId, ref: 'Theme', default: null },
|
|
12
|
+
createdBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
|
|
13
|
+
updatedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
|
|
14
|
+
updatedDate: { type: Number, index: -1 },
|
|
15
|
+
createdDate: { type: Number, index: -1 },
|
|
16
|
+
}, _config_1.schemaOptions);
|
|
17
|
+
featuredThemeSchema.pre('save', function (next) {
|
|
18
|
+
const user = express_http_context_1.default.get('user');
|
|
19
|
+
if (user) {
|
|
20
|
+
if (!this.createdBy)
|
|
21
|
+
this.createdBy = user._id;
|
|
22
|
+
this.updatedBy = user._id;
|
|
23
|
+
}
|
|
24
|
+
next();
|
|
25
|
+
});
|
|
26
|
+
featuredThemeSchema.pre('findOneAndUpdate', function (next) {
|
|
27
|
+
const user = express_http_context_1.default.get('user');
|
|
28
|
+
if (user)
|
|
29
|
+
this._update.updatedBy = user._id;
|
|
30
|
+
next();
|
|
31
|
+
});
|
|
32
|
+
exports.default = featuredThemeSchema;
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -49,4 +49,5 @@ import UpdateJobSchema from './update-job.schema';
|
|
|
49
49
|
import UseCaseDiscoverySchema from './use-case-discovery.schema';
|
|
50
50
|
import UseCaseDiscoveryProblemSchema from './use-case-discovery-problem.schema';
|
|
51
51
|
import CompetitorAnalysisSchema from './competitor-analysis.schema';
|
|
52
|
-
|
|
52
|
+
import FeaturedThemeSchema from './featured-theme.schema';
|
|
53
|
+
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, BatchHistorySchema, CompanyClusterSchema, CompanyMarketingSchema, InvestorSchema, RelatedThemeSchema, StartupVectorAnyEntitySchema, UpdateJobSchema, UseCaseDiscoverySchema, UseCaseDiscoveryProblemSchema, CompetitorAnalysisSchema, FeaturedThemeSchema, };
|
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.UseCaseDiscoveryProblemSchema = exports.UseCaseDiscoverySchema = exports.UpdateJobSchema = exports.StartupVectorAnyEntitySchema = exports.RelatedThemeSchema = exports.InvestorSchema = exports.CompanyMarketingSchema = exports.CompanyClusterSchema = exports.BatchHistorySchema = 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.CompetitorAnalysisSchema = void 0;
|
|
7
|
+
exports.FeaturedThemeSchema = exports.CompetitorAnalysisSchema = 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"));
|
|
@@ -107,3 +107,5 @@ const use_case_discovery_problem_schema_1 = __importDefault(require("./use-case-
|
|
|
107
107
|
exports.UseCaseDiscoveryProblemSchema = use_case_discovery_problem_schema_1.default;
|
|
108
108
|
const competitor_analysis_schema_1 = __importDefault(require("./competitor-analysis.schema"));
|
|
109
109
|
exports.CompetitorAnalysisSchema = competitor_analysis_schema_1.default;
|
|
110
|
+
const featured_theme_schema_1 = __importDefault(require("./featured-theme.schema"));
|
|
111
|
+
exports.FeaturedThemeSchema = featured_theme_schema_1.default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseModel, BaseSchema } from '../config';
|
|
2
|
+
import { IUser } from './user.type';
|
|
3
|
+
import { ITheme } from './theme.type';
|
|
4
|
+
export interface IFeaturedTheme extends BaseSchema {
|
|
5
|
+
user: IUser;
|
|
6
|
+
theme: ITheme;
|
|
7
|
+
}
|
|
8
|
+
export interface IFeaturedThemeModel extends BaseModel<IFeaturedTheme> {
|
|
9
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ import { IDraftVersion, IDraftVersionModel } from './draft-version.type';
|
|
|
16
16
|
import { IEvidenceLayout, IEvidenceLayoutModel } from './evidence-layout.type';
|
|
17
17
|
import { IEvidence, IEvidenceModel } from './evidence.type';
|
|
18
18
|
import { IFaq, IFaqModel } from './faq.type';
|
|
19
|
+
import { IFeaturedTheme, IFeaturedThemeModel } from './featured-theme.type';
|
|
20
|
+
import { IFoamTree, IFoamTreeModel } from './foam-tree.type';
|
|
19
21
|
import { IFollowContent, IFollowContentModel } from './follow-content.type';
|
|
20
22
|
import { IGeneralConfigSub, IGeneralConfigSubModel } from './general-config-sub.type';
|
|
21
23
|
import { IGeneralConfig, IGeneralConfigModel } from './general-config.type';
|
|
@@ -49,5 +51,4 @@ import { IUseCase, IUseCaseModel } from './use-case.type';
|
|
|
49
51
|
import { IUserToken, IUserTokenModel } from './user-token.type';
|
|
50
52
|
import { IUserVisit, IUserVisitModel } from './user-visit.type';
|
|
51
53
|
import { IUser, IUserModel } from './user.type';
|
|
52
|
-
|
|
53
|
-
export { IAiConversation, IAiConversationModel, 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, 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, IFoamTree, IFoamTreeModel, };
|
|
54
|
+
export { IAiConversation, IAiConversationModel, 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, };
|