@elliemae/pui-scripting-object 1.42.3 → 1.43.1
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/application.js +7 -1
- package/dist/cjs/objects/loan.js +6 -0
- package/dist/esm/objects/application.js +7 -1
- package/dist/esm/objects/loan.js +6 -0
- package/dist/types/lib/objects/application.d.ts +38 -0
- package/dist/types/lib/objects/loan.d.ts +47 -2
- package/dist/types/lib/objects/module.d.ts +104 -5
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -20,7 +20,8 @@ var application_exports = {};
|
|
|
20
20
|
__export(application_exports, {
|
|
21
21
|
ApplicationExtensionType: () => ApplicationExtensionType,
|
|
22
22
|
LogLevel: () => LogLevel,
|
|
23
|
-
ModalSize: () => ModalSize
|
|
23
|
+
ModalSize: () => ModalSize,
|
|
24
|
+
ModuleOpenMode: () => ModuleOpenMode
|
|
24
25
|
});
|
|
25
26
|
module.exports = __toCommonJS(application_exports);
|
|
26
27
|
var LogLevel = /* @__PURE__ */ ((LogLevel2) => {
|
|
@@ -44,3 +45,8 @@ var ModalSize = /* @__PURE__ */ ((ModalSize2) => {
|
|
|
44
45
|
ModalSize2["LARGE"] = "lg";
|
|
45
46
|
return ModalSize2;
|
|
46
47
|
})(ModalSize || {});
|
|
48
|
+
var ModuleOpenMode = /* @__PURE__ */ ((ModuleOpenMode2) => {
|
|
49
|
+
ModuleOpenMode2["POPUP"] = "POPUP";
|
|
50
|
+
ModuleOpenMode2["INLINE"] = "INLINE";
|
|
51
|
+
return ModuleOpenMode2;
|
|
52
|
+
})(ModuleOpenMode || {});
|
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 || {});
|
|
@@ -19,8 +19,14 @@ var ModalSize = /* @__PURE__ */ ((ModalSize2) => {
|
|
|
19
19
|
ModalSize2["LARGE"] = "lg";
|
|
20
20
|
return ModalSize2;
|
|
21
21
|
})(ModalSize || {});
|
|
22
|
+
var ModuleOpenMode = /* @__PURE__ */ ((ModuleOpenMode2) => {
|
|
23
|
+
ModuleOpenMode2["POPUP"] = "POPUP";
|
|
24
|
+
ModuleOpenMode2["INLINE"] = "INLINE";
|
|
25
|
+
return ModuleOpenMode2;
|
|
26
|
+
})(ModuleOpenMode || {});
|
|
22
27
|
export {
|
|
23
28
|
ApplicationExtensionType,
|
|
24
29
|
LogLevel,
|
|
25
|
-
ModalSize
|
|
30
|
+
ModalSize,
|
|
31
|
+
ModuleOpenMode
|
|
26
32
|
};
|
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
|
|
@@ -144,6 +144,38 @@ export type OpenModalOptions = {
|
|
|
144
144
|
*/
|
|
145
145
|
size: ModalSize;
|
|
146
146
|
};
|
|
147
|
+
/**
|
|
148
|
+
* module open mode
|
|
149
|
+
*/
|
|
150
|
+
export declare enum ModuleOpenMode {
|
|
151
|
+
/**
|
|
152
|
+
* open the module in a new popup window
|
|
153
|
+
*/
|
|
154
|
+
POPUP = "POPUP",
|
|
155
|
+
/**
|
|
156
|
+
* open the module in the same window
|
|
157
|
+
*/
|
|
158
|
+
INLINE = "INLINE"
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* open module options
|
|
162
|
+
*/
|
|
163
|
+
export type OpenModuleOptions = {
|
|
164
|
+
/**
|
|
165
|
+
* module to be opened in urn format
|
|
166
|
+
* @example urn:encompass:loanapp
|
|
167
|
+
*/
|
|
168
|
+
moduleId: string;
|
|
169
|
+
/**
|
|
170
|
+
* mode to open the module
|
|
171
|
+
* @default INLINE
|
|
172
|
+
*/
|
|
173
|
+
mode?: ModuleOpenMode;
|
|
174
|
+
/**
|
|
175
|
+
* module parameters as key-value pairs
|
|
176
|
+
*/
|
|
177
|
+
parameters?: Record<string, unknown>;
|
|
178
|
+
};
|
|
147
179
|
/**
|
|
148
180
|
* capabilities exposed by the application
|
|
149
181
|
*/
|
|
@@ -368,6 +400,12 @@ export interface IApplication extends IScriptingObject {
|
|
|
368
400
|
* @param options modal properties
|
|
369
401
|
*/
|
|
370
402
|
openModal(options: OpenModalOptions): Promise<void>;
|
|
403
|
+
/**
|
|
404
|
+
* Open a module inline or in a popup
|
|
405
|
+
* @param options module open options
|
|
406
|
+
* @returns false if the module is not found, true otherwise
|
|
407
|
+
*/
|
|
408
|
+
openModule(options: OpenModuleOptions): Promise<boolean>;
|
|
371
409
|
/**
|
|
372
410
|
* Perform an action
|
|
373
411
|
* @param action action name
|
|
@@ -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,80 @@ export type ErrorData = {
|
|
|
25
25
|
*/
|
|
26
26
|
correlationId?: string;
|
|
27
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* MicroApp module specific parameters
|
|
30
|
+
*/
|
|
31
|
+
export type ModuleParameters = {
|
|
32
|
+
/**
|
|
33
|
+
* module id in urn format
|
|
34
|
+
* @example urn:encompass:loanapp
|
|
35
|
+
*/
|
|
36
|
+
moduleId: string;
|
|
37
|
+
/**
|
|
38
|
+
* additional parameters as key-value pairs
|
|
39
|
+
*/
|
|
40
|
+
[key: string]: unknown;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* module close event info
|
|
44
|
+
*/
|
|
45
|
+
export type ModuleCloseInfo = {
|
|
46
|
+
/**
|
|
47
|
+
* module that triggered the close event in urn format
|
|
48
|
+
* @example urn:encompass:loanapp
|
|
49
|
+
*/
|
|
50
|
+
moduleId: string;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* event handler that handles module close event
|
|
54
|
+
* @param params event parameters
|
|
55
|
+
* @param params.obj module object reference
|
|
56
|
+
* @param params.eventName event name
|
|
57
|
+
* @param params.eventParams Module close info
|
|
58
|
+
* @param params.eventOptions additional options related to the event
|
|
59
|
+
* @returns true to allow module unload, false otherwise
|
|
60
|
+
*/
|
|
61
|
+
export type ModuleCloseListener = (params: {
|
|
62
|
+
obj: IModule;
|
|
63
|
+
eventName: string;
|
|
64
|
+
eventParams: ModuleCloseInfo;
|
|
65
|
+
eventOptions?: Record<string, unknown>;
|
|
66
|
+
}) => boolean;
|
|
67
|
+
/**
|
|
68
|
+
* module open event info
|
|
69
|
+
*/
|
|
70
|
+
export type ModuleOpenInfo = {
|
|
71
|
+
/**
|
|
72
|
+
* module to be opened in urn format
|
|
73
|
+
* @example urn:encompass:loanapp
|
|
74
|
+
*/
|
|
75
|
+
moduleId: string;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* event handler that handles module open event
|
|
79
|
+
* @param params event parameters
|
|
80
|
+
* @param params.obj module object reference
|
|
81
|
+
* @param params.eventName event name
|
|
82
|
+
* @param params.eventParams Module open info
|
|
83
|
+
* @param params.eventOptions additional options related to the event
|
|
84
|
+
* @returns true if module is valid and can be opened, false otherwise
|
|
85
|
+
*/
|
|
86
|
+
export type ModuleOpenListener = (params: {
|
|
87
|
+
obj: IModule;
|
|
88
|
+
eventName: string;
|
|
89
|
+
eventParams: ModuleOpenInfo;
|
|
90
|
+
eventOptions?: Record<string, unknown>;
|
|
91
|
+
}) => boolean;
|
|
92
|
+
/**
|
|
93
|
+
* module unload event info
|
|
94
|
+
*/
|
|
95
|
+
export type ModuleUnloadInfo = {
|
|
96
|
+
/**
|
|
97
|
+
* module that triggered the unload event in urn format
|
|
98
|
+
* @example urn:encompass:loanapp
|
|
99
|
+
*/
|
|
100
|
+
moduleId: string;
|
|
101
|
+
};
|
|
28
102
|
/**
|
|
29
103
|
* event handler that handles module unload event
|
|
30
104
|
* @param params event parameters
|
|
@@ -37,13 +111,25 @@ export type ErrorData = {
|
|
|
37
111
|
export type ModuleUnLoadingListener = (params: {
|
|
38
112
|
obj: IModule;
|
|
39
113
|
eventName: string;
|
|
40
|
-
eventParams:
|
|
114
|
+
eventParams: ModuleUnloadInfo;
|
|
41
115
|
eventOptions?: Record<string, unknown>;
|
|
42
116
|
}) => boolean;
|
|
43
117
|
/**
|
|
44
118
|
* events that notifies the module's lifecycle
|
|
45
119
|
*/
|
|
46
120
|
export type ModuleEvents = {
|
|
121
|
+
/**
|
|
122
|
+
* event fired when the module to be closed
|
|
123
|
+
*
|
|
124
|
+
* Use {@link ModuleCloseListener} to handle this event
|
|
125
|
+
*/
|
|
126
|
+
'module.close': ModuleCloseListener;
|
|
127
|
+
/**
|
|
128
|
+
* event fired when the module to be opened
|
|
129
|
+
*
|
|
130
|
+
* Use {@link ModuleOpenListener} to handle this event
|
|
131
|
+
*/
|
|
132
|
+
'module.open': ModuleOpenListener;
|
|
47
133
|
/**
|
|
48
134
|
* event fired when the module is unloading
|
|
49
135
|
*
|
|
@@ -53,12 +139,22 @@ export type ModuleEvents = {
|
|
|
53
139
|
};
|
|
54
140
|
/**
|
|
55
141
|
* Exposes MicroApp module specific methods
|
|
56
|
-
* This is an abstract interface and needs to be extended by the module
|
|
57
|
-
* users should avoid creating Scripting object with name 'Module'
|
|
58
142
|
*
|
|
59
143
|
* See {@link ModuleEvents} for supported events
|
|
60
144
|
*/
|
|
61
145
|
export interface IModule extends IScriptingObject {
|
|
146
|
+
/**
|
|
147
|
+
* event fired when the module to be closed
|
|
148
|
+
*
|
|
149
|
+
* Use {@link ModuleCloseListener} to handle this event
|
|
150
|
+
*/
|
|
151
|
+
readonly Close: IEvent;
|
|
152
|
+
/**
|
|
153
|
+
* event fired when the module to be opened
|
|
154
|
+
*
|
|
155
|
+
* Use {@link ModuleOpenListener} to handle this event
|
|
156
|
+
*/
|
|
157
|
+
readonly Open: IEvent;
|
|
62
158
|
/**
|
|
63
159
|
* event fired when the module is unloading
|
|
64
160
|
*
|
|
@@ -66,17 +162,20 @@ export interface IModule extends IScriptingObject {
|
|
|
66
162
|
*/
|
|
67
163
|
readonly Unloading: IEvent;
|
|
68
164
|
/**
|
|
69
|
-
* get microapp module-specific capabilities or settings defined by the host application.
|
|
165
|
+
* get microapp module-specific capabilities or settings defined by the host application.
|
|
166
|
+
*
|
|
167
|
+
* Helps to define the style and/or behavior of the module
|
|
70
168
|
* @returns capabilities or settings as key-value pairs
|
|
71
169
|
*/
|
|
72
170
|
getCapabilities(): Promise<Record<string, unknown>>;
|
|
73
171
|
/**
|
|
74
172
|
* get microapp module-specific parameters.
|
|
173
|
+
*
|
|
75
174
|
* For example, a lender may select a set of loans within the host application which must be passed to a module
|
|
76
175
|
* that implements a specific workflow for those loans
|
|
77
176
|
* @returns parameters as key-value pairs
|
|
78
177
|
*/
|
|
79
|
-
getParameters(): Promise<
|
|
178
|
+
getParameters(): Promise<ModuleParameters>;
|
|
80
179
|
/**
|
|
81
180
|
* unload the microapp module from the host application
|
|
82
181
|
*/
|