@aifeatures/admin-react 0.17.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.cjs +4 -4
- package/dist/index.d.cts +102 -2
- package/dist/index.d.ts +102 -2
- package/dist/index.js +4 -4
- package/dist/styles.css +1 -1
- package/package.json +14 -13
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[]>;
|
|
@@ -3038,6 +3114,20 @@ interface PrimaryConversion {
|
|
|
3038
3114
|
* guessed: a host that forgets this gets the generic line, which is less
|
|
3039
3115
|
* specific but never wrong. The opposite default would be wrong exactly
|
|
3040
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.
|
|
3041
3131
|
*/
|
|
3042
3132
|
implicit?: boolean;
|
|
3043
3133
|
/** One target under that goal, or null/undefined for "any target". */
|
|
@@ -3120,6 +3210,16 @@ interface DashboardViewProps {
|
|
|
3120
3210
|
* site nobody has marked yet.
|
|
3121
3211
|
*/
|
|
3122
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;
|
|
3123
3223
|
/**
|
|
3124
3224
|
* Host callback to change the active surface. Without it the storefront
|
|
3125
3225
|
* entries render nothing, because a panel that claims to lead somewhere and
|
|
@@ -3153,6 +3253,6 @@ interface DashboardViewProps {
|
|
|
3153
3253
|
* own call and fails alone. Nothing here claims per-panel isolation it does
|
|
3154
3254
|
* not have.
|
|
3155
3255
|
*/
|
|
3156
|
-
declare function DashboardView({ refreshKey, onBackToWebsite, primaryConversion, 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;
|
|
3157
3257
|
|
|
3158
|
-
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 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 };
|
|
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[]>;
|
|
@@ -3038,6 +3114,20 @@ interface PrimaryConversion {
|
|
|
3038
3114
|
* guessed: a host that forgets this gets the generic line, which is less
|
|
3039
3115
|
* specific but never wrong. The opposite default would be wrong exactly
|
|
3040
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.
|
|
3041
3131
|
*/
|
|
3042
3132
|
implicit?: boolean;
|
|
3043
3133
|
/** One target under that goal, or null/undefined for "any target". */
|
|
@@ -3120,6 +3210,16 @@ interface DashboardViewProps {
|
|
|
3120
3210
|
* site nobody has marked yet.
|
|
3121
3211
|
*/
|
|
3122
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;
|
|
3123
3223
|
/**
|
|
3124
3224
|
* Host callback to change the active surface. Without it the storefront
|
|
3125
3225
|
* entries render nothing, because a panel that claims to lead somewhere and
|
|
@@ -3153,6 +3253,6 @@ interface DashboardViewProps {
|
|
|
3153
3253
|
* own call and fails alone. Nothing here claims per-panel isolation it does
|
|
3154
3254
|
* not have.
|
|
3155
3255
|
*/
|
|
3156
|
-
declare function DashboardView({ refreshKey, onBackToWebsite, primaryConversion, 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;
|
|
3157
3257
|
|
|
3158
|
-
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 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 };
|
|
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 };
|