@dynamatix/gb-schemas 2.0.26 → 2.0.27
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/dist/applicants/applicant-additional-income.model.d.ts +926 -20
- package/dist/applicants/applicant-additional-income.model.d.ts.map +1 -1
- package/dist/applicants/applicant-additional-income.model.js +23 -3
- package/dist/applicants/applicant-commitment-creditCard.model.d.ts +0 -6
- package/dist/applicants/applicant-commitment-creditCard.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-creditCard.model.js +0 -1
- package/dist/applicants/applicant-commitment-loan.model.d.ts +0 -6
- package/dist/applicants/applicant-commitment-loan.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-loan.model.js +0 -1
- package/dist/applicants/applicant-commitment-mortgage.model.d.ts +0 -6
- package/dist/applicants/applicant-commitment-mortgage.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-mortgage.model.js +0 -1
- package/dist/applicants/applicant-credit-data.model.js +11 -0
- package/dist/applicants/applicant-credit-profile.model.js +20 -0
- package/dist/applicants/applicant-direct-debit.model.js +17 -0
- package/dist/applicants/applicant-employment.model.js +50 -0
- package/dist/applicants/applicant-expenditure.model.js +54 -0
- package/dist/applicants/applicant-income-source.model.js +9 -0
- package/dist/applicants/applicant-income.model.d.ts +12 -0
- package/dist/applicants/applicant-income.model.d.ts.map +1 -1
- package/dist/applicants/applicant-income.model.js +81 -0
- package/dist/applicants/applicant-pension-income.model.d.ts +0 -288
- package/dist/applicants/applicant-pension-income.model.d.ts.map +1 -1
- package/dist/applicants/applicant-pension-income.model.js +0 -13
- package/dist/applicants/applicant-risk-narrative.model.js +13 -0
- package/dist/applicants/applicant-uk-tax-credits.model.d.ts +0 -288
- package/dist/applicants/applicant-uk-tax-credits.model.d.ts.map +1 -1
- package/dist/applicants/applicant-uk-tax-credits.model.js +0 -2
- package/dist/applicants/applicant.model.js +223 -0
- package/dist/applicants/index.js +13 -0
- package/dist/applications/application-audit.model.js +42 -0
- package/dist/applications/application-checklist-Item.model.js +45 -0
- package/dist/applications/application-company-model.js +120 -0
- package/dist/applications/application-credit-profile.model.js +12 -0
- package/dist/applications/application-direct-debit.model.js +92 -0
- package/dist/applications/application-document.model.js +35 -0
- package/dist/applications/application-fieldconfig.model.js +7 -0
- package/dist/applications/application-illustration-model.js +6 -0
- package/dist/applications/application-legal.model.js +7 -0
- package/dist/applications/application-mortgage.model.js +271 -0
- package/dist/applications/application-note.model.js +78 -0
- package/dist/applications/application-offer.model.js +6 -0
- package/dist/applications/application-onboarding.model.js +9 -0
- package/dist/applications/application-product.model.js +67 -0
- package/dist/applications/application-rationale.model.js +38 -0
- package/dist/applications/application-risk-narrative.model.js +12 -0
- package/dist/applications/application-valuation.model.js +15 -0
- package/dist/applications/application.model.js +153 -0
- package/dist/applications/broker.model.js +21 -0
- package/dist/applications/document.model.js +35 -0
- package/dist/applications/index.js +20 -0
- package/dist/applications/solicitor.model.js +114 -0
- package/dist/entities/applications/application-direct-debit.entity.d.ts +5 -3
- package/dist/entities/applications/application-direct-debit.entity.d.ts.map +1 -1
- package/dist/entities/applications/application-mortgage.entity.d.ts +2 -3
- package/dist/entities/applications/application-mortgage.entity.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -0
- package/dist/product-catalogues/index.js +3 -0
- package/dist/product-catalogues/product-catalogue.model.js +18 -0
- package/dist/product-catalogues/product-definitions.model.js +26 -0
- package/dist/product-catalogues/product-variant.model.js +12 -0
- package/dist/properties/index.js +2 -0
- package/dist/properties/property.model.js +144 -0
- package/dist/shared/alert.model.js +24 -0
- package/dist/shared/apprivo-sync-journey.model.js +17 -0
- package/dist/shared/checklist.model.js +30 -0
- package/dist/shared/document-type-model.js +10 -0
- package/dist/shared/index.js +12 -0
- package/dist/shared/job-run.model.js +14 -0
- package/dist/shared/job-setting.model.js +11 -0
- package/dist/shared/lookup-group.model.js +16 -0
- package/dist/shared/lookup.model.js +20 -0
- package/dist/shared/system-parameter.model.js +32 -0
- package/dist/shared/task-document.model.js +23 -0
- package/dist/shared/task.model.js +15 -0
- package/dist/underwriter/index.js +1 -0
- package/dist/underwriter/underwriter.model.js +17 -0
- package/dist/users/auth-log.model.js +21 -0
- package/dist/users/index.js +6 -0
- package/dist/users/permission.model.js +10 -0
- package/dist/users/role-group.model.js +14 -0
- package/dist/users/role.model.js +13 -0
- package/dist/users/tasks.model.js +15 -0
- package/dist/users/user.model.js +30 -0
- package/package.json +1 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
const systemParameterSchema = new mongoose.Schema({
|
|
3
|
+
parameterName: {
|
|
4
|
+
type: String,
|
|
5
|
+
required: true,
|
|
6
|
+
},
|
|
7
|
+
parameterValue: {
|
|
8
|
+
type: mongoose.Schema.Types.Mixed,
|
|
9
|
+
required: true,
|
|
10
|
+
},
|
|
11
|
+
notes: {
|
|
12
|
+
type: String,
|
|
13
|
+
},
|
|
14
|
+
createdByUserId: {
|
|
15
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
16
|
+
ref: 'User',
|
|
17
|
+
required: true,
|
|
18
|
+
},
|
|
19
|
+
createdOn: {
|
|
20
|
+
type: Date,
|
|
21
|
+
default: Date.now,
|
|
22
|
+
},
|
|
23
|
+
updatedByUserId: {
|
|
24
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
25
|
+
ref: 'User',
|
|
26
|
+
},
|
|
27
|
+
updatedOn: {
|
|
28
|
+
type: Date,
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
const SystemParameterModel = mongoose.model('SystemParameter', systemParameterSchema);
|
|
32
|
+
export default SystemParameterModel;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
// Define the schema for TaskDocumentType
|
|
3
|
+
const taskDocumentTypeSchema = new mongoose.Schema({
|
|
4
|
+
name: {
|
|
5
|
+
type: String,
|
|
6
|
+
required: true,
|
|
7
|
+
},
|
|
8
|
+
value: {
|
|
9
|
+
type: String,
|
|
10
|
+
required: true,
|
|
11
|
+
},
|
|
12
|
+
parentDocumentTypeId: {
|
|
13
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
14
|
+
default: null, // Null for parent categories
|
|
15
|
+
},
|
|
16
|
+
source: {
|
|
17
|
+
type: String,
|
|
18
|
+
required: true,
|
|
19
|
+
enum: ['applicant', 'application'], // Only allow these two values
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
const TaskDocumentTypeModel = mongoose.model('TaskDocumentType', taskDocumentTypeSchema);
|
|
23
|
+
export default TaskDocumentTypeModel;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
const { Schema } = mongoose;
|
|
3
|
+
const actionSchema = new Schema({
|
|
4
|
+
type: { type: String, required: true }, // Type of the action
|
|
5
|
+
message: { type: String, required: false },
|
|
6
|
+
target: { type: String, required: false },
|
|
7
|
+
});
|
|
8
|
+
const taskSchema = new Schema({
|
|
9
|
+
name: { type: String, required: true },
|
|
10
|
+
description: { type: String, required: true },
|
|
11
|
+
actionsOnFailure: { type: [actionSchema], default: [] },
|
|
12
|
+
actionsOnSuccess: { type: [actionSchema], default: [] },
|
|
13
|
+
}, { timestamps: true });
|
|
14
|
+
const TaskModel = mongoose.model("Task", taskSchema);
|
|
15
|
+
export default TaskModel;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as UnderwriterModel } from './underwriter.model';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
const underwriterSchema = new mongoose.Schema({
|
|
3
|
+
fullName: { type: String, required: true },
|
|
4
|
+
mandateLevel: { type: Number, required: true },
|
|
5
|
+
underwriterId: { type: Number, required: true },
|
|
6
|
+
totalBTLCaseCount: { type: Number, required: true },
|
|
7
|
+
btlPreOfferCaseCount: { type: Number, required: true },
|
|
8
|
+
btlPostOfferCaseCount: { type: Number, required: true },
|
|
9
|
+
totalBridgingCaseCount: { type: Number, required: true },
|
|
10
|
+
bridgingPreOfferCaseCount: { type: Number, required: true },
|
|
11
|
+
bridgingPostOfferCaseCount: { type: Number, required: true },
|
|
12
|
+
bridgingMandateLevel: { type: Number, required: true }
|
|
13
|
+
}, {
|
|
14
|
+
timestamps: true
|
|
15
|
+
});
|
|
16
|
+
const UnderwriterModel = mongoose.model('Underwriter', underwriterSchema);
|
|
17
|
+
export default UnderwriterModel;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
const AuthLogSchema = new mongoose.Schema({
|
|
3
|
+
userEmail: {
|
|
4
|
+
type: String,
|
|
5
|
+
required: true
|
|
6
|
+
},
|
|
7
|
+
loggedInTimestamp: {
|
|
8
|
+
type: Date,
|
|
9
|
+
default: Date.now
|
|
10
|
+
},
|
|
11
|
+
isSuccess: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
required: true
|
|
14
|
+
},
|
|
15
|
+
activity: {
|
|
16
|
+
type: String,
|
|
17
|
+
enum: ["LOGIN", "LOGOUT", "PASSWORD_RESET"]
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
const AuthLogModel = mongoose.model("AuthLog", AuthLogSchema);
|
|
21
|
+
export default AuthLogModel;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as UserModel } from './user.model';
|
|
2
|
+
export { default as RoleModel } from './role.model';
|
|
3
|
+
export { default as RoleGroupModel } from './role-group.model';
|
|
4
|
+
export { default as PermissionModel } from './permission.model';
|
|
5
|
+
export { default as TasksModel } from './tasks.model';
|
|
6
|
+
export { default as AuthLogModel } from './auth-log.model';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
const permissionSchema = new mongoose.Schema({
|
|
3
|
+
name: { type: String, required: true },
|
|
4
|
+
controllerName: { type: String, required: true },
|
|
5
|
+
methodName: { type: String, required: true }
|
|
6
|
+
}, {
|
|
7
|
+
timestamps: true
|
|
8
|
+
});
|
|
9
|
+
const PermissionModel = mongoose.model('Permission', permissionSchema);
|
|
10
|
+
export default PermissionModel;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
const RoleGroupSchema = new mongoose.Schema({
|
|
3
|
+
groupId: { type: String, required: true },
|
|
4
|
+
name: { type: String, required: true },
|
|
5
|
+
description: { type: String },
|
|
6
|
+
roles: [{
|
|
7
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
8
|
+
ref: 'Role'
|
|
9
|
+
}]
|
|
10
|
+
}, {
|
|
11
|
+
timestamps: true
|
|
12
|
+
});
|
|
13
|
+
const RoleGroupModel = mongoose.model('RoleGroup', RoleGroupSchema);
|
|
14
|
+
export default RoleGroupModel;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
const RoleSchema = new mongoose.Schema({
|
|
3
|
+
roleId: { type: String, required: true },
|
|
4
|
+
name: { type: String, required: true },
|
|
5
|
+
description: { type: String },
|
|
6
|
+
permissions: [{
|
|
7
|
+
type: mongoose.Schema.Types.ObjectId, ref: 'Permission'
|
|
8
|
+
}]
|
|
9
|
+
}, {
|
|
10
|
+
timestamps: true
|
|
11
|
+
});
|
|
12
|
+
const RoleModel = mongoose.model('Role', RoleSchema);
|
|
13
|
+
export default RoleModel;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
const TasksSchema = new mongoose.Schema({
|
|
3
|
+
taskTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null }, // LookupGroup: TaskType ["Document", "Information"]
|
|
4
|
+
actionTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null }, // Example: "Request Document Delete"
|
|
5
|
+
entityId: { type: mongoose.Schema.Types.ObjectId, required: true }, // Could be documentId, applicationId, applicantId
|
|
6
|
+
createdByUserId: { ref: "User", type: mongoose.Schema.Types.ObjectId, required: true },
|
|
7
|
+
assignedToUserId: { ref: "User", type: mongoose.Schema.Types.ObjectId, required: true },
|
|
8
|
+
statusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null }, // LookupGroup: TaskStatus ["Requested", "Completed", "Cancelled"]
|
|
9
|
+
priorityLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null }, // LookupGroup: TaskPriority ["High", "Medium", "Low"]
|
|
10
|
+
expiryDate: { type: Date, required: true },
|
|
11
|
+
}, {
|
|
12
|
+
timestamps: true
|
|
13
|
+
});
|
|
14
|
+
const TasksModel = mongoose.model("Tasks", TasksSchema);
|
|
15
|
+
export default TasksModel;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
const ClaimSchema = new mongoose.Schema({
|
|
3
|
+
key: { type: String, required: true },
|
|
4
|
+
value: { type: String, required: true }
|
|
5
|
+
});
|
|
6
|
+
const userSchema = new mongoose.Schema({
|
|
7
|
+
accountId: { type: String, required: true },
|
|
8
|
+
email: { type: String, required: true },
|
|
9
|
+
fullName: { type: String, required: true },
|
|
10
|
+
password: { type: String, required: true },
|
|
11
|
+
organisationId: { type: mongoose.Schema.Types.Mixed },
|
|
12
|
+
status: { type: String, required: true },
|
|
13
|
+
groups: [{
|
|
14
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
15
|
+
ref: 'RoleGroup'
|
|
16
|
+
}],
|
|
17
|
+
claims: [ClaimSchema],
|
|
18
|
+
externalData: { type: mongoose.Schema.Types.Mixed },
|
|
19
|
+
modifiedOn: { type: String },
|
|
20
|
+
modifiedById: { type: String },
|
|
21
|
+
createdOnInApprivo: { type: String },
|
|
22
|
+
createdById: { type: String },
|
|
23
|
+
deletedOn: { type: String },
|
|
24
|
+
deletedById: { type: String },
|
|
25
|
+
token: { type: String }
|
|
26
|
+
}, {
|
|
27
|
+
timestamps: true
|
|
28
|
+
});
|
|
29
|
+
const UserModel = mongoose.model('User', userSchema);
|
|
30
|
+
export default UserModel;
|