@aifeatures/admin-react 0.16.0 → 0.18.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
@@ -1544,6 +1544,69 @@ type AnalyticsConversions = {
1544
1544
  } | {
1545
1545
  status: 'unreachable';
1546
1546
  };
1547
+ /**
1548
+ * One value behind a goal's conversions — a link, a file, a number, a form.
1549
+ *
1550
+ * `label` is what to show and `target` is what to store: for a form they
1551
+ * differ, because the label is the form's CURRENT name (resolved as the report
1552
+ * runs, so renaming rewrites its history rather than splitting it) while the
1553
+ * target is the endpoint it posts to.
1554
+ */
1555
+ interface AnalyticsGoalTargetRow {
1556
+ /** The value exactly as the page authored it, or the path for a `page` row. */
1557
+ target: string;
1558
+ /** What to show. Identical to `target` except for a form, which is named. */
1559
+ label: string;
1560
+ visitors: number;
1561
+ events: number;
1562
+ conversion_rate: number | null;
1563
+ }
1564
+ /**
1565
+ * One goal's values, ranked.
1566
+ *
1567
+ * NOT EVERY GOAL HAS ANY. The value is the link the page authored, so it
1568
+ * exists for outbound clicks, downloads, contact taps and the two form goals —
1569
+ * and does not exist for `Purchase` (nothing in a payment names a page-level
1570
+ * thing) or for a goal matching a path or a scroll depth. Asking about one of
1571
+ * those is a 400 naming the goal, deliberately, because an empty list reads as
1572
+ * "no conversions" when the truth is "this goal has no values".
1573
+ */
1574
+ type AnalyticsGoalTargets = {
1575
+ status: 'ok';
1576
+ data: AnalyticsGoalTargetRow[];
1577
+ window: {
1578
+ from: string;
1579
+ to: string;
1580
+ };
1581
+ timezone: string;
1582
+ /** Echoed back, so a client can label the table without trusting its own request. */
1583
+ goal: string;
1584
+ dimension: 'target' | 'page';
1585
+ denominator: number;
1586
+ /** True when more distinct values exist than were returned. */
1587
+ truncated: boolean;
1588
+ /**
1589
+ * What share of the goal these rows explain — and it must be rendered
1590
+ * whenever the two numbers differ.
1591
+ *
1592
+ * A value is recorded only from the deploy that began sending one, so a
1593
+ * goal with a long history can show a breakdown covering a sliver of
1594
+ * it: measured on one site the day before forms began carrying theirs,
1595
+ * 8,430 submissions and none with a value. An EMPTY list is therefore
1596
+ * not evidence of no conversions — `goal_events > 0` with
1597
+ * `with_a_value === 0` means they happened and their values were never
1598
+ * recorded, which is a different sentence entirely.
1599
+ *
1600
+ * Null means coverage could not be established, which is NOT zero
1601
+ * coverage.
1602
+ */
1603
+ coverage: {
1604
+ goal_events: number;
1605
+ with_a_value: number;
1606
+ } | null;
1607
+ } | {
1608
+ status: 'unreachable';
1609
+ };
1547
1610
  type AnalyticsChannels = AnalyticsSourced<AnalyticsChannelRow[]>;
1548
1611
  type AnalyticsBreakdown = AnalyticsSourced<AnalyticsBreakdownRow[]>;
1549
1612
  /** Realtime sits outside the historical window, so it carries an as-of instant. */
