@openfin/workspace 20.3.2 → 20.3.4

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
1
  import type OpenFin from '@openfin/core';
2
2
  import { App } from '../../../client-api/src/shapes';
3
+ import { SearchProvider } from '../../../client-api-platform/src/shapes';
3
4
  import type { LaunchAppRequest, SearchSitesRequest, SearchSitesResponse, Site } from '../shapes';
4
5
  /**
5
6
  * Launch the app described by an App Directory entry.
@@ -13,6 +14,9 @@ export declare function getResults(payload: {
13
14
  } & {
14
15
  identity: OpenFin.Identity;
15
16
  }): Promise<SearchSitesResponse>;
17
+ export declare function getSearchProviders(payload: {
18
+ identity: OpenFin.Identity;
19
+ }): Promise<SearchProvider[]>;
16
20
  export declare function getCuratedContent(payload: {
17
21
  identity: OpenFin.Identity;
18
22
  }): Promise<Site[]>;
@@ -1100,11 +1100,13 @@ export interface BrowserWindowModule {
1100
1100
  /** @internal */
1101
1101
  _getFrequentlyVisitedSites(req?: any): Promise<any[]>;
1102
1102
  /** @internal */
1103
- _searchSites(req?: SearchSitesRequest): Promise<SearchSitesResponse>;
1103
+ _searchSites(req: SearchSitesRequest): Promise<SearchSitesResponse>;
1104
1104
  /** @internal */
1105
1105
  _getCuratedContent(req?: any): Promise<Site[]>;
1106
1106
  /** @internal */
1107
1107
  _handleRequestNavigation(args: NavigationRequest): Promise<void>;
1108
+ /** @internal */
1109
+ _getSearchProviders(req?: any): Promise<SearchProvider[]>;
1108
1110
  _bookmarks: BrowserBookmarks;
1109
1111
  }
1110
1112
  export interface BrowserBookmarks {
@@ -1156,12 +1158,42 @@ export type NavigationRequest = {
1156
1158
  * @internal
1157
1159
  */
1158
1160
  export type SearchSitesRequest = {
1159
- searchQuery: string;
1161
+ /**
1162
+ * The search query to use when searching for results.
1163
+ */
1164
+ query: string;
1165
+ /**
1166
+ * The ID of the query request. This prevents result contamination from other queries.
1167
+ */
1168
+ queryId: string;
1169
+ /**
1170
+ * The ID of the active search provider being queried.
1171
+ */
1172
+ providerId?: string;
1173
+ /**
1174
+ * Page number
1175
+ */
1176
+ pageNumber?: number;
1177
+ /**
1178
+ * Number of results per page
1179
+ */
1180
+ pageSize?: number;
1160
1181
  };
1161
1182
  /**
1162
1183
  * @internal
1163
1184
  */
1164
- export type SearchSitesResponse = Record<string, Site[]>;
1185
+ export type SearchProviderResult = {
1186
+ id: string;
1187
+ results?: Site[];
1188
+ pageNumber?: number;
1189
+ pageSize?: number;
1190
+ showViewMore?: boolean;
1191
+ queryId?: string;
1192
+ };
1193
+ /**
1194
+ * @internal
1195
+ */
1196
+ export type SearchSitesResponse = Array<SearchProviderResult>;
1165
1197
  /**
1166
1198
  * @internal
1167
1199
  */
@@ -2695,3 +2727,14 @@ export interface EnterpriseDockChannelProvider extends Omit<OpenFin.ChannelProvi
2695
2727
  dispatch: <T extends keyof EnterpriseDockChannelClientChannelActions>(to: OpenFin.ClientIdentity, action: T, payload: Parameters<EnterpriseDockChannelClientChannelActions[T]>[0]) => Promise<Awaited<ReturnType<EnterpriseDockChannelClientChannelActions[T]>>>;
2696
2728
  register: <T extends keyof EnterpriseDockChannelProviderChannelActions>(action: T, handler: (payload: Parameters<EnterpriseDockChannelProviderChannelActions[T]>[0], id: OpenFin.ProviderIdentity | OpenFin.ClientIdentity) => Promise<Awaited<ReturnType<EnterpriseDockChannelProviderChannelActions[T]>>>) => boolean;
2697
2729
  }
2730
+ /**
2731
+ * Enterprise: Shape of provider for Search Tabs.
2732
+ * @internal
2733
+ */
2734
+ export interface SearchProvider {
2735
+ id: string;
2736
+ title: string;
2737
+ isTab?: boolean;
2738
+ icon?: string;
2739
+ supportsQueryless?: boolean;
2740
+ }
@@ -60,7 +60,8 @@ export declare enum PageChannelAction {
60
60
  export declare enum EnterpriseAppDirectoryChannelAction {
61
61
  GetApps = "get-apps",
62
62
  GetCuratedContent = "get-curated-content",
63
- GetRecentlyVisited = "get-recently-visited"
63
+ GetRecentlyVisited = "get-recently-visited",
64
+ GetSearchProviders = "get-search-providers"
64
65
  }
65
66
  /**
66
67
  * @internal
@@ -70,6 +70,7 @@ export declare enum WorkspacePlatformChannelAction {
70
70
  GetRecentlyVisitedSitesInternal = "getRecentlyVisitedSitesInternal",
71
71
  GetFrequentlyVisitedSitesInternal = "getFrequentlyVisitedSitesInternal",
72
72
  SearchSitesInternal = "searchSitesInternal",
73
+ GetSearchProvidersInternal = "getSearchProvidersInternal",
73
74
  GetCuratedContentInternal = "getCuratedContentInternal",
74
75
  HandleRequestNavigationInternal = "handleRequestNavigationInternal",
75
76
  RefreshBookmarksInternal = "refreshBookmarksInternal",
@@ -11,3 +11,4 @@ export declare const createBookmarkPanelActionsMonitorChannel: () => Promise<Ope
11
11
  export declare const connectToBookmarkPanelActionsMonitor: () => Promise<OpenFin.ChannelClient>;
12
12
  export declare const createContextMenuChannel: () => Promise<OpenFin.ChannelProvider>;
13
13
  export declare const connectToContextMenuChannel: () => Promise<OpenFin.ChannelClient>;
14
+ export declare const connectToEnterpriseContentChannel: (uuid: string) => Promise<OpenFin.ChannelClient>;
@@ -11,7 +11,7 @@ export declare const isDocumentDefined: boolean;
11
11
  export declare const isWindowDefinedWithIndexDB: boolean;
12
12
  export declare const finUUID: string;
13
13
  export declare const finName: string;
14
- export declare const finEntityType: "" | "view" | "window";
14
+ export declare const finEntityType: "" | "window" | "view";
15
15
  export declare const isEnvLocal: boolean;
16
16
  export declare const isEnvDev: boolean;
17
17
  export declare const isEnvStaging: boolean;
@@ -19,6 +19,7 @@ export type SearchMenuChannelUpdateState = {
19
19
  searchText?: string;
20
20
  keyboardEvent?: BrowserSearchMenuKeyboardEvent;
21
21
  shouldExpandMenu?: SearchViewExpansionState;
22
+ offsetLeft?: number;
22
23
  type: 'update-search-menu-state';
23
24
  };
24
25
  export type BrowserSearchMenuKeyboardEvent = {
@@ -63,8 +64,6 @@ export type SearchMenuChannelResponse = {
63
64
  handled?: boolean;
64
65
  } | {
65
66
  type: 'resize-view';
66
- isExpanded: boolean;
67
- height: number;
68
67
  width: number;
69
68
  } | {
70
69
  type: 'keyboard-event';