gemcap-be-common 1.3.57 → 1.3.59

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.
@@ -103,7 +103,6 @@ export interface ICRMProspectExternalInfo {
103
103
  export interface ICRMProspectExternalNew {
104
104
  isLocked: boolean;
105
105
  lastSentDate: Date;
106
- infoUpdatedAt: Date;
107
106
  info: ICRMProspectExternalInfo;
108
107
  }
109
108
  export declare enum EProspectFileGroups {
@@ -109,7 +109,6 @@ exports.initialFileGroups = initialFileGroups;
109
109
  const externalProspectInitialInfo = () => ({
110
110
  isLocked: false,
111
111
  lastSentDate: null,
112
- infoUpdatedAt: null,
113
112
  info: {
114
113
  stageOne: {
115
114
  companyLegalName: '',
@@ -269,7 +268,6 @@ exports.CRMProspectInfoExternalValidationSchema = joi_1.default.object({
269
268
  exports.CRMProspectInfoValidationSchema = joi_1.default.object({
270
269
  isLocked: joi_1.default.boolean().allow(null),
271
270
  lastSentDate: joi_1.default.date().allow(null),
272
- infoUpdatedAt: joi_1.default.date().allow(null),
273
271
  });
274
272
  exports.CRMProspectValidationSchema = joi_1.default.object({
275
273
  _id: joi_1.default.string(),
@@ -341,9 +339,6 @@ const CRMProspectInfoSchema = {
341
339
  lastSentDate: {
342
340
  type: Date,
343
341
  },
344
- infoUpdatedAt: {
345
- type: Date,
346
- },
347
342
  info: {
348
343
  stageOne: ProspectInfoStageOne_model_1.ProspectInfoStageOne,
349
344
  stageTwo: ProspectInfoStageTwo_model_1.ProspectInfoStageTwo,
@@ -118,7 +118,6 @@ export interface ICRMProspectExternalInfo {
118
118
  export interface ICRMProspectExternalNew {
119
119
  isLocked: boolean;
120
120
  lastSentDate: Date;
121
- infoUpdatedAt: Date;
122
121
  info: ICRMProspectExternalInfo;
123
122
  }
124
123
 
@@ -177,7 +176,6 @@ export const initialFileGroups = () => prospectFileGroups.reduce((acc, g) => {
177
176
  export const externalProspectInitialInfo = (): ICRMProspectExternalNew => ({
178
177
  isLocked: false,
179
178
  lastSentDate: null,
180
- infoUpdatedAt: null,
181
179
  info: {
182
180
  stageOne: {
183
181
  companyLegalName: '',
@@ -413,7 +411,6 @@ export const CRMProspectInfoExternalValidationSchema = Joi.object({
413
411
  export const CRMProspectInfoValidationSchema = Joi.object({
414
412
  isLocked: Joi.boolean().allow(null),
415
413
  lastSentDate: Joi.date().allow(null),
416
- infoUpdatedAt: Joi.date().allow(null),
417
414
  });
418
415
 
419
416
  export const CRMProspectValidationSchema = Joi.object({
@@ -491,9 +488,6 @@ const CRMProspectInfoSchema = {
491
488
  lastSentDate: {
492
489
  type: Date,
493
490
  },
494
- infoUpdatedAt: {
495
- type: Date,
496
- },
497
491
  info: {
498
492
  stageOne: ProspectInfoStageOne,
499
493
  stageTwo: ProspectInfoStageTwo,
@@ -0,0 +1,39 @@
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
+ import Joi from 'joi';
27
+ export interface IUnderwriter {
28
+ isDeleted: boolean;
29
+ name: string;
30
+ email: string;
31
+ order?: number;
32
+ userId?: mongoose.Types.ObjectId;
33
+ }
34
+ export interface IUnderwriterWithId extends IUnderwriter {
35
+ _id: string;
36
+ }
37
+ export declare const UnderwriterValidationSchema: Joi.ObjectSchema<any>;
38
+ export type UnderwriterModel = Model<IUnderwriter, object, object>;
39
+ export declare const Underwriter: UnderwriterModel;
@@ -0,0 +1,43 @@
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.Underwriter = exports.UnderwriterValidationSchema = void 0;
7
+ const mongoose_1 = __importDefault(require("mongoose"));
8
+ const joi_1 = __importDefault(require("joi"));
9
+ const _models_1 = require("./_models");
10
+ exports.UnderwriterValidationSchema = joi_1.default.object({
11
+ _id: joi_1.default.string(),
12
+ name: joi_1.default.string().required(),
13
+ email: joi_1.default.string(),
14
+ userId: joi_1.default.string(),
15
+ isDeleted: joi_1.default.boolean(),
16
+ order: joi_1.default.number().required().allow(null),
17
+ });
18
+ const UnderwriterSchema = new mongoose_1.default.Schema({
19
+ isDeleted: {
20
+ type: Boolean,
21
+ default: false,
22
+ },
23
+ name: {
24
+ type: String,
25
+ required: true,
26
+ },
27
+ order: {
28
+ type: Number,
29
+ required: true,
30
+ },
31
+ email: {
32
+ type: String,
33
+ },
34
+ userId: {
35
+ type: mongoose_1.default.Schema.Types.ObjectId,
36
+ ref: _models_1.MODEL_NAMES.users,
37
+ required: false,
38
+ },
39
+ }, {
40
+ timestamps: { createdAt: true, updatedAt: true },
41
+ versionKey: false,
42
+ });
43
+ exports.Underwriter = mongoose_1.default.model(_models_1.MODEL_NAMES.underwriters, UnderwriterSchema);
@@ -0,0 +1,58 @@
1
+ import mongoose, { Model } from 'mongoose';
2
+ import Joi from 'joi';
3
+
4
+ import { MODEL_NAMES } from './_models';
5
+
6
+ export interface IUnderwriter {
7
+ isDeleted: boolean;
8
+ name: string;
9
+ email: string;
10
+ order?: number;
11
+ userId?: mongoose.Types.ObjectId;
12
+ }
13
+
14
+ export interface IUnderwriterWithId extends IUnderwriter {
15
+ _id: string;
16
+ }
17
+
18
+ export const UnderwriterValidationSchema = Joi.object({
19
+ _id: Joi.string(),
20
+ name: Joi.string().required(),
21
+ email: Joi.string(),
22
+ userId: Joi.string(),
23
+ isDeleted: Joi.boolean(),
24
+ order: Joi.number().required().allow (null),
25
+ });
26
+
27
+ export type UnderwriterModel = Model<IUnderwriter, object, object>;
28
+
29
+ const UnderwriterSchema = new mongoose.Schema<IUnderwriter, UnderwriterModel>(
30
+ {
31
+ isDeleted: {
32
+ type: Boolean,
33
+ default: false,
34
+ },
35
+ name: {
36
+ type: String,
37
+ required: true,
38
+ },
39
+ order: {
40
+ type: Number,
41
+ required: true,
42
+ },
43
+ email: {
44
+ type: String,
45
+ },
46
+ userId: {
47
+ type: mongoose.Schema.Types.ObjectId,
48
+ ref: MODEL_NAMES.users,
49
+ required: false,
50
+ },
51
+ },
52
+ {
53
+ timestamps: { createdAt: true, updatedAt: true },
54
+ versionKey: false,
55
+ },
56
+ );
57
+
58
+ export const Underwriter = mongoose.model<IUnderwriter, UnderwriterModel>(MODEL_NAMES.underwriters, UnderwriterSchema);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemcap-be-common",
3
- "version": "1.3.57",
3
+ "version": "1.3.59",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {