@elliemae/pui-scripting-object 1.42.2 → 1.43.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/objects/loan.js +6 -0
- package/dist/cjs/objects/module.js +12 -0
- package/dist/esm/objects/loan.js +6 -0
- package/dist/esm/objects/module.js +8 -0
- package/dist/types/lib/objects/auth.d.ts +6 -1
- package/dist/types/lib/objects/loan.d.ts +47 -2
- package/dist/types/lib/objects/module.d.ts +107 -4
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/cjs/objects/loan.js
CHANGED
|
@@ -18,6 +18,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var loan_exports = {};
|
|
20
20
|
__export(loan_exports, {
|
|
21
|
+
EditModes: () => EditModes,
|
|
21
22
|
LoanLevelActions: () => LoanLevelActions,
|
|
22
23
|
RecordActions: () => RecordActions,
|
|
23
24
|
RecordViewType: () => RecordViewType
|
|
@@ -43,3 +44,8 @@ var LoanLevelActions = /* @__PURE__ */ ((LoanLevelActions2) => {
|
|
|
43
44
|
LoanLevelActions2["COPY_BORROWER_TO_TAX_REQUEST"] = "copyBorrowerToTaxRequest";
|
|
44
45
|
return LoanLevelActions2;
|
|
45
46
|
})(LoanLevelActions || {});
|
|
47
|
+
var EditModes = /* @__PURE__ */ ((EditModes2) => {
|
|
48
|
+
EditModes2["READ_ONLY"] = "READONLY";
|
|
49
|
+
EditModes2["EDIT"] = "EDIT";
|
|
50
|
+
return EditModes2;
|
|
51
|
+
})(EditModes || {});
|
|
@@ -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,12 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
13
17
|
};
|
|
14
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
19
|
var module_exports = {};
|
|
20
|
+
__export(module_exports, {
|
|
21
|
+
ModuleOpenMode: () => ModuleOpenMode
|
|
22
|
+
});
|
|
16
23
|
module.exports = __toCommonJS(module_exports);
|
|
24
|
+
var ModuleOpenMode = /* @__PURE__ */ ((ModuleOpenMode2) => {
|
|
25
|
+
ModuleOpenMode2["POPUP"] = "POPUP";
|
|
26
|
+
ModuleOpenMode2["INLINE"] = "INLINE";
|
|
27
|
+
return ModuleOpenMode2;
|
|
28
|
+
})(ModuleOpenMode || {});
|
package/dist/esm/objects/loan.js
CHANGED
|
@@ -18,7 +18,13 @@ var LoanLevelActions = /* @__PURE__ */ ((LoanLevelActions2) => {
|
|
|
18
18
|
LoanLevelActions2["COPY_BORROWER_TO_TAX_REQUEST"] = "copyBorrowerToTaxRequest";
|
|
19
19
|
return LoanLevelActions2;
|
|
20
20
|
})(LoanLevelActions || {});
|
|
21
|
+
var EditModes = /* @__PURE__ */ ((EditModes2) => {
|
|
22
|
+
EditModes2["READ_ONLY"] = "READONLY";
|
|
23
|
+
EditModes2["EDIT"] = "EDIT";
|
|
24
|
+
return EditModes2;
|
|
25
|
+
})(EditModes || {});
|
|
21
26
|
export {
|
|
27
|
+
EditModes,
|
|
22
28
|
LoanLevelActions,
|
|
23
29
|
RecordActions,
|
|
24
30
|
RecordViewType
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { IScriptingObject } from '../scriptingObject.js';
|
|
2
|
+
/**
|
|
3
|
+
* Error thrown when the microapp / customization is not authorized to receive child token
|
|
4
|
+
*/
|
|
5
|
+
export type UnAuthorizedError = Error;
|
|
2
6
|
/**
|
|
3
7
|
* Personas information
|
|
4
8
|
*/
|
|
@@ -147,10 +151,11 @@ export interface IAuth extends IScriptingObject {
|
|
|
147
151
|
*/
|
|
148
152
|
createAuthCode(clientId: string, redirectUri: string, scope: string): Promise<string>;
|
|
149
153
|
/**
|
|
150
|
-
* Get child access token for the given
|
|
154
|
+
* Get child access token for the given microapp / customization
|
|
151
155
|
* Host implementing this scripting object method,
|
|
152
156
|
* should able to find out the caller of this api and request necessary child token
|
|
153
157
|
* @returns access token with the api base url
|
|
158
|
+
* @throws {UnAuthorizedError} if the customization, requesting the token, doesn not have active subscription to developer connect product
|
|
154
159
|
*/
|
|
155
160
|
getAccessToken(): Promise<TokenInfo>;
|
|
156
161
|
/**
|
|
@@ -254,6 +254,33 @@ export type LoanApplicationSelectedListener = (params: {
|
|
|
254
254
|
eventParams: Record<string, never>;
|
|
255
255
|
eventOptions?: Record<string, unknown>;
|
|
256
256
|
}) => void;
|
|
257
|
+
/**
|
|
258
|
+
* List of supported edit modes
|
|
259
|
+
*/
|
|
260
|
+
export declare enum EditModes {
|
|
261
|
+
/**
|
|
262
|
+
* read only mode
|
|
263
|
+
*/
|
|
264
|
+
READ_ONLY = "READONLY",
|
|
265
|
+
/**
|
|
266
|
+
* edit mode
|
|
267
|
+
*/
|
|
268
|
+
EDIT = "EDIT"
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* options for setting loan edit mode
|
|
272
|
+
*/
|
|
273
|
+
export type EditModeOptions = {
|
|
274
|
+
/**
|
|
275
|
+
* edit mode type
|
|
276
|
+
*/
|
|
277
|
+
mode: EditModes;
|
|
278
|
+
/**
|
|
279
|
+
* module requesting the edit mode change. urn format
|
|
280
|
+
* @example urn:encompass:efolder
|
|
281
|
+
*/
|
|
282
|
+
moduleId: string;
|
|
283
|
+
};
|
|
257
284
|
/**
|
|
258
285
|
* Events supported by Loan scripting object
|
|
259
286
|
*/
|
|
@@ -396,7 +423,11 @@ export interface ILoan extends IScriptingObject {
|
|
|
396
423
|
*/
|
|
397
424
|
apply(loan: LoanObject): Promise<void>;
|
|
398
425
|
/**
|
|
399
|
-
* Applies or removes the calculation lock on a loan field.
|
|
426
|
+
* Applies or removes the calculation lock on a loan field.
|
|
427
|
+
*
|
|
428
|
+
* In this way you can enable or disable the lock on a loan field programmatically.
|
|
429
|
+
*
|
|
430
|
+
* 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
|
|
400
431
|
* @param fieldId ID of the field you want to apply or remove the calculation lock
|
|
401
432
|
* @param lock
|
|
402
433
|
*/
|
|
@@ -421,7 +452,9 @@ export interface ILoan extends IScriptingObject {
|
|
|
421
452
|
*/
|
|
422
453
|
getCurrentApplication(): Promise<Record<string, string>>;
|
|
423
454
|
/**
|
|
424
|
-
* Returns an object reference of type LoanCollection.
|
|
455
|
+
* Returns an object reference of type LoanCollection.
|
|
456
|
+
*
|
|
457
|
+
* Argument "name" is required & used to get specific collection like BorrowerEmployer, Escrow etc.
|
|
425
458
|
* @param name collection template name
|
|
426
459
|
*/
|
|
427
460
|
getCollection(name: string): Promise<Record<string, string>>;
|
|
@@ -433,7 +466,9 @@ export interface ILoan extends IScriptingObject {
|
|
|
433
466
|
getField(id: string): Promise<string>;
|
|
434
467
|
/**
|
|
435
468
|
* get options for loan fields / custom form controls
|
|
469
|
+
*
|
|
436
470
|
* supports both standard & custom loan fields.
|
|
471
|
+
*
|
|
437
472
|
* control Ids takes precedence over field Ids.
|
|
438
473
|
* @param {FieldOptionsParam} param parameter for getting field options
|
|
439
474
|
* @returns array of field options for each field / control id
|
|
@@ -497,6 +532,15 @@ export interface ILoan extends IScriptingObject {
|
|
|
497
532
|
* @param options options for setting current application
|
|
498
533
|
*/
|
|
499
534
|
setCurrentApplication(options: CurrentApplicationOptions): Promise<void>;
|
|
535
|
+
/**
|
|
536
|
+
* Set UI edit mode for the loan.
|
|
537
|
+
*
|
|
538
|
+
* It doesn't apply loan level lock.
|
|
539
|
+
*
|
|
540
|
+
* Use this api to prevent current user from making edits to the loan file, while a compliance based workflow is in progress
|
|
541
|
+
* @param options options for setting edit mode
|
|
542
|
+
*/
|
|
543
|
+
setEditMode(options: EditModeOptions): Promise<void>;
|
|
500
544
|
/**
|
|
501
545
|
* Set the values of one or more fields on the Loan.
|
|
502
546
|
* @param fields list of field ids and their values
|
|
@@ -504,6 +548,7 @@ export interface ILoan extends IScriptingObject {
|
|
|
504
548
|
setFields(fields: Record<string, string>): Promise<void>;
|
|
505
549
|
/**
|
|
506
550
|
* insert, delete, update, replace different loand record types.
|
|
551
|
+
*
|
|
507
552
|
* scope includes log and non-log record types
|
|
508
553
|
* @param options options for updating records
|
|
509
554
|
* @returns array of record ids or loan view entity
|
|
@@ -25,6 +25,62 @@ export type ErrorData = {
|
|
|
25
25
|
*/
|
|
26
26
|
correlationId?: string;
|
|
27
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* module open mode
|
|
30
|
+
*/
|
|
31
|
+
export declare enum ModuleOpenMode {
|
|
32
|
+
/**
|
|
33
|
+
* open the module in a new popup window
|
|
34
|
+
*/
|
|
35
|
+
POPUP = "POPUP",
|
|
36
|
+
/**
|
|
37
|
+
* open the module in the same window
|
|
38
|
+
*/
|
|
39
|
+
INLINE = "INLINE"
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* open module options
|
|
43
|
+
*/
|
|
44
|
+
export type OpenModuleOptions = {
|
|
45
|
+
/**
|
|
46
|
+
* module id in urn format
|
|
47
|
+
* @example urn:encompass:loanapp
|
|
48
|
+
*/
|
|
49
|
+
moduleId: string;
|
|
50
|
+
/**
|
|
51
|
+
* mode to open the module
|
|
52
|
+
* @default INLINE
|
|
53
|
+
*/
|
|
54
|
+
mode?: ModuleOpenMode;
|
|
55
|
+
/**
|
|
56
|
+
* module parameters as key-value pairs
|
|
57
|
+
*/
|
|
58
|
+
parameters?: Record<string, unknown>;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* MicroApp module specific parameters
|
|
62
|
+
*/
|
|
63
|
+
export type ModuleParameters = {
|
|
64
|
+
/**
|
|
65
|
+
* module id in urn format
|
|
66
|
+
* @example urn:encompass:loanapp
|
|
67
|
+
*/
|
|
68
|
+
moduleId: string;
|
|
69
|
+
/**
|
|
70
|
+
* additional parameters as key-value pairs
|
|
71
|
+
*/
|
|
72
|
+
[key: string]: unknown;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* module unload event info
|
|
76
|
+
*/
|
|
77
|
+
export type ModuleUnloadInfo = {
|
|
78
|
+
/**
|
|
79
|
+
* module that triggered the unload event in urn format
|
|
80
|
+
* @example urn:encompass:loanapp
|
|
81
|
+
*/
|
|
82
|
+
moduleId: string;
|
|
83
|
+
};
|
|
28
84
|
/**
|
|
29
85
|
* event handler that handles module unload event
|
|
30
86
|
* @param params event parameters
|
|
@@ -37,7 +93,32 @@ export type ErrorData = {
|
|
|
37
93
|
export type ModuleUnLoadingListener = (params: {
|
|
38
94
|
obj: IModule;
|
|
39
95
|
eventName: string;
|
|
40
|
-
eventParams:
|
|
96
|
+
eventParams: ModuleUnloadInfo;
|
|
97
|
+
eventOptions?: Record<string, unknown>;
|
|
98
|
+
}) => boolean;
|
|
99
|
+
/**
|
|
100
|
+
* module close event info
|
|
101
|
+
*/
|
|
102
|
+
export type ModuleCloseInfo = {
|
|
103
|
+
/**
|
|
104
|
+
* module that triggered the close event in urn format
|
|
105
|
+
* @example urn:encompass:loanapp
|
|
106
|
+
*/
|
|
107
|
+
moduleId: string;
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* event handler that handles module close event
|
|
111
|
+
* @param params event parameters
|
|
112
|
+
* @param params.obj module object reference
|
|
113
|
+
* @param params.eventName event name
|
|
114
|
+
* @param params.eventParams Module close info
|
|
115
|
+
* @param params.eventOptions additional options related to the event
|
|
116
|
+
* @returns true to allow module unload, false otherwise
|
|
117
|
+
*/
|
|
118
|
+
export type ModuleCloseListener = (params: {
|
|
119
|
+
obj: IModule;
|
|
120
|
+
eventName: string;
|
|
121
|
+
eventParams: ModuleCloseInfo;
|
|
41
122
|
eventOptions?: Record<string, unknown>;
|
|
42
123
|
}) => boolean;
|
|
43
124
|
/**
|
|
@@ -50,11 +131,17 @@ export type ModuleEvents = {
|
|
|
50
131
|
* Use {@link ModuleUnLoadingListener} to handle this event
|
|
51
132
|
*/
|
|
52
133
|
'module.unloading': ModuleUnLoadingListener;
|
|
134
|
+
/**
|
|
135
|
+
* event fired when the module to be closed
|
|
136
|
+
*
|
|
137
|
+
* Use {@link ModuleCloseListener} to handle this event
|
|
138
|
+
*/
|
|
139
|
+
'module.close': ModuleCloseListener;
|
|
53
140
|
};
|
|
54
141
|
/**
|
|
55
142
|
* Exposes MicroApp module specific methods
|
|
143
|
+
*
|
|
56
144
|
* This is an abstract interface and needs to be extended by the module
|
|
57
|
-
* users should avoid creating Scripting object with name 'Module'
|
|
58
145
|
*
|
|
59
146
|
* See {@link ModuleEvents} for supported events
|
|
60
147
|
*/
|
|
@@ -66,17 +153,33 @@ export interface IModule extends IScriptingObject {
|
|
|
66
153
|
*/
|
|
67
154
|
readonly Unloading: IEvent;
|
|
68
155
|
/**
|
|
69
|
-
*
|
|
156
|
+
* event fired when the module to be closed
|
|
157
|
+
*
|
|
158
|
+
* Use {@link ModuleCloseListener} to handle this event
|
|
159
|
+
*/
|
|
160
|
+
readonly Close: IEvent;
|
|
161
|
+
/**
|
|
162
|
+
* get microapp module-specific capabilities or settings defined by the host application.
|
|
163
|
+
*
|
|
164
|
+
* Helps to define the style and/or behavior of the module
|
|
70
165
|
* @returns capabilities or settings as key-value pairs
|
|
71
166
|
*/
|
|
72
167
|
getCapabilities(): Promise<Record<string, unknown>>;
|
|
73
168
|
/**
|
|
74
169
|
* get microapp module-specific parameters.
|
|
170
|
+
*
|
|
75
171
|
* For example, a lender may select a set of loans within the host application which must be passed to a module
|
|
76
172
|
* that implements a specific workflow for those loans
|
|
77
173
|
* @returns parameters as key-value pairs
|
|
78
174
|
*/
|
|
79
|
-
getParameters(): Promise<
|
|
175
|
+
getParameters(): Promise<ModuleParameters>;
|
|
176
|
+
/**
|
|
177
|
+
* open another microapp module
|
|
178
|
+
*
|
|
179
|
+
* if parent module doesn't host the requested module, it will bubble up the request to its parent
|
|
180
|
+
* @param options module open options
|
|
181
|
+
*/
|
|
182
|
+
open(options: OpenModuleOptions): Promise<void>;
|
|
80
183
|
/**
|
|
81
184
|
* unload the microapp module from the host application
|
|
82
185
|
*/
|