@openfin/workspace-platform 14.0.20 → 14.0.22

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.
@@ -1,5 +1,6 @@
1
+ import { withDisconnectListener } from '../../../../../common/src/utils/channels';
1
2
  import { SearchAPIClientChannelClient } from '../../../../../common/src/api/protocol/shapes/search';
2
- type HomeWorkspaceAPIClientChannelClient = SearchAPIClientChannelClient & {
3
+ type HomeWorkspaceAPIClientChannelClient = withDisconnectListener<SearchAPIClientChannelClient> & {
3
4
  homeChannelActionsRegistered?: boolean;
4
5
  };
5
6
  export declare function registerHomeChannelClientActions(channel: HomeWorkspaceAPIClientChannelClient): void;
@@ -1,3 +1,4 @@
1
+ import { withDisconnectListener } from '../../../../common/src/utils/channels';
1
2
  import { SearchAPIClientChannelClient } from '../../../../common/src/api/protocol/shapes/search';
2
3
  import type { WorkspaceAPIClientChannelClient, WorkspaceChannelProvider, WorkspaceComponentChannelClient } from './shapes/workspace';
3
4
  export type { WorkspaceAPIClientChannelClient, WorkspaceComponentChannelClient, WorkspaceChannelProvider };
@@ -5,7 +6,7 @@ export type { WorkspaceAPIClientChannelClient, WorkspaceComponentChannelClient,
5
6
  export declare const channelName: "__of_workspace_protocol__";
6
7
  export declare const getChannelClient: () => Promise<WorkspaceComponentChannelClient>;
7
8
  export declare const getClientAPIChannelClient: () => Promise<WorkspaceAPIClientChannelClient>;
8
- export declare const getSearchClientAPIChannelClient: () => Promise<SearchAPIClientChannelClient>;
9
+ export declare const getSearchClientAPIChannelClient: () => Promise<withDisconnectListener<SearchAPIClientChannelClient>>;
9
10
  /**
10
11
  * Launches the Workspace Provider.
11
12
  * If the Workspace Provider is already running, does nothing.
@@ -1,4 +1,7 @@
1
1
  import type OpenFin from '@openfin/core';
2
+ export type withDisconnectListener<T> = T & {
3
+ addDisconnectionListener: (listener: () => void) => void;
4
+ };
2
5
  /**
3
6
  * Make a function that connects to a channel.
4
7
  * If already connected to the channel, will return the channel connection.
@@ -6,4 +9,4 @@ import type OpenFin from '@openfin/core';
6
9
  * @param channelName the name of the channel to connect to.
7
10
  * @returns the function to connect to the channel.
8
11
  */
9
- export default function makeGetChannelClient(channelName: string): () => Promise<OpenFin.ChannelClient>;
12
+ export default function makeGetChannelClient(channelName: string): () => Promise<withDisconnectListener<OpenFin.ChannelClient>>;