@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.
Files changed (49) hide show
  1. package/README.md +229 -37
  2. package/dist/bundle-ar-D_Sk4igF.mjs +1 -0
  3. package/dist/bundle-ar-fKjs-fvS.cjs +1 -0
  4. package/dist/bundle-de-BST4qEm1.cjs +1 -0
  5. package/dist/bundle-de-BWnVOyv0.mjs +1 -0
  6. package/dist/bundle-es-Bes8ddxv.mjs +1 -0
  7. package/dist/bundle-es-Bfphsx9c.cjs +1 -0
  8. package/dist/bundle-fr-D1QlfFID.mjs +1 -0
  9. package/dist/bundle-fr-X5Ian15d.cjs +1 -0
  10. package/dist/bundle-it-9j6g91Cu.mjs +1 -0
  11. package/dist/bundle-it-C2HPnGql.cjs +1 -0
  12. package/dist/bundle-pt-BK9LBxix.mjs +1 -0
  13. package/dist/bundle-pt-BMcCSSgB.cjs +1 -0
  14. package/dist/bundle-sw-BKWnwk-0.cjs +1 -0
  15. package/dist/bundle-sw-DA2XuFS_.mjs +1 -0
  16. package/dist/cdn/centrinfo-widget-dev.js +35 -23
  17. package/dist/cdn/centrinfo-widget-locale-ar.js +4 -0
  18. package/dist/cdn/centrinfo-widget-locale-de.js +4 -0
  19. package/dist/cdn/centrinfo-widget-locale-es.js +4 -0
  20. package/dist/cdn/centrinfo-widget-locale-fr.js +4 -0
  21. package/dist/cdn/centrinfo-widget-locale-it.js +4 -0
  22. package/dist/cdn/centrinfo-widget-locale-pt.js +4 -0
  23. package/dist/cdn/centrinfo-widget-locale-sw.js +4 -0
  24. package/dist/cdn/centrinfo-widget-voice.js +272 -0
  25. package/dist/cdn/centrinfo-widget.js +171 -145
  26. package/dist/cdn/manifest.json +57 -9
  27. package/dist/dev-transports-DP4ilDW1.mjs +13 -0
  28. package/dist/dev-transports-uGHAao9W.cjs +13 -0
  29. package/dist/index.cjs +2 -1
  30. package/dist/index.d.cts +2 -2
  31. package/dist/index.d.mts +2 -2
  32. package/dist/index.d.ts +2 -2
  33. package/dist/index.mjs +2 -1
  34. package/dist/runtime.cjs +2 -2
  35. package/dist/runtime.d.cts +126 -11
  36. package/dist/runtime.d.mts +120 -8
  37. package/dist/runtime.d.ts +479 -0
  38. package/dist/runtime.mjs +2 -2
  39. package/dist/speech-detector-runtime-D5GpV8VJ.cjs +68 -0
  40. package/dist/speech-detector-runtime-D7gguFpP.mjs +68 -0
  41. package/dist/styles-BWPJrttg.cjs +3563 -0
  42. package/dist/styles-C8MXPiR-.mjs +3563 -0
  43. package/dist/{types-CSrYnsOp.d.mts → types-M-juCXr7.d.mts} +551 -98
  44. package/dist/{types-eBuee08Q.d.cts → types-sRV3p0Gu.d.cts} +542 -92
  45. package/package.json +4 -3
  46. package/dist/dev-transports-DqSPyIEz.mjs +0 -1
  47. package/dist/dev-transports-KlSdSZpj.cjs +0 -1
  48. package/dist/styles-BUK2S5l_.mjs +0 -3543
  49. package/dist/styles-BVQRcZkH.cjs +0 -3543
@@ -18,6 +18,19 @@ interface CentrinfoAnswer<Visualization = unknown, Source$1 = unknown, Artifact
18
18
  //#endregion
19
19
  //#region ../centrinfo-results/src/analytics-chart-catalog.d.ts
20
20
  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';
21
+ 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';
22
+ type AnalyticsChartReleaseKey = `${AnalyticsChartCatalogType}:${AnalyticsChartCatalogMode}`;
23
+ type AnalyticsChartAvailability = 'ready' | 'adapter_required' | 'component' | 'extension_required' | 'engine_upgrade';
24
+ type AnalyticsChartCatalogItem = {
25
+ type: AnalyticsChartCatalogType;
26
+ mode: AnalyticsChartCatalogMode;
27
+ label: string;
28
+ description: string;
29
+ defaultReleased?: boolean;
30
+ availability?: AnalyticsChartAvailability;
31
+ requirement?: string;
32
+ };
33
+ type AnalyticsChartCatalogCopy = Partial<Record<AnalyticsChartReleaseKey, Partial<Pick<AnalyticsChartCatalogItem, 'label' | 'description' | 'requirement'>>>>;
21
34
  //#endregion
22
35
  //#region ../centrinfo-results/src/analytics-explanation.d.ts
23
36
  /**
@@ -176,6 +189,18 @@ interface AnalyticsExplanationInput {
176
189
  }>;
177
190
  /** Governed facts the AI wording did not cover, added beside it. */
178
191
  supplementaryFindings?: string[];
192
+ /**
193
+ * Tied highest / lowest groups, presented by the product from the evidence
194
+ * (the AI wording may not state them). Labels are data, shown as given.
195
+ */
196
+ ties?: AnalyticsExplanationTieInput[];
197
+ }
198
+ interface AnalyticsExplanationTieInput {
199
+ evidenceId?: string;
200
+ /** "leader" (tied for highest) or "lowest" (tied for lowest). */
201
+ position?: string;
202
+ labels?: string[];
203
+ value?: number;
179
204
  }
