@openfin/workspace-platform 13.1.4 → 14.0.11

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.
Files changed (53) hide show
  1. package/client-api/src/internal/home/handlers/data.d.ts +3 -0
  2. package/client-api/src/internal/home/handlers/disconnect.d.ts +1 -0
  3. package/client-api/src/internal/home/handlers/index.d.ts +6 -0
  4. package/client-api/src/internal/home/handlers/result-dispatch.d.ts +3 -0
  5. package/client-api/src/internal/home/handlers/search-close.d.ts +5 -0
  6. package/client-api/src/internal/home/index.d.ts +4 -0
  7. package/client-api/src/internal/home/requests.d.ts +5 -0
  8. package/client-api/src/internal/providers.d.ts +63 -0
  9. package/client-api/src/internal/storefront/handlers.d.ts +9 -0
  10. package/client-api/src/internal/storefront/index.d.ts +4 -0
  11. package/client-api/src/{internal.d.ts → internal/try-dispatch.d.ts} +1 -1
  12. package/client-api/src/shapes/common.d.ts +1 -1
  13. package/client-api/src/shapes/dock.d.ts +3 -3
  14. package/client-api/src/shapes/home.d.ts +18 -18
  15. package/client-api/src/shapes/store.d.ts +6 -6
  16. package/client-api/src/shapes/templates.d.ts +11 -11
  17. package/client-api-platform/src/init/browser-defaults.test.d.ts +1 -1
  18. package/client-api-platform/src/init/page-defaults.test.d.ts +1 -1
  19. package/client-api-platform/src/init/panels.test.d.ts +1 -1
  20. package/client-api-platform/src/init/utils.d.ts +2 -2
  21. package/client-api-platform/src/init/utils.test.d.ts +1 -1
  22. package/client-api-platform/src/shapes.d.ts +15 -15
  23. package/common/src/api/action.d.ts +1 -1
  24. package/common/src/api/home.d.ts +25 -0
  25. package/common/src/api/pages/shapes.d.ts +6 -6
  26. package/common/src/api/protocol/browser.d.ts +1 -1
  27. package/common/src/api/protocol/shapes/search.d.ts +96 -0
  28. package/common/src/api/protocol/shapes/workspace.d.ts +13 -13
  29. package/common/src/api/protocol/workspace-platform.d.ts +1 -1
  30. package/common/src/api/protocol/workspace.d.ts +2 -0
  31. package/common/src/api/provider.d.ts +24 -9
  32. package/common/src/api/search/aggregate-search-results.d.ts +10 -0
  33. package/common/src/api/search/common.d.ts +13 -0
  34. package/common/src/api/shapes/home.d.ts +186 -0
  35. package/common/src/api/theming.d.ts +2 -2
  36. package/common/src/test/crypto-mocks.d.ts +1 -0
  37. package/common/src/utils/a11y/search.a11y.d.ts +10 -10
  38. package/common/src/utils/application.d.ts +2 -2
  39. package/common/src/utils/context-menu.d.ts +1 -1
  40. package/common/src/utils/layout.d.ts +3 -3
  41. package/common/src/utils/menu-window-provider.d.ts +2 -2
  42. package/common/src/utils/route.d.ts +0 -1
  43. package/common/src/utils/snapshot.d.ts +3 -3
  44. package/common/src/utils/types.d.ts +7 -7
  45. package/common/src/utils/usage-register.d.ts +2 -2
  46. package/index.js +124 -19
  47. package/index.js.map +1 -1
  48. package/package.json +3 -3
  49. package/search-api/src/fin/shapes.d.ts +2 -2
  50. package/search-api/src/provider/remote/deregistration.d.ts +2 -1
  51. package/search-api/src/provider/remote/registration.d.ts +1 -1
  52. package/search-api/src/shapes.d.ts +11 -21
  53. package/common/src/api/search.d.ts +0 -18
