@unisphere/genie-types 1.25.0 → 1.25.1

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
@@ -1,3 +1,5 @@
1
+ import { createUseTranslation } from '@unisphere/ui-i18n-react';
2
+
1
3
  /** Widget name constant for all Genie experiences */
2
4
  const widgetName = 'unisphere.widget.genie';
3
5
 
@@ -1520,6 +1522,7 @@ const chatCustomizationSchema = {
1520
1522
  type: 'object',
1521
1523
  optional: true,
1522
1524
  allowUnknownProperties: true,
1525
+ deprecationMessage: 'newThread has been deprecated. Use "thread" configuration parameter',
1523
1526
  properties: {
1524
1527
  mode: {
1525
1528
  type: 'primitive',
@@ -1616,6 +1619,49 @@ const chatCustomizationSchema = {
1616
1619
  optional: true
1617
1620
  }
1618
1621
  }
1622
+ },
1623
+ thread: {
1624
+ type: 'object',
1625
+ optional: true,
1626
+ properties: {
1627
+ enabled: {
1628
+ type: 'primitive',
1629
+ value: 'boolean',
1630
+ optional: true
1631
+ },
1632
+ newThread: {
1633
+ type: 'object',
1634
+ optional: true,
1635
+ properties: {
1636
+ enabled: {
1637
+ type: 'primitive',
1638
+ value: 'boolean',
1639
+ optional: true
1640
+ },
1641
+ type: {
1642
+ type: 'enum',
1643
+ values: ['default', 'clear'],
1644
+ optional: true
1645
+ },
1646
+ label: {
1647
+ type: 'primitive',
1648
+ value: 'string',
1649
+ optional: true
1650
+ }
1651
+ }
1652
+ },
1653
+ history: {
1654
+ type: 'object',
1655
+ optional: true,
1656
+ properties: {
1657
+ enabled: {
1658
+ type: 'primitive',
1659
+ value: 'boolean',
1660
+ optional: true
1661
+ }
1662
+ }
1663
+ }
1664
+ }
1619
1665
  }
1620
1666
  }
1621
1667
  };
@@ -3188,4 +3234,16 @@ const blockVisualContextSchema = {
3188
3234
  }
3189
3235
  };
3190
3236
 
3191
- export { AVATAR_DEFAULT_CAPABILITIES, AnswerModelEnum, AnswerTypeEnum, AvatarConnectionStatus, AvatarRuntimeName, CHAT_CONTEXT_TYPE, CHAT_CONTEXT_TYPE_GLOBAL, CHAT_DEFAULT_CAPABILITIES, ChatRuntimeName, DeviceType, DisconnectReasons, SUPPORTED_LAYOUT_TYPES, agentModeSchema, avatarContainerModeSchema, avatarRuntimeChatVisualSettingsSchema, avatarRuntimeContainedVisualSettingsSchema, avatarRuntimeFloaterVisualSettingsSchema, avatarRuntimeSettingsSchema, bannerVisualSettingsSchema, blockVisualContextSchema, chatContextSchema, chatCustomizationSchema, chatRuntimePlayerPluginSettingsSchema, chatRuntimeSettingsSchema, containedVisualSettingsSchema, floaterCTAVisualSettingsSchema, floaterVisualSettingsSchema, getAvatarDefaultCapabilities, getChatDefaultCapabilities, getResolvedRuntimeName, getResolvedWidgetName, getSourceUrlSchema, integrationsSchema, isAvatarConnectionProxyInternalType, pageVisualSettingsSchema, popupVisualSettingsSchema, schemaVersionSchema, shareUrlSchema, widgetName };
3237
+ var en = {
3238
+
3239
+ };
3240
+
3241
+ const supportedLanguages = ['en-US'];
3242
+
3243
+ const useTranslation = createUseTranslation({
3244
+ packageName: '@unisphere/genie-types',
3245
+ defaultTranslations: en,
3246
+ supportedLanguages
3247
+ });
3248
+
3249
+ export { AVATAR_DEFAULT_CAPABILITIES, AnswerModelEnum, AnswerTypeEnum, AvatarConnectionStatus, AvatarRuntimeName, CHAT_CONTEXT_TYPE, CHAT_CONTEXT_TYPE_GLOBAL, CHAT_DEFAULT_CAPABILITIES, ChatRuntimeName, DeviceType, DisconnectReasons, SUPPORTED_LAYOUT_TYPES, agentModeSchema, avatarContainerModeSchema, avatarRuntimeChatVisualSettingsSchema, avatarRuntimeContainedVisualSettingsSchema, avatarRuntimeFloaterVisualSettingsSchema, avatarRuntimeSettingsSchema, bannerVisualSettingsSchema, blockVisualContextSchema, chatContextSchema, chatCustomizationSchema, chatRuntimePlayerPluginSettingsSchema, chatRuntimeSettingsSchema, containedVisualSettingsSchema, floaterCTAVisualSettingsSchema, floaterVisualSettingsSchema, getAvatarDefaultCapabilities, getChatDefaultCapabilities, getResolvedRuntimeName, getResolvedWidgetName, getSourceUrlSchema, integrationsSchema, isAvatarConnectionProxyInternalType, pageVisualSettingsSchema, popupVisualSettingsSchema, schemaVersionSchema, shareUrlSchema, useTranslation, widgetName };
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unisphere/genie-types",
3
- "version": "1.25.0",
3
+ "version": "1.25.1",
4
4
  "author": "kaltura",
