@elliemae/pui-scripting-object 1.48.5 → 1.49.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.
@@ -19,22 +19,12 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
19
19
  var application_exports = {};
20
20
  __export(application_exports, {
21
21
  FormType: () => FormType,
22
- LogLevels: () => LogLevels,
23
22
  ModalSize: () => ModalSize,
24
23
  ModalType: () => ModalType,
25
24
  OpenMode: () => OpenMode,
26
25
  OpenType: () => OpenType
27
26
  });
28
27
  module.exports = __toCommonJS(application_exports);
29
- var LogLevels = /* @__PURE__ */ ((LogLevels2) => {
30
- LogLevels2[LogLevels2["DEBUG"] = 10] = "DEBUG";
31
- LogLevels2[LogLevels2["INFO"] = 20] = "INFO";
32
- LogLevels2[LogLevels2["AUDIT"] = 30] = "AUDIT";
33
- LogLevels2[LogLevels2["WARN"] = 40] = "WARN";
34
- LogLevels2[LogLevels2["ERROR"] = 50] = "ERROR";
35
- LogLevels2[LogLevels2["FATAL"] = 60] = "FATAL";
36
- return LogLevels2;
37
- })(LogLevels || {});
38
28
  var OpenType = /* @__PURE__ */ ((OpenType2) => {
39
29
  OpenType2["MODULE"] = "MODULE";
40
30
  return OpenType2;
@@ -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,16 @@ 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
+ LogLevels: () => LogLevels
22
+ });
16
23
  module.exports = __toCommonJS(module_exports);
