@openfin/core 42.100.91 → 42.100.93
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/mock-alpha.d.ts +94 -0
- package/out/mock-beta.d.ts +94 -0
- package/out/mock-public.d.ts +94 -0
- package/out/stub.d.ts +94 -0
- package/out/stub.js +406 -265
- package/package.json +1 -1
package/out/mock-alpha.d.ts
CHANGED
@@ -5570,6 +5570,7 @@ declare interface FinApi<MeType extends OpenFin_2.EntityType> {
|
|
5570
5570
|
readonly Platform: PlatformModule;
|
5571
5571
|
readonly Interop: InteropModule;
|
5572
5572
|
readonly SnapshotSource: SnapshotSourceModule;
|
5573
|
+
readonly NotificationManager: NotificationManagerModule;
|
5573
5574
|
/**
|
5574
5575
|
* Provides access to the OpenFin representation of the current code context (usually an entity
|
5575
5576
|
* such as a {@link OpenFin.View} or {@link OpenFin.Window}), as well as to the current `Interop` context.
|
@@ -9459,6 +9460,29 @@ declare type NonPropagatedWindowEvent = never;
|
|
9459
9460
|
|
9460
9461
|
/* Excluded from this release type: NotCloseRequested */
|
9461
9462
|
|
9463
|
+
declare type NotificationEvent = {
|
9464
|
+
type: 'close' | 'click' | 'show';
|
9465
|
+
notificationId: string;
|
9466
|
+
};
|
9467
|
+
|
9468
|
+
declare class NotificationManagerInstance {
|
9469
|
+
#private;
|
9470
|
+
constructor(wire: Transport, id: string);
|
9471
|
+
setNotificationHandler: (handler: NotificiationHandler) => Promise<void>;
|
9472
|
+
destroy: () => Promise<void>;
|
9473
|
+
dispatch: (event: NotificationEvent) => Promise<void>;
|
9474
|
+
}
|
9475
|
+
|
9476
|
+
declare class NotificationManagerModule extends Base {
|
9477
|
+
init: () => Promise<NotificationManagerInstance>;
|
9478
|
+
}
|
9479
|
+
|
9480
|
+
declare type NotificationManagerPermissions = {
|
9481
|
+
init: boolean;
|
9482
|
+
};
|
9483
|
+
|
9484
|
+
declare type NotificiationHandler = (event: WebNotificationInfo) => void;
|
9485
|
+
|
9462
9486
|
/* Excluded from this release type: NotRequested */
|
9463
9487
|
|
9464
9488
|
/**
|
@@ -9631,6 +9655,7 @@ declare namespace OpenFin_2 {
|
|
9631
9655
|
ApplicationPermissions,
|
9632
9656
|
LaunchExternalProcessRule,
|
9633
9657
|
SystemPermissions,
|
9658
|
+
NotificationManagerPermissions,
|
9634
9659
|
DevicePermissionName,
|
9635
9660
|
WebPermissionName,
|
9636
9661
|
WebPermission,
|
@@ -9867,6 +9892,11 @@ declare namespace OpenFin_2 {
|
|
9867
9892
|
RoutingInfo,
|
9868
9893
|
DownloadShelfOptions,
|
9869
9894
|
ViewShowAtOptions,
|
9895
|
+
NotificationEvent,
|
9896
|
+
NotificationManagerInstance,
|
9897
|
+
NotificationManagerModule,
|
9898
|
+
WebNotificationInfo,
|
9899
|
+
WebNotificationProperties,
|
9870
9900
|
ExtensionInfo,
|
9871
9901
|
ServeRequest,
|
9872
9902
|
AppAssetServeRequest,
|
@@ -10163,6 +10193,7 @@ declare type Permissions_2 = {
|
|
10163
10193
|
Clipboard?: Partial<ClipboardApiPermissions>;
|
10164
10194
|
webAPIs?: WebPermission[];
|
10165
10195
|
devices?: DeviceInfo[];
|
10196
|
+
NotificationManager?: Partial<NotificationManagerPermissions>;
|
10166
10197
|
};
|
10167
10198
|
|
10168
10199
|
declare type PermissionState_2 = 'granted' | 'denied' | 'unavailable';
|
@@ -12331,6 +12362,10 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
|
|
12331
12362
|
transitions: OpenFin_2.Transition;
|
12332
12363
|
options: OpenFin_2.TransitionOptions;
|
12333
12364
|
}>;
|
12365
|
+
'activate-window-and-focus': ApiCall<{
|
12366
|
+
winIdentity: OpenFin_2.Identity;
|
12367
|
+
focusIdentity: OpenFin_2.Identity;
|
12368
|
+
}, boolean>;
|
12334
12369
|
'get-all-frames': IdentityCall<{}, OpenFin_2.FrameInfo[]>;
|
12335
12370
|
'get-window-bounds': IdentityCall<{
|
12336
12371
|
options?: OpenFin_2.GetBoundsOptions;
|
@@ -12953,6 +12988,28 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
|
|
12953
12988
|
};
|
12954
12989
|
response: void;
|
12955
12990
|
};
|
12991
|
+
'dispatch-notification-event': {
|
12992
|
+
request: {
|
12993
|
+
notificationId: string;
|
12994
|
+
type: 'close' | 'show' | 'click';
|
12995
|
+
};
|
12996
|
+
response: void;
|
12997
|
+
};
|
12998
|
+
'init-notification-manager': {
|
12999
|
+
request: {};
|
13000
|
+
response: {
|
13001
|
+
managerId: string;
|
13002
|
+
};
|
13003
|
+
apiPath: '.init';
|
13004
|
+
secure: true;
|
13005
|
+
namespace: 'NotificationManager';
|
13006
|
+
};
|
13007
|
+
'destroy-notification-manager': {
|
13008
|
+
request: {
|
13009
|
+
managerId: string;
|
13010
|
+
};
|
13011
|
+
response: void;
|
13012
|
+
};
|
12956
13013
|
};
|
12957
13014
|
|
12958
13015
|
declare type ProtocolOffer = ClassicProtocolOffer | RTCProtocolOffer;
|
@@ -17821,6 +17878,19 @@ declare namespace WebContentsEvents {
|
|
17821
17878
|
}
|
17822
17879
|
}
|
17823
17880
|
|
17881
|
+
declare type WebNotificationInfo = {
|
17882
|
+
notificationId: string;
|
17883
|
+
properties: WebNotificationProperties;
|
17884
|
+
url: string;
|
17885
|
+
images: {
|
17886
|
+
icon?: string;
|
17887
|
+
badge?: string;
|
17888
|
+
image?: string;
|
17889
|
+
};
|
17890
|
+
};
|
17891
|
+
|
17892
|
+
declare type WebNotificationProperties = Pick<Notification, 'tag' | 'body' | 'data' | 'dir' | 'icon' | 'lang' | 'title'>;
|
17893
|
+
|
17824
17894
|
/**
|
17825
17895
|
* Defines the type of requested web APIs permission.
|
17826
17896
|
*
|
@@ -17963,6 +18033,30 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
17963
18033
|
* ```
|
17964
18034
|
*/
|
17965
18035
|
getAllFrames(): Promise<Array<OpenFin_2.FrameInfo>>;
|
18036
|
+
/**
|
18037
|
+
* Activates the current window and focuses the child entity if it exists. If this does
|
18038
|
+
* not succeed - say the child does not belong to this window, or the identity does not exist -
|
18039
|
+
* it will return false.
|
18040
|
+
*
|
18041
|
+
* @example
|
18042
|
+
* ```js
|
18043
|
+
* const win = fin.Window.wrapSync({ uuid: 'myApp', name: 'myOtherWindow' });
|
18044
|
+
*
|
18045
|
+
* win.getCurrentViews()
|
18046
|
+
* .then(([view1]) => {
|
18047
|
+
* return win.activateAndFocus(view1.identity);
|
18048
|
+
* })
|
18049
|
+
* .then(success => {
|
18050
|
+
* if (success) {
|
18051
|
+
* console.log('Window activated and child focused');
|
18052
|
+
* } else {
|
18053
|
+
* console.log('Window activation failed, focus state unchanged');
|
18054
|
+
* }
|
18055
|
+
* })
|
18056
|
+
* .catch(console.error);
|
18057
|
+
* ```
|
18058
|
+
*/
|
18059
|
+
activateAndFocus(childIdentityToFocus: OpenFin_2.Identity): Promise<boolean>;
|
17966
18060
|
/**
|
17967
18061
|
* Gets the current bounds (top, bottom, right, left, width, height) of the window.
|
17968
18062
|
*
|
package/out/mock-beta.d.ts
CHANGED
@@ -5570,6 +5570,7 @@ declare interface FinApi<MeType extends OpenFin_2.EntityType> {
|
|
5570
5570
|
readonly Platform: PlatformModule;
|
5571
5571
|
readonly Interop: InteropModule;
|
5572
5572
|
readonly SnapshotSource: SnapshotSourceModule;
|
5573
|
+
readonly NotificationManager: NotificationManagerModule;
|
5573
5574
|
/**
|
5574
5575
|
* Provides access to the OpenFin representation of the current code context (usually an entity
|
5575
5576
|
* such as a {@link OpenFin.View} or {@link OpenFin.Window}), as well as to the current `Interop` context.
|
@@ -9459,6 +9460,29 @@ declare type NonPropagatedWindowEvent = never;
|
|
9459
9460
|
|
9460
9461
|
/* Excluded from this release type: NotCloseRequested */
|
9461
9462
|
|
9463
|
+
declare type NotificationEvent = {
|
9464
|
+
type: 'close' | 'click' | 'show';
|
9465
|
+
notificationId: string;
|
9466
|
+
};
|
9467
|
+
|
9468
|
+
declare class NotificationManagerInstance {
|
9469
|
+
#private;
|
9470
|
+
constructor(wire: Transport, id: string);
|
9471
|
+
setNotificationHandler: (handler: NotificiationHandler) => Promise<void>;
|
9472
|
+
destroy: () => Promise<void>;
|
9473
|
+
dispatch: (event: NotificationEvent) => Promise<void>;
|
9474
|
+
}
|
9475
|
+
|
9476
|
+
declare class NotificationManagerModule extends Base {
|
9477
|
+
init: () => Promise<NotificationManagerInstance>;
|
9478
|
+
}
|
9479
|
+
|
9480
|
+
declare type NotificationManagerPermissions = {
|
9481
|
+
init: boolean;
|
9482
|
+
};
|
9483
|
+
|
9484
|
+
declare type NotificiationHandler = (event: WebNotificationInfo) => void;
|
9485
|
+
|
9462
9486
|
/* Excluded from this release type: NotRequested */
|
9463
9487
|
|
9464
9488
|
/**
|
@@ -9631,6 +9655,7 @@ declare namespace OpenFin_2 {
|
|
9631
9655
|
ApplicationPermissions,
|
9632
9656
|
LaunchExternalProcessRule,
|
9633
9657
|
SystemPermissions,
|
9658
|
+
NotificationManagerPermissions,
|
9634
9659
|
DevicePermissionName,
|
9635
9660
|
WebPermissionName,
|
9636
9661
|
WebPermission,
|
@@ -9867,6 +9892,11 @@ declare namespace OpenFin_2 {
|
|
9867
9892
|
RoutingInfo,
|
9868
9893
|
DownloadShelfOptions,
|
9869
9894
|
ViewShowAtOptions,
|
9895
|
+
NotificationEvent,
|
9896
|
+
NotificationManagerInstance,
|
9897
|
+
NotificationManagerModule,
|
9898
|
+
WebNotificationInfo,
|
9899
|
+
WebNotificationProperties,
|
9870
9900
|
ExtensionInfo,
|
9871
9901
|
ServeRequest,
|
9872
9902
|
AppAssetServeRequest,
|
@@ -10163,6 +10193,7 @@ declare type Permissions_2 = {
|
|
10163
10193
|
Clipboard?: Partial<ClipboardApiPermissions>;
|
10164
10194
|
webAPIs?: WebPermission[];
|
10165
10195
|
devices?: DeviceInfo[];
|
10196
|
+
NotificationManager?: Partial<NotificationManagerPermissions>;
|
10166
10197
|
};
|
10167
10198
|
|
10168
10199
|
declare type PermissionState_2 = 'granted' | 'denied' | 'unavailable';
|
@@ -12331,6 +12362,10 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
|
|
12331
12362
|
transitions: OpenFin_2.Transition;
|
12332
12363
|
options: OpenFin_2.TransitionOptions;
|
12333
12364
|
}>;
|
12365
|
+
'activate-window-and-focus': ApiCall<{
|
12366
|
+
winIdentity: OpenFin_2.Identity;
|
12367
|
+
focusIdentity: OpenFin_2.Identity;
|
12368
|
+
}, boolean>;
|
12334
12369
|
'get-all-frames': IdentityCall<{}, OpenFin_2.FrameInfo[]>;
|
12335
12370
|
'get-window-bounds': IdentityCall<{
|
12336
12371
|
options?: OpenFin_2.GetBoundsOptions;
|
@@ -12953,6 +12988,28 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
|
|
12953
12988
|
};
|
12954
12989
|
response: void;
|
12955
12990
|
};
|
12991
|
+
'dispatch-notification-event': {
|
12992
|
+
request: {
|
12993
|
+
notificationId: string;
|
12994
|
+
type: 'close' | 'show' | 'click';
|
12995
|
+
};
|
12996
|
+
response: void;
|
12997
|
+
};
|
12998
|
+
'init-notification-manager': {
|
12999
|
+
request: {};
|
13000
|
+
response: {
|
13001
|
+
managerId: string;
|
13002
|
+
};
|
13003
|
+
apiPath: '.init';
|
13004
|
+
secure: true;
|
13005
|
+
namespace: 'NotificationManager';
|
13006
|
+
};
|
13007
|
+
'destroy-notification-manager': {
|
13008
|
+
request: {
|
13009
|
+
managerId: string;
|
13010
|
+
};
|
13011
|
+
response: void;
|
13012
|
+
};
|
12956
13013
|
};
|
12957
13014
|
|
12958
13015
|
declare type ProtocolOffer = ClassicProtocolOffer | RTCProtocolOffer;
|
@@ -17821,6 +17878,19 @@ declare namespace WebContentsEvents {
|
|
17821
17878
|
}
|
17822
17879
|
}
|
17823
17880
|
|
17881
|
+
declare type WebNotificationInfo = {
|
17882
|
+
notificationId: string;
|
17883
|
+
properties: WebNotificationProperties;
|
17884
|
+
url: string;
|
17885
|
+
images: {
|
17886
|
+
icon?: string;
|
17887
|
+
badge?: string;
|
17888
|
+
image?: string;
|
17889
|
+
};
|
17890
|
+
};
|
17891
|
+
|
17892
|
+
declare type WebNotificationProperties = Pick<Notification, 'tag' | 'body' | 'data' | 'dir' | 'icon' | 'lang' | 'title'>;
|
17893
|
+
|
17824
17894
|
/**
|
17825
17895
|
* Defines the type of requested web APIs permission.
|
17826
17896
|
*
|
@@ -17963,6 +18033,30 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
17963
18033
|
* ```
|
17964
18034
|
*/
|
17965
18035
|
getAllFrames(): Promise<Array<OpenFin_2.FrameInfo>>;
|
18036
|
+
/**
|
18037
|
+
* Activates the current window and focuses the child entity if it exists. If this does
|
18038
|
+
* not succeed - say the child does not belong to this window, or the identity does not exist -
|
18039
|
+
* it will return false.
|
18040
|
+
*
|
18041
|
+
* @example
|
18042
|
+
* ```js
|
18043
|
+
* const win = fin.Window.wrapSync({ uuid: 'myApp', name: 'myOtherWindow' });
|
18044
|
+
*
|
18045
|
+
* win.getCurrentViews()
|
18046
|
+
* .then(([view1]) => {
|
18047
|
+
* return win.activateAndFocus(view1.identity);
|
18048
|
+
* })
|
18049
|
+
* .then(success => {
|
18050
|
+
* if (success) {
|
18051
|
+
* console.log('Window activated and child focused');
|
18052
|
+
* } else {
|
18053
|
+
* console.log('Window activation failed, focus state unchanged');
|
18054
|
+
* }
|
18055
|
+
* })
|
18056
|
+
* .catch(console.error);
|
18057
|
+
* ```
|
18058
|
+
*/
|
18059
|
+
activateAndFocus(childIdentityToFocus: OpenFin_2.Identity): Promise<boolean>;
|
17966
18060
|
/**
|
17967
18061
|
* Gets the current bounds (top, bottom, right, left, width, height) of the window.
|
17968
18062
|
*
|
package/out/mock-public.d.ts
CHANGED
@@ -5570,6 +5570,7 @@ declare interface FinApi<MeType extends OpenFin_2.EntityType> {
|
|
5570
5570
|
readonly Platform: PlatformModule;
|
5571
5571
|
readonly Interop: InteropModule;
|
5572
5572
|
readonly SnapshotSource: SnapshotSourceModule;
|
5573
|
+
readonly NotificationManager: NotificationManagerModule;
|
5573
5574
|
/**
|
5574
5575
|
* Provides access to the OpenFin representation of the current code context (usually an entity
|
5575
5576
|
* such as a {@link OpenFin.View} or {@link OpenFin.Window}), as well as to the current `Interop` context.
|
@@ -9459,6 +9460,29 @@ declare type NonPropagatedWindowEvent = never;
|
|
9459
9460
|
|
9460
9461
|
/* Excluded from this release type: NotCloseRequested */
|
9461
9462
|
|
9463
|
+
declare type NotificationEvent = {
|
9464
|
+
type: 'close' | 'click' | 'show';
|
9465
|
+
notificationId: string;
|
9466
|
+
};
|
9467
|
+
|
9468
|
+
declare class NotificationManagerInstance {
|
9469
|
+
#private;
|
9470
|
+
constructor(wire: Transport, id: string);
|
9471
|
+
setNotificationHandler: (handler: NotificiationHandler) => Promise<void>;
|
9472
|
+
destroy: () => Promise<void>;
|
9473
|
+
dispatch: (event: NotificationEvent) => Promise<void>;
|
9474
|
+
}
|
9475
|
+
|
9476
|
+
declare class NotificationManagerModule extends Base {
|
9477
|
+
init: () => Promise<NotificationManagerInstance>;
|
9478
|
+
}
|
9479
|
+
|
9480
|
+
declare type NotificationManagerPermissions = {
|
9481
|
+
init: boolean;
|
9482
|
+
};
|
9483
|
+
|
9484
|
+
declare type NotificiationHandler = (event: WebNotificationInfo) => void;
|
9485
|
+
|
9462
9486
|
/* Excluded from this release type: NotRequested */
|
9463
9487
|
|
9464
9488
|
/**
|
@@ -9631,6 +9655,7 @@ declare namespace OpenFin_2 {
|
|
9631
9655
|
ApplicationPermissions,
|
9632
9656
|
LaunchExternalProcessRule,
|
9633
9657
|
SystemPermissions,
|
9658
|
+
NotificationManagerPermissions,
|
9634
9659
|
DevicePermissionName,
|
9635
9660
|
WebPermissionName,
|
9636
9661
|
WebPermission,
|
@@ -9867,6 +9892,11 @@ declare namespace OpenFin_2 {
|
|
9867
9892
|
RoutingInfo,
|
9868
9893
|
DownloadShelfOptions,
|
9869
9894
|
ViewShowAtOptions,
|
9895
|
+
NotificationEvent,
|
9896
|
+
NotificationManagerInstance,
|
9897
|
+
NotificationManagerModule,
|
9898
|
+
WebNotificationInfo,
|
9899
|
+
WebNotificationProperties,
|
9870
9900
|
ExtensionInfo,
|
9871
9901
|
ServeRequest,
|
9872
9902
|
AppAssetServeRequest,
|
@@ -10163,6 +10193,7 @@ declare type Permissions_2 = {
|
|
10163
10193
|
Clipboard?: Partial<ClipboardApiPermissions>;
|
10164
10194
|
webAPIs?: WebPermission[];
|
10165
10195
|
devices?: DeviceInfo[];
|
10196
|
+
NotificationManager?: Partial<NotificationManagerPermissions>;
|
10166
10197
|
};
|
10167
10198
|
|
10168
10199
|
declare type PermissionState_2 = 'granted' | 'denied' | 'unavailable';
|
@@ -12331,6 +12362,10 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
|
|
12331
12362
|
transitions: OpenFin_2.Transition;
|
12332
12363
|
options: OpenFin_2.TransitionOptions;
|
12333
12364
|
}>;
|
12365
|
+
'activate-window-and-focus': ApiCall<{
|
12366
|
+
winIdentity: OpenFin_2.Identity;
|
12367
|
+
focusIdentity: OpenFin_2.Identity;
|
12368
|
+
}, boolean>;
|
12334
12369
|
'get-all-frames': IdentityCall<{}, OpenFin_2.FrameInfo[]>;
|
12335
12370
|
'get-window-bounds': IdentityCall<{
|
12336
12371
|
options?: OpenFin_2.GetBoundsOptions;
|
@@ -12953,6 +12988,28 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
|
|
12953
12988
|
};
|
12954
12989
|
response: void;
|
12955
12990
|
};
|
12991
|
+
'dispatch-notification-event': {
|
12992
|
+
request: {
|
12993
|
+
notificationId: string;
|
12994
|
+
type: 'close' | 'show' | 'click';
|
12995
|
+
};
|
12996
|
+
response: void;
|
12997
|
+
};
|
12998
|
+
'init-notification-manager': {
|
12999
|
+
request: {};
|
13000
|
+
response: {
|
13001
|
+
managerId: string;
|
13002
|
+
};
|
13003
|
+
apiPath: '.init';
|
13004
|
+
secure: true;
|
13005
|
+
namespace: 'NotificationManager';
|
13006
|
+
};
|
13007
|
+
'destroy-notification-manager': {
|
13008
|
+
request: {
|
13009
|
+
managerId: string;
|
13010
|
+
};
|
13011
|
+
response: void;
|
13012
|
+
};
|
12956
13013
|
};
|
12957
13014
|
|
12958
13015
|
declare type ProtocolOffer = ClassicProtocolOffer | RTCProtocolOffer;
|
@@ -17821,6 +17878,19 @@ declare namespace WebContentsEvents {
|
|
17821
17878
|
}
|
17822
17879
|
}
|
17823
17880
|
|
17881
|
+
declare type WebNotificationInfo = {
|
17882
|
+
notificationId: string;
|
17883
|
+
properties: WebNotificationProperties;
|
17884
|
+
url: string;
|
17885
|
+
images: {
|
17886
|
+
icon?: string;
|
17887
|
+
badge?: string;
|
17888
|
+
image?: string;
|
17889
|
+
};
|
17890
|
+
};
|
17891
|
+
|
17892
|
+
declare type WebNotificationProperties = Pick<Notification, 'tag' | 'body' | 'data' | 'dir' | 'icon' | 'lang' | 'title'>;
|
17893
|
+
|
17824
17894
|
/**
|
17825
17895
|
* Defines the type of requested web APIs permission.
|
17826
17896
|
*
|
@@ -17963,6 +18033,30 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
17963
18033
|
* ```
|
17964
18034
|
*/
|
17965
18035
|
getAllFrames(): Promise<Array<OpenFin_2.FrameInfo>>;
|
18036
|
+
/**
|
18037
|
+
* Activates the current window and focuses the child entity if it exists. If this does
|
18038
|
+
* not succeed - say the child does not belong to this window, or the identity does not exist -
|
18039
|
+
* it will return false.
|
18040
|
+
*
|
18041
|
+
* @example
|
18042
|
+
* ```js
|
18043
|
+
* const win = fin.Window.wrapSync({ uuid: 'myApp', name: 'myOtherWindow' });
|
18044
|
+
*
|
18045
|
+
* win.getCurrentViews()
|
18046
|
+
* .then(([view1]) => {
|
18047
|
+
* return win.activateAndFocus(view1.identity);
|
18048
|
+
* })
|
18049
|
+
* .then(success => {
|
18050
|
+
* if (success) {
|
18051
|
+
* console.log('Window activated and child focused');
|
18052
|
+
* } else {
|
18053
|
+
* console.log('Window activation failed, focus state unchanged');
|
18054
|
+
* }
|
18055
|
+
* })
|
18056
|
+
* .catch(console.error);
|
18057
|
+
* ```
|
18058
|
+
*/
|
18059
|
+
activateAndFocus(childIdentityToFocus: OpenFin_2.Identity): Promise<boolean>;
|
17966
18060
|
/**
|
17967
18061
|
* Gets the current bounds (top, bottom, right, left, width, height) of the window.
|
17968
18062
|
*
|
package/out/stub.d.ts
CHANGED
@@ -5655,6 +5655,7 @@ declare interface FinApi<MeType extends OpenFin_2.EntityType> {
|
|
5655
5655
|
readonly Platform: PlatformModule;
|
5656
5656
|
readonly Interop: InteropModule;
|
5657
5657
|
readonly SnapshotSource: SnapshotSourceModule;
|
5658
|
+
readonly NotificationManager: NotificationManagerModule;
|
5658
5659
|
/**
|
5659
5660
|
* Provides access to the OpenFin representation of the current code context (usually an entity
|
5660
5661
|
* such as a {@link OpenFin.View} or {@link OpenFin.Window}), as well as to the current `Interop` context.
|
@@ -9772,6 +9773,29 @@ declare type NonPropagatedWindowEvent = never;
|
|
9772
9773
|
*/
|
9773
9774
|
declare type NotCloseRequested<EventType extends string> = Exclude<EventType, 'close-requested'>;
|
9774
9775
|
|
9776
|
+
declare type NotificationEvent = {
|
9777
|
+
type: 'close' | 'click' | 'show';
|
9778
|
+
notificationId: string;
|
9779
|
+
};
|
9780
|
+
|
9781
|
+
declare class NotificationManagerInstance {
|
9782
|
+
#private;
|
9783
|
+
constructor(wire: Transport, id: string);
|
9784
|
+
setNotificationHandler: (handler: NotificiationHandler) => Promise<void>;
|
9785
|
+
destroy: () => Promise<void>;
|
9786
|
+
dispatch: (event: NotificationEvent) => Promise<void>;
|
9787
|
+
}
|
9788
|
+
|
9789
|
+
declare class NotificationManagerModule extends Base {
|
9790
|
+
init: () => Promise<NotificationManagerInstance>;
|
9791
|
+
}
|
9792
|
+
|
9793
|
+
declare type NotificationManagerPermissions = {
|
9794
|
+
init: boolean;
|
9795
|
+
};
|
9796
|
+
|
9797
|
+
declare type NotificiationHandler = (event: WebNotificationInfo) => void;
|
9798
|
+
|
9775
9799
|
/**
|
9776
9800
|
* @internal
|
9777
9801
|
*
|
@@ -9949,6 +9973,7 @@ declare namespace OpenFin_2 {
|
|
9949
9973
|
ApplicationPermissions,
|
9950
9974
|
LaunchExternalProcessRule,
|
9951
9975
|
SystemPermissions,
|
9976
|
+
NotificationManagerPermissions,
|
9952
9977
|
DevicePermissionName,
|
9953
9978
|
WebPermissionName,
|
9954
9979
|
WebPermission,
|
@@ -10185,6 +10210,11 @@ declare namespace OpenFin_2 {
|
|
10185
10210
|
RoutingInfo,
|
10186
10211
|
DownloadShelfOptions,
|
10187
10212
|
ViewShowAtOptions,
|
10213
|
+
NotificationEvent,
|
10214
|
+
NotificationManagerInstance,
|
10215
|
+
NotificationManagerModule,
|
10216
|
+
WebNotificationInfo,
|
10217
|
+
WebNotificationProperties,
|
10188
10218
|
ExtensionInfo,
|
10189
10219
|
ServeRequest,
|
10190
10220
|
AppAssetServeRequest,
|
@@ -10481,6 +10511,7 @@ declare type Permissions_2 = {
|
|
10481
10511
|
Clipboard?: Partial<ClipboardApiPermissions>;
|
10482
10512
|
webAPIs?: WebPermission[];
|
10483
10513
|
devices?: DeviceInfo[];
|
10514
|
+
NotificationManager?: Partial<NotificationManagerPermissions>;
|
10484
10515
|
};
|
10485
10516
|
|
10486
10517
|
declare type PermissionState_2 = 'granted' | 'denied' | 'unavailable';
|
@@ -12732,6 +12763,10 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
|
|
12732
12763
|
transitions: OpenFin_2.Transition;
|
12733
12764
|
options: OpenFin_2.TransitionOptions;
|
12734
12765
|
}>;
|
12766
|
+
'activate-window-and-focus': ApiCall<{
|
12767
|
+
winIdentity: OpenFin_2.Identity;
|
12768
|
+
focusIdentity: OpenFin_2.Identity;
|
12769
|
+
}, boolean>;
|
12735
12770
|
'get-all-frames': IdentityCall<{}, OpenFin_2.FrameInfo[]>;
|
12736
12771
|
'get-window-bounds': IdentityCall<{
|
12737
12772
|
options?: OpenFin_2.GetBoundsOptions;
|
@@ -13354,6 +13389,28 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
|
|
13354
13389
|
};
|
13355
13390
|
response: void;
|
13356
13391
|
};
|
13392
|
+
'dispatch-notification-event': {
|
13393
|
+
request: {
|
13394
|
+
notificationId: string;
|
13395
|
+
type: 'close' | 'show' | 'click';
|
13396
|
+
};
|
13397
|
+
response: void;
|
13398
|
+
};
|
13399
|
+
'init-notification-manager': {
|
13400
|
+
request: {};
|
13401
|
+
response: {
|
13402
|
+
managerId: string;
|
13403
|
+
};
|
13404
|
+
apiPath: '.init';
|
13405
|
+
secure: true;
|
13406
|
+
namespace: 'NotificationManager';
|
13407
|
+
};
|
13408
|
+
'destroy-notification-manager': {
|
13409
|
+
request: {
|
13410
|
+
managerId: string;
|
13411
|
+
};
|
13412
|
+
response: void;
|
13413
|
+
};
|
13357
13414
|
};
|
13358
13415
|
|
13359
13416
|
declare type ProtocolOffer = ClassicProtocolOffer | RTCProtocolOffer;
|
@@ -18272,6 +18329,19 @@ declare namespace WebContentsEvents {
|
|
18272
18329
|
}
|
18273
18330
|
}
|
18274
18331
|
|
18332
|
+
declare type WebNotificationInfo = {
|
18333
|
+
notificationId: string;
|
18334
|
+
properties: WebNotificationProperties;
|
18335
|
+
url: string;
|
18336
|
+
images: {
|
18337
|
+
icon?: string;
|
18338
|
+
badge?: string;
|
18339
|
+
image?: string;
|
18340
|
+
};
|
18341
|
+
};
|
18342
|
+
|
18343
|
+
declare type WebNotificationProperties = Pick<Notification, 'tag' | 'body' | 'data' | 'dir' | 'icon' | 'lang' | 'title'>;
|
18344
|
+
|
18275
18345
|
/**
|
18276
18346
|
* Defines the type of requested web APIs permission.
|
18277
18347
|
*
|
@@ -18417,6 +18487,30 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
18417
18487
|
* ```
|
18418
18488
|
*/
|
18419
18489
|
getAllFrames(): Promise<Array<OpenFin_2.FrameInfo>>;
|
18490
|
+
/**
|
18491
|
+
* Activates the current window and focuses the child entity if it exists. If this does
|
18492
|
+
* not succeed - say the child does not belong to this window, or the identity does not exist -
|
18493
|
+
* it will return false.
|
18494
|
+
*
|
18495
|
+
* @example
|
18496
|
+
* ```js
|
18497
|
+
* const win = fin.Window.wrapSync({ uuid: 'myApp', name: 'myOtherWindow' });
|
18498
|
+
*
|
18499
|
+
* win.getCurrentViews()
|
18500
|
+
* .then(([view1]) => {
|
18501
|
+
* return win.activateAndFocus(view1.identity);
|
18502
|
+
* })
|
18503
|
+
* .then(success => {
|
18504
|
+
* if (success) {
|
18505
|
+
* console.log('Window activated and child focused');
|
18506
|
+
* } else {
|
18507
|
+
* console.log('Window activation failed, focus state unchanged');
|
18508
|
+
* }
|
18509
|
+
* })
|
18510
|
+
* .catch(console.error);
|
18511
|
+
* ```
|
18512
|
+
*/
|
18513
|
+
activateAndFocus(childIdentityToFocus: OpenFin_2.Identity): Promise<boolean>;
|
18420
18514
|
/**
|
18421
18515
|
* Gets the current bounds (top, bottom, right, left, width, height) of the window.
|
18422
18516
|
*
|