@elliemae/pui-scripting-object 1.46.4 → 1.48.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.
@@ -7,8 +7,19 @@ export type UnAuthorizedError = Error;
7
7
  * Personas information
8
8
  */
9
9
  export type Personas = {
10
+ /**
11
+ * unique identifier for the persona
12
+ */
10
13
  entityId: string;
14
+ /**
15
+ * type of the entity
16
+ * @example 'Persona'
17
+ */
11
18
  entityType: string;
19
+ /**
20
+ * name of the entity
21
+ * @example 'Loan Officer'
22
+ */
12
23
  entityName: string;
13
24
  };
14
25
  /**
@@ -129,10 +140,6 @@ export type TokenInfo = {
129
140
  * @example https://int.api.ellielabs.com
130
141
  */
131
142
  host_name: string;
132
- /**
133
- * unique id of the oauth client
134
- */
135
- client_id: string;
136
143
  };
137
144
  /**
138
145
  * Methods to get information about the user and access token
@@ -148,6 +155,10 @@ export interface IAuth extends IScriptingObject {
148
155
  * @param redirectUri redirect url of the plugin / microapp
149
156
  * @param scope scope of the plugin / microapp
150
157
  * @returns auth code
158
+ * @example
159
+ * ```javascript
160
+ * const authCode = await auth.createAuthCode('abc', 'https://clientx.com', 'lp');
161
+ * ```
151
162
  */
152
163
  createAuthCode(clientId: string, redirectUri: string, scope: string): Promise<string>;
153
164
  /**
@@ -156,6 +167,10 @@ export interface IAuth extends IScriptingObject {
156
167
  * should able to find out the caller of this api and request necessary child token
157
168
  * @returns access token with the api base url
158
169
  * @throws {UnAuthorizedError} if the customization, requesting the token, doesn not have active subscription to developer connect product
170
+ * @example
171
+ * ```javascript
172
+ * const token = await auth.getAccessToken();
173
+ * ```
159
174
  */
160
175
  getAccessToken(): Promise<TokenInfo>;
161
176
  /**
@@ -35,7 +35,7 @@ export type CurrentApplicationOptions = {
35
35
  /**
36
36
  * unique borrower pair id
37
37
  */
38
- borrowerPairId: string;
38
+ id: string;
39
39
  };
