@accurix/centrinfo-widget 5.3.1 → 5.4.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 +229 -37
- package/dist/bundle-ar-D_Sk4igF.mjs +1 -0
- package/dist/bundle-ar-fKjs-fvS.cjs +1 -0
- package/dist/bundle-de-BST4qEm1.cjs +1 -0
- package/dist/bundle-de-BWnVOyv0.mjs +1 -0
- package/dist/bundle-es-Bes8ddxv.mjs +1 -0
- package/dist/bundle-es-Bfphsx9c.cjs +1 -0
- package/dist/bundle-fr-D1QlfFID.mjs +1 -0
- package/dist/bundle-fr-X5Ian15d.cjs +1 -0
- package/dist/bundle-it-9j6g91Cu.mjs +1 -0
- package/dist/bundle-it-C2HPnGql.cjs +1 -0
- package/dist/bundle-pt-BK9LBxix.mjs +1 -0
- package/dist/bundle-pt-BMcCSSgB.cjs +1 -0
- package/dist/bundle-sw-BKWnwk-0.cjs +1 -0
- package/dist/bundle-sw-DA2XuFS_.mjs +1 -0
- package/dist/cdn/centrinfo-widget-dev.js +35 -23
- package/dist/cdn/centrinfo-widget-locale-ar.js +4 -0
- package/dist/cdn/centrinfo-widget-locale-de.js +4 -0
- package/dist/cdn/centrinfo-widget-locale-es.js +4 -0
- package/dist/cdn/centrinfo-widget-locale-fr.js +4 -0
- package/dist/cdn/centrinfo-widget-locale-it.js +4 -0
- package/dist/cdn/centrinfo-widget-locale-pt.js +4 -0
- package/dist/cdn/centrinfo-widget-locale-sw.js +4 -0
- package/dist/cdn/centrinfo-widget-voice.js +272 -0
- package/dist/cdn/centrinfo-widget.js +171 -145
- package/dist/cdn/manifest.json +57 -9
- package/dist/dev-transports-DP4ilDW1.mjs +13 -0
- package/dist/dev-transports-uGHAao9W.cjs +13 -0
- package/dist/index.cjs +2 -1
- 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 +2 -1
- package/dist/runtime.cjs +2 -2
- package/dist/runtime.d.cts +126 -11
- package/dist/runtime.d.mts +120 -8
- package/dist/runtime.d.ts +479 -0
- package/dist/runtime.mjs +2 -2
- package/dist/speech-detector-runtime-D5GpV8VJ.cjs +68 -0
- package/dist/speech-detector-runtime-D7gguFpP.mjs +68 -0
- package/dist/styles-BWPJrttg.cjs +3563 -0
- package/dist/styles-C8MXPiR-.mjs +3563 -0
- package/dist/{types-CSrYnsOp.d.mts → types-M-juCXr7.d.mts} +551 -98
- package/dist/{types-eBuee08Q.d.cts → types-sRV3p0Gu.d.cts} +542 -92
- package/package.json +4 -3
- package/dist/dev-transports-DqSPyIEz.mjs +0 -1
- package/dist/dev-transports-KlSdSZpj.cjs +0 -1
- package/dist/styles-BUK2S5l_.mjs +0 -3543
- package/dist/styles-BVQRcZkH.cjs +0 -3543
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as preact3 from "preact";
|
|
2
2
|
import { JSX } from "preact";
|
|
3
3
|
|
|
4
4
|
//#region ../centrinfo-results/src/answer.d.ts
|
|
@@ -19,6 +19,19 @@ interface CentrinfoAnswer<Visualization = unknown, Source$1 = unknown, Artifact
|
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region ../centrinfo-results/src/analytics-chart-catalog.d.ts
|
|
21
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';
|
|
22
|
+
type AnalyticsChartCatalogMode = 'number' | 'threshold_gauge' | 'records' | 'basic' | 'sparkline' | 'smooth' | 'step' | 'area' | 'stacked' | 'vertical' | 'horizontal' | 'grouped' | 'pie' | 'donut' | 'rose' | 'scatter' | 'effect_scatter' | 'bubble' | 'points' | 'timeline' | 'candlestick' | 'boxplot' | 'force' | 'network' | 'path' | 'hierarchy' | 'packed' | 'coordinates' | 'flow' | 'funnel' | 'calendar' | 'radar' | 'gauge' | 'symbol' | 'river' | 'matrix' | 'chord' | 'custom' | 'dataset' | 'data_zoom' | 'graphic' | 'rich_text' | 'globe' | 'bar3d' | 'scatter3d' | 'surface' | 'map3d' | 'lines3d' | 'line3d' | 'scatter_gl' | 'lines_gl' | 'flow_gl' | 'graph_gl' | 'polygons3d';
|
|
23
|
+
type AnalyticsChartReleaseKey = `${AnalyticsChartCatalogType}:${AnalyticsChartCatalogMode}`;
|
|
24
|
+
type AnalyticsChartAvailability = 'ready' | 'adapter_required' | 'component' | 'extension_required' | 'engine_upgrade';
|
|
25
|
+
type AnalyticsChartCatalogItem = {
|
|
26
|
+
type: AnalyticsChartCatalogType;
|
|
27
|
+
mode: AnalyticsChartCatalogMode;
|
|
28
|
+
label: string;
|
|
29
|
+
description: string;
|
|
30
|
+
defaultReleased?: boolean;
|
|
31
|
+
availability?: AnalyticsChartAvailability;
|
|
32
|
+
requirement?: string;
|
|
33
|
+
};
|
|
34
|
+
type AnalyticsChartCatalogCopy = Partial<Record<AnalyticsChartReleaseKey, Partial<Pick<AnalyticsChartCatalogItem, 'label' | 'description' | 'requirement'>>>>;
|
|
22
35
|
//#endregion
|
|
23
36
|
//#region ../centrinfo-results/src/analytics-explanation.d.ts
|
|
24
37
|
/**
|
|
@@ -177,6 +190,18 @@ interface AnalyticsExplanationInput {
|
|
|
177
190
|
}>;
|
|
178
191
|
/** Governed facts the AI wording did not cover, added beside it. */
|
|
179
192
|
supplementaryFindings?: string[];
|
|
193
|
+
/**
|
|
194
|
+
* Tied highest / lowest groups, presented by the product from the evidence
|
|
195
|
+
* (the AI wording may not state them). Labels are data, shown as given.
|
|
196
|
+
*/
|
|
197
|
+
ties?: AnalyticsExplanationTieInput[];
|
|
198
|
+
}
|
|
199
|
+
interface AnalyticsExplanationTieInput {
|
|
200
|
+
evidenceId?: string;
|
|
201
|
+
/** "leader" (tied for highest) or "lowest" (tied for lowest). */
|
|
202
|
+
position?: string;
|
|
203
|
+
labels?: string[];
|
|
204
|
+
value?: number;
|
|
180
205
|
}
|
|
181
206
|
/**
|
|
182
207
|
* State of the detailed AI explanation, as returned by every surface. The
|
|
@@ -252,6 +277,9 @@ declare const ANALYTICS_EXPLANATION_COPY: {
|
|
|
252
277
|
readonly driversHint: "Measured association, not proof of cause";
|
|
253
278
|
readonly anomalies: "Unusual values";
|
|
254
279
|
readonly supplementaryFindings: "Also in the data";
|
|
280
|
+
readonly ties: "Tied results";
|
|
281
|
+
readonly tiedHighest: "Tied for highest";
|
|
282
|
+
readonly tiedLowest: "Tied for lowest";
|
|
255
283
|
readonly frameworks: "General guidance, not from your data";
|
|
256
284
|
readonly dataGaps: "Missing data";
|
|
257
285
|
readonly segment: "Segment:";
|
|
@@ -263,6 +291,99 @@ declare const ANALYTICS_EXPLANATION_COPY: {
|
|
|
263
291
|
readonly reasonMissingComparison: "Missing comparison";
|
|
264
292
|
readonly reasonUnclear: "Unclear";
|
|
265
293
|
readonly reasonTooLong: "Too long";
|
|
294
|
+
/** Investigation task list heading; `{label}` is `tasks`. */
|
|
295
|
+
readonly tasksProgress: "{label} ({done} of {total})";
|
|
296
|
+
readonly taskPlanned: "Planned";
|
|
297
|
+
readonly taskRunning: "Running";
|
|
298
|
+
readonly taskDone: "Done";
|
|
299
|
+
readonly taskFailed: "Failed";
|
|
300
|
+
readonly taskSkipped: "Skipped";
|
|
301
|
+
/** Value-status chips. */
|
|
302
|
+
readonly statusConfirmedZero: "confirmed 0";
|
|
303
|
+
readonly statusNoRecords: "no records yet";
|
|
304
|
+
readonly statusMissing: "missing";
|
|
305
|
+
readonly statusObserved: "observed";
|
|
306
|
+
readonly forecastLow: "Low-confidence forecast";
|
|
307
|
+
readonly forecastDirectional: "Directional forecast";
|
|
308
|
+
readonly forecastValidated: "Validated forecast";
|
|
309
|
+
readonly forecastEstimate: "Forecast estimate";
|
|
310
|
+
readonly checkedTimesIn: "Times in {timezone}";
|
|
311
|
+
readonly checkedAt: "Checked {time}";
|
|
312
|
+
readonly periodRange: "{start} – {end} (end not included)";
|
|
313
|
+
readonly periodFrom: "From {start}";
|
|
314
|
+
readonly periodBefore: "Before {end}";
|
|
315
|
+
/** Query-run freshness. */
|
|
316
|
+
readonly liveData: "Live data";
|
|
317
|
+
readonly updatedAt: "Updated {time}";
|
|
318
|
+
/** Source-data freshness. */
|
|
319
|
+
readonly freshnessUpdated: "Updated";
|
|
320
|
+
readonly freshnessUnknown: "Source freshness is unavailable.";
|
|
321
|
+
readonly freshnessFresh: "Fresh";
|
|
322
|
+
readonly freshnessCurrent: "Source data is current.";
|
|
323
|
+
readonly freshnessNoData: "No source data";
|
|
324
|
+
readonly freshnessNoDataBody: "No source data is available for this period or an earlier period.";
|
|
325
|
+
readonly freshnessChecked: "Checked {date}";
|
|
326
|
+
readonly freshnessLatestRecord: "Latest record";
|
|
327
|
+
readonly freshnessLatestRecordOn: "Latest record {date}";
|
|
328
|
+
readonly freshnessLatestBody: "Latest matching record: {date}. An older record alone does not prove a source delay.";
|
|
329
|
+
readonly freshnessLatestUnknownBody: "Latest matching record date is unavailable. An older record alone does not prove a source delay.";
|
|
330
|
+
/** Period comparison. */
|
|
331
|
+
readonly currentPeriod: "Current period";
|
|
332
|
+
readonly previousPeriod: "Previous period";
|
|
333
|
+
readonly periodNoRecords: "{period}: no records yet";
|
|
334
|
+
readonly noChangeFromZero: "No change (0)";
|
|
335
|
+
readonly upFromZero: "Up from 0";
|
|
336
|
+
readonly downFromZero: "Down from 0";
|
|
337
|
+
readonly notComparableShort: "Not comparable";
|
|
338
|
+
readonly comparePointDay: "vs yesterday at this time";
|
|
339
|
+
readonly comparePointWeek: "vs same point last week";
|
|
340
|
+
readonly comparePointMonth: "vs same point last month";
|
|
341
|
+
readonly comparePointQuarter: "vs same point last quarter";
|
|
342
|
+
readonly comparePointYear: "vs same point last year";
|
|
343
|
+
readonly comparePointPeriod: "vs same point last period";
|
|
344
|
+
readonly previousPointDay: "Yesterday at this time";
|
|
345
|
+
readonly previousPointWeek: "Same point last week";
|
|
346
|
+
readonly previousPointMonth: "Same point last month";
|
|
347
|
+
readonly previousPointQuarter: "Same point last quarter";
|
|
348
|
+
readonly previousPointYear: "Same point last year";
|
|
349
|
+
readonly previousPointPeriod: "Same point last period";
|
|
350
|
+
readonly fullDay: "full day";
|
|
351
|
+
readonly fullWeek: "full week";
|
|
352
|
+
readonly fullMonth: "full month";
|
|
353
|
+
readonly fullQuarter: "full quarter";
|
|
354
|
+
readonly fullYear: "full year";
|
|
355
|
+
readonly fullPeriod: "full period";
|
|
356
|
+
readonly fullDayTitle: "Full day";
|
|
357
|
+
readonly fullWeekTitle: "Full week";
|
|
358
|
+
readonly fullMonthTitle: "Full month";
|
|
359
|
+
readonly fullQuarterTitle: "Full quarter";
|
|
360
|
+
readonly fullYearTitle: "Full year";
|
|
361
|
+
readonly fullPeriodTitle: "Full period";
|
|
362
|
+
readonly cutoffDay: "Compared up to {time} on both days";
|
|
363
|
+
readonly cutoffWeek: "Compared up to {time} in both weeks";
|
|
364
|
+
readonly cutoffMonth: "Compared up to {time} in both months";
|
|
365
|
+
readonly cutoffQuarter: "Compared up to {time} in both quarters";
|
|
366
|
+
readonly cutoffYear: "Compared up to {time} in both years";
|
|
367
|
+
readonly cutoffPeriod: "Compared up to {time} in both periods";
|
|
368
|
+
readonly cutoffLatestRecord: "{cutoff}, the time of the latest record";
|
|
369
|
+
readonly previousFullLine: "{period} {full}: {value}";
|
|
370
|
+
readonly compactFullLine: "{full}: {value}";
|
|
371
|
+
readonly periodSoFar: "{period} so far: {value}";
|
|
372
|
+
readonly periodInProgress: "{period}: in progress";
|
|
373
|
+
readonly previousFullValue: "{period}: {value} ({full})";
|
|
374
|
+
readonly groupNoteLikeForLike: "{period} so far, compared with {previous}";
|
|
375
|
+
readonly groupNoteFull: "{period} so far; the previous period is shown in full, so the bars are not like for like";
|
|
376
|
+
readonly previousToDate: "Previous to date";
|
|
377
|
+
/** Limits derived from value statuses. */
|
|
378
|
+
readonly limitInProgress: "{period} is still in progress, so its total can still change.";
|
|
379
|
+
readonly limitNoRecords: "{period} has no records yet. This is not a confirmed 0.";
|
|
380
|
+
readonly limitNoRecordsReason: "{period} has no records yet. This is not a confirmed 0: {reason}.";
|
|
381
|
+
readonly limitMissing: "{period} is missing.";
|
|
382
|
+
readonly limitMissingReason: "{period} is missing: {reason}.";
|
|
383
|
+
readonly limitCurrentInProgress: "The current period is still in progress, so its total can still change.";
|
|
384
|
+
readonly missingStatement: "{label} could not be established: {reason}";
|
|
385
|
+
readonly today: "Today";
|
|
386
|
+
readonly yesterday: "Yesterday";
|
|
266
387
|
};
|
|
267
388
|
/** The explanation panel's copy with a host's overrides on top. */
|
|
268
389
|
type AnalyticsExplanationCopyOverrides = Partial<{ -readonly [K in keyof typeof ANALYTICS_EXPLANATION_COPY]: string }>;
|
|
@@ -356,6 +477,170 @@ interface AnalyticsAIExplanationTransport<E extends AnalyticsExplanationInput> {
|
|
|
356
477
|
settled?: (explanationId: string, status: 'ready' | 'failed' | 'not_requested', explanation?: E) => void;
|
|
357
478
|
}
|
|
358
479
|
//#endregion
|
|
480
|
+
//#region ../centrinfo-results/src/labels.d.ts
|
|
481
|
+
type AnalyticsExplanationCopy = Required<AnalyticsExplanationCopyOverrides>;
|
|
482
|
+
/** Every string the shared result renderer shows. Hosts override any subset. */
|
|
483
|
+
interface ResultLabels {
|
|
484
|
+
analysisUnavailable: string;
|
|
485
|
+
resultDetails: string;
|
|
486
|
+
liveMetric: string;
|
|
487
|
+
currentValue: string;
|
|
488
|
+
noMatchTitle: string;
|
|
489
|
+
noMatchBody: string;
|
|
490
|
+
chartType: string;
|
|
491
|
+
chooseChartType: string;
|
|
492
|
+
aggregate: string;
|
|
493
|
+
aggregateTitle: string;
|
|
494
|
+
aggregateCharge: string;
|
|
495
|
+
chartFallback: string;
|
|
496
|
+
chartLine: string;
|
|
497
|
+
chartArea: string;
|
|
498
|
+
chartCombo: string;
|
|
499
|
+
chartAreaHint: string;
|
|
500
|
+
chartComboHint: string;
|
|
501
|
+
chartBar: string;
|
|
502
|
+
chartStackedBar: string;
|
|
503
|
+
chartLineHint: string;
|
|
504
|
+
chartBarHint: string;
|
|
505
|
+
chartStackedBarHint: string;
|
|
506
|
+
aggregationSum: string;
|
|
507
|
+
aggregationAvg: string;
|
|
508
|
+
aggregationMin: string;
|
|
509
|
+
aggregationMax: string;
|
|
510
|
+
aggregationCount: string;
|
|
511
|
+
aggregationCountDistinct: string;
|
|
512
|
+
download: string;
|
|
513
|
+
downloadData: string;
|
|
514
|
+
expandTable: string;
|
|
515
|
+
/** Heading of the rank column in a ranked answer table. */
|
|
516
|
+
rankColumn: string;
|
|
517
|
+
expandChart: string;
|
|
518
|
+
restoreView: string;
|
|
519
|
+
aboutResult: string;
|
|
520
|
+
aboutPeriod: string;
|
|
521
|
+
aboutResults: string;
|
|
522
|
+
aboutChecked: string;
|
|
523
|
+
aboutTimezone: string;
|
|
524
|
+
aboutSourceData: string;
|
|
525
|
+
aboutFilters: string;
|
|
526
|
+
/** `{count}` placeholder. */
|
|
527
|
+
rowOne: string;
|
|
528
|
+
rowMany: string;
|
|
529
|
+
filtersOne: string;
|
|
530
|
+
filtersMany: string;
|
|
531
|
+
filtersApplied: string;
|
|
532
|
+
notSet: string;
|
|
533
|
+
noValue: string;
|
|
534
|
+
yes: string;
|
|
535
|
+
no: string;
|
|
536
|
+
other: string;
|
|
537
|
+
unknown: string;
|
|
538
|
+
rowLabel: string;
|
|
539
|
+
chartCategory: string;
|
|
540
|
+
chartActivity: string;
|
|
541
|
+
chartTarget: string;
|
|
542
|
+
mapApproximateLocation: string;
|
|
543
|
+
mapApproximateDescription: string;
|
|
544
|
+
previousChart: string;
|
|
545
|
+
aggregationQuestion: string;
|
|
546
|
+
chartCatalog?: AnalyticsChartCatalogCopy;
|
|
547
|
+
viewerMessages?: Record<string, Record<string, string>>;
|
|
548
|
+
chartValues: string;
|
|
549
|
+
/** `{measure}`, `{dimension}`. */
|
|
550
|
+
chartTitle: string;
|
|
551
|
+
viewerTitle: string;
|
|
552
|
+
viewerUnavailable: string;
|
|
553
|
+
retryViewer: string;
|
|
554
|
+
viewerUpdateAvailable: string;
|
|
555
|
+
updateViewer: string;
|
|
556
|
+
seriesLimited: string;
|
|
557
|
+
partialChart: string;
|
|
558
|
+
summaryLatest: string;
|
|
559
|
+
summaryNoTrend: string;
|
|
560
|
+
summaryHighest: string;
|
|
561
|
+
summaryNoComparison: string;
|
|
562
|
+
zoomControls: string;
|
|
563
|
+
zoomIn: string;
|
|
564
|
+
zoomOut: string;
|
|
565
|
+
zoomReset: string;
|
|
566
|
+
zoomResetShort: string;
|
|
567
|
+
zoomNone: string;
|
|
568
|
+
zoomAllOne: string;
|
|
569
|
+
zoomAllMany: string;
|
|
570
|
+
zoomRange: string;
|
|
571
|
+
inProgress: string;
|
|
572
|
+
newContent: string;
|
|
573
|
+
updatedAt: string;
|
|
574
|
+
liveData: string;
|
|
575
|
+
viewData: string;
|
|
576
|
+
hideData: string;
|
|
577
|
+
inProgressLegend: string;
|
|
578
|
+
/** Overrides for the explanation panel copy. */
|
|
579
|
+
explanation?: Partial<AnalyticsExplanationCopy>;
|
|
580
|
+
governedResult: string;
|
|
581
|
+
/** Source-data freshness values in "About this result". */
|
|
582
|
+
/** Quarter axis/cell label; `{quarter}` 1–4, `{year}`. */
|
|
583
|
+
quarterLabel: string;
|
|
584
|
+
sourceCurrent: string;
|
|
585
|
+
sourceDelayed: string;
|
|
586
|
+
sourceNoData: string;
|
|
587
|
+
comboDescription: string;
|
|
588
|
+
comboSeriesLeft: string;
|
|
589
|
+
comboSeriesRight: string;
|
|
590
|
+
comboOmitted: string;
|
|
591
|
+
tableEmpty: string;
|
|
592
|
+
tableCaptionOne: string;
|
|
593
|
+
tableCaptionMany: string;
|
|
594
|
+
tableShowing: string;
|
|
595
|
+
tableFields: string;
|
|
596
|
+
tableSearch: string;
|
|
597
|
+
tableSearchPlaceholder: string;
|
|
598
|
+
tableDisplayMode: string;
|
|
599
|
+
tableModeTable: string;
|
|
600
|
+
tableModeMatrix: string;
|
|
601
|
+
tableColumns: string;
|
|
602
|
+
tableMoveLeft: string;
|
|
603
|
+
tableMoveRight: string;
|
|
604
|
+
tableComfortableRows: string;
|
|
605
|
+
tableCompactRows: string;
|
|
606
|
+
tableResetView: string;
|
|
607
|
+
tableClearFilter: string;
|
|
608
|
+
tableScrollable: string;
|
|
609
|
+
tableSelectAll: string;
|
|
610
|
+
tableSortBy: string;
|
|
611
|
+
tableColumnActions: string;
|
|
612
|
+
tableSortAscending: string;
|
|
613
|
+
tableSortDescending: string;
|
|
614
|
+
tableFilterValues: string;
|
|
615
|
+
tableFilterOperator: string;
|
|
616
|
+
tableOpContains: string;
|
|
617
|
+
tableOpEquals: string;
|
|
618
|
+
tableOpNotEquals: string;
|
|
619
|
+
tableOpGt: string;
|
|
620
|
+
tableOpGte: string;
|
|
621
|
+
tableOpLt: string;
|
|
622
|
+
tableOpLte: string;
|
|
623
|
+
tableFilterValue: string;
|
|
624
|
+
tableFilterPlaceholder: string;
|
|
625
|
+
tableApplyFilter: string;
|
|
626
|
+
tablePinColumn: string;
|
|
627
|
+
tableUnpinColumn: string;
|
|
628
|
+
tableWrapText: string;
|
|
629
|
+
tableNoWrapText: string;
|
|
630
|
+
tableDisplayName: string;
|
|
631
|
+
tableApplyDisplayName: string;
|
|
632
|
+
tableSelectRow: string;
|
|
633
|
+
tablePageRange: string;
|
|
634
|
+
tablePageEmpty: string;
|
|
635
|
+
tablePagination: string;
|
|
636
|
+
tableRows: string;
|
|
637
|
+
tableRowsPerPage: string;
|
|
638
|
+
tablePreviousPage: string;
|
|
639
|
+
tableNextPage: string;
|
|
640
|
+
tableFirstRows: string;
|
|
641
|
+
tableAllRows: string;
|
|
642
|
+
}
|
|
643
|
+
//#endregion
|
|
359
644
|
//#region ../centrinfo-results/src/format.d.ts
|
|
360
645
|
/**
|
|
361
646
|
* The one place numbers, currency, percentages and dates are formatted, so the
|
|
@@ -382,6 +667,8 @@ interface ResultFormatContext {
|
|
|
382
667
|
currencyCode?: string;
|
|
383
668
|
yes?: string;
|
|
384
669
|
no?: string;
|
|
670
|
+
/** Quarter label template, `{quarter}` and `{year}` (default `Q{quarter} {year}`). */
|
|
671
|
+
quarter?: string;
|
|
385
672
|
}
|
|
386
673
|
//#endregion
|
|
387
674
|
//#region ../centrinfo-results/src/types.d.ts
|
|
@@ -485,6 +772,8 @@ interface AnalyticsVisualization$1 {
|
|
|
485
772
|
isMixed: boolean;
|
|
486
773
|
};
|
|
487
774
|
chartRecommendation?: AnalyticsVisualizationRecommendation$1;
|
|
775
|
+
/** Structured two-level ranking; see `parseRankedAnswer`. */
|
|
776
|
+
rankedAnswer?: unknown;
|
|
488
777
|
}
|
|
489
778
|
interface ResultColumn {
|
|
490
779
|
key: string;
|
|
@@ -538,95 +827,6 @@ interface AnalyticsComboModel {
|
|
|
538
827
|
locale?: string;
|
|
539
828
|
}
|
|
540
829
|
//#endregion
|
|
541
|
-
//#region ../centrinfo-results/src/labels.d.ts
|
|
542
|
-
type AnalyticsExplanationCopy = Required<AnalyticsExplanationCopyOverrides>;
|
|
543
|
-
/** Every string the shared result renderer shows. Hosts override any subset. */
|
|
544
|
-
interface ResultLabels {
|
|
545
|
-
analysisUnavailable: string;
|
|
546
|
-
resultDetails: string;
|
|
547
|
-
liveMetric: string;
|
|
548
|
-
currentValue: string;
|
|
549
|
-
noMatchTitle: string;
|
|
550
|
-
noMatchBody: string;
|
|
551
|
-
chartType: string;
|
|
552
|
-
chooseChartType: string;
|
|
553
|
-
aggregate: string;
|
|
554
|
-
aggregateTitle: string;
|
|
555
|
-
aggregateCharge: string;
|
|
556
|
-
chartFallback: string;
|
|
557
|
-
chartLine: string;
|
|
558
|
-
chartArea: string;
|
|
559
|
-
chartCombo: string;
|
|
560
|
-
chartAreaHint: string;
|
|
561
|
-
chartComboHint: string;
|
|
562
|
-
chartBar: string;
|
|
563
|
-
chartStackedBar: string;
|
|
564
|
-
chartLineHint: string;
|
|
565
|
-
chartBarHint: string;
|
|
566
|
-
chartStackedBarHint: string;
|
|
567
|
-
aggregationSum: string;
|
|
568
|
-
aggregationAvg: string;
|
|
569
|
-
aggregationMin: string;
|
|
570
|
-
aggregationMax: string;
|
|
571
|
-
aggregationCount: string;
|
|
572
|
-
aggregationCountDistinct: string;
|
|
573
|
-
download: string;
|
|
574
|
-
downloadData: string;
|
|
575
|
-
expandTable: string;
|
|
576
|
-
expandChart: string;
|
|
577
|
-
restoreView: string;
|
|
578
|
-
aboutResult: string;
|
|
579
|
-
aboutPeriod: string;
|
|
580
|
-
aboutResults: string;
|
|
581
|
-
aboutChecked: string;
|
|
582
|
-
aboutTimezone: string;
|
|
583
|
-
aboutSourceData: string;
|
|
584
|
-
aboutFilters: string;
|
|
585
|
-
/** `{count}` placeholder. */
|
|
586
|
-
rowOne: string;
|
|
587
|
-
rowMany: string;
|
|
588
|
-
filtersOne: string;
|
|
589
|
-
filtersMany: string;
|
|
590
|
-
filtersApplied: string;
|
|
591
|
-
notSet: string;
|
|
592
|
-
noValue: string;
|
|
593
|
-
yes: string;
|
|
594
|
-
no: string;
|
|
595
|
-
chartValues: string;
|
|
596
|
-
/** `{measure}`, `{dimension}`. */
|
|
597
|
-
chartTitle: string;
|
|
598
|
-
viewerTitle: string;
|
|
599
|
-
viewerUnavailable: string;
|
|
600
|
-
retryViewer: string;
|
|
601
|
-
viewerUpdateAvailable: string;
|
|
602
|
-
updateViewer: string;
|
|
603
|
-
seriesLimited: string;
|
|
604
|
-
partialChart: string;
|
|
605
|
-
summaryLatest: string;
|
|
606
|
-
summaryNoTrend: string;
|
|
607
|
-
summaryHighest: string;
|
|
608
|
-
summaryNoComparison: string;
|
|
609
|
-
zoomControls: string;
|
|
610
|
-
zoomIn: string;
|
|
611
|
-
zoomOut: string;
|
|
612
|
-
zoomReset: string;
|
|
613
|
-
zoomResetShort: string;
|
|
614
|
-
zoomNone: string;
|
|
615
|
-
zoomAllOne: string;
|
|
616
|
-
zoomAllMany: string;
|
|
617
|
-
zoomRange: string;
|
|
618
|
-
inProgress: string;
|
|
619
|
-
newContent: string;
|
|
620
|
-
updatedAt: string;
|
|
621
|
-
liveData: string;
|
|
622
|
-
viewData: string;
|
|
623
|
-
hideData: string;
|
|
624
|
-
inProgressLegend: string;
|
|
625
|
-
/** Overrides for the explanation panel copy. */
|
|
626
|
-
explanation?: Partial<AnalyticsExplanationCopy>;
|
|
627
|
-
governedResult: string;
|
|
628
|
-
}
|
|
629
|
-
//#endregion
|
|
630
830
|
//#region ../centrinfo-results/src/chart.d.ts
|
|
631
831
|
type WidgetAnalyticsSeries = {
|
|
632
832
|
field: string;
|
|
@@ -672,7 +872,7 @@ declare const WidgetAnalyticsChart: ({
|
|
|
672
872
|
expanded?: boolean;
|
|
673
873
|
/** Class prefix of the surface (`cf` widget, `ca` chat app). */
|
|
674
874
|
classPrefix?: string;
|
|
675
|
-
}) =>
|
|
875
|
+
}) => preact3.JSX.Element;
|
|
676
876
|
//#endregion
|
|
677
877
|
//#region ../centrinfo-results/src/result.d.ts
|
|
678
878
|
declare const formatResultCell: (value: unknown, locale?: string, column?: ResultColumn, context?: ResultFormatContext) => string;
|
|
@@ -689,6 +889,8 @@ interface ResultTableProps {
|
|
|
689
889
|
expanded?: boolean;
|
|
690
890
|
classNames?: ResultTableClassNames;
|
|
691
891
|
emptyLabel?: string;
|
|
892
|
+
/** Any subset of the result labels; English fills the rest. */
|
|
893
|
+
labels?: Partial<ResultLabels>;
|
|
692
894
|
}
|
|
693
895
|
declare const ResultTable: ({
|
|
694
896
|
rows,
|
|
@@ -698,8 +900,9 @@ declare const ResultTable: ({
|
|
|
698
900
|
format,
|
|
699
901
|
expanded,
|
|
700
902
|
classNames,
|
|
701
|
-
emptyLabel
|
|
702
|
-
|
|
903
|
+
emptyLabel,
|
|
904
|
+
labels: labelOverrides
|
|
905
|
+
}: ResultTableProps) => preact3.JSX.Element;
|
|
703
906
|
//#endregion
|
|
704
907
|
//#region ../centrinfo-results/src/result-details.d.ts
|
|
705
908
|
interface AnalyticsResultDetail {
|
|
@@ -707,6 +910,24 @@ interface AnalyticsResultDetail {
|
|
|
707
910
|
value: string;
|
|
708
911
|
}
|
|
709
912
|
//#endregion
|
|
913
|
+
//#region ../centrinfo-results/src/locale.d.ts
|
|
914
|
+
/**
|
|
915
|
+
* Shared locale plumbing for every Centrinfo SDK (widget, chat app, voice,
|
|
916
|
+
* analytics, results). One place for: the bundled language list, locale and
|
|
917
|
+
* text-direction resolution, `{placeholder}` templates, plurals, Intl
|
|
918
|
+
* formatting, catalog merging/lazy loading, and the catalog parity check the
|
|
919
|
+
* per-package tests use.
|
|
920
|
+
*
|
|
921
|
+
* Contract for a package catalog:
|
|
922
|
+
* - English defaults live in code (always bundled, the fallback for any key).
|
|
923
|
+
* - Each bundled language is `src/locales/<lang>.ts` with a default export of
|
|
924
|
+
* `Partial<Strings>`; Yoruba, Hausa and Igbo are empty slots (English).
|
|
925
|
+
* - Precedence: English < bundled catalog < host `strings` overrides.
|
|
926
|
+
*/
|
|
927
|
+
/** Languages with a catalog slot. `yo`, `ha`, `ig` are empty (English). */
|
|
928
|
+
declare const SDK_LANGUAGES: readonly ["en", "fr", "es", "pt", "de", "it", "ar", "sw", "yo", "ha", "ig"];
|
|
929
|
+
type SdkLanguage = (typeof SDK_LANGUAGES)[number];
|
|
930
|
+
//#endregion
|
|
710
931
|
//#region src/i18n.d.ts
|
|
711
932
|
/**
|
|
712
933
|
* Every user-visible chrome string in one place. The widget ships English
|
|
@@ -775,6 +996,8 @@ interface WidgetStrings {
|
|
|
775
996
|
exitExpandedView: string;
|
|
776
997
|
minimizeVoiceChat: string;
|
|
777
998
|
endVoiceChat: string;
|
|
999
|
+
/** Start-call button; `{name}` is the agent's name. Hosts can override. */
|
|
1000
|
+
speakWithAgent: string;
|
|
778
1001
|
restoreVoiceChat: string;
|
|
779
1002
|
reopenVoiceChat: string;
|
|
780
1003
|
voiceConnecting: string;
|
|
@@ -786,6 +1009,28 @@ interface WidgetStrings {
|
|
|
786
1009
|
voiceNoise: string;
|
|
787
1010
|
voiceMisunderstood: string;
|
|
788
1011
|
voiceDenied: string;
|
|
1012
|
+
voiceMuted: string;
|
|
1013
|
+
voiceTimeout: string;
|
|
1014
|
+
/** Status lines of a voice call (Speak with AI). */
|
|
1015
|
+
callConnecting: string;
|
|
1016
|
+
callListening: string;
|
|
1017
|
+
callHearing: string;
|
|
1018
|
+
callUnavailable: string;
|
|
1019
|
+
callSpeaking: string;
|
|
1020
|
+
callProcessing: string;
|
|
1021
|
+
callNoise: string;
|
|
1022
|
+
callMisunderstood: string;
|
|
1023
|
+
callDenied: string;
|
|
1024
|
+
/** The visitor asked the assistant to wait; it listens quietly. */
|
|
1025
|
+
callWaiting: string;
|
|
1026
|
+
/** A slow answer: progress is being given. */
|
|
1027
|
+
callStillWorking: string;
|
|
1028
|
+
/** Control that resumes a waiting call. */
|
|
1029
|
+
resumeVoiceChat: string;
|
|
1030
|
+
/** The visitor talks while an earlier answer is still being prepared. */
|
|
1031
|
+
voiceAnswerStillComing: string;
|
|
1032
|
+
/** Spoken when an answer is only display data (tables, charts). */
|
|
1033
|
+
voiceDetailsInChat: string;
|
|
789
1034
|
composerPlaceholder: string;
|
|
790
1035
|
send: string;
|
|
791
1036
|
emoji: string;
|
|
@@ -835,6 +1080,13 @@ interface WidgetStrings {
|
|
|
835
1080
|
emptyReply: string;
|
|
836
1081
|
errorGeneric: string;
|
|
837
1082
|
errorRateLimit: string;
|
|
1083
|
+
errorTimeout?: string;
|
|
1084
|
+
errorUnavailable?: string;
|
|
1085
|
+
errorAccess?: string;
|
|
1086
|
+
errorAnalysis?: string;
|
|
1087
|
+
errorAnalyticsSetup?: string;
|
|
1088
|
+
errorCredits?: string;
|
|
1089
|
+
errorSubscription?: string;
|
|
838
1090
|
/** Shown in place of an analytics result that is not kept in local storage. */
|
|
839
1091
|
resultExpired: string;
|
|
840
1092
|
attaching: string;
|
|
@@ -867,6 +1119,17 @@ interface WidgetStrings {
|
|
|
867
1119
|
/** Generic action-form success fallback + error. */
|
|
868
1120
|
formThanks: string;
|
|
869
1121
|
formError: string;
|
|
1122
|
+
voiceFormAsk: string;
|
|
1123
|
+
voiceFormReview: string;
|
|
1124
|
+
voiceFormCancelled: string;
|
|
1125
|
+
voiceFormUnavailable: string;
|
|
1126
|
+
voiceFormNoSlots: string;
|
|
1127
|
+
voiceFormLoading: string;
|
|
1128
|
+
voiceFormAt: string;
|
|
1129
|
+
voiceFormDot: string;
|
|
1130
|
+
voiceFormAppointmentTime: string;
|
|
1131
|
+
voiceFormTimeUnavailable: string;
|
|
1132
|
+
voiceFormExternal: string;
|
|
870
1133
|
/** Case number appended to a confirmation. `{reference}` is the case number. */
|
|
871
1134
|
caseReference: string;
|
|
872
1135
|
/** Public action drawer chrome. Action-specific copy remains descriptor data. */
|
|
@@ -923,12 +1186,121 @@ interface WidgetStrings {
|
|
|
923
1186
|
bookingCheckingDetails: string;
|
|
924
1187
|
bookingDetailsUnavailable: string;
|
|
925
1188
|
bookingRetryDetails: string;
|
|
1189
|
+
/** Assistant card while a voice call connects. */
|
|
1190
|
+
callConnectingWithAi: string;
|
|
1191
|
+
/** Assistant card privacy note when the org set a privacy link but no text. */
|
|
1192
|
+
disclaimerDefault: string;
|
|
1193
|
+
/** Fallback action descriptions (only for backends that send no descriptors). */
|
|
1194
|
+
actionContactSupportDescription: string;
|
|
1195
|
+
actionLeaveMessageDescription: string;
|
|
1196
|
+
actionBookDemoDescription: string;
|
|
1197
|
+
actionRequestCallbackDescription: string;
|
|
1198
|
+
actionScheduleCallbackDescription: string;
|
|
1199
|
+
actionSubscribeDescription: string;
|
|
1200
|
+
/** Fallback form titles, submit buttons, field labels and placeholders. */
|
|
1201
|
+
formContactSupportTitle: string;
|
|
1202
|
+
formRequestSupport: string;
|
|
1203
|
+
formLeaveMessageTitle: string;
|
|
1204
|
+
formSendMessage: string;
|
|
1205
|
+
formShareDetailsTitle: string;
|
|
1206
|
+
formSave: string;
|
|
1207
|
+
formBookDemoTitle: string;
|
|
1208
|
+
formRequestDemo: string;
|
|
1209
|
+
formRequestCallbackTitle: string;
|
|
1210
|
+
formRequestCallback: string;
|
|
1211
|
+
formScheduleCallbackTitle: string;
|
|
1212
|
+
formScheduleCallback: string;
|
|
1213
|
+
formSubscribe: string;
|
|
1214
|
+
fieldFullName: string;
|
|
1215
|
+
fieldEmail: string;
|
|
1216
|
+
fieldSubject: string;
|
|
1217
|
+
fieldMessage: string;
|
|
1218
|
+
fieldPhone: string;
|
|
1219
|
+
fieldPhoneNumber: string;
|
|
1220
|
+
fieldPreferredTime: string;
|
|
1221
|
+
fieldNotes: string;
|
|
1222
|
+
fieldTopic: string;
|
|
1223
|
+
placeholderSupportMessage: string;
|
|
1224
|
+
placeholderInquiryMessage: string;
|
|
1225
|
+
placeholderPreferredTime: string;
|
|
1226
|
+
placeholderNotes: string;
|
|
1227
|
+
placeholderTopic: string;
|
|
1228
|
+
/** Phone field country picker. `{country}`, `{dial}`. */
|
|
1229
|
+
phoneChooseCountry: string;
|
|
1230
|
+
phoneSearchPlaceholder: string;
|
|
1231
|
+
phoneSearchLabel: string;
|
|
1232
|
+
phoneCountries: string;
|
|
1233
|
+
phoneNoCountries: string;
|
|
1234
|
+
/** Pre-filled message of the handoff card. */
|
|
1235
|
+
handoffDefaultMessage: string;
|
|
1236
|
+
/** Handoff card when the team already has the visitor's email. */
|
|
1237
|
+
handoffAlerted: string;
|
|
1238
|
+
gifAlt: string;
|
|
1239
|
+
toolResultAlt: string;
|
|
1240
|
+
openResult: string;
|
|
1241
|
+
/** Unnamed microphone in the device list. `{number}`. */
|
|
1242
|
+
microphoneNumbered: string;
|
|
1243
|
+
/** Speech bubble while the visitor starts talking in a call. */
|
|
1244
|
+
voiceDraftListening: string;
|
|
1245
|
+
/** Emoji picker group headings. */
|
|
1246
|
+
emojiSmileys: string;
|
|
1247
|
+
emojiGestures: string;
|
|
1248
|
+
emojiHearts: string;
|
|
1249
|
+
emojiAnimals: string;
|
|
1250
|
+
emojiFood: string;
|
|
1251
|
+
emojiObjects: string;
|
|
1252
|
+
/** Receipt when an action returned no message of its own. */
|
|
1253
|
+
actionCompleted: string;
|
|
1254
|
+
/** Copied text of a result table. `{count}`, `{total}`. */
|
|
1255
|
+
copyResultData: string;
|
|
1256
|
+
copyRowsReturned: string;
|
|
1257
|
+
copyRowsReturnedOf: string;
|
|
1258
|
+
copyTruncated: string;
|
|
1259
|
+
copyTotals: string;
|
|
926
1260
|
/** Preview mode (data-preview): canned reply, action note, top banner. */
|
|
927
1261
|
previewReply: string;
|
|
928
1262
|
previewActionNote: string;
|
|
929
1263
|
previewBanner: string;
|
|
930
1264
|
}
|
|
931
|
-
declare const
|
|
1265
|
+
declare const DEFAULT_STRINGS: WidgetStrings;
|
|
1266
|
+
/**
|
|
1267
|
+
* English defaults, then the bundled catalog for the locale (`catalog`), then
|
|
1268
|
+
* the host's overrides. Undefined values never erase a lower layer.
|
|
1269
|
+
*/
|
|
1270
|
+
declare const mergeStrings: (overrides?: Partial<WidgetStrings>, catalog?: Partial<WidgetStrings>) => WidgetStrings;
|
|
1271
|
+
declare const StringsProvider: preact3.Provider<WidgetStrings>;
|
|
1272
|
+
//#endregion
|
|
1273
|
+
//#region ../centrinfo-voice/src/voice-control.d.ts
|
|
1274
|
+
/** Spoken call controls. The assistant's answer to a voice turn says, as a
|
|
1275
|
+
* structured field next to its reply, whether the person asked to control the
|
|
1276
|
+
* call ("mute", "end", ... in any language). No words are matched here: the
|
|
1277
|
+
* answering model decides from what was meant, and the client only executes
|
|
1278
|
+
* an action it allows. */
|
|
1279
|
+
declare const VOICE_CONTROL_ACTIONS: readonly ["mute", "end", "minimize", "expand", "shrink", "wait", "resume"];
|
|
1280
|
+
type VoiceControlAction = (typeof VOICE_CONTROL_ACTIONS)[number];
|
|
1281
|
+
/** An answer to a voice turn: the words, and the call control it asked for. */
|
|
1282
|
+
interface VoiceAnswer {
|
|
1283
|
+
text: string | null;
|
|
1284
|
+
voiceControl?: VoiceControlAction | null;
|
|
1285
|
+
/** The conversation's language, when the answer reports it. */
|
|
1286
|
+
language?: string;
|
|
1287
|
+
/** Progress lines in that language for a later slow answer. */
|
|
1288
|
+
progressLines?: readonly string[];
|
|
1289
|
+
}
|
|
1290
|
+
//#endregion
|
|
1291
|
+
//#region ../centrinfo-voice/src/live-voice.d.ts
|
|
1292
|
+
interface LiveVoiceRequest {
|
|
1293
|
+
action: 'capabilities' | 'connect' | 'heartbeat' | 'close' | 'interrupt';
|
|
1294
|
+
sdp?: string;
|
|
1295
|
+
callId?: string;
|
|
1296
|
+
}
|
|
1297
|
+
interface LiveVoiceResponse {
|
|
1298
|
+
enabled: boolean;
|
|
1299
|
+
callId?: string;
|
|
1300
|
+
sdp?: string;
|
|
1301
|
+
maxDurationSeconds?: number;
|
|
1302
|
+
}
|
|
1303
|
+
type LiveVoiceTransport = (request: LiveVoiceRequest, signal?: AbortSignal) => Promise<LiveVoiceResponse>;
|
|
932
1304
|
//#endregion
|
|
933
1305
|
//#region src/api/types.d.ts
|
|
934
1306
|
/** The result metadata that arrives with (or after) an answer. */
|
|
@@ -985,11 +1357,36 @@ interface LiveAudioSegment {
|
|
|
985
1357
|
/** The piece as spoken (no links or markdown). */
|
|
986
1358
|
text?: string;
|
|
987
1359
|
}
|
|
1360
|
+
interface VoiceFormField extends Omit<PublicChatActionField, 'kind'> {
|
|
1361
|
+
kind: PublicChatActionField['kind'] | 'choice' | 'datetime';
|
|
1362
|
+
options?: {
|
|
1363
|
+
value: string;
|
|
1364
|
+
label: string;
|
|
1365
|
+
}[];
|
|
1366
|
+
}
|
|
1367
|
+
interface VoiceFormRequest {
|
|
1368
|
+
sessionId: string;
|
|
1369
|
+
clientMessageId: string;
|
|
1370
|
+
actionId: string;
|
|
1371
|
+
fields: VoiceFormField[];
|
|
1372
|
+
values: Record<string, string>;
|
|
1373
|
+
transcript: string;
|
|
1374
|
+
reviewing: boolean;
|
|
1375
|
+
language?: string;
|
|
1376
|
+
timeZone?: string;
|
|
1377
|
+
}
|
|
1378
|
+
interface VoiceFormResult {
|
|
1379
|
+
intent: 'provide' | 'confirm' | 'cancel' | 'question';
|
|
1380
|
+
values: Record<string, string>;
|
|
1381
|
+
clarification?: string;
|
|
1382
|
+
}
|
|
988
1383
|
interface TurnResult {
|
|
989
1384
|
answerResult?: CentrinfoAnswer<AnalyticsVisualization, Source, ChatArtifact>;
|
|
990
1385
|
/** True when the reply was spoken in live pieces (onAudioSegment). */
|
|
991
1386
|
liveAudio?: boolean;
|
|
992
1387
|
answer: string;
|
|
1388
|
+
errorCode?: string;
|
|
1389
|
+
retryable?: boolean;
|
|
993
1390
|
sources: Source[];
|
|
994
1391
|
suggestedReplies: string[];
|
|
995
1392
|
/** Legacy: raw tool ids. Prefer `actions`. */
|
|
@@ -999,10 +1396,15 @@ interface TurnResult {
|
|
|
999
1396
|
/** Action the backend resolved for this turn — open its form directly. */
|
|
1000
1397
|
selectedAction?: string;
|
|
1001
1398
|
handoffOffered: boolean;
|
|
1399
|
+
/** True only after the backend confirms an issue was saved. */
|
|
1400
|
+
issueRaised?: boolean;
|
|
1002
1401
|
/** Contact fields the backend wants inline before handoff, e.g. ["email"]. */
|
|
1003
1402
|
requestedContactFields?: string[];
|
|
1004
1403
|
/** True when the backend closed the session (visitor ended it, or 24h idle). */
|
|
1005
1404
|
conversationEnded?: boolean;
|
|
1405
|
+
/** Voice turns only: the call control the answer asked for (decided by the
|
|
1406
|
+
* answering model; the call only carries out controls it allows). */
|
|
1407
|
+
voiceControl?: string;
|
|
1006
1408
|
/** Current live handoff state for the session. */
|
|
1007
1409
|
liveMode?: 'ai' | 'queued' | 'human';
|
|
1008
1410
|
/** Human currently assigned to the chat, when liveMode is human. */
|
|
@@ -1274,6 +1676,8 @@ interface AnalyticsVisualization {
|
|
|
1274
1676
|
isMixed: boolean;
|
|
1275
1677
|
};
|
|
1276
1678
|
chartRecommendation?: AnalyticsVisualizationRecommendation;
|
|
1679
|
+
/** Structured two-level ranking (validated by `parseRankedAnswer`). */
|
|
1680
|
+
rankedAnswer?: unknown;
|
|
1277
1681
|
analysis?: AnalyticsVisualizationAnalysis;
|
|
1278
1682
|
businessAnalysis?: AnalyticsVisualizationBusinessAnalysis;
|
|
1279
1683
|
analysisIntent?: AnalyticsVisualizationAnalysisIntent;
|
|
@@ -1328,6 +1732,7 @@ interface AuthenticatedHistoryMessage {
|
|
|
1328
1732
|
visualization?: AnalyticsVisualization;
|
|
1329
1733
|
artifacts?: ChatArtifact[];
|
|
1330
1734
|
createdAt: string;
|
|
1735
|
+
expiresAt?: string;
|
|
1331
1736
|
}
|
|
1332
1737
|
interface AuthenticatedHistoryConversation {
|
|
1333
1738
|
sessionId: string;
|
|
@@ -1341,6 +1746,7 @@ interface AuthenticatedHistoryResult {
|
|
|
1341
1746
|
conversations: AuthenticatedHistoryConversation[];
|
|
1342
1747
|
}
|
|
1343
1748
|
interface StreamCallbacks {
|
|
1749
|
+
voiceFormEntry?: boolean;
|
|
1344
1750
|
analyticsModelId?: string;
|
|
1345
1751
|
/** Called with each incremental text chunk. */
|
|
1346
1752
|
onChunk: (text: string) => void;
|
|
@@ -1354,15 +1760,23 @@ interface StreamCallbacks {
|
|
|
1354
1760
|
signal?: AbortSignal;
|
|
1355
1761
|
/** True only for turns sent from the active Speak-with-AI call. */
|
|
1356
1762
|
voicePlaybackRequested?: boolean;
|
|
1763
|
+
/** The turn was spoken in a voice call (also realtime voice, which plays
|
|
1764
|
+
* its own audio): the answer may carry a call control (`voiceControl`). */
|
|
1765
|
+
voiceCall?: boolean;
|
|
1766
|
+
/** The voice call is waiting (the visitor asked the assistant to hold). */
|
|
1767
|
+
voiceWaiting?: boolean;
|
|
1357
1768
|
/** Stable id of the visitor's message. A retry sends the same id, so the
|
|
1358
1769
|
* backend answers and bills the turn once. */
|
|
1359
1770
|
clientMessageId?: string;
|
|
1771
|
+
retryOfMessageId?: string;
|
|
1360
1772
|
attachmentId?: string;
|
|
1361
1773
|
/** Every stored file sent with this message. */
|
|
1362
1774
|
attachmentIds?: string[];
|
|
1363
1775
|
}
|
|
1364
1776
|
interface ActionResult {
|
|
1365
1777
|
ok: boolean;
|
|
1778
|
+
/** True only after a staff issue or handoff inquiry was saved. */
|
|
1779
|
+
issueRaised?: boolean;
|
|
1366
1780
|
note?: string;
|
|
1367
1781
|
/** Saved conversation message for this completed action. */
|
|
1368
1782
|
receipt?: {
|
|
@@ -1471,6 +1885,12 @@ interface GifResult {
|
|
|
1471
1885
|
* backend (`ApiClient`) or the in-memory demo (`MockTransport`).
|
|
1472
1886
|
*/
|
|
1473
1887
|
interface Transport {
|
|
1888
|
+
/** Static UI catalogs; absent for demo, preview and older custom transports. */
|
|
1889
|
+
loadUITranslations?(namespace: string, locale: string, version?: string, signal?: AbortSignal): Promise<unknown>;
|
|
1890
|
+
prepareVoiceForm?: (request: VoiceFormRequest, signal?: AbortSignal) => Promise<VoiceFormResult>;
|
|
1891
|
+
liveVoice?(request: LiveVoiceRequest & {
|
|
1892
|
+
sessionId: string;
|
|
1893
|
+
}, signal?: AbortSignal): Promise<LiveVoiceResponse>;
|
|
1474
1894
|
analyticsModels?(): Promise<AnalyticsModelOption[]>;
|
|
1475
1895
|
bootstrap(): Promise<BootstrapInfo>;
|
|
1476
1896
|
/** Server-backed history for the verified SDK customer. Anonymous returns empty. */
|
|
@@ -1621,8 +2041,20 @@ interface WidgetConfig {
|
|
|
1621
2041
|
* chat answers themselves are already multilingual server-side.
|
|
1622
2042
|
*/
|
|
1623
2043
|
labels?: Partial<WidgetStrings>;
|
|
1624
|
-
/**
|
|
2044
|
+
/**
|
|
2045
|
+
* Override any UI text (same keys as `labels`; `strings` wins when both are
|
|
2046
|
+
* set). Unset keys use automatic/bundled catalogs for `locale`, then English.
|
|
2047
|
+
*/
|
|
2048
|
+
strings?: Partial<WidgetStrings>;
|
|
2049
|
+
/**
|
|
2050
|
+
* BCP-47 locale (`fr`, `pt-BR`, `ar-EG`, …). Loads bundled UI text and,
|
|
2051
|
+
* by default, missing automatic translations. Formats dates, times and
|
|
2052
|
+
* numbers with the runtime's Intl support. Defaults to the browser language.
|
|
2053
|
+
*/
|
|
1625
2054
|
locale?: string;
|
|
2055
|
+
/** Load missing static UI translations from the authenticated backend. Default true.
|
|
2056
|
+
* Set false to use only bundled catalogs and your own strings. */
|
|
2057
|
+
autoTranslate?: boolean;
|
|
1626
2058
|
/**
|
|
1627
2059
|
* Text direction. `auto` (default) follows the locale: Arabic, Hebrew,
|
|
1628
2060
|
* Persian, Urdu and similar scripts render right-to-left.
|
|
@@ -1831,8 +2263,19 @@ interface WidgetHandle {
|
|
|
1831
2263
|
*/
|
|
1832
2264
|
shutdown: () => void;
|
|
1833
2265
|
logout: () => void;
|
|
2266
|
+
/**
|
|
2267
|
+
* Change the language, text overrides or direction at runtime. `strings`
|
|
2268
|
+
* merge over earlier overrides. Resolves once the new text is shown.
|
|
2269
|
+
*/
|
|
2270
|
+
setLocale: (update: WidgetLocaleUpdate) => Promise<void>;
|
|
1834
2271
|
destroy: () => void;
|
|
1835
2272
|
}
|
|
2273
|
+
/** Runtime language change for `handle.setLocale`. */
|
|
2274
|
+
interface WidgetLocaleUpdate {
|
|
2275
|
+
locale?: string;
|
|
2276
|
+
strings?: Partial<WidgetStrings>;
|
|
2277
|
+
dir?: 'ltr' | 'rtl' | 'auto';
|
|
2278
|
+
}
|
|
1836
2279
|
/** A rendered chat message. */
|
|
1837
2280
|
interface ChatArtifact {
|
|
1838
2281
|
type: 'image' | 'video' | 'resource_link' | 'visualization';
|
|
@@ -1855,6 +2298,9 @@ interface MessageAttachment {
|
|
|
1855
2298
|
}
|
|
1856
2299
|
interface ChatMessage {
|
|
1857
2300
|
id: string;
|
|
2301
|
+
/** A voice-call control turn (wait, mute, end, ...): shown during the call
|
|
2302
|
+
* but never kept in the saved transcript, matching the server. */
|
|
2303
|
+
callOnly?: boolean;
|
|
1858
2304
|
role: 'user' | 'assistant' | 'system';
|
|
1859
2305
|
content: string;
|
|
1860
2306
|
/** Human name for live agent replies or system join/leave events. */
|
|
@@ -1865,8 +2311,10 @@ interface ChatMessage {
|
|
|
1865
2311
|
offerReconnect?: boolean;
|
|
1866
2312
|
/** Local assistant message opened by "Reconnect to support". */
|
|
1867
2313
|
reconnectOffer?: boolean;
|
|
1868
|
-
/**
|
|
2314
|
+
/** Original message time used for transcript retention. */
|
|
1869
2315
|
createdAt?: string;
|
|
2316
|
+
/** Original retention deadline; cache writes must not renew it. */
|
|
2317
|
+
expiresAt?: string;
|
|
1870
2318
|
/** Inline image (e.g. a GIF the visitor sent). Rendered in the bubble. */
|
|
1871
2319
|
imageUrl?: string;
|
|
1872
2320
|
/** Name of a file the visitor attached (rendered as a chip on their bubble). */
|
|
@@ -1884,6 +2332,8 @@ interface ChatMessage {
|
|
|
1884
2332
|
/** Action the backend resolved for this turn — its form opens directly. */
|
|
1885
2333
|
selectedAction?: string;
|
|
1886
2334
|
handoffOffered?: boolean;
|
|
2335
|
+
/** A persisted staff issue was confirmed for this turn. */
|
|
2336
|
+
issueRaised?: boolean;
|
|
1887
2337
|
/** Contact fields requested by final API metadata before handoff. */
|
|
1888
2338
|
requestedContactFields?: string[];
|
|
1889
2339
|
/** Assistant message awaiting its first token (shows the typing dots). */
|
|
@@ -1892,6 +2342,8 @@ interface ChatMessage {
|
|
|
1892
2342
|
streaming?: boolean;
|
|
1893
2343
|
/** Something went wrong producing this turn. */
|
|
1894
2344
|
error?: boolean;
|
|
2345
|
+
errorCode?: string;
|
|
2346
|
+
retryable?: boolean;
|
|
1895
2347
|
/** On an errored turn, the question to re-send when the visitor taps Retry. */
|
|
1896
2348
|
retryText?: string;
|
|
1897
2349
|
/** Visitor's 👍/👎 on this assistant reply (persisted so it survives reloads). */
|
|
@@ -1925,8 +2377,9 @@ interface BootstrapInfo {
|
|
|
1925
2377
|
greeting: string;
|
|
1926
2378
|
/** Public module selected on the token: classic chat or assistant card. */
|
|
1927
2379
|
widgetModule?: 'chat' | 'assistant';
|
|
1928
|
-
/**
|
|
2380
|
+
/** @deprecated Welcome media is retired; the assistant uses its avatar. */
|
|
1929
2381
|
assistantMediaUrl?: string;
|
|
2382
|
+
/** @deprecated Retained for compatibility; renderers ignore welcome media. */
|
|
1930
2383
|
assistantMediaKind?: 'image' | 'video';
|
|
1931
2384
|
assistantPrivacyUrl?: string;
|
|
1932
2385
|
/** Org-token default for widget sounds. Visitors can still mute locally. */
|
|
@@ -1991,4 +2444,4 @@ interface SchedulerInfo {
|
|
|
1991
2444
|
};
|
|
1992
2445
|
}
|
|
1993
2446
|
//#endregion
|
|
1994
|
-
export {
|
|
2447
|
+
export { WidgetStrings as A, ResultLabels as B, PublicChatActionField as C, VoiceAnswer as D, LiveVoiceTransport as E, ResultTable as F, AnalyticsExplanationInput as H, formatResultCell as I, serializeResultCsv as L, SDK_LANGUAGES as M, SdkLanguage as N, DEFAULT_STRINGS as O, AnalyticsResultDetail as P, WidgetAnalyticsChart as R, PublicChatAction as S, VoiceFormField as T, AnalyticsAIExplanationTransport as V, AnalyticsVisualization as _, MessageAttachment as a, ExplanationFeedbackInput as b, Visitor as c, WidgetHandle as d, WidgetLocaleUpdate as f, AnalyticsModelOption as g, ActionResult as h, FeaturedLink as i, mergeStrings as j, StringsProvider as k, WidgetActionTranslation as l, WidgetUser as m, ChatArtifact as n, SchedulerInfo as o, WidgetThemeTokens as p, ChatMessage as r, Source as s, BootstrapInfo as t, WidgetConfig as u, DemoBooking as v, Transport as w, GifResult as x, DemoSlotsResult as y, buildWidgetAnalyticsChartModel as z };
|