@aifeatures/admin-react 0.12.0 → 0.14.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.cts CHANGED
@@ -122,11 +122,45 @@ interface ApiError {
122
122
  * its one second-dimension slot on a disambiguator; or because that kind of
123
123
  * report has no row set to split at all.
124
124
  *
125
- * All three are EXPECTED consequences of the request, never outages, so a
125
+ * `goals_exceed_report_budget` is the conversions report's own: this site's
126
+ * goal definitions are too large to send to the pipe in one request, and the
127
+ * message names the number of batches and says what to shorten. It is the
128
+ * only one of these that is a property of the SITE rather than of the
129
+ * request, which makes showing an outage and a Retry actively misleading —
130
+ * the retry repeats the same 400 forever, and the thing to change is a goal.
131
+ *
132
+ * `goal_not_found` says the named goal does not exist on this site. Emitted
133
+ * by the goals CRUD and by the conversions drill-down, which resolves a goal
134
+ * by display name.
135
+ *
136
+ * `goal_has_no_targets` is the drill-down's own, and it is a fact about the
137
+ * GOAL rather than the request: the goal matches events that carry no link,
138
+ * so there are no values to break down. `Form: Submission` has thousands of
139
+ * conversions and no recorded targets, because nothing says WHICH form. A
140
+ * client must not render this as "no conversions" — the number above it says
141
+ * otherwise — and must not offer a Retry.
142
+ *
143
+ * `filters_unsupported` (plural) is NOT `filter_unsupported` above. The
144
+ * singular one says a filter cannot be answered for this site and period;
145
+ * this one says the report refuses filters outright, because answering an
146
+ * unfiltered report under a filtered request is indistinguishable from
147
+ * honouring it. Conversions and its drill-down both emit it.
148
+ *
149
+ * `invalid_limit` is an ordinary bad parameter, included because a consumer
150
+ * narrowing on this union otherwise cannot name it.
151
+ *
152
+ * All of these are EXPECTED consequences of the request, never outages, so a
126
153
  * client that cannot tell them apart from an unreachable source shows the
127
154
  * wrong recovery for every one of them.
155
+ *
156
+ * NOT EXHAUSTIVE, and worth knowing before you narrow on it: the API emits
157
+ * several more codes this union has never listed — `goal_invalid`,
158
+ * `goal_conflict`, `goal_name_taken`, `goal_limit_reached`,
159
+ * `funnel_not_found`, `funnel_step_missing` and
160
+ * `funnel_window_precedes_coverage` among them. They belong here, but adding
161
+ * them is a change to the goals and funnels surfaces rather than this one.
128
162
  */
129
- code?: 'filter_unsupported' | 'range_invalid' | 'dimension_unsupported';
163
+ code?: 'filter_unsupported' | 'filters_unsupported' | 'range_invalid' | 'dimension_unsupported' | 'goals_exceed_report_budget' | 'goal_not_found' | 'goal_has_no_targets' | 'invalid_limit';
130
164
  }
131
165
  /**
132
166
  * A site's payment readiness (sites.paymentsStatus)
@@ -1418,6 +1452,64 @@ type AnalyticsTimeseries = AnalyticsSourced<AnalyticsTimeseriesRow[]> & {
1418
1452
  */
1419
1453
  timezone?: string;
1420
1454
  };
1455
+ /**
1456
+ * One goal's conversions for the window.
1457
+ *
1458
+ * `visitors` and `events` are different questions, not a precision choice: a
1459
+ * visitor who submits the same form three times is one visitor and three
1460
+ * events, and a merchant asking "how many leads" wants the second while one
1461
+ * asking "how many people" wants the first. Both are shown.
1462
+ */
1463
+ interface AnalyticsConversionRow {
1464
+ /** Display name, resolved server-side so a name containing a comma survives transit. */
1465
+ goal: string;
1466
+ kind: 'pageview' | 'scroll' | 'event';
1467
+ /**
1468
+ * True for the goals every collecting site has without defining anything.
1469
+ * Worth surfacing: it is the difference between "we count this for you" and
1470
+ * "you asked us to count this".
1471
+ */
1472
+ implicit: boolean;
1473
+ visitors: number;
1474
+ events: number;
1475
+ /**
1476
+ * Divided by SITE-WIDE unique visitors, not by anything on this row. Null —
1477
+ * never 0 — when the window had no visitors, because a rate of zero asserts
1478
+ * that visitors came and did not convert.
1479
+ */
1480
+ conversion_rate: number | null;
1481
+ }
1482
+ /**
1483
+ * The conversions report, which carries more than `AnalyticsSourced` on its ok
1484
+ * branch, and every extra field is there to stop a specific wrong reading:
1485
+ *
1486
+ * denominator — what the rates are a ratio OF. Rows do not sum
1487
+ * to 100%, and without this the panel would be
1488
+ * showing percentages of an unnamed whole.
1489
+ * window_precedes_collection — a low number is partly the range's doing.
1490
+ * first_seen_unavailable — "could not ask", which is not the same claim as
1491
+ * "nothing was collected". Same doctrine as
1492
+ * `AnalyticsStatus`: never guess coverage from a
1493
+ * failed lookup.
1494
+ *
1495
+ * They travel with the payload rather than being read off /status for the reason
1496
+ * `AnalyticsTimeseries.timezone` documents — they are separate requests, and
1497
+ * pairing them lets a status failure quietly change what a number means.
1498
+ */
1499
+ type AnalyticsConversions = {
1500
+ status: 'ok';
1501
+ data: AnalyticsConversionRow[];
1502
+ window: {
1503
+ from: string;
1504
+ to: string;
1505
+ };
1506
+ denominator: number;
1507
+ first_seen: string | null;
1508
+ first_seen_unavailable: boolean;
1509
+ window_precedes_collection: boolean;
1510
+ } | {
1511
+ status: 'unreachable';
1512
+ };
1421
1513
  type AnalyticsChannels = AnalyticsSourced<AnalyticsChannelRow[]>;