40
40
  /**
41
41
  * loan record actions
@@ -107,6 +107,77 @@ export declare enum LoanLevelActions {
107
107
  CALCULATE_EEM_MORTGAGE = "calculateEEMMortgage",
108
108
  COPY_BORROWER_TO_TAX_REQUEST = "copyBorrowerToTaxRequest"
109
109
  }
110
+ /**
111
+ * Loan collection names
112
+ */
113
+ export declare enum LoanCollection {
114
+ AffiliatedBusinessArrangements = "AB0000",
115
+ AlternateNameBorrower = "URLABAKA0000",
116
+ AlternateNameCoBorrower = "URLACAKA0000",
117
+ BorrowerCreditReports = "BCRED0000",
118
+ BorrowerEmployer = "BE0000",
119
+ BorrowerResidence = "BR0000",
120
+ CoBorrowerCreditReports = "CCRED0000",
121
+ CoBorrowerEmployer = "CE0000",
122
+ CoBorrowerResidence = "CR0000",
123
+ DepositoryInformation = "DD0000",
124
+ Disclosures = "DISC0000",
125
+ EarlyCheck = "EC0000",
126
+ Escrow = "HUD0000",
127
+ GiftOrGrant = "URLARGG0000",
128
+ GoodFaithChangeOfCircumstance = "XCOC0000",
129
+ GSERepAndWarrantTracker = "TQLGSE0000",
130
+ HomeCounselingProvider = "HC0000",
131
+ IRS4506Record = "AR0000",
132
+ IRS4506TRecord = "IR0000",
133
+ ItemizedEscrowPayment = "AEA0000",
134
+ LiabilityInformation = "FL0000",
135
+ LoanPrograms = "LP0000",
136
+ MortgageProperty = "FM0000",
137
+ NonBorrowingOwnerFileContact = "NBOC0000",
138
+ NYFees = "NYFEES0000",
139
+ OtherAssets = "URLAROA0000",
140
+ OtherBorrowerEmployer = "FBE0000",
141
+ OtherCoBorrowerEmployer = "FCE0000",
142
+ OtherIncome = "URLAROIS0000",
143
+ OtherLiabilitiesOrDepository = "URLAROL0000",
144
+ PropertyValuations = "PVAL0000",
145
+ REGZDrawRepayPeriodDraw = "HTD0000",
146
+ REGZDrawRepayPeriodRepay = "HTR0000",
147
+ Riders = "RIDER0000",
148
+ Scenarios = "SCEN0000",
149
+ SettlementServiceProvider = "SP0000",
150
+ SpecialFeatureCodes = "SFC0000",
151
+ TQLBorrower4506TOrders = "TQL4506T0000",
152
+ TQLComplianceOrdersLastAlert = "TQLCOMPLIANCEALERT0000",
153
+ TQLDocumentDeliveredToInvestor = "TQLDOCDATE0000",
154
+ TQLFraudOrders = "TQLFRAUDALERT0000",
155
+ TrustAccountTransactionDescription = "TA0000",
156
+ UCDAdjustmentType = "UNFL0000",
157
+ Valuation = "VAL0000",
158
+ VerificationOfAdditionalLoans = "URLARAL0000",
159
+ VestingParty = "TR0000",
160
+ CorrespondentOtherInsurances = "CORROI0000"
161
+ }
162
+ /**
163
+ * Loan collection object
164
+ */
165
+ export type LoanCollectionObject = {
166
+ /**
167
+ * unique id of the collection. e.g: LoanCollection
168
+ */
169
+ id: string;
170
+ /**
171
+ * object type
172
+ */
173
+ objectType: string;
174
+ /**
175
+ * Removes a collection record from the LoanCollection reference
176
+ * @param index Zero based collection index to delete, i.e. use 0 to delete first record from collection. This argument is required. You can also use negative values to delete in reverse order e.g to delete last record use -1, second from last use -2 & so on.
177
+ * @param applicationIndex Zero based application index (Borrower Pair Index), use 0 to remove data that belongs to 1st borrower pair. This argument is optional. If this argument is missing, removeAt will perform delete on current selected borrower pair's index
178
+ */
179
+ removeAt: (index: number, applicationIndex: number) => void;
180
+ };
110
181
  /**
111
182
  * Loan commit event parameters
112
183
  */
@@ -145,6 +216,27 @@ export type LoanCommittedListener = (params: {
145
216
  eventParams: CommitInfo;
146
217
  eventOptions?: Record<string, unknown>;
147
218
  }) => void;
219
+ /**
220
+ * Loan change event parameters
221
+ */
222
+ export type LoanChangeEventInfo = {
223
+ /**
224
+ * field id
225
+ */
226
+ fieldId: string;
227
+ /**
228
+ * operation performed on the field
229
+ */
230
+ op: string;
231
+ /**
232
+ * old field value
233
+ */
234
+ oldVal: string;
235
+ /**
236
+ * new field value
237
+ */
238
+ newVal: string;
239
+ };
148
240
  /**
149
241
  * Event handler for loan data change event
150
242
  * @param params event parameters
@@ -156,7 +248,7 @@ export type LoanCommittedListener = (params: {
156
248
  export type LoanChangeListener = (params: {
157
249
  obj: ILoan;
158
250
  eventName: string;
159
- eventParams: Record<string, never>;
251
+ eventParams: LoanChangeEventInfo;
160
252
  eventOptions?: Record<string, unknown>;
161
253
  }) => void;
162
254
  /**
@@ -239,6 +331,32 @@ export type MilestoneInfo = {
239
331
  */
240
332
  name: string;
241
333
  };
334
+ /**
335
+ * Selected application related information
336
+ */
337
+ export type ApplicationInfo = {
338
+ /**
339
+ * borrower pair index
340
+ */
341
+ index: number;
342
+ /**
343
+ * borrower pair unique id
344
+ */
345
+ id: string;
346
+ /**
347
+ * borrower pair legacy id
348
+ */
349
+ legacyId: string;
350
+ };
351
+ /**
352
+ * Return type for action execution
353
+ */
354
+ export type ActionResponse = {
355
+ /**
356
+ * action status. e.g. success
357
+ */
358
+ status: string;
359
+ };
242
360
  /**
243
361
  * event handler for loan milestone completed event
244
362
  * @param params event parameters
@@ -398,71 +516,239 @@ export interface ILoan extends IScriptingObject {
398
516
  * event fired when the loan application is selected
399
517
  *
400
518
  * Use {@link LoanApplicationSelectedListener} to handle this event
519
+ * @example
520
+ * with v2 SSF
521
+ * ```ts
522
+ * guest.subscribe({
523
+ * eventId: 'loan.applicationselected',
524
+ * callback: ({ eventParams }) => {
525
+ * console.log('Application Selected', eventParams);
526
+ * });
527
+ * });
528
+ * ```
529
+ * @example
530
+ * with v1 SSF
531
+ * ```ts
532
+ * elli.script.subscribe('loan', 'applicationselected', ({ eventParams }) => {
533
+ * console.log('Application Selected', eventParams);
534
+ * });
401
535
  */
