@carbon/ai-chat 1.2.1 → 1.3.0-rc.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/dist/es/aiChatEntry.js +7 -7
- package/dist/es/chat.ChatAppEntry.js +788 -391
- package/dist/es/chat.ChatAppEntry.js.map +1 -1
- package/dist/es/chat.PageObjectId.js +10 -1
- package/dist/es/chat.PageObjectId.js.map +1 -1
- package/dist/es/serverEntry.js +1 -1
- package/dist/es/web-components/cds-aichat-container/index.js +6 -6
- package/dist/es/web-components/cds-aichat-custom-element/index.js +6 -6
- package/dist/es-custom/aiChatEntry.js +7 -7
- package/dist/es-custom/chat.ChatAppEntry.js +788 -391
- package/dist/es-custom/chat.ChatAppEntry.js.map +1 -1
- package/dist/es-custom/chat.PageObjectId.js +10 -1
- package/dist/es-custom/chat.PageObjectId.js.map +1 -1
- package/dist/es-custom/serverEntry.js +1 -1
- package/dist/es-custom/web-components/cds-aichat-container/index.js +6 -6
- package/dist/es-custom/web-components/cds-aichat-custom-element/index.js +6 -6
- package/dist/types/aiChatEntry.d.ts +2 -2
- package/dist/types/{serverEntry-Cad3Ek2W.d.ts → serverEntry-BMoPx5K4.d.ts} +266 -48
- package/dist/types/serverEntry.d.ts +1 -1
- package/package.json +11 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as BusEventType, g as ButtonItemKind, h as ButtonItemType, b as CancellationReason, c as CarbonTheme, n as ChainOfThoughtStepStatus, C as CornersType, E as ErrorType, F as FeedbackInteractionType, f as FileStatusValue, m as HumanAgentMessageType, H as HumanAgentsOnlineStatus, I as IFrameItemDisplayOption, o as MessageErrorState, i as MessageInputType, j as MessageResponseTypes, M as MessageSendSource, d as MinimizeButtonIconType, O as OnErrorType, k as OptionItemPreference,
|
|
1
|
+
export { B as BusEventType, g as ButtonItemKind, h as ButtonItemType, b as CancellationReason, c as CarbonTheme, n as ChainOfThoughtStepStatus, C as CornersType, E as ErrorType, F as FeedbackInteractionType, f as FileStatusValue, m as HumanAgentMessageType, H as HumanAgentsOnlineStatus, I as IFrameItemDisplayOption, o as MessageErrorState, i as MessageInputType, j as MessageResponseTypes, M as MessageSendSource, d as MinimizeButtonIconType, O as OnErrorType, k as OptionItemPreference, p as PageObjectId, P as PanelType, S as ScreenShareState, U as UserType, a as ViewChangeReason, V as ViewType, l as WidthOptions, W as WriteableElementName, e as enLanguagePack } from "./chat.PageObjectId.js";
|
|
2
2
|
|
|
3
3
|
var LayoutCustomProperties;
|
|
4
4
|
|
|
@@ -70,8 +70,6 @@ import "lit/directive.js";
|
|
|
70
70
|
|
|
71
71
|
import "@carbon/web-components/es-custom/components/list/index.js";
|
|
72
72
|
|
|
73
|
-
import "lodash-es/debounce.js";
|
|
74
|
-
|
|
75
73
|
import "@carbon/web-components/es-custom/components/data-table/index.js";
|
|
76
74
|
|
|
77
75
|
import "@carbon/web-components/es-custom/components/checkbox/index.js";
|
|
@@ -148,6 +146,10 @@ import "@carbon/web-components/es-custom/components/skeleton-text/skeleton-text.
|
|
|
148
146
|
|
|
149
147
|
import "@carbon/web-components/es-custom/components/skeleton-placeholder/skeleton-placeholder.js";
|
|
150
148
|
|
|
149
|
+
import "@carbon/icons/es/chevron--down/16.js";
|
|
150
|
+
|
|
151
|
+
import "@carbon/icons/es/chevron--up/16.js";
|
|
152
|
+
|
|
151
153
|
import "@carbon/icons/es/touch--interaction/16.js";
|
|
152
154
|
|
|
153
155
|
import "@carbon/icons/es/send/16.js";
|
|
@@ -162,14 +164,12 @@ import "@carbon/icons/es/chevron--left/16.js";
|
|
|
162
164
|
|
|
163
165
|
import "@carbon/icons/es/chevron--right/16.js";
|
|
164
166
|
|
|
167
|
+
import "lodash-es/debounce.js";
|
|
168
|
+
|
|
165
169
|
import "@carbon/icons/es/link/16.js";
|
|
166
170
|
|
|
167
171
|
import "@carbon/icons/es/maximize/16.js";
|
|
168
172
|
|
|
169
|
-
import "@carbon/icons/es/chevron--down/16.js";
|
|
170
|
-
|
|
171
|
-
import "@carbon/icons/es/chevron--up/16.js";
|
|
172
|
-
|
|
173
173
|
import "@carbon/web-components/es-custom/components/tag/operational-tag.js";
|
|
174
174
|
|
|
175
175
|
import "@carbon/icons/es/checkmark/32.js";
|
|
@@ -72,8 +72,6 @@ import "lit/directive.js";
|
|
|
72
72
|
|
|
73
73
|
import "@carbon/web-components/es-custom/components/list/index.js";
|
|
74
74
|
|
|
75
|
-
import "lodash-es/debounce.js";
|
|
76
|
-
|
|
77
75
|
import "@carbon/web-components/es-custom/components/data-table/index.js";
|
|
78
76
|
|
|
79
77
|
import "@carbon/web-components/es-custom/components/checkbox/index.js";
|
|
@@ -150,6 +148,10 @@ import "@carbon/web-components/es-custom/components/skeleton-text/skeleton-text.
|
|
|
150
148
|
|
|
151
149
|
import "@carbon/web-components/es-custom/components/skeleton-placeholder/skeleton-placeholder.js";
|
|
152
150
|
|
|
151
|
+
import "@carbon/icons/es/chevron--down/16.js";
|
|
152
|
+
|
|
153
|
+
import "@carbon/icons/es/chevron--up/16.js";
|
|
154
|
+
|
|
153
155
|
import "@carbon/icons/es/touch--interaction/16.js";
|
|
154
156
|
|
|
155
157
|
import "@carbon/icons/es/send/16.js";
|
|
@@ -164,14 +166,12 @@ import "@carbon/icons/es/chevron--left/16.js";
|
|
|
164
166
|
|
|
165
167
|
import "@carbon/icons/es/chevron--right/16.js";
|
|
166
168
|
|
|
169
|
+
import "lodash-es/debounce.js";
|
|
170
|
+
|
|
167
171
|
import "@carbon/icons/es/link/16.js";
|
|
168
172
|
|
|
169
173
|
import "@carbon/icons/es/maximize/16.js";
|
|
170
174
|
|
|
171
|
-
import "@carbon/icons/es/chevron--down/16.js";
|
|
172
|
-
|
|
173
|
-
import "@carbon/icons/es/chevron--up/16.js";
|
|
174
|
-
|
|
175
175
|
import "@carbon/web-components/es-custom/components/tag/operational-tag.js";
|
|
176
176
|
|
|
177
177
|
import "@carbon/icons/es/checkmark/32.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ChatContainerProps, B as BusEventViewPreChange, a as ChatInstance, b as BusEventViewChange } from './serverEntry-
|
|
2
|
-
export {
|
|
1
|
+
import { C as ChatContainerProps, B as BusEventViewPreChange, a as ChatInstance, b as BusEventViewChange } from './serverEntry-BMoPx5K4.js';
|
|
2
|
+
export { ay as AdditionalDataToAgent, az as AgentAvailability, aV as AudioItem, aQ as BaseGenericItem, aW as BaseMessageInput, v as BusEvent, K as BusEventChatReady, M as BusEventChunkUserDefinedResponse, O as BusEventClosePanelButtonClicked, Q as BusEventCustomPanelClose, R as BusEventCustomPanelOpen, U as BusEventCustomPanelPreClose, X as BusEventCustomPanelPreOpen, Y as BusEventFeedback, Z as BusEventHistoryBegin, _ as BusEventHistoryEnd, w as BusEventHumanAgentAreAnyAgentsOnline, x as BusEventHumanAgentEndChat, y as BusEventHumanAgentPreEndChat, z as BusEventHumanAgentPreReceive, A as BusEventHumanAgentPreSend, G as BusEventHumanAgentPreStartChat, H as BusEventHumanAgentReceive, J as BusEventHumanAgentSend, $ as BusEventMessageItemCustom, a0 as BusEventPreReceive, a1 as BusEventPreReset, a2 as BusEventPreSend, a3 as BusEventReceive, a4 as BusEventReset, a5 as BusEventSend, a6 as BusEventType, a7 as BusEventUserDefinedResponse, aX as ButtonItem, aY as ButtonItemKind, aZ as ButtonItemType, af as CancellationReason, ai as CarbonTheme, a_ as CardItem, a$ as CarouselItem, bX as CdsAiChatContainerAttributes, bY as CdsAiChatCustomElementAttributes, bJ as ChainOfThoughtStep, bK as ChainOfThoughtStepStatus, j as ChangeFunction, e as ChatHeaderConfig, k as ChatInstanceInput, ag as ChatInstanceMessaging, l as ChatInstanceNotifications, m as ChatInstanceServiceDeskActions, b0 as Chunk, b1 as CompleteItemChunk, b2 as ConnectToHumanAgentItem, b3 as ConnectToHumanAgentItemTransferInfo, aB as ConnectingErrorInfo, b4 as ConversationalSearchItem, b5 as ConversationalSearchItemCitation, u as CornersType, aj as CustomMenuOption, f as CustomPanelConfigOptions, g as CustomPanelInstance, i as CustomPanelOpenOptions, h as CustomPanels, ah as CustomSendMessageOptions, b6 as DateItem, aw as DeepPartial, D as DefaultCustomPanelConfigOptions, ak as DisclaimerPublicConfig, aC as DisconnectedErrorInfo, aD as EndChatInfo, aE as ErrorType, E as EventBusHandler, n as EventHandlers, b7 as EventInput, b8 as EventInputData, a8 as FeedbackInteractionType, aF as FileStatusValue, aG as FileUpload, F as FileUploadCapabilities, b9 as FinalResponseChunk, ba as GenericItem, bb as GenericItemMessageFeedbackCategories, bL as GenericItemMessageFeedbackOptions, bM as GenericItemMessageOptions, bc as GridItem, am as HeaderConfig, bT as HistoryItem, ab as HomeScreenConfig, ac as HomeScreenStarterButton, ad as HomeScreenStarterButtons, ae as HomeScreenState, bd as HorizontalCellAlignment, bI as HumanAgentMessageType, aA as HumanAgentsOnlineStatus, be as IFrameItem, bf as IFrameItemDisplayOption, bg as ImageItem, I as IncreaseOrDecrease, bh as InlineErrorItem, an as InputConfig, bi as ItemStreamingMetadata, ao as LanguagePack, bV as LauncherCallToActionConfig, bW as LauncherConfig, ap as LayoutConfig, L as LayoutCustomProperties, bn as MediaFileAccessibility, bj as MediaItem, bk as MediaItemDimensions, bl as MediaSubtitleTrack, bm as MediaTranscript, bN as Message, bU as MessageErrorState, bQ as MessageHistoryFeedback, bo as MessageInput, bp as MessageInputType, bq as MessageItemPanelInfo, br as MessageOutput, bs as MessageRequest, aT as MessageRequestHistory, bt as MessageResponse, aS as MessageResponseHistory, aR as MessageResponseOptions, bu as MessageResponseTypes, a9 as MessageSendSource, aq as MinimizeButtonIconType, N as NotificationMessage, ax as ObjectMap, ar as OnErrorData, as as OnErrorType, bv as OptionItem, bw as OptionItemPreference, c0 as PageObjectId, P as PanelType, bx as PartialItemChunk, bO as PartialOrCompleteItemChunk, bP as PartialResponse, by as PauseItem, av as PersistedHumanAgentState, d as PersistedState, r as PublicChatHumanAgentState, s as PublicChatState, at as PublicConfig, au as PublicConfigMessaging, p as PublicCustomPanelsState, q as PublicDefaultCustomPanelState, o as PublicInputState, bZ as RenderUserDefinedResponse, b_ as RenderUserDefinedState, b$ as RenderWriteableElementResponse, aU as ResponseUserProfile, aH as ScreenShareState, bR as SearchResult, S as SendOptions, aI as ServiceDesk, aJ as ServiceDeskCallback, aK as ServiceDeskCapabilities, aL as ServiceDeskErrorInfo, aM as ServiceDeskFactoryParameters, aN as ServiceDeskPublicConfig, bH as SingleOption, aO as StartChatOptions, bz as StreamChunk, c1 as TestId, bA as TextItem, T as TypeAndHandler, bB as UserDefinedItem, aP as UserMessageErrorInfo, bS as UserType, bC as VerticalCellAlignment, bD as VideoItem, aa as ViewChangeReason, V as ViewState, c as ViewType, bE as WidthOptions, bF as WithBodyAndFooter, bG as WithWidthOptions, W as WriteableElementName, t as WriteableElements, al as enLanguagePack } from './serverEntry-BMoPx5K4.js';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import '@carbon/web-components/es/components/notification/defs.js';
|
|
5
5
|
import '@carbon/web-components/es/components/button/defs.js';
|
|
@@ -69,6 +69,17 @@ declare enum ViewType {
|
|
|
69
69
|
*/
|
|
70
70
|
MAIN_WINDOW = "mainWindow"
|
|
71
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* Describes the different panel types that Carbon AI Chat supports.
|
|
74
|
+
*
|
|
75
|
+
* @category Instance
|
|
76
|
+
*/
|
|
77
|
+
declare enum PanelType {
|
|
78
|
+
/**
|
|
79
|
+
* Opens the panel so that it overlays the main chat content.
|
|
80
|
+
*/
|
|
81
|
+
DEFAULT = "default"
|
|
82
|
+
}
|
|
72
83
|
/**
|
|
73
84
|
* This manager handles fetching an instance for manipulating the custom panel.
|
|
74
85
|
*
|
|
@@ -78,7 +89,7 @@ interface CustomPanels {
|
|
|
78
89
|
/**
|
|
79
90
|
* Gets a custom panel instance.
|
|
80
91
|
*/
|
|
81
|
-
getPanel: () => CustomPanelInstance;
|
|
92
|
+
getPanel: (panel?: PanelType) => CustomPanelInstance;
|
|
82
93
|
}
|
|
83
94
|
/**
|
|
84
95
|
* The custom panel instance for controlling and manipulating a custom panel in Carbon AI Chat.
|
|
@@ -95,69 +106,104 @@ interface CustomPanelInstance {
|
|
|
95
106
|
*
|
|
96
107
|
* @param options Custom panel options.
|
|
97
108
|
*/
|
|
98
|
-
open: (options?:
|
|
109
|
+
open: (options?: CustomPanelOpenOptions) => void;
|
|
99
110
|
/**
|
|
100
111
|
* Closes the custom panel.
|
|
101
112
|
*/
|
|
102
113
|
close: () => void;
|
|
103
114
|
}
|
|
104
115
|
/**
|
|
105
|
-
*
|
|
106
|
-
* {@link
|
|
107
|
-
*
|
|
108
|
-
* Any options specific to either the BasePanelComponent or CustomPanelConfigOptions should be added to the respective
|
|
109
|
-
* interface.
|
|
116
|
+
* Options that change how the custom panel looks. When a header is shown, it inherits styling and behavior from the
|
|
117
|
+
* configured {@link HeaderConfig} (title, assistant name, AI slug, minimize button style, overflow menu, etc.) unless
|
|
118
|
+
* explicitly overridden below.
|
|
110
119
|
*
|
|
111
120
|
* @category Instance
|
|
121
|
+
*
|
|
122
|
+
* @deprecated Use {@link DefaultCustomPanelConfigOptions} for default panels.
|
|
123
|
+
*
|
|
112
124
|
*/
|
|
113
|
-
interface
|
|
125
|
+
interface CustomPanelConfigOptions {
|
|
114
126
|
/**
|
|
115
|
-
* The panel title
|
|
127
|
+
* The panel title displayed in the custom panel header. Left blank by default which causes the configured chat header
|
|
128
|
+
* title/name to be shown instead. When a back button is visible the inherited header stays on screen above the panel
|
|
129
|
+
* so this title acts like a breadcrumb; when the back button is hidden, the header fills the panel chrome and this
|
|
130
|
+
* title becomes the primary heading within the overlay.
|
|
116
131
|
*/
|
|
117
132
|
title?: string;
|
|
118
133
|
/**
|
|
119
|
-
* Indicates if the close button in the custom panel should be hidden.
|
|
134
|
+
* Indicates if the close/minimize button in the custom panel should be hidden.
|
|
120
135
|
*/
|
|
121
136
|
hideCloseButton?: boolean;
|
|
122
137
|
/**
|
|
123
|
-
* Indicates if the panel header should be hidden.
|
|
138
|
+
* Indicates if the panel header should be hidden. Hiding the header removes the inherited title, AI slug, minimize
|
|
139
|
+
* button, and back button chrome entirely. Leave this undefined to animate the panel in with the standard header; set
|
|
140
|
+
* it to true when you need a chrome-free experience (for example, when the panel content provides its own close
|
|
141
|
+
* controls or you want the panel to cover the chat header without animating the header into view).
|
|
124
142
|
*/
|
|
125
143
|
hidePanelHeader?: boolean;
|
|
126
144
|
/**
|
|
127
|
-
* Indicates if the back button in the custom panel should be hidden.
|
|
145
|
+
* Indicates if the back button in the custom panel should be hidden. When {@link hidePanelHeader} is true, the back
|
|
146
|
+
* button is hidden automatically. When the back button is visible the panel opens beneath the chat header so users
|
|
147
|
+
* can always access the assistant-level header controls while the panel is active.
|
|
128
148
|
*/
|
|
129
149
|
hideBackButton?: boolean;
|
|
130
150
|
/**
|
|
131
|
-
*
|
|
132
|
-
*
|
|
151
|
+
* Called when the header's close/minimize button is clicked. By default Carbon AI Chat will run its normal close
|
|
152
|
+
* behavior (which collapses the experience) before this callback fires; set {@link disableDefaultCloseAction} to true
|
|
153
|
+
* if you plan to intercept the event and manage closing yourself. The callback still fires even when the default
|
|
154
|
+
* action is disabled.
|
|
133
155
|
*/
|
|
134
156
|
onClickClose?: () => void;
|
|
135
157
|
/**
|
|
136
|
-
* Called when the restart button is clicked.
|
|
158
|
+
* Called when the restart button in the header is clicked. Use this to trigger a conversation reset or your own
|
|
159
|
+
* telemetry when the restart control is surfaced.
|
|
137
160
|
*/
|
|
138
161
|
onClickRestart?: () => void;
|
|
139
162
|
/**
|
|
140
|
-
*
|
|
163
|
+
* Called after the header's back button is clicked. The panel automatically closes before this callback is invoked,
|
|
164
|
+
* so you can safely run follow-up logic or analytics once the panel has been dismissed.
|
|
141
165
|
*/
|
|
142
166
|
onClickBack?: () => void;
|
|
167
|
+
/**
|
|
168
|
+
* Determines if the panel open/close animation should be turned off.
|
|
169
|
+
*/
|
|
170
|
+
disableAnimation?: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* Disables the default action that is taken when the close button is clicked. Normally clicking the close/minimize
|
|
173
|
+
* button will run Carbon AI Chat's standard close routine (after verifying no view change is in progress). Set this
|
|
174
|
+
* to true when you want to keep the experience open or handle closing asynchronously; you'll need to perform the
|
|
175
|
+
* desired close work inside {@link onClickClose}.
|
|
176
|
+
*/
|
|
177
|
+
disableDefaultCloseAction?: boolean;
|
|
143
178
|
}
|
|
144
179
|
/**
|
|
145
|
-
* Options
|
|
180
|
+
* Options supported by the default custom panel implementation.
|
|
146
181
|
*
|
|
147
|
-
* @
|
|
182
|
+
* When {@link hideBackButton} is set to true, any {@link title} value defined here will override the title/name in
|
|
183
|
+
* the main chat header.
|
|
148
184
|
*/
|
|
149
|
-
interface
|
|
185
|
+
interface DefaultCustomPanelConfigOptions {
|
|
150
186
|
/**
|
|
151
|
-
*
|
|
187
|
+
* The panel title displayed in the custom panel header. When a back button is visible the inherited header remains
|
|
188
|
+
* on screen above the panel so this title acts like a breadcrumb; when the back button is hidden, the header fills
|
|
189
|
+
* the panel chrome and this title becomes the primary heading within the overlay.
|
|
190
|
+
*/
|
|
191
|
+
title?: string;
|
|
192
|
+
/**
|
|
193
|
+
* Determines if the panel open/close animation should be turned off. By default, the panel will animate up from the
|
|
194
|
+
* bottom of the chat window.
|
|
152
195
|
*/
|
|
153
196
|
disableAnimation?: boolean;
|
|
154
197
|
/**
|
|
155
|
-
*
|
|
156
|
-
* action closes Carbon AI Chat and disabling this will cause the button to not do anything. You can override the button
|
|
157
|
-
* behavior by using the {@link onClickClose} callback.
|
|
198
|
+
* Indicates if the back button in the custom panel should be hidden.
|
|
158
199
|
*/
|
|
159
|
-
|
|
200
|
+
hideBackButton?: boolean;
|
|
160
201
|
}
|
|
202
|
+
/**
|
|
203
|
+
* Options accepted by {@link CustomPanelInstance.open}. Legacy consumers may continue to pass
|
|
204
|
+
* {@link CustomPanelConfigOptions} until the next major release.
|
|
205
|
+
*/
|
|
206
|
+
type CustomPanelOpenOptions = CustomPanelConfigOptions | DefaultCustomPanelConfigOptions;
|
|
161
207
|
|
|
162
208
|
/*
|
|
163
209
|
* Copyright IBM Corp. 2025
|
|
@@ -998,6 +1044,82 @@ interface MediaItemDimensions {
|
|
|
998
1044
|
*/
|
|
999
1045
|
base_height?: number;
|
|
1000
1046
|
}
|
|
1047
|
+
/**
|
|
1048
|
+
* Represents a single subtitle/caption track for video content.
|
|
1049
|
+
* Uses WebVTT format for accessibility. Rendered as native HTML5 track elements.
|
|
1050
|
+
*
|
|
1051
|
+
* @category Messaging
|
|
1052
|
+
*/
|
|
1053
|
+
interface MediaSubtitleTrack {
|
|
1054
|
+
/**
|
|
1055
|
+
* URL pointing to the WebVTT subtitle file.
|
|
1056
|
+
*/
|
|
1057
|
+
src: string;
|
|
1058
|
+
/**
|
|
1059
|
+
* The language code (e.g., "en", "es", "fr").
|
|
1060
|
+
* Used for the track's srclang attribute.
|
|
1061
|
+
*/
|
|
1062
|
+
language: string;
|
|
1063
|
+
/**
|
|
1064
|
+
* Human-readable label for the track (e.g., "English", "Spanish").
|
|
1065
|
+
* Displayed in the browser's subtitle menu.
|
|
1066
|
+
*/
|
|
1067
|
+
label: string;
|
|
1068
|
+
/**
|
|
1069
|
+
* The kind of text track.
|
|
1070
|
+
* - "subtitles": Translation of dialogue (default)
|
|
1071
|
+
* - "captions": Transcription including sound effects
|
|
1072
|
+
* - "descriptions": Audio descriptions for visually impaired
|
|
1073
|
+
*/
|
|
1074
|
+
kind?: "subtitles" | "captions" | "descriptions";
|
|
1075
|
+
/**
|
|
1076
|
+
* Whether this track should be enabled by default.
|
|
1077
|
+
* Only one track should be default.
|
|
1078
|
+
*/
|
|
1079
|
+
default?: boolean;
|
|
1080
|
+
}
|
|
1081
|
+
/**
|
|
1082
|
+
* Represents a text transcript for audio content.
|
|
1083
|
+
* Displayed as readable text below the audio player for accessibility.
|
|
1084
|
+
*
|
|
1085
|
+
* @category Messaging
|
|
1086
|
+
*/
|
|
1087
|
+
interface MediaTranscript {
|
|
1088
|
+
/**
|
|
1089
|
+
* Full text transcript of the audio content.
|
|
1090
|
+
* Supports markdown for formatting.
|
|
1091
|
+
*/
|
|
1092
|
+
text: string;
|
|
1093
|
+
/**
|
|
1094
|
+
* Language of the transcript (e.g., "en", "es", "fr").
|
|
1095
|
+
*/
|
|
1096
|
+
language?: string;
|
|
1097
|
+
/**
|
|
1098
|
+
* Optional label for the transcript (e.g., "English Transcript").
|
|
1099
|
+
*/
|
|
1100
|
+
label?: string;
|
|
1101
|
+
}
|
|
1102
|
+
/**
|
|
1103
|
+
* Accessibility features for raw media files (not embedded platforms).
|
|
1104
|
+
* These features only apply when using direct file URLs (e.g., .mp4, .mp3).
|
|
1105
|
+
*
|
|
1106
|
+
* For embedded platforms (YouTube, Vimeo, SoundCloud, Mixcloud, etc.),
|
|
1107
|
+
* rely on the platform's built-in accessibility features instead.
|
|
1108
|
+
*
|
|
1109
|
+
* @category Messaging
|
|
1110
|
+
*/
|
|
1111
|
+
interface MediaFileAccessibility {
|
|
1112
|
+
/**
|
|
1113
|
+
* Subtitle/caption tracks for video files.
|
|
1114
|
+
* Supports WebVTT format rendered as native HTML5 track elements.
|
|
1115
|
+
*/
|
|
1116
|
+
subtitle_tracks?: MediaSubtitleTrack[];
|
|
1117
|
+
/**
|
|
1118
|
+
* Text transcript for audio files.
|
|
1119
|
+
* Displayed as expandable text below the audio player.
|
|
1120
|
+
*/
|
|
1121
|
+
transcript?: MediaTranscript;
|
|
1122
|
+
}
|
|
1001
1123
|
/**
|
|
1002
1124
|
* The different ways an iframe item may be displayed.
|
|
1003
1125
|
*
|
|
@@ -1045,6 +1167,11 @@ interface MediaItem<TUserDefinedType = Record<string, unknown>> extends BaseGene
|
|
|
1045
1167
|
* Settings that control the dimensions for the media item.
|
|
1046
1168
|
*/
|
|
1047
1169
|
dimensions?: MediaItemDimensions;
|
|
1170
|
+
/**
|
|
1171
|
+
* Accessibility features for raw media files.
|
|
1172
|
+
* Only applies to direct file URLs (e.g., .mp4, .mp3), not embedded platforms.
|
|
1173
|
+
*/
|
|
1174
|
+
file_accessibility?: MediaFileAccessibility;
|
|
1048
1175
|
}
|
|
1049
1176
|
/**
|
|
1050
1177
|
* Citations for text generated by an AI to provide the user with relevant source information and context.
|
|
@@ -2190,6 +2317,10 @@ declare enum BusEventType {
|
|
|
2190
2317
|
* Fired after the view changes (e.g. when the chat window closes).
|
|
2191
2318
|
*/
|
|
2192
2319
|
VIEW_CHANGE = "view:change",
|
|
2320
|
+
/**
|
|
2321
|
+
* Fired when a button response item with button_type "custom_event" is clicked.
|
|
2322
|
+
* Provides the originating button item and the full message payload to handlers.
|
|
2323
|
+
*/
|
|
2193
2324
|
MESSAGE_ITEM_CUSTOM = "messageItemCustom",
|
|
2194
2325
|
/**
|
|
2195
2326
|
* Fired when a userDefined message is received.
|
|
@@ -2889,7 +3020,8 @@ interface ChatInstanceMessaging {
|
|
|
2889
3020
|
removeMessages: (messageIDs: string[]) => Promise<void>;
|
|
2890
3021
|
/**
|
|
2891
3022
|
* Clears the current conversation. This will trigger a restart of the conversation but will not start a new
|
|
2892
|
-
* conversation (hydration).
|
|
3023
|
+
* conversation (hydration). It will also clear any loading indicators UNLESS you have set
|
|
3024
|
+
* {@link PublicConfigMessaging.messageLoadingIndicatorTimeoutSecs} to 0.
|
|
2893
3025
|
*/
|
|
2894
3026
|
clearConversation: () => Promise<void>;
|
|
2895
3027
|
/**
|
|
@@ -2900,8 +3032,8 @@ interface ChatInstanceMessaging {
|
|
|
2900
3032
|
/**
|
|
2901
3033
|
* Restarts the conversation with the assistant. This does not make any changes to a conversation with a human agent.
|
|
2902
3034
|
* This will clear all the current assistant messages from the main assistant view and cancel any outstanding
|
|
2903
|
-
* messages.
|
|
2904
|
-
*
|
|
3035
|
+
* messages. It will also clear any loading indicators UNLESS you have set
|
|
3036
|
+
* {@link PublicConfigMessaging.messageLoadingIndicatorTimeoutSecs} to 0.
|
|
2905
3037
|
*/
|
|
2906
3038
|
restartConversation: () => Promise<void>;
|
|
2907
3039
|
}
|
|
@@ -2958,13 +3090,67 @@ interface ChatInstance extends EventHandlers, ChatActions {
|
|
|
2958
3090
|
customPanels?: CustomPanels;
|
|
2959
3091
|
}
|
|
2960
3092
|
/**
|
|
2961
|
-
* This is the state made available by calling getState. This is a public method that returns immutable values.
|
|
3093
|
+
* This is the state made available by calling {@link ChatInstance.getState}. This is a public method that returns immutable values.
|
|
2962
3094
|
*
|
|
2963
3095
|
* @category Instance
|
|
2964
3096
|
*/
|
|
3097
|
+
interface PublicInputState {
|
|
3098
|
+
/**
|
|
3099
|
+
* @experimental Raw text currently queued in the input before being sent to customSendMessage.
|
|
3100
|
+
*/
|
|
3101
|
+
rawValue: string;
|
|
3102
|
+
}
|
|
3103
|
+
/**
|
|
3104
|
+
* Represents public state for each supported custom panel variant.
|
|
3105
|
+
*/
|
|
3106
|
+
interface PublicDefaultCustomPanelState {
|
|
3107
|
+
/** Indicates if the default custom panel overlay is currently open. */
|
|
3108
|
+
isOpen: boolean;
|
|
3109
|
+
}
|
|
3110
|
+
interface PublicCustomPanelsState {
|
|
3111
|
+
/** State for the default overlay-style custom panel. */
|
|
3112
|
+
default: PublicDefaultCustomPanelState;
|
|
3113
|
+
}
|
|
2965
3114
|
type PublicChatState = Readonly<Omit<PersistedState, "humanAgentState"> & {
|
|
3115
|
+
/**
|
|
3116
|
+
* Current human agent state.
|
|
3117
|
+
*/
|
|
2966
3118
|
humanAgent: PublicChatHumanAgentState;
|
|
3119
|
+
/**
|
|
3120
|
+
* Counter that indicates if a message is loading and a loading indicator should be displayed.
|
|
3121
|
+
* If "0" then we do not show loading indicator.
|
|
3122
|
+
*/
|
|
3123
|
+
isMessageLoadingCounter: number;
|
|
3124
|
+
/**
|
|
3125
|
+
* Optional string to display next to the loading indicator.
|
|
3126
|
+
*/
|
|
3127
|
+
isMessageLoadingText?: string;
|
|
3128
|
+
/**
|
|
3129
|
+
* Counter that indicates if the chat is hydrating and a full screen loading state should be displayed.
|
|
3130
|
+
*/
|
|
3131
|
+
isHydratingCounter: number;
|
|
3132
|
+
/**
|
|
3133
|
+
* @experimental State representing the main input surface.
|
|
3134
|
+
*/
|
|
3135
|
+
input: PublicInputState;
|
|
3136
|
+
/**
|
|
3137
|
+
* @experimental State for any surfaced custom panels.
|
|
3138
|
+
*/
|
|
3139
|
+
customPanels: PublicCustomPanelsState;
|
|
2967
3140
|
}>;
|
|
3141
|
+
interface ChatInstanceInput {
|
|
3142
|
+
/**
|
|
3143
|
+
* @experimental Updates the raw text queued in the input before it is sent to customSendMessage.
|
|
3144
|
+
* Use this when you want to manipulate the canonical value while leaving
|
|
3145
|
+
* presentation up to the default renderer or, in the future, a custom slot implementation.
|
|
3146
|
+
*
|
|
3147
|
+
* @example
|
|
3148
|
+
* ```ts
|
|
3149
|
+
* instance.input.updateRawValue((prev) => `${prev} @celeste`);
|
|
3150
|
+
* ```
|
|
3151
|
+
*/
|
|
3152
|
+
updateRawValue: (updater: (previous: string) => string) => void;
|
|
3153
|
+
}
|
|
2968
3154
|
/**
|
|
2969
3155
|
* Current connection state of the human agent experience.
|
|
2970
3156
|
*
|
|
@@ -3065,19 +3251,16 @@ interface ChatActions {
|
|
|
3065
3251
|
*/
|
|
3066
3252
|
writeableElements: Partial<WriteableElements>;
|
|
3067
3253
|
/**
|
|
3068
|
-
*
|
|
3069
|
-
* you want to force input into a button, etc.
|
|
3254
|
+
* @deprecated Configure via {@link InputConfig.isVisible}.
|
|
3070
3255
|
*/
|
|
3071
3256
|
updateInputFieldVisibility: (isVisible: boolean) => void;
|
|
3072
3257
|
/**
|
|
3073
|
-
*
|
|
3074
|
-
*
|
|
3258
|
+
* @deprecated Configure via {@link InputConfig.isDisabled}
|
|
3259
|
+
* or {@link PublicConfig.isReadonly}.
|
|
3075
3260
|
*/
|
|
3076
3261
|
updateInputIsDisabled: (isDisabled: boolean) => void;
|
|
3077
3262
|
/**
|
|
3078
|
-
*
|
|
3079
|
-
* small empty circle on the launcher. If there are any unread messages from a human agent, this indicator will be
|
|
3080
|
-
* shown with a number regardless of the custom setting of this flag.
|
|
3263
|
+
* @deprecated Configure via {@link LauncherConfig.showUnreadIndicator}.
|
|
3081
3264
|
*/
|
|
3082
3265
|
updateAssistantUnreadIndicatorVisibility: (isVisible: boolean) => void;
|
|
3083
3266
|
/**
|
|
@@ -3102,15 +3285,25 @@ interface ChatActions {
|
|
|
3102
3285
|
*/
|
|
3103
3286
|
doAutoScroll: () => void;
|
|
3104
3287
|
/**
|
|
3105
|
-
* Either increases or decreases the internal counter that indicates whether the "
|
|
3106
|
-
* shown. If the count is greater than zero, then the indicator is shown. Values of "increase" or "decrease" will
|
|
3107
|
-
* increase or decrease the value.
|
|
3288
|
+
* @param direction Either increases or decreases the internal counter that indicates whether the "message is loading"
|
|
3289
|
+
* indicator is shown. If the count is greater than zero, then the indicator is shown. Values of "increase" or "decrease" will
|
|
3290
|
+
* increase or decrease the value. "reset" will set the value back to 0. You may pass undefined as the first value
|
|
3291
|
+
* if you just wish to update the message.
|
|
3292
|
+
*
|
|
3293
|
+
* You can access the current value via {@link ChatInstance.getState}.
|
|
3294
|
+
*
|
|
3295
|
+
* @param message You can also, optionally, pass a plain text string as the second argument. It will display next to the loading indicator for
|
|
3296
|
+
* you to give meaningful feedback while the message is loading (or simple strings like "Thinking...", etc). The most
|
|
3297
|
+
* recent value will be used. So if you call it with a string value and then again with no value, the value will be
|
|
3298
|
+
* replaced with undefined and stop showing in the UI.
|
|
3108
3299
|
*/
|
|
3109
|
-
updateIsMessageLoadingCounter: (direction: IncreaseOrDecrease) => void;
|
|
3300
|
+
updateIsMessageLoadingCounter: (direction: IncreaseOrDecrease, message?: string) => void;
|
|
3110
3301
|
/**
|
|
3111
3302
|
* Either increases or decreases the internal counter that indicates whether the hydration fullscreen loading state is
|
|
3112
3303
|
* shown. If the count is greater than zero, then the indicator is shown. Values of "increase" or "decrease" will
|
|
3113
|
-
* increase or decrease the value.
|
|
3304
|
+
* increase or decrease the value. "reset" will set the value back to 0.
|
|
3305
|
+
*
|
|
3306
|
+
* You can access the current value via {@link ChatInstance.getState}.
|
|
3114
3307
|
*/
|
|
3115
3308
|
updateIsChatLoadingCounter: (direction: IncreaseOrDecrease) => void;
|
|
3116
3309
|
/**
|
|
@@ -3119,6 +3312,10 @@ interface ChatActions {
|
|
|
3119
3312
|
* @experimental
|
|
3120
3313
|
*/
|
|
3121
3314
|
notifications: ChatInstanceNotifications;
|
|
3315
|
+
/**
|
|
3316
|
+
* Actions for mutating the chat input contents.
|
|
3317
|
+
*/
|
|
3318
|
+
input: ChatInstanceInput;
|
|
3122
3319
|
/**
|
|
3123
3320
|
* Actions that are related to a service desk integration.
|
|
3124
3321
|
*/
|
|
@@ -3134,7 +3331,7 @@ interface ChatActions {
|
|
|
3134
3331
|
/**
|
|
3135
3332
|
* @category Instance
|
|
3136
3333
|
*/
|
|
3137
|
-
type IncreaseOrDecrease = "increase" | "decrease";
|
|
3334
|
+
type IncreaseOrDecrease = "increase" | "decrease" | "reset" | undefined;
|
|
3138
3335
|
/**
|
|
3139
3336
|
* This interface represents the options for when a MessageRequest is sent to the server with the send method.
|
|
3140
3337
|
*
|
|
@@ -3377,6 +3574,10 @@ interface LauncherConfig {
|
|
|
3377
3574
|
* If the launcher is visible. Defaults to true.
|
|
3378
3575
|
*/
|
|
3379
3576
|
isOn?: boolean;
|
|
3577
|
+
/**
|
|
3578
|
+
* Controls whether the unread indicator dot shows even when no human-agent unread count exists.
|
|
3579
|
+
*/
|
|
3580
|
+
showUnreadIndicator?: boolean;
|
|
3380
3581
|
/**
|
|
3381
3582
|
* Properties specific to the mobile launcher.
|
|
3382
3583
|
*/
|
|
@@ -3456,6 +3657,7 @@ declare const enLanguagePack: {
|
|
|
3456
3657
|
launcher_mobileGreeting: string;
|
|
3457
3658
|
launcher_ariaIsExpanded: string;
|
|
3458
3659
|
launcher_closeButton: string;
|
|
3660
|
+
media_transcript_label: string;
|
|
3459
3661
|
messages_youSaid: string;
|
|
3460
3662
|
messages_assistantSaid: string;
|
|
3461
3663
|
messages_agentSaid: string;
|
|
@@ -3784,6 +3986,16 @@ interface InputConfig {
|
|
|
3784
3986
|
* The maximum number of characters allowed in the input field. Defaults to 10000.
|
|
3785
3987
|
*/
|
|
3786
3988
|
maxInputCharacters?: number;
|
|
3989
|
+
/**
|
|
3990
|
+
* Controls whether the main input surface is visible when the chat loads.
|
|
3991
|
+
* Defaults to true.
|
|
3992
|
+
*/
|
|
3993
|
+
isVisible?: boolean;
|
|
3994
|
+
/**
|
|
3995
|
+
* If true, the main input surface starts in a disabled (read-only) state.
|
|
3996
|
+
* Equivalent to {@link PublicConfig.isReadonly}, but scoped just to the assistant input.
|
|
3997
|
+
*/
|
|
3998
|
+
isDisabled?: boolean;
|
|
3787
3999
|
}
|
|
3788
4000
|
/**
|
|
3789
4001
|
* Configuration for the main header of the chat.
|
|
@@ -3791,6 +4003,11 @@ interface InputConfig {
|
|
|
3791
4003
|
* @category Config
|
|
3792
4004
|
*/
|
|
3793
4005
|
interface HeaderConfig {
|
|
4006
|
+
/**
|
|
4007
|
+
* If the chat should supply its own header. Can be false if you have a fullscreen chat or one embedded into a page and
|
|
4008
|
+
* you want to only make use of the main application header. Defaults to true.
|
|
4009
|
+
*/
|
|
4010
|
+
isOn?: boolean;
|
|
3794
4011
|
/**
|
|
3795
4012
|
* Indicates the icon to use for the close button in the header.
|
|
3796
4013
|
*/
|
|
@@ -3871,15 +4088,16 @@ interface PublicConfigMessaging {
|
|
|
3871
4088
|
/**
|
|
3872
4089
|
* Changes the timeout used by the message service when making message calls. The timeout is in seconds. The
|
|
3873
4090
|
* default is 150 seconds. After this time, an error will be shown in the client and an Abort signal will be sent
|
|
3874
|
-
* to customSendMessage. If set to 0, the chat will never timeout.
|
|
4091
|
+
* to customSendMessage. If set to 0, the chat will never timeout. This is tied to either {@link ChatInstanceMessaging.addMessage} or
|
|
4092
|
+
* {@link ChatInstanceMessaging.addMessageChunk} being called after this message was sent. If neither of those methods
|
|
4093
|
+
* are called with in the window defined here, the chat will timeout (unless the value is set to 0).
|
|
3875
4094
|
*/
|
|
3876
4095
|
messageTimeoutSecs?: number;
|
|
3877
4096
|
/**
|
|
3878
4097
|
* Controls how long AI chat should wait before showing the loading indicator. If set to 0, the chat will never show
|
|
3879
|
-
* the loading indicator. This is tied to either {@link ChatInstanceMessaging.addMessage} or
|
|
3880
|
-
* {@link ChatInstanceMessaging.addMessageChunk} being called after this message was sent.
|
|
3881
|
-
*
|
|
3882
|
-
* If set to 0, the chat will never automatically show a loading indicator.
|
|
4098
|
+
* the loading indicator on its own. This is tied to either {@link ChatInstanceMessaging.addMessage} or
|
|
4099
|
+
* {@link ChatInstanceMessaging.addMessageChunk} being called after this message was sent. If neither of those methods
|
|
4100
|
+
* are called with in the window defined here, the loading indicator will be shown.
|
|
3883
4101
|
*/
|
|
3884
4102
|
messageLoadingIndicatorTimeoutSecs?: number;
|
|
3885
4103
|
/**
|
|
@@ -4426,5 +4644,5 @@ declare enum PageObjectId {
|
|
|
4426
4644
|
*/
|
|
4427
4645
|
type TestId = PageObjectId;
|
|
4428
4646
|
|
|
4429
|
-
export {
|
|
4430
|
-
export type {
|
|
4647
|
+
export { LayoutCustomProperties as L, PanelType as P, WriteableElementName as W, BusEventType as a6, FeedbackInteractionType as a8, MessageSendSource as a9, HumanAgentsOnlineStatus as aA, ErrorType as aE, FileStatusValue as aF, ScreenShareState as aH, ButtonItemKind as aY, ButtonItemType as aZ, ViewChangeReason as aa, CancellationReason as af, CarbonTheme as ai, enLanguagePack as al, MinimizeButtonIconType as aq, OnErrorType as as, WidthOptions as bE, HumanAgentMessageType as bI, ChainOfThoughtStepStatus as bK, UserType as bS, MessageErrorState as bU, IFrameItemDisplayOption as bf, MessageInputType as bp, MessageResponseTypes as bu, OptionItemPreference as bw, ViewType as c, PageObjectId as c0, CornersType as u };
|
|
4648
|
+
export type { BusEventMessageItemCustom as $, BusEventHumanAgentPreSend as A, BusEventViewPreChange as B, ChatContainerProps as C, DefaultCustomPanelConfigOptions as D, EventBusHandler as E, FileUploadCapabilities as F, BusEventHumanAgentPreStartChat as G, BusEventHumanAgentReceive as H, IncreaseOrDecrease as I, BusEventHumanAgentSend as J, BusEventChatReady as K, BusEventChunkUserDefinedResponse as M, NotificationMessage as N, BusEventClosePanelButtonClicked as O, BusEventCustomPanelClose as Q, BusEventCustomPanelOpen as R, SendOptions as S, TypeAndHandler as T, BusEventCustomPanelPreClose as U, ViewState as V, BusEventCustomPanelPreOpen as X, BusEventFeedback as Y, BusEventHistoryBegin as Z, BusEventHistoryEnd as _, ChatInstance as a, CarouselItem as a$, BusEventPreReceive as a0, BusEventPreReset as a1, BusEventPreSend as a2, BusEventReceive as a3, BusEventReset as a4, BusEventSend as a5, BusEventUserDefinedResponse as a7, ConnectingErrorInfo as aB, DisconnectedErrorInfo as aC, EndChatInfo as aD, FileUpload as aG, ServiceDesk as aI, ServiceDeskCallback as aJ, ServiceDeskCapabilities as aK, ServiceDeskErrorInfo as aL, ServiceDeskFactoryParameters as aM, ServiceDeskPublicConfig as aN, StartChatOptions as aO, UserMessageErrorInfo as aP, BaseGenericItem as aQ, MessageResponseOptions as aR, MessageResponseHistory as aS, MessageRequestHistory as aT, ResponseUserProfile as aU, AudioItem as aV, BaseMessageInput as aW, ButtonItem as aX, CardItem as a_, HomeScreenConfig as ab, HomeScreenStarterButton as ac, HomeScreenStarterButtons as ad, HomeScreenState as ae, ChatInstanceMessaging as ag, CustomSendMessageOptions as ah, CustomMenuOption as aj, DisclaimerPublicConfig as ak, HeaderConfig as am, InputConfig as an, LanguagePack as ao, LayoutConfig as ap, OnErrorData as ar, PublicConfig as at, PublicConfigMessaging as au, PersistedHumanAgentState as av, DeepPartial as aw, ObjectMap as ax, AdditionalDataToAgent as ay, AgentAvailability as az, BusEventViewChange as b, RenderWriteableElementResponse as b$, Chunk as b0, CompleteItemChunk as b1, ConnectToHumanAgentItem as b2, ConnectToHumanAgentItemTransferInfo as b3, ConversationalSearchItem as b4, ConversationalSearchItemCitation as b5, DateItem as b6, EventInput as b7, EventInputData as b8, FinalResponseChunk as b9, TextItem as bA, UserDefinedItem as bB, VerticalCellAlignment as bC, VideoItem as bD, WithBodyAndFooter as bF, WithWidthOptions as bG, SingleOption as bH, ChainOfThoughtStep as bJ, GenericItemMessageFeedbackOptions as bL, GenericItemMessageOptions as bM, Message as bN, PartialOrCompleteItemChunk as bO, PartialResponse as bP, MessageHistoryFeedback as bQ, SearchResult as bR, HistoryItem as bT, LauncherCallToActionConfig as bV, LauncherConfig as bW, CdsAiChatContainerAttributes as bX, CdsAiChatCustomElementAttributes as bY, RenderUserDefinedResponse as bZ, RenderUserDefinedState as b_, GenericItem as ba, GenericItemMessageFeedbackCategories as bb, GridItem as bc, HorizontalCellAlignment as bd, IFrameItem as be, ImageItem as bg, InlineErrorItem as bh, ItemStreamingMetadata as bi, MediaItem as bj, MediaItemDimensions as bk, MediaSubtitleTrack as bl, MediaTranscript as bm, MediaFileAccessibility as bn, MessageInput as bo, MessageItemPanelInfo as bq, MessageOutput as br, MessageRequest as bs, MessageResponse as bt, OptionItem as bv, PartialItemChunk as bx, PauseItem as by, StreamChunk as bz, TestId as c1, PersistedState as d, ChatHeaderConfig as e, CustomPanelConfigOptions as f, CustomPanelInstance as g, CustomPanels as h, CustomPanelOpenOptions as i, ChangeFunction as j, ChatInstanceInput as k, ChatInstanceNotifications as l, ChatInstanceServiceDeskActions as m, EventHandlers as n, PublicInputState as o, PublicCustomPanelsState as p, PublicDefaultCustomPanelState as q, PublicChatHumanAgentState as r, PublicChatState as s, WriteableElements as t, BusEvent as v, BusEventHumanAgentAreAnyAgentsOnline as w, BusEventHumanAgentEndChat as x, BusEventHumanAgentPreEndChat as y, BusEventHumanAgentPreReceive as z };
|