@elliemae/pui-scripting-object 1.19.0 → 1.20.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.
@@ -104,11 +104,12 @@ export interface IAuth extends IScriptingObject {
104
104
  createAuthCode(clientId: string): Promise<string>;
105
105
  /**
106
106
  * Get child access token for the given plugin
107
+ * Host implementing this scripting object method,
108
+ * should able to find out the caller of this api and request necessary child token
107
109
  *
108
- * @param appInfo metadata about the plugin requesting the access token
109
110
  * @returns access token with the api base url
110
111
  */
111
- getAccessToken(appInfo: PluginInfo): Promise<TokenInfo>;
112
+ getAccessToken(): Promise<TokenInfo>;
112
113
  /**
113
114
  * Get current logged in user information
114
115
  *
@@ -1,5 +1,22 @@
1
1
  import { IEvent, Listener } from '../event.js';
2
2
  import { IScriptingObject } from '../scriptingObject.js';
3
+ /**
4
+ * Parameters for getting field options
5
+ */
6
+ export type FieldOptionsParam = {
7
+ /**
8
+ * list of field Ids
9
+ *
10
+ * @example ['1001', '1002']
11
+ */
12
+ fieldIds?: string[];
13
+ /**
14
+ * list of control Ids
15
+ *
16
+ * @example ['1001', '1002']
17
+ */
18
+ controlIds?: string[];
19
+ };
3
20
  /**
4
21
  * option name and its value
5
22
  */
@@ -203,16 +220,21 @@ export interface ILoan extends IScriptingObject {
203
220
  */
204
221
  getField(id: string): Promise<string>;
205
222
  /**
206
- * get options for list of fields
223
+ * get options for loan fields / custom form controls
224
+ * supports both standard & custom loan fields.
225
+ * control Ids takes precedence over field Ids.
207
226
  *
208
- * @param fieldIds array of field ids to get field options
209
- * @returns array of field options for each field id
227
+ * @param {FieldOptionsParam} param parameter for getting field options
228
+ * @returns array of field options for each field / control id
210
229
  *
211
230
  * #### Example
212
231
  *
213
- * Get Field options for set of field Ids
214
232
  * ```ts
215
- * const fieldOptions = await loan.getFieldOptions(['1543', '1544']);
233
+ * const fieldOptions = await loan.getFieldOptions({ fieldIds: ['1543', '1544'] });
234
+ * ```
235
+ *
236
+ * ```ts
237
+ * const fieldOptions = await loan.getFieldOptions({ controlIds: ['111', '112'] });
216
238
  * ```
217
239
  *
218
240
  * Following is a sample field options for field Id 1543:
@@ -241,7 +263,7 @@ export interface ILoan extends IScriptingObject {
241
263
  * ]
242
264
  * ```
243
265
  */
244
- getFieldOptions(fieldIds: string[]): Promise<Record<string, FieldOptions[]>>;
266
+ getFieldOptions(param: FieldOptionsParam): Promise<Record<string, FieldOptions[]>>;
245
267
  /**
246
268
  * Returns the value of a single field using its field ID.
247
269
  *
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@elliemae/pui-scripting-object",
3
- "version": "1.19.0",
3
+ "version": "1.20.0",
4
4
  "description": "Typescript defintions for Scripting Objects",
5
5
  "sideEffects": false,
6
+ "type": "module",
6
7
  "main": "./dist/cjs/index.js",
7
8
  "module": "./dist/es/index.js",
8
9
  "unpkg": "./dist/umd/index.js",
@@ -35,10 +36,10 @@
35
36
  "scripts": {
36
37
  "build": "pui-cli pack -p -t node",
37
38
  "build:dev": "pui-cli pack -t node",
38
- "docs:start": "docusaurus start",
39
- "docs:build": "docusaurus build --out-dir build/docs",
40
- "docs:version": "docusaurus docs:version",
41
- "docs:serve": "docusaurus serve",
39
+ "docs:start": "pui-doc-gen start",
40
+ "docs:build": "pui-doc-gen build",
41
+ "docs:version": "pui-doc-gen version",
42
+ "docs:serve": "pui-doc-gen serve",
42
43
  "gendoc": "pui-cli gendoc",
43
44
  "lint": "pui-cli lint",
44
45
  "lint:fix": "pui-cli lint --fix",
@@ -66,15 +67,15 @@
66
67
  "sonar56x": true
67
68
  },
68
69
  "devDependencies": {
69
- "@elliemae/browserslist-config-elliemae-latest-browsers": "~1.6.0",
70
- "@elliemae/pui-cli": "~7.26.3",
71
- "@elliemae/pui-doc-gen": "~1.4.1",
72
- "@elliemae/pui-theme": "~2.6.0",
70
+ "@elliemae/browserslist-config-elliemae-latest-browsers": "~1.7.0",
71
+ "@elliemae/pui-cli": "~8.5.2",
72
+ "@elliemae/pui-doc-gen": "~1.6.4",
73
+ "@elliemae/pui-theme": "~2.7.0",
73
74
  "@types/styled-components": "~5.1.26",
74
75
  "history": "~5.3.0",
75
76
  "redux": "~4.2.1",
76
- "redux-saga": "~1.2.2",
77
- "styled-components": "~5.3.6"
77
+ "redux-saga": "~1.2.3",
78
+ "styled-components": "~5.3.9"
78
79
  },
79
80
  "peerDependencies": {}
80
81
  }