gemcap-be-common 1.3.167 → 1.3.168

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.
@@ -28,8 +28,10 @@ export interface IAppraiserContact {
28
28
  appraiserId: mongoose.Types.ObjectId;
29
29
  isDeleted: boolean;
30
30
  name: string;
31
- email?: string;
32
- normalizedEmail?: string;
31
+ title?: string;
32
+ speciality?: string;
33
+ email?: string[];
34
+ normalizedEmail?: string[];
33
35
  phone?: string;
34
36
  comment?: string;
35
37
  order?: number;
@@ -11,7 +11,9 @@ 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
- email: joi_1.default.string().allow(''),
14
+ title: joi_1.default.string().allow(''),
15
+ speciality: joi_1.default.string().allow(''),
16
+ email: joi_1.default.array().items(joi_1.default.string().email()).allow(null),
15
17
  phone: joi_1.default.string().allow(''),
16
18
  comment: joi_1.default.string().allow(''),
17
19
  isDeleted: joi_1.default.boolean(),
@@ -31,14 +33,20 @@ exports.AppraiserContactSchema = new mongoose_1.default.Schema({
31
33
  type: String,
32
34
  required: true,
33
35
  },
34
- email: {
36
+ title: {
35
37
  type: String,
36
38
  },
37
- normalizedEmail: {
39
+ speciality: {
38
40
  type: String,
41
+ },
42
+ email: {
43
+ type: [String],
44
+ },
45
+ normalizedEmail: {
46
+ type: [String],
39
47
  lowercase: true,
40
48
  select: false,
41
- unique: true,
49
+ // unique: true, // TODO potential issue with unique email normalization
42
50
  },
43
51
  phone: {
44
52
  type: String,
@@ -7,8 +7,10 @@ export interface IAppraiserContact {
7
7
  appraiserId: mongoose.Types.ObjectId;
8
8
  isDeleted: boolean;
9
9
  name: string;
10
- email?: string;
11
- normalizedEmail?: string;
10
+ title?: string;
11
+ speciality?: string;
12
+ email?: string[];
13
+ normalizedEmail?: string[];
12
14
  phone?: string;
13
15
  comment?: string;
14
16
  order?: number;
@@ -25,7 +27,9 @@ export const AppraiserContactValidationSchema = Joi.object({
25
27
  _id: Joi.string(),
26
28
  appraiserId: Joi.string(),
27
29
  name: Joi.string().required(),
28
- email: Joi.string().allow(''),
30
+ title: Joi.string().allow(''),
31
+ speciality: Joi.string().allow(''),
32
+ email: Joi.array().items(Joi.string().email()).allow(null),
29
33
  phone: Joi.string().allow(''),
30
34
  comment: Joi.string().allow(''),
31
35
  isDeleted: Joi.boolean(),
@@ -49,14 +53,20 @@ export const AppraiserContactSchema = new mongoose.Schema<IAppraiserContact, App
49
53
  type: String,
50
54
  required: true,
51
55
  },
52
- email: {
56
+ title: {
53
57
  type: String,
54
58
  },
55
- normalizedEmail: {
59
+ speciality: {
56
60
  type: String,
61
+ },
62
+ email: {
63
+ type: [String],
64
+ },
65
+ normalizedEmail: {
66
+ type: [String],
57
67
  lowercase: true,
58
68
  select: false,
59
- unique: true,
69
+ // unique: true, // TODO potential issue with unique email normalization
60
70
  },
61
71
  phone: {
62
72
  type: String,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemcap-be-common",
3
- "version": "1.3.167",
3
+ "version": "1.3.168",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {