@elliemae/pui-scripting-object 1.6.1 → 1.8.0
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/analytics.js +16 -0
- package/dist/cjs/index.js +4 -0
- package/dist/cjs/loan.js +14 -0
- package/dist/cjs/loanv2.js +38 -0
- package/dist/cjs/route.js +16 -0
- package/dist/cjs/scriptingObjectTypes.js +16 -0
- package/dist/cjs/view.js +16 -0
- package/dist/esm/analytics.js +0 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/loan.js +10 -0
- package/dist/esm/loanv2.js +18 -0
- package/dist/esm/route.js +0 -0
- package/dist/esm/scriptingObjectTypes.js +0 -0
- package/dist/esm/view.js +0 -0
- package/dist/types/analytics.d.ts +18 -0
- package/dist/types/application.d.ts +6 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/loan.d.ts +74 -14
- package/dist/types/loanv2.d.ts +107 -0
- package/dist/types/route.d.ts +7 -0
- package/dist/types/script.d.ts +25 -1
- package/dist/types/scriptingObjectTypes.d.ts +24 -0
- package/dist/types/session.d.ts +14 -0
- package/dist/types/view.d.ts +41 -0
- package/package.json +5 -3
- package/dist/cjs/index.pug +0 -19
- package/dist/esm/index.pug +0 -19
|
@@ -0,0 +1,16 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var analytics_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(analytics_exports);
|
package/dist/cjs/index.js
CHANGED
|
@@ -21,9 +21,13 @@ __reExport(lib_exports, require("./form.js"), module.exports);
|
|
|
21
21
|
__reExport(lib_exports, require("./global.js"), module.exports);
|
|
22
22
|
__reExport(lib_exports, require("./http.js"), module.exports);
|
|
23
23
|
__reExport(lib_exports, require("./loan.js"), module.exports);
|
|
24
|
+
__reExport(lib_exports, require("./loanv2.js"), module.exports);
|
|
24
25
|
__reExport(lib_exports, require("./module.js"), module.exports);
|
|
25
26
|
__reExport(lib_exports, require("./script.js"), module.exports);
|
|
26
27
|
__reExport(lib_exports, require("./session.js"), module.exports);
|
|
27
28
|
__reExport(lib_exports, require("./transaction.js"), module.exports);
|
|
28
29
|
__reExport(lib_exports, require("./transactiontemplate.js"), module.exports);
|
|
29
30
|
__reExport(lib_exports, require("./userAccessRights.js"), module.exports);
|
|
31
|
+
__reExport(lib_exports, require("./route.js"), module.exports);
|
|
32
|
+
__reExport(lib_exports, require("./view.js"), module.exports);
|
|
33
|
+
__reExport(lib_exports, require("./analytics.js"), module.exports);
|
package/dist/cjs/loan.js
CHANGED
|
@@ -3,6 +3,10 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
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
|
+
};
|
|
6
10
|
var __copyProps = (to, from, except, desc) => {
|
|
7
11
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
12
|
for (let key of __getOwnPropNames(from))
|
|
@@ -13,4 +17,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
13
17
|
};
|
|
14
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
19
|
var loan_exports = {};
|
|
20
|
+
__export(loan_exports, {
|
|
21
|
+
LoanLevelActions: () => LoanLevelActions
|
|
22
|
+
});
|
|
16
23
|
module.exports = __toCommonJS(loan_exports);
|
|
24
|
+
var LoanLevelActions = /* @__PURE__ */ ((LoanLevelActions2) => {
|
|
25
|
+
LoanLevelActions2["UPDATE_CORRESPONDENT_BALANCE"] = "updateCorrespondentBalance";
|
|
26
|
+
LoanLevelActions2["UPDATE_CORRESPONDENT_FEES"] = "updateCorrespondentFees";
|
|
27
|
+
LoanLevelActions2["COPY_ITEMIZATION_TO_STATE_DISCLOSURE"] = "copyItemizationToStateDisclosure";
|
|
28
|
+
LoanLevelActions2["CALCULATE_EEM_MORTGAGE"] = "calculateEEMMortgage";
|
|
29
|
+
return LoanLevelActions2;
|
|
30
|
+
})(LoanLevelActions || {});
|
|
@@ -0,0 +1,38 @@
|
|
|
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 loanv2_exports = {};
|
|
20
|
+
__export(loanv2_exports, {
|
|
21
|
+
CommitErrorStatus: () => CommitErrorStatus,
|
|
22
|
+
FieldErrorType: () => FieldErrorType
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(loanv2_exports);
|
|
25
|
+
var FieldErrorType = /* @__PURE__ */ ((FieldErrorType2) => {
|
|
26
|
+
FieldErrorType2["ACCESS"] = "access";
|
|
27
|
+
FieldErrorType2["VALUE"] = "value";
|
|
28
|
+
FieldErrorType2["SERIALIZATION"] = "serialization";
|
|
29
|
+
FieldErrorType2["DATA"] = "data";
|
|
30
|
+
FieldErrorType2["CONFLICT"] = "conflict";
|
|
31
|
+
return FieldErrorType2;
|
|
32
|
+
})(FieldErrorType || {});
|
|
33
|
+
var CommitErrorStatus = /* @__PURE__ */ ((CommitErrorStatus2) => {
|
|
34
|
+
CommitErrorStatus2["FIELDERROR"] = "field_error";
|
|
35
|
+
CommitErrorStatus2["LOCK_INVALID_OR_REMOVED"] = "lock_invalid_or_removed";
|
|
36
|
+
CommitErrorStatus2["WORKSPACE_READ_ONLY"] = "workspace_read_only";
|
|
37
|
+
return CommitErrorStatus2;
|
|
38
|
+
})(CommitErrorStatus || {});
|
|
@@ -0,0 +1,16 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var route_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(route_exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var scriptingObjectTypes_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(scriptingObjectTypes_exports);
|
package/dist/cjs/view.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var view_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(view_exports);
|
|
File without changes
|
package/dist/esm/index.js
CHANGED
|
@@ -4,9 +4,13 @@ export * from "./form.js";
|
|
|
4
4
|
export * from "./global.js";
|
|
5
5
|
export * from "./http.js";
|
|
6
6
|
export * from "./loan.js";
|
|
7
|
+
export * from "./loanv2.js";
|
|
7
8
|
export * from "./module.js";
|
|
8
9
|
export * from "./script.js";
|
|
9
10
|
export * from "./session.js";
|
|
10
11
|
export * from "./transaction.js";
|
|
11
12
|
export * from "./transactiontemplate.js";
|
|
12
13
|
export * from "./userAccessRights.js";
|
|
14
|
+
export * from "./route.js";
|
|
15
|
+
export * from "./view.js";
|
|
16
|
+
export * from "./analytics.js";
|
package/dist/esm/loan.js
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var LoanLevelActions = /* @__PURE__ */ ((LoanLevelActions2) => {
|
|
2
|
+
LoanLevelActions2["UPDATE_CORRESPONDENT_BALANCE"] = "updateCorrespondentBalance";
|
|
3
|
+
LoanLevelActions2["UPDATE_CORRESPONDENT_FEES"] = "updateCorrespondentFees";
|
|
4
|
+
LoanLevelActions2["COPY_ITEMIZATION_TO_STATE_DISCLOSURE"] = "copyItemizationToStateDisclosure";
|
|
5
|
+
LoanLevelActions2["CALCULATE_EEM_MORTGAGE"] = "calculateEEMMortgage";
|
|
6
|
+
return LoanLevelActions2;
|
|
7
|
+
})(LoanLevelActions || {});
|
|
8
|
+
export {
|
|
9
|
+
LoanLevelActions
|
|
10
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
var FieldErrorType = /* @__PURE__ */ ((FieldErrorType2) => {
|
|
2
|
+
FieldErrorType2["ACCESS"] = "access";
|
|
3
|
+
FieldErrorType2["VALUE"] = "value";
|
|
4
|
+
FieldErrorType2["SERIALIZATION"] = "serialization";
|
|
5
|
+
FieldErrorType2["DATA"] = "data";
|
|
6
|
+
FieldErrorType2["CONFLICT"] = "conflict";
|
|
7
|
+
return FieldErrorType2;
|
|
8
|
+
})(FieldErrorType || {});
|
|
9
|
+
var CommitErrorStatus = /* @__PURE__ */ ((CommitErrorStatus2) => {
|
|
10
|
+
CommitErrorStatus2["FIELDERROR"] = "field_error";
|
|
11
|
+
CommitErrorStatus2["LOCK_INVALID_OR_REMOVED"] = "lock_invalid_or_removed";
|
|
12
|
+
CommitErrorStatus2["WORKSPACE_READ_ONLY"] = "workspace_read_only";
|
|
13
|
+
return CommitErrorStatus2;
|
|
14
|
+
})(CommitErrorStatus || {});
|
|
15
|
+
export {
|
|
16
|
+
CommitErrorStatus,
|
|
17
|
+
FieldErrorType
|
|
18
|
+
};
|
|
File without changes
|
|
File without changes
|
package/dist/esm/view.js
ADDED
|
File without changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Business analytics event to be sent
|
|
3
|
+
*/
|
|
4
|
+
export declare type BAEvent = {
|
|
5
|
+
event: string;
|
|
6
|
+
[key: string]: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Methods and events to send and receive business analytics events
|
|
10
|
+
*/
|
|
11
|
+
export interface IAnalytics {
|
|
12
|
+
/**
|
|
13
|
+
* send business analytics event
|
|
14
|
+
*
|
|
15
|
+
* @param event business event to be sent
|
|
16
|
+
*/
|
|
17
|
+
sendBAEvent(event: BAEvent): void;
|
|
18
|
+
}
|
|
@@ -97,6 +97,12 @@ export interface IApplication {
|
|
|
97
97
|
* @param options Print options
|
|
98
98
|
*/
|
|
99
99
|
print(options: PrintOptions): Promise<void>;
|
|
100
|
+
/**
|
|
101
|
+
* show error message to user
|
|
102
|
+
*
|
|
103
|
+
* @param message error message to display
|
|
104
|
+
*/
|
|
105
|
+
showError(message: string): Promise<void>;
|
|
100
106
|
}
|
|
101
107
|
export declare type AppLoginListener = () => void;
|
|
102
108
|
export declare type AppActionCompletedListener = (name: string) => void;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,9 +4,14 @@ export * from './form.js';
|
|
|
4
4
|
export * from './global.js';
|
|
5
5
|
export * from './http.js';
|
|
6
6
|
export * from './loan.js';
|
|
7
|
+
export * from './loanv2.js';
|
|
7
8
|
export * from './module.js';
|
|
8
9
|
export * from './script.js';
|
|
9
10
|
export * from './session.js';
|
|
10
11
|
export * from './transaction.js';
|
|
11
12
|
export * from './transactiontemplate.js';
|
|
12
13
|
export * from './userAccessRights.js';
|
|
14
|
+
export * from './route.js';
|
|
15
|
+
export * from './view.js';
|
|
16
|
+
export * from './analytics.js';
|
|
17
|
+
export type { ScriptingObjectTypes } from './scriptingObjectTypes.js';
|
package/dist/types/loan.d.ts
CHANGED
|
@@ -11,9 +11,13 @@ export declare type FieldOptions = {
|
|
|
11
11
|
*/
|
|
12
12
|
value: string;
|
|
13
13
|
};
|
|
14
|
-
export declare type
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
export declare type LoanObject = Record<string, any>;
|
|
15
|
+
export declare enum LoanLevelActions {
|
|
16
|
+
UPDATE_CORRESPONDENT_BALANCE = "updateCorrespondentBalance",
|
|
17
|
+
UPDATE_CORRESPONDENT_FEES = "updateCorrespondentFees",
|
|
18
|
+
COPY_ITEMIZATION_TO_STATE_DISCLOSURE = "copyItemizationToStateDisclosure",
|
|
19
|
+
CALCULATE_EEM_MORTGAGE = "calculateEEMMortgage"
|
|
20
|
+
}
|
|
17
21
|
/**
|
|
18
22
|
* The Loan object provides methods for interacting with an open loan in the application's editor screen(s).
|
|
19
23
|
*/
|
|
@@ -28,20 +32,20 @@ export interface ILoan {
|
|
|
28
32
|
* :-----:|:-----: |:-----: |:-----: |:-----: |
|
|
29
33
|
* | all | ✔ | ✔ | ✔ | ✖️ |
|
|
30
34
|
*/
|
|
31
|
-
all(): Promise<
|
|
32
|
-
apply(loan: Record<string, string>): Promise<void>;
|
|
35
|
+
all(): Promise<LoanObject>;
|
|
33
36
|
/**
|
|
34
|
-
*
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
* Applies a partial loan object to the current loan,
|
|
38
|
+
*/
|
|
39
|
+
apply(loan: LoanObject): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Commit all pending changes on the current loan
|
|
38
42
|
*
|
|
39
43
|
* #### Product Compatibility:
|
|
40
44
|
* | | Encompass | Encompass Web | TPO | Consumer Connect |
|
|
41
45
|
* :-----:|:-----: |:-----: |:-----: |:-----: |
|
|
42
46
|
* | all | ✔ | ✔ | ✔ | ✖️ |
|
|
43
47
|
*/
|
|
44
|
-
commit(): Promise<
|
|
48
|
+
commit(): Promise<void>;
|
|
45
49
|
getField(id: string): Promise<string>;
|
|
46
50
|
/**
|
|
47
51
|
* get options for list of fields
|
|
@@ -83,30 +87,86 @@ export interface ILoan {
|
|
|
83
87
|
* ```
|
|
84
88
|
*/
|
|
85
89
|
getFieldOptions(fieldIds: string[]): Promise<Record<string, FieldOptions[]>>;
|
|
90
|
+
/**
|
|
91
|
+
* Returns the value of a single field using its field ID.
|
|
92
|
+
*
|
|
93
|
+
* @param ids The field ID of the fields to retrieve.
|
|
94
|
+
*/
|
|
86
95
|
getFields(ids: string[]): Promise<Record<string, string>>;
|
|
87
96
|
/**
|
|
88
97
|
* Set the values of one or more fields on the Loan.
|
|
89
98
|
*
|
|
90
99
|
* @param fields list of field ids and their values
|
|
91
|
-
* @returns list of field ids that failed to set
|
|
92
|
-
* @throws {Error} if operation fails due to network error
|
|
93
100
|
*/
|
|
94
|
-
setFields(fields: Record<string, string>): Promise<
|
|
101
|
+
setFields(fields: Record<string, string>): Promise<void>;
|
|
102
|
+
/**
|
|
103
|
+
* Syncs the loan workspace with any changes made by other users.
|
|
104
|
+
*/
|
|
95
105
|
merge(): Promise<void>;
|
|
106
|
+
/**
|
|
107
|
+
* Indicates if the loan is editable or in a read-only state.
|
|
108
|
+
*/
|
|
96
109
|
isReadOnly(): Promise<boolean>;
|
|
110
|
+
/**
|
|
111
|
+
* Applies or removes the calculation lock on a loan field. In this way you can enable or disable the lock on a loan field programmatically. Parameters are: ID of the field you want to apply or remove the calculation lock and the status you want to set the lock to
|
|
112
|
+
*
|
|
113
|
+
* @param fieldId ID of the field you want to apply or remove the calculation lock
|
|
114
|
+
* @param lock
|
|
115
|
+
*/
|
|
97
116
|
applyLock(fieldId: string, lock: boolean): Promise<void>;
|
|
117
|
+
/**
|
|
118
|
+
* Executes calculations and business rules
|
|
119
|
+
*/
|
|
98
120
|
calculate(): Promise<void>;
|
|
121
|
+
/**
|
|
122
|
+
* Returns an object with current application selected
|
|
123
|
+
*/
|
|
99
124
|
getCurrentApplication(): Promise<Record<string, string>>;
|
|
100
|
-
|
|
125
|
+
/**
|
|
126
|
+
* Execute loan level action, this is specific to v3 stateful implementation
|
|
127
|
+
*/
|
|
128
|
+
execAction(type: LoanLevelActions): Promise<LoanObject>;
|
|
129
|
+
/**
|
|
130
|
+
* Returns an object reference of type LoanCollection. Argument "name" is required & used to get specific collection like BorrowerEmployer, Escrow etc.
|
|
131
|
+
*
|
|
132
|
+
* @param name collection template name
|
|
133
|
+
*/
|
|
101
134
|
getCollection(name: string): Promise<Record<string, string>>;
|
|
102
135
|
getLockSnapshot(): Promise<Record<string, string>>;
|
|
103
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* This event is fired prior to saving and pending changes to the loan. The guest can use this event to perform custom validation and, via the feedback mechanism, prevent the loan from being saved
|
|
139
|
+
*/
|
|
104
140
|
export declare type LoanPreCommitListener = (cause: string) => boolean;
|
|
141
|
+
/**
|
|
142
|
+
* This event is fired after pending changes to the loan are committed
|
|
143
|
+
*/
|
|
105
144
|
export declare type LoanCommittedListener = (cause: string) => void;
|
|
145
|
+
/**
|
|
146
|
+
* This event is fired for each change made by the user in the UI
|
|
147
|
+
*/
|
|
106
148
|
export declare type LoanChangeListener = () => void;
|
|
149
|
+
/**
|
|
150
|
+
* This event is fired after the loan is sync'ed within any saved state made outside of the user's workspace. This event should fire after any call to calculate() or merge(), assuming any changes are made to the loan
|
|
151
|
+
*/
|
|
107
152
|
export declare type LoanSyncListener = () => void;
|
|
153
|
+
/**
|
|
154
|
+
* Fired after the loan is opened and ready for user interaction
|
|
155
|
+
*/
|
|
108
156
|
export declare type LoanOpenListener = () => void;
|
|
157
|
+
/**
|
|
158
|
+
* Fired just prior to closing the loan in the UI
|
|
159
|
+
*/
|
|
109
160
|
export declare type LoanCloseListener = () => boolean;
|
|
161
|
+
/**
|
|
162
|
+
* This event is fired after a milestone is completed by the user and committed to the server
|
|
163
|
+
*/
|
|
110
164
|
export declare type LoanMilestoneCompletedListener = (name: string) => void;
|
|
165
|
+
/**
|
|
166
|
+
* This event is fired when the user attempts to complete a milestone and allows for custom validation, and cancellation, of the process
|
|
167
|
+
*/
|
|
111
168
|
export declare type LoanPreMilestoneCompleteListener = (name: string) => boolean;
|
|
169
|
+
/**
|
|
170
|
+
* This event is fired when a borrower pair changes
|
|
171
|
+
*/
|
|
112
172
|
export declare type LoanApplicationSelectedListener = () => void;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { ILoan, LoanObject } from './loan.js';
|
|
2
|
+
export declare enum FieldErrorType {
|
|
3
|
+
/**
|
|
4
|
+
* access related violations
|
|
5
|
+
*/
|
|
6
|
+
ACCESS = "access",
|
|
7
|
+
/**
|
|
8
|
+
* Violation of a field data entry rule.
|
|
9
|
+
* Thrown only when value gets applied to the loan and will remain until user fixes the value
|
|
10
|
+
*/
|
|
11
|
+
VALUE = "value",
|
|
12
|
+
/**
|
|
13
|
+
* Error during de\serialization of the field value
|
|
14
|
+
*/
|
|
15
|
+
SERIALIZATION = "serialization",
|
|
16
|
+
/**
|
|
17
|
+
* Error due to invalid data like valid RuleActionType is not implemented
|
|
18
|
+
*/
|
|
19
|
+
DATA = "data",
|
|
20
|
+
/**
|
|
21
|
+
* Error due to invalid user data based on current state of the loan
|
|
22
|
+
* This does not get applied to the loan
|
|
23
|
+
*/
|
|
24
|
+
CONFLICT = "conflict"
|
|
25
|
+
}
|
|
26
|
+
export declare type FieldErrors = {
|
|
27
|
+
id: string;
|
|
28
|
+
type: FieldErrorType;
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
export declare type SetFieldResponse = {
|
|
32
|
+
/**
|
|
33
|
+
* List of fields not meeting data, access or required rule criteria
|
|
34
|
+
*/
|
|
35
|
+
errors: FieldErrors[];
|
|
36
|
+
};
|
|
37
|
+
export declare enum CommitErrorStatus {
|
|
38
|
+
FIELDERROR = "field_error",
|
|
39
|
+
LOCK_INVALID_OR_REMOVED = "lock_invalid_or_removed",
|
|
40
|
+
WORKSPACE_READ_ONLY = "workspace_read_only"
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Error representing a commit failure
|
|
44
|
+
*/
|
|
45
|
+
export declare type CommitError = Error & {
|
|
46
|
+
status: CommitErrorStatus;
|
|
47
|
+
/**
|
|
48
|
+
* List of violated rules that failed the commit
|
|
49
|
+
*/
|
|
50
|
+
ruleViolations: {
|
|
51
|
+
/**
|
|
52
|
+
* fields not meeting various field rules
|
|
53
|
+
*/
|
|
54
|
+
fieldErrors: FieldErrors[];
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
export declare type FieldIDToContractPath = {
|
|
58
|
+
fieldId: string;
|
|
59
|
+
contractPath: string;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* All operations on a loan are stateful. This means loan changes are not committed until the loan.commit is called
|
|
63
|
+
*/
|
|
64
|
+
export interface ILoanV2 extends Omit<ILoan, 'commit' | 'setFields' | 'merge'> {
|
|
65
|
+
/**
|
|
66
|
+
* Commit all pending changes on the current loan
|
|
67
|
+
*
|
|
68
|
+
* @returns {Promise<CommitResponse>}
|
|
69
|
+
* @throws {Error} if operation fails due to network errors
|
|
70
|
+
* @throws {CommitError} if operation fails due to business / functional rules
|
|
71
|
+
*
|
|
72
|
+
* #### Product Compatibility:
|
|
73
|
+
* | | Encompass | Encompass Web | TPO | Consumer Connect |
|
|
74
|
+
* :-----:|:-----: |:-----: |:-----: |:-----: |
|
|
75
|
+
* | commit | ✖️ | ✖️ | ✖️ | ✖️ |
|
|
76
|
+
*/
|
|
77
|
+
commit(): Promise<void>;
|
|
78
|
+
/**
|
|
79
|
+
* Get the contract path for the given field ids
|
|
80
|
+
*
|
|
81
|
+
* @param fieldIds list of field ids for which loan contract path is required
|
|
82
|
+
* @returns list of field ids and their loan contract paths
|
|
83
|
+
* @throws {Error} if operation fails due to network errors
|
|
84
|
+
*/
|
|
85
|
+
getContractPath(fieldIds: string[]): Promise<FieldIDToContractPath[]>;
|
|
86
|
+
/**
|
|
87
|
+
* Syncs the loan workspace with any changes made by other users
|
|
88
|
+
* #### Product Compatibility:
|
|
89
|
+
* | | Encompass | Encompass Web | TPO | Consumer Connect |
|
|
90
|
+
* :-----:|:-----: |:-----: |:-----: |:-----: |
|
|
91
|
+
* | merge | ✖️ | ✖️ | ✖️ | ✖️ |
|
|
92
|
+
*/
|
|
93
|
+
merge(): Promise<LoanObject>;
|
|
94
|
+
/**
|
|
95
|
+
* Set the values of one or more fields on the Loan.
|
|
96
|
+
*
|
|
97
|
+
* @param fields list of field ids and their values
|
|
98
|
+
* @returns list of field ids that failed to set
|
|
99
|
+
* @throws {Error} if operation fails due to network error
|
|
100
|
+
*
|
|
101
|
+
* #### Product Compatibility:
|
|
102
|
+
* | | Encompass | Encompass Web | TPO | Consumer Connect |
|
|
103
|
+
* :-----:|:-----: |:-----: |:-----: |:-----: |
|
|
104
|
+
* | setFields | ✖️ | ✖️ | ✖️ | ✖️ |
|
|
105
|
+
*/
|
|
106
|
+
setFields(fields: Record<string, string>): Promise<SetFieldResponse>;
|
|
107
|
+
}
|
package/dist/types/script.d.ts
CHANGED
|
@@ -1,4 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scripting object interface
|
|
3
|
+
*/
|
|
1
4
|
export interface IScript {
|
|
5
|
+
/**
|
|
6
|
+
* get scripting object by name
|
|
7
|
+
*
|
|
8
|
+
* @param name scripting object name
|
|
9
|
+
*/
|
|
2
10
|
getObject<T>(name: string): Promise<T>;
|
|
3
|
-
|
|
11
|
+
/**
|
|
12
|
+
* subscribe to an scripting object event
|
|
13
|
+
*
|
|
14
|
+
* @returns token to be used to unsubscribe
|
|
15
|
+
* @param objName scripting object name
|
|
16
|
+
* @param eventName event name
|
|
17
|
+
* @param listener callback function to be called when the event is fired
|
|
18
|
+
*/
|
|
19
|
+
subscribe(objName: string, eventName: string, listener: (ev: any) => any): string;
|
|
20
|
+
/**
|
|
21
|
+
* unsubscribe from an scripting object event
|
|
22
|
+
*
|
|
23
|
+
* @param objName scripting object name
|
|
24
|
+
* @param eventName event name
|
|
25
|
+
* @param token unique token returned by subscribe
|
|
26
|
+
*/
|
|
27
|
+
unsubscribe(objName: string, eventName: string, token: string): void;
|
|
4
28
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ILoan } from './loan.js';
|
|
2
|
+
import { ILoanV2 } from './loanv2.js';
|
|
3
|
+
import { IApplication } from './application.js';
|
|
4
|
+
import { IAuth } from './auth.js';
|
|
5
|
+
import { ISession } from './session.js';
|
|
6
|
+
import { ITransaction } from './transaction.js';
|
|
7
|
+
import { ITransactionTemplate } from './transactiontemplate.js';
|
|
8
|
+
import { IForm } from './form.js';
|
|
9
|
+
import { IGlobal } from './global.js';
|
|
10
|
+
import { IHttp } from './http.js';
|
|
11
|
+
import { IAnalytics } from './analytics.js';
|
|
12
|
+
export declare type ScriptingObjectTypes = {
|
|
13
|
+
Application: IApplication;
|
|
14
|
+
Analytics: IAnalytics;
|
|
15
|
+
Auth: IAuth;
|
|
16
|
+
Form: IForm;
|
|
17
|
+
Global: IGlobal;
|
|
18
|
+
Http: IHttp;
|
|
19
|
+
Loan: ILoan;
|
|
20
|
+
LoanV2: ILoanV2;
|
|
21
|
+
Session: ISession;
|
|
22
|
+
Transaction: ITransaction;
|
|
23
|
+
TransactionTemplate: ITransactionTemplate;
|
|
24
|
+
};
|
package/dist/types/session.d.ts
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Methods and events to view, modify & get notified about parent window session storage
|
|
3
|
+
*/
|
|
1
4
|
export interface ISession {
|
|
5
|
+
/**
|
|
6
|
+
* set a value in the session storage
|
|
7
|
+
*
|
|
8
|
+
* @param key unique key to store the value
|
|
9
|
+
* @param value value to be stored
|
|
10
|
+
*/
|
|
2
11
|
set(key: string, value: string): Promise<void>;
|
|
12
|
+
/**
|
|
13
|
+
* get a value from the session storage
|
|
14
|
+
*
|
|
15
|
+
* @param key unique key to retrieve the value
|
|
16
|
+
*/
|
|
3
17
|
get(key: string): Promise<string>;
|
|
4
18
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { BreakPoint } from '@elliemae/pui-theme';
|
|
2
|
+
/**
|
|
3
|
+
* window viewport size
|
|
4
|
+
*/
|
|
5
|
+
export declare type ViewportSize = {
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* parent window resize event handler
|
|
11
|
+
*/
|
|
12
|
+
export declare type ResizeEventListener = (entries: ResizeObserverEntry) => void;
|
|
13
|
+
/**
|
|
14
|
+
* parent window breakpoint change event handler
|
|
15
|
+
*/
|
|
16
|
+
export declare type BreakpointChangeEventListener = (breakpoint: BreakPoint) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Methods and events to view, modify & get notified about parent's window attributes
|
|
19
|
+
*/
|
|
20
|
+
export interface IView {
|
|
21
|
+
/**
|
|
22
|
+
* Get the current breakpoint of the parent window
|
|
23
|
+
*/
|
|
24
|
+
getBreakpoint(): Promise<BreakPoint>;
|
|
25
|
+
/**
|
|
26
|
+
* Get the current viewport size of the parent window
|
|
27
|
+
*/
|
|
28
|
+
getViewPortSize(): Promise<ViewportSize>;
|
|
29
|
+
/**
|
|
30
|
+
* parent window resize event
|
|
31
|
+
*
|
|
32
|
+
* @param eventHandler event handler to be called when the parent window is resized
|
|
33
|
+
*/
|
|
34
|
+
onResizeEvent(eventHandler: ResizeEventListener): string;
|
|
35
|
+
/**
|
|
36
|
+
* parent window breakpoint change event
|
|
37
|
+
*
|
|
38
|
+
* @param eventHandler event handler to be called when the parent window's breakpoint changes
|
|
39
|
+
*/
|
|
40
|
+
onBreakpointChangeEvent(eventHandler: BreakpointChangeEventListener): string;
|
|
41
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-scripting-object",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "Typescript defintions for Scripting Objects",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
@@ -58,12 +58,14 @@
|
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@elliemae/browserslist-config-elliemae-latest-browsers": "~1.5.0",
|
|
61
|
-
"@elliemae/pui-cli": "~7.
|
|
61
|
+
"@elliemae/pui-cli": "~7.9.0",
|
|
62
62
|
"@elliemae/pui-doc-gen": "~1.3.0",
|
|
63
|
+
"@elliemae/pui-theme": "~2.6.0",
|
|
63
64
|
"@types/styled-components": "~5.1.26",
|
|
65
|
+
"history": "~5.3.0",
|
|
64
66
|
"redux": "~4.2.0",
|
|
65
67
|
"redux-saga": "~1.2.1",
|
|
66
|
-
"styled-components": "~5.3.
|
|
68
|
+
"styled-components": "~5.3.6"
|
|
67
69
|
},
|
|
68
70
|
"peerDependencies": {}
|
|
69
71
|
}
|
package/dist/cjs/index.pug
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
doctype html
|
|
3
|
-
html(lang='en')
|
|
4
|
-
head
|
|
5
|
-
meta(charset='UTF-8')
|
|
6
|
-
meta(name='viewport' content='width=device-width, initial-scale=1.0')
|
|
7
|
-
meta(http-equiv='X-UA-Compatible' content='ie=edge')
|
|
8
|
-
title #{htmlWebpackPlugin.options.libraryName}
|
|
9
|
-
body
|
|
10
|
-
p This library #{htmlWebpackPlugin.options.libraryName} exposes the following properties
|
|
11
|
-
ul#libraryAttributes
|
|
12
|
-
script(lang='javascript').
|
|
13
|
-
window.onload = function() {
|
|
14
|
-
const attribNode = document.getElementById('libraryAttributes');
|
|
15
|
-
if (attribNode) {
|
|
16
|
-
attribNode.innerHTML = Object.keys(window['#{htmlWebpackPlugin.options.libraryName}'] || {}).reduce((value, attribute) => value += `<li>${attribute}</li>`, '');
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
package/dist/esm/index.pug
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
doctype html
|
|
3
|
-
html(lang='en')
|
|
4
|
-
head
|
|
5
|
-
meta(charset='UTF-8')
|
|
6
|
-
meta(name='viewport' content='width=device-width, initial-scale=1.0')
|
|
7
|
-
meta(http-equiv='X-UA-Compatible' content='ie=edge')
|
|
8
|
-
title #{htmlWebpackPlugin.options.libraryName}
|
|
9
|
-
body
|
|
10
|
-
p This library #{htmlWebpackPlugin.options.libraryName} exposes the following properties
|
|
11
|
-
ul#libraryAttributes
|
|
12
|
-
script(lang='javascript').
|
|
13
|
-
window.onload = function() {
|
|
14
|
-
const attribNode = document.getElementById('libraryAttributes');
|
|
15
|
-
if (attribNode) {
|
|
16
|
-
attribNode.innerHTML = Object.keys(window['#{htmlWebpackPlugin.options.libraryName}'] || {}).reduce((value, attribute) => value += `<li>${attribute}</li>`, '');
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|