@interopio/desktop 6.2.1 → 6.3.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/changelog.md +11 -0
- package/desktop.d.ts +216 -5
- package/dist/desktop.browser.js +1198 -1017
- package/dist/desktop.browser.js.map +1 -1
- package/dist/desktop.browser.min.js +1 -1
- package/dist/desktop.browser.min.js.map +1 -1
- package/dist/desktop.es.js +1198 -1017
- package/dist/desktop.es.js.map +1 -1
- package/dist/desktop.umd.js +1198 -1017
- package/dist/desktop.umd.js.map +1 -1
- package/dist/desktop.umd.min.js +1 -1
- package/dist/desktop.umd.min.js.map +1 -1
- package/package.json +4 -4
package/changelog.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
6.3.1
|
|
2
|
+
- chore: update core to 6.2.1 (was 6.1.0)
|
|
3
|
+
6.3.0
|
|
4
|
+
- feat: notifications - add support for snooze
|
|
5
|
+
- feat: windows - add showPopup method to the group object
|
|
6
|
+
- feat: windows - two new methods - create and close group
|
|
7
|
+
- feat: appManager - introduce new method - instance.startedBy
|
|
8
|
+
- feat: channels - introduce new methods - restrict, restrictAll, getRestrictions
|
|
9
|
+
- chore: prefs - fix typings - getAll
|
|
10
|
+
6.2.2
|
|
11
|
+
- feat: notifications - click method now accepts a third optional argument - options
|
|
1
12
|
6.2.1
|
|
2
13
|
- fix: appManger - myApplication returns undefined in webGroups and workspaces
|
|
3
14
|
6.2.0
|
package/desktop.d.ts
CHANGED
|
@@ -1513,6 +1513,12 @@ export declare namespace IOConnectDesktop {
|
|
|
1513
1513
|
*/
|
|
1514
1514
|
getWindow(): Promise<Windows.IOConnectWindow>;
|
|
1515
1515
|
|
|
1516
|
+
/**
|
|
1517
|
+
* Retrieves information about how the current app instance was started, and about the identity of the initiator.
|
|
1518
|
+
* @since io.Connect Desktop 9.3
|
|
1519
|
+
*/
|
|
1520
|
+
startedBy(): Promise<StartedByInfo>;
|
|
1521
|
+
|
|
1516
1522
|
/**
|
|
1517
1523
|
* Notifies when the Interop library is ready to be used.
|
|
1518
1524
|
* @param callback Callback function for handling the event.
|
|
@@ -1533,6 +1539,26 @@ export declare namespace IOConnectDesktop {
|
|
|
1533
1539
|
onStopped(callback: (instance: Instance) => any): UnsubscribeFunction;
|
|
1534
1540
|
}
|
|
1535
1541
|
|
|
1542
|
+
/**
|
|
1543
|
+
* Describes how the current app instance was started and provides details about the app that started it.
|
|
1544
|
+
*/
|
|
1545
|
+
export interface StartedByInfo {
|
|
1546
|
+
/**
|
|
1547
|
+
* Indicates how the current app instance was started. Apps can be started by other apps, by a raised Intent, or can be auto started by the system.
|
|
1548
|
+
*/
|
|
1549
|
+
startedBy: "application" | "intent" | "autoStart";
|
|
1550
|
+
|
|
1551
|
+
/**
|
|
1552
|
+
* Name of the app that started the current app instance.
|
|
1553
|
+
*/
|
|
1554
|
+
applicationName: string;
|
|
1555
|
+
|
|
1556
|
+
/**
|
|
1557
|
+
* ID of the app instance that started the current app instance.
|
|
1558
|
+
*/
|
|
1559
|
+
instanceID: string;
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1536
1562
|
/**
|
|
1537
1563
|
* @ignore
|
|
1538
1564
|
*/
|
|
@@ -1588,6 +1614,16 @@ export declare namespace IOConnectDesktop {
|
|
|
1588
1614
|
* @default false
|
|
1589
1615
|
*/
|
|
1590
1616
|
ignoreSavedLayout?: boolean;
|
|
1617
|
+
|
|
1618
|
+
/**
|
|
1619
|
+
* Key/value pairs that will be merged with the `process.env` object when spawning a new process for an executable app from the Node.js environment.
|
|
1620
|
+
*/
|
|
1621
|
+
env?: Record<string, (string)>;
|
|
1622
|
+
|
|
1623
|
+
/**
|
|
1624
|
+
* Optional parameters that will be passed to the executable app that is to be started. The value will be used as is and no validation will be performed on it.
|
|
1625
|
+
*/
|
|
1626
|
+
parameters?: string;
|
|
1591
1627
|
}
|
|
1592
1628
|
|
|
1593
1629
|
/**
|
|
@@ -2955,6 +2991,11 @@ export declare namespace IOConnectDesktop {
|
|
|
2955
2991
|
* Base URL for files loaded by a data URL. Must end with a trailing path separator. This property is necessary only when the loaded URL is a data URL.
|
|
2956
2992
|
*/
|
|
2957
2993
|
baseURLForDataURL?: string;
|
|
2994
|
+
|
|
2995
|
+
/**
|
|
2996
|
+
* Query string that will be appended to the URL when starting the app. If the string doesn't start with a `?`, one will be prepended to it. Note that the query string must be URL encoded.
|
|
2997
|
+
*/
|
|
2998
|
+
queryString?: string;
|
|
2958
2999
|
}
|
|
2959
3000
|
|
|
2960
3001
|
/**
|
|
@@ -4133,6 +4174,66 @@ export declare namespace IOConnectDesktop {
|
|
|
4133
4174
|
showDialog?: boolean
|
|
4134
4175
|
}
|
|
4135
4176
|
|
|
4177
|
+
/**
|
|
4178
|
+
* Options for creating window groups.
|
|
4179
|
+
*/
|
|
4180
|
+
export interface CreateGroupsOptions {
|
|
4181
|
+
/**
|
|
4182
|
+
* List of window groups to be created.
|
|
4183
|
+
*/
|
|
4184
|
+
groups: GroupDefinition[];
|
|
4185
|
+
/**
|
|
4186
|
+
* Context for the created window groups.
|
|
4187
|
+
*/
|
|
4188
|
+
context?: unknown;
|
|
4189
|
+
}
|
|
4190
|
+
|
|
4191
|
+
/**
|
|
4192
|
+
* Describes a window group that will be created.
|
|
4193
|
+
*/
|
|
4194
|
+
export interface GroupDefinition {
|
|
4195
|
+
/**
|
|
4196
|
+
* Title for the created window group.
|
|
4197
|
+
*/
|
|
4198
|
+
title?: string;
|
|
4199
|
+
/**
|
|
4200
|
+
* State for the created window group.
|
|
4201
|
+
*/
|
|
4202
|
+
state?: string;
|
|
4203
|
+
/**
|
|
4204
|
+
* List of window frames that will be part of the created window group.
|
|
4205
|
+
*/
|
|
4206
|
+
frames: FrameDefinition[];
|
|
4207
|
+
}
|
|
4208
|
+
|
|
4209
|
+
/**
|
|
4210
|
+
* Describes a window frame that will be part of a created window group.
|
|
4211
|
+
*/
|
|
4212
|
+
export interface FrameDefinition {
|
|
4213
|
+
/**
|
|
4214
|
+
* Bounds for the window frame.
|
|
4215
|
+
*/
|
|
4216
|
+
bounds: Bounds;
|
|
4217
|
+
/**
|
|
4218
|
+
* Mode for the window frame.
|
|
4219
|
+
*/
|
|
4220
|
+
mode?: WindowMode;
|
|
4221
|
+
/**
|
|
4222
|
+
* List of objects containing the names of the apps to be started and loaded in the window frames of the created window group, as well as additional app settings.
|
|
4223
|
+
*/
|
|
4224
|
+
applications: CreateGroupApplicationOptions[];
|
|
4225
|
+
}
|
|
4226
|
+
|
|
4227
|
+
/**
|
|
4228
|
+
* Options for the app that will be started and loaded in a window frame of a created window group.
|
|
4229
|
+
*/
|
|
4230
|
+
export interface CreateGroupApplicationOptions extends IOConnectDesktop.Windows.WindowSettings {
|
|
4231
|
+
/**
|
|
4232
|
+
* App name as specified in its definition.
|
|
4233
|
+
*/
|
|
4234
|
+
name: string;
|
|
4235
|
+
}
|
|
4236
|
+
|
|
4136
4237
|
/**
|
|
4137
4238
|
* API for managing window groups.
|
|
4138
4239
|
*/
|
|
@@ -4142,6 +4243,21 @@ export declare namespace IOConnectDesktop {
|
|
|
4142
4243
|
*/
|
|
4143
4244
|
my: Group;
|
|
4144
4245
|
|
|
4246
|
+
/**
|
|
4247
|
+
* Creates window groups.
|
|
4248
|
+
* @param options Options for creating window groups.
|
|
4249
|
+
* @since io.Connect Desktop 9.3
|
|
4250
|
+
*/
|
|
4251
|
+
create(options: CreateGroupsOptions): Promise<Group[]>;
|
|
4252
|
+
|
|
4253
|
+
/**
|
|
4254
|
+
* Closes a window group.
|
|
4255
|
+
* @param group The `Group` object or the ID of the window group to be closed.
|
|
4256
|
+
* @param options Options for closing the group that can be used to prevent closing the group and control whether to show a confirmation dialog before closing it.
|
|
4257
|
+
* @since io.Connect Desktop 9.3
|
|
4258
|
+
*/
|
|
4259
|
+
close(group: Group | string, options: CloseOptions): Promise<void>;
|
|
4260
|
+
|
|
4145
4261
|
/**
|
|
4146
4262
|
* Lists all window groups.
|
|
4147
4263
|
* @param success Callback function for handling the successfully returned result.
|
|
@@ -4162,6 +4278,12 @@ export declare namespace IOConnectDesktop {
|
|
|
4162
4278
|
*/
|
|
4163
4279
|
waitForGroup(groupId: string): Promise<IOConnectDesktop.Windows.Group>;
|
|
4164
4280
|
|
|
4281
|
+
/**
|
|
4282
|
+
* Retrieves the current window group.
|
|
4283
|
+
* @since io.Connect Desktop 9.3
|
|
4284
|
+
*/
|
|
4285
|
+
getMyGroup(): Promise<IOConnectDesktop.Windows.Group>;
|
|
4286
|
+
|
|
4165
4287
|
/**
|
|
4166
4288
|
* Hibernates a window group.
|
|
4167
4289
|
* @param groupId ID of the window group to hibernate.
|
|
@@ -4492,7 +4614,6 @@ export declare namespace IOConnectDesktop {
|
|
|
4492
4614
|
*/
|
|
4493
4615
|
capture(options?: CaptureOptions): Promise<string>;
|
|
4494
4616
|
|
|
4495
|
-
|
|
4496
4617
|
/**
|
|
4497
4618
|
* Shows a previously hidden window group.
|
|
4498
4619
|
* @param activate Flag indicating whether to activate the group and focus the last focused app window.
|
|
@@ -4504,6 +4625,20 @@ export declare namespace IOConnectDesktop {
|
|
|
4504
4625
|
*/
|
|
4505
4626
|
hide(): Promise<void>;
|
|
4506
4627
|
|
|
4628
|
+
/**
|
|
4629
|
+
* Close a window group.
|
|
4630
|
+
* @since 9.3.0
|
|
4631
|
+
* @param options Options for closing the group that can be used to prevent closing the window and control whether to show a confirmation dialog before closing it.
|
|
4632
|
+
*/
|
|
4633
|
+
close(options: CloseOptions): Promise<void>;
|
|
4634
|
+
|
|
4635
|
+
/**
|
|
4636
|
+
* Creates a popup window.
|
|
4637
|
+
* @param config Options for creating a popup window.
|
|
4638
|
+
* @since io.Connect Desktop 9.3
|
|
4639
|
+
*/
|
|
4640
|
+
showPopup(config: PopupOptions): Promise<void>;
|
|
4641
|
+
|
|
4507
4642
|
/**
|
|
4508
4643
|
* Notifies when the visibility of the window group header is changed.
|
|
4509
4644
|
* @param callback Callback function for handling the event.
|
|
@@ -5841,6 +5976,27 @@ export declare namespace IOConnectDesktop {
|
|
|
5841
5976
|
*/
|
|
5842
5977
|
getWindowsWithChannels(filter?: WindowWithChannelFilter): Promise<WindowOnChannelInfo[]>;
|
|
5843
5978
|
|
|
5979
|
+
/**
|
|
5980
|
+
* Prevents or allows the current or another window to publish or subscribe to a specific Channel.
|
|
5981
|
+
* @param restrictions Restrictions for publishing or subscribing to a specific Channel.
|
|
5982
|
+
* @since io.Connect Desktop 9.3
|
|
5983
|
+
*/
|
|
5984
|
+
restrict(restrictions: ChannelRestrictions): Promise<void>;
|
|
5985
|
+
|
|
5986
|
+
/**
|
|
5987
|
+
* Prevents or allows the current or another window to publish or subscribe to all Channels.
|
|
5988
|
+
* @param restrictions Restrictions for publishing or subscribing to all Channels.
|
|
5989
|
+
* @since io.Connect Desktop 9.3
|
|
5990
|
+
*/
|
|
5991
|
+
restrictAll(restrictions: RestrictionsConfig): Promise<void>;
|
|
5992
|
+
|
|
5993
|
+
/**
|
|
5994
|
+
* Retrieves the restrictions applied to the current window for publishing or subscribing to Channels. Pass a window ID to retrieve the restrictions for the specified window.
|
|
5995
|
+
* @param windowId ID of the window for which to retrieve the applied restrictions for publishing or subscribing to Channels.
|
|
5996
|
+
* @since io.Connect Desktop 9.3
|
|
5997
|
+
*/
|
|
5998
|
+
getRestrictions(windowId?: string): Promise<Restrictions>;
|
|
5999
|
+
|
|
5844
6000
|
/**
|
|
5845
6001
|
* Notifies when a Channel is changed.
|
|
5846
6002
|
* @param callback Callback function for handling the event.
|
|
@@ -5914,6 +6070,44 @@ export declare namespace IOConnectDesktop {
|
|
|
5914
6070
|
*/
|
|
5915
6071
|
data: any;
|
|
5916
6072
|
}
|
|
6073
|
+
|
|
6074
|
+
/**
|
|
6075
|
+
* All restrictions applied to a window for publishing or subscribing to Channels.
|
|
6076
|
+
*/
|
|
6077
|
+
export interface Restrictions {
|
|
6078
|
+
/**
|
|
6079
|
+
* List of restrictions for publishing or subscribing to Channels.
|
|
6080
|
+
*/
|
|
6081
|
+
channels: ChannelRestrictions[];
|
|
6082
|
+
}
|
|
6083
|
+
|
|
6084
|
+
/**
|
|
6085
|
+
* Restrictions applied to a window for publishing or subscribing to a specific Channel.
|
|
6086
|
+
*/
|
|
6087
|
+
export interface ChannelRestrictions extends RestrictionsConfig {
|
|
6088
|
+
/**
|
|
6089
|
+
* Name of the Channel for which the restrictions apply.
|
|
6090
|
+
*/
|
|
6091
|
+
name: string;
|
|
6092
|
+
}
|
|
6093
|
+
|
|
6094
|
+
/**
|
|
6095
|
+
* Restrictions applied to a window for publishing or subscribing to all Channels.
|
|
6096
|
+
*/
|
|
6097
|
+
export interface RestrictionsConfig {
|
|
6098
|
+
/**
|
|
6099
|
+
* If `true`, the window will be able to subscribe to the specified Channel.
|
|
6100
|
+
*/
|
|
6101
|
+
read: boolean;
|
|
6102
|
+
/**
|
|
6103
|
+
* If `true`, the window will be able to publish to the specified Channel.
|
|
6104
|
+
*/
|
|
6105
|
+
write: boolean;
|
|
6106
|
+
/**
|
|
6107
|
+
* ID of the window for which apply the restrictions for publishing or subscribing to Channels.
|
|
6108
|
+
*/
|
|
6109
|
+
windowId?: string;
|
|
6110
|
+
}
|
|
5917
6111
|
}
|
|
5918
6112
|
|
|
5919
6113
|
/**
|
|
@@ -6160,7 +6354,7 @@ export declare namespace IOConnectDesktop {
|
|
|
6160
6354
|
* Provides additional information about an Intent (e.g., when an Intent is retrieved with the `getIntents()` method).
|
|
6161
6355
|
*/
|
|
6162
6356
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
6163
|
-
export interface IntentInfo extends AddIntentListenerRequest {}
|
|
6357
|
+
export interface IntentInfo extends AddIntentListenerRequest { }
|
|
6164
6358
|
|
|
6165
6359
|
/**
|
|
6166
6360
|
* Specifies the criteria for filtering the available Intent handlers when using the `filterHandlers()` method.
|
|
@@ -6478,8 +6672,9 @@ export declare namespace IOConnectDesktop {
|
|
|
6478
6672
|
* Clicks programmatically a notification or a notification action.
|
|
6479
6673
|
* @param id ID of the notification to click.
|
|
6480
6674
|
* @param action ID of the action to click.
|
|
6675
|
+
* @param options Options for the clicked notification.
|
|
6481
6676
|
*/
|
|
6482
|
-
click(id: string, action?: string): Promise<void>;
|
|
6677
|
+
click(id: string, action?: string, options?: ClickOptions): Promise<void>;
|
|
6483
6678
|
|
|
6484
6679
|
/**
|
|
6485
6680
|
* Sets the state of a notification.
|
|
@@ -6495,6 +6690,13 @@ export declare namespace IOConnectDesktop {
|
|
|
6495
6690
|
*/
|
|
6496
6691
|
updateData(id: string, data: unknown): Promise<void>;
|
|
6497
6692
|
|
|
6693
|
+
/**
|
|
6694
|
+
* Snoozes a notification.
|
|
6695
|
+
* @param id ID of the notification to snooze.
|
|
6696
|
+
* @param duration Interval in milliseconds for which to snooze the notification.
|
|
6697
|
+
*/
|
|
6698
|
+
snooze(id: string, duration: number): Promise<void>;
|
|
6699
|
+
|
|
6498
6700
|
/**
|
|
6499
6701
|
* Notifies when a new notification is raised.
|
|
6500
6702
|
* @param callback Callback function for handling the event.
|
|
@@ -6629,6 +6831,15 @@ export declare namespace IOConnectDesktop {
|
|
|
6629
6831
|
*/
|
|
6630
6832
|
export type State = "Active" | "Acknowledged" | "Closed" | "Stale";
|
|
6631
6833
|
|
|
6834
|
+
/**
|
|
6835
|
+
* Options for the clicked notification.
|
|
6836
|
+
*/
|
|
6837
|
+
export interface ClickOptions {
|
|
6838
|
+
/**
|
|
6839
|
+
* Flag indicating whether the clicked notification will be closed.
|
|
6840
|
+
*/
|
|
6841
|
+
close?: boolean;
|
|
6842
|
+
}
|
|
6632
6843
|
|
|
6633
6844
|
/**
|
|
6634
6845
|
* Describes a notification.
|
|
@@ -7058,7 +7269,7 @@ export declare namespace IOConnectDesktop {
|
|
|
7058
7269
|
/**
|
|
7059
7270
|
* Retrieves all preferences stored for the current user.
|
|
7060
7271
|
*/
|
|
7061
|
-
getAll(): Promise<AppPreferences[]>;
|
|
7272
|
+
getAll(): Promise<{ all: AppPreferences[]; }>;
|
|
7062
7273
|
|
|
7063
7274
|
/**
|
|
7064
7275
|
* Removes all preferences stored for the current user.
|
|
@@ -7096,7 +7307,7 @@ export declare namespace IOConnectDesktop {
|
|
|
7096
7307
|
/**
|
|
7097
7308
|
* Timestamp of the last update of the user preferences.
|
|
7098
7309
|
*/
|
|
7099
|
-
lastUpdate
|
|
7310
|
+
lastUpdate?: string;
|
|
7100
7311
|
}
|
|
7101
7312
|
}
|
|
7102
7313
|
|