gemcap-be-common 1.3.74 → 1.3.76
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/models/CRMProspectInternalUpdate.model.d.ts +35 -0
- package/models/CRMProspectInternalUpdate.model.js +32 -0
- package/models/CRMProspectInternalUpdate.model.ts +43 -0
- package/models/_models.d.ts +1 -0
- package/models/_models.js +1 -0
- package/models/_models.ts +1 -0
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
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 mongoose, { Model } from 'mongoose';
|
|
26
|
+
export declare const PROSPECT_INTERNAL_UPDATE_TYPES: readonly ["created", "status_change", "is_declined", "files_update", "other"];
|
|
27
|
+
export type TProspectInternalUpdateType = typeof PROSPECT_INTERNAL_UPDATE_TYPES[number];
|
|
28
|
+
export interface IProspectInternalUpdate {
|
|
29
|
+
prospectId: mongoose.Types.ObjectId;
|
|
30
|
+
update: unknown;
|
|
31
|
+
type: TProspectInternalUpdateType;
|
|
32
|
+
updatedBy: string;
|
|
33
|
+
}
|
|
34
|
+
export type TProspectInternalUpdateModel = Model<IProspectInternalUpdate, object, object>;
|
|
35
|
+
export declare const ProspectInternalUpdate: TProspectInternalUpdateModel;
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
exports.ProspectInternalUpdate = exports.PROSPECT_INTERNAL_UPDATE_TYPES = void 0;
|
|
7
|
+
const mongoose_1 = __importDefault(require("mongoose"));
|
|
8
|
+
const _models_1 = require("./_models");
|
|
9
|
+
exports.PROSPECT_INTERNAL_UPDATE_TYPES = ['created', 'status_change', 'is_declined', 'files_update', 'other'];
|
|
10
|
+
const ProspectInternalUpdateSchema = new mongoose_1.default.Schema({
|
|
11
|
+
prospectId: {
|
|
12
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
13
|
+
ref: _models_1.MODEL_NAMES.CRMProspects,
|
|
14
|
+
required: true,
|
|
15
|
+
index: true,
|
|
16
|
+
},
|
|
17
|
+
type: {
|
|
18
|
+
type: String,
|
|
19
|
+
enum: exports.PROSPECT_INTERNAL_UPDATE_TYPES,
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
update: {
|
|
23
|
+
type: mongoose_1.default.Schema.Types.Mixed,
|
|
24
|
+
},
|
|
25
|
+
updatedBy: {
|
|
26
|
+
type: String,
|
|
27
|
+
},
|
|
28
|
+
}, {
|
|
29
|
+
timestamps: { createdAt: true, updatedAt: false },
|
|
30
|
+
versionKey: false,
|
|
31
|
+
});
|
|
32
|
+
exports.ProspectInternalUpdate = mongoose_1.default.model(_models_1.MODEL_NAMES.CRMProspectInternalUpdates, ProspectInternalUpdateSchema);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import mongoose, { Model } from 'mongoose';
|
|
2
|
+
|
|
3
|
+
import { MODEL_NAMES } from './_models';
|
|
4
|
+
|
|
5
|
+
export const PROSPECT_INTERNAL_UPDATE_TYPES = ['created', 'status_change', 'is_declined', 'files_update', 'other'] as const;
|
|
6
|
+
export type TProspectInternalUpdateType = typeof PROSPECT_INTERNAL_UPDATE_TYPES[number];
|
|
7
|
+
|
|
8
|
+
export interface IProspectInternalUpdate {
|
|
9
|
+
prospectId: mongoose.Types.ObjectId;
|
|
10
|
+
update: unknown;
|
|
11
|
+
type: TProspectInternalUpdateType;
|
|
12
|
+
updatedBy: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type TProspectInternalUpdateModel = Model<IProspectInternalUpdate, object, object>;
|
|
16
|
+
|
|
17
|
+
const ProspectInternalUpdateSchema = new mongoose.Schema<IProspectInternalUpdate, TProspectInternalUpdateModel>(
|
|
18
|
+
{
|
|
19
|
+
prospectId: {
|
|
20
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
21
|
+
ref: MODEL_NAMES.CRMProspects,
|
|
22
|
+
required: true,
|
|
23
|
+
index: true,
|
|
24
|
+
},
|
|
25
|
+
type: {
|
|
26
|
+
type: String,
|
|
27
|
+
enum: PROSPECT_INTERNAL_UPDATE_TYPES,
|
|
28
|
+
required: true,
|
|
29
|
+
},
|
|
30
|
+
update: {
|
|
31
|
+
type: mongoose.Schema.Types.Mixed,
|
|
32
|
+
},
|
|
33
|
+
updatedBy: {
|
|
34
|
+
type: String,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
timestamps: { createdAt: true, updatedAt: false },
|
|
39
|
+
versionKey: false,
|
|
40
|
+
},
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
export const ProspectInternalUpdate = mongoose.model<IProspectInternalUpdate, TProspectInternalUpdateModel>(MODEL_NAMES.CRMProspectInternalUpdates, ProspectInternalUpdateSchema);
|
package/models/_models.d.ts
CHANGED
package/models/_models.js
CHANGED
|
@@ -44,6 +44,7 @@ exports.MODEL_NAMES = {
|
|
|
44
44
|
CRMProspectIndustries: 'crm_prospect_industries',
|
|
45
45
|
CRMProspectSources: 'crm_prospect_sources',
|
|
46
46
|
CRMProspectExternalUpdates: 'crm_prospect_external_updates',
|
|
47
|
+
CRMProspectInternalUpdates: 'crm_prospect_internal_updates',
|
|
47
48
|
customerAPGroups: 'customerAPGroups',
|
|
48
49
|
customerGroups: 'customerGroups',
|
|
49
50
|
deletedRecords: 'deleted_records',
|
package/models/_models.ts
CHANGED
|
@@ -41,6 +41,7 @@ export const MODEL_NAMES = {
|
|
|
41
41
|
CRMProspectIndustries: 'crm_prospect_industries',
|
|
42
42
|
CRMProspectSources: 'crm_prospect_sources',
|
|
43
43
|
CRMProspectExternalUpdates: 'crm_prospect_external_updates',
|
|
44
|
+
CRMProspectInternalUpdates: 'crm_prospect_internal_updates',
|
|
44
45
|
customerAPGroups: 'customerAPGroups',
|
|
45
46
|
customerGroups: 'customerGroups',
|
|
46
47
|
deletedRecords: 'deleted_records',
|