180
205
  /**
181
206
  * State of the detailed AI explanation, as returned by every surface. The
@@ -251,6 +276,9 @@ declare const ANALYTICS_EXPLANATION_COPY: {
251
276
  readonly driversHint: "Measured association, not proof of cause";
252
277
  readonly anomalies: "Unusual values";
253
278
  readonly supplementaryFindings: "Also in the data";
279
+ readonly ties: "Tied results";
280
+ readonly tiedHighest: "Tied for highest";
281
+ readonly tiedLowest: "Tied for lowest";
254
282
  readonly frameworks: "General guidance, not from your data";
255
283
  readonly dataGaps: "Missing data";
256
284
  readonly segment: "Segment:";
@@ -262,6 +290,99 @@ declare const ANALYTICS_EXPLANATION_COPY: {
262
290
  readonly reasonMissingComparison: "Missing comparison";
263
291
  readonly reasonUnclear: "Unclear";
264
292
  readonly reasonTooLong: "Too long";
293
+ /** Investigation task list heading; `{label}` is `tasks`. */
294
+ readonly tasksProgress: "{label} ({done} of {total})";
295
+ readonly taskPlanned: "Planned";
296
+ readonly taskRunning: "Running";
297
+ readonly taskDone: "Done";
298
+ readonly taskFailed: "Failed";
299
+ readonly taskSkipped: "Skipped";
300
+ /** Value-status chips. */
301
+ readonly statusConfirmedZero: "confirmed 0";
302
+ readonly statusNoRecords: "no records yet";
303
+ readonly statusMissing: "missing";
304
+ readonly statusObserved: "observed";
305
+ readonly forecastLow: "Low-confidence forecast";
306
+ readonly forecastDirectional: "Directional forecast";
307
+ readonly forecastValidated: "Validated forecast";
308
+ readonly forecastEstimate: "Forecast estimate";
309
+ readonly checkedTimesIn: "Times in {timezone}";
310
+ readonly checkedAt: "Checked {time}";
311
+ readonly periodRange: "{start} – {end} (end not included)";
312
+ readonly periodFrom: "From {start}";
313
+ readonly periodBefore: "Before {end}";
314
+ /** Query-run freshness. */
315
+ readonly liveData: "Live data";
316
+ readonly updatedAt: "Updated {time}";
317
+ /** Source-data freshness. */
318
+ readonly freshnessUpdated: "Updated";
319
+ readonly freshnessUnknown: "Source freshness is unavailable.";
320
+ readonly freshnessFresh: "Fresh";
321
+ readonly freshnessCurrent: "Source data is current.";
322
+ readonly freshnessNoData: "No source data";
323
+ readonly freshnessNoDataBody: "No source data is available for this period or an earlier period.";
324
+ readonly freshnessChecked: "Checked {date}";
325
+ readonly freshnessLatestRecord: "Latest record";
326
+ readonly freshnessLatestRecordOn: "Latest record {date}";
327
+ readonly freshnessLatestBody: "Latest matching record: {date}. An older record alone does not prove a source delay.";
328
+ readonly freshnessLatestUnknownBody: "Latest matching record date is unavailable. An older record alone does not prove a source delay.";
329
+ /** Period comparison. */
330
+ readonly currentPeriod: "Current period";
331
+ readonly previousPeriod: "Previous period";
332
+ readonly periodNoRecords: "{period}: no records yet";
333
+ readonly noChangeFromZero: "No change (0)";
334
+ readonly upFromZero: "Up from 0";
335
+ readonly downFromZero: "Down from 0";
336
+ readonly notComparableShort: "Not comparable";
337
+ readonly comparePointDay: "vs yesterday at this time";
338
+ readonly comparePointWeek: "vs same point last week";
339
+ readonly comparePointMonth: "vs same point last month";
340
+ readonly comparePointQuarter: "vs same point last quarter";
341
+ readonly comparePointYear: "vs same point last year";
342
+ readonly comparePointPeriod: "vs same point last period";
343
+ readonly previousPointDay: "Yesterday at this time";
344
+ readonly previousPointWeek: "Same point last week";
345
+ readonly previousPointMonth: "Same point last month";
346
+ readonly previousPointQuarter: "Same point last quarter";
347
+ readonly previousPointYear: "Same point last year";
348
+ readonly previousPointPeriod: "Same point last period";
349
+ readonly fullDay: "full day";
350
+ readonly fullWeek: "full week";
351
+ readonly fullMonth: "full month";
352
+ readonly fullQuarter: "full quarter";
353
+ readonly fullYear: "full year";
354
+ readonly fullPeriod: "full period";
355
+ readonly fullDayTitle: "Full day";
356
+ readonly fullWeekTitle: "Full week";
357
+ readonly fullMonthTitle: "Full month";
358
+ readonly fullQuarterTitle: "Full quarter";
359
+ readonly fullYearTitle: "Full year";
360
+ readonly fullPeriodTitle: "Full period";
361
+ readonly cutoffDay: "Compared up to {time} on both days";
362
+ readonly cutoffWeek: "Compared up to {time} in both weeks";
363
+ readonly cutoffMonth: "Compared up to {time} in both months";
364
+ readonly cutoffQuarter: "Compared up to {time} in both quarters";
365
+ readonly cutoffYear: "Compared up to {time} in both years";
366
+ readonly cutoffPeriod: "Compared up to {time} in both periods";
367
+ readonly cutoffLatestRecord: "{cutoff}, the time of the latest record";
368
+ readonly previousFullLine: "{period} {full}: {value}";
369
+ readonly compactFullLine: "{full}: {value}";
370
+ readonly periodSoFar: "{period} so far: {value}";
371
+ readonly periodInProgress: "{period}: in progress";
372
+ readonly previousFullValue: "{period}: {value} ({full})";
373
+ readonly groupNoteLikeForLike: "{period} so far, compared with {previous}";
374
+ readonly groupNoteFull: "{period} so far; the previous period is shown in full, so the bars are not like for like";
375
+ readonly previousToDate: "Previous to date";
376
+ /** Limits derived from value statuses. */
377
+ readonly limitInProgress: "{period} is still in progress, so its total can still change.";
378
+ readonly limitNoRecords: "{period} has no records yet. This is not a confirmed 0.";
379
+ readonly limitNoRecordsReason: "{period} has no records yet. This is not a confirmed 0: {reason}.";
380
+ readonly limitMissing: "{period} is missing.";
381
+ readonly limitMissingReason: "{period} is missing: {reason}.";
382
+ readonly limitCurrentInProgress: "The current period is still in progress, so its total can still change.";
383
+ readonly missingStatement: "{label} could not be established: {reason}";
384
+ readonly today: "Today";
385
+ readonly yesterday: "Yesterday";
265
386
  };
