@accurix/centrinfo-widget 5.1.2 → 5.2.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 +83 -8
- package/dist/cdn/centrinfo-widget.js +80 -52
- package/dist/cdn/manifest.json +6 -6
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/runtime.cjs +2 -2
- package/dist/runtime.d.cts +44 -8
- package/dist/runtime.d.mts +42 -5
- package/dist/runtime.mjs +2 -2
- package/dist/styles-BNPs-1he.mjs +3539 -0
- package/dist/styles-Bp-0ZpvF.cjs +3539 -0
- package/dist/{types-BuoTcoZu.d.cts → types-CCk7I1fM.d.cts} +59 -14
- package/dist/{types-3zpBBhPI.d.mts → types-CmLbqY23.d.mts} +63 -17
- package/package.json +1 -1
- package/dist/styles-CwxqspIz.cjs +0 -3516
- package/dist/styles-yhqxR2ty.mjs +0 -3516
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
import * as preact0 from "preact";
|
|
2
2
|
|
|
3
|
+
//#region ../centrinfo-results/src/answer.d.ts
|
|
4
|
+
interface CentrinfoAnswer<Visualization = unknown, Source$1 = unknown, Artifact = unknown, Presentation = unknown> {
|
|
5
|
+
version: number;
|
|
6
|
+
kind: string;
|
|
7
|
+
status: string;
|
|
8
|
+
text: string;
|
|
9
|
+
explanation?: Record<string, unknown>;
|
|
10
|
+
visualization?: Visualization;
|
|
11
|
+
sources?: Source$1[];
|
|
12
|
+
artifacts?: Artifact[];
|
|
13
|
+
presentation?: Presentation;
|
|
14
|
+
feedbackId?: string;
|
|
15
|
+
generatedAt?: string;
|
|
16
|
+
timezone?: string;
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
3
19
|
//#region ../centrinfo-results/src/analytics-explanation.d.ts
|
|
4
|
-
|
|
5
20
|
/**
|
|
6
21
|
* Framework-agnostic analytics explanation core.
|
|
7
22
|
*
|
|
@@ -226,6 +241,7 @@ declare const ANALYTICS_EXPLANATION_COPY: {
|
|
|
226
241
|
readonly detailedUnavailable: "A detailed explanation is not available right now.";
|
|
227
242
|
readonly detailedRetry: "Try again";
|
|
228
243
|
readonly region: "Explanation";
|
|
244
|
+
readonly details: "What this means";
|
|
229
245
|
readonly drivers: "What is driving it";
|
|
230
246
|
readonly driversHint: "Measured association, not proof of cause";
|
|
231
247
|
readonly anomalies: "Unusual values";
|
|
@@ -329,8 +345,8 @@ interface AnalyticsAIExplanationTransport<E extends AnalyticsExplanationInput> {
|
|
|
329
345
|
poll: (explanationId: string, signal?: AbortSignal) => Promise<AnalyticsAIExplanationJob<E>>;
|
|
330
346
|
/** "Try again": re-request with the retry flag. Omit when retry is impossible. */
|
|
331
347
|
retry?: (explanationId: string, signal?: AbortSignal) => Promise<AnalyticsAIExplanationJob<E>>;
|
|
332
|
-
/**
|
|
333
|
-
settled?: (explanationId: string, status: 'ready' | 'failed' | 'not_requested') => void;
|
|
348
|
+
/** Remember the checked explanation alongside its final status. */
|
|
349
|
+
settled?: (explanationId: string, status: 'ready' | 'failed' | 'not_requested', explanation?: E) => void;
|
|
334
350
|
}
|
|
335
351
|
//#endregion
|
|
336
352
|
//#region ../centrinfo-results/src/labels.d.ts
|
|
@@ -421,6 +437,10 @@ interface ResultLabels {
|
|
|
421
437
|
* never produces.
|
|
422
438
|
*/
|
|
423
439
|
interface WidgetStrings {
|
|
440
|
+
analyticsModelLabel: string;
|
|
441
|
+
analyticsModelAutomatic: string;
|
|
442
|
+
analyticsModelUnavailable: string;
|
|
443
|
+
testMode?: string;
|
|
424
444
|
/**
|
|
425
445
|
* Labels for analytics answers (KPI, chart, table, details, explanation).
|
|
426
446
|
* Any subset overrides the English defaults; `explanation` holds the
|
|
@@ -497,6 +517,8 @@ interface WidgetStrings {
|
|
|
497
517
|
stop: string;
|
|
498
518
|
copy: string;
|
|
499
519
|
copied: string;
|
|
520
|
+
doubleCheckResponse: string;
|
|
521
|
+
retryResponse: string;
|
|
500
522
|
retry: string;
|
|
501
523
|
clearChat: string;
|
|
502
524
|
clearChatConfirm: string;
|
|
@@ -684,6 +706,7 @@ interface LiveAudioSegment {
|
|
|
684
706
|
text?: string;
|
|
685
707
|
}
|
|
686
708
|
interface TurnResult {
|
|
709
|
+
answerResult?: CentrinfoAnswer<AnalyticsVisualization, Source, ChatArtifact>;
|
|
687
710
|
/** True when the reply was spoken in live pieces (onAudioSegment). */
|
|
688
711
|
liveAudio?: boolean;
|
|
689
712
|
answer: string;
|
|
@@ -841,11 +864,7 @@ interface AnalyticsVisualizationExplanation {
|
|
|
841
864
|
followUps?: string[];
|
|
842
865
|
source: 'governed_result' | 'ai_grounded' | 'rag_deterministic_analysis' | 'analysis_contract' | string;
|
|
843
866
|
/** The detailed AI explanation that loads separately (poll by explanationId). */
|
|
844
|
-
aiExplanation?:
|
|
845
|
-
status: string;
|
|
846
|
-
explanationId?: string;
|
|
847
|
-
retryAvailable?: boolean;
|
|
848
|
-
} | null;
|
|
867
|
+
aiExplanation?: AnalyticsAIExplanationInput | null;
|
|
849
868
|
}
|
|
850
869
|
interface AnalyticsVisualizationAnalysis {
|
|
851
870
|
summary: string;
|
|
@@ -1003,6 +1022,10 @@ interface LiveEventsResult {
|
|
|
1003
1022
|
events: LiveEvent[];
|
|
1004
1023
|
}
|
|
1005
1024
|
interface AuthenticatedHistoryMessage {
|
|
1025
|
+
answerResult?: CentrinfoAnswer<AnalyticsVisualization, {
|
|
1026
|
+
title?: string;
|
|
1027
|
+
url?: string;
|
|
1028
|
+
}, ChatArtifact>;
|
|
1006
1029
|
id: string;
|
|
1007
1030
|
role: 'user' | 'assistant' | 'system';
|
|
1008
1031
|
content: string;
|
|
@@ -1030,6 +1053,7 @@ interface AuthenticatedHistoryResult {
|
|
|
1030
1053
|
conversations: AuthenticatedHistoryConversation[];
|
|
1031
1054
|
}
|
|
1032
1055
|
interface StreamCallbacks {
|
|
1056
|
+
analyticsModelId?: string;
|
|
1033
1057
|
/** Called with each incremental text chunk. */
|
|
1034
1058
|
onChunk: (text: string) => void;
|
|
1035
1059
|
/** The answer text and metadata have arrived; optional reply audio may follow. */
|
|
@@ -1123,10 +1147,7 @@ interface ExplanationFeedbackInput {
|
|
|
1123
1147
|
/** Detailed AI explanation job for an analytics answer
|
|
1124
1148
|
* (GET /public-chat/analytics-explanations/:id). `explanation` is set only
|
|
1125
1149
|
* when ready and is the checked, public-safe explanation. */
|
|
1126
|
-
interface ExplanationJob {
|
|
1127
|
-
status: 'pending' | 'ready' | 'failed' | 'not_requested' | string;
|
|
1128
|
-
explanationId?: string;
|
|
1129
|
-
retryAvailable?: boolean;
|
|
1150
|
+
interface ExplanationJob extends AnalyticsAIExplanationInput {
|
|
1130
1151
|
explanation?: Record<string, unknown> | null;
|
|
1131
1152
|
/** The free basic explanation as updated by the job (gains the baseline sentence). */
|
|
1132
1153
|
basic?: Record<string, unknown> | null;
|
|
@@ -1162,9 +1183,11 @@ interface GifResult {
|
|
|
1162
1183
|
* backend (`ApiClient`) or the in-memory demo (`MockTransport`).
|
|
1163
1184
|
*/
|
|
1164
1185
|
interface Transport {
|
|
1186
|
+
analyticsModels?(): Promise<AnalyticsModelOption[]>;
|
|
1165
1187
|
bootstrap(): Promise<BootstrapInfo>;
|
|
1166
1188
|
/** Server-backed history for the verified SDK customer. Anonymous returns empty. */
|
|
1167
1189
|
history(): Promise<AuthenticatedHistoryResult>;
|
|
1190
|
+
updateHistory?(sessionId: string, action: 'rename' | 'delete', title?: string): Promise<void>;
|
|
1168
1191
|
/** Stream a turn; resolves with final metadata once `done`. */
|
|
1169
1192
|
stream(question: string, sessionId: string, cb: StreamCallbacks): Promise<TurnResult>;
|
|
1170
1193
|
/** Poll for staff/system events after a timestamp during live handoff. */
|
|
@@ -1216,6 +1239,10 @@ interface Transport {
|
|
|
1216
1239
|
/** "Try again" on a failed detailed AI explanation. Optional. */
|
|
1217
1240
|
retryExplanation?(explanationId: string, sessionId: string, surface?: 'widget' | 'chat_app'): Promise<ExplanationJob>;
|
|
1218
1241
|
}
|
|
1242
|
+
interface AnalyticsModelOption {
|
|
1243
|
+
id: string;
|
|
1244
|
+
name: string;
|
|
1245
|
+
}
|
|
1219
1246
|
//#endregion
|
|
1220
1247
|
//#region src/types.d.ts
|
|
1221
1248
|
type ChatSurface = 'floating' | 'full-page';
|
|
@@ -1240,6 +1267,23 @@ interface WidgetTranslationBundle {
|
|
|
1240
1267
|
}
|
|
1241
1268
|
/** Public configuration surface passed to `Centrinfo.init()` / <CentrinfoWidget>. */
|
|
1242
1269
|
interface WidgetConfig {
|
|
1270
|
+
/** Simple brand settings shared by the floating widget and full-page chat. */
|
|
1271
|
+
branding?: {
|
|
1272
|
+
name?: string;
|
|
1273
|
+
logo?: string;
|
|
1274
|
+
color?: string;
|
|
1275
|
+
};
|
|
1276
|
+
/** Simple composer options. Hiding a control does not change backend permissions. */
|
|
1277
|
+
composer?: {
|
|
1278
|
+
placeholder?: string;
|
|
1279
|
+
attachments?: boolean;
|
|
1280
|
+
voice?: boolean;
|
|
1281
|
+
modelSelector?: boolean;
|
|
1282
|
+
};
|
|
1283
|
+
/** Show the permitted analytics data models in chat. Defaults to true. */
|
|
1284
|
+
showAnalyticsModelSelector?: boolean;
|
|
1285
|
+
/** Initial analytics data model; backend permissions are always enforced. */
|
|
1286
|
+
analyticsModelId?: string;
|
|
1243
1287
|
/** The org's public chat token (`pub_*`). Required. It IS the org identity. */
|
|
1244
1288
|
token: string;
|
|
1245
1289
|
/** Conversation namespace. Set by the SDK surface mounting the chat. */
|
|
@@ -1364,7 +1408,7 @@ interface WidgetConfig {
|
|
|
1364
1408
|
/**
|
|
1365
1409
|
* How often the open widget refreshes its public token configuration
|
|
1366
1410
|
* (branding, greeting, starter questions, allowed actions, pause/offline
|
|
1367
|
-
* state) from `/public-chat/bootstrap`. Default
|
|
1411
|
+
* state) from `/public-chat/bootstrap`. Default 300 seconds; set 0 to
|
|
1368
1412
|
* disable live config refresh for strict traffic budgets.
|
|
1369
1413
|
*/
|
|
1370
1414
|
configRefreshSeconds?: number;
|
|
@@ -1583,6 +1627,7 @@ interface Visitor {
|
|
|
1583
1627
|
}
|
|
1584
1628
|
/** Persona + capabilities returned by `GET /public-chat/bootstrap`. */
|
|
1585
1629
|
interface BootstrapInfo {
|
|
1630
|
+
testMode?: boolean;
|
|
1586
1631
|
agentName: string;
|
|
1587
1632
|
agentAvatarUrl?: string;
|
|
1588
1633
|
greeting: string;
|
|
@@ -1654,4 +1699,4 @@ interface SchedulerInfo {
|
|
|
1654
1699
|
};
|
|
1655
1700
|
}
|
|
1656
1701
|
//#endregion
|
|
1657
|
-
export {
|
|
1702
|
+
export { AnalyticsPeriodComparison as A, Transport as C, AnalyticsAIExplanationTransport as D, ResultLabels as E, AnalyticsExplanationInput as O, PublicChatActionField as S, WidgetStrings as T, DemoBooking as _, MessageAttachment as a, GifResult as b, Visitor as c, WidgetHandle as d, WidgetThemeTokens as f, AnalyticsVisualization as g, AnalyticsModelOption as h, FeaturedLink as i, AnalyticsGroupComparisonPoint as k, WidgetActionTranslation as l, ActionResult as m, ChatArtifact as n, SchedulerInfo as o, WidgetUser as p, ChatMessage as r, Source as s, BootstrapInfo as t, WidgetConfig as u, DemoSlotsResult as v, StringsProvider as w, PublicChatAction as x, ExplanationFeedbackInput as y };
|
|
@@ -1,6 +1,22 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as preact2 from "preact";
|
|
2
2
|
import { JSX } from "preact";
|
|
3
3
|
|
|
4
|
+
//#region ../centrinfo-results/src/answer.d.ts
|
|
5
|
+
interface CentrinfoAnswer<Visualization = unknown, Source$1 = unknown, Artifact = unknown, Presentation = unknown> {
|
|
6
|
+
version: number;
|
|
7
|
+
kind: string;
|
|
8
|
+
status: string;
|
|
9
|
+
text: string;
|
|
10
|
+
explanation?: Record<string, unknown>;
|
|
11
|
+
visualization?: Visualization;
|
|
12
|
+
sources?: Source$1[];
|
|
13
|
+
artifacts?: Artifact[];
|
|
14
|
+
presentation?: Presentation;
|
|
15
|
+
feedbackId?: string;
|
|
16
|
+
generatedAt?: string;
|
|
17
|
+
timezone?: string;
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
4
20
|
//#region ../centrinfo-results/src/analytics-chart-catalog.d.ts
|
|
5
21
|
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';
|
|
6
22
|
//#endregion
|
|
@@ -229,6 +245,7 @@ declare const ANALYTICS_EXPLANATION_COPY: {
|
|
|
229
245
|
readonly detailedUnavailable: "A detailed explanation is not available right now.";
|
|
230
246
|
readonly detailedRetry: "Try again";
|
|
231
247
|
readonly region: "Explanation";
|
|
248
|
+
readonly details: "What this means";
|
|
232
249
|
readonly drivers: "What is driving it";
|
|
233
250
|
readonly driversHint: "Measured association, not proof of cause";
|
|
234
251
|
readonly anomalies: "Unusual values";
|
|
@@ -332,8 +349,8 @@ interface AnalyticsAIExplanationTransport<E extends AnalyticsExplanationInput> {
|
|
|
332
349
|
poll: (explanationId: string, signal?: AbortSignal) => Promise<AnalyticsAIExplanationJob<E>>;
|
|
333
350
|
/** "Try again": re-request with the retry flag. Omit when retry is impossible. */
|
|
334
351
|
retry?: (explanationId: string, signal?: AbortSignal) => Promise<AnalyticsAIExplanationJob<E>>;
|
|
335
|
-
/**
|
|
336
|
-
settled?: (explanationId: string, status: 'ready' | 'failed' | 'not_requested') => void;
|
|
352
|
+
/** Remember the checked explanation alongside its final status. */
|
|
353
|
+
settled?: (explanationId: string, status: 'ready' | 'failed' | 'not_requested', explanation?: E) => void;
|
|
337
354
|
}
|
|
338
355
|
//#endregion
|
|
339
356
|
//#region ../centrinfo-results/src/labels.d.ts
|
|
@@ -585,7 +602,7 @@ declare const WidgetAnalyticsChart: ({
|
|
|
585
602
|
expanded?: boolean;
|
|
586
603
|
/** Class prefix of the surface (`cf` widget, `ca` chat app). */
|
|
587
604
|
classPrefix?: string;
|
|
588
|
-
}) =>
|
|
605
|
+
}) => preact2.JSX.Element;
|
|
589
606
|
//#endregion
|
|
590
607
|
//#region ../centrinfo-results/src/result.d.ts
|
|
591
608
|
declare const formatResultCell: (value: unknown, locale?: string, column?: ResultColumn, context?: ResultFormatContext) => string;
|
|
@@ -612,7 +629,7 @@ declare const ResultTable: ({
|
|
|
612
629
|
expanded,
|
|
613
630
|
classNames,
|
|
614
631
|
emptyLabel
|
|
615
|
-
}: ResultTableProps) =>
|
|
632
|
+
}: ResultTableProps) => preact2.JSX.Element;
|
|
616
633
|
//#endregion
|
|
617
634
|
//#region ../centrinfo-results/src/result-details.d.ts
|
|
618
635
|
interface AnalyticsResultDetail {
|
|
@@ -630,6 +647,10 @@ interface AnalyticsResultDetail {
|
|
|
630
647
|
* never produces.
|
|
631
648
|
*/
|
|
632
649
|
interface WidgetStrings {
|
|
650
|
+
analyticsModelLabel: string;
|
|
651
|
+
analyticsModelAutomatic: string;
|
|
652
|
+
analyticsModelUnavailable: string;
|
|
653
|
+
testMode?: string;
|
|
633
654
|
/**
|
|
634
655
|
* Labels for analytics answers (KPI, chart, table, details, explanation).
|
|
635
656
|
* Any subset overrides the English defaults; `explanation` holds the
|
|
@@ -706,6 +727,8 @@ interface WidgetStrings {
|
|
|
706
727
|
stop: string;
|
|
707
728
|
copy: string;
|
|
708
729
|
copied: string;
|
|
730
|
+
doubleCheckResponse: string;
|
|
731
|
+
retryResponse: string;
|
|
709
732
|
retry: string;
|
|
710
733
|
clearChat: string;
|
|
711
734
|
clearChatConfirm: string;
|
|
@@ -835,7 +858,7 @@ interface WidgetStrings {
|
|
|
835
858
|
previewActionNote: string;
|
|
836
859
|
previewBanner: string;
|
|
837
860
|
}
|
|
838
|
-
declare const StringsProvider:
|
|
861
|
+
declare const StringsProvider: preact2.Provider<WidgetStrings>;
|
|
839
862
|
//#endregion
|
|
840
863
|
//#region src/api/types.d.ts
|
|
841
864
|
/** The result metadata that arrives with (or after) an answer. */
|
|
@@ -893,6 +916,7 @@ interface LiveAudioSegment {
|
|
|
893
916
|
text?: string;
|
|
894
917
|
}
|
|
895
918
|
interface TurnResult {
|
|
919
|
+
answerResult?: CentrinfoAnswer<AnalyticsVisualization, Source, ChatArtifact>;
|
|
896
920
|
/** True when the reply was spoken in live pieces (onAudioSegment). */
|
|
897
921
|
liveAudio?: boolean;
|
|
898
922
|
answer: string;
|
|
@@ -1050,11 +1074,7 @@ interface AnalyticsVisualizationExplanation {
|
|
|
1050
1074
|
followUps?: string[];
|
|
1051
1075
|
source: 'governed_result' | 'ai_grounded' | 'rag_deterministic_analysis' | 'analysis_contract' | string;
|
|
1052
1076
|
/** The detailed AI explanation that loads separately (poll by explanationId). */
|
|
1053
|
-
aiExplanation?:
|
|
1054
|
-
status: string;
|
|
1055
|
-
explanationId?: string;
|
|
1056
|
-
retryAvailable?: boolean;
|
|
1057
|
-
} | null;
|
|
1077
|
+
aiExplanation?: AnalyticsAIExplanationInput | null;
|
|
1058
1078
|
}
|
|
1059
1079
|
interface AnalyticsVisualizationAnalysis {
|
|
1060
1080
|
summary: string;
|
|
@@ -1212,6 +1232,10 @@ interface LiveEventsResult {
|
|
|
1212
1232
|
events: LiveEvent[];
|
|
1213
1233
|
}
|
|
1214
1234
|
interface AuthenticatedHistoryMessage {
|
|
1235
|
+
answerResult?: CentrinfoAnswer<AnalyticsVisualization, {
|
|
1236
|
+
title?: string;
|
|
1237
|
+
url?: string;
|
|
1238
|
+
}, ChatArtifact>;
|
|
1215
1239
|
id: string;
|
|
1216
1240
|
role: 'user' | 'assistant' | 'system';
|
|
1217
1241
|
content: string;
|
|
@@ -1239,6 +1263,7 @@ interface AuthenticatedHistoryResult {
|
|
|
1239
1263
|
conversations: AuthenticatedHistoryConversation[];
|
|
1240
1264
|
}
|
|
1241
1265
|
interface StreamCallbacks {
|
|
1266
|
+
analyticsModelId?: string;
|
|
1242
1267
|
/** Called with each incremental text chunk. */
|
|
1243
1268
|
onChunk: (text: string) => void;
|
|
1244
1269
|
/** The answer text and metadata have arrived; optional reply audio may follow. */
|
|
@@ -1332,10 +1357,7 @@ interface ExplanationFeedbackInput {
|
|
|
1332
1357
|
/** Detailed AI explanation job for an analytics answer
|
|
1333
1358
|
* (GET /public-chat/analytics-explanations/:id). `explanation` is set only
|
|
1334
1359
|
* when ready and is the checked, public-safe explanation. */
|
|
1335
|
-
interface ExplanationJob {
|
|
1336
|
-
status: 'pending' | 'ready' | 'failed' | 'not_requested' | string;
|
|
1337
|
-
explanationId?: string;
|
|
1338
|
-
retryAvailable?: boolean;
|
|
1360
|
+
interface ExplanationJob extends AnalyticsAIExplanationInput {
|
|
1339
1361
|
explanation?: Record<string, unknown> | null;
|
|
1340
1362
|
/** The free basic explanation as updated by the job (gains the baseline sentence). */
|
|
1341
1363
|
basic?: Record<string, unknown> | null;
|
|
@@ -1371,9 +1393,11 @@ interface GifResult {
|
|
|
1371
1393
|
* backend (`ApiClient`) or the in-memory demo (`MockTransport`).
|
|
1372
1394
|
*/
|
|
1373
1395
|
interface Transport {
|
|
1396
|
+
analyticsModels?(): Promise<AnalyticsModelOption[]>;
|
|
1374
1397
|
bootstrap(): Promise<BootstrapInfo>;
|
|
1375
1398
|
/** Server-backed history for the verified SDK customer. Anonymous returns empty. */
|
|
1376
1399
|
history(): Promise<AuthenticatedHistoryResult>;
|
|
1400
|
+
updateHistory?(sessionId: string, action: 'rename' | 'delete', title?: string): Promise<void>;
|
|
1377
1401
|
/** Stream a turn; resolves with final metadata once `done`. */
|
|
1378
1402
|
stream(question: string, sessionId: string, cb: StreamCallbacks): Promise<TurnResult>;
|
|
1379
1403
|
/** Poll for staff/system events after a timestamp during live handoff. */
|
|
@@ -1425,6 +1449,10 @@ interface Transport {
|
|
|
1425
1449
|
/** "Try again" on a failed detailed AI explanation. Optional. */
|
|
1426
1450
|
retryExplanation?(explanationId: string, sessionId: string, surface?: 'widget' | 'chat_app'): Promise<ExplanationJob>;
|
|
1427
1451
|
}
|
|
1452
|
+
interface AnalyticsModelOption {
|
|
1453
|
+
id: string;
|
|
1454
|
+
name: string;
|
|
1455
|
+
}
|
|
1428
1456
|
//#endregion
|
|
1429
1457
|
//#region src/types.d.ts
|
|
1430
1458
|
type ChatSurface = 'floating' | 'full-page';
|
|
@@ -1449,6 +1477,23 @@ interface WidgetTranslationBundle {
|
|
|
1449
1477
|
}
|
|
1450
1478
|
/** Public configuration surface passed to `Centrinfo.init()` / <CentrinfoWidget>. */
|
|
1451
1479
|
interface WidgetConfig {
|
|
1480
|
+
/** Simple brand settings shared by the floating widget and full-page chat. */
|
|
1481
|
+
branding?: {
|
|
1482
|
+
name?: string;
|
|
1483
|
+
logo?: string;
|
|
1484
|
+
color?: string;
|
|
1485
|
+
};
|
|
1486
|
+
/** Simple composer options. Hiding a control does not change backend permissions. */
|
|
1487
|
+
composer?: {
|
|
1488
|
+
placeholder?: string;
|
|
1489
|
+
attachments?: boolean;
|
|
1490
|
+
voice?: boolean;
|
|
1491
|
+
modelSelector?: boolean;
|
|
1492
|
+
};
|
|
1493
|
+
/** Show the permitted analytics data models in chat. Defaults to true. */
|
|
1494
|
+
showAnalyticsModelSelector?: boolean;
|
|
1495
|
+
/** Initial analytics data model; backend permissions are always enforced. */
|
|
1496
|
+
analyticsModelId?: string;
|
|
1452
1497
|
/** The org's public chat token (`pub_*`). Required. It IS the org identity. */
|
|
1453
1498
|
token: string;
|
|
1454
1499
|
/** Conversation namespace. Set by the SDK surface mounting the chat. */
|
|
@@ -1573,7 +1618,7 @@ interface WidgetConfig {
|
|
|
1573
1618
|
/**
|
|
1574
1619
|
* How often the open widget refreshes its public token configuration
|
|
1575
1620
|
* (branding, greeting, starter questions, allowed actions, pause/offline
|
|
1576
|
-
* state) from `/public-chat/bootstrap`. Default
|
|
1621
|
+
* state) from `/public-chat/bootstrap`. Default 300 seconds; set 0 to
|
|
1577
1622
|
* disable live config refresh for strict traffic budgets.
|
|
1578
1623
|
*/
|
|
1579
1624
|
configRefreshSeconds?: number;
|
|
@@ -1792,6 +1837,7 @@ interface Visitor {
|
|
|
1792
1837
|
}
|
|
1793
1838
|
/** Persona + capabilities returned by `GET /public-chat/bootstrap`. */
|
|
1794
1839
|
interface BootstrapInfo {
|
|
1840
|
+
testMode?: boolean;
|
|
1795
1841
|
agentName: string;
|
|
1796
1842
|
agentAvatarUrl?: string;
|
|
1797
1843
|
greeting: string;
|
|
@@ -1863,4 +1909,4 @@ interface SchedulerInfo {
|
|
|
1863
1909
|
};
|
|
1864
1910
|
}
|
|
1865
1911
|
//#endregion
|
|
1866
|
-
export {
|
|
1912
|
+
export { WidgetAnalyticsChart as A, Transport as C, ResultTable as D, AnalyticsResultDetail as E, ResultLabels as M, AnalyticsAIExplanationTransport as N, formatResultCell as O, AnalyticsExplanationInput as P, PublicChatActionField as S, WidgetStrings as T, DemoBooking as _, MessageAttachment as a, GifResult as b, Visitor as c, WidgetHandle as d, WidgetThemeTokens as f, AnalyticsVisualization as g, AnalyticsModelOption as h, FeaturedLink as i, buildWidgetAnalyticsChartModel as j, serializeResultCsv as k, WidgetActionTranslation as l, ActionResult as m, ChatArtifact as n, SchedulerInfo as o, WidgetUser as p, ChatMessage as r, Source as s, BootstrapInfo as t, WidgetConfig as u, DemoSlotsResult as v, StringsProvider as w, PublicChatAction as x, ExplanationFeedbackInput as y };
|