@aifeatures/admin-react 0.23.0 → 0.25.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
@@ -117,6 +117,14 @@ interface EmailDraft {
117
117
  targeting: BroadcastTargeting | null;
118
118
  /** Advisory: the send time (ISO) the assistant proposed, for the commit panel to pre-fill. Never schedules anything. */
119
119
  proposed_send_at: string | null;
120
+ /** Its template; null is the built-in Standard template. Changed only through `setDraftTemplate`. */
121
+ template: EmailTemplateRef | null;
122
+ /**
123
+ * Read-only: a broadcast sent from it has gone out (sending or sent, or
124
+ * ended after some mail went out), however long ago. Its content and
125
+ * template can't change; it is duplicated to send again (KTD27).
126
+ */
127
+ sent: boolean;
120
128
  created_at: string;
121
129
  updated_at: string;
122
130
  }
@@ -126,6 +134,41 @@ interface EmailDraftPreview {
126
134
  text: string;
127
135
  version: number;
128
136
  }
137
+ type EmailTemplateStatus = 'active' | 'archived';
138
+ /** The template an email renders and sends in; `null` on a draft is the built-in Standard template. */
139
+ interface EmailTemplateRef {
140
+ id: string;
141
+ name: string;
142
+ }
143
+ /**
144
+ * One of the site's email templates (email templates KTD26, KTD37): active
145
+ * (choosable for an email, editable until locked) or archived (kept for
146
+ * emails already sent). Standard has no entry.
147
+ */
148
+ interface EmailTemplateSummary extends EmailTemplateRef {
149
+ status: EmailTemplateStatus;
150
+ /** The template's version: changes on every save. */
151
+ updated_at: string;
152
+ /** A scheduled or sent email uses it: it can't change; copy it instead (KTD37). */
153
+ locked: boolean;
154
+ created_at: string;
155
+ archived_at: string | null;
156
+ /** Test sends never count. */
157
+ usage: {
158
+ drafts: number;
159
+ scheduled: number;
160
+ sent: number;
161
+ };
162
+ /** No email has ever used it (R35). */
163
+ can_delete: boolean;
164
+ /** Active, with no unsent email and nothing scheduled or sending using it (R36). */
165
+ can_archive: boolean;
166
+ }
167
+ /** A sample email (or a given draft) rendered through one template. */
168
+ interface EmailTemplatePreview {
169
+ html: string;
170
+ text: string;
171
+ }
129
172
  interface BroadcastTargeting {
130
173
  tag_ids: string[];
131
174
  match: 'any' | 'all';
@@ -228,7 +271,7 @@ interface Form {
228
271
  redirect_url: string | null;
229
272
  turnstile_sitekey: string | null;
230
273
  /** Present only while email marketing is enabled for the site (single-form reads). */
231
- purpose?: 'general' | 'newsletter';
274
+ purpose?: 'general' | 'opt_in' | 'newsletter';
232
275
  created_at: string;
233
276
  updated_at: string;
234
277
  }
@@ -2155,7 +2198,18 @@ interface AifeaturesApiClient {
2155
2198
  getMarketingTags(siteId: string): Promise<MarketingTag[]>;
2156
2199
  getEmailDrafts(siteId: string, kind?: EmailDraftKind): Promise<EmailDraft[]>;
2157
2200
  getEmailDraft(siteId: string, draftId: string): Promise<EmailDraft>;
2158
- previewEmailDraft(siteId: string, draftId: string): Promise<EmailDraftPreview>;
2201
+ /**
2202
+ * The draft as it sends. `editable` is the inline editor's preview (KTD30):
2203
+ * section markers and a bridge script, for an iframe with
2204
+ * `sandbox="allow-scripts"` only; never show it anywhere else.
2205
+ */
2206
+ previewEmailDraft(siteId: string, draftId: string, opts?: {
2207
+ editable?: boolean;
2208
+ }): Promise<EmailDraftPreview>;
2209
+ /** The site's templates, newest first, without source. Standard has no entry. */
2210
+ getEmailTemplates(siteId: string): Promise<EmailTemplateSummary[]>;
2211
+ /** A sample email, or `draftId`'s content, through one template; `templateId` `standard` is the built-in one. */
2212
+ previewEmailTemplate(siteId: string, templateId: string, draftId?: string): Promise<EmailTemplatePreview>;
2159
2213
  getBroadcasts(siteId: string): Promise<Broadcast[]>;
2160
2214
  estimateBroadcast(siteId: string, input: {
2161
2215
  targeting: BroadcastTargeting;
@@ -2968,6 +3022,14 @@ declare function RetainersPanel({ retainers, isLoading, error, onRetry, onShowCy
2968
3022
  /** Shared merchant dashboard surface; all writes use the same API as agent tools. */
2969
3023
  declare function PromosPanel(): react_jsx_runtime.JSX.Element;
2970
3024
 
3025
+ /** An image the host's site-image picker returns (U18 passes the site's media). */
3026
+ interface PickedImage {
3027
+ url: string;
3028
+ alt?: string;
3029
+ }
3030
+ /** Opens the host's picker of the site's images; resolves null when the merchant cancels. */
3031
+ type PickImage = () => Promise<PickedImage | null>;
3032
+
2971
3033
  /**
2972
3034
  * The email view's org-key writes (email marketing plan U10, KTD10, KTD17).
2973
3035
  *
@@ -2992,8 +3054,8 @@ declare function PromosPanel(): react_jsx_runtime.JSX.Element;
2992
3054
  * it (for example, `GET /forms/{formId}` with that site's token).
2993
3055
  * - `exportContacts` answers with CSV text, not JSON; resolve with the text.
2994
3056
  * - On an aifeatures error, reject with an Error whose `code` is the
2995
- * aifeatures error `code` (`version_conflict`, `over_allowance`, …): the
2996
- * view keys its recovery on it.
3057
+ * aifeatures error `code` (`version_conflict`, `over_allowance`,
3058
+ * `template_in_use`, `template_archived`, …): the view keys its recovery on it.
2997
3059
  */
2998
3060
  declare const EMAIL_ORG_ACTIONS: {
2999
3061
  readonly commitBroadcast: {
@@ -3024,6 +3086,36 @@ declare const EMAIL_ORG_ACTIONS: {
3024
3086
  readonly path: "/sites/{siteId}/marketing/drafts/{draftId}/test";
3025
3087
  readonly params: readonly ["draftId"];
3026
3088
  };
3089
+ readonly setDraftTemplate: {
3090
+ readonly method: "PUT";
3091
+ readonly path: "/sites/{siteId}/marketing/drafts/{draftId}/template";
3092
+ readonly params: readonly ["draftId"];
3093
+ };
3094
+ readonly duplicateDraft: {
3095
+ readonly method: "POST";
3096
+ readonly path: "/sites/{siteId}/marketing/drafts/{draftId}/duplicate";
3097
+ readonly params: readonly ["draftId"];
3098
+ };
3099
+ readonly copyEmailTemplate: {
3100
+ readonly method: "POST";
3101
+ readonly path: "/sites/{siteId}/marketing/templates/{templateId}/copy";
3102
+ readonly params: readonly ["templateId"];
3103
+ };
3104
+ readonly archiveEmailTemplate: {
3105
+ readonly method: "POST";
3106
+ readonly path: "/sites/{siteId}/marketing/templates/{templateId}/archive";
3107
+ readonly params: readonly ["templateId"];
3108
+ };
3109
+ readonly unarchiveEmailTemplate: {
3110
+ readonly method: "POST";
3111
+ readonly path: "/sites/{siteId}/marketing/templates/{templateId}/unarchive";
3112
+ readonly params: readonly ["templateId"];
3113
+ };
3114
+ readonly deleteEmailTemplate: {
3115
+ readonly method: "DELETE";
3116
+ readonly path: "/sites/{siteId}/marketing/templates/{templateId}";
3117
+ readonly params: readonly ["templateId"];
3118
+ };
3027
3119
  readonly importContacts: {
3028
3120
  readonly method: "POST";
3029
3121
  readonly path: "/sites/{siteId}/contacts/import";
@@ -3148,13 +3240,39 @@ interface EmailDomainSetupResult {
3148
3240
  /** The plan's help text for the double opt-in toggle, verbatim. */
3149
3241
  declare const DOUBLE_OPT_IN_HELP = "Subscribers confirm by email before they receive anything. Useful if many subscribers are in the EU (especially Germany), or if your forms attract fake or mistyped signups. Some signups need confirming even with this off: bursts of signups, and people re-subscribing after they unsubscribed.";
3150
3242
 
3151
- interface EmailViewProps {
3243
+ /** What the host knows about the site that the email API doesn't. All optional. */
3244
+ interface EmailSiteInfo {
3245
+ /** The site's custom domain (`woodwagon.co`); null when it has none. Unknown when omitted. */
3246
+ siteDomain?: string | null;
3247
+ /** The site's business name, for before the owner has set a sender name. */
3248
+ businessName?: string | null;
3249
+ }
3250
+
3251
+ interface EmailViewProps extends EmailSiteInfo {
3152
3252
  siteId: string;
3153
3253
  /** The viewer is the site's owner (or an admin): writes are offered. */
3154
3254
  isOwnerSide: boolean;
3155
3255
  needsPaidPlan: boolean;
3156
- /** Open this draft on mount (`show_view('email', {draft_id})`). Nothing sends until the merchant clicks. */
3256
+ /**
3257
+ * Deep link (`show_view('email', {draft_id})`): open this draft. Nothing
3258
+ * sends until the merchant clicks. Wins over `templateId` and `initialTab`.
3259
+ */
3157
3260
  initialDraftId?: string;
3261
+ /** Deep link (`show_view('email', {tab})`): open this tab. The old `template` opens Templates. */
3262
+ initialTab?: EmailViewInitialTab;
3263
+ /**
3264
+ * Deep link (`show_view('email', {template_id})`): open this template;
3265
+ * `standard` is the built-in one, and an id the site no longer has opens the
3266
+ * Templates list. Wins over `initialTab`.
3267
+ */
3268
+ templateId?: string;
3269
+ /**
3270
+ * The host's show_view counter. The view is never remounted for a link
3271
+ * (KTD32): a new nonce applies the link props again, even when they are
3272
+ * unchanged, and a link that arrives while an inline edit is open applies
3273
+ * once it closes.
3274
+ */
3275
+ showViewNonce?: number;
3158
3276
  /** The host's org-key relay for every write (see EMAIL_ORG_ACTIONS). */
3159
3277
  onOrgAction: (action: EmailOrgAction, input: Record<string, unknown>) => Promise<unknown>;
3160
3278
  /** A paused site asks an admin to review it (resume stays admin-only). */
@@ -3162,6 +3280,16 @@ interface EmailViewProps {
3162
3280
  /** Create the sending domain (and its DNS when the site's nameservers are ours). */
3163
3281
  onStartDomainSetup?: () => Promise<EmailDomainSetupResult>;
3164
3282
  onBackToWebsite?: () => void;
3283
+ /** Open the host's plan page; a plan without email shows it as Upgrade to Pro. */
3284
+ onUpgradePlan?: () => void;
3285
+ /** Open the host's domain settings, for a site with no custom domain. */
3286
+ onConnectDomain?: () => void;
3287
+ /** Put a prompt in the host's chat composer, unsent ("Add a newsletter signup to my footer"). */
3288
+ onAskAssistant?: (prompt: string) => void;
3289
+ /** Pick one of the site's images for an email image section; resolve null on cancel. Without it the editor asks for an https URL. */
3290
+ onPickImage?: PickImage;
3291
+ /** Get started: turn email marketing on for the site. Without it, a site with email off shows the intro and no button. */
3292
+ onTurnOn?: () => Promise<void>;
3165
3293
  /** Open the host's Settings → Store, where checkout marketing consent lives. */
3166
3294
  onOpenStoreSettings?: () => void;
3167
3295
  /**
@@ -3172,9 +3300,12 @@ interface EmailViewProps {
3172
3300
  refreshKey?: number;
3173
3301
  className?: string;
3174
3302
  }
3303
+ /** The Email view's tabs (KTD35), the same list as the app's `EMAIL_VIEW_TABS` and the modal's `show_view`. */
3304
+ type EmailViewTab = "audience" | "broadcasts" | "automations" | "templates" | "settings";
3305
+ type EmailViewInitialTab = EmailViewTab | "template";
3175
3306
  /**
3176
- * EmailView — the merchant's email marketing view (plan U10): audience,
3177
- * broadcasts and settings.
3307
+ * EmailView — the merchant's email marketing view (plan U10; email templates
3308
+ * U15): audience, broadcasts, templates and settings.
3178
3309
  * Reads use the site token; every write goes through `onOrgAction`.
3179
3310
  */
3180
3311
  /**
@@ -4074,4 +4205,4 @@ interface DashboardViewProps {
4074
4205
  */
4075
4206
  declare function DashboardView({ refreshKey, onBackToWebsite, primaryConversion, onChangePrimaryConversion, onOpenSurface, needsPaidPlan, onUpgradePlan, onConnectStripe, }: DashboardViewProps): react_jsx_runtime.JSX.Element;
4076
4207
 
4077
- export { AUDIENCE_PAGE_SIZE, 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 Broadcast, type BroadcastPlan, type BroadcastStatus, type BroadcastTargeting, type BusinessSummary, type BusinessVisitors, type ContactConsentStatus, ContactImport, type ContactImportProps, type ContactImportReport, type ContactTagRef, type CreateEventDestinationInput, type CreateFormInput, type CreateOptionInput, type CreateProductInput, type CreatePromoInput, type CreateVariantInput, type CurrencyRestatement, type Customer, type CustomerAddress, CustomerDetail, type CustomerDetail$1 as CustomerDetailData, type CustomerDetailProps, CustomersList, type CustomersListProps, type CustomersListResponse, DOUBLE_OPT_IN_HELP, DashboardView, type DashboardViewProps, EMAIL_ORG_ACTIONS, EMAIL_READINESS_TEXT, type EmailDelivery, type EmailDomainSetupResult, type EmailDraft, type EmailDraftBlock, type EmailDraftKind, type EmailDraftPreview, type EmailOrgAction, type EmailOrgRequest, type EmailResource, type EmailSideStatus, EmailView, type EmailViewProps, type EventDeliveriesListResponse, type EventDelivery, type EventDestination, type EventDestinationSecretResponse, type EventDestinationsListResponse, ExportCsvButton, type ExportCsvButtonProps, type ExportOrdersOptions, type ExportPeopleOptions, type ExportRetainersOptions, type ExportSubscriptionsOptions, type Form, FormSettings, type FormSettingsProps, FormSubmissions, type FormSubmissionsProps, FormsDashboard, type FormsDashboardProps, FormsList, type FormsListProps, type FormsListResponse, type FormsLocation, type FormsTab, type GetBusinessSummaryOptions, type GetCustomersOptions, type GetInvoicesOptions, type GetOrdersOptions, type GetPeopleOptions, type GetProductsOptions, type GetSubmissionsOptions, type GetSubscriptionsOptions, IMPORT_ATTESTATION, type ImportSkipReason, type Invoice, type InvoiceAggregates, type InvoiceBillTo, type InvoiceDeliveryState, InvoiceDetail, type InvoiceDetailProps, type InvoiceLabel, InvoiceLabelBadge, type InvoiceLineItem, type InvoicePreview, type InvoiceSettings, InvoiceSettingsPanel, type InvoiceSettingsPanelProps, InvoicesList, type InvoicesListProps, InvoicesView, type InvoicesViewProps, LeadsView, type LeadsViewProps, type LowStockProduct, MAX_ANALYTICS_FILTERS, MAX_ANALYTICS_FILTER_VALUES, type MarketingContact, type MarketingContactStats, type MarketingContactsPage, type MarketingSettings, type MarketingTag, type NeedsAttentionItem, type NeedsAttentionType, NotificationRecipientsSettings, type NotificationRecipientsSettingsProps, 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 RecoveryFlow, type RecoveryStep, type RefundRequest, type ReportSlot, RetainerStatusBadge, RetainersPanel, type RetainersPanelProps, type RevenueCurrencyTotal, type RevenuePeriod, type SetInventoryInput, type SetOrderFulfillmentInput, type SettledRevenue, type ShippingRate, type SiteSettings, type StoreInvoiceSettingsInput, StoreSettings, type StoreSettingsProps, type StoreSettingsSection, type Submission, SubmissionDetail, type SubmissionDetailProps, type SubmissionMetadata, type Subscription, SubscriptionsView, type SubscriptionsViewProps, type UpdateEventDestinationInput, type UpdateFormInput, type UpdateOptionInput, type UpdateProductInput, type UpdateSiteSettingsInput, type UpdateSiteSettingsResult, type UpdateVariantInput, type UseAnalyticsOptions, type UseAnalyticsReturn, type UseAudienceOptions, type UseAudienceReturn, type UseBroadcastsOptions, type UseBusinessSummaryOptions, type UseBusinessSummaryReturn, type UseCsvExportOptions, type UseCsvExportReturn, type UseCustomersOptions, type UseCustomersReturn, type UseEmailDraftsOptions, 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 UseSiteSettingsOptions, type UseSiteSettingsReturn, type UseSubmissionsOptions, type UseSubmissionsReturn, type UseSubscriptionsOptions, type UseSubscriptionsReturn, type VariantInventory, type VariantOptionValue, VariantsEditor, type VariantsEditorProps, ViewShell, type ViewShellProps, WebhookDeliveries, type WebhookDeliveriesProps, WebhookSettings, type WebhookSettingsProps, type WelcomeSequence, type WelcomeStep, buildEmailOrgRequest, chargedTotal, createApiClient, emailReadinessText, formatPrice, isEmailOrgAction, isZeroDecimalCurrency, toMajorUnits, toMinorUnits, useAifeaturesContext as useAifeatures, useAifeaturesContext, useAnalytics, useAudience, useBroadcasts, useBusinessSummary, useCsvExport, useCustomers, useEmailDrafts, useEventDestinations, useForms, useInvoices, useOrders, usePaymentsStatus, usePeople, usePerson, useProducts, useRealtimeVisitors, useRetainers, useSiteSettings, useSubmissions, useSubscriptions };
4208
+ export { AUDIENCE_PAGE_SIZE, 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 Broadcast, type BroadcastPlan, type BroadcastStatus, type BroadcastTargeting, type BusinessSummary, type BusinessVisitors, type ContactConsentStatus, ContactImport, type ContactImportProps, type ContactImportReport, type ContactTagRef, type CreateEventDestinationInput, type CreateFormInput, type CreateOptionInput, type CreateProductInput, type CreatePromoInput, type CreateVariantInput, type CurrencyRestatement, type Customer, type CustomerAddress, CustomerDetail, type CustomerDetail$1 as CustomerDetailData, type CustomerDetailProps, CustomersList, type CustomersListProps, type CustomersListResponse, DOUBLE_OPT_IN_HELP, DashboardView, type DashboardViewProps, EMAIL_ORG_ACTIONS, EMAIL_READINESS_TEXT, type EmailDelivery, type EmailDomainSetupResult, type EmailDraft, type EmailDraftBlock, type EmailDraftKind, type EmailDraftPreview, type EmailOrgAction, type EmailOrgRequest, type EmailResource, type EmailSideStatus, type EmailTemplatePreview, type EmailTemplateRef, type EmailTemplateStatus, type EmailTemplateSummary, EmailView, type EmailViewInitialTab, type EmailViewProps, type EmailViewTab, type EventDeliveriesListResponse, type EventDelivery, type EventDestination, type EventDestinationSecretResponse, type EventDestinationsListResponse, ExportCsvButton, type ExportCsvButtonProps, type ExportOrdersOptions, type ExportPeopleOptions, type ExportRetainersOptions, type ExportSubscriptionsOptions, type Form, FormSettings, type FormSettingsProps, FormSubmissions, type FormSubmissionsProps, FormsDashboard, type FormsDashboardProps, FormsList, type FormsListProps, type FormsListResponse, type FormsLocation, type FormsTab, type GetBusinessSummaryOptions, type GetCustomersOptions, type GetInvoicesOptions, type GetOrdersOptions, type GetPeopleOptions, type GetProductsOptions, type GetSubmissionsOptions, type GetSubscriptionsOptions, IMPORT_ATTESTATION, type ImportSkipReason, type Invoice, type InvoiceAggregates, type InvoiceBillTo, type InvoiceDeliveryState, InvoiceDetail, type InvoiceDetailProps, type InvoiceLabel, InvoiceLabelBadge, type InvoiceLineItem, type InvoicePreview, type InvoiceSettings, InvoiceSettingsPanel, type InvoiceSettingsPanelProps, InvoicesList, type InvoicesListProps, InvoicesView, type InvoicesViewProps, LeadsView, type LeadsViewProps, type LowStockProduct, MAX_ANALYTICS_FILTERS, MAX_ANALYTICS_FILTER_VALUES, type MarketingContact, type MarketingContactStats, type MarketingContactsPage, type MarketingSettings, type MarketingTag, type NeedsAttentionItem, type NeedsAttentionType, NotificationRecipientsSettings, type NotificationRecipientsSettingsProps, 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 RecoveryFlow, type RecoveryStep, type RefundRequest, type ReportSlot, RetainerStatusBadge, RetainersPanel, type RetainersPanelProps, type RevenueCurrencyTotal, type RevenuePeriod, type SetInventoryInput, type SetOrderFulfillmentInput, type SettledRevenue, type ShippingRate, type SiteSettings, type StoreInvoiceSettingsInput, StoreSettings, type StoreSettingsProps, type StoreSettingsSection, type Submission, SubmissionDetail, type SubmissionDetailProps, type SubmissionMetadata, type Subscription, SubscriptionsView, type SubscriptionsViewProps, type UpdateEventDestinationInput, type UpdateFormInput, type UpdateOptionInput, type UpdateProductInput, type UpdateSiteSettingsInput, type UpdateSiteSettingsResult, type UpdateVariantInput, type UseAnalyticsOptions, type UseAnalyticsReturn, type UseAudienceOptions, type UseAudienceReturn, type UseBroadcastsOptions, type UseBusinessSummaryOptions, type UseBusinessSummaryReturn, type UseCsvExportOptions, type UseCsvExportReturn, type UseCustomersOptions, type UseCustomersReturn, type UseEmailDraftsOptions, 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 UseSiteSettingsOptions, type UseSiteSettingsReturn, type UseSubmissionsOptions, type UseSubmissionsReturn, type UseSubscriptionsOptions, type UseSubscriptionsReturn, type VariantInventory, type VariantOptionValue, VariantsEditor, type VariantsEditorProps, ViewShell, type ViewShellProps, WebhookDeliveries, type WebhookDeliveriesProps, WebhookSettings, type WebhookSettingsProps, type WelcomeSequence, type WelcomeStep, buildEmailOrgRequest, chargedTotal, createApiClient, emailReadinessText, formatPrice, isEmailOrgAction, isZeroDecimalCurrency, toMajorUnits, toMinorUnits, useAifeaturesContext as useAifeatures, useAifeaturesContext, useAnalytics, useAudience, useBroadcasts, useBusinessSummary, useCsvExport, useCustomers, useEmailDrafts, useEventDestinations, useForms, useInvoices, useOrders, usePaymentsStatus, usePeople, usePerson, useProducts, useRealtimeVisitors, useRetainers, useSiteSettings, useSubmissions, useSubscriptions };
package/dist/index.d.ts CHANGED
@@ -117,6 +117,14 @@ interface EmailDraft {
117
117
  targeting: BroadcastTargeting | null;
118
118
  /** Advisory: the send time (ISO) the assistant proposed, for the commit panel to pre-fill. Never schedules anything. */
119
119
  proposed_send_at: string | null;
120
+ /** Its template; null is the built-in Standard template. Changed only through `setDraftTemplate`. */
121
+ template: EmailTemplateRef | null;
122
+ /**
123
+ * Read-only: a broadcast sent from it has gone out (sending or sent, or
124
+ * ended after some mail went out), however long ago. Its content and
125
+ * template can't change; it is duplicated to send again (KTD27).
126
+ */
127
+ sent: boolean;
120
128
  created_at: string;
121
129
  updated_at: string;
122
130
  }
@@ -126,6 +134,41 @@ interface EmailDraftPreview {
126
134
  text: string;
127
135
  version: number;
128
136
  }
137
+ type EmailTemplateStatus = 'active' | 'archived';
138
+ /** The template an email renders and sends in; `null` on a draft is the built-in Standard template. */
139
+ interface EmailTemplateRef {
140
+ id: string;
141
+ name: string;
142
+ }
143
+ /**
144
+ * One of the site's email templates (email templates KTD26, KTD37): active
145
+ * (choosable for an email, editable until locked) or archived (kept for
146
+ * emails already sent). Standard has no entry.
147
+ */
148
+ interface EmailTemplateSummary extends EmailTemplateRef {
149
+ status: EmailTemplateStatus;
150
+ /** The template's version: changes on every save. */
151
+ updated_at: string;
152
+ /** A scheduled or sent email uses it: it can't change; copy it instead (KTD37). */
153
+ locked: boolean;
154
+ created_at: string;
155
+ archived_at: string | null;
156
+ /** Test sends never count. */
157
+ usage: {
158
+ drafts: number;
159
+ scheduled: number;
160
+ sent: number;
161
+ };
162
+ /** No email has ever used it (R35). */
163
+ can_delete: boolean;
164
+ /** Active, with no unsent email and nothing scheduled or sending using it (R36). */
165
+ can_archive: boolean;
166
+ }
167
+ /** A sample email (or a given draft) rendered through one template. */
168
+ interface EmailTemplatePreview {
169
+ html: string;
170
+ text: string;
171
+ }
129
172
  interface BroadcastTargeting {
130
173
  tag_ids: string[];
131
174
  match: 'any' | 'all';
@@ -228,7 +271,7 @@ interface Form {
228
271
  redirect_url: string | null;
229
272
  turnstile_sitekey: string | null;
230
273
  /** Present only while email marketing is enabled for the site (single-form reads). */
231
- purpose?: 'general' | 'newsletter';
274
+ purpose?: 'general' | 'opt_in' | 'newsletter';
232
275
  created_at: string;
233
276
  updated_at: string;
234
277
  }
@@ -2155,7 +2198,18 @@ interface AifeaturesApiClient {
2155
2198
  getMarketingTags(siteId: string): Promise<MarketingTag[]>;
2156
2199
  getEmailDrafts(siteId: string, kind?: EmailDraftKind): Promise<EmailDraft[]>;
2157
2200
  getEmailDraft(siteId: string, draftId: string): Promise<EmailDraft>;
2158
- previewEmailDraft(siteId: string, draftId: string): Promise<EmailDraftPreview>;
2201
+ /**
2202
+ * The draft as it sends. `editable` is the inline editor's preview (KTD30):
2203
+ * section markers and a bridge script, for an iframe with
2204
+ * `sandbox="allow-scripts"` only; never show it anywhere else.
2205
+ */
2206
+ previewEmailDraft(siteId: string, draftId: string, opts?: {
2207
+ editable?: boolean;
2208
+ }): Promise<EmailDraftPreview>;
2209
+ /** The site's templates, newest first, without source. Standard has no entry. */
2210
+ getEmailTemplates(siteId: string): Promise<EmailTemplateSummary[]>;
2211
+ /** A sample email, or `draftId`'s content, through one template; `templateId` `standard` is the built-in one. */
2212
+ previewEmailTemplate(siteId: string, templateId: string, draftId?: string): Promise<EmailTemplatePreview>;
2159
2213
  getBroadcasts(siteId: string): Promise<Broadcast[]>;
2160
2214
  estimateBroadcast(siteId: string, input: {
2161
2215
  targeting: BroadcastTargeting;
@@ -2968,6 +3022,14 @@ declare function RetainersPanel({ retainers, isLoading, error, onRetry, onShowCy
2968
3022
  /** Shared merchant dashboard surface; all writes use the same API as agent tools. */
2969
3023
  declare function PromosPanel(): react_jsx_runtime.JSX.Element;
2970
3024
 
3025
+ /** An image the host's site-image picker returns (U18 passes the site's media). */
3026
+ interface PickedImage {
3027
+ url: string;
3028
+ alt?: string;
3029
+ }
3030
+ /** Opens the host's picker of the site's images; resolves null when the merchant cancels. */
3031
+ type PickImage = () => Promise<PickedImage | null>;
3032
+
2971
3033
  /**
2972
3034
  * The email view's org-key writes (email marketing plan U10, KTD10, KTD17).
2973
3035
  *
@@ -2992,8 +3054,8 @@ declare function PromosPanel(): react_jsx_runtime.JSX.Element;
2992
3054
  * it (for example, `GET /forms/{formId}` with that site's token).
2993
3055
  * - `exportContacts` answers with CSV text, not JSON; resolve with the text.
2994
3056
  * - On an aifeatures error, reject with an Error whose `code` is the
2995
- * aifeatures error `code` (`version_conflict`, `over_allowance`, …): the
2996
- * view keys its recovery on it.
3057
+ * aifeatures error `code` (`version_conflict`, `over_allowance`,
3058
+ * `template_in_use`, `template_archived`, …): the view keys its recovery on it.
2997
3059
  */
2998
3060
  declare const EMAIL_ORG_ACTIONS: {
2999
3061
  readonly commitBroadcast: {
@@ -3024,6 +3086,36 @@ declare const EMAIL_ORG_ACTIONS: {
3024
3086
  readonly path: "/sites/{siteId}/marketing/drafts/{draftId}/test";
3025
3087
  readonly params: readonly ["draftId"];
3026
3088
  };
3089
+ readonly setDraftTemplate: {
3090
+ readonly method: "PUT";
3091
+ readonly path: "/sites/{siteId}/marketing/drafts/{draftId}/template";
3092
+ readonly params: readonly ["draftId"];
3093
+ };
3094
+ readonly duplicateDraft: {
3095
+ readonly method: "POST";
3096
+ readonly path: "/sites/{siteId}/marketing/drafts/{draftId}/duplicate";
3097
+ readonly params: readonly ["draftId"];
3098
+ };
3099
+ readonly copyEmailTemplate: {
3100
+ readonly method: "POST";
3101
+ readonly path: "/sites/{siteId}/marketing/templates/{templateId}/copy";
3102
+ readonly params: readonly ["templateId"];
3103
+ };
3104
+ readonly archiveEmailTemplate: {
3105
+ readonly method: "POST";
3106
+ readonly path: "/sites/{siteId}/marketing/templates/{templateId}/archive";
3107
+ readonly params: readonly ["templateId"];
3108
+ };
3109
+ readonly unarchiveEmailTemplate: {
3110
+ readonly method: "POST";
3111
+ readonly path: "/sites/{siteId}/marketing/templates/{templateId}/unarchive";
3112
+ readonly params: readonly ["templateId"];
3113
+ };
3114
+ readonly deleteEmailTemplate: {
3115
+ readonly method: "DELETE";
3116
+ readonly path: "/sites/{siteId}/marketing/templates/{templateId}";
3117
+ readonly params: readonly ["templateId"];
3118
+ };
3027
3119
  readonly importContacts: {
3028
3120
  readonly method: "POST";
3029
3121
  readonly path: "/sites/{siteId}/contacts/import";
@@ -3148,13 +3240,39 @@ interface EmailDomainSetupResult {
3148
3240
  /** The plan's help text for the double opt-in toggle, verbatim. */
3149
3241
  declare const DOUBLE_OPT_IN_HELP = "Subscribers confirm by email before they receive anything. Useful if many subscribers are in the EU (especially Germany), or if your forms attract fake or mistyped signups. Some signups need confirming even with this off: bursts of signups, and people re-subscribing after they unsubscribed.";
3150
3242
 
3151
- interface EmailViewProps {
3243
+ /** What the host knows about the site that the email API doesn't. All optional. */
3244
+ interface EmailSiteInfo {
3245
+ /** The site's custom domain (`woodwagon.co`); null when it has none. Unknown when omitted. */
3246
+ siteDomain?: string | null;
3247
+ /** The site's business name, for before the owner has set a sender name. */
3248
+ businessName?: string | null;
3249
+ }
3250
+
3251
+ interface EmailViewProps extends EmailSiteInfo {
3152
3252
  siteId: string;
3153
3253
  /** The viewer is the site's owner (or an admin): writes are offered. */
3154
3254
  isOwnerSide: boolean;
3155
3255
  needsPaidPlan: boolean;
3156
- /** Open this draft on mount (`show_view('email', {draft_id})`). Nothing sends until the merchant clicks. */
3256
+ /**
3257
+ * Deep link (`show_view('email', {draft_id})`): open this draft. Nothing
3258
+ * sends until the merchant clicks. Wins over `templateId` and `initialTab`.
3259
+ */
3157
3260
  initialDraftId?: string;
3261
+ /** Deep link (`show_view('email', {tab})`): open this tab. The old `template` opens Templates. */
3262
+ initialTab?: EmailViewInitialTab;
3263
+ /**
3264
+ * Deep link (`show_view('email', {template_id})`): open this template;
3265
+ * `standard` is the built-in one, and an id the site no longer has opens the
3266
+ * Templates list. Wins over `initialTab`.
3267
+ */
3268
+ templateId?: string;
3269
+ /**
3270
+ * The host's show_view counter. The view is never remounted for a link
3271
+ * (KTD32): a new nonce applies the link props again, even when they are
3272
+ * unchanged, and a link that arrives while an inline edit is open applies
3273
+ * once it closes.
3274
+ */
3275
+ showViewNonce?: number;
3158
3276
  /** The host's org-key relay for every write (see EMAIL_ORG_ACTIONS). */
3159
3277
  onOrgAction: (action: EmailOrgAction, input: Record<string, unknown>) => Promise<unknown>;
3160
3278
  /** A paused site asks an admin to review it (resume stays admin-only). */
@@ -3162,6 +3280,16 @@ interface EmailViewProps {
3162
3280
  /** Create the sending domain (and its DNS when the site's nameservers are ours). */
3163
3281
  onStartDomainSetup?: () => Promise<EmailDomainSetupResult>;
3164
3282
  onBackToWebsite?: () => void;
3283
+ /** Open the host's plan page; a plan without email shows it as Upgrade to Pro. */
3284
+ onUpgradePlan?: () => void;
3285
+ /** Open the host's domain settings, for a site with no custom domain. */
3286
+ onConnectDomain?: () => void;
3287
+ /** Put a prompt in the host's chat composer, unsent ("Add a newsletter signup to my footer"). */
3288
+ onAskAssistant?: (prompt: string) => void;
3289
+ /** Pick one of the site's images for an email image section; resolve null on cancel. Without it the editor asks for an https URL. */
3290
+ onPickImage?: PickImage;
3291
+ /** Get started: turn email marketing on for the site. Without it, a site with email off shows the intro and no button. */
3292
+ onTurnOn?: () => Promise<void>;
3165
3293
  /** Open the host's Settings → Store, where checkout marketing consent lives. */
3166
3294
  onOpenStoreSettings?: () => void;
3167
3295
  /**
@@ -3172,9 +3300,12 @@ interface EmailViewProps {
3172
3300
  refreshKey?: number;
3173
3301
  className?: string;
3174
3302
  }
3303
+ /** The Email view's tabs (KTD35), the same list as the app's `EMAIL_VIEW_TABS` and the modal's `show_view`. */
3304
+ type EmailViewTab = "audience" | "broadcasts" | "automations" | "templates" | "settings";
3305
+ type EmailViewInitialTab = EmailViewTab | "template";
3175
3306
  /**
3176
- * EmailView — the merchant's email marketing view (plan U10): audience,
3177
- * broadcasts and settings.
3307
+ * EmailView — the merchant's email marketing view (plan U10; email templates
3308
+ * U15): audience, broadcasts, templates and settings.
3178
3309
  * Reads use the site token; every write goes through `onOrgAction`.
3179
3310
  */
3180
3311
  /**
@@ -4074,4 +4205,4 @@ interface DashboardViewProps {
4074
4205
  */
4075
4206
  declare function DashboardView({ refreshKey, onBackToWebsite, primaryConversion, onChangePrimaryConversion, onOpenSurface, needsPaidPlan, onUpgradePlan, onConnectStripe, }: DashboardViewProps): react_jsx_runtime.JSX.Element;
4076
4207
 
4077
- export { AUDIENCE_PAGE_SIZE, 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 Broadcast, type BroadcastPlan, type BroadcastStatus, type BroadcastTargeting, type BusinessSummary, type BusinessVisitors, type ContactConsentStatus, ContactImport, type ContactImportProps, type ContactImportReport, type ContactTagRef, type CreateEventDestinationInput, type CreateFormInput, type CreateOptionInput, type CreateProductInput, type CreatePromoInput, type CreateVariantInput, type CurrencyRestatement, type Customer, type CustomerAddress, CustomerDetail, type CustomerDetail$1 as CustomerDetailData, type CustomerDetailProps, CustomersList, type CustomersListProps, type CustomersListResponse, DOUBLE_OPT_IN_HELP, DashboardView, type DashboardViewProps, EMAIL_ORG_ACTIONS, EMAIL_READINESS_TEXT, type EmailDelivery, type EmailDomainSetupResult, type EmailDraft, type EmailDraftBlock, type EmailDraftKind, type EmailDraftPreview, type EmailOrgAction, type EmailOrgRequest, type EmailResource, type EmailSideStatus, EmailView, type EmailViewProps, type EventDeliveriesListResponse, type EventDelivery, type EventDestination, type EventDestinationSecretResponse, type EventDestinationsListResponse, ExportCsvButton, type ExportCsvButtonProps, type ExportOrdersOptions, type ExportPeopleOptions, type ExportRetainersOptions, type ExportSubscriptionsOptions, type Form, FormSettings, type FormSettingsProps, FormSubmissions, type FormSubmissionsProps, FormsDashboard, type FormsDashboardProps, FormsList, type FormsListProps, type FormsListResponse, type FormsLocation, type FormsTab, type GetBusinessSummaryOptions, type GetCustomersOptions, type GetInvoicesOptions, type GetOrdersOptions, type GetPeopleOptions, type GetProductsOptions, type GetSubmissionsOptions, type GetSubscriptionsOptions, IMPORT_ATTESTATION, type ImportSkipReason, type Invoice, type InvoiceAggregates, type InvoiceBillTo, type InvoiceDeliveryState, InvoiceDetail, type InvoiceDetailProps, type InvoiceLabel, InvoiceLabelBadge, type InvoiceLineItem, type InvoicePreview, type InvoiceSettings, InvoiceSettingsPanel, type InvoiceSettingsPanelProps, InvoicesList, type InvoicesListProps, InvoicesView, type InvoicesViewProps, LeadsView, type LeadsViewProps, type LowStockProduct, MAX_ANALYTICS_FILTERS, MAX_ANALYTICS_FILTER_VALUES, type MarketingContact, type MarketingContactStats, type MarketingContactsPage, type MarketingSettings, type MarketingTag, type NeedsAttentionItem, type NeedsAttentionType, NotificationRecipientsSettings, type NotificationRecipientsSettingsProps, 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 RecoveryFlow, type RecoveryStep, type RefundRequest, type ReportSlot, RetainerStatusBadge, RetainersPanel, type RetainersPanelProps, type RevenueCurrencyTotal, type RevenuePeriod, type SetInventoryInput, type SetOrderFulfillmentInput, type SettledRevenue, type ShippingRate, type SiteSettings, type StoreInvoiceSettingsInput, StoreSettings, type StoreSettingsProps, type StoreSettingsSection, type Submission, SubmissionDetail, type SubmissionDetailProps, type SubmissionMetadata, type Subscription, SubscriptionsView, type SubscriptionsViewProps, type UpdateEventDestinationInput, type UpdateFormInput, type UpdateOptionInput, type UpdateProductInput, type UpdateSiteSettingsInput, type UpdateSiteSettingsResult, type UpdateVariantInput, type UseAnalyticsOptions, type UseAnalyticsReturn, type UseAudienceOptions, type UseAudienceReturn, type UseBroadcastsOptions, type UseBusinessSummaryOptions, type UseBusinessSummaryReturn, type UseCsvExportOptions, type UseCsvExportReturn, type UseCustomersOptions, type UseCustomersReturn, type UseEmailDraftsOptions, 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 UseSiteSettingsOptions, type UseSiteSettingsReturn, type UseSubmissionsOptions, type UseSubmissionsReturn, type UseSubscriptionsOptions, type UseSubscriptionsReturn, type VariantInventory, type VariantOptionValue, VariantsEditor, type VariantsEditorProps, ViewShell, type ViewShellProps, WebhookDeliveries, type WebhookDeliveriesProps, WebhookSettings, type WebhookSettingsProps, type WelcomeSequence, type WelcomeStep, buildEmailOrgRequest, chargedTotal, createApiClient, emailReadinessText, formatPrice, isEmailOrgAction, isZeroDecimalCurrency, toMajorUnits, toMinorUnits, useAifeaturesContext as useAifeatures, useAifeaturesContext, useAnalytics, useAudience, useBroadcasts, useBusinessSummary, useCsvExport, useCustomers, useEmailDrafts, useEventDestinations, useForms, useInvoices, useOrders, usePaymentsStatus, usePeople, usePerson, useProducts, useRealtimeVisitors, useRetainers, useSiteSettings, useSubmissions, useSubscriptions };
4208
+ export { AUDIENCE_PAGE_SIZE, 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 Broadcast, type BroadcastPlan, type BroadcastStatus, type BroadcastTargeting, type BusinessSummary, type BusinessVisitors, type ContactConsentStatus, ContactImport, type ContactImportProps, type ContactImportReport, type ContactTagRef, type CreateEventDestinationInput, type CreateFormInput, type CreateOptionInput, type CreateProductInput, type CreatePromoInput, type CreateVariantInput, type CurrencyRestatement, type Customer, type CustomerAddress, CustomerDetail, type CustomerDetail$1 as CustomerDetailData, type CustomerDetailProps, CustomersList, type CustomersListProps, type CustomersListResponse, DOUBLE_OPT_IN_HELP, DashboardView, type DashboardViewProps, EMAIL_ORG_ACTIONS, EMAIL_READINESS_TEXT, type EmailDelivery, type EmailDomainSetupResult, type EmailDraft, type EmailDraftBlock, type EmailDraftKind, type EmailDraftPreview, type EmailOrgAction, type EmailOrgRequest, type EmailResource, type EmailSideStatus, type EmailTemplatePreview, type EmailTemplateRef, type EmailTemplateStatus, type EmailTemplateSummary, EmailView, type EmailViewInitialTab, type EmailViewProps, type EmailViewTab, type EventDeliveriesListResponse, type EventDelivery, type EventDestination, type EventDestinationSecretResponse, type EventDestinationsListResponse, ExportCsvButton, type ExportCsvButtonProps, type ExportOrdersOptions, type ExportPeopleOptions, type ExportRetainersOptions, type ExportSubscriptionsOptions, type Form, FormSettings, type FormSettingsProps, FormSubmissions, type FormSubmissionsProps, FormsDashboard, type FormsDashboardProps, FormsList, type FormsListProps, type FormsListResponse, type FormsLocation, type FormsTab, type GetBusinessSummaryOptions, type GetCustomersOptions, type GetInvoicesOptions, type GetOrdersOptions, type GetPeopleOptions, type GetProductsOptions, type GetSubmissionsOptions, type GetSubscriptionsOptions, IMPORT_ATTESTATION, type ImportSkipReason, type Invoice, type InvoiceAggregates, type InvoiceBillTo, type InvoiceDeliveryState, InvoiceDetail, type InvoiceDetailProps, type InvoiceLabel, InvoiceLabelBadge, type InvoiceLineItem, type InvoicePreview, type InvoiceSettings, InvoiceSettingsPanel, type InvoiceSettingsPanelProps, InvoicesList, type InvoicesListProps, InvoicesView, type InvoicesViewProps, LeadsView, type LeadsViewProps, type LowStockProduct, MAX_ANALYTICS_FILTERS, MAX_ANALYTICS_FILTER_VALUES, type MarketingContact, type MarketingContactStats, type MarketingContactsPage, type MarketingSettings, type MarketingTag, type NeedsAttentionItem, type NeedsAttentionType, NotificationRecipientsSettings, type NotificationRecipientsSettingsProps, 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 RecoveryFlow, type RecoveryStep, type RefundRequest, type ReportSlot, RetainerStatusBadge, RetainersPanel, type RetainersPanelProps, type RevenueCurrencyTotal, type RevenuePeriod, type SetInventoryInput, type SetOrderFulfillmentInput, type SettledRevenue, type ShippingRate, type SiteSettings, type StoreInvoiceSettingsInput, StoreSettings, type StoreSettingsProps, type StoreSettingsSection, type Submission, SubmissionDetail, type SubmissionDetailProps, type SubmissionMetadata, type Subscription, SubscriptionsView, type SubscriptionsViewProps, type UpdateEventDestinationInput, type UpdateFormInput, type UpdateOptionInput, type UpdateProductInput, type UpdateSiteSettingsInput, type UpdateSiteSettingsResult, type UpdateVariantInput, type UseAnalyticsOptions, type UseAnalyticsReturn, type UseAudienceOptions, type UseAudienceReturn, type UseBroadcastsOptions, type UseBusinessSummaryOptions, type UseBusinessSummaryReturn, type UseCsvExportOptions, type UseCsvExportReturn, type UseCustomersOptions, type UseCustomersReturn, type UseEmailDraftsOptions, 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 UseSiteSettingsOptions, type UseSiteSettingsReturn, type UseSubmissionsOptions, type UseSubmissionsReturn, type UseSubscriptionsOptions, type UseSubscriptionsReturn, type VariantInventory, type VariantOptionValue, VariantsEditor, type VariantsEditorProps, ViewShell, type ViewShellProps, WebhookDeliveries, type WebhookDeliveriesProps, WebhookSettings, type WebhookSettingsProps, type WelcomeSequence, type WelcomeStep, buildEmailOrgRequest, chargedTotal, createApiClient, emailReadinessText, formatPrice, isEmailOrgAction, isZeroDecimalCurrency, toMajorUnits, toMinorUnits, useAifeaturesContext as useAifeatures, useAifeaturesContext, useAnalytics, useAudience, useBroadcasts, useBusinessSummary, useCsvExport, useCustomers, useEmailDrafts, useEventDestinations, useForms, useInvoices, useOrders, usePaymentsStatus, usePeople, usePerson, useProducts, useRealtimeVisitors, useRetainers, useSiteSettings, useSubmissions, useSubscriptions };