5
5
  "license": "AGPL-3.0",
6
6
  "repository": {
@@ -11,8 +11,9 @@
11
11
  "dependencies": {
12
12
  "@kaltura-sdk/rtc-core": "^1.25.13",
13
13
  "@unisphere/core": "^1.99.0",
14
- "@unisphere/runtime": "^1.97.0",
15
- "@unisphere/runtime-js": "^1.96.0"
14
+ "@unisphere/runtime": "^1.98.0",
15
+ "@unisphere/runtime-js": "^1.96.0",
16
+ "@unisphere/ui-i18n-react": "^1.70.1"
16
17
  },
17
18
  "module": "./index.esm.js",
18
19
  "type": "module",
package/src/index.d.ts CHANGED
@@ -5,3 +5,4 @@ export * from './lib/types';
5
5
  export * from './lib/avatar-runtime';
6
6
  export * from './lib/chat-customizations-types';
7
7
  export * from './lib/general-visual-types';
8
+ export { useTranslation } from './lib/use-translation';
@@ -0,0 +1 @@
1
+ export declare const supportedLanguages: string[];
@@ -47,7 +47,9 @@ export interface ChatCustomization {
47
47
  /** Indicates genie is embedded inside Kaltura Studio (preview mode) */
48
48
  isPreviewMode?: boolean;
49
49
  };
50
- /** New conversation thread settings */
50
+ /** New conversation thread settings
51
+ * @deprecated
52
+ * */
51
53
  newThread?: {
52
54
  /** Show/hide the new thread button */
53
55
  buttonVisible?: boolean;
@@ -79,6 +81,25 @@ export interface ChatCustomization {
79
81
  } | {
80
82
  stage: 'fullscreen';
81
83
  };
84
+ /** thread configuration */
85
+ thread?: {
86
+ /** enabled by default */
87
+ enabled?: boolean;
88
+ /** new thread button/menu item */
89
+ newThread?: {
90
+ /** show/hide enabled by default */
91
+ enabled?: boolean;
92
+ /** default is new thread, changes label and icon */
93
+ type?: 'default' | 'clear';
94
+ /** label override */
95
+ label?: string;
96
+ };
97
+ /** history button/menu item */
98
+ history?: {
99
+ /** show/hide enabled by default */
100
+ enabled?: boolean;
101
+ };
102
+ };
82
103
  }
83
104
  /**
84
105
  * Suggested question for initial chat page.
@@ -0,0 +1,5 @@
1
+ export declare const useTranslation: () => {
2
+ t: (key: string, options?: {
3
+ [x: string]: string | number;
4
+ } | undefined) => string;
5
+ };