@openfin/workspace 1.8.0 → 4.0.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.
Files changed (62) hide show
  1. package/README.md +121 -4
  2. package/client-api/src/common.d.ts +6 -0
  3. package/{index.test.d.ts → client-api/src/common.test.d.ts} +0 -0
  4. package/client-api/src/home.d.ts +19 -0
  5. package/{umd.d.ts → client-api/src/home.test.d.ts} +0 -0
  6. package/client-api/src/index.d.ts +11 -0
  7. package/client-api/src/index.test.d.ts +1 -0
  8. package/{logger.d.ts → client-api/src/logger.d.ts} +0 -0
  9. package/client-api/src/shapes.d.ts +573 -0
  10. package/client-api/src/storefront.d.ts +18 -0
  11. package/client-api/src/storefront.test.d.ts +1 -0
  12. package/client-api/src/umd.d.ts +1 -0
  13. package/common/src/api/home.d.ts +27 -0
  14. package/common/src/api/protocol.d.ts +88 -0
  15. package/common/src/api/search.d.ts +7 -0
  16. package/common/src/api/shapes.d.ts +20 -0
  17. package/common/src/api/storefront.d.ts +70 -0
  18. package/common/src/utils/application.d.ts +41 -0
  19. package/common/src/utils/channels.d.ts +8 -0
  20. package/common/src/utils/env.d.ts +27 -0
  21. package/common/src/utils/logger/index.d.ts +26 -0
  22. package/common/src/utils/logger/manager.d.ts +35 -0
  23. package/common/src/utils/logger/shapes.d.ts +27 -0
  24. package/common/src/utils/window.d.ts +145 -0
  25. package/index.d.ts +2 -6
  26. package/index.js +1 -1
  27. package/index.js.map +1 -1
  28. package/package.json +1 -1
  29. package/search-api/src/client/index.d.ts +6 -0
  30. package/search-api/src/client/internal.d.ts +38 -0
  31. package/search-api/src/client/remote/channel-client-factory.d.ts +2 -0
  32. package/search-api/src/client/remote/channel-client.d.ts +9 -0
  33. package/search-api/src/client/remote/data.d.ts +16 -0
  34. package/search-api/src/client/remote/disconnect.d.ts +7 -0
  35. package/search-api/src/client/remote/dispatch.d.ts +9 -0
  36. package/search-api/src/client/remote/requests.d.ts +5 -0
  37. package/search-api/src/client/remote/search-close.d.ts +14 -0
  38. package/search-api/src/common.d.ts +104 -0
  39. package/search-api/src/errors.d.ts +5 -0
  40. package/search-api/src/fin/index.d.ts +6 -0
  41. package/search-api/src/fin/shapes.d.ts +23 -0
  42. package/search-api/src/index.d.ts +7 -0
  43. package/search-api/src/internal-shapes.d.ts +134 -0
  44. package/search-api/src/logger.d.ts +1 -0
  45. package/search-api/src/provider/index.d.ts +8 -0
  46. package/search-api/src/provider/internal.d.ts +33 -0
  47. package/search-api/src/provider/remote/channel-factory.d.ts +6 -0
  48. package/search-api/src/provider/remote/channel.d.ts +23 -0
  49. package/search-api/src/provider/remote/connection.d.ts +20 -0
  50. package/search-api/src/provider/remote/data.d.ts +23 -0
  51. package/search-api/src/provider/remote/deregistration.d.ts +5 -0
  52. package/search-api/src/provider/remote/disconnect.d.ts +1 -0
  53. package/search-api/src/provider/remote/disconnection.d.ts +9 -0
  54. package/search-api/src/provider/remote/dispatch.d.ts +7 -0
  55. package/search-api/src/provider/remote/info.d.ts +5 -0
  56. package/search-api/src/provider/remote/registration.d.ts +23 -0
  57. package/search-api/src/provider/remote/search-close.d.ts +14 -0
  58. package/search-api/src/provider/remote/search.d.ts +8 -0
  59. package/search-api/src/shapes.d.ts +541 -0
  60. package/common.d.ts +0 -6
  61. package/content-store.d.ts +0 -14
  62. package/shapes.d.ts +0 -272
