gemcap-be-common 1.4.93 → 1.4.96
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/BorrowerNote.model.d.ts +5 -3
- package/models/BorrowerNote.model.ts +5 -3
- package/models/CashAllocationProduct.model.d.ts +18 -30
- package/models/CashAllocationProduct.model.js +10 -6
- package/models/CashAllocationProduct.model.ts +18 -12
- package/models/_index.d.ts +3 -3
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -55,10 +55,12 @@ export interface IBorrowerNoteLean extends IBorrowerNote {
|
|
|
55
55
|
createdAt: Date;
|
|
56
56
|
updatedAt: Date;
|
|
57
57
|
}
|
|
58
|
-
export interface IBorrowerNotePlain extends IBorrowerNote {
|
|
58
|
+
export interface IBorrowerNotePlain extends Omit<IBorrowerNote, 'borrowerId' | 'subjectId'> {
|
|
59
59
|
_id: string;
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
borrowerId: string;
|
|
61
|
+
subjectId: string;
|
|
62
|
+
createdAt: string;
|
|
63
|
+
updatedAt: string;
|
|
62
64
|
}
|
|
63
65
|
export type BorrowerNoteModel = Model<IBorrowerNoteDoc>;
|
|
64
66
|
export declare const BorrowerNoteSchema: mongoose.Schema<IBorrowerNoteDoc, mongoose.Model<IBorrowerNoteDoc, any, any, any, mongoose.Document<unknown, any, IBorrowerNoteDoc> & IBorrowerNoteDoc & Required<{
|
|
@@ -40,10 +40,12 @@ export interface IBorrowerNoteLean extends IBorrowerNote {
|
|
|
40
40
|
updatedAt: Date;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
export interface IBorrowerNotePlain extends IBorrowerNote {
|
|
43
|
+
export interface IBorrowerNotePlain extends Omit<IBorrowerNote, 'borrowerId' | 'subjectId'> {
|
|
44
44
|
_id: string;
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
borrowerId: string;
|
|
46
|
+
subjectId: string;
|
|
47
|
+
createdAt: string;
|
|
48
|
+
updatedAt: string;
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
export type BorrowerNoteModel = Model<IBorrowerNoteDoc>;
|
|
@@ -50,64 +50,52 @@ export declare const AccountSchema: {
|
|
|
50
50
|
of: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
51
51
|
accountId1: {
|
|
52
52
|
type: typeof Schema.Types.Mixed;
|
|
53
|
-
required:
|
|
53
|
+
required: false;
|
|
54
54
|
validate: {
|
|
55
|
-
validator: (value:
|
|
56
|
-
message: (props:
|
|
57
|
-
value: mongoose.Types.ObjectId | 'BANK';
|
|
58
|
-
}) => string;
|
|
55
|
+
validator: (value: mongoose.Types.ObjectId | 'BANK' | null) => boolean;
|
|
56
|
+
message: (props: any) => string;
|
|
59
57
|
};
|
|
60
58
|
};
|
|
61
59
|
accountId2: {
|
|
62
60
|
type: typeof Schema.Types.Mixed;
|
|
63
|
-
required:
|
|
61
|
+
required: false;
|
|
64
62
|
validate: {
|
|
65
|
-
validator: (value:
|
|
66
|
-
message: (props:
|
|
67
|
-
value: mongoose.Types.ObjectId | 'BANK';
|
|
68
|
-
}) => string;
|
|
63
|
+
validator: (value: mongoose.Types.ObjectId | 'BANK' | null) => boolean;
|
|
64
|
+
message: (props: any) => string;
|
|
69
65
|
};
|
|
70
66
|
};
|
|
71
67
|
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
72
68
|
accountId1: {
|
|
73
69
|
type: typeof Schema.Types.Mixed;
|
|
74
|
-
required:
|
|
70
|
+
required: false;
|
|
75
71
|
validate: {
|
|
76
|
-
validator: (value:
|
|
77
|
-
message: (props:
|
|
78
|
-
value: mongoose.Types.ObjectId | 'BANK';
|
|
79
|
-
}) => string;
|
|
72
|
+
validator: (value: mongoose.Types.ObjectId | 'BANK' | null) => boolean;
|
|
73
|
+
message: (props: any) => string;
|
|
80
74
|
};
|
|
81
75
|
};
|
|
82
76
|
accountId2: {
|
|
83
77
|
type: typeof Schema.Types.Mixed;
|
|
84
|
-
required:
|
|
78
|
+
required: false;
|
|
85
79
|
validate: {
|
|
86
|
-
validator: (value:
|
|
87
|
-
message: (props:
|
|
88
|
-
value: mongoose.Types.ObjectId | 'BANK';
|
|
89
|
-
}) => string;
|
|
80
|
+
validator: (value: mongoose.Types.ObjectId | 'BANK' | null) => boolean;
|
|
81
|
+
message: (props: any) => string;
|
|
90
82
|
};
|
|
91
83
|
};
|
|
92
84
|
}>> & mongoose.FlatRecord<{
|
|
93
85
|
accountId1: {
|
|
94
86
|
type: typeof Schema.Types.Mixed;
|
|
95
|
-
required:
|
|
87
|
+
required: false;
|
|
96
88
|
validate: {
|
|
97
|
-
validator: (value:
|
|
98
|
-
message: (props:
|
|
99
|
-
value: mongoose.Types.ObjectId | 'BANK';
|
|
100
|
-
}) => string;
|
|
89
|
+
validator: (value: mongoose.Types.ObjectId | 'BANK' | null) => boolean;
|
|
90
|
+
message: (props: any) => string;
|
|
101
91
|
};
|
|
102
92
|
};
|
|
103
93
|
accountId2: {
|
|
104
94
|
type: typeof Schema.Types.Mixed;
|
|
105
|
-
required:
|
|
95
|
+
required: false;
|
|
106
96
|
validate: {
|
|
107
|
-
validator: (value:
|
|
108
|
-
message: (props:
|
|
109
|
-
value: mongoose.Types.ObjectId | 'BANK';
|
|
110
|
-
}) => string;
|
|
97
|
+
validator: (value: mongoose.Types.ObjectId | 'BANK' | null) => boolean;
|
|
98
|
+
message: (props: any) => string;
|
|
111
99
|
};
|
|
112
100
|
};
|
|
113
101
|
}> & {
|
|
@@ -31,22 +31,26 @@ exports.AccountSchema = {
|
|
|
31
31
|
of: new mongoose_1.Schema({
|
|
32
32
|
accountId1: {
|
|
33
33
|
type: mongoose_1.Schema.Types.Mixed,
|
|
34
|
-
required:
|
|
34
|
+
required: false,
|
|
35
35
|
validate: {
|
|
36
36
|
validator: function (value) {
|
|
37
|
-
return
|
|
37
|
+
return (value === null ||
|
|
38
|
+
mongoose_1.default.isValidObjectId(value) ||
|
|
39
|
+
value === 'BANK');
|
|
38
40
|
},
|
|
39
|
-
message: (props) => `${props.value} is not a valid ObjectId
|
|
41
|
+
message: (props) => `${props.value} is not a valid ObjectId, "BANK", or null`,
|
|
40
42
|
},
|
|
41
43
|
},
|
|
42
44
|
accountId2: {
|
|
43
45
|
type: mongoose_1.Schema.Types.Mixed,
|
|
44
|
-
required:
|
|
46
|
+
required: false,
|
|
45
47
|
validate: {
|
|
46
48
|
validator: function (value) {
|
|
47
|
-
return
|
|
49
|
+
return (value === null ||
|
|
50
|
+
mongoose_1.default.isValidObjectId(value) ||
|
|
51
|
+
value === 'BANK');
|
|
48
52
|
},
|
|
49
|
-
message: (props) => `${props.value} is not a valid ObjectId
|
|
53
|
+
message: (props) => `${props.value} is not a valid ObjectId, "BANK", or null`,
|
|
50
54
|
},
|
|
51
55
|
},
|
|
52
56
|
}),
|
|
@@ -32,26 +32,32 @@ export const AccountSchema = {
|
|
|
32
32
|
of: new Schema({
|
|
33
33
|
accountId1: {
|
|
34
34
|
type: Schema.Types.Mixed,
|
|
35
|
-
required:
|
|
35
|
+
required: false,
|
|
36
36
|
validate: {
|
|
37
|
-
validator: function(value:
|
|
38
|
-
return
|
|
37
|
+
validator: function (value: mongoose.Types.ObjectId | 'BANK' | null) {
|
|
38
|
+
return (
|
|
39
|
+
value === null ||
|
|
40
|
+
mongoose.isValidObjectId(value) ||
|
|
41
|
+
value === 'BANK'
|
|
42
|
+
);
|
|
39
43
|
},
|
|
40
|
-
message: (props:
|
|
41
|
-
value
|
|
42
|
-
}) => `${props.value} is not a valid ObjectId or "BANK"`,
|
|
44
|
+
message: (props: any) =>
|
|
45
|
+
`${props.value} is not a valid ObjectId, "BANK", or null`,
|
|
43
46
|
},
|
|
44
47
|
},
|
|
45
48
|
accountId2: {
|
|
46
49
|
type: Schema.Types.Mixed,
|
|
47
|
-
required:
|
|
50
|
+
required: false,
|
|
48
51
|
validate: {
|
|
49
|
-
validator: function(value:
|
|
50
|
-
return
|
|
52
|
+
validator: function (value: mongoose.Types.ObjectId | 'BANK' | null) {
|
|
53
|
+
return (
|
|
54
|
+
value === null ||
|
|
55
|
+
mongoose.isValidObjectId(value) ||
|
|
56
|
+
value === 'BANK'
|
|
57
|
+
);
|
|
51
58
|
},
|
|
52
|
-
message: (props:
|
|
53
|
-
value
|
|
54
|
-
}) => `${props.value} is not a valid ObjectId or "BANK"`,
|
|
59
|
+
message: (props: any) =>
|
|
60
|
+
`${props.value} is not a valid ObjectId, "BANK", or null`,
|
|
55
61
|
},
|
|
56
62
|
},
|
|
57
63
|
}),
|
package/models/_index.d.ts
CHANGED
|
@@ -31,8 +31,8 @@ export declare const allSchemas: {
|
|
|
31
31
|
createdAt: NativeDate;
|
|
32
32
|
updatedAt: NativeDate;
|
|
33
33
|
} & {
|
|
34
|
-
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
35
34
|
order: number;
|
|
35
|
+
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
36
36
|
apDate: Date;
|
|
37
37
|
amount: number;
|
|
38
38
|
__v?: number;
|
|
@@ -45,8 +45,8 @@ export declare const allSchemas: {
|
|
|
45
45
|
createdAt: NativeDate;
|
|
46
46
|
updatedAt: NativeDate;
|
|
47
47
|
} & {
|
|
48
|
-
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
49
48
|
order: number;
|
|
49
|
+
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
50
50
|
apDate: Date;
|
|
51
51
|
amount: number;
|
|
52
52
|
__v?: number;
|
|
@@ -59,8 +59,8 @@ export declare const allSchemas: {
|
|
|
59
59
|
createdAt: NativeDate;
|
|
60
60
|
updatedAt: NativeDate;
|
|
61
61
|
} & {
|
|
62
|
-
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
63
62
|
order: number;
|
|
63
|
+
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
64
64
|
apDate: Date;
|
|
65
65
|
amount: number;
|
|
66
66
|
__v?: number;
|