@elliemae/pui-scripting-object 1.15.0 → 1.16.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/event.d.ts +3 -3
- package/dist/types/objects/application.d.ts +86 -23
- package/dist/types/objects/form.d.ts +53 -20
- package/dist/types/objects/global.d.ts +30 -10
- package/dist/types/objects/loan.d.ts +227 -73
- package/dist/types/objects/module.d.ts +26 -9
- package/dist/types/objects/view.d.ts +59 -20
- package/package.json +1 -1
package/dist/types/event.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import { IScriptingObjectProxy, IScriptingObject } from './scriptingObject.js';
|
|
|
5
5
|
export declare type Listener<SO extends IScriptingObjectProxy, Params extends Record<string, unknown>, Options extends Record<string, unknown>, ReturnType> = ({ obj, eventName, eventParams, eventOptions, }: {
|
|
6
6
|
obj: SO;
|
|
7
7
|
eventName: string;
|
|
8
|
-
eventParams
|
|
9
|
-
eventOptions
|
|
8
|
+
eventParams: Params;
|
|
9
|
+
eventOptions: Options;
|
|
10
10
|
}) => ReturnType;
|
|
11
11
|
/**
|
|
12
12
|
* base class for events
|
|
@@ -35,7 +35,7 @@ export interface IEvent {
|
|
|
35
35
|
/**
|
|
36
36
|
* subscribe to the event
|
|
37
37
|
*/
|
|
38
|
-
subscribe: (callback: Listener<IScriptingObject, Record<string, unknown>, Record<string, unknown>,
|
|
38
|
+
subscribe: (callback: Listener<IScriptingObject, Record<string, unknown>, Record<string, unknown>, any>) => string;
|
|
39
39
|
/**
|
|
40
40
|
* unsubscribe from the event
|
|
41
41
|
*/
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { IEvent, Listener } from '../event.js';
|
|
2
2
|
import { IScriptingObject } from '../scriptingObject.js';
|
|
3
|
+
/**
|
|
4
|
+
* Log levels
|
|
5
|
+
*/
|
|
3
6
|
export declare enum LogLevel {
|
|
4
7
|
TRACE = "TRACE",
|
|
5
8
|
DEBUG = "DEBUG",
|
|
@@ -9,18 +12,39 @@ export declare enum LogLevel {
|
|
|
9
12
|
ERROR = "ERROR",
|
|
10
13
|
FATAL = "FATAL"
|
|
11
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* metadata about the application
|
|
17
|
+
*/
|
|
12
18
|
export declare type AppInfo = {
|
|
13
19
|
id: string;
|
|
14
20
|
name: string;
|
|
15
21
|
};
|
|
22
|
+
/**
|
|
23
|
+
* Application extension type
|
|
24
|
+
*/
|
|
16
25
|
export declare enum ApplicationExtensionType {
|
|
17
26
|
TOOL = "TOOL",
|
|
18
27
|
MENU = "MENU"
|
|
19
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* metadata about the application extension
|
|
31
|
+
*/
|
|
20
32
|
export declare type ApplicationExtension = {
|
|
33
|
+
/**
|
|
34
|
+
* type of application extension
|
|
35
|
+
*/
|
|
21
36
|
type: ApplicationExtensionType;
|
|
37
|
+
/**
|
|
38
|
+
* display text of the application extension
|
|
39
|
+
*/
|
|
22
40
|
text: string;
|
|
41
|
+
/**
|
|
42
|
+
* url where the application extension is hosted
|
|
43
|
+
*/
|
|
23
44
|
url: string;
|
|
45
|
+
/**
|
|
46
|
+
* custom options for the application extension
|
|
47
|
+
*/
|
|
24
48
|
options?: Record<string, string>;
|
|
25
49
|
};
|
|
26
50
|
/**
|
|
@@ -38,9 +62,6 @@ export declare enum NavigationType {
|
|
|
38
62
|
* navigation options
|
|
39
63
|
*/
|
|
40
64
|
export declare type NavigationOptions = {
|
|
41
|
-
/**
|
|
42
|
-
*
|
|
43
|
-
*/
|
|
44
65
|
target: string;
|
|
45
66
|
type: NavigationType;
|
|
46
67
|
context?: Record<string, string>;
|
|
@@ -49,6 +70,9 @@ export declare type OpenOptions = {
|
|
|
49
70
|
target: string;
|
|
50
71
|
type?: string;
|
|
51
72
|
};
|
|
73
|
+
/**
|
|
74
|
+
* size of the modal
|
|
75
|
+
*/
|
|
52
76
|
export declare enum ModalSize {
|
|
53
77
|
SMALL = "sm",
|
|
54
78
|
MEDIUM = "md",
|
|
@@ -86,21 +110,75 @@ export declare type PrintOptions = {
|
|
|
86
110
|
*/
|
|
87
111
|
blob: Blob;
|
|
88
112
|
};
|
|
113
|
+
declare type UserInfo = {
|
|
114
|
+
/**
|
|
115
|
+
* user id
|
|
116
|
+
*/
|
|
117
|
+
userId: string;
|
|
118
|
+
};
|
|
119
|
+
declare type ActionInfo = {
|
|
120
|
+
/**
|
|
121
|
+
* name of the action
|
|
122
|
+
*/
|
|
123
|
+
name: string;
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* event handler that handles user login event
|
|
127
|
+
*/
|
|
128
|
+
export declare type ApplicationLoginListener = Listener<IApplication, UserInfo, Record<string, unknown>, void>;
|
|
89
129
|
/**
|
|
90
130
|
* event fired when the user logs in
|
|
91
131
|
*/
|
|
92
|
-
export interface
|
|
132
|
+
export interface IApplicationLoginEvent extends IEvent {
|
|
133
|
+
/**
|
|
134
|
+
* event name
|
|
135
|
+
*/
|
|
93
136
|
readonly name: 'Login';
|
|
137
|
+
/**
|
|
138
|
+
* scripting object from where the event is fired
|
|
139
|
+
*/
|
|
94
140
|
readonly objectId: 'Application';
|
|
141
|
+
/**
|
|
142
|
+
* event does not require feedback from listeners
|
|
143
|
+
*/
|
|
95
144
|
readonly requiresFeedback: false;
|
|
145
|
+
/**
|
|
146
|
+
* event parameters
|
|
147
|
+
*/
|
|
148
|
+
readonly params: UserInfo;
|
|
149
|
+
/**
|
|
150
|
+
* subscribe to the event
|
|
151
|
+
*/
|
|
152
|
+
subscribe: (callback: ApplicationLoginListener) => string;
|
|
96
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* event handler that handles action completed event
|
|
156
|
+
*/
|
|
157
|
+
export declare type ApplicationActionCompletedListener = Listener<IApplication, ActionInfo, Record<string, unknown>, void>;
|
|
97
158
|
/**
|
|
98
159
|
* event fired when an action is completed. actions are executed through the performAction method
|
|
99
160
|
*/
|
|
100
|
-
export interface
|
|
161
|
+
export interface IApplicationActionCompletedEvent extends IEvent {
|
|
162
|
+
/**
|
|
163
|
+
* event name
|
|
164
|
+
*/
|
|
101
165
|
readonly name: 'ActionCompleted';
|
|
166
|
+
/**
|
|
167
|
+
* scripting object from where the event is fired
|
|
168
|
+
*/
|
|
102
169
|
readonly objectId: 'Application';
|
|
170
|
+
/**
|
|
171
|
+
* event does not require feedback from listeners
|
|
172
|
+
*/
|
|
103
173
|
readonly requiresFeedback: false;
|
|
174
|
+
/**
|
|
175
|
+
* event parameters
|
|
176
|
+
*/
|
|
177
|
+
readonly params: ActionInfo;
|
|
178
|
+
/**
|
|
179
|
+
* subscribe to the event
|
|
180
|
+
*/
|
|
181
|
+
subscribe: (callback: ApplicationActionCompletedListener) => string;
|
|
104
182
|
}
|
|
105
183
|
/**
|
|
106
184
|
* Allows access to application-level UI elements, behaviors and events
|
|
@@ -109,11 +187,11 @@ export interface IApplication extends IScriptingObject {
|
|
|
109
187
|
/**
|
|
110
188
|
* notifies user login
|
|
111
189
|
*/
|
|
112
|
-
readonly Login:
|
|
190
|
+
readonly Login: IApplicationLoginEvent;
|
|
113
191
|
/**
|
|
114
192
|
* notifies action completion
|
|
115
193
|
*/
|
|
116
|
-
readonly ActionCompleted:
|
|
194
|
+
readonly ActionCompleted: IApplicationActionCompletedEvent;
|
|
117
195
|
/**
|
|
118
196
|
* Gets descriptor for the Application
|
|
119
197
|
*
|
|
@@ -216,19 +294,4 @@ export interface IApplication extends IScriptingObject {
|
|
|
216
294
|
*/
|
|
217
295
|
log(message: string, logLevel: LogLevel): Promise<void>;
|
|
218
296
|
}
|
|
219
|
-
|
|
220
|
-
* event handler that handles user login event
|
|
221
|
-
*
|
|
222
|
-
* @param userId unique identifier of the user
|
|
223
|
-
*/
|
|
224
|
-
export declare type ApplicationLoginListener = Listener<IApplication, {
|
|
225
|
-
userId: string;
|
|
226
|
-
}, Record<string, unknown>, void>;
|
|
227
|
-
/**
|
|
228
|
-
* event handler that handles action completed event
|
|
229
|
-
*
|
|
230
|
-
* @param name action name
|
|
231
|
-
*/
|
|
232
|
-
export declare type ApplicationActionCompletedListener = Listener<IApplication, {
|
|
233
|
-
name: string;
|
|
234
|
-
}, Record<string, unknown>, void>;
|
|
297
|
+
export {};
|
|
@@ -4,21 +4,69 @@ export declare type FormDescriptor = {
|
|
|
4
4
|
id: string;
|
|
5
5
|
name: string;
|
|
6
6
|
};
|
|
7
|
+
declare type FormInfo = {
|
|
8
|
+
/**
|
|
9
|
+
* unique id of the form
|
|
10
|
+
*/
|
|
11
|
+
id: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* event handler for form load event
|
|
15
|
+
*/
|
|
16
|
+
export declare type FormLoadListener = Listener<IForm, FormInfo, Record<string, unknown>, void>;
|
|
17
|
+
/**
|
|
18
|
+
* event handler for form unload event
|
|
19
|
+
*/
|
|
20
|
+
export declare type FormUnLoadListener = Listener<IForm, FormInfo, Record<string, unknown>, void>;
|
|
7
21
|
/**
|
|
8
22
|
* event to notify form load operation
|
|
9
23
|
*/
|
|
10
|
-
export interface
|
|
24
|
+
export interface IFormLoadEvent extends IEvent {
|
|
25
|
+
/**
|
|
26
|
+
* event name
|
|
27
|
+
*/
|
|
11
28
|
readonly name: 'Load';
|
|
29
|
+
/**
|
|
30
|
+
* scripting object from where the event is fired
|
|
31
|
+
*/
|
|
12
32
|
readonly objectId: 'Form';
|
|
33
|
+
/**
|
|
34
|
+
* event does not require feedback from listeners
|
|
35
|
+
*/
|
|
13
36
|
readonly requiresFeedback: false;
|
|
37
|
+
/**
|
|
38
|
+
* event parameters
|
|
39
|
+
*/
|
|
40
|
+
readonly params: FormInfo;
|
|
41
|
+
/**
|
|
42
|
+
* subscribe to the event
|
|
43
|
+
*/
|
|
44
|
+
subscribe: (callback: FormLoadListener) => string;
|
|
14
45
|
}
|
|
15
46
|
/**
|
|
16
47
|
* event to notify form unload operation
|
|
17
48
|
*/
|
|
18
|
-
export interface
|
|
49
|
+
export interface IFormUnLoadEvent extends IEvent {
|
|
50
|
+
/**
|
|
51
|
+
* event name
|
|
52
|
+
*/
|
|
19
53
|
readonly name: 'UnLoad';
|
|
54
|
+
/**
|
|
55
|
+
* scripting object from where the event is fired
|
|
56
|
+
*/
|
|
20
57
|
readonly objectId: 'Form';
|
|
58
|
+
/**
|
|
59
|
+
* event does not require feedback from listeners
|
|
60
|
+
*/
|
|
21
61
|
readonly requiresFeedback: false;
|
|
62
|
+
/**
|
|
63
|
+
* event parameters
|
|
64
|
+
*/
|
|
65
|
+
readonly params: FormInfo;
|
|
66
|
+
/**
|
|
67
|
+
* subscribe to the event
|
|
68
|
+
*/
|
|
69
|
+
subscribe: (callback: FormUnLoadListener) => string;
|
|
22
70
|
}
|
|
23
71
|
/**
|
|
24
72
|
* Methods to get information about the custom form
|
|
@@ -27,11 +75,11 @@ export interface IForm extends IScriptingObject {
|
|
|
27
75
|
/**
|
|
28
76
|
* event fired when the form is loaded
|
|
29
77
|
*/
|
|
30
|
-
readonly Load:
|
|
78
|
+
readonly Load: IFormLoadEvent;
|
|
31
79
|
/**
|
|
32
80
|
* event fired when the form is unloaded
|
|
33
81
|
*/
|
|
34
|
-
readonly UnLoad:
|
|
82
|
+
readonly UnLoad: IFormUnLoadEvent;
|
|
35
83
|
/**
|
|
36
84
|
* get metadata of the form
|
|
37
85
|
*
|
|
@@ -46,19 +94,4 @@ export interface IForm extends IScriptingObject {
|
|
|
46
94
|
*/
|
|
47
95
|
getControl(id: string): Promise<unknown>;
|
|
48
96
|
}
|
|
49
|
-
|
|
50
|
-
* event handler for form load event
|
|
51
|
-
*
|
|
52
|
-
* @param id unique id of the form that is loaded
|
|
53
|
-
*/
|
|
54
|
-
export declare type FormLoadListener = Listener<IForm, {
|
|
55
|
-
id: string;
|
|
56
|
-
}, Record<string, unknown>, void>;
|
|
57
|
-
/**
|
|
58
|
-
* event handler for form unload event
|
|
59
|
-
*
|
|
60
|
-
* @param id unique id of the form that is unloaded
|
|
61
|
-
*/
|
|
62
|
-
export declare type FormUnLoadListener = Listener<IForm, {
|
|
63
|
-
id: string;
|
|
64
|
-
}, Record<string, unknown>, void>;
|
|
97
|
+
export {};
|
|
@@ -1,12 +1,39 @@
|
|
|
1
1
|
import { IEvent, Listener } from '../event.js';
|
|
2
2
|
import { IScriptingObject } from '../scriptingObject.js';
|
|
3
|
+
declare type StateInfo = {
|
|
4
|
+
/**
|
|
5
|
+
* name of the key for which the value changed
|
|
6
|
+
*/
|
|
7
|
+
key: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* event handler for global state change event
|
|
11
|
+
*/
|
|
12
|
+
export declare type GlobalChangeListener = Listener<IGlobal, StateInfo, Record<string, unknown>, void>;
|
|
3
13
|
/**
|
|
4
14
|
* event to notify change in global state
|
|
5
15
|
*/
|
|
6
|
-
export interface
|
|
16
|
+
export interface IGlobalChangeEvent extends IEvent {
|
|
17
|
+
/**
|
|
18
|
+
* event name
|
|
19
|
+
*/
|
|
7
20
|
readonly name: 'Change';
|
|
21
|
+
/**
|
|
22
|
+
* scripting object from where the event is fired
|
|
23
|
+
*/
|
|
8
24
|
readonly objectId: 'Global';
|
|
25
|
+
/**
|
|
26
|
+
* event does not require feedback from listeners
|
|
27
|
+
*/
|
|
9
28
|
readonly requiresFeedback: false;
|
|
29
|
+
/**
|
|
30
|
+
* event parameters
|
|
31
|
+
*/
|
|
32
|
+
readonly params: StateInfo;
|
|
33
|
+
/**
|
|
34
|
+
* subscribe to the event
|
|
35
|
+
*/
|
|
36
|
+
subscribe: (callback: GlobalChangeListener) => string;
|
|
10
37
|
}
|
|
11
38
|
/**
|
|
12
39
|
* The Global object allows for data to be shared between custom forms/tools/plugins within a user's session.
|
|
@@ -28,7 +55,7 @@ export interface IGlobal extends IScriptingObject {
|
|
|
28
55
|
/**
|
|
29
56
|
* event fired when the global state changes
|
|
30
57
|
*/
|
|
31
|
-
readonly Change:
|
|
58
|
+
readonly Change: IGlobalChangeEvent;
|
|
32
59
|
/**
|
|
33
60
|
* set a value in the global store
|
|
34
61
|
*
|
|
@@ -44,11 +71,4 @@ export interface IGlobal extends IScriptingObject {
|
|
|
44
71
|
*/
|
|
45
72
|
get(key: string): Promise<unknown>;
|
|
46
73
|
}
|
|
47
|
-
|
|
48
|
-
* event handler for global state change event
|
|
49
|
-
*
|
|
50
|
-
* @param key name of the key for which the value changed
|
|
51
|
-
*/
|
|
52
|
-
export declare type GlobalChangeListener = Listener<IGlobal, {
|
|
53
|
-
key: string;
|
|
54
|
-
}, Record<string, unknown>, void>;
|
|
74
|
+
export {};
|
|
@@ -23,77 +23,285 @@ export declare enum LoanLevelActions {
|
|
|
23
23
|
COPY_ITEMIZATION_TO_STATE_DISCLOSURE = "copyItemizationToStateDisclosure",
|
|
24
24
|
CALCULATE_EEM_MORTGAGE = "calculateEEMMortgage"
|
|
25
25
|
}
|
|
26
|
+
declare type CommitInfo = {
|
|
27
|
+
/**
|
|
28
|
+
* cause of commit event
|
|
29
|
+
*/
|
|
30
|
+
cause: string;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* event handler for loan precommit event
|
|
34
|
+
*
|
|
35
|
+
* @returns true if precommit is allowed, false otherwise
|
|
36
|
+
*/
|
|
37
|
+
export declare type LoanPreCommitListener = Listener<ILoan, CommitInfo, Record<string, unknown>, boolean>;
|
|
26
38
|
/**
|
|
27
39
|
* event to notify loan precommit operation
|
|
28
40
|
*/
|
|
29
|
-
export interface
|
|
41
|
+
export interface ILoanPreCommitEvent extends IEvent {
|
|
42
|
+
/**
|
|
43
|
+
* event name
|
|
44
|
+
*/
|
|
30
45
|
readonly name: 'PreCommit';
|
|
46
|
+
/**
|
|
47
|
+
* scripting object from where the event is fired
|
|
48
|
+
*/
|
|
31
49
|
readonly objectId: 'Loan';
|
|
50
|
+
/**
|
|
51
|
+
* event requires feedback from listeners
|
|
52
|
+
*/
|
|
32
53
|
readonly requiresFeedback: true;
|
|
54
|
+
/**
|
|
55
|
+
* event parameters
|
|
56
|
+
*/
|
|
57
|
+
readonly params: CommitInfo;
|
|
58
|
+
/**
|
|
59
|
+
* subscribe to the event
|
|
60
|
+
*/
|
|
61
|
+
subscribe: (callback: LoanPreCommitListener) => string;
|
|
33
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* event handler for loan commited event
|
|
65
|
+
*
|
|
66
|
+
*/
|
|
67
|
+
export declare type LoanCommittedListener = Listener<ILoan, CommitInfo, Record<string, unknown>, void>;
|
|
34
68
|
/**
|
|
35
69
|
* event to notify loan committed operation
|
|
36
70
|
*/
|
|
37
|
-
export interface
|
|
71
|
+
export interface ILoanCommittedEvent extends IEvent {
|
|
72
|
+
/**
|
|
73
|
+
* event name
|
|
74
|
+
*/
|
|
38
75
|
readonly name: 'Committed';
|
|
76
|
+
/**
|
|
77
|
+
* scripting object from where the event is fired
|
|
78
|
+
*/
|
|
39
79
|
readonly objectId: 'Loan';
|
|
80
|
+
/**
|
|
81
|
+
* event does not require feedback from listeners
|
|
82
|
+
*/
|
|
40
83
|
readonly requiresFeedback: false;
|
|
84
|
+
/**
|
|
85
|
+
* event parameters
|
|
86
|
+
*/
|
|
87
|
+
readonly params: CommitInfo;
|
|
88
|
+
/**
|
|
89
|
+
* subscribe to the event
|
|
90
|
+
*/
|
|
91
|
+
subscribe: (callback: LoanCommittedListener) => string;
|
|
41
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* event handler for loan data change event
|
|
95
|
+
*/
|
|
96
|
+
export declare type LoanChangeListener = Listener<ILoan, Record<string, never>, Record<string, unknown>, void>;
|
|
42
97
|
/**
|
|
43
98
|
* event to notify loan change operation
|
|
44
99
|
*/
|
|
45
|
-
export interface
|
|
100
|
+
export interface ILoanChangeEvent extends IEvent {
|
|
101
|
+
/**
|
|
102
|
+
* event name
|
|
103
|
+
*/
|
|
46
104
|
readonly name: 'Chanage';
|
|
105
|
+
/**
|
|
106
|
+
* scripting object from where the event is fired
|
|
107
|
+
*/
|
|
47
108
|
readonly objectId: 'Loan';
|
|
109
|
+
/**
|
|
110
|
+
* event does not require feedback from listeners
|
|
111
|
+
*/
|
|
48
112
|
readonly requiresFeedback: false;
|
|
113
|
+
/**
|
|
114
|
+
* event parameters
|
|
115
|
+
*/
|
|
116
|
+
readonly params: Record<string, never>;
|
|
117
|
+
/**
|
|
118
|
+
* subscribe to the event
|
|
119
|
+
*/
|
|
120
|
+
subscribe: (callback: LoanChangeListener) => string;
|
|
49
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* event handler for loan sync event
|
|
124
|
+
*/
|
|
125
|
+
export declare type LoanSyncListener = Listener<ILoan, Record<string, never>, Record<string, unknown>, void>;
|
|
50
126
|
/**
|
|
51
127
|
* event to notify loan sync operation
|
|
52
128
|
*/
|
|
53
|
-
export interface
|
|
129
|
+
export interface ILoanSyncEvent extends IEvent {
|
|
130
|
+
/**
|
|
131
|
+
* event name
|
|
132
|
+
*/
|
|
54
133
|
readonly name: 'Sync';
|
|
134
|
+
/**
|
|
135
|
+
* scripting object from where the event is fired
|
|
136
|
+
*/
|
|
55
137
|
readonly objectId: 'Loan';
|
|
138
|
+
/**
|
|
139
|
+
* event does not require feedback from listeners
|
|
140
|
+
*/
|
|
56
141
|
readonly requiresFeedback: false;
|
|
142
|
+
/**
|
|
143
|
+
* event parameters
|
|
144
|
+
*/
|
|
145
|
+
readonly params: Record<string, never>;
|
|
146
|
+
/**
|
|
147
|
+
* subscribe to the event
|
|
148
|
+
*/
|
|
149
|
+
subscribe: (callback: LoanSyncListener) => string;
|
|
57
150
|
}
|
|
151
|
+
/**
|
|
152
|
+
* event handler for loan open event
|
|
153
|
+
*/
|
|
154
|
+
export declare type LoanOpenListener = Listener<ILoan, Record<string, never>, Record<string, unknown>, void>;
|
|
58
155
|
/**
|
|
59
156
|
* event to notify loan open operation
|
|
60
157
|
*/
|
|
61
|
-
export interface
|
|
158
|
+
export interface ILoanOpenEvent extends IEvent {
|
|
159
|
+
/**
|
|
160
|
+
* event name
|
|
161
|
+
*/
|
|
62
162
|
readonly name: 'Open';
|
|
163
|
+
/**
|
|
164
|
+
* scripting object from where the event is fired
|
|
165
|
+
*/
|
|
63
166
|
readonly objectId: 'Loan';
|
|
167
|
+
/**
|
|
168
|
+
* event does not require feedback from listeners
|
|
169
|
+
*/
|
|
64
170
|
readonly requiresFeedback: false;
|
|
171
|
+
/**
|
|
172
|
+
* event parameters
|
|
173
|
+
*/
|
|
174
|
+
readonly params: Record<string, never>;
|
|
175
|
+
/**
|
|
176
|
+
* subscribe to the event
|
|
177
|
+
*/
|
|
178
|
+
subscribe: (callback: LoanOpenListener) => string;
|
|
65
179
|
}
|
|
180
|
+
/**
|
|
181
|
+
* event handler for loan close event
|
|
182
|
+
*
|
|
183
|
+
* @returns true if loan close is allowed, false otherwise
|
|
184
|
+
*/
|
|
185
|
+
export declare type LoanCloseListener = Listener<ILoan, Record<string, never>, Record<string, unknown>, void>;
|
|
66
186
|
/**
|
|
67
187
|
* event to notify loan close operation
|
|
68
188
|
*/
|
|
69
|
-
export interface
|
|
189
|
+
export interface ILoanCloseEvent extends IEvent {
|
|
190
|
+
/**
|
|
191
|
+
* event name
|
|
192
|
+
*/
|
|
70
193
|
readonly name: 'Close';
|
|
194
|
+
/**
|
|
195
|
+
* scripting object from where the event is fired
|
|
196
|
+
*/
|
|
71
197
|
readonly objectId: 'Loan';
|
|
198
|
+
/**
|
|
199
|
+
* event does not require feedback from listeners
|
|
200
|
+
*/
|
|
72
201
|
readonly requiresFeedback: false;
|
|
202
|
+
/**
|
|
203
|
+
* event parameters
|
|
204
|
+
*/
|
|
205
|
+
readonly params: Record<string, never>;
|
|
206
|
+
/**
|
|
207
|
+
* subscribe to the event
|
|
208
|
+
*/
|
|
209
|
+
subscribe: (callback: LoanCloseListener) => string;
|
|
73
210
|
}
|
|
211
|
+
declare type MilestoneInfo = {
|
|
212
|
+
/**
|
|
213
|
+
* milestone name
|
|
214
|
+
*/
|
|
215
|
+
name: string;
|
|
216
|
+
};
|
|
217
|
+
/**
|
|
218
|
+
* event handler for loan milestone completed event
|
|
219
|
+
*/
|
|
220
|
+
export declare type LoanMilestoneCompletedListener = Listener<ILoan, MilestoneInfo, Record<string, unknown>, void>;
|
|
74
221
|
/**
|
|
75
222
|
* event to notify loan milestone completed operation
|
|
76
223
|
*/
|
|
77
|
-
export interface
|
|
224
|
+
export interface ILoanMilestoneCompletedEvent extends IEvent {
|
|
225
|
+
/**
|
|
226
|
+
* event name
|
|
227
|
+
*/
|
|
78
228
|
readonly name: 'MilestoneCompleted';
|
|
229
|
+
/**
|
|
230
|
+
* scripting object from where the event is fired
|
|
231
|
+
*/
|
|
79
232
|
readonly objectId: 'Loan';
|
|
233
|
+
/**
|
|
234
|
+
* event does not require feedback from listeners
|
|
235
|
+
*/
|
|
80
236
|
readonly requiresFeedback: false;
|
|
237
|
+
/**
|
|
238
|
+
* event parameters
|
|
239
|
+
*/
|
|
240
|
+
readonly params: MilestoneInfo;
|
|
241
|
+
/**
|
|
242
|
+
* subscribe to the event
|
|
243
|
+
*/
|
|
244
|
+
subscribe: (callback: LoanMilestoneCompletedListener) => string;
|
|
81
245
|
}
|
|
246
|
+
/**
|
|
247
|
+
* event handler for loan pre milestone complete event
|
|
248
|
+
*
|
|
249
|
+
* @returns true if milestone complete is allowed, false otherwise
|
|
250
|
+
*/
|
|
251
|
+
export declare type LoanPreMilestoneCompleteListener = Listener<ILoan, MilestoneInfo, Record<string, unknown>, boolean>;
|
|
82
252
|
/**
|
|
83
253
|
* event to notify loan pre milestone complete operation
|
|
84
254
|
*/
|
|
85
|
-
export interface
|
|
255
|
+
export interface ILoanPreMilestoneCompleteEvent extends IEvent {
|
|
256
|
+
/**
|
|
257
|
+
* event name
|
|
258
|
+
*/
|
|
86
259
|
readonly name: 'PreMilestoneComplete';
|
|
260
|
+
/**
|
|
261
|
+
* scripting object from where the event is fired
|
|
262
|
+
*/
|
|
87
263
|
readonly objectId: 'Loan';
|
|
264
|
+
/**
|
|
265
|
+
* event requires feedback from listeners
|
|
266
|
+
*/
|
|
88
267
|
readonly requiresFeedback: true;
|
|
268
|
+
/**
|
|
269
|
+
* event parameters
|
|
270
|
+
*/
|
|
271
|
+
readonly params: MilestoneInfo;
|
|
272
|
+
/**
|
|
273
|
+
* subscribe to the event
|
|
274
|
+
*/
|
|
275
|
+
subscribe: (callback: LoanPreMilestoneCompleteListener) => string;
|
|
89
276
|
}
|
|
277
|
+
/**
|
|
278
|
+
* event handler for loan application selected event
|
|
279
|
+
*/
|
|
280
|
+
export declare type LoanApplicationSelectedListener = Listener<ILoan, Record<string, never>, Record<string, unknown>, void>;
|
|
90
281
|
/**
|
|
91
282
|
* event to notify loan application selected operation
|
|
92
283
|
*/
|
|
93
|
-
export interface
|
|
284
|
+
export interface ILoanApplicationSelectedEvent extends IEvent {
|
|
285
|
+
/**
|
|
286
|
+
* event name
|
|
287
|
+
*/
|
|
94
288
|
readonly name: 'ApplicationSelected';
|
|
289
|
+
/**
|
|
290
|
+
* scripting object from where the event is fired
|
|
291
|
+
*/
|
|
95
292
|
readonly objectId: 'Loan';
|
|
293
|
+
/**
|
|
294
|
+
* event does not require feedback from listeners
|
|
295
|
+
*/
|
|
96
296
|
readonly requiresFeedback: false;
|
|
297
|
+
/**
|
|
298
|
+
* event parameters
|
|
299
|
+
*/
|
|
300
|
+
readonly params: Record<string, never>;
|
|
301
|
+
/**
|
|
302
|
+
* subscribe to the event
|
|
303
|
+
*/
|
|
304
|
+
subscribe: (callback: LoanApplicationSelectedListener) => string;
|
|
97
305
|
}
|
|
98
306
|
/**
|
|
99
307
|
* Methods for interacting with an open loan in the application
|
|
@@ -102,39 +310,39 @@ export interface ILoan extends IScriptingObject {
|
|
|
102
310
|
/**
|
|
103
311
|
* event fired when the loan is ready to commit
|
|
104
312
|
*/
|
|
105
|
-
readonly PreCommit:
|
|
313
|
+
readonly PreCommit: ILoanPreCommitEvent;
|
|
106
314
|
/**
|
|
107
315
|
* event fired when the loan is committed
|
|
108
316
|
*/
|
|
109
|
-
readonly Committed:
|
|
317
|
+
readonly Committed: ILoanCommittedEvent;
|
|
110
318
|
/**
|
|
111
319
|
* event fired when the loan is changed
|
|
112
320
|
*/
|
|
113
|
-
readonly Change:
|
|
321
|
+
readonly Change: ILoanChangeEvent;
|
|
114
322
|
/**
|
|
115
323
|
* event fired when the loan is synced
|
|
116
324
|
*/
|
|
117
|
-
readonly Sync:
|
|
325
|
+
readonly Sync: ILoanSyncEvent;
|
|
118
326
|
/**
|
|
119
327
|
* event fired when the loan is opened
|
|
120
328
|
*/
|
|
121
|
-
readonly Open:
|
|
329
|
+
readonly Open: ILoanOpenEvent;
|
|
122
330
|
/**
|
|
123
331
|
* event fired when the loan is closed
|
|
124
332
|
*/
|
|
125
|
-
readonly Close:
|
|
333
|
+
readonly Close: ILoanCloseEvent;
|
|
126
334
|
/**
|
|
127
335
|
* event fired when the loan milestone is completed
|
|
128
336
|
*/
|
|
129
|
-
readonly MilestoneCompleted:
|
|
337
|
+
readonly MilestoneCompleted: ILoanMilestoneCompletedEvent;
|
|
130
338
|
/**
|
|
131
339
|
* event fired when the loan is ready to complete milestone
|
|
132
340
|
*/
|
|
133
|
-
readonly PreMilestoneComplete:
|
|
341
|
+
readonly PreMilestoneComplete: ILoanPreMilestoneCompleteEvent;
|
|
134
342
|
/**
|
|
135
343
|
* event fired when the loan application is selected
|
|
136
344
|
*/
|
|
137
|
-
readonly ApplicationSelected:
|
|
345
|
+
readonly ApplicationSelected: ILoanApplicationSelectedEvent;
|
|
138
346
|
/**
|
|
139
347
|
* Get complete Loan object
|
|
140
348
|
*
|
|
@@ -253,58 +461,4 @@ export interface ILoan extends IScriptingObject {
|
|
|
253
461
|
getCollection(name: string): Promise<Record<string, string>>;
|
|
254
462
|
getLockSnapshot(): Promise<Record<string, string>>;
|
|
255
463
|
}
|
|
256
|
-
|
|
257
|
-
* event handler for loan precommit event
|
|
258
|
-
*
|
|
259
|
-
* @param cause cause of precommit event
|
|
260
|
-
* @returns true if precommit is allowed, false otherwise
|
|
261
|
-
*/
|
|
262
|
-
export declare type LoanPreCommitListener = Listener<ILoan, {
|
|
263
|
-
cause: string;
|
|
264
|
-
}, Record<string, unknown>, boolean>;
|
|
265
|
-
/**
|
|
266
|
-
* event handler for loan commited event
|
|
267
|
-
*
|
|
268
|
-
* @param cause cause of commit event
|
|
269
|
-
*/
|
|
270
|
-
export declare type LoanCommittedListener = Listener<ILoan, {
|
|
271
|
-
cause: string;
|
|
272
|
-
}, Record<string, unknown>, void>;
|
|
273
|
-
/**
|
|
274
|
-
* event handler for loan data change event
|
|
275
|
-
*/
|
|
276
|
-
export declare type LoanChangeListener = Listener<ILoan, Record<string, never>, Record<string, unknown>, void>;
|
|
277
|
-
/**
|
|
278
|
-
* event handler for loan sync event
|
|
279
|
-
*/
|
|
280
|
-
export declare type LoanSyncListener = Listener<ILoan, Record<string, never>, Record<string, unknown>, void>;
|
|
281
|
-
/**
|
|
282
|
-
* event handler for loan open event
|
|
283
|
-
*/
|
|
284
|
-
export declare type LoanOpenListener = Listener<ILoan, Record<string, never>, Record<string, unknown>, void>;
|
|
285
|
-
/**
|
|
286
|
-
* event handler for loan close event
|
|
287
|
-
*
|
|
288
|
-
* @returns true if loan close is allowed, false otherwise
|
|
289
|
-
*/
|
|
290
|
-
export declare type LoanCloseListener = Listener<ILoan, Record<string, never>, Record<string, unknown>, void>;
|
|
291
|
-
/**
|
|
292
|
-
* event handler for loan milestone completed event
|
|
293
|
-
*
|
|
294
|
-
* @param name milestone name
|
|
295
|
-
*/
|
|
296
|
-
export declare type LoanMilestoneCompletedListener = Listener<ILoan, {
|
|
297
|
-
name: string;
|
|
298
|
-
}, Record<string, unknown>, void>;
|
|
299
|
-
/**
|
|
300
|
-
* event handler for loan pre milestone complete event
|
|
301
|
-
*
|
|
302
|
-
* @returns true if milestone complete is allowed, false otherwise
|
|
303
|
-
*/
|
|
304
|
-
export declare type LoanPreMilestoneCompleteListener = Listener<ILoan, {
|
|
305
|
-
name: string;
|
|
306
|
-
}, Record<string, unknown>, boolean>;
|
|
307
|
-
/**
|
|
308
|
-
* event handler for loan application selected event
|
|
309
|
-
*/
|
|
310
|
-
export declare type LoanApplicationSelectedListener = Listener<ILoan, Record<string, never>, Record<string, unknown>, void>;
|
|
464
|
+
export {};
|
|
@@ -1,12 +1,36 @@
|
|
|
1
1
|
import { IEvent, Listener } from '../event.js';
|
|
2
2
|
import { IScriptingObject } from '../scriptingObject.js';
|
|
3
|
+
/**
|
|
4
|
+
* event handler that handles module unload event
|
|
5
|
+
*
|
|
6
|
+
* @param id unique id of the app that is being unloaded
|
|
7
|
+
* @returns true if the module can be unloaded, false otherwise
|
|
8
|
+
*/
|
|
9
|
+
export declare type ModuleUnLoadingListener = Listener<IModule, Record<string, never>, Record<string, unknown>, boolean>;
|
|
3
10
|
/**
|
|
4
11
|
* Module unloading event
|
|
5
12
|
*/
|
|
6
|
-
export interface
|
|
13
|
+
export interface IModuleUnloadingEvent extends IEvent {
|
|
14
|
+
/**
|
|
15
|
+
* event name
|
|
16
|
+
*/
|
|
7
17
|
readonly name: 'Unloading';
|
|
18
|
+
/**
|
|
19
|
+
* scripting object from where the event was triggered
|
|
20
|
+
*/
|
|
8
21
|
readonly objectId: 'Module';
|
|
22
|
+
/**
|
|
23
|
+
* response needed from event listeners
|
|
24
|
+
*/
|
|
9
25
|
readonly requiresFeedback: true;
|
|
26
|
+
/**
|
|
27
|
+
* event parameters
|
|
28
|
+
*/
|
|
29
|
+
readonly params: Record<string, never>;
|
|
30
|
+
/**
|
|
31
|
+
* subscribe to the event
|
|
32
|
+
*/
|
|
33
|
+
subscribe: (callback: ModuleUnLoadingListener) => string;
|
|
10
34
|
}
|
|
11
35
|
/**
|
|
12
36
|
* Exposes MicroApp module specific methods
|
|
@@ -19,7 +43,7 @@ export interface IModule extends IScriptingObject {
|
|
|
19
43
|
*
|
|
20
44
|
* @returns true if the module can be unloaded, false otherwise
|
|
21
45
|
*/
|
|
22
|
-
readonly Unloading:
|
|
46
|
+
readonly Unloading: IModuleUnloadingEvent;
|
|
23
47
|
/**
|
|
24
48
|
* get microapp module-specific capabilities or settings defined by the host application. Helps to define the style and/or behavior of the module
|
|
25
49
|
*
|
|
@@ -39,10 +63,3 @@ export interface IModule extends IScriptingObject {
|
|
|
39
63
|
*/
|
|
40
64
|
unload(): Promise<void>;
|
|
41
65
|
}
|
|
42
|
-
/**
|
|
43
|
-
* event handler that handles module unload event
|
|
44
|
-
*
|
|
45
|
-
* @param id unique id of the app that is being unloaded
|
|
46
|
-
* @returns true if the module can be unloaded, false otherwise
|
|
47
|
-
*/
|
|
48
|
-
export declare type ModuleUnLoadingListener = Listener<IModule, Record<string, never>, Record<string, unknown>, boolean>;
|
|
@@ -8,21 +8,75 @@ export declare type ViewportSize = {
|
|
|
8
8
|
width: number;
|
|
9
9
|
height: number;
|
|
10
10
|
};
|
|
11
|
+
declare type ViewportSizeInfo = {
|
|
12
|
+
/**
|
|
13
|
+
* details about the resize event
|
|
14
|
+
*/
|
|
15
|
+
entires: ResizeObserverEntry;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* parent window resize event handler
|
|
19
|
+
*/
|
|
20
|
+
export declare type ViewResizeListener = Listener<IView, ViewportSizeInfo, Record<string, unknown>, void>;
|
|
11
21
|
/**
|
|
12
22
|
* event to notify window viewport resize operation
|
|
13
23
|
*/
|
|
14
|
-
export interface
|
|
24
|
+
export interface IViewResizeEvent extends IEvent {
|
|
25
|
+
/**
|
|
26
|
+
* event name
|
|
27
|
+
*/
|
|
15
28
|
readonly name: 'Resize';
|
|
29
|
+
/**
|
|
30
|
+
* scripting object from where the event is fired
|
|
31
|
+
*/
|
|
16
32
|
readonly objectId: 'View';
|
|
33
|
+
/**
|
|
34
|
+
* event does not require feedback from listeners
|
|
35
|
+
*/
|
|
17
36
|
readonly requiresFeedback: false;
|
|
37
|
+
/**
|
|
38
|
+
* event parameters
|
|
39
|
+
*/
|
|
40
|
+
readonly params: ViewportSizeInfo;
|
|
41
|
+
/**
|
|
42
|
+
* subscribe to the event
|
|
43
|
+
*/
|
|
44
|
+
subscribe: (callback: ViewResizeListener) => string;
|
|
18
45
|
}
|
|
46
|
+
declare type BreakpointInfo = {
|
|
47
|
+
/**
|
|
48
|
+
* current breakpoint of the parent window
|
|
49
|
+
*/
|
|
50
|
+
breakpoint: BreakPoint;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* parent window breakpoint change event handler
|
|
54
|
+
*/
|
|
55
|
+
export declare type BreakpointChangeListener = Listener<IView, BreakpointInfo, Record<string, unknown>, void>;
|
|
19
56
|
/**
|
|
20
57
|
* event to notify window viewport breakpoint change
|
|
21
58
|
*/
|
|
22
|
-
export interface
|
|
59
|
+
export interface IViewBreakpointChangeEvent extends IEvent {
|
|
60
|
+
/**
|
|
61
|
+
* event name
|
|
62
|
+
*/
|
|
23
63
|
readonly name: 'BreakpointChange';
|
|
64
|
+
/**
|
|
65
|
+
* scripting object from where the event is fired
|
|
66
|
+
*/
|
|
24
67
|
readonly objectId: 'View';
|
|
68
|
+
/**
|
|
69
|
+
* event does not require feedback from listeners
|
|
70
|
+
*/
|
|
25
71
|
readonly requiresFeedback: false;
|
|
72
|
+
/**
|
|
73
|
+
* event parameters
|
|
74
|
+
*/
|
|
75
|
+
readonly params: BreakpointInfo;
|
|
76
|
+
/**
|
|
77
|
+
* subscribe to the event
|
|
78
|
+
*/
|
|
79
|
+
subscribe: (callback: BreakpointChangeListener) => string;
|
|
26
80
|
}
|
|
27
81
|
/**
|
|
28
82
|
* Methods view, modify parent's window attributes
|
|
@@ -31,11 +85,11 @@ export interface IView extends IScriptingObject {
|
|
|
31
85
|
/**
|
|
32
86
|
* event fired when the window is resized
|
|
33
87
|
*/
|
|
34
|
-
readonly Resize:
|
|
88
|
+
readonly Resize: IViewResizeEvent;
|
|
35
89
|
/**
|
|
36
90
|
* event fired when the window breakpoint changes
|
|
37
91
|
*/
|
|
38
|
-
readonly BreakpointChange:
|
|
92
|
+
readonly BreakpointChange: IViewBreakpointChangeEvent;
|
|
39
93
|
/**
|
|
40
94
|
* Get the current breakpoint of the parent window
|
|
41
95
|
*/
|
|
@@ -45,19 +99,4 @@ export interface IView extends IScriptingObject {
|
|
|
45
99
|
*/
|
|
46
100
|
getViewPortSize(): Promise<ViewportSize>;
|
|
47
101
|
}
|
|
48
|
-
|
|
49
|
-
* parent window resize event handler
|
|
50
|
-
*
|
|
51
|
-
* @param entries details about the resize event
|
|
52
|
-
*/
|
|
53
|
-
export declare type ResizeEventListener = Listener<IView, {
|
|
54
|
-
entires: ResizeObserverEntry;
|
|
55
|
-
}, Record<string, unknown>, void>;
|
|
56
|
-
/**
|
|
57
|
-
* parent window breakpoint change event handler
|
|
58
|
-
*
|
|
59
|
-
* @param breakpoint current breakpoint of the parent window
|
|
60
|
-
*/
|
|
61
|
-
export declare type BreakpointChangeEventListener = Listener<IView, {
|
|
62
|
-
breakpoint: BreakPoint;
|
|
63
|
-
}, Record<string, unknown>, void>;
|
|
102
|
+
export {};
|