@elliemae/pui-scripting-object 1.32.2 → 1.33.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.
|
@@ -17,7 +17,13 @@ export declare enum LogLevel {
|
|
|
17
17
|
* metadata about the application
|
|
18
18
|
*/
|
|
19
19
|
export type AppInfo = {
|
|
20
|
+
/**
|
|
21
|
+
* unique id of the application
|
|
22
|
+
*/
|
|
20
23
|
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* name of the application
|
|
26
|
+
*/
|
|
21
27
|
name: string;
|
|
22
28
|
};
|
|
23
29
|
/**
|
|
@@ -48,6 +54,19 @@ export type ApplicationExtension = {
|
|
|
48
54
|
*/
|
|
49
55
|
options?: Record<string, string>;
|
|
50
56
|
};
|
|
57
|
+
/**
|
|
58
|
+
* set of query options to get company settings
|
|
59
|
+
*/
|
|
60
|
+
export type CompanySettingsQueryOptions = {
|
|
61
|
+
/**
|
|
62
|
+
* category name
|
|
63
|
+
*/
|
|
64
|
+
category: string;
|
|
65
|
+
/**
|
|
66
|
+
* attribute name
|
|
67
|
+
*/
|
|
68
|
+
attribute?: string;
|
|
69
|
+
};
|
|
51
70
|
/**
|
|
52
71
|
* Types of navigations
|
|
53
72
|
*/
|
|
@@ -63,12 +82,27 @@ export declare enum NavigationType {
|
|
|
63
82
|
* navigation options
|
|
64
83
|
*/
|
|
65
84
|
export type NavigationOptions = {
|
|
85
|
+
/**
|
|
86
|
+
* target url
|
|
87
|
+
*/
|
|
66
88
|
target: string;
|
|
89
|
+
/**
|
|
90
|
+
* type of the navigation
|
|
91
|
+
*/
|
|
67
92
|
type: NavigationType;
|
|
93
|
+
/**
|
|
94
|
+
* context for the navigation
|
|
95
|
+
*/
|
|
68
96
|
context?: Record<string, string>;
|
|
69
97
|
};
|
|
70
98
|
export type OpenOptions = {
|
|
99
|
+
/**
|
|
100
|
+
* target item
|
|
101
|
+
*/
|
|
71
102
|
target: string;
|
|
103
|
+
/**
|
|
104
|
+
* type of the item
|
|
105
|
+
*/
|
|
72
106
|
type?: string;
|
|
73
107
|
};
|
|
74
108
|
/**
|
|
@@ -140,11 +174,26 @@ export type Route = {
|
|
|
140
174
|
*/
|
|
141
175
|
id: string;
|
|
142
176
|
};
|
|
177
|
+
/**
|
|
178
|
+
* environment details
|
|
179
|
+
*/
|
|
143
180
|
export type Environment = {
|
|
181
|
+
/**
|
|
182
|
+
* api domain
|
|
183
|
+
*/
|
|
144
184
|
apiHost: string;
|
|
145
185
|
};
|
|
186
|
+
/**
|
|
187
|
+
* application context
|
|
188
|
+
*/
|
|
146
189
|
export type ApplicationContext = {
|
|
190
|
+
/**
|
|
191
|
+
* environment details
|
|
192
|
+
*/
|
|
147
193
|
env: Environment;
|
|
194
|
+
/**
|
|
195
|
+
* current route
|
|
196
|
+
*/
|
|
148
197
|
route: Route;
|
|
149
198
|
};
|
|
150
199
|
/**
|
|
@@ -297,9 +346,9 @@ export interface IApplication extends IScriptingObject {
|
|
|
297
346
|
log(message: string, logLevel: LogLevel): Promise<void>;
|
|
298
347
|
/**
|
|
299
348
|
* get company settings for a particular category
|
|
300
|
-
* @param
|
|
349
|
+
* @param options {CompanySettingsQueryOptions} options to query company settings
|
|
301
350
|
* @returns company settings as key value pairs. Null if category is not found
|
|
302
351
|
*/
|
|
303
|
-
getCompanySettings(
|
|
352
|
+
getCompanySettings(options: CompanySettingsQueryOptions): Promise<Record<string, any> | null>;
|
|
304
353
|
}
|
|
305
354
|
export {};
|
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
import { IEvent, Listener } from '../event.js';
|
|
2
2
|
import { IScriptingObject } from '../scriptingObject.js';
|
|
3
|
+
/**
|
|
4
|
+
* error data to be displayed in the error dialog
|
|
5
|
+
*/
|
|
6
|
+
export interface ErrorData {
|
|
7
|
+
/**
|
|
8
|
+
* short description of the error
|
|
9
|
+
*/
|
|
10
|
+
message: string;
|
|
11
|
+
/**
|
|
12
|
+
* error code, if any
|
|
13
|
+
*/
|
|
14
|
+
code?: string;
|
|
15
|
+
/**
|
|
16
|
+
* detailed description of the error
|
|
17
|
+
*/
|
|
18
|
+
details: string;
|
|
19
|
+
/**
|
|
20
|
+
* link to the help documentation
|
|
21
|
+
*/
|
|
22
|
+
helpLink?: string;
|
|
23
|
+
/**
|
|
24
|
+
* unique id to identify the session / transaction, if any
|
|
25
|
+
*/
|
|
26
|
+
correlationId?: string;
|
|
27
|
+
}
|
|
3
28
|
/**
|
|
4
29
|
* event handler that handles module unload event
|
|
5
30
|
* @param id unique id of the app that is being unloaded
|
|
@@ -42,4 +67,12 @@ export interface IModule extends IScriptingObject {
|
|
|
42
67
|
* unload the microapp module from the host application
|
|
43
68
|
*/
|
|
44
69
|
unload(): Promise<void>;
|
|
70
|
+
/**
|
|
71
|
+
* open a dialog in hosting application to display an error message and related help link
|
|
72
|
+
*
|
|
73
|
+
* 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 error {ErrorData} error message to be displayed
|
|
75
|
+
* @returns {Promise<void>} a promise that resolves when the dialog is closed
|
|
76
|
+
*/
|
|
77
|
+
showError(data: ErrorData): Promise<void>;
|
|
45
78
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-scripting-object",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.33.0",
|
|
4
4
|
"description": "Typescript defintions for Scripting Objects",
|
|
5
5
|
"sideEffects": false,
|
|
6
|
-
"type": "module",
|
|
7
6
|
"main": "./dist/cjs/index.js",
|
|
8
7
|
"module": "./dist/es/index.js",
|
|
9
8
|
"unpkg": "./dist/umd/index.js",
|
|
@@ -68,7 +67,7 @@
|
|
|
68
67
|
},
|
|
69
68
|
"devDependencies": {
|
|
70
69
|
"@elliemae/browserslist-config-elliemae-latest-browsers": "~1.8.0",
|
|
71
|
-
"@elliemae/pui-cli": "~8.
|
|
70
|
+
"@elliemae/pui-cli": "~8.30.0",
|
|
72
71
|
"@elliemae/pui-doc-gen": "~2.0.1",
|
|
73
72
|
"@elliemae/pui-theme": "~2.7.0",
|
|
74
73
|
"@types/styled-components": "~5.1.34",
|
|
@@ -77,5 +76,6 @@
|
|
|
77
76
|
"redux-saga": "~1.3.0",
|
|
78
77
|
"styled-components": "~5.3.11"
|
|
79
78
|
},
|
|
80
|
-
"peerDependencies": {}
|
|
79
|
+
"peerDependencies": {},
|
|
80
|
+
"type": "module"
|
|
81
81
|
}
|