@unisphere/genie-types 1.39.8-source.0 → 1.39.9

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,281 @@ 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
- }
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
1512
+ },
1513
+ category: {
1514
+ type: 'object',
1515
+ properties: {
1516
+ type: {
1517
+ type: 'literal',
1518
+ value: 'category'
1519
+ },
1520
+ id: {
1521
+ type: 'primitive',
1522
+ value: 'string'
1523
+ }
1538
1524
  }
1539
1525
  }
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
- }
1526
+ }
1527
+ },
1528
+ general: {
1529
+ type: 'object',
1530
+ optional: true,
1531
+ allowUnknownProperties: true,
1532
+ properties: {
1533
+ useExternalPlayer: {
1534
+ type: 'primitive',
1535
+ value: 'boolean',
1536
+ optional: true
1537
+ },
1538
+ isPreviewMode: {
1539
+ type: 'primitive',
1540
+ value: 'boolean',
1541
+ optional: true
1542
+ },
1543
+ linkTarget: {
1544
+ type: 'primitive',
1545
+ value: 'string',
1546
+ optional: true
1551
1547
  }
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
- }
1548
+ }
1549
+ },
1550
+ theme: {
1551
+ type: 'object',
1552
+ optional: true,
1553
+ allowUnknownProperties: true,
1554
+ properties: {
1555
+ translucent: {
1556
+ type: 'primitive',
1557
+ value: 'boolean',
1558
+ optional: true
1564
1559
  }
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
- }
1560
+ }
1561
+ },
1562
+ initialPreferredTool: {
1563
+ type: 'primitive',
1564
+ value: 'string',
1565
+ optional: true
1566
+ },
1567
+ branding: {
1568
+ type: 'object',
1569
+ optional: true,
1570
+ allowUnknownProperties: true,
1571
+ properties: {
1572
+ kalturaLogo: {
1573
+ type: 'primitive',
1574
+ value: 'boolean',
1575
+ optional: true
1587
1576
  }
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
- }
1577
+ }
1578
+ },
1579
+ tips: {
1580
+ type: 'primitive',
1581
+ value: 'string',
1582
+ optional: true
1583
+ },
1584
+ newThread: {
1585
+ type: 'object',
1586
+ optional: true,
1587
+ allowUnknownProperties: true,
1588
+ deprecationMessage: 'newThread has been deprecated. Use "thread" configuration parameter',
1589
+ properties: {
1590
+ mode: {
1591
+ type: 'primitive',
1592
+ value: 'string',
1593
+ optional: true
1599
1594
  }
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: {
1595
+ }
1596
+ },
1597
+ // @deprecated - no longer supported
1598
+ scroll: {
1599
+ type: 'enum',
1600
+ values: ['body', 'container', 'modal'],
1601
+ optional: true
1602
+ },
1603
+ layouts: {
1604
+ type: 'object',
1605
+ optional: true,
1606
+ allowUnknownProperties: true,
1607
+ properties: {
1608
+ avatar: {
1609
+ type: 'primitive',
1610
+ value: 'boolean',
1611
+ optional: true
1612
+ },
1613
+ chat: {
1614
+ type: 'primitive',
1615
+ value: 'boolean',
1616
+ optional: true
1617
+ }
1618
+ }
1619
+ },
1620
+ avatar: {
1621
+ type: 'object',
1622
+ optional: true,
1623
+ allowUnknownProperties: true,
1624
+ properties: {
1625
+ stage: {
1626
+ type: 'enum',
1627
+ values: ['contained', 'fullscreen'],
1628
+ optional: true
1629
+ }
1630
+ }
1631
+ },
1632
+ initialPage: {
1633
+ type: 'object',
1634
+ optional: true,
1635
+ allowUnknownProperties: true,
1636
+ properties: {
1637
+ type: {
1638
+ type: 'enum',
1639
+ values: ['default', 'banner', 'chatThread'],
1640
+ optional: true
1641
+ },
1642
+ title: {
1643
+ type: 'primitive',
1644
+ value: 'string',
1645
+ optional: true
1646
+ },
1647
+ initialQuestions: {
1648
+ type: 'array',
1649
+ optional: true,
1650
+ items: {
1635
1651
  type: 'object',
1636
- optional: true,
1637
1652
  properties: {
1638
- type: {
1639
- type: 'literal',
1640
- value: 'url'
1641
- },
1642
- url: {
1653
+ text: {
1643
1654
  type: 'primitive',
1644
1655
  value: 'string'
1656
+ },
1657
+ answerType: {
1658
+ type: 'enum',
1659
+ optional: true,
1660
+ values: Object.values(AnswerTypeEnum)
1645
1661
  }
1646
1662
  }
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
1663
  }
1664
+ },
1665
+ background: {
1666
+ type: 'object',
1667
+ optional: true,
1668
+ properties: {
1669
+ type: {
1670
+ type: 'literal',
1671
+ value: 'url'
1672
+ },
1673
+ url: {
1674
+ type: 'primitive',
1675
+ value: 'string'
1676
+ }
1677
+ }
1678
+ },
1679
+ openingSystemMessage: {
1680
+ type: 'primitive',
1681
+ value: 'string',
1682
+ optional: true
1683
+ },
1684
+ initialInputValue: {
1685
+ type: 'primitive',
1686
+ value: 'string',
1687
+ optional: true
1658
1688
  }
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
- }
1689
+ }
1690
+ },
1691
+ uiControls: {
1692
+ type: 'object',
1693
+ optional: true,
1694
+ allowUnknownProperties: true,
1695
+ properties: {
1696
+ modalSelector: {
1697
+ type: 'object',
1698
+ optional: true,
1699
+ properties: {
1700
+ visible: {
1701
+ type: 'primitive',
1702
+ value: 'boolean'
1673
1703
  }
1674
- },
1675
- contextSelector: {
1676
- type: 'object',
1677
- optional: true,
1678
- properties: {
1679
- visible: {
1680
- type: 'primitive',
1681
- value: 'boolean'
1682
- }
1704
+ }
1705
+ },
1706
+ contextSelector: {
1707
+ type: 'object',
1708
+ optional: true,
1709
+ properties: {
1710
+ visible: {
1711
+ type: 'primitive',
1712
+ value: 'boolean'
1683
1713
  }
1684
1714
  }
1685
1715
  }
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
- }
1716
+ }
1717
+ },
1718
+ thread: {
1719
+ type: 'object',
1720
+ optional: true,
1721
+ properties: {
1722
+ enabled: {
1723
+ type: 'primitive',
1724
+ value: 'boolean',
1725
+ optional: true
1726
+ },
1727
+ newThread: {
1728
+ type: 'object',
1729
+ optional: true,
1730
+ properties: {
1731
+ enabled: {
1732
+ type: 'primitive',
1733
+ value: 'boolean',
1734
+ optional: true
1735
+ },
1736
+ type: {
1737
+ type: 'enum',
1738
+ values: ['default', 'clear'],
1739
+ optional: true
1740
+ },
1741
+ label: {
1742
+ type: 'primitive',
1743
+ value: 'string',
1744
+ optional: true
1715
1745
  }
1716
- },
1717
- history: {
1718
- type: 'object',
1719
- optional: true,
1720
- properties: {
1721
- enabled: {
1722
- type: 'primitive',
1723
- value: 'boolean',
1724
- optional: true
1725
- }
1746
+ }
1747
+ },
1748
+ history: {
1749
+ type: 'object',
1750
+ optional: true,
1751
+ properties: {
1752
+ enabled: {
1753
+ type: 'primitive',
1754
+ value: 'boolean',
1755
+ optional: true
1726
1756
  }
1727
1757
  }
1728
1758
  }
1729
1759
  }
1730
1760
  }
1731
1761
  };
1762
+ const chatCustomizationSchema = {
1763
+ type: 'object',
1764
+ optional: true,
1765
+ deprecationMessage: 'ChatCustomization is deprecated. Use the new "visuals" configuration instead.',
1766
+ allowUnknownProperties: true,
1767
+ properties: chatCustomizationSchemaProperties
1768
+ };
1732
1769
 
1733
1770
  // ---------- Schema constants ----------
1734
1771
  const scrollSchema = {
@@ -1741,6 +1778,38 @@ const modeSchema = {
1741
1778
  values: ['chat', 'everywhere'],
1742
1779
  optional: true
1743
1780
  };
1781
+ const headerSchema = {
1782
+ type: 'object',
1783
+ optional: true,
1784
+ properties: {
1785
+ label: {
1786
+ type: 'primitive',
1787
+ value: 'string',
1788
+ optional: true
1789
+ },
1790
+ visible: {
1791
+ type: 'primitive',
1792
+ value: 'boolean',
1793
+ optional: true
1794
+ },
1795
+ icon: {
1796
+ type: 'object',
1797
+ optional: true,
1798
+ properties: {
1799
+ type: {
1800
+ type: 'enum',
1801
+ values: ['default'],
1802
+ optional: true
1803
+ },
1804
+ visible: {
1805
+ type: 'primitive',
1806
+ value: 'boolean',
1807
+ optional: true
1808
+ }
1809
+ }
1810
+ }
1811
+ }
1812
+ };
1744
1813
  const initialQuestionSchema = {
1745
1814
  type: 'object',
1746
1815
  optional: true,
@@ -1759,22 +1828,23 @@ const initialQuestionSchema = {
1759
1828
  // ---------- Schemas ----------
1760
1829
  const floaterVisualSettingsSchema = {
1761
1830
  type: 'object',
1762
- properties: {
1831
+ properties: Object.assign(Object.assign({}, chatCustomizationSchemaProperties), {
1763
1832
  schemaVersion: schemaVersionSchema,
1764
1833
  mode: modeSchema,
1765
1834
  context: chatContextSchema,
1766
1835
  customization: chatCustomizationSchema,
1767
1836
  dynamicVariables: dynamicVariablesSchema,
1837
+ header: headerSchema,
1768
1838
  openingPosition: {
1769
1839
  type: 'enum',
1770
1840
  values: ['left', 'right'],
1771
1841
  optional: true
1772
1842
  }
1773
- }
1843
+ })
1774
1844
  };
1775
1845
  const floaterCTAVisualSettingsSchema = {
1776
1846
  type: 'object',
1777
- properties: {
1847
+ properties: Object.assign(Object.assign({}, chatCustomizationSchemaProperties), {
1778
1848
  schemaVersion: schemaVersionSchema,
1779
1849
  position: {
1780
1850
  type: 'enum',
@@ -1795,6 +1865,7 @@ const floaterCTAVisualSettingsSchema = {
1795
1865
  context: chatContextSchema,
1796
1866
  customization: chatCustomizationSchema,
1797
1867
  dynamicVariables: dynamicVariablesSchema,
1868
+ header: headerSchema,
1798
1869
  type: {
1799
1870
  type: 'literal',
1800
1871
  value: 'button',
@@ -1810,11 +1881,11 @@ const floaterCTAVisualSettingsSchema = {
1810
1881
  value: 'boolean',
1811
1882
  optional: true
1812
1883
  }
1813
- }
1884
+ })
1814
1885
  };
1815
1886
  const containedVisualSettingsSchema = {
1816
1887
  type: 'object',
1817
- properties: {
1888
+ properties: Object.assign(Object.assign({}, chatCustomizationSchemaProperties), {
1818
1889
  schemaVersion: schemaVersionSchema,
1819
1890
  mode: modeSchema,
1820
1891
  customization: chatCustomizationSchema,
@@ -1838,8 +1909,9 @@ const containedVisualSettingsSchema = {
1838
1909
  type: 'enum',
1839
1910
  values: ['none', 'drawer', 'close'],
1840
1911
  optional: true
1841
- }
1842
- }
1912
+ },
1913
+ header: headerSchema
1914
+ })
1843
1915
  };
1844
1916
  const pageContextSchema = {
1845
1917
  type: 'orByType',
@@ -1888,18 +1960,18 @@ const pageContextSchema = {
1888
1960
  };
1889
1961
  const pageVisualSettingsSchema = {
1890
1962
  type: 'object',
1891
- properties: {
1963
+ properties: Object.assign(Object.assign({}, chatCustomizationSchemaProperties), {
1892
1964
  schemaVersion: schemaVersionSchema,
1893
1965
  scroll: scrollSchema,
1894
1966
  customization: chatCustomizationSchema,
1895
1967
  context: pageContextSchema,
1896
1968
  initialQuestion: initialQuestionSchema,
1897
1969
  dynamicVariables: dynamicVariablesSchema
1898
- }
1970
+ })
1899
1971
  };
1900
1972
  const bannerVisualSettingsSchema = {
1901
1973
  type: 'object',
1902
- properties: {
1974
+ properties: Object.assign(Object.assign({}, chatCustomizationSchemaProperties), {
1903
1975
  schemaVersion: schemaVersionSchema,
1904
1976
  dynamicVariables: dynamicVariablesSchema,
1905
1977
  title: {
@@ -1943,17 +2015,17 @@ const bannerVisualSettingsSchema = {
1943
2015
  },
1944
2016
  optional: true
1945
2017
  }
1946
- }
2018
+ })
1947
2019
  };
1948
2020
  const popupVisualSettingsSchema = {
1949
2021
  type: 'object',
1950
- properties: {
2022
+ properties: Object.assign(Object.assign({}, chatCustomizationSchemaProperties), {
1951
2023
  schemaVersion: schemaVersionSchema,
1952
2024
  scroll: scrollSchema,
1953
2025
  customization: chatCustomizationSchema,
1954
2026
  initialQuestion: initialQuestionSchema,
1955
2027
  dynamicVariables: dynamicVariablesSchema
1956
- }
2028
+ })
1957
2029
  };
1958
2030
 
1959
2031
  var objectDefineProperties = {};
@@ -2229,6 +2301,11 @@ const featuresSchema = {
2229
2301
  properties: {},
2230
2302
  allowUnknownProperties: true,
2231
2303
  optional: true
2304
+ },
2305
+ inlineClipPlayback: {
2306
+ type: 'primitive',
2307
+ value: 'boolean',
2308
+ optional: true
2232
2309
  }
2233
2310
  }
2234
2311
  };
@@ -2311,7 +2388,6 @@ const avatarRuntimeSettingsSchema = {
2311
2388
  value: 'string',
2312
2389
  optional: true
2313
2390
  },
2314
- getSourceUrl: getSourceUrlSchema,
2315
2391
  kaltura: kalturaSchema,
2316
2392
  features: featuresSchema
2317
2393
  }
@@ -2339,7 +2415,6 @@ const avatarRuntimeSettingsSchema = {
2339
2415
  value: 'string',
2340
2416
  optional: true
2341
2417
  },
2342
- getSourceUrl: getSourceUrlSchema,
2343
2418
  kaltura: kalturaSchema,
2344
2419
  features: featuresSchema
2345
2420
  }
@@ -3466,7 +3541,7 @@ for (var COLLECTION_NAME in DOMIterables) {
3466
3541
 
3467
3542
  handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
3468
3543
 
3469
- const SUPPORTED_LAYOUT_TYPES = new Set(['cinema', 'focusContent', 'balanced', 'floatingCorner', 'fullscreenContent']);
3544
+ const SUPPORTED_LAYOUT_TYPES = new Set(['cinema', 'focusContent', 'focusContentCompact', 'balanced', 'floatingCorner', 'fullscreenContent']);
3470
3545
 
3471
3546
  const avatarRuntimeHeadFloaterVisualSettingsSchema = {
3472
3547
  type: 'object',
@@ -3915,4 +3990,4 @@ function isTextBlock(b) {
3915
3990
  }
3916
3991
  const hasSources = blocks => blocks.some(b => b.type === 'unisphere-tool' && b.runtimeName === 'sources-tool');
3917
3992
 
3918
- 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 };
3993
+ 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.8-source.0",
3
+ "version": "1.39.9",
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';
@@ -25,13 +36,13 @@ export interface AvatarServiceType extends UnisphereService {
25
36
  uiConfId: string;
26
37
  ks: string;
27
38
  } | null;
28
- /** Present only when the host provided a source URL resolver */
29
- getEntrySourceUrl?: (entryId: string, startTime?: number) => string | {
30
- url: string;
31
- target: string;
32
- };
39
+ getEntrySourceUrl(entryId: string, startTime?: number): string;
33
40
  clearContent(): void;
34
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;
35
46
  onWebsocketEvents: {
36
47
  system: TinyPubSub<AvatarWebsocketEvent>['consumer'];
37
48
  app: TinyPubSub<AvatarWebsocketEvent>['consumer'];
@@ -1,7 +1,7 @@
1
1
  import { TinyDataStoreConsumer, ValidatorSchema } from '@unisphere/core';
2
2
  import { UnisphereRuntimeBaseType } from '@unisphere/runtime';
3
3
  import { widgetName } from '../widget-types';
4
- import { ChatContext, GenieCapabilities, GlobalChatSettings } from '../chat-runtime/shared-settings';
4
+ import { ChatContext, GenieCapabilities } from '../chat-runtime/shared-settings';
5
5
  import { AgentData, AgentScreenShareInfo, AgentTapToTalkInfo, AvatarConnectionStatus, CaptionConfig, CaptionState, DisconnectReasons } from './shared-types';
6
6
  import { ChatEntry } from './chat-types';
7
7
  /** Runtime name constant for avatar experiences */
@@ -177,11 +177,15 @@ 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;
183
- /** Callback to generate source URLs for an entry. When absent, source links are not shown. */
184
- getSourceUrl?: GlobalChatSettings['getSourceUrl'];
185
189
  } & (({
186
190
  serverConfig?: 'manual';
187
191
  } & Omit<AvatarServerConfig, 'ks'>) | {
@@ -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;
@@ -37,8 +37,8 @@ export interface GenieChatServiceType extends UnisphereService {
37
37
  getClipPlayerUrl?: (source: ClassGenieGetClipPlayerUrlData) => string | null;
38
38
  /** Generate poster/thumbnail URL for video clip */
39
39
  getClipPlayerPosterUrl: (source: ClassGenieGetClipPlayerPosterUrlData) => string;
40
- /** Generate source URL for media entry with optional start time. Present only when the host provided a source URL resolver */
41
- getEntrySourceUrl?: (entryId: string, startTime?: number) => string | {
40
+ /** Generate source URL for media entry with optional start time */
41
+ getEntrySourceUrl: (entryId: string, startTime?: number) => string | {
42
42
  url: string;
43
43
  target: string;
44
44
  };