@cool-digital-solutions/interferir-models 1.4.15 → 1.4.17
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 -3
- package/dist/index.js +3 -0
- package/dist/schemas/company-file.schema.d.ts +28 -0
- package/dist/schemas/company-file.schema.js +42 -0
- package/dist/schemas/index.d.ts +5 -1
- package/dist/schemas/index.js +10 -1
- package/dist/schemas/pricing-analysis-credit-usage.schema.d.ts +28 -0
- package/dist/schemas/pricing-analysis-credit-usage.schema.js +47 -0
- package/dist/schemas/pricing-company-analysis-plan.schema.d.ts +28 -0
- package/dist/schemas/pricing-company-analysis-plan.schema.js +38 -0
- package/dist/schemas/pricing-project-analysis.schema.d.ts +28 -0
- package/dist/schemas/pricing-project-analysis.schema.js +41 -0
- package/dist/types/company-file.type.d.ts +50 -0
- package/dist/types/company-file.type.js +16 -0
- package/dist/types/index.d.ts +5 -1
- package/dist/types/pricing-analysis-credit-usage.type.d.ts +50 -0
- package/dist/types/pricing-analysis-credit-usage.type.js +8 -0
- package/dist/types/pricing-company-analysis-plan.type.d.ts +37 -0
- package/dist/types/pricing-company-analysis-plan.type.js +2 -0
- package/dist/types/pricing-project-analysis.type.d.ts +13 -0
- package/dist/types/pricing-project-analysis.type.js +2 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ import { IAiWeeklyInsight, IAiWeeklyInsightModel } from './types/ai-weekly-insig
|
|
|
69
69
|
import { IStrategyGameBoard, IStrategyGameBoardModel } from './types/strategy-game-board.type';
|
|
70
70
|
import { IAiTaskPortiaArticleRelatedPortiaArticle, IAiTaskPortiaArticleRelatedPortiaArticleModel } from './types/ai-task-portia-article-related-portia-article.type';
|
|
71
71
|
import { IAiTaskNewsManagerOutput, IAiTaskNewsManagerOutputModel } from './types/ai-task-news-manager-output.type';
|
|
72
|
-
import { IPricingAdditionalBaseCredit, IPricingAdditionalBaseCreditModel, IPricingBaseCredit, IPricingBaseCreditModel, IAiEntrapeerKnowledgeBase, IAiEntrapeerKnowledgeBaseModel, IAiHrAssessment, IAiHrAssessmentModel, IAiHrAssessmentQuestion, IAiHrAssessmentQuestionModel, IAiHrCandidateOutput, IAiHrCandidateOutputModel, IAiHrCandidateProfile, IAiHrCandidateProfileModel, IAiHrCandidateTopCandidate, IAiHrCandidateTopCandidateModel, IAiHrInterview, IAiHrInterviewModel, IAiHrInterviewQuestion, IAiHrInterviewQuestionModel, IAiHrNote, IAiHrNoteModel, IAiHrReportStat, IAiHrReportStatModel, IAiTaskResearchManagerOutputPresentation, IAiTaskResearchManagerOutputPresentationModel, IAiTaskResearchManagerOutputPresentationSubmission, IAiTaskResearchManagerOutputPresentationSubmissionModel, IAiTaskResearchManagerOutputSummary, IAiTaskResearchManagerOutputSummaryModel, IAiTaskResearchManagerOutputSummarySubmission, IAiTaskResearchManagerOutputSummarySubmissionModel, IAiTaskResearchManagerOutputTranslationSubmission, IAiTaskResearchManagerOutputTranslationSubmissionModel, IPricingBaseCreditSub, IPricingBaseCreditSubModel, IPricingAiAssistantBaseCredit, IPricingAiAssistantBaseCreditModel, IAiAssistantCreditUsageModel, IAiAssistantCreditUsage, IPricingCompanyAiAssistantCredit, IPricingCompanyAiAssistantCreditModel, IPricingCompanyPlan, IPricingCompanyPlanModel, IAiHrFileUpload, IAiHrFileUploadModel, IAiHrUploadedCandidate, IAiHrUploadedCandidateModel, IEntityReference, IEntityReferenceModel, IInterest, IInterestModel, ICompanyInterest, ICompanyInterestModel } from './types';
|
|
72
|
+
import { IPricingAdditionalBaseCredit, IPricingAdditionalBaseCreditModel, IPricingBaseCredit, IPricingBaseCreditModel, IAiEntrapeerKnowledgeBase, IAiEntrapeerKnowledgeBaseModel, IAiHrAssessment, IAiHrAssessmentModel, IAiHrAssessmentQuestion, IAiHrAssessmentQuestionModel, IAiHrCandidateOutput, IAiHrCandidateOutputModel, IAiHrCandidateProfile, IAiHrCandidateProfileModel, IAiHrCandidateTopCandidate, IAiHrCandidateTopCandidateModel, IAiHrInterview, IAiHrInterviewModel, IAiHrInterviewQuestion, IAiHrInterviewQuestionModel, IAiHrNote, IAiHrNoteModel, IAiHrReportStat, IAiHrReportStatModel, IAiTaskResearchManagerOutputPresentation, IAiTaskResearchManagerOutputPresentationModel, IAiTaskResearchManagerOutputPresentationSubmission, IAiTaskResearchManagerOutputPresentationSubmissionModel, IAiTaskResearchManagerOutputSummary, IAiTaskResearchManagerOutputSummaryModel, IAiTaskResearchManagerOutputSummarySubmission, IAiTaskResearchManagerOutputSummarySubmissionModel, IAiTaskResearchManagerOutputTranslationSubmission, IAiTaskResearchManagerOutputTranslationSubmissionModel, IPricingBaseCreditSub, IPricingBaseCreditSubModel, IPricingAiAssistantBaseCredit, IPricingAiAssistantBaseCreditModel, IAiAssistantCreditUsageModel, IAiAssistantCreditUsage, IPricingCompanyAiAssistantCredit, IPricingCompanyAiAssistantCreditModel, IPricingCompanyPlan, IPricingCompanyPlanModel, IAiHrFileUpload, IAiHrFileUploadModel, IAiHrUploadedCandidate, IAiHrUploadedCandidateModel, IEntityReference, IEntityReferenceModel, IInterest, IInterestModel, ICompanyInterest, ICompanyInterestModel, ICompanyFile, ICompanyFileModel } from './types';
|
|
73
73
|
import { IAiTaskCurationManagerOutput, IAiTaskCurationManagerOutputModel } from './types/ai-task-curation-manager-output.type';
|
|
74
74
|
import { IAiTaskCompanyRelatedCompany, IAiTaskCompanyRelatedCompanyModel } from './types/ai-task-company-related-company.type';
|
|
75
75
|
import ThemeSchema from './schemas/theme.schema';
|
|
@@ -172,5 +172,6 @@ import AiHrUploadedCandidateSchema from './schemas/ai-hr-uploaded-candidate.sche
|
|
|
172
172
|
import EntityReferenceSchema from './schemas/entity-reference.schema';
|
|
173
173
|
import InterestSchema from './schemas/interest.schema';
|
|
174
174
|
import CompanyInterestSchema from './schemas/company-interest.schema';
|
|
175
|
-
|
|
176
|
-
export {
|
|
175
|
+
import CompanyFileSchema from './schemas/company-file.schema';
|
|
176
|
+
export { IAiConversation, IAiConversationModel, IAiConversationMessage, IAiConversationMessageModel, IAiConversationTrackingTask, IAiConversationTrackingTaskModel, IAiAssistant, IAiAssistantModel, IBackendError, IBackendErrorModel, IBookmark, IBookmarkModel, ICompany, ICompanyModel, ICompanyCluster, ICompanyClusterModel, ICompanyMarketing, ICompanyMarketingModel, ICompetitor, ICompetitorModel, ICompetitorAnalysis, ICompetitorAnalysisModel, IContactMessage, IContactMessageModel, IContactStartup, IContactStartupModel, IContent, IContentModel, IDraftVersion, IDraftVersionModel, IFaq, IFaqModel, IFeaturedTheme, IFeaturedThemeModel, IFollowContent, IFollowContentModel, IGeneralConfigSub, IGeneralConfigSubModel, IGeneralConfig, IGeneralConfigModel, IImage, IImageModel, IIndustry, IIndustryModel, IInvestor, IInvestorModel, ILike, ILikeModel, INews, INewsModel, INotification, INotificationModel, IOtp, IOtpModel, IPortiaArticle, IPortiaArticleModel, IProblem, IProblemModel, IRelatedTheme, IRelatedThemeModel, ISearchHistory, ISearchHistoryModel, ISFCategory, ISFCategoryModel, ISFSubCategory, ISFSubCategoryModel, ISFTag, ISFTagModel, ISparkUseCase, ISparkUseCaseModel, ISpark, ISparkModel, IStartupVectorAnyEntity, IStartupVectorAnyEntityModel, ISuggest, ISuggestModel, ITechnology, ITechnologyModel, ITheme, IThemeModel, IToken, ITokenModel, IUseCase, IUseCaseModel, IUseCaseDiscovery, IUseCaseDiscoveryModel, IUseCaseDiscoveryProblem, IUseCaseDiscoveryProblemModel, IUserToken, IUserTokenModel, IUserVisit, IUserVisitModel, IUser, IUserModel, ICompetitorGrid, ICompetitorGridModel, IHighlight, IHighlightModel, IHighlightNote, IHighlightNoteModel, INewsHub, INewsHubModel, ITeam, ITeamModel, ITeamMember, ITeamMemberModel, IAiTask, IAiTaskModel, IAiTaskSubmission, IAiTaskSubmissionModel, ICompanySubOrganization, ICompanySubOrganizationModel, IAiTaskResearchManagerOutput, IAiTaskResearchManagerOutputModel, IAiTaskOutline, IAiTaskOutlineModel, IAiTaskShare, IAiTaskShareModel, IBadge, IBadgeModel, IAiTopUseCase, IAiTopUseCaseModel, IAiUseCaseAnalysisNode, IAiUseCaseAnalysisNodeModel, IAiUseCaseAnalysis, IAiUseCaseAnalysisModel, IAiHrCandidate, IAiHrCandidateModel, IAiHrCandidateCompany, IAiHrCandidateCompanyModel, IBugReportModel, IBugReport, IAiTaskUseCaseRelatedUseCase, IAiTaskUseCaseRelatedUseCaseModel, IAiWeeklyInsight, IAiWeeklyInsightModel, IStrategyGameBoard, IStrategyGameBoardModel, IAiTaskPortiaArticleRelatedPortiaArticle, IAiTaskPortiaArticleRelatedPortiaArticleModel, IAiTaskNewsManagerOutput, IAiTaskNewsManagerOutputModel, IAiHrCandidateOutput, IAiHrCandidateOutputModel, IAiHrCandidateTopCandidate, IAiHrCandidateTopCandidateModel, IAiHrCandidateProfile, IAiHrCandidateProfileModel, IAiEntrapeerKnowledgeBase, IAiEntrapeerKnowledgeBaseModel, IAiTaskCurationManagerOutput, IAiTaskCurationManagerOutputModel, IAiTaskCompanyRelatedCompanyModel, IAiTaskCompanyRelatedCompany, IAiTaskResearchManagerOutputSummarySubmission, IAiTaskResearchManagerOutputSummarySubmissionModel, IAiTaskResearchManagerOutputSummary, IAiTaskResearchManagerOutputSummaryModel, IAiTaskResearchManagerOutputPresentationSubmission, IAiTaskResearchManagerOutputPresentationSubmissionModel, IAiTaskResearchManagerOutputPresentation, IAiTaskResearchManagerOutputPresentationModel, IAiHrAssessmentQuestion, IAiHrAssessmentQuestionModel, IAiHrAssessment, IAiHrAssessmentModel, IAiHrInterview, IAiHrInterviewModel, IAiHrInterviewQuestion, IAiHrInterviewQuestionModel, IAiHrNote, IAiHrNoteModel, IAiHrReportStat, IAiHrReportStatModel, IAiTaskResearchManagerOutputTranslationSubmission, IAiTaskResearchManagerOutputTranslationSubmissionModel, IPricingBaseCredit, IPricingBaseCreditModel, IPricingBaseCreditSub, IPricingBaseCreditSubModel, IPricingAdditionalBaseCredit, IPricingAdditionalBaseCreditModel, IPricingAiAssistantBaseCredit, IPricingAiAssistantBaseCreditModel, IPricingCompanyAiAssistantCredit, IPricingCompanyAiAssistantCreditModel, IPricingCompanyPlan, IPricingCompanyPlanModel, IAiAssistantCreditUsage, IAiAssistantCreditUsageModel, IAiHrFileUpload, IAiHrFileUploadModel, IAiHrUploadedCandidate, IAiHrUploadedCandidateModel, IEntityReference, IEntityReferenceModel, IInterest, IInterestModel, ICompanyInterest, ICompanyInterestModel, ICompanyFile, ICompanyFileModel, };
|
|
177
|
+
export { BadgeSchema, AiTaskSchema, AiTaskSubmissionSchema, ThemeSchema, ProblemSchema, SFTagSchema, SFCategorySchema, SFSubCategorySchema, TechnologySchema, IndustrySchema, BackendErrorSchema, ImageSchema, SearchHistorySchema, TokenSchema, UserTokenSchema, UserSchema, CompanySchema, PortiaArticleSchema, ContactMessageSchema, ContactStartupSchema, ContentSchema, FaqSchema, UseCaseSchema, NewsSchema, LikeSchema, SparkSchema, SparkUseCaseSchema, FollowContentSchema, GeneralConfigSchema, GeneralConfigSubSchema, DraftVersionSchema, NotificationSchema, OtpSchema, SuggestSchema, UserVisitSchema, CompetitorSchema, BookmarkSchema, AiConversationSchema, AiConversationMessageSchema, AiConversationTrackingTaskSchema, CompanyClusterSchema, CompanyMarketingSchema, InvestorSchema, RelatedThemeSchema, StartupVectorAnyEntitySchema, UseCaseDiscoverySchema, UseCaseDiscoveryProblemSchema, CompetitorAnalysisSchema, FeaturedThemeSchema, CompetitorGridSchema, HighlightSchema, NewsHubSchema, AiAssistantSchema, TeamSchema, TeamMemberSchema, CompanySubOrganizationSchema, HighlightNoteSchema, AiTaskResearchManagerOutputSchema, AiTaskOutlineSchema, AiTaskShareSchema, AiTopUseCaseSchema, AiUseCaseAnalysisNodeSchema, AiUseCaseAnalysisSchema, AiHrCandidateSchema, AiHrCandidateCompanySchema, BugReportSchema, AiTaskUseCaseRelatedUseCaseSchema, AiWeeklyInsightSchema, StrategyGameBoardSchema, AiTaskPortiaArticleRelatedPortiaArticleSchema, AiTaskNewsManagerOutputSchema, AiHrCandidateOutputSchema, AiHrCandidateTopCandidateSchema, AiHrCandidateProfileSchema, AiEntrapeerKnowledgeBaseSchema, AiTaskCurationManagerOutputSchema, AiTaskCompanyRelatedCompanySchema, AiTaskResearchManagerOutputSummarySubmissionSchema, AiTaskResearchManagerOutputSummarySchema, AiTaskResearchManagerOutputPresentationSubmissionSchema, AiTaskResearchManagerOutputPresentationSchema, AiHrAssessmentQuestionSchema, AiHrAssessmentSchema, AiHrInterviewSchema, AiHrInterviewQuestionSchema, AiHrNoteSchema, AiHrReportStatSchema, AiTaskResearchManagerOutputTranslationSubmissionSchema, PricingBaseCreditSchema, PricingBaseCreditSubSchema, PricingAdditionalBaseCreditSchema, PricingAiAssistantBaseCreditSchema, PricingAiAssistantCreditUsageSchema, PricingCompanyPlanSchema, PricingCompanyAiAssistantCreditSchema, AiHrFileUploadSchema, AiHrUploadedCandidateSchema, EntityReferenceSchema, InterestSchema, CompanyInterestSchema, CompanyFileSchema, };
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.CompetitorGridSchema = exports.FeaturedThemeSchema = exports.CompetitorAnalysisSchema = exports.UseCaseDiscoveryProblemSchema = exports.UseCaseDiscoverySchema = exports.StartupVectorAnyEntitySchema = exports.RelatedThemeSchema = exports.InvestorSchema = exports.CompanyMarketingSchema = exports.CompanyClusterSchema = exports.AiConversationTrackingTaskSchema = exports.AiConversationMessageSchema = exports.AiConversationSchema = exports.BookmarkSchema = exports.CompetitorSchema = exports.UserVisitSchema = exports.SuggestSchema = exports.OtpSchema = exports.NotificationSchema = exports.DraftVersionSchema = exports.GeneralConfigSubSchema = exports.GeneralConfigSchema = exports.FollowContentSchema = exports.SparkUseCaseSchema = exports.SparkSchema = exports.LikeSchema = exports.NewsSchema = exports.UseCaseSchema = exports.FaqSchema = exports.ContentSchema = exports.ContactStartupSchema = exports.ContactMessageSchema = exports.PortiaArticleSchema = exports.CompanySchema = exports.UserSchema = exports.UserTokenSchema = exports.TokenSchema = exports.SearchHistorySchema = exports.ImageSchema = exports.BackendErrorSchema = exports.IndustrySchema = exports.TechnologySchema = exports.SFSubCategorySchema = exports.SFCategorySchema = exports.SFTagSchema = exports.ProblemSchema = exports.ThemeSchema = exports.AiTaskSubmissionSchema = exports.AiTaskSchema = exports.BadgeSchema = void 0;
|
|
7
7
|
exports.CompanyInterestSchema = exports.InterestSchema = exports.EntityReferenceSchema = exports.AiHrUploadedCandidateSchema = exports.AiHrFileUploadSchema = exports.PricingCompanyAiAssistantCreditSchema = exports.PricingCompanyPlanSchema = exports.PricingAiAssistantCreditUsageSchema = exports.PricingAiAssistantBaseCreditSchema = exports.PricingAdditionalBaseCreditSchema = exports.PricingBaseCreditSubSchema = exports.PricingBaseCreditSchema = exports.AiTaskResearchManagerOutputTranslationSubmissionSchema = exports.AiHrReportStatSchema = exports.AiHrNoteSchema = exports.AiHrInterviewQuestionSchema = exports.AiHrInterviewSchema = exports.AiHrAssessmentSchema = exports.AiHrAssessmentQuestionSchema = exports.AiTaskResearchManagerOutputPresentationSchema = exports.AiTaskResearchManagerOutputPresentationSubmissionSchema = exports.AiTaskResearchManagerOutputSummarySchema = exports.AiTaskResearchManagerOutputSummarySubmissionSchema = exports.AiTaskCompanyRelatedCompanySchema = exports.AiTaskCurationManagerOutputSchema = exports.AiEntrapeerKnowledgeBaseSchema = exports.AiHrCandidateProfileSchema = exports.AiHrCandidateTopCandidateSchema = exports.AiHrCandidateOutputSchema = exports.AiTaskNewsManagerOutputSchema = exports.AiTaskPortiaArticleRelatedPortiaArticleSchema = exports.StrategyGameBoardSchema = exports.AiWeeklyInsightSchema = exports.AiTaskUseCaseRelatedUseCaseSchema = exports.BugReportSchema = exports.AiHrCandidateCompanySchema = exports.AiHrCandidateSchema = exports.AiUseCaseAnalysisSchema = exports.AiUseCaseAnalysisNodeSchema = exports.AiTopUseCaseSchema = exports.AiTaskShareSchema = exports.AiTaskOutlineSchema = exports.AiTaskResearchManagerOutputSchema = exports.HighlightNoteSchema = exports.CompanySubOrganizationSchema = exports.TeamMemberSchema = exports.TeamSchema = exports.AiAssistantSchema = exports.NewsHubSchema = exports.HighlightSchema = void 0;
|
|
8
|
+
exports.CompanyFileSchema = void 0;
|
|
8
9
|
const theme_schema_1 = __importDefault(require("./schemas/theme.schema"));
|
|
9
10
|
exports.ThemeSchema = theme_schema_1.default;
|
|
10
11
|
const problem_schema_1 = __importDefault(require("./schemas/problem.schema"));
|
|
@@ -205,3 +206,5 @@ const interest_schema_1 = __importDefault(require("./schemas/interest.schema"));
|
|
|
205
206
|
exports.InterestSchema = interest_schema_1.default;
|
|
206
207
|
const company_interest_schema_1 = __importDefault(require("./schemas/company-interest.schema"));
|
|
207
208
|
exports.CompanyInterestSchema = company_interest_schema_1.default;
|
|
209
|
+
const company_file_schema_1 = __importDefault(require("./schemas/company-file.schema"));
|
|
210
|
+
exports.CompanyFileSchema = company_file_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 type { ICompanyFile, ICompanyFileModel } from '../types';
|
|
27
|
+
declare const companyFileSchema: Schema<ICompanyFile, ICompanyFileModel, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ICompanyFile>;
|
|
28
|
+
export default companyFileSchema;
|
|
@@ -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 company_file_type_1 = require("../types/company-file.type");
|
|
10
|
+
const companyFileSchema = new mongoose_1.Schema({
|
|
11
|
+
fileName: { type: String, required: [true, 'fileName required'], index: true },
|
|
12
|
+
originalFileName: { type: String, required: [true, 'originalFileName required'], index: true },
|
|
13
|
+
fileSize: { type: Number, required: [true, 'fileSize required'] },
|
|
14
|
+
fileType: { type: String, enum: Object.values(company_file_type_1.FileType) },
|
|
15
|
+
fileVisibility: { type: String, enum: Object.values(company_file_type_1.FileVisibility) },
|
|
16
|
+
company: { type: mongoose_1.Schema.Types.ObjectId, ref: 'Company', required: true, index: true },
|
|
17
|
+
projectNames: [{ type: String, default: [] }],
|
|
18
|
+
s3FolderName: { type: String, required: true },
|
|
19
|
+
createdBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
|
|
20
|
+
updatedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
|
|
21
|
+
updatedDate: { type: Number, index: -1 },
|
|
22
|
+
createdDate: { type: Number, index: -1 },
|
|
23
|
+
}, _config_1.schemaOptions);
|
|
24
|
+
companyFileSchema.pre('save', function (next) {
|
|
25
|
+
const user = express_http_context_1.default.get('user');
|
|
26
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
27
|
+
if (user) {
|
|
28
|
+
if (!this.createdBy)
|
|
29
|
+
this.createdBy = user._id;
|
|
30
|
+
if (!notUpdatedBy)
|
|
31
|
+
this.updatedBy = user._id;
|
|
32
|
+
}
|
|
33
|
+
next();
|
|
34
|
+
});
|
|
35
|
+
companyFileSchema.pre('findOneAndUpdate', function (next) {
|
|
36
|
+
const user = express_http_context_1.default.get('user');
|
|
37
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
38
|
+
if (user && !notUpdatedBy)
|
|
39
|
+
this._update.updatedBy = user._id;
|
|
40
|
+
next();
|
|
41
|
+
});
|
|
42
|
+
exports.default = companyFileSchema;
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -96,4 +96,8 @@ import AiHrUploadedCandidateSchema from './ai-hr-uploaded-candidate.schema';
|
|
|
96
96
|
import EntityReferenceSchema from './entity-reference.schema';
|
|
97
97
|
import InterestSchema from './interest.schema';
|
|
98
98
|
import CompanyInterestSchema from './company-interest.schema';
|
|
99
|
-
|
|
99
|
+
import CompanyFileSchema from './company-file.schema';
|
|
100
|
+
import PricingProjectAnalysisSchema from './pricing-project-analysis.schema';
|
|
101
|
+
import PricingAnalysisCreditUsageSchema from './pricing-analysis-credit-usage.schema';
|
|
102
|
+
import PricingCompanyAnalysisPlanSchema from './pricing-company-analysis-plan.schema';
|
|
103
|
+
export { AiTaskSchema, AiTaskSubmissionSchema, ThemeSchema, ProblemSchema, SFTagSchema, SFCategorySchema, SFSubCategorySchema, TechnologySchema, IndustrySchema, BackendErrorSchema, ImageSchema, SearchHistorySchema, TokenSchema, UserTokenSchema, UserSchema, CompanySchema, PortiaArticleSchema, ContactMessageSchema, ContactStartupSchema, ContentSchema, FaqSchema, UseCaseSchema, NewsSchema, LikeSchema, SparkSchema, SparkUseCaseSchema, FollowContentSchema, GeneralConfigSchema, GeneralConfigSubSchema, DraftVersionSchema, NotificationSchema, OtpSchema, SuggestSchema, UserVisitSchema, CompetitorSchema, BookmarkSchema, AiConversationSchema, AiConversationMessageSchema, AiConversationTrackingTaskSchema, CompanyClusterSchema, CompanyMarketingSchema, InvestorSchema, RelatedThemeSchema, StartupVectorAnyEntitySchema, UseCaseDiscoverySchema, UseCaseDiscoveryProblemSchema, CompetitorAnalysisSchema, FeaturedThemeSchema, HighlightSchema, NewsHubSchema, AiAssistantSchema, TeamSchema, TeamMemberSchema, CompanySubOrganizationSchema, HighlightNoteSchema, AiTaskResearchManagerOutputSchema, AiTaskOutlineSchema, AiTaskShareSchema, BadgeSchema, AiTopUseCaseSchema, AiUseCaseAnalysisNodeSchema, AiUseCaseAnalysisSchema, AiHrCandidateSchema, AiHrCandidateCompanySchema, BugReportSchema, AiTaskUseCaseRelatedUseCaseSchema, AiWeeklyInsightSchema, AiTaskPortiaArticleRelatedPortiaArticleSchema, AiTaskNewsManagerOutputSchema, AiHrCandidateOutputSchema, AiHrCandidateTopCandidateSchema, AiHrCandidateProfileSchema, AiEntrapeerKnowledgeBaseSchema, AiTaskCurationManagerOutputSchema, AiTaskCompanyRelatedCompanySchema, AiTaskResearchManagerOutputSummarySubmissionSchema, AiTaskResearchManagerOutputSummarySchema, AiTaskResearchManagerOutputPresentationSubmissionSchema, AiTaskResearchManagerOutputPresentationSchema, AiHrAssessmentQuestionSchema, AiHrAssessmentSchema, AiHrInterviewSchema, AiHrInterviewQuestionSchema, AiHrNoteSchema, AiHrReportStatSchema, AiTaskResearchManagerOutputTranslationSubmissionSchema, PricingBaseCreditSchema, PricingBaseCreditSubSchema, PricingAdditionalBaseCreditSchema, PricingAiAssistantBaseCreditSchema, PricingCompanyPlanSchema, PricingCompanyAiAssistantCreditSchema, PricingAiAssistantCreditUsageSchema, AiHrFileUploadSchema, AiHrUploadedCandidateSchema, EntityReferenceSchema, InterestSchema, CompanyInterestSchema, CompanyFileSchema, PricingProjectAnalysisSchema, PricingAnalysisCreditUsageSchema, PricingCompanyAnalysisPlanSchema, };
|
package/dist/schemas/index.js
CHANGED
|
@@ -4,7 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.NewsHubSchema = exports.HighlightSchema = exports.FeaturedThemeSchema = exports.CompetitorAnalysisSchema = exports.UseCaseDiscoveryProblemSchema = exports.UseCaseDiscoverySchema = exports.StartupVectorAnyEntitySchema = exports.RelatedThemeSchema = exports.InvestorSchema = exports.CompanyMarketingSchema = exports.CompanyClusterSchema = exports.AiConversationTrackingTaskSchema = exports.AiConversationMessageSchema = exports.AiConversationSchema = exports.BookmarkSchema = exports.CompetitorSchema = exports.UserVisitSchema = exports.SuggestSchema = exports.OtpSchema = exports.NotificationSchema = exports.DraftVersionSchema = exports.GeneralConfigSubSchema = exports.GeneralConfigSchema = exports.FollowContentSchema = exports.SparkUseCaseSchema = exports.SparkSchema = exports.LikeSchema = exports.NewsSchema = exports.UseCaseSchema = exports.FaqSchema = exports.ContentSchema = exports.ContactStartupSchema = exports.ContactMessageSchema = exports.PortiaArticleSchema = exports.CompanySchema = exports.UserSchema = exports.UserTokenSchema = exports.TokenSchema = exports.SearchHistorySchema = exports.ImageSchema = exports.BackendErrorSchema = exports.IndustrySchema = exports.TechnologySchema = exports.SFSubCategorySchema = exports.SFCategorySchema = exports.SFTagSchema = exports.ProblemSchema = exports.ThemeSchema = exports.AiTaskSubmissionSchema = exports.AiTaskSchema = void 0;
|
|
7
|
-
exports.CompanyInterestSchema = exports.InterestSchema = exports.EntityReferenceSchema = exports.AiHrUploadedCandidateSchema = exports.AiHrFileUploadSchema = exports.PricingAiAssistantCreditUsageSchema = exports.PricingCompanyAiAssistantCreditSchema = exports.PricingCompanyPlanSchema = exports.PricingAiAssistantBaseCreditSchema = exports.PricingAdditionalBaseCreditSchema = exports.PricingBaseCreditSubSchema = exports.PricingBaseCreditSchema = exports.AiTaskResearchManagerOutputTranslationSubmissionSchema = exports.AiHrReportStatSchema = exports.AiHrNoteSchema = exports.AiHrInterviewQuestionSchema = exports.AiHrInterviewSchema = exports.AiHrAssessmentSchema = exports.AiHrAssessmentQuestionSchema = exports.AiTaskResearchManagerOutputPresentationSchema = exports.AiTaskResearchManagerOutputPresentationSubmissionSchema = exports.AiTaskResearchManagerOutputSummarySchema = exports.AiTaskResearchManagerOutputSummarySubmissionSchema = exports.AiTaskCompanyRelatedCompanySchema = exports.AiTaskCurationManagerOutputSchema = exports.AiEntrapeerKnowledgeBaseSchema = exports.AiHrCandidateProfileSchema = exports.AiHrCandidateTopCandidateSchema = exports.AiHrCandidateOutputSchema = exports.AiTaskNewsManagerOutputSchema = exports.AiTaskPortiaArticleRelatedPortiaArticleSchema = exports.AiWeeklyInsightSchema = exports.AiTaskUseCaseRelatedUseCaseSchema = exports.BugReportSchema = exports.AiHrCandidateCompanySchema = exports.AiHrCandidateSchema = exports.AiUseCaseAnalysisSchema = exports.AiUseCaseAnalysisNodeSchema = exports.AiTopUseCaseSchema = exports.BadgeSchema = exports.AiTaskShareSchema = exports.AiTaskOutlineSchema = exports.AiTaskResearchManagerOutputSchema = exports.HighlightNoteSchema = exports.CompanySubOrganizationSchema = exports.TeamMemberSchema = exports.TeamSchema = exports.AiAssistantSchema = void 0;
|
|
7
|
+
exports.PricingProjectAnalysisSchema = exports.CompanyFileSchema = exports.CompanyInterestSchema = exports.InterestSchema = exports.EntityReferenceSchema = exports.AiHrUploadedCandidateSchema = exports.AiHrFileUploadSchema = exports.PricingAiAssistantCreditUsageSchema = exports.PricingCompanyAiAssistantCreditSchema = exports.PricingCompanyPlanSchema = exports.PricingAiAssistantBaseCreditSchema = exports.PricingAdditionalBaseCreditSchema = exports.PricingBaseCreditSubSchema = exports.PricingBaseCreditSchema = exports.AiTaskResearchManagerOutputTranslationSubmissionSchema = exports.AiHrReportStatSchema = exports.AiHrNoteSchema = exports.AiHrInterviewQuestionSchema = exports.AiHrInterviewSchema = exports.AiHrAssessmentSchema = exports.AiHrAssessmentQuestionSchema = exports.AiTaskResearchManagerOutputPresentationSchema = exports.AiTaskResearchManagerOutputPresentationSubmissionSchema = exports.AiTaskResearchManagerOutputSummarySchema = exports.AiTaskResearchManagerOutputSummarySubmissionSchema = exports.AiTaskCompanyRelatedCompanySchema = exports.AiTaskCurationManagerOutputSchema = exports.AiEntrapeerKnowledgeBaseSchema = exports.AiHrCandidateProfileSchema = exports.AiHrCandidateTopCandidateSchema = exports.AiHrCandidateOutputSchema = exports.AiTaskNewsManagerOutputSchema = exports.AiTaskPortiaArticleRelatedPortiaArticleSchema = exports.AiWeeklyInsightSchema = exports.AiTaskUseCaseRelatedUseCaseSchema = exports.BugReportSchema = exports.AiHrCandidateCompanySchema = exports.AiHrCandidateSchema = exports.AiUseCaseAnalysisSchema = exports.AiUseCaseAnalysisNodeSchema = exports.AiTopUseCaseSchema = exports.BadgeSchema = exports.AiTaskShareSchema = exports.AiTaskOutlineSchema = exports.AiTaskResearchManagerOutputSchema = exports.HighlightNoteSchema = exports.CompanySubOrganizationSchema = exports.TeamMemberSchema = exports.TeamSchema = exports.AiAssistantSchema = void 0;
|
|
8
|
+
exports.PricingCompanyAnalysisPlanSchema = exports.PricingAnalysisCreditUsageSchema = void 0;
|
|
8
9
|
const theme_schema_1 = __importDefault(require("./theme.schema"));
|
|
9
10
|
exports.ThemeSchema = theme_schema_1.default;
|
|
10
11
|
const problem_schema_1 = __importDefault(require("./problem.schema"));
|
|
@@ -201,3 +202,11 @@ const interest_schema_1 = __importDefault(require("./interest.schema"));
|
|
|
201
202
|
exports.InterestSchema = interest_schema_1.default;
|
|
202
203
|
const company_interest_schema_1 = __importDefault(require("./company-interest.schema"));
|
|
203
204
|
exports.CompanyInterestSchema = company_interest_schema_1.default;
|
|
205
|
+
const company_file_schema_1 = __importDefault(require("./company-file.schema"));
|
|
206
|
+
exports.CompanyFileSchema = company_file_schema_1.default;
|
|
207
|
+
const pricing_project_analysis_schema_1 = __importDefault(require("./pricing-project-analysis.schema"));
|
|
208
|
+
exports.PricingProjectAnalysisSchema = pricing_project_analysis_schema_1.default;
|
|
209
|
+
const pricing_analysis_credit_usage_schema_1 = __importDefault(require("./pricing-analysis-credit-usage.schema"));
|
|
210
|
+
exports.PricingAnalysisCreditUsageSchema = pricing_analysis_credit_usage_schema_1.default;
|
|
211
|
+
const pricing_company_analysis_plan_schema_1 = __importDefault(require("./pricing-company-analysis-plan.schema"));
|
|
212
|
+
exports.PricingCompanyAnalysisPlanSchema = pricing_company_analysis_plan_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 { IPricingAnalysisCreditUsage, IPricingAnalysisCreditUsageModel } from '../types';
|
|
27
|
+
declare const PricingAnalysisCreditUsageSchema: Schema<IPricingAnalysisCreditUsage, IPricingAnalysisCreditUsageModel, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IPricingAnalysisCreditUsage>;
|
|
28
|
+
export default PricingAnalysisCreditUsageSchema;
|
|
@@ -0,0 +1,47 @@
|
|
|
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 pricing_analysis_credit_usage_type_1 = require("../types/pricing-analysis-credit-usage.type");
|
|
10
|
+
const PricingAnalysisCreditUsageSchema = new mongoose_1.Schema({
|
|
11
|
+
projectAnalysis: { type: mongoose_1.Types.ObjectId, ref: 'PricingProjectAnalysis', required: true },
|
|
12
|
+
companyPlan: { type: mongoose_1.Types.ObjectId, ref: 'PricingCompanyPlan', required: true },
|
|
13
|
+
usage: { type: Number, required: true },
|
|
14
|
+
type: { type: String, enum: Object.values(pricing_analysis_credit_usage_type_1.PricingAnalysisCreditUsageType), required: true },
|
|
15
|
+
creditSnapshot: {
|
|
16
|
+
companyBaseCredit: { type: Number, required: true },
|
|
17
|
+
companyPriceMultiplier: { type: Number, required: true },
|
|
18
|
+
analysisBaseCredit: { type: Number, required: true },
|
|
19
|
+
analysisBaseCreditCost: { type: Number, required: true },
|
|
20
|
+
analysisCreditMultiplier: { type: Number, required: true },
|
|
21
|
+
analysisFinalCredit: { type: Number, required: true },
|
|
22
|
+
analysisCreditLimit: { type: Number, required: true },
|
|
23
|
+
},
|
|
24
|
+
createdBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
|
|
25
|
+
updatedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
|
|
26
|
+
updatedDate: Number,
|
|
27
|
+
createdDate: Number,
|
|
28
|
+
}, _config_1.schemaOptions);
|
|
29
|
+
PricingAnalysisCreditUsageSchema.pre('save', function (next) {
|
|
30
|
+
const user = express_http_context_1.default.get('user');
|
|
31
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
32
|
+
if (user) {
|
|
33
|
+
if (!this.createdBy)
|
|
34
|
+
this.createdBy = user._id;
|
|
35
|
+
if (!notUpdatedBy)
|
|
36
|
+
this.updatedBy = user._id;
|
|
37
|
+
}
|
|
38
|
+
next();
|
|
39
|
+
});
|
|
40
|
+
PricingAnalysisCreditUsageSchema.pre('findOneAndUpdate', function (next) {
|
|
41
|
+
const user = express_http_context_1.default.get('user');
|
|
42
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
43
|
+
if (user && !notUpdatedBy)
|
|
44
|
+
this._update.updatedBy = user._id;
|
|
45
|
+
next();
|
|
46
|
+
});
|
|
47
|
+
exports.default = PricingAnalysisCreditUsageSchema;
|
|
@@ -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 { IPricingCompanyAnalysisPlan, IPricingCompanyAnalysisPlanModel } from '../types';
|
|
27
|
+
declare const PricingCompanyAnalysisPlanSchema: Schema<IPricingCompanyAnalysisPlan, IPricingCompanyAnalysisPlanModel, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IPricingCompanyAnalysisPlan>;
|
|
28
|
+
export default PricingCompanyAnalysisPlanSchema;
|
|
@@ -0,0 +1,38 @@
|
|
|
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 PricingCompanyAnalysisPlanSchema = new mongoose_1.Schema({
|
|
10
|
+
projectAnalysis: { type: mongoose_1.Schema.Types.ObjectId, ref: 'PricingProjectAnalysis', required: true },
|
|
11
|
+
totalCredit: { type: Number, required: true, min: 0 },
|
|
12
|
+
company: { type: mongoose_1.Schema.Types.ObjectId, ref: 'Company', required: true },
|
|
13
|
+
baseCreditPrice: { type: Number, required: true, min: 0 },
|
|
14
|
+
priceMultiplier: { type: Number, required: true, default: 1.0, min: 0.1, max: 10.0 },
|
|
15
|
+
createdBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
|
|
16
|
+
updatedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
|
|
17
|
+
createdDate: { type: Number },
|
|
18
|
+
updatedDate: { type: Number },
|
|
19
|
+
}, _config_1.schemaOptions);
|
|
20
|
+
PricingCompanyAnalysisPlanSchema.pre('save', function (next) {
|
|
21
|
+
const user = express_http_context_1.default.get('user');
|
|
22
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
23
|
+
if (user) {
|
|
24
|
+
if (!this.createdBy)
|
|
25
|
+
this.createdBy = user._id;
|
|
26
|
+
if (!notUpdatedBy)
|
|
27
|
+
this.updatedBy = user._id;
|
|
28
|
+
}
|
|
29
|
+
next();
|
|
30
|
+
});
|
|
31
|
+
PricingCompanyAnalysisPlanSchema.pre('findOneAndUpdate', function (next) {
|
|
32
|
+
const user = express_http_context_1.default.get('user');
|
|
33
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
34
|
+
if (user && !notUpdatedBy)
|
|
35
|
+
this._update.updatedBy = user._id;
|
|
36
|
+
next();
|
|
37
|
+
});
|
|
38
|
+
exports.default = PricingCompanyAnalysisPlanSchema;
|
|
@@ -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 { IPricingProjectAnalysis, IPricingProjectAnalysisModel } from '../types';
|
|
27
|
+
declare const PricingProjectAnalysisSchema: Schema<IPricingProjectAnalysis, IPricingProjectAnalysisModel, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IPricingProjectAnalysis>;
|
|
28
|
+
export default PricingProjectAnalysisSchema;
|
|
@@ -0,0 +1,41 @@
|
|
|
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 PricingProjectAnalysisSchema = new mongoose_1.Schema({
|
|
10
|
+
type: { type: String, required: true },
|
|
11
|
+
geography: { type: Number, required: true },
|
|
12
|
+
depth: { type: Number, required: true },
|
|
13
|
+
baseCreditCost: { type: Number, required: true, min: 0 },
|
|
14
|
+
baseCredit: { type: Number, required: true, min: 0 },
|
|
15
|
+
creditMultiplier: { type: Number, required: true, min: 0.1 },
|
|
16
|
+
finalCredit: { type: Number, required: true, min: 0 },
|
|
17
|
+
creditLimit: { type: Number, required: true, min: 0 },
|
|
18
|
+
createdBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
|
|
19
|
+
updatedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
|
|
20
|
+
createdDate: { type: Number },
|
|
21
|
+
updatedDate: { type: Number },
|
|
22
|
+
}, _config_1.schemaOptions);
|
|
23
|
+
PricingProjectAnalysisSchema.pre('save', function (next) {
|
|
24
|
+
const user = express_http_context_1.default.get('user');
|
|
25
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
26
|
+
if (user) {
|
|
27
|
+
if (!this.createdBy)
|
|
28
|
+
this.createdBy = user._id;
|
|
29
|
+
if (!notUpdatedBy)
|
|
30
|
+
this.updatedBy = user._id;
|
|
31
|
+
}
|
|
32
|
+
next();
|
|
33
|
+
});
|
|
34
|
+
PricingProjectAnalysisSchema.pre('findOneAndUpdate', function (next) {
|
|
35
|
+
const user = express_http_context_1.default.get('user');
|
|
36
|
+
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
37
|
+
if (user && !notUpdatedBy)
|
|
38
|
+
this._update.updatedBy = user._id;
|
|
39
|
+
next();
|
|
40
|
+
});
|
|
41
|
+
exports.default = PricingProjectAnalysisSchema;
|
|
@@ -0,0 +1,50 @@
|
|
|
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 } from './';
|
|
27
|
+
import { BaseModel, BaseSchema } from '../config';
|
|
28
|
+
export declare enum FileType {
|
|
29
|
+
CHAT = "chat",
|
|
30
|
+
PRESENTATION = "presentation",
|
|
31
|
+
DOCUMENT = "document",
|
|
32
|
+
IMAGE_AND_VIDEO = "imageAndVideo",
|
|
33
|
+
AUDIO = "audio"
|
|
34
|
+
}
|
|
35
|
+
export declare enum FileVisibility {
|
|
36
|
+
PRIVATE = "private",
|
|
37
|
+
COMPANY = "company"
|
|
38
|
+
}
|
|
39
|
+
export interface ICompanyFile extends BaseSchema {
|
|
40
|
+
fileName: string;
|
|
41
|
+
originalFileName: string;
|
|
42
|
+
fileSize: number;
|
|
43
|
+
fileType: FileType;
|
|
44
|
+
company: Types.ObjectId | ICompany;
|
|
45
|
+
projectNames: string[];
|
|
46
|
+
fileVisibility: FileVisibility;
|
|
47
|
+
s3FolderName: string;
|
|
48
|
+
}
|
|
49
|
+
export interface ICompanyFileModel extends BaseModel<ICompanyFile> {
|
|
50
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FileVisibility = exports.FileType = void 0;
|
|
4
|
+
var FileType;
|
|
5
|
+
(function (FileType) {
|
|
6
|
+
FileType["CHAT"] = "chat";
|
|
7
|
+
FileType["PRESENTATION"] = "presentation";
|
|
8
|
+
FileType["DOCUMENT"] = "document";
|
|
9
|
+
FileType["IMAGE_AND_VIDEO"] = "imageAndVideo";
|
|
10
|
+
FileType["AUDIO"] = "audio";
|
|
11
|
+
})(FileType || (exports.FileType = FileType = {}));
|
|
12
|
+
var FileVisibility;
|
|
13
|
+
(function (FileVisibility) {
|
|
14
|
+
FileVisibility["PRIVATE"] = "private";
|
|
15
|
+
FileVisibility["COMPANY"] = "company";
|
|
16
|
+
})(FileVisibility || (exports.FileVisibility = FileVisibility = {}));
|
package/dist/types/index.d.ts
CHANGED
|
@@ -98,4 +98,8 @@ import { IAiHrUploadedCandidate, IAiHrUploadedCandidateModel } from './ai-hr-upl
|
|
|
98
98
|
import { IEntityReference, IEntityReferenceModel } from './entity-reference.type';
|
|
99
99
|
import { IInterest, IInterestModel } from './interest.type';
|
|
100
100
|
import { ICompanyInterest, ICompanyInterestModel } from './company-interest.type';
|
|
101
|
-
|
|
101
|
+
import { ICompanyFile, ICompanyFileModel } from './company-file.type';
|
|
102
|
+
import { IPricingProjectAnalysis, IPricingProjectAnalysisModel } from './pricing-project-analysis.type';
|
|
103
|
+
import { IPricingAnalysisCreditUsage, IPricingAnalysisCreditUsageModel } from './pricing-analysis-credit-usage.type';
|
|
104
|
+
import { IPricingCompanyAnalysisPlan, IPricingCompanyAnalysisPlanModel } from './pricing-company-analysis-plan.type';
|
|
105
|
+
export { IAiConversation, IAiConversationModel, IAiAssistant, IAiAssistantModel, IAiConversationMessage, IAiConversationMessageModel, IAiConversationTrackingTask, IAiConversationTrackingTaskModel, IBackendError, IBackendErrorModel, IBookmark, IBookmarkModel, ICompany, ICompanyModel, ICompanyCluster, ICompanyClusterModel, ICompanyMarketing, ICompanyMarketingModel, ICompetitor, ICompetitorModel, ICompetitorAnalysis, ICompetitorAnalysisModel, IContactMessage, IContactMessageModel, IContactStartup, IContactStartupModel, IContent, IContentModel, IDraftVersion, IDraftVersionModel, IFaq, IFaqModel, IFeaturedTheme, IFeaturedThemeModel, IFollowContent, IFollowContentModel, IGeneralConfigSub, IGeneralConfigSubModel, IGeneralConfig, IGeneralConfigModel, IImage, IImageModel, IIndustry, IIndustryModel, IInvestor, IInvestorModel, ILike, ILikeModel, INews, INewsModel, INotification, INotificationModel, IOtp, IOtpModel, IPortiaArticle, IPortiaArticleModel, IProblem, IProblemModel, IRelatedTheme, IRelatedThemeModel, ISearchHistory, ISearchHistoryModel, ISFCategory, ISFCategoryModel, ISFSubCategory, ISFSubCategoryModel, ISFTag, ISFTagModel, ISparkUseCase, ISparkUseCaseModel, ISpark, ISparkModel, IStartupVectorAnyEntity, IStartupVectorAnyEntityModel, ISuggest, ISuggestModel, ITechnology, ITechnologyModel, ITheme, IThemeModel, IToken, ITokenModel, IUseCaseDiscovery, IUseCaseDiscoveryModel, IUseCaseDiscoveryProblem, IUseCaseDiscoveryProblemModel, IUseCase, IUseCaseModel, IUserToken, IUserTokenModel, IUserVisit, IUserVisitModel, IUser, IUserModel, ICompetitorGrid, ICompetitorGridModel, AIStatus, IHighlight, IHighlightModel, IHighlightNote, IHighlightNoteModel, INewsHub, INewsHubModel, ITeam, ITeamModel, ITeamMember, ITeamMemberModel, IAiTask, IAiTaskModel, IAiTaskSubmission, IAiTaskSubmissionModel, ICompanySubOrganizationModel, ICompanySubOrganization, IAiTaskResearchManagerOutput, IAiTaskResearchManagerOutputModel, IAiTaskOutline, IAiTaskOutlineModel, IAiTaskShare, IAiTaskShareModel, IBadge, IBadgeModel, IAiTopUseCase, IAiTopUseCaseModel, IAiUseCaseAnalysisNode, IAiUseCaseAnalysisNodeModel, IAiUseCaseAnalysis, IAiUseCaseAnalysisModel, IAiHrCandidate, IAiHrCandidateModel, IAiHrCandidateCompany, IAiHrCandidateCompanyModel, IBugReportModel, IBugReport, IAiTaskUseCaseRelatedUseCase, IAiTaskUseCaseRelatedUseCaseModel, IAiWeeklyInsight, IAiWeeklyInsightModel, IStrategyGameBoard, IStrategyGameBoardModel, IAiTaskPortiaArticleRelatedPortiaArticle, IAiTaskPortiaArticleRelatedPortiaArticleModel, IAiTaskNewsManagerOutput, IAiTaskNewsManagerOutputModel, IAiHrCandidateOutput, IAiHrCandidateOutputModel, IAiHrCandidateTopCandidate, IAiHrCandidateTopCandidateModel, IAiHrCandidateProfile, IAiHrCandidateProfileModel, IAiEntrapeerKnowledgeBase, IAiEntrapeerKnowledgeBaseModel, IAiTaskCurationManagerOutput, IAiTaskCurationManagerOutputModel, IAiTaskCompanyRelatedCompany, IAiTaskCompanyRelatedCompanyModel, IAiTaskResearchManagerOutputSummarySubmission, IAiTaskResearchManagerOutputSummarySubmissionModel, IAiTaskResearchManagerOutputSummary, IAiTaskResearchManagerOutputSummaryModel, IAiTaskResearchManagerOutputPresentationSubmission, IAiTaskResearchManagerOutputPresentationSubmissionModel, IAiTaskResearchManagerOutputPresentation, IAiTaskResearchManagerOutputPresentationModel, IAiHrAssessmentQuestion, IAiHrAssessmentQuestionModel, IAiHrAssessment, IAiHrAssessmentModel, IAiHrInterview, IAiHrInterviewModel, IAiHrInterviewQuestion, IAiHrInterviewQuestionModel, IAiHrNote, IAiHrNoteModel, IAiHrReportStat, IAiHrReportStatModel, IAiTaskResearchManagerOutputTranslationSubmission, IAiTaskResearchManagerOutputTranslationSubmissionModel, IPricingBaseCredit, IPricingBaseCreditModel, IPricingBaseCreditSub, IPricingBaseCreditSubModel, IPricingAdditionalBaseCredit, IPricingAdditionalBaseCreditModel, IPricingAiAssistantBaseCredit, IPricingAiAssistantBaseCreditModel, IPricingCompanyPlan, IPricingCompanyPlanModel, IPricingCompanyAiAssistantCredit, IPricingCompanyAiAssistantCreditModel, IAiAssistantCreditUsage, IAiAssistantCreditUsageModel, IAiHrFileUpload, IAiHrFileUploadModel, IAiHrUploadedCandidate, IAiHrUploadedCandidateModel, IEntityReference, IEntityReferenceModel, IInterest, IInterestModel, ICompanyInterest, ICompanyInterestModel, ICompanyFile, ICompanyFileModel, IPricingProjectAnalysis, IPricingProjectAnalysisModel, IPricingAnalysisCreditUsage, IPricingAnalysisCreditUsageModel, IPricingCompanyAnalysisPlan, IPricingCompanyAnalysisPlanModel, };
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
import { IPricingProjectAnalysis } from './pricing-project-analysis.type';
|
|
28
|
+
import { IPricingCompanyPlan } from './pricing-company-plan.type';
|
|
29
|
+
export declare enum PricingAnalysisCreditUsageType {
|
|
30
|
+
REFUND = "refund",
|
|
31
|
+
USAGE = "usage"
|
|
32
|
+
}
|
|
33
|
+
export interface IPricingAnalysisCreditSnapshot {
|
|
34
|
+
companyBaseCredit: number;
|
|
35
|
+
companyPriceMultiplier: number;
|
|
36
|
+
analysisBaseCredit: number;
|
|
37
|
+
analysisBaseCreditCost: number;
|
|
38
|
+
analysisCreditMultiplier: number;
|
|
39
|
+
analysisFinalCredit: number;
|
|
40
|
+
analysisCreditLimit: number;
|
|
41
|
+
}
|
|
42
|
+
export interface IPricingAnalysisCreditUsage extends BaseSchema {
|
|
43
|
+
projectAnalysis: Types.ObjectId | IPricingProjectAnalysis;
|
|
44
|
+
companyPlan: Types.ObjectId | IPricingCompanyPlan;
|
|
45
|
+
usage: number;
|
|
46
|
+
type: PricingAnalysisCreditUsageType;
|
|
47
|
+
creditSnapshot: IPricingAnalysisCreditSnapshot;
|
|
48
|
+
}
|
|
49
|
+
export interface IPricingAnalysisCreditUsageModel extends BaseModel<IPricingAnalysisCreditUsage> {
|
|
50
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PricingAnalysisCreditUsageType = void 0;
|
|
4
|
+
var PricingAnalysisCreditUsageType;
|
|
5
|
+
(function (PricingAnalysisCreditUsageType) {
|
|
6
|
+
PricingAnalysisCreditUsageType["REFUND"] = "refund";
|
|
7
|
+
PricingAnalysisCreditUsageType["USAGE"] = "usage";
|
|
8
|
+
})(PricingAnalysisCreditUsageType || (exports.PricingAnalysisCreditUsageType = PricingAnalysisCreditUsageType = {}));
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
import { IPricingProjectAnalysis } from './pricing-project-analysis.type';
|
|
28
|
+
import { ICompany } from './company.type';
|
|
29
|
+
export interface IPricingCompanyAnalysisPlan extends BaseSchema {
|
|
30
|
+
projectAnalysis: Types.ObjectId | IPricingProjectAnalysis;
|
|
31
|
+
totalCredit: number;
|
|
32
|
+
company: Types.ObjectId | ICompany;
|
|
33
|
+
baseCreditPrice: number;
|
|
34
|
+
priceMultiplier: number;
|
|
35
|
+
}
|
|
36
|
+
export interface IPricingCompanyAnalysisPlanModel extends BaseModel<IPricingCompanyAnalysisPlan> {
|
|
37
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseModel, BaseSchema } from '../config';
|
|
2
|
+
export interface IPricingProjectAnalysis extends BaseSchema {
|
|
3
|
+
type: string;
|
|
4
|
+
geography: number;
|
|
5
|
+
depth: number;
|
|
6
|
+
baseCreditCost: number;
|
|
7
|
+
baseCredit: number;
|
|
8
|
+
creditMultiplier: number;
|
|
9
|
+
finalCredit: number;
|
|
10
|
+
creditLimit: number;
|
|
11
|
+
}
|
|
12
|
+
export interface IPricingProjectAnalysisModel extends BaseModel<IPricingProjectAnalysis> {
|
|
13
|
+
}
|