@nivaro/sdk 0.1.8 → 0.1.10
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/index.d.ts +3 -1
- package/dist/index.js +14 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -710,7 +710,7 @@ interface ReportWidgetConfig {
|
|
|
710
710
|
filter_field?: string;
|
|
711
711
|
} | null;
|
|
712
712
|
}
|
|
713
|
-
type ReportWidgetType = 'kpi' | 'kpi_group' | 'bar' | 'line' | 'donut' | 'table' | 'divider' | 'query' | 'queue' | 'calc' | 'movers' | 'heatmap' | 'waterfall' | 'narrative';
|
|
713
|
+
type ReportWidgetType = 'kpi' | 'kpi_group' | 'bar' | 'line' | 'donut' | 'table' | 'divider' | 'query' | 'queue' | 'calc' | 'movers' | 'heatmap' | 'waterfall' | 'narrative' | 'pareto' | 'stats' | 'scatter' | 'hot_records' | 'metric' | 'pivot' | 'ai_insight';
|
|
714
714
|
interface ReportWidget {
|
|
715
715
|
id: UUID;
|
|
716
716
|
type: ReportWidgetType;
|
|
@@ -855,6 +855,8 @@ declare function saveReportWidgets(id: UUID, widgets: Array<Partial<ReportWidget
|
|
|
855
855
|
declare function readReportWidgetData(id: UUID, widgetId: UUID, body?: {
|
|
856
856
|
date_range?: ReportDateRange | null;
|
|
857
857
|
entity_filters?: ReportEntityFilter[];
|
|
858
|
+
/** Drill hierarchies (#418): override the widget's dimension for this fetch. */
|
|
859
|
+
dimension_override?: string;
|
|
858
860
|
}): Command<{
|
|
859
861
|
data: ReportWidgetData;
|
|
860
862
|
}>;
|
package/dist/index.js
CHANGED
|
@@ -173,6 +173,20 @@ function startSessionRecording(app, origin, clip) {
|
|
|
173
173
|
if (app) body.app = app;
|
|
174
174
|
const resolved = origin ?? (typeof window !== "undefined" ? window.location.origin : void 0);
|
|
175
175
|
if (resolved) body.origin = resolved;
|
|
176
|
+
if (typeof window !== "undefined" && typeof navigator !== "undefined") {
|
|
177
|
+
try {
|
|
178
|
+
body.meta = {
|
|
179
|
+
user_agent: navigator.userAgent,
|
|
180
|
+
platform: navigator.userAgentData?.platform ?? navigator.platform ?? "",
|
|
181
|
+
screen: `${window.screen?.width ?? 0}x${window.screen?.height ?? 0}`,
|
|
182
|
+
viewport: `${window.innerWidth}x${window.innerHeight}`,
|
|
183
|
+
dpr: window.devicePixelRatio ?? 1,
|
|
184
|
+
language: navigator.language ?? "",
|
|
185
|
+
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone ?? ""
|
|
186
|
+
};
|
|
187
|
+
} catch {
|
|
188
|
+
}
|
|
189
|
+
}
|
|
176
190
|
if (clip) body.clip = true;
|
|
177
191
|
return cmd("POST", "/session-recordings/start", void 0, body);
|
|
178
192
|
}
|