402
536
  readonly ApplicationSelected: IEvent;
403
537
  /**
404
- * event fired when the loan is closed
538
+ * event fired prior to closing the loan
405
539
  *
406
540
  * Use {@link LoanCloseListener} to handle this event
541
+ * @example
542
+ * with v2 SSF
543
+ * ```ts
544
+ * guest.subscribe({
545
+ * eventId: 'loan.close',
546
+ * callback: ({ eventParams }) => {
547
+ * console.log('Loan closing', eventParams);
548
+ * return true;
549
+ * });
550
+ * });
551
+ * ```
552
+ * @example
553
+ * with v1 SSF
554
+ * ```ts
555
+ * elli.script.subscribe('loan', 'close', ({ eventParams }) => {
556
+ * console.log('Loan closing', eventParams);
557
+ * return true;
558
+ * });
407
559
  */
408
560
  readonly Close: IEvent;
409
561
  /**
410
- * event fired when the loan is changed
562
+ * event fired for each loan change made by the user
411
563
  *
412
564
  * Use {@link LoanChangeListener} to handle this event
565
+ * @example
566
+ * with v2 SSF
567
+ * ```ts
568
+ * guest.subscribe({
569
+ * eventId: 'loan.change',
570
+ * callback: ({ eventParams }) => {
571
+ * console.log('Loan changed', eventParams);
572
+ * });
573
+ * });
574
+ * ```
575
+ * @example
576
+ * with v1 SSF
577
+ * ```ts
578
+ * elli.script.subscribe('loan', 'change', ({ eventParams }) => {
579
+ * console.log('Loan changed', eventParams);
580
+ * });
413
581
  */
414
582
  readonly Change: IEvent;
415
583
  /**
416
- * event fired when the loan is committed
584
+ * event fired when the loan changes are committed
417
585
  *
418
586
  * Use {@link LoanCommittedListener} to handle this event
587
+ * @example
588
+ * with v2 SSF
589
+ * ```ts
590
+ * guest.subscribe({
591
+ * eventId: 'loan.committed',
592
+ * callback: ({ eventParams }) => {
593
+ * console.log('Loan committed', eventParams);
594
+ * });
595
+ * });
596
+ * ```
597
+ * @example
598
+ * with v1 SSF
599
+ * ```ts
600
+ * elli.script.subscribe('loan', 'committed', ({ eventParams }) => {
601
+ * console.log('Loan committed', eventParams);
602
+ * });
419
603
  */
420
604
  readonly Committed: IEvent;
421
605
  /**
422
606
  * event fired when the loan edit mode is changed
423
607
  *
424
608
  * Use {@link LoanEditModeChangeListener} to handle this event
609
+ * @example
610
+ * with v2 SSF
611
+ * ```ts
612
+ * guest.subscribe({
613
+ * eventId: 'loan.editModeChange',
614
+ * callback: ({ eventParams }) => {
615
+ * console.log('Loan edit mode changed', eventParams);
616
+ * });
617
+ * });
618
+ * ```
619
+ * @example
620
+ * with v1 SSF
621
+ * ```ts
622
+ * elli.script.subscribe('loan', 'editModeChange', ({ eventParams }) => {
623
+ * console.log('Loan edit mode changed', eventParams);
624
+ * });
425
625
  */
426
626
  readonly EditModeChange: IEvent;
