@cool-digital-solutions/interferir-models 1.4.24 → 1.4.26

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.
@@ -235,7 +235,7 @@ const companySchema = new mongoose_1.Schema({
235
235
  customerPerspective: { type: String, default: '' },
236
236
  isWeeklyNewsletterActive: { type: Boolean, default: false },
237
237
  newsFeedAnalysis: { type: String, default: '' },
238
- questionPreferences: { type: String, default: '' },
238
+ questionPreference: { type: String, default: '' },
239
239
  createdBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
240
240
  updatedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
241
241
  updatedDate: { type: Number },
@@ -7,7 +7,7 @@ const mongoose_1 = require("mongoose");
7
7
  const express_http_context_1 = __importDefault(require("express-http-context"));
8
8
  const _config_1 = require("../config");
9
9
  const PricingCompanyAnalysisPlanSchema = new mongoose_1.Schema({
10
- projectAnalysis: { type: mongoose_1.Schema.Types.ObjectId, ref: 'PricingProjectAnalysis', required: true },
10
+ projectAnalysis: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'PricingProjectAnalysis', required: true }],
11
11
  totalCredit: { type: Number, required: true, min: 0 },
12
12
  company: { type: mongoose_1.Schema.Types.ObjectId, ref: 'Company', required: true },
13
13
  baseCreditPrice: { type: Number, required: true, min: 0 },
@@ -7,13 +7,15 @@ const mongoose_1 = require("mongoose");
7
7
  const express_http_context_1 = __importDefault(require("express-http-context"));
8
8
  const _config_1 = require("../config");
9
9
  const PricingProjectAnalysisSchema = new mongoose_1.Schema({
10
- name: { type: String, required: true },
11
- type: { type: String, required: true },
12
- geography: { type: Number, required: true },
13
- depth: { type: Number, required: true },
14
- baseCreditCost: { type: Number, required: true, min: 0 },
15
- baseCredit: { type: Number, required: true, min: 0 },
16
- creditMultiplier: { type: Number, required: true, min: 0.1 },
10
+ strategyHouseId: { type: mongoose_1.Schema.Types.ObjectId, required: true }, // from third api Strategy House ID
11
+ strategyHouseSnapshot: {
12
+ type: { type: String },
13
+ geography: { type: Number },
14
+ depth: { type: Number },
15
+ baseCreditCost: { type: Number, required: true, min: 0 },
16
+ name: { type: String, required: true },
17
+ },
18
+ creditMultiplier: { type: Number, required: true, min: 0.1, default: 1 },
17
19
  finalCredit: { type: Number, required: true, min: 0 },
18
20
  creditLimit: { type: Number, required: true, min: 0 },
19
21
  createdBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
@@ -283,7 +283,7 @@ export interface ICompany extends BaseSchema {
283
283
  creationSource: object[];
284
284
  customerPerspective: string;
285
285
  isWeeklyNewsletterActive: boolean;
286
- questionPreferences: string;
286
+ questionPreference: string;
287
287
  newsFeedAnalysis: string;
288
288
  }
289
289
  export interface ICompanyModel extends BaseModel<ICompany> {
@@ -33,7 +33,6 @@ export declare enum PricingAnalysisCreditUsageType {
33
33
  export interface IPricingAnalysisCreditSnapshot {
34
34
  companyBaseCredit: number;
35
35
  companyPriceMultiplier: number;
36
- analysisBaseCredit: number;
37
36
  analysisBaseCreditCost: number;
38
37
  analysisCreditMultiplier: number;
39
38
  analysisFinalCredit: number;
@@ -27,7 +27,7 @@ import { BaseModel, BaseSchema } from '../config';
27
27
  import { IPricingProjectAnalysis } from './pricing-project-analysis.type';
28
28
  import { ICompany } from './company.type';
29
29
  export interface IPricingCompanyAnalysisPlan extends BaseSchema {
30
- projectAnalysis: Types.ObjectId | IPricingProjectAnalysis;
30
+ projectAnalysis: Types.ObjectId[] | IPricingProjectAnalysis[];
31
31
  totalCredit: number;
32
32
  company: Types.ObjectId | ICompany;
33
33
  baseCreditPrice: number;
@@ -1,11 +1,38 @@
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" />
1
25
  import { BaseModel, BaseSchema } from '../config';
26
+ import { Types } from 'mongoose';
2
27
  export interface IPricingProjectAnalysis extends BaseSchema {
3
- name: string;
4
- type: string;
5
- geography: number;
6
- depth: number;
7
- baseCreditCost: number;
8
- baseCredit: number;
28
+ strategyHouseId: Types.ObjectId;
29
+ strategyHouseSnapshot: {
30
+ type: string;
31
+ geography: number;
32
+ depth: number;
33
+ baseCreditCost: number;
34
+ name: string;
35
+ };
9
36
  creditMultiplier: number;
10
37
  finalCredit: number;
11
38
  creditLimit: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cool-digital-solutions/interferir-models",
3
- "version": "1.4.24",
3
+ "version": "1.4.26",
4
4
  "main": "./dist/index.js",
5
5
  "files": [
6
6
  "dist/**/*"