@cool-digital-solutions/interferir-models 1.1.25 → 1.1.27
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/company.schema.js +1 -1
- package/dist/schemas/contact-startup.schema.js +1 -0
- package/dist/schemas/evidence.schema.js +1 -0
- package/dist/schemas/model-indexes.js +3 -0
- package/dist/schemas/portia-article.schema.js +1 -1
- package/dist/schemas/spark.schema.js +7 -1
- package/dist/schemas/use-case.schema.js +3 -3
- package/dist/schemas/user.schema.js +1 -1
- package/dist/types/spark.type.d.ts +13 -0
- package/dist/types/spark.type.js +8 -1
- package/package.json +1 -1
|
@@ -91,7 +91,7 @@ const companySchema = new mongoose_1.Schema({
|
|
|
91
91
|
},
|
|
92
92
|
newsCount: Number,
|
|
93
93
|
profileDetailUrls: [{ type: String, default: '' }],
|
|
94
|
-
acquiredBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'Company', default: null },
|
|
94
|
+
acquiredBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'Company', default: null, index: true },
|
|
95
95
|
about: { type: String, default: '' },
|
|
96
96
|
operatingStatus: { type: String, enum: Object.values(company_type_1.OperatingStatus) },
|
|
97
97
|
headquartersLocation: {
|
|
@@ -48,7 +48,7 @@ const portiaArticleSchema = new mongoose_1.Schema({
|
|
|
48
48
|
],
|
|
49
49
|
default: [],
|
|
50
50
|
},
|
|
51
|
-
companyReferences: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'Company' }],
|
|
51
|
+
companyReferences: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'Company', index: true }],
|
|
52
52
|
investors: [{ type: String, default: '' }],
|
|
53
53
|
hasUseCase: { type: Boolean, default: null },
|
|
54
54
|
},
|
|
@@ -11,7 +11,7 @@ const _config_1 = require("../config");
|
|
|
11
11
|
const sparkSchema = new mongoose_1.Schema({
|
|
12
12
|
companyName: { type: String, required: [true, 'companyName is required'] },
|
|
13
13
|
companyType: { type: String, required: [true, 'companyType is required'], enum: Object.values(company_type_1.CompanyTypes) },
|
|
14
|
-
refCompany: { type: mongoose_1.Schema.Types.ObjectId, ref: 'Company' },
|
|
14
|
+
refCompany: { type: mongoose_1.Schema.Types.ObjectId, ref: 'Company', index: true },
|
|
15
15
|
website: { type: String, default: '' },
|
|
16
16
|
useCaseSourceList: [{ type: String, required: [true, 'useCaseSource is required'] }],
|
|
17
17
|
themeList: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'Theme', index: true, default: null }],
|
|
@@ -49,6 +49,12 @@ const sparkSchema = new mongoose_1.Schema({
|
|
|
49
49
|
extraParameter: {
|
|
50
50
|
sendedNotWorkingAlertEmail: { type: Boolean, default: false },
|
|
51
51
|
},
|
|
52
|
+
cronJob: {
|
|
53
|
+
startDate: { type: Number, default: 0 },
|
|
54
|
+
endDate: { type: Number, default: 0 },
|
|
55
|
+
status: { type: String, enum: Object.values(spark_type_1.CronJobStatus), default: spark_type_1.CronJobStatus.PENDING },
|
|
56
|
+
message: [{ type: String, default: '' }],
|
|
57
|
+
},
|
|
52
58
|
rawContent: { type: String, default: '' },
|
|
53
59
|
createdBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
|
|
54
60
|
updatedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
|
|
@@ -33,10 +33,10 @@ const useCaseSchema = new mongoose_1.Schema({
|
|
|
33
33
|
url: { type: String, default: '' },
|
|
34
34
|
freeText: { type: String, default: '' },
|
|
35
35
|
evidence: { type: mongoose_1.Schema.Types.ObjectId, ref: 'Evidence', default: null },
|
|
36
|
-
startup: { type: mongoose_1.Schema.Types.ObjectId, ref: 'Company', default: null },
|
|
36
|
+
startup: { type: mongoose_1.Schema.Types.ObjectId, ref: 'Company', default: null, index: true },
|
|
37
37
|
},
|
|
38
|
-
actors: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'Company' }],
|
|
39
|
-
solutionProviderList: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'Company' }],
|
|
38
|
+
actors: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'Company', index: true }],
|
|
39
|
+
solutionProviderList: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'Company', index: true }],
|
|
40
40
|
geographyList: [{ type: String, required: [true, 'geographyList element is required!'] }],
|
|
41
41
|
relatedUseCaseList: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'UseCase' }],
|
|
42
42
|
newsCrawlingTagList: [
|
|
@@ -47,7 +47,7 @@ const userSchema = new mongoose_1.Schema({
|
|
|
47
47
|
lastCheckedCompetitorDate: { type: Number, default: 0 },
|
|
48
48
|
lastCheckCompetitorGridDate: { type: Number, default: 0 },
|
|
49
49
|
isSendWelcomeEmailForStartup: { type: Boolean, default: false },
|
|
50
|
-
company: { type: mongoose_1.Schema.Types.ObjectId, ref: 'Company', default: null },
|
|
50
|
+
company: { type: mongoose_1.Schema.Types.ObjectId, ref: 'Company', default: null, index: true },
|
|
51
51
|
createdBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
|
|
52
52
|
updatedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
|
|
53
53
|
updatedDate: { type: Number, index: -1 },
|
|
@@ -60,6 +60,12 @@ export declare enum SparkPriorityLevel {
|
|
|
60
60
|
high = 2,
|
|
61
61
|
urgent = 3
|
|
62
62
|
}
|
|
63
|
+
export declare enum CronJobStatus {
|
|
64
|
+
PENDING = "pending",
|
|
65
|
+
IN_PROGRESS = "inProgress",
|
|
66
|
+
COMPLETED = "completed",
|
|
67
|
+
FAILED = "failed"
|
|
68
|
+
}
|
|
63
69
|
interface EntramindResponseMessage {
|
|
64
70
|
message: string;
|
|
65
71
|
date: number;
|
|
@@ -69,6 +75,12 @@ interface Requester {
|
|
|
69
75
|
requesterId: Types.ObjectId[];
|
|
70
76
|
requesterType: SparkRequesterType;
|
|
71
77
|
}
|
|
78
|
+
interface CronJob {
|
|
79
|
+
startDate: number;
|
|
80
|
+
endDate: number;
|
|
81
|
+
status: CronJobStatus;
|
|
82
|
+
message: string[];
|
|
83
|
+
}
|
|
72
84
|
interface ExtraParameter {
|
|
73
85
|
sendedNotWorkingAlertEmail: boolean;
|
|
74
86
|
}
|
|
@@ -94,6 +106,7 @@ export interface ISpark extends BaseSchema {
|
|
|
94
106
|
autoPublish?: boolean;
|
|
95
107
|
extraParameter: ExtraParameter;
|
|
96
108
|
rawContent?: string;
|
|
109
|
+
cronJob: CronJob;
|
|
97
110
|
}
|
|
98
111
|
export interface GetAllSpark extends ISpark {
|
|
99
112
|
useCaseCount: number;
|
package/dist/types/spark.type.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SparkPriorityLevel = exports.SparkPriorityList = exports.SparkRequesterType = exports.EntramindStatusList = exports.SparkStatusList = void 0;
|
|
3
|
+
exports.CronJobStatus = exports.SparkPriorityLevel = exports.SparkPriorityList = exports.SparkRequesterType = exports.EntramindStatusList = exports.SparkStatusList = void 0;
|
|
4
4
|
var SparkStatusList;
|
|
5
5
|
(function (SparkStatusList) {
|
|
6
6
|
SparkStatusList["READY"] = "ready";
|
|
@@ -40,3 +40,10 @@ var SparkPriorityLevel;
|
|
|
40
40
|
SparkPriorityLevel[SparkPriorityLevel["high"] = 2] = "high";
|
|
41
41
|
SparkPriorityLevel[SparkPriorityLevel["urgent"] = 3] = "urgent";
|
|
42
42
|
})(SparkPriorityLevel || (exports.SparkPriorityLevel = SparkPriorityLevel = {}));
|
|
43
|
+
var CronJobStatus;
|
|
44
|
+
(function (CronJobStatus) {
|
|
45
|
+
CronJobStatus["PENDING"] = "pending";
|
|
46
|
+
CronJobStatus["IN_PROGRESS"] = "inProgress";
|
|
47
|
+
CronJobStatus["COMPLETED"] = "completed";
|
|
48
|
+
CronJobStatus["FAILED"] = "failed";
|
|
49
|
+
})(CronJobStatus || (exports.CronJobStatus = CronJobStatus = {}));
|