266
387
  /** The explanation panel's copy with a host's overrides on top. */
267
388
  type AnalyticsExplanationCopyOverrides = Partial<{ -readonly [K in keyof typeof ANALYTICS_EXPLANATION_COPY]: string }>;
@@ -355,6 +476,170 @@ interface AnalyticsAIExplanationTransport<E extends AnalyticsExplanationInput> {
355
476
  settled?: (explanationId: string, status: 'ready' | 'failed' | 'not_requested', explanation?: E) => void;
356
477
  }
357
478
  //#endregion
479
+ //#region ../centrinfo-results/src/labels.d.ts
480
+ type AnalyticsExplanationCopy = Required<AnalyticsExplanationCopyOverrides>;
481
+ /** Every string the shared result renderer shows. Hosts override any subset. */
482
+ interface ResultLabels {
483
+ analysisUnavailable: string;
484
+ resultDetails: string;
485
+ liveMetric: string;
486
+ currentValue: string;
487
+ noMatchTitle: string;
488
+ noMatchBody: string;
489
+ chartType: string;
490
+ chooseChartType: string;
491
+ aggregate: string;
492
+ aggregateTitle: string;
493
+ aggregateCharge: string;
494
+ chartFallback: string;
495
+ chartLine: string;
496
+ chartArea: string;
497
+ chartCombo: string;
498
+ chartAreaHint: string;
499
+ chartComboHint: string;
500
+ chartBar: string;
501
+ chartStackedBar: string;
502
+ chartLineHint: string;
503
+ chartBarHint: string;
504
+ chartStackedBarHint: string;
505
+ aggregationSum: string;
506
+ aggregationAvg: string;
507
+ aggregationMin: string;
508
+ aggregationMax: string;
509
+ aggregationCount: string;
510
+ aggregationCountDistinct: string;
511
+ download: string;
512
+ downloadData: string;
513
+ expandTable: string;
514
+ /** Heading of the rank column in a ranked answer table. */
515
+ rankColumn: string;
516
+ expandChart: string;
517
+ restoreView: string;
518
+ aboutResult: string;
519
+ aboutPeriod: string;
520
+ aboutResults: string;
521
+ aboutChecked: string;
522
+ aboutTimezone: string;
523
+ aboutSourceData: string;
524
+ aboutFilters: string;
525
+ /** `{count}` placeholder. */
526
+ rowOne: string;
527
+ rowMany: string;
528
+ filtersOne: string;
529
+ filtersMany: string;
530
+ filtersApplied: string;
531
+ notSet: string;
532
+ noValue: string;
533
+ yes: string;
534
+ no: string;
535
+ other: string;
536
+ unknown: string;
537
+ rowLabel: string;
538
+ chartCategory: string;
539
+ chartActivity: string;
540
+ chartTarget: string;
541
+ mapApproximateLocation: string;
542
+ mapApproximateDescription: string;
543
+ previousChart: string;
544
+ aggregationQuestion: string;
545
+ chartCatalog?: AnalyticsChartCatalogCopy;
546
+ viewerMessages?: Record<string, Record<string, string>>;
547
+ chartValues: string;
548
+ /** `{measure}`, `{dimension}`. */
549
+ chartTitle: string;
550
+ viewerTitle: string;
551
+ viewerUnavailable: string;
552
+ retryViewer: string;
553
+ viewerUpdateAvailable: string;
554
+ updateViewer: string;
555
+ seriesLimited: string;
556
+ partialChart: string;
557
+ summaryLatest: string;
558
+ summaryNoTrend: string;
559
+ summaryHighest: string;
560
+ summaryNoComparison: string;
561
+ zoomControls: string;
562
+ zoomIn: string;
563
+ zoomOut: string;
564
+ zoomReset: string;
565
+ zoomResetShort: string;
566
+ zoomNone: string;
567
+ zoomAllOne: string;
568
+ zoomAllMany: string;
569
+ zoomRange: string;
570
+ inProgress: string;
571
+ newContent: string;
572
+ updatedAt: string;
573
+ liveData: string;
574
+ viewData: string;
575
+ hideData: string;
576
+ inProgressLegend: string;
577
+ /** Overrides for the explanation panel copy. */
578
+ explanation?: Partial<AnalyticsExplanationCopy>;
579
+ governedResult: string;
580
+ /** Source-data freshness values in "About this result". */
581
+ /** Quarter axis/cell label; `{quarter}` 1–4, `{year}`. */
582
+ quarterLabel: string;
583
+ sourceCurrent: string;
584
+ sourceDelayed: string;
585
+ sourceNoData: string;
586
+ comboDescription: string;
587
+ comboSeriesLeft: string;
588
+ comboSeriesRight: string;
589
+ comboOmitted: string;
590
+ tableEmpty: string;
591
+ tableCaptionOne: string;
592
+ tableCaptionMany: string;
593
+ tableShowing: string;
594
+ tableFields: string;
595
+ tableSearch: string;
596
+ tableSearchPlaceholder: string;
597
+ tableDisplayMode: string;
598
+ tableModeTable: string;
599
+ tableModeMatrix: string;
600
+ tableColumns: string;
601
+ tableMoveLeft: string;
602
+ tableMoveRight: string;
603
+ tableComfortableRows: string;
604
+ tableCompactRows: string;
605
+ tableResetView: string;
606
+ tableClearFilter: string;
607
+ tableScrollable: string;
608
+ tableSelectAll: string;
609
+ tableSortBy: string;
610
+ tableColumnActions: string;
611
+ tableSortAscending: string;
612
+ tableSortDescending: string;
613
+ tableFilterValues: string;
614
+ tableFilterOperator: string;
615
+ tableOpContains: string;
616
+ tableOpEquals: string;
617
+ tableOpNotEquals: string;
618
+ tableOpGt: string;
619
+ tableOpGte: string;
620
+ tableOpLt: string;
621
+ tableOpLte: string;
622
+ tableFilterValue: string;
623
+ tableFilterPlaceholder: string;
624
+ tableApplyFilter: string;
625
+ tablePinColumn: string;
626
+ tableUnpinColumn: string;
627
+ tableWrapText: string;
628
+ tableNoWrapText: string;
629
+ tableDisplayName: string;
630
+ tableApplyDisplayName: string;
631
+ tableSelectRow: string;
632
+ tablePageRange: string;
633
+ tablePageEmpty: string;
634
+ tablePagination: string;
635
+ tableRows: string;
636
+ tableRowsPerPage: string;
637
+ tablePreviousPage: string;
638
+ tableNextPage: string;
639
+ tableFirstRows: string;
640
+ tableAllRows: string;
641
+ }
642
+ //#endregion
358
643
  //#region ../centrinfo-results/src/format.d.ts
