@cool-digital-solutions/interferir-models 1.0.28 → 1.0.30
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 -0
- package/dist/schemas/company.schema.js +1 -0
- package/dist/schemas/foam-tree.schema.d.ts +28 -0
- package/dist/schemas/foam-tree.schema.js +42 -0
- package/dist/types/company.type.d.ts +2 -1
- package/dist/types/foam-tree.type.d.ts +79 -0
- package/dist/types/foam-tree.type.js +14 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/use-case.type.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -49,6 +49,7 @@ import { IUseCaseDiscoveryProblem, IUseCaseDiscoveryProblemModel } from './types
|
|
|
49
49
|
import { IUserToken, IUserTokenModel } from './types/user-token.type';
|
|
50
50
|
import { IUserVisit, IUserVisitModel } from './types/user-visit.type';
|
|
51
51
|
import { IUser, IUserModel } from './types/user.type';
|
|
52
|
+
import { IFoamTree, IFoamTreeModel } from './types/foam-tree.type';
|
|
52
53
|
import ThemeSchema from './schemas/theme.schema';
|
|
53
54
|
import ProblemSchema from './schemas/problem.schema';
|
|
54
55
|
import SFTagSchema from './schemas/sf-tag.schema';
|
|
@@ -99,5 +100,6 @@ import UpdateJobSchema from './schemas/update-job.schema';
|
|
|
99
100
|
import UseCaseDiscoverySchema from './schemas/use-case-discovery.schema';
|
|
100
101
|
import UseCaseDiscoveryProblemSchema from './schemas/use-case-discovery-problem.schema';
|
|
101
102
|
import CompetitorAnalysisSchema from './schemas/competitor-analysis.schema';
|
|
102
|
-
|
|
103
|
-
export {
|
|
103
|
+
import FoamTreeSchema from './schemas/foam-tree.schema';
|
|
104
|
+
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, 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, };
|
|
105
|
+
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, };
|
package/dist/index.js
CHANGED
|
@@ -4,6 +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
8
|
const theme_schema_1 = __importDefault(require("./schemas/theme.schema"));
|
|
8
9
|
exports.ThemeSchema = theme_schema_1.default;
|
|
9
10
|
const problem_schema_1 = __importDefault(require("./schemas/problem.schema"));
|
|
@@ -104,3 +105,5 @@ const use_case_discovery_problem_schema_1 = __importDefault(require("./schemas/u
|
|
|
104
105
|
exports.UseCaseDiscoveryProblemSchema = use_case_discovery_problem_schema_1.default;
|
|
105
106
|
const competitor_analysis_schema_1 = __importDefault(require("./schemas/competitor-analysis.schema"));
|
|
106
107
|
exports.CompetitorAnalysisSchema = competitor_analysis_schema_1.default;
|
|
108
|
+
const foam_tree_schema_1 = __importDefault(require("./schemas/foam-tree.schema"));
|
|
109
|
+
exports.FoamTreeSchema = foam_tree_schema_1.default;
|
|
@@ -232,6 +232,7 @@ const companySchema = new mongoose_1.Schema({
|
|
|
232
232
|
},
|
|
233
233
|
],
|
|
234
234
|
},
|
|
235
|
+
mergedCompanySlugs: [{ type: String, default: '' }],
|
|
235
236
|
createdBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
|
|
236
237
|
updatedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
|
|
237
238
|
updatedDate: { type: Number },
|
|
@@ -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 { IFoamTree, IFoamTreeModel } from '../types';
|
|
27
|
+
declare const foamTreeSchema: Schema<IFoamTree, IFoamTreeModel, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IFoamTree>;
|
|
28
|
+
export default foamTreeSchema;
|
|
@@ -0,0 +1,42 @@
|
|
|
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 foamTreeSchema = new mongoose_1.Schema({
|
|
10
|
+
rawData: { type: mongoose_1.Schema.Types.Mixed, default: [] },
|
|
11
|
+
solutionList: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'Solution' }],
|
|
12
|
+
companyList: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'Company' }],
|
|
13
|
+
themeList: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'Theme' }],
|
|
14
|
+
sfIndustries: [{ _id: mongoose_1.Schema.Types.ObjectId, name: String }],
|
|
15
|
+
sfTechnologies: [{ _id: mongoose_1.Schema.Types.ObjectId, name: String }],
|
|
16
|
+
countries: [{ type: String, default: [] }],
|
|
17
|
+
dropdown: { type: String, default: '' },
|
|
18
|
+
parentClustering: [{ type: String, default: [] }],
|
|
19
|
+
resultClustering: [{ type: String, default: [] }],
|
|
20
|
+
accuracy: { type: Number, default: 0 },
|
|
21
|
+
query: { type: String, default: '' },
|
|
22
|
+
createdBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
|
|
23
|
+
updatedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
|
|
24
|
+
updatedDate: { type: Number, index: -1 },
|
|
25
|
+
createdDate: { type: Number, index: -1 },
|
|
26
|
+
}, _config_1.schemaOptions);
|
|
27
|
+
foamTreeSchema.pre('save', function (next) {
|
|
28
|
+
const user = express_http_context_1.default.get('user');
|
|
29
|
+
if (user) {
|
|
30
|
+
if (!this.createdBy)
|
|
31
|
+
this.createdBy = user._id;
|
|
32
|
+
this.updatedBy = user._id;
|
|
33
|
+
}
|
|
34
|
+
next();
|
|
35
|
+
});
|
|
36
|
+
foamTreeSchema.pre('findOneAndUpdate', function (next) {
|
|
37
|
+
const user = express_http_context_1.default.get('user');
|
|
38
|
+
if (user)
|
|
39
|
+
this._update.updatedBy = user._id;
|
|
40
|
+
next();
|
|
41
|
+
});
|
|
42
|
+
exports.default = foamTreeSchema;
|
|
@@ -231,7 +231,7 @@ export interface ICompany extends BaseSchema {
|
|
|
231
231
|
themeCount: ContentStatusCount | number;
|
|
232
232
|
newsCount: number;
|
|
233
233
|
profileDetailUrls: string[];
|
|
234
|
-
acquiredBy: ICompany;
|
|
234
|
+
acquiredBy: Types.ObjectId | ICompany;
|
|
235
235
|
about: string;
|
|
236
236
|
operatingStatus: OperatingStatus;
|
|
237
237
|
headquartersLocation: HeadquartersLocation;
|
|
@@ -277,6 +277,7 @@ export interface ICompany extends BaseSchema {
|
|
|
277
277
|
focusAreaCount: Number;
|
|
278
278
|
diversitySpotlights: string[];
|
|
279
279
|
investmentPortfolio: InvestmentPortfolio;
|
|
280
|
+
mergedCompanySlugs: string[];
|
|
280
281
|
}
|
|
281
282
|
export interface ICompanyModel extends BaseModel<ICompany> {
|
|
282
283
|
}
|
|
@@ -0,0 +1,79 @@
|
|
|
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 { BaseModel, BaseSchema } from '../config';
|
|
27
|
+
export interface FoamTreeItem {
|
|
28
|
+
id?: string;
|
|
29
|
+
dbId?: string;
|
|
30
|
+
label?: string;
|
|
31
|
+
weight?: number;
|
|
32
|
+
groups?: FoamTreeItem[];
|
|
33
|
+
type?: 'sfIndustries' | 'sfTechnologies' | 'Theme' | 'Use Case' | 'Company';
|
|
34
|
+
}
|
|
35
|
+
export declare enum Clusters {
|
|
36
|
+
Industry = "Industry",
|
|
37
|
+
Tech = "Tech"
|
|
38
|
+
}
|
|
39
|
+
export declare enum SearchBy {
|
|
40
|
+
Theme = "Theme",
|
|
41
|
+
UseCase = "Use Case",
|
|
42
|
+
Company = "Company"
|
|
43
|
+
}
|
|
44
|
+
export interface sfTechnologies {
|
|
45
|
+
_id: Types.ObjectId;
|
|
46
|
+
name: string;
|
|
47
|
+
}
|
|
48
|
+
export interface sfIndustries {
|
|
49
|
+
_id: Types.ObjectId;
|
|
50
|
+
name: string;
|
|
51
|
+
}
|
|
52
|
+
export interface FoamTreeItemV2 extends FoamTreeItem {
|
|
53
|
+
cluster?: Clusters | SearchBy;
|
|
54
|
+
clusterInfo?: string[];
|
|
55
|
+
multipleClusterInfo?: string[][];
|
|
56
|
+
color?: {
|
|
57
|
+
h: number;
|
|
58
|
+
s: number;
|
|
59
|
+
l: number;
|
|
60
|
+
a: number;
|
|
61
|
+
};
|
|
62
|
+
logo?: string;
|
|
63
|
+
}
|
|
64
|
+
export interface IFoamTree extends BaseSchema {
|
|
65
|
+
rawData: FoamTreeItem[];
|
|
66
|
+
solutionList: Types.ObjectId[];
|
|
67
|
+
companyList: Types.ObjectId[];
|
|
68
|
+
themeList: Types.ObjectId[];
|
|
69
|
+
sfTechnologies: sfTechnologies[];
|
|
70
|
+
sfIndustries: sfIndustries[];
|
|
71
|
+
countries: string[];
|
|
72
|
+
dropdown: string;
|
|
73
|
+
parentClustering: string[];
|
|
74
|
+
resultClustering: string[];
|
|
75
|
+
accuracy: number;
|
|
76
|
+
query: string;
|
|
77
|
+
}
|
|
78
|
+
export interface IFoamTreeModel extends BaseModel<IFoamTree> {
|
|
79
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SearchBy = exports.Clusters = void 0;
|
|
4
|
+
var Clusters;
|
|
5
|
+
(function (Clusters) {
|
|
6
|
+
Clusters["Industry"] = "Industry";
|
|
7
|
+
Clusters["Tech"] = "Tech";
|
|
8
|
+
})(Clusters || (exports.Clusters = Clusters = {}));
|
|
9
|
+
var SearchBy;
|
|
10
|
+
(function (SearchBy) {
|
|
11
|
+
SearchBy["Theme"] = "Theme";
|
|
12
|
+
SearchBy["UseCase"] = "Use Case";
|
|
13
|
+
SearchBy["Company"] = "Company";
|
|
14
|
+
})(SearchBy || (exports.SearchBy = SearchBy = {}));
|
package/dist/types/index.d.ts
CHANGED
|
@@ -49,4 +49,5 @@ import { IUseCase, IUseCaseModel } from './use-case.type';
|
|
|
49
49
|
import { IUserToken, IUserTokenModel } from './user-token.type';
|
|
50
50
|
import { IUserVisit, IUserVisitModel } from './user-visit.type';
|
|
51
51
|
import { IUser, IUserModel } from './user.type';
|
|
52
|
-
|
|
52
|
+
import { IFoamTree, IFoamTreeModel } from './foam-tree.type';
|
|
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, };
|