@elliemae/pui-scripting-object 1.40.4 → 1.41.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/types/lib/objects/application.d.ts +113 -70
- package/dist/types/lib/objects/auth.d.ts +12 -0
- package/dist/types/lib/objects/form.d.ts +51 -10
- package/dist/types/lib/objects/global.d.ts +29 -11
- package/dist/types/lib/objects/http.d.ts +8 -8
- package/dist/types/lib/objects/loan.d.ts +232 -99
- package/dist/types/lib/objects/loanv2.d.ts +2 -15
- package/dist/types/lib/objects/memStorage.d.ts +6 -6
- package/dist/types/lib/objects/module.d.ts +23 -9
- package/dist/types/lib/objects/route.d.ts +1 -1
- package/dist/types/lib/objects/service.d.ts +16 -40
- package/dist/types/lib/objects/session.d.ts +6 -5
- package/dist/types/lib/objects/transaction.d.ts +66 -66
- package/dist/types/lib/objects/transactionTemplate.d.ts +6 -6
- package/dist/types/lib/objects/transactionv2.d.ts +14 -14
- package/dist/types/lib/objects/view.d.ts +54 -13
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IEvent
|
|
1
|
+
import { IEvent } from '../event.js';
|
|
2
2
|
import { IScriptingObject } from '../scriptingObject.js';
|
|
3
3
|
/**
|
|
4
4
|
* Parameters for getting field options
|
|
@@ -107,40 +107,105 @@ export declare enum LoanLevelActions {
|
|
|
107
107
|
CALCULATE_EEM_MORTGAGE = "calculateEEMMortgage",
|
|
108
108
|
COPY_BORROWER_TO_TAX_REQUEST = "copyBorrowerToTaxRequest"
|
|
109
109
|
}
|
|
110
|
-
|
|
110
|
+
/**
|
|
111
|
+
* Loan commit event parameters
|
|
112
|
+
*/
|
|
113
|
+
export type CommitInfo = {
|
|
111
114
|
/**
|
|
112
115
|
* cause of commit event
|
|
113
116
|
*/
|
|
114
117
|
cause: string;
|
|
115
118
|
};
|
|
116
119
|
/**
|
|
117
|
-
*
|
|
118
|
-
* @
|
|
120
|
+
* Event handler for loan precommit event
|
|
121
|
+
* @param params event parameters
|
|
122
|
+
* @param params.obj loan object reference
|
|
123
|
+
* @param params.eventName event name
|
|
124
|
+
* @param params.eventParams commit info
|
|
125
|
+
* @param params.eventOptions additional options related to the event
|
|
126
|
+
* @returns true to allow pre-commit, false otherwise
|
|
119
127
|
*/
|
|
120
|
-
export type LoanPreCommitListener =
|
|
128
|
+
export type LoanPreCommitListener = (params: {
|
|
129
|
+
obj: ILoan;
|
|
130
|
+
eventName: string;
|
|
131
|
+
eventParams: CommitInfo;
|
|
132
|
+
eventOptions?: Record<string, unknown>;
|
|
133
|
+
}) => boolean;
|
|
121
134
|
/**
|
|
122
|
-
*
|
|
123
|
-
*
|
|
135
|
+
* Event handler for loan commited event
|
|
136
|
+
* @param params event parameters
|
|
137
|
+
* @param params.obj loan object reference
|
|
138
|
+
* @param params.eventName event name
|
|
139
|
+
* @param params.eventParams commit info
|
|
140
|
+
* @param params.eventOptions additional options related to the event
|
|
124
141
|
*/
|
|
125
|
-
export type LoanCommittedListener =
|
|
142
|
+
export type LoanCommittedListener = (params: {
|
|
143
|
+
obj: ILoan;
|
|
144
|
+
eventName: string;
|
|
145
|
+
eventParams: CommitInfo;
|
|
146
|
+
eventOptions?: Record<string, unknown>;
|
|
147
|
+
}) => void;
|
|
126
148
|
/**
|
|
127
|
-
*
|
|
149
|
+
* Event handler for loan data change event
|
|
150
|
+
* @param params event parameters
|
|
151
|
+
* @param params.obj loan object reference
|
|
152
|
+
* @param params.eventName event name
|
|
153
|
+
* @param params.eventParams loan data change info
|
|
154
|
+
* @param params.eventOptions additional options related to the event
|
|
128
155
|
*/
|
|
129
|
-
export type LoanChangeListener =
|
|
156
|
+
export type LoanChangeListener = (params: {
|
|
157
|
+
obj: ILoan;
|
|
158
|
+
eventName: string;
|
|
159
|
+
eventParams: Record<string, never>;
|
|
160
|
+
eventOptions?: Record<string, unknown>;
|
|
161
|
+
}) => void;
|
|
130
162
|
/**
|
|
131
|
-
*
|
|
163
|
+
* Event handler for loan sync event
|
|
164
|
+
* @param params event parameters
|
|
165
|
+
* @param params.obj loan object reference
|
|
166
|
+
* @param params.eventName event name
|
|
167
|
+
* @param params.eventParams loan sync info
|
|
168
|
+
* @param params.eventOptions additional options related to the event
|
|
132
169
|
*/
|
|
133
|
-
export type LoanSyncListener =
|
|
170
|
+
export type LoanSyncListener = (params: {
|
|
171
|
+
obj: ILoan;
|
|
172
|
+
eventName: string;
|
|
173
|
+
eventParams: Record<string, never>;
|
|
174
|
+
eventOptions?: Record<string, unknown>;
|
|
175
|
+
}) => void;
|
|
134
176
|
/**
|
|
135
177
|
* event handler for loan open event
|
|
178
|
+
* @param params event parameters
|
|
179
|
+
* @param params.obj loan object reference
|
|
180
|
+
* @param params.eventName event name
|
|
181
|
+
* @param params.eventParams loan open info
|
|
182
|
+
* @param params.eventOptions additional options related to the event
|
|
136
183
|
*/
|
|
137
|
-
export type LoanOpenListener =
|
|
184
|
+
export type LoanOpenListener = (params: {
|
|
185
|
+
obj: ILoan;
|
|
186
|
+
eventName: string;
|
|
187
|
+
eventParams: Record<string, never>;
|
|
188
|
+
eventOptions?: Record<string, unknown>;
|
|
189
|
+
}) => void;
|
|
138
190
|
/**
|
|
139
191
|
* event handler for loan close event
|
|
140
|
-
* @
|
|
192
|
+
* @param params event parameters
|
|
193
|
+
* @param params.obj loan object reference
|
|
194
|
+
* @param params.eventName event name
|
|
195
|
+
* @param params.eventParams loan close info
|
|
196
|
+
* @param params.eventOptions additional options related to the event
|
|
197
|
+
* @returns true to close the loan, false otherwise
|
|
198
|
+
*/
|
|
199
|
+
export type LoanCloseListener = (params: {
|
|
200
|
+
obj: ILoan;
|
|
201
|
+
eventName: string;
|
|
202
|
+
eventParams: Record<string, never>;
|
|
203
|
+
eventOptions?: Record<string, unknown>;
|
|
204
|
+
}) => boolean;
|
|
205
|
+
/**
|
|
206
|
+
* Milestone related information
|
|
141
207
|
*/
|
|
142
|
-
export type
|
|
143
|
-
type MilestoneInfo = {
|
|
208
|
+
export type MilestoneInfo = {
|
|
144
209
|
/**
|
|
145
210
|
* milestone name
|
|
146
211
|
*/
|
|
@@ -148,124 +213,218 @@ type MilestoneInfo = {
|
|
|
148
213
|
};
|
|
149
214
|
/**
|
|
150
215
|
* event handler for loan milestone completed event
|
|
216
|
+
* @param params event parameters
|
|
217
|
+
* @param params.obj loan object reference
|
|
218
|
+
* @param params.eventName event name
|
|
219
|
+
* @param params.eventParams milestone info
|
|
220
|
+
* @param params.eventOptions additional options related to the event
|
|
151
221
|
*/
|
|
152
|
-
export type LoanMilestoneCompletedListener =
|
|
222
|
+
export type LoanMilestoneCompletedListener = (params: {
|
|
223
|
+
obj: ILoan;
|
|
224
|
+
eventName: string;
|
|
225
|
+
eventParams: MilestoneInfo;
|
|
226
|
+
eventOptions?: Record<string, unknown>;
|
|
227
|
+
}) => void;
|
|
153
228
|
/**
|
|
154
229
|
* event handler for loan pre milestone complete event
|
|
155
|
-
* @
|
|
230
|
+
* @param params event parameters
|
|
231
|
+
* @param params.obj loan object reference
|
|
232
|
+
* @param params.eventName event name
|
|
233
|
+
* @param params.eventParams milestone info
|
|
234
|
+
* @param params.eventOptions additional options related to the event
|
|
235
|
+
* @returns true to allow milestone completion, false otherwise
|
|
156
236
|
*/
|
|
157
|
-
export type LoanPreMilestoneCompleteListener =
|
|
237
|
+
export type LoanPreMilestoneCompleteListener = (params: {
|
|
238
|
+
obj: ILoan;
|
|
239
|
+
eventName: string;
|
|
240
|
+
eventParams: MilestoneInfo;
|
|
241
|
+
eventOptions?: Record<string, unknown>;
|
|
242
|
+
}) => boolean;
|
|
158
243
|
/**
|
|
159
244
|
* event handler for loan application selected event
|
|
245
|
+
* @param params event parameters
|
|
246
|
+
* @param params.obj loan object reference
|
|
247
|
+
* @param params.eventName event name
|
|
248
|
+
* @param params.eventParams Selected application info
|
|
249
|
+
* @param params.eventOptions additional options related to the event
|
|
160
250
|
*/
|
|
161
|
-
export type LoanApplicationSelectedListener =
|
|
251
|
+
export type LoanApplicationSelectedListener = (params: {
|
|
252
|
+
obj: ILoan;
|
|
253
|
+
eventName: string;
|
|
254
|
+
eventParams: Record<string, never>;
|
|
255
|
+
eventOptions?: Record<string, unknown>;
|
|
256
|
+
}) => void;
|
|
162
257
|
/**
|
|
163
|
-
*
|
|
258
|
+
* Events supported by Loan scripting object
|
|
164
259
|
*/
|
|
165
260
|
export type LoanEvents = {
|
|
166
261
|
/**
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
262
|
+
* Event is fired when a borrower pair changes
|
|
263
|
+
*
|
|
264
|
+
* Use {@link LoanApplicationSelectedListener} to handle this event
|
|
265
|
+
*
|
|
170
266
|
*/
|
|
171
|
-
'loan.
|
|
267
|
+
'loan.applicationselected': LoanApplicationSelectedListener;
|
|
172
268
|
/**
|
|
173
|
-
*
|
|
269
|
+
* Event is fired for each change made by the user in the UI
|
|
270
|
+
*
|
|
271
|
+
* Use {@link LoanChangeListener} to handle this event
|
|
272
|
+
*
|
|
174
273
|
*/
|
|
175
|
-
'loan.
|
|
274
|
+
'loan.change': LoanChangeListener;
|
|
176
275
|
/**
|
|
177
|
-
*
|
|
276
|
+
* Event is fired after pending changes to the loan are committed
|
|
277
|
+
*
|
|
278
|
+
* Use {@link LoanCommittedListener} to handle this event
|
|
279
|
+
*
|
|
178
280
|
*/
|
|
179
|
-
'loan.
|
|
281
|
+
'loan.committed': LoanCommittedListener;
|
|
180
282
|
/**
|
|
181
|
-
*
|
|
283
|
+
* Event is fired just prior to closing the loan in the UI
|
|
284
|
+
*
|
|
285
|
+
* Use {@link LoanCloseListener} to handle this event
|
|
286
|
+
*
|
|
182
287
|
*/
|
|
183
|
-
'loan.
|
|
288
|
+
'loan.close': LoanCloseListener;
|
|
184
289
|
/**
|
|
185
|
-
*
|
|
290
|
+
* Event is fired after a milestone is completed by the user and committed to the server
|
|
291
|
+
*
|
|
292
|
+
* Use {@link LoanMilestoneCompletedListener} to handle this event
|
|
293
|
+
*
|
|
186
294
|
*/
|
|
187
|
-
'loan.
|
|
295
|
+
'loan.milestoneCompleted': LoanMilestoneCompletedListener;
|
|
188
296
|
/**
|
|
189
|
-
*
|
|
297
|
+
* Event is fired after the loan is opened and ready for user interaction
|
|
298
|
+
*
|
|
299
|
+
* Use {@link LoanOpenListener} to handle this event
|
|
300
|
+
*
|
|
190
301
|
*/
|
|
191
|
-
'loan.
|
|
302
|
+
'loan.open': LoanOpenListener;
|
|
192
303
|
/**
|
|
193
|
-
*
|
|
304
|
+
* Event is fired prior to saving any pending changes to the loan.
|
|
305
|
+
*
|
|
306
|
+
* The guest can use this event to perform custom validation and,
|
|
307
|
+
* via the feedback mechanism, prevent the loan from being saved
|
|
308
|
+
*
|
|
309
|
+
* Use {@link LoanPreCommitListener} to handle this event
|
|
310
|
+
*
|
|
194
311
|
*/
|
|
195
|
-
'loan.
|
|
312
|
+
'loan.precommit': LoanPreCommitListener;
|
|
196
313
|
/**
|
|
197
|
-
*
|
|
314
|
+
* Event is fired when the user attempts to complete a milestone and allows for custom validation,
|
|
198
315
|
* and cancellation, of the process
|
|
316
|
+
*
|
|
317
|
+
* Use {@link LoanPreMilestoneCompleteListener} to handle this event
|
|
318
|
+
*
|
|
199
319
|
*/
|
|
200
320
|
'loan.premilestoneComplete': LoanPreMilestoneCompleteListener;
|
|
201
321
|
/**
|
|
202
|
-
*
|
|
322
|
+
* Event is fired after the loan is sync'ed within any saved state made outside of the user's workspace.
|
|
323
|
+
*
|
|
324
|
+
* use {@link LoanSyncListener} to handle this event
|
|
325
|
+
*
|
|
203
326
|
*/
|
|
204
|
-
'loan.
|
|
327
|
+
'loan.sync': LoanSyncListener;
|
|
205
328
|
};
|
|
206
329
|
/**
|
|
207
|
-
* Methods for interacting with an open loan in the application
|
|
330
|
+
* Methods & Events for interacting with an open loan in the application
|
|
331
|
+
*
|
|
332
|
+
* See {@link LoanEvents} for supported events
|
|
208
333
|
*/
|
|
209
334
|
export interface ILoan extends IScriptingObject {
|
|
210
335
|
/**
|
|
211
|
-
* event fired when the loan is
|
|
336
|
+
* event fired when the loan application is selected
|
|
337
|
+
*
|
|
338
|
+
* Use {@link LoanApplicationSelectedListener} to handle this event
|
|
212
339
|
*/
|
|
213
|
-
readonly
|
|
340
|
+
readonly ApplicationSelected: IEvent;
|
|
214
341
|
/**
|
|
215
|
-
* event fired when the loan is
|
|
342
|
+
* event fired when the loan is closed
|
|
343
|
+
*
|
|
344
|
+
* Use {@link LoanCloseListener} to handle this event
|
|
216
345
|
*/
|
|
217
|
-
readonly
|
|
346
|
+
readonly Close: IEvent;
|
|
218
347
|
/**
|
|
219
348
|
* event fired when the loan is changed
|
|
349
|
+
*
|
|
350
|
+
* Use {@link LoanChangeListener} to handle this event
|
|
220
351
|
*/
|
|
221
352
|
readonly Change: IEvent;
|
|
222
353
|
/**
|
|
223
|
-
* event fired when the loan is
|
|
354
|
+
* event fired when the loan is committed
|
|
355
|
+
*
|
|
356
|
+
* Use {@link LoanCommittedListener} to handle this event
|
|
224
357
|
*/
|
|
225
|
-
readonly
|
|
358
|
+
readonly Committed: IEvent;
|
|
226
359
|
/**
|
|
227
|
-
* event fired when the loan is
|
|
360
|
+
* event fired when the loan milestone is completed
|
|
361
|
+
*
|
|
362
|
+
* Use {@link LoanMilestoneCompletedListener} to handle this event
|
|
228
363
|
*/
|
|
229
|
-
readonly
|
|
364
|
+
readonly MilestoneCompleted: IEvent;
|
|
230
365
|
/**
|
|
231
|
-
* event fired when the loan is
|
|
366
|
+
* event fired when the loan is opened
|
|
367
|
+
*
|
|
368
|
+
* Use {@link LoanOpenListener} to handle this event
|
|
232
369
|
*/
|
|
233
|
-
readonly
|
|
370
|
+
readonly Open: IEvent;
|
|
234
371
|
/**
|
|
235
|
-
* event fired when the loan
|
|
372
|
+
* event fired when the loan is ready to commit
|
|
373
|
+
*
|
|
374
|
+
* Use {@link LoanPreCommitListener} handles this event
|
|
236
375
|
*/
|
|
237
|
-
readonly
|
|
376
|
+
readonly PreCommit: IEvent;
|
|
238
377
|
/**
|
|
239
378
|
* event fired when the loan is ready to complete milestone
|
|
379
|
+
*
|
|
380
|
+
* Use {@link LoanPreMilestoneCompleteListener} to handle this event
|
|
240
381
|
*/
|
|
241
382
|
readonly PreMilestoneComplete: IEvent;
|
|
242
383
|
/**
|
|
243
|
-
* event fired when the loan
|
|
384
|
+
* event fired when the loan is synced
|
|
385
|
+
*
|
|
386
|
+
* Use {@link LoanSyncListener} to handle this event
|
|
244
387
|
*/
|
|
245
|
-
readonly
|
|
388
|
+
readonly Sync: IEvent;
|
|
246
389
|
/**
|
|
247
390
|
* Get complete Loan object
|
|
248
391
|
* @returns v3 Loan Object
|
|
249
|
-
*
|
|
250
|
-
* #### Product Compatibility:
|
|
251
|
-
* | | Encompass | Encompass Web | TPO | Consumer Connect |
|
|
252
|
-
* :-----:|:-----: |:-----: |:-----: |:-----: |
|
|
253
|
-
* | all | ✔ | ✔ | ✔ | ✖️ |
|
|
254
392
|
*/
|
|
255
393
|
all(): Promise<LoanObject>;
|
|
256
394
|
/**
|
|
257
395
|
* Applies a partial loan object to the current loan,
|
|
258
396
|
*/
|
|
259
397
|
apply(loan: LoanObject): Promise<void>;
|
|
398
|
+
/**
|
|
399
|
+
* 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
|
|
400
|
+
* @param fieldId ID of the field you want to apply or remove the calculation lock
|
|
401
|
+
* @param lock
|
|
402
|
+
*/
|
|
403
|
+
applyLock(fieldId: string, lock: boolean): Promise<void>;
|
|
404
|
+
/**
|
|
405
|
+
* Executes calculations and business rules
|
|
406
|
+
*/
|
|
407
|
+
calculate(): Promise<void>;
|
|
260
408
|
/**
|
|
261
409
|
* Commit all pending changes on the current loan
|
|
262
410
|
*
|
|
263
|
-
* #### Product Compatibility:
|
|
264
|
-
* | | Encompass | Encompass Web | TPO | Consumer Connect |
|
|
265
|
-
* :-----:|:-----: |:-----: |:-----: |:-----: |
|
|
266
|
-
* | all | ✔ | ✔ | ✔ | ✖️ |
|
|
267
411
|
*/
|
|
268
412
|
commit(): Promise<void>;
|
|
413
|
+
/**
|
|
414
|
+
* Execute loan level action, this is specific to v3 stateful implementation
|
|
415
|
+
* @param type type of action to be executed
|
|
416
|
+
* @param params additional parameters for the action
|
|
417
|
+
*/
|
|
418
|
+
execAction(type: LoanLevelActions, params?: Record<string, unknown>): Promise<LoanObject>;
|
|
419
|
+
/**
|
|
420
|
+
* Returns an object with current application selected
|
|
421
|
+
*/
|
|
422
|
+
getCurrentApplication(): Promise<Record<string, string>>;
|
|
423
|
+
/**
|
|
424
|
+
* Returns an object reference of type LoanCollection. Argument "name" is required & used to get specific collection like BorrowerEmployer, Escrow etc.
|
|
425
|
+
* @param name collection template name
|
|
426
|
+
*/
|
|
427
|
+
getCollection(name: string): Promise<Record<string, string>>;
|
|
269
428
|
/**
|
|
270
429
|
* get value of the given field id
|
|
271
430
|
* @param id field id
|
|
@@ -322,58 +481,32 @@ export interface ILoan extends IScriptingObject {
|
|
|
322
481
|
*/
|
|
323
482
|
getFields(ids: string[]): Promise<Record<string, string>>;
|
|
324
483
|
/**
|
|
325
|
-
*
|
|
326
|
-
* @param fields list of field ids and their values
|
|
327
|
-
*/
|
|
328
|
-
setFields(fields: Record<string, string>): Promise<void>;
|
|
329
|
-
/**
|
|
330
|
-
* Syncs the loan workspace with any changes made by other users.
|
|
484
|
+
* get snapshot of loan object
|
|
331
485
|
*/
|
|
332
|
-
|
|
486
|
+
getLockSnapshot(): Promise<Record<string, string>>;
|
|
333
487
|
/**
|
|
334
488
|
* Indicates if the loan is editable or in a read-only state.
|
|
335
489
|
*/
|
|
336
490
|
isReadOnly(): Promise<boolean>;
|
|
337
491
|
/**
|
|
338
|
-
*
|
|
339
|
-
* @param fieldId ID of the field you want to apply or remove the calculation lock
|
|
340
|
-
* @param lock
|
|
341
|
-
*/
|
|
342
|
-
applyLock(fieldId: string, lock: boolean): Promise<void>;
|
|
343
|
-
/**
|
|
344
|
-
* Executes calculations and business rules
|
|
345
|
-
*/
|
|
346
|
-
calculate(): Promise<void>;
|
|
347
|
-
/**
|
|
348
|
-
* Returns an object with current application selected
|
|
492
|
+
* Syncs the loan workspace with any changes made by other users.
|
|
349
493
|
*/
|
|
350
|
-
|
|
494
|
+
merge(): Promise<void>;
|
|
351
495
|
/**
|
|
352
496
|
* Update data for current application
|
|
353
|
-
* @param options
|
|
497
|
+
* @param options options for setting current application
|
|
354
498
|
*/
|
|
355
499
|
setCurrentApplication(options: CurrentApplicationOptions): Promise<void>;
|
|
356
500
|
/**
|
|
357
|
-
*
|
|
358
|
-
* @param
|
|
359
|
-
* @param params {Record<string, unknown>} additional parameters for the action
|
|
360
|
-
*/
|
|
361
|
-
execAction(type: LoanLevelActions, params?: Record<string, unknown>): Promise<LoanObject>;
|
|
362
|
-
/**
|
|
363
|
-
* Returns an object reference of type LoanCollection. Argument "name" is required & used to get specific collection like BorrowerEmployer, Escrow etc.
|
|
364
|
-
* @param name collection template name
|
|
365
|
-
*/
|
|
366
|
-
getCollection(name: string): Promise<Record<string, string>>;
|
|
367
|
-
/**
|
|
368
|
-
* get snapshot of loan object
|
|
501
|
+
* Set the values of one or more fields on the Loan.
|
|
502
|
+
* @param fields list of field ids and their values
|
|
369
503
|
*/
|
|
370
|
-
|
|
504
|
+
setFields(fields: Record<string, string>): Promise<void>;
|
|
371
505
|
/**
|
|
372
506
|
* insert, delete, update, replace different loand record types.
|
|
373
507
|
* scope includes log and non-log record types
|
|
374
|
-
* @param options
|
|
508
|
+
* @param options options for updating records
|
|
375
509
|
* @returns array of record ids or loan view entity
|
|
376
510
|
*/
|
|
377
511
|
updateRecords(options: RecordOptions): Promise<Array<string> | Array<unknown>>;
|
|
378
512
|
}
|
|
379
|
-
export {};
|
|
@@ -93,6 +93,8 @@ export type FieldIDToContractPath = {
|
|
|
93
93
|
};
|
|
94
94
|
/**
|
|
95
95
|
* All operations on a loan are stateful. This means loan changes are not committed until the loan.commit is called
|
|
96
|
+
*
|
|
97
|
+
* See {@link LoanEvents} for supported events
|
|
96
98
|
*/
|
|
97
99
|
export interface ILoanV2 extends Omit<ILoan, 'commit' | 'setFields' | 'merge'> {
|
|
98
100
|
/**
|
|
@@ -107,11 +109,6 @@ export interface ILoanV2 extends Omit<ILoan, 'commit' | 'setFields' | 'merge'> {
|
|
|
107
109
|
* if operation fails due to business / functional rules
|
|
108
110
|
* @throws Error
|
|
109
111
|
* if operation fails due to network errors
|
|
110
|
-
*
|
|
111
|
-
* #### Product Compatibility:
|
|
112
|
-
* | | Encompass | Encompass Web | TPO | Consumer Connect |
|
|
113
|
-
* :-----:|:-----: |:-----: |:-----: |:-----: |
|
|
114
|
-
* | commit | ✖️ | ✖️ | ✖️ | ✖️ |
|
|
115
112
|
*/
|
|
116
113
|
commit(): Promise<void>;
|
|
117
114
|
/**
|
|
@@ -130,11 +127,6 @@ export interface ILoanV2 extends Omit<ILoan, 'commit' | 'setFields' | 'merge'> {
|
|
|
130
127
|
* @returns {Promise<LoanObject>} loan object
|
|
131
128
|
* @throws Error
|
|
132
129
|
* if operation fails due to network error
|
|
133
|
-
*
|
|
134
|
-
* #### Product Compatibility:
|
|
135
|
-
* | | Encompass | Encompass Web | TPO | Consumer Connect |
|
|
136
|
-
* :-----:|:-----: |:-----: |:-----: |:-----: |
|
|
137
|
-
* | merge | ✖️ | ✖️ | ✖️ | ✖️ |
|
|
138
130
|
*/
|
|
139
131
|
merge(): Promise<LoanObject>;
|
|
140
132
|
/**
|
|
@@ -143,11 +135,6 @@ export interface ILoanV2 extends Omit<ILoan, 'commit' | 'setFields' | 'merge'> {
|
|
|
143
135
|
* @returns list of field ids that failed to set
|
|
144
136
|
* @throws Error
|
|
145
137
|
* if operation fails due to network error
|
|
146
|
-
*
|
|
147
|
-
* #### Product Compatibility:
|
|
148
|
-
* | | Encompass | Encompass Web | TPO | Consumer Connect |
|
|
149
|
-
* :-----:|:-----: |:-----: |:-----: |:-----: |
|
|
150
|
-
* | setFields | ✖️ | ✖️ | ✖️ | ✖️ |
|
|
151
138
|
*/
|
|
152
139
|
setFields(fields: Record<string, string>): Promise<SetFieldResponse>;
|
|
153
140
|
}
|
|
@@ -9,16 +9,16 @@ import { IScriptingObject } from '../scriptingObject.js';
|
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
11
11
|
export interface IMemStorage extends IScriptingObject {
|
|
12
|
-
/**
|
|
13
|
-
* set a value in memory for given key
|
|
14
|
-
* @param key unique key to store the value
|
|
15
|
-
* @param value value to be stored. value should be JSON serializable
|
|
16
|
-
*/
|
|
17
|
-
set(key: string, value: unknown): Promise<void>;
|
|
18
12
|
/**
|
|
19
13
|
* get a value from memory for given key and microapp id
|
|
20
14
|
* @param key unique key to retrieve the value
|
|
21
15
|
* @returns value stored in memory
|
|
22
16
|
*/
|
|
23
17
|
get(key: string): Promise<unknown>;
|
|
18
|
+
/**
|
|
19
|
+
* set a value in memory for given key
|
|
20
|
+
* @param key unique key to store the value
|
|
21
|
+
* @param value value to be stored. value should be JSON serializable
|
|
22
|
+
*/
|
|
23
|
+
set(key: string, value: unknown): Promise<void>;
|
|
24
24
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IEvent
|
|
1
|
+
import { IEvent } from '../event.js';
|
|
2
2
|
import { IScriptingObject } from '../scriptingObject.js';
|
|
3
3
|
/**
|
|
4
4
|
* error data to be displayed in the error dialog
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export type ErrorData = {
|
|
7
7
|
/**
|
|
8
8
|
* short description of the error
|
|
9
9
|
*/
|
|
@@ -24,20 +24,30 @@ export interface ErrorData {
|
|
|
24
24
|
* unique id to identify the session / transaction, if any
|
|
25
25
|
*/
|
|
26
26
|
correlationId?: string;
|
|
27
|
-
}
|
|
27
|
+
};
|
|
28
28
|
/**
|
|
29
29
|
* event handler that handles module unload event
|
|
30
|
-
* @param
|
|
31
|
-
* @
|
|
30
|
+
* @param params event parameters
|
|
31
|
+
* @param params.obj module object reference
|
|
32
|
+
* @param params.eventName event name
|
|
33
|
+
* @param params.eventParams Module unload info
|
|
34
|
+
* @param params.eventOptions additional options related to the event
|
|
35
|
+
* @returns true to allow module unload, false otherwise
|
|
32
36
|
*/
|
|
33
|
-
export type ModuleUnLoadingListener =
|
|
37
|
+
export type ModuleUnLoadingListener = (params: {
|
|
38
|
+
obj: IModule;
|
|
39
|
+
eventName: string;
|
|
40
|
+
eventParams: Record<string, never>;
|
|
41
|
+
eventOptions?: Record<string, unknown>;
|
|
42
|
+
}) => boolean;
|
|
34
43
|
/**
|
|
35
44
|
* events that notifies the module's lifecycle
|
|
36
45
|
*/
|
|
37
46
|
export type ModuleEvents = {
|
|
38
47
|
/**
|
|
39
48
|
* event fired when the module is unloading
|
|
40
|
-
*
|
|
49
|
+
*
|
|
50
|
+
* Use {@link ModuleUnLoadingListener} to handle this event
|
|
41
51
|
*/
|
|
42
52
|
'module.unloading': ModuleUnLoadingListener;
|
|
43
53
|
};
|
|
@@ -45,10 +55,14 @@ export type ModuleEvents = {
|
|
|
45
55
|
* Exposes MicroApp module specific methods
|
|
46
56
|
* This is an abstract interface and needs to be extended by the module
|
|
47
57
|
* users should avoid creating Scripting object with name 'Module'
|
|
58
|
+
*
|
|
59
|
+
* See {@link ModuleEvents} for supported events
|
|
48
60
|
*/
|
|
49
61
|
export interface IModule extends IScriptingObject {
|
|
50
62
|
/**
|
|
51
63
|
* event fired when the module is unloading
|
|
64
|
+
*
|
|
65
|
+
* Use {@link ModuleUnLoadingListener} to handle this event
|
|
52
66
|
*/
|
|
53
67
|
readonly Unloading: IEvent;
|
|
54
68
|
/**
|
|
@@ -71,8 +85,8 @@ export interface IModule extends IScriptingObject {
|
|
|
71
85
|
* open a dialog in hosting application to display an error message and related help link
|
|
72
86
|
*
|
|
73
87
|
* Note: once the dialog is closed, caller need to set the focus back to the link or button that opened the dialog to ensure keyboard navigation works as expected
|
|
74
|
-
* @param
|
|
75
|
-
* @returns
|
|
88
|
+
* @param data error message to be displayed
|
|
89
|
+
* @returns a promise that resolves when the dialog is closed
|
|
76
90
|
*/
|
|
77
91
|
showError(data: ErrorData): Promise<void>;
|
|
78
92
|
}
|