gemcap-be-common 1.5.135 → 1.5.136
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/AiJob.model.d.ts +1 -1
- package/models/AiJob.model.js +1 -0
- package/models/AiJob.model.ts +1 -0
- package/models/BorrowerAssumption.model.d.ts +51 -0
- package/models/BorrowerAssumption.model.js +35 -0
- package/models/BorrowerAssumption.model.ts +56 -0
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/models/AiJob.model.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ import mongoose from 'mongoose';
|
|
|
31
31
|
import { TModelName } from './_models';
|
|
32
32
|
import { TTaskStatus } from '../interfaces/task.interface';
|
|
33
33
|
export declare const AI_JOBS_FOLDER = "AI_jobs";
|
|
34
|
-
export declare const AI_JOB_TYPES: readonly ["loan-memo-excel", "approval-memo", "email-summary"];
|
|
34
|
+
export declare const AI_JOB_TYPES: readonly ["loan-memo-excel", "approval-memo", "email-summary", "borrower-assumption"];
|
|
35
35
|
export type TAIJobType = (typeof AI_JOB_TYPES)[number];
|
|
36
36
|
export interface IAIJobResponseChunk {
|
|
37
37
|
type: 'text' | 'thinking' | 'tool' | 'status';
|
package/models/AiJob.model.js
CHANGED
package/models/AiJob.model.ts
CHANGED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
2
|
+
/// <reference types="mongoose/types/types" />
|
|
3
|
+
/// <reference types="mongoose/types/models" />
|
|
4
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
5
|
+
/// <reference types="mongoose/types/utility" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
8
|
+
/// <reference types="mongoose/types/callback" />
|
|
9
|
+
/// <reference types="mongoose/types/collection" />
|
|
10
|
+
/// <reference types="mongoose/types/connection" />
|
|
11
|
+
/// <reference types="mongoose/types/cursor" />
|
|
12
|
+
/// <reference types="mongoose/types/document" />
|
|
13
|
+
/// <reference types="mongoose/types/error" />
|
|
14
|
+
/// <reference types="mongoose/types/expressions" />
|
|
15
|
+
/// <reference types="mongoose/types/helpers" />
|
|
16
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
17
|
+
/// <reference types="mongoose/types/indexes" />
|
|
18
|
+
/// <reference types="mongoose/types/models" />
|
|
19
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
20
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
21
|
+
/// <reference types="mongoose/types/populate" />
|
|
22
|
+
/// <reference types="mongoose/types/query" />
|
|
23
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
24
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
25
|
+
/// <reference types="mongoose/types/session" />
|
|
26
|
+
/// <reference types="mongoose/types/types" />
|
|
27
|
+
/// <reference types="mongoose/types/utility" />
|
|
28
|
+
/// <reference types="mongoose/types/validation" />
|
|
29
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
30
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
31
|
+
import mongoose from 'mongoose';
|
|
32
|
+
export interface IBorrowerAssumption {
|
|
33
|
+
borrowerId: mongoose.Schema.Types.ObjectId;
|
|
34
|
+
assumptionFileId: string;
|
|
35
|
+
version: number;
|
|
36
|
+
uploadedAt: Date;
|
|
37
|
+
uploadedBy: string;
|
|
38
|
+
}
|
|
39
|
+
export interface IBorrowerAssumptionLean extends IBorrowerAssumption {
|
|
40
|
+
_id: mongoose.Types.ObjectId;
|
|
41
|
+
}
|
|
42
|
+
export interface IBorrowerAssumptionPlain extends Omit<IBorrowerAssumption, 'borrowerId'> {
|
|
43
|
+
_id: string;
|
|
44
|
+
borrowerId: string;
|
|
45
|
+
}
|
|
46
|
+
export type TBorrowerAssumptionDoc = mongoose.HydratedDocument<IBorrowerAssumption>;
|
|
47
|
+
export type TBorrowerAssumptionModel = mongoose.Model<IBorrowerAssumption>;
|
|
48
|
+
export declare const LoanBrokerSchema: mongoose.Schema<IBorrowerAssumption, TBorrowerAssumptionModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IBorrowerAssumption, mongoose.Document<unknown, {}, mongoose.FlatRecord<IBorrowerAssumption>> & mongoose.FlatRecord<IBorrowerAssumption> & {
|
|
49
|
+
_id: mongoose.Types.ObjectId;
|
|
50
|
+
}>;
|
|
51
|
+
export declare const LoanBroker: TBorrowerAssumptionModel;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.LoanBroker = exports.LoanBrokerSchema = void 0;
|
|
7
|
+
const mongoose_1 = __importDefault(require("mongoose"));
|
|
8
|
+
const _models_1 = require("./_models");
|
|
9
|
+
exports.LoanBrokerSchema = new mongoose_1.default.Schema({
|
|
10
|
+
borrowerId: {
|
|
11
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
12
|
+
ref: _models_1.MODEL_NAMES.borrowers,
|
|
13
|
+
required: true,
|
|
14
|
+
},
|
|
15
|
+
assumptionFileId: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: true,
|
|
18
|
+
},
|
|
19
|
+
version: {
|
|
20
|
+
type: Number,
|
|
21
|
+
required: true,
|
|
22
|
+
},
|
|
23
|
+
uploadedAt: {
|
|
24
|
+
type: Date,
|
|
25
|
+
required: true,
|
|
26
|
+
},
|
|
27
|
+
uploadedBy: {
|
|
28
|
+
type: String,
|
|
29
|
+
required: true,
|
|
30
|
+
},
|
|
31
|
+
}, {
|
|
32
|
+
timestamps: { createdAt: true, updatedAt: true },
|
|
33
|
+
versionKey: false,
|
|
34
|
+
});
|
|
35
|
+
exports.LoanBroker = mongoose_1.default.model(_models_1.MODEL_NAMES.loanBrokers, exports.LoanBrokerSchema);
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
|
|
3
|
+
import { MODEL_NAMES } from './_models';
|
|
4
|
+
|
|
5
|
+
export interface IBorrowerAssumption {
|
|
6
|
+
borrowerId: mongoose.Schema.Types.ObjectId;
|
|
7
|
+
assumptionFileId: string;
|
|
8
|
+
version: number;
|
|
9
|
+
uploadedAt: Date;
|
|
10
|
+
uploadedBy: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface IBorrowerAssumptionLean extends IBorrowerAssumption {
|
|
14
|
+
_id: mongoose.Types.ObjectId;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface IBorrowerAssumptionPlain extends Omit<IBorrowerAssumption, 'borrowerId'> {
|
|
18
|
+
_id: string;
|
|
19
|
+
borrowerId: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type TBorrowerAssumptionDoc = mongoose.HydratedDocument<IBorrowerAssumption>
|
|
23
|
+
|
|
24
|
+
export type TBorrowerAssumptionModel = mongoose.Model<IBorrowerAssumption>;
|
|
25
|
+
|
|
26
|
+
export const LoanBrokerSchema = new mongoose.Schema<IBorrowerAssumption, TBorrowerAssumptionModel>(
|
|
27
|
+
{
|
|
28
|
+
borrowerId: {
|
|
29
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
30
|
+
ref: MODEL_NAMES.borrowers,
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
assumptionFileId: {
|
|
34
|
+
type: String,
|
|
35
|
+
required: true,
|
|
36
|
+
},
|
|
37
|
+
version: {
|
|
38
|
+
type: Number,
|
|
39
|
+
required: true,
|
|
40
|
+
},
|
|
41
|
+
uploadedAt: {
|
|
42
|
+
type: Date,
|
|
43
|
+
required: true,
|
|
44
|
+
},
|
|
45
|
+
uploadedBy: {
|
|
46
|
+
type: String,
|
|
47
|
+
required: true,
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
timestamps: { createdAt: true, updatedAt: true },
|
|
52
|
+
versionKey: false,
|
|
53
|
+
},
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
export const LoanBroker = mongoose.model<IBorrowerAssumption, TBorrowerAssumptionModel>(MODEL_NAMES.loanBrokers, LoanBrokerSchema);
|