@@ -0,0 +1,96 @@
1
+ import OpenFin from '@openfin/core';
2
+ import { Awaitable, RemoveFunctions } from '../../../../../common/src/utils/types';
3
+ import { homeOFIdentity } from '../../../../../common/src/utils/window';
4
+ import type { HomeClientApiDataRequest, HomeClientApiDispatchRequest, HomeClientApiSearchCloseRequest, HomeInternalDataResponse, HomeInternalErrorResponse, InternalDataResponse, InternalDispatchRequest, InternalErrorResponse, InternalSearchRequest, InternalSearchResponse } from '../../../../../common/src/api/shapes/home';
5
+ import { HomeProvider } from '../../../../../client-api/src/home';
6
+ import { RegisterMetaInfoInternal } from '../../../../../client-api/src/index';
7
+ export declare const HomeChannelActions: {
8
+ /**
9
+ * The stream id that data is requested and transported back to the creator of a search topic on.
10
+ */
11
+ readonly remoteProviderDataStreamId: "0";
12
+ /**
13
+ * The stream id that handles search request to the creator of a search topic from remote client like views.
14
+ */
15
+ readonly remoteClientSearchStreamId: "1";
16
+ /**
17
+ * The stream id for registering a remote search provider with the creator of a search topic.
18
+ */
19
+ readonly remoteProviderRegistrationStreamId: "2";
20
+ /**
21
+ * The stream id for deregistering a remote search provider with the creator of a search topic.
22
+ */
23
+ readonly remoteProviderDeregistrationStreamId: "3";
24
+ /**
25
+ * The stream id for sharing remote search provider information with the creator of a search topic.
26
+ */
27
+ readonly remoteProviderInfoStreamId: "4";
28
+ /**
29
+ * The stream id for dispatching search results back to a remote search provider.
30
+ */
31
+ readonly remoteProviderDispatchStreamId: "5";
32
+ /**
33
+ * The stream id for notifying remote search providers that the request have closed.
34
+ */
35
+ readonly remoteSearchCloseStreamId: "6";
36
+ };
37
+ /**
38
+ * Registered ON the Client API
39
+ * Dispatched to by the Workspace Provider
40
+ */
41
+ interface SearchAPIClientChannelActions {
42
+ [HomeChannelActions.remoteProviderDataStreamId]: (req: HomeClientApiDataRequest, identity: OpenFin.Identity) => Promise<HomeInternalDataResponse | HomeInternalErrorResponse>;
43
+ [HomeChannelActions.remoteSearchCloseStreamId]: (req: HomeClientApiSearchCloseRequest, identity: OpenFin.Identity) => void;
44
+ [HomeChannelActions.remoteProviderDispatchStreamId]: (req: HomeClientApiDispatchRequest, identity: OpenFin.Identity) => Promise<void> | void;
45
+ }
46
+ type HomeChannelActions = Record<string, never>;
47
+ /**
48
+ * Registered ON the WOrkspace Provider
49
+ * Dispatched to by Client API OR by Home.
50
+ */
51
+ type SearchProviderChannelActions = {
52
+ [HomeChannelActions.remoteProviderDataStreamId]: (req: InternalDataResponse, identity: OpenFin.Identity) => void | Promise<void>;
53
+ [HomeChannelActions.remoteClientSearchStreamId]: (req: InternalSearchRequest, identity: OpenFin.Identity) => Promise<InternalSearchResponse | InternalErrorResponse>;
54
+ [HomeChannelActions.remoteProviderDeregistrationStreamId]: (providerId: string, identity: OpenFin.Identity) => Promise<void>;
55
+ [HomeChannelActions.remoteProviderRegistrationStreamId]: (req: RemoveFunctions<HomeProvider>, identity: OpenFin.Identity) => Promise<RegisterMetaInfoInternal>;
56
+ [HomeChannelActions.remoteProviderDispatchStreamId]: (req: InternalDispatchRequest, identity: OpenFin.Identity) => Promise<void>;
57
+ [HomeChannelActions.remoteSearchCloseStreamId]: (req: {
58
+ id: string;
59
+ }, identity: OpenFin.Identity) => Promise<void>;
60
+ };
61
+ interface SearchChannelClientBase extends Omit<OpenFin.ChannelClient, 'dispatch' | 'register'> {
62
+ /**
63
+ * Dispatches an action to the Workspace Provider.
64
+ * @param action The action to dispatch
65
+ * @param payload The payload to send with the action
66
+ */
67
+ dispatch: <T extends keyof SearchProviderChannelActions>(action: T, payload: Parameters<SearchProviderChannelActions[T]>[0]) => Promise<Awaited<ReturnType<SearchProviderChannelActions[T]>>>;
68
+ }
69
+ export interface SearchAPIClientChannelClient extends SearchChannelClientBase {
70
+ /**
71
+ * Registers a handler for a channel action.
72
+ * This function is ONLY used from within `client-api` and should not be used by the workspace components.
73
+ *
74
+ * @param action The action to register a handler for.
75
+ * @param handler The handler to register.
76
+ */
77
+ register: <T extends keyof SearchAPIClientChannelActions>(action: T, handler: (payload: Parameters<SearchAPIClientChannelActions[T]>[0], id: OpenFin.ProviderIdentity | OpenFin.ClientIdentity) => Awaitable<ReturnType<SearchAPIClientChannelActions[T]>>) => boolean;
78
+ }
79
+ export interface WorkspaceChannelProvider extends Omit<OpenFin.ChannelProvider, 'register' | 'dispatch'> {
80
+ /**
81
+ * Used for dispatching a channel action to a channel client
82
+ *
83
+ * @param to The identity of the client to send the action to.
84
+ * @param action The action to send.
85
+ * @param payload The payload to send with the action.
86
+ */
87
+ dispatch: <I extends OpenFin.ClientIdentity | OpenFin.Identity, T extends I['name'] extends (typeof homeOFIdentity)['name'] ? keyof HomeChannelActions : keyof SearchAPIClientChannelClient>(to: I, action: T, payload: I['name'] extends (typeof homeOFIdentity)['name'] ? T extends keyof HomeChannelActions ? Parameters<HomeChannelActions[T]>[0] : never : T extends keyof SearchAPIClientChannelActions ? Parameters<SearchAPIClientChannelActions[T]>[0] : never) => I['name'] extends (typeof homeOFIdentity)['name'] ? T extends keyof HomeChannelActions ? Promise<Awaited<ReturnType<HomeChannelActions[T]>>> : T extends keyof SearchAPIClientChannelActions ? Promise<Awaited<ReturnType<SearchAPIClientChannelActions[T]>>> : never : never;
88
+ /**
89
+ * Used for registering a channel action handler for a channel client
90
+ *
91
+ * @param action The action to register a handler for.
92
+ * @param handler The handler to register.
93
+ */
94
+ register: <T extends keyof SearchProviderChannelActions>(action: T, handler: (payload: Parameters<SearchProviderChannelActions[T]>[0], id: OpenFin.ProviderIdentity | OpenFin.ClientIdentity) => Awaitable<ReturnType<SearchProviderChannelActions[T]>>) => boolean;
95
+ }
96
+ export {};
@@ -1,20 +1,21 @@
1
1
  import type OpenFin from '@openfin/core';