package/shapes.d.ts DELETED
@@ -1,272 +0,0 @@
1
- /**
2
- * API reference for the Workspace Client APIs.
3
- */
4
- /**
5
- * Describes the type of the app directory entry `manifest` attributes.
6
- * Launch mechanics are determined by the manifest type.
7
- */
8
- export declare enum AppManifestType {
9
- /**
10
- * A snapshot manifest.
11
- */
12
- Snapshot = "snapshot",
13
- /**
14
- * A classic OpenFin app manifest.
15
- */
16
- Manifest = "manifest",
17
- /**
18
- * A view manifest.
19
- */
20
- View = "view",
21
- /**
22
- * A manifest for an external application.
23
- */
24
- External = "external"
25
- }
26
- export interface AppIntent {
27
- name: string;
28
- displayName: string;
29
- contexts: string[];
30
- }
31
- /**
32
- * Detailed metadata describing an image.
33
- */
34
- export interface Image {
35
- src: string;
36
- type?: string;
37
- size?: string;
38
- purpose?: string;
39
- }
40
- /**
41
- * Detailed metadata describing an application.
42
- */
43
- export interface App {
44
- /**
45
- * Unique identifier for an application.
46
- */
47
- appId: string;
48
- /**
49
- * A UI friendly title for the application.
50
- */
51
- title: string;
52
- /**
53
- * URL to application manifest.
54
- */
55
- manifest: string;
56
- /**
57
- * UI friendly description for an application.
58
- */
59
- description?: string;
60
- /**
61
- * Describes the type of manifest resolved by the `manifest` field.
62
- * Launch mechanics are determined by the manifest type.
63
- */
64
- manifestType: AppManifestType | string;
65
- /**
66
- * A list of icons that can be rendered in UI for this application.
67
- */
68
- icons: Image[];
69
- /**
70
- * A list of optional images that highlight application functionality.
71
- */
72
- images?: Image[];
73
- intents?: AppIntent[];
74
- tags?: string[];
75
- version?: string;
76
- publisher: string;
77
- contactEmail?: string;
78
- supportEmail?: string;
79
- }
80
- export declare enum ContentStoreTemplate {
81
- LandingPage = "landingPage",
82
- AppGrid = "appGrid"
83
- }
84
- /**
85
- * Represents a link to be rendered inside Content Store.
86
- */
87
- export interface ContentStoreLink {
88
- /**
89
- * A UI friendly title to render the link as.
90
- */
91
- title: string;
92
- /**
93
- * When the rendered `title` text is clicked, the user will be navigated to this URL.
94
- */
95
- url: string;
96
- }
97
- export interface ContentStoreFooter {
98
- /**
99
- * A logo to be displayed on the Content Store's footer.
100
- */
101
- logo: Image;
102
- /**
103
- * A set of links to display on Content Store's footer.
104
- */
105
- links: [ContentStoreLink?, ContentStoreLink?, ContentStoreLink?];
106
- text: string;
107
- }
108
- /**
109
- * Render a navigation section on the left panel of Content Store.
110
- */
111
- export interface ContentStoreNavigationSection {
112
- /**
113
- * Unique identifier for the navigation section.
114
- */
115
- id: string;
116
- /**
117
- * The UI friendly title of the navigation section.
118
- */
119
- title: string;
120
- /**
121
- * Navigation items to render under this section.
122
- * 1-5 Navigation Items are supported.
123
- */
124
- items: [
125
- ContentStoreNavigationItem,
126
- ContentStoreNavigationItem?,
127
- ContentStoreNavigationItem?,
128
- ContentStoreNavigationItem?,
129
- ContentStoreNavigationItem?
130
- ];
131
- }
132
- export interface ContentStoreLandingPage {
133
- hero?: {
134
- title: string;
135
- description: string;
136
- cta: ContentStoreNavigationItem;
137
- image: Image;
138
- };
139
- topRow: {
140
- title: string;
141
- items: [
142
- ContentStoreDetailedNavigationItem?,
143
- ContentStoreDetailedNavigationItem?,
144
- ContentStoreDetailedNavigationItem?,
145
- ContentStoreDetailedNavigationItem?
146
- ];
147
- };
148
- middleRow: {
149
- title: string;
150
- apps: [App?, App?, App?, App?, App?, App?];
151
- };
152
- bottomRow: {
153
- title: string;
154
- items: [
155
- ContentStoreDetailedNavigationItem?,
156
- ContentStoreDetailedNavigationItem?,
157
- ContentStoreDetailedNavigationItem?
158
- ];
159
- };
160
- }
161
- /**
162
- * Render a grid of applications in content store.
163
- */
164
- export interface ContentStoreAppGrid {
165
- /**
166
- * The apps to render in the grid.
167
- */
168
- apps: App[];
169
- }
170
- export interface ContentStoreNavigationItemBase {
171
- /**
172
- * An ID for referencing the navigation item. Must be unique.
173
- */
174
- id: string;
175
- /**
176
- * UI friendly name for the navigation item.
177
- */
178
- title: string;
179
- }
180
- export interface ContentStoreNavigationItemDetails {
181
- description: string;
182
- image: Image;
183
- }
184
- /**
185
- * Template for rendering a navigation item that renders a app grid when clicked.
186
- */
187
- export interface ContentStoreNavigationItemAppGrid extends ContentStoreNavigationItemBase {
188
- templateId: ContentStoreTemplate.AppGrid;
189
- /**
190
- * Render an app grid when navigation item is pressed.
191
- */
192
- templateData: ContentStoreAppGrid;
193
- }
194
- /**
195
- * Template for rendering a navigation item that renders another landing page when clicked.
196
- */
197
- export interface ContentStoreNavigationItemLandingPage extends ContentStoreNavigationItemBase {
198
- templateId: ContentStoreTemplate.LandingPage;
199
- /**
200
- * Render a landing page when navigation item is pressed.
201
- */
202
- templateData: ContentStoreLandingPage;
203
- }
204
- /**
205
- * Render an item in the navigation bar of Content Store.
206
- */
207
- export declare type ContentStoreNavigationItem = ContentStoreNavigationItemAppGrid | ContentStoreNavigationItemLandingPage;
208
- /**
209
- * Render an item in the navigation bar of Content Store with a description and image.
210
- */
211
- export declare type ContentStoreDetailedNavigationItem = ContentStoreNavigationItem & ContentStoreNavigationItemDetails;
212
- export interface ContentStoreProviderInfo {
213
- /**
214
- * Unique identifier for the Content Store provider.
215
- */
216
- id: string;
217
- /**
218
- * A UI friendly title for the platform Content Store.
219
- * This will be used in the Content Store selection dropdown.
220
- */
221
- title: string;
222
- }
223
- /**
224
- * Describes a Content Store provided by a platform.
225
- * A platform must provide an object that satisfies this interface in order to register with the Content Store.
226
- */
227
- export interface ContentStoreProvider extends ContentStoreProviderInfo {
228
- /**
229
- * Get a list of apps to populate the platform's Content Store with.
230
- */
231
- getApps(): Promise<App[]>;
232
- /**
233
- * Get the main landing page for the platform's Content Store.
234
- */
235
- getLandingPage(): Promise<ContentStoreLandingPage>;
236
- /**
237
- * Get the Content Store navigation sections for the left nav bar.
238
- */
239
- getNavigation(): Promise<[ContentStoreNavigationSection?, ContentStoreNavigationSection?]>;
240
- /**
241
- * Get the footer for the platform's Content Store.
242
- */
243
- getFooter(): Promise<ContentStoreFooter>;
244
- /**
245
- * Launch an app provided by the platform's Content Store.
246
- */
247
- launchApp(app: App): Promise<void>;
248
- }
249
- /**
250
- * Interface that contains functions for integrating with Content Store.
251
- */
252
- export interface ContentStoreAPI {
253
- /**
254
- * Register a Content Store provider.
255
- * @param provider the implementation of a Content Store provider.
256
- */
257
- register(provider: ContentStoreProvider): Promise<void>;
258
- /**
259
- * Show the Content Store UI.
260
- */
261
- show(): Promise<void>;
262
- /**
263
- * Hide the Content Store UI.
264
- */
265
- hide(): Promise<void>;
266
- }
267
- export declare const ContentStore: ContentStoreAPI;
268
- /**
269
- * Default Workspace implementation for launching an application.
270
- * @param app the application to launch.
271
- */
272
- export declare const launchApp: (app: App) => Promise<void>;