@unisphere/genie-types 1.39.7 → 1.39.8

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/index.esm.js CHANGED
@@ -1491,244 +1491,268 @@ var AnswerModelEnum;
1491
1491
  AnswerModelEnum["Smart"] = "smart";
1492
1492
  })(AnswerModelEnum || (AnswerModelEnum = {}));
1493
1493
 
1494
- const chatCustomizationSchema = {
1495
- type: 'object',
1496
- optional: true,
1497
- allowUnknownProperties: true,
1498
- properties: {
1499
- // @deprecated - no longer supported
1500
- context: {
1501
- type: 'orByType',
1502
- optional: true,
1503
- schemas: {
1504
- entry: {
1505
- type: 'object',
1506
- properties: {
1507
- type: {
1508
- type: 'literal',
1509
- value: 'entry'
1510
- },
1511
- entryId: {
1512
- type: 'primitive',
1513
- value: 'string'
1514
- }
1494
+ const chatCustomizationSchemaProperties = {
1495
+ // @deprecated - no longer supported
1496
+ context: {
1497
+ type: 'orByType',
1498
+ optional: true,
1499
+ schemas: {
1500
+ entry: {
1501
+ type: 'object',
1502
+ properties: {
1503
+ type: {
1504
+ type: 'literal',
1505
+ value: 'entry'
1506
+ },
1507
+ entryId: {
1508
+ type: 'primitive',
1509
+ value: 'string'
1515
1510
  }
1516
1511
  }
1517
1512
  }
1518
- },
1519
- general: {
1520
- type: 'object',
1521
- optional: true,
1522
- allowUnknownProperties: true,
1523
- properties: {
1524
- useExternalPlayer: {
1525
- type: 'primitive',
1526
- value: 'boolean',
1527
- optional: true
1528
- },
1529
- isPreviewMode: {
1530
- type: 'primitive',
1531
- value: 'boolean',
1532
- optional: true
1533
- },
1534
- linkTarget: {
1535
- type: 'primitive',
1536
- value: 'string',
1537
- optional: true
1538
- }
1513
+ }
1514
+ },
1515
+ general: {
1516
+ type: 'object',
1517
+ optional: true,
1518
+ allowUnknownProperties: true,
1519
+ properties: {
1520
+ useExternalPlayer: {
1521
+ type: 'primitive',
1522
+ value: 'boolean',
1523
+ optional: true
1524
+ },
1525
+ isPreviewMode: {
1526
+ type: 'primitive',
1527
+ value: 'boolean',
1528
+ optional: true
1529
+ },
1530
+ linkTarget: {
1531
+ type: 'primitive',
1532
+ value: 'string',
1533
+ optional: true
1539
1534
  }
1540
- },
1541
- theme: {
1542
- type: 'object',
1543
- optional: true,
1544
- allowUnknownProperties: true,
1545
- properties: {
1546
- translucent: {
1547
- type: 'primitive',
1548
- value: 'boolean',
1549
- optional: true
1550
- }
1535
+ }
1536
+ },
1537
+ theme: {
1538
+ type: 'object',
1539
+ optional: true,
1540
+ allowUnknownProperties: true,
1541
+ properties: {
1542
+ translucent: {
1543
+ type: 'primitive',
1544
+ value: 'boolean',
1545
+ optional: true
1551
1546
  }
1552
- },
1553
- newThread: {
1554
- type: 'object',
1555
- optional: true,
1556
- allowUnknownProperties: true,
1557
- deprecationMessage: 'newThread has been deprecated. Use "thread" configuration parameter',
1558
- properties: {
1559
- mode: {
1560
- type: 'primitive',
1561
- value: 'string',
1562
- optional: true
1563
- }
1547
+ }
1548
+ },
1549
+ initialPreferredTool: {
1550
+ type: 'primitive',
1551
+ value: 'string',
1552
+ optional: true
1553
+ },
1554
+ branding: {
1555
+ type: 'object',
1556
+ optional: true,
1557
+ allowUnknownProperties: true,
1558
+ properties: {
1559
+ kalturaLogo: {
1560
+ type: 'primitive',
1561
+ value: 'boolean',
1562
+ optional: true
1564
1563
  }
1565
- },
1566
- // @deprecated - no longer supported
1567
- scroll: {
1568
- type: 'enum',
1569
- values: ['body', 'container', 'modal'],
1570
- optional: true
1571
- },
1572
- layouts: {
1573
- type: 'object',
1574
- optional: true,
1575
- allowUnknownProperties: true,
1576
- properties: {
1577
- avatar: {
1578
- type: 'primitive',
1579
- value: 'boolean',
1580
- optional: true
1581
- },
1582
- chat: {
1583
- type: 'primitive',
1584
- value: 'boolean',
1585
- optional: true
1586
- }
1564
+ }
1565
+ },
1566
+ tips: {
1567
+ type: 'primitive',
1568
+ value: 'string',
1569
+ optional: true
1570
+ },
1571
+ newThread: {
1572
+ type: 'object',
1573
+ optional: true,
1574
+ allowUnknownProperties: true,
1575
+ deprecationMessage: 'newThread has been deprecated. Use "thread" configuration parameter',
1576
+ properties: {
1577
+ mode: {
1578
+ type: 'primitive',
1579
+ value: 'string',
1580
+ optional: true
1587
1581
  }
1588
- },
1589
- avatar: {
1590
- type: 'object',
1591
- optional: true,
1592
- allowUnknownProperties: true,
1593
- properties: {
1594
- stage: {
1595
- type: 'enum',
1596
- values: ['contained', 'fullscreen'],
1597
- optional: true
1598
- }
1582
+ }
1583
+ },
1584
+ // @deprecated - no longer supported
1585
+ scroll: {
1586
+ type: 'enum',
1587
+ values: ['body', 'container', 'modal'],
1588
+ optional: true
1589
+ },
1590
+ layouts: {
1591
+ type: 'object',
1592
+ optional: true,
1593
+ allowUnknownProperties: true,
1594
+ properties: {
1595
+ avatar: {
1596
+ type: 'primitive',
1597
+ value: 'boolean',
1598
+ optional: true
1599
+ },
1600
+ chat: {
1601
+ type: 'primitive',
1602
+ value: 'boolean',
1603
+ optional: true
1599
1604
  }
1600
- },
1601
- initialPage: {
1602
- type: 'object',
1603
- optional: true,
1604
- allowUnknownProperties: true,
1605
- properties: {
1606
- type: {
1607
- type: 'enum',
1608
- values: ['default', 'banner', 'chatThread'],
1609
- optional: true
1610
- },
1611
- title: {
1612
- type: 'primitive',
1613
- value: 'string',
1614
- optional: true
1615
- },
1616
- initialQuestions: {
1617
- type: 'array',
1618
- optional: true,
1619
- items: {
1620
- type: 'object',
1621
- properties: {
1622
- text: {
1623
- type: 'primitive',
1624
- value: 'string'
1625
- },
1626
- answerType: {
1627
- type: 'enum',
1628
- optional: true,
1629
- values: Object.values(AnswerTypeEnum)
1630
- }
1631
- }
1632
- }
1633
- },
1634
- background: {
1605
+ }
1606
+ },
1607
+ avatar: {
1608
+ type: 'object',
1609
+ optional: true,
1610
+ allowUnknownProperties: true,
1611
+ properties: {
1612
+ stage: {
1613
+ type: 'enum',
1614
+ values: ['contained', 'fullscreen'],
1615
+ optional: true
1616
+ }
1617
+ }
1618
+ },
1619
+ initialPage: {
1620
+ type: 'object',
1621
+ optional: true,
1622
+ allowUnknownProperties: true,
1623
+ properties: {
1624
+ type: {
1625
+ type: 'enum',
1626
+ values: ['default', 'banner', 'chatThread'],
1627
+ optional: true
1628
+ },
1629
+ title: {
1630
+ type: 'primitive',
1631
+ value: 'string',
1632
+ optional: true
1633
+ },
1634
+ initialQuestions: {
1635
+ type: 'array',
1636
+ optional: true,
1637
+ items: {
1635
1638
  type: 'object',
1636
- optional: true,
1637
1639
  properties: {
1638
- type: {
1639
- type: 'literal',
1640
- value: 'url'
1641
- },
1642
- url: {
1640
+ text: {
1643
1641
  type: 'primitive',
1644
1642
  value: 'string'
1643
+ },
1644
+ answerType: {
1645
+ type: 'enum',
1646
+ optional: true,
1647
+ values: Object.values(AnswerTypeEnum)
1645
1648
  }
1646
1649
  }
1647
- },
1648
- openingSystemMessage: {
1649
- type: 'primitive',
1650
- value: 'string',
1651
- optional: true
1652
- },
1653
- initialInputValue: {
1654
- type: 'primitive',
1655
- value: 'string',
1656
- optional: true
1657
1650
  }
1651
+ },
1652
+ background: {
1653
+ type: 'object',
1654
+ optional: true,
1655
+ properties: {
1656
+ type: {
1657
+ type: 'literal',
1658
+ value: 'url'
1659
+ },
1660
+ url: {
1661
+ type: 'primitive',
1662
+ value: 'string'
1663
+ }
1664
+ }
1665
+ },
1666
+ openingSystemMessage: {
1667
+ type: 'primitive',
1668
+ value: 'string',
1669
+ optional: true
1670
+ },
1671
+ initialInputValue: {
1672
+ type: 'primitive',
1673
+ value: 'string',
1674
+ optional: true
1658
1675
  }
1659
- },
1660
- uiControls: {
1661
- type: 'object',
1662
- optional: true,
1663
- allowUnknownProperties: true,
1664
- properties: {
1665
- modalSelector: {
1666
- type: 'object',
1667
- optional: true,
1668
- properties: {
1669
- visible: {
1670
- type: 'primitive',
1671
- value: 'boolean'
1672
- }
1676
+ }
1677
+ },
1678
+ uiControls: {
1679
+ type: 'object',
1680
+ optional: true,
1681
+ allowUnknownProperties: true,
1682
+ properties: {
1683
+ modalSelector: {
1684
+ type: 'object',
1685
+ optional: true,
1686
+ properties: {
1687
+ visible: {
1688
+ type: 'primitive',
1689
+ value: 'boolean'
1673
1690
  }
1674
- },
1675
- contextSelector: {
1676
- type: 'object',
1677
- optional: true,
1678
- properties: {
1679
- visible: {
1680
- type: 'primitive',
1681
- value: 'boolean'
1682
- }
1691
+ }
1692
+ },
1693
+ contextSelector: {
1694
+ type: 'object',
1695
+ optional: true,
1696
+ properties: {
1697
+ visible: {
1698
+ type: 'primitive',
1699
+ value: 'boolean'
1683
1700
  }
1684
1701
  }
1685
1702
  }
1686
- },
1687
- thread: {
1688
- type: 'object',
1689
- optional: true,
1690
- properties: {
1691
- enabled: {
1692
- type: 'primitive',
1693
- value: 'boolean',
1694
- optional: true
1695
- },
1696
- newThread: {
1697
- type: 'object',
1698
- optional: true,
1699
- properties: {
1700
- enabled: {
1701
- type: 'primitive',
1702
- value: 'boolean',
1703
- optional: true
1704
- },
1705
- type: {
1706
- type: 'enum',
1707
- values: ['default', 'clear'],
1708
- optional: true
1709
- },
1710
- label: {
1711
- type: 'primitive',
1712
- value: 'string',
1713
- optional: true
1714
- }
1703
+ }
1704
+ },
1705
+ thread: {
1706
+ type: 'object',
1707
+ optional: true,
1708
+ properties: {
1709
+ enabled: {
1710
+ type: 'primitive',
1711
+ value: 'boolean',
1712
+ optional: true
1713
+ },
1714
+ newThread: {
1715
+ type: 'object',
1716
+ optional: true,
1717
+ properties: {
1718
+ enabled: {
1719
+ type: 'primitive',
1720
+ value: 'boolean',
1721
+ optional: true
1722
+ },
1723
+ type: {
1724
+ type: 'enum',
1725
+ values: ['default', 'clear'],
1726
+ optional: true
1727
+ },
1728
+ label: {
1729
+ type: 'primitive',
1730
+ value: 'string',
1731
+ optional: true
1715
1732
  }
1716
- },
1717
- history: {
1718
- type: 'object',
1719
- optional: true,
1720
- properties: {
1721
- enabled: {
1722
- type: 'primitive',
1723
- value: 'boolean',
1724
- optional: true
1725
- }
1733
+ }
1734
+ },
1735
+ history: {
1736
+ type: 'object',
1737
+ optional: true,
1738
+ properties: {
1739
+ enabled: {
1740
+ type: 'primitive',
1741
+ value: 'boolean',
1742
+ optional: true
1726
1743
  }
1727
1744
  }
1728
1745
  }
1729
1746
  }
1730
1747
  }
1731
1748
  };
1749
+ const chatCustomizationSchema = {
1750
+ type: 'object',
1751
+ optional: true,
1752
+ deprecationMessage: 'ChatCustomization is deprecated. Use the new "visuals" configuration instead.',
1753
+ allowUnknownProperties: true,
1754
+ properties: chatCustomizationSchemaProperties
1755
+ };
1732
1756
 
1733
1757
  // ---------- Schema constants ----------
1734
1758
  const scrollSchema = {
@@ -1741,6 +1765,38 @@ const modeSchema = {
1741
1765
  values: ['chat', 'everywhere'],
1742
1766
  optional: true
1743
1767
  };
1768
+ const headerSchema = {
1769
+ type: 'object',
1770
+ optional: true,
1771
+ properties: {
1772
+ label: {
1773
+ type: 'primitive',
1774
+ value: 'string',
1775
+ optional: true
1776
+ },
1777
+ visible: {
1778
+ type: 'primitive',
1779
+ value: 'boolean',
1780
+ optional: true
1781
+ },
1782
+ icon: {
1783
+ type: 'object',
1784
+ optional: true,
1785
+ properties: {
1786
+ type: {
1787
+ type: 'enum',
1788
+ values: ['default'],
1789
+ optional: true
1790
+ },
1791
+ visible: {
1792
+ type: 'primitive',
1793
+ value: 'boolean',
1794
+ optional: true
1795
+ }
1796
+ }
1797
+ }
1798
+ }
1799
+ };
1744
1800
  const initialQuestionSchema = {
1745
1801
  type: 'object',
1746
1802
  optional: true,
@@ -1759,22 +1815,23 @@ const initialQuestionSchema = {
1759
1815
  // ---------- Schemas ----------
1760
1816
  const floaterVisualSettingsSchema = {
1761
1817
  type: 'object',
1762
- properties: {
1818
+ properties: Object.assign(Object.assign({}, chatCustomizationSchemaProperties), {
1763
1819
  schemaVersion: schemaVersionSchema,
1764
1820
  mode: modeSchema,
1765
1821
  context: chatContextSchema,
1766
1822
  customization: chatCustomizationSchema,
1767
1823
  dynamicVariables: dynamicVariablesSchema,
1824
+ header: headerSchema,
1768
1825
  openingPosition: {
1769
1826
  type: 'enum',
1770
1827
  values: ['left', 'right'],
1771
1828
  optional: true
1772
1829
  }
1773
- }
1830
+ })
1774
1831
  };
1775
1832
  const floaterCTAVisualSettingsSchema = {
1776
1833
  type: 'object',
1777
- properties: {
1834
+ properties: Object.assign(Object.assign({}, chatCustomizationSchemaProperties), {
1778
1835
  schemaVersion: schemaVersionSchema,
1779
1836
  position: {
1780
1837
  type: 'enum',
@@ -1795,6 +1852,7 @@ const floaterCTAVisualSettingsSchema = {
1795
1852
  context: chatContextSchema,
1796
1853
  customization: chatCustomizationSchema,
1797
1854
  dynamicVariables: dynamicVariablesSchema,
1855
+ header: headerSchema,
1798
1856
  type: {
1799
1857
  type: 'literal',
1800
1858
  value: 'button',
@@ -1810,11 +1868,11 @@ const floaterCTAVisualSettingsSchema = {
1810
1868
  value: 'boolean',
1811
1869
  optional: true
1812
1870
  }
1813
- }
1871
+ })
1814
1872
  };
1815
1873
  const containedVisualSettingsSchema = {
1816
1874
  type: 'object',
1817
- properties: {
1875
+ properties: Object.assign(Object.assign({}, chatCustomizationSchemaProperties), {
1818
1876
  schemaVersion: schemaVersionSchema,
1819
1877
  mode: modeSchema,
1820
1878
  customization: chatCustomizationSchema,
@@ -1838,8 +1896,9 @@ const containedVisualSettingsSchema = {
1838
1896
  type: 'enum',
1839
1897
  values: ['none', 'drawer', 'close'],
1840
1898
  optional: true
1841
- }
1842
- }
1899
+ },
1900
+ header: headerSchema
1901
+ })
1843
1902
  };
1844
1903
  const pageContextSchema = {
1845
1904
  type: 'orByType',
@@ -1888,18 +1947,18 @@ const pageContextSchema = {
1888
1947
  };
1889
1948
  const pageVisualSettingsSchema = {
1890
1949
  type: 'object',
1891
- properties: {
1950
+ properties: Object.assign(Object.assign({}, chatCustomizationSchemaProperties), {
1892
1951
  schemaVersion: schemaVersionSchema,
1893
1952
  scroll: scrollSchema,
1894
1953
  customization: chatCustomizationSchema,
1895
1954
  context: pageContextSchema,
1896
1955
  initialQuestion: initialQuestionSchema,
1897
1956
  dynamicVariables: dynamicVariablesSchema
1898
- }
1957
+ })
1899
1958
  };
1900
1959
  const bannerVisualSettingsSchema = {
1901
1960
  type: 'object',
1902
- properties: {
1961
+ properties: Object.assign(Object.assign({}, chatCustomizationSchemaProperties), {
1903
1962
  schemaVersion: schemaVersionSchema,
1904
1963
  dynamicVariables: dynamicVariablesSchema,
1905
1964
  title: {
@@ -1943,17 +2002,17 @@ const bannerVisualSettingsSchema = {
1943
2002
  },
1944
2003
  optional: true
1945
2004
  }
1946
- }
2005
+ })
1947
2006
  };
1948
2007
  const popupVisualSettingsSchema = {
1949
2008
  type: 'object',
1950
- properties: {
2009
+ properties: Object.assign(Object.assign({}, chatCustomizationSchemaProperties), {
1951
2010
  schemaVersion: schemaVersionSchema,
1952
2011
  scroll: scrollSchema,
1953
2012
  customization: chatCustomizationSchema,
1954
2013
  initialQuestion: initialQuestionSchema,
1955
2014
  dynamicVariables: dynamicVariablesSchema
1956
- }
2015
+ })
1957
2016
  };
1958
2017
 
1959
2018
  var objectDefineProperties = {};
@@ -2229,6 +2288,11 @@ const featuresSchema = {
2229
2288
  properties: {},
2230
2289
  allowUnknownProperties: true,
2231
2290
  optional: true
2291
+ },
2292
+ inlineClipPlayback: {
2293
+ type: 'primitive',
2294
+ value: 'boolean',
2295
+ optional: true
2232
2296
  }
2233
2297
  }
2234
2298
  };
@@ -3464,7 +3528,7 @@ for (var COLLECTION_NAME in DOMIterables) {
3464
3528
 
3465
3529
  handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
3466
3530
 
3467
- const SUPPORTED_LAYOUT_TYPES = new Set(['cinema', 'focusContent', 'balanced', 'floatingCorner', 'fullscreenContent']);
3531
+ const SUPPORTED_LAYOUT_TYPES = new Set(['cinema', 'focusContent', 'focusContentCompact', 'balanced', 'floatingCorner', 'fullscreenContent']);
3468
3532
 
3469
3533
  const avatarRuntimeHeadFloaterVisualSettingsSchema = {
3470
3534
  type: 'object',
@@ -3913,4 +3977,4 @@ function isTextBlock(b) {
3913
3977
  }
3914
3978
  const hasSources = blocks => blocks.some(b => b.type === 'unisphere-tool' && b.runtimeName === 'sources-tool');
3915
3979
 
3916
- export { AVATAR_DEFAULT_CAPABILITIES, AnswerModelEnum, AnswerTypeEnum, AvatarConnectionStatus, AvatarRuntimeName, CHAT_CONTEXT_TYPE, CHAT_CONTEXT_TYPE_GLOBAL, CHAT_DEFAULT_CAPABILITIES, ChatRuntimeName, ChatThreadRuntimeName, DeviceType, DisconnectReasons, SUPPORTED_LAYOUT_TYPES, agentModeSchema, avatarContainerModeSchema, avatarRuntimeChatVisualSettingsSchema, avatarRuntimeConnectSettingsSchema, avatarRuntimeContainedVisualSettingsSchema, avatarRuntimeFloaterVisualSettingsSchema, avatarRuntimeHeadFloaterVisualSettingsSchema, avatarRuntimeHeadlessVisualSettingsSchema, avatarRuntimeSettingsSchema, bannerVisualSettingsSchema, blockVisualContextSchema, chatContextSchema, chatCustomizationSchema, chatRuntimePlayerPluginSettingsSchema, chatRuntimeSettingsSchema, chatThreadRuntimeContainedVisualSettingsSchema, chatThreadRuntimeSettingsSchema, containedVisualSettingsSchema, dynamicVariablesSchema, floaterCTAVisualSettingsSchema, floaterVisualSettingsSchema, getAvatarDefaultCapabilities, getChatDefaultCapabilities, getResolvedRuntimeName, getResolvedWidgetName, getSourceUrlSchema, hasSources, integrationsSchema, isAvatarConnectionProxyInternalType, isFlashcardBlock, isFlashcardElement, isFollowupsBlock, isFollowupsElement, isPDFSourceItem, isSourcesBlock, isSourcesElement, isTextBlock, isTextFlashcard, isVideoGalleryFlashcard, isVideoSourceItem, pageVisualSettingsSchema, popupVisualSettingsSchema, resolveActiveContextType, schemaVersionSchema, shareUrlSchema, widgetName };
3980
+ export { AVATAR_DEFAULT_CAPABILITIES, AnswerModelEnum, AnswerTypeEnum, AvatarConnectionStatus, AvatarRuntimeName, CHAT_CONTEXT_TYPE, CHAT_CONTEXT_TYPE_GLOBAL, CHAT_DEFAULT_CAPABILITIES, ChatRuntimeName, ChatThreadRuntimeName, DeviceType, DisconnectReasons, SUPPORTED_LAYOUT_TYPES, agentModeSchema, avatarContainerModeSchema, avatarRuntimeChatVisualSettingsSchema, avatarRuntimeConnectSettingsSchema, avatarRuntimeContainedVisualSettingsSchema, avatarRuntimeFloaterVisualSettingsSchema, avatarRuntimeHeadFloaterVisualSettingsSchema, avatarRuntimeHeadlessVisualSettingsSchema, avatarRuntimeSettingsSchema, bannerVisualSettingsSchema, blockVisualContextSchema, chatContextSchema, chatCustomizationSchema, chatCustomizationSchemaProperties, chatRuntimePlayerPluginSettingsSchema, chatRuntimeSettingsSchema, chatThreadRuntimeContainedVisualSettingsSchema, chatThreadRuntimeSettingsSchema, containedVisualSettingsSchema, dynamicVariablesSchema, floaterCTAVisualSettingsSchema, floaterVisualSettingsSchema, getAvatarDefaultCapabilities, getChatDefaultCapabilities, getResolvedRuntimeName, getResolvedWidgetName, getSourceUrlSchema, hasSources, integrationsSchema, isAvatarConnectionProxyInternalType, isFlashcardBlock, isFlashcardElement, isFollowupsBlock, isFollowupsElement, isPDFSourceItem, isSourcesBlock, isSourcesElement, isTextBlock, isTextFlashcard, isVideoGalleryFlashcard, isVideoSourceItem, pageVisualSettingsSchema, popupVisualSettingsSchema, resolveActiveContextType, schemaVersionSchema, shareUrlSchema, widgetName };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unisphere/genie-types",
3
- "version": "1.39.7",
3
+ "version": "1.39.8",
4
4
  "author": "kaltura",
5
5
  "license": "AGPL-3.0",
6
6
  "repository": {
@@ -12,7 +12,7 @@
12
12
  "@kaltura-sdk/rtc-core": "^1.26.2",
13
13
  "@unisphere/core": "^1.99.0",
14
14
  "@unisphere/runtime": "^1.98.0",
15
- "@unisphere/runtime-js": "^1.96.0"
15
+ "@unisphere/runtime-js": "^1.98.0"
16
16
  },
17
17
  "module": "./index.esm.js",
18
18
  "type": "module",
@@ -1,7 +1,7 @@
1
1
  import { UnisphereService } from '@unisphere/runtime';
2
2
  import { AvatarVisualBridgeType } from './visual-bridge-types';
3
3
  import { TinyDataStoreConsumer, TinyPubSub } from '@unisphere/core';
4
- import { AvatarConnectionProxyType } from './shared-types';
4
+ import { AgentTapToTalkInfo, AvatarConnectionProxyType } from './shared-types';
5
5
  export type AvatarWebsocketEvent = {
6
6
  name: string;
7
7
  payload: any;
@@ -10,6 +10,17 @@ export interface AvatarServiceType extends UnisphereService {
10
10
  id: 'unisphere.widget.genie.avatar';
11
11
  readonly visualBridge: AvatarVisualBridgeType;
12
12
  readonly connection: TinyDataStoreConsumer<AvatarConnectionProxyType | null>;
13
+ /** True while the avatar is speaking. Never null; false when disconnected. */
14
+ readonly isAgentTalking: TinyDataStoreConsumer<boolean>;
15
+ /** Tap-to-talk mode state; null until connected. */
16
+ readonly tapToTalkInfo: TinyDataStoreConsumer<AgentTapToTalkInfo | null>;
17
+ /** Preview image of the current agent; null until known. */
18
+ readonly agentPreviewImageUrl: TinyDataStoreConsumer<string | null>;
19
+ /** Runtime feature flags exposed to content tools. */
20
+ readonly features: {
21
+ /** Watch clips inline: avatar hides after talking, layout stays. */
22
+ readonly inlineClipPlayback: boolean;
23
+ };
13
24
  connect(options?: {
14
25
  context?: {
15
26
  type: 'thread';
@@ -28,6 +39,10 @@ export interface AvatarServiceType extends UnisphereService {
28
39
  getEntrySourceUrl(entryId: string, startTime?: number): string;
29
40
  clearContent(): void;
30
41
  askViaText(question: string): void;
42
+ /** Start a tap-to-talk recording. */
43
+ tapToTalkStart(): void;
44
+ /** End the current tap-to-talk recording and send it to the agent. */
45
+ tapToTalkEnd(): void;
31
46
  onWebsocketEvents: {
32
47
  system: TinyPubSub<AvatarWebsocketEvent>['consumer'];
33
48
  app: TinyPubSub<AvatarWebsocketEvent>['consumer'];
@@ -177,6 +177,12 @@ export type AvatarRuntimeSettings = {
177
177
  kickOffPhrase?: string;
178
178
  /** Dynamic request variables */
179
179
  dynamicVariables?: Record<string, unknown>;
180
+ /**
181
+ * Inline clip playback flow in content tools. When true, once the avatar finishes talking about a
182
+ * clip the avatar hides (layout unchanged) and the user watches the clip in place, then clicks
183
+ * "I'm done watching" to continue. Defaults to true, except for specific partners/environments.
184
+ */
185
+ inlineClipPlayback?: boolean;
180
186
  };
181
187
  /** Full URL to POST client-tool-call responses to (e.g. `https://genie.example.com/assistant/tool_response`). Required for client tool calls to receive a response. Applies to both `manual` and `studio` modes. */
182
188
  clientToolResponseUrl?: string;
@@ -2,7 +2,7 @@ import { AvatarContentData } from './shared-types';
2
2
  import { UnisphereVisualBridgeType } from '@unisphere/runtime-js';
3
3
  export type SlotMode = 'append' | 'replace';
4
4
  export type SlotMount = (container: HTMLElement) => () => void;
5
- export type SlotType = 'status' | 'controls';
5
+ export type SlotType = 'status' | 'controls' | 'avatar';
6
6
  export interface SlotConfig {
7
7
  mount: SlotMount;
8
8
  mode?: SlotMode;
@@ -12,7 +12,7 @@ export interface SlotEntry {
12
12
  mount: SlotMount;
13
13
  mode: SlotMode;
14
14
  }
15
- export type LayoutType = 'cinema' | 'focusContent' | 'balanced' | 'floatingCorner' | 'fullscreenContent';
15
+ export type LayoutType = 'cinema' | 'focusContent' | 'focusContentCompact' | 'balanced' | 'floatingCorner' | 'fullscreenContent';
16
16
  export type ForceOrientation = 'portrait' | 'landscape';
17
17
  export declare const SUPPORTED_LAYOUT_TYPES: Set<string>;
18
18
  export interface LayoutConfig {
@@ -23,10 +23,18 @@ export interface LayoutConfig {
23
23
  export interface ChatConfig {
24
24
  disableInput?: boolean;
25
25
  }
26
+ export interface TapToTalkLabels {
27
+ start?: string;
28
+ send?: string;
29
+ }
26
30
  export interface VisualBehavior {
27
31
  pauseAfterSpeaking?: boolean;
28
32
  pauseImmediately?: boolean;
29
33
  switchToTapToTalk?: boolean;
34
+ muteMic?: boolean;
35
+ disableMic?: boolean;
36
+ hideMicControls?: boolean;
37
+ tapToTalkLabels?: TapToTalkLabels;
30
38
  }
31
39
  export interface VisualTypeConfig {
32
40
  behavior?: VisualBehavior;
@@ -34,9 +42,15 @@ export interface VisualTypeConfig {
34
42
  chat?: ChatConfig;
35
43
  slots?: Partial<Record<SlotType, SlotConfig>>;
36
44
  }
45
+ export interface ResolvedBehavior {
46
+ disableMic?: boolean;
47
+ hideMicControls?: boolean;
48
+ tapToTalkLabels?: TapToTalkLabels;
49
+ }
37
50
  export interface ResolvedCapabilities {
38
51
  layout?: LayoutConfig;
39
52
  chat?: ChatConfig;
53
+ behavior?: ResolvedBehavior;
40
54
  slots: Partial<Record<SlotType, SlotEntry[]>>;
41
55
  }
42
56
  export interface ActionContext {
@@ -157,4 +157,7 @@ export type Background = {
157
157
  export type ConfiguredCustomizationValues = Pick<ChatCustomization, 'layouts' | 'initialPage'> & {
158
158
  tips?: string;
159
159
  };
160
+ export declare const chatCustomizationSchemaProperties: Extract<ValidatorSchema, {
161
+ type: "object";
162
+ }>['properties'];
160
163
  export declare const chatCustomizationSchema: ValidatorSchema;
@@ -5,8 +5,6 @@ import { AnswerTypeEnum } from '../types';
5
5
  interface BaseVisualSettings {
6
6
  /** Settings schema version */
7
7
  schemaVersion?: '1';
8
- /** Custom UI styling and behavior options */
9
- customization?: ChatCustomization;
10
8
  /** Dynamic variables for genie brain */
11
9
  dynamicVariables?: GenieDynamicVariables;
12
10
  }
@@ -48,10 +46,10 @@ type InitialQuestion = {
48
46
  * };
49
47
  * ```
50
48
  */
51
- export interface PageVisualSettings extends ScrollableVisualSettings {
49
+ export type PageVisualSettings = ScrollableVisualSettings & ChatCustomization & {
52
50
  /** Context for the chat session — host-provided, not user-controllable */
53
51
  context?: Pick<ChatContext, 'type' | 'id'>;
54
- }
52
+ };
55
53
  /**
56
54
  * Visual settings for banner/hero-style chat landing pages.
57
55
  *
@@ -73,7 +71,7 @@ export interface PageVisualSettings extends ScrollableVisualSettings {
73
71
  * };
74
72
  * ```
75
73
  */
76
- export interface BannerVisualSettings extends BaseVisualSettings {
74
+ export type BannerVisualSettings = BaseVisualSettings & ChatCustomization & {
77
75
  /** Banner title text */
78
76
  title?: string;
79
77
  /** Background image configuration */
@@ -92,7 +90,7 @@ export interface BannerVisualSettings extends BaseVisualSettings {
92
90
  /** Preferred answer type */
93
91
  answerType?: AnswerTypeEnum;
94
92
  }[];
95
- }
93
+ };
96
94
  /**
97
95
  * Visual settings for popup/modal chat dialogs.
98
96
  *
@@ -107,11 +105,22 @@ export interface BannerVisualSettings extends BaseVisualSettings {
107
105
  * };
108
106
  * ```
109
107
  */
110
- export interface PopupVisualSettings extends ScrollableVisualSettings {
108
+ export type PopupVisualSettings = ScrollableVisualSettings & ChatCustomization & {
111
109
  /** Optional question to ask automatically when popup opens */
112
110
  initialQuestion?: InitialQuestion;
113
- }
114
- export interface ContainedVisualSettings extends ScrollableVisualSettings, ModeContextVisualSettings {
111
+ };
112
+ export type ChatHeaderSettings = {
113
+ /** Replaces the default header title */
114
+ label?: string;
115
+ /** Set to false to hide the whole header, including the expand and close buttons */
116
+ visible?: boolean;
117
+ icon?: {
118
+ type: undefined;
119
+ /** Set to false to hide the header icon */
120
+ visible?: boolean;
121
+ };
122
+ };
123
+ export type ContainedVisualSettings = ScrollableVisualSettings & ModeContextVisualSettings & ChatCustomization & {
115
124
  /** Callback invoked when the widget requests to be closed */
116
125
  onRequestClose?: () => void;
117
126
  /** Callback invoked when the user clicks the expand button */
@@ -120,18 +129,22 @@ export interface ContainedVisualSettings extends ScrollableVisualSettings, ModeC
120
129
  isExpanded?: boolean;
121
130
  /** Type of close button to display in the header */
122
131
  closeButtonType?: 'none' | 'drawer' | 'close';
123
- }
124
- export interface FloaterCTAVisualSettings extends ModeContextVisualSettings {
132
+ /** Header configuration for the contained visual */
133
+ header?: ChatHeaderSettings;
134
+ };
135
+ export type FloaterCTAVisualSettings = ModeContextVisualSettings & ChatCustomization & {
125
136
  position?: 'bottom-right' | 'bottom-center' | 'bottom-left';
126
137
  openingPosition?: 'left' | 'right';
127
138
  openByDefault?: boolean;
128
139
  type?: 'button';
129
140
  text?: string;
130
141
  showIcon?: boolean;
131
- }
132
- export interface FloaterVisualSettings extends ModeContextVisualSettings {
142
+ header?: ChatHeaderSettings;
143
+ };
144
+ export type FloaterVisualSettings = ModeContextVisualSettings & ChatCustomization & {
133
145
  openingPosition?: 'left' | 'right';
134
- }
146
+ header?: ChatHeaderSettings;
147
+ };
135
148
  export declare const floaterVisualSettingsSchema: ValidatorSchema;
136
149
  export declare const floaterCTAVisualSettingsSchema: ValidatorSchema;
137
150
  export declare const containedVisualSettingsSchema: ValidatorSchema;