@liiift-studio/sanity-visitor-insights 0.9.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as sanity from 'sanity';
2
2
  import React from 'react';
3
- import { R as ReportEnvelope, a as ReportName, b as RangeKey, M as MetricValue, A as AcquisitionData, D as DiagnosticReport, J as JourneyData, c as MeasurementHealthData, T as TypefaceInterestData } from './ranges-B1YwjGGt.mjs';
4
- export { C as Coverage, d as DateRange, E as EventCutover, P as PREEXISTING, e as REPORT_NAMES, f as ReportError, S as SiteAnalyticsConfig, g as SourceName, h as SourceStatus, U as UnavailableReason, i as coverageForRange, j as isReportName, o as ok, p as partial, k as previousRange, r as resolveRange, u as unavailable, v as validateSiteConfig, l as valueOrNull } from './ranges-B1YwjGGt.mjs';
3
+ import { R as ReportEnvelope, a as ReportName, b as RangeKey, M as MetricValue, A as AcquisitionData, D as DiagnosticReport, J as JourneyData, c as MeasurementHealthData, T as TypefaceInterestData } from './ranges-YGStz1nR.mjs';
4
+ export { C as Coverage, d as DateRange, E as EventCutover, P as PREEXISTING, e as REPORT_NAMES, f as ReportError, S as SiteAnalyticsConfig, g as SourceName, h as SourceStatus, U as UnavailableReason, i as coverageForRange, j as isReportName, o as ok, p as partial, k as previousRange, r as resolveRange, u as unavailable, v as validateSiteConfig, l as valueOrNull } from './ranges-YGStz1nR.mjs';
5
5
 
6
6
  /**
7
7
  * The Visitor Insights Studio tool.
@@ -57,6 +57,11 @@ type ReportState<T> = {
57
57
  };
58
58
  /** Options for useReport. */
59
59
  interface UseReportOptions {
60
+ /** Explicit dates, required when `range` is 'custom' and ignored otherwise. */
61
+ custom?: {
62
+ start: string;
63
+ end: string;
64
+ };
60
65
  /** Base URL of the site serving the reports, e.g. `https://dardenstudio.com`. */
61
66
  apiBaseUrl: string;
62
67
  report: ReportName;
@@ -67,7 +72,7 @@ interface UseReportOptions {
67
72
  *
68
73
  * @returns the current state plus a `reload` for manual refresh
69
74
  */
70
- declare function useReport<T>({ apiBaseUrl, report, range }: UseReportOptions): {
75
+ declare function useReport<T>({ apiBaseUrl, report, range, custom }: UseReportOptions): {
71
76
  state: ReportState<T>;
72
77
  reload: () => void;
73
78
  };
@@ -165,7 +170,7 @@ declare function MeasurementHealthPanel({ data }: {
165
170
  declare function AcquisitionPanel({ data }: {
166
171
  data: AcquisitionData;
167
172
  }): React.ReactElement;
168
- /** Journey — per-step totals with adjacent drop-off, explicitly not a tracked path. */
173
+ /** Journey — a funnel, drawn as a tracked sequence or as independent totals, whichever the report used. */
169
174
  declare function JourneyPanel({ data }: {
170
175
  data: JourneyData;
171
176
  }): React.ReactElement;
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as sanity from 'sanity';
2
2
  import React from 'react';
3
- import { R as ReportEnvelope, a as ReportName, b as RangeKey, M as MetricValue, A as AcquisitionData, D as DiagnosticReport, J as JourneyData, c as MeasurementHealthData, T as TypefaceInterestData } from './ranges-B1YwjGGt.js';
4
- export { C as Coverage, d as DateRange, E as EventCutover, P as PREEXISTING, e as REPORT_NAMES, f as ReportError, S as SiteAnalyticsConfig, g as SourceName, h as SourceStatus, U as UnavailableReason, i as coverageForRange, j as isReportName, o as ok, p as partial, k as previousRange, r as resolveRange, u as unavailable, v as validateSiteConfig, l as valueOrNull } from './ranges-B1YwjGGt.js';
3
+ import { R as ReportEnvelope, a as ReportName, b as RangeKey, M as MetricValue, A as AcquisitionData, D as DiagnosticReport, J as JourneyData, c as MeasurementHealthData, T as TypefaceInterestData } from './ranges-YGStz1nR.js';
4
+ export { C as Coverage, d as DateRange, E as EventCutover, P as PREEXISTING, e as REPORT_NAMES, f as ReportError, S as SiteAnalyticsConfig, g as SourceName, h as SourceStatus, U as UnavailableReason, i as coverageForRange, j as isReportName, o as ok, p as partial, k as previousRange, r as resolveRange, u as unavailable, v as validateSiteConfig, l as valueOrNull } from './ranges-YGStz1nR.js';
5
5
 
6
6
  /**
7
7
  * The Visitor Insights Studio tool.
@@ -57,6 +57,11 @@ type ReportState<T> = {
57
57
  };
58
58
  /** Options for useReport. */
59
59
  interface UseReportOptions {
60
+ /** Explicit dates, required when `range` is 'custom' and ignored otherwise. */
61
+ custom?: {
62
+ start: string;
63
+ end: string;
64
+ };
60
65
  /** Base URL of the site serving the reports, e.g. `https://dardenstudio.com`. */
61
66
  apiBaseUrl: string;
62
67
  report: ReportName;
@@ -67,7 +72,7 @@ interface UseReportOptions {
67
72
  *
68
73
  * @returns the current state plus a `reload` for manual refresh
69
74
  */
70
- declare function useReport<T>({ apiBaseUrl, report, range }: UseReportOptions): {
75
+ declare function useReport<T>({ apiBaseUrl, report, range, custom }: UseReportOptions): {
71
76
  state: ReportState<T>;
72
77
  reload: () => void;
73
78
  };
@@ -165,7 +170,7 @@ declare function MeasurementHealthPanel({ data }: {
165
170
  declare function AcquisitionPanel({ data }: {
166
171
  data: AcquisitionData;
167
172
  }): React.ReactElement;
168
- /** Journey — per-step totals with adjacent drop-off, explicitly not a tracked path. */
173
+ /** Journey — a funnel, drawn as a tracked sequence or as independent totals, whichever the report used. */
169
174
  declare function JourneyPanel({ data }: {
170
175
  data: JourneyData;
171
176
  }): React.ReactElement;