@aifeatures/react 0.22.0 → 0.24.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
@@ -92,6 +92,115 @@ declare namespace AifeaturesCaptcha {
92
92
  var neverConsentGate: string;
93
93
  }
94
94
 
95
+ /** The reserved form field the aifeatures form endpoint reads as marketing
96
+ * consent (stripped from the stored submission server-side). */
97
+ declare const MARKETING_OPT_IN_FIELD = "_marketing_opt_in";
98
+ /** The box's presence marker: a reserved hidden field posted whether or not
99
+ * the box is ticked, so the form endpoint can refuse a form that carries the
100
+ * box without the `opt_in` purpose on its first submission (stripped
101
+ * server-side like the box itself). */
102
+ declare const MARKETING_OPT_IN_BOX_FIELD = "_marketing_opt_in_box";
103
+ interface MarketingOptInProps {
104
+ /**
105
+ * Visible text saying what the visitor agrees to (e.g. "Email me news and
106
+ * offers from Wave Bye"). Required: it is rendered inside the checkbox's
107
+ * <label>, so it is also the checkbox's accessible name.
108
+ */
109
+ label: ReactNode;
110
+ /** Called with the box's state on every change (checkout buttons use it). */
111
+ onChange?: (checked: boolean) => void;
112
+ /** Class name for the <label> wrapper */
113
+ className?: string;
114
+ style?: CSSProperties;
115
+ /**
116
+ * Not supported: consent must be an affirmative tick, so the box always
117
+ * starts unchecked. Typed `never` so a pre-ticked usage fails type-check;
118
+ * a value passed anyway is ignored.
119
+ */
120
+ checked?: never;
121
+ /** Not supported — see `checked`. */
122
+ defaultChecked?: never;
123
+ }
124
+ /**
125
+ * An unticked "email me" checkbox for marketing consent.
126
+ *
127
+ * Inside an aifeatures form it posts `_marketing_opt_in=true` only when the
128
+ * visitor ticks it, plus an always-posted `_marketing_opt_in_box=1` marker
129
+ * saying the box is on the form. It always renders unchecked: `checked`
130
+ * and `defaultChecked` are ignored, because a pre-ticked box is not consent.
131
+ *
132
+ * The form's purpose must be `opt_in`: the form endpoint refuses every
133
+ * submission (400 `form_purpose_not_opt_in`, ticked or not) from a form that
134
+ * carries this box with any other purpose. Set it when adding the box, and
135
+ * set the purpose back to `general` when removing it.
136
+ *
137
+ * Use it on contact/quote/booking forms. A form whose only job is newsletter
138
+ * signup should use `<NewsletterSignup>` instead (submitting it IS the
139
+ * opt-in, so it needs no box; a newsletter form carrying the box is refused).
140
+ *
141
+ * @example
142
+ * ```tsx
143
+ * <form action={`https://aifeatures.dev/f/${formId}`} method="POST">
144
+ * <input name="email" type="email" required />
145
+ * <MarketingOptIn label="Email me news and offers" />
146
+ * <AifeaturesCaptcha formId={formId} />
147
+ * <button type="submit">Send</button>
148
+ * </form>
149
+ * ```
150
+ */
151
+ declare function MarketingOptIn({ label, onChange, className, style }: MarketingOptInProps): react_jsx_runtime.JSX.Element;
152
+ declare namespace MarketingOptIn {
153
+ var neverConsentGate: string;
154
+ }
155
+
156
+ /**
157
+ * The marketing part of a JSON form-submit response (POST /f/:formId with
158
+ * `Accept: application/json`). `pending` = the site uses double opt-in and a
159
+ * confirmation email is on its way; `subscribed` = mailable now. Absent on
160
+ * older API deployments, when email marketing is off, and when the signup
161
+ * was not captured — read as a plain acknowledgement that claims nothing.
162
+ */
163
+ interface FormSubmitMarketing {
164
+ status: 'pending' | 'subscribed';
165
+ }
166
+ interface NewsletterSignupProps {
167
+ /**
168
+ * Form ID from aifeatures. The form must have purpose `newsletter` (set
169
+ * server-side) — submitting it is the visitor's opt-in.
170
+ */
171
+ formId: string;
172
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
173
+ apiUrl?: string;
174
+ /** Visible label for the email field (default "Email address"). */
175
+ label?: string;
176
+ /** Submit button text (default "Subscribe"). */
177
+ buttonText?: string;
178
+ /** Class name for the wrapper */
179
+ className?: string;
180
+ /** Class name for the email <input> */
181
+ inputClassName?: string;
182
+ /** Class name for the submit <button> */
183
+ buttonClassName?: string;
184
+ style?: CSSProperties;
185
+ }
186
+ /**
187
+ * A newsletter signup form: one explicit `email` field, the Turnstile check,
188
+ * and "unsubscribe anytime" copy. Posts to an aifeatures form whose purpose
189
+ * is `newsletter`, so submitting it is the opt-in — no checkbox.
190
+ *
191
+ * After submit it says "check your email to confirm" when the API reports the
192
+ * contact pending (double opt-in sites), "thanks for subscribing" only when
193
+ * it reports them subscribed, and a plain acknowledgement otherwise (no
194
+ * marketing result: it cannot say the visitor is on the list), announced
195
+ * through an aria-live region.
196
+ *
197
+ * Unstyled beyond layout — pass className props to match the site.
198
+ */
199
+ declare function NewsletterSignup({ formId, apiUrl: explicitApiUrl, label, buttonText, className, inputClassName, buttonClassName, style, }: NewsletterSignupProps): react_jsx_runtime.JSX.Element;
200
+ declare namespace NewsletterSignup {
201
+ var neverConsentGate: string;
202
+ }
203
+
95
204
  /** One selectable value of an option (e.g. "L" of "Size"). */