2
2
  import type { Awaitable } from '../../../../../common/src/utils/types';
3
3
  import type { dockOFIdentity, homeOFIdentity, storefrontOFIdentity } from '../../../../../common/src/utils/window';
4
+ import type { SearchQueryWithProviderID, SearchQueryWithProviderIdentity } from '../../../../../common/src/api/home';
4
5
  import type { ProviderChannelPayload, ProviderDeregisterPayload, ProviderInfoInternal, ProviderRegisterPayload, ProviderUpdatePayload } from '../../../../../common/src/api/provider';
5
6
  import type { ClientAPILaunchStorefrontProviderAppRequest, LaunchStorefrontProviderAppRequest } from '../../../../../common/src/api/storefront';
6
7
  import type { WorkspaceComponentSetSelectedSchemePayload } from '../../../../../common/src/api/theming';
7
8
  import type { Workspace as LegacyWorkspace } from '../../../../../common/src/api/workspaces';
8
- import type { HomeSearchListenerRequest, SearchQueryWithProviderID } from '../../../../../client-api/src/home';
9
+ import type { HomeSearchListenerRequest } from '../../../../../client-api/src/home';
9
10
  import type { RegisterMetaInfoInternal } from '../../../../../client-api/src/index';
10
11
  import type { StorefrontFooter, StorefrontLandingPage, StorefrontNavigationSection, UpdateButtonConfigRequest } from '../../../../../client-api/src/store';
11
12
  import type { App, ColorSchemeOptionType, Page } from '../../../../../client-api-platform/src/shapes';
12
- export declare type WorkspaceChannelAction = keyof WorkspaceChannelTypes;
13
+ export type WorkspaceChannelAction = keyof WorkspaceChannelTypes;
13
14
  /****** API Client Channel Actions ******/
14
15
  /**
15
16
  * Channel actions, related to store, **registered** by the Workspace Platform Provider e.g. Studio.
16
17
  */
