@unisphere/genie-types 1.39.8-source.0 → 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 +290 -228
- package/package.json +2 -2
- package/src/lib/avatar-runtime/avatar-service-types.d.ts +17 -6
- package/src/lib/avatar-runtime/runtime-types.d.ts +7 -3
- package/src/lib/avatar-runtime/visual-bridge-types.d.ts +16 -2
- package/src/lib/chat-customizations-types.d.ts +3 -0
- package/src/lib/chat-runtime/visuals-types.d.ts +27 -14
- package/src/lib/shared/genie-chat-service-types.d.ts +2 -2
package/index.esm.js
CHANGED
|
@@ -1491,244 +1491,268 @@ var AnswerModelEnum;
|
|
|
1491
1491
|
AnswerModelEnum["Smart"] = "smart";
|
|
1492
1492
|
})(AnswerModelEnum || (AnswerModelEnum = {}));
|
|
1493
1493
|
|
|
1494
|
-
const
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
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
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
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
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
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
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
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
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
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
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
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
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
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
|
-
|
|
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
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
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
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
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
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
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
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
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
|
};
|
|
@@ -2311,7 +2375,6 @@ const avatarRuntimeSettingsSchema = {
|
|
|
2311
2375
|
value: 'string',
|
|
2312
2376
|
optional: true
|
|
2313
2377
|
},
|
|
2314
|
-
getSourceUrl: getSourceUrlSchema,
|
|
2315
2378
|
kaltura: kalturaSchema,
|
|
2316
2379
|
features: featuresSchema
|
|
2317
2380
|
}
|
|
@@ -2339,7 +2402,6 @@ const avatarRuntimeSettingsSchema = {
|
|
|
2339
2402
|
value: 'string',
|
|
2340
2403
|
optional: true
|
|
2341
2404
|
},
|
|
2342
|
-
getSourceUrl: getSourceUrlSchema,
|
|
2343
2405
|
kaltura: kalturaSchema,
|
|
2344
2406
|
features: featuresSchema
|
|
2345
2407
|
}
|
|
@@ -3466,7 +3528,7 @@ for (var COLLECTION_NAME in DOMIterables) {
|
|
|
3466
3528
|
|
|
3467
3529
|
handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
|
|
3468
3530
|
|
|
3469
|
-
const SUPPORTED_LAYOUT_TYPES = new Set(['cinema', 'focusContent', 'balanced', 'floatingCorner', 'fullscreenContent']);
|
|
3531
|
+
const SUPPORTED_LAYOUT_TYPES = new Set(['cinema', 'focusContent', 'focusContentCompact', 'balanced', 'floatingCorner', 'fullscreenContent']);
|
|
3470
3532
|
|
|
3471
3533
|
const avatarRuntimeHeadFloaterVisualSettingsSchema = {
|
|
3472
3534
|
type: 'object',
|
|
@@ -3915,4 +3977,4 @@ function isTextBlock(b) {
|
|
|
3915
3977
|
}
|
|
3916
3978
|
const hasSources = blocks => blocks.some(b => b.type === 'unisphere-tool' && b.runtimeName === 'sources-tool');
|
|
3917
3979
|
|
|
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 };
|
|
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.8
|
|
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.
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
108
|
+
export type PopupVisualSettings = ScrollableVisualSettings & ChatCustomization & {
|
|
111
109
|
/** Optional question to ask automatically when popup opens */
|
|
112
110
|
initialQuestion?: InitialQuestion;
|
|
113
|
-
}
|
|
114
|
-
export
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
41
|
-
getEntrySourceUrl
|
|
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
|
};
|