@cool-digital-solutions/interferir-models 1.0.12 → 1.0.13

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.
@@ -62,12 +62,19 @@ const portiaArticleSchema = new mongoose_1.Schema({
62
62
  score: { type: Number, default: 0 },
63
63
  },
64
64
  ],
65
- status: { type: String, enum: Object.values(_config_1.ContentStatus), required: [true, 'status is required!'], default: _config_1.ContentStatus.PUBLISH },
65
+ researches: [
66
+ {
67
+ researchId: { type: mongoose_1.Schema.Types.ObjectId, ref: 'Theme' },
68
+ score: { type: Number, default: 0 },
69
+ },
70
+ ],
71
+ status: { type: String, enum: Object.values(portia_article_type_1.PortiaArticleStatus), required: [true, 'status is required!'], default: portia_article_type_1.PortiaArticleStatus.PUBLISH },
66
72
  sfIndustries: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'Industry' }],
67
73
  sfTechnologies: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'Technology' }],
68
74
  sfCategories: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'SFCategory' }],
69
75
  sfSubCategories: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'SFSubCategory' }],
70
76
  sfTags: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'SFTag' }],
77
+ portiaApiResults: [{ message: { type: String, default: '' } }],
71
78
  createdBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
72
79
  updatedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
73
80
  updatedDate: { type: Number, index: -1 },
@@ -24,7 +24,7 @@
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  import { Types } from 'mongoose';
26
26
  import { ICompany, IImage, IIndustry, ITechnology, ISFCategory, ISFSubCategory, ISFTag } from './';
27
- import { BaseModel, BaseSchema, ContentStatus } from '../config';
27
+ import { BaseModel, BaseSchema } from '../config';
28
28
  export declare enum PortiaArticleTypes {
29
29
  NEWS = "news"
30
30
  }
@@ -55,6 +55,14 @@ export interface IPortiaAnalysis {
55
55
  companyReferences: Types.ObjectId[] | ICompany[];
56
56
  investors?: [String];
57
57
  }
58
+ export declare enum PortiaArticleStatus {
59
+ DRAFT = "draft",
60
+ PUBLISH = "publish",
61
+ PRIVATE = "private",
62
+ PRE_PUBLISH = "prePublish",
63
+ QUEUE = "queue",
64
+ FAILED = "failed"
65
+ }
58
66
  export interface IPortiaArticle extends BaseSchema {
59
67
  id?: Types.ObjectId;
60
68
  slug: string;
@@ -73,7 +81,7 @@ export interface IPortiaArticle extends BaseSchema {
73
81
  downloadDate: Number;
74
82
  analysisResult: IPortiaAnalysis;
75
83
  cardDescription?: String;
76
- status: ContentStatus;
84
+ status: PortiaArticleStatus;
77
85
  sfIndustries: Types.ObjectId[] | IIndustry[];
78
86
  sfTechnologies: Types.ObjectId[] | ITechnology[];
79
87
  sfCategories: Types.ObjectId[] | ISFCategory[];
@@ -83,6 +91,13 @@ export interface IPortiaArticle extends BaseSchema {
83
91
  instantResearchId: Types.ObjectId;
84
92
  score: number;
85
93
  }[];
94
+ researches: {
95
+ researchId: Types.ObjectId;
96
+ score: number;
97
+ }[];
98
+ portiaApiResults: {
99
+ message: string;
100
+ }[];
86
101
  }
87
102
  export interface IPortiaArticleModel extends BaseModel<IPortiaArticle> {
88
103
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PortiaArticleLanguages = exports.PortiaArticleCategories = exports.PortiaArticleTypes = void 0;
3
+ exports.PortiaArticleStatus = exports.PortiaArticleLanguages = exports.PortiaArticleCategories = exports.PortiaArticleTypes = void 0;
4
4
  var PortiaArticleTypes;
5
5
  (function (PortiaArticleTypes) {
6
6
  PortiaArticleTypes["NEWS"] = "news";
@@ -21,3 +21,12 @@ var PortiaArticleLanguages;
21
21
  (function (PortiaArticleLanguages) {
22
22
  PortiaArticleLanguages["ENGLISH"] = "en";
23
23
  })(PortiaArticleLanguages || (exports.PortiaArticleLanguages = PortiaArticleLanguages = {}));
24
+ var PortiaArticleStatus;
25
+ (function (PortiaArticleStatus) {
26
+ PortiaArticleStatus["DRAFT"] = "draft";
27
+ PortiaArticleStatus["PUBLISH"] = "publish";
28
+ PortiaArticleStatus["PRIVATE"] = "private";
29
+ PortiaArticleStatus["PRE_PUBLISH"] = "prePublish";
30
+ PortiaArticleStatus["QUEUE"] = "queue";
31
+ PortiaArticleStatus["FAILED"] = "failed";
32
+ })(PortiaArticleStatus || (exports.PortiaArticleStatus = PortiaArticleStatus = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cool-digital-solutions/interferir-models",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "main": "./dist/index.js",
5
5
  "files": [
6
6
  "dist/**/*"