427
627
  /**
428
628
  * event fired when the loan milestone is completed
429
629
  *
430
630
  * Use {@link LoanMilestoneCompletedListener} to handle this event
631
+ * @example
632
+ * with v2 SSF
633
+ * ```ts
634
+ * guest.subscribe({
635
+ * eventId: 'loan.milestoneCompleted',
636
+ * callback: ({ eventParams }) => {
637
+ * console.log('Loan milestone completed', eventParams);
638
+ * });
639
+ * });
640
+ * ```
641
+ * @example
642
+ * with v1 SSF
643
+ * ```ts
644
+ * elli.script.subscribe('loan', 'milestoneCompleted', ({ eventParams }) => {
645
+ * console.log('Loan milestone completed', eventParams);
646
+ * });
431
647
  */
432
648
  readonly MilestoneCompleted: IEvent;
433
649
  /**
434
650
  * event fired when the loan is opened
435
651
  *
436
652
  * Use {@link LoanOpenListener} to handle this event
653
+ * @example
654
+ * with v2 SSF
655
+ * ```ts
656
+ * guest.subscribe({
657
+ * eventId: 'loan.open',
658
+ * callback: ({ eventParams }) => {
659
+ * console.log('Loan open', eventParams);
660
+ * });
661
+ * });
662
+ * ```
663
+ * @example
664
+ * with v1 SSF
665
+ * ```ts
666
+ * elli.script.subscribe('loan', 'open', ({ eventParams }) => {
667
+ * console.log('Loan open', eventParams);
668
+ * });
437
669
  */
438
670
  readonly Open: IEvent;
439
671
  /**
440
- * event fired when the loan is ready to commit
672
+ * event is fired prior to saving and pending changes to the loan
673
+ *
674
+ * One can use this event to perform custom validation and, via the feedback mechanism, prevent the loan from being saved.
441
675
  *
442
676
  * Use {@link LoanPreCommitListener} handles this event
677
+ * @example
678
+ * with v2 SSF
679
+ * ```ts
680
+ * guest.subscribe({
681
+ * eventId: 'loan.precommit',
682
+ * callback: ({ eventParams }) => {
683
+ * console.log('Loan precommit', eventParams);
684
+ * return true;
685
+ * });
686
+ * });
687
+ * ```
688
+ * @example
689
+ * with v1 SSF
690
+ * ```ts
691
+ * elli.script.subscribe('loan', 'precommit', ({ eventParams }) => {
692
+ * console.log('Loan precommit', eventParams);
693
+ * return true;
694
+ * });
443
695
  */
444
696
  readonly PreCommit: IEvent;
445
697
  /**
446
- * event fired when the loan is ready to complete milestone
698
+ * event is fired when the user attempts to complete a milestone and allows for custom validation, and cancellation, of the process.
447
699
  *
448
700
  * Use {@link LoanPreMilestoneCompleteListener} to handle this event
701
+ * @example
702
+ * with v2 SSF
703
+ * ```ts
704
+ * guest.subscribe({
705
+ * eventId: 'loan.premilestoneComplete',
706
+ * callback: ({ eventParams }) => {
707
+ * console.log('Loan pre-milestone complete', eventParams);
708
+ * return true;
709
+ * });
710
+ * });
711
+ * ```
712
+ * @example
713
+ * with v1 SSF
714
+ * ```ts
715
+ * elli.script.subscribe('loan', 'premilestoneComplete', ({ eventParams }) => {
716
+ * console.log('Loan pre-milestone complete', eventParams);
717
+ * return true;
718
+ * });
449
719
  */
450
720
  readonly PreMilestoneComplete: IEvent;
451
721
  /**
452
- * event fired when the loan is synced
722
+ * event fired when the loan is synced with any changes made by other users or external systems
453
723
  *
454
724
  * Use {@link LoanSyncListener} to handle this event
725
+ * @example
726
+ * with v2 SSF
727
+ * ```ts
728
+ * guest.subscribe({
729
+ * eventId: 'loan.sync',
730
+ * callback: ({ eventParams }) => {
731
+ * console.log('Loan synced', eventParams);
732
+ * });
733
+ * });
734
+ * ```
735
+ * @example
736
+ * with v1 SSF
737
+ * ```ts
738
+ * elli.script.subscribe('loan', 'sync', ({ eventParams }) => {
739
+ * console.log('Loan synced', eventParams);
740
+ * });
455
741
  */
456
742
  readonly Sync: IEvent;
457
743
  /**
458
744
  * Get complete Loan object
459
745
  * @returns v3 Loan Object
746
+ * @example
747
+ * ```ts
748
+ * const loanData = await loan.all();
749
+ * ```
460
750
  */
