@openfin/workspace-platform 5.5.0 → 5.7.2

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 (33) hide show
  1. package/README.md +1 -1
  2. package/client-api/src/shapes.d.ts +279 -3
  3. package/client-api-platform/src/api/app-directory.d.ts +1 -1
  4. package/client-api-platform/src/api/browser/browser-module.d.ts +3 -0
  5. package/client-api-platform/src/api/browser/index.d.ts +3 -2
  6. package/client-api-platform/src/api/context-menu/browser-logo-handler.d.ts +4 -0
  7. package/client-api-platform/src/api/context-menu/browser-viewtab-handler.d.ts +4 -0
  8. package/client-api-platform/src/api/context-menu/index.d.ts +10 -0
  9. package/client-api-platform/src/api/index.d.ts +4 -0
  10. package/client-api-platform/src/api/protocol.d.ts +5 -3
  11. package/client-api-platform/src/api/workspace-module.d.ts +1 -1
  12. package/client-api-platform/src/index.d.ts +2 -40
  13. package/client-api-platform/src/init/custom-actions.d.ts +3 -0
  14. package/client-api-platform/src/init/index.d.ts +35 -3
  15. package/client-api-platform/src/init/override-callback.d.ts +2 -1
  16. package/client-api-platform/src/init/utils.d.ts +3 -2
  17. package/client-api-platform/src/shapes.d.ts +233 -3
  18. package/common/src/api/browser-protocol.d.ts +21 -0
  19. package/common/src/api/pages/attached.d.ts +0 -1
  20. package/common/src/api/pages/legacy.d.ts +1 -1
  21. package/common/src/api/pages/shapes.d.ts +9 -0
  22. package/common/src/utils/context-menu.d.ts +12 -0
  23. package/common/src/utils/env.d.ts +0 -7
  24. package/common/src/utils/global-context-menu.d.ts +3 -0
  25. package/common/src/utils/landing-page.d.ts +11 -0
  26. package/common/src/utils/layout.d.ts +2 -1
  27. package/common/src/utils/merge-deep.d.ts +6 -0
  28. package/common/src/utils/strings.d.ts +0 -2
  29. package/common/src/utils/window.d.ts +1 -0
  30. package/index.js +1 -1
  31. package/index.js.map +1 -1
  32. package/package.json +1 -1
  33. package/search-api/src/shapes.d.ts +42 -0
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@openfin/workspace-platform","description":"An API for creating your own Workspace platform.","contributors":[],"version":"5.5.0","main":"index.ts","scripts":{"deploy":"npm run deploy:npm && npm run deploy:docs","deploy:npm":"cd out && npm publish","deploy:docs":"aws s3 cp --recursive ./docs/ s3://cdn.openfin.co/workspace/api/platform/docs/","deploy:next":"npm run deploy:next:npm && npm run deploy:next:docs","deploy:next:npm":"cd out && npm publish --tag next","deploy:next:docs":"aws s3 cp --recursive ./docs/ s3://cdn.openfin.co/workspace/api/platform/docs/next/","cp:readme":"copyfiles README.md out","cp:package":"node ../common/scripts/cp-package.js","create:rootIndex":"node ../common/scripts/cp-root-index.js","package":"npm run cp:readme && npm run cp:package && npm run create:rootIndex","clean":"rimraf ./out && rimraf ./docs","build:common":"cross-env ENV=prod webpack --mode=production --config ./webpack.common.config.js","build":"npm run clean && npm run build:common && npm run build:docs","build:docs":"typedoc --tsconfig ./tsconfig.json --readme none --disableSources ./src/index.ts","test":"jest --watch --colors","test:ci":"jest","check":"node ../common/scripts/check-npm.js"},"keywords":["client","api","workspace","platform"],"license":"MIT"}
1
+ {"name":"@openfin/workspace-platform","description":"An API for creating your own Workspace platform.","contributors":[],"version":"5.7.2","main":"index.js","scripts":{"promote:docs":"chmod +x ../common/scripts/deploy-latest-docs.sh && ./scripts/deploy-latest-docs.sh $(node ../common/scripts/echo-version.js) /platform","promote":"node ../common/scripts/promote-npm.js && npm run promote:docs","deploy:next":"npm run deploy:next:npm && npm run deploy:next:docs","deploy:next:npm":"cd out && npm publish --tag next","deploy:next:docs":"DIR=/platform node ../common/scripts/archive-docs.js","cp:readme":"copyfiles README.md out","cp:package":"node ../common/scripts/cp-package.js","create:rootIndex":"node ../common/scripts/cp-root-index.js","package":"npm run cp:readme && npm run cp:package && npm run create:rootIndex","clean":"rimraf ./out && rimraf ./docs","build:common":"cross-env ENV=prod webpack --mode=production --config ./webpack.common.config.js","build":"npm run clean && npm run build:common && npm run build:docs","build:docs":"typedoc --tsconfig ./tsconfig.json --readme none --disableSources ./src/index.ts","test":"jest --watch --colors","test:ci":"jest"},"keywords":["client","api","workspace","platform"],"license":"MIT"}
@@ -394,6 +394,15 @@ export interface SearchListenerRequest extends SearchRequest {
394
394
  onClose(listener: () => void): void;
395
395
  /**
396
396
  * Remove a registered listener.
397
+ *
398
+ * ```ts
399
+ *
400
+ * function myListener(request, listener) {
401
+ * // Do something
402
+ * }
403
+ *
404
+ * request.removeListener(myListener);
405
+ * ```
397
406
  * @param listener the listener to remove.
398
407
  */
399
408
  removeListener(listener: () => void): void;
@@ -423,22 +432,55 @@ export interface SearchListenerResponse {
423
432
  * there are new or updated search results that have yet to be pushed
424
433
  * by the current provider.
425
434
  * @experimental
435
+ *
436
+ * ```ts
437
+ * import type { SearchListenerResponse } from './my-shape-definition';
438
+ * function openStream(response:SearchListenerResponse) {
439
+ * response.open();
440
+ * }
441
+ *
442
+ * openStream();
443
+ * ```
426
444
  */
427
445
  open(): void;
428
446
  /**
429
447
  * Close the response stream.
430
448
  * This notifies the requester that the current search provider is done sending results.
449
+ *
450
+ * ```ts
451
+ * import type { SearchListenerResponse } from './my-shape-definition';
452
+ * function closeStream(request:SearchListenerRequest, response:SearchListenerResponse) {
453
+ * response.close();
454
+ * }
455
+ *
456
+ * closeStream();
457
+ * ```
431
458
  * @experimental
432
459
  */
433
460
  close(): void;
434
461
  /**
435
462
  * Respond to the search request with new or updated search results.
463
+ *
464
+ * ```ts
465
+ *
466
+ * response.respond([
467
+ * { name: 'result-1' },
468
+ * { name: 'result-2' },
469
+ * { name: 'result-3' },
470
+ * ]);
471
+ *
472
+ * ```
473
+ *
436
474
  * @param results new or updated search results to respond with.
437
475
  * @experimental
438
476
  */
439
477
  respond(results: SearchResult[]): void;
440
478
  /**
441
479
  * Remove a search result from the list of responded search results.
480
+ *
481
+ * ```ts
482
+ * response.revoke({ name: 'result-1' }, { name: 'result-2' });
483
+ * ```
442
484
  * @param resultKeys the keys of the search results to revoke.
443
485
  * @experimental
444
486
  */