gemcap-be-common 1.4.192 → 1.4.194
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/db/availability.db.d.ts +5 -5
- package/db/bbcDates.db.d.ts +6 -6
- package/models/AvailabilitySigns.model.d.ts +16 -2
- package/models/AvailabilitySigns.model.ts +18 -0
- package/models/BBCDate.model.d.ts +15 -0
- package/models/BBCDate.model.ts +18 -0
- package/models/InventoryAvailability.model.d.ts +6 -6
- package/models/InventoryAvailabilityItem.model.d.ts +3 -3
- package/models/InventoryItem.model.d.ts +3 -3
- package/models/LoanStatementStatus.model.d.ts +18 -5
- package/models/LoanStatementStatus.model.ts +18 -2
- package/models/ReceivableAvailability.model.d.ts +6 -6
- package/models/_index.d.ts +6 -6
- package/package.json +1 -1
- package/services/borrowers.service.d.ts +2 -2
- package/services/brokers.service.d.ts +2 -2
- package/services/collaterals.service.d.ts +1 -1
- package/services/loan-statement-status.service.d.ts +7 -5
- package/services/loan-transactions.service.d.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/db/availability.db.d.ts
CHANGED
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
import mongoose from 'mongoose';
|
|
26
26
|
import { IAvailabilitySignItem } from '../models/AvailabilitySigns.model';
|
|
27
27
|
import { IResult } from '../interfaces/result.interface';
|
|
28
|
-
export declare const findAvailabilitySignsByBBCDateId: (bbcDateId: string) => Promise<mongoose.FlattenMaps<import("../models/AvailabilitySigns.model").IAvailabilitySignDoc> & {
|
|
28
|
+
export declare const findAvailabilitySignsByBBCDateId: (bbcDateId: string) => Promise<mongoose.FlattenMaps<import("../models/AvailabilitySigns.model").IAvailabilitySignDoc> & Required<{
|
|
29
29
|
_id: mongoose.Types.ObjectId;
|
|
30
|
-
}
|
|
31
|
-
export declare const getAvailabilitySigns: (bbcDateIds: string[], repo?: mongoose.Model<import("../models/AvailabilitySigns.model").IAvailabilitySignDoc, {}, {}, {}, mongoose.Document<unknown, {}, import("../models/AvailabilitySigns.model").IAvailabilitySignDoc> & import("../models/AvailabilitySigns.model").IAvailabilitySignDoc & {
|
|
30
|
+
}>>;
|
|
31
|
+
export declare const getAvailabilitySigns: (bbcDateIds: string[], repo?: mongoose.Model<import("../models/AvailabilitySigns.model").IAvailabilitySignDoc, {}, {}, {}, mongoose.Document<unknown, {}, import("../models/AvailabilitySigns.model").IAvailabilitySignDoc> & import("../models/AvailabilitySigns.model").IAvailabilitySignDoc & Required<{
|
|
32
32
|
_id: mongoose.Types.ObjectId;
|
|
33
|
-
}
|
|
33
|
+
}>, any>) => Promise<(mongoose.FlattenMaps<import("../models/AvailabilitySigns.model").IAvailabilitySignDoc> & Required<{
|
|
34
34
|
_id: mongoose.Types.ObjectId;
|
|
35
|
-
})[]>;
|
|
35
|
+
}>)[]>;
|
|
36
36
|
export declare const addAvailabilitySign: (bbcDateId: string, sign: IAvailabilitySignItem) => Promise<IResult>;
|
|
37
37
|
export declare const updateAvailabilitySigns: (bbcDateId: string, signs: IAvailabilitySignItem[]) => Promise<void>;
|
package/db/bbcDates.db.d.ts
CHANGED
|
@@ -25,18 +25,18 @@
|
|
|
25
25
|
import mongoose from 'mongoose';
|
|
26
26
|
import { IBBCDateDoc } from '../models/BBCDate.model';
|
|
27
27
|
import { ECollaterals } from '../enums/collaterals.enum';
|
|
28
|
-
export declare const getBBCDateDoc: (bbcDateId: string) => Promise<mongoose.FlattenMaps<IBBCDateDoc> & {
|
|
28
|
+
export declare const getBBCDateDoc: (bbcDateId: string) => Promise<mongoose.FlattenMaps<IBBCDateDoc> & Required<{
|
|
29
29
|
_id: mongoose.Types.ObjectId;
|
|
30
|
-
}
|
|
30
|
+
}>>;
|
|
31
31
|
export declare const getBBCDatesByBorrower: (borrowerId: string, sortOrder?: 1 | -1) => Promise<IBBCDateDoc[]>;
|
|
32
|
-
export declare const getLatestBBCDates: (borrowerId: string, date?: Date, repo?: mongoose.Model<IBBCDateDoc, {}, {}, {}, mongoose.Document<unknown, {}, IBBCDateDoc> & IBBCDateDoc & {
|
|
32
|
+
export declare const getLatestBBCDates: (borrowerId: string, date?: Date, repo?: mongoose.Model<IBBCDateDoc, {}, {}, {}, mongoose.Document<unknown, {}, IBBCDateDoc> & IBBCDateDoc & Required<{
|
|
33
33
|
_id: mongoose.Types.ObjectId;
|
|
34
|
-
}
|
|
34
|
+
}>, any>) => Promise<IBBCDateDoc[]>;
|
|
35
35
|
export declare const getLatestSignedBBCDateDoc: (borrowerId: string, date?: Date) => Promise<IBBCDateDoc | null>;
|
|
36
36
|
export declare const getOlderBBCDates: (borrowerId: string, bbcDate: Date) => Promise<IBBCDateDoc[]>;
|
|
37
37
|
export declare const getBBCDates: (borrowerId: string, bbcDate: Date) => Promise<IBBCDateDoc[]>;
|
|
38
38
|
export declare const getBBCDatesForPeriod: (borrowerId: string, bbcDateStart: Date, bbcDateEnd: Date) => Promise<IBBCDateDoc[]>;
|
|
39
39
|
export declare const getBBCDatesByType: (borrowerId: string, collateralType: ECollaterals[]) => mongoose.Aggregate<IBBCDateDoc[]>;
|
|
40
|
-
export declare const createBBCDate: (borrowerId: string, bbcDate: Date) => Promise<mongoose.Document<unknown, {}, IBBCDateDoc> & IBBCDateDoc & {
|
|
40
|
+
export declare const createBBCDate: (borrowerId: string, bbcDate: Date) => Promise<mongoose.Document<unknown, {}, IBBCDateDoc> & IBBCDateDoc & Required<{
|
|
41
41
|
_id: mongoose.Types.ObjectId;
|
|
42
|
-
}
|
|
42
|
+
}>>;
|
|
@@ -64,6 +64,20 @@ export interface IAvailabilitySignView {
|
|
|
64
64
|
}
|
|
65
65
|
export interface IAvailabilitySignDoc extends IAvailabilitySign, mongoose.Document {
|
|
66
66
|
}
|
|
67
|
+
export interface IAvailabilitySignDoc extends IAvailabilitySign, mongoose.Document {
|
|
68
|
+
_id: mongoose.Types.ObjectId;
|
|
69
|
+
createdAt: Date;
|
|
70
|
+
updatedAt: Date;
|
|
71
|
+
}
|
|
72
|
+
export interface IAvailabilitySignLean extends IAvailabilitySign {
|
|
73
|
+
_id: mongoose.Types.ObjectId;
|
|
74
|
+
createdAt: Date;
|
|
75
|
+
updatedAt: Date;
|
|
76
|
+
}
|
|
77
|
+
export interface IAvailabilitySignPlain extends Omit<IAvailabilitySign, 'bbcDateId'> {
|
|
78
|
+
_id: string;
|
|
79
|
+
bbcDateId: string;
|
|
80
|
+
}
|
|
67
81
|
export declare const AvailabilitySignSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
68
82
|
timestamps: true;
|
|
69
83
|
}, {
|
|
@@ -108,6 +122,6 @@ export declare const AvailabilitySignSchema: mongoose.Schema<any, mongoose.Model
|
|
|
108
122
|
}> & {
|
|
109
123
|
_id: mongoose.Types.ObjectId;
|
|
110
124
|
}>;
|
|
111
|
-
export declare const AvailabilitySignsModel: mongoose.Model<IAvailabilitySignDoc, {}, {}, {}, mongoose.Document<unknown, {}, IAvailabilitySignDoc> & IAvailabilitySignDoc & {
|
|
125
|
+
export declare const AvailabilitySignsModel: mongoose.Model<IAvailabilitySignDoc, {}, {}, {}, mongoose.Document<unknown, {}, IAvailabilitySignDoc> & IAvailabilitySignDoc & Required<{
|
|
112
126
|
_id: mongoose.Types.ObjectId;
|
|
113
|
-
}
|
|
127
|
+
}>, any>;
|
|
@@ -2,6 +2,7 @@ import mongoose from 'mongoose';
|
|
|
2
2
|
|
|
3
3
|
import { IUser } from '../interfaces/auth-user.interface';
|
|
4
4
|
import { MODEL_NAMES } from './_models';
|
|
5
|
+
import { ILoanStatementStatus } from './LoanStatementStatus.model';
|
|
5
6
|
|
|
6
7
|
export const REQUIRED_SIGNS = 2;
|
|
7
8
|
|
|
@@ -51,6 +52,23 @@ export interface IAvailabilitySignView {
|
|
|
51
52
|
export interface IAvailabilitySignDoc extends IAvailabilitySign, mongoose.Document {
|
|
52
53
|
}
|
|
53
54
|
|
|
55
|
+
export interface IAvailabilitySignDoc extends IAvailabilitySign, mongoose.Document {
|
|
56
|
+
_id: mongoose.Types.ObjectId;
|
|
57
|
+
createdAt: Date;
|
|
58
|
+
updatedAt: Date;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface IAvailabilitySignLean extends IAvailabilitySign {
|
|
62
|
+
_id: mongoose.Types.ObjectId;
|
|
63
|
+
createdAt: Date;
|
|
64
|
+
updatedAt: Date;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface IAvailabilitySignPlain extends Omit<IAvailabilitySign, 'bbcDateId'> {
|
|
68
|
+
_id: string;
|
|
69
|
+
bbcDateId: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
54
72
|
export const AvailabilitySignSchema = new mongoose.Schema(
|
|
55
73
|
{
|
|
56
74
|
bbcDateId: {
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
25
|
import Joi from 'joi';
|
|
26
26
|
import mongoose, { Document } from 'mongoose';
|
|
27
|
+
import { ILoanStatementStatus } from './LoanStatementStatus.model';
|
|
27
28
|
export interface ICreateBBCDate {
|
|
28
29
|
date: Date;
|
|
29
30
|
inventory: boolean;
|
|
@@ -37,6 +38,20 @@ export interface IBBCDate {
|
|
|
37
38
|
}
|
|
38
39
|
export interface IBBCDateDoc extends IBBCDate, Document {
|
|
39
40
|
}
|
|
41
|
+
export interface IBBCDateDoc extends ILoanStatementStatus, mongoose.Document {
|
|
42
|
+
_id: mongoose.Types.ObjectId;
|
|
43
|
+
createdAt: Date;
|
|
44
|
+
updatedAt: Date;
|
|
45
|
+
}
|
|
46
|
+
export interface IBBCDateLean extends IBBCDate {
|
|
47
|
+
_id: mongoose.Types.ObjectId;
|
|
48
|
+
createdAt: Date;
|
|
49
|
+
updatedAt: Date;
|
|
50
|
+
}
|
|
51
|
+
export interface IBBCDatePlain extends Omit<IBBCDate, 'borrowerId'> {
|
|
52
|
+
_id: string;
|
|
53
|
+
borrowerId: string;
|
|
54
|
+
}
|
|
40
55
|
export declare const BBCDateSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
41
56
|
timestamps: true;
|
|
42
57
|
}, {
|
package/models/BBCDate.model.ts
CHANGED
|
@@ -2,6 +2,7 @@ import Joi from 'joi';
|
|
|
2
2
|
import mongoose, { Document } from 'mongoose';
|
|
3
3
|
|
|
4
4
|
import { MODEL_NAMES } from './_models';
|
|
5
|
+
import { ILoanStatementStatus } from './LoanStatementStatus.model';
|
|
5
6
|
|
|
6
7
|
const mongooseLeanId = require('../plugins/id.plugin');
|
|
7
8
|
|
|
@@ -27,6 +28,23 @@ export interface IBBCDate {
|
|
|
27
28
|
export interface IBBCDateDoc extends IBBCDate, Document {
|
|
28
29
|
}
|
|
29
30
|
|
|
31
|
+
export interface IBBCDateDoc extends ILoanStatementStatus, mongoose.Document {
|
|
32
|
+
_id: mongoose.Types.ObjectId;
|
|
33
|
+
createdAt: Date;
|
|
34
|
+
updatedAt: Date;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface IBBCDateLean extends IBBCDate {
|
|
38
|
+
_id: mongoose.Types.ObjectId;
|
|
39
|
+
createdAt: Date;
|
|
40
|
+
updatedAt: Date;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface IBBCDatePlain extends Omit<IBBCDate, 'borrowerId'> {
|
|
44
|
+
_id: string;
|
|
45
|
+
borrowerId: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
30
48
|
export const BBCDateSchema = new mongoose.Schema(
|
|
31
49
|
{
|
|
32
50
|
borrowerId: {
|
|
@@ -88,8 +88,9 @@ export declare const InventoryAvailabilityScheme: mongoose.Schema<any, mongoose.
|
|
|
88
88
|
createdAt: NativeDate;
|
|
89
89
|
updatedAt: NativeDate;
|
|
90
90
|
} & {
|
|
91
|
-
bbcDateId: mongoose.Types.ObjectId;
|
|
92
91
|
borrowerId: mongoose.Types.ObjectId;
|
|
92
|
+
bbcDateId: mongoose.Types.ObjectId;
|
|
93
|
+
status: string;
|
|
93
94
|
summary: mongoose.Types.DocumentArray<{
|
|
94
95
|
order: number;
|
|
95
96
|
advanceRate: number;
|
|
@@ -99,7 +100,6 @@ export declare const InventoryAvailabilityScheme: mongoose.Schema<any, mongoose.
|
|
|
99
100
|
totalQty: number;
|
|
100
101
|
totalValue: number;
|
|
101
102
|
}>;
|
|
102
|
-
status: string;
|
|
103
103
|
useManualInputs: boolean;
|
|
104
104
|
filters: mongoose.Types.DocumentArray<{
|
|
105
105
|
active: boolean;
|
|
@@ -121,8 +121,9 @@ export declare const InventoryAvailabilityScheme: mongoose.Schema<any, mongoose.
|
|
|
121
121
|
createdAt: NativeDate;
|
|
122
122
|
updatedAt: NativeDate;
|
|
123
123
|
} & {
|
|
124
|
-
bbcDateId: mongoose.Types.ObjectId;
|
|
125
124
|
borrowerId: mongoose.Types.ObjectId;
|
|
125
|
+
bbcDateId: mongoose.Types.ObjectId;
|
|
126
|
+
status: string;
|
|
126
127
|
summary: mongoose.Types.DocumentArray<{
|
|
127
128
|
order: number;
|
|
128
129
|
advanceRate: number;
|
|
@@ -132,7 +133,6 @@ export declare const InventoryAvailabilityScheme: mongoose.Schema<any, mongoose.
|
|
|
132
133
|
totalQty: number;
|
|
133
134
|
totalValue: number;
|
|
134
135
|
}>;
|
|
135
|
-
status: string;
|
|
136
136
|
useManualInputs: boolean;
|
|
137
137
|
filters: mongoose.Types.DocumentArray<{
|
|
138
138
|
active: boolean;
|
|
@@ -154,8 +154,9 @@ export declare const InventoryAvailabilityScheme: mongoose.Schema<any, mongoose.
|
|
|
154
154
|
createdAt: NativeDate;
|
|
155
155
|
updatedAt: NativeDate;
|
|
156
156
|
} & {
|
|
157
|
-
bbcDateId: mongoose.Types.ObjectId;
|
|
158
157
|
borrowerId: mongoose.Types.ObjectId;
|
|
158
|
+
bbcDateId: mongoose.Types.ObjectId;
|
|
159
|
+
status: string;
|
|
159
160
|
summary: mongoose.Types.DocumentArray<{
|
|
160
161
|
order: number;
|
|
161
162
|
advanceRate: number;
|
|
@@ -165,7 +166,6 @@ export declare const InventoryAvailabilityScheme: mongoose.Schema<any, mongoose.
|
|
|
165
166
|
totalQty: number;
|
|
166
167
|
totalValue: number;
|
|
167
168
|
}>;
|
|
168
|
-
status: string;
|
|
169
169
|
useManualInputs: boolean;
|
|
170
170
|
filters: mongoose.Types.DocumentArray<{
|
|
171
171
|
active: boolean;
|
|
@@ -48,8 +48,8 @@ export declare const InventoryAvailabilityItemScheme: mongoose.Schema<any, mongo
|
|
|
48
48
|
createdAt: NativeDate;
|
|
49
49
|
updatedAt: NativeDate;
|
|
50
50
|
} & {
|
|
51
|
-
order: number;
|
|
52
51
|
unique: boolean;
|
|
52
|
+
order: number;
|
|
53
53
|
inventoryAvailabilityId: mongoose.Types.ObjectId;
|
|
54
54
|
inventoryId: mongoose.Types.ObjectId;
|
|
55
55
|
matched: boolean;
|
|
@@ -64,8 +64,8 @@ export declare const InventoryAvailabilityItemScheme: mongoose.Schema<any, mongo
|
|
|
64
64
|
createdAt: NativeDate;
|
|
65
65
|
updatedAt: NativeDate;
|
|
66
66
|
} & {
|
|
67
|
-
order: number;
|
|
68
67
|
unique: boolean;
|
|
68
|
+
order: number;
|
|
69
69
|
inventoryAvailabilityId: mongoose.Types.ObjectId;
|
|
70
70
|
inventoryId: mongoose.Types.ObjectId;
|
|
71
71
|
matched: boolean;
|
|
@@ -80,8 +80,8 @@ export declare const InventoryAvailabilityItemScheme: mongoose.Schema<any, mongo
|
|
|
80
80
|
createdAt: NativeDate;
|
|
81
81
|
updatedAt: NativeDate;
|
|
82
82
|
} & {
|
|
83
|
-
order: number;
|
|
84
83
|
unique: boolean;
|
|
84
|
+
order: number;
|
|
85
85
|
inventoryAvailabilityId: mongoose.Types.ObjectId;
|
|
86
86
|
inventoryId: mongoose.Types.ObjectId;
|
|
87
87
|
matched: boolean;
|
|
@@ -71,9 +71,9 @@ export declare const InventoryItemSchema: mongoose.Schema<any, mongoose.Model<an
|
|
|
71
71
|
createdAt: NativeDate;
|
|
72
72
|
updatedAt: NativeDate;
|
|
73
73
|
} & {
|
|
74
|
+
value: number;
|
|
74
75
|
bbcSheetId: mongoose.Types.ObjectId;
|
|
75
76
|
order: number;
|
|
76
|
-
value: number;
|
|
77
77
|
skuDate: Date;
|
|
78
78
|
category: string;
|
|
79
79
|
sku: string;
|
|
@@ -93,9 +93,9 @@ export declare const InventoryItemSchema: mongoose.Schema<any, mongoose.Model<an
|
|
|
93
93
|
createdAt: NativeDate;
|
|
94
94
|
updatedAt: NativeDate;
|
|
95
95
|
} & {
|
|
96
|
+
value: number;
|
|
96
97
|
bbcSheetId: mongoose.Types.ObjectId;
|
|
97
98
|
order: number;
|
|
98
|
-
value: number;
|
|
99
99
|
skuDate: Date;
|
|
100
100
|
category: string;
|
|
101
101
|
sku: string;
|
|
@@ -115,9 +115,9 @@ export declare const InventoryItemSchema: mongoose.Schema<any, mongoose.Model<an
|
|
|
115
115
|
createdAt: NativeDate;
|
|
116
116
|
updatedAt: NativeDate;
|
|
117
117
|
} & {
|
|
118
|
+
value: number;
|
|
118
119
|
bbcSheetId: mongoose.Types.ObjectId;
|
|
119
120
|
order: number;
|
|
120
|
-
value: number;
|
|
121
121
|
skuDate: Date;
|
|
122
122
|
category: string;
|
|
123
123
|
sku: string;
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
-
import mongoose
|
|
25
|
+
import mongoose from 'mongoose';
|
|
26
26
|
import { ISelectedMonth } from '../helpers/date.helper';
|
|
27
27
|
export interface ILoanStatementStatus extends ISelectedMonth {
|
|
28
28
|
productId: mongoose.Types.ObjectId;
|
|
@@ -30,8 +30,21 @@ export interface ILoanStatementStatus extends ISelectedMonth {
|
|
|
30
30
|
locked: boolean;
|
|
31
31
|
lastCalculated: Date;
|
|
32
32
|
}
|
|
33
|
-
export interface ILoanStatementStatusDoc extends ILoanStatementStatus, Document {
|
|
33
|
+
export interface ILoanStatementStatusDoc extends ILoanStatementStatus, mongoose.Document {
|
|
34
|
+
_id: mongoose.Types.ObjectId;
|
|
35
|
+
createdAt: Date;
|
|
36
|
+
updatedAt: Date;
|
|
37
|
+
}
|
|
38
|
+
export interface ILoanStatementStatusLean extends ILoanStatementStatus {
|
|
39
|
+
_id: mongoose.Types.ObjectId;
|
|
40
|
+
createdAt: Date;
|
|
41
|
+
updatedAt: Date;
|
|
34
42
|
}
|
|
43
|
+
export interface ILoanStatementStatusPlain extends Omit<ILoanStatementStatus, 'productId'> {
|
|
44
|
+
_id: string;
|
|
45
|
+
productId: string;
|
|
46
|
+
}
|
|
47
|
+
export type TLoanStatementStatusModel = mongoose.Model<ILoanStatementStatus>;
|
|
35
48
|
export declare const LoanStatementStatusSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
36
49
|
timestamps: true;
|
|
37
50
|
}, {
|
|
@@ -41,10 +54,10 @@ export declare const LoanStatementStatusSchema: mongoose.Schema<any, mongoose.Mo
|
|
|
41
54
|
productId: mongoose.Types.ObjectId;
|
|
42
55
|
year: number;
|
|
43
56
|
month: number;
|
|
44
|
-
__v?: number;
|
|
45
57
|
actual?: boolean;
|
|
46
58
|
locked?: boolean;
|
|
47
59
|
lastCalculated?: Date;
|
|
60
|
+
__v?: number;
|
|
48
61
|
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
49
62
|
createdAt: NativeDate;
|
|
50
63
|
updatedAt: NativeDate;
|
|
@@ -52,10 +65,10 @@ export declare const LoanStatementStatusSchema: mongoose.Schema<any, mongoose.Mo
|
|
|
52
65
|
productId: mongoose.Types.ObjectId;
|
|
53
66
|
year: number;
|
|
54
67
|
month: number;
|
|
55
|
-
__v?: number;
|
|
56
68
|
actual?: boolean;
|
|
57
69
|
locked?: boolean;
|
|
58
70
|
lastCalculated?: Date;
|
|
71
|
+
__v?: number;
|
|
59
72
|
}>> & mongoose.FlatRecord<{
|
|
60
73
|
createdAt: NativeDate;
|
|
61
74
|
updatedAt: NativeDate;
|
|
@@ -63,10 +76,10 @@ export declare const LoanStatementStatusSchema: mongoose.Schema<any, mongoose.Mo
|
|
|
63
76
|
productId: mongoose.Types.ObjectId;
|
|
64
77
|
year: number;
|
|
65
78
|
month: number;
|
|
66
|
-
__v?: number;
|
|
67
79
|
actual?: boolean;
|
|
68
80
|
locked?: boolean;
|
|
69
81
|
lastCalculated?: Date;
|
|
82
|
+
__v?: number;
|
|
70
83
|
}> & {
|
|
71
84
|
_id: mongoose.Types.ObjectId;
|
|
72
85
|
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import mongoose
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
2
|
|
|
3
3
|
import { MODEL_NAMES } from './_models';
|
|
4
4
|
import { ISelectedMonth } from '../helpers/date.helper';
|
|
@@ -10,9 +10,25 @@ export interface ILoanStatementStatus extends ISelectedMonth {
|
|
|
10
10
|
lastCalculated: Date;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
export interface ILoanStatementStatusDoc extends ILoanStatementStatus, Document {
|
|
13
|
+
export interface ILoanStatementStatusDoc extends ILoanStatementStatus, mongoose.Document {
|
|
14
|
+
_id: mongoose.Types.ObjectId;
|
|
15
|
+
createdAt: Date;
|
|
16
|
+
updatedAt: Date;
|
|
14
17
|
}
|
|
15
18
|
|
|
19
|
+
export interface ILoanStatementStatusLean extends ILoanStatementStatus {
|
|
20
|
+
_id: mongoose.Types.ObjectId;
|
|
21
|
+
createdAt: Date;
|
|
22
|
+
updatedAt: Date;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface ILoanStatementStatusPlain extends Omit<ILoanStatementStatus, 'productId'> {
|
|
26
|
+
_id: string;
|
|
27
|
+
productId: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type TLoanStatementStatusModel = mongoose.Model<ILoanStatementStatus>;
|
|
31
|
+
|
|
16
32
|
export const LoanStatementStatusSchema = new mongoose.Schema(
|
|
17
33
|
{
|
|
18
34
|
year: {
|
|
@@ -184,10 +184,11 @@ export declare const AvailabilitySchema: mongoose.Schema<any, mongoose.Model<any
|
|
|
184
184
|
createdAt: NativeDate;
|
|
185
185
|
updatedAt: NativeDate;
|
|
186
186
|
} & {
|
|
187
|
-
bbcDateId: mongoose.Types.ObjectId;
|
|
188
187
|
borrowerId: mongoose.Types.ObjectId;
|
|
188
|
+
bbcDateId: mongoose.Types.ObjectId;
|
|
189
189
|
useManualInputs: boolean;
|
|
190
190
|
__v?: number;
|
|
191
|
+
actual?: boolean;
|
|
191
192
|
summary?: {
|
|
192
193
|
invoiceAmount: number;
|
|
193
194
|
creditNotes: number;
|
|
@@ -210,7 +211,6 @@ export declare const AvailabilitySchema: mongoose.Schema<any, mongoose.Model<any
|
|
|
210
211
|
ARReserves: number;
|
|
211
212
|
ARAvailability: number;
|
|
212
213
|
};
|
|
213
|
-
actual?: boolean;
|
|
214
214
|
userCalculatedId?: string;
|
|
215
215
|
calculatedAt?: Date;
|
|
216
216
|
settings?: {
|
|
@@ -244,10 +244,11 @@ export declare const AvailabilitySchema: mongoose.Schema<any, mongoose.Model<any
|
|
|
244
244
|
createdAt: NativeDate;
|
|
245
245
|
updatedAt: NativeDate;
|
|
246
246
|
} & {
|
|
247
|
-
bbcDateId: mongoose.Types.ObjectId;
|
|
248
247
|
borrowerId: mongoose.Types.ObjectId;
|
|
248
|
+
bbcDateId: mongoose.Types.ObjectId;
|
|
249
249
|
useManualInputs: boolean;
|
|
250
250
|
__v?: number;
|
|
251
|
+
actual?: boolean;
|
|
251
252
|
summary?: {
|
|
252
253
|
invoiceAmount: number;
|
|
253
254
|
creditNotes: number;
|
|
@@ -270,7 +271,6 @@ export declare const AvailabilitySchema: mongoose.Schema<any, mongoose.Model<any
|
|
|
270
271
|
ARReserves: number;
|
|
271
272
|
ARAvailability: number;
|
|
272
273
|
};
|
|
273
|
-
actual?: boolean;
|
|
274
274
|
userCalculatedId?: string;
|
|
275
275
|
calculatedAt?: Date;
|
|
276
276
|
settings?: {
|
|
@@ -304,10 +304,11 @@ export declare const AvailabilitySchema: mongoose.Schema<any, mongoose.Model<any
|
|
|
304
304
|
createdAt: NativeDate;
|
|
305
305
|
updatedAt: NativeDate;
|
|
306
306
|
} & {
|
|
307
|
-
bbcDateId: mongoose.Types.ObjectId;
|
|
308
307
|
borrowerId: mongoose.Types.ObjectId;
|
|
308
|
+
bbcDateId: mongoose.Types.ObjectId;
|
|
309
309
|
useManualInputs: boolean;
|
|
310
310
|
__v?: number;
|
|
311
|
+
actual?: boolean;
|
|
311
312
|
summary?: {
|
|
312
313
|
invoiceAmount: number;
|
|
313
314
|
creditNotes: number;
|
|
@@ -330,7 +331,6 @@ export declare const AvailabilitySchema: mongoose.Schema<any, mongoose.Model<any
|
|
|
330
331
|
ARReserves: number;
|
|
331
332
|
ARAvailability: number;
|
|
332
333
|
};
|
|
333
|
-
actual?: boolean;
|
|
334
334
|
userCalculatedId?: string;
|
|
335
335
|
calculatedAt?: Date;
|
|
336
336
|
settings?: {
|
package/models/_index.d.ts
CHANGED
|
@@ -31,10 +31,10 @@ export declare const allSchemas: {
|
|
|
31
31
|
createdAt: NativeDate;
|
|
32
32
|
updatedAt: NativeDate;
|
|
33
33
|
} & {
|
|
34
|
-
amount: number;
|
|
35
|
-
order: number;
|
|
36
34
|
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
35
|
+
order: number;
|
|
37
36
|
apDate: Date;
|
|
37
|
+
amount: number;
|
|
38
38
|
__v?: number;
|
|
39
39
|
poNumber?: string;
|
|
40
40
|
customerName?: string;
|
|
@@ -45,10 +45,10 @@ export declare const allSchemas: {
|
|
|
45
45
|
createdAt: NativeDate;
|
|
46
46
|
updatedAt: NativeDate;
|
|
47
47
|
} & {
|
|
48
|
-
amount: number;
|
|
49
|
-
order: number;
|
|
50
48
|
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
49
|
+
order: number;
|
|
51
50
|
apDate: Date;
|
|
51
|
+
amount: number;
|
|
52
52
|
__v?: number;
|
|
53
53
|
poNumber?: string;
|
|
54
54
|
customerName?: string;
|
|
@@ -59,10 +59,10 @@ export declare const allSchemas: {
|
|
|
59
59
|
createdAt: NativeDate;
|
|
60
60
|
updatedAt: NativeDate;
|
|
61
61
|
} & {
|
|
62
|
-
amount: number;
|
|
63
|
-
order: number;
|
|
64
62
|
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
63
|
+
order: number;
|
|
65
64
|
apDate: Date;
|
|
65
|
+
amount: number;
|
|
66
66
|
__v?: number;
|
|
67
67
|
poNumber?: string;
|
|
68
68
|
customerName?: string;
|
package/package.json
CHANGED
|
@@ -73,9 +73,9 @@ export declare class BorrowerService {
|
|
|
73
73
|
};
|
|
74
74
|
};
|
|
75
75
|
lastBBCDate: Date;
|
|
76
|
-
lastBBCId:
|
|
76
|
+
lastBBCId: string;
|
|
77
77
|
lastSignedBBCDate: Date;
|
|
78
|
-
lastSignedBBCId:
|
|
78
|
+
lastSignedBBCId: string;
|
|
79
79
|
}>;
|
|
80
80
|
updateBorrowerData(borrowerSettings: IBorrowerSettingsDocPopulated): Promise<{
|
|
81
81
|
[x: string]: mongoose.Types.ObjectId[];
|
|
@@ -46,9 +46,9 @@ export declare class BrokersService {
|
|
|
46
46
|
getAllProductBrokers(): Promise<(import("mongoose").FlattenMaps<import("../models/ProductBroker.model").IProductBrokerDoc> & {
|
|
47
47
|
_id: import("mongoose").Types.ObjectId;
|
|
48
48
|
})[]>;
|
|
49
|
-
getBorrowerBrokers(borrowerId: string): Promise<(import("mongoose").FlattenMaps<import("../models/ProductBroker.model").IProductBrokerDoc> & {
|
|
49
|
+
getBorrowerBrokers(borrowerId: string): Promise<BrokerView[] | (import("mongoose").FlattenMaps<import("../models/ProductBroker.model").IProductBrokerDoc> & {
|
|
50
50
|
_id: import("mongoose").Types.ObjectId;
|
|
51
|
-
})[]
|
|
51
|
+
})[]>;
|
|
52
52
|
getProductBrokers(productId: string): Promise<import("../models/ProductBroker.model").IProductBrokerDocWithBroker[]>;
|
|
53
53
|
getTotalShares(borrowerId: string, brokers: IProductBrokerView[], replaceNames?: boolean): Promise<ProductTotal>;
|
|
54
54
|
getTotals(borrowerId: string): Promise<BrokerTotalView[]>;
|
|
@@ -60,7 +60,7 @@ export declare class CollateralsService {
|
|
|
60
60
|
gebNextBBC(borrowerId: string, bbcDate?: Date): Promise<IBBCDateDoc[]>;
|
|
61
61
|
getLatestBBCDate(borrowerId: string): Promise<{
|
|
62
62
|
lastBBCDate: Date;
|
|
63
|
-
lastBBCId:
|
|
63
|
+
lastBBCId: string;
|
|
64
64
|
}>;
|
|
65
65
|
createBBCDate(bbcDate: ICreateBBCDate): Promise<void>;
|
|
66
66
|
deleteCollateralById(collateralId: string): Promise<mongoose.Document<unknown, {}, IBBCSheetDoc> & IBBCSheetDoc & {
|
|
@@ -44,13 +44,15 @@ export declare class LoanStatementStatusService {
|
|
|
44
44
|
updateStatementStatus(productId: string, statementDate: ISelectedMonth, actual: boolean): Promise<void>;
|
|
45
45
|
getAllStatementsStatus(statementDate: ISelectedMonth): Promise<{
|
|
46
46
|
product: import("../models/LoanProducts.model").ILoanProductDoc;
|
|
47
|
+
_id: mongoose.Types.ObjectId;
|
|
48
|
+
createdAt: Date;
|
|
49
|
+
updatedAt: Date;
|
|
47
50
|
productId: mongoose.Types.ObjectId;
|
|
48
51
|
actual: boolean;
|
|
49
52
|
locked: boolean;
|
|
50
53
|
lastCalculated: Date;
|
|
51
54
|
year: number;
|
|
52
55
|
month: number;
|
|
53
|
-
_id: any;
|
|
54
56
|
__v?: any;
|
|
55
57
|
$assertPopulated: <Paths = {}>(path: string | string[], values?: Partial<Paths>) => Omit<import("../models/LoanStatementStatus.model").ILoanStatementStatusDoc, keyof Paths> & Paths;
|
|
56
58
|
$clone: () => import("../models/LoanStatementStatus.model").ILoanStatementStatusDoc;
|
|
@@ -196,12 +198,12 @@ export declare class LoanStatementStatusService {
|
|
|
196
198
|
(pathsToValidate?: mongoose.PathsToValidate, options?: mongoose.AnyObject): mongoose.Error.ValidationError;
|
|
197
199
|
};
|
|
198
200
|
}[]>;
|
|
199
|
-
getStatementStatus(productId: string, date: Date): Promise<mongoose.Document<unknown, {}, import("../models/LoanStatementStatus.model").ILoanStatementStatusDoc> & import("../models/LoanStatementStatus.model").ILoanStatementStatusDoc & {
|
|
201
|
+
getStatementStatus(productId: string, date: Date): Promise<mongoose.Document<unknown, {}, import("../models/LoanStatementStatus.model").ILoanStatementStatusDoc> & import("../models/LoanStatementStatus.model").ILoanStatementStatusDoc & Required<{
|
|
200
202
|
_id: mongoose.Types.ObjectId;
|
|
201
|
-
}
|
|
202
|
-
getCreateStatementStatus(productId: string, statementDate: ISelectedMonth): Promise<mongoose.Document<unknown, {}, import("../models/LoanStatementStatus.model").ILoanStatementStatusDoc> & import("../models/LoanStatementStatus.model").ILoanStatementStatusDoc & {
|
|
203
|
+
}>>;
|
|
204
|
+
getCreateStatementStatus(productId: string, statementDate: ISelectedMonth): Promise<mongoose.Document<unknown, {}, import("../models/LoanStatementStatus.model").ILoanStatementStatusDoc> & import("../models/LoanStatementStatus.model").ILoanStatementStatusDoc & Required<{
|
|
203
205
|
_id: mongoose.Types.ObjectId;
|
|
204
|
-
}
|
|
206
|
+
}>>;
|
|
205
207
|
validateDate(productId: string, date: Date): Promise<"Statement is locked!" | "Internal Server Error">;
|
|
206
208
|
getBorrowerStatement(borrowerId: string): Promise<{
|
|
207
209
|
[K in SelectablePeriod | 'TERM_LOAN']?: boolean;
|
|
@@ -155,7 +155,7 @@ export declare class LoanTransactionsService {
|
|
|
155
155
|
getTransactionReport(transactionIds: string[], borrowerId: string, effectiveDate: Date): Promise<{
|
|
156
156
|
transactionIdsToMark: string[];
|
|
157
157
|
transactions: {
|
|
158
|
-
[x: string]: (string | number | string[]
|
|
158
|
+
[x: string]: (string | number | Date | string[])[];
|
|
159
159
|
}[];
|
|
160
160
|
}>;
|
|
161
161
|
getBorrowerIdsForFile(transactionFileId: string): Promise<{
|