@elliemae/pui-scripting-object 1.32.3 → 1.34.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.
|
@@ -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
|
}
|
|
@@ -104,6 +104,45 @@ export type LaunchServiceSetupOptions = {
|
|
|
104
104
|
*/
|
|
105
105
|
additionalData?: any;
|
|
106
106
|
};
|
|
107
|
+
/**
|
|
108
|
+
* options to launch service order integration by specific service provider
|
|
109
|
+
*/
|
|
110
|
+
export type LaunchProviderOptions = {
|
|
111
|
+
/**
|
|
112
|
+
* source application context that is launching the service order integration
|
|
113
|
+
* urn patterned string
|
|
114
|
+
* example: urn:elli:services:getpricing
|
|
115
|
+
*/
|
|
116
|
+
source: string;
|
|
117
|
+
/**
|
|
118
|
+
* url to redirect to after the service order integration flow is complete
|
|
119
|
+
*/
|
|
120
|
+
redirectUrl: string;
|
|
121
|
+
/**
|
|
122
|
+
* unique id of the partner
|
|
123
|
+
*/
|
|
124
|
+
partnerId: string;
|
|
125
|
+
/**
|
|
126
|
+
* name of the product
|
|
127
|
+
*/
|
|
128
|
+
productName: string;
|
|
129
|
+
/**
|
|
130
|
+
* unique id of the existing service order transaction
|
|
131
|
+
*/
|
|
132
|
+
transactionId?: string;
|
|
133
|
+
/**
|
|
134
|
+
* unique id of the existing service order
|
|
135
|
+
*/
|
|
136
|
+
serviceOrderId?: string;
|
|
137
|
+
/**
|
|
138
|
+
* settings to be passed to the service order integration
|
|
139
|
+
*/
|
|
140
|
+
settings?: any;
|
|
141
|
+
/**
|
|
142
|
+
* additional data needed for the service order integration
|
|
143
|
+
*/
|
|
144
|
+
additionalData?: any;
|
|
145
|
+
};
|
|
107
146
|
/**
|
|
108
147
|
* Scripting object to work with service orders, such as launching a service order integration etc.,
|
|
109
148
|
* Enables applications to place service orders, independent of SLP (Service Landing Page) application
|
|
@@ -159,4 +198,20 @@ export interface IService extends IScriptingObject {
|
|
|
159
198
|
* | all | ✖️ | ✖️ | ✖️ | ✖️ |
|
|
160
199
|
*/
|
|
161
200
|
launchByServiceSetup: (serviceSetupId: string, options: LaunchServiceSetupOptions) => Promise<void>;
|
|
201
|
+
/**
|
|
202
|
+
* launch a service intergration for a specific provider to place a new service order or view existing order
|
|
203
|
+
* This method will unload the current microapp and navigate to the service order integration
|
|
204
|
+
* after the integration flow is complete, user will be redirected back to the url provided in the options.
|
|
205
|
+
* redirect url will be appended with query parameters containing the service order transaction id and service order id incase of new order
|
|
206
|
+
* Supports EPC & EVP service order integrations
|
|
207
|
+
* @param providerId - unique id of the service provider
|
|
208
|
+
* @param {LaunchProviderOptions} options - options for launching the service order integration
|
|
209
|
+
* @returns None
|
|
210
|
+
*
|
|
211
|
+
* #### Product Compatibility:
|
|
212
|
+
* | | Encompass | Encompass Web | TPO | Consumer Connect |
|
|
213
|
+
* :-----:|:-----: |:-----: |:-----: |:-----: |
|
|
214
|
+
* | all | ✖️ | ✖️ | ✖️ | ✖️ |
|
|
215
|
+
*/
|
|
216
|
+
launchByProvider: (providerId: string, options: LaunchProviderOptions) => Promise<void>;
|
|
162
217
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-scripting-object",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.34.0",
|
|
4
4
|
"description": "Typescript defintions for Scripting Objects",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -67,10 +67,10 @@
|
|
|
67
67
|
"sonar56x": true
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@elliemae/browserslist-config-elliemae-latest-browsers": "~1.
|
|
70
|
+
"@elliemae/browserslist-config-elliemae-latest-browsers": "~1.9.0",
|
|
71
71
|
"@elliemae/pui-cli": "~8.30.0",
|
|
72
72
|
"@elliemae/pui-doc-gen": "~2.0.1",
|
|
73
|
-
"@elliemae/pui-theme": "~2.
|
|
73
|
+
"@elliemae/pui-theme": "~2.9.3",
|
|
74
74
|
"@types/styled-components": "~5.1.34",
|
|
75
75
|
"history": "~5.3.0",
|
|
76
76
|
"redux": "~4.2.1",
|