gemcap-be-common 1.5.173 → 1.5.175
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 -1
- package/models/Appraiser.model.ts +1 -1
- package/models/AppraiserContact.model.d.ts +1 -1
- package/models/AppraiserContact.model.ts +1 -1
- package/models/FinancialSpreading.model.d.ts +1 -1
- package/models/FinancialSpreading.model.ts +1 -1
- package/models/LoanPayment.model.d.ts +1 -0
- package/models/LoanPayment.model.ts +3 -0
- package/models/ProspectExternalUpdate.model.d.ts +1 -1
- package/models/ProspectExternalUpdate.model.ts +1 -1
- package/models/ProspectInternalUpdate.model.d.ts +1 -1
- package/models/ProspectInternalUpdate.model.ts +1 -1
- package/models/ProspectLink.model.d.ts +1 -1
- package/models/ProspectLink.model.ts +1 -1
- package/models/ProspectSource.model.d.ts +1 -1
- package/models/ProspectSource.model.ts +1 -1
- package/models/QuickbooksAccount.model.d.ts +12 -3
- package/models/QuickbooksAccount.model.ts +14 -3
- package/models/_index.d.ts +3 -3
- package/package.json +1 -1
- package/services/borrowers.service.d.ts +2 -2
- package/services/compliance-borrowers.service.d.ts +1 -1
- package/services/quickbooks.service.d.ts +2 -2
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -37,7 +37,7 @@ export interface IAppraiserWithID extends IAppraiser {
|
|
|
37
37
|
export interface IAppraiserDoc extends IAppraiser, Document {
|
|
38
38
|
}
|
|
39
39
|
export declare const AppraiserValidationSchema: Joi.ObjectSchema<any>;
|
|
40
|
-
export type AppraiserModel = Model<IAppraiser
|
|
40
|
+
export type AppraiserModel = Model<IAppraiser>;
|
|
41
41
|
export declare const AppraiserSchema: mongoose.Schema<IAppraiser, AppraiserModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IAppraiser, mongoose.Document<unknown, {}, mongoose.FlatRecord<IAppraiser>> & mongoose.FlatRecord<IAppraiser> & {
|
|
42
42
|
_id: mongoose.Types.ObjectId;
|
|
43
43
|
}>;
|
|
@@ -27,7 +27,7 @@ export const AppraiserValidationSchema = Joi.object({
|
|
|
27
27
|
order: Joi.number().required().allow (null),
|
|
28
28
|
});
|
|
29
29
|
|
|
30
|
-
export type AppraiserModel = Model<IAppraiser
|
|
30
|
+
export type AppraiserModel = Model<IAppraiser>;
|
|
31
31
|
|
|
32
32
|
export const AppraiserSchema = new mongoose.Schema<IAppraiser, AppraiserModel>(
|
|
33
33
|
{
|
|
@@ -42,7 +42,7 @@ export interface IAppraiserContactWithID extends IAppraiserContact {
|
|
|
42
42
|
export interface IAppraiserContactDoc extends IAppraiserContact, Document {
|
|
43
43
|
}
|
|
44
44
|
export declare const AppraiserContactValidationSchema: Joi.ObjectSchema<any>;
|
|
45
|
-
export type AppraiserContactModel = Model<IAppraiserContact
|
|
45
|
+
export type AppraiserContactModel = Model<IAppraiserContact>;
|
|
46
46
|
export declare const AppraiserContactSchema: mongoose.Schema<IAppraiserContact, AppraiserContactModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IAppraiserContact, mongoose.Document<unknown, {}, mongoose.FlatRecord<IAppraiserContact>> & mongoose.FlatRecord<IAppraiserContact> & {
|
|
47
47
|
_id: mongoose.Types.ObjectId;
|
|
48
48
|
}>;
|
|
@@ -36,7 +36,7 @@ export const AppraiserContactValidationSchema = Joi.object({
|
|
|
36
36
|
order: Joi.number().required().allow(null),
|
|
37
37
|
});
|
|
38
38
|
|
|
39
|
-
export type AppraiserContactModel = Model<IAppraiserContact
|
|
39
|
+
export type AppraiserContactModel = Model<IAppraiserContact>;
|
|
40
40
|
|
|
41
41
|
export const AppraiserContactSchema = new mongoose.Schema<IAppraiserContact, AppraiserContactModel>(
|
|
42
42
|
{
|
|
@@ -87,7 +87,7 @@ export interface IFinancialSpreadingPlain extends Omit<IFinancialSpreading, 'bor
|
|
|
87
87
|
}
|
|
88
88
|
export declare const financialSpreadingViewValidationSchema: Joi.ObjectSchema<IFinancialSpreadingView>;
|
|
89
89
|
export declare const financialSpreadingParamsValidationSchema: Joi.ObjectSchema<IFinancialSpreadingParams>;
|
|
90
|
-
export type IFinancialSpreadingModel = Model<IFinancialSpreading
|
|
90
|
+
export type IFinancialSpreadingModel = Model<IFinancialSpreading>;
|
|
91
91
|
export declare const FinancialSpreadingSchema: mongoose.Schema<IFinancialSpreading, IFinancialSpreadingModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IFinancialSpreading, mongoose.Document<unknown, {}, mongoose.FlatRecord<IFinancialSpreading>> & mongoose.FlatRecord<IFinancialSpreading> & {
|
|
92
92
|
_id: mongoose.Types.ObjectId;
|
|
93
93
|
}>;
|
|
@@ -94,7 +94,7 @@ export const financialSpreadingParamsValidationSchema = Joi.object<IFinancialSpr
|
|
|
94
94
|
financialSpreadingType: Joi.string().valid(...Object.values(EFinancialSpreadingType)),
|
|
95
95
|
});
|
|
96
96
|
|
|
97
|
-
export type IFinancialSpreadingModel = Model<IFinancialSpreading
|
|
97
|
+
export type IFinancialSpreadingModel = Model<IFinancialSpreading>;
|
|
98
98
|
|
|
99
99
|
export const FinancialSpreadingSchema = new mongoose.Schema<IFinancialSpreading, IFinancialSpreadingModel>(
|
|
100
100
|
{
|
|
@@ -80,6 +80,7 @@ export interface ILoanPaymentWithId extends ILoanPayment {
|
|
|
80
80
|
}
|
|
81
81
|
export interface ILoanPaymentDoc extends ILoanPayment, Document {
|
|
82
82
|
}
|
|
83
|
+
export type TILoanPaymentModel = mongoose.Model<ILoanPayment>;
|
|
83
84
|
export declare const LoanPaymentSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
84
85
|
timestamps: true;
|
|
85
86
|
}, {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import mongoose, { Document } from 'mongoose';
|
|
2
2
|
|
|
3
3
|
import { MODEL_NAMES } from './_models';
|
|
4
|
+
import { IProductBroker } from './ProductBroker.model';
|
|
4
5
|
|
|
5
6
|
export const LOAN_PAYMENT_FIELDS = [
|
|
6
7
|
'_id',
|
|
@@ -74,6 +75,8 @@ export interface ILoanPaymentWithId extends ILoanPayment {
|
|
|
74
75
|
export interface ILoanPaymentDoc extends ILoanPayment, Document {
|
|
75
76
|
}
|
|
76
77
|
|
|
78
|
+
export type TILoanPaymentModel = mongoose.Model<ILoanPayment>;
|
|
79
|
+
|
|
77
80
|
export const LoanPaymentSchema = new mongoose.Schema(
|
|
78
81
|
{
|
|
79
82
|
date: {
|
|
@@ -31,7 +31,7 @@ export interface IProspectExternalUpdate {
|
|
|
31
31
|
type: TProspectUpdateType;
|
|
32
32
|
updatedBy: string;
|
|
33
33
|
}
|
|
34
|
-
export type TProspectExternalUpdateModel = Model<IProspectExternalUpdate
|
|
34
|
+
export type TProspectExternalUpdateModel = Model<IProspectExternalUpdate>;
|
|
35
35
|
export declare const ProspectExternalUpdateSchema: mongoose.Schema<IProspectExternalUpdate, TProspectExternalUpdateModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IProspectExternalUpdate, mongoose.Document<unknown, {}, mongoose.FlatRecord<IProspectExternalUpdate>> & mongoose.FlatRecord<IProspectExternalUpdate> & {
|
|
36
36
|
_id: mongoose.Types.ObjectId;
|
|
37
37
|
}>;
|
|
@@ -12,7 +12,7 @@ export interface IProspectExternalUpdate {
|
|
|
12
12
|
updatedBy: string;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
export type TProspectExternalUpdateModel = Model<IProspectExternalUpdate
|
|
15
|
+
export type TProspectExternalUpdateModel = Model<IProspectExternalUpdate>;
|
|
16
16
|
|
|
17
17
|
export const ProspectExternalUpdateSchema = new mongoose.Schema<IProspectExternalUpdate, TProspectExternalUpdateModel>(
|
|
18
18
|
{
|
|
@@ -31,7 +31,7 @@ export interface IProspectInternalUpdate {
|
|
|
31
31
|
type: TProspectInternalUpdateType;
|
|
32
32
|
updatedBy: string;
|
|
33
33
|
}
|
|
34
|
-
export type TProspectInternalUpdateModel = Model<IProspectInternalUpdate
|
|
34
|
+
export type TProspectInternalUpdateModel = Model<IProspectInternalUpdate>;
|
|
35
35
|
export declare const ProspectInternalUpdateSchema: mongoose.Schema<IProspectInternalUpdate, TProspectInternalUpdateModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IProspectInternalUpdate, mongoose.Document<unknown, {}, mongoose.FlatRecord<IProspectInternalUpdate>> & mongoose.FlatRecord<IProspectInternalUpdate> & {
|
|
36
36
|
_id: mongoose.Types.ObjectId;
|
|
37
37
|
}>;
|
|
@@ -12,7 +12,7 @@ export interface IProspectInternalUpdate {
|
|
|
12
12
|
updatedBy: string;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
export type TProspectInternalUpdateModel = Model<IProspectInternalUpdate
|
|
15
|
+
export type TProspectInternalUpdateModel = Model<IProspectInternalUpdate>;
|
|
16
16
|
|
|
17
17
|
export const ProspectInternalUpdateSchema = new mongoose.Schema<IProspectInternalUpdate, TProspectInternalUpdateModel>(
|
|
18
18
|
{
|
|
@@ -46,7 +46,7 @@ export interface ICRMProspectLinkWithPureLinks extends ICRMProspectLinkWithId {
|
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
export declare const ICRMProspectLinkValidationSchema: Joi.ObjectSchema<any>;
|
|
49
|
-
export type CRMProspectLinkModel = Model<ICRMProspectLink
|
|
49
|
+
export type CRMProspectLinkModel = Model<ICRMProspectLink>;
|
|
50
50
|
export declare const ProspectLinkSchema: mongoose.Schema<ICRMProspectLink, CRMProspectLinkModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, ICRMProspectLink, mongoose.Document<unknown, {}, mongoose.FlatRecord<ICRMProspectLink>> & mongoose.FlatRecord<ICRMProspectLink> & {
|
|
51
51
|
_id: mongoose.Types.ObjectId;
|
|
52
52
|
}>;
|
|
@@ -33,7 +33,7 @@ export const ICRMProspectLinkValidationSchema = Joi.object({
|
|
|
33
33
|
clientLinkId: Joi.string().required(),
|
|
34
34
|
});
|
|
35
35
|
|
|
36
|
-
export type CRMProspectLinkModel = Model<ICRMProspectLink
|
|
36
|
+
export type CRMProspectLinkModel = Model<ICRMProspectLink>;
|
|
37
37
|
|
|
38
38
|
export const ProspectLinkSchema = new mongoose.Schema<ICRMProspectLink, CRMProspectLinkModel>(
|
|
39
39
|
{
|
|
@@ -58,7 +58,7 @@ export interface ICRMProspectSourceWithId extends ICRMProspectSource {
|
|
|
58
58
|
_id: string;
|
|
59
59
|
}
|
|
60
60
|
export declare const CRMProspectSourceValidationSchema: Joi.ObjectSchema<any>;
|
|
61
|
-
export type CRMProspectSourceModel = mongoose.Model<ICRMProspectSource
|
|
61
|
+
export type CRMProspectSourceModel = mongoose.Model<ICRMProspectSource>;
|
|
62
62
|
export declare const CRMProspectSourceSchema: mongoose.Schema<ICRMProspectSource, CRMProspectSourceModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, ICRMProspectSource, mongoose.Document<unknown, {}, mongoose.FlatRecord<ICRMProspectSource>> & mongoose.FlatRecord<ICRMProspectSource> & {
|
|
63
63
|
_id: mongoose.Types.ObjectId;
|
|
64
64
|
}>;
|
|
@@ -51,7 +51,7 @@ export const CRMProspectSourceValidationSchema = Joi.object({
|
|
|
51
51
|
type: Joi.string().valid(...Object.values(EProspectSourceType), null).required(),
|
|
52
52
|
});
|
|
53
53
|
|
|
54
|
-
export type CRMProspectSourceModel = mongoose.Model<ICRMProspectSource
|
|
54
|
+
export type CRMProspectSourceModel = mongoose.Model<ICRMProspectSource>;
|
|
55
55
|
|
|
56
56
|
export const CRMProspectSourceSchema = new mongoose.Schema<ICRMProspectSource, CRMProspectSourceModel>(
|
|
57
57
|
{
|
|
@@ -35,9 +35,18 @@ export interface IQuickbooksAccount {
|
|
|
35
35
|
}
|
|
36
36
|
export interface IQuickbooksAccountDoc extends IQuickbooksAccount, Document {
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
export interface IQuickbooksAccountLean extends IQuickbooksAccount {
|
|
39
|
+
_id: mongoose.Types.ObjectId;
|
|
40
|
+
createdAt: Date;
|
|
41
|
+
updatedAt: Date;
|
|
42
|
+
}
|
|
43
|
+
export interface IQuickbooksAccountPlain extends Omit<IQuickbooksAccount, 'companyId'> {
|
|
44
|
+
_id: string;
|
|
45
|
+
companyId: string;
|
|
46
|
+
}
|
|
47
|
+
type TQuickbooksAccountModel = Model<IQuickbooksAccount>;
|
|
48
|
+
export declare const QuickbooksAccountSchema: mongoose.Schema<IQuickbooksAccount, TQuickbooksAccountModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IQuickbooksAccount, mongoose.Document<unknown, {}, mongoose.FlatRecord<IQuickbooksAccount>> & mongoose.FlatRecord<IQuickbooksAccount> & {
|
|
40
49
|
_id: mongoose.Types.ObjectId;
|
|
41
50
|
}>;
|
|
42
|
-
export declare const QuickbooksAccount:
|
|
51
|
+
export declare const QuickbooksAccount: TQuickbooksAccountModel;
|
|
43
52
|
export {};
|
|
@@ -25,9 +25,20 @@ export interface IQuickbooksAccount {
|
|
|
25
25
|
export interface IQuickbooksAccountDoc extends IQuickbooksAccount, Document {
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
export interface IQuickbooksAccountLean extends IQuickbooksAccount {
|
|
29
|
+
_id: mongoose.Types.ObjectId;
|
|
30
|
+
createdAt: Date;
|
|
31
|
+
updatedAt: Date;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface IQuickbooksAccountPlain extends Omit<IQuickbooksAccount, 'companyId'> {
|
|
35
|
+
_id: string;
|
|
36
|
+
companyId: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
type TQuickbooksAccountModel = Model<IQuickbooksAccount>;
|
|
29
40
|
|
|
30
|
-
export const QuickbooksAccountSchema = new mongoose.Schema<IQuickbooksAccount,
|
|
41
|
+
export const QuickbooksAccountSchema = new mongoose.Schema<IQuickbooksAccount, TQuickbooksAccountModel>(
|
|
31
42
|
{
|
|
32
43
|
companyId: {
|
|
33
44
|
type: mongoose.Schema.Types.ObjectId,
|
|
@@ -60,4 +71,4 @@ export const QuickbooksAccountSchema = new mongoose.Schema<IQuickbooksAccount, Q
|
|
|
60
71
|
{ timestamps: true },
|
|
61
72
|
);
|
|
62
73
|
|
|
63
|
-
export const QuickbooksAccount = mongoose.model<IQuickbooksAccount,
|
|
74
|
+
export const QuickbooksAccount = mongoose.model<IQuickbooksAccount, TQuickbooksAccountModel>(MODEL_NAMES.quickbooksAccounts, QuickbooksAccountSchema);
|
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
|
-
amount: number;
|
|
35
34
|
order: number;
|
|
35
|
+
amount: number;
|
|
36
36
|
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
37
37
|
apDate: Date;
|
|
38
38
|
__v?: number;
|
|
@@ -45,8 +45,8 @@ export declare const allSchemas: {
|
|
|
45
45
|
createdAt: NativeDate;
|
|
46
46
|
updatedAt: NativeDate;
|
|
47
47
|
} & {
|
|
48
|
-
amount: number;
|
|
49
48
|
order: number;
|
|
49
|
+
amount: number;
|
|
50
50
|
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
51
51
|
apDate: Date;
|
|
52
52
|
__v?: number;
|
|
@@ -59,8 +59,8 @@ export declare const allSchemas: {
|
|
|
59
59
|
createdAt: NativeDate;
|
|
60
60
|
updatedAt: NativeDate;
|
|
61
61
|
} & {
|
|
62
|
-
amount: number;
|
|
63
62
|
order: number;
|
|
63
|
+
amount: number;
|
|
64
64
|
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
65
65
|
apDate: Date;
|
|
66
66
|
__v?: number;
|
package/package.json
CHANGED
|
@@ -84,10 +84,10 @@ export declare class BorrowerService {
|
|
|
84
84
|
getBorrowerCodesMap(): Promise<Map<string, string>>;
|
|
85
85
|
getBorrowerStatementDetails(borrowers: IBorrowerDoc[]): Promise<{
|
|
86
86
|
[x: string]: {
|
|
87
|
-
SELECTED_PERIOD?: boolean;
|
|
88
|
-
ENTIRE_LOAN?: boolean;
|
|
89
87
|
LAST_MONTH?: boolean;
|
|
90
88
|
CURRENT_MONTH?: boolean;
|
|
89
|
+
ENTIRE_LOAN?: boolean;
|
|
90
|
+
SELECTED_PERIOD?: boolean;
|
|
91
91
|
TERM_LOAN?: boolean;
|
|
92
92
|
};
|
|
93
93
|
}>;
|
|
@@ -58,7 +58,7 @@ export declare class ComplianceBorrowersService {
|
|
|
58
58
|
isComplianceBorrowerAllowed(userAccess: IUserAccess, requestedBorrowerId: string): boolean;
|
|
59
59
|
calculateInstanceStatuses(instance: IBorrowerItemInstance, item: IBorrowerItemLean): IInstanceStatus;
|
|
60
60
|
getFullComplianceBorrowerById(complianceBorrowerId: string): Promise<IComplianceBorrowerDocumentFullWithStatuses>;
|
|
61
|
-
getAllBorrowersShortened(userAccess: IUserAccess): Promise<Pick<IComplianceBorrowerWithBorrower, "borrower" | "
|
|
61
|
+
getAllBorrowersShortened(userAccess: IUserAccess): Promise<Pick<IComplianceBorrowerWithBorrower, "borrower" | "items" | "fundingStatus">[]>;
|
|
62
62
|
generateInstances(complianceBorrowerId: any): Promise<IComplianceBorrowerDocumentFullWithStatuses>;
|
|
63
63
|
calculateAndUpdateFundingStatus(complianceBorrowerId: string): Promise<void>;
|
|
64
64
|
calculateFundingStatus(complianceBorrower: IComplianceBorrowerDocumentFull): string;
|
|
@@ -65,9 +65,9 @@ export declare class QuickbooksService {
|
|
|
65
65
|
})[]>;
|
|
66
66
|
saveAccounts(accounts: (IQuickbooksAccount & {
|
|
67
67
|
_id: string;
|
|
68
|
-
})[], deleteOld: boolean): Promise<(mongoose.Document<unknown,
|
|
68
|
+
})[], deleteOld: boolean): Promise<(mongoose.Document<unknown, {}, IQuickbooksAccount> & IQuickbooksAccount & {
|
|
69
69
|
_id: mongoose.Types.ObjectId;
|
|
70
|
-
}
|
|
70
|
+
})[]>;
|
|
71
71
|
getAllProducts(): Promise<any[]>;
|
|
72
72
|
getChargeTransactionsForAccrual(productIds: string[], reportDate: Date): Promise<import("../models/LoanStatementTransaction.model").ILoanStatementTransactionDoc[]>;
|
|
73
73
|
getChargeTransactionsForPayments(productIds: string[], reportDate: Date): Promise<import("../models/LoanStatementTransaction.model").ILoanStatementTransactionDoc[]>;
|