gemcap-be-common 1.3.167 → 1.3.169
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/Appraiser.model.d.ts +1 -0
- package/models/Appraiser.model.js +4 -0
- package/models/Appraiser.model.ts +5 -0
- package/models/AppraiserContact.model.d.ts +3 -2
- package/models/AppraiserContact.model.js +8 -4
- package/models/AppraiserContact.model.ts +11 -6
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -10,6 +10,7 @@ const _models_1 = require("./_models");
|
|
|
10
10
|
exports.AppraiserValidationSchema = joi_1.default.object({
|
|
11
11
|
_id: joi_1.default.string(),
|
|
12
12
|
name: joi_1.default.string().required(),
|
|
13
|
+
speciality: joi_1.default.string().allow(''),
|
|
13
14
|
isDeleted: joi_1.default.boolean(),
|
|
14
15
|
order: joi_1.default.number().required().allow(null),
|
|
15
16
|
});
|
|
@@ -22,6 +23,9 @@ exports.AppraiserSchema = new mongoose_1.default.Schema({
|
|
|
22
23
|
type: String,
|
|
23
24
|
required: true,
|
|
24
25
|
},
|
|
26
|
+
speciality: {
|
|
27
|
+
type: String,
|
|
28
|
+
},
|
|
25
29
|
order: {
|
|
26
30
|
type: Number,
|
|
27
31
|
required: true,
|
|
@@ -6,6 +6,7 @@ import { MODEL_NAMES } from './_models';
|
|
|
6
6
|
export interface IAppraiser {
|
|
7
7
|
isDeleted: boolean;
|
|
8
8
|
name: string;
|
|
9
|
+
speciality?: string;
|
|
9
10
|
order?: number;
|
|
10
11
|
}
|
|
11
12
|
|
|
@@ -19,6 +20,7 @@ export interface IAppraiserDoc extends IAppraiser, Document {
|
|
|
19
20
|
export const AppraiserValidationSchema = Joi.object({
|
|
20
21
|
_id: Joi.string(),
|
|
21
22
|
name: Joi.string().required(),
|
|
23
|
+
speciality: Joi.string().allow(''),
|
|
22
24
|
isDeleted: Joi.boolean(),
|
|
23
25
|
order: Joi.number().required().allow (null),
|
|
24
26
|
});
|
|
@@ -35,6 +37,9 @@ export const AppraiserSchema = new mongoose.Schema<IAppraiser, AppraiserModel>(
|
|
|
35
37
|
type: String,
|
|
36
38
|
required: true,
|
|
37
39
|
},
|
|
40
|
+
speciality: {
|
|
41
|
+
type: String,
|
|
42
|
+
},
|
|
38
43
|
order: {
|
|
39
44
|
type: Number,
|
|
40
45
|
required: true,
|
|
@@ -28,8 +28,9 @@ export interface IAppraiserContact {
|
|
|
28
28
|
appraiserId: mongoose.Types.ObjectId;
|
|
29
29
|
isDeleted: boolean;
|
|
30
30
|
name: string;
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
title?: string;
|
|
32
|
+
email?: string[];
|
|
33
|
+
normalizedEmail?: string[];
|
|
33
34
|
phone?: string;
|
|
34
35
|
comment?: string;
|
|
35
36
|
order?: number;
|
|
@@ -11,7 +11,8 @@ exports.AppraiserContactValidationSchema = joi_1.default.object({
|
|
|
11
11
|
_id: joi_1.default.string(),
|
|
12
12
|
appraiserId: joi_1.default.string(),
|
|
13
13
|
name: joi_1.default.string().required(),
|
|
14
|
-
|
|
14
|
+
title: joi_1.default.string().allow(''),
|
|
15
|
+
email: joi_1.default.array().items(joi_1.default.string().email()).allow(null),
|
|
15
16
|
phone: joi_1.default.string().allow(''),
|
|
16
17
|
comment: joi_1.default.string().allow(''),
|
|
17
18
|
isDeleted: joi_1.default.boolean(),
|
|
@@ -31,14 +32,17 @@ exports.AppraiserContactSchema = new mongoose_1.default.Schema({
|
|
|
31
32
|
type: String,
|
|
32
33
|
required: true,
|
|
33
34
|
},
|
|
34
|
-
|
|
35
|
+
title: {
|
|
35
36
|
type: String,
|
|
36
37
|
},
|
|
38
|
+
email: {
|
|
39
|
+
type: [String],
|
|
40
|
+
},
|
|
37
41
|
normalizedEmail: {
|
|
38
|
-
type: String,
|
|
42
|
+
type: [String],
|
|
39
43
|
lowercase: true,
|
|
40
44
|
select: false,
|
|
41
|
-
unique: true,
|
|
45
|
+
// unique: true, // TODO potential issue with unique email normalization
|
|
42
46
|
},
|
|
43
47
|
phone: {
|
|
44
48
|
type: String,
|
|
@@ -7,8 +7,9 @@ export interface IAppraiserContact {
|
|
|
7
7
|
appraiserId: mongoose.Types.ObjectId;
|
|
8
8
|
isDeleted: boolean;
|
|
9
9
|
name: string;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
title?: string;
|
|
11
|
+
email?: string[];
|
|
12
|
+
normalizedEmail?: string[];
|
|
12
13
|
phone?: string;
|
|
13
14
|
comment?: string;
|
|
14
15
|
order?: number;
|
|
@@ -25,7 +26,8 @@ export const AppraiserContactValidationSchema = Joi.object({
|
|
|
25
26
|
_id: Joi.string(),
|
|
26
27
|
appraiserId: Joi.string(),
|
|
27
28
|
name: Joi.string().required(),
|
|
28
|
-
|
|
29
|
+
title: Joi.string().allow(''),
|
|
30
|
+
email: Joi.array().items(Joi.string().email()).allow(null),
|
|
29
31
|
phone: Joi.string().allow(''),
|
|
30
32
|
comment: Joi.string().allow(''),
|
|
31
33
|
isDeleted: Joi.boolean(),
|
|
@@ -49,14 +51,17 @@ export const AppraiserContactSchema = new mongoose.Schema<IAppraiserContact, App
|
|
|
49
51
|
type: String,
|
|
50
52
|
required: true,
|
|
51
53
|
},
|
|
52
|
-
|
|
54
|
+
title: {
|
|
53
55
|
type: String,
|
|
54
56
|
},
|
|
57
|
+
email: {
|
|
58
|
+
type: [String],
|
|
59
|
+
},
|
|
55
60
|
normalizedEmail: {
|
|
56
|
-
type: String,
|
|
61
|
+
type: [String],
|
|
57
62
|
lowercase: true,
|
|
58
63
|
select: false,
|
|
59
|
-
unique: true,
|
|
64
|
+
// unique: true, // TODO potential issue with unique email normalization
|
|
60
65
|
},
|
|
61
66
|
phone: {
|
|
62
67
|
type: String,
|