24
+ var LogLevels = /* @__PURE__ */ ((LogLevels2) => {
25
+ LogLevels2[LogLevels2["DEBUG"] = 10] = "DEBUG";
26
+ LogLevels2[LogLevels2["INFO"] = 20] = "INFO";
27
+ LogLevels2[LogLevels2["AUDIT"] = 30] = "AUDIT";
28
+ LogLevels2[LogLevels2["WARN"] = 40] = "WARN";
29
+ LogLevels2[LogLevels2["ERROR"] = 50] = "ERROR";
30
+ LogLevels2[LogLevels2["FATAL"] = 60] = "FATAL";
31
+ return LogLevels2;
32
+ })(LogLevels || {});
@@ -1,12 +1,3 @@
1
- var LogLevels = /* @__PURE__ */ ((LogLevels2) => {
2
- LogLevels2[LogLevels2["DEBUG"] = 10] = "DEBUG";
3
- LogLevels2[LogLevels2["INFO"] = 20] = "INFO";
4
- LogLevels2[LogLevels2["AUDIT"] = 30] = "AUDIT";
5
- LogLevels2[LogLevels2["WARN"] = 40] = "WARN";
6
- LogLevels2[LogLevels2["ERROR"] = 50] = "ERROR";
7
- LogLevels2[LogLevels2["FATAL"] = 60] = "FATAL";
8
- return LogLevels2;
9
- })(LogLevels || {});
10
1
  var OpenType = /* @__PURE__ */ ((OpenType2) => {
11
2
  OpenType2["MODULE"] = "MODULE";
12
3
  return OpenType2;
@@ -41,7 +32,6 @@ var ModalType = /* @__PURE__ */ ((ModalType2) => {
41
32
  })(ModalType || {});
42
33
  export {
43
34
  FormType,
44
- LogLevels,
45
35
  ModalSize,
46
36
  ModalType,
47
37
  OpenMode,
@@ -0,0 +1,12 @@
1
+ var LogLevels = /* @__PURE__ */ ((LogLevels2) => {
2
+ LogLevels2[LogLevels2["DEBUG"] = 10] = "DEBUG";
3
+ LogLevels2[LogLevels2["INFO"] = 20] = "INFO";
4
+ LogLevels2[LogLevels2["AUDIT"] = 30] = "AUDIT";
5
+ LogLevels2[LogLevels2["WARN"] = 40] = "WARN";
6
+ LogLevels2[LogLevels2["ERROR"] = 50] = "ERROR";
7
+ LogLevels2[LogLevels2["FATAL"] = 60] = "FATAL";
8
+ return LogLevels2;
9
+ })(LogLevels || {});
10
+ export {
11
+ LogLevels
12
+ };
@@ -2,52 +2,6 @@ import { IEvent } from '../event.js';
2
2
  import { IScriptingObject } from '../scriptingObject.js';
3
3
  import { UserAccessRights } from './userAccessRights.js';
4
4
  import { NavigationType } from './shared.js';
5
- /**
6
- * Log levels
7
- */
8
- export declare enum LogLevels {
9
- /**
10
- * debug log level
11
- */
12
- DEBUG = 10,
13
- /**
14
- * info log level
15
- */
16
- INFO = 20,
17
- /**
18
- * audit log level
19
- */
20
- AUDIT = 30,
21
- /**
22
- * warning log level
23
- */
24
- WARN = 40,
25
- /**
26
- * error log level
27
- */
28
- ERROR = 50,
29
- /**
30
- * fatal log level
31
- */
32
- FATAL = 60
33
- }
34
- /**
35
- * log message
36
- */
37
- export type LogMessage = {
38
- /**
39
- * application name
40
- */
41
- appName: string;
42
- /**
43
- * message string
44
- */
45
- message: string;
46
- /**
47
- * error object if any
48
- */
49
- exception?: Error;
50
- } & Record<string, unknown>;
51
5
  /**
52
6
  * metadata about the application descriptor
53
7
  */
@@ -532,12 +486,6 @@ export interface IApplication extends IScriptingObject {
532
486
  * renew the user session
533
487
  */
534
488
  keepSessionAlive(): Promise<void>;
535
- /**
536
- * log a message to host application's logs
537
- * @param message log message
538
- * @param logLevel log level
539
- */
540
- log(message: LogMessage | string, logLevel: keyof typeof LogLevels): Promise<void>;
541
489
  /**
542
490
  * navigate to a location in the application
543
491
  * @param options navigation options
@@ -853,6 +853,52 @@ export interface ILoan extends IScriptingObject {
853
853
  * ```
854
854
  */
855
855
  getField(id: string): Promise<string>;
856
+ /**
857
+ * get options for loan fields / custom form controls
858
+ *
859
+ * supports both standard & custom loan fields.
860
+ *
861
+ * control Ids takes precedence over field Ids.
862
+ * @param {FieldOptionsParam} param parameter for getting field options
863
+ * @returns array of field options for each field / control id
864
+ *
865
+ * #### Example
866
+ *
867
+ * ```ts
868
+ * const fieldOptions = await loan.getFieldOptions({ fieldIds: ['1543', '1544'] });
869
+ * ```
870
+ *
871
+ * ```ts
872
+ * const fieldOptions = await loan.getFieldOptions({ controlIds: ['111', '112'] });
873
+ * ```
874
+ *
875
+ * Following is a sample field options for field Id 1543:
876
+ * ```
877
+ * 1543: [
878
+ * {
879
+ * value: 'Manual Underwriting',
880
+ * name: 'Manual Underwriting'
881
+ * },
882
+ * {
883
+ * value: 'DU',
884
+ * name: 'DU'
885
+ * },
886
+ * {
887
+ * value: 'LP',
888
+ * name: 'LP'
889
+ * },
890
+ * {
891
+ * value: 'LQA',
892
+ * name: 'LQA'
893
+ * },
894
+ * {
895
+ * value: 'Other',
896
+ * name: 'Other'
897
+ * }
898
+ * ]
899
+ * ```
900
+ */
901
+ getFieldOptions(param: FieldOptionsParam): Promise<Record<string, FieldOptions[]>>;
856
902
  /**
857
903
  * Returns the value of a standard or custom fields
858
904
  *
@@ -1,5 +1,51 @@
1
1
  import { IEvent } from '../event.js';
2
2
  import { IScriptingObject } from '../scriptingObject.js';
3
+ /**
4
+ * Log levels
5
+ */
6
+ export declare enum LogLevels {
7
+ /**
8
+ * debug log level
9
+ */
10
+ DEBUG = 10,
11
+ /**
12
+ * info log level
13
+ */
14
+ INFO = 20,
15
+ /**
16
+ * audit log level
17
+ */
18
+ AUDIT = 30,
19
+ /**
20
+ * warning log level
21
+ */
22
+ WARN = 40,
23
+ /**
24
+ * error log level
25
+ */
26
+ ERROR = 50,
27
+ /**
28
+ * fatal log level
29
+ */
30
+ FATAL = 60
31
+ }
32
+ /**
33
+ * log message
34
+ */
35
+ export type LogMessage = {
36
+ /**
37
+ * application name
38
+ */
39
+ appName: string;
40
+ /**
41
+ * message string
42
+ */
43
+ message: string;
44
+ /**
45
+ * error object if any
46
+ */
47
+ exception?: Error;
48
+ } & Record<string, unknown>;
3
49
  /**
4
50
  * MicroApp module specific parameters
5
51
  */
@@ -114,6 +160,12 @@ export interface IModule extends IScriptingObject {
114
160
  * @returns parameters as key-value pairs
115
161
  */
116
162
  getParameters(): Promise<ModuleParameters>;
163
+ /**
164
+ * log a message to host application's logs
165
+ * @param message log message
166
+ * @param logLevel log level
167
+ */
168
+ log(message: LogMessage | string, logLevel: keyof typeof LogLevels): Promise<void>;
117
169
  /**
118
170
  * unload the microapp module from the host application
119
171
  */