@interopio/workspaces-api 5.0.0-next.0 → 5.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.
package/workspaces.d.ts CHANGED
@@ -488,20 +488,67 @@ export namespace IOConnectWorkspaces {
488
488
  */
489
489
  allowSystemHibernation?: boolean;
490
490
 
491
+ /**
492
+ * Restrictions for dropping apps in the Workspace and allowing apps to appear in the "Add Apps" popup menu of the Workspace.
493
+ * @since io.Connect Desktop 10.5
494
+ * @since io.Connect Browser 4.6
495
+ * @since @interopio/workspaces-api 5.0.0
496
+ */
491
497
  appRestrictions?: AppRestrictions | undefined;
492
498
  }
493
499
 
500
+ /**
501
+ * Describes the default restrictions for dropping apps in a Workspace and allowing apps to appear in the "Add Apps" popup menu of a Workspace.
502
+ * @since io.Connect Desktop 10.5
503
+ * @since io.Connect Browser 4.6
504
+ * @since @interopio/workspaces-api 5.0.0
505
+ */
494
506
  export interface AppRestrictionRule {
507
+
508
+ /**
509
+ * If `true`, will allow an app to appear in the "Add Apps" popup menu of a Workspace.
510
+ */
495
511
  allowInApplicationPopup?: boolean;
512
+
513
+ /**
514
+ * If `true`, will allow an app to be dropped in a Workspace.
515
+ * *Available only in **io.Connect Desktop**.*
516
+ */
496
517
  allowDrop?: boolean;
497
518
  }
498
519
 
520
+ /**
521
+ * Describes the restrictions for dropping a specific app in a Workspace and allowing it to appear in the "Add Apps" popup menu of a Workspace.
522
+ * @since io.Connect Desktop 10.5
523
+ * @since io.Connect Browser 4.6
524
+ * @since @interopio/workspaces-api 5.0.0
525
+ */
499
526
  export interface AppRestrictionEntry extends AppRestrictionRule {
527
+
528
+ /**
529
+ * Name of the app, as defined within the io.Connect framework, for which to apply the specified restrictions.
530
+ */
500
531
  appName: string;
501
532
  }
502
533
 
534
+ /**
535
+ * Describes the restrictions for dropping apps in a Workspace and allowing apps to appear in the "Add Apps" popup menu of a Workspace.
536
+ * @since io.Connect Desktop 10.5
537
+ * @since io.Connect Browser 4.6
538
+ * @since @interopio/workspaces-api 5.0.0
539
+ */
503
540
  export interface AppRestrictions {
541
+
542
+ /**
543
+ * Array of objects describing the restrictions related to specific apps.
544
+ * The restrictions specified here will override the default restrictions specified via the `default` property.
545
+ */
504
546
  apps?: AppRestrictionEntry[];
547
+
548
+ /**
549
+ * Default restrictions that will be applied to all apps.
550
+ * The restrictions specified here can be overridden per app via the `apps` array.
551
+ */
505
552
  default?: AppRestrictionRule;
506
553
  }
507
554
 
@@ -1523,6 +1570,12 @@ export namespace IOConnectWorkspaces {
1523
1570
  */
1524
1571
  allowSystemHibernation?: boolean;
1525
1572
 
1573
+ /**
1574
+ * Restrictions for dropping apps in the Workspace and allowing apps to appear in the "Add Apps" popup menu of the Workspace.
1575
+ * @since io.Connect Desktop 10.5
1576
+ * @since io.Connect Browser 4.6
1577
+ * @since @interopio/workspaces-api 5.0.0
1578
+ */
1526
1579
  appRestrictions?: AppRestrictions;
1527
1580
  }
1528
1581
 
