@elliemae/ssf-host 2.17.3 → 2.17.4
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/cjs/tests/scriptingObjects/appraisalServiceModule.js +4 -0
- package/dist/cjs/tests/scriptingObjects/creditServiceModule.js +62 -0
- package/dist/esm/tests/scriptingObjects/appraisalServiceModule.js +4 -0
- package/dist/esm/tests/scriptingObjects/creditServiceModule.js +42 -0
- package/dist/types/lib/tests/scriptingObjects/appraisalServiceModule.d.ts +2 -0
- package/dist/types/lib/tests/scriptingObjects/creditServiceModule.d.ts +25 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -24,11 +24,13 @@ __export(appraisalServiceModule_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(appraisalServiceModule_exports);
|
|
26
26
|
var import_microfe_common = require("@elliemae/microfe-common");
|
|
27
|
+
var import_creditServiceModule = require("./creditServiceModule.js");
|
|
27
28
|
var import_constant = require("./constant.js");
|
|
28
29
|
const APPRAISAL_SERVICE_OBJECT = "AppraisalService";
|
|
29
30
|
class AppraisalService extends import_microfe_common.ScriptingObject {
|
|
30
31
|
#loanId;
|
|
31
32
|
#creditScore;
|
|
33
|
+
#creditService = null;
|
|
32
34
|
Close = new import_microfe_common.Event({
|
|
33
35
|
name: "Close",
|
|
34
36
|
objectId: this.constructor.name
|
|
@@ -52,6 +54,7 @@ class AppraisalService extends import_microfe_common.ScriptingObject {
|
|
|
52
54
|
super(APPRAISAL_SERVICE_OBJECT);
|
|
53
55
|
this.#loanId = loanId;
|
|
54
56
|
this.#creditScore = creditScore;
|
|
57
|
+
this.#creditService = new import_creditServiceModule.CreditService();
|
|
55
58
|
}
|
|
56
59
|
getCapabilities = () => Promise.resolve({
|
|
57
60
|
isAdmin: true,
|
|
@@ -62,6 +65,7 @@ class AppraisalService extends import_microfe_common.ScriptingObject {
|
|
|
62
65
|
loanId: this.#loanId,
|
|
63
66
|
creditScore: this.#creditScore
|
|
64
67
|
});
|
|
68
|
+
getCreditService = () => Promise.resolve(this.#creditService);
|
|
65
69
|
getLoanDetails = () => Promise.resolve({
|
|
66
70
|
loanId: this.#loanId,
|
|
67
71
|
creditScore: this.#creditScore
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var creditServiceModule_exports = {};
|
|
20
|
+
__export(creditServiceModule_exports, {
|
|
21
|
+
CREDIT_SERVICE_OBJECT: () => CREDIT_SERVICE_OBJECT,
|
|
22
|
+
CreditService: () => CreditService,
|
|
23
|
+
creditServiceObject: () => creditServiceObject
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(creditServiceModule_exports);
|
|
26
|
+
var import_microfe_common = require("@elliemae/microfe-common");
|
|
27
|
+
var import_constant = require("./constant.js");
|
|
28
|
+
const CREDIT_SERVICE_OBJECT = "CreditService";
|
|
29
|
+
class CreditService extends import_microfe_common.ScriptingObject {
|
|
30
|
+
Close = new import_microfe_common.Event({
|
|
31
|
+
name: "Close",
|
|
32
|
+
objectId: this.constructor.name
|
|
33
|
+
});
|
|
34
|
+
Unloading = new import_microfe_common.Event({
|
|
35
|
+
name: "Unloading",
|
|
36
|
+
objectId: this.constructor.name
|
|
37
|
+
});
|
|
38
|
+
constructor() {
|
|
39
|
+
super(CREDIT_SERVICE_OBJECT);
|
|
40
|
+
}
|
|
41
|
+
getCapabilities = () => Promise.resolve({
|
|
42
|
+
vendor: "ICE"
|
|
43
|
+
});
|
|
44
|
+
getParameters = () => Promise.resolve({
|
|
45
|
+
moduleId: "creditservice"
|
|
46
|
+
});
|
|
47
|
+
log = async (message, level) => {
|
|
48
|
+
console.log(message, level);
|
|
49
|
+
return Promise.resolve();
|
|
50
|
+
};
|
|
51
|
+
unload = async () => {
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
const creditServiceObject = {
|
|
55
|
+
object: {
|
|
56
|
+
events: [import_constant.UNLOADING_EVENT_NAME],
|
|
57
|
+
functions: ["getParameters", "getCapabilities", "unload"],
|
|
58
|
+
objectId: CREDIT_SERVICE_OBJECT,
|
|
59
|
+
objectType: "Object"
|
|
60
|
+
},
|
|
61
|
+
type: "object"
|
|
62
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ScriptingObject, Event } from "@elliemae/microfe-common";
|
|
2
|
+
import { CreditService } from "./creditServiceModule.js";
|
|
2
3
|
import {
|
|
3
4
|
UNLOADING_EVENT_NAME,
|
|
4
5
|
PRE_COMMIT_EVENT_NAME,
|
|
@@ -8,6 +9,7 @@ const APPRAISAL_SERVICE_OBJECT = "AppraisalService";
|
|
|
8
9
|
class AppraisalService extends ScriptingObject {
|
|
9
10
|
#loanId;
|
|
10
11
|
#creditScore;
|
|
12
|
+
#creditService = null;
|
|
11
13
|
Close = new Event({
|
|
12
14
|
name: "Close",
|
|
13
15
|
objectId: this.constructor.name
|
|
@@ -31,6 +33,7 @@ class AppraisalService extends ScriptingObject {
|
|
|
31
33
|
super(APPRAISAL_SERVICE_OBJECT);
|
|
32
34
|
this.#loanId = loanId;
|
|
33
35
|
this.#creditScore = creditScore;
|
|
36
|
+
this.#creditService = new CreditService();
|
|
34
37
|
}
|
|
35
38
|
getCapabilities = () => Promise.resolve({
|
|
36
39
|
isAdmin: true,
|
|
@@ -41,6 +44,7 @@ class AppraisalService extends ScriptingObject {
|
|
|
41
44
|
loanId: this.#loanId,
|
|
42
45
|
creditScore: this.#creditScore
|
|
43
46
|
});
|
|
47
|
+
getCreditService = () => Promise.resolve(this.#creditService);
|
|
44
48
|
getLoanDetails = () => Promise.resolve({
|
|
45
49
|
loanId: this.#loanId,
|
|
46
50
|
creditScore: this.#creditScore
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ScriptingObject, Event } from "@elliemae/microfe-common";
|
|
2
|
+
import { UNLOADING_EVENT_NAME } from "./constant.js";
|
|
3
|
+
const CREDIT_SERVICE_OBJECT = "CreditService";
|
|
4
|
+
class CreditService extends ScriptingObject {
|
|
5
|
+
Close = new Event({
|
|
6
|
+
name: "Close",
|
|
7
|
+
objectId: this.constructor.name
|
|
8
|
+
});
|
|
9
|
+
Unloading = new Event({
|
|
10
|
+
name: "Unloading",
|
|
11
|
+
objectId: this.constructor.name
|
|
12
|
+
});
|
|
13
|
+
constructor() {
|
|
14
|
+
super(CREDIT_SERVICE_OBJECT);
|
|
15
|
+
}
|
|
16
|
+
getCapabilities = () => Promise.resolve({
|
|
17
|
+
vendor: "ICE"
|
|
18
|
+
});
|
|
19
|
+
getParameters = () => Promise.resolve({
|
|
20
|
+
moduleId: "creditservice"
|
|
21
|
+
});
|
|
22
|
+
log = async (message, level) => {
|
|
23
|
+
console.log(message, level);
|
|
24
|
+
return Promise.resolve();
|
|
25
|
+
};
|
|
26
|
+
unload = async () => {
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const creditServiceObject = {
|
|
30
|
+
object: {
|
|
31
|
+
events: [UNLOADING_EVENT_NAME],
|
|
32
|
+
functions: ["getParameters", "getCapabilities", "unload"],
|
|
33
|
+
objectId: CREDIT_SERVICE_OBJECT,
|
|
34
|
+
objectType: "Object"
|
|
35
|
+
},
|
|
36
|
+
type: "object"
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
CREDIT_SERVICE_OBJECT,
|
|
40
|
+
CreditService,
|
|
41
|
+
creditServiceObject
|
|
42
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IModule, Listener, Events, LogLevels, LogMessage } from '@elliemae/pui-scripting-object';
|
|
2
2
|
import { ScriptingObject, Event } from '@elliemae/microfe-common';
|
|
3
|
+
import { CreditService } from './creditServiceModule.js';
|
|
3
4
|
export declare const APPRAISAL_SERVICE_OBJECT = "AppraisalService";
|
|
4
5
|
export type LoanInfo = {
|
|
5
6
|
loanId: string;
|
|
@@ -27,6 +28,7 @@ export declare class AppraisalService extends ScriptingObject implements IModule
|
|
|
27
28
|
loanId: string;
|
|
28
29
|
creditScore: number;
|
|
29
30
|
}>;
|
|
31
|
+
getCreditService: () => Promise<CreditService | null>;
|
|
30
32
|
getLoanDetails: () => Promise<{
|
|
31
33
|
loanId: string;
|
|
32
34
|
creditScore: number;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IModule, Events, LogLevels, LogMessage } from '@elliemae/pui-scripting-object';
|
|
2
|
+
import { ScriptingObject, Event } from '@elliemae/microfe-common';
|
|
3
|
+
export declare const CREDIT_SERVICE_OBJECT = "CreditService";
|
|
4
|
+
export declare class CreditService extends ScriptingObject implements IModule {
|
|
5
|
+
Close: Event<Events>;
|
|
6
|
+
Unloading: Event<Events>;
|
|
7
|
+
constructor();
|
|
8
|
+
getCapabilities: () => Promise<{
|
|
9
|
+
vendor: string;
|
|
10
|
+
}>;
|
|
11
|
+
getParameters: () => Promise<{
|
|
12
|
+
moduleId: string;
|
|
13
|
+
}>;
|
|
14
|
+
log: (message: string | LogMessage, level: keyof typeof LogLevels) => Promise<void>;
|
|
15
|
+
unload: () => Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
export declare const creditServiceObject: {
|
|
18
|
+
object: {
|
|
19
|
+
events: string[];
|
|
20
|
+
functions: string[];
|
|
21
|
+
objectId: string;
|
|
22
|
+
objectType: string;
|
|
23
|
+
};
|
|
24
|
+
type: string;
|
|
25
|
+
};
|