@aifeatures/admin-react 0.11.0 → 0.12.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 +72 -2
- package/dist/index.d.ts +72 -2
- package/dist/index.js +4 -4
- package/dist/styles.css +1 -1
- package/package.json +13 -14
package/dist/index.d.cts
CHANGED
|
@@ -470,6 +470,14 @@ interface LineItem {
|
|
|
470
470
|
variantTitle?: string;
|
|
471
471
|
/** Unit price in the currency's minor unit. */
|
|
472
472
|
unitAmount?: number;
|
|
473
|
+
/** Final line money; amountNet includes inclusive tax, amountTotal adds exclusive tax. */
|
|
474
|
+
amountSubtotal?: number;
|
|
475
|
+
amountDiscount?: number;
|
|
476
|
+
amountNet?: number;
|
|
477
|
+
amountTax?: number;
|
|
478
|
+
amountTotal?: number;
|
|
479
|
+
exclusiveTax?: number;
|
|
480
|
+
unavailableReason?: "oversold";
|
|
473
481
|
quantity?: number;
|
|
474
482
|
/**
|
|
475
483
|
* The product image as it looked at checkout, snapshotted onto the line so a
|
|
@@ -508,6 +516,16 @@ interface LineItem {
|
|
|
508
516
|
* currency's minor unit.
|
|
509
517
|
*/
|
|
510
518
|
interface Order {
|
|
519
|
+
application_fee_original?: number | null;
|
|
520
|
+
application_fee_returned?: number | null;
|
|
521
|
+
application_fee_retained?: number | null;
|
|
522
|
+
application_fee_currency?: string | null;
|
|
523
|
+
application_fee_state?: 'pending' | 'complete' | 'manual_attention' | null;
|
|
524
|
+
amount_subtotal?: number | null;
|
|
525
|
+
discount_total?: number;
|
|
526
|
+
exclusive_tax_total?: number | null;
|
|
527
|
+
/** Zero-paid renewal history; no fulfillment or receipt resend actions. */
|
|
528
|
+
subscription_history_only?: boolean;
|
|
511
529
|
email_deliveries?: EmailDelivery[];
|
|
512
530
|
id: string;
|
|
513
531
|
/**
|
|
@@ -529,6 +547,9 @@ interface Order {
|
|
|
529
547
|
stripe_checkout_session_id: string | null;
|
|
530
548
|
stripe_payment_intent_id: string | null;
|
|
531
549
|
amount_total: number;
|
|
550
|
+
/** Cash collected and account credit; optional for older API responses. */
|
|
551
|
+
amount_paid?: number | null;
|
|
552
|
+
credit_applied?: number | null;
|
|
532
553
|
amount_refunded: number;
|
|
533
554
|
/**
|
|
534
555
|
* Postage Stripe charged on top of amount_total (minor units, charge
|
|
@@ -1445,6 +1466,46 @@ declare const MAX_ANALYTICS_FILTERS = 3;
|
|
|
1445
1466
|
declare const MAX_ANALYTICS_FILTER_VALUES = 100;
|
|
1446
1467
|
/** The breakdown reports the panel can ask for, by path segment. */
|
|
1447
1468
|
type AnalyticsBreakdownName = 'sources' | 'campaigns' | 'utm/medium' | 'utm/source' | 'utm/campaign' | 'utm/content' | 'utm/term' | 'pages' | 'entry-pages' | 'exit-pages' | 'countries' | 'regions' | 'cities' | 'devices' | 'browsers' | 'operating-systems';
|
|
1469
|
+
/** Merchant promotions managed on the connected Stripe account. */
|
|
1470
|
+
interface CreatePromoInput {
|
|
1471
|
+
request_id: string;
|
|
1472
|
+
code: string;
|
|
1473
|
+
name: string;
|
|
1474
|
+
percent_off?: number;
|
|
1475
|
+
amount_off?: number;
|
|
1476
|
+
currency?: string;
|
|
1477
|
+
minimum_amount?: number;
|
|
1478
|
+
expires_at?: string;
|
|
1479
|
+
max_redemptions?: number;
|
|
1480
|
+
duration: 'once' | 'forever' | 'repeating';
|
|
1481
|
+
duration_in_months?: number;
|
|
1482
|
+
}
|
|
1483
|
+
interface Promo {
|
|
1484
|
+
id: string;
|
|
1485
|
+
site_id: string;
|
|
1486
|
+
stripe_account_id: string;
|
|
1487
|
+
code: string;
|
|
1488
|
+
name: string;
|
|
1489
|
+
percent_off: number | null;
|
|
1490
|
+
amount_off: number | null;
|
|
1491
|
+
currency: string | null;
|
|
1492
|
+
minimum_amount: number | null;
|
|
1493
|
+
expires_at: string | null;
|
|
1494
|
+
max_redemptions: number | null;
|
|
1495
|
+
duration: CreatePromoInput['duration'];
|
|
1496
|
+
duration_in_months: number | null;
|
|
1497
|
+
status: 'active' | 'inactive' | 'expired' | 'exhausted' | 'pending' | 'unavailable';
|
|
1498
|
+
times_redeemed: number | null;
|
|
1499
|
+
eligibility_scope: 'connected_account';
|
|
1500
|
+
checkout_enabled: boolean;
|
|
1501
|
+
created_at: string;
|
|
1502
|
+
replaces_id: string | null;
|
|
1503
|
+
}
|
|
1504
|
+
interface PromosListResponse {
|
|
1505
|
+
promos: Promo[];
|
|
1506
|
+
next_cursor: string | null;
|
|
1507
|
+
checkout_enabled: boolean;
|
|
1508
|
+
}
|
|
1448
1509
|
|
|
1449
1510
|
declare class AifeaturesApiError extends Error {
|
|
1450
1511
|
status: number;
|
|
@@ -1462,6 +1523,11 @@ interface AifeaturesApiClient {
|
|
|
1462
1523
|
deleteSubmission(submissionId: string): Promise<void>;
|
|
1463
1524
|
downloadAttachment(submissionId: string, attachment: string | Pick<Attachment, 'id' | 'name'>): Promise<void>;
|
|
1464
1525
|
getPaymentsStatus(): Promise<PaymentsStatusResponse>;
|
|
1526
|
+
getPromos(cursor?: string): Promise<PromosListResponse>;
|
|
1527
|
+
getPromo(id: string): Promise<Promo>;
|
|
1528
|
+
createPromo(input: CreatePromoInput): Promise<Promo>;
|
|
1529
|
+
disablePromo(id: string): Promise<Promo>;
|
|
1530
|
+
replacePromo(id: string, input: CreatePromoInput): Promise<Promo>;
|
|
1465
1531
|
/** Pass `{ include: 'stats' }` to attach rolling-30-day sales stats (owner-side surfaces only). */
|
|
1466
1532
|
getProducts(options?: GetProductsOptions): Promise<Product[]>;
|
|
1467
1533
|
/** Returns the product detail (flat fields + options + variants). */
|
|
@@ -1711,7 +1777,7 @@ interface PaymentsDashboardProps {
|
|
|
1711
1777
|
/** Optional className */
|
|
1712
1778
|
className?: string;
|
|
1713
1779
|
/** Which tab to open initially */
|
|
1714
|
-
defaultTab?: "products" | "orders" | "invoices" | "customers" | "setup";
|
|
1780
|
+
defaultTab?: "products" | "orders" | "invoices" | "customers" | "promos" | "setup";
|
|
1715
1781
|
/**
|
|
1716
1782
|
* Host-app callback that starts (or resumes) Stripe Connect onboarding —
|
|
1717
1783
|
* shown on the Setup tab when the site still needs Stripe.
|
|
@@ -2130,6 +2196,9 @@ interface RetainersPanelProps {
|
|
|
2130
2196
|
}
|
|
2131
2197
|
declare function RetainersPanel({ retainers, isLoading, error, onRetry, onShowCycles, activeRetainerId, total, endedTotal, isLoadingMore, onLoadMore, includeEnded, onIncludeEndedChange, className }: RetainersPanelProps): react_jsx_runtime.JSX.Element | null;
|
|
2132
2198
|
|
|
2199
|
+
/** Shared merchant dashboard surface; all writes use the same API as agent tools. */
|
|
2200
|
+
declare function PromosPanel(): react_jsx_runtime.JSX.Element;
|
|
2201
|
+
|
|
2133
2202
|
interface UseFormsReturn {
|
|
2134
2203
|
forms: Form[];
|
|
2135
2204
|
isLoading: boolean;
|
|
@@ -2636,6 +2705,7 @@ declare function chargedTotal(order: {
|
|
|
2636
2705
|
tax_total?: number;
|
|
2637
2706
|
tax_behavior?: 'inclusive' | 'exclusive' | null;
|
|
2638
2707
|
automatic_tax?: boolean;
|
|
2708
|
+
exclusive_tax_total?: number | null;
|
|
2639
2709
|
}): number;
|
|
2640
2710
|
/**
|
|
2641
2711
|
* Convert a major-unit amount ("29.99") to the currency's integer minor unit
|
|
@@ -2695,4 +2765,4 @@ interface AnalyticsViewProps {
|
|
|
2695
2765
|
*/
|
|
2696
2766
|
declare function AnalyticsView({ filters: filtersProp, onFiltersChange, refreshKey, onBackToWebsite, className, published, lastPublishedAt, }: AnalyticsViewProps): react_jsx_runtime.JSX.Element;
|
|
2697
2767
|
|
|
2698
|
-
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 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, 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 };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -470,6 +470,14 @@ interface LineItem {
|
|
|
470
470
|
variantTitle?: string;
|
|
471
471
|
/** Unit price in the currency's minor unit. */
|
|
472
472
|
unitAmount?: number;
|
|
473
|
+
/** Final line money; amountNet includes inclusive tax, amountTotal adds exclusive tax. */
|
|
474
|
+
amountSubtotal?: number;
|
|
475
|
+
amountDiscount?: number;
|
|
476
|
+
amountNet?: number;
|
|
477
|
+
amountTax?: number;
|
|
478
|
+
amountTotal?: number;
|
|
479
|
+
exclusiveTax?: number;
|
|
480
|
+
unavailableReason?: "oversold";
|
|
473
481
|
quantity?: number;
|
|
474
482
|
/**
|
|
475
483
|
* The product image as it looked at checkout, snapshotted onto the line so a
|
|
@@ -508,6 +516,16 @@ interface LineItem {
|
|
|
508
516
|
* currency's minor unit.
|
|
509
517
|
*/
|
|
510
518
|
interface Order {
|
|
519
|
+
application_fee_original?: number | null;
|
|
520
|
+
application_fee_returned?: number | null;
|
|
521
|
+
application_fee_retained?: number | null;
|
|
522
|
+
application_fee_currency?: string | null;
|
|
523
|
+
application_fee_state?: 'pending' | 'complete' | 'manual_attention' | null;
|
|
524
|
+
amount_subtotal?: number | null;
|
|
525
|
+
discount_total?: number;
|
|
526
|
+
exclusive_tax_total?: number | null;
|
|
527
|
+
/** Zero-paid renewal history; no fulfillment or receipt resend actions. */
|
|
528
|
+
subscription_history_only?: boolean;
|
|
511
529
|
email_deliveries?: EmailDelivery[];
|
|
512
530
|
id: string;
|
|
513
531
|
/**
|
|
@@ -529,6 +547,9 @@ interface Order {
|
|
|
529
547
|
stripe_checkout_session_id: string | null;
|
|
530
548
|
stripe_payment_intent_id: string | null;
|
|
531
549
|
amount_total: number;
|
|
550
|
+
/** Cash collected and account credit; optional for older API responses. */
|
|
551
|
+
amount_paid?: number | null;
|
|
552
|
+
credit_applied?: number | null;
|
|
532
553
|
amount_refunded: number;
|
|
533
554
|
/**
|
|
534
555
|
* Postage Stripe charged on top of amount_total (minor units, charge
|
|
@@ -1445,6 +1466,46 @@ declare const MAX_ANALYTICS_FILTERS = 3;
|
|
|
1445
1466
|
declare const MAX_ANALYTICS_FILTER_VALUES = 100;
|
|
1446
1467
|
/** The breakdown reports the panel can ask for, by path segment. */
|
|
1447
1468
|
type AnalyticsBreakdownName = 'sources' | 'campaigns' | 'utm/medium' | 'utm/source' | 'utm/campaign' | 'utm/content' | 'utm/term' | 'pages' | 'entry-pages' | 'exit-pages' | 'countries' | 'regions' | 'cities' | 'devices' | 'browsers' | 'operating-systems';
|
|
1469
|
+
/** Merchant promotions managed on the connected Stripe account. */
|
|
1470
|
+
interface CreatePromoInput {
|
|
1471
|
+
request_id: string;
|
|
1472
|
+
code: string;
|
|
1473
|
+
name: string;
|
|
1474
|
+
percent_off?: number;
|
|
1475
|
+
amount_off?: number;
|
|
1476
|
+
currency?: string;
|
|
1477
|
+
minimum_amount?: number;
|
|
1478
|
+
expires_at?: string;
|
|
1479
|
+
max_redemptions?: number;
|
|
1480
|
+
duration: 'once' | 'forever' | 'repeating';
|
|
1481
|
+
duration_in_months?: number;
|
|
1482
|
+
}
|
|
1483
|
+
interface Promo {
|
|
1484
|
+
id: string;
|
|
1485
|
+
site_id: string;
|
|
1486
|
+
stripe_account_id: string;
|
|
1487
|
+
code: string;
|
|
1488
|
+
name: string;
|
|
1489
|
+
percent_off: number | null;
|
|
1490
|
+
amount_off: number | null;
|
|
1491
|
+
currency: string | null;
|
|
1492
|
+
minimum_amount: number | null;
|
|
1493
|
+
expires_at: string | null;
|
|
1494
|
+
max_redemptions: number | null;
|
|
1495
|
+
duration: CreatePromoInput['duration'];
|
|
1496
|
+
duration_in_months: number | null;
|
|
1497
|
+
status: 'active' | 'inactive' | 'expired' | 'exhausted' | 'pending' | 'unavailable';
|
|
1498
|
+
times_redeemed: number | null;
|
|
1499
|
+
eligibility_scope: 'connected_account';
|
|
1500
|
+
checkout_enabled: boolean;
|
|
1501
|
+
created_at: string;
|
|
1502
|
+
replaces_id: string | null;
|
|
1503
|
+
}
|
|
1504
|
+
interface PromosListResponse {
|
|
1505
|
+
promos: Promo[];
|
|
1506
|
+
next_cursor: string | null;
|
|
1507
|
+
checkout_enabled: boolean;
|
|
1508
|
+
}
|
|
1448
1509
|
|
|
1449
1510
|
declare class AifeaturesApiError extends Error {
|
|
1450
1511
|
status: number;
|
|
@@ -1462,6 +1523,11 @@ interface AifeaturesApiClient {
|
|
|
1462
1523
|
deleteSubmission(submissionId: string): Promise<void>;
|
|
1463
1524
|
downloadAttachment(submissionId: string, attachment: string | Pick<Attachment, 'id' | 'name'>): Promise<void>;
|
|
1464
1525
|
getPaymentsStatus(): Promise<PaymentsStatusResponse>;
|
|
1526
|
+
getPromos(cursor?: string): Promise<PromosListResponse>;
|
|
1527
|
+
getPromo(id: string): Promise<Promo>;
|
|
1528
|
+
createPromo(input: CreatePromoInput): Promise<Promo>;
|
|
1529
|
+
disablePromo(id: string): Promise<Promo>;
|
|
1530
|
+
replacePromo(id: string, input: CreatePromoInput): Promise<Promo>;
|
|
1465
1531
|
/** Pass `{ include: 'stats' }` to attach rolling-30-day sales stats (owner-side surfaces only). */
|
|
1466
1532
|
getProducts(options?: GetProductsOptions): Promise<Product[]>;
|
|
1467
1533
|
/** Returns the product detail (flat fields + options + variants). */
|
|
@@ -1711,7 +1777,7 @@ interface PaymentsDashboardProps {
|
|
|
1711
1777
|
/** Optional className */
|
|
1712
1778
|
className?: string;
|
|
1713
1779
|
/** Which tab to open initially */
|
|
1714
|
-
defaultTab?: "products" | "orders" | "invoices" | "customers" | "setup";
|
|
1780
|
+
defaultTab?: "products" | "orders" | "invoices" | "customers" | "promos" | "setup";
|
|
1715
1781
|
/**
|
|
1716
1782
|
* Host-app callback that starts (or resumes) Stripe Connect onboarding —
|
|
1717
1783
|
* shown on the Setup tab when the site still needs Stripe.
|
|
@@ -2130,6 +2196,9 @@ interface RetainersPanelProps {
|
|
|
2130
2196
|
}
|
|
2131
2197
|
declare function RetainersPanel({ retainers, isLoading, error, onRetry, onShowCycles, activeRetainerId, total, endedTotal, isLoadingMore, onLoadMore, includeEnded, onIncludeEndedChange, className }: RetainersPanelProps): react_jsx_runtime.JSX.Element | null;
|
|
2132
2198
|
|
|
2199
|
+
/** Shared merchant dashboard surface; all writes use the same API as agent tools. */
|
|
2200
|
+
declare function PromosPanel(): react_jsx_runtime.JSX.Element;
|
|
2201
|
+
|
|
2133
2202
|
interface UseFormsReturn {
|
|
2134
2203
|
forms: Form[];
|
|
2135
2204
|
isLoading: boolean;
|
|
@@ -2636,6 +2705,7 @@ declare function chargedTotal(order: {
|
|
|
2636
2705
|
tax_total?: number;
|
|
2637
2706
|
tax_behavior?: 'inclusive' | 'exclusive' | null;
|
|
2638
2707
|
automatic_tax?: boolean;
|
|
2708
|
+
exclusive_tax_total?: number | null;
|
|
2639
2709
|
}): number;
|
|
2640
2710
|
/**
|
|
2641
2711
|
* Convert a major-unit amount ("29.99") to the currency's integer minor unit
|
|
@@ -2695,4 +2765,4 @@ interface AnalyticsViewProps {
|
|
|
2695
2765
|
*/
|
|
2696
2766
|
declare function AnalyticsView({ filters: filtersProp, onFiltersChange, refreshKey, onBackToWebsite, className, published, lastPublishedAt, }: AnalyticsViewProps): react_jsx_runtime.JSX.Element;
|
|
2697
2767
|
|
|
2698
|
-
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 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, 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 };
|
|
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 };
|