359
644
  /**
360
645
  * The one place numbers, currency, percentages and dates are formatted, so the
@@ -381,6 +666,8 @@ interface ResultFormatContext {
381
666
  currencyCode?: string;
382
667
  yes?: string;
383
668
  no?: string;
669
+ /** Quarter label template, `{quarter}` and `{year}` (default `Q{quarter} {year}`). */
670
+ quarter?: string;
384
671
  }
385
672
  //#endregion
386
673
  //#region ../centrinfo-results/src/types.d.ts
@@ -484,6 +771,8 @@ interface AnalyticsVisualization$1 {
484
771
  isMixed: boolean;
485
772
  };
486
773
  chartRecommendation?: AnalyticsVisualizationRecommendation$1;
774
+ /** Structured two-level ranking; see `parseRankedAnswer`. */
775
+ rankedAnswer?: unknown;
487
776
  }
488
777
  interface ResultColumn {
489
778
  key: string;
@@ -537,94 +826,23 @@ interface AnalyticsComboModel {
537
826
  locale?: string;
538
827
  }
539
828
  //#endregion
540
- //#region ../centrinfo-results/src/labels.d.ts
541
- type AnalyticsExplanationCopy = Required<AnalyticsExplanationCopyOverrides>;
542
- /** Every string the shared result renderer shows. Hosts override any subset. */
543
- interface ResultLabels {
544
- analysisUnavailable: string;
545
- resultDetails: string;
546
- liveMetric: string;
547
- currentValue: string;
548
- noMatchTitle: string;
549
- noMatchBody: string;
550
- chartType: string;
551
- chooseChartType: string;
552
- aggregate: string;
553
- aggregateTitle: string;
554
- aggregateCharge: string;
555
- chartFallback: string;
556
- chartLine: string;
557
- chartArea: string;
558
- chartCombo: string;
559
- chartAreaHint: string;
560
- chartComboHint: string;
561
- chartBar: string;
562
- chartStackedBar: string;
563
- chartLineHint: string;
564
- chartBarHint: string;
565
- chartStackedBarHint: string;
566
- aggregationSum: string;
567
- aggregationAvg: string;
568
- aggregationMin: string;
569
- aggregationMax: string;
570
- aggregationCount: string;
571
- aggregationCountDistinct: string;
572
- download: string;
573
- downloadData: string;
574
- expandTable: string;
575
- expandChart: string;
576
- restoreView: string;
577
- aboutResult: string;
578
- aboutPeriod: string;
579
- aboutResults: string;
580
- aboutChecked: string;
581
- aboutTimezone: string;
582
- aboutSourceData: string;
583
- aboutFilters: string;
584
- /** `{count}` placeholder. */
585
- rowOne: string;
586
- rowMany: string;
587
- filtersOne: string;
588
- filtersMany: string;
589
- filtersApplied: string;
590
- notSet: string;
591
- noValue: string;
592
- yes: string;
593
- no: string;
594
- chartValues: string;
595
- /** `{measure}`, `{dimension}`. */
596
- chartTitle: string;
597
- viewerTitle: string;
598
- viewerUnavailable: string;
599
- retryViewer: string;
600
- viewerUpdateAvailable: string;
601
- updateViewer: string;
602
- seriesLimited: string;
603
- partialChart: string;
604
- summaryLatest: string;
605
- summaryNoTrend: string;
606
- summaryHighest: string;
607
- summaryNoComparison: string;
608
- zoomControls: string;
609
- zoomIn: string;
610
- zoomOut: string;
611
- zoomReset: string;
612
- zoomResetShort: string;
613
- zoomNone: string;
614
- zoomAllOne: string;
615
- zoomAllMany: string;
616
- zoomRange: string;
617
- inProgress: string;
618
- newContent: string;
619
- updatedAt: string;
620
- liveData: string;
621
- viewData: string;
622
- hideData: string;
623
- inProgressLegend: string;
624
- /** Overrides for the explanation panel copy. */
625
- explanation?: Partial<AnalyticsExplanationCopy>;
626
- governedResult: string;
627
- }
829
+ //#region ../centrinfo-results/src/locale.d.ts
830
+ /**
831
+ * Shared locale plumbing for every Centrinfo SDK (widget, chat app, voice,
832
+ * analytics, results). One place for: the bundled language list, locale and
833
+ * text-direction resolution, `{placeholder}` templates, plurals, Intl
834
+ * formatting, catalog merging/lazy loading, and the catalog parity check the
835
+ * per-package tests use.
836
+ *
837
+ * Contract for a package catalog:
838
+ * - English defaults live in code (always bundled, the fallback for any key).
839
+ * - Each bundled language is `src/locales/<lang>.ts` with a default export of
840
+ * `Partial<Strings>`; Yoruba, Hausa and Igbo are empty slots (English).
841
+ * - Precedence: English < bundled catalog < host `strings` overrides.
842
+ */
843
+ /** Languages with a catalog slot. `yo`, `ha`, `ig` are empty (English). */
844
+ declare const SDK_LANGUAGES: readonly ["en", "fr", "es", "pt", "de", "it", "ar", "sw", "yo", "ha", "ig"];
845
+ type SdkLanguage = (typeof SDK_LANGUAGES)[number];
628
846
  //#endregion
629
847
  //#region src/i18n.d.ts
630
848
  /**
@@ -694,6 +912,8 @@ interface WidgetStrings {
694
912
  exitExpandedView: string;
695
913
  minimizeVoiceChat: string;
696
914
  endVoiceChat: string;
915
+ /** Start-call button; `{name}` is the agent's name. Hosts can override. */
916
+ speakWithAgent: string;
697
917
  restoreVoiceChat: string;
698
918
  reopenVoiceChat: string;
699
919
  voiceConnecting: string;
@@ -705,6 +925,28 @@ interface WidgetStrings {
705
925
  voiceNoise: string;
706
926
  voiceMisunderstood: string;
707
927
  voiceDenied: string;
928
+ voiceMuted: string;
929
+ voiceTimeout: string;
930
+ /** Status lines of a voice call (Speak with AI). */
931
+ callConnecting: string;
932
+ callListening: string;
933
+ callHearing: string;
934
+ callUnavailable: string;
935
+ callSpeaking: string;
936
+ callProcessing: string;
937
+ callNoise: string;
938
+ callMisunderstood: string;
939
+ callDenied: string;
940
+ /** The visitor asked the assistant to wait; it listens quietly. */
941
+ callWaiting: string;
942
+ /** A slow answer: progress is being given. */
943
+ callStillWorking: string;
944
+ /** Control that resumes a waiting call. */
945
+ resumeVoiceChat: string;
946
+ /** The visitor talks while an earlier answer is still being prepared. */
947
+ voiceAnswerStillComing: string;
948
+ /** Spoken when an answer is only display data (tables, charts). */
949
+ voiceDetailsInChat: string;
708
950
  composerPlaceholder: string;
709
951
  send: string;
710
952
  emoji: string;
@@ -754,6 +996,13 @@ interface WidgetStrings {
754
996
  emptyReply: string;
755
997
  errorGeneric: string;
756
998
  errorRateLimit: string;
999
+ errorTimeout?: string;
1000
+ errorUnavailable?: string;
1001
+ errorAccess?: string;
1002
+ errorAnalysis?: string;
1003
+ errorAnalyticsSetup?: string;
1004
+ errorCredits?: string;
1005
+ errorSubscription?: string;
757
1006
  /** Shown in place of an analytics result that is not kept in local storage. */
758
1007
  resultExpired: string;
759
1008
  attaching: string;
@@ -786,6 +1035,17 @@ interface WidgetStrings {
786
1035
  /** Generic action-form success fallback + error. */
787
1036
  formThanks: string;
788
1037
  formError: string;
1038
+ voiceFormAsk: string;
1039
+ voiceFormReview: string;
1040
+ voiceFormCancelled: string;
1041
+ voiceFormUnavailable: string;
1042
+ voiceFormNoSlots: string;
1043
+ voiceFormLoading: string;
1044
+ voiceFormAt: string;
1045
+ voiceFormDot: string;
1046
+ voiceFormAppointmentTime: string;
1047
+ voiceFormTimeUnavailable: string;
1048
+ voiceFormExternal: string;
789
1049
  /** Case number appended to a confirmation. `{reference}` is the case number. */
790
1050
  caseReference: string;
791
1051
  /** Public action drawer chrome. Action-specific copy remains descriptor data. */
@@ -842,13 +1102,122 @@ interface WidgetStrings {
842
1102
  bookingCheckingDetails: string;
843
1103
  bookingDetailsUnavailable: string;
844
1104
  bookingRetryDetails: string;
1105
+ /** Assistant card while a voice call connects. */
1106
+ callConnectingWithAi: string;
1107
+ /** Assistant card privacy note when the org set a privacy link but no text. */
1108
+ disclaimerDefault: string;
1109
+ /** Fallback action descriptions (only for backends that send no descriptors). */
1110
+ actionContactSupportDescription: string;
1111
+ actionLeaveMessageDescription: string;
1112
+ actionBookDemoDescription: string;
1113
+ actionRequestCallbackDescription: string;
1114
+ actionScheduleCallbackDescription: string;
1115
+ actionSubscribeDescription: string;
1116
+ /** Fallback form titles, submit buttons, field labels and placeholders. */
1117
+ formContactSupportTitle: string;
1118
+ formRequestSupport: string;
1119
+ formLeaveMessageTitle: string;
1120
+ formSendMessage: string;
1121
+ formShareDetailsTitle: string;
1122
+ formSave: string;
1123
+ formBookDemoTitle: string;
1124
+ formRequestDemo: string;
1125
+ formRequestCallbackTitle: string;
1126
+ formRequestCallback: string;
1127
+ formScheduleCallbackTitle: string;
1128
+ formScheduleCallback: string;
1129
+ formSubscribe: string;
1130
+ fieldFullName: string;
1131
+ fieldEmail: string;
1132
+ fieldSubject: string;
1133
+ fieldMessage: string;
1134
+ fieldPhone: string;
1135
+ fieldPhoneNumber: string;
1136
+ fieldPreferredTime: string;
1137
+ fieldNotes: string;
1138
+ fieldTopic: string;
1139
+ placeholderSupportMessage: string;
1140
+ placeholderInquiryMessage: string;
1141
+ placeholderPreferredTime: string;
1142
+ placeholderNotes: string;
1143
+ placeholderTopic: string;
1144
+ /** Phone field country picker. `{country}`, `{dial}`. */
1145
+ phoneChooseCountry: string;
1146
+ phoneSearchPlaceholder: string;
1147
+ phoneSearchLabel: string;
1148
+ phoneCountries: string;
1149
+ phoneNoCountries: string;
1150
+ /** Pre-filled message of the handoff card. */
1151
+ handoffDefaultMessage: string;
1152
+ /** Handoff card when the team already has the visitor's email. */
1153
+ handoffAlerted: string;
1154
+ gifAlt: string;
1155
+ toolResultAlt: string;
1156
+ openResult: string;
1157
+ /** Unnamed microphone in the device list. `{number}`. */
1158
+ microphoneNumbered: string;
1159
+ /** Speech bubble while the visitor starts talking in a call. */
1160
+ voiceDraftListening: string;
1161
+ /** Emoji picker group headings. */
1162
+ emojiSmileys: string;
1163
+ emojiGestures: string;
1164
+ emojiHearts: string;
1165
+ emojiAnimals: string;
1166
+ emojiFood: string;
1167
+ emojiObjects: string;
1168
+ /** Receipt when an action returned no message of its own. */
1169
+ actionCompleted: string;
1170
+ /** Copied text of a result table. `{count}`, `{total}`. */
1171
+ copyResultData: string;
1172
+ copyRowsReturned: string;
1173
+ copyRowsReturnedOf: string;
1174
+ copyTruncated: string;
1175
+ copyTotals: string;
845
1176
  /** Preview mode (data-preview): canned reply, action note, top banner. */
846
1177
  previewReply: string;
847
1178
  previewActionNote: string;
848
1179
  previewBanner: string;
849
1180
  }
1181
+ declare const DEFAULT_STRINGS: WidgetStrings;
1182
+ /**
1183
+ * English defaults, then the bundled catalog for the locale (`catalog`), then
1184
+ * the host's overrides. Undefined values never erase a lower layer.
1185
+ */
1186
+ declare const mergeStrings: (overrides?: Partial<WidgetStrings>, catalog?: Partial<WidgetStrings>) => WidgetStrings;
850
1187
  declare const StringsProvider: preact0.Provider<WidgetStrings>;
851
1188
  //#endregion
1189
+ //#region ../centrinfo-voice/src/voice-control.d.ts
1190
+ /** Spoken call controls. The assistant's answer to a voice turn says, as a
1191
+ * structured field next to its reply, whether the person asked to control the
1192
+ * call ("mute", "end", ... in any language). No words are matched here: the
1193
+ * answering model decides from what was meant, and the client only executes
1194
+ * an action it allows. */
1195
+ declare const VOICE_CONTROL_ACTIONS: readonly ["mute", "end", "minimize", "expand", "shrink", "wait", "resume"];
1196
+ type VoiceControlAction = (typeof VOICE_CONTROL_ACTIONS)[number];
1197
+ /** An answer to a voice turn: the words, and the call control it asked for. */
1198
+ interface VoiceAnswer {
1199
+ text: string | null;
1200
+ voiceControl?: VoiceControlAction | null;
1201
+ /** The conversation's language, when the answer reports it. */
1202
+ language?: string;
1203
+ /** Progress lines in that language for a later slow answer. */
1204
+ progressLines?: readonly string[];
1205
+ }
1206
+ //#endregion
1207
+ //#region ../centrinfo-voice/src/live-voice.d.ts
1208
+ interface LiveVoiceRequest {
1209
+ action: 'capabilities' | 'connect' | 'heartbeat' | 'close' | 'interrupt';
1210
+ sdp?: string;
1211
+ callId?: string;
1212
+ }
1213
+ interface LiveVoiceResponse {
1214
+ enabled: boolean;
1215
+ callId?: string;
1216
+ sdp?: string;
1217
+ maxDurationSeconds?: number;
1218
+ }
1219
+ type LiveVoiceTransport = (request: LiveVoiceRequest, signal?: AbortSignal) => Promise<LiveVoiceResponse>;
1220
+ //#endregion
852
1221
  //#region src/api/types.d.ts
853
1222
  /** The result metadata that arrives with (or after) an answer. */
854
1223
  /**
@@ -904,11 +1273,36 @@ interface LiveAudioSegment {
904
1273
  /** The piece as spoken (no links or markdown). */
905
1274
  text?: string;
906
1275
  }
1276
+ interface VoiceFormField extends Omit<PublicChatActionField, 'kind'> {
1277
+ kind: PublicChatActionField['kind'] | 'choice' | 'datetime';
1278
+ options?: {
1279
+ value: string;
1280
+ label: string;
1281
+ }[];
1282
+ }
1283
+ interface VoiceFormRequest {
1284
+ sessionId: string;
1285
+ clientMessageId: string;
1286
+ actionId: string;
1287
+ fields: VoiceFormField[];
1288
+ values: Record<string, string>;
1289
+ transcript: string;
1290
+ reviewing: boolean;
1291
+ language?: string;
1292
+ timeZone?: string;
1293
+ }
1294
+ interface VoiceFormResult {
1295
+ intent: 'provide' | 'confirm' | 'cancel' | 'question';
1296
+ values: Record<string, string>;
1297
+ clarification?: string;
1298
+ }
907
1299
  interface TurnResult {
908
1300
  answerResult?: CentrinfoAnswer<AnalyticsVisualization, Source, ChatArtifact>;
909
1301
  /** True when the reply was spoken in live pieces (onAudioSegment). */
910
1302
  liveAudio?: boolean;
911
1303
  answer: string;
1304
+ errorCode?: string;
1305
+ retryable?: boolean;
912
1306
  sources: Source[];
913
1307
  suggestedReplies: string[];
914
1308
  /** Legacy: raw tool ids. Prefer `actions`. */
@@ -918,10 +1312,15 @@ interface TurnResult {
918
1312
  /** Action the backend resolved for this turn — open its form directly. */
919
1313
  selectedAction?: string;
920
1314
  handoffOffered: boolean;
1315
+ /** True only after the backend confirms an issue was saved. */
1316
+ issueRaised?: boolean;
921
1317
  /** Contact fields the backend wants inline before handoff, e.g. ["email"]. */
922
1318
  requestedContactFields?: string[];
923
1319
  /** True when the backend closed the session (visitor ended it, or 24h idle). */
924
1320
  conversationEnded?: boolean;
1321
+ /** Voice turns only: the call control the answer asked for (decided by the
1322
+ * answering model; the call only carries out controls it allows). */
1323
+ voiceControl?: string;
925
1324
  /** Current live handoff state for the session. */
926
1325
  liveMode?: 'ai' | 'queued' | 'human';
927
1326
  /** Human currently assigned to the chat, when liveMode is human. */
@@ -1193,6 +1592,8 @@ interface AnalyticsVisualization {
1193
1592
  isMixed: boolean;
1194
1593
  };
1195
1594
  chartRecommendation?: AnalyticsVisualizationRecommendation;
1595
+ /** Structured two-level ranking (validated by `parseRankedAnswer`). */
1596
+ rankedAnswer?: unknown;
1196
1597
  analysis?: AnalyticsVisualizationAnalysis;
1197
1598
  businessAnalysis?: AnalyticsVisualizationBusinessAnalysis;
1198
1599
  analysisIntent?: AnalyticsVisualizationAnalysisIntent;
@@ -1247,6 +1648,7 @@ interface AuthenticatedHistoryMessage {
1247
1648
  visualization?: AnalyticsVisualization;
1248
1649
  artifacts?: ChatArtifact[];
1249
1650
  createdAt: string;
1651
+ expiresAt?: string;
1250
1652
  }
1251
1653
  interface AuthenticatedHistoryConversation {
1252
1654
  sessionId: string;
@@ -1260,6 +1662,7 @@ interface AuthenticatedHistoryResult {
1260
1662
  conversations: AuthenticatedHistoryConversation[];
1261
1663
  }
1262
1664
  interface StreamCallbacks {
1665
+ voiceFormEntry?: boolean;
1263
1666
  analyticsModelId?: string;
1264
1667
  /** Called with each incremental text chunk. */
1265
1668
  onChunk: (text: string) => void;
@@ -1273,15 +1676,23 @@ interface StreamCallbacks {
1273
1676
  signal?: AbortSignal;
1274
1677
  /** True only for turns sent from the active Speak-with-AI call. */
1275
1678
  voicePlaybackRequested?: boolean;
1679
+ /** The turn was spoken in a voice call (also realtime voice, which plays
1680
+ * its own audio): the answer may carry a call control (`voiceControl`). */
1681
+ voiceCall?: boolean;
1682
+ /** The voice call is waiting (the visitor asked the assistant to hold). */
1683
+ voiceWaiting?: boolean;
1276
1684
  /** Stable id of the visitor's message. A retry sends the same id, so the
1277
1685
  * backend answers and bills the turn once. */
1278
1686
  clientMessageId?: string;
1687
+ retryOfMessageId?: string;
1279
1688
  attachmentId?: string;
1280
1689
  /** Every stored file sent with this message. */
1281
1690
  attachmentIds?: string[];
1282
1691
  }
1283
1692
  interface ActionResult {
1284
1693
  ok: boolean;
1694
+ /** True only after a staff issue or handoff inquiry was saved. */
1695
+ issueRaised?: boolean;
1285
1696
  note?: string;
1286
1697
  /** Saved conversation message for this completed action. */
1287
1698
  receipt?: {
@@ -1390,6 +1801,12 @@ interface GifResult {
1390
1801
  * backend (`ApiClient`) or the in-memory demo (`MockTransport`).
1391
1802
  */
1392
1803
  interface Transport {
1804
+ /** Static UI catalogs; absent for demo, preview and older custom transports. */
1805
+ loadUITranslations?(namespace: string, locale: string, version?: string, signal?: AbortSignal): Promise<unknown>;
1806
+ prepareVoiceForm?: (request: VoiceFormRequest, signal?: AbortSignal) => Promise<VoiceFormResult>;
1807
+ liveVoice?(request: LiveVoiceRequest & {
1808
+ sessionId: string;
1809
+ }, signal?: AbortSignal): Promise<LiveVoiceResponse>;
1393
1810
  analyticsModels?(): Promise<AnalyticsModelOption[]>;
1394
1811
  bootstrap(): Promise<BootstrapInfo>;
1395
1812
  /** Server-backed history for the verified SDK customer. Anonymous returns empty. */
@@ -1540,8 +1957,20 @@ interface WidgetConfig {
1540
1957
  * chat answers themselves are already multilingual server-side.
1541
1958
  */
1542
1959
  labels?: Partial<WidgetStrings>;
1543
- /** Locale used to select a translation bundle. Defaults to browser locale. */
1960
+ /**
1961
+ * Override any UI text (same keys as `labels`; `strings` wins when both are
1962
+ * set). Unset keys use automatic/bundled catalogs for `locale`, then English.
1963
+ */
1964
+ strings?: Partial<WidgetStrings>;
1965
+ /**
1966
+ * BCP-47 locale (`fr`, `pt-BR`, `ar-EG`, …). Loads bundled UI text and,
1967
+ * by default, missing automatic translations. Formats dates, times and
1968
+ * numbers with the runtime's Intl support. Defaults to the browser language.
1969
+ */
1544
1970
  locale?: string;
1971
+ /** Load missing static UI translations from the authenticated backend. Default true.
1972
+ * Set false to use only bundled catalogs and your own strings. */
1973
+ autoTranslate?: boolean;
1545
1974
  /**
1546
1975
  * Text direction. `auto` (default) follows the locale: Arabic, Hebrew,
1547
1976
  * Persian, Urdu and similar scripts render right-to-left.
@@ -1750,8 +2179,19 @@ interface WidgetHandle {
1750
2179
  */
1751
2180
  shutdown: () => void;
1752
2181
  logout: () => void;
2182
+ /**
2183
+ * Change the language, text overrides or direction at runtime. `strings`
2184
+ * merge over earlier overrides. Resolves once the new text is shown.
2185
+ */
2186
+ setLocale: (update: WidgetLocaleUpdate) => Promise<void>;
1753
2187
  destroy: () => void;
1754
2188
  }
2189
+ /** Runtime language change for `handle.setLocale`. */
2190
+ interface WidgetLocaleUpdate {
2191
+ locale?: string;
2192
+ strings?: Partial<WidgetStrings>;
2193
+ dir?: 'ltr' | 'rtl' | 'auto';
2194
+ }
1755
2195
  /** A rendered chat message. */
1756
2196
  interface ChatArtifact {
1757
2197
  type: 'image' | 'video' | 'resource_link' | 'visualization';
@@ -1774,6 +2214,9 @@ interface MessageAttachment {
1774
2214
  }
1775
2215
  interface ChatMessage {
1776
2216
  id: string;
2217
+ /** A voice-call control turn (wait, mute, end, ...): shown during the call
2218
+ * but never kept in the saved transcript, matching the server. */
2219
+ callOnly?: boolean;
1777
2220
  role: 'user' | 'assistant' | 'system';
1778
2221
  content: string;
1779
2222
  /** Human name for live agent replies or system join/leave events. */
@@ -1784,8 +2227,10 @@ interface ChatMessage {
1784
2227
  offerReconnect?: boolean;
1785
2228
  /** Local assistant message opened by "Reconnect to support". */
1786
2229
  reconnectOffer?: boolean;
1787
- /** ISO timestamp for server-originated live events. */
2230
+ /** Original message time used for transcript retention. */
1788
2231
  createdAt?: string;
2232
+ /** Original retention deadline; cache writes must not renew it. */
2233
+ expiresAt?: string;
1789
2234
  /** Inline image (e.g. a GIF the visitor sent). Rendered in the bubble. */
1790
2235
  imageUrl?: string;
1791
2236
  /** Name of a file the visitor attached (rendered as a chip on their bubble). */
@@ -1803,6 +2248,8 @@ interface ChatMessage {
1803
2248
  /** Action the backend resolved for this turn — its form opens directly. */
1804
2249
  selectedAction?: string;
1805
2250
  handoffOffered?: boolean;
2251
+ /** A persisted staff issue was confirmed for this turn. */
2252
+ issueRaised?: boolean;
1806
2253
  /** Contact fields requested by final API metadata before handoff. */
1807
2254
  requestedContactFields?: string[];
1808
2255
  /** Assistant message awaiting its first token (shows the typing dots). */
@@ -1811,6 +2258,8 @@ interface ChatMessage {
1811
2258
  streaming?: boolean;
1812
2259
  /** Something went wrong producing this turn. */
1813
2260
  error?: boolean;
2261
+ errorCode?: string;
2262
+ retryable?: boolean;
1814
2263
  /** On an errored turn, the question to re-send when the visitor taps Retry. */
1815
2264
  retryText?: string;
1816
2265
  /** Visitor's 👍/👎 on this assistant reply (persisted so it survives reloads). */
@@ -1844,8 +2293,9 @@ interface BootstrapInfo {
1844
2293
  greeting: string;
1845
2294
  /** Public module selected on the token: classic chat or assistant card. */
1846
2295
  widgetModule?: 'chat' | 'assistant';
1847
- /** Assistant-card hero media. Video is rendered muted/looping. */
2296
+ /** @deprecated Welcome media is retired; the assistant uses its avatar. */
1848
2297
  assistantMediaUrl?: string;
2298
+ /** @deprecated Retained for compatibility; renderers ignore welcome media. */
1849
2299
  assistantMediaKind?: 'image' | 'video';
1850
2300
  assistantPrivacyUrl?: string;
1851
2301
  /** Org-token default for widget sounds. Visitors can still mute locally. */
@@ -1910,4 +2360,4 @@ interface SchedulerInfo {
1910
2360
  };
1911
2361
  }
1912
2362
  //#endregion
1913
- export { ResultColumn as A, Transport as C, AnalyticsComboModel as D, ResultLabels as E, AnalyticsGroupComparisonPoint as F, AnalyticsPeriodComparison as I, ResultFormatContext as M, AnalyticsAIExplanationTransport as N, AnalyticsVisualization$1 as O, AnalyticsExplanationInput as P, PublicChatActionField as S, WidgetStrings as T, DemoBooking as _, MessageAttachment as a, GifResult as b, Visitor as c, WidgetHandle as d, WidgetThemeTokens as f, AnalyticsVisualization as g, AnalyticsModelOption as h, FeaturedLink as i, ResultTableClassNames as j, AnalyticsVisualizationColumn$1 as k, WidgetActionTranslation as l, ActionResult as m, ChatArtifact as n, SchedulerInfo as o, WidgetUser as p, ChatMessage as r, Source as s, BootstrapInfo as t, WidgetConfig as u, DemoSlotsResult as v, StringsProvider as w, PublicChatAction as x, ExplanationFeedbackInput as y };
2363
+ export { WidgetStrings as A, ResultLabels as B, PublicChatActionField as C, VoiceAnswer as D, LiveVoiceTransport as E, AnalyticsVisualization$1 as F, AnalyticsExplanationInput as H, AnalyticsVisualizationColumn$1 as I, ResultColumn as L, SDK_LANGUAGES as M, SdkLanguage as N, DEFAULT_STRINGS as O, AnalyticsComboModel as P, ResultTableClassNames as R, PublicChatAction as S, VoiceFormField as T, AnalyticsGroupComparisonPoint as U, AnalyticsAIExplanationTransport as V, AnalyticsPeriodComparison as W, 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, ResultFormatContext as z };