@@ -1597,7 +1650,7 @@ export namespace IOConnectWorkspaces {
1597
1650
  * Returns the first box in this workspace, which satisfies the provided predicate.
1598
1651
  * @param predicate A filtering function (predicate) called for each box present in this workspace.
1599
1652
  */
1600
- getBox(predicate: (box: WorkspaceBox) => boolean): WorkspaceBox;
1653
+ getBox(predicate: (box: WorkspaceBox) => boolean): WorkspaceBox | undefined;
1601
1654
 
1602
1655
  /**
1603
1656
  * Returns all boxes in this workspace, which satisfy the provided predicate. If no predicate was provided, will return all boxes.
@@ -1609,7 +1662,7 @@ export namespace IOConnectWorkspaces {
1609
1662
  * Returns the first row in this workspace, which satisfies the provided predicate.
1610
1663
  * @param predicate A filtering function (predicate) called for each row present in this workspace.
1611
1664
  */
1612
- getRow(predicate: (row: Row) => boolean): Row;
1665
+ getRow(predicate: (row: Row) => boolean): Row | undefined;
1613
1666
 
1614
1667
  /**
1615
1668
  * Returns all rows in this workspace, which satisfy the provided predicate. If no predicate was provided, will return all rows.
@@ -1621,7 +1674,7 @@ export namespace IOConnectWorkspaces {
1621
1674
  * Returns the first column in this workspace, which satisfies the provided predicate.
1622
1675
  * @param predicate A filtering function (predicate) called for each column present in this workspace.
1623
1676
  */
1624
- getColumn(predicate: (column: Column) => boolean): Column;
1677
+ getColumn(predicate: (column: Column) => boolean): Column | undefined;
1625
1678
 
1626
1679
  /**
1627
1680
  * Returns all columns in this workspace, which satisfy the provided predicate. If no predicate was provided, will return all column.
@@ -1633,7 +1686,7 @@ export namespace IOConnectWorkspaces {
1633
1686
  * Returns the first group in this workspace, which satisfies the provided predicate.
1634
1687
  * @param predicate A filtering function (predicate) called for each group present in this workspace.
1635
1688
  */
1636
- getGroup(predicate: (group: Group) => boolean): Group;
1689
+ getGroup(predicate: (group: Group) => boolean): Group | undefined;
1637
1690
 
1638
1691
  /**
1639
1692
  * Returns all groups in this workspace, which satisfy the provided predicate. If no predicate was provided, will return all groups.
@@ -1645,7 +1698,7 @@ export namespace IOConnectWorkspaces {
1645
1698
  * Returns the first window in this workspace, which satisfies the provided predicate.
1646
1699
  * @param predicate A filtering function (predicate) called for each window present in this workspace.
1647
1700
  */
1648
- getWindow(predicate: (window: WorkspaceWindow) => boolean): WorkspaceWindow;
1701
+ getWindow(predicate: (window: WorkspaceWindow) => boolean): WorkspaceWindow | undefined;
1649
1702
 
1650
1703
  /**
1651
1704
  * Returns all windows in this workspace, which satisfy the provided predicate. If no predicate was provided, will return all windows.
@@ -2522,7 +2575,7 @@ export namespace IOConnectWorkspaces {
2522
2575
  * Returns the first frame instance which satisfies the provided predicate or undefined, if non do.
2523
2576
  * @param predicate A filtering function (predicate) called for each open frame.
2524
2577
  */
2525
- getFrame(predicate: (frame: Frame) => boolean): Promise<Frame>;
2578
+ getFrame(predicate: (frame: Frame) => boolean): Promise<Frame | undefined>;
2526
2579
 
2527
2580
  /**
2528
2581
  * Returns all frames which satisfy the provided predicate. If no predicate is provided, will return all frames.
@@ -2546,7 +2599,7 @@ export namespace IOConnectWorkspaces {
2546
2599
  * Returns the first workspace instance which satisfies the provided predicate or undefined, if non do.
2547
2600
  * @param predicate A filtering function (predicate) called for each open workspace.
2548
2601
  */
2549
- getWorkspace(predicate: (workspace: Workspace) => boolean): Promise<Workspace>;
2602
+ getWorkspace(predicate: (workspace: Workspace) => boolean): Promise<Workspace | undefined>;
2550
2603
 
2551
2604
  /**
2552
2605
  * Returns an instance of the workspace with the passed id. The performance is better than getWorkspace when querying for a workspace by id.
@@ -2565,14 +2618,14 @@ export namespace IOConnectWorkspaces {
2565
2618
  * This function will search recursively in all open workspaces.
2566
2619
  * @param predicate A filtering function (predicate) called for each window in each open workspace.
2567
2620
  */
2568
- getWindow(predicate: (workspaceWindow: WorkspaceWindow) => boolean): Promise<WorkspaceWindow>;
2621
+ getWindow(predicate: (workspaceWindow: WorkspaceWindow) => boolean): Promise<WorkspaceWindow | undefined>;
2569
2622
 
2570
2623
  /**
2571
2624
  * Returns the instance of the first box, which satisfies the provided predicate.
2572
2625
  * This function will search recursively in all open workspaces.
2573
2626
  * @param predicate A filtering function (predicate) called for each box in each open workspace.
2574
2627
  */
2575
- getBox(predicate: (box: WorkspaceBox) => boolean): Promise<WorkspaceBox>;
2628
+ getBox(predicate: (box: WorkspaceBox) => boolean): Promise<WorkspaceBox | undefined>;
2576
2629
 
2577
2630
  /**
2578
2631
  * Opens a new workspace by restoring a previously saved workspace layout.