@accurix/centrinfo-widget 5.2.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 +231 -38
- 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 +154 -128
- 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 +128 -11
- package/dist/runtime.d.mts +122 -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-95uGbSpk.d.mts → types-M-juCXr7.d.mts} +558 -93
- package/dist/{types-DAYxNBhI.d.cts → types-sRV3p0Gu.d.cts} +549 -87
- package/package.json +4 -3
- package/dist/dev-transports-DqSPyIEz.mjs +0 -1
- package/dist/dev-transports-KlSdSZpj.cjs +0 -1
- package/dist/styles-CCw1cP6m.cjs +0 -3543
- package/dist/styles-CiqV_OsG.mjs +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
|
|
@@ -404,6 +691,7 @@ interface AnalyticsVisualizationColumn$1 {
|
|
|
404
691
|
groupable?: boolean;
|
|
405
692
|
}
|
|
406
693
|
interface AnalyticsVisualizationRecommendation$1 {
|
|
694
|
+
layout?: 'overlay' | 'panels' | 'overlap';
|
|
407
695
|
layers?: AnalyticsChartLayer[];
|
|
408
696
|
type: AnalyticsChartCatalogType | 'area' | 'stacked_bar';
|
|
409
697
|
mode: string;
|
|
@@ -484,6 +772,8 @@ interface AnalyticsVisualization$1 {
|
|
|
484
772
|
isMixed: boolean;
|
|
485
773
|
};
|
|
486
774
|
chartRecommendation?: AnalyticsVisualizationRecommendation$1;
|
|
775
|
+
/** Structured two-level ranking; see `parseRankedAnswer`. */
|
|
776
|
+
rankedAnswer?: unknown;
|
|
487
777
|
}
|
|
488
778
|
interface ResultColumn {
|
|
489
779
|
key: string;
|
|
@@ -513,6 +803,8 @@ interface AnalyticsChartLayer {
|
|
|
513
803
|
axis: 'y1' | 'y2';
|
|
514
804
|
}
|
|
515
805
|
interface AnalyticsComboModel {
|
|
806
|
+
layout?: 'overlay' | 'panels' | 'overlap';
|
|
807
|
+
horizontal?: boolean;
|
|
516
808
|
categories: string[];
|
|
517
809
|
categoryLabel: string;
|
|
518
810
|
series: Array<{
|
|
@@ -535,90 +827,6 @@ interface AnalyticsComboModel {
|
|
|
535
827
|
locale?: string;
|
|
536
828
|
}
|
|
537
829
|
//#endregion
|
|
538
|
-
//#region ../centrinfo-results/src/labels.d.ts
|
|
539
|
-
type AnalyticsExplanationCopy = Required<AnalyticsExplanationCopyOverrides>;
|
|
540
|
-
/** Every string the shared result renderer shows. Hosts override any subset. */
|
|
541
|
-
interface ResultLabels {
|
|
542
|
-
analysisUnavailable: string;
|
|
543
|
-
resultDetails: string;
|
|
544
|
-
liveMetric: string;
|
|
545
|
-
currentValue: string;
|
|
546
|
-
noMatchTitle: string;
|
|
547
|
-
noMatchBody: string;
|
|
548
|
-
chartType: string;
|
|
549
|
-
chooseChartType: string;
|
|
550
|
-
aggregate: string;
|
|
551
|
-
aggregateTitle: string;
|
|
552
|
-
aggregateCharge: string;
|
|
553
|
-
chartFallback: string;
|
|
554
|
-
chartLine: string;
|
|
555
|
-
chartArea: string;
|
|
556
|
-
chartCombo: string;
|
|
557
|
-
chartAreaHint: string;
|
|
558
|
-
chartComboHint: string;
|
|
559
|
-
chartBar: string;
|
|
560
|
-
chartStackedBar: string;
|
|
561
|
-
chartLineHint: string;
|
|
562
|
-
chartBarHint: string;
|
|
563
|
-
chartStackedBarHint: string;
|
|
564
|
-
aggregationSum: string;
|
|
565
|
-
aggregationAvg: string;
|
|
566
|
-
aggregationMin: string;
|
|
567
|
-
aggregationMax: string;
|
|
568
|
-
aggregationCount: string;
|
|
569
|
-
aggregationCountDistinct: string;
|
|
570
|
-
download: string;
|
|
571
|
-
downloadData: string;
|
|
572
|
-
expandTable: string;
|
|
573
|
-
expandChart: string;
|
|
574
|
-
restoreView: string;
|
|
575
|
-
aboutResult: string;
|
|
576
|
-
aboutPeriod: string;
|
|
577
|
-
aboutResults: string;
|
|
578
|
-
aboutChecked: string;
|
|
579
|
-
aboutTimezone: string;
|
|
580
|
-
aboutSourceData: string;
|
|
581
|
-
aboutFilters: string;
|
|
582
|
-
/** `{count}` placeholder. */
|
|
583
|
-
rowOne: string;
|
|
584
|
-
rowMany: string;
|
|
585
|
-
filtersOne: string;
|
|
586
|
-
filtersMany: string;
|
|
587
|
-
filtersApplied: string;
|
|
588
|
-
notSet: string;
|
|
589
|
-
noValue: string;
|
|
590
|
-
yes: string;
|
|
591
|
-
no: string;
|
|
592
|
-
chartValues: string;
|
|
593
|
-
/** `{measure}`, `{dimension}`. */
|
|
594
|
-
chartTitle: string;
|
|
595
|
-
seriesLimited: string;
|
|
596
|
-
partialChart: string;
|
|
597
|
-
summaryLatest: string;
|
|
598
|
-
summaryNoTrend: string;
|
|
599
|
-
summaryHighest: string;
|
|
600
|
-
summaryNoComparison: string;
|
|
601
|
-
zoomControls: string;
|
|
602
|
-
zoomIn: string;
|
|
603
|
-
zoomOut: string;
|
|
604
|
-
zoomReset: string;
|
|
605
|
-
zoomResetShort: string;
|
|
606
|
-
zoomNone: string;
|
|
607
|
-
zoomAllOne: string;
|
|
608
|
-
zoomAllMany: string;
|
|
609
|
-
zoomRange: string;
|
|
610
|
-
inProgress: string;
|
|
611
|
-
newContent: string;
|
|
612
|
-
updatedAt: string;
|
|
613
|
-
liveData: string;
|
|
614
|
-
viewData: string;
|
|
615
|
-
hideData: string;
|
|
616
|
-
inProgressLegend: string;
|
|
617
|
-
/** Overrides for the explanation panel copy. */
|
|
618
|
-
explanation?: Partial<AnalyticsExplanationCopy>;
|
|
619
|
-
governedResult: string;
|
|
620
|
-
}
|
|
621
|
-
//#endregion
|
|
622
830
|
//#region ../centrinfo-results/src/chart.d.ts
|
|
623
831
|
type WidgetAnalyticsSeries = {
|
|
624
832
|
field: string;
|
|
@@ -664,7 +872,7 @@ declare const WidgetAnalyticsChart: ({
|
|
|
664
872
|
expanded?: boolean;
|
|
665
873
|
/** Class prefix of the surface (`cf` widget, `ca` chat app). */
|
|
666
874
|
classPrefix?: string;
|
|
667
|
-
}) =>
|
|
875
|
+
}) => preact3.JSX.Element;
|
|
668
876
|
//#endregion
|
|
669
877
|
//#region ../centrinfo-results/src/result.d.ts
|
|
670
878
|
declare const formatResultCell: (value: unknown, locale?: string, column?: ResultColumn, context?: ResultFormatContext) => string;
|
|
@@ -681,6 +889,8 @@ interface ResultTableProps {
|
|
|
681
889
|
expanded?: boolean;
|
|
682
890
|
classNames?: ResultTableClassNames;
|
|
683
891
|
emptyLabel?: string;
|
|
892
|
+
/** Any subset of the result labels; English fills the rest. */
|
|
893
|
+
labels?: Partial<ResultLabels>;
|
|
684
894
|
}
|
|
685
895
|
declare const ResultTable: ({
|
|
686
896
|
rows,
|
|
@@ -690,8 +900,9 @@ declare const ResultTable: ({
|
|
|
690
900
|
format,
|
|
691
901
|
expanded,
|
|
692
902
|
classNames,
|
|
693
|
-
emptyLabel
|
|
694
|
-
|
|
903
|
+
emptyLabel,
|
|
904
|
+
labels: labelOverrides
|
|
905
|
+
}: ResultTableProps) => preact3.JSX.Element;
|
|
695
906
|
//#endregion
|
|
696
907
|
//#region ../centrinfo-results/src/result-details.d.ts
|
|
697
908
|
interface AnalyticsResultDetail {
|
|
@@ -699,6 +910,24 @@ interface AnalyticsResultDetail {
|
|
|
699
910
|
value: string;
|
|
700
911
|
}
|
|
701
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
|
|
702
931
|
//#region src/i18n.d.ts
|
|
703
932
|
/**
|
|
704
933
|
* Every user-visible chrome string in one place. The widget ships English
|
|
@@ -767,6 +996,8 @@ interface WidgetStrings {
|
|
|
767
996
|
exitExpandedView: string;
|
|
768
997
|
minimizeVoiceChat: string;
|
|
769
998
|
endVoiceChat: string;
|
|
999
|
+
/** Start-call button; `{name}` is the agent's name. Hosts can override. */
|
|
1000
|
+
speakWithAgent: string;
|
|
770
1001
|
restoreVoiceChat: string;
|
|
771
1002
|
reopenVoiceChat: string;
|
|
772
1003
|
voiceConnecting: string;
|
|
@@ -778,6 +1009,28 @@ interface WidgetStrings {
|
|
|
778
1009
|
voiceNoise: string;
|
|
779
1010
|
voiceMisunderstood: string;
|
|
780
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;
|
|
781
1034
|
composerPlaceholder: string;
|
|
782
1035
|
send: string;
|
|
783
1036
|
emoji: string;
|
|
@@ -827,6 +1080,13 @@ interface WidgetStrings {
|
|
|
827
1080
|
emptyReply: string;
|
|
828
1081
|
errorGeneric: string;
|
|
829
1082
|
errorRateLimit: string;
|
|
1083
|
+
errorTimeout?: string;
|
|
1084
|
+
errorUnavailable?: string;
|
|
1085
|
+
errorAccess?: string;
|
|
1086
|
+
errorAnalysis?: string;
|
|
1087
|
+
errorAnalyticsSetup?: string;
|
|
1088
|
+
errorCredits?: string;
|
|
1089
|
+
errorSubscription?: string;
|
|
830
1090
|
/** Shown in place of an analytics result that is not kept in local storage. */
|
|
831
1091
|
resultExpired: string;
|
|
832
1092
|
attaching: string;
|
|
@@ -859,6 +1119,17 @@ interface WidgetStrings {
|
|
|
859
1119
|
/** Generic action-form success fallback + error. */
|
|
860
1120
|
formThanks: string;
|
|
861
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;
|
|
862
1133
|
/** Case number appended to a confirmation. `{reference}` is the case number. */
|
|
863
1134
|
caseReference: string;
|
|
864
1135
|
/** Public action drawer chrome. Action-specific copy remains descriptor data. */
|
|
@@ -915,12 +1186,121 @@ interface WidgetStrings {
|
|
|
915
1186
|
bookingCheckingDetails: string;
|
|
916
1187
|
bookingDetailsUnavailable: string;
|
|
917
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;
|
|
918
1260
|
/** Preview mode (data-preview): canned reply, action note, top banner. */
|
|
919
1261
|
previewReply: string;
|
|
920
1262
|
previewActionNote: string;
|
|
921
1263
|
previewBanner: string;
|
|
922
1264
|
}
|
|
923
|
-
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>;
|
|
924
1304
|
//#endregion
|
|
925
1305
|
//#region src/api/types.d.ts
|
|
926
1306
|
/** The result metadata that arrives with (or after) an answer. */
|
|
@@ -977,11 +1357,36 @@ interface LiveAudioSegment {
|
|
|
977
1357
|
/** The piece as spoken (no links or markdown). */
|
|
978
1358
|
text?: string;
|
|
979
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
|
+
}
|
|
980
1383
|
interface TurnResult {
|
|
981
1384
|
answerResult?: CentrinfoAnswer<AnalyticsVisualization, Source, ChatArtifact>;
|
|
982
1385
|
/** True when the reply was spoken in live pieces (onAudioSegment). */
|
|
983
1386
|
liveAudio?: boolean;
|
|
984
1387
|
answer: string;
|
|
1388
|
+
errorCode?: string;
|
|
1389
|
+
retryable?: boolean;
|
|
985
1390
|
sources: Source[];
|
|
986
1391
|
suggestedReplies: string[];
|
|
987
1392
|
/** Legacy: raw tool ids. Prefer `actions`. */
|
|
@@ -991,10 +1396,15 @@ interface TurnResult {
|
|
|
991
1396
|
/** Action the backend resolved for this turn — open its form directly. */
|
|
992
1397
|
selectedAction?: string;
|
|
993
1398
|
handoffOffered: boolean;
|
|
1399
|
+
/** True only after the backend confirms an issue was saved. */
|
|
1400
|
+
issueRaised?: boolean;
|
|
994
1401
|
/** Contact fields the backend wants inline before handoff, e.g. ["email"]. */
|
|
995
1402
|
requestedContactFields?: string[];
|
|
996
1403
|
/** True when the backend closed the session (visitor ended it, or 24h idle). */
|
|
997
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;
|
|
998
1408
|
/** Current live handoff state for the session. */
|
|
999
1409
|
liveMode?: 'ai' | 'queued' | 'human';
|
|
1000
1410
|
/** Human currently assigned to the chat, when liveMode is human. */
|
|
@@ -1266,6 +1676,8 @@ interface AnalyticsVisualization {
|
|
|
1266
1676
|
isMixed: boolean;
|
|
1267
1677
|
};
|
|
1268
1678
|
chartRecommendation?: AnalyticsVisualizationRecommendation;
|
|
1679
|
+
/** Structured two-level ranking (validated by `parseRankedAnswer`). */
|
|
1680
|
+
rankedAnswer?: unknown;
|
|
1269
1681
|
analysis?: AnalyticsVisualizationAnalysis;
|
|
1270
1682
|
businessAnalysis?: AnalyticsVisualizationBusinessAnalysis;
|
|
1271
1683
|
analysisIntent?: AnalyticsVisualizationAnalysisIntent;
|
|
@@ -1320,6 +1732,7 @@ interface AuthenticatedHistoryMessage {
|
|
|
1320
1732
|
visualization?: AnalyticsVisualization;
|
|
1321
1733
|
artifacts?: ChatArtifact[];
|
|
1322
1734
|
createdAt: string;
|
|
1735
|
+
expiresAt?: string;
|
|
1323
1736
|
}
|
|
1324
1737
|
interface AuthenticatedHistoryConversation {
|
|
1325
1738
|
sessionId: string;
|
|
@@ -1333,6 +1746,7 @@ interface AuthenticatedHistoryResult {
|
|
|
1333
1746
|
conversations: AuthenticatedHistoryConversation[];
|
|
1334
1747
|
}
|
|
1335
1748
|
interface StreamCallbacks {
|
|
1749
|
+
voiceFormEntry?: boolean;
|
|
1336
1750
|
analyticsModelId?: string;
|
|
1337
1751
|
/** Called with each incremental text chunk. */
|
|
1338
1752
|
onChunk: (text: string) => void;
|
|
@@ -1346,15 +1760,23 @@ interface StreamCallbacks {
|
|
|
1346
1760
|
signal?: AbortSignal;
|
|
1347
1761
|
/** True only for turns sent from the active Speak-with-AI call. */
|
|
1348
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;
|
|
1349
1768
|
/** Stable id of the visitor's message. A retry sends the same id, so the
|
|
1350
1769
|
* backend answers and bills the turn once. */
|
|
1351
1770
|
clientMessageId?: string;
|
|
1771
|
+
retryOfMessageId?: string;
|
|
1352
1772
|
attachmentId?: string;
|
|
1353
1773
|
/** Every stored file sent with this message. */
|
|
1354
1774
|
attachmentIds?: string[];
|
|
1355
1775
|
}
|
|
1356
1776
|
interface ActionResult {
|
|
1357
1777
|
ok: boolean;
|
|
1778
|
+
/** True only after a staff issue or handoff inquiry was saved. */
|
|
1779
|
+
issueRaised?: boolean;
|
|
1358
1780
|
note?: string;
|
|
1359
1781
|
/** Saved conversation message for this completed action. */
|
|
1360
1782
|
receipt?: {
|
|
@@ -1463,6 +1885,12 @@ interface GifResult {
|
|
|
1463
1885
|
* backend (`ApiClient`) or the in-memory demo (`MockTransport`).
|
|
1464
1886
|
*/
|
|
1465
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>;
|
|
1466
1894
|
analyticsModels?(): Promise<AnalyticsModelOption[]>;
|
|
1467
1895
|
bootstrap(): Promise<BootstrapInfo>;
|
|
1468
1896
|
/** Server-backed history for the verified SDK customer. Anonymous returns empty. */
|
|
@@ -1576,6 +2004,10 @@ interface WidgetConfig {
|
|
|
1576
2004
|
getIdentityToken?: () => string | Promise<string>;
|
|
1577
2005
|
/** API origin. Defaults to the production Centrinfo API. */
|
|
1578
2006
|
apiBaseUrl?: string;
|
|
2007
|
+
/** Dashboard origin serving the shared analytics screen, including dedicated Enterprise deployments. */
|
|
2008
|
+
workspaceUrl?: string;
|
|
2009
|
+
/** Keep analytics rendering local during a controlled rollout or for a disconnected installation. */
|
|
2010
|
+
analyticsRenderer?: 'hosted' | 'local';
|
|
1579
2011
|
/** Brand accent (any CSS color). Overrides the persona/default green. */
|
|
1580
2012
|
accentColor?: string;
|
|
1581
2013
|
/**
|
|
@@ -1609,8 +2041,20 @@ interface WidgetConfig {
|
|
|
1609
2041
|
* chat answers themselves are already multilingual server-side.
|
|
1610
2042
|
*/
|
|
1611
2043
|
labels?: Partial<WidgetStrings>;
|
|
1612
|
-
/**
|
|
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
|
+
*/
|
|
1613
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;
|
|
1614
2058
|
/**
|
|
1615
2059
|
* Text direction. `auto` (default) follows the locale: Arabic, Hebrew,
|
|
1616
2060
|
* Persian, Urdu and similar scripts render right-to-left.
|
|
@@ -1819,8 +2263,19 @@ interface WidgetHandle {
|
|
|
1819
2263
|
*/
|
|
1820
2264
|
shutdown: () => void;
|
|
1821
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>;
|
|
1822
2271
|
destroy: () => void;
|
|
1823
2272
|
}
|
|
2273
|
+
/** Runtime language change for `handle.setLocale`. */
|
|
2274
|
+
interface WidgetLocaleUpdate {
|
|
2275
|
+
locale?: string;
|
|
2276
|
+
strings?: Partial<WidgetStrings>;
|
|
2277
|
+
dir?: 'ltr' | 'rtl' | 'auto';
|
|
2278
|
+
}
|
|
1824
2279
|
/** A rendered chat message. */
|
|
1825
2280
|
interface ChatArtifact {
|
|
1826
2281
|
type: 'image' | 'video' | 'resource_link' | 'visualization';
|
|
@@ -1843,6 +2298,9 @@ interface MessageAttachment {
|
|
|
1843
2298
|
}
|
|
1844
2299
|
interface ChatMessage {
|
|
1845
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;
|
|
1846
2304
|
role: 'user' | 'assistant' | 'system';
|
|
1847
2305
|
content: string;
|
|
1848
2306
|
/** Human name for live agent replies or system join/leave events. */
|
|
@@ -1853,8 +2311,10 @@ interface ChatMessage {
|
|
|
1853
2311
|
offerReconnect?: boolean;
|
|
1854
2312
|
/** Local assistant message opened by "Reconnect to support". */
|
|
1855
2313
|
reconnectOffer?: boolean;
|
|
1856
|
-
/**
|
|
2314
|
+
/** Original message time used for transcript retention. */
|
|
1857
2315
|
createdAt?: string;
|
|
2316
|
+
/** Original retention deadline; cache writes must not renew it. */
|
|
2317
|
+
expiresAt?: string;
|
|
1858
2318
|
/** Inline image (e.g. a GIF the visitor sent). Rendered in the bubble. */
|
|
1859
2319
|
imageUrl?: string;
|
|
1860
2320
|
/** Name of a file the visitor attached (rendered as a chip on their bubble). */
|
|
@@ -1872,6 +2332,8 @@ interface ChatMessage {
|
|
|
1872
2332
|
/** Action the backend resolved for this turn — its form opens directly. */
|
|
1873
2333
|
selectedAction?: string;
|
|
1874
2334
|
handoffOffered?: boolean;
|
|
2335
|
+
/** A persisted staff issue was confirmed for this turn. */
|
|
2336
|
+
issueRaised?: boolean;
|
|
1875
2337
|
/** Contact fields requested by final API metadata before handoff. */
|
|
1876
2338
|
requestedContactFields?: string[];
|
|
1877
2339
|
/** Assistant message awaiting its first token (shows the typing dots). */
|
|
@@ -1880,6 +2342,8 @@ interface ChatMessage {
|
|
|
1880
2342
|
streaming?: boolean;
|
|
1881
2343
|
/** Something went wrong producing this turn. */
|
|
1882
2344
|
error?: boolean;
|
|
2345
|
+
errorCode?: string;
|
|
2346
|
+
retryable?: boolean;
|
|
1883
2347
|
/** On an errored turn, the question to re-send when the visitor taps Retry. */
|
|
1884
2348
|
retryText?: string;
|
|
1885
2349
|
/** Visitor's 👍/👎 on this assistant reply (persisted so it survives reloads). */
|
|
@@ -1913,8 +2377,9 @@ interface BootstrapInfo {
|
|
|
1913
2377
|
greeting: string;
|
|
1914
2378
|
/** Public module selected on the token: classic chat or assistant card. */
|
|
1915
2379
|
widgetModule?: 'chat' | 'assistant';
|
|
1916
|
-
/**
|
|
2380
|
+
/** @deprecated Welcome media is retired; the assistant uses its avatar. */
|
|
1917
2381
|
assistantMediaUrl?: string;
|
|
2382
|
+
/** @deprecated Retained for compatibility; renderers ignore welcome media. */
|
|
1918
2383
|
assistantMediaKind?: 'image' | 'video';
|
|
1919
2384
|
assistantPrivacyUrl?: string;
|
|
1920
2385
|
/** Org-token default for widget sounds. Visitors can still mute locally. */
|
|
@@ -1979,4 +2444,4 @@ interface SchedulerInfo {
|
|
|
1979
2444
|
};
|
|
1980
2445
|
}
|
|
1981
2446
|
//#endregion
|
|
1982
|
-
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 };
|