@interopio/desktop 6.9.2 → 6.10.0

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 CHANGED
@@ -1,7 +1,3 @@
1
- 6.9.2
2
- - feat: io.CB 3.5
3
- 6.9.1
4
- - chore: bump
5
1
  6.9.0
6
2
  - feat: Enable executeJavaScript Method Access through External API
7
3
  - feat: Bulk update Notifications from Notification Panel
package/desktop.d.ts CHANGED
@@ -3100,13 +3100,13 @@ export declare namespace IOConnectDesktop {
3100
3100
  /**
3101
3101
  * Name of the Channel to which the window will be joined by default when it's started.
3102
3102
  */
3103
- channelId: string;
3103
+ channelId?: string;
3104
3104
 
3105
3105
  /**
3106
3106
  * If `true`, the Channel Selector will be visible, but the user won't be able to switch between Channels from it.
3107
3107
  * @default false
3108
3108
  */
3109
- readOnly: boolean;
3109
+ readOnly?: boolean;
3110
3110
  }
3111
3111
 
3112
3112
  /**
@@ -3142,6 +3142,13 @@ export declare namespace IOConnectDesktop {
3142
3142
  * 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.
3143
3143
  */
3144
3144
  queryString?: string;
3145
+
3146
+ /**
3147
+ * Interval in seconds to wait for the window to navigate.
3148
+ * @default 120
3149
+ * @since io.Connect Desktop 9.7
3150
+ */
3151
+ timeout?: number;
3145
3152
  }
3146
3153
 
3147
3154
  /**
@@ -6139,6 +6146,7 @@ export declare namespace IOConnectDesktop {
6139
6146
 
6140
6147
  /**
6141
6148
  * Retrieves the context of the current Channel.
6149
+ * It's recommended to use the `getMyChannels()` method instead, which can retrieve the contexts of the currently joined Channels both in single and in multi Channel mode.
6142
6150
  * @param options Settings for retrieving an FDC3 context published in the io.Connect Channel. *Available since io.Connect Desktop 9.6.*
6143
6151
  */
6144
6152
  getMy(options?: FDC3Options): Promise<ChannelContext>;
@@ -6151,19 +6159,26 @@ export declare namespace IOConnectDesktop {
6151
6159
  join(name: string, windowId?: string): Promise<void>;
6152
6160
 
6153
6161
  /**
6154
- * Leaves the current Channel.
6155
- * @param windowId ID of a window which to force to leave a Channel. If not provided, will force the current window to leave the current Channel.
6162
+ * Removes the current or a specified window from the current or a specified Channel.
6163
+ * @param options Options for leaving Channels. You can provide only the window ID, or an object holding the window ID and the name of the Channel to leave.
6164
+ * In either case, if only a window ID is provided, the specified window will be removed from the current Channel if in single Channel mode,
6165
+ * or from all currently joined Channels if in multi Channel mode.
6166
+ * If you provide only the name of the Channel to leave, the current window will be removed from the specified Channel.
6167
+ * If you don't provide an argument, the current window will be removed from the current Channel if in single Channel mode,
6168
+ * or from all currently joined Channels if in multi Channel mode.
6156
6169
  */
6157
- leave(windowId?: string): Promise<void>;
6170
+ leave(options?: string | { windowId?: string, channel?: string }): Promise<void>;
6158
6171
 
6159
6172
  /**
6160
6173
  * Retrieves the name of the current Channel.
6174
+ * @deprecated
6161
6175
  * @ignore
6162
6176
  */
6163
6177
  current(): string;
6164
6178
 
6165
6179
  /**
6166
6180
  * Retrieves the name of the current Channel.
6181
+ * It's recommended to use the `myChannels()` method instead, which can retrieve the names of the currently joined Channels both in single and in multi Channel mode.
6167
6182
  */
6168
6183
  my(): string;
6169
6184
 
@@ -6214,15 +6229,47 @@ export declare namespace IOConnectDesktop {
6214
6229
  /**
6215
6230
  * Notifies when a Channel is changed.
6216
6231
  * @param callback Callback function for handling the event.
6232
+ * @deprecated use onChannelsChanged instead
6217
6233
  * @ignore
6218
6234
  */
6219
6235
  changed(callback: (channel: string) => void): () => void;
6220
6236
 
6221
6237
  /**
6222
- * Notifies when a Channel is changed. Returns an unsubscribe function.
6223
- * @param callback Callback function for handling the event.
6238
+ * Notifies when the current window joins or leaves a Channel. Returns an unsubscribe function.
6239
+ * It's recommended to use the `onChannelsChanged()` method instead, which can handle Channel changes both in single and in multi Channel mode.
6240
+ * @param callback Callback function for handling the event. Receives as an argument the name of the Channel which the window has joined or left.
6224
6241
  */
6225
6242
  onChanged(callback: (channel: string) => void): () => void;
6243
+
6244
+ /**
6245
+ * Retrieves a list with the contexts of the current Channels. Can be used both in single and in multi Channel mode.
6246
+ * If used in single Channel mode, the returned array will always contain a single member if the window is joined to a Channel, or will be empty otherwise.
6247
+ * @since io.Connect Desktop 9.7
6248
+ */
6249
+ getMyChannels(options?: FDC3Options): Promise<ChannelContext[]>;
6250
+
6251
+ /**
6252
+ * Retrieves a list with the names of the current Channels. Can be used both in single and in multi Channel mode.
6253
+ * If used in single Channel mode, the returned array will always contain a single member if the window is joined to a Channel, or will be empty otherwise.
6254
+ * @since io.Connect Desktop 9.7
6255
+ */
6256
+ myChannels(): string[];
6257
+
6258
+ /**
6259
+ * Notifies when the current window joins or leaves a Channel. Can be used both in single and in multi Channel mode.
6260
+ * If used in single Channel mode, when the window joins a Channel, the array argument passed to the callback for handling the event
6261
+ * will always contain a single member; when the window leaves the current Channel, the array will be empty. Returns an unsubscribe function.
6262
+ * @param callback Callback function for handling the event. Receives a list with the names of the currently joined Channels as an argument.
6263
+ * @since io.Connect Desktop 9.7
6264
+ */
6265
+ onChannelsChanged(callback: (channels: string[]) => void): () => void;
6266
+
6267
+ /**
6268
+ * Retrieves the current Channel mode (single or multi Channel). Set by the io.Connect framework based on configuration.
6269
+ * @default "single"
6270
+ * @since io.Connect Desktop 9.7
6271
+ */
6272
+ mode: "single" | "multi";
6226
6273
  }
6227
6274
 
6228
6275
  /**
@@ -6466,7 +6513,7 @@ export declare namespace IOConnectDesktop {
6466
6513
  * @param callback Callback function for handling the event. Receives an object describing the removed Intent handler as an argument.
6467
6514
  * @since io.Connect Desktop 9.6
6468
6515
  */
6469
- onHandlerRemoved(callback: (handler: IOConnectDesktop.Intents.IntentHandler)=> void, intentName: string): UnsubscribeFunction;
6516
+ onHandlerRemoved(callback: (handler: IOConnectDesktop.Intents.IntentHandler) => void, intentName: string): UnsubscribeFunction;
6470
6517
 
6471
6518
  /**
6472
6519
  * Registers an Intent handler. If your app is already registered as an Intent handler through its configuration,