@cool-digital-solutions/interferir-models 1.1.28 → 1.1.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 +5 -3
- package/dist/index.js +3 -1
- package/dist/schemas/index.d.ts +2 -1
- package/dist/schemas/index.js +3 -1
- package/dist/schemas/team.schema.d.ts +28 -0
- package/dist/schemas/team.schema.js +40 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/team.type.d.ts +51 -0
- package/dist/types/team.type.js +14 -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;
|
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;
|
|
@@ -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
|
+
logo: { type: mongoose_1.Schema.Types.ObjectId, ref: 'Image', default: null },
|
|
14
|
+
plan: { type: String, enum: Object.values(team_type_1.Plan), required: true },
|
|
15
|
+
maxSize: { type: Number },
|
|
16
|
+
users: [{ user: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User' }, role: { type: String, enum: Object.values(team_type_1.UserTeamRole) } }],
|
|
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;
|
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,51 @@
|
|
|
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 declare enum UserTeamRole {
|
|
33
|
+
OWNER = "owner",
|
|
34
|
+
CO_OWNER = "coOwner",
|
|
35
|
+
MEMBER = "member"
|
|
36
|
+
}
|
|
37
|
+
interface User {
|
|
38
|
+
user: Types.ObjectId | IUser;
|
|
39
|
+
role: UserTeamRole;
|
|
40
|
+
}
|
|
41
|
+
export interface ITeam extends BaseSchema {
|
|
42
|
+
name: string;
|
|
43
|
+
company: Types.ObjectId | ICompany;
|
|
44
|
+
logo: Types.ObjectId | IImage;
|
|
45
|
+
plan: Plan;
|
|
46
|
+
maxSize: number;
|
|
47
|
+
users: User[];
|
|
48
|
+
}
|
|
49
|
+
export interface ITeamModel extends BaseModel<ITeam> {
|
|
50
|
+
}
|
|
51
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserTeamRole = exports.Plan = void 0;
|
|
4
|
+
var Plan;
|
|
5
|
+
(function (Plan) {
|
|
6
|
+
Plan["PRO"] = "pro";
|
|
7
|
+
Plan["TRIAL"] = "trial";
|
|
8
|
+
})(Plan || (exports.Plan = Plan = {}));
|
|
9
|
+
var UserTeamRole;
|
|
10
|
+
(function (UserTeamRole) {
|
|
11
|
+
UserTeamRole["OWNER"] = "owner";
|
|
12
|
+
UserTeamRole["CO_OWNER"] = "coOwner";
|
|
13
|
+
UserTeamRole["MEMBER"] = "member";
|
|
14
|
+
})(UserTeamRole || (exports.UserTeamRole = UserTeamRole = {}));
|