@openfin/workspace-platform 4.3.0 → 4.4.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/client-api/src/shapes.d.ts +596 -0
- package/{index.ts → client-api-platform/index.d.ts} +0 -0
- package/client-api-platform/src/api/app-directory.d.ts +7 -0
- package/client-api-platform/src/api/browser/browser-module.d.ts +13 -0
- package/client-api-platform/src/api/browser/index.d.ts +22 -0
- package/client-api-platform/src/api/pages/helper.d.ts +22 -0
- package/client-api-platform/src/api/pages/index.d.ts +30 -0
- package/client-api-platform/src/api/protocol.d.ts +47 -0
- package/client-api-platform/src/api/storage.d.ts +10 -0
- package/client-api-platform/src/api/workspace-module.d.ts +3 -0
- package/client-api-platform/src/index.d.ts +6 -0
- package/client-api-platform/src/init/browser-window-focus.d.ts +19 -0
- package/client-api-platform/src/init/cleanup.d.ts +1 -0
- package/client-api-platform/src/init/index.d.ts +5 -0
- package/client-api-platform/src/init/override-callback.d.ts +3 -0
- package/client-api-platform/src/init/utils.d.ts +39 -0
- package/{src/shapes.ts → client-api-platform/src/shapes.d.ts} +2 -29
- package/client-api-platform/src/umd.d.ts +1 -0
- package/common/src/api/pages/attached.d.ts +101 -0
- package/common/src/api/pages/idb.d.ts +12 -0
- package/common/src/api/pages/index.d.ts +16 -0
- package/common/src/api/pages/legacy.d.ts +16 -0
- package/common/src/api/pages/shapes.d.ts +77 -0
- package/common/src/api/protocol.d.ts +63 -0
- package/common/src/api/workspaces/index.d.ts +7 -0
- package/common/src/utils/application.d.ts +38 -0
- package/common/src/utils/channels.d.ts +8 -0
- package/common/src/utils/debounce.d.ts +16 -0
- package/common/src/utils/env.d.ts +30 -0
- package/common/src/utils/layout.d.ts +52 -0
- package/common/src/utils/local-storage-key.d.ts +8 -0
- package/common/src/utils/logger/index.d.ts +26 -0
- package/common/src/utils/logger/manager.d.ts +35 -0
- package/common/src/utils/logger/shapes.d.ts +27 -0
- package/common/src/utils/route.d.ts +55 -0
- package/common/src/utils/shared-emitter.d.ts +10 -0
- package/common/src/utils/snapshot.d.ts +33 -0
- package/common/src/utils/strings.d.ts +5 -0
- package/common/src/utils/umd.d.ts +2 -0
- package/common/src/utils/window.d.ts +146 -0
- package/index.d.ts +1 -0
- package/index.js +2 -0
- package/index.js.map +1 -0
- package/package.json +1 -34
- package/search-api/src/client/index.d.ts +6 -0
- package/search-api/src/client/internal.d.ts +38 -0
- package/search-api/src/client/remote/channel-client-factory.d.ts +2 -0
- package/search-api/src/client/remote/channel-client.d.ts +9 -0
- package/search-api/src/client/remote/data.d.ts +16 -0
- package/search-api/src/client/remote/disconnect.d.ts +7 -0
- package/search-api/src/client/remote/dispatch.d.ts +9 -0
- package/search-api/src/client/remote/requests.d.ts +5 -0
- package/search-api/src/client/remote/search-close.d.ts +14 -0
- package/search-api/src/common.d.ts +104 -0
- package/search-api/src/errors.d.ts +5 -0
- package/search-api/src/fin/index.d.ts +6 -0
- package/search-api/src/fin/shapes.d.ts +23 -0
- package/search-api/src/index.d.ts +7 -0
- package/search-api/src/internal-shapes.d.ts +134 -0
- package/search-api/src/logger.d.ts +1 -0
- package/search-api/src/provider/index.d.ts +8 -0
- package/search-api/src/provider/internal.d.ts +33 -0
- package/search-api/src/provider/remote/channel-factory.d.ts +6 -0
- package/search-api/src/provider/remote/channel.d.ts +23 -0
- package/search-api/src/provider/remote/connection.d.ts +20 -0
- package/search-api/src/provider/remote/data.d.ts +23 -0
- package/search-api/src/provider/remote/deregistration.d.ts +5 -0
- package/search-api/src/provider/remote/disconnect.d.ts +1 -0
- package/search-api/src/provider/remote/disconnection.d.ts +9 -0
- package/search-api/src/provider/remote/dispatch.d.ts +7 -0
- package/search-api/src/provider/remote/info.d.ts +5 -0
- package/search-api/src/provider/remote/registration.d.ts +23 -0
- package/search-api/src/provider/remote/search-close.d.ts +14 -0
- package/search-api/src/provider/remote/search.d.ts +8 -0
- package/search-api/src/shapes.d.ts +541 -0
- package/.eslintignore +0 -1
- package/.eslintrc.js +0 -2
- package/.prettierrc.js +0 -2
- package/babel.config.js +0 -2
- package/jest.config.js +0 -2
- package/src/api/app-directory.ts +0 -45
- package/src/api/browser/browser-module.ts +0 -65
- package/src/api/browser/index.ts +0 -46
- package/src/api/pages/helper.ts +0 -113
- package/src/api/pages/index.ts +0 -164
- package/src/api/protocol.ts +0 -60
- package/src/api/storage.ts +0 -32
- package/src/api/workspace-module.ts +0 -36
- package/src/index.ts +0 -35
- package/src/init/browser-window-focus.ts +0 -59
- package/src/init/cleanup.ts +0 -87
- package/src/init/index.ts +0 -42
- package/src/init/override-callback.ts +0 -159
- package/src/init/utils.ts +0 -164
- package/src/umd.ts +0 -5
- package/tsconfig.json +0 -13
- package/webpack.common.config.js +0 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { InternalSearchTopicContext } from '../internal-shapes';
|
|
2
|
+
import { Action, SearchProvider, SearchProviderInfo, SearchProviderResponseGeneratorExtended, SearchRequest, SearchResult } from '../shapes';
|
|
3
|
+
/**
|
|
4
|
+
* Get all registered providers' info for an topic.
|
|
5
|
+
* @param namespacedTopic the namespaced search topic id.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getAllProviders(namespacedTopic: string): SearchProviderInfo[];
|
|
8
|
+
/**
|
|
9
|
+
* Register a provider.
|
|
10
|
+
* @param namespacedTopic the namespaced search topic to register the provider on.
|
|
11
|
+
* @param provider the provider to register.
|
|
12
|
+
*/
|
|
13
|
+
export declare function register(namespacedTopic: string, provider: SearchProvider): void;
|
|
14
|
+
/**
|
|
15
|
+
* Deregister a provider.
|
|
16
|
+
* @param namespacedTopic the namespaced search topic to deregister the provider on.
|
|
17
|
+
* @param name the name of the search provider to deregister.
|
|
18
|
+
*/
|
|
19
|
+
export declare function deregister(namespacedTopic: string, name: string): void;
|
|
20
|
+
/**
|
|
21
|
+
* Dispatch a search result back to the respective provider.
|
|
22
|
+
* @param namespacedTopic the namespaced search topic id.
|
|
23
|
+
* @param providerId the name of the provider to dispatch the result back to.
|
|
24
|
+
* @param result the search result to dispatch back to the provider.
|
|
25
|
+
* @param action the action to dispatch the search result with.
|
|
26
|
+
*/
|
|
27
|
+
export declare function dispatch(namespacedTopic: string, providerId: string, result: SearchResult, action: Action): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Returns an extended search generator object.
|
|
30
|
+
* @param ctx the search topic context.
|
|
31
|
+
* @param req the search request.
|
|
32
|
+
*/
|
|
33
|
+
export declare function search({ namespacedTopic, topic }: InternalSearchTopicContext, req: SearchRequest): SearchProviderResponseGeneratorExtended;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { InternalSearchTopicContext } from '../../internal-shapes';
|
|
2
|
+
/**
|
|
3
|
+
* Create a channel for interacting with remote search providers.
|
|
4
|
+
* @param ctx the context of the search topic to create the channel for.
|
|
5
|
+
*/
|
|
6
|
+
export declare function create(ctx: InternalSearchTopicContext): Promise<import("../../fin/shapes").Channel>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Channel } from '../../fin/shapes';
|
|
2
|
+
/**
|
|
3
|
+
* Get the OpenFin channel that represents a topic.
|
|
4
|
+
* If not found, will throw an error.
|
|
5
|
+
* @param topicId the search topic id.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getOrFail(topicId: string): Channel;
|
|
8
|
+
/**
|
|
9
|
+
* Get the OpenFin channel that represents a topic.
|
|
10
|
+
* @param topicId the search topic id.
|
|
11
|
+
*/
|
|
12
|
+
export declare function get(topicId: string): Channel;
|
|
13
|
+
/**
|
|
14
|
+
* Set the OpenFin channel for a search topic.
|
|
15
|
+
* @param topic the search topic id.
|
|
16
|
+
* @param channel the channel for the search topic.
|
|
17
|
+
*/
|
|
18
|
+
export declare function set(topic: string, channel: Channel): void;
|
|
19
|
+
/**
|
|
20
|
+
* Remove the channel corresponding to a search topic.
|
|
21
|
+
* @param topic the search topic.
|
|
22
|
+
*/
|
|
23
|
+
export declare function remove(topic: string): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { InternalSearchTopicContext } from '../../internal-shapes';
|
|
2
|
+
import type { Identity, SubscriptionListener } from '../../shapes';
|
|
3
|
+
/**
|
|
4
|
+
* Add a listener that is called whenever someone remotely subscribes to a search topic.
|
|
5
|
+
* @param namespacedTopic the namespaced search topic.
|
|
6
|
+
* @param listener the subscription listener to add.
|
|
7
|
+
*/
|
|
8
|
+
export declare function addSubscriptionListener(namespacedTopic: string, listener: SubscriptionListener): void;
|
|
9
|
+
/**
|
|
10
|
+
* Remove a listener that is called whenever someone remotely subscribes to a search topic.
|
|
11
|
+
* @param namespacedTopic the namespaced search topic.
|
|
12
|
+
* @param listener the listener to remove.
|
|
13
|
+
*/
|
|
14
|
+
export declare function removeSubscriptionListener(namespacedTopic: string, listener: SubscriptionListener): void;
|
|
15
|
+
/**
|
|
16
|
+
* Called when a remote OpenFin identity connects to a channel to listen on topic invocations.
|
|
17
|
+
* If a subscription listener registered for this search topic returns false, the request will be rejected.
|
|
18
|
+
* @param ctx the search topic context.
|
|
19
|
+
*/
|
|
20
|
+
export declare function makeStreamListener({ namespacedTopic }: InternalSearchTopicContext): (identity: Identity) => Promise<void>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { InternalDataResponse } from '../../internal-shapes';
|
|
2
|
+
import type { DispatchedSearchResult, SearchListenerRequest, SearchListenerResponse, SearchProviderInfo } from '../../shapes';
|
|
3
|
+
/**
|
|
4
|
+
* Listens for pushed new/updated remote search provider results or status changes.
|
|
5
|
+
* When a message is received, call all listeners corresponding to the response.
|
|
6
|
+
* @param namespacedTopic the namespaced search topic.
|
|
7
|
+
*/
|
|
8
|
+
export declare function makeStreamListener(namespacedTopic: string): (res: InternalDataResponse) => void;
|
|
9
|
+
/**
|
|
10
|
+
* Make a search listener for a remote search provider.
|
|
11
|
+
* This listener will be called by the provider when the topic is searched.
|
|
12
|
+
* When called, the listener waits and returns the response from the view for the data request.
|
|
13
|
+
* @param topicId the search topic for the listener.
|
|
14
|
+
* @param info the provider info.
|
|
15
|
+
*/
|
|
16
|
+
export declare function makeOnSearch(topicId: string, info: SearchProviderInfo): (request: SearchListenerRequest, response: SearchListenerResponse) => Promise<InternalDataResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Make a dispatch result listener for a remote search provider.
|
|
19
|
+
* When called, the listener sends a result dispatch request to the underlying remote OpenFin identity.
|
|
20
|
+
* @param topicId the search topic id.
|
|
21
|
+
* @param info the remote search provider info.
|
|
22
|
+
*/
|
|
23
|
+
export declare function makeOnResultDispatch(topicId: string, info: SearchProviderInfo): (result: DispatchedSearchResult) => Promise<any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function disconnect(namespacedTopic: string): Promise<void>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DisconnectListener, Identity } from '../../shapes';
|
|
2
|
+
export declare function addDisconnectListener(namespacedTopic: string, listener: DisconnectListener): void;
|
|
3
|
+
export declare function removeDisconnectListener(namespacedTopic: string, listener: DisconnectListener): void;
|
|
4
|
+
/**
|
|
5
|
+
* Called when a remote OpenFin identity disconnects from the channel for a search topic.
|
|
6
|
+
* Disconnecting will clean up all search providers correlated to the OpenFin identity.
|
|
7
|
+
* @param namespacedTopic the namespaced search topic id.
|
|
8
|
+
*/
|
|
9
|
+
export declare function makeStreamListener(namespacedTopic: string): (identity: Identity) => Promise<void>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { InternalDispatchRequest } from '../../internal-shapes';
|
|
2
|
+
import type { Identity } from '../../shapes';
|
|
3
|
+
/**
|
|
4
|
+
* Make a channel listener for proxying search result dispatch from a remote OpenFin identity back to the respective provider.
|
|
5
|
+
* @param namespacedTopic the namespaced search topic id.
|
|
6
|
+
*/
|
|
7
|
+
export declare function makeStreamListener(namespacedTopic: string): (req: InternalDispatchRequest, identity: Identity) => Promise<void>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Make a channel listener for sending search provider info to a remote OpenFin identity.
|
|
3
|
+
* @param namespacedTopic the context of the search topic to get the provider info from.
|
|
4
|
+
*/
|
|
5
|
+
export declare function makeStreamListener(namespacedTopic: string): () => Promise<import("../..").SearchProviderInfo[]>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Identity, SearchProviderInfo } from '../../shapes';
|
|
2
|
+
/**
|
|
3
|
+
* Add a remote search provider.
|
|
4
|
+
* @param topic the search topic to add the provider on.
|
|
5
|
+
* @param info the search provider info. Must include identity.
|
|
6
|
+
*/
|
|
7
|
+
export declare function addRemoteProvider(topic: string, info: SearchProviderInfo): void;
|
|
8
|
+
/**
|
|
9
|
+
* Removes a remote search provider.
|
|
10
|
+
* @param topic the search topic id.
|
|
11
|
+
* @param name the name of the search provider.
|
|
12
|
+
*/
|
|
13
|
+
export declare function removeRemoteProvider(topic: string, id: string): void;
|
|
14
|
+
/**
|
|
15
|
+
* Remove all search providers registered by the remote OpenFin identity.
|
|
16
|
+
* @param topic the search topic to remove the providers on.
|
|
17
|
+
* @param identity the identity that registered the remote search providers.
|
|
18
|
+
*/
|
|
19
|
+
export declare function removeRemoteProvidersForIdentity(topic: string, identity: Identity): void;
|
|
20
|
+
/**
|
|
21
|
+
* Make a channel listener that allows remote OpenFin identities to register a search provider to a search topic.
|
|
22
|
+
*/
|
|
23
|
+
export declare function makeStreamListener(namespacedTopic: string): (info: SearchProviderInfo, identity: Identity) => void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { InternalSearchCloseRequest } from '../../internal-shapes';
|
|
2
|
+
import type { Identity } from '../../shapes';
|
|
3
|
+
/**
|
|
4
|
+
* Sends a message notifying a remote OpenFin identity that a search request has been closed.
|
|
5
|
+
* @param topicId the search topic id.
|
|
6
|
+
* @param identity the remote OpenFin identity to notify.
|
|
7
|
+
* @param requestId the search request id.
|
|
8
|
+
*/
|
|
9
|
+
export declare function sendRequestCloseToIdentity(topicId: string, identity: Identity, requestId: string): Promise<any>;
|
|
10
|
+
/**
|
|
11
|
+
* Listen for search request close messages from remote providers.
|
|
12
|
+
* On message, close the remote search request.
|
|
13
|
+
*/
|
|
14
|
+
export declare function makeStreamListener(namespacedTopic: string): (req: InternalSearchCloseRequest) => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { InternalErrorResponse, InternalSearchRequest, InternalSearchResponse, InternalSearchTopicContext } from '../../internal-shapes';
|
|
2
|
+
export declare function closeRemoteSearchRequest(topicId: string, requestId: string): void;
|
|
3
|
+
/**
|
|
4
|
+
* Listen for search requests from remote OpenFin identities.
|
|
5
|
+
* On message, setup search generator that remote identity can check the status of in subsequent requests.
|
|
6
|
+
* @param namespacedTopic the search topic context.
|
|
7
|
+
*/
|
|
8
|
+
export declare function makeStreamListener(ctx: InternalSearchTopicContext): (request: InternalSearchRequest, ...p: any[]) => Promise<InternalSearchResponse | InternalErrorResponse>;
|