17
- declare type StoreAPIClientChannelActions = {
18
+ type StoreAPIClientChannelActions = {
18
19
  'get-storefront-provider-apps': (id: string) => Promise<App[]>;
19
20
  'get-storefront-provider-footer': (id: string) => Promise<StorefrontFooter>;
20
21
  'get-storefront-provider-landing-page': (id: string) => Promise<StorefrontLandingPage>;
@@ -24,33 +25,32 @@ declare type StoreAPIClientChannelActions = {
24
25
  /**
25
26
  * Channel actions, related to dock, **registered** by the Workspace Platform Provider e.g. Studio.
26
27
  */
27
- declare type DockAPIClientChannelActions = Record<string, never>;
28
+ type DockAPIClientChannelActions = Record<string, never>;
28
29
  /**
29
30
  * Channel actions, related to home, **registered** by the Workspace Platform Provider e.g. Studio.
30
31
  */
31
- declare type HomeAPIClientChannelActions = Record<string, never>;
32
- declare type WorkspaceAPIClientChannelActions = StoreAPIClientChannelActions | DockAPIClientChannelActions | HomeAPIClientChannelActions;
32
+ type HomeAPIClientChannelActions = Record<string, never>;
33
+ type WorkspaceAPIClientChannelActions = StoreAPIClientChannelActions | DockAPIClientChannelActions | HomeAPIClientChannelActions;
33
34
  /****** End of API Client Channel Actions ******/
34
35
  /****** Workspace Component Channel Actions ******/
35
36
  /**
36
37
  * Channel Actions **registered** by all workspace components.
37
38
  */
38
- declare type SharedChannelActions = {
39
+ type SharedChannelActions = {
39
40
  'set-selected-scheme': (ctx: WorkspaceComponentSetSelectedSchemePayload) => Promise<void>;
40
41
  };
41
42
  /**
42
43
  * Channel Actions **registered** by the Home workspace component.
43
44
  */
44
- declare type HomeChannelActions = {
45
+ type HomeChannelActions = {
45
46
  'assign-home-search-context': (payload: Partial<HomeSearchListenerRequest['context']>) => Promise<void>;
46
- 'set-search-query': (payload: SearchQueryWithProviderID) => Promise<void>;
47
- 'open-home-and-set-search-query': (payload: SearchQueryWithProviderID) => Promise<void>;
47
+ 'open-home-and-set-search-query': (payload: SearchQueryWithProviderIdentity) => Promise<void>;
48
48
  'temporary-is-home-ready': () => Promise<boolean>;
49
49
  };
50
50
  /**
51
51
  * Channel Actions **registered** by the Storefront workspace component.
52
52
  */
53
- declare type StoreChannelActions = {
53
+ type StoreChannelActions = {
54
54
  'update-app-card-button-config': (payload: UpdateButtonConfigRequest & ProviderInfoInternal<'storefront'>) => Promise<void>;
55
55
  };
56
56
  /**
@@ -58,7 +58,7 @@ declare type StoreChannelActions = {
58
58
  */
59
59
  interface DockChannelActions {
60
60
  }
61
- declare type WorkspaceComponentChannelActions = SharedChannelActions & HomeChannelActions & StoreChannelActions & DockChannelActions;
61
+ type WorkspaceComponentChannelActions = SharedChannelActions & HomeChannelActions & StoreChannelActions & DockChannelActions;
62
62
  /****** End of Workspace Component Channel Actions ******/
63
63
  /****** Workspace Provider Channel Actions ******/
64
64
  /**
@@ -67,7 +67,7 @@ declare type WorkspaceComponentChannelActions = SharedChannelActions & HomeChann
67
67
  *
68
68
  * The handlers for these actions are defined [here](https://github.com/openfin/workspace/blob/develop/provider/src/api/protocol.ts#L32)
69
69
  */
70
- declare type WorkspaceChannelTypes = {
70
+ type WorkspaceChannelTypes = {
71
71
  'register-provider': (payload: ProviderRegisterPayload) => RegisterMetaInfoInternal;
72
72
  'deregister-provider': (payload: ProviderDeregisterPayload) => Promise<void>;
73
73
  'get-providers': (payload: ProviderChannelPayload) => Promise<ProviderInfoInternal[]>;
@@ -55,7 +55,7 @@ export declare enum WorkspacePlatformChannelAction {
55
55
  GetDockProviderConfig = "getDockProviderConfig",
56
56
  SaveDockProviderConfig = "saveDockProviderConfig"
57
57
  }
58
- export declare type PlatFormSupportedFeatures = boolean | {
58
+ export type PlatFormSupportedFeatures = boolean | {
59
59
  isWorkspacePlatform: boolean;
60
60
  isBrowserInitialized: boolean;
61
61
  analytics?: {
@@ -1,9 +1,11 @@
1
+ import { SearchAPIClientChannelClient } from '../../../../common/src/api/protocol/shapes/search';
1
2
  import type { WorkspaceAPIClientChannelClient, WorkspaceChannelProvider, WorkspaceComponentChannelClient } from './shapes/workspace';
2
3
  export type { WorkspaceAPIClientChannelClient, WorkspaceComponentChannelClient, WorkspaceChannelProvider };
3
4
  /** The name of the channel for the centralized workspace protocol. */
4
5
  export declare const channelName: "__of_workspace_protocol__";
5
6
  export declare const getChannelClient: () => Promise<WorkspaceComponentChannelClient>;
6
7
  export declare const getClientAPIChannelClient: () => Promise<WorkspaceAPIClientChannelClient>;
8
+ export declare const getSearchClientAPIChannelClient: () => Promise<SearchAPIClientChannelClient>;
7
9
  /**
8
10
  * Launches the Workspace Provider.
9
11
  * If the Workspace Provider is already running, does nothing.
@@ -1,6 +1,6 @@
1
1
  import type OpenFin from '@openfin/core';
2
- import { RemoveFunctions } from '../../../common/src/utils/types';
3
- import { DockProvider, StorefrontProvider, WorkspaceButtonsConfig } from '../../../client-api/src/shapes';
2
+ import type { RemoveFunctions } from '../../../common/src/utils/types';
3
+ import type { CLIProvider, DockProvider, HomeProvider, StorefrontProvider, WorkspaceButtonsConfig } from '../../../client-api/src/shapes';
4
4
  interface WithIdentity {
5
5
  /**
6
6
  * The platform identity that registered the Storefront Provider.
@@ -12,14 +12,18 @@ interface WithIdentity {
12
12
  */
13
13
  uniqueId: string;
14
14
  }
15
- export declare type ProviderType = 'storefront' | 'dock';
15
+ export type ProviderType = 'storefront' | 'dock'
16
+ /**
17
+ * Use with caution! This is not fully utilized everywhere in the codebase.
18
+ */
19
+ | 'home';
16
20
  /**
17
21
  * The internal representation of the dock provider, which includes the identity of the provider
18
22
  * All functions on the DockProvider type are removed, as they are handled through OpenFin Channels
19
23
  *
20
24
  * The `platformIdentity` is added in the register call [here](../../../provider/src/api/provider.ts)
21
25
  */
22
- export declare type DockProviderInternal =
26
+ export type DockProviderInternal =
23
27
  /**
24
28
  * Remove all functions from the StorefrontProvider type, as they are handled through OpenFin Channels
25
29
  */
@@ -32,21 +36,32 @@ RemoveFunctions<Omit<DockProvider, 'workspaceComponents'>> & {
32
36
  *
33
37
  * The `platformIdentity` is added in the register call [here](../../../provider/src/api/provider.ts)
34
38
  */
35
- export declare type StorefrontProviderInternal =
39
+ export type StorefrontProviderInternal =
36
40
  /**
37
41
  * Remove all functions from the StorefrontProvider type, as they are handled through OpenFin Channels
38
42
  */
39
43
  RemoveFunctions<StorefrontProvider> & WithIdentity;
44
+ /**
45
+ * The internal representation of the home provider, which includes the identity of the provider
46
+ * All functions on the HomeProvider/CLIProvider type are removed, as they are handled through OpenFin Channels
47
+ *
48
+ * The `platformIdentity` is added in the register call [here](../../../provider/src/api/provider.ts)
49
+ */
50
+ export type HomeProviderInternal =
51
+ /**
52
+ * Remove all functions from the StorefrontProvider type, as they are handled through OpenFin Channels
53
+ */
54
+ (RemoveFunctions<HomeProvider> | RemoveFunctions<CLIProvider>) & WithIdentity;
40
55
  /**
41
56
  * The internal representation of a provider, which includes the identity of the provider
42
57
  * This should be used anywhere within 'dock/*' or 'storefront/*' and most places within 'provider/*'
43
58
  * to ensure that the identity is included
44
59
  */
45
- export declare type ProviderInfoInternal<T extends ProviderType = ProviderType> = T extends 'dock' ? DockProviderInternal : StorefrontProviderInternal;
60
+ export type ProviderInfoInternal<T extends ProviderType = ProviderType> = T extends 'dock' ? DockProviderInternal : StorefrontProviderInternal;
46
61
  export interface ProviderChannelPayload {
47
62
  providerType: ProviderType;
48
63
  }
49
- export declare type ProviderRegisterPayload = {
64
+ export type ProviderRegisterPayload = {
50
65
  providerType: 'dock';
51
66
  info: RemoveFunctions<DockProvider>;
52
67
  } | {
@@ -56,14 +71,14 @@ export declare type ProviderRegisterPayload = {
56
71
  export interface ProviderDeregisterPayload extends ProviderChannelPayload {
57
72
  id: string;
58
73
  }
59
- export declare type ProviderConnectionPayload = {
74
+ export type ProviderConnectionPayload = {
60
75
  providerType: 'dock';
61
76
  provider: DockProviderInternal;
62
77
  } | {
63
78
  providerType: 'storefront';
64
79
  provider: StorefrontProviderInternal;
65
80
  };
66
- export declare type ProviderDisconnectionPayload = {
81
+ export type ProviderDisconnectionPayload = {
67
82
  providerType: 'dock';
68
83
  provider: DockProviderInternal;
69
84
  } | {
@@ -0,0 +1,10 @@
1
+ import type { HomeSearchResult, ScoreOrder } from '../../../../client-api/src/shapes';
2
+ /**
3
+ * Aggregates and sorts the search results from old and new result arrays.
4
+ *
5
+ * @param oldResults - An array of existing `HomeSearchResult` objects.
6
+ * @param newResults - An array of new `HomeSearchResult` objects to be merged with the existing results.
7
+ * @param order - The order in which to sort the results based on their scores ('ascending' or 'descending'). Default is 'ascending'.
8
+ * @returns An array of `HomeSearchResult` objects containing the merged and sorted search results.
9
+ */
10
+ export declare function aggregate(oldResults?: HomeSearchResult[], newResults?: HomeSearchResult[], order?: ScoreOrder): HomeSearchResult[];
@@ -0,0 +1,13 @@
1
+ import { HomeSearchListenerResponse, HomeSearchResult, ScoreOrder } from '../../../../client-api/src/shapes';
2
+ import { InternalSearchListenerRequest, InternalSearchListenerResponseStatus, SearchRequest } from '../shapes/home';
3
+ export interface InternalSearchListenerResponse {
4
+ getResultBuffer(): HomeSearchResult[];
5
+ setResultBuffer(results: HomeSearchResult[]): void;
6
+ getRevokedBuffer(): string[];
7
+ setRevokedBuffer(resultIds: string[]): void;
8
+ onChange(): void;
9
+ getStatus(): InternalSearchListenerResponseStatus;
10
+ res: HomeSearchListenerResponse;
11
+ }
12
+ export declare function makeInternalSearchListenerResponse(scoreOrder?: ScoreOrder): InternalSearchListenerResponse;
13
+ export declare function makeInternalSearchListenerRequest(id: string, req: SearchRequest): InternalSearchListenerRequest;
@@ -0,0 +1,186 @@
1
+ import { DispatchedSearchResult, HomeSearchListenerRequest, HomeSearchResult } from '../../../../client-api/src/shapes';
2
+ import { HomeProviderInternal } from '../../../../common/src/api/provider';
3
+ /**
4
+ * The ids of home providers that are built into Home.
5
+ */
6
+ export declare const HomeBuiltInProviderID: {
7
+ /**
8
+ * Built in Home provider that provides commands.
9
+ */
10
+ readonly commands: "home-commands";
11
+ };
12
+ /**
13
+ * The ids of home providers that are built into Home.
14
+ */
15
+ export declare const HomeBuiltInProviderUniqueID: {
16
+ /**
17
+ * Built in Home provider that provides commands.
18
+ */
19
+ readonly commands: string;
20
+ };
21
+ export declare const HOME_SEARCH_CHANNEL_NAME: "__search-openfin-browser-home-topic__";
22
+ export type HomeClientApiDispatchRequest = {
23
+ providerId: string;
24
+ result: DispatchedSearchResult;
25
+ };
26
+ export type HomeClientApiSearchCloseRequest = {
27
+ id: string;
28
+ };
29
+ export type HomeClientApiDataRequest = {
30
+ id: string;
31
+ query: string;
32
+ context: any;
33
+ providerId: string;
34
+ targets: string[];
35
+ };
36
+ export interface HomeInternalDataResponse extends SearchResponse {
37
+ id: string;
38
+ providerId: string;
39
+ revoked?: string[];
40
+ status?: InternalSearchListenerResponseStatus;
41
+ }
42
+ export interface HomeInternalErrorResponse {
43
+ error: string;
44
+ }
45
+ interface SearchResponse {
46
+ results: HomeSearchResult[];
47
+ context?: any;
48
+ }
49
+ export interface InternalDataResponse extends SearchResponse {
50
+ id: string;
51
+ providerId: string;
52
+ revoked?: string[];
53
+ status?: InternalSearchListenerResponseStatus;
54
+ }
55
+ export interface InternalSearchListenerRequest {
56
+ close(): void;
57
+ req: HomeSearchListenerRequest;
58
+ }
59
+ export interface SearchRequest {
60
+ /** The search query. */
61
+ query: string;
62
+ /** Additional custom context that can be used for searching. */
63
+ context?: Partial<HomeSearchListenerRequest['context']>;
64
+ /** A list of search provider names to execute the search request against. */
65
+ targets?: string[];
66
+ }
67
+ /**
68
+ * Message for dispatching a search request.
69
+ * This interface is used when sending a dispatch request from a remote OpenFin identity
70
+ * to the search topic creator.
71
+ */
72
+ export interface InternalSearchRequest extends SearchRequest {
73
+ /**
74
+ * The id of the search request.
75
+ * On initial search request from remote provider, this ID is generated.
76
+ * The remote OpenFin identity is required to pass this id on all subsequent requests.
77
+ */
78
+ id?: string;
79
+ }
80
+ export interface InternalSearchResponse {
81
+ /**
82
+ * The ID of the search request the response pertains to.
83
+ */
84
+ id: string;
85
+ /**
86
+ * True if the all search providers have responded to the search request.
87
+ */
88
+ done?: boolean;
89
+ /**
90
+ * The state of the search response generator.
91
+ */
92
+ state: SearchProviderResponseGeneratorState;
93
+ /**
94
+ * The current list of responses.
95
+ */
96
+ value: SearchProviderResponse[];
97
+ }
98
+ export type SearchProviderResponseGenerator = AsyncGenerator<SearchProviderResponse[], SearchProviderResponse[], SearchProviderResponse[]>;
99
+ export interface SearchProviderResponse {
100
+ /**
101
+ * The search provider that responded with the search results.
102
+ */
103
+ provider: HomeProviderInternal;
104
+ /**
105
+ * If the search result succeeds for this provider, results of the search will be set.
106
+ */
107
+ results?: HomeSearchResult[];
108
+ /**
109
+ * A context with custom data to pass through search
110
+ */
111
+ context?: any;
112
+ /**
113
+ * If the search failed for this provider, error will be set.
114
+ */
115
+ error?: Error;
116
+ }
117
+ export declare enum SearchProviderResponseGeneratorState {
118
+ /**
119
+ * The generator is in the process of fetching the initial set of results from search providers.
120
+ */
121
+ Fetching = "fetching",
122
+ /**
123
+ * The generator has fetched all initial results, and is now waiting for search providers with
124
+ * open {@link SearchListenerResponse} streams to push new or updated search results.
125
+ */
126
+ Fetched = "fetched",
127
+ /**
128
+ * All open {@link SearchListenerResponse} streams have closed, completing the request.
129
+ * In this state, the set of responses returned by `generator.next()` are final.
130
+ */
131
+ Complete = "complete"
132
+ }
133
+ export type InternalSearchResponseGeneratorHooks = {
134
+ setState(state: SearchProviderResponseGeneratorState): void;
135
+ };
136
+ export interface InternalErrorResponse {
137
+ /**
138
+ * An error message, denoting that something went wrong.
139
+ */
140
+ error: string;
141
+ }
142
+ export interface SearchProviderResponseGeneratorExtended extends SearchProviderResponseGenerator {
143
+ /**
144
+ * The id of the search request.
145
+ */
146
+ id: string;
147
+ /**
148
+ * The state of the search provider response generator.
149
+ */
150
+ state: SearchProviderResponseGeneratorState;
151
+ /**
152
+ * Notifies all search providers related to this search request
153
+ * that the search requester is no longer listening for new or updated search results.
154
+ * @experimental
155
+ */
156
+ close: () => void;
157
+ }
158
+ export interface InternalDispatchRequest {
159
+ result: DispatchedSearchResult;
160
+ providerId: string;
161
+ uniqueId: string;
162
+ }
163
+ export declare enum InternalSearchListenerResponseStatus {
164
+ /**
165
+ * The initial status of a new search listener response object.
166
+ *
167
+ * Denotes that the search provider listener has not taken use of the search listener response object,
168
+ * as in `response.open()` nor `response.close()` has not been called yet.
169
+ */
170
+ Initial = 0,
171
+ /**
172
+ * Denotes that the search provider is done sending new or updated search results
173
+ * for the corresponding request.
174
+ */
175
+ Open = 1,
176
+ /**
177
+ * Denotes that the search provider is done sending new or updated search results
178
+ * for the corresponding request.
179
+ */
180
+ Close = 2
181
+ }
182
+ export type SearchQueryWithProviderID = {
183
+ query: string;
184
+ providerID: string;
185
+ };
186
+ export {};
@@ -1,11 +1,11 @@
1
1
  import type OpenFin from '@openfin/core';
2
2
  import type { ThemePaletteSet } from '@openfin/ui-library';
3
3
  import { ColorSchemeOptionType } from '../../../client-api-platform/src/shapes';
4
- export declare type WorkspaceComponentSetSelectedSchemePayload = {
4
+ export type WorkspaceComponentSetSelectedSchemePayload = {
5
5
  newScheme: ColorSchemeOptionType;
6
6
  identity: OpenFin.Identity;
7
7
  };
8
- export declare type BrowserSetSelectedSchemePayload = string;
8
+ export type BrowserSetSelectedSchemePayload = string;
9
9
  export interface ComputedThemes extends Array<ComputedTheme> {
10
10
  }
11
11
  export interface ComputedTheme {
@@ -0,0 +1 @@
1
+ export {};
@@ -1,18 +1,18 @@
1
- export declare type Role = string;
2
- export declare type AriaOwns = undefined | string;
3
- export declare type AriaHaspopup = boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
4
- export declare type AriaAutocomplete = 'none' | 'inline' | 'list' | 'both';
5
- export declare type AriaControls = undefined | string;
6
- export declare type AriaActivedescendant = undefined | string;
7
- export declare type AriaExpanded = boolean | 'false' | 'true';
8
- export declare type AriaLive = 'none' | 'polite' | 'assertive';
9
- export declare type A11yBox = {
1
+ export type Role = string;
2
+ export type AriaOwns = undefined | string;
3
+ export type AriaHaspopup = boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
4
+ export type AriaAutocomplete = 'none' | 'inline' | 'list' | 'both';
5
+ export type AriaControls = undefined | string;
6
+ export type AriaActivedescendant = undefined | string;
7
+ export type AriaExpanded = boolean | 'false' | 'true';
8
+ export type AriaLive = 'none' | 'polite' | 'assertive';
9
+ export type A11yBox = {
10
10
  'role': Role;
11
11
  'aria-expanded': AriaExpanded;
12
12
  'aria-owns': AriaOwns;
13
13
  'aria-haspopup': AriaHaspopup;
14
14
  };
15
- export declare type A11yInput = {
15
+ export type A11yInput = {
16
16
  'aria-controls': AriaControls;
17
17
  'aria-autocomplete': AriaAutocomplete;
18
18
  'aria-activedescendant': AriaActivedescendant;
@@ -12,11 +12,11 @@ export interface ApplicationEvent {
12
12
  name?: string;
13
13
  uuid?: string;
14
14
  }
15
- export declare type ApplicationListener = (ev: ApplicationEvent) => void;
15
+ export type ApplicationListener = (ev: ApplicationEvent) => void;
16
16
  export declare enum LaunchModeType {
17
17
  FinProtocol = "fin-protocol"
18
18
  }
19
- export declare type ApplicationInfoExtended = OpenFin.ApplicationInfo & {
19
+ export type ApplicationInfoExtended = OpenFin.ApplicationInfo & {
20
20
  initialOptions: OpenFin.ApplicationInfo['initialOptions'] & {
21
21
  userAppConfigArgs: any;
22
22
  };
@@ -5,7 +5,7 @@ export declare enum MenuItemType {
5
5
  Submenu = "submenu",
6
6
  Checkbox = "checkbox"
7
7
  }
8
- export declare type ShowContextMenuResponse = OpenFin.MenuResult & {
8
+ export type ShowContextMenuResponse = OpenFin.MenuResult & {
9
9
  data: string;
10
10
  };
11
11
  export default function showContextMenu(opts: OpenFin.ShowPopupMenuOptions, win?: OpenFin.Window): Promise<ShowContextMenuResponse>;
@@ -1,7 +1,7 @@
1
1
  import type OpenFin from '@openfin/core';
2
2
  import { AttachedPage, PageLayout } from '../../../client-api-platform/src/shapes';
3
3
  import { WindowIdentity } from './window';
4
- export declare type LayoutDOMEventType =
4
+ export type LayoutDOMEventType =
5
5
  /**
6
6
  * Fired when a tab is created in a container. (Emmitted by core)
7
7
  */
@@ -10,7 +10,7 @@ export declare type LayoutDOMEventType =
10
10
  * Fired when the layout container is ready to be used. (Emitted by us)
11
11
  */
12
12
  | 'container-resized';
13
- export declare type LayoutDOMEvent = {
13
+ export type LayoutDOMEvent = {
14
14
  type: Extract<LayoutDOMEventType, 'container-resized'>;
15
15
  } | {
16
16
  type: Extract<LayoutDOMEventType, 'tab-created'>;
@@ -24,7 +24,7 @@ export declare type LayoutDOMEvent = {
24
24
  };
25
25
  isInitialized: boolean;
26
26
  };
27
- export declare type LayoutDOMEventListener = (ev: LayoutDOMEvent) => void;
27
+ export type LayoutDOMEventListener = (ev: LayoutDOMEvent) => void;
28
28
  export declare const getFirstViewFromLayout: (identity?: WindowIdentity) => Promise<{
29
29
  name: any;
30
30
  uuid: any;
@@ -1,7 +1,7 @@
1
1
  import type OpenFin from '@openfin/core';
2
2
  import { ModalResponseContent } from '../../../common/src/utils/menu-config';
3
3
  import type { OptionalExceptFor } from '../../../common/src/utils/types';
4
- declare type MenuEventTypes = {
4
+ type MenuEventTypes = {
5
5
  response: [ModalResponseEvent];
6
6
  ready: [OpenFin.Identity];
7
7
  update: [string, Partial<OpenFin.Bounds>, string];
@@ -17,7 +17,7 @@ export declare const menuEvents: {
17
17
  once: <EventKey_3 extends keyof MenuEventTypes>(event: EventKey_3, listener: (...payload: MenuEventTypes[EventKey_3]) => void) => void;
18
18
  };
19
19
  export declare const emitMenuResponse: (data: ModalResponseEvent['data']) => Promise<void>;
20
- declare type WindowOptionsWithBounds = OptionalExceptFor<OpenFin.WindowOptions, 'name' | 'url'> & {
20
+ type WindowOptionsWithBounds = OptionalExceptFor<OpenFin.WindowOptions, 'name' | 'url'> & {
21
21
  top: number;
22
22
  left: number;
23
23
  };
@@ -8,7 +8,6 @@ export declare enum PageRoute {
8
8
  HomeSearch = "/home/?deeplink=search",
9
9
  HomePagesRename = "/home/pages/rename/",
10
10
  Dock = "/dock/",
11
- HomeIndicator = "/home/indicator/",
12
11
  Browser = "/browser/",
13
12
  BrowserPopupMenu = "/browser/popup-menu/",
14
13
  Provider = "/provider/",
@@ -1,13 +1,13 @@
1
1
  import type OpenFin from '@openfin/core';
2
- export declare type SnapshotDetailsExtended = OpenFin.Snapshot['snapshotDetails'] & {
2
+ export type SnapshotDetailsExtended = OpenFin.Snapshot['snapshotDetails'] & {
3
3
  machineId: string;
4
4
  machineName?: string;
5
5
  };
6
- export declare type SnapshotExtended = {
6
+ export type SnapshotExtended = {
7
7
  snapshotDetails: SnapshotDetailsExtended;
8
8
  windows: OpenFin.WindowOptions[];
9
9
  };
10
- export declare type ApplySnapshotOptionsExtended = OpenFin.ApplySnapshotOptions & {
10
+ export type ApplySnapshotOptionsExtended = OpenFin.ApplySnapshotOptions & {
11
11
  attachToExistingWindow: boolean;
12
12
  };
13
13
  /**