@accurix/centrinfo-widget 1.0.1 → 2.0.0
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/README.md +53 -3
- package/dist/cdn/centrinfo-widget.js +552 -85
- package/dist/cdn/manifest.json +6 -6
- package/dist/config-CkU4urQY.mjs +30 -0
- package/dist/config-DsNMbdKp.cjs +36 -0
- package/dist/index.cjs +531 -65
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +531 -65
- package/dist/runtime.cjs +1 -1
- package/dist/runtime.d.cts +43 -10
- package/dist/runtime.d.mts +43 -10
- package/dist/runtime.mjs +1 -1
- package/dist/{types-DQWp12Cg.d.mts → types-1ZJJY7Da.d.mts} +337 -11
- package/dist/{types-rfkc-TtX.d.cts → types-B0r4SXaT.d.cts} +337 -11
- package/package.json +5 -4
- package/dist/config-CCkOySUT.mjs +0 -29
- package/dist/config-CzrfVSPp.cjs +0 -35
package/dist/runtime.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`./config-
|
|
1
|
+
const e=require(`./config-DsNMbdKp.cjs`),t=t=>t.demo?new e.S:t.preview?new e.x(new e.C(t.apiBaseUrl,t.token,t.gifApiKey,t.analyticsContextToken,{agentName:t.agentName,agentAvatarUrl:t.agentAvatarUrl},t.identityToken,t.getIdentityToken,t.chatSurface),t.strings):new e.C(t.apiBaseUrl,t.token,t.gifApiKey,t.analyticsContextToken,{agentName:t.agentName,agentAvatarUrl:t.agentAvatarUrl},t.identityToken,t.getIdentityToken,t.chatSurface);exports.ResultTable=e.m,exports.WidgetAnalyticsChart=e._,exports.buildWidgetAnalyticsChartModel=e.v,exports.createChatTransport=t,exports.createPreferredAudioRecorder=e.u,exports.createVoiceAudioConstraints=e.d,exports.formatResultCell=e.h,exports.renderRich=e.a,exports.resolveConfig=e.t,exports.serializeResultCsv=e.g,exports.stopRecorderWithFlush=e.f,exports.useChat=e.n;
|
package/dist/runtime.d.cts
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { _ as PublicChatActionField, a as Source, c as WidgetConfig, d as WidgetUser, f as ActionResult, g as PublicChatAction, h as GifResult, i as FeaturedLink, m as DemoSlotsResult, n as ChatArtifact, o as Visitor, p as AnalyticsVisualization, r as ChatMessage, s as WidgetActionTranslation, t as BootstrapInfo, u as WidgetThemeTokens, v as Transport, y as WidgetStrings } from "./types-B0r4SXaT.cjs";
|
|
2
2
|
import * as preact0 from "preact";
|
|
3
3
|
import { JSX } from "preact";
|
|
4
4
|
|
|
5
5
|
//#region src/config.d.ts
|
|
6
|
-
interface ResolvedConfig extends Required<Omit<WidgetConfig, 'accentColor' | 'agentName' | 'agentAvatarUrl' | 'launcherIcon' | 'gifApiKey' | 'labels' | 'user' | 'analyticsContextToken' | 'identityToken' | 'getIdentityToken' | 'customLauncherSelector' | 'proactiveMessage' | 'proactiveOnPaths' | 'onOpen' | 'onClose' | 'onShow' | 'onHide' | 'onUnreadChange' | 'onMessage' | 'onAction' | 'onHandoff'>> {
|
|
6
|
+
interface ResolvedConfig extends Required<Omit<WidgetConfig, 'accentColor' | 'agentName' | 'agentAvatarUrl' | 'launcherIcon' | 'themeTokens' | 'gifApiKey' | 'labels' | 'locale' | 'translations' | 'user' | 'analyticsContextToken' | 'identityToken' | 'getIdentityToken' | 'customLauncherSelector' | 'proactiveMessage' | 'proactiveOnPaths' | 'onOpen' | 'onClose' | 'onShow' | 'onHide' | 'onUnreadChange' | 'onMessage' | 'onAction' | 'onHandoff'>> {
|
|
7
7
|
accentColor?: string;
|
|
8
8
|
agentName?: string;
|
|
9
9
|
agentAvatarUrl?: string;
|
|
10
10
|
launcherIcon?: string;
|
|
11
|
+
themeTokens?: WidgetConfig['themeTokens'];
|
|
11
12
|
gifApiKey?: string;
|
|
12
13
|
/** Resolved string table (English defaults + host `labels` overrides). */
|
|
13
14
|
strings: WidgetStrings;
|
|
15
|
+
locale: string;
|
|
16
|
+
actionTranslations: Record<string, WidgetActionTranslation>;
|
|
14
17
|
/** Host-app SSO passthrough (see WidgetConfig.user). Optional. */
|
|
15
18
|
user?: WidgetConfig['user'];
|
|
16
19
|
/** Short-lived signed context for governed customer analytics. */
|
|
@@ -31,6 +34,9 @@ interface ResolvedConfig extends Required<Omit<WidgetConfig, 'accentColor' | 'ag
|
|
|
31
34
|
}
|
|
32
35
|
declare const resolveConfig: (cfg: WidgetConfig) => ResolvedConfig;
|
|
33
36
|
//#endregion
|
|
37
|
+
//#region ../centrinfo-results/src/analytics-chart-catalog.d.ts
|
|
38
|
+
type AnalyticsChartCatalogType = 'kpi' | 'table' | 'line' | 'bar' | 'pie' | 'scatter' | 'effectScatter' | 'map' | 'candlestick' | 'boxplot' | 'graph' | 'lines' | 'tree' | 'treemap' | 'sunburst' | 'parallel' | 'sankey' | 'funnel' | 'heatmap' | 'radar' | 'gauge' | 'pictorialBar' | 'themeRiver' | 'matrix' | 'chord' | 'custom' | 'dataset' | 'dataZoom' | 'graphic' | 'richText' | 'globe' | 'bar3D' | 'scatter3D' | 'surface' | 'map3D' | 'lines3D' | 'line3D' | 'scatterGL' | 'linesGL' | 'flowGL' | 'graphGL' | 'polygons3D';
|
|
39
|
+
//#endregion
|
|
34
40
|
//#region ../centrinfo-results/src/types.d.ts
|
|
35
41
|
interface AnalyticsVisualizationColumn {
|
|
36
42
|
key: string;
|
|
@@ -47,9 +53,12 @@ interface AnalyticsVisualizationColumn {
|
|
|
47
53
|
groupable?: boolean;
|
|
48
54
|
}
|
|
49
55
|
interface AnalyticsVisualizationRecommendation {
|
|
50
|
-
type:
|
|
56
|
+
type: AnalyticsChartCatalogType | 'area' | 'stacked_bar';
|
|
51
57
|
mode: string;
|
|
52
58
|
categoryField?: string;
|
|
59
|
+
latitudeField?: string;
|
|
60
|
+
longitudeField?: string;
|
|
61
|
+
geometryField?: string;
|
|
53
62
|
valueFields?: string[];
|
|
54
63
|
seriesField?: string;
|
|
55
64
|
reason?: string;
|
|
@@ -58,10 +67,13 @@ interface AnalyticsVisualizationRecommendation {
|
|
|
58
67
|
interface AnalyticsVisualization$1 {
|
|
59
68
|
version?: number;
|
|
60
69
|
presentation?: 'kpi' | 'chart' | 'table';
|
|
61
|
-
type:
|
|
70
|
+
type: AnalyticsChartCatalogType | 'area' | 'stacked_bar';
|
|
62
71
|
title?: string;
|
|
63
72
|
label?: string;
|
|
64
73
|
value?: string;
|
|
74
|
+
latitudeField?: string;
|
|
75
|
+
longitudeField?: string;
|
|
76
|
+
geometryField?: string;
|
|
65
77
|
valueFields?: string[];
|
|
66
78
|
series?: string;
|
|
67
79
|
seriesField?: string;
|
|
@@ -81,6 +93,8 @@ interface AnalyticsVisualization$1 {
|
|
|
81
93
|
interface ResultColumn {
|
|
82
94
|
key: string;
|
|
83
95
|
label?: string;
|
|
96
|
+
dataType?: AnalyticsVisualizationColumn['dataType'];
|
|
97
|
+
currencyCode?: string;
|
|
84
98
|
}
|
|
85
99
|
interface ResultTableClassNames {
|
|
86
100
|
wrap?: string;
|
|
@@ -95,8 +109,9 @@ type WidgetAnalyticsSeries = {
|
|
|
95
109
|
values: Array<number | null>;
|
|
96
110
|
valueColumn?: AnalyticsVisualizationColumn;
|
|
97
111
|
};
|
|
112
|
+
type WidgetAnalyticsChartType = 'line' | 'bar' | 'stacked_bar';
|
|
98
113
|
type WidgetAnalyticsChartModel = {
|
|
99
|
-
type:
|
|
114
|
+
type: WidgetAnalyticsChartType;
|
|
100
115
|
title: string;
|
|
101
116
|
xAxisTitle: string;
|
|
102
117
|
yAxisTitle: string;
|
|
@@ -105,7 +120,7 @@ type WidgetAnalyticsChartModel = {
|
|
|
105
120
|
summary: string;
|
|
106
121
|
omittedSeriesCount: number;
|
|
107
122
|
};
|
|
108
|
-
declare const buildWidgetAnalyticsChartModel: (visualization: AnalyticsVisualization$1) => WidgetAnalyticsChartModel | null;
|
|
123
|
+
declare const buildWidgetAnalyticsChartModel: (visualization: AnalyticsVisualization$1, overrideType?: WidgetAnalyticsChartType) => WidgetAnalyticsChartModel | null;
|
|
109
124
|
declare const WidgetAnalyticsChart: ({
|
|
110
125
|
model,
|
|
111
126
|
expanded
|
|
@@ -115,7 +130,7 @@ declare const WidgetAnalyticsChart: ({
|
|
|
115
130
|
}) => preact0.JSX.Element;
|
|
116
131
|
//#endregion
|
|
117
132
|
//#region ../centrinfo-results/src/result.d.ts
|
|
118
|
-
declare const formatResultCell: (value: unknown, locale?: string) => string;
|
|
133
|
+
declare const formatResultCell: (value: unknown, locale?: string, column?: ResultColumn) => string;
|
|
119
134
|
declare const serializeResultCsv: (rows: Array<Record<string, unknown>>, columns?: Array<string | ResultColumn>) => string;
|
|
120
135
|
//#endregion
|
|
121
136
|
//#region ../centrinfo-results/src/table.d.ts
|
|
@@ -141,6 +156,23 @@ declare const ResultTable: ({
|
|
|
141
156
|
//#region src/rich.d.ts
|
|
142
157
|
declare const renderRich: (text: string) => JSX.Element[];
|
|
143
158
|
//#endregion
|
|
159
|
+
//#region src/audio.d.ts
|
|
160
|
+
interface VoiceAudioCapabilities {
|
|
161
|
+
echoCancellation?: boolean;
|
|
162
|
+
noiseSuppression?: boolean;
|
|
163
|
+
autoGainControl?: boolean;
|
|
164
|
+
channelCount?: boolean;
|
|
165
|
+
voiceIsolation?: boolean;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Build a best-effort microphone profile for conversational speech. Every
|
|
169
|
+
* enhancement is capability-driven and optional, so unsupported processing
|
|
170
|
+
* cannot make microphone permission fail.
|
|
171
|
+
*/
|
|
172
|
+
declare const createVoiceAudioConstraints: (deviceId?: string, supported?: VoiceAudioCapabilities) => MediaTrackConstraints;
|
|
173
|
+
declare const createPreferredAudioRecorder: (stream: MediaStream) => MediaRecorder;
|
|
174
|
+
declare const stopRecorderWithFlush: (recorder: MediaRecorder | null | undefined) => void;
|
|
175
|
+
//#endregion
|
|
144
176
|
//#region src/useChat.d.ts
|
|
145
177
|
/** One past conversation, for the in-widget history list. */
|
|
146
178
|
interface HistoryEntry {
|
|
@@ -201,8 +233,9 @@ interface ChatApi {
|
|
|
201
233
|
/** Conversation-level CSAT at end-of-chat. Best-effort. */
|
|
202
234
|
submitCsat: (rating: 'up' | 'down', comment?: string) => void;
|
|
203
235
|
/** Submit an inline action form; persists identity so Case-1 auto-handoff can fire later. */
|
|
204
|
-
submitForm: (type:
|
|
205
|
-
|
|
236
|
+
submitForm: (type: string, payload: Record<string, unknown>, identity?: Visitor, /** Backend-declared endpoint; authoritative when present. */
|
|
237
|
+
endpointOverride?: string) => Promise<ActionResult>;
|
|
238
|
+
transcribe: (audio: Blob | string, mimeType: string, languageHint?: string, durationSeconds?: number) => Promise<string>;
|
|
206
239
|
/** Extract text from an attached image/PDF (folded into the next message). */
|
|
207
240
|
extract: (fileBase64: string, mimeType: string, filename?: string) => Promise<string>;
|
|
208
241
|
searchGifs: (query: string) => Promise<GifResult[]>;
|
|
@@ -242,4 +275,4 @@ declare const useChat: (transport: Transport, config: ResolvedConfig, active?: b
|
|
|
242
275
|
//#region src/runtime.d.ts
|
|
243
276
|
declare const createChatTransport: (config: ResolvedConfig) => Transport;
|
|
244
277
|
//#endregion
|
|
245
|
-
export { type AnalyticsVisualization, type BootstrapInfo, type ChatApi, type ChatMessage, type HistoryEntry, type ResolvedConfig, ResultTable, type Source, type Transport, WidgetAnalyticsChart, type WidgetConfig, type WidgetUser, buildWidgetAnalyticsChartModel, createChatTransport, formatResultCell, renderRich, resolveConfig, serializeResultCsv, useChat };
|
|
278
|
+
export { type ActionResult, type AnalyticsVisualization, type BootstrapInfo, type ChatApi, type ChatArtifact, type ChatMessage, type DemoSlotsResult, type HistoryEntry, type PublicChatAction, type PublicChatActionField, type ResolvedConfig, ResultTable, type Source, type Transport, WidgetAnalyticsChart, type WidgetConfig, type WidgetThemeTokens, type WidgetUser, buildWidgetAnalyticsChartModel, createChatTransport, createPreferredAudioRecorder, createVoiceAudioConstraints, formatResultCell, renderRich, resolveConfig, serializeResultCsv, stopRecorderWithFlush, useChat };
|
package/dist/runtime.d.mts
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { _ as PublicChatActionField, a as Source, c as WidgetConfig, d as WidgetUser, f as ActionResult, g as PublicChatAction, h as GifResult, i as FeaturedLink, m as DemoSlotsResult, n as ChatArtifact, o as Visitor, p as AnalyticsVisualization, r as ChatMessage, s as WidgetActionTranslation, t as BootstrapInfo, u as WidgetThemeTokens, v as Transport, y as WidgetStrings } from "./types-1ZJJY7Da.mjs";
|
|
2
2
|
import * as preact0 from "preact";
|
|
3
3
|
import { JSX } from "preact";
|
|
4
4
|
|
|
5
5
|
//#region src/config.d.ts
|
|
6
|
-
interface ResolvedConfig extends Required<Omit<WidgetConfig, 'accentColor' | 'agentName' | 'agentAvatarUrl' | 'launcherIcon' | 'gifApiKey' | 'labels' | 'user' | 'analyticsContextToken' | 'identityToken' | 'getIdentityToken' | 'customLauncherSelector' | 'proactiveMessage' | 'proactiveOnPaths' | 'onOpen' | 'onClose' | 'onShow' | 'onHide' | 'onUnreadChange' | 'onMessage' | 'onAction' | 'onHandoff'>> {
|
|
6
|
+
interface ResolvedConfig extends Required<Omit<WidgetConfig, 'accentColor' | 'agentName' | 'agentAvatarUrl' | 'launcherIcon' | 'themeTokens' | 'gifApiKey' | 'labels' | 'locale' | 'translations' | 'user' | 'analyticsContextToken' | 'identityToken' | 'getIdentityToken' | 'customLauncherSelector' | 'proactiveMessage' | 'proactiveOnPaths' | 'onOpen' | 'onClose' | 'onShow' | 'onHide' | 'onUnreadChange' | 'onMessage' | 'onAction' | 'onHandoff'>> {
|
|
7
7
|
accentColor?: string;
|
|
8
8
|
agentName?: string;
|
|
9
9
|
agentAvatarUrl?: string;
|
|
10
10
|
launcherIcon?: string;
|
|
11
|
+
themeTokens?: WidgetConfig['themeTokens'];
|
|
11
12
|
gifApiKey?: string;
|
|
12
13
|
/** Resolved string table (English defaults + host `labels` overrides). */
|
|
13
14
|
strings: WidgetStrings;
|
|
15
|
+
locale: string;
|
|
16
|
+
actionTranslations: Record<string, WidgetActionTranslation>;
|
|
14
17
|
/** Host-app SSO passthrough (see WidgetConfig.user). Optional. */
|
|
15
18
|
user?: WidgetConfig['user'];
|
|
16
19
|
/** Short-lived signed context for governed customer analytics. */
|
|
@@ -31,6 +34,9 @@ interface ResolvedConfig extends Required<Omit<WidgetConfig, 'accentColor' | 'ag
|
|
|
31
34
|
}
|
|
32
35
|
declare const resolveConfig: (cfg: WidgetConfig) => ResolvedConfig;
|
|
33
36
|
//#endregion
|
|
37
|
+
//#region ../centrinfo-results/src/analytics-chart-catalog.d.ts
|
|
38
|
+
type AnalyticsChartCatalogType = 'kpi' | 'table' | 'line' | 'bar' | 'pie' | 'scatter' | 'effectScatter' | 'map' | 'candlestick' | 'boxplot' | 'graph' | 'lines' | 'tree' | 'treemap' | 'sunburst' | 'parallel' | 'sankey' | 'funnel' | 'heatmap' | 'radar' | 'gauge' | 'pictorialBar' | 'themeRiver' | 'matrix' | 'chord' | 'custom' | 'dataset' | 'dataZoom' | 'graphic' | 'richText' | 'globe' | 'bar3D' | 'scatter3D' | 'surface' | 'map3D' | 'lines3D' | 'line3D' | 'scatterGL' | 'linesGL' | 'flowGL' | 'graphGL' | 'polygons3D';
|
|
39
|
+
//#endregion
|
|
34
40
|
//#region ../centrinfo-results/src/types.d.ts
|
|
35
41
|
interface AnalyticsVisualizationColumn {
|
|
36
42
|
key: string;
|
|
@@ -47,9 +53,12 @@ interface AnalyticsVisualizationColumn {
|
|
|
47
53
|
groupable?: boolean;
|
|
48
54
|
}
|
|
49
55
|
interface AnalyticsVisualizationRecommendation {
|
|
50
|
-
type:
|
|
56
|
+
type: AnalyticsChartCatalogType | 'area' | 'stacked_bar';
|
|
51
57
|
mode: string;
|
|
52
58
|
categoryField?: string;
|
|
59
|
+
latitudeField?: string;
|
|
60
|
+
longitudeField?: string;
|
|
61
|
+
geometryField?: string;
|
|
53
62
|
valueFields?: string[];
|
|
54
63
|
seriesField?: string;
|
|
55
64
|
reason?: string;
|
|
@@ -58,10 +67,13 @@ interface AnalyticsVisualizationRecommendation {
|
|
|
58
67
|
interface AnalyticsVisualization$1 {
|
|
59
68
|
version?: number;
|
|
60
69
|
presentation?: 'kpi' | 'chart' | 'table';
|
|
61
|
-
type:
|
|
70
|
+
type: AnalyticsChartCatalogType | 'area' | 'stacked_bar';
|
|
62
71
|
title?: string;
|
|
63
72
|
label?: string;
|
|
64
73
|
value?: string;
|
|
74
|
+
latitudeField?: string;
|
|
75
|
+
longitudeField?: string;
|
|
76
|
+
geometryField?: string;
|
|
65
77
|
valueFields?: string[];
|
|
66
78
|
series?: string;
|
|
67
79
|
seriesField?: string;
|
|
@@ -81,6 +93,8 @@ interface AnalyticsVisualization$1 {
|
|
|
81
93
|
interface ResultColumn {
|
|
82
94
|
key: string;
|
|
83
95
|
label?: string;
|
|
96
|
+
dataType?: AnalyticsVisualizationColumn['dataType'];
|
|
97
|
+
currencyCode?: string;
|
|
84
98
|
}
|
|
85
99
|
interface ResultTableClassNames {
|
|
86
100
|
wrap?: string;
|
|
@@ -95,8 +109,9 @@ type WidgetAnalyticsSeries = {
|
|
|
95
109
|
values: Array<number | null>;
|
|
96
110
|
valueColumn?: AnalyticsVisualizationColumn;
|
|
97
111
|
};
|
|
112
|
+
type WidgetAnalyticsChartType = 'line' | 'bar' | 'stacked_bar';
|
|
98
113
|
type WidgetAnalyticsChartModel = {
|
|
99
|
-
type:
|
|
114
|
+
type: WidgetAnalyticsChartType;
|
|
100
115
|
title: string;
|
|
101
116
|
xAxisTitle: string;
|
|
102
117
|
yAxisTitle: string;
|
|
@@ -105,7 +120,7 @@ type WidgetAnalyticsChartModel = {
|
|
|
105
120
|
summary: string;
|
|
106
121
|
omittedSeriesCount: number;
|
|
107
122
|
};
|
|
108
|
-
declare const buildWidgetAnalyticsChartModel: (visualization: AnalyticsVisualization$1) => WidgetAnalyticsChartModel | null;
|
|
123
|
+
declare const buildWidgetAnalyticsChartModel: (visualization: AnalyticsVisualization$1, overrideType?: WidgetAnalyticsChartType) => WidgetAnalyticsChartModel | null;
|
|
109
124
|
declare const WidgetAnalyticsChart: ({
|
|
110
125
|
model,
|
|
111
126
|
expanded
|
|
@@ -115,7 +130,7 @@ declare const WidgetAnalyticsChart: ({
|
|
|
115
130
|
}) => preact0.JSX.Element;
|
|
116
131
|
//#endregion
|
|
117
132
|
//#region ../centrinfo-results/src/result.d.ts
|
|
118
|
-
declare const formatResultCell: (value: unknown, locale?: string) => string;
|
|
133
|
+
declare const formatResultCell: (value: unknown, locale?: string, column?: ResultColumn) => string;
|
|
119
134
|
declare const serializeResultCsv: (rows: Array<Record<string, unknown>>, columns?: Array<string | ResultColumn>) => string;
|
|
120
135
|
//#endregion
|
|
121
136
|
//#region ../centrinfo-results/src/table.d.ts
|
|
@@ -141,6 +156,23 @@ declare const ResultTable: ({
|
|
|
141
156
|
//#region src/rich.d.ts
|
|
142
157
|
declare const renderRich: (text: string) => JSX.Element[];
|
|
143
158
|
//#endregion
|
|
159
|
+
//#region src/audio.d.ts
|
|
160
|
+
interface VoiceAudioCapabilities {
|
|
161
|
+
echoCancellation?: boolean;
|
|
162
|
+
noiseSuppression?: boolean;
|
|
163
|
+
autoGainControl?: boolean;
|
|
164
|
+
channelCount?: boolean;
|
|
165
|
+
voiceIsolation?: boolean;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Build a best-effort microphone profile for conversational speech. Every
|
|
169
|
+
* enhancement is capability-driven and optional, so unsupported processing
|
|
170
|
+
* cannot make microphone permission fail.
|
|
171
|
+
*/
|
|
172
|
+
declare const createVoiceAudioConstraints: (deviceId?: string, supported?: VoiceAudioCapabilities) => MediaTrackConstraints;
|
|
173
|
+
declare const createPreferredAudioRecorder: (stream: MediaStream) => MediaRecorder;
|
|
174
|
+
declare const stopRecorderWithFlush: (recorder: MediaRecorder | null | undefined) => void;
|
|
175
|
+
//#endregion
|
|
144
176
|
//#region src/useChat.d.ts
|
|
145
177
|
/** One past conversation, for the in-widget history list. */
|
|
146
178
|
interface HistoryEntry {
|
|
@@ -201,8 +233,9 @@ interface ChatApi {
|
|
|
201
233
|
/** Conversation-level CSAT at end-of-chat. Best-effort. */
|
|
202
234
|
submitCsat: (rating: 'up' | 'down', comment?: string) => void;
|
|
203
235
|
/** Submit an inline action form; persists identity so Case-1 auto-handoff can fire later. */
|
|
204
|
-
submitForm: (type:
|
|
205
|
-
|
|
236
|
+
submitForm: (type: string, payload: Record<string, unknown>, identity?: Visitor, /** Backend-declared endpoint; authoritative when present. */
|
|
237
|
+
endpointOverride?: string) => Promise<ActionResult>;
|
|
238
|
+
transcribe: (audio: Blob | string, mimeType: string, languageHint?: string, durationSeconds?: number) => Promise<string>;
|
|
206
239
|
/** Extract text from an attached image/PDF (folded into the next message). */
|
|
207
240
|
extract: (fileBase64: string, mimeType: string, filename?: string) => Promise<string>;
|
|
208
241
|
searchGifs: (query: string) => Promise<GifResult[]>;
|
|
@@ -242,4 +275,4 @@ declare const useChat: (transport: Transport, config: ResolvedConfig, active?: b
|
|
|
242
275
|
//#region src/runtime.d.ts
|
|
243
276
|
declare const createChatTransport: (config: ResolvedConfig) => Transport;
|
|
244
277
|
//#endregion
|
|
245
|
-
export { type AnalyticsVisualization, type BootstrapInfo, type ChatApi, type ChatMessage, type HistoryEntry, type ResolvedConfig, ResultTable, type Source, type Transport, WidgetAnalyticsChart, type WidgetConfig, type WidgetUser, buildWidgetAnalyticsChartModel, createChatTransport, formatResultCell, renderRich, resolveConfig, serializeResultCsv, useChat };
|
|
278
|
+
export { type ActionResult, type AnalyticsVisualization, type BootstrapInfo, type ChatApi, type ChatArtifact, type ChatMessage, type DemoSlotsResult, type HistoryEntry, type PublicChatAction, type PublicChatActionField, type ResolvedConfig, ResultTable, type Source, type Transport, WidgetAnalyticsChart, type WidgetConfig, type WidgetThemeTokens, type WidgetUser, buildWidgetAnalyticsChartModel, createChatTransport, createPreferredAudioRecorder, createVoiceAudioConstraints, formatResultCell, renderRich, resolveConfig, serializeResultCsv, stopRecorderWithFlush, useChat };
|
package/dist/runtime.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{C as e,S as t,_ as n,a as r,d as i,f as a,g as o,h as s,m as c,n as l,t as u,u as d,v as f,x as p}from"./config-CkU4urQY.mjs";const m=n=>n.demo?new t:n.preview?new p(new e(n.apiBaseUrl,n.token,n.gifApiKey,n.analyticsContextToken,{agentName:n.agentName,agentAvatarUrl:n.agentAvatarUrl},n.identityToken,n.getIdentityToken,n.chatSurface),n.strings):new e(n.apiBaseUrl,n.token,n.gifApiKey,n.analyticsContextToken,{agentName:n.agentName,agentAvatarUrl:n.agentAvatarUrl},n.identityToken,n.getIdentityToken,n.chatSurface);export{c as ResultTable,n as WidgetAnalyticsChart,f as buildWidgetAnalyticsChartModel,m as createChatTransport,d as createPreferredAudioRecorder,i as createVoiceAudioConstraints,s as formatResultCell,r as renderRich,u as resolveConfig,o as serializeResultCsv,a as stopRecorderWithFlush,l as useChat};
|