@@ -1731,6 +1794,19 @@ interface AifeaturesApiClient {
1731
1794
  * cards on one page divide by different wholes while both said "rate".
1732
1795
  */
1733
1796
  getAnalyticsConversions(period: AnalyticsPeriod): Promise<AnalyticsConversions>;
1797
+ /**
1798
+ * The values behind one goal's conversions, ranked.
1799
+ *
1800
+ * REJECTS SOME GOALS BY DESIGN: `Purchase` and any goal matching a path
1801
+ * or a scroll depth have no value to point at, and the server answers a
1802
+ * 400 naming the goal rather than an empty list — an empty list would
1803
+ * read as "no conversions" when the truth is "this goal has no values".
1804
+ * A caller offering target narrowing must treat that as "not narrowable",
1805
+ * not as a failure.
1806
+ */
1807
+ getAnalyticsGoalTargets(goal: string, period: AnalyticsPeriod,
1808
+ /** 1-100, server default 20. Read `truncated` to learn more exist. */
1809
+ limit?: number): Promise<AnalyticsGoalTargets>;
1734
1810
  /** One ranked breakdown, named by its path segment. */
1735
1811
  getAnalyticsBreakdown(name: AnalyticsBreakdownName, period: AnalyticsPeriod, filters?: AnalyticsFilter[]): Promise<AnalyticsBreakdown>;
1736
1812
  getEventDestinations(): Promise<EventDestination[]>;
@@ -2961,6 +3037,108 @@ declare function toMinorUnits(major: string | number, currency: string): number
2961
3037
  */
2962
3038
  declare function toMajorUnits(minor: number, currency: string): number;
2963
3039
 
3040
+ /**
3041
+ * THE CONVERSION THIS SITE IS JUDGED ON, said in one line.
3042
+ *
3043
+ * A MARKER, not a classification. Every site reports on the same tracked
3044
+ * conversions; this says which one of them is the business's own measure of a
3045
+ * good day, so the Dashboard can lead with it and the conversions table can
3046
+ * lift it out of the list.
3047
+ *
3048
+ * ITS GRAIN IS A GOAL PLUS AN OPTIONAL TARGET, which is the whole reason this
3049
+ * replaced an earlier five-value `SiteGoal` enum. "A form submission" is not
3050
+ * specific enough to be a business's goal once a site has more than one form:
3051
+ * on landingsite.ai the conversion that matters is the form that CREATES A
3052
+ * SITE, and `Form: Submission` aggregates every form on the page. For another
3053
+ * site the same goal means a newsletter sign-up, and for a third the answer is
3054
+ * an order instead. Five archetypes cannot express any of that.
3055
+ *
3056
+ * `target` ABSENT IS A REAL STATE, not a missing one — "this goal, any target".
3057
+ * It has to be, because a specific target is not always knowable: measured
3058
+ * 2026-10-11, 97.3% of sites have no form target recorded at all, since the
3059
+ * instrumentation is newer than the trackers most sites have cached. So a site
3060
+ * is markable from its first day at goal level, and narrowing to one target is
3061
+ * a refinement for the sites that can.
3062
+ *
3063
+ * WHY `label` IS THE HOST'S TO SUPPLY, AND OPTIONAL. The conversions targets
3064
+ * report already resolves a target to a human name where one exists — a form's
3065
+ * current name, else the raw endpoint. Only the host knows which of those it
3066
+ * got, and the difference decides the copy: "Your main conversion is Create a
3067
+ * site" reads as intended, while "Your main conversion is
3068
+ * api.example.com/f/3b2a" is worse than saying nothing specific. So the host
3069
+ * passes `label` ONLY when it holds a name a person wrote, and this component
3070
+ * never has to guess whether a string is a name or a URL.
3071
+ */
3072
+ interface PrimaryConversion {
3073
+ /**
3074
+ * The tracked goal's name, spelled as the conversions report spells it —
3075
+ * `Form: Submission`, `Contact`, `Outbound Link: Click`, `File Download`,
3076
+ * `Purchase`, `Form: Received`, or a goal the merchant created.
3077
+ *
3078
+ * Deliberately an open string rather than a union. The merchant can create
3079
+ * goals, so a closed set here would be wrong the moment one does.
3080
+ *
3081
+ * THE NAME IS THE REPORT'S OWN KEY, not a label beside an id: "matching is
3082
+ * query-time and the display name is the key reports are keyed by", and a
3083
+ * conversions row carries no id at all. So matching on it is not a shortcut
3084
+ * — it is the only join the report offers.
3085
+ *
3086
+ * WHICH MAKES A BUILT-IN SAFE AND A CUSTOM GOAL NOT, and a host persisting
3087
+ * this needs to know the difference. The six built-ins "are not rows and
3088
+ * cannot be renamed or deleted", so their names are permanent. A goal the
3089
+ * merchant created can be renamed through `PATCH /analytics/goals/{id}`,
3090
+ * which keeps its id and relabels every historical report — so a stored
3091
+ * marker naming the old one stops matching any row, and because goal names
3092
+ * are unique per site rather than reserved, a NEW goal can later take the
3093
+ * freed name and inherit the mark silently.
3094
+ *
3095
+ * Until the conversions report exposes a goal id, a host should therefore
3096
+ * either mark only built-ins, or re-validate a custom marker against the
3097
+ * current conversions and drop it when it no longer matches. Dropping is
3098
+ * safe here: an unset marker renders nothing by design.
3099
+ */
3100
+ goal: string;
3101
+ /**
3102
+ * Whether this is one of the six BUILT-IN goals, as the conversions row
3103
+ * reports it.
3104
+ *
3105
+ * It decides whether curated copy may be used at all, and it has to, because
3106
+ * a name is not proof of a built-in. The goals API shipped hours before
3107
+ * these names were reserved, so a merchant could already have created a
3108
+ * PAGEVIEW goal called `Purchase` — and when that happens the API keeps
3109
+ * theirs and drops the derived one, reporting `implicit: false`. Trusting
3110
+ * the name alone would tell that merchant "This site is set up to sell"
3111
+ * about a goal that counts visits to `/thanks`.
3112
+ *
3113
+ * Absent means "not established", and curated copy is withheld rather than
3114
+ * guessed: a host that forgets this gets the generic line, which is less
3115
+ * specific but never wrong. The opposite default would be wrong exactly
3116
+ * where it is hardest to notice.
3117
+ *
3118
+ * WHEN IT ARRIVES FROM THE PICKER IT IS AS-OF THE MOMENT THE LIST LOADED,
3119
+ * and a host PERSISTING a marker must re-derive it from the live report
3120
+ * rather than storing this value. Goals are resolved by display NAME, so a
3121
+ * name can change hands between the list loading and the choice being made:
3122
+ * delete a pre-reservation custom `Contact` and the built-in `Contact`
3123
+ * takes its place, with the opposite `implicit`. Storing the stale flag
3124
+ * would produce a marker that matches no current conversion.
3125
+ *
3126
+ * The reference host does this — its mutation accepts only the goal and an
3127
+ * optional target, and reads `implicit` off the matching conversions row as
3128
+ * it writes. A host that cannot re-derive should expect the picker to flag
3129
+ * the marker as stale the next time it opens, which is the recovery path
3130
+ * rather than a prevention.
3131
+ */
3132
+ implicit?: boolean;
3133
+ /** One target under that goal, or null/undefined for "any target". */
3134
+ target?: string | null;
3135
+ /**
3136
+ * A human name for what is marked, when the host has one. Omit it rather
3137
+ * than passing an endpoint or a URL — see the note above.
3138
+ */
3139
+ label?: string;
3140
+ }
3141
+
2964
3142
  interface AnalyticsViewProps {
2965
3143
  /**
2966
3144
  * Filters, when the HOST wants to own them — to put them in its URL, say.
@@ -2976,6 +3154,16 @@ interface AnalyticsViewProps {
2976
3154
  /** Bump to force a refetch, matching the other views. */
2977
3155
  refreshKey?: number;
2978
3156
  onBackToWebsite?: () => void;
3157
+ /**
3158
+ * The conversion this business is judged on, so its row in the conversions
3159
+ * table reads as the one that matters.
3160
+ *
3161
+ * THE SAME SHAPE THE DASHBOARD TAKES, so a host passes one object for one
3162
+ * fact rather than two differently-shaped things. This view uses only
3163
+ * `goal`: it has no headline to name a target in, and the table has one row
3164
+ * per goal.
3165
+ */
3166
+ primaryConversion?: PrimaryConversion | null;
2979
3167
  className?: string;
2980
3168
  /**
2981
3169
  * Publish state, supplied by the host: aifeatures has none of its own.
@@ -3005,37 +3193,7 @@ interface AnalyticsViewProps {
3005
3193
  * `published === false` overrides a collecting status: an unpublished site
3006
3194
  * with nothing ever seen is the first row above, not the third.
3007
3195
  */
3008
- declare function AnalyticsView({ filters: filtersProp, onFiltersChange, refreshKey, onBackToWebsite, className, published, lastPublishedAt, }: AnalyticsViewProps): react_jsx_runtime.JSX.Element;
3009
-
3010
- /**
3011
- * What this site is trying to get its visitors to do, said in one line.
3012
- *
3013
- * The site builder already decides this: picking a conversion mechanism is a
3014
- * gated first step of every build — form, external link, phone-first, or
3015
- * native payments — and the CTA it writes is the artifact of that decision.
3016
- * This names it back to the owner.
3017
- *
3018
- * The vocabulary deliberately matches the conversion goals that already
3019
- * report on these events, so the headline and the numbers under it describe
3020
- * the same thing in the same words rather than two vocabularies for one site.
3021
- *
3022
- * WHATSAPP IS ITS OWN GOAL, not a kind of `outbound`, because the fleet says
3023
- * so: measured over the 30 days to 2026-10-11, a WhatsApp link is the
3024
- * dominant conversion for 179 sites — 11.7% of every site with any
3025
- * conversion at all, and more sites than every named booking platform
3026
- * combined (Fresha, Square, SkyTab, Toast, HotDoc, Clover and SpotOn are 1-5
3027
- * sites each). Folding it into `outbound` would tell 179 merchants their site
3028
- * is "set up to send visitors on to book with you", which is not what a
3029
- * message thread is. It is not generalised to "messaging" either: Telegram is
3030
- * 2 sites and Messenger, Signal and `sms:` are none, so a broader word would
3031
- * only make the line vaguer for the ones it actually describes.
3032
- *
3033
- * `unknown` renders NOTHING. The derivation is lazy and improvable, so a site
3034
- * it cannot settle yet is normal rather than broken — and naming the wrong
3035
- * goal on a merchant's own dashboard is worse than naming none. An
3036
- * undetermined goal costs this line, never the screen.
3037
- */
3038
- type SiteGoal = "calls" | "enquiries" | "sales" | "whatsapp" | "outbound" | "unknown";
3196
+ declare function AnalyticsView({ filters: filtersProp, onFiltersChange, refreshKey, onBackToWebsite, primaryConversion, className, published, lastPublishedAt, }: AnalyticsViewProps): react_jsx_runtime.JSX.Element;
3039
3197
 
3040
3198
  interface DashboardViewProps {
3041
3199
  /** Bumped by the host after any turn that touched business data. */
@@ -3046,8 +3204,22 @@ interface DashboardViewProps {
3046
3204
  * Facts the package cannot know, supplied by the host — the same contract
3047
3205
  * the analytics view already uses.
3048
3206
  */
3049
- /** What the site is for. `unknown` until the derivation ships; renders nothing. */
3050
- goal?: SiteGoal;
3207
+ /**
3208
+ * Which tracked conversion this business is judged on — a goal, optionally
3209
+ * narrowed to one target. Absent renders nothing, which is the state of a
3210
+ * site nobody has marked yet.
3211
+ */
3212
+ primaryConversion?: PrimaryConversion | null;
3213
+ /**
3214
+ * Hand this in and the headline becomes editable: the merchant picks from
3215
+ * the conversions their own site reports, or clears the marker.
3216
+ *
3217
+ * The host persists it — the package has no idea where a marker lives, and
3218
+ * a control that discarded the change would be worse than no control. Its
3219
+ * absence is a real state: a host that cannot persist one gets 0.17.0's
3220
+ * read-only line, and an unmarked site then renders nothing at all.
3221
+ */
3222
+ onChangePrimaryConversion?: (next: PrimaryConversion | null) => void;
3051
3223
  /**
3052
3224
  * Host callback to change the active surface. Without it the storefront
3053
3225
  * entries render nothing, because a panel that claims to lead somewhere and
@@ -3081,6 +3253,6 @@ interface DashboardViewProps {
3081
3253
  * own call and fails alone. Nothing here claims per-panel isolation it does
3082
3254
  * not have.
3083
3255
  */
3084
- declare function DashboardView({ refreshKey, onBackToWebsite, goal, onOpenSurface, needsPaidPlan, onUpgradePlan, onConnectStripe, }: DashboardViewProps): react_jsx_runtime.JSX.Element;
3256
+ declare function DashboardView({ refreshKey, onBackToWebsite, primaryConversion, onChangePrimaryConversion, onOpenSurface, needsPaidPlan, onUpgradePlan, onConnectStripe, }: DashboardViewProps): react_jsx_runtime.JSX.Element;
3085
3257
 
3086
- 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, DashboardView, type DashboardViewProps, 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 SiteGoal, 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 };
3258
+ 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 AnalyticsGoalTargetRow, type AnalyticsGoalTargets, 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, DashboardView, type DashboardViewProps, 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 PrimaryConversion, 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
@@ -1544,6 +1544,69 @@ type AnalyticsConversions = {
1544
1544
  } | {
1545
1545
  status: 'unreachable';
1546
1546
  };
1547
+ /**
1548
+ * One value behind a goal's conversions — a link, a file, a number, a form.
1549
+ *
1550
+ * `label` is what to show and `target` is what to store: for a form they
1551
+ * differ, because the label is the form's CURRENT name (resolved as the report
1552
+ * runs, so renaming rewrites its history rather than splitting it) while the
1553
+ * target is the endpoint it posts to.
1554
+ */
1555
+ interface AnalyticsGoalTargetRow {
1556
+ /** The value exactly as the page authored it, or the path for a `page` row. */
1557
+ target: string;
1558
+ /** What to show. Identical to `target` except for a form, which is named. */
1559
+ label: string;
1560
+ visitors: number;
1561
+ events: number;
1562
+ conversion_rate: number | null;
1563
+ }
1564
+ /**
1565
+ * One goal's values, ranked.
1566
+ *
1567
+ * NOT EVERY GOAL HAS ANY. The value is the link the page authored, so it
1568
+ * exists for outbound clicks, downloads, contact taps and the two form goals —
1569
+ * and does not exist for `Purchase` (nothing in a payment names a page-level
1570
+ * thing) or for a goal matching a path or a scroll depth. Asking about one of
1571
+ * those is a 400 naming the goal, deliberately, because an empty list reads as
1572
+ * "no conversions" when the truth is "this goal has no values".
1573
+ */
1574
+ type AnalyticsGoalTargets = {
1575
+ status: 'ok';
1576
+ data: AnalyticsGoalTargetRow[];
1577
+ window: {
1578
+ from: string;
1579
+ to: string;
1580
+ };
1581
+ timezone: string;
1582
+ /** Echoed back, so a client can label the table without trusting its own request. */
1583
+ goal: string;
1584
+ dimension: 'target' | 'page';
1585
+ denominator: number;
1586
+ /** True when more distinct values exist than were returned. */
1587
+ truncated: boolean;
1588
+ /**
1589
+ * What share of the goal these rows explain — and it must be rendered
1590
+ * whenever the two numbers differ.
1591
+ *
1592
+ * A value is recorded only from the deploy that began sending one, so a
1593
+ * goal with a long history can show a breakdown covering a sliver of
1594
+ * it: measured on one site the day before forms began carrying theirs,
1595
+ * 8,430 submissions and none with a value. An EMPTY list is therefore
1596
+ * not evidence of no conversions — `goal_events > 0` with
1597
+ * `with_a_value === 0` means they happened and their values were never
1598
+ * recorded, which is a different sentence entirely.
1599
+ *
1600
+ * Null means coverage could not be established, which is NOT zero
1601
+ * coverage.
1602
+ */
1603
+ coverage: {
1604
+ goal_events: number;
1605
+ with_a_value: number;
1606
+ } | null;
1607
+ } | {
1608
+ status: 'unreachable';
1609
+ };
1547
1610
  type AnalyticsChannels = AnalyticsSourced<AnalyticsChannelRow[]>;
1548
1611
  type AnalyticsBreakdown = AnalyticsSourced<AnalyticsBreakdownRow[]>;
1549
1612
  /** Realtime sits outside the historical window, so it carries an as-of instant. */
@@ -1731,6 +1794,19 @@ interface AifeaturesApiClient {
1731
1794
  * cards on one page divide by different wholes while both said "rate".
1732
1795
  */
1733
1796
  getAnalyticsConversions(period: AnalyticsPeriod): Promise<AnalyticsConversions>;
1797
+ /**
1798
+ * The values behind one goal's conversions, ranked.
1799
+ *
1800
+ * REJECTS SOME GOALS BY DESIGN: `Purchase` and any goal matching a path
1801
+ * or a scroll depth have no value to point at, and the server answers a
1802
+ * 400 naming the goal rather than an empty list — an empty list would
1803
+ * read as "no conversions" when the truth is "this goal has no values".
1804
+ * A caller offering target narrowing must treat that as "not narrowable",
1805
+ * not as a failure.
1806
+ */
1807
+ getAnalyticsGoalTargets(goal: string, period: AnalyticsPeriod,
1808
+ /** 1-100, server default 20. Read `truncated` to learn more exist. */
1809
+ limit?: number): Promise<AnalyticsGoalTargets>;
1734
1810
  /** One ranked breakdown, named by its path segment. */
1735
1811
  getAnalyticsBreakdown(name: AnalyticsBreakdownName, period: AnalyticsPeriod, filters?: AnalyticsFilter[]): Promise<AnalyticsBreakdown>;
1736
1812
  getEventDestinations(): Promise<EventDestination[]>;
@@ -2961,6 +3037,108 @@ declare function toMinorUnits(major: string | number, currency: string): number
2961
3037
  */
2962
3038
  declare function toMajorUnits(minor: number, currency: string): number;
2963
3039
 
3040
+ /**
3041
+ * THE CONVERSION THIS SITE IS JUDGED ON, said in one line.
3042
+ *
3043
+ * A MARKER, not a classification. Every site reports on the same tracked
3044
+ * conversions; this says which one of them is the business's own measure of a
3045
+ * good day, so the Dashboard can lead with it and the conversions table can
3046
+ * lift it out of the list.
3047
+ *
3048
+ * ITS GRAIN IS A GOAL PLUS AN OPTIONAL TARGET, which is the whole reason this
3049
+ * replaced an earlier five-value `SiteGoal` enum. "A form submission" is not
3050
+ * specific enough to be a business's goal once a site has more than one form:
3051
+ * on landingsite.ai the conversion that matters is the form that CREATES A
3052
+ * SITE, and `Form: Submission` aggregates every form on the page. For another
3053
+ * site the same goal means a newsletter sign-up, and for a third the answer is
3054
+ * an order instead. Five archetypes cannot express any of that.
3055
+ *
3056
+ * `target` ABSENT IS A REAL STATE, not a missing one — "this goal, any target".
3057
+ * It has to be, because a specific target is not always knowable: measured
3058
+ * 2026-10-11, 97.3% of sites have no form target recorded at all, since the
3059
+ * instrumentation is newer than the trackers most sites have cached. So a site
3060
+ * is markable from its first day at goal level, and narrowing to one target is
3061
+ * a refinement for the sites that can.
3062
+ *
3063
+ * WHY `label` IS THE HOST'S TO SUPPLY, AND OPTIONAL. The conversions targets
3064
+ * report already resolves a target to a human name where one exists — a form's
3065
+ * current name, else the raw endpoint. Only the host knows which of those it
3066
+ * got, and the difference decides the copy: "Your main conversion is Create a
3067
+ * site" reads as intended, while "Your main conversion is
3068
+ * api.example.com/f/3b2a" is worse than saying nothing specific. So the host
3069
+ * passes `label` ONLY when it holds a name a person wrote, and this component
3070
+ * never has to guess whether a string is a name or a URL.
3071
+ */
3072
+ interface PrimaryConversion {
3073
+ /**
3074
+ * The tracked goal's name, spelled as the conversions report spells it —
3075
+ * `Form: Submission`, `Contact`, `Outbound Link: Click`, `File Download`,
3076
+ * `Purchase`, `Form: Received`, or a goal the merchant created.
3077
+ *
3078
+ * Deliberately an open string rather than a union. The merchant can create
3079
+ * goals, so a closed set here would be wrong the moment one does.
3080
+ *
3081
+ * THE NAME IS THE REPORT'S OWN KEY, not a label beside an id: "matching is
3082
+ * query-time and the display name is the key reports are keyed by", and a
3083
+ * conversions row carries no id at all. So matching on it is not a shortcut
3084
+ * — it is the only join the report offers.
3085
+ *
3086
+ * WHICH MAKES A BUILT-IN SAFE AND A CUSTOM GOAL NOT, and a host persisting
3087
+ * this needs to know the difference. The six built-ins "are not rows and
3088
+ * cannot be renamed or deleted", so their names are permanent. A goal the
3089
+ * merchant created can be renamed through `PATCH /analytics/goals/{id}`,
3090
+ * which keeps its id and relabels every historical report — so a stored
3091
+ * marker naming the old one stops matching any row, and because goal names
3092
+ * are unique per site rather than reserved, a NEW goal can later take the
3093
+ * freed name and inherit the mark silently.
3094
+ *
3095
+ * Until the conversions report exposes a goal id, a host should therefore
3096
+ * either mark only built-ins, or re-validate a custom marker against the
3097
+ * current conversions and drop it when it no longer matches. Dropping is
3098
+ * safe here: an unset marker renders nothing by design.
3099
+ */
3100
+ goal: string;
3101
+ /**
3102
+ * Whether this is one of the six BUILT-IN goals, as the conversions row
3103
+ * reports it.
3104
+ *
3105
+ * It decides whether curated copy may be used at all, and it has to, because
3106
+ * a name is not proof of a built-in. The goals API shipped hours before
3107
+ * these names were reserved, so a merchant could already have created a
3108
+ * PAGEVIEW goal called `Purchase` — and when that happens the API keeps
3109
+ * theirs and drops the derived one, reporting `implicit: false`. Trusting
3110
+ * the name alone would tell that merchant "This site is set up to sell"
3111
+ * about a goal that counts visits to `/thanks`.
3112
+ *
3113
+ * Absent means "not established", and curated copy is withheld rather than
3114
+ * guessed: a host that forgets this gets the generic line, which is less
3115
+ * specific but never wrong. The opposite default would be wrong exactly
3116
+ * where it is hardest to notice.
3117
+ *
3118
+ * WHEN IT ARRIVES FROM THE PICKER IT IS AS-OF THE MOMENT THE LIST LOADED,
3119
+ * and a host PERSISTING a marker must re-derive it from the live report
3120
+ * rather than storing this value. Goals are resolved by display NAME, so a
3121
+ * name can change hands between the list loading and the choice being made:
3122
+ * delete a pre-reservation custom `Contact` and the built-in `Contact`
3123
+ * takes its place, with the opposite `implicit`. Storing the stale flag
3124
+ * would produce a marker that matches no current conversion.
3125
+ *
3126
+ * The reference host does this — its mutation accepts only the goal and an
3127
+ * optional target, and reads `implicit` off the matching conversions row as
3128
+ * it writes. A host that cannot re-derive should expect the picker to flag
3129
+ * the marker as stale the next time it opens, which is the recovery path
3130
+ * rather than a prevention.
3131
+ */
3132
+ implicit?: boolean;
3133
+ /** One target under that goal, or null/undefined for "any target". */
3134
+ target?: string | null;
3135
+ /**
3136
+ * A human name for what is marked, when the host has one. Omit it rather
3137
+ * than passing an endpoint or a URL — see the note above.
3138
+ */
3139
+ label?: string;
3140
+ }
3141
+
2964
3142
  interface AnalyticsViewProps {
2965
3143
  /**
2966
3144
  * Filters, when the HOST wants to own them — to put them in its URL, say.
@@ -2976,6 +3154,16 @@ interface AnalyticsViewProps {
2976
3154
  /** Bump to force a refetch, matching the other views. */
2977
3155
  refreshKey?: number;
2978
3156
  onBackToWebsite?: () => void;
3157
+ /**
3158
+ * The conversion this business is judged on, so its row in the conversions
3159
+ * table reads as the one that matters.
3160
+ *
3161
+ * THE SAME SHAPE THE DASHBOARD TAKES, so a host passes one object for one
3162
+ * fact rather than two differently-shaped things. This view uses only
3163
+ * `goal`: it has no headline to name a target in, and the table has one row
3164
+ * per goal.
3165
+ */
3166
+ primaryConversion?: PrimaryConversion | null;
2979
3167
  className?: string;
2980
3168
  /**
2981
3169
  * Publish state, supplied by the host: aifeatures has none of its own.
@@ -3005,37 +3193,7 @@ interface AnalyticsViewProps {
3005
3193
  * `published === false` overrides a collecting status: an unpublished site
3006
3194
  * with nothing ever seen is the first row above, not the third.
3007
3195
  */
3008
- declare function AnalyticsView({ filters: filtersProp, onFiltersChange, refreshKey, onBackToWebsite, className, published, lastPublishedAt, }: AnalyticsViewProps): react_jsx_runtime.JSX.Element;
3009
-
3010
- /**
3011
- * What this site is trying to get its visitors to do, said in one line.
3012
- *
3013
- * The site builder already decides this: picking a conversion mechanism is a
3014
- * gated first step of every build — form, external link, phone-first, or
3015
- * native payments — and the CTA it writes is the artifact of that decision.
3016
- * This names it back to the owner.
3017
- *
3018
- * The vocabulary deliberately matches the conversion goals that already
3019
- * report on these events, so the headline and the numbers under it describe
3020
- * the same thing in the same words rather than two vocabularies for one site.
3021
- *
3022
- * WHATSAPP IS ITS OWN GOAL, not a kind of `outbound`, because the fleet says
3023
- * so: measured over the 30 days to 2026-10-11, a WhatsApp link is the
3024
- * dominant conversion for 179 sites — 11.7% of every site with any
3025
- * conversion at all, and more sites than every named booking platform
3026
- * combined (Fresha, Square, SkyTab, Toast, HotDoc, Clover and SpotOn are 1-5
3027
- * sites each). Folding it into `outbound` would tell 179 merchants their site
3028
- * is "set up to send visitors on to book with you", which is not what a
3029
- * message thread is. It is not generalised to "messaging" either: Telegram is
3030
- * 2 sites and Messenger, Signal and `sms:` are none, so a broader word would
3031
- * only make the line vaguer for the ones it actually describes.
3032
- *
3033
- * `unknown` renders NOTHING. The derivation is lazy and improvable, so a site
3034
- * it cannot settle yet is normal rather than broken — and naming the wrong
3035
- * goal on a merchant's own dashboard is worse than naming none. An
3036
- * undetermined goal costs this line, never the screen.
3037
- */
3038
- type SiteGoal = "calls" | "enquiries" | "sales" | "whatsapp" | "outbound" | "unknown";
3196
+ declare function AnalyticsView({ filters: filtersProp, onFiltersChange, refreshKey, onBackToWebsite, primaryConversion, className, published, lastPublishedAt, }: AnalyticsViewProps): react_jsx_runtime.JSX.Element;
3039
3197
 
3040
3198
  interface DashboardViewProps {
3041
3199
  /** Bumped by the host after any turn that touched business data. */
@@ -3046,8 +3204,22 @@ interface DashboardViewProps {
3046
3204
  * Facts the package cannot know, supplied by the host — the same contract
3047
3205
  * the analytics view already uses.
3048
3206
  */
3049
- /** What the site is for. `unknown` until the derivation ships; renders nothing. */
3050
- goal?: SiteGoal;
3207
+ /**
3208
+ * Which tracked conversion this business is judged on — a goal, optionally
3209
+ * narrowed to one target. Absent renders nothing, which is the state of a
3210
+ * site nobody has marked yet.
3211
+ */
3212
+ primaryConversion?: PrimaryConversion | null;
3213
+ /**
3214
+ * Hand this in and the headline becomes editable: the merchant picks from
3215
+ * the conversions their own site reports, or clears the marker.
3216
+ *
3217
+ * The host persists it — the package has no idea where a marker lives, and
3218
+ * a control that discarded the change would be worse than no control. Its
3219
+ * absence is a real state: a host that cannot persist one gets 0.17.0's
3220
+ * read-only line, and an unmarked site then renders nothing at all.
3221
+ */
3222
+ onChangePrimaryConversion?: (next: PrimaryConversion | null) => void;
3051
3223
  /**
3052
3224
  * Host callback to change the active surface. Without it the storefront
3053
3225
  * entries render nothing, because a panel that claims to lead somewhere and
@@ -3081,6 +3253,6 @@ interface DashboardViewProps {
3081
3253
  * own call and fails alone. Nothing here claims per-panel isolation it does
3082
3254
  * not have.
3083
3255
  */
3084
- declare function DashboardView({ refreshKey, onBackToWebsite, goal, onOpenSurface, needsPaidPlan, onUpgradePlan, onConnectStripe, }: DashboardViewProps): react_jsx_runtime.JSX.Element;
3256
+ declare function DashboardView({ refreshKey, onBackToWebsite, primaryConversion, onChangePrimaryConversion, onOpenSurface, needsPaidPlan, onUpgradePlan, onConnectStripe, }: DashboardViewProps): react_jsx_runtime.JSX.Element;
3085
3257
 
3086
- 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, DashboardView, type DashboardViewProps, 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 SiteGoal, 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 };
3258
+ 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 AnalyticsGoalTargetRow, type AnalyticsGoalTargets, 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, DashboardView, type DashboardViewProps, 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 PrimaryConversion, 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 };