96
205
  interface PublicOptionValue {
97
206
  id: string;
@@ -278,6 +387,15 @@ interface PublicProduct {
278
387
  purchasable?: boolean;
279
388
  /** Whether the site's Stripe account can currently take payments. */
280
389
  payments_ready: boolean;
390
+ /**
391
+ * Which marketing-consent box checkout uses — a SITE-level fact surfaced
392
+ * per product. `'stripe'`: Stripe Checkout shows its own consent box (US
393
+ * stores with checkout consent on), so the page shows none. `'onsite'`:
394
+ * BuyButton / CartCheckoutButton render an unticked "email me" box and send
395
+ * `marketing_opt_in: true` when it is ticked. Absent (marketing email not
396
+ * enabled for the site, or an older API): no box at all.
397
+ */
398
+ checkout_consent?: 'stripe' | 'onsite';
281
399
  /**
282
400
  * Option axes for a multi-variant product (empty for single-variant). Feed
283
401
  * these plus `variants` to `<VariantPicker>` to resolve a variant id.
@@ -498,6 +616,12 @@ interface StartCheckoutOptions {
498
616
  cancelUrl?: string;
499
617
  /** Prefills the email field on the Stripe Checkout page. */
500
618
  customerEmail?: string;
619
+ /**
620
+ * The buyer ticked the on-site "email me" box (see
621
+ * `PublicProduct.checkout_consent`). Sends `marketing_opt_in: true` only
622
+ * when true; anything else sends nothing.
623
+ */
624
+ marketingOptIn?: boolean;
501
625
  /**
502
626
  * Subscription selling plan to buy (subscriptions Unit 8). Present =
503
627
  * subscription-mode checkout: quantity is locked at 1 (any `quantity`
@@ -731,6 +855,13 @@ interface UseCartItemsResult {
731
855
  * nothing in both cases, and NEVER read null as "ships nowhere".
732
856
  */
733
857
  shippingCountries: string[] | null;
858
+ /**
859
+ * ORDER-LEVEL checkout consent mode — the first non-null
860
+ * `checkout_consent` from any resolved line's product (a site-level fact).
861
+ * `'onsite'` = render an unticked "email me" box and pass its state as
862
+ * `marketingOptIn`; `'stripe'` or null = render no box.
863
+ */
864
+ checkoutConsent: 'stripe' | 'onsite' | null;
734
865
  /** True while a resolution pass is running. */
735
866
  loading: boolean;
736
867
  /** Set when some product reads failed transiently (lines marked `error`). */
@@ -896,6 +1027,12 @@ interface StartCartCheckoutOptions {
896
1027
  cancelUrl?: string;
897
1028
  /** Prefills the email field on the Stripe Checkout page. */
898
1029
  customerEmail?: string;
1030
+ /**
1031
+ * The buyer ticked the on-site "email me" box (see
1032
+ * `UseCartItemsResult.checkoutConsent`). Sends `marketing_opt_in: true`
1033
+ * only when true.
1034
+ */
1035
+ marketingOptIn?: boolean;
899
1036
  /** Opaque passthrough stored on the order (string values only). */
900
1037
  metadata?: Record<string, string>;
901
1038
  /**
@@ -2794,4 +2931,4 @@ declare namespace AccountReviews {
2794
2931
  var neverConsentGate: string;
2795
2932
  }
2796
2933
 
2797
- export { AccountLogin, type AccountLoginFormContext, type AccountLoginProps, type AccountLoginSentContext, type AccountMePayload, type AccountOrder, AccountOrders, type AccountOrdersProps, AccountPage, type AccountPagePmBannerContext, type AccountPageProps, AccountReviews, type AccountReviewsProps, type AccountShippingAddressInput, type AccountSubscription, type AddCartLineInput, AddToCartButton, type AddToCartButtonProps, type AddToCartResult, AifeaturesCaptcha, type AifeaturesCaptchaProps, AifeaturesProvider, type AifeaturesProviderProps, BuyButton, type BuyButtonProps, CartCheckoutButton, type CartCheckoutButtonProps, type CartCheckoutLine, type CartConflictItem, type CartItemLine, type CartLine, type CartLineDisplay, type CartLineStatus, CartPage, type CartPagePart, type CartPageProps, type CartSummary, type CartSummaryShipping, type CartSummaryShippingOption, ConsentBanner, type ConsentBannerDisclosureProps, type ConsentBannerProps, type ConsentCategory, type ConsentDisclosureStrings, type ConsentGrants, type ConsentIntegration, type ConsentLocale, type ConsentManifest, ConsentPolicyDetails, type ConsentPolicyDetailsProps, ConsentProvider, type ConsentProviderProps, type ConsentThemeTokens, CookieSettingsLink, type CookieSettingsLinkProps, GatedContent, type GatedContentProps, type GatedContentStrings, GatedScript, type GatedScriptProps, type LoginResult, MARKET_COUNTRIES, MAX_CART_LINES, type MarketCountry, OrderConfirmation, type OrderConfirmationProps, type OrderFulfillment, type OrderSession, type OrderSessionLineItem, type OrderSessionSubscription, type OrderStatus, type OwnProductReview, PlanPicker, type PlanPickerOptionContext, type PlanPickerProps, PreferencesPanel, type PreferencesPanelProps, type PreferencesStrings, ProductPrice, type ProductPriceProps, ProductRating, type ProductRatingProps, type ProductReview, ProductReviewForm, type ProductReviewFormProps, ProductReviews, type ProductReviewsProps, type PublicOption, type PublicOptionValue, type PublicProduct, type PublicProductSubscription, type PublicSubscriptionPlan, type PublicVariant, type PublicVariantOptionValue, type ReviewAvailability, type ReviewSummary, type SessionCustomer, type SessionReason, type SessionStatus, type ShippingOptionConflict, type StartCartCheckoutOptions, type StartCheckoutOptions, SubscriptionList, type SubscriptionListAuth, type SubscriptionListProps, type SubscriptionMutationState, type SubscriptionRowContext, type UseCartCheckoutOptions, type UseCartCheckoutResult, type UseCartItemsOptions, type UseCartItemsResult, type UseCartResult, type UseCartSummaryOptions, type UseCartSummaryResult, type UseCheckoutOptions, type UseCheckoutResult, type UseConsentResult, type UseMarketOptions, type UseMarketResult, type UseProductOptions, type UseProductResult, type UseProductReviewsOptions, type UseProductReviewsResult, type UseSessionOptions, type UseSessionResult, VariantPicker, type VariantPickerProps, type VariantSelection, type VerifyResult, ZERO_DECIMAL_CURRENCIES, applySelectionToUrl, consentLocales, formatPrice, getOptions, getVariants, isMultiVariant, isValueAvailable, isValueInCatalog, planRecurringAmount, reanchorSelection, resolveVariant, searchFromSelection, selectedImages, selectedValues, selectionFromSearch, useAifeaturesApiUrl, useCart, useCartCheckout, useCartItems, useCartSummary, useCheckout, useConsent, useMarket, useProduct, useProductReviews, useSession, valueSlug, variantPriceRange };
2934
+ export { AccountLogin, type AccountLoginFormContext, type AccountLoginProps, type AccountLoginSentContext, type AccountMePayload, type AccountOrder, AccountOrders, type AccountOrdersProps, AccountPage, type AccountPagePmBannerContext, type AccountPageProps, AccountReviews, type AccountReviewsProps, type AccountShippingAddressInput, type AccountSubscription, type AddCartLineInput, AddToCartButton, type AddToCartButtonProps, type AddToCartResult, AifeaturesCaptcha, type AifeaturesCaptchaProps, AifeaturesProvider, type AifeaturesProviderProps, BuyButton, type BuyButtonProps, CartCheckoutButton, type CartCheckoutButtonProps, type CartCheckoutLine, type CartConflictItem, type CartItemLine, type CartLine, type CartLineDisplay, type CartLineStatus, CartPage, type CartPagePart, type CartPageProps, type CartSummary, type CartSummaryShipping, type CartSummaryShippingOption, ConsentBanner, type ConsentBannerDisclosureProps, type ConsentBannerProps, type ConsentCategory, type ConsentDisclosureStrings, type ConsentGrants, type ConsentIntegration, type ConsentLocale, type ConsentManifest, ConsentPolicyDetails, type ConsentPolicyDetailsProps, ConsentProvider, type ConsentProviderProps, type ConsentThemeTokens, CookieSettingsLink, type CookieSettingsLinkProps, type FormSubmitMarketing, GatedContent, type GatedContentProps, type GatedContentStrings, GatedScript, type GatedScriptProps, type LoginResult, MARKETING_OPT_IN_BOX_FIELD, MARKETING_OPT_IN_FIELD, MARKET_COUNTRIES, MAX_CART_LINES, type MarketCountry, MarketingOptIn, type MarketingOptInProps, NewsletterSignup, type NewsletterSignupProps, OrderConfirmation, type OrderConfirmationProps, type OrderFulfillment, type OrderSession, type OrderSessionLineItem, type OrderSessionSubscription, type OrderStatus, type OwnProductReview, PlanPicker, type PlanPickerOptionContext, type PlanPickerProps, PreferencesPanel, type PreferencesPanelProps, type PreferencesStrings, ProductPrice, type ProductPriceProps, ProductRating, type ProductRatingProps, type ProductReview, ProductReviewForm, type ProductReviewFormProps, ProductReviews, type ProductReviewsProps, type PublicOption, type PublicOptionValue, type PublicProduct, type PublicProductSubscription, type PublicSubscriptionPlan, type PublicVariant, type PublicVariantOptionValue, type ReviewAvailability, type ReviewSummary, type SessionCustomer, type SessionReason, type SessionStatus, type ShippingOptionConflict, type StartCartCheckoutOptions, type StartCheckoutOptions, SubscriptionList, type SubscriptionListAuth, type SubscriptionListProps, type SubscriptionMutationState, type SubscriptionRowContext, type UseCartCheckoutOptions, type UseCartCheckoutResult, type UseCartItemsOptions, type UseCartItemsResult, type UseCartResult, type UseCartSummaryOptions, type UseCartSummaryResult, type UseCheckoutOptions, type UseCheckoutResult, type UseConsentResult, type UseMarketOptions, type UseMarketResult, type UseProductOptions, type UseProductResult, type UseProductReviewsOptions, type UseProductReviewsResult, type UseSessionOptions, type UseSessionResult, VariantPicker, type VariantPickerProps, type VariantSelection, type VerifyResult, ZERO_DECIMAL_CURRENCIES, applySelectionToUrl, consentLocales, formatPrice, getOptions, getVariants, isMultiVariant, isValueAvailable, isValueInCatalog, planRecurringAmount, reanchorSelection, resolveVariant, searchFromSelection, selectedImages, selectedValues, selectionFromSearch, useAifeaturesApiUrl, useCart, useCartCheckout, useCartItems, useCartSummary, useCheckout, useConsent, useMarket, useProduct, useProductReviews, useSession, valueSlug, variantPriceRange };
package/dist/index.d.ts CHANGED
@@ -92,6 +92,115 @@ declare namespace AifeaturesCaptcha {
92
92
  var neverConsentGate: string;
93
93
  }
94
94
 
95
+ /** The reserved form field the aifeatures form endpoint reads as marketing
96
+ * consent (stripped from the stored submission server-side). */
97
+ declare const MARKETING_OPT_IN_FIELD = "_marketing_opt_in";
98
+ /** The box's presence marker: a reserved hidden field posted whether or not
99
+ * the box is ticked, so the form endpoint can refuse a form that carries the
100
+ * box without the `opt_in` purpose on its first submission (stripped
101
+ * server-side like the box itself). */
102
+ declare const MARKETING_OPT_IN_BOX_FIELD = "_marketing_opt_in_box";
103
+ interface MarketingOptInProps {
104
+ /**
105
+ * Visible text saying what the visitor agrees to (e.g. "Email me news and
106
+ * offers from Wave Bye"). Required: it is rendered inside the checkbox's
107
+ * <label>, so it is also the checkbox's accessible name.
108
+ */
109
+ label: ReactNode;
110
+ /** Called with the box's state on every change (checkout buttons use it). */
111
+ onChange?: (checked: boolean) => void;
112
+ /** Class name for the <label> wrapper */
113
+ className?: string;
114
+ style?: CSSProperties;
115
+ /**
116
+ * Not supported: consent must be an affirmative tick, so the box always
117
+ * starts unchecked. Typed `never` so a pre-ticked usage fails type-check;
118
+ * a value passed anyway is ignored.
119
+ */
120
+ checked?: never;
121
+ /** Not supported — see `checked`. */
122
+ defaultChecked?: never;
123
+ }
124
+ /**
125
+ * An unticked "email me" checkbox for marketing consent.
126
+ *
127
+ * Inside an aifeatures form it posts `_marketing_opt_in=true` only when the
128
+ * visitor ticks it, plus an always-posted `_marketing_opt_in_box=1` marker
129
+ * saying the box is on the form. It always renders unchecked: `checked`
130
+ * and `defaultChecked` are ignored, because a pre-ticked box is not consent.
131
+ *
132
+ * The form's purpose must be `opt_in`: the form endpoint refuses every
133
+ * submission (400 `form_purpose_not_opt_in`, ticked or not) from a form that
134
+ * carries this box with any other purpose. Set it when adding the box, and
135
+ * set the purpose back to `general` when removing it.
136
+ *
137
+ * Use it on contact/quote/booking forms. A form whose only job is newsletter
138
+ * signup should use `<NewsletterSignup>` instead (submitting it IS the
139
+ * opt-in, so it needs no box; a newsletter form carrying the box is refused).
140
+ *
141
+ * @example
142
+ * ```tsx
143
+ * <form action={`https://aifeatures.dev/f/${formId}`} method="POST">
144
+ * <input name="email" type="email" required />
145
+ * <MarketingOptIn label="Email me news and offers" />
146
+ * <AifeaturesCaptcha formId={formId} />
147
+ * <button type="submit">Send</button>
148
+ * </form>
149
+ * ```
150
+ */
151
+ declare function MarketingOptIn({ label, onChange, className, style }: MarketingOptInProps): react_jsx_runtime.JSX.Element;
152
+ declare namespace MarketingOptIn {
153
+ var neverConsentGate: string;
154
+ }
155
+
156
+ /**
157
+ * The marketing part of a JSON form-submit response (POST /f/:formId with
158
+ * `Accept: application/json`). `pending` = the site uses double opt-in and a
159
+ * confirmation email is on its way; `subscribed` = mailable now. Absent on
160
+ * older API deployments, when email marketing is off, and when the signup
161
+ * was not captured — read as a plain acknowledgement that claims nothing.
162
+ */
163
+ interface FormSubmitMarketing {
164
+ status: 'pending' | 'subscribed';
165
+ }
166
+ interface NewsletterSignupProps {
167
+ /**
168
+ * Form ID from aifeatures. The form must have purpose `newsletter` (set
169
+ * server-side) — submitting it is the visitor's opt-in.
170
+ */
171
+ formId: string;
172
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
173
+ apiUrl?: string;
174
+ /** Visible label for the email field (default "Email address"). */
175
+ label?: string;
176
+ /** Submit button text (default "Subscribe"). */
177
+ buttonText?: string;
178
+ /** Class name for the wrapper */
179
+ className?: string;
180
+ /** Class name for the email <input> */
181
+ inputClassName?: string;
182
+ /** Class name for the submit <button> */
183
+ buttonClassName?: string;
184
+ style?: CSSProperties;
185
+ }
186
+ /**
187
+ * A newsletter signup form: one explicit `email` field, the Turnstile check,
188
+ * and "unsubscribe anytime" copy. Posts to an aifeatures form whose purpose
189
+ * is `newsletter`, so submitting it is the opt-in — no checkbox.
190
+ *
191
+ * After submit it says "check your email to confirm" when the API reports the
192
+ * contact pending (double opt-in sites), "thanks for subscribing" only when
193
+ * it reports them subscribed, and a plain acknowledgement otherwise (no
194
+ * marketing result: it cannot say the visitor is on the list), announced
195
+ * through an aria-live region.
196
+ *
197
+ * Unstyled beyond layout — pass className props to match the site.
198
+ */
199
+ declare function NewsletterSignup({ formId, apiUrl: explicitApiUrl, label, buttonText, className, inputClassName, buttonClassName, style, }: NewsletterSignupProps): react_jsx_runtime.JSX.Element;
200
+ declare namespace NewsletterSignup {
201
+ var neverConsentGate: string;
202
+ }
203
+
95
204
  /** One selectable value of an option (e.g. "L" of "Size"). */
96
205
  interface PublicOptionValue {
97
206
  id: string;
@@ -278,6 +387,15 @@ interface PublicProduct {
278
387
  purchasable?: boolean;
279
388
  /** Whether the site's Stripe account can currently take payments. */
280
389
  payments_ready: boolean;
390
+ /**
391
+ * Which marketing-consent box checkout uses — a SITE-level fact surfaced
392
+ * per product. `'stripe'`: Stripe Checkout shows its own consent box (US
393
+ * stores with checkout consent on), so the page shows none. `'onsite'`:
394
+ * BuyButton / CartCheckoutButton render an unticked "email me" box and send
395
+ * `marketing_opt_in: true` when it is ticked. Absent (marketing email not
396
+ * enabled for the site, or an older API): no box at all.
397
+ */
398
+ checkout_consent?: 'stripe' | 'onsite';
281
399
  /**
282
400
  * Option axes for a multi-variant product (empty for single-variant). Feed
283
401
  * these plus `variants` to `<VariantPicker>` to resolve a variant id.
@@ -498,6 +616,12 @@ interface StartCheckoutOptions {
498
616
  cancelUrl?: string;
499
617
  /** Prefills the email field on the Stripe Checkout page. */
500
618
  customerEmail?: string;
619
+ /**
620
+ * The buyer ticked the on-site "email me" box (see
621
+ * `PublicProduct.checkout_consent`). Sends `marketing_opt_in: true` only
622
+ * when true; anything else sends nothing.
623
+ */
624
+ marketingOptIn?: boolean;
501
625
  /**
502
626
  * Subscription selling plan to buy (subscriptions Unit 8). Present =
503
627
  * subscription-mode checkout: quantity is locked at 1 (any `quantity`
@@ -731,6 +855,13 @@ interface UseCartItemsResult {
731
855
  * nothing in both cases, and NEVER read null as "ships nowhere".
732
856
  */
733
857
  shippingCountries: string[] | null;
858
+ /**
859
+ * ORDER-LEVEL checkout consent mode — the first non-null
860
+ * `checkout_consent` from any resolved line's product (a site-level fact).
861
+ * `'onsite'` = render an unticked "email me" box and pass its state as
862
+ * `marketingOptIn`; `'stripe'` or null = render no box.
863
+ */
864
+ checkoutConsent: 'stripe' | 'onsite' | null;
734
865
  /** True while a resolution pass is running. */
735
866
  loading: boolean;
736
867
  /** Set when some product reads failed transiently (lines marked `error`). */
@@ -896,6 +1027,12 @@ interface StartCartCheckoutOptions {
896
1027
  cancelUrl?: string;
897
1028
  /** Prefills the email field on the Stripe Checkout page. */
898
1029
  customerEmail?: string;
1030
+ /**
1031
+ * The buyer ticked the on-site "email me" box (see
1032
+ * `UseCartItemsResult.checkoutConsent`). Sends `marketing_opt_in: true`
1033
+ * only when true.
1034
+ */
1035
+ marketingOptIn?: boolean;
899
1036
  /** Opaque passthrough stored on the order (string values only). */
900
1037
  metadata?: Record<string, string>;
901
1038
  /**
@@ -2794,4 +2931,4 @@ declare namespace AccountReviews {
2794
2931
  var neverConsentGate: string;
2795
2932
  }
2796
2933
 
2797
- export { AccountLogin, type AccountLoginFormContext, type AccountLoginProps, type AccountLoginSentContext, type AccountMePayload, type AccountOrder, AccountOrders, type AccountOrdersProps, AccountPage, type AccountPagePmBannerContext, type AccountPageProps, AccountReviews, type AccountReviewsProps, type AccountShippingAddressInput, type AccountSubscription, type AddCartLineInput, AddToCartButton, type AddToCartButtonProps, type AddToCartResult, AifeaturesCaptcha, type AifeaturesCaptchaProps, AifeaturesProvider, type AifeaturesProviderProps, BuyButton, type BuyButtonProps, CartCheckoutButton, type CartCheckoutButtonProps, type CartCheckoutLine, type CartConflictItem, type CartItemLine, type CartLine, type CartLineDisplay, type CartLineStatus, CartPage, type CartPagePart, type CartPageProps, type CartSummary, type CartSummaryShipping, type CartSummaryShippingOption, ConsentBanner, type ConsentBannerDisclosureProps, type ConsentBannerProps, type ConsentCategory, type ConsentDisclosureStrings, type ConsentGrants, type ConsentIntegration, type ConsentLocale, type ConsentManifest, ConsentPolicyDetails, type ConsentPolicyDetailsProps, ConsentProvider, type ConsentProviderProps, type ConsentThemeTokens, CookieSettingsLink, type CookieSettingsLinkProps, GatedContent, type GatedContentProps, type GatedContentStrings, GatedScript, type GatedScriptProps, type LoginResult, MARKET_COUNTRIES, MAX_CART_LINES, type MarketCountry, OrderConfirmation, type OrderConfirmationProps, type OrderFulfillment, type OrderSession, type OrderSessionLineItem, type OrderSessionSubscription, type OrderStatus, type OwnProductReview, PlanPicker, type PlanPickerOptionContext, type PlanPickerProps, PreferencesPanel, type PreferencesPanelProps, type PreferencesStrings, ProductPrice, type ProductPriceProps, ProductRating, type ProductRatingProps, type ProductReview, ProductReviewForm, type ProductReviewFormProps, ProductReviews, type ProductReviewsProps, type PublicOption, type PublicOptionValue, type PublicProduct, type PublicProductSubscription, type PublicSubscriptionPlan, type PublicVariant, type PublicVariantOptionValue, type ReviewAvailability, type ReviewSummary, type SessionCustomer, type SessionReason, type SessionStatus, type ShippingOptionConflict, type StartCartCheckoutOptions, type StartCheckoutOptions, SubscriptionList, type SubscriptionListAuth, type SubscriptionListProps, type SubscriptionMutationState, type SubscriptionRowContext, type UseCartCheckoutOptions, type UseCartCheckoutResult, type UseCartItemsOptions, type UseCartItemsResult, type UseCartResult, type UseCartSummaryOptions, type UseCartSummaryResult, type UseCheckoutOptions, type UseCheckoutResult, type UseConsentResult, type UseMarketOptions, type UseMarketResult, type UseProductOptions, type UseProductResult, type UseProductReviewsOptions, type UseProductReviewsResult, type UseSessionOptions, type UseSessionResult, VariantPicker, type VariantPickerProps, type VariantSelection, type VerifyResult, ZERO_DECIMAL_CURRENCIES, applySelectionToUrl, consentLocales, formatPrice, getOptions, getVariants, isMultiVariant, isValueAvailable, isValueInCatalog, planRecurringAmount, reanchorSelection, resolveVariant, searchFromSelection, selectedImages, selectedValues, selectionFromSearch, useAifeaturesApiUrl, useCart, useCartCheckout, useCartItems, useCartSummary, useCheckout, useConsent, useMarket, useProduct, useProductReviews, useSession, valueSlug, variantPriceRange };
2934
+ export { AccountLogin, type AccountLoginFormContext, type AccountLoginProps, type AccountLoginSentContext, type AccountMePayload, type AccountOrder, AccountOrders, type AccountOrdersProps, AccountPage, type AccountPagePmBannerContext, type AccountPageProps, AccountReviews, type AccountReviewsProps, type AccountShippingAddressInput, type AccountSubscription, type AddCartLineInput, AddToCartButton, type AddToCartButtonProps, type AddToCartResult, AifeaturesCaptcha, type AifeaturesCaptchaProps, AifeaturesProvider, type AifeaturesProviderProps, BuyButton, type BuyButtonProps, CartCheckoutButton, type CartCheckoutButtonProps, type CartCheckoutLine, type CartConflictItem, type CartItemLine, type CartLine, type CartLineDisplay, type CartLineStatus, CartPage, type CartPagePart, type CartPageProps, type CartSummary, type CartSummaryShipping, type CartSummaryShippingOption, ConsentBanner, type ConsentBannerDisclosureProps, type ConsentBannerProps, type ConsentCategory, type ConsentDisclosureStrings, type ConsentGrants, type ConsentIntegration, type ConsentLocale, type ConsentManifest, ConsentPolicyDetails, type ConsentPolicyDetailsProps, ConsentProvider, type ConsentProviderProps, type ConsentThemeTokens, CookieSettingsLink, type CookieSettingsLinkProps, type FormSubmitMarketing, GatedContent, type GatedContentProps, type GatedContentStrings, GatedScript, type GatedScriptProps, type LoginResult, MARKETING_OPT_IN_BOX_FIELD, MARKETING_OPT_IN_FIELD, MARKET_COUNTRIES, MAX_CART_LINES, type MarketCountry, MarketingOptIn, type MarketingOptInProps, NewsletterSignup, type NewsletterSignupProps, OrderConfirmation, type OrderConfirmationProps, type OrderFulfillment, type OrderSession, type OrderSessionLineItem, type OrderSessionSubscription, type OrderStatus, type OwnProductReview, PlanPicker, type PlanPickerOptionContext, type PlanPickerProps, PreferencesPanel, type PreferencesPanelProps, type PreferencesStrings, ProductPrice, type ProductPriceProps, ProductRating, type ProductRatingProps, type ProductReview, ProductReviewForm, type ProductReviewFormProps, ProductReviews, type ProductReviewsProps, type PublicOption, type PublicOptionValue, type PublicProduct, type PublicProductSubscription, type PublicSubscriptionPlan, type PublicVariant, type PublicVariantOptionValue, type ReviewAvailability, type ReviewSummary, type SessionCustomer, type SessionReason, type SessionStatus, type ShippingOptionConflict, type StartCartCheckoutOptions, type StartCheckoutOptions, SubscriptionList, type SubscriptionListAuth, type SubscriptionListProps, type SubscriptionMutationState, type SubscriptionRowContext, type UseCartCheckoutOptions, type UseCartCheckoutResult, type UseCartItemsOptions, type UseCartItemsResult, type UseCartResult, type UseCartSummaryOptions, type UseCartSummaryResult, type UseCheckoutOptions, type UseCheckoutResult, type UseConsentResult, type UseMarketOptions, type UseMarketResult, type UseProductOptions, type UseProductResult, type UseProductReviewsOptions, type UseProductReviewsResult, type UseSessionOptions, type UseSessionResult, VariantPicker, type VariantPickerProps, type VariantSelection, type VerifyResult, ZERO_DECIMAL_CURRENCIES, applySelectionToUrl, consentLocales, formatPrice, getOptions, getVariants, isMultiVariant, isValueAvailable, isValueInCatalog, planRecurringAmount, reanchorSelection, resolveVariant, searchFromSelection, selectedImages, selectedValues, selectionFromSearch, useAifeaturesApiUrl, useCart, useCartCheckout, useCartItems, useCartSummary, useCheckout, useConsent, useMarket, useProduct, useProductReviews, useSession, valueSlug, variantPriceRange };