@openfin/workspace-platform 5.3.1 → 5.6.3

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,4 +1,5 @@
1
- import type { Fin as BaseFin, Identity as AdapterIdentity } from 'openfin-adapter';
1
+ /// <reference types="openfin-adapter/fin" />
2
+ import type { Fin as BaseFin } from 'openfin-adapter';
2
3
  import type { EntityType } from 'openfin-adapter/src/shapes/EntityType';
3
4
  /**
4
5
  * Create a topic.
@@ -32,7 +33,7 @@ export declare type Fin<T extends EntityType> = BaseFin<T> & {
32
33
  /**
33
34
  * An object that represents a unique OpenFin identity.
34
35
  */
35
- export declare type Identity = AdapterIdentity;
36
+ export declare type Identity = OpenFin.Identity;
36
37
  /**
37
38
  * A response to a search from a search provider.
38
39
  */
@@ -393,6 +394,15 @@ export interface SearchListenerRequest extends SearchRequest {
393
394
  onClose(listener: () => void): void;
394
395
  /**
395
396
  * Remove a registered listener.
397
+ *
398
+ * ```ts
399
+ *
400
+ * function myListener(request, listener) {
401
+ * // Do something
402
+ * }
403
+ *
404
+ * request.removeListener(myListener);
405
+ * ```
396
406
  * @param listener the listener to remove.
397
407
  */
398
408
  removeListener(listener: () => void): void;
@@ -422,22 +432,55 @@ export interface SearchListenerResponse {
422
432
  * there are new or updated search results that have yet to be pushed
423
433
  * by the current provider.
424
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
+ * ```
425
444
  */
426
445
  open(): void;
427
446
  /**
428
447
  * Close the response stream.
429
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
+ * ```
430
458
  * @experimental
431
459
  */
432
460
  close(): void;
433
461
  /**
434
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
+ *
435
474
  * @param results new or updated search results to respond with.
436
475
  * @experimental
437
476
  */
438
477
  respond(results: SearchResult[]): void;
439
478
  /**
440
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
+ * ```
441
484
  * @param resultKeys the keys of the search results to revoke.
442
485
  * @experimental
443
486
  */