@openfin/fdc3-api 43.100.62 → 43.100.64
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/out/fdc3-api-alpha.d.ts +87 -7
- package/out/fdc3-api-beta.d.ts +87 -7
- package/out/fdc3-api-public.d.ts +87 -7
- package/out/fdc3-api.d.ts +89 -6
- package/package.json +1 -1
package/out/fdc3-api-alpha.d.ts
CHANGED
|
@@ -9899,15 +9899,96 @@ declare type NotificationEvent = {
|
|
|
9899
9899
|
notificationId: string;
|
|
9900
9900
|
};
|
|
9901
9901
|
|
|
9902
|
+
declare type NotificationHandler = (notification: WebNotificationInfo) => void;
|
|
9903
|
+
|
|
9904
|
+
/**
|
|
9905
|
+
* NotificationManagers allow all {@link https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API | HTML5 notifications} created in the application to be intercepted and dispatched.
|
|
9906
|
+
*
|
|
9907
|
+
* Please note, currently Notifications will only be intercepted if the following conditions are met:
|
|
9908
|
+
* - The source WebContents has the `notification` webAPI permission.
|
|
9909
|
+
* - The source WebContents is not a service worker.
|
|
9910
|
+
*
|
|
9911
|
+
* Service worker and push notifications are currently not supported.
|
|
9912
|
+
*
|
|
9913
|
+
* **See also** - {@link https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API | Notification API (MDN)}
|
|
9914
|
+
*
|
|
9915
|
+
* @experimental This API is subject to change in future releases.
|
|
9916
|
+
*
|
|
9917
|
+
*/
|
|
9902
9918
|
declare class NotificationManagerInstance {
|
|
9903
9919
|
#private;
|
|
9904
|
-
|
|
9905
|
-
|
|
9920
|
+
/* Excluded from this release type: __constructor */
|
|
9921
|
+
/**
|
|
9922
|
+
* Sets the current handler for notifications. The provided function will be invoked whenever a WebContents successfully raises a notification.
|
|
9923
|
+
*
|
|
9924
|
+
* **Note**, only one handler can be used at a time, calling `setNotificationHandler` will replace any existing registered handler.
|
|
9925
|
+
*
|
|
9926
|
+
* @param handler The notification handler callback which will be invoked whenever a notification is created.
|
|
9927
|
+
*
|
|
9928
|
+
* @example
|
|
9929
|
+
*
|
|
9930
|
+
* ```typescript
|
|
9931
|
+
* const notificationManager = await fin.NotificationManager.init();
|
|
9932
|
+
* const handler = (notification) => {
|
|
9933
|
+
* console.log("Received the following notification", info);
|
|
9934
|
+
* }
|
|
9935
|
+
* await notificationManager.setNotificationHandler(handler);
|
|
9936
|
+
* ```
|
|
9937
|
+
*/
|
|
9938
|
+
setNotificationHandler: (handler: OpenFin.NotificationHandler) => Promise<void>;
|
|
9939
|
+
/**
|
|
9940
|
+
* Destroys the current NotificationManagerInstance.
|
|
9941
|
+
*
|
|
9942
|
+
* @example
|
|
9943
|
+
* ```typescript
|
|
9944
|
+
* await notificationManager.destroy();
|
|
9945
|
+
* ```
|
|
9946
|
+
*/
|
|
9906
9947
|
destroy: () => Promise<void>;
|
|
9907
|
-
|
|
9948
|
+
/**
|
|
9949
|
+
* Dispatches a Notification lifecycle event ('close' | 'click' | 'show').
|
|
9950
|
+
*
|
|
9951
|
+
* @param event Identifies the type of event to emit, and which `notificationId` to emit it for.
|
|
9952
|
+
*
|
|
9953
|
+
* @example
|
|
9954
|
+
* ```typescript
|
|
9955
|
+
* notificationManager.setNotificationHandler((notification) => {
|
|
9956
|
+
* await mockNotificationUi.showNotification(notification);
|
|
9957
|
+
* await notificationManager.dispatchNotificationEvent({
|
|
9958
|
+
* notificationId: notification.notificationId,
|
|
9959
|
+
* type: 'show
|
|
9960
|
+
* })
|
|
9961
|
+
* })
|
|
9962
|
+
* ```
|
|
9963
|
+
*
|
|
9964
|
+
* **See Also** - {@link https://developer.mozilla.org/en-US/docs/Web/API/Notification/click_event | Notification Click Event (MDN)}
|
|
9965
|
+
*
|
|
9966
|
+
* **See Also** - {@link https://developer.mozilla.org/en-US/docs/Web/API/Notification/close_event | Notification Close Event (MDN)}
|
|
9967
|
+
*
|
|
9968
|
+
* **See Also** - {@link https://developer.mozilla.org/en-US/docs/Web/API/Notification/show_event | Notification Show Event (MDN)}
|
|
9969
|
+
*/
|
|
9970
|
+
dispatch: (event: OpenFin.NotificationEvent) => Promise<void>;
|
|
9908
9971
|
}
|
|
9909
9972
|
|
|
9910
9973
|
declare class NotificationManagerModule extends Base {
|
|
9974
|
+
/**
|
|
9975
|
+
* Initializes a NotificationManager for the current application, which allows interception of HTML5 web notifications.
|
|
9976
|
+
*
|
|
9977
|
+
* Secured by default, must be called from a WebContents with the NotificationManager.init permission.
|
|
9978
|
+
*
|
|
9979
|
+
* Only one NotificationManager can be active at a time, calls to `init` will fail otherwise.
|
|
9980
|
+
*
|
|
9981
|
+
* If a WebContents with the NotificationManager active reloads or is closed, it will be possible to create a new one.
|
|
9982
|
+
*
|
|
9983
|
+
* @example
|
|
9984
|
+
*
|
|
9985
|
+
* ```js
|
|
9986
|
+
* // From Provider context
|
|
9987
|
+
* const notificationManager = await fin.NotificationManager.init();
|
|
9988
|
+
* // NotificationManager is now active and will intercept all incoming notifications.
|
|
9989
|
+
* ```
|
|
9990
|
+
* @experimental
|
|
9991
|
+
*/
|
|
9911
9992
|
init: () => Promise<NotificationManagerInstance>;
|
|
9912
9993
|
}
|
|
9913
9994
|
|
|
@@ -9915,8 +9996,6 @@ declare type NotificationManagerPermissions = {
|
|
|
9915
9996
|
init: boolean;
|
|
9916
9997
|
};
|
|
9917
9998
|
|
|
9918
|
-
declare type NotificiationHandler = (event: WebNotificationInfo) => void;
|
|
9919
|
-
|
|
9920
9999
|
/* Excluded from this release type: NotRequested */
|
|
9921
10000
|
|
|
9922
10001
|
/**
|
|
@@ -10329,11 +10408,12 @@ declare namespace OpenFin {
|
|
|
10329
10408
|
RoutingInfo,
|
|
10330
10409
|
DownloadShelfOptions,
|
|
10331
10410
|
ViewShowAtOptions,
|
|
10411
|
+
WebNotificationProperties,
|
|
10412
|
+
WebNotificationInfo,
|
|
10332
10413
|
NotificationEvent,
|
|
10414
|
+
NotificationHandler,
|
|
10333
10415
|
NotificationManagerInstance,
|
|
10334
10416
|
NotificationManagerModule,
|
|
10335
|
-
WebNotificationInfo,
|
|
10336
|
-
WebNotificationProperties,
|
|
10337
10417
|
ExtensionInfo,
|
|
10338
10418
|
ServeRequest,
|
|
10339
10419
|
AppAssetServeRequest,
|
package/out/fdc3-api-beta.d.ts
CHANGED
|
@@ -9899,15 +9899,96 @@ declare type NotificationEvent = {
|
|
|
9899
9899
|
notificationId: string;
|
|
9900
9900
|
};
|
|
9901
9901
|
|
|
9902
|
+
declare type NotificationHandler = (notification: WebNotificationInfo) => void;
|
|
9903
|
+
|
|
9904
|
+
/**
|
|
9905
|
+
* NotificationManagers allow all {@link https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API | HTML5 notifications} created in the application to be intercepted and dispatched.
|
|
9906
|
+
*
|
|
9907
|
+
* Please note, currently Notifications will only be intercepted if the following conditions are met:
|
|
9908
|
+
* - The source WebContents has the `notification` webAPI permission.
|
|
9909
|
+
* - The source WebContents is not a service worker.
|
|
9910
|
+
*
|
|
9911
|
+
* Service worker and push notifications are currently not supported.
|
|
9912
|
+
*
|
|
9913
|
+
* **See also** - {@link https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API | Notification API (MDN)}
|
|
9914
|
+
*
|
|
9915
|
+
* @experimental This API is subject to change in future releases.
|
|
9916
|
+
*
|
|
9917
|
+
*/
|
|
9902
9918
|
declare class NotificationManagerInstance {
|
|
9903
9919
|
#private;
|
|
9904
|
-
|
|
9905
|
-
|
|
9920
|
+
/* Excluded from this release type: __constructor */
|
|
9921
|
+
/**
|
|
9922
|
+
* Sets the current handler for notifications. The provided function will be invoked whenever a WebContents successfully raises a notification.
|
|
9923
|
+
*
|
|
9924
|
+
* **Note**, only one handler can be used at a time, calling `setNotificationHandler` will replace any existing registered handler.
|
|
9925
|
+
*
|
|
9926
|
+
* @param handler The notification handler callback which will be invoked whenever a notification is created.
|
|
9927
|
+
*
|
|
9928
|
+
* @example
|
|
9929
|
+
*
|
|
9930
|
+
* ```typescript
|
|
9931
|
+
* const notificationManager = await fin.NotificationManager.init();
|
|
9932
|
+
* const handler = (notification) => {
|
|
9933
|
+
* console.log("Received the following notification", info);
|
|
9934
|
+
* }
|
|
9935
|
+
* await notificationManager.setNotificationHandler(handler);
|
|
9936
|
+
* ```
|
|
9937
|
+
*/
|
|
9938
|
+
setNotificationHandler: (handler: OpenFin.NotificationHandler) => Promise<void>;
|
|
9939
|
+
/**
|
|
9940
|
+
* Destroys the current NotificationManagerInstance.
|
|
9941
|
+
*
|
|
9942
|
+
* @example
|
|
9943
|
+
* ```typescript
|
|
9944
|
+
* await notificationManager.destroy();
|
|
9945
|
+
* ```
|
|
9946
|
+
*/
|
|
9906
9947
|
destroy: () => Promise<void>;
|
|
9907
|
-
|
|
9948
|
+
/**
|
|
9949
|
+
* Dispatches a Notification lifecycle event ('close' | 'click' | 'show').
|
|
9950
|
+
*
|
|
9951
|
+
* @param event Identifies the type of event to emit, and which `notificationId` to emit it for.
|
|
9952
|
+
*
|
|
9953
|
+
* @example
|
|
9954
|
+
* ```typescript
|
|
9955
|
+
* notificationManager.setNotificationHandler((notification) => {
|
|
9956
|
+
* await mockNotificationUi.showNotification(notification);
|
|
9957
|
+
* await notificationManager.dispatchNotificationEvent({
|
|
9958
|
+
* notificationId: notification.notificationId,
|
|
9959
|
+
* type: 'show
|
|
9960
|
+
* })
|
|
9961
|
+
* })
|
|
9962
|
+
* ```
|
|
9963
|
+
*
|
|
9964
|
+
* **See Also** - {@link https://developer.mozilla.org/en-US/docs/Web/API/Notification/click_event | Notification Click Event (MDN)}
|
|
9965
|
+
*
|
|
9966
|
+
* **See Also** - {@link https://developer.mozilla.org/en-US/docs/Web/API/Notification/close_event | Notification Close Event (MDN)}
|
|
9967
|
+
*
|
|
9968
|
+
* **See Also** - {@link https://developer.mozilla.org/en-US/docs/Web/API/Notification/show_event | Notification Show Event (MDN)}
|
|
9969
|
+
*/
|
|
9970
|
+
dispatch: (event: OpenFin.NotificationEvent) => Promise<void>;
|
|
9908
9971
|
}
|
|
9909
9972
|
|
|
9910
9973
|
declare class NotificationManagerModule extends Base {
|
|
9974
|
+
/**
|
|
9975
|
+
* Initializes a NotificationManager for the current application, which allows interception of HTML5 web notifications.
|
|
9976
|
+
*
|
|
9977
|
+
* Secured by default, must be called from a WebContents with the NotificationManager.init permission.
|
|
9978
|
+
*
|
|
9979
|
+
* Only one NotificationManager can be active at a time, calls to `init` will fail otherwise.
|
|
9980
|
+
*
|
|
9981
|
+
* If a WebContents with the NotificationManager active reloads or is closed, it will be possible to create a new one.
|
|
9982
|
+
*
|
|
9983
|
+
* @example
|
|
9984
|
+
*
|
|
9985
|
+
* ```js
|
|
9986
|
+
* // From Provider context
|
|
9987
|
+
* const notificationManager = await fin.NotificationManager.init();
|
|
9988
|
+
* // NotificationManager is now active and will intercept all incoming notifications.
|
|
9989
|
+
* ```
|
|
9990
|
+
* @experimental
|
|
9991
|
+
*/
|
|
9911
9992
|
init: () => Promise<NotificationManagerInstance>;
|
|
9912
9993
|
}
|
|
9913
9994
|
|
|
@@ -9915,8 +9996,6 @@ declare type NotificationManagerPermissions = {
|
|
|
9915
9996
|
init: boolean;
|
|
9916
9997
|
};
|
|
9917
9998
|
|
|
9918
|
-
declare type NotificiationHandler = (event: WebNotificationInfo) => void;
|
|
9919
|
-
|
|
9920
9999
|
/* Excluded from this release type: NotRequested */
|
|
9921
10000
|
|
|
9922
10001
|
/**
|
|
@@ -10329,11 +10408,12 @@ declare namespace OpenFin {
|
|
|
10329
10408
|
RoutingInfo,
|
|
10330
10409
|
DownloadShelfOptions,
|
|
10331
10410
|
ViewShowAtOptions,
|
|
10411
|
+
WebNotificationProperties,
|
|
10412
|
+
WebNotificationInfo,
|
|
10332
10413
|
NotificationEvent,
|
|
10414
|
+
NotificationHandler,
|
|
10333
10415
|
NotificationManagerInstance,
|
|
10334
10416
|
NotificationManagerModule,
|
|
10335
|
-
WebNotificationInfo,
|
|
10336
|
-
WebNotificationProperties,
|
|
10337
10417
|
ExtensionInfo,
|
|
10338
10418
|
ServeRequest,
|
|
10339
10419
|
AppAssetServeRequest,
|
package/out/fdc3-api-public.d.ts
CHANGED
|
@@ -9899,15 +9899,96 @@ declare type NotificationEvent = {
|
|
|
9899
9899
|
notificationId: string;
|
|
9900
9900
|
};
|
|
9901
9901
|
|
|
9902
|
+
declare type NotificationHandler = (notification: WebNotificationInfo) => void;
|
|
9903
|
+
|
|
9904
|
+
/**
|
|
9905
|
+
* NotificationManagers allow all {@link https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API | HTML5 notifications} created in the application to be intercepted and dispatched.
|
|
9906
|
+
*
|
|
9907
|
+
* Please note, currently Notifications will only be intercepted if the following conditions are met:
|
|
9908
|
+
* - The source WebContents has the `notification` webAPI permission.
|
|
9909
|
+
* - The source WebContents is not a service worker.
|
|
9910
|
+
*
|
|
9911
|
+
* Service worker and push notifications are currently not supported.
|
|
9912
|
+
*
|
|
9913
|
+
* **See also** - {@link https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API | Notification API (MDN)}
|
|
9914
|
+
*
|
|
9915
|
+
* @experimental This API is subject to change in future releases.
|
|
9916
|
+
*
|
|
9917
|
+
*/
|
|
9902
9918
|
declare class NotificationManagerInstance {
|
|
9903
9919
|
#private;
|
|
9904
|
-
|
|
9905
|
-
|
|
9920
|
+
/* Excluded from this release type: __constructor */
|
|
9921
|
+
/**
|
|
9922
|
+
* Sets the current handler for notifications. The provided function will be invoked whenever a WebContents successfully raises a notification.
|
|
9923
|
+
*
|
|
9924
|
+
* **Note**, only one handler can be used at a time, calling `setNotificationHandler` will replace any existing registered handler.
|
|
9925
|
+
*
|
|
9926
|
+
* @param handler The notification handler callback which will be invoked whenever a notification is created.
|
|
9927
|
+
*
|
|
9928
|
+
* @example
|
|
9929
|
+
*
|
|
9930
|
+
* ```typescript
|
|
9931
|
+
* const notificationManager = await fin.NotificationManager.init();
|
|
9932
|
+
* const handler = (notification) => {
|
|
9933
|
+
* console.log("Received the following notification", info);
|
|
9934
|
+
* }
|
|
9935
|
+
* await notificationManager.setNotificationHandler(handler);
|
|
9936
|
+
* ```
|
|
9937
|
+
*/
|
|
9938
|
+
setNotificationHandler: (handler: OpenFin.NotificationHandler) => Promise<void>;
|
|
9939
|
+
/**
|
|
9940
|
+
* Destroys the current NotificationManagerInstance.
|
|
9941
|
+
*
|
|
9942
|
+
* @example
|
|
9943
|
+
* ```typescript
|
|
9944
|
+
* await notificationManager.destroy();
|
|
9945
|
+
* ```
|
|
9946
|
+
*/
|
|
9906
9947
|
destroy: () => Promise<void>;
|
|
9907
|
-
|
|
9948
|
+
/**
|
|
9949
|
+
* Dispatches a Notification lifecycle event ('close' | 'click' | 'show').
|
|
9950
|
+
*
|
|
9951
|
+
* @param event Identifies the type of event to emit, and which `notificationId` to emit it for.
|
|
9952
|
+
*
|
|
9953
|
+
* @example
|
|
9954
|
+
* ```typescript
|
|
9955
|
+
* notificationManager.setNotificationHandler((notification) => {
|
|
9956
|
+
* await mockNotificationUi.showNotification(notification);
|
|
9957
|
+
* await notificationManager.dispatchNotificationEvent({
|
|
9958
|
+
* notificationId: notification.notificationId,
|
|
9959
|
+
* type: 'show
|
|
9960
|
+
* })
|
|
9961
|
+
* })
|
|
9962
|
+
* ```
|
|
9963
|
+
*
|
|
9964
|
+
* **See Also** - {@link https://developer.mozilla.org/en-US/docs/Web/API/Notification/click_event | Notification Click Event (MDN)}
|
|
9965
|
+
*
|
|
9966
|
+
* **See Also** - {@link https://developer.mozilla.org/en-US/docs/Web/API/Notification/close_event | Notification Close Event (MDN)}
|
|
9967
|
+
*
|
|
9968
|
+
* **See Also** - {@link https://developer.mozilla.org/en-US/docs/Web/API/Notification/show_event | Notification Show Event (MDN)}
|
|
9969
|
+
*/
|
|
9970
|
+
dispatch: (event: OpenFin.NotificationEvent) => Promise<void>;
|
|
9908
9971
|
}
|
|
9909
9972
|
|
|
9910
9973
|
declare class NotificationManagerModule extends Base {
|
|
9974
|
+
/**
|
|
9975
|
+
* Initializes a NotificationManager for the current application, which allows interception of HTML5 web notifications.
|
|
9976
|
+
*
|
|
9977
|
+
* Secured by default, must be called from a WebContents with the NotificationManager.init permission.
|
|
9978
|
+
*
|
|
9979
|
+
* Only one NotificationManager can be active at a time, calls to `init` will fail otherwise.
|
|
9980
|
+
*
|
|
9981
|
+
* If a WebContents with the NotificationManager active reloads or is closed, it will be possible to create a new one.
|
|
9982
|
+
*
|
|
9983
|
+
* @example
|
|
9984
|
+
*
|
|
9985
|
+
* ```js
|
|
9986
|
+
* // From Provider context
|
|
9987
|
+
* const notificationManager = await fin.NotificationManager.init();
|
|
9988
|
+
* // NotificationManager is now active and will intercept all incoming notifications.
|
|
9989
|
+
* ```
|
|
9990
|
+
* @experimental
|
|
9991
|
+
*/
|
|
9911
9992
|
init: () => Promise<NotificationManagerInstance>;
|
|
9912
9993
|
}
|
|
9913
9994
|
|
|
@@ -9915,8 +9996,6 @@ declare type NotificationManagerPermissions = {
|
|
|
9915
9996
|
init: boolean;
|
|
9916
9997
|
};
|
|
9917
9998
|
|
|
9918
|
-
declare type NotificiationHandler = (event: WebNotificationInfo) => void;
|
|
9919
|
-
|
|
9920
9999
|
/* Excluded from this release type: NotRequested */
|
|
9921
10000
|
|
|
9922
10001
|
/**
|
|
@@ -10329,11 +10408,12 @@ declare namespace OpenFin {
|
|
|
10329
10408
|
RoutingInfo,
|
|
10330
10409
|
DownloadShelfOptions,
|
|
10331
10410
|
ViewShowAtOptions,
|
|
10411
|
+
WebNotificationProperties,
|
|
10412
|
+
WebNotificationInfo,
|
|
10332
10413
|
NotificationEvent,
|
|
10414
|
+
NotificationHandler,
|
|
10333
10415
|
NotificationManagerInstance,
|
|
10334
10416
|
NotificationManagerModule,
|
|
10335
|
-
WebNotificationInfo,
|
|
10336
|
-
WebNotificationProperties,
|
|
10337
10417
|
ExtensionInfo,
|
|
10338
10418
|
ServeRequest,
|
|
10339
10419
|
AppAssetServeRequest,
|
package/out/fdc3-api.d.ts
CHANGED
|
@@ -10225,15 +10225,99 @@ declare type NotificationEvent = {
|
|
|
10225
10225
|
notificationId: string;
|
|
10226
10226
|
};
|
|
10227
10227
|
|
|
10228
|
+
declare type NotificationHandler = (notification: WebNotificationInfo) => void;
|
|
10229
|
+
|
|
10230
|
+
/**
|
|
10231
|
+
* NotificationManagers allow all {@link https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API | HTML5 notifications} created in the application to be intercepted and dispatched.
|
|
10232
|
+
*
|
|
10233
|
+
* Please note, currently Notifications will only be intercepted if the following conditions are met:
|
|
10234
|
+
* - The source WebContents has the `notification` webAPI permission.
|
|
10235
|
+
* - The source WebContents is not a service worker.
|
|
10236
|
+
*
|
|
10237
|
+
* Service worker and push notifications are currently not supported.
|
|
10238
|
+
*
|
|
10239
|
+
* **See also** - {@link https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API | Notification API (MDN)}
|
|
10240
|
+
*
|
|
10241
|
+
* @experimental This API is subject to change in future releases.
|
|
10242
|
+
*
|
|
10243
|
+
*/
|
|
10228
10244
|
declare class NotificationManagerInstance {
|
|
10229
10245
|
#private;
|
|
10246
|
+
/**
|
|
10247
|
+
* @internal
|
|
10248
|
+
*/
|
|
10230
10249
|
constructor(wire: Transport, id: string);
|
|
10231
|
-
|
|
10250
|
+
/**
|
|
10251
|
+
* Sets the current handler for notifications. The provided function will be invoked whenever a WebContents successfully raises a notification.
|
|
10252
|
+
*
|
|
10253
|
+
* **Note**, only one handler can be used at a time, calling `setNotificationHandler` will replace any existing registered handler.
|
|
10254
|
+
*
|
|
10255
|
+
* @param handler The notification handler callback which will be invoked whenever a notification is created.
|
|
10256
|
+
*
|
|
10257
|
+
* @example
|
|
10258
|
+
*
|
|
10259
|
+
* ```typescript
|
|
10260
|
+
* const notificationManager = await fin.NotificationManager.init();
|
|
10261
|
+
* const handler = (notification) => {
|
|
10262
|
+
* console.log("Received the following notification", info);
|
|
10263
|
+
* }
|
|
10264
|
+
* await notificationManager.setNotificationHandler(handler);
|
|
10265
|
+
* ```
|
|
10266
|
+
*/
|
|
10267
|
+
setNotificationHandler: (handler: OpenFin.NotificationHandler) => Promise<void>;
|
|
10268
|
+
/**
|
|
10269
|
+
* Destroys the current NotificationManagerInstance.
|
|
10270
|
+
*
|
|
10271
|
+
* @example
|
|
10272
|
+
* ```typescript
|
|
10273
|
+
* await notificationManager.destroy();
|
|
10274
|
+
* ```
|
|
10275
|
+
*/
|
|
10232
10276
|
destroy: () => Promise<void>;
|
|
10233
|
-
|
|
10277
|
+
/**
|
|
10278
|
+
* Dispatches a Notification lifecycle event ('close' | 'click' | 'show').
|
|
10279
|
+
*
|
|
10280
|
+
* @param event Identifies the type of event to emit, and which `notificationId` to emit it for.
|
|
10281
|
+
*
|
|
10282
|
+
* @example
|
|
10283
|
+
* ```typescript
|
|
10284
|
+
* notificationManager.setNotificationHandler((notification) => {
|
|
10285
|
+
* await mockNotificationUi.showNotification(notification);
|
|
10286
|
+
* await notificationManager.dispatchNotificationEvent({
|
|
10287
|
+
* notificationId: notification.notificationId,
|
|
10288
|
+
* type: 'show
|
|
10289
|
+
* })
|
|
10290
|
+
* })
|
|
10291
|
+
* ```
|
|
10292
|
+
*
|
|
10293
|
+
* **See Also** - {@link https://developer.mozilla.org/en-US/docs/Web/API/Notification/click_event | Notification Click Event (MDN)}
|
|
10294
|
+
*
|
|
10295
|
+
* **See Also** - {@link https://developer.mozilla.org/en-US/docs/Web/API/Notification/close_event | Notification Close Event (MDN)}
|
|
10296
|
+
*
|
|
10297
|
+
* **See Also** - {@link https://developer.mozilla.org/en-US/docs/Web/API/Notification/show_event | Notification Show Event (MDN)}
|
|
10298
|
+
*/
|
|
10299
|
+
dispatch: (event: OpenFin.NotificationEvent) => Promise<void>;
|
|
10234
10300
|
}
|
|
10235
10301
|
|
|
10236
10302
|
declare class NotificationManagerModule extends Base {
|
|
10303
|
+
/**
|
|
10304
|
+
* Initializes a NotificationManager for the current application, which allows interception of HTML5 web notifications.
|
|
10305
|
+
*
|
|
10306
|
+
* Secured by default, must be called from a WebContents with the NotificationManager.init permission.
|
|
10307
|
+
*
|
|
10308
|
+
* Only one NotificationManager can be active at a time, calls to `init` will fail otherwise.
|
|
10309
|
+
*
|
|
10310
|
+
* If a WebContents with the NotificationManager active reloads or is closed, it will be possible to create a new one.
|
|
10311
|
+
*
|
|
10312
|
+
* @example
|
|
10313
|
+
*
|
|
10314
|
+
* ```js
|
|
10315
|
+
* // From Provider context
|
|
10316
|
+
* const notificationManager = await fin.NotificationManager.init();
|
|
10317
|
+
* // NotificationManager is now active and will intercept all incoming notifications.
|
|
10318
|
+
* ```
|
|
10319
|
+
* @experimental
|
|
10320
|
+
*/
|
|
10237
10321
|
init: () => Promise<NotificationManagerInstance>;
|
|
10238
10322
|
}
|
|
10239
10323
|
|
|
@@ -10241,8 +10325,6 @@ declare type NotificationManagerPermissions = {
|
|
|
10241
10325
|
init: boolean;
|
|
10242
10326
|
};
|
|
10243
10327
|
|
|
10244
|
-
declare type NotificiationHandler = (event: WebNotificationInfo) => void;
|
|
10245
|
-
|
|
10246
10328
|
/**
|
|
10247
10329
|
* @internal
|
|
10248
10330
|
*
|
|
@@ -10660,11 +10742,12 @@ declare namespace OpenFin {
|
|
|
10660
10742
|
RoutingInfo,
|
|
10661
10743
|
DownloadShelfOptions,
|
|
10662
10744
|
ViewShowAtOptions,
|
|
10745
|
+
WebNotificationProperties,
|
|
10746
|
+
WebNotificationInfo,
|
|
10663
10747
|
NotificationEvent,
|
|
10748
|
+
NotificationHandler,
|
|
10664
10749
|
NotificationManagerInstance,
|
|
10665
10750
|
NotificationManagerModule,
|
|
10666
|
-
WebNotificationInfo,
|
|
10667
|
-
WebNotificationProperties,
|
|
10668
10751
|
ExtensionInfo,
|
|
10669
10752
|
ServeRequest,
|
|
10670
10753
|
AppAssetServeRequest,
|