@elliemae/pui-scripting-object 1.19.1 → 1.20.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/types/objects/auth.d.ts +6 -8
- package/dist/types/objects/loan.d.ts +28 -6
- package/package.json +13 -13
|
@@ -77,15 +77,17 @@ export type TokenInfo = {
|
|
|
77
77
|
/**
|
|
78
78
|
* child access token
|
|
79
79
|
*/
|
|
80
|
-
|
|
80
|
+
access_token: string;
|
|
81
81
|
/**
|
|
82
82
|
* type of token
|
|
83
|
+
* @example Bearer
|
|
83
84
|
*/
|
|
84
|
-
|
|
85
|
+
token_type: TokenType;
|
|
85
86
|
/**
|
|
86
|
-
*
|
|
87
|
+
* API gateway host name
|
|
88
|
+
* @example https://int.api.ellielabs.com
|
|
87
89
|
*/
|
|
88
|
-
|
|
90
|
+
host_name: string;
|
|
89
91
|
};
|
|
90
92
|
/**
|
|
91
93
|
* Methods to get information about the user and access token
|
|
@@ -97,7 +99,6 @@ export interface IAuth extends IScriptingObject {
|
|
|
97
99
|
* Generates a new Auth Code for the caller which can be exchanged for
|
|
98
100
|
* an Access Token using the Client Secret associated with the given OAuth Client ID.
|
|
99
101
|
* In certain contexts, the Auth token is tied to the currently logged in user's identity
|
|
100
|
-
*
|
|
101
102
|
* @param clientId unique identifier of the plugin
|
|
102
103
|
* @returns auth code
|
|
103
104
|
*/
|
|
@@ -106,19 +107,16 @@ export interface IAuth extends IScriptingObject {
|
|
|
106
107
|
* Get child access token for the given plugin
|
|
107
108
|
* Host implementing this scripting object method,
|
|
108
109
|
* should able to find out the caller of this api and request necessary child token
|
|
109
|
-
*
|
|
110
110
|
* @returns access token with the api base url
|
|
111
111
|
*/
|
|
112
112
|
getAccessToken(): Promise<TokenInfo>;
|
|
113
113
|
/**
|
|
114
114
|
* Get current logged in user information
|
|
115
|
-
*
|
|
116
115
|
* @returns user information
|
|
117
116
|
*/
|
|
118
117
|
getUser(): Promise<User>;
|
|
119
118
|
/**
|
|
120
119
|
* Get access rights for the current user
|
|
121
|
-
*
|
|
122
120
|
* @returns user access rights
|
|
123
121
|
* @throws {Error} if operation fails
|
|
124
122
|
*/
|
|
@@ -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
|
|
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
|
|
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(
|
|
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,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-scripting-object",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.20.1",
|
|
4
4
|
"description": "Typescript defintions for Scripting Objects",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/cjs/index.js",
|
|
8
8
|
"module": "./dist/es/index.js",
|
|
9
9
|
"unpkg": "./dist/umd/index.js",
|
|
10
|
-
"jsdelivr": "./dist/
|
|
10
|
+
"jsdelivr": "./dist/umd/index.js",
|
|
11
11
|
"types": "./dist/types/index.d.ts",
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
@@ -28,18 +28,18 @@
|
|
|
28
28
|
"url": "https://git.elliemae.io/platform-ui/pui-scripting-object.git"
|
|
29
29
|
},
|
|
30
30
|
"engines": {
|
|
31
|
-
"pnpm": ">=
|
|
32
|
-
"node": ">=
|
|
31
|
+
"pnpm": ">=8",
|
|
32
|
+
"node": ">=18"
|
|
33
33
|
},
|
|
34
34
|
"author": "ICE",
|
|
35
35
|
"license": "MIT",
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "pui-cli pack -p -t node",
|
|
38
38
|
"build:dev": "pui-cli pack -t node",
|
|
39
|
-
"docs:start": "
|
|
40
|
-
"docs:build": "
|
|
41
|
-
"docs:version": "
|
|
42
|
-
"docs: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",
|
|
43
43
|
"gendoc": "pui-cli gendoc",
|
|
44
44
|
"lint": "pui-cli lint",
|
|
45
45
|
"lint:fix": "pui-cli lint --fix",
|
|
@@ -67,15 +67,15 @@
|
|
|
67
67
|
"sonar56x": true
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@elliemae/browserslist-config-elliemae-latest-browsers": "~1.
|
|
71
|
-
"@elliemae/pui-cli": "~8.
|
|
70
|
+
"@elliemae/browserslist-config-elliemae-latest-browsers": "~1.7.0",
|
|
71
|
+
"@elliemae/pui-cli": "~8.9.0",
|
|
72
72
|
"@elliemae/pui-doc-gen": "~1.6.4",
|
|
73
|
-
"@elliemae/pui-theme": "~2.
|
|
73
|
+
"@elliemae/pui-theme": "~2.7.0",
|
|
74
74
|
"@types/styled-components": "~5.1.26",
|
|
75
75
|
"history": "~5.3.0",
|
|
76
76
|
"redux": "~4.2.1",
|
|
77
|
-
"redux-saga": "~1.2.
|
|
78
|
-
"styled-components": "~5.3.
|
|
77
|
+
"redux-saga": "~1.2.3",
|
|
78
|
+
"styled-components": "~5.3.10"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {}
|
|
81
81
|
}
|