@cool-digital-solutions/interferir-models 1.4.16 → 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/schemas/index.d.ts +4 -1
- package/dist/schemas/index.js +8 -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/index.d.ts +4 -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/schemas/index.d.ts
CHANGED
|
@@ -97,4 +97,7 @@ 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
|
-
|
|
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.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;
|
|
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"));
|
|
@@ -203,3 +204,9 @@ const company_interest_schema_1 = __importDefault(require("./company-interest.sc
|
|
|
203
204
|
exports.CompanyInterestSchema = company_interest_schema_1.default;
|
|
204
205
|
const company_file_schema_1 = __importDefault(require("./company-file.schema"));
|
|
205
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;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -99,4 +99,7 @@ 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
|
-
|
|
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
|
+
}
|