461
751
  all(): Promise<LoanObject>;
462
- /**
463
- * Applies a partial loan object to the current loan,
464
- */
465
- apply(loan: LoanObject): Promise<void>;
466
752
  /**
467
753
  * Applies or removes the calculation lock on a loan field.
468
754
  *
@@ -470,107 +756,125 @@ export interface ILoan extends IScriptingObject {
470
756
  *
471
757
  * 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
472
758
  * @param fieldId ID of the field you want to apply or remove the calculation lock
473
- * @param lock
759
+ * @param lock status you want to set the lock to
760
+ * @example
761
+ * ```ts
762
+ * await loan.applyLock('4001', true);
763
+ * ```
474
764
  */
475
765
  applyLock(fieldId: string, lock: boolean): Promise<void>;
476
766
  /**
477
767
  * Executes calculations and business rules
768
+ * @returns updated loan object
769
+ * @example
770
+ * ```ts
771
+ * await loan.calculate();
772
+ * ```
478
773
  */
479
- calculate(): Promise<void>;
774
+ calculate(): Promise<LoanObject>;
480
775
  /**
481
776
  * Commit all pending changes on the current loan
482
777
  *
778
+ * Fires the loan.precommit event before committing the changes
779
+ *
780
+ * Fires the loan.committed event after committing the changes
781
+ *
782
+ * Business rule violations will prevent the loan from being committed
783
+ * @returns loan id
784
+ * @example
785
+ * ```ts
786
+ * await loan.commit();
787
+ * ```
483
788
  */
484
- commit(): Promise<void>;
789
+ commit(): Promise<string>;
485
790
  /**
486
791
  * Execute loan level action, this is specific to v3 stateful implementation
487
- * @param type type of action to be executed
792
+ *
793
+ * Invokes state API with all pending changes in current change-set along with requested loan action
794
+ *
795
+ * Fires the loan.sync event after the action is executed
796
+ * @param type type of action to be executed. e.g. updateCorrespondentBalance
488
797
  * @param params additional parameters for the action
798
+ * @returns updated loan object
799
+ * @example
800
+ * ```ts
801
+ * await loan.execAction('calculateEEMMortgage');
802
+ * ```
489
803
  */
490
- execAction(type: LoanLevelActions, params?: Record<string, unknown>): Promise<LoanObject>;
491
- /**
492
- * Returns an object with current application selected
493
- */
494
- getCurrentApplication(): Promise<Record<string, string>>;
804
+ execAction(type: LoanLevelActions, params?: Record<string, unknown>): Promise<ActionResponse>;
495
805
  /**
496
806
  * Returns an object reference of type LoanCollection.
497
807
  *
498
808
  * Argument "name" is required & used to get specific collection like BorrowerEmployer, Escrow etc.
499
809
  * @param name collection template name
810
+ * @returns collection object
811
+ * @throws error if collection name is invalid
812
+ * @example
813
+ * ```ts
814
+ * const borrowerEmployer = await loan.getCollection('BorrowerEmployer');
815
+ * ```
500
816
  */
501
- getCollection(name: string): Promise<Record<string, string>>;
817
+ getCollection(name: LoanCollection): Promise<LoanCollectionObject>;
502
818
  /**
503
- * get value of the given field id
504
- * @param id field id
505
- * @returns field value
819
+ * Get the current borrower pair information
820
+ * @returns borrower pair information
821
+ * @example
822
+ * ```ts
823
+ * const currentApplication = await loan.getCurrentApplication();
824
+ * ```
506
825
  */
