react-semaphor 0.1.583 → 0.1.585
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/dist/analytics-protocol/index.js +470 -428
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +7 -7
- package/dist/briefings/index.js +4 -4
- package/dist/chunks/aggregate-measure-field-DsFXETpI.js +22 -0
- package/dist/chunks/{assistant-chat-D3fm5qod.js → assistant-chat-BdbLmAnK.js} +12 -12
- package/dist/chunks/{bookmark-impact-Dpxl46Wd.js → bookmark-impact-BhT3k379.js} +2 -2
- package/dist/chunks/{bookmark-state-BEl_G9vr.js → bookmark-state-CL4WEpgB.js} +22 -22
- package/dist/chunks/{card-filter-builder-IxkFVxy2.js → card-filter-builder-CEcKF6Fw.js} +124 -124
- package/dist/chunks/comparison-window-caption-CoART8BC.js +1254 -0
- package/dist/chunks/{dashboard-BMqG98fc.js → dashboard-MPku_x1M.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-D45YfCkm.js → dashboard-briefing-launcher-CkFNlkr1.js} +13 -13
- package/dist/chunks/{dashboard-controls-DOvZRfof.js → dashboard-controls-Clt4ovXS.js} +84 -84
- package/dist/chunks/{dashboard-json-B_4TqF_o.js → dashboard-json-DSmXazIg.js} +4 -4
- package/dist/chunks/{dates-44_rcNj2.js → dates-CYZW9owO.js} +8 -8
- package/dist/chunks/{edit-dashboard-visual-BBPKJWSe.js → edit-dashboard-visual-Dn2ECRbX.js} +2752 -2687
- package/dist/chunks/filter-line-Cu2u1K36.js +131 -0
- package/dist/chunks/{filter-reach-copy-DWPq4Swi.js → filter-reach-copy-CmJpPa4G.js} +1745 -1326
- package/dist/chunks/{filter-value-text-DXGYypEd.js → filter-value-text-xefXzZlf.js} +6 -6
- package/dist/chunks/{index-DPRzcFp0.js → index-0WYn6RMz.js} +37 -37
- package/dist/chunks/{layout-grid-8rR-LPTk.js → layout-grid-9nSS2SL-.js} +1 -1
- package/dist/chunks/{list-filter-C1-uTgjR.js → list-filter-CfMPI6v4.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-D_HgptqZ.js → matrix-analytical-definition-QjBgUYhP.js} +382 -544
- package/dist/chunks/{matrix-member-presentation-DRa-9e6Q.js → matrix-member-presentation-BKDyxJho.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-DCVinw1o.js → matrix-operation-contract-BM5TveR3.js} +153 -147
- package/dist/chunks/{metric-comparison-n9NsIa-2.js → metric-comparison-ZmurmEIs.js} +3 -3
- package/dist/chunks/{paintbrush-aR17Z3C9.js → paintbrush-LzAje2ff.js} +1 -1
- package/dist/chunks/{palette-a5FCZKFI.js → palette-DicJG0TC.js} +1 -1
- package/dist/chunks/{pivot-header-presentation-MvvlxtIB.js → pivot-header-presentation-CdeTU96P.js} +1 -1
- package/dist/chunks/{pivot-result-contract-expectations-8tuNjRvG.js → pivot-result-contract-expectations-Bx_BCu-7.js} +1029 -1010
- package/dist/chunks/{pivot-result-identity-B89X5xjb.js → pivot-result-identity-Bvs6Uq3v.js} +1 -1
- package/dist/chunks/raw-temporal-value-DH-feMc2.js +322 -0
- package/dist/chunks/{report-preferences-dialog-B8PhISua.js → report-preferences-dialog-BRaeufEi.js} +63 -62
- package/dist/chunks/{report-runtime-context-BhPzLTbS.js → report-runtime-context-NlOXwyRB.js} +1 -1
- package/dist/chunks/{resolve-dashboard-input-context-BfT8y5xL.js → resolve-dashboard-input-context-Cn9jumxl.js} +4924 -4823
- package/dist/chunks/{save-D985VvYp.js → save-0wu1Z1U7.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-DH91-2B9.js → saved-dashboard-context-CfqkUMzR.js} +6 -6
- package/dist/chunks/selection-filter-compiler-BReJy-uv.js +92 -0
- package/dist/chunks/{semaphor-ready-indicator-Cg_Z2IDc.js → semaphor-ready-indicator-D6WjdTGl.js} +48377 -47074
- package/dist/chunks/{shelf-drop-preview-context-C7-BgcP4.js → shelf-drop-preview-context-Bbbrr9u4.js} +5 -5
- package/dist/chunks/{stored-dashboard-BpyCiE49.js → stored-dashboard-sPkTjxYf.js} +210 -221
- package/dist/chunks/{style-sheet-parts-C7qGZuH1.js → style-sheet-parts-_dGSFzDi.js} +2 -2
- package/dist/chunks/{table-export-sheet-wBkk17aa.js → table-export-sheet-Dmtqi5NV.js} +1 -1
- package/dist/chunks/{token-types-iKMplaBL.js → token-types-DEe_FP4l.js} +1 -1
- package/dist/chunks/{upload-CiGNKJ_0.js → upload-CtyOkU_B.js} +1 -1
- package/dist/chunks/{validators-B8fpdinG.js → validators-CJ8Jh0E8.js} +2 -2
- package/dist/chunks/{variable-draft-D8GFhAkm.js → variable-draft-D1RotIEG.js} +4 -4
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +670 -647
- package/dist/format-utils/index.js +218 -215
- package/dist/index.js +234 -231
- package/dist/report-runtime-context/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/components/visual/data-table/types/data-table.d.ts +3 -0
- package/dist/types/components/visual/matrix-table/matrix-interaction-actions.d.ts +24 -3
- package/dist/types/index.js +5 -5
- package/dist/types/lib/hooks/interactions/use-drill-actions.d.ts +1 -1
- package/dist/types/lib/interactions/get-click-context-from-chartjs.d.ts +9 -0
- package/dist/types/lib/matrix-table/matrix-runtime.d.ts +8 -3
- package/dist/types/lib/query-context/compile-selection-filters.d.ts +1 -5
- package/dist/types/lib/see-records/click.d.ts +79 -0
- package/dist/types/lib/see-records/see-records-offer.d.ts +25 -0
- package/dist/types/lib/see-records/use-see-records-offer.d.ts +16 -0
- package/dist/types/lib/types/common-types.d.ts +6 -0
- package/dist/types/shared/analytics-protocol/aggregate-expression.d.ts +7 -0
- package/dist/types/shared/analytics-protocol/aggregate-measure-field.d.ts +13 -0
- package/dist/types/shared/analytics-protocol/index.d.ts +1 -0
- package/dist/types/shared/analytics-protocol/selection-filter-compiler.d.ts +3 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +6 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
- package/dist/types/shared/dashboard-authoring/index.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/kpi-date-context.d.ts +191 -0
- package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/see-records/availability.d.ts +30 -0
- package/dist/types/shared/dashboard-authoring/see-records/click.d.ts +37 -0
- package/dist/types/shared/dashboard-authoring/see-records/index.d.ts +12 -0
- package/dist/types/shared/dashboard-authoring/see-records/limits.d.ts +18 -0
- package/dist/types/shared/dashboard-authoring/see-records/measure-kind.d.ts +49 -0
- package/dist/types/shared/dashboard-authoring/see-records/request.d.ts +28 -0
- package/dist/types/shared/dashboard-authoring/see-records/result.d.ts +94 -0
- package/dist/types/shared/format-utils/semantic-format.d.ts +0 -1
- package/dist/types/shared/format-utils/temporal-bucket.d.ts +20 -0
- package/dist/types/shared/temporal/calendar-periods.d.ts +15 -0
- package/dist/types/shared/temporal/raw-temporal-equality.d.ts +14 -0
- package/dist/types/shared/usage-events/envelope.d.ts +4 -4
- package/package.json +1 -1
- package/dist/chunks/comparison-window-caption-sRFtnX1q.js +0 -1371
- package/dist/chunks/raw-temporal-value-DdT0s47W.js +0 -159
- package/dist/chunks/selection-filter-compiler-CUDRnUxc.js +0 -80
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { MetricComparisonMetadataEntry, ResolvedDateWindow, ComparisonUnavailableReason } from '../analytics-protocol/metric-comparison.js';
|
|
2
|
+
import { TemporalBucketMetadata } from '../analytics-protocol/contracts.js';
|
|
3
|
+
import { RelativeDateWindow } from '../analytics-protocol/relative-date/index.js';
|
|
4
|
+
/** Where the date came from: Trend By, a configured comparison date, the dataset's primary date, the date filter's field. */
|
|
5
|
+
export type KpiDateFieldSource = 'trend_by' | 'comparison_date' | 'primary_date' | 'filter_field';
|
|
6
|
+
/** A date range on the counted date, from the dashboard's filters or the card's own. */
|
|
7
|
+
export type KpiDateWindowFact = {
|
|
8
|
+
source: 'dashboard' | 'card';
|
|
9
|
+
filterId?: string;
|
|
10
|
+
/** A dashboard date that replaced the card's own range on this field (Global Date). */
|
|
11
|
+
governing?: true;
|
|
12
|
+
/**
|
|
13
|
+
* Not applied by the run: the card's own range a governing dashboard date
|
|
14
|
+
* replaced, or any window the period counted doesn't lie inside (a
|
|
15
|
+
* comparison ran another window in its place, or the filter didn't reach
|
|
16
|
+
* the card).
|
|
17
|
+
*/
|
|
18
|
+
replaced?: true;
|
|
19
|
+
/** The range as the database evaluates it. */
|
|
20
|
+
window?: ResolvedDateWindow;
|
|
21
|
+
/** The relative window it was written as, when it is one, as stored. */
|
|
22
|
+
relative?: unknown;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* A condition on the counted date that is not a range (an open bound such as
|
|
26
|
+
* "on or after", an exclusion, an empty check) or that sits inside an OR or
|
|
27
|
+
* negated group: it narrows the value without a window. As a filter value,
|
|
28
|
+
* so the filter line words it.
|
|
29
|
+
*/
|
|
30
|
+
export type KpiDateConditionFact = {
|
|
31
|
+
source: 'dashboard' | 'card';
|
|
32
|
+
filterId?: string;
|
|
33
|
+
operation: string;
|
|
34
|
+
values: unknown[];
|
|
35
|
+
valueType?: string;
|
|
36
|
+
relative?: unknown;
|
|
37
|
+
/**
|
|
38
|
+
* Inside an OR or negated group: what it does depends on the group's logic,
|
|
39
|
+
* which is not carried, so it is stated as a condition group, never by its
|
|
40
|
+
* own operator.
|
|
41
|
+
*/
|
|
42
|
+
conditional?: true;
|
|
43
|
+
};
|
|
44
|
+
/** One clicked value, and the stretch of it the number counts. */
|
|
45
|
+
export type KpiDateSelectedValue = {
|
|
46
|
+
value: string | number | null;
|
|
47
|
+
/** The label the click carried. */
|
|
48
|
+
label?: string;
|
|
49
|
+
/** The stretch a clicked bucket names (`temporalBucketPeriod`); a raw date-time has none. */
|
|
50
|
+
bucket?: ResolvedDateWindow;
|
|
51
|
+
/**
|
|
52
|
+
* The part of the bucket inside the period's date windows, when they cut
|
|
53
|
+
* it (a month clicked under "Last 7 days"); `empty` when they share none.
|
|
54
|
+
* Absent when the whole bucket counts.
|
|
55
|
+
*/
|
|
56
|
+
counted?: {
|
|
57
|
+
status: 'window';
|
|
58
|
+
window: ResolvedDateWindow;
|
|
59
|
+
} | {
|
|
60
|
+
status: 'empty';
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* A click on another card that narrows the counted date (comparison under
|
|
65
|
+
* selection CS-D1). Values are ORed; several sources AND.
|
|
66
|
+
*/
|
|
67
|
+
export type KpiDateSelectionFact = {
|
|
68
|
+
sourceCardId: string;
|
|
69
|
+
values: KpiDateSelectedValue[];
|
|
70
|
+
/** The same values moved by the comparison's offset (CS-D3), against the compared period, when the card compares. */
|
|
71
|
+
compared?: KpiDateSelectedValue[];
|
|
72
|
+
temporalBucket?: TemporalBucketMetadata;
|
|
73
|
+
};
|
|
74
|
+
/** What the server reports beside a config KPI's rows (`KpiResultMetadata.dateContext`). */
|
|
75
|
+
export type KpiDateContext = {
|
|
76
|
+
/** Absent when no date is in use: nothing on Trend By, no primary date, no date filter's field. */
|
|
77
|
+
field?: {
|
|
78
|
+
name: string;
|
|
79
|
+
label?: string;
|
|
80
|
+
source: KpiDateFieldSource;
|
|
81
|
+
};
|
|
82
|
+
windows: KpiDateWindowFact[];
|
|
83
|
+
/** Date conditions beside the windows, as the run kept them. */
|
|
84
|
+
conditions?: KpiDateConditionFact[];
|
|
85
|
+
selections?: KpiDateSelectionFact[];
|
|
86
|
+
/** The windows' intersection; `empty` when they share no instant; absent when no window applies. */
|
|
87
|
+
counted?: {
|
|
88
|
+
status: 'window';
|
|
89
|
+
window: ResolvedDateWindow;
|
|
90
|
+
} | {
|
|
91
|
+
status: 'empty';
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
export type KpiDateWindowView = {
|
|
95
|
+
source: 'dashboard_filter' | 'governing_date' | 'card';
|
|
96
|
+
applied: boolean;
|
|
97
|
+
window?: ResolvedDateWindow;
|
|
98
|
+
relative?: RelativeDateWindow;
|
|
99
|
+
};
|
|
100
|
+
type PeriodComparisonKind = Exclude<MetricComparisonMetadataEntry['type'], 'target'>;
|
|
101
|
+
export type KpiCountedPeriod = {
|
|
102
|
+
kind: 'window';
|
|
103
|
+
window: ResolvedDateWindow;
|
|
104
|
+
relative?: RelativeDateWindow;
|
|
105
|
+
} | {
|
|
106
|
+
kind: 'empty';
|
|
107
|
+
} | {
|
|
108
|
+
kind: 'all_time';
|
|
109
|
+
} | {
|
|
110
|
+
kind: 'no_date';
|
|
111
|
+
};
|
|
112
|
+
/** The date context as the tile and the editor state it. */
|
|
113
|
+
export type KpiDateContextView = {
|
|
114
|
+
field?: KpiDateContext['field'];
|
|
115
|
+
windows: KpiDateWindowView[];
|
|
116
|
+
/** Date conditions beside the windows: the period is narrower than its dates say. */
|
|
117
|
+
conditions: KpiDateConditionFact[];
|
|
118
|
+
/** Every click narrowing the date, one per source card (ANDed). */
|
|
119
|
+
selections: KpiDateSelectionFact[];
|
|
120
|
+
counted: KpiCountedPeriod;
|
|
121
|
+
/** The compared period, when the comparison ran. */
|
|
122
|
+
compared?: {
|
|
123
|
+
window: ResolvedDateWindow;
|
|
124
|
+
kind: PeriodComparisonKind;
|
|
125
|
+
};
|
|
126
|
+
/** Why the card's period comparison is off, when it is. */
|
|
127
|
+
comparisonOff?: {
|
|
128
|
+
kind: PeriodComparisonKind;
|
|
129
|
+
reason: ComparisonUnavailableReason;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Two applied windows narrow each other, so the number counts only their
|
|
133
|
+
* overlap (KD-D5), named by where the windows come from: the dashboard's
|
|
134
|
+
* and the card's, two of the dashboard's, or two of the card's own.
|
|
135
|
+
*/
|
|
136
|
+
overlap?: 'dashboard_and_card' | 'dashboard' | 'card';
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* The date context from the response: the server's facts and the value's
|
|
140
|
+
* comparison entry (`getComparisonMetadataForMetric`). Undefined for a
|
|
141
|
+
* response without the facts (a SQL KPI, an older response).
|
|
142
|
+
*/
|
|
143
|
+
export declare function readKpiDateContext(context: KpiDateContext | undefined, comparison?: MetricComparisonMetadataEntry): KpiDateContextView | undefined;
|
|
144
|
+
export type KpiDateWordsOptions = {
|
|
145
|
+
/** The title of the card a click came from. */
|
|
146
|
+
cardTitle?: (cardId: string) => string | undefined;
|
|
147
|
+
/** Dates in this year read without it. Defaults to now. */
|
|
148
|
+
now?: Date;
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* A window as compact dates, in its own time zone: "Nov 2", "Nov 1 – 3",
|
|
152
|
+
* "Oct 28 – Nov 3", the year added when it isn't this year's; a window
|
|
153
|
+
* ending partway through a day with its end time ("Nov 1 – 3, until 3:00 PM");
|
|
154
|
+
* one starting partway through a day with both times.
|
|
155
|
+
*/
|
|
156
|
+
export declare function describeDateWindow(window: ResolvedDateWindow, now?: Date): string;
|
|
157
|
+
/** The editor's Date section (KD-D4, KD-D5). */
|
|
158
|
+
export type KpiDateSectionWords = {
|
|
159
|
+
field?: {
|
|
160
|
+
name: string;
|
|
161
|
+
from: string;
|
|
162
|
+
};
|
|
163
|
+
windows: Array<{
|
|
164
|
+
text: string;
|
|
165
|
+
from: string;
|
|
166
|
+
applied: boolean;
|
|
167
|
+
}>;
|
|
168
|
+
counts: string;
|
|
169
|
+
compared?: string;
|
|
170
|
+
note?: {
|
|
171
|
+
tone: 'warn' | 'muted';
|
|
172
|
+
text: string;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
export declare function describeKpiDateSection(view: KpiDateContextView, options?: KpiDateWordsOptions): KpiDateSectionWords;
|
|
176
|
+
/** The tile's lines (KD-D3): the period it counts, and the compared period or why there is none. */
|
|
177
|
+
export type KpiTileDateWords = {
|
|
178
|
+
/** The muted line under the title; absent with no date in use. */
|
|
179
|
+
period?: {
|
|
180
|
+
text: string;
|
|
181
|
+
clicked: boolean;
|
|
182
|
+
};
|
|
183
|
+
/** Ends the comparison line in place of "previous". */
|
|
184
|
+
compared?: string;
|
|
185
|
+
/** Replaces the comparison when it is off. */
|
|
186
|
+
off?: string;
|
|
187
|
+
};
|
|
188
|
+
export declare function describeKpiTileDate(view: KpiDateContextView, options?: Pick<KpiDateWordsOptions, 'now'>): KpiTileDateWords;
|
|
189
|
+
/** The Trend By shelf's hint when it is empty (KD-D6). */
|
|
190
|
+
export declare function kpiTrendByHint(view: KpiDateContextView | undefined): string | undefined;
|
|
191
|
+
export {};
|
|
@@ -3,6 +3,7 @@ import { CardConfig, MetricField } from '../../lib/types/explorer-types.js';
|
|
|
3
3
|
import { ComparisonMetadataMap } from '../../lib/types/query-types.js';
|
|
4
4
|
import { MetricComparisonEvaluation, MetricComparisonPolarity } from '../analytics-protocol/index.js';
|
|
5
5
|
import { TemporalBucketMetadata } from '../analytics-protocol/contracts.js';
|
|
6
|
+
import { KpiDateContext } from './kpi-date-context.js';
|
|
6
7
|
type KpiCard = Pick<TCard, 'sql' | 'config' | 'preferences'>;
|
|
7
8
|
/**
|
|
8
9
|
* Which column is the value, by source. The shape reads ids, never formats, so
|
|
@@ -102,6 +103,8 @@ export type KpiResultMetadata = {
|
|
|
102
103
|
comparisonMetadata?: ComparisonMetadataMap;
|
|
103
104
|
/** The trend's grain and calendar, when the response has trend rows (KL-D28). */
|
|
104
105
|
trend?: TemporalBucketMetadata;
|
|
106
|
+
/** Which date it counts, its windows and its compared period (KPI date context KD-D1). */
|
|
107
|
+
dateContext?: KpiDateContext;
|
|
105
108
|
};
|
|
106
109
|
/** The id a row names its measure by (`id`, else `name`): the server writes it, the owner reads it. */
|
|
107
110
|
export declare function kpiSegmentMetricId(metric: Pick<MetricField, 'id' | 'name'>): string;
|
|
@@ -144,6 +147,17 @@ export type KpiFigure = {
|
|
|
144
147
|
type KpiRecords = readonly Record<string, unknown>[] | null | undefined;
|
|
145
148
|
/** A finite number from a numeric value or a numeric string (thousands commas allowed). */
|
|
146
149
|
export declare function toFiniteKpiNumber(value: unknown): number | null;
|
|
150
|
+
/**
|
|
151
|
+
* One number a config KPI shows, as its result row names it: the measure id
|
|
152
|
+
* the server wrote and the row's value. Only a measure's current value is a
|
|
153
|
+
* number of its own; its comparison and trend are not (see-records SR-D28, SR-D33).
|
|
154
|
+
*/
|
|
155
|
+
export type KpiNumberIdentity = {
|
|
156
|
+
metricId: string;
|
|
157
|
+
value: number | null;
|
|
158
|
+
};
|
|
159
|
+
/** The measure's current-value row, or undefined when the response has none. */
|
|
160
|
+
export declare function readKpiNumber(records: KpiRecords, measure: Pick<MetricField, 'id' | 'name'>): KpiNumberIdentity | undefined;
|
|
147
161
|
/** A SQL KPI's result keys: its first numeric column is the value, the second the prior. */
|
|
148
162
|
export declare function sqlKpiResultKeys(records: KpiRecords): KpiFigure['resultKeys'];
|
|
149
163
|
/**
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { TCard } from '../../../lib/types/common-types.js';
|
|
2
|
+
import { FilterGroup } from '../../../lib/types/explorer-types.js';
|
|
3
|
+
import { SeeRecordsClick } from './click.js';
|
|
4
|
+
export type SeeRecordsUnavailableReason = 'switched_off' | 'sql_card' | 'unsupported_visual' | 'table_calculation' | 'comparison_value' | 'total_under_measure_filter' | 'measure_not_listable' | 'card_updating' | 'records_repeat';
|
|
5
|
+
/** The viewer's words for each reason, used by the browser and by the server's refusals. */
|
|
6
|
+
export declare const SEE_RECORDS_MESSAGES: Record<SeeRecordsUnavailableReason, string>;
|
|
7
|
+
export type SeeRecordsAvailability = {
|
|
8
|
+
available: true;
|
|
9
|
+
} | {
|
|
10
|
+
available: false;
|
|
11
|
+
reason: SeeRecordsUnavailableReason;
|
|
12
|
+
message: string;
|
|
13
|
+
};
|
|
14
|
+
/** The card fields availability reads. */
|
|
15
|
+
export type SeeRecordsCard = Pick<TCard, 'type' | 'config' | 'sql' | 'python' | 'seeRecords'>;
|
|
16
|
+
/** A measure filter in a table's own filters: a condition on a measure that aggregates (SR-D17). */
|
|
17
|
+
export declare function hasSeeRecordsMeasureFilter(group: FilterGroup | undefined): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* The card's part of the check, before any click: whether the card offers
|
|
20
|
+
* See records at all (the Interactions preview reads it), and why not.
|
|
21
|
+
*/
|
|
22
|
+
export declare function seeRecordsCardAvailability(card: SeeRecordsCard, frame: {
|
|
23
|
+
isCurrentQueryResult: boolean;
|
|
24
|
+
}): SeeRecordsAvailability;
|
|
25
|
+
/** The browser's check, on the saved card and the frame's result: show, hide or disable the offer. */
|
|
26
|
+
export declare function seeRecordsAvailability(card: SeeRecordsCard, click: SeeRecordsClick, frame: {
|
|
27
|
+
isCurrentQueryResult: boolean;
|
|
28
|
+
}): SeeRecordsAvailability;
|
|
29
|
+
/** Whether a reason hides the offer rather than disabling it (SR-INV-5). */
|
|
30
|
+
export declare function seeRecordsReasonHidesOffer(reason: SeeRecordsUnavailableReason): boolean;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ClickFilterCondition } from '../../../lib/types/interaction-types.js';
|
|
2
|
+
/**
|
|
3
|
+
* The clicked measure, by the id the card's result gave it (ED-15): a KPI
|
|
4
|
+
* segment's `metricId` (`kpiSegmentMetricId`), a chart's `semaphorMetricId`,
|
|
5
|
+
* the column key map's metric entry for a table column, a Matrix `measureId`.
|
|
6
|
+
*/
|
|
7
|
+
export type SeeRecordsMeasureRef = {
|
|
8
|
+
kind: 'metric';
|
|
9
|
+
resultId: string;
|
|
10
|
+
} | {
|
|
11
|
+
kind: 'matrix';
|
|
12
|
+
measureId: string;
|
|
13
|
+
};
|
|
14
|
+
/** Which part of a card was clicked. Numbers only (SR-D27). */
|
|
15
|
+
export type SeeRecordsClickKind = 'cell' | 'subtotal' | 'grandTotal' | 'kpi';
|
|
16
|
+
export type SeeRecordsClick = {
|
|
17
|
+
sourceCardId: string;
|
|
18
|
+
kind: SeeRecordsClickKind;
|
|
19
|
+
/** Every header, category, series and pivot member the value sits under, AND-ed. Empty for a KPI and a grand total. */
|
|
20
|
+
conditions: readonly ClickFilterCondition[];
|
|
21
|
+
measure: SeeRecordsMeasureRef;
|
|
22
|
+
/** A table totals cell: the column's total kind (`TableColumnTotal`). */
|
|
23
|
+
totalKind?: 'overall' | 'sumOfRows';
|
|
24
|
+
/** The clicked column is a comparison (previous period, change), not the measure itself. */
|
|
25
|
+
comparison?: true;
|
|
26
|
+
/** The number on screen; for the count check only, never to filter. */
|
|
27
|
+
shownValue?: number;
|
|
28
|
+
/** What the viewer clicked, in their words, for the title. Empty for a KPI or a grand total. */
|
|
29
|
+
label: string;
|
|
30
|
+
/**
|
|
31
|
+
* A Matrix number: the levels its row and column paths state, by level id.
|
|
32
|
+
* A total states fewer; one above a measure-filtered level is not listed (SR-D17).
|
|
33
|
+
*/
|
|
34
|
+
matrixLevelIds?: readonly string[];
|
|
35
|
+
};
|
|
36
|
+
/** The id a click names its measure by. */
|
|
37
|
+
export declare function seeRecordsMeasureId(measure: SeeRecordsMeasureRef): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* See records: click a number, see the records behind it
|
|
3
|
+
* (semaphor-app docs/implementation-plans/see-records). The shared contract
|
|
4
|
+
* the browser and the server both use: limits, the click, what a measure
|
|
5
|
+
* lists, availability and its words, the request and the result.
|
|
6
|
+
*/
|
|
7
|
+
export * from './limits.js';
|
|
8
|
+
export * from './click.js';
|
|
9
|
+
export * from './measure-kind.js';
|
|
10
|
+
export * from './availability.js';
|
|
11
|
+
export * from './request.js';
|
|
12
|
+
export * from './result.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const SEE_RECORDS_LIMITS: {
|
|
2
|
+
readonly pageSize: 100;
|
|
3
|
+
/** Rows the sheet shows (SR-D9). */
|
|
4
|
+
readonly maxRows: 500;
|
|
5
|
+
/** Rows a download carries: the direct CSV ceiling (SR-D29). */
|
|
6
|
+
readonly maxDownloadRows: 10000;
|
|
7
|
+
/** Columns a list starts with before the viewer adds more. */
|
|
8
|
+
readonly maxInferredColumns: 12;
|
|
9
|
+
/** Steps and added columns one request may carry. */
|
|
10
|
+
readonly maxSteps: 20;
|
|
11
|
+
readonly maxAddedColumns: 20;
|
|
12
|
+
};
|
|
13
|
+
/** The last page a list shows: maxRows / pageSize. */
|
|
14
|
+
export declare const SEE_RECORDS_MAX_PAGE: number;
|
|
15
|
+
/** Card types that offer See records in this plan (SR-D14, SR-D20). */
|
|
16
|
+
export declare const SEE_RECORDS_CARD_TYPES: readonly ["table", "matrixTable", "kpi", "bar", "horizontalBar", "stackedBar", "line", "stackedLine", "area", "stackedArea", "combo", "pie", "doughnut", "funnel"];
|
|
17
|
+
export type SeeRecordsCardType = (typeof SEE_RECORDS_CARD_TYPES)[number];
|
|
18
|
+
export declare function isSeeRecordsCardType(type: unknown): type is SeeRecordsCardType;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Field, MetricField } from '../../../lib/types/explorer-types.js';
|
|
2
|
+
export type SeeRecordsRowAggregate = 'count' | 'sum' | 'avg' | 'min' | 'max' | 'median';
|
|
3
|
+
/**
|
|
4
|
+
* `valueIsTheAggregate`: the number the card shows is the aggregate call
|
|
5
|
+
* itself, nothing computed around it. `COUNT({x})` is; `COUNT({x}) + 1` and
|
|
6
|
+
* `{orders} * 2` are not. Only then can a list's count be checked against the
|
|
7
|
+
* number shown (SR-INV-2, ledger P1-11).
|
|
8
|
+
*/
|
|
9
|
+
export type SeeRecordsMeasureKind =
|
|
10
|
+
/** COUNT(*): one line per grain row; no field to test for null. */
|
|
11
|
+
{
|
|
12
|
+
kind: 'rowCount';
|
|
13
|
+
valueIsTheAggregate: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* One aggregate call over row values: one line per grain row. `rowField` is
|
|
17
|
+
* what the call reads per row: the one input field, or the row expression
|
|
18
|
+
* over several (`{field_0} * {field_1}` for SUM({a} * {b})).
|
|
19
|
+
*/
|
|
20
|
+
| {
|
|
21
|
+
kind: 'rows';
|
|
22
|
+
aggregate: SeeRecordsRowAggregate;
|
|
23
|
+
rowField: Field;
|
|
24
|
+
valueIsTheAggregate: boolean;
|
|
25
|
+
}
|
|
26
|
+
/** COUNT(DISTINCT field): one line per distinct value of `rowField`. */
|
|
27
|
+
| {
|
|
28
|
+
kind: 'distinct';
|
|
29
|
+
rowField: Field;
|
|
30
|
+
valueIsTheAggregate: boolean;
|
|
31
|
+
}
|
|
32
|
+
/** More than one aggregate call: the viewer lists one input at a time. */
|
|
33
|
+
| {
|
|
34
|
+
kind: 'calculation';
|
|
35
|
+
inputs: readonly MetricField[];
|
|
36
|
+
} | {
|
|
37
|
+
kind: 'unlistable';
|
|
38
|
+
reason: 'table_calculation' | 'measure_not_listable';
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* A field as a plain column of a list: no aggregate, measure filters or
|
|
42
|
+
* comparison, not pre-aggregated, and the detail role, so a filter on it is a
|
|
43
|
+
* row filter (WHERE), never a measure filter (HAVING), and the list never
|
|
44
|
+
* compares. A calculated measure's `isPreAggregated` says its expression
|
|
45
|
+
* holds its own aggregate; on the row expression it reads, the filter
|
|
46
|
+
* compiler would take the field for a stored column (ledger P5-06).
|
|
47
|
+
*/
|
|
48
|
+
export declare function seeRecordsRowField(field: Field): Field;
|
|
49
|
+
export declare function seeRecordsMeasureKind(measure: MetricField): SeeRecordsMeasureKind;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SeeRecordsClick } from './click.js';
|
|
3
|
+
/** A field of a reached dataset: `dataset` named as the join-safety owners name it, `field` the field's `name`. */
|
|
4
|
+
export type SeeRecordsColumnRef = {
|
|
5
|
+
dataset: string;
|
|
6
|
+
field: string;
|
|
7
|
+
};
|
|
8
|
+
/** Steps name a list column; the server binds the field and builds the condition. */
|
|
9
|
+
export type SeeRecordsStep = {
|
|
10
|
+
kind: 'only';
|
|
11
|
+
column: SeeRecordsColumnRef;
|
|
12
|
+
value: string | number | boolean | null;
|
|
13
|
+
} | {
|
|
14
|
+
kind: 'groupBy';
|
|
15
|
+
column: SeeRecordsColumnRef;
|
|
16
|
+
};
|
|
17
|
+
export type SeeRecordsRequest = {
|
|
18
|
+
click: SeeRecordsClick;
|
|
19
|
+
/** For a calculation: which input to list. Absent: the first listable input. */
|
|
20
|
+
inputMeasureId?: string;
|
|
21
|
+
steps: readonly SeeRecordsStep[];
|
|
22
|
+
addedColumns: readonly SeeRecordsColumnRef[];
|
|
23
|
+
/** 1-based; 1 to maxRows / pageSize. */
|
|
24
|
+
page: number;
|
|
25
|
+
/** One page of up to maxDownloadRows, for the file (SR-D29). `page` must be 1. */
|
|
26
|
+
download?: true;
|
|
27
|
+
};
|
|
28
|
+
export declare const seeRecordsRequestSchema: z.ZodType<SeeRecordsRequest>;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { OperationTemporalState } from '../../analytics-protocol/operation-temporal-state.js';
|
|
2
|
+
import { RawTemporalValueMetadata, SemaphorResultColumn } from '../../analytics-protocol/contracts.js';
|
|
3
|
+
import { SeeRecordsColumnRef } from './request.js';
|
|
4
|
+
/** One line per record of the grain dataset, or one line per value of a group column. */
|
|
5
|
+
export type SeeRecordsShape = 'rows' | 'groups';
|
|
6
|
+
/**
|
|
7
|
+
* Why a column is in the list: `date` the grain's primary date (rows lists
|
|
8
|
+
* only); `display` a dataset's display field; `card` one of the
|
|
9
|
+
* card's dimensions; `measureField` the measure's row field; `group` the
|
|
10
|
+
* group column; `added` from More columns; `count` the line's record count;
|
|
11
|
+
* `measure` the clicked measure per group.
|
|
12
|
+
*/
|
|
13
|
+
export type SeeRecordsColumnRole = 'date' | 'display' | 'card' | 'measureField' | 'group' | 'added' | 'count' | 'measure';
|
|
14
|
+
export type SeeRecordsColumn = {
|
|
15
|
+
/** The key of this column's value in each row. */
|
|
16
|
+
key: string;
|
|
17
|
+
label: string;
|
|
18
|
+
/** Absent for `count` and `measure`. */
|
|
19
|
+
ref?: SeeRecordsColumnRef;
|
|
20
|
+
role: SeeRecordsColumnRole;
|
|
21
|
+
dataType: SemaphorResultColumn['dataType'];
|
|
22
|
+
/** Offers Only this and Group by. False for `count`, `measure`, and date and time columns. */
|
|
23
|
+
narrowable: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* A date the run returned raw, in the report timezone, and the kind it is:
|
|
26
|
+
* the run's own result-column metadata, so the dialog draws it as a Detail
|
|
27
|
+
* table draws the same column. Absent on any other column.
|
|
28
|
+
*/
|
|
29
|
+
rawTemporal?: RawTemporalValueMetadata;
|
|
30
|
+
};
|
|
31
|
+
/** One folder of More columns: a dataset and the fields a list can add from it. */
|
|
32
|
+
export type SeeRecordsColumnFolder = {
|
|
33
|
+
/** As a column ref names it (`SeeRecordsColumnRef.dataset`). */
|
|
34
|
+
dataset: string;
|
|
35
|
+
label: string;
|
|
36
|
+
/** The datasets' labels from the line's dataset to this one; empty for the line's own. */
|
|
37
|
+
path: readonly string[];
|
|
38
|
+
columns: readonly {
|
|
39
|
+
field: string;
|
|
40
|
+
label: string;
|
|
41
|
+
}[];
|
|
42
|
+
/**
|
|
43
|
+
* The folder this one opens from (see-records related columns P2-14): the
|
|
44
|
+
* dataset one step nearer the line on its route, and, when that step joins
|
|
45
|
+
* on one field the parent offers, that field, so the picker nests the
|
|
46
|
+
* folder under it. Absent on the line's own folder.
|
|
47
|
+
*/
|
|
48
|
+
parent?: {
|
|
49
|
+
dataset: string;
|
|
50
|
+
field?: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
export type SeeRecordsResult = {
|
|
54
|
+
shape: SeeRecordsShape;
|
|
55
|
+
/** The listed measure's label, then the click's label when it has one. */
|
|
56
|
+
title: string;
|
|
57
|
+
columns: readonly SeeRecordsColumn[];
|
|
58
|
+
rows: readonly Record<string, unknown>[];
|
|
59
|
+
/** The list's own count. Paging and Download read this, never the shown number. */
|
|
60
|
+
totalCount: number | null;
|
|
61
|
+
page: number;
|
|
62
|
+
hasMore: boolean;
|
|
63
|
+
/** totalCount > maxRows. */
|
|
64
|
+
capped: boolean;
|
|
65
|
+
/** Download is refused above maxDownloadRows, and when totalCount is null (SR-D29). */
|
|
66
|
+
downloadable: boolean;
|
|
67
|
+
/** Only on a level whose count must equal the clicked number (SR-INV-2). */
|
|
68
|
+
countMismatch?: {
|
|
69
|
+
shown: number;
|
|
70
|
+
listed: number;
|
|
71
|
+
};
|
|
72
|
+
/** A calculation's other listable inputs; empty otherwise. */
|
|
73
|
+
inputAlternatives: readonly {
|
|
74
|
+
inputMeasureId: string;
|
|
75
|
+
label: string;
|
|
76
|
+
}[];
|
|
77
|
+
/**
|
|
78
|
+
* More columns, one folder per dataset a line belongs to: the line's own
|
|
79
|
+
* dataset first, then the datasets the card reaches, then the datasets
|
|
80
|
+
* reached through to-one relationships (see-records related columns SC-D1,
|
|
81
|
+
* SC-D8). Fields with one value per line, not hidden and not shown; a
|
|
82
|
+
* dataset with none has no folder.
|
|
83
|
+
*/
|
|
84
|
+
columnFolders: readonly SeeRecordsColumnFolder[];
|
|
85
|
+
/**
|
|
86
|
+
* The name of the records the list counts: the dataset whose rows the
|
|
87
|
+
* listed measure aggregates, by its label ("Dashboard Requests"). A grouped
|
|
88
|
+
* list's More columns names it in its hint (see-records related columns
|
|
89
|
+
* P2-13).
|
|
90
|
+
*/
|
|
91
|
+
recordsLabel: string;
|
|
92
|
+
/** The instant and anchors this exploration keeps; sent back with every later request. */
|
|
93
|
+
temporalState: OperationTemporalState;
|
|
94
|
+
};
|
|
@@ -35,7 +35,6 @@ export type CanonicalAdapterOptions = {
|
|
|
35
35
|
numericInput?: 'canonical';
|
|
36
36
|
};
|
|
37
37
|
export declare const DEFAULT_LOCALE = "en-US";
|
|
38
|
-
export declare function isHistoricalCodelessCurrencyFormat(format: LegacySemanticFormat): boolean;
|
|
39
38
|
export declare function normalizeLocaleOrCurrency(value: unknown): string | undefined;
|
|
40
39
|
export declare function normalizeNumericFormat(type: NumericCanonicalFormat['type'], format: LegacySemanticFormat, options?: CanonicalAdapterOptions): NumericCanonicalFormat;
|
|
41
40
|
export declare function normalizeDateFormat(format: LegacySemanticFormat): Extract<CanonicalFormatSpec, {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ExportWallClock } from './exporters/export-cells.js';
|
|
2
2
|
import { SemaphorTimeGrain, TemporalBucketFormat, TemporalBucketMetadata, TemporalBucketPreset } from '../analytics-protocol/contracts.js';
|
|
3
|
+
import { TemporalShift } from '../temporal/calendar-periods.js';
|
|
3
4
|
import { ResolvedTemporalStyleSet } from './raw-temporal.js';
|
|
4
5
|
export type { TemporalBucketMetadata } from '../analytics-protocol/contracts.js';
|
|
5
6
|
export type TemporalBucketValue = string | null;
|
|
@@ -69,6 +70,25 @@ export declare class TemporalBucketContractError extends Error {
|
|
|
69
70
|
constructor(code: TemporalBucketContractError['code'], message: string);
|
|
70
71
|
}
|
|
71
72
|
export declare function parseTemporalBucketValue(value: TemporalBucketValue, metadata: TemporalBucketMetadata): TemporalBucketValueParseResult;
|
|
73
|
+
/**
|
|
74
|
+
* A clicked bucket moved by a shift and snapped to the start of the bucket it
|
|
75
|
+
* lands in, on its own calendar (week start, fiscal year): Nov 2 one month
|
|
76
|
+
* back is Oct 2; the week of Nov 2 one month back is the week holding Oct 2;
|
|
77
|
+
* 01:00 one month back is 01:00, whichever occurrence, since the bucket
|
|
78
|
+
* compiler matches the wall clock. Undefined for a value that isn't canonical.
|
|
79
|
+
*/
|
|
80
|
+
export declare function shiftTemporalBucketValue(value: TemporalBucketValue, metadata: TemporalBucketMetadata, shift: TemporalShift): string | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* The stretch of time a bucket names, on its own calendar: from its start to
|
|
83
|
+
* the next bucket's start (a day, a week from its week start, a fiscal
|
|
84
|
+
* quarter). Read where a clicked bucket is stated as dates (KPI date context
|
|
85
|
+
* KD-D2). Undefined for a value that isn't canonical, or a blank.
|
|
86
|
+
*/
|
|
87
|
+
export declare function temporalBucketPeriod(value: TemporalBucketValue, metadata: TemporalBucketMetadata): {
|
|
88
|
+
startInclusive: string;
|
|
89
|
+
endExclusive: string;
|
|
90
|
+
timezone: string;
|
|
91
|
+
} | undefined;
|
|
72
92
|
/**
|
|
73
93
|
* A bucket's grain and governed calendar in words, for a reader that restates
|
|
74
94
|
* a bucketed condition ("by hour in the America/Chicago calendar; each value
|
|
@@ -16,6 +16,15 @@ export type TemporalPeriod = {
|
|
|
16
16
|
export type WallClockTime = Required<ZonedWallClockTime>;
|
|
17
17
|
/** Units measured as elapsed time rather than on the calendar, in milliseconds. */
|
|
18
18
|
export declare const ELAPSED_UNIT_MILLISECONDS: Partial<Record<TemporalUnit, number>>;
|
|
19
|
+
/**
|
|
20
|
+
* A move along the calendar: whole months (the day clamped to the month's
|
|
21
|
+
* last), whole days, or seconds, as a period comparison moves its window and
|
|
22
|
+
* every selection under it (comparison under selection CS-D4).
|
|
23
|
+
*/
|
|
24
|
+
export type TemporalShift = {
|
|
25
|
+
amount: number;
|
|
26
|
+
unit: 'month' | 'day' | 'second';
|
|
27
|
+
};
|
|
19
28
|
/** The wall clock at an instant, with its milliseconds (offsets are whole seconds). */
|
|
20
29
|
export declare function wallClockAt(instant: Date, tz: string): WallClockTime;
|
|
21
30
|
/** The instant a wall clock names, under the daylight-saving rule (K7). */
|
|
@@ -29,6 +38,12 @@ export declare function daysInMonth(year: number, month: number): number;
|
|
|
29
38
|
export declare function shiftWallClock(wall: WallClockTime, amount: number, unit: TemporalUnit): WallClockTime;
|
|
30
39
|
/** The weekday of a wall date, 0 for Sunday. */
|
|
31
40
|
export declare function wallWeekday(wall: Pick<WallClockTime, 'year' | 'month' | 'day'>): number;
|
|
41
|
+
/**
|
|
42
|
+
* The wall clock where the period containing `wall` starts: the week on the
|
|
43
|
+
* calendar's week start, quarters and years on its fiscal year (calendar
|
|
44
|
+
* quarters and years without one).
|
|
45
|
+
*/
|
|
46
|
+
export declare function startOfPeriodWall(wall: WallClockTime, unit: Exclude<TemporalUnit, 'second' | 'minute' | 'hour'>, calendar: TemporalCalendar): WallClockTime;
|
|
32
47
|
/**
|
|
33
48
|
* The period `offset` periods from the one containing `instant` (0 for that
|
|
34
49
|
* period, -1 for the one before). Calendar periods are found in the wall
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { RawTemporalSelection } from '../analytics-protocol/contracts.js';
|
|
2
|
+
import { TemporalShift } from './calendar-periods.js';
|
|
1
3
|
/** An `=` or `!=` on a raw date-time selection, as the instants its value names. */
|
|
2
4
|
export type RawTemporalEquality = {
|
|
3
5
|
operation: '=' | '!=';
|
|
@@ -17,3 +19,15 @@ export declare function readRawTemporalEquality(predicate: {
|
|
|
17
19
|
values: unknown;
|
|
18
20
|
rawTemporal?: unknown;
|
|
19
21
|
}): RawTemporalEquality | null;
|
|
22
|
+
/**
|
|
23
|
+
* A raw date a viewer clicked, moved by a period comparison's shift
|
|
24
|
+
* (comparison under selection CS-D3), read by the same grammar the selection
|
|
25
|
+
* filter reads it with (`parseRawTemporalValue`), as its kind: a date moves
|
|
26
|
+
* its day; a wall date-time moves its wall clock; an instant moves along the
|
|
27
|
+
* report's calendar and is written in UTC. The fraction after the second is
|
|
28
|
+
* kept digit for digit (a whole-second shift never changes it), so
|
|
29
|
+
* `2026-10-23T13:31:11.981000` stays a six-digit value. Undefined for text
|
|
30
|
+
* the grammar doesn't read as its kind: the selection filter doesn't read it
|
|
31
|
+
* as a raw date either.
|
|
32
|
+
*/
|
|
33
|
+
export declare function shiftRawTemporalSelectionValue(value: string, selection: RawTemporalSelection, shift: TemporalShift): string | undefined;
|
|
@@ -91,10 +91,10 @@ export declare const usageEventEnvelopeSchema: z.ZodObject<{
|
|
|
91
91
|
message: string;
|
|
92
92
|
} | null;
|
|
93
93
|
surface: "api" | "embed" | "console" | "mcp" | "public_link" | "scheduler" | "pdf_renderer";
|
|
94
|
-
category: "usage" | "runtime" | "delivery" | "agent";
|
|
95
|
-
connection_id: string | null;
|
|
96
94
|
card_id: string | null;
|
|
97
95
|
sheet_id: string | null;
|
|
96
|
+
category: "runtime" | "usage" | "delivery" | "agent";
|
|
97
|
+
connection_id: string | null;
|
|
98
98
|
outcome: "cancelled" | "failed" | "timed_out" | "succeeded" | null;
|
|
99
99
|
domain_id: string | null;
|
|
100
100
|
project_id: string | null;
|
|
@@ -120,10 +120,10 @@ export declare const usageEventEnvelopeSchema: z.ZodObject<{
|
|
|
120
120
|
message: string;
|
|
121
121
|
} | null;
|
|
122
122
|
surface: "api" | "embed" | "console" | "mcp" | "public_link" | "scheduler" | "pdf_renderer";
|
|
123
|
-
category: "usage" | "runtime" | "delivery" | "agent";
|
|
124
|
-
connection_id: string | null;
|
|
125
123
|
card_id: string | null;
|
|
126
124
|
sheet_id: string | null;
|
|
125
|
+
category: "runtime" | "usage" | "delivery" | "agent";
|
|
126
|
+
connection_id: string | null;
|
|
127
127
|
outcome: "cancelled" | "failed" | "timed_out" | "succeeded" | null;
|
|
128
128
|
domain_id: string | null;
|
|
129
129
|
project_id: string | null;
|