@accurix/centrinfo-widget 5.1.0 → 5.1.2

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.
@@ -83,6 +83,8 @@ interface AnalyticsExplanationFreshnessInput {
83
83
  }
84
84
  /** Structural explanation shape every surface's DTO satisfies. */
85
85
  interface AnalyticsExplanationInput {
86
+ /** Set only when the backend verified every requested fact. */
87
+ answerComplete?: boolean;
86
88
  explanationId?: string;
87
89
  conversationalPreface?: string;
88
90
  headline?: string;
@@ -113,6 +115,7 @@ interface AnalyticsExplanationInput {
113
115
  action: string;
114
116
  why: string;
115
117
  successMetric?: string;
118
+ segment?: string;
116
119
  evidenceIds?: string[];
117
120
  }>;
118
121
  forecast?: {
@@ -128,24 +131,63 @@ interface AnalyticsExplanationInput {
128
131
  level?: 'basic' | 'detailed' | string;
129
132
  /** The detailed AI explanation that loads separately (poll by explanationId). */
130
133
  aiExplanation?: AnalyticsAIExplanationInput | null;
134
+ /** Ranked measured drivers (association, never proof of cause). */
135
+ drivers?: Array<{
136
+ text: string;
137
+ basis?: string;
138
+ evidenceIds?: string[];
139
+ }>;
140
+ /** Cited unusual values. */
141
+ anomalies?: Array<{
142
+ text: string;
143
+ evidenceIds?: string[];
144
+ }>;
145
+ /** General business guidance, NOT from the customer's data (label "guidance"). */
146
+ frameworks?: Array<{
147
+ name: string;
148
+ label?: string;
149
+ guidance: string;
150
+ fieldMapping?: Array<{
151
+ concept: string;
152
+ field?: string;
153
+ status: string;
154
+ }>;
155
+ evidenceIds?: string[];
156
+ }>;
157
+ /** Business concepts the answer needed that the data does not hold. */
158
+ dataGaps?: Array<{
159
+ concept: string;
160
+ text: string;
161
+ }>;
162
+ /** Governed facts the AI wording did not cover, added beside it. */
163
+ supplementaryFindings?: string[];
131
164
  }
132
- /** State of the detailed AI explanation, as returned by every surface. */
165
+ /**
166
+ * State of the detailed AI explanation, as returned by every surface. The
167
+ * backend may also send "governed" (the checked governed explanation is
168
+ * final); it is read as `not_requested` — not a failure.
169
+ */
133
170
  type AnalyticsAIExplanationStatus = 'pending' | 'ready' | 'failed' | 'not_requested';
134
171
  interface AnalyticsAIExplanationInput {
135
172
  status: AnalyticsAIExplanationStatus | string;
136
173
  explanationId?: string;
137
174
  retryAvailable?: boolean;
175
+ /** Pending only: when the backend job's budget ends (ISO time). */
176
+ deadlineAt?: string;
177
+ /** Pending only: seconds left in the job's budget at response time (clock-skew safe). */
178
+ waitSeconds?: number;
138
179
  }
139
180
  declare const ANALYTICS_EXPLANATION_COPY: {
140
181
  readonly eyebrow: "Answer from your data";
141
182
  readonly provenanceAI: "AI-assisted · evidence checked";
183
+ readonly provenanceCalculated: "Calculated results";
142
184
  readonly provenanceGoverned: "Based on current values";
143
185
  readonly comparison: "Comparison";
144
186
  readonly conclusions: "What we can conclude";
145
187
  readonly whyItMatters: "Why it matters";
146
188
  readonly limits: "Important limits";
147
189
  readonly investigate: "Investigate further";
148
- readonly evidenceList: "Evidence checked";
190
+ readonly evidenceList: "Supporting evidence";
149
191
  readonly causes: "Possible causes";
150
192
  readonly causesHint: "Not proven causes";
151
193
  readonly howToCheck: "How to check:";
@@ -154,6 +196,7 @@ declare const ANALYTICS_EXPLANATION_COPY: {
154
196
  readonly outlook: "Outlook";
155
197
  readonly followUps: "Ask a follow-up";
156
198
  readonly sourceNoteAI: "AI-assisted wording, checked against the live values shown here.";
199
+ readonly sourceNoteCalculated: "AI-assisted wording based on calculated results.";
157
200
  readonly sourceNoteGoverned: "Based only on the live values shown here.";
158
201
  readonly evidence: "Evidence";
159
202
  readonly evidenceMetric: "Metric";
@@ -181,10 +224,19 @@ declare const ANALYTICS_EXPLANATION_COPY: {
181
224
  readonly notComparable: "Not comparable yet";
182
225
  readonly basicExplanation: "Basic explanation";
183
226
  readonly preparingDetailed: "Preparing a detailed explanation…";
227
+ readonly stillWorkingDetailed: "Still working on the detailed explanation…";
184
228
  readonly detailedReady: "Detailed explanation ready.";
185
229
  readonly detailedUnavailable: "A detailed explanation is not available right now.";
186
230
  readonly detailedRetry: "Try again";
187
231
  readonly region: "Explanation";
232
+ readonly drivers: "What is driving it";
233
+ readonly driversHint: "Measured association, not proof of cause";
234
+ readonly anomalies: "Unusual values";
235
+ readonly supplementaryFindings: "Also in the data";
236
+ readonly frameworks: "General guidance, not from your data";
237
+ readonly dataGaps: "Missing data";
238
+ readonly segment: "Segment:";
239
+ readonly tasks: "Tasks";
188
240
  readonly inProgress: "in progress";
189
241
  readonly expand: "Expand explanation";
190
242
  readonly collapse: "Collapse explanation";
@@ -264,6 +316,9 @@ interface AnalyticsAIExplanationJob<E extends AnalyticsExplanationInput> {
264
316
  status: AnalyticsAIExplanationStatus | string;
265
317
  explanationId?: string;
266
318
  retryAvailable?: boolean;
319
+ /** Pending only: the job's deadline (ISO) and seconds left (see AnalyticsAIExplanationInput). */
320
+ deadlineAt?: string;
321
+ waitSeconds?: number;
267
322
  explanation?: E | null;
268
323
  /**
269
324
  * The free basic explanation as updated by the background job (it gains the
@@ -479,6 +534,7 @@ interface ResultColumn {
479
534
  currencyCode?: string;
480
535
  formatPattern?: string;
481
536
  grain?: ResultGrain;
537
+ semanticRole?: AnalyticsVisualizationColumn$1['semanticRole'];
482
538
  }
483
539
  interface ResultTableClassNames {
484
540
  wrap?: string;
@@ -770,6 +826,7 @@ interface WidgetStrings {
770
826
  bookingLoadingScheduler: string;
771
827
  bookingMeetingLink: string;
772
828
  bookingManageLink: string;
829
+ bookingUnverifiedLink: string;
773
830
  bookingCheckingDetails: string;
774
831
  bookingDetailsUnavailable: string;
775
832
  bookingRetryDetails: string;
@@ -948,6 +1005,7 @@ interface AnalyticsValueProvenance {
948
1005
  reason?: string;
949
1006
  }
950
1007
  interface AnalyticsVisualizationExplanation {
1008
+ answerComplete?: boolean;
951
1009
  /** Stable opaque id; used only for "Was this helpful?" feedback. */
952
1010
  explanationId?: string;
953
1011
  conversationalPreface?: string;
@@ -1203,6 +1261,11 @@ interface StreamCallbacks {
1203
1261
  interface ActionResult {
1204
1262
  ok: boolean;
1205
1263
  note?: string;
1264
+ /** Saved conversation message for this completed action. */
1265
+ receipt?: {
1266
+ id: string;
1267
+ content: string;
1268
+ };
1206
1269
  /** Present on book-a-demo when a connected scheduler fulfilled it live —
1207
1270
  * a real calendar event was created (event mode) or a Calendly link was
1208
1271
  * resolved (link mode). Absent when it fell back to a staff-follow-up request. */
@@ -1228,6 +1291,11 @@ interface DemoBooking {
1228
1291
  endAt?: string;
1229
1292
  timezone?: string;
1230
1293
  title?: string;
1294
+ /** Returned with hosted booking confirmation for immediate chat display. */
1295
+ receipt?: {
1296
+ id: string;
1297
+ content: string;
1298
+ };
1231
1299
  }
1232
1300
  interface HostedBookingConfirmation {
1233
1301
  sessionId: string;
@@ -80,6 +80,8 @@ interface AnalyticsExplanationFreshnessInput {
80
80
  }
81
81
  /** Structural explanation shape every surface's DTO satisfies. */
82
82
  interface AnalyticsExplanationInput {
83
+ /** Set only when the backend verified every requested fact. */
84
+ answerComplete?: boolean;
83
85
  explanationId?: string;
84
86
  conversationalPreface?: string;
85
87
  headline?: string;
@@ -110,6 +112,7 @@ interface AnalyticsExplanationInput {
110
112
  action: string;
111
113
  why: string;
112
114
  successMetric?: string;
115
+ segment?: string;
113
116
  evidenceIds?: string[];
114
117
  }>;
115
118
  forecast?: {
@@ -125,24 +128,63 @@ interface AnalyticsExplanationInput {
125
128
  level?: 'basic' | 'detailed' | string;
126
129
  /** The detailed AI explanation that loads separately (poll by explanationId). */
127
130
  aiExplanation?: AnalyticsAIExplanationInput | null;
131
+ /** Ranked measured drivers (association, never proof of cause). */
132
+ drivers?: Array<{
133
+ text: string;
134
+ basis?: string;
135
+ evidenceIds?: string[];
136
+ }>;
137
+ /** Cited unusual values. */
138
+ anomalies?: Array<{
139
+ text: string;
140
+ evidenceIds?: string[];
141
+ }>;
142
+ /** General business guidance, NOT from the customer's data (label "guidance"). */
143
+ frameworks?: Array<{
144
+ name: string;
145
+ label?: string;
146
+ guidance: string;
147
+ fieldMapping?: Array<{
148
+ concept: string;
149
+ field?: string;
150
+ status: string;
151
+ }>;
152
+ evidenceIds?: string[];
153
+ }>;
154
+ /** Business concepts the answer needed that the data does not hold. */
155
+ dataGaps?: Array<{
156
+ concept: string;
157
+ text: string;
158
+ }>;
159
+ /** Governed facts the AI wording did not cover, added beside it. */
160
+ supplementaryFindings?: string[];
128
161
  }
129
- /** State of the detailed AI explanation, as returned by every surface. */
162
+ /**
163
+ * State of the detailed AI explanation, as returned by every surface. The
164
+ * backend may also send "governed" (the checked governed explanation is
165
+ * final); it is read as `not_requested` — not a failure.
166
+ */
130
167
  type AnalyticsAIExplanationStatus = 'pending' | 'ready' | 'failed' | 'not_requested';
131
168
  interface AnalyticsAIExplanationInput {
132
169
  status: AnalyticsAIExplanationStatus | string;
133
170
  explanationId?: string;
134
171
  retryAvailable?: boolean;
172
+ /** Pending only: when the backend job's budget ends (ISO time). */
173
+ deadlineAt?: string;
174
+ /** Pending only: seconds left in the job's budget at response time (clock-skew safe). */
175
+ waitSeconds?: number;
135
176
  }
136
177
  declare const ANALYTICS_EXPLANATION_COPY: {
137
178
  readonly eyebrow: "Answer from your data";
138
179
  readonly provenanceAI: "AI-assisted · evidence checked";
180
+ readonly provenanceCalculated: "Calculated results";
139
181
  readonly provenanceGoverned: "Based on current values";
140
182
  readonly comparison: "Comparison";
141
183
  readonly conclusions: "What we can conclude";
142
184
  readonly whyItMatters: "Why it matters";
143
185
  readonly limits: "Important limits";
144
186
  readonly investigate: "Investigate further";
145
- readonly evidenceList: "Evidence checked";
187
+ readonly evidenceList: "Supporting evidence";
146
188
  readonly causes: "Possible causes";
147
189
  readonly causesHint: "Not proven causes";
148
190
  readonly howToCheck: "How to check:";
@@ -151,6 +193,7 @@ declare const ANALYTICS_EXPLANATION_COPY: {
151
193
  readonly outlook: "Outlook";
152
194
  readonly followUps: "Ask a follow-up";
153
195
  readonly sourceNoteAI: "AI-assisted wording, checked against the live values shown here.";
196
+ readonly sourceNoteCalculated: "AI-assisted wording based on calculated results.";
154
197
  readonly sourceNoteGoverned: "Based only on the live values shown here.";
155
198
  readonly evidence: "Evidence";
156
199
  readonly evidenceMetric: "Metric";
@@ -178,10 +221,19 @@ declare const ANALYTICS_EXPLANATION_COPY: {
178
221
  readonly notComparable: "Not comparable yet";
179
222
  readonly basicExplanation: "Basic explanation";
180
223
  readonly preparingDetailed: "Preparing a detailed explanation…";
224
+ readonly stillWorkingDetailed: "Still working on the detailed explanation…";
181
225
  readonly detailedReady: "Detailed explanation ready.";
182
226
  readonly detailedUnavailable: "A detailed explanation is not available right now.";
183
227
  readonly detailedRetry: "Try again";
184
228
  readonly region: "Explanation";
229
+ readonly drivers: "What is driving it";
230
+ readonly driversHint: "Measured association, not proof of cause";
231
+ readonly anomalies: "Unusual values";
232
+ readonly supplementaryFindings: "Also in the data";
233
+ readonly frameworks: "General guidance, not from your data";
234
+ readonly dataGaps: "Missing data";
235
+ readonly segment: "Segment:";
236
+ readonly tasks: "Tasks";
185
237
  readonly inProgress: "in progress";
186
238
  readonly expand: "Expand explanation";
187
239
  readonly collapse: "Collapse explanation";
@@ -261,6 +313,9 @@ interface AnalyticsAIExplanationJob<E extends AnalyticsExplanationInput> {
261
313
  status: AnalyticsAIExplanationStatus | string;
262
314
  explanationId?: string;
263
315
  retryAvailable?: boolean;
316
+ /** Pending only: the job's deadline (ISO) and seconds left (see AnalyticsAIExplanationInput). */
317
+ deadlineAt?: string;
318
+ waitSeconds?: number;
264
319
  explanation?: E | null;
265
320
  /**
266
321
  * The free basic explanation as updated by the background job (it gains the
@@ -562,6 +617,7 @@ interface WidgetStrings {
562
617
  bookingLoadingScheduler: string;
563
618
  bookingMeetingLink: string;
564
619
  bookingManageLink: string;
620
+ bookingUnverifiedLink: string;
565
621
  bookingCheckingDetails: string;
566
622
  bookingDetailsUnavailable: string;
567
623
  bookingRetryDetails: string;
@@ -740,6 +796,7 @@ interface AnalyticsValueProvenance {
740
796
  reason?: string;
741
797
  }
742
798
  interface AnalyticsVisualizationExplanation {
799
+ answerComplete?: boolean;
743
800
  /** Stable opaque id; used only for "Was this helpful?" feedback. */
744
801
  explanationId?: string;
745
802
  conversationalPreface?: string;
@@ -995,6 +1052,11 @@ interface StreamCallbacks {
995
1052
  interface ActionResult {
996
1053
  ok: boolean;
997
1054
  note?: string;
1055
+ /** Saved conversation message for this completed action. */
1056
+ receipt?: {
1057
+ id: string;
1058
+ content: string;
1059
+ };
998
1060
  /** Present on book-a-demo when a connected scheduler fulfilled it live —
999
1061
  * a real calendar event was created (event mode) or a Calendly link was
1000
1062
  * resolved (link mode). Absent when it fell back to a staff-follow-up request. */
@@ -1020,6 +1082,11 @@ interface DemoBooking {
1020
1082
  endAt?: string;
1021
1083
  timezone?: string;
1022
1084
  title?: string;
1085
+ /** Returned with hosted booking confirmation for immediate chat display. */
1086
+ receipt?: {
1087
+ id: string;
1088
+ content: string;
1089
+ };
1023
1090
  }
1024
1091
  interface HostedBookingConfirmation {
1025
1092
  sessionId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@accurix/centrinfo-widget",
3
- "version": "5.1.0",
3
+ "version": "5.1.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -44,7 +44,7 @@
44
44
  "preact": "^10.27.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@playwright/test": "^1.50.0",
47
+ "@playwright/test": "^1.61.0",
48
48
  "@types/node": "^22.0.0",
49
49
  "@vitest/coverage-v8": "^3.2.0",
50
50
  "eslint": "^9.27.0",