507
- getField(id: string): Promise<string>;
826
+ getCurrentApplication(): Promise<ApplicationInfo>;
508
827
  /**
509
- * get options for loan fields / custom form controls
510
- *
511
- * supports both standard & custom loan fields.
512
- *
513
- * control Ids takes precedence over field Ids.
514
- * @param {FieldOptionsParam} param parameter for getting field options
515
- * @returns array of field options for each field / control id
516
- *
517
- * #### Example
518
- *
519
- * ```ts
520
- * const fieldOptions = await loan.getFieldOptions({ fieldIds: ['1543', '1544'] });
521
- * ```
522
- *
523
- * ```ts
524
- * const fieldOptions = await loan.getFieldOptions({ controlIds: ['111', '112'] });
525
- * ```
526
- *
527
- * Following is a sample field options for field Id 1543:
828
+ * get value of the standard or custom field
829
+ * @param id field id
830
+ * @returns field value. Default or blank value is returned if the field is not set
831
+ * @throws error if field id is empty, null or undefined
832
+ * @example
833
+ * ```ts
834
+ * const fieldValue = await loan.getField('4001');
528
835
  * ```
529
- * 1543: [
530
- * {
531
- * value: 'Manual Underwriting',
532
- * name: 'Manual Underwriting'
533
- * },
534
- * {
535
- * value: 'DU',
536
- * name: 'DU'
537
- * },
538
- * {
539
- * value: 'LP',
540
- * name: 'LP'
541
- * },
542
- * {
543
- * value: 'LQA',
544
- * name: 'LQA'
545
- * },
546
- * {
547
- * value: 'Other',
548
- * name: 'Other'
549
- * }
550
- * ]
836
+ * @example
837
+ * ```ts
838
+ * const fieldValue = await loan.getField('URLA.X1');
551
839
  * ```
552
840
  */
553
- getFieldOptions(param: FieldOptionsParam): Promise<Record<string, FieldOptions[]>>;
841
+ getField(id: string): Promise<string>;
554
842
  /**
555
- * Returns the value of a single field using its field ID.
556
- * @param ids The field ID of the fields to retrieve.
843
+ * Returns the value of a standard or custom fields
844
+ *
845
+ * Default or blank value is returned if the field is not set
846
+ * @param ids The field Ids to get the value of
847
+ * @returns The field values
848
+ * @example
849
+ * ```ts
850
+ * const fieldValues = await loan.getFields(['4001', '4002']);
851
+ * ```
557
852
  */
558
853
  getFields(ids: string[]): Promise<Record<string, string>>;
559
- /**
560
- * get snapshot of loan object
561
- */
562
- getLockSnapshot(): Promise<Record<string, string>>;
563
854
  /**
564
855
  * Indicates if the loan is editable or in a read-only state.
565
856
  */
566
857
  isReadOnly(): Promise<boolean>;
567
858
  /**
568
859
  * Syncs the loan workspace with any changes made by other users.
860
+ * @example
861
+ * ```ts
862
+ * await loan.merge();
863
+ * ```
569
864
  */
570
865
  merge(): Promise<void>;
571
866
  /**
572
- * Update data for current application
573
- * @param options options for setting current application
867
+ * Switch borrower pair
868
+ *
869
+ * Fires the loan.applicationselected event after the borrower pair is switched
870
+ * @param options borrower pair information
871
+ * @throws error if borrower pair infromation is invalid
872
+ * @example
873
+ * ```ts
874
+ * await loan.setCurrentApplication({
875
+ * id: '5D3B4A1B-3D3B-4A1B-5D3B-4A1B3D3B4A1B'
876
+ * });
877
+ * ```
574
878
  */
575
879
  setCurrentApplication(options: CurrentApplicationOptions): Promise<void>;
576
880
  /**
@@ -580,19 +884,23 @@ export interface ILoan extends IScriptingObject {
580
884
  *
581
885
  * Use this api to prevent current user from making edits to the loan file, while a compliance based workflow is in progress
582
886
  * @param options options for setting edit mode
887
+ * @example
888
+ * ```ts
889
+ * await loan.setEditMode({mode: 'READONLY', moduleId: 'urn:encompass:efolder'});
890
+ * ```
583
891
  */
584
892
  setEditMode(options: EditModeOptions): Promise<void>;
585
893
  /**
586
- * Set the values of one or more fields on the Loan.
894
+ * Set the values of one or more standard or custom fields
895
+ *
896
+ * Throws an error if non-existing field id is passed. Fields following the non-existing field will not be set.
897
+ *
898
+ * Fires the loan.change event for each field that is changed and loan.sync event after all fields are set
587
899
  * @param fields list of field ids and their values
900
+ * @example
901
+ * ```ts
902
+ * await loan.setField({'4000': 'John', '4002': 'David'});
903
+ * ```
588
904
  */
589
905
  setFields(fields: Record<string, string>): Promise<void>;
590
- /**
591
- * insert, delete, update, replace different loand record types.
592
- *
593
- * scope includes log and non-log record types
594
- * @param options options for updating records
595
- * @returns array of record ids or loan view entity
596
- */
597
- updateRecords(options: RecordOptions): Promise<Array<string> | Array<unknown>>;
598
906
  }