@elliemae/pui-scripting-object 1.16.9 → 1.16.10

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.
@@ -126,15 +126,6 @@ type ActionInfo = {
126
126
  * event handler that handles user login event
127
127
  */
128
128
  export type ApplicationLoginListener = Listener<IApplication, UserInfo, Record<string, unknown>, void>;
129
- /**
130
- * event fired when the user logs in
131
- */
132
- export interface IApplicationLoginEvent extends IEvent {
133
- /**
134
- * event parameters
135
- */
136
- readonly params: UserInfo;
137
- }
138
129
  /**
139
130
  * event handler that handles action completed event
140
131
  */
@@ -149,15 +140,6 @@ export type ApplicationEvents = {
149
140
  */
150
141
  'application.actioncompleted': ApplicationActionCompletedListener;
151
142
  };
152
- /**
153
- * event fired when an action is completed. actions are executed through the performAction method
154
- */
155
- export interface IApplicationActionCompletedEvent extends IEvent {
156
- /**
157
- * event parameters
158
- */
159
- readonly params: ActionInfo;
160
- }
161
143
  /**
162
144
  * Allows access to application-level UI elements, behaviors and events
163
145
  */
@@ -165,11 +147,11 @@ export interface IApplication extends IScriptingObject {
165
147
  /**
166
148
  * notifies user login
167
149
  */
168
- readonly Login: IApplicationLoginEvent;
150
+ readonly Login: IEvent;
169
151
  /**
170
152
  * notifies action completion
171
153
  */
172
- readonly ActionCompleted: IApplicationActionCompletedEvent;
154
+ readonly ActionCompleted: IEvent;
173
155
  /**
174
156
  * Gets descriptor for the Application
175
157
  *
@@ -14,28 +14,10 @@ type FormInfo = {
14
14
  * event handler for form load event
15
15
  */
16
16
  export type FormLoadListener = Listener<IForm, FormInfo, Record<string, unknown>, void>;
17
- /**
18
- * event to notify form load operation
19
- */
20
- export interface IFormLoadEvent extends IEvent {
21
- /**
22
- * event parameters
23
- */
24
- readonly params: FormInfo;
25
- }
26
17
  /**
27
18
  * event handler for form unload event
28
19
  */
29
20
  export type FormUnloadListener = Listener<IForm, FormInfo, Record<string, unknown>, void>;
30
- /**
31
- * event to notify form unload operation
32
- */
33
- export interface IFormUnloadEvent extends IEvent {
34
- /**
35
- * event parameters
36
- */
37
- readonly params: FormInfo;
38
- }
39
21
  /**
40
22
  * events that notifies the form's lifecycle
41
23
  */
@@ -56,11 +38,11 @@ export interface IForm extends IScriptingObject {
56
38
  /**
57
39
  * event fired when the form is loaded
58
40
  */
59
- readonly Load: IFormLoadEvent;
41
+ readonly Load: IEvent;
60
42
  /**
61
43
  * event fired when the form is unloaded
62
44
  */
63
- readonly Unload: IFormUnloadEvent;
45
+ readonly Unload: IEvent;
64
46
  /**
65
47
  * get metadata of the form
66
48
  *
@@ -10,15 +10,6 @@ type StateInfo = {
10
10
  * event handler for global state change event
11
11
  */
12
12
  export type GlobalChangeListener = Listener<IGlobal, StateInfo, Record<string, unknown>, void>;
13
- /**
14
- * event to notify change in global state
15
- */
16
- export interface IGlobalChangeEvent extends IEvent {
17
- /**
18
- * event parameters
19
- */
20
- readonly params: StateInfo;
21
- }
22
13
  /**
23
14
  * events fired from Global scripting object
24
15
  */
@@ -48,7 +39,7 @@ export interface IGlobal extends IScriptingObject {
48
39
  /**
49
40
  * event fired when the global state changes
50
41
  */
51
- readonly Change: IGlobalChangeEvent;
42
+ readonly Change: IEvent;
52
43
  /**
53
44
  * set a value in the global store
54
45
  *
@@ -35,83 +35,29 @@ type CommitInfo = {
35
35
  * @returns true if precommit is allowed, false otherwise
36
36
  */
37
37
  export type LoanPreCommitListener = Listener<ILoan, CommitInfo, Record<string, unknown>, boolean>;
38
- /**
39
- * event to notify loan precommit operation
40
- */
41
- export interface ILoanPreCommitEvent extends IEvent {
42
- /**
43
- * event parameters
44
- */
45
- readonly params: CommitInfo;
46
- }
47
38
  /**
48
39
  * event handler for loan commited event
49
40
  *
50
41
  */
51
42
  export type LoanCommittedListener = Listener<ILoan, CommitInfo, Record<string, unknown>, void>;
52
- /**
53
- * event to notify loan committed operation
54
- */
55
- export interface ILoanCommittedEvent extends IEvent {
56
- /**
57
- * event parameters
58
- */
59
- readonly params: CommitInfo;
60
- }
61
43
  /**
62
44
  * event handler for loan data change event
63
45
  */
64
46
  export type LoanChangeListener = Listener<ILoan, Record<string, never>, Record<string, unknown>, void>;
65
- /**
66
- * event to notify loan change operation
67
- */
68
- export interface ILoanChangeEvent extends IEvent {
69
- /**
70
- * event parameters
71
- */
72
- readonly params: Record<string, never>;
73
- }
74
47
  /**
75
48
  * event handler for loan sync event
76
49
  */
77
50
  export type LoanSyncListener = Listener<ILoan, Record<string, never>, Record<string, unknown>, void>;
78
- /**
79
- * event to notify loan sync operation
80
- */
81
- export interface ILoanSyncEvent extends IEvent {
82
- /**
83
- * event parameters
84
- */
85
- readonly params: Record<string, never>;
86
- }
87
51
  /**
88
52
  * event handler for loan open event
89
53
  */
90
54
  export type LoanOpenListener = Listener<ILoan, Record<string, never>, Record<string, unknown>, void>;
91
- /**
92
- * event to notify loan open operation
93
- */
94
- export interface ILoanOpenEvent extends IEvent {
95
- /**
96
- * event parameters
97
- */
98
- readonly params: Record<string, never>;
99
- }
100
55
  /**
101
56
  * event handler for loan close event
102
57
  *
103
58
  * @returns true if loan close is allowed, false otherwise
104
59
  */
105
60
  export type LoanCloseListener = Listener<ILoan, Record<string, never>, Record<string, unknown>, void>;
106
- /**
107
- * event to notify loan close operation
108
- */
109
- export interface ILoanCloseEvent extends IEvent {
110
- /**
111
- * event parameters
112
- */
113
- readonly params: Record<string, never>;
114
- }
115
61
  type MilestoneInfo = {
116
62
  /**
117
63
  * milestone name
@@ -122,43 +68,16 @@ type MilestoneInfo = {
122
68
  * event handler for loan milestone completed event
123
69
  */
124
70
  export type LoanMilestoneCompletedListener = Listener<ILoan, MilestoneInfo, Record<string, unknown>, void>;
125
- /**
126
- * event to notify loan milestone completed operation
127
- */
128
- export interface ILoanMilestoneCompletedEvent extends IEvent {
129
- /**
130
- * event parameters
131
- */
132
- readonly params: MilestoneInfo;
133
- }
134
71
  /**
135
72
  * event handler for loan pre milestone complete event
136
73
  *
137
74
  * @returns true if milestone complete is allowed, false otherwise
138
75
  */
139
76
  export type LoanPreMilestoneCompleteListener = Listener<ILoan, MilestoneInfo, Record<string, unknown>, boolean>;
140
- /**
141
- * event to notify loan pre milestone complete operation
142
- */
143
- export interface ILoanPreMilestoneCompleteEvent extends IEvent {
144
- /**
145
- * event parameters
146
- */
147
- readonly params: MilestoneInfo;
148
- }
149
77
  /**
150
78
  * event handler for loan application selected event
151
79
  */
152
80
  export type LoanApplicationSelectedListener = Listener<ILoan, Record<string, never>, Record<string, unknown>, void>;
153
- /**
154
- * event to notify loan application selected operation
155
- */
156
- export interface ILoanApplicationSelectedEvent extends IEvent {
157
- /**
158
- * event parameters
159
- */
160
- readonly params: Record<string, never>;
161
- }
162
81
  /**
163
82
  * events supported by Loan scripting object
164
83
  */
@@ -210,39 +129,39 @@ export interface ILoan extends IScriptingObject {
210
129
  /**
211
130
  * event fired when the loan is ready to commit
212
131
  */
213
- readonly PreCommit: ILoanPreCommitEvent;
132
+ readonly PreCommit: IEvent;
214
133
  /**
215
134
  * event fired when the loan is committed
216
135
  */
217
- readonly Committed: ILoanCommittedEvent;
136
+ readonly Committed: IEvent;
218
137
  /**
219
138
  * event fired when the loan is changed
220
139
  */
221
- readonly Change: ILoanChangeEvent;
140
+ readonly Change: IEvent;
222
141
  /**
223
142
  * event fired when the loan is synced
224
143
  */
225
- readonly Sync: ILoanSyncEvent;
144
+ readonly Sync: IEvent;
226
145
  /**
227
146
  * event fired when the loan is opened
228
147
  */
229
- readonly Open: ILoanOpenEvent;
148
+ readonly Open: IEvent;
230
149
  /**
231
150
  * event fired when the loan is closed
232
151
  */
233
- readonly Close: ILoanCloseEvent;
152
+ readonly Close: IEvent;
234
153
  /**
235
154
  * event fired when the loan milestone is completed
236
155
  */
237
- readonly MilestoneCompleted: ILoanMilestoneCompletedEvent;
156
+ readonly MilestoneCompleted: IEvent;
238
157
  /**
239
158
  * event fired when the loan is ready to complete milestone
240
159
  */
241
- readonly PreMilestoneComplete: ILoanPreMilestoneCompleteEvent;
160
+ readonly PreMilestoneComplete: IEvent;
242
161
  /**
243
162
  * event fired when the loan application is selected
244
163
  */
245
- readonly ApplicationSelected: ILoanApplicationSelectedEvent;
164
+ readonly ApplicationSelected: IEvent;
246
165
  /**
247
166
  * Get complete Loan object
248
167
  *
@@ -7,15 +7,6 @@ import { IScriptingObject } from '../scriptingObject.js';
7
7
  * @returns true if the module can be unloaded, false otherwise
8
8
  */
9
9
  export type ModuleUnLoadingListener = Listener<IModule, Record<string, never>, Record<string, unknown>, boolean>;
10
- /**
11
- * Module unloading event
12
- */
13
- export interface IModuleUnloadingEvent extends IEvent {
14
- /**
15
- * event parameters
16
- */
17
- readonly Params: Record<string, never>;
18
- }
19
10
  /**
20
11
  * events that notifies the module's lifecycle
21
12
  */
@@ -36,7 +27,7 @@ export interface IModule extends IScriptingObject {
36
27
  /**
37
28
  * event fired when the module is unloading
38
29
  */
39
- readonly Unloading: IModuleUnloadingEvent;
30
+ readonly Unloading: IEvent;
40
31
  /**
41
32
  * get microapp module-specific capabilities or settings defined by the host application. Helps to define the style and/or behavior of the module
42
33
  *
@@ -18,15 +18,6 @@ type ViewportSizeInfo = {
18
18
  * parent window resize event handler
19
19
  */
20
20
  export type ViewResizeListener = Listener<IView, ViewportSizeInfo, Record<string, unknown>, void>;
21
- /**
22
- * event to notify window viewport resize operation
23
- */
24
- export interface IViewResizeEvent extends IEvent {
25
- /**
26
- * event parameters
27
- */
28
- readonly params: ViewportSizeInfo;
29
- }
30
21
  type BreakpointInfo = {
31
22
  /**
32
23
  * current breakpoint of the parent window
@@ -37,15 +28,6 @@ type BreakpointInfo = {
37
28
  * parent window breakpoint change event handler
38
29
  */
39
30
  export type BreakpointChangeListener = Listener<IView, BreakpointInfo, Record<string, unknown>, void>;
40
- /**
41
- * event to notify window viewport breakpoint change
42
- */
43
- export interface IViewBreakpointChangeEvent extends IEvent {
44
- /**
45
- * event parameters
46
- */
47
- readonly params: BreakpointInfo;
48
- }
49
31
  export type ViewEvents = {
50
32
  /**
51
33
  * eent is fired when the parent window is resized
@@ -63,11 +45,11 @@ export interface IView extends IScriptingObject {
63
45
  /**
64
46
  * event fired when the window is resized
65
47
  */
66
- readonly Resize: IViewResizeEvent;
48
+ readonly Resize: IEvent;
67
49
  /**
68
50
  * event fired when the window breakpoint changes
69
51
  */
70
- readonly BreakpointChange: IViewBreakpointChangeEvent;
52
+ readonly BreakpointChange: IEvent;
71
53
  /**
72
54
  * Get the current breakpoint of the parent window
73
55
  */
@@ -1,7 +1,13 @@
1
- import { ApplicationEvents } from './objects/application.js';
2
- import { FormEvents } from './objects/form.js';
3
- import { GlobalEvents } from './objects/global.js';
4
- import { LoanEvents } from './objects/loan.js';
5
- import { ModuleEvents } from './objects/module.js';
6
- import { ViewEvents } from './objects/view.js';
7
- export type ScriptingObjectEvents = ApplicationEvents & FormEvents & GlobalEvents & LoanEvents & ModuleEvents & ViewEvents;
1
+ import { IEvent } from './event.js';
2
+ import { ApplicationEvents, IApplication } from './objects/application.js';
3
+ import { FormEvents, IForm } from './objects/form.js';
4
+ import { GlobalEvents, IGlobal } from './objects/global.js';
5
+ import { LoanEvents, ILoan } from './objects/loan.js';
6
+ import { ModuleEvents, IModule } from './objects/module.js';
7
+ import { ViewEvents, IView } from './objects/view.js';
8
+ type KeysMatching<T extends object, V> = {
9
+ [K in keyof T]-?: [V] extends [T[K]] ? K : never;
10
+ }[keyof T];
11
+ export type Events = ApplicationEvents & FormEvents & GlobalEvents & LoanEvents & ModuleEvents & ViewEvents;
12
+ export type EventObjects = KeysMatching<IApplication, IEvent> & KeysMatching<IForm, IEvent> & KeysMatching<IGlobal, IEvent> & KeysMatching<ILoan, IEvent> & KeysMatching<IModule, IEvent> & KeysMatching<IView, IEvent>;
13
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-scripting-object",
3
- "version": "1.16.9",
3
+ "version": "1.16.10",
4
4
  "description": "Typescript defintions for Scripting Objects",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/cjs/index.js",