1422
1514
  type AnalyticsBreakdown = AnalyticsSourced<AnalyticsBreakdownRow[]>;
1423
1515
  /** Realtime sits outside the historical window, so it carries an as-of instant. */
@@ -1595,6 +1687,16 @@ interface AifeaturesApiClient {
1595
1687
  getAnalyticsRealtime(): Promise<AnalyticsRealtime>;
1596
1688
  /** First-touch acquisition folded into channels. Visits, not visitors. */
1597
1689
  getAnalyticsChannels(period: AnalyticsPeriod, filters?: AnalyticsFilter[]): Promise<AnalyticsChannels>;
1690
+ /**
1691
+ * Conversions per goal for the window.
1692
+ *
1693
+ * DELIBERATELY UNFILTERED, and unlike realtime this is the server's rule
1694
+ * rather than a choice here: the endpoint refuses `filters` with a named 400.
1695
+ * A goal is matched at query time across the whole window, and the rate's
1696
+ * denominator is site-wide visitors — a filtered denominator would make two
1697
+ * cards on one page divide by different wholes while both said "rate".
1698
+ */
1699
+ getAnalyticsConversions(period: AnalyticsPeriod): Promise<AnalyticsConversions>;
1598
1700
  /** One ranked breakdown, named by its path segment. */
1599
1701
  getAnalyticsBreakdown(name: AnalyticsBreakdownName, period: AnalyticsPeriod, filters?: AnalyticsFilter[]): Promise<AnalyticsBreakdown>;
1600
1702
  getEventDestinations(): Promise<EventDestination[]>;
@@ -2566,6 +2668,12 @@ interface UseAnalyticsReturn {
2566
2668
  summary: ReportSlot<AnalyticsSummary>;
2567
2669
  timeseries: ReportSlot<AnalyticsTimeseries>;
2568
2670
  channels: ReportSlot<AnalyticsChannels>;
2671
+ /**
2672
+ * Conversions is SITE-WIDE even when the panel is filtered, because the
2673
+ * endpoint refuses filters. Whatever renders it has to say so — everything
2674
+ * else in this return narrows with the pills and this one does not.
2675
+ */
2676
+ conversions: ReportSlot<AnalyticsConversions>;
2569
2677
  breakdowns: Record<string, ReportSlot<AnalyticsBreakdown>>;
2570
2678
  /** True until every report has settled, for the initial skeleton only. */
2571
2679
  isLoading: boolean;
@@ -2765,4 +2873,4 @@ interface AnalyticsViewProps {
2765
2873
  */
2766
2874
  declare function AnalyticsView({ filters: filtersProp, onFiltersChange, refreshKey, onBackToWebsite, className, published, lastPublishedAt, }: AnalyticsViewProps): react_jsx_runtime.JSX.Element;
2767
2875
 
2768
- export { type AdjustInventoryInput, type AifeaturesApiClient, AifeaturesApiError, type AifeaturesContextValue, AifeaturesProvider, type AifeaturesProviderProps, type AnalyticsBreakdown, type AnalyticsBreakdownName, type AnalyticsBreakdownRow, type AnalyticsChannelRow, type AnalyticsChannels, type AnalyticsFilter, type AnalyticsFilterDimension, type AnalyticsPeriod, type AnalyticsRealtime, type AnalyticsSourced, type AnalyticsStatus, type AnalyticsSummary, type AnalyticsSummaryData, type AnalyticsSummaryMetrics, type AnalyticsTimeseries, type AnalyticsTimeseriesRow, AnalyticsView, type AnalyticsViewProps, type ApiError, type Attachment, type BusinessSummary, type BusinessVisitors, type CreateEventDestinationInput, type CreateFormInput, type CreateOptionInput, type CreateProductInput, type CreatePromoInput, type CreateVariantInput, type Customer, type CustomerAddress, CustomerDetail, type CustomerDetail$1 as CustomerDetailData, type CustomerDetailProps, CustomersList, type CustomersListProps, type CustomersListResponse, type EmailDelivery, type EmailSideStatus, type EventDeliveriesListResponse, type EventDelivery, type EventDestination, type EventDestinationSecretResponse, type EventDestinationsListResponse, type Form, FormSettings, type FormSettingsProps, FormSubmissions, type FormSubmissionsProps, FormsDashboard, type FormsDashboardProps, FormsList, type FormsListProps, type FormsListResponse, type GetBusinessSummaryOptions, type GetCustomersOptions, type GetInvoicesOptions, type GetOrdersOptions, type GetPeopleOptions, type GetProductsOptions, type GetSubmissionsOptions, type GetSubscriptionsOptions, type Invoice, type InvoiceAggregates, type InvoiceBillTo, type InvoiceDeliveryState, InvoiceDetail, type InvoiceDetailProps, type InvoiceLabel, InvoiceLabelBadge, type InvoiceLineItem, type InvoicePreview, type InvoiceSettings, InvoicesList, type InvoicesListProps, InvoicesView, type InvoicesViewProps, LeadsView, type LeadsViewProps, type LowStockProduct, MAX_ANALYTICS_FILTERS, MAX_ANALYTICS_FILTER_VALUES, type NeedsAttentionItem, type NeedsAttentionType, type Order, OrderDetail, type OrderDetailProps, type OrderStatus, OrderStatusBadge, OrdersList, type OrdersListProps, OrdersView, type OrdersViewProps, type PaginatedInvoices, type PaginatedOrders, type PaginatedSubmissions, type PaginatedSubscriptions, PaymentsDashboard, type PaymentsDashboardProps, PaymentsSetup, type PaymentsSetupProps, type PaymentsStatus, type PaymentsStatusReason, type PaymentsStatusResponse, type PeopleListResponse, type Person, type PersonDetail, type PersonOrder, type PersonSource, type PersonSubmission, type Product, type ProductDetail, type ProductFulfillment, type ProductFulfillmentType, type ProductOption, ProductSettings, type ProductSettingsProps, type ProductStats, type ProductVariant, ProductsList, type ProductsListProps, type ProductsListResponse, ProductsView, type ProductsViewProps, type Promo, type PromosListResponse, PromosPanel, REALTIME_FAILURES_BEFORE_ERROR, REALTIME_POLL_MS, type RefundRequest, type ReportSlot, RetainerStatusBadge, RetainersPanel, type RetainersPanelProps, type RevenueCurrencyTotal, type RevenuePeriod, type SetInventoryInput, type SetOrderFulfillmentInput, type SettledRevenue, type Submission, SubmissionDetail, type SubmissionDetailProps, type SubmissionMetadata, type Subscription, SubscriptionsView, type SubscriptionsViewProps, type UpdateEventDestinationInput, type UpdateFormInput, type UpdateOptionInput, type UpdateProductInput, type UpdateVariantInput, type UseAnalyticsOptions, type UseAnalyticsReturn, type UseBusinessSummaryOptions, type UseBusinessSummaryReturn, type UseCustomersOptions, type UseCustomersReturn, type UseEventDestinationsReturn, type UseFormsReturn, type UseInvoicesOptions, type UseInvoicesReturn, type UseOrdersOptions, type UseOrdersReturn, type UsePaymentsStatusReturn, type UsePeopleOptions, type UsePeopleReturn, type UsePersonOptions, type UsePersonReturn, type UseProductsOptions, type UseProductsReturn, type UseRealtimeVisitorsReturn, type UseSubmissionsOptions, type UseSubmissionsReturn, type UseSubscriptionsOptions, type UseSubscriptionsReturn, type VariantInventory, type VariantOptionValue, VariantsEditor, type VariantsEditorProps, ViewShell, type ViewShellProps, WebhookDeliveries, type WebhookDeliveriesProps, WebhookSettings, type WebhookSettingsProps, chargedTotal, createApiClient, formatPrice, isZeroDecimalCurrency, toMajorUnits, toMinorUnits, useAifeaturesContext as useAifeatures, useAifeaturesContext, useAnalytics, useBusinessSummary, useCustomers, useEventDestinations, useForms, useInvoices, useOrders, usePaymentsStatus, usePeople, usePerson, useProducts, useRealtimeVisitors, useRetainers, useSubmissions, useSubscriptions };
2876
+ export { type AdjustInventoryInput, type AifeaturesApiClient, AifeaturesApiError, type AifeaturesContextValue, AifeaturesProvider, type AifeaturesProviderProps, type AnalyticsBreakdown, type AnalyticsBreakdownName, type AnalyticsBreakdownRow, type AnalyticsChannelRow, type AnalyticsChannels, type AnalyticsConversionRow, type AnalyticsConversions, type AnalyticsFilter, type AnalyticsFilterDimension, type AnalyticsPeriod, type AnalyticsRealtime, type AnalyticsSourced, type AnalyticsStatus, type AnalyticsSummary, type AnalyticsSummaryData, type AnalyticsSummaryMetrics, type AnalyticsTimeseries, type AnalyticsTimeseriesRow, AnalyticsView, type AnalyticsViewProps, type ApiError, type Attachment, type BusinessSummary, type BusinessVisitors, type CreateEventDestinationInput, type CreateFormInput, type CreateOptionInput, type CreateProductInput, type CreatePromoInput, type CreateVariantInput, type Customer, type CustomerAddress, CustomerDetail, type CustomerDetail$1 as CustomerDetailData, type CustomerDetailProps, CustomersList, type CustomersListProps, type CustomersListResponse, type EmailDelivery, type EmailSideStatus, type EventDeliveriesListResponse, type EventDelivery, type EventDestination, type EventDestinationSecretResponse, type EventDestinationsListResponse, type Form, FormSettings, type FormSettingsProps, FormSubmissions, type FormSubmissionsProps, FormsDashboard, type FormsDashboardProps, FormsList, type FormsListProps, type FormsListResponse, type GetBusinessSummaryOptions, type GetCustomersOptions, type GetInvoicesOptions, type GetOrdersOptions, type GetPeopleOptions, type GetProductsOptions, type GetSubmissionsOptions, type GetSubscriptionsOptions, type Invoice, type InvoiceAggregates, type InvoiceBillTo, type InvoiceDeliveryState, InvoiceDetail, type InvoiceDetailProps, type InvoiceLabel, InvoiceLabelBadge, type InvoiceLineItem, type InvoicePreview, type InvoiceSettings, InvoicesList, type InvoicesListProps, InvoicesView, type InvoicesViewProps, LeadsView, type LeadsViewProps, type LowStockProduct, MAX_ANALYTICS_FILTERS, MAX_ANALYTICS_FILTER_VALUES, type NeedsAttentionItem, type NeedsAttentionType, type Order, OrderDetail, type OrderDetailProps, type OrderStatus, OrderStatusBadge, OrdersList, type OrdersListProps, OrdersView, type OrdersViewProps, type PaginatedInvoices, type PaginatedOrders, type PaginatedSubmissions, type PaginatedSubscriptions, PaymentsDashboard, type PaymentsDashboardProps, PaymentsSetup, type PaymentsSetupProps, type PaymentsStatus, type PaymentsStatusReason, type PaymentsStatusResponse, type PeopleListResponse, type Person, type PersonDetail, type PersonOrder, type PersonSource, type PersonSubmission, type Product, type ProductDetail, type ProductFulfillment, type ProductFulfillmentType, type ProductOption, ProductSettings, type ProductSettingsProps, type ProductStats, type ProductVariant, ProductsList, type ProductsListProps, type ProductsListResponse, ProductsView, type ProductsViewProps, type Promo, type PromosListResponse, PromosPanel, REALTIME_FAILURES_BEFORE_ERROR, REALTIME_POLL_MS, type RefundRequest, type ReportSlot, RetainerStatusBadge, RetainersPanel, type RetainersPanelProps, type RevenueCurrencyTotal, type RevenuePeriod, type SetInventoryInput, type SetOrderFulfillmentInput, type SettledRevenue, type Submission, SubmissionDetail, type SubmissionDetailProps, type SubmissionMetadata, type Subscription, SubscriptionsView, type SubscriptionsViewProps, type UpdateEventDestinationInput, type UpdateFormInput, type UpdateOptionInput, type UpdateProductInput, type UpdateVariantInput, type UseAnalyticsOptions, type UseAnalyticsReturn, type UseBusinessSummaryOptions, type UseBusinessSummaryReturn, type UseCustomersOptions, type UseCustomersReturn, type UseEventDestinationsReturn, type UseFormsReturn, type UseInvoicesOptions, type UseInvoicesReturn, type UseOrdersOptions, type UseOrdersReturn, type UsePaymentsStatusReturn, type UsePeopleOptions, type UsePeopleReturn, type UsePersonOptions, type UsePersonReturn, type UseProductsOptions, type UseProductsReturn, type UseRealtimeVisitorsReturn, type UseSubmissionsOptions, type UseSubmissionsReturn, type UseSubscriptionsOptions, type UseSubscriptionsReturn, type VariantInventory, type VariantOptionValue, VariantsEditor, type VariantsEditorProps, ViewShell, type ViewShellProps, WebhookDeliveries, type WebhookDeliveriesProps, WebhookSettings, type WebhookSettingsProps, chargedTotal, createApiClient, formatPrice, isZeroDecimalCurrency, toMajorUnits, toMinorUnits, useAifeaturesContext as useAifeatures, useAifeaturesContext, useAnalytics, useBusinessSummary, useCustomers, useEventDestinations, useForms, useInvoices, useOrders, usePaymentsStatus, usePeople, usePerson, useProducts, useRealtimeVisitors, useRetainers, useSubmissions, useSubscriptions };
package/dist/index.d.ts CHANGED
@@ -122,11 +122,45 @@ interface ApiError {
122
122
  * its one second-dimension slot on a disambiguator; or because that kind of
123
123
  * report has no row set to split at all.
124
124
  *
125
- * All three are EXPECTED consequences of the request, never outages, so a
125
+ * `goals_exceed_report_budget` is the conversions report's own: this site's
126
+ * goal definitions are too large to send to the pipe in one request, and the
127
+ * message names the number of batches and says what to shorten. It is the
128
+ * only one of these that is a property of the SITE rather than of the
129
+ * request, which makes showing an outage and a Retry actively misleading —
130
+ * the retry repeats the same 400 forever, and the thing to change is a goal.
131
+ *
132
+ * `goal_not_found` says the named goal does not exist on this site. Emitted
133
+ * by the goals CRUD and by the conversions drill-down, which resolves a goal
134
+ * by display name.
135
+ *
136
+ * `goal_has_no_targets` is the drill-down's own, and it is a fact about the
137
+ * GOAL rather than the request: the goal matches events that carry no link,
138
+ * so there are no values to break down. `Form: Submission` has thousands of
139
+ * conversions and no recorded targets, because nothing says WHICH form. A
140
+ * client must not render this as "no conversions" — the number above it says
141
+ * otherwise — and must not offer a Retry.
142
+ *
143
+ * `filters_unsupported` (plural) is NOT `filter_unsupported` above. The
144
+ * singular one says a filter cannot be answered for this site and period;
145
+ * this one says the report refuses filters outright, because answering an
146
+ * unfiltered report under a filtered request is indistinguishable from
147
+ * honouring it. Conversions and its drill-down both emit it.
148
+ *
149
+ * `invalid_limit` is an ordinary bad parameter, included because a consumer
150
+ * narrowing on this union otherwise cannot name it.
151
+ *
152
+ * All of these are EXPECTED consequences of the request, never outages, so a
126
153
  * client that cannot tell them apart from an unreachable source shows the
127
154
  * wrong recovery for every one of them.
155
+ *
156
+ * NOT EXHAUSTIVE, and worth knowing before you narrow on it: the API emits
157
+ * several more codes this union has never listed — `goal_invalid`,
158
+ * `goal_conflict`, `goal_name_taken`, `goal_limit_reached`,
159
+ * `funnel_not_found`, `funnel_step_missing` and
160
+ * `funnel_window_precedes_coverage` among them. They belong here, but adding
161
+ * them is a change to the goals and funnels surfaces rather than this one.
128
162
  */
129
- code?: 'filter_unsupported' | 'range_invalid' | 'dimension_unsupported';
163
+ code?: 'filter_unsupported' | 'filters_unsupported' | 'range_invalid' | 'dimension_unsupported' | 'goals_exceed_report_budget' | 'goal_not_found' | 'goal_has_no_targets' | 'invalid_limit';
130
164
  }
131
165
  /**
132
166
  * A site's payment readiness (sites.paymentsStatus)
@@ -1418,6 +1452,64 @@ type AnalyticsTimeseries = AnalyticsSourced<AnalyticsTimeseriesRow[]> & {
1418
1452
  */
1419
1453
  timezone?: string;
1420
1454
  };
1455
+ /**
1456
+ * One goal's conversions for the window.
1457
+ *
1458
+ * `visitors` and `events` are different questions, not a precision choice: a
1459
+ * visitor who submits the same form three times is one visitor and three
1460
+ * events, and a merchant asking "how many leads" wants the second while one
1461
+ * asking "how many people" wants the first. Both are shown.
1462
+ */
1463
+ interface AnalyticsConversionRow {
1464
+ /** Display name, resolved server-side so a name containing a comma survives transit. */
1465
+ goal: string;
1466
+ kind: 'pageview' | 'scroll' | 'event';
1467
+ /**
1468
+ * True for the goals every collecting site has without defining anything.
1469
+ * Worth surfacing: it is the difference between "we count this for you" and
1470
+ * "you asked us to count this".
1471
+ */
1472
+ implicit: boolean;
1473
+ visitors: number;
1474
+ events: number;
1475
+ /**
1476
+ * Divided by SITE-WIDE unique visitors, not by anything on this row. Null —
1477
+ * never 0 — when the window had no visitors, because a rate of zero asserts
1478
+ * that visitors came and did not convert.
1479
+ */
1480
+ conversion_rate: number | null;
1481
+ }
1482
+ /**
1483
+ * The conversions report, which carries more than `AnalyticsSourced` on its ok
1484
+ * branch, and every extra field is there to stop a specific wrong reading:
1485
+ *
1486
+ * denominator — what the rates are a ratio OF. Rows do not sum
1487
+ * to 100%, and without this the panel would be
1488
+ * showing percentages of an unnamed whole.
1489
+ * window_precedes_collection — a low number is partly the range's doing.
1490
+ * first_seen_unavailable — "could not ask", which is not the same claim as
1491
+ * "nothing was collected". Same doctrine as
1492
+ * `AnalyticsStatus`: never guess coverage from a
1493
+ * failed lookup.
1494
+ *
1495
+ * They travel with the payload rather than being read off /status for the reason
1496
+ * `AnalyticsTimeseries.timezone` documents — they are separate requests, and
1497
+ * pairing them lets a status failure quietly change what a number means.
1498
+ */
1499
+ type AnalyticsConversions = {
1500
+ status: 'ok';
1501
+ data: AnalyticsConversionRow[];
1502
+ window: {
1503
+ from: string;
1504
+ to: string;
1505
+ };
1506
+ denominator: number;
1507
+ first_seen: string | null;
1508
+ first_seen_unavailable: boolean;
1509
+ window_precedes_collection: boolean;
1510
+ } | {
1511
+ status: 'unreachable';
1512
+ };
1421
1513
  type AnalyticsChannels = AnalyticsSourced<AnalyticsChannelRow[]>;
1422
1514
  type AnalyticsBreakdown = AnalyticsSourced<AnalyticsBreakdownRow[]>;
1423
1515
  /** Realtime sits outside the historical window, so it carries an as-of instant. */
@@ -1595,6 +1687,16 @@ interface AifeaturesApiClient {
1595
1687
  getAnalyticsRealtime(): Promise<AnalyticsRealtime>;
1596
1688
  /** First-touch acquisition folded into channels. Visits, not visitors. */
1597
1689
  getAnalyticsChannels(period: AnalyticsPeriod, filters?: AnalyticsFilter[]): Promise<AnalyticsChannels>;
1690
+ /**
1691
+ * Conversions per goal for the window.
1692
+ *
1693
+ * DELIBERATELY UNFILTERED, and unlike realtime this is the server's rule
1694
+ * rather than a choice here: the endpoint refuses `filters` with a named 400.
1695
+ * A goal is matched at query time across the whole window, and the rate's
1696
+ * denominator is site-wide visitors — a filtered denominator would make two
1697
+ * cards on one page divide by different wholes while both said "rate".
1698
+ */
1699
+ getAnalyticsConversions(period: AnalyticsPeriod): Promise<AnalyticsConversions>;
1598
1700
  /** One ranked breakdown, named by its path segment. */
1599
1701
  getAnalyticsBreakdown(name: AnalyticsBreakdownName, period: AnalyticsPeriod, filters?: AnalyticsFilter[]): Promise<AnalyticsBreakdown>;
1600
1702
  getEventDestinations(): Promise<EventDestination[]>;
@@ -2566,6 +2668,12 @@ interface UseAnalyticsReturn {
2566
2668
  summary: ReportSlot<AnalyticsSummary>;
2567
2669
  timeseries: ReportSlot<AnalyticsTimeseries>;
2568
2670
  channels: ReportSlot<AnalyticsChannels>;
2671
+ /**
2672
+ * Conversions is SITE-WIDE even when the panel is filtered, because the
2673
+ * endpoint refuses filters. Whatever renders it has to say so — everything
2674
+ * else in this return narrows with the pills and this one does not.
2675
+ */
2676
+ conversions: ReportSlot<AnalyticsConversions>;
2569
2677
  breakdowns: Record<string, ReportSlot<AnalyticsBreakdown>>;
2570
2678
  /** True until every report has settled, for the initial skeleton only. */
2571
2679
  isLoading: boolean;
@@ -2765,4 +2873,4 @@ interface AnalyticsViewProps {
2765
2873
  */
2766
2874
  declare function AnalyticsView({ filters: filtersProp, onFiltersChange, refreshKey, onBackToWebsite, className, published, lastPublishedAt, }: AnalyticsViewProps): react_jsx_runtime.JSX.Element;
2767
2875
 
2768
- export { type AdjustInventoryInput, type AifeaturesApiClient, AifeaturesApiError, type AifeaturesContextValue, AifeaturesProvider, type AifeaturesProviderProps, type AnalyticsBreakdown, type AnalyticsBreakdownName, type AnalyticsBreakdownRow, type AnalyticsChannelRow, type AnalyticsChannels, type AnalyticsFilter, type AnalyticsFilterDimension, type AnalyticsPeriod, type AnalyticsRealtime, type AnalyticsSourced, type AnalyticsStatus, type AnalyticsSummary, type AnalyticsSummaryData, type AnalyticsSummaryMetrics, type AnalyticsTimeseries, type AnalyticsTimeseriesRow, AnalyticsView, type AnalyticsViewProps, type ApiError, type Attachment, type BusinessSummary, type BusinessVisitors, type CreateEventDestinationInput, type CreateFormInput, type CreateOptionInput, type CreateProductInput, type CreatePromoInput, type CreateVariantInput, type Customer, type CustomerAddress, CustomerDetail, type CustomerDetail$1 as CustomerDetailData, type CustomerDetailProps, CustomersList, type CustomersListProps, type CustomersListResponse, type EmailDelivery, type EmailSideStatus, type EventDeliveriesListResponse, type EventDelivery, type EventDestination, type EventDestinationSecretResponse, type EventDestinationsListResponse, type Form, FormSettings, type FormSettingsProps, FormSubmissions, type FormSubmissionsProps, FormsDashboard, type FormsDashboardProps, FormsList, type FormsListProps, type FormsListResponse, type GetBusinessSummaryOptions, type GetCustomersOptions, type GetInvoicesOptions, type GetOrdersOptions, type GetPeopleOptions, type GetProductsOptions, type GetSubmissionsOptions, type GetSubscriptionsOptions, type Invoice, type InvoiceAggregates, type InvoiceBillTo, type InvoiceDeliveryState, InvoiceDetail, type InvoiceDetailProps, type InvoiceLabel, InvoiceLabelBadge, type InvoiceLineItem, type InvoicePreview, type InvoiceSettings, InvoicesList, type InvoicesListProps, InvoicesView, type InvoicesViewProps, LeadsView, type LeadsViewProps, type LowStockProduct, MAX_ANALYTICS_FILTERS, MAX_ANALYTICS_FILTER_VALUES, type NeedsAttentionItem, type NeedsAttentionType, type Order, OrderDetail, type OrderDetailProps, type OrderStatus, OrderStatusBadge, OrdersList, type OrdersListProps, OrdersView, type OrdersViewProps, type PaginatedInvoices, type PaginatedOrders, type PaginatedSubmissions, type PaginatedSubscriptions, PaymentsDashboard, type PaymentsDashboardProps, PaymentsSetup, type PaymentsSetupProps, type PaymentsStatus, type PaymentsStatusReason, type PaymentsStatusResponse, type PeopleListResponse, type Person, type PersonDetail, type PersonOrder, type PersonSource, type PersonSubmission, type Product, type ProductDetail, type ProductFulfillment, type ProductFulfillmentType, type ProductOption, ProductSettings, type ProductSettingsProps, type ProductStats, type ProductVariant, ProductsList, type ProductsListProps, type ProductsListResponse, ProductsView, type ProductsViewProps, type Promo, type PromosListResponse, PromosPanel, REALTIME_FAILURES_BEFORE_ERROR, REALTIME_POLL_MS, type RefundRequest, type ReportSlot, RetainerStatusBadge, RetainersPanel, type RetainersPanelProps, type RevenueCurrencyTotal, type RevenuePeriod, type SetInventoryInput, type SetOrderFulfillmentInput, type SettledRevenue, type Submission, SubmissionDetail, type SubmissionDetailProps, type SubmissionMetadata, type Subscription, SubscriptionsView, type SubscriptionsViewProps, type UpdateEventDestinationInput, type UpdateFormInput, type UpdateOptionInput, type UpdateProductInput, type UpdateVariantInput, type UseAnalyticsOptions, type UseAnalyticsReturn, type UseBusinessSummaryOptions, type UseBusinessSummaryReturn, type UseCustomersOptions, type UseCustomersReturn, type UseEventDestinationsReturn, type UseFormsReturn, type UseInvoicesOptions, type UseInvoicesReturn, type UseOrdersOptions, type UseOrdersReturn, type UsePaymentsStatusReturn, type UsePeopleOptions, type UsePeopleReturn, type UsePersonOptions, type UsePersonReturn, type UseProductsOptions, type UseProductsReturn, type UseRealtimeVisitorsReturn, type UseSubmissionsOptions, type UseSubmissionsReturn, type UseSubscriptionsOptions, type UseSubscriptionsReturn, type VariantInventory, type VariantOptionValue, VariantsEditor, type VariantsEditorProps, ViewShell, type ViewShellProps, WebhookDeliveries, type WebhookDeliveriesProps, WebhookSettings, type WebhookSettingsProps, chargedTotal, createApiClient, formatPrice, isZeroDecimalCurrency, toMajorUnits, toMinorUnits, useAifeaturesContext as useAifeatures, useAifeaturesContext, useAnalytics, useBusinessSummary, useCustomers, useEventDestinations, useForms, useInvoices, useOrders, usePaymentsStatus, usePeople, usePerson, useProducts, useRealtimeVisitors, useRetainers, useSubmissions, useSubscriptions };
2876
+ export { type AdjustInventoryInput, type AifeaturesApiClient, AifeaturesApiError, type AifeaturesContextValue, AifeaturesProvider, type AifeaturesProviderProps, type AnalyticsBreakdown, type AnalyticsBreakdownName, type AnalyticsBreakdownRow, type AnalyticsChannelRow, type AnalyticsChannels, type AnalyticsConversionRow, type AnalyticsConversions, type AnalyticsFilter, type AnalyticsFilterDimension, type AnalyticsPeriod, type AnalyticsRealtime, type AnalyticsSourced, type AnalyticsStatus, type AnalyticsSummary, type AnalyticsSummaryData, type AnalyticsSummaryMetrics, type AnalyticsTimeseries, type AnalyticsTimeseriesRow, AnalyticsView, type AnalyticsViewProps, type ApiError, type Attachment, type BusinessSummary, type BusinessVisitors, type CreateEventDestinationInput, type CreateFormInput, type CreateOptionInput, type CreateProductInput, type CreatePromoInput, type CreateVariantInput, type Customer, type CustomerAddress, CustomerDetail, type CustomerDetail$1 as CustomerDetailData, type CustomerDetailProps, CustomersList, type CustomersListProps, type CustomersListResponse, type EmailDelivery, type EmailSideStatus, type EventDeliveriesListResponse, type EventDelivery, type EventDestination, type EventDestinationSecretResponse, type EventDestinationsListResponse, type Form, FormSettings, type FormSettingsProps, FormSubmissions, type FormSubmissionsProps, FormsDashboard, type FormsDashboardProps, FormsList, type FormsListProps, type FormsListResponse, type GetBusinessSummaryOptions, type GetCustomersOptions, type GetInvoicesOptions, type GetOrdersOptions, type GetPeopleOptions, type GetProductsOptions, type GetSubmissionsOptions, type GetSubscriptionsOptions, type Invoice, type InvoiceAggregates, type InvoiceBillTo, type InvoiceDeliveryState, InvoiceDetail, type InvoiceDetailProps, type InvoiceLabel, InvoiceLabelBadge, type InvoiceLineItem, type InvoicePreview, type InvoiceSettings, InvoicesList, type InvoicesListProps, InvoicesView, type InvoicesViewProps, LeadsView, type LeadsViewProps, type LowStockProduct, MAX_ANALYTICS_FILTERS, MAX_ANALYTICS_FILTER_VALUES, type NeedsAttentionItem, type NeedsAttentionType, type Order, OrderDetail, type OrderDetailProps, type OrderStatus, OrderStatusBadge, OrdersList, type OrdersListProps, OrdersView, type OrdersViewProps, type PaginatedInvoices, type PaginatedOrders, type PaginatedSubmissions, type PaginatedSubscriptions, PaymentsDashboard, type PaymentsDashboardProps, PaymentsSetup, type PaymentsSetupProps, type PaymentsStatus, type PaymentsStatusReason, type PaymentsStatusResponse, type PeopleListResponse, type Person, type PersonDetail, type PersonOrder, type PersonSource, type PersonSubmission, type Product, type ProductDetail, type ProductFulfillment, type ProductFulfillmentType, type ProductOption, ProductSettings, type ProductSettingsProps, type ProductStats, type ProductVariant, ProductsList, type ProductsListProps, type ProductsListResponse, ProductsView, type ProductsViewProps, type Promo, type PromosListResponse, PromosPanel, REALTIME_FAILURES_BEFORE_ERROR, REALTIME_POLL_MS, type RefundRequest, type ReportSlot, RetainerStatusBadge, RetainersPanel, type RetainersPanelProps, type RevenueCurrencyTotal, type RevenuePeriod, type SetInventoryInput, type SetOrderFulfillmentInput, type SettledRevenue, type Submission, SubmissionDetail, type SubmissionDetailProps, type SubmissionMetadata, type Subscription, SubscriptionsView, type SubscriptionsViewProps, type UpdateEventDestinationInput, type UpdateFormInput, type UpdateOptionInput, type UpdateProductInput, type UpdateVariantInput, type UseAnalyticsOptions, type UseAnalyticsReturn, type UseBusinessSummaryOptions, type UseBusinessSummaryReturn, type UseCustomersOptions, type UseCustomersReturn, type UseEventDestinationsReturn, type UseFormsReturn, type UseInvoicesOptions, type UseInvoicesReturn, type UseOrdersOptions, type UseOrdersReturn, type UsePaymentsStatusReturn, type UsePeopleOptions, type UsePeopleReturn, type UsePersonOptions, type UsePersonReturn, type UseProductsOptions, type UseProductsReturn, type UseRealtimeVisitorsReturn, type UseSubmissionsOptions, type UseSubmissionsReturn, type UseSubscriptionsOptions, type UseSubscriptionsReturn, type VariantInventory, type VariantOptionValue, VariantsEditor, type VariantsEditorProps, ViewShell, type ViewShellProps, WebhookDeliveries, type WebhookDeliveriesProps, WebhookSettings, type WebhookSettingsProps, chargedTotal, createApiClient, formatPrice, isZeroDecimalCurrency, toMajorUnits, toMinorUnits, useAifeaturesContext as useAifeatures, useAifeaturesContext, useAnalytics, useBusinessSummary, useCustomers, useEventDestinations, useForms, useInvoices, useOrders, usePaymentsStatus, usePeople, usePerson, useProducts, useRealtimeVisitors, useRetainers, useSubmissions, useSubscriptions };