@aifeatures/backend 0.3.1 → 0.5.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
@@ -316,11 +316,19 @@ type SitePayments = {
316
316
  stripe_account_id: string | null;
317
317
  payments_status: "none" | "pending" | "active" | "disabled";
318
318
  currency: string;
319
+ /**
320
+ * The merchant explicitly chose this currency (via the agent). While true, currency values pushed on this route are skipped (reason 'merchant_set'). Cleared only by an explicit currency_pinned: false on this route.
321
+ */
322
+ currency_pinned: boolean;
319
323
  platform_fee_bps: number | null;
320
324
  owner_email: string | null;
321
325
  };
322
326
  type Error = {
323
327
  error: string;
328
+ /**
329
+ * Machine-readable error token, present on errors clients are expected to branch on. Match on this, never on the `error` text.
330
+ */
331
+ code?: string;
324
332
  };
325
333
  type UpdateSitePayments = {
326
334
  /**
@@ -339,11 +347,28 @@ type UpdateSitePayments = {
339
347
  * Per-site platform fee override in basis points. Null falls back to the org default.
340
348
  */
341
349
  platform_fee_bps?: number | null;
350
+ /**
351
+ * Set or clear the merchant currency pin. false (the unpin) re-enables platform-derived currency pushes for this site; combined with `currency` in one request, the unpin applies first, so the pushed currency lands. Omit to leave the pin alone.
352
+ */
353
+ currency_pinned?: boolean;
342
354
  /**
343
355
  * Account owner's email — fallback notification recipient when the site has no default email recipients. Values that are not plausible emails are stored as null rather than rejected: this request must never fail over a notification fallback.
344
356
  */
345
357
  owner_email?: string | null;
346
358
  };
359
+ type SiteAccountRoute = {
360
+ site_id: string;
361
+ /**
362
+ * When the /account route was last verified present on the published site. Null = not ready; subscription checkout refuses.
363
+ */
364
+ account_route_ready_at: string | null;
365
+ };
366
+ type UpdateSiteAccountRoute = {
367
+ /**
368
+ * true: the published site structurally serves /account (stamps account_route_ready_at). false: it does not (clears the stamp — subscription checkout refuses and the public payload flags ready:false).
369
+ */
370
+ ready: boolean;
371
+ };
347
372
  type PaymentsStatus = {
348
373
  /**
349
374
  * The site's payment readiness.
@@ -355,6 +380,10 @@ type PaymentsStatus = {
355
380
  reason: "needs_stripe" | "needs_paid_plan" | "account_disabled";
356
381
  stripe_account_connected: boolean;
357
382
  currency: string;
383
+ /**
384
+ * The merchant explicitly set the currency (it is merchant-set and does NOT follow the Stripe account). Connecting or changing a Stripe account will not change a pinned currency.
385
+ */
386
+ currency_pinned: boolean;
358
387
  /**
359
388
  * Stripe Tax (automatic tax) is on for this store's checkout: Stripe calculates and collects real jurisdiction-based tax on the merchant's connected account. Turns on automatically when the merchant finishes tax setup in their own Stripe Dashboard (business address + product category, plus registrations under Tax → Locations).
360
389
  */
@@ -598,7 +627,7 @@ type CreateProduct = {
598
627
  */
599
628
  options?: Array<NestedOptionInput>;
600
629
  /**
601
- * Variants over the options. Each must cover exactly the product options and be uniquely coordinated. At most 100.
630
+ * Variants over the options. Each must cover exactly the product options and be uniquely coordinated. At most 300.
602
631
  */
603
632
  variants?: Array<NestedVariantInput>;
604
633
  };
@@ -639,6 +668,57 @@ type AttachProductFileMultipart = {
639
668
  */
640
669
  file?: Blob | File;
641
670
  };
671
+ type SubscriptionPlan = {
672
+ id: string;
673
+ interval: "week" | "month" | "year";
674
+ interval_count: number;
675
+ percent_off_bps: number | null;
676
+ unit_amount: number | null;
677
+ title: string | null;
678
+ position: number;
679
+ active: boolean;
680
+ };
681
+ type ProductSubscriptionConfig = {
682
+ product_id: string;
683
+ subscription_required: boolean;
684
+ plans: Array<SubscriptionPlan>;
685
+ };
686
+ type SubscriptionPlanInput = {
687
+ /**
688
+ * Billing interval unit.
689
+ */
690
+ interval: "week" | "month" | "year";
691
+ /**
692
+ * Number of intervals between charges (default 1). interval x interval_count must be 12 months or shorter: week 1-52, month 1-12, year exactly 1.
693
+ */
694
+ interval_count?: number;
695
+ /**
696
+ * Subscribe-and-save discount off the variant's one-time price, in basis points (1000 = 10% off; 0-8000). Exactly one of percent_off_bps / unit_amount per plan.
697
+ */
698
+ percent_off_bps?: number;
699
+ /**
700
+ * Absolute recurring price in minor units of the store's base currency (may exceed the one-time price, e.g. shipping-inclusive plans). Exactly one of percent_off_bps / unit_amount per plan.
701
+ */
702
+ unit_amount?: number;
703
+ /**
704
+ * Display name; snapshotted onto subscriptions at signup. Optional — the buy box derives a label from the interval when absent.
705
+ */
706
+ title?: string | null;
707
+ /**
708
+ * Display order (defaults to array order).
709
+ */
710
+ position?: number;
711
+ };
712
+ type SetProductSubscription = {
713
+ /**
714
+ * true: the product is purchasable ONLY through a subscription plan (no one-time buy). Requires at least one plan.
715
+ */
716
+ required: boolean;
717
+ /**
718
+ * The FULL desired plan set — this endpoint replaces the product's plans transactionally. Empty array with required:false clears subscription config.
719
+ */
720
+ plans: Array<SubscriptionPlanInput>;
721
+ };
642
722
  type TestOrderResult = {
643
723
  order_id: string;
644
724
  /**
@@ -646,6 +726,29 @@ type TestOrderResult = {
646
726
  */
647
727
  session_id: string;
648
728
  };
729
+ /**
730
+ * Delivery address, when the order has a line that collects one. Stored on the order exactly as a real Checkout Session's shipping_details would be, so the merchant email renders its Shipping address block.
731
+ */
732
+ type TestShippingAddress = {
733
+ /**
734
+ * Recipient name. Also recorded as the order's customer_name.
735
+ */
736
+ name?: string;
737
+ address: {
738
+ line1: string;
739
+ line2?: string;
740
+ city?: string;
741
+ /**
742
+ * State / province / county. Absent where the country has none.
743
+ */
744
+ state?: string;
745
+ postal_code?: string;
746
+ /**
747
+ * ISO 3166-1 alpha-2.
748
+ */
749
+ country: string;
750
+ };
751
+ };
649
752
  type CreateTestOrder = {
650
753
  /**
651
754
  * The variant to buy. Required for multi-variant products; omit for single-variant products.
@@ -663,6 +766,38 @@ type CreateTestOrder = {
663
766
  * Recorded as the buyer and receives the [TEST]-labeled receipt. Defaults to the site owner's email.
664
767
  */
665
768
  customer_email?: string;
769
+ /**
770
+ * Opaque passthrough stored on the order, exactly as the real checkout stores it — this is what the merchant sale email's details block renders. Same caps: max 20 keys, 40-char keys, 400-char string values, 4 KB serialized.
771
+ */
772
+ metadata?: {
773
+ [key: string]: string;
774
+ };
775
+ shipping_address?: TestShippingAddress;
776
+ };
777
+ type TestSubscriptionResult = {
778
+ order_id: string;
779
+ /**
780
+ * Synthetic checkout-session id. Open /order/confirmation?session_id={session_id} on the site to walk the subscriber's post-signup flow — the payload carries the subscription's renewal terms.
781
+ */
782
+ session_id: string;
783
+ /**
784
+ * The is_test subscriptions row minted for this signup (badged in the merchant Subscriptions view; served to preview account sessions).
785
+ */
786
+ subscription_id: string;
787
+ };
788
+ type CreateTestSubscription = {
789
+ /**
790
+ * The selling plan to subscribe to. Defaults to the product's first active plan; 404s when the id doesn't belong to this product.
791
+ */
792
+ plan_id?: string;
793
+ /**
794
+ * The variant to subscribe to. Required for multi-variant products; omit for single-variant products.
795
+ */
796
+ variant_id?: string;
797
+ /**
798
+ * Recorded as the subscriber (a test customer record is created/reused for it) and receives the [TEST]-labeled receipt. Defaults to the site owner's email.
799
+ */
800
+ customer_email?: string;
666
801
  };
667
802
  type CreateMultiItemTestOrder = {
668
803
  /**
@@ -683,6 +818,13 @@ type CreateMultiItemTestOrder = {
683
818
  */
684
819
  quantity?: number;
685
820
  }>;
821
+ /**
822
+ * Opaque passthrough stored on the order, exactly as the real checkout stores it — this is what the merchant sale email's details block renders. Same caps: max 20 keys, 40-char keys, 400-char string values, 4 KB serialized.
823
+ */
824
+ metadata?: {
825
+ [key: string]: string;
826
+ };
827
+ shipping_address?: TestShippingAddress;
686
828
  };
687
829
  type CreateVariant = {
688
830
  title?: string | null;
@@ -783,6 +925,54 @@ type SetProductVariants = {
783
925
  options: Array<ReconcileOptionInput>;
784
926
  variants: Array<ReconcileVariantInput>;
785
927
  };
928
+ type GenerateVariantsResult = ProductDetail & {
929
+ created: number;
930
+ /**
931
+ * Cells whose coordinate already had a variant (active or inactive) — left byte-identical, never adopted or re-priced.
932
+ */
933
+ skipped_existing: number;
934
+ excluded_by_rule: number;
935
+ };
936
+ type GenerateVariants = {
937
+ /**
938
+ * The matrix_version from the product detail. Required — it proves the axes were composed against the current matrix, so a value renamed concurrently cannot be silently re-created as a near-duplicate.
939
+ */
940
+ matrix_version: string;
941
+ /**
942
+ * The full axis set — every existing option, each with the values to generate cells for (existing values matched case-insensitively; new values are created). A NEW axis on a product with variants is refused: that stays on setProductVariants.
943
+ */
944
+ axes: Array<{
945
+ title: string;
946
+ values: Array<string>;
947
+ }>;
948
+ /**
949
+ * How generated cells are priced.
950
+ */
951
+ rule: {
952
+ /**
953
+ * Uniform base price in minor units for every generated cell.
954
+ */
955
+ unit_amount: number;
956
+ /**
957
+ * Price overrides, applied in order — a later matching clause wins.
958
+ */
959
+ except?: Array<{
960
+ /**
961
+ * Partial coordinates by axis title. Axes not named are wildcards — the clause matches every cell that agrees on the named axes.
962
+ */
963
+ match: {
964
+ [key: string]: string;
965
+ };
966
+ unit_amount: number;
967
+ }>;
968
+ /**
969
+ * Cells never created. Exclusion beats every except clause.
970
+ */
971
+ exclude?: Array<{
972
+ [key: string]: string;
973
+ }>;
974
+ };
975
+ };
786
976
  type UpdateVariant = {
787
977
  title?: string | null;
788
978
  /**
@@ -1045,6 +1235,23 @@ type CustomerDetail = Customer & {
1045
1235
  addresses: Array<CustomerAddress>;
1046
1236
  order_count: number;
1047
1237
  };
1238
+ type RevokeCustomerAccessResult = {
1239
+ customer_id: string;
1240
+ revoked: {
1241
+ /**
1242
+ * customer_sessions rows stamped by THIS call
1243
+ */
1244
+ sessions: number;
1245
+ /**
1246
+ * auth_tokens rows of kind manage/manage_code stamped by THIS call
1247
+ */
1248
+ manage_tokens: number;
1249
+ /**
1250
+ * un-consumed magic-link codes for this address stamped by THIS call
1251
+ */
1252
+ login_codes: number;
1253
+ };
1254
+ };
1048
1255
  type CreateCustomer = {
1049
1256
  email: string;
1050
1257
  name?: string | null;
@@ -1287,13 +1494,115 @@ type OrderFulfillmentRequest = {
1287
1494
  */
1288
1495
  tracking_number?: string;
1289
1496
  };
1497
+ type SubscriptionSummary = {
1498
+ id: string;
1499
+ /**
1500
+ * Mirrored Stripe status, stored verbatim — full-Dashboard merchants can produce states beyond the modeled set; render unknown values generically ('managed in Stripe').
1501
+ */
1502
+ status: string;
1503
+ /**
1504
+ * The subscriber (from the durable customer record).
1505
+ */
1506
+ customer_email: string | null;
1507
+ product_id: string;
1508
+ plan_title: string | null;
1509
+ plan_interval: string;
1510
+ plan_interval_count: number;
1511
+ /**
1512
+ * The LOCKED signup recurring amount (minor units) — the grandfathering record; never changes.
1513
+ */
1514
+ plan_amount: number;
1515
+ /**
1516
+ * The current recurring amount mirrored from Stripe (Dashboard repricing shows up here). Falls back to plan_amount until a mirror write lands.
1517
+ */
1518
+ current_amount: number;
1519
+ currency: string;
1520
+ /**
1521
+ * Next renewal (mirrored).
1522
+ */
1523
+ current_period_end: string | null;
1524
+ cancel_at_period_end: boolean;
1525
+ canceled_at: string | null;
1526
+ /**
1527
+ * Synchronous cancel provenance ('subscriber' | 'merchant'), when known.
1528
+ */
1529
+ canceled_by: string | null;
1530
+ /**
1531
+ * Set only by the teardown endpoint on rows it flipped — the provenance that makes bulk reactivation money-safe.
1532
+ */
1533
+ teardown_at: string | null;
1534
+ is_test: boolean;
1535
+ created_at: string;
1536
+ };
1537
+ type SubscriptionsList = {
1538
+ subscriptions: Array<SubscriptionSummary>;
1539
+ total: number;
1540
+ limit: number;
1541
+ offset: number;
1542
+ };
1543
+ type SubscriptionsTeardownResult = {
1544
+ /**
1545
+ * Live (active/past_due) rows considered.
1546
+ */
1547
+ total: number;
1548
+ /**
1549
+ * Rows this call flipped to cancel_at_period_end at Stripe AND stamped teardown_at on.
1550
+ */
1551
+ torn_down: number;
1552
+ /**
1553
+ * Rows already scheduled to cancel (subscriber/merchant/live-verified) or already stamped — never re-stamped.
1554
+ */
1555
+ skipped: number;
1556
+ /**
1557
+ * Rows whose Stripe call failed — re-run to converge (idempotent).
1558
+ */
1559
+ failed: number;
1560
+ };
1561
+ /**
1562
+ * Recorded on every row this call flips, as teardown_reason. Defaults to 'plan_lapse' when omitted, so callers predating this field keep working. Rows already stamped are never re-stamped.
1563
+ */
1564
+ type TeardownReason = "ban" | "plan_lapse" | "merchant_exit";
1565
+ type SubscriptionsTeardownBody = {
1566
+ reason?: TeardownReason;
1567
+ };
1568
+ type SubscriptionsReactivateResult = {
1569
+ reason: TeardownReason & (string | null);
1570
+ /**
1571
+ * teardown_at-stamped rows considered.
1572
+ */
1573
+ total: number;
1574
+ reactivated: number;
1575
+ /**
1576
+ * Rows with subscriber/merchant cancel provenance, already lapsed at Stripe, or already un-scheduled — never touched.
1577
+ */
1578
+ skipped: number;
1579
+ failed: number;
1580
+ };
1581
+ type SubscriptionsReactivateBody = {
1582
+ reason?: TeardownReason & unknown;
1583
+ };
1584
+ type PreviewSessionResult = {
1585
+ /**
1586
+ * Opaque bearer for the editor preview's account components (Authorization: Bearer). is_preview: served only is_test data, refused by every checkout-creating path, accepted only from the site's own preview host or an editor origin.
1587
+ */
1588
+ token: string;
1589
+ /**
1590
+ * Fixed 12-hour expiry (UTC) — preview sessions never slide.
1591
+ */
1592
+ expires_at: string;
1593
+ };
1594
+ type CreatePreviewSession = {
1595
+ /**
1596
+ * The identity the preview session acts as — a customers row is created/reused for (site, email). Typically the site owner's email so the preview account page shows their own simulated test data.
1597
+ */
1598
+ email: string;
1599
+ };
1290
1600
  type Form = {
1291
1601
  id: string;
1292
1602
  name: string;
1293
1603
  endpoint_url: string;
1294
1604
  email_recipients: Array<string>;
1295
1605
  redirect_url: string | null;
1296
- webhook_url: string | null;
1297
1606
  /**
1298
1607
  * Turnstile site key for CAPTCHA. Null if not configured for the org.
1299
1608
  */
@@ -1311,7 +1620,6 @@ type CreateForm = {
1311
1620
  */
1312
1621
  email_recipients?: Array<string>;
1313
1622
  redirect_url?: string;
1314
- webhook_url?: string;
1315
1623
  };
1316
1624
  type Site = {
1317
1625
  id: string;
@@ -1362,6 +1670,10 @@ type Site = {
1362
1670
  * Stripe Tax (automatic tax) is on for this store's checkout: Stripe calculates and collects real jurisdiction-based tax on the merchant's connected account, using the registrations and settings the merchant manages in their own Stripe Dashboard. tax_behavior decides whether tax is itemized out of the stored prices ('inclusive') or added at checkout ('exclusive').
1363
1671
  */
1364
1672
  stripe_tax_enabled: boolean;
1673
+ /**
1674
+ * The store's selling currency (lowercase ISO 4217). Every stored amount — prices, shipping rates, thresholds — is in MINOR units of this currency.
1675
+ */
1676
+ currency: string;
1365
1677
  created_at: string;
1366
1678
  updated_at: string;
1367
1679
  };
@@ -1395,6 +1707,37 @@ type CreateSite = {
1395
1707
  */
1396
1708
  domains?: Array<string>;
1397
1709
  };
1710
+ type CurrencyRestatement = {
1711
+ applied: boolean;
1712
+ from: string;
1713
+ to: string;
1714
+ /**
1715
+ * Why the change did not apply (first reason when several rows block).
1716
+ */
1717
+ reason?: string;
1718
+ /**
1719
+ * ALL offending rows for an amounts block (capped), so every price can be fixed in one pass instead of one blocked attempt at a time.
1720
+ */
1721
+ reasons?: Array<string>;
1722
+ /**
1723
+ * orders — money-relevant orders exist; amounts — a stored amount (price, variant, shipping rate, threshold) is invalid in the destination currency; concurrent — another writer changed the currency mid-flight.
1724
+ */
1725
+ blockedBy?: "orders" | "amounts" | "concurrent";
1726
+ skipped?: "unsupported" | "merchant_set";
1727
+ /**
1728
+ * Orders blocks only: true when only pending checkout sessions block (Stripe sessions live 60 minutes and are swept every 30 — retry within about an hour); false once any paid order exists (locked permanently).
1729
+ */
1730
+ retryable?: boolean;
1731
+ products?: number;
1732
+ variants?: number;
1733
+ /**
1734
+ * The change also pinned the currency as merchant-chosen.
1735
+ */
1736
+ pinned?: boolean;
1737
+ };
1738
+ type SiteWithRestatement = Site & {
1739
+ currency_restatement?: CurrencyRestatement;
1740
+ };
1398
1741
  type ShippingRateInput = {
1399
1742
  /**
1400
1743
  * The option name the buyer sees on Stripe's checkout page. Plain text only: Latin letters, digits, spaces, and basic punctuation, up to 40 characters.
@@ -1407,6 +1750,10 @@ type ShippingRateInput = {
1407
1750
  };
1408
1751
  type UpdateSite = {
1409
1752
  name?: string;
1753
+ /**
1754
+ * Change the store's SELLING currency (ISO 4217, validated against Stripe's presentment allowlist — not merely 'not three-decimal'). This RESTATES the whole catalogue in one transaction: every stored amount keeps its NUMBER and changes meaning ($20.00 becomes EGP 20.00 — face values are reinterpreted, never FX-converted; cross-decimal-class moves like usd→jpy shift real value ~100x). Setting it here PINS the currency as merchant-chosen: platform pushes derived from the Stripe account will no longer change it — send the SAME value as the current currency to pin without restating. Blocked once the site has money-relevant orders (pending checkout sessions count until they expire; any paid order locks it permanently) — reported in the response's currency_restatement block, while other fields in the request still apply. Cannot be combined with shipping_rates or free_shipping_over in one request (those amounts would validate against the wrong currency — change currency first, then set rates). Never null: currency is changed, not cleared. This route fails loud (400/403/429) on bad input, unlike the org-key payments route, whose currency handling is deliberately never-fail (it carries the suspend kill-switch). SITE TOKEN ONLY for this field: an org API key sending currency gets a 403 — merchant-explicit writes come from the site's own token; platform/operator changes use the payments route.
1755
+ */
1756
+ currency?: string;
1410
1757
  default_email_recipients?: Array<string>;
1411
1758
  /**
1412
1759
  * Where this store ships, as ISO 3166-1 alpha-2 codes — stored uppercased and deduped. Set it ONLY when the merchant states a limitation; the default (null) ships anywhere Stripe serves, and the list only ever narrows: buyers outside it cannot check out at all on anything that collects a shipping address. Omit to leave the current value alone; send null to clear the restriction. An empty array is REJECTED — unlike `images`, where [] empties the gallery, [] here would mean "ships nowhere". Applies to every product on the site, including ones created later.
@@ -1479,7 +1826,6 @@ type UpdateForm = {
1479
1826
  name?: string;
1480
1827
  email_recipients?: Array<string>;
1481
1828
  redirect_url?: string | null;
1482
- webhook_url?: string | null;
1483
1829
  };
1484
1830
  type Attachment = {
1485
1831
  /**
@@ -1519,6 +1865,93 @@ type SubmissionsList = {
1519
1865
  limit: number;
1520
1866
  offset: number;
1521
1867
  };
1868
+ type EventDestination = {
1869
+ id: string;
1870
+ site_id: string;
1871
+ /**
1872
+ * The form whose submissions this destination receives. Every destination created through the API is form-scoped.
1873
+ */
1874
+ form_id: string | null;
1875
+ url: string;
1876
+ /**
1877
+ * Subscribed topics. ["*"] receives every topic.
1878
+ */
1879
+ topics: Array<string>;
1880
+ /**
1881
+ * Payload version, pinned when the destination was created and never rewritten. A future payload shape ships as a new version; this destination keeps receiving the one it was created with.
1882
+ */
1883
+ api_version: string;
1884
+ status: "active" | "disabled";
1885
+ /**
1886
+ * Why the destination was auto-disabled after repeated delivery failures. Null while active.
1887
+ */
1888
+ disabled_reason: string | null;
1889
+ consecutive_failures: number;
1890
+ created_at: string;
1891
+ updated_at: string;
1892
+ };
1893
+ type EventDestinationsList = {
1894
+ destinations: Array<EventDestination>;
1895
+ };
1896
+ type CreateEventDestination = {
1897
+ /**
1898
+ * HTTPS endpoint that will receive POSTed events.
1899
+ */
1900
+ url: string;
1901
+ /**
1902
+ * Topics to subscribe to. Defaults to ["*"] (every topic, including ones added later).
1903
+ */
1904
+ topics?: Array<string>;
1905
+ /**
1906
+ * The form whose submissions this destination receives. REQUIRED: every destination belongs to exactly one form. A destination with no form would deliver correctly but be invisible in the merchant dashboard, which only ever shows a form's own webhooks.
1907
+ */
1908
+ form_id: string;
1909
+ };
1910
+ type UpdateEventDestination = {
1911
+ url?: string;
1912
+ topics?: Array<string>;
1913
+ /**
1914
+ * Set to 'active' to re-enable a destination that was auto-disabled after repeated failures; this also clears the failure counter.
1915
+ */
1916
+ status?: "active" | "disabled";
1917
+ };
1918
+ type EventDestinationSecret = {
1919
+ /**
1920
+ * The destination's signing secret. Optional to use — it lets your endpoint verify a delivery really came from us. Readable whenever you need it; rotating replaces it.
1921
+ */
1922
+ secret: string;
1923
+ };
1924
+ type EventDelivery = {
1925
+ id: string;
1926
+ destination_id: string;
1927
+ /**
1928
+ * Sent as the webhook-id header. Stable across retries and shared by every destination that received this occurrence — use it to deduplicate.
1929
+ */
1930
+ event_id: string;
1931
+ /**
1932
+ * The CloudEvents type that was delivered.
1933
+ */
1934
+ type: string;
1935
+ /**
1936
+ * The exact JSON body that was (or will be) POSTed.
1937
+ */
1938
+ payload: string;
1939
+ attempts: number;
1940
+ next_attempt_at: string;
1941
+ /**
1942
+ * Null while undelivered.
1943
+ */
1944
+ delivered_at: string | null;
1945
+ last_error: string | null;
1946
+ /**
1947
+ * HTTP status of the last attempt; null on transport failure.
1948
+ */
1949
+ last_status: number | null;
1950
+ created_at: string;
1951
+ };
1952
+ type EventDeliveriesList = {
1953
+ deliveries: Array<EventDelivery>;
1954
+ };
1522
1955
  type PublicOption = {
1523
1956
  id: string;
1524
1957
  title: string;
@@ -1572,6 +2005,38 @@ type PublicVariant = {
1572
2005
  */
1573
2006
  available: number | null;
1574
2007
  };
2008
+ type PublicSubscriptionPlan = {
2009
+ id: string;
2010
+ interval: "week" | "month" | "year";
2011
+ interval_count: number;
2012
+ title: string | null;
2013
+ position: number;
2014
+ /**
2015
+ * Subscribe-and-save discount off the variant's BASE-currency one-time price, basis points. Exactly one of percent_off_bps / unit_amount is non-null.
2016
+ */
2017
+ percent_off_bps: number | null;
2018
+ /**
2019
+ * Absolute recurring price in minor units of the store's BASE currency (never localized).
2020
+ */
2021
+ unit_amount: number | null;
2022
+ };
2023
+ /**
2024
+ * Subscription selling plans, or null when the product has no active plans and is not subscription-only (also null for inactive/archived products). Plan amounts are BASE-currency minor units, never localized.
2025
+ */
2026
+ type PublicSubscription = {
2027
+ /**
2028
+ * true: the product can ONLY be bought through a plan — hide the one-time buy path.
2029
+ */
2030
+ required: boolean;
2031
+ /**
2032
+ * Whether subscription checkout would be accepted right now (payments active AND the published site serves /account). false: render plans but degrade the subscribe CTA.
2033
+ */
2034
+ ready: boolean;
2035
+ /**
2036
+ * Active selling plans in display order.
2037
+ */
2038
+ plans: Array<PublicSubscriptionPlan>;
2039
+ } | null;
1575
2040
  type PublicProduct = {
1576
2041
  id: string;
1577
2042
  name: string;
@@ -1635,6 +2100,7 @@ type PublicProduct = {
1635
2100
  * Active purchasable variants with price + availability. One entry for single-variant products.
1636
2101
  */
1637
2102
  variants: Array<PublicVariant>;
2103
+ subscription: PublicSubscription;
1638
2104
  };
1639
2105
  type CheckoutResult = {
1640
2106
  /**
@@ -1655,6 +2121,10 @@ type CheckoutRequest = {
1655
2121
  * Defaults to 1. Must be within [1, max_quantity]. Custom-amount products are always quantity 1.
1656
2122
  */
1657
2123
  quantity?: number;
2124
+ /**
2125
+ * Subscription selling plan (one of the product's subscription.plans ids). Present: the checkout is SUBSCRIPTION mode — quantity is forced to 1, the charge is the plan-derived recurring amount in the store's base currency (never localized; `country` is ignored), and the session recurs on the plan's interval. Refused (409 with a machine `code`) when the plan is unknown/archived (plan_not_available), the store isn't subscription-ready (subscription_not_ready), or the price currency doesn't match the store's base currency (plan_currency_mismatch). expected_unit_amount/expected_currency are rejected alongside it.
2126
+ */
2127
+ plan_id?: string;
1658
2128
  /**
1659
2129
  * Total amount in minor units. Only accepted (and required) for allow_custom_amount products; must be within [min_amount, max_amount]. Rejected for fixed-price products.
1660
2130
  */
@@ -1689,9 +2159,9 @@ type CheckoutRequest = {
1689
2159
  type CartConflictItem = {
1690
2160
  variant_id: string;
1691
2161
  /**
1692
- * Exactly one code per conflicted line, most-actionable-wins: unavailable > insufficient_stock > quantity_exceeds_max > price_changed.
2162
+ * Exactly one code per conflicted line, most-actionable-wins: unavailable > subscription_only > insufficient_stock > quantity_exceeds_max > price_changed. `subscription_only` means the merchant sells that product on a plan only — the cart has no plan support, so the line must be removed and bought through the product's own buy box.
1693
2163
  */
1694
- code: "unavailable" | "insufficient_stock" | "price_changed" | "quantity_exceeds_max";
2164
+ code: "unavailable" | "subscription_only" | "insufficient_stock" | "price_changed" | "quantity_exceeds_max";
1695
2165
  /**
1696
2166
  * insufficient_stock only: units currently available (never negative).
1697
2167
  */
@@ -1836,7 +2306,7 @@ type CartSummaryResult = {
1836
2306
  */
1837
2307
  total_is_final: boolean;
1838
2308
  /**
1839
- * Lines that no longer resolve (deleted, deactivated, or now priceless). They are excluded from every amount above.
2309
+ * Lines that no longer resolve (deleted, deactivated, now priceless, or sold on a subscription plan only — the cart has no plan support). They are excluded from every amount above.
1840
2310
  */
1841
2311
  unavailable_variant_ids: Array<string>;
1842
2312
  };
@@ -1930,13 +2400,184 @@ type OrderSessionStatus = {
1930
2400
  */
1931
2401
  refund_reason?: "oversold" | "merchant";
1932
2402
  }>;
1933
- };
1934
- type GeoSuggestion = {
2403
+ /**
2404
+ * Append-only (subscriptions Unit 3): present ONLY on subscription signup orders (value 'subscription'). One-time purchase payloads omit it entirely — their wire shape is frozen.
2405
+ */
2406
+ source?: string;
2407
+ /**
2408
+ * Present only on subscription signup orders (source 'subscription'): the renewal terms the confirmation page states — 'renews every {interval_count} {interval} at {amount}'.
2409
+ */
2410
+ subscription?: {
2411
+ interval: "week" | "month" | "year";
2412
+ interval_count: number;
2413
+ /**
2414
+ * The locked recurring charge in minor units of `currency` — what every future cycle bills (the signup's plan snapshot, immune to later plan edits).
2415
+ */
2416
+ amount: number;
2417
+ currency: string;
2418
+ };
2419
+ };
2420
+ type GeoSuggestion = {
1935
2421
  /**
1936
2422
  * ISO 3166-1 alpha-2 country of the visitor, or null when the edge provides none.
1937
2423
  */
1938
2424
  country: string | null;
1939
2425
  };
2426
+ type AccountLoginResult = {
2427
+ ok: true;
2428
+ };
2429
+ type AccountLoginRequest = {
2430
+ email: string;
2431
+ };
2432
+ type AccountVerifyResult = {
2433
+ /**
2434
+ * Opaque site-scoped session token. Send as `Authorization: Bearer`; the server also requires the request Origin to be one of the site's own domains.
2435
+ */
2436
+ token: string;
2437
+ customer: {
2438
+ email: string;
2439
+ name: string | null;
2440
+ };
2441
+ expires_at: string;
2442
+ };
2443
+ type AccountVerifyRequest = {
2444
+ code: string;
2445
+ };
2446
+ type AccountLogoutResult = {
2447
+ ok: true;
2448
+ };
2449
+ type SubscriberSubscription = {
2450
+ id: string;
2451
+ /**
2452
+ * Stripe subscription status, mirrored verbatim ('active', 'past_due', 'canceled', ...). past_due after a cancel means no further charges will be attempted.
2453
+ */
2454
+ status: string;
2455
+ plan_title: string | null;
2456
+ plan_interval: string;
2457
+ plan_interval_count: number;
2458
+ /**
2459
+ * Locked signup recurring amount, minor units (grandfathering record).
2460
+ */
2461
+ plan_amount: number;
2462
+ /**
2463
+ * Current recurring amount, minor units (Dashboard repricing mirrors here).
2464
+ */
2465
+ current_amount: number;
2466
+ currency: string;
2467
+ /**
2468
+ * End of the paid-through period — the lapse date after a cancel.
2469
+ */
2470
+ current_period_end: string | null;
2471
+ cancel_at_period_end: boolean;
2472
+ canceled_at: string | null;
2473
+ /**
2474
+ * Terminal: the subscription is over (or its store was torn down) and cannot be reactivated — 'resubscribe' is the only path.
2475
+ */
2476
+ ended: boolean;
2477
+ is_test: boolean;
2478
+ };
2479
+ type AccountMeResult = {
2480
+ customer: {
2481
+ email: string;
2482
+ name: string | null;
2483
+ };
2484
+ site: {
2485
+ name: string | null;
2486
+ };
2487
+ orders: Array<{
2488
+ id: string;
2489
+ order_number: number | null;
2490
+ status: string;
2491
+ /**
2492
+ * 'checkout' for a one-time order, 'subscription' for a signup or renewal.
2493
+ */
2494
+ source: string;
2495
+ amount_total: number;
2496
+ shipping_total: number | null;
2497
+ tax_total: number | null;
2498
+ currency: string;
2499
+ created_at: string;
2500
+ line_items: Array<{
2501
+ name: string | null;
2502
+ quantity: number | null;
2503
+ unit_amount: number | null;
2504
+ }>;
2505
+ }>;
2506
+ subscriptions: Array<SubscriberSubscription>;
2507
+ };
2508
+ type AccountSubscribeRequest = {
2509
+ product_id: string;
2510
+ plan_id: string;
2511
+ variant_id?: string;
2512
+ success_url: string;
2513
+ cancel_url: string;
2514
+ };
2515
+ type SubscriberActionResult = {
2516
+ subscription: SubscriberSubscription;
2517
+ };
2518
+ type UpdateSubscriptionAddressRequest = {
2519
+ /**
2520
+ * Stripe shipping_details shape.
2521
+ */
2522
+ shipping_address: {
2523
+ name?: string;
2524
+ address: {
2525
+ line1: string;
2526
+ line2?: string;
2527
+ city?: string;
2528
+ state?: string;
2529
+ postal_code?: string;
2530
+ country: string;
2531
+ };
2532
+ };
2533
+ };
2534
+ type PortalSessionResult = {
2535
+ /**
2536
+ * Stripe Billing Portal session URL — top-level navigate the buyer there.
2537
+ */
2538
+ url: string;
2539
+ };
2540
+ type ManagedSubscription = {
2541
+ id: string;
2542
+ status: string;
2543
+ plan_title: string | null;
2544
+ plan_interval: string;
2545
+ plan_interval_count: number;
2546
+ plan_amount: number;
2547
+ current_amount: number;
2548
+ currency: string;
2549
+ current_period_end: string | null;
2550
+ cancel_at_period_end: boolean;
2551
+ canceled_at: string | null;
2552
+ ended: boolean;
2553
+ is_test: boolean;
2554
+ shipping_name: string | null;
2555
+ shipping_city: string | null;
2556
+ };
2557
+ type ManageVerifyResult = {
2558
+ manage_token: string;
2559
+ expires_at: string;
2560
+ subscription: ManagedSubscription;
2561
+ };
2562
+ type ManageVerifyRequest = {
2563
+ manage_code: string;
2564
+ };
2565
+ type ManagedSubscriptionResult = {
2566
+ subscription: ManagedSubscription;
2567
+ site: {
2568
+ name: string;
2569
+ };
2570
+ };
2571
+ type ManageCancelResult = {
2572
+ subscription: ManagedSubscription;
2573
+ };
2574
+ type ManageLinkAction = {
2575
+ action: "view" | "confirm_cancel" | "cancel" | "reactivate" | "card_update";
2576
+ /**
2577
+ * Must equal the path token (replay/tamper guard).
2578
+ */
2579
+ token: string;
2580
+ };
1940
2581
  type UpdateSitePaymentsData = {
1941
2582
  body: UpdateSitePayments;
1942
2583
  path: {
@@ -1971,6 +2612,40 @@ type UpdateSitePaymentsResponses = {
1971
2612
  200: SitePayments;
1972
2613
  };
1973
2614
  type UpdateSitePaymentsResponse = UpdateSitePaymentsResponses[keyof UpdateSitePaymentsResponses];
2615
+ type UpdateSiteAccountRouteData = {
2616
+ body: UpdateSiteAccountRoute;
2617
+ path: {
2618
+ siteId: string;
2619
+ };
2620
+ query?: never;
2621
+ url: "/api/v1/sites/{siteId}/account-route";
2622
+ };
2623
+ type UpdateSiteAccountRouteErrors = {
2624
+ /**
2625
+ * Unauthorized
2626
+ */
2627
+ 401: Error;
2628
+ /**
2629
+ * Forbidden - site tokens cannot set account-route readiness
2630
+ */
2631
+ 403: Error;
2632
+ /**
2633
+ * Site not found
2634
+ */
2635
+ 404: Error;
2636
+ /**
2637
+ * ready:true while the customer-account surface is disabled (code account_surface_disabled)
2638
+ */
2639
+ 409: Error;
2640
+ };
2641
+ type UpdateSiteAccountRouteError = UpdateSiteAccountRouteErrors[keyof UpdateSiteAccountRouteErrors];
2642
+ type UpdateSiteAccountRouteResponses = {
2643
+ /**
2644
+ * Account-route readiness updated
2645
+ */
2646
+ 200: SiteAccountRoute;
2647
+ };
2648
+ type UpdateSiteAccountRouteResponse = UpdateSiteAccountRouteResponses[keyof UpdateSiteAccountRouteResponses];
1974
2649
  type GetPaymentsStatusData = {
1975
2650
  body?: never;
1976
2651
  path?: never;
@@ -2228,6 +2903,36 @@ type AttachProductFileResponses = {
2228
2903
  200: Product;
2229
2904
  };
2230
2905
  type AttachProductFileResponse = AttachProductFileResponses[keyof AttachProductFileResponses];
2906
+ type SetProductSubscriptionData = {
2907
+ body: SetProductSubscription;
2908
+ path: {
2909
+ productId: string;
2910
+ };
2911
+ query?: never;
2912
+ url: "/api/v1/products/{productId}/subscription";
2913
+ };
2914
+ type SetProductSubscriptionErrors = {
2915
+ /**
2916
+ * Invalid plan set (bounds, exactly-one pricing rule, interval bound, floor matrix) — the error names the offending plan and carries a machine code
2917
+ */
2918
+ 400: Error;
2919
+ /**
2920
+ * Unauthorized
2921
+ */
2922
+ 401: Error;
2923
+ /**
2924
+ * Product not found
2925
+ */
2926
+ 404: Error;
2927
+ };
2928
+ type SetProductSubscriptionError = SetProductSubscriptionErrors[keyof SetProductSubscriptionErrors];
2929
+ type SetProductSubscriptionResponses = {
2930
+ /**
2931
+ * Subscription config replaced
2932
+ */
2933
+ 200: ProductSubscriptionConfig;
2934
+ };
2935
+ type SetProductSubscriptionResponse = SetProductSubscriptionResponses[keyof SetProductSubscriptionResponses];
2231
2936
  type CreateTestOrderData = {
2232
2937
  body?: CreateTestOrder;
2233
2938
  path: {
@@ -2262,6 +2967,44 @@ type CreateTestOrderResponses = {
2262
2967
  200: TestOrderResult;
2263
2968
  };
2264
2969
  type CreateTestOrderResponse = CreateTestOrderResponses[keyof CreateTestOrderResponses];
2970
+ type CreateTestSubscriptionData = {
2971
+ body?: CreateTestSubscription;
2972
+ path: {
2973
+ productId: string;
2974
+ };
2975
+ query?: never;
2976
+ url: "/api/v1/products/{productId}/test-subscription";
2977
+ };
2978
+ type CreateTestSubscriptionErrors = {
2979
+ /**
2980
+ * Invalid variant, no active plans, inactive plan, or custom-amount product
2981
+ */
2982
+ 400: Error;
2983
+ /**
2984
+ * Unauthorized
2985
+ */
2986
+ 401: Error;
2987
+ /**
2988
+ * Site tokens are not permitted — org API key only
2989
+ */
2990
+ 403: Error;
2991
+ /**
2992
+ * Product or plan not found
2993
+ */
2994
+ 404: Error;
2995
+ /**
2996
+ * Test customer record could not be created
2997
+ */
2998
+ 500: Error;
2999
+ };
3000
+ type CreateTestSubscriptionError = CreateTestSubscriptionErrors[keyof CreateTestSubscriptionErrors];
3001
+ type CreateTestSubscriptionResponses = {
3002
+ /**
3003
+ * Test subscription and signup order created
3004
+ */
3005
+ 200: TestSubscriptionResult;
3006
+ };
3007
+ type CreateTestSubscriptionResponse = CreateTestSubscriptionResponses[keyof CreateTestSubscriptionResponses];
2265
3008
  type CreateMultiItemTestOrderData = {
2266
3009
  body: CreateMultiItemTestOrder;
2267
3010
  path?: never;
@@ -2358,6 +3101,40 @@ type SetProductVariantsResponses = {
2358
3101
  200: SetProductVariantsResult;
2359
3102
  };
2360
3103
  type SetProductVariantsResponse = SetProductVariantsResponses[keyof SetProductVariantsResponses];
3104
+ type GenerateVariantsData = {
3105
+ body: GenerateVariants;
3106
+ path: {
3107
+ productId: string;
3108
+ };
3109
+ query?: never;
3110
+ url: "/api/v1/products/{productId}/variants/generate";
3111
+ };
3112
+ type GenerateVariantsErrors = {
3113
+ /**
3114
+ * Invalid axes or rule, a new axis on a product with variants, or the generation would exceed the variant cap — nothing was created
3115
+ */
3116
+ 400: Error;
3117
+ /**
3118
+ * Unauthorized
3119
+ */
3120
+ 401: Error;
3121
+ /**
3122
+ * Product not found
3123
+ */
3124
+ 404: Error;
3125
+ /**
3126
+ * matrix_version is stale — the body carries the current matrix; rebuild the axes from it
3127
+ */
3128
+ 409: SetProductVariantsConflict;
3129
+ };
3130
+ type GenerateVariantsError = GenerateVariantsErrors[keyof GenerateVariantsErrors];
3131
+ type GenerateVariantsResponses = {
3132
+ /**
3133
+ * Grid generated — the full detail (with the fresh matrix_version) plus created/skipped/excluded counts
3134
+ */
3135
+ 200: GenerateVariantsResult;
3136
+ };
3137
+ type GenerateVariantsResponse = GenerateVariantsResponses[keyof GenerateVariantsResponses];
2361
3138
  type DeleteVariantData = {
2362
3139
  body?: never;
2363
3140
  path: {
@@ -2929,6 +3706,36 @@ type UpdateCustomerResponses = {
2929
3706
  200: Customer;
2930
3707
  };
2931
3708
  type UpdateCustomerResponse = UpdateCustomerResponses[keyof UpdateCustomerResponses];
3709
+ type RevokeCustomerAccessData = {
3710
+ body?: never;
3711
+ path: {
3712
+ customerId: string;
3713
+ };
3714
+ query?: never;
3715
+ url: "/api/v1/customers/{customerId}/revoke-access";
3716
+ };
3717
+ type RevokeCustomerAccessErrors = {
3718
+ /**
3719
+ * Unauthorized
3720
+ */
3721
+ 401: Error;
3722
+ /**
3723
+ * Forbidden — site tokens cannot revoke customer credentials
3724
+ */
3725
+ 403: Error;
3726
+ /**
3727
+ * Customer not found
3728
+ */
3729
+ 404: Error;
3730
+ };
3731
+ type RevokeCustomerAccessError = RevokeCustomerAccessErrors[keyof RevokeCustomerAccessErrors];
3732
+ type RevokeCustomerAccessResponses = {
3733
+ /**
3734
+ * Credentials burned (counts are for this call only)
3735
+ */
3736
+ 200: RevokeCustomerAccessResult;
3737
+ };
3738
+ type RevokeCustomerAccessResponse = RevokeCustomerAccessResponses[keyof RevokeCustomerAccessResponses];
2932
3739
  type GetBusinessSummaryData = {
2933
3740
  body?: never;
2934
3741
  path?: never;
@@ -3138,67 +3945,227 @@ type SetOrderFulfillmentResponses = {
3138
3945
  200: Order;
3139
3946
  };
3140
3947
  type SetOrderFulfillmentResponse = SetOrderFulfillmentResponses[keyof SetOrderFulfillmentResponses];
3141
- type ListFormsWithSiteTokenData = {
3948
+ type ListSubscriptionsData = {
3142
3949
  body?: never;
3143
3950
  path?: never;
3144
- query?: never;
3145
- url: "/api/v1/forms";
3951
+ query?: {
3952
+ /**
3953
+ * Required with an org key (sk_xxx); must match the token's site when using a site token.
3954
+ */
3955
+ site_id?: string;
3956
+ /**
3957
+ * Exact status filter (verbatim Stripe values).
3958
+ */
3959
+ status?: string;
3960
+ /**
3961
+ * Max rows (default 50, max 100).
3962
+ */
3963
+ limit?: string;
3964
+ offset?: string;
3965
+ };
3966
+ url: "/api/v1/subscriptions";
3146
3967
  };
3147
- type ListFormsWithSiteTokenErrors = {
3968
+ type ListSubscriptionsErrors = {
3148
3969
  /**
3149
- * Unauthorized - requires site token
3970
+ * site_id mismatch / does not belong to this organization
3150
3971
  */
3151
- 401: Error;
3972
+ 400: unknown;
3152
3973
  /**
3153
- * Site not found
3974
+ * Missing or invalid token
3154
3975
  */
3155
- 404: Error;
3976
+ 401: unknown;
3156
3977
  };
3157
- type ListFormsWithSiteTokenError = ListFormsWithSiteTokenErrors[keyof ListFormsWithSiteTokenErrors];
3158
- type ListFormsWithSiteTokenResponses = {
3978
+ type ListSubscriptionsResponses = {
3159
3979
  /**
3160
- * List of forms
3980
+ * The subscriptions
3161
3981
  */
3162
- 200: FormsList;
3982
+ 200: SubscriptionsList;
3163
3983
  };
3164
- type ListFormsWithSiteTokenResponse = ListFormsWithSiteTokenResponses[keyof ListFormsWithSiteTokenResponses];
3165
- type CreateFormWithSiteTokenData = {
3166
- body: CreateForm;
3167
- path?: never;
3984
+ type ListSubscriptionsResponse = ListSubscriptionsResponses[keyof ListSubscriptionsResponses];
3985
+ type CancelSubscriptionData = {
3986
+ body?: never;
3987
+ path: {
3988
+ subscriptionId: string;
3989
+ };
3168
3990
  query?: never;
3169
- url: "/api/v1/forms";
3991
+ url: "/api/v1/subscriptions/{subscriptionId}/cancel";
3170
3992
  };
3171
- type CreateFormWithSiteTokenErrors = {
3993
+ type CancelSubscriptionErrors = {
3172
3994
  /**
3173
- * Form name indicates credential/payment collection, which is not supported
3995
+ * Site tokens are not permitted
3174
3996
  */
3175
- 400: Error;
3997
+ 403: unknown;
3176
3998
  /**
3177
- * Unauthorized - requires site token
3999
+ * Subscription not found (or belongs to another org)
3178
4000
  */
3179
- 401: Error;
4001
+ 404: unknown;
3180
4002
  /**
3181
- * Site not found
4003
+ * Subscription already ended (code ended) — terminal locally, or Stripe says it is already canceled
3182
4004
  */
3183
- 404: Error;
4005
+ 409: unknown;
4006
+ /**
4007
+ * Stripe unreachable — retry
4008
+ */
4009
+ 502: unknown;
3184
4010
  };
3185
- type CreateFormWithSiteTokenError = CreateFormWithSiteTokenErrors[keyof CreateFormWithSiteTokenErrors];
3186
- type CreateFormWithSiteTokenResponses = {
4011
+ type CancelSubscriptionResponses = {
3187
4012
  /**
3188
- * Form created successfully
4013
+ * The updated subscription
3189
4014
  */
3190
- 201: Form;
4015
+ 200: SubscriptionSummary;
3191
4016
  };
3192
- type CreateFormWithSiteTokenResponse = CreateFormWithSiteTokenResponses[keyof CreateFormWithSiteTokenResponses];
3193
- type ListSitesData = {
3194
- body?: never;
3195
- path?: never;
3196
- query?: {
3197
- /**
3198
- * Exact match on the consumer-side id (the landingsite website id) — the lookup for "which aifeatures site is this website?"
3199
- */
3200
- external_id?: string;
3201
- /**
4017
+ type CancelSubscriptionResponse = CancelSubscriptionResponses[keyof CancelSubscriptionResponses];
4018
+ type TeardownSiteSubscriptionsData = {
4019
+ body?: SubscriptionsTeardownBody;
4020
+ path: {
4021
+ siteId: string;
4022
+ };
4023
+ query?: never;
4024
+ url: "/api/v1/sites/{siteId}/subscriptions/teardown";
4025
+ };
4026
+ type TeardownSiteSubscriptionsErrors = {
4027
+ /**
4028
+ * Site tokens are not permitted
4029
+ */
4030
+ 403: unknown;
4031
+ /**
4032
+ * Site not found. `code` distinguishes the two cases: 'site_not_found' (no such site — terminal, stop retrying) vs 'site_not_accessible' (the site exists but belongs to another organization — your key is wrong or rotated, so RETRY rather than discarding state).
4033
+ */
4034
+ 404: Error;
4035
+ };
4036
+ type TeardownSiteSubscriptionsError = TeardownSiteSubscriptionsErrors[keyof TeardownSiteSubscriptionsErrors];
4037
+ type TeardownSiteSubscriptionsResponses = {
4038
+ /**
4039
+ * Teardown outcome
4040
+ */
4041
+ 200: SubscriptionsTeardownResult;
4042
+ };
4043
+ type TeardownSiteSubscriptionsResponse = TeardownSiteSubscriptionsResponses[keyof TeardownSiteSubscriptionsResponses];
4044
+ type ReactivateSiteSubscriptionsTeardownData = {
4045
+ body?: SubscriptionsReactivateBody;
4046
+ path: {
4047
+ siteId: string;
4048
+ };
4049
+ query?: never;
4050
+ url: "/api/v1/sites/{siteId}/subscriptions/reactivate-teardown";
4051
+ };
4052
+ type ReactivateSiteSubscriptionsTeardownErrors = {
4053
+ /**
4054
+ * Unknown key in the body (a misspelled `reason` is refused, never ignored)
4055
+ */
4056
+ 400: Error;
4057
+ /**
4058
+ * Site tokens are not permitted
4059
+ */
4060
+ 403: unknown;
4061
+ /**
4062
+ * Site not found. `code` distinguishes the two cases: 'site_not_found' (no such site — terminal) vs 'site_not_accessible' (exists, another organization — wrong or rotated key, retry).
4063
+ */
4064
+ 404: Error;
4065
+ };
4066
+ type ReactivateSiteSubscriptionsTeardownError = ReactivateSiteSubscriptionsTeardownErrors[keyof ReactivateSiteSubscriptionsTeardownErrors];
4067
+ type ReactivateSiteSubscriptionsTeardownResponses = {
4068
+ /**
4069
+ * Reactivation outcome
4070
+ */
4071
+ 200: SubscriptionsReactivateResult;
4072
+ };
4073
+ type ReactivateSiteSubscriptionsTeardownResponse = ReactivateSiteSubscriptionsTeardownResponses[keyof ReactivateSiteSubscriptionsTeardownResponses];
4074
+ type CreatePreviewSessionData = {
4075
+ body: CreatePreviewSession;
4076
+ path: {
4077
+ siteId: string;
4078
+ };
4079
+ query?: never;
4080
+ url: "/api/v1/sites/{siteId}/preview-session";
4081
+ };
4082
+ type CreatePreviewSessionErrors = {
4083
+ /**
4084
+ * Unauthorized
4085
+ */
4086
+ 401: unknown;
4087
+ /**
4088
+ * Site tokens are not permitted — org API key only
4089
+ */
4090
+ 403: unknown;
4091
+ /**
4092
+ * Site not found — `code` is 'site_not_found' (no such site) or 'site_not_accessible' (another organization's site).
4093
+ */
4094
+ 404: Error;
4095
+ /**
4096
+ * Preview customer record could not be created
4097
+ */
4098
+ 500: unknown;
4099
+ };
4100
+ type CreatePreviewSessionError = CreatePreviewSessionErrors[keyof CreatePreviewSessionErrors];
4101
+ type CreatePreviewSessionResponses = {
4102
+ /**
4103
+ * Preview session minted
4104
+ */
4105
+ 200: PreviewSessionResult;
4106
+ };
4107
+ type CreatePreviewSessionResponse = CreatePreviewSessionResponses[keyof CreatePreviewSessionResponses];
4108
+ type ListFormsWithSiteTokenData = {
4109
+ body?: never;
4110
+ path?: never;
4111
+ query?: never;
4112
+ url: "/api/v1/forms";
4113
+ };
4114
+ type ListFormsWithSiteTokenErrors = {
4115
+ /**
4116
+ * Unauthorized - requires site token
4117
+ */
4118
+ 401: Error;
4119
+ /**
4120
+ * Site not found
4121
+ */
4122
+ 404: Error;
4123
+ };
4124
+ type ListFormsWithSiteTokenError = ListFormsWithSiteTokenErrors[keyof ListFormsWithSiteTokenErrors];
4125
+ type ListFormsWithSiteTokenResponses = {
4126
+ /**
4127
+ * List of forms
4128
+ */
4129
+ 200: FormsList;
4130
+ };
4131
+ type ListFormsWithSiteTokenResponse = ListFormsWithSiteTokenResponses[keyof ListFormsWithSiteTokenResponses];
4132
+ type CreateFormWithSiteTokenData = {
4133
+ body: CreateForm;
4134
+ path?: never;
4135
+ query?: never;
4136
+ url: "/api/v1/forms";
4137
+ };
4138
+ type CreateFormWithSiteTokenErrors = {
4139
+ /**
4140
+ * Form name indicates credential/payment collection, which is not supported
4141
+ */
4142
+ 400: Error;
4143
+ /**
4144
+ * Unauthorized - requires site token
4145
+ */
4146
+ 401: Error;
4147
+ /**
4148
+ * Site not found
4149
+ */
4150
+ 404: Error;
4151
+ };
4152
+ type CreateFormWithSiteTokenError = CreateFormWithSiteTokenErrors[keyof CreateFormWithSiteTokenErrors];
4153
+ type CreateFormWithSiteTokenResponses = {
4154
+ /**
4155
+ * Form created successfully
4156
+ */
4157
+ 201: Form;
4158
+ };
4159
+ type CreateFormWithSiteTokenResponse = CreateFormWithSiteTokenResponses[keyof CreateFormWithSiteTokenResponses];
4160
+ type ListSitesData = {
4161
+ body?: never;
4162
+ path?: never;
4163
+ query?: {
4164
+ /**
4165
+ * Exact match on the consumer-side id (the landingsite website id) — the lookup for "which aifeatures site is this website?"
4166
+ */
4167
+ external_id?: string;
4168
+ /**
3202
4169
  * Maximum number of sites to return (default 50, max 100)
3203
4170
  */
3204
4171
  limit?: string;
@@ -3321,24 +4288,32 @@ type UpdateSiteData = {
3321
4288
  };
3322
4289
  type UpdateSiteErrors = {
3323
4290
  /**
3324
- * Invalid shipping configuration a rate amount out of bounds (negative, fractional, or over the ceiling) or an invalid free_shipping_over. The message names the offending rate and formats amounts in the site's currency.
4291
+ * Invalid shipping configuration (a rate amount out of bounds or an invalid free_shipping_over the message names the offending rate), a currency outside Stripe's presentment allowlist, or `currency` combined with shipping_rates/free_shipping_over in one request (change currency first, then set rates).
3325
4292
  */
3326
4293
  400: Error;
3327
4294
  /**
3328
4295
  * Unauthorized
3329
4296
  */
3330
4297
  401: Error;
4298
+ /**
4299
+ * `currency` sent with an organization API key. Setting the store currency here is a merchant-explicit write (it PINS the currency against platform sync) and requires the site's own token; platform/operator currency changes go through PATCH /sites/{siteId}/payments.
4300
+ */
4301
+ 403: Error;
3331
4302
  /**
3332
4303
  * Site not found
3333
4304
  */
3334
4305
  404: Error;
4306
+ /**
4307
+ * Currency changed too recently — each accepted change restates the whole catalogue, so changes are rate-limited per site. Retry after the cooldown.
4308
+ */
4309
+ 429: Error;
3335
4310
  };
3336
4311
  type UpdateSiteError = UpdateSiteErrors[keyof UpdateSiteErrors];
3337
4312
  type UpdateSiteResponses = {
3338
4313
  /**
3339
- * Site updated successfully
4314
+ * Site updated. When the request carried `currency`, `currency_restatement` reports the outcome — including blocked outcomes (orders exist, an amount can't survive the move): those are 200s with the block described, and any other fields in the request still applied.
3340
4315
  */
3341
- 200: Site;
4316
+ 200: SiteWithRestatement;
3342
4317
  };
3343
4318
  type UpdateSiteResponse = UpdateSiteResponses[keyof UpdateSiteResponses];
3344
4319
  type GetSiteCheckoutPauseData = {
@@ -3689,216 +4664,1151 @@ type DownloadAttachmentResponses = {
3689
4664
  */
3690
4665
  200: unknown;
3691
4666
  };
3692
- type GetPublicProductData = {
4667
+ type ListEventDestinationsData = {
3693
4668
  body?: never;
3694
4669
  path: {
3695
- productId: string;
3696
- };
3697
- query?: {
3698
- /**
3699
- * Buyer-declared market country (ISO 3166-1 alpha-2). Present: prices convert to that market's currency when supported. Absent: the site's own currency — the default response is identical for every visitor worldwide.
3700
- */
3701
- country?: string;
4670
+ siteId: string;
3702
4671
  };
3703
- url: "/v1/p/{productId}";
4672
+ query?: never;
4673
+ url: "/api/v1/sites/{siteId}/event-destinations";
3704
4674
  };
3705
- type GetPublicProductErrors = {
4675
+ type ListEventDestinationsErrors = {
3706
4676
  /**
3707
- * Product not found
4677
+ * Unauthorized
4678
+ */
4679
+ 401: Error;
4680
+ /**
4681
+ * Site not found
3708
4682
  */
3709
4683
  404: Error;
3710
4684
  };
3711
- type GetPublicProductError = GetPublicProductErrors[keyof GetPublicProductErrors];
3712
- type GetPublicProductResponses = {
4685
+ type ListEventDestinationsError = ListEventDestinationsErrors[keyof ListEventDestinationsErrors];
4686
+ type ListEventDestinationsResponses = {
3713
4687
  /**
3714
- * Public product configuration
4688
+ * Destinations
3715
4689
  */
3716
- 200: PublicProduct & {
3717
- /**
3718
- * False exactly when the product has variant rows but none is active (sold out / all disabled) — render a disabled buy button; checkout would 409. True for legacy no-variant products and products with at least one active variant.
3719
- */
3720
- purchasable: boolean;
3721
- };
4690
+ 200: EventDestinationsList;
3722
4691
  };
3723
- type GetPublicProductResponse = GetPublicProductResponses[keyof GetPublicProductResponses];
3724
- type CreateCheckoutData = {
3725
- body: CheckoutRequest;
4692
+ type ListEventDestinationsResponse = ListEventDestinationsResponses[keyof ListEventDestinationsResponses];
4693
+ type CreateEventDestinationData = {
4694
+ body: CreateEventDestination;
3726
4695
  path: {
3727
- productId: string;
4696
+ siteId: string;
3728
4697
  };
3729
4698
  query?: never;
3730
- url: "/v1/p/{productId}/checkout";
4699
+ url: "/api/v1/sites/{siteId}/event-destinations";
3731
4700
  };
3732
- type CreateCheckoutErrors = {
4701
+ type CreateEventDestinationErrors = {
3733
4702
  /**
3734
- * Invalid request (bad quantity/amount/metadata/urls/email, or non-JSON body)
4703
+ * Invalid URL, unknown topic, or unknown form
3735
4704
  */
3736
4705
  400: Error;
3737
4706
  /**
3738
- * Product not found (unknown or deleted)
4707
+ * Unauthorized
4708
+ */
4709
+ 401: Error;
4710
+ /**
4711
+ * Site not found
3739
4712
  */
3740
4713
  404: Error;
4714
+ };
4715
+ type CreateEventDestinationError = CreateEventDestinationErrors[keyof CreateEventDestinationErrors];
4716
+ type CreateEventDestinationResponses = {
3741
4717
  /**
3742
- * Product/variant inactive, insufficient stock for the requested quantity, the store can't accept payments right now — or, when expectation fields were sent and the price moved, error 'price_changed' with current_unit_amount and currency alongside it
4718
+ * Destination created
3743
4719
  */
3744
- 409: Error;
4720
+ 201: EventDestination;
4721
+ };
4722
+ type CreateEventDestinationResponse = CreateEventDestinationResponses[keyof CreateEventDestinationResponses];
4723
+ type DeleteEventDestinationData = {
4724
+ body?: never;
4725
+ path: {
4726
+ siteId: string;
4727
+ destinationId: string;
4728
+ };
4729
+ query?: never;
4730
+ url: "/api/v1/sites/{siteId}/event-destinations/{destinationId}";
4731
+ };
4732
+ type DeleteEventDestinationErrors = {
3745
4733
  /**
3746
- * Too many requests from this IP — retry shortly
4734
+ * Unauthorized
3747
4735
  */
3748
- 429: Error;
4736
+ 401: Error;
3749
4737
  /**
3750
- * Stripe rejected or failed the session creation
4738
+ * Not found
3751
4739
  */
3752
- 502: Error;
4740
+ 404: Error;
3753
4741
  };
3754
- type CreateCheckoutError = CreateCheckoutErrors[keyof CreateCheckoutErrors];
3755
- type CreateCheckoutResponses = {
4742
+ type DeleteEventDestinationError = DeleteEventDestinationErrors[keyof DeleteEventDestinationErrors];
4743
+ type DeleteEventDestinationResponses = {
3756
4744
  /**
3757
- * Checkout session created — redirect the buyer to url
4745
+ * Deleted
3758
4746
  */
3759
- 200: CheckoutResult;
4747
+ 200: {
4748
+ success: boolean;
4749
+ };
3760
4750
  };
3761
- type CreateCheckoutResponse = CreateCheckoutResponses[keyof CreateCheckoutResponses];
3762
- type CreateCartCheckoutData = {
3763
- body: CartCheckoutRequest;
3764
- path?: never;
4751
+ type DeleteEventDestinationResponse = DeleteEventDestinationResponses[keyof DeleteEventDestinationResponses];
4752
+ type GetEventDestinationData = {
4753
+ body?: never;
4754
+ path: {
4755
+ siteId: string;
4756
+ destinationId: string;
4757
+ };
3765
4758
  query?: never;
3766
- url: "/v1/p/checkout";
4759
+ url: "/api/v1/sites/{siteId}/event-destinations/{destinationId}";
3767
4760
  };
3768
- type CreateCartCheckoutErrors = {
4761
+ type GetEventDestinationErrors = {
3769
4762
  /**
3770
- * Structural or validation failure (see the `code` values), or invalid urls/email/metadata
3771
- */
3772
- 400: Error & {
3773
- /**
3774
- * Machine-readable failure code: invalid_items, too_many_items, invalid_variant_id, duplicate_variant, invalid_quantity, custom_amount_not_allowed, cross_site_items, multiple_redirects, mixed_currency, or preview_domain. Absent on plain validation messages (URLs, email, metadata).
3775
- */
3776
- code?: string;
3777
- };
3778
- /**
3779
- * cart_conflict carrying every currently-known per-line conflict, shipping_option_unavailable when the buyer's chosen postage no longer exists, or the store can't accept payments right now
3780
- */
3781
- 409: CartConflict | ShippingOptionUnavailable | Error;
3782
- /**
3783
- * Too many requests from this IP — retry shortly
4763
+ * Unauthorized
3784
4764
  */
3785
- 429: Error;
4765
+ 401: Error;
3786
4766
  /**
3787
- * Stripe rejected or failed the session creation
4767
+ * Not found
3788
4768
  */
3789
- 502: Error;
4769
+ 404: Error;
3790
4770
  };
3791
- type CreateCartCheckoutError = CreateCartCheckoutErrors[keyof CreateCartCheckoutErrors];
3792
- type CreateCartCheckoutResponses = {
4771
+ type GetEventDestinationError = GetEventDestinationErrors[keyof GetEventDestinationErrors];
4772
+ type GetEventDestinationResponses = {
3793
4773
  /**
3794
- * Checkout session created — redirect the buyer to url
4774
+ * Destination
3795
4775
  */
3796
- 200: CheckoutResult;
4776
+ 200: EventDestination;
3797
4777
  };
3798
- type CreateCartCheckoutResponse = CreateCartCheckoutResponses[keyof CreateCartCheckoutResponses];
3799
- type GetCartSummaryData = {
3800
- body: CartSummaryRequest;
3801
- path?: never;
4778
+ type GetEventDestinationResponse = GetEventDestinationResponses[keyof GetEventDestinationResponses];
4779
+ type UpdateEventDestinationData = {
4780
+ body: UpdateEventDestination;
4781
+ path: {
4782
+ siteId: string;
4783
+ destinationId: string;
4784
+ };
3802
4785
  query?: never;
3803
- url: "/v1/p/checkout/summary";
4786
+ url: "/api/v1/sites/{siteId}/event-destinations/{destinationId}";
3804
4787
  };
3805
- type GetCartSummaryErrors = {
4788
+ type UpdateEventDestinationErrors = {
3806
4789
  /**
3807
- * Structural failure: invalid_items, too_many_items, invalid_variant_id, invalid_quantity, or cross_site_items
4790
+ * Invalid URL or unknown topic
3808
4791
  */
3809
- 400: Error & {
3810
- /**
3811
- * Machine-readable failure code: invalid_items, too_many_items, invalid_variant_id, duplicate_variant, invalid_quantity, custom_amount_not_allowed, cross_site_items, multiple_redirects, mixed_currency, or preview_domain. Absent on plain validation messages (URLs, email, metadata).
3812
- */
3813
- code?: string;
3814
- };
4792
+ 400: Error;
3815
4793
  /**
3816
- * The cart cannot be priced — the store's shipping configuration is unreadable, or the lines do not share one currency. Show no total rather than a wrong one.
4794
+ * Unauthorized
3817
4795
  */
3818
- 409: Error;
4796
+ 401: Error;
3819
4797
  /**
3820
- * Too many requests from this IP — retry shortly
4798
+ * Not found
3821
4799
  */
3822
- 429: Error;
4800
+ 404: Error;
3823
4801
  };
3824
- type GetCartSummaryError = GetCartSummaryErrors[keyof GetCartSummaryErrors];
3825
- type GetCartSummaryResponses = {
4802
+ type UpdateEventDestinationError = UpdateEventDestinationErrors[keyof UpdateEventDestinationErrors];
4803
+ type UpdateEventDestinationResponses = {
3826
4804
  /**
3827
- * The priced cart
4805
+ * Updated
3828
4806
  */
3829
- 200: CartSummaryResult;
4807
+ 200: EventDestination;
3830
4808
  };
3831
- type GetCartSummaryResponse = GetCartSummaryResponses[keyof GetCartSummaryResponses];
3832
- type GetOrderSessionData = {
4809
+ type UpdateEventDestinationResponse = UpdateEventDestinationResponses[keyof UpdateEventDestinationResponses];
4810
+ type RotateEventDestinationSecretData = {
3833
4811
  body?: never;
3834
4812
  path: {
3835
- sessionId: string;
4813
+ siteId: string;
4814
+ destinationId: string;
3836
4815
  };
3837
4816
  query?: never;
3838
- url: "/v1/o/session/{sessionId}";
4817
+ url: "/api/v1/sites/{siteId}/event-destinations/{destinationId}/rotate-secret";
3839
4818
  };
3840
- type GetOrderSessionErrors = {
4819
+ type RotateEventDestinationSecretErrors = {
3841
4820
  /**
3842
- * No order for this checkout session
4821
+ * Unauthorized
4822
+ */
4823
+ 401: Error;
4824
+ /**
4825
+ * Not found
3843
4826
  */
3844
4827
  404: Error;
3845
4828
  };
3846
- type GetOrderSessionError = GetOrderSessionErrors[keyof GetOrderSessionErrors];
3847
- type GetOrderSessionResponses = {
4829
+ type RotateEventDestinationSecretError = RotateEventDestinationSecretErrors[keyof RotateEventDestinationSecretErrors];
4830
+ type RotateEventDestinationSecretResponses = {
4831
+ /**
4832
+ * Secret rotated
4833
+ */
4834
+ 200: EventDestination;
4835
+ };
4836
+ type RotateEventDestinationSecretResponse = RotateEventDestinationSecretResponses[keyof RotateEventDestinationSecretResponses];
4837
+ type GetEventDestinationSecretData = {
4838
+ body?: never;
4839
+ path: {
4840
+ siteId: string;
4841
+ destinationId: string;
4842
+ };
4843
+ query?: never;
4844
+ url: "/api/v1/sites/{siteId}/event-destinations/{destinationId}/secret";
4845
+ };
4846
+ type GetEventDestinationSecretErrors = {
4847
+ /**
4848
+ * Unauthorized
4849
+ */
4850
+ 401: Error;
4851
+ /**
4852
+ * Not found
4853
+ */
4854
+ 404: Error;
4855
+ };
4856
+ type GetEventDestinationSecretError = GetEventDestinationSecretErrors[keyof GetEventDestinationSecretErrors];
4857
+ type GetEventDestinationSecretResponses = {
4858
+ /**
4859
+ * The signing secret
4860
+ */
4861
+ 200: EventDestinationSecret;
4862
+ };
4863
+ type GetEventDestinationSecretResponse = GetEventDestinationSecretResponses[keyof GetEventDestinationSecretResponses];
4864
+ type ListEventDeliveriesData = {
4865
+ body?: never;
4866
+ path: {
4867
+ siteId: string;
4868
+ destinationId: string;
4869
+ };
4870
+ query?: {
4871
+ limit?: number;
4872
+ };
4873
+ url: "/api/v1/sites/{siteId}/event-destinations/{destinationId}/deliveries";
4874
+ };
4875
+ type ListEventDeliveriesErrors = {
4876
+ /**
4877
+ * Unauthorized
4878
+ */
4879
+ 401: Error;
4880
+ /**
4881
+ * Not found
4882
+ */
4883
+ 404: Error;
4884
+ };
4885
+ type ListEventDeliveriesError = ListEventDeliveriesErrors[keyof ListEventDeliveriesErrors];
4886
+ type ListEventDeliveriesResponses = {
4887
+ /**
4888
+ * Deliveries
4889
+ */
4890
+ 200: EventDeliveriesList;
4891
+ };
4892
+ type ListEventDeliveriesResponse = ListEventDeliveriesResponses[keyof ListEventDeliveriesResponses];
4893
+ type RetryEventDeliveryData = {
4894
+ body?: never;
4895
+ path: {
4896
+ siteId: string;
4897
+ destinationId: string;
4898
+ deliveryId: string;
4899
+ };
4900
+ query?: never;
4901
+ url: "/api/v1/sites/{siteId}/event-destinations/{destinationId}/deliveries/{deliveryId}/retry";
4902
+ };
4903
+ type RetryEventDeliveryErrors = {
4904
+ /**
4905
+ * Unauthorized
4906
+ */
4907
+ 401: Error;
4908
+ /**
4909
+ * Not found
4910
+ */
4911
+ 404: Error;
4912
+ };
4913
+ type RetryEventDeliveryError = RetryEventDeliveryErrors[keyof RetryEventDeliveryErrors];
4914
+ type RetryEventDeliveryResponses = {
4915
+ /**
4916
+ * Retry attempted; the row reflects the outcome
4917
+ */
4918
+ 200: EventDelivery;
4919
+ };
4920
+ type RetryEventDeliveryResponse = RetryEventDeliveryResponses[keyof RetryEventDeliveryResponses];
4921
+ type ListEventDestinationsWithSiteTokenData = {
4922
+ body?: never;
4923
+ path?: never;
4924
+ query?: never;
4925
+ url: "/api/v1/event-destinations";
4926
+ };
4927
+ type ListEventDestinationsWithSiteTokenErrors = {
4928
+ /**
4929
+ * Unauthorized - requires site token
4930
+ */
4931
+ 401: Error;
4932
+ };
4933
+ type ListEventDestinationsWithSiteTokenError = ListEventDestinationsWithSiteTokenErrors[keyof ListEventDestinationsWithSiteTokenErrors];
4934
+ type ListEventDestinationsWithSiteTokenResponses = {
4935
+ /**
4936
+ * Destinations
4937
+ */
4938
+ 200: EventDestinationsList;
4939
+ };
4940
+ type ListEventDestinationsWithSiteTokenResponse = ListEventDestinationsWithSiteTokenResponses[keyof ListEventDestinationsWithSiteTokenResponses];
4941
+ type CreateEventDestinationWithSiteTokenData = {
4942
+ body: CreateEventDestination;
4943
+ path?: never;
4944
+ query?: never;
4945
+ url: "/api/v1/event-destinations";
4946
+ };
4947
+ type CreateEventDestinationWithSiteTokenErrors = {
4948
+ /**
4949
+ * Invalid URL, unknown topic, or unknown form
4950
+ */
4951
+ 400: Error;
4952
+ /**
4953
+ * Unauthorized - requires site token
4954
+ */
4955
+ 401: Error;
4956
+ };
4957
+ type CreateEventDestinationWithSiteTokenError = CreateEventDestinationWithSiteTokenErrors[keyof CreateEventDestinationWithSiteTokenErrors];
4958
+ type CreateEventDestinationWithSiteTokenResponses = {
4959
+ /**
4960
+ * Created
4961
+ */
4962
+ 201: EventDestination;
4963
+ };
4964
+ type CreateEventDestinationWithSiteTokenResponse = CreateEventDestinationWithSiteTokenResponses[keyof CreateEventDestinationWithSiteTokenResponses];
4965
+ type DeleteEventDestinationWithSiteTokenData = {
4966
+ body?: never;
4967
+ path: {
4968
+ destinationId: string;
4969
+ };
4970
+ query?: never;
4971
+ url: "/api/v1/event-destinations/{destinationId}";
4972
+ };
4973
+ type DeleteEventDestinationWithSiteTokenErrors = {
4974
+ /**
4975
+ * Unauthorized - requires site token
4976
+ */
4977
+ 401: Error;
4978
+ /**
4979
+ * Not found
4980
+ */
4981
+ 404: Error;
4982
+ };
4983
+ type DeleteEventDestinationWithSiteTokenError = DeleteEventDestinationWithSiteTokenErrors[keyof DeleteEventDestinationWithSiteTokenErrors];
4984
+ type DeleteEventDestinationWithSiteTokenResponses = {
4985
+ /**
4986
+ * Deleted
4987
+ */
4988
+ 200: {
4989
+ success: boolean;
4990
+ };
4991
+ };
4992
+ type DeleteEventDestinationWithSiteTokenResponse = DeleteEventDestinationWithSiteTokenResponses[keyof DeleteEventDestinationWithSiteTokenResponses];
4993
+ type UpdateEventDestinationWithSiteTokenData = {
4994
+ body: UpdateEventDestination;
4995
+ path: {
4996
+ destinationId: string;
4997
+ };
4998
+ query?: never;
4999
+ url: "/api/v1/event-destinations/{destinationId}";
5000
+ };
5001
+ type UpdateEventDestinationWithSiteTokenErrors = {
5002
+ /**
5003
+ * Invalid URL or unknown topic
5004
+ */
5005
+ 400: Error;
5006
+ /**
5007
+ * Unauthorized - requires site token
5008
+ */
5009
+ 401: Error;
5010
+ /**
5011
+ * Not found
5012
+ */
5013
+ 404: Error;
5014
+ };
5015
+ type UpdateEventDestinationWithSiteTokenError = UpdateEventDestinationWithSiteTokenErrors[keyof UpdateEventDestinationWithSiteTokenErrors];
5016
+ type UpdateEventDestinationWithSiteTokenResponses = {
5017
+ /**
5018
+ * Updated
5019
+ */
5020
+ 200: EventDestination;
5021
+ };
5022
+ type UpdateEventDestinationWithSiteTokenResponse = UpdateEventDestinationWithSiteTokenResponses[keyof UpdateEventDestinationWithSiteTokenResponses];
5023
+ type RotateEventDestinationSecretWithSiteTokenData = {
5024
+ body?: never;
5025
+ path: {
5026
+ destinationId: string;
5027
+ };
5028
+ query?: never;
5029
+ url: "/api/v1/event-destinations/{destinationId}/rotate-secret";
5030
+ };
5031
+ type RotateEventDestinationSecretWithSiteTokenErrors = {
5032
+ /**
5033
+ * Unauthorized - requires site token
5034
+ */
5035
+ 401: Error;
5036
+ /**
5037
+ * Not found
5038
+ */
5039
+ 404: Error;
5040
+ };
5041
+ type RotateEventDestinationSecretWithSiteTokenError = RotateEventDestinationSecretWithSiteTokenErrors[keyof RotateEventDestinationSecretWithSiteTokenErrors];
5042
+ type RotateEventDestinationSecretWithSiteTokenResponses = {
5043
+ /**
5044
+ * Secret rotated
5045
+ */
5046
+ 200: EventDestination;
5047
+ };
5048
+ type RotateEventDestinationSecretWithSiteTokenResponse = RotateEventDestinationSecretWithSiteTokenResponses[keyof RotateEventDestinationSecretWithSiteTokenResponses];
5049
+ type GetEventDestinationSecretWithSiteTokenData = {
5050
+ body?: never;
5051
+ path: {
5052
+ destinationId: string;
5053
+ };
5054
+ query?: never;
5055
+ url: "/api/v1/event-destinations/{destinationId}/secret";
5056
+ };
5057
+ type GetEventDestinationSecretWithSiteTokenErrors = {
5058
+ /**
5059
+ * Unauthorized - requires site token
5060
+ */
5061
+ 401: Error;
5062
+ /**
5063
+ * Not found
5064
+ */
5065
+ 404: Error;
5066
+ };
5067
+ type GetEventDestinationSecretWithSiteTokenError = GetEventDestinationSecretWithSiteTokenErrors[keyof GetEventDestinationSecretWithSiteTokenErrors];
5068
+ type GetEventDestinationSecretWithSiteTokenResponses = {
5069
+ /**
5070
+ * The signing secret
5071
+ */
5072
+ 200: EventDestinationSecret;
5073
+ };
5074
+ type GetEventDestinationSecretWithSiteTokenResponse = GetEventDestinationSecretWithSiteTokenResponses[keyof GetEventDestinationSecretWithSiteTokenResponses];
5075
+ type ListEventDeliveriesWithSiteTokenData = {
5076
+ body?: never;
5077
+ path: {
5078
+ destinationId: string;
5079
+ };
5080
+ query?: {
5081
+ limit?: number;
5082
+ };
5083
+ url: "/api/v1/event-destinations/{destinationId}/deliveries";
5084
+ };
5085
+ type ListEventDeliveriesWithSiteTokenErrors = {
5086
+ /**
5087
+ * Unauthorized - requires site token
5088
+ */
5089
+ 401: Error;
5090
+ /**
5091
+ * Not found
5092
+ */
5093
+ 404: Error;
5094
+ };
5095
+ type ListEventDeliveriesWithSiteTokenError = ListEventDeliveriesWithSiteTokenErrors[keyof ListEventDeliveriesWithSiteTokenErrors];
5096
+ type ListEventDeliveriesWithSiteTokenResponses = {
5097
+ /**
5098
+ * Deliveries
5099
+ */
5100
+ 200: EventDeliveriesList;
5101
+ };
5102
+ type ListEventDeliveriesWithSiteTokenResponse = ListEventDeliveriesWithSiteTokenResponses[keyof ListEventDeliveriesWithSiteTokenResponses];
5103
+ type RetryEventDeliveryWithSiteTokenData = {
5104
+ body?: never;
5105
+ path: {
5106
+ destinationId: string;
5107
+ deliveryId: string;
5108
+ };
5109
+ query?: never;
5110
+ url: "/api/v1/event-destinations/{destinationId}/deliveries/{deliveryId}/retry";
5111
+ };
5112
+ type RetryEventDeliveryWithSiteTokenErrors = {
5113
+ /**
5114
+ * Unauthorized - requires site token
5115
+ */
5116
+ 401: Error;
5117
+ /**
5118
+ * Not found
5119
+ */
5120
+ 404: Error;
5121
+ };
5122
+ type RetryEventDeliveryWithSiteTokenError = RetryEventDeliveryWithSiteTokenErrors[keyof RetryEventDeliveryWithSiteTokenErrors];
5123
+ type RetryEventDeliveryWithSiteTokenResponses = {
5124
+ /**
5125
+ * Retry attempted
5126
+ */
5127
+ 200: EventDelivery;
5128
+ };
5129
+ type RetryEventDeliveryWithSiteTokenResponse = RetryEventDeliveryWithSiteTokenResponses[keyof RetryEventDeliveryWithSiteTokenResponses];
5130
+ type GetPublicProductData = {
5131
+ body?: never;
5132
+ path: {
5133
+ productId: string;
5134
+ };
5135
+ query?: {
5136
+ /**
5137
+ * Buyer-declared market country (ISO 3166-1 alpha-2). Present: prices convert to that market's currency when supported. Absent: the site's own currency — the default response is identical for every visitor worldwide.
5138
+ */
5139
+ country?: string;
5140
+ };
5141
+ url: "/v1/p/{productId}";
5142
+ };
5143
+ type GetPublicProductErrors = {
5144
+ /**
5145
+ * Product not found
5146
+ */
5147
+ 404: Error;
5148
+ };
5149
+ type GetPublicProductError = GetPublicProductErrors[keyof GetPublicProductErrors];
5150
+ type GetPublicProductResponses = {
5151
+ /**
5152
+ * Public product configuration
5153
+ */
5154
+ 200: PublicProduct & {
5155
+ /**
5156
+ * False exactly when the product has variant rows but none is active (sold out / all disabled) — render a disabled buy button; checkout would 409. True for legacy no-variant products and products with at least one active variant.
5157
+ */
5158
+ purchasable: boolean;
5159
+ };
5160
+ };
5161
+ type GetPublicProductResponse = GetPublicProductResponses[keyof GetPublicProductResponses];
5162
+ type CreateCheckoutData = {
5163
+ body: CheckoutRequest;
5164
+ path: {
5165
+ productId: string;
5166
+ };
5167
+ query?: never;
5168
+ url: "/v1/p/{productId}/checkout";
5169
+ };
5170
+ type CreateCheckoutErrors = {
5171
+ /**
5172
+ * Invalid request (bad quantity/amount/metadata/urls/email, or non-JSON body)
5173
+ */
5174
+ 400: Error;
5175
+ /**
5176
+ * Product not found (unknown or deleted)
5177
+ */
5178
+ 404: Error;
5179
+ /**
5180
+ * Product/variant inactive, insufficient stock for the requested quantity, the store can't accept payments right now, a subscription-only product bought with no plan_id (code subscription_required) — or, when expectation fields were sent and the price moved, error 'price_changed' with current_unit_amount and currency alongside it
5181
+ */
5182
+ 409: Error;
5183
+ /**
5184
+ * Too many requests from this IP — retry shortly
5185
+ */
5186
+ 429: Error;
5187
+ /**
5188
+ * Stripe rejected or failed the session creation
5189
+ */
5190
+ 502: Error;
5191
+ };
5192
+ type CreateCheckoutError = CreateCheckoutErrors[keyof CreateCheckoutErrors];
5193
+ type CreateCheckoutResponses = {
5194
+ /**
5195
+ * Checkout session created — redirect the buyer to url
5196
+ */
5197
+ 200: CheckoutResult;
5198
+ };
5199
+ type CreateCheckoutResponse = CreateCheckoutResponses[keyof CreateCheckoutResponses];
5200
+ type CreateCartCheckoutData = {
5201
+ body: CartCheckoutRequest;
5202
+ path?: never;
5203
+ query?: never;
5204
+ url: "/v1/p/checkout";
5205
+ };
5206
+ type CreateCartCheckoutErrors = {
5207
+ /**
5208
+ * Structural or validation failure (see the `code` values), or invalid urls/email/metadata
5209
+ */
5210
+ 400: Error & {
5211
+ /**
5212
+ * Machine-readable failure code: invalid_items, too_many_items, invalid_variant_id, duplicate_variant, invalid_quantity, custom_amount_not_allowed, cross_site_items, multiple_redirects, mixed_currency, or preview_domain. Absent on plain validation messages (URLs, email, metadata).
5213
+ */
5214
+ code?: string;
5215
+ };
5216
+ /**
5217
+ * cart_conflict carrying every currently-known per-line conflict — including `subscription_only` for a line the merchant sells on a plan only (the cart has no plan support) — shipping_option_unavailable when the buyer's chosen postage no longer exists, or the store can't accept payments right now
5218
+ */
5219
+ 409: CartConflict | ShippingOptionUnavailable | Error;
5220
+ /**
5221
+ * Too many requests from this IP — retry shortly
5222
+ */
5223
+ 429: Error;
5224
+ /**
5225
+ * Stripe rejected or failed the session creation
5226
+ */
5227
+ 502: Error;
5228
+ };
5229
+ type CreateCartCheckoutError = CreateCartCheckoutErrors[keyof CreateCartCheckoutErrors];
5230
+ type CreateCartCheckoutResponses = {
5231
+ /**
5232
+ * Checkout session created — redirect the buyer to url
5233
+ */
5234
+ 200: CheckoutResult;
5235
+ };
5236
+ type CreateCartCheckoutResponse = CreateCartCheckoutResponses[keyof CreateCartCheckoutResponses];
5237
+ type GetCartSummaryData = {
5238
+ body: CartSummaryRequest;
5239
+ path?: never;
5240
+ query?: never;
5241
+ url: "/v1/p/checkout/summary";
5242
+ };
5243
+ type GetCartSummaryErrors = {
5244
+ /**
5245
+ * Structural failure: invalid_items, too_many_items, invalid_variant_id, invalid_quantity, or cross_site_items
5246
+ */
5247
+ 400: Error & {
5248
+ /**
5249
+ * Machine-readable failure code: invalid_items, too_many_items, invalid_variant_id, duplicate_variant, invalid_quantity, custom_amount_not_allowed, cross_site_items, multiple_redirects, mixed_currency, or preview_domain. Absent on plain validation messages (URLs, email, metadata).
5250
+ */
5251
+ code?: string;
5252
+ };
5253
+ /**
5254
+ * The cart cannot be priced — the store's shipping configuration is unreadable, or the lines do not share one currency. Show no total rather than a wrong one.
5255
+ */
5256
+ 409: Error;
5257
+ /**
5258
+ * Too many requests from this IP — retry shortly
5259
+ */
5260
+ 429: Error;
5261
+ };
5262
+ type GetCartSummaryError = GetCartSummaryErrors[keyof GetCartSummaryErrors];
5263
+ type GetCartSummaryResponses = {
5264
+ /**
5265
+ * The priced cart
5266
+ */
5267
+ 200: CartSummaryResult;
5268
+ };
5269
+ type GetCartSummaryResponse = GetCartSummaryResponses[keyof GetCartSummaryResponses];
5270
+ type GetOrderSessionData = {
5271
+ body?: never;
5272
+ path: {
5273
+ sessionId: string;
5274
+ };
5275
+ query?: never;
5276
+ url: "/v1/o/session/{sessionId}";
5277
+ };
5278
+ type GetOrderSessionErrors = {
5279
+ /**
5280
+ * No order for this checkout session
5281
+ */
5282
+ 404: Error;
5283
+ };
5284
+ type GetOrderSessionError = GetOrderSessionErrors[keyof GetOrderSessionErrors];
5285
+ type GetOrderSessionResponses = {
3848
5286
  /**
3849
5287
  * Order status and fulfillment pointers
3850
5288
  */
3851
- 200: OrderSessionStatus;
5289
+ 200: OrderSessionStatus;
5290
+ };
5291
+ type GetOrderSessionResponse = GetOrderSessionResponses[keyof GetOrderSessionResponses];
5292
+ type DownloadFileData = {
5293
+ body?: never;
5294
+ path: {
5295
+ token: string;
5296
+ };
5297
+ query?: {
5298
+ /**
5299
+ * Index of the line to download (position in the order's line_items — the same index /v1/o/session `files` entries carry). Omit for single-download orders; on multi-download orders the bare URL renders the file list.
5300
+ */
5301
+ file?: string;
5302
+ };
5303
+ url: "/v1/d/{token}";
5304
+ };
5305
+ type DownloadFileErrors = {
5306
+ /**
5307
+ * Download revoked (order refunded/disputed) or link expired — HTML error page
5308
+ */
5309
+ 403: string;
5310
+ /**
5311
+ * Unknown token (rendered identically to revoked) — HTML error page
5312
+ */
5313
+ 404: string;
5314
+ /**
5315
+ * Download limit reached for this order — HTML error page
5316
+ */
5317
+ 429: string;
5318
+ };
5319
+ type DownloadFileError = DownloadFileErrors[keyof DownloadFileErrors];
5320
+ type DownloadFileResponses = {
5321
+ /**
5322
+ * The purchased file, served as an attachment (Content-Disposition: attachment) — or, for a multi-download order with no ?file selected, the HTML file-list page
5323
+ */
5324
+ 200: Blob | File;
5325
+ };
5326
+ type DownloadFileResponse = DownloadFileResponses[keyof DownloadFileResponses];
5327
+ type GetGeoData = {
5328
+ body?: never;
5329
+ path?: never;
5330
+ query?: never;
5331
+ url: "/v1/geo";
5332
+ };
5333
+ type GetGeoResponses = {
5334
+ /**
5335
+ * The visitor's country, or null
5336
+ */
5337
+ 200: GeoSuggestion;
5338
+ };
5339
+ type GetGeoResponse = GetGeoResponses[keyof GetGeoResponses];
5340
+ type AccountLoginData = {
5341
+ body: AccountLoginRequest;
5342
+ path?: never;
5343
+ query?: never;
5344
+ url: "/v1/account/login";
5345
+ };
5346
+ type AccountLoginErrors = {
5347
+ /**
5348
+ * Missing or malformed email
5349
+ */
5350
+ 400: Error;
5351
+ /**
5352
+ * Too many requests from this IP
5353
+ */
5354
+ 429: Error;
5355
+ /**
5356
+ * The send could not be recorded (database unavailable). Deliberately NOT folded into the uniform 200: this outcome is identical for every address on every site, so it discloses nothing, and answering ok would leave the buyer watching an inbox nothing is coming to. Safe to retry.
5357
+ */
5358
+ 500: Error;
5359
+ };
5360
+ type AccountLoginError = AccountLoginErrors[keyof AccountLoginErrors];
5361
+ type AccountLoginResponses = {
5362
+ /**
5363
+ * Accepted — a link may or may not have been sent (uniform by design)
5364
+ */
5365
+ 200: AccountLoginResult;
5366
+ };
5367
+ type AccountLoginResponse = AccountLoginResponses[keyof AccountLoginResponses];
5368
+ type AccountVerifyData = {
5369
+ body: AccountVerifyRequest;
5370
+ path?: never;
5371
+ query?: never;
5372
+ url: "/v1/account/verify";
5373
+ };
5374
+ type AccountVerifyErrors = {
5375
+ /**
5376
+ * Missing or malformed body
5377
+ */
5378
+ 400: Error;
5379
+ /**
5380
+ * Unknown, expired or already-used code (code invalid_code)
5381
+ */
5382
+ 401: Error;
5383
+ /**
5384
+ * Too many attempts from this IP
5385
+ */
5386
+ 429: Error;
5387
+ };
5388
+ type AccountVerifyError = AccountVerifyErrors[keyof AccountVerifyErrors];
5389
+ type AccountVerifyResponses = {
5390
+ /**
5391
+ * Signed in
5392
+ */
5393
+ 200: AccountVerifyResult;
5394
+ };
5395
+ type AccountVerifyResponse = AccountVerifyResponses[keyof AccountVerifyResponses];
5396
+ type AccountLogoutData = {
5397
+ body?: never;
5398
+ path?: never;
5399
+ query?: never;
5400
+ url: "/v1/account/logout";
5401
+ };
5402
+ type AccountLogoutErrors = {
5403
+ /**
5404
+ * Session expired (code session_expired)
5405
+ */
5406
+ 401: Error;
5407
+ /**
5408
+ * Wrong origin for this session (code origin_mismatch)
5409
+ */
5410
+ 403: Error;
5411
+ };
5412
+ type AccountLogoutError = AccountLogoutErrors[keyof AccountLogoutErrors];
5413
+ type AccountLogoutResponses = {
5414
+ /**
5415
+ * Signed out
5416
+ */
5417
+ 200: AccountLogoutResult;
5418
+ };
5419
+ type AccountLogoutResponse = AccountLogoutResponses[keyof AccountLogoutResponses];
5420
+ type AccountMeData = {
5421
+ body?: never;
5422
+ path?: never;
5423
+ query?: never;
5424
+ url: "/v1/account/me";
5425
+ };
5426
+ type AccountMeErrors = {
5427
+ /**
5428
+ * Session expired (code session_expired)
5429
+ */
5430
+ 401: Error;
5431
+ /**
5432
+ * Wrong origin for this session (code origin_mismatch)
5433
+ */
5434
+ 403: Error;
5435
+ };
5436
+ type AccountMeError = AccountMeErrors[keyof AccountMeErrors];
5437
+ type AccountMeResponses = {
5438
+ /**
5439
+ * The account shelf
5440
+ */
5441
+ 200: AccountMeResult;
5442
+ };
5443
+ type AccountMeResponse = AccountMeResponses[keyof AccountMeResponses];
5444
+ type AccountSubscribeData = {
5445
+ body: AccountSubscribeRequest;
5446
+ path?: never;
5447
+ query?: never;
5448
+ url: "/v1/account/subscribe";
5449
+ };
5450
+ type AccountSubscribeErrors = {
5451
+ /**
5452
+ * Invalid request (urls, variant, body shape)
5453
+ */
5454
+ 400: Error;
5455
+ /**
5456
+ * Session expired — sign in again (code session_expired)
5457
+ */
5458
+ 401: Error;
5459
+ /**
5460
+ * Wrong origin for this session (code origin_mismatch), or an editor preview session (code preview_session)
5461
+ */
5462
+ 403: Error;
5463
+ /**
5464
+ * Product not found on this site
5465
+ */
5466
+ 404: Error;
5467
+ /**
5468
+ * Plan/store not available (plan_not_available, subscription_not_ready, plan_currency_mismatch, store disabled)
5469
+ */
5470
+ 409: Error;
5471
+ /**
5472
+ * Too many requests from this IP
5473
+ */
5474
+ 429: Error;
5475
+ /**
5476
+ * Stripe rejected or failed the session creation
5477
+ */
5478
+ 502: Error;
5479
+ };
5480
+ type AccountSubscribeError = AccountSubscribeErrors[keyof AccountSubscribeErrors];
5481
+ type AccountSubscribeResponses = {
5482
+ /**
5483
+ * Checkout session created — redirect the buyer to url
5484
+ */
5485
+ 200: CheckoutResult;
5486
+ };
5487
+ type AccountSubscribeResponse = AccountSubscribeResponses[keyof AccountSubscribeResponses];
5488
+ type AccountCancelSubscriptionData = {
5489
+ body?: never;
5490
+ path: {
5491
+ subscriptionId: string;
5492
+ };
5493
+ query?: never;
5494
+ url: "/v1/account/subscriptions/{subscriptionId}/cancel";
5495
+ };
5496
+ type AccountCancelSubscriptionErrors = {
5497
+ /**
5498
+ * Session expired (code session_expired)
5499
+ */
5500
+ 401: Error;
5501
+ /**
5502
+ * Not this customer's subscription on this site
5503
+ */
5504
+ 404: Error;
5505
+ /**
5506
+ * Already ended (code ended)
5507
+ */
5508
+ 409: Error;
5509
+ /**
5510
+ * Too many requests from this IP
5511
+ */
5512
+ 429: Error;
5513
+ /**
5514
+ * Stripe failure — retry
5515
+ */
5516
+ 502: Error;
5517
+ };
5518
+ type AccountCancelSubscriptionError = AccountCancelSubscriptionErrors[keyof AccountCancelSubscriptionErrors];
5519
+ type AccountCancelSubscriptionResponses = {
5520
+ /**
5521
+ * Cancellation scheduled
5522
+ */
5523
+ 200: SubscriberActionResult;
5524
+ };
5525
+ type AccountCancelSubscriptionResponse = AccountCancelSubscriptionResponses[keyof AccountCancelSubscriptionResponses];
5526
+ type AccountReactivateSubscriptionData = {
5527
+ body?: never;
5528
+ path: {
5529
+ subscriptionId: string;
5530
+ };
5531
+ query?: never;
5532
+ url: "/v1/account/subscriptions/{subscriptionId}/reactivate";
5533
+ };
5534
+ type AccountReactivateSubscriptionErrors = {
5535
+ /**
5536
+ * Session expired (code session_expired)
5537
+ */
5538
+ 401: Error;
5539
+ /**
5540
+ * Not this customer's subscription on this site
5541
+ */
5542
+ 404: Error;
5543
+ /**
5544
+ * Ended — cannot be reactivated (code ended)
5545
+ */
5546
+ 409: Error;
5547
+ /**
5548
+ * Too many requests from this IP
5549
+ */
5550
+ 429: Error;
5551
+ /**
5552
+ * Stripe failure — retry
5553
+ */
5554
+ 502: Error;
5555
+ };
5556
+ type AccountReactivateSubscriptionError = AccountReactivateSubscriptionErrors[keyof AccountReactivateSubscriptionErrors];
5557
+ type AccountReactivateSubscriptionResponses = {
5558
+ /**
5559
+ * Subscription will continue
5560
+ */
5561
+ 200: SubscriberActionResult;
5562
+ };
5563
+ type AccountReactivateSubscriptionResponse = AccountReactivateSubscriptionResponses[keyof AccountReactivateSubscriptionResponses];
5564
+ type AccountUpdateSubscriptionAddressData = {
5565
+ body: UpdateSubscriptionAddressRequest;
5566
+ path: {
5567
+ subscriptionId: string;
5568
+ };
5569
+ query?: never;
5570
+ url: "/v1/account/subscriptions/{subscriptionId}/address";
5571
+ };
5572
+ type AccountUpdateSubscriptionAddressErrors = {
5573
+ /**
5574
+ * Invalid address shape
5575
+ */
5576
+ 400: Error;
5577
+ /**
5578
+ * Session expired (code session_expired)
5579
+ */
5580
+ 401: Error;
5581
+ /**
5582
+ * Not this customer's subscription on this site
5583
+ */
5584
+ 404: Error;
5585
+ /**
5586
+ * Too many requests from this IP
5587
+ */
5588
+ 429: Error;
3852
5589
  };
3853
- type GetOrderSessionResponse = GetOrderSessionResponses[keyof GetOrderSessionResponses];
3854
- type DownloadFileData = {
5590
+ type AccountUpdateSubscriptionAddressError = AccountUpdateSubscriptionAddressErrors[keyof AccountUpdateSubscriptionAddressErrors];
5591
+ type AccountUpdateSubscriptionAddressResponses = {
5592
+ /**
5593
+ * Address updated
5594
+ */
5595
+ 200: SubscriberActionResult;
5596
+ };
5597
+ type AccountUpdateSubscriptionAddressResponse = AccountUpdateSubscriptionAddressResponses[keyof AccountUpdateSubscriptionAddressResponses];
5598
+ type AccountCreatePortalSessionData = {
3855
5599
  body?: never;
3856
5600
  path: {
3857
- token: string;
3858
- };
3859
- query?: {
3860
- /**
3861
- * Index of the line to download (position in the order's line_items — the same index /v1/o/session `files` entries carry). Omit for single-download orders; on multi-download orders the bare URL renders the file list.
3862
- */
3863
- file?: string;
5601
+ subscriptionId: string;
3864
5602
  };
3865
- url: "/v1/d/{token}";
5603
+ query?: never;
5604
+ url: "/v1/account/subscriptions/{subscriptionId}/portal-session";
3866
5605
  };
3867
- type DownloadFileErrors = {
5606
+ type AccountCreatePortalSessionErrors = {
3868
5607
  /**
3869
- * Download revoked (order refunded/disputed) or link expired — HTML error page
5608
+ * Session expired (code session_expired)
3870
5609
  */
3871
- 403: string;
5610
+ 401: Error;
3872
5611
  /**
3873
- * Unknown token (rendered identically to revoked) — HTML error page
5612
+ * Not this customer's subscription on this site
3874
5613
  */
3875
- 404: string;
5614
+ 404: Error;
3876
5615
  /**
3877
- * Download limit reached for this order — HTML error page
5616
+ * Too many requests from this IP
3878
5617
  */
3879
- 429: string;
5618
+ 429: Error;
5619
+ /**
5620
+ * Card update temporarily unavailable (code portal_unavailable)
5621
+ */
5622
+ 503: Error;
3880
5623
  };
3881
- type DownloadFileError = DownloadFileErrors[keyof DownloadFileErrors];
3882
- type DownloadFileResponses = {
5624
+ type AccountCreatePortalSessionError = AccountCreatePortalSessionErrors[keyof AccountCreatePortalSessionErrors];
5625
+ type AccountCreatePortalSessionResponses = {
3883
5626
  /**
3884
- * The purchased file, served as an attachment (Content-Disposition: attachment) — or, for a multi-download order with no ?file selected, the HTML file-list page
5627
+ * Portal session created
3885
5628
  */
3886
- 200: Blob | File;
5629
+ 200: PortalSessionResult;
3887
5630
  };
3888
- type DownloadFileResponse = DownloadFileResponses[keyof DownloadFileResponses];
3889
- type GetGeoData = {
5631
+ type AccountCreatePortalSessionResponse = AccountCreatePortalSessionResponses[keyof AccountCreatePortalSessionResponses];
5632
+ type AccountManageVerifyData = {
5633
+ body: ManageVerifyRequest;
5634
+ path?: never;
5635
+ query?: never;
5636
+ url: "/v1/account/manage/verify";
5637
+ };
5638
+ type AccountManageVerifyErrors = {
5639
+ /**
5640
+ * Invalid or expired code (code invalid_code)
5641
+ */
5642
+ 400: Error;
5643
+ /**
5644
+ * Too many requests from this IP
5645
+ */
5646
+ 429: Error;
5647
+ };
5648
+ type AccountManageVerifyError = AccountManageVerifyErrors[keyof AccountManageVerifyErrors];
5649
+ type AccountManageVerifyResponses = {
5650
+ /**
5651
+ * Grant token minted
5652
+ */
5653
+ 200: ManageVerifyResult;
5654
+ };
5655
+ type AccountManageVerifyResponse = AccountManageVerifyResponses[keyof AccountManageVerifyResponses];
5656
+ type AccountManageGetSubscriptionData = {
3890
5657
  body?: never;
3891
5658
  path?: never;
3892
5659
  query?: never;
3893
- url: "/v1/geo";
5660
+ url: "/v1/account/manage/subscription";
3894
5661
  };
3895
- type GetGeoResponses = {
5662
+ type AccountManageGetSubscriptionErrors = {
3896
5663
  /**
3897
- * The visitor's country, or null
5664
+ * Manage link invalid or expired (code manage_expired)
3898
5665
  */
3899
- 200: GeoSuggestion;
5666
+ 401: Error;
5667
+ /**
5668
+ * Wrong origin for this grant (code origin_mismatch)
5669
+ */
5670
+ 403: Error;
5671
+ /**
5672
+ * Too many requests from this IP
5673
+ */
5674
+ 429: Error;
3900
5675
  };
3901
- type GetGeoResponse = GetGeoResponses[keyof GetGeoResponses];
5676
+ type AccountManageGetSubscriptionError = AccountManageGetSubscriptionErrors[keyof AccountManageGetSubscriptionErrors];
5677
+ type AccountManageGetSubscriptionResponses = {
5678
+ /**
5679
+ * The granted subscription
5680
+ */
5681
+ 200: ManagedSubscriptionResult;
5682
+ };
5683
+ type AccountManageGetSubscriptionResponse = AccountManageGetSubscriptionResponses[keyof AccountManageGetSubscriptionResponses];
5684
+ type AccountManageCancelData = {
5685
+ body?: never;
5686
+ path?: never;
5687
+ query?: never;
5688
+ url: "/v1/account/manage/cancel";
5689
+ };
5690
+ type AccountManageCancelErrors = {
5691
+ /**
5692
+ * Manage link invalid or expired (code manage_expired)
5693
+ */
5694
+ 401: Error;
5695
+ /**
5696
+ * Already ended (code ended)
5697
+ */
5698
+ 409: Error;
5699
+ /**
5700
+ * Too many requests from this IP
5701
+ */
5702
+ 429: Error;
5703
+ /**
5704
+ * Stripe failure — retry
5705
+ */
5706
+ 502: Error;
5707
+ };
5708
+ type AccountManageCancelError = AccountManageCancelErrors[keyof AccountManageCancelErrors];
5709
+ type AccountManageCancelResponses = {
5710
+ /**
5711
+ * Cancellation scheduled
5712
+ */
5713
+ 200: ManageCancelResult;
5714
+ };
5715
+ type AccountManageCancelResponse = AccountManageCancelResponses[keyof AccountManageCancelResponses];
5716
+ type AccountManagePortalSessionData = {
5717
+ body?: never;
5718
+ path?: never;
5719
+ query?: never;
5720
+ url: "/v1/account/manage/portal-session";
5721
+ };
5722
+ type AccountManagePortalSessionErrors = {
5723
+ /**
5724
+ * Manage link invalid or expired (code manage_expired)
5725
+ */
5726
+ 401: Error;
5727
+ /**
5728
+ * Too many requests from this IP
5729
+ */
5730
+ 429: Error;
5731
+ /**
5732
+ * Card update temporarily unavailable (code portal_unavailable)
5733
+ */
5734
+ 503: Error;
5735
+ };
5736
+ type AccountManagePortalSessionError = AccountManagePortalSessionErrors[keyof AccountManagePortalSessionErrors];
5737
+ type AccountManagePortalSessionResponses = {
5738
+ /**
5739
+ * Portal session created
5740
+ */
5741
+ 200: PortalSessionResult;
5742
+ };
5743
+ type AccountManagePortalSessionResponse = AccountManagePortalSessionResponses[keyof AccountManagePortalSessionResponses];
5744
+ type ResolveManageLinkData = {
5745
+ body?: never;
5746
+ path: {
5747
+ token: string;
5748
+ };
5749
+ query?: never;
5750
+ url: "/v1/m/{token}";
5751
+ };
5752
+ type ResolveManageLinkErrors = {
5753
+ /**
5754
+ * Unknown or expired link (rendered identically) — HTML page
5755
+ */
5756
+ 404: string;
5757
+ /**
5758
+ * Rate limited — HTML page
5759
+ */
5760
+ 429: string;
5761
+ /**
5762
+ * Temporarily unavailable (inert page, no controls)
5763
+ */
5764
+ 503: string;
5765
+ };
5766
+ type ResolveManageLinkError = ResolveManageLinkErrors[keyof ResolveManageLinkErrors];
5767
+ type ResolveManageLinkResponses = {
5768
+ /**
5769
+ * Platform fallback manage page
5770
+ */
5771
+ 200: string;
5772
+ };
5773
+ type ResolveManageLinkResponse = ResolveManageLinkResponses[keyof ResolveManageLinkResponses];
5774
+ type ActOnManageLinkData = {
5775
+ body: ManageLinkAction;
5776
+ path: {
5777
+ token: string;
5778
+ };
5779
+ query?: never;
5780
+ url: "/v1/m/{token}";
5781
+ };
5782
+ type ActOnManageLinkErrors = {
5783
+ /**
5784
+ * Unknown action or unreadable form body — HTML page, nothing changed
5785
+ */
5786
+ 400: string;
5787
+ /**
5788
+ * Unknown/expired token, or a hidden token that does not match the path (rendered identically) — HTML page
5789
+ */
5790
+ 404: string;
5791
+ /**
5792
+ * Rate limited — HTML page
5793
+ */
5794
+ 429: string;
5795
+ /**
5796
+ * Stripe refused the action — HTML page, nothing changed
5797
+ */
5798
+ 502: string;
5799
+ /**
5800
+ * Temporarily unavailable (inert page, no controls)
5801
+ */
5802
+ 503: string;
5803
+ };
5804
+ type ActOnManageLinkError = ActOnManageLinkErrors[keyof ActOnManageLinkErrors];
5805
+ type ActOnManageLinkResponses = {
5806
+ /**
5807
+ * The resulting manage page (status view, cancel confirmation, or cancel receipt)
5808
+ */
5809
+ 200: string;
5810
+ };
5811
+ type ActOnManageLinkResponse = ActOnManageLinkResponses[keyof ActOnManageLinkResponses];
3902
5812
 
3903
5813
  type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options$1<TData, ThrowOnError> & {
3904
5814
  /**
@@ -3919,6 +5829,12 @@ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean
3919
5829
  * Pushes Stripe Connect account readiness to a site. Requires an organization API key (sk_xxx) — site tokens are explicitly rejected because this endpoint can repoint payouts.
3920
5830
  */
3921
5831
  declare const updateSitePayments: <ThrowOnError extends boolean = false>(options: Options<UpdateSitePaymentsData, ThrowOnError>) => RequestResult<UpdateSitePaymentsResponses, UpdateSitePaymentsErrors, ThrowOnError, "fields">;
5832
+ /**
5833
+ * Set /account route readiness (org key only)
5834
+ *
5835
+ * Records whether the published site structurally serves /account — the gate subscription checkout and the public payload's subscription.ready flag key on. Called by the publish flow (and the bootstrap runbook). Requires an organization API key (sk_xxx); site tokens are rejected — this flag can silently stop a live subscription store, so it is platform-controlled. Clearing it while the site has active subscription plans or live subscriptions fires an operator alert. `ready: true` additionally requires the customer-account surface to be enabled (409 code account_surface_disabled otherwise) — it opens subscription sales, and selling into a dark account surface leaves buyers charged with nowhere to manage it. `ready: false` is never gated.
5836
+ */
5837
+ declare const updateSiteAccountRoute: <ThrowOnError extends boolean = false>(options: Options<UpdateSiteAccountRouteData, ThrowOnError>) => RequestResult<UpdateSiteAccountRouteResponses, UpdateSiteAccountRouteErrors, ThrowOnError, "fields">;
3922
5838
  /**
3923
5839
  * Get payment readiness (site token)
3924
5840
  *
@@ -3973,12 +5889,24 @@ declare const updateProduct: <ThrowOnError extends boolean = false>(options: Opt
3973
5889
  * Attaches a downloadable file to a product, either as a multipart upload (field: file) or by fetching a https source_url server-side. Max 50 MB; pdf/zip/epub/image/audio/video types only. Each attach writes a fresh storage key — previously attached files are never overwritten.
3974
5890
  */
3975
5891
  declare const attachProductFile: <ThrowOnError extends boolean = false>(options: Options<AttachProductFileData, ThrowOnError>) => RequestResult<AttachProductFileResponses, AttachProductFileErrors, ThrowOnError, "fields">;
5892
+ /**
5893
+ * Set a product's subscription plans
5894
+ *
5895
+ * Replaces the product's subscription selling plans transactionally (full desired state — like setProductVariants) and sets whether the product is subscription-only. Works BEFORE the site's payments are active — plans save as a draft exactly like products do, and no Stripe object is created here. Until payments are active (and the published site serves /account) the public payload reports subscription.ready false, so the buy box hides or disables the subscribe path and checkout refuses every purchase; going live is gated at publish, not at this write. Bounds: at most 5 plans; each plan has exactly one of percent_off_bps (0-8000) / unit_amount; interval x interval_count must be 12 months or shorter; every plan's derived recurring price must clear the store currency's minimum charge for EVERY active variant, and absolute prices are sanity-capped at 10x the highest one-time price. An empty plans array with required:false clears subscription config. Existing subscriptions are never touched — they billed on a snapshot taken at signup.
5896
+ */
5897
+ declare const setProductSubscription: <ThrowOnError extends boolean = false>(options: Options<SetProductSubscriptionData, ThrowOnError>) => RequestResult<SetProductSubscriptionResponses, SetProductSubscriptionErrors, ThrowOnError, "fields">;
3976
5898
  /**
3977
5899
  * Create a simulated test purchase
3978
5900
  *
3979
5901
  * Owner-initiated simulated purchase: creates a PAID order flagged is_test — no Stripe, no money — and runs the real pipeline (fulfillment snapshot, download token, [TEST]-labeled emails). The returned session_id drives the site's /order/confirmation page exactly like a real checkout. Test orders never touch inventory, and refunds on them are simulated. Organization API key only.
3980
5902
  */
3981
5903
  declare const createTestOrder: <ThrowOnError extends boolean = false>(options: Options<CreateTestOrderData, ThrowOnError>) => RequestResult<CreateTestOrderResponses, CreateTestOrderErrors, ThrowOnError, "fields">;
5904
+ /**
5905
+ * Create a simulated test subscription signup
5906
+ *
5907
+ * Owner-initiated simulated subscription SIGNUP: mints an is_test subscription plus a PAID is_test signup order — no Stripe, no money — through the same pipeline as test orders (fulfillment snapshot, download token, [TEST]-labeled emails; excluded from outbox, settlement, and the sweeper). The returned session_id drives the site's /order/confirmation page, whose payload carries the subscription's renewal terms. Signup only — renewal, cancel, and reactivate are not simulated here (preview cancel/reactivate exercise the real account endpoints on is_test data). Organization API key only.
5908
+ */
5909
+ declare const createTestSubscription: <ThrowOnError extends boolean = false>(options: Options<CreateTestSubscriptionData, ThrowOnError>) => RequestResult<CreateTestSubscriptionResponses, CreateTestSubscriptionErrors, ThrowOnError, "fields">;
3982
5910
  /**
3983
5911
  * Create a simulated multi-item test purchase
3984
5912
  *
@@ -3997,6 +5925,12 @@ declare const createVariant: <ThrowOnError extends boolean = false>(options: Opt
3997
5925
  * Declarative full-desired-state reconcile of a product's options and variants in ONE atomic operation — the only supported way to grow or drop an option axis on a product that already has variants. `options` and `variants` are the complete post-state: variants with an id survive (coordinates, price, title may change; inventory, order references, and open checkout sessions stay attached), entries without an id are created, and every currently-active variant must appear (kept, changed, or active: false) or the request is rejected naming the missing ids. An existing option omitted from `options` is REMOVED, taking its values and every variant's coordinate on that axis with it; the removal is refused only when it would collapse two ACTIVE variants onto the same combination (deactivate one first). Variants are never hard-deleted — active: false is the removal. Requires `matrix_version` from getProduct; a stale version is a 409 carrying the current matrix. Coordinate changes on surviving axes additionally require `allow_coordinate_changes: true`. Option values carry per-value `images` (the gallery shown when that value is selected, e.g. the Black colorway's model shots): omitted = keep current, [] = clear — storefronts fall back to product.images for values without any. Values also carry an optional `swatch` (a hex colour like `#4A5D23`, or an image URL for a pattern/texture) which renders the value as a colour chip instead of its text: omitted = keep current, null = clear. Note the divergence from `images` — swatch is a single nullable value, so `null` is its clear token, not `[]`.
3998
5926
  */
3999
5927
  declare const setProductVariants: <ThrowOnError extends boolean = false>(options: Options<SetProductVariantsData, ThrowOnError>) => RequestResult<SetProductVariantsResponses, SetProductVariantsErrors, ThrowOnError, "fields">;
5928
+ /**
5929
+ * Generate the missing cells of a variant grid
5930
+ *
5931
+ * Materializes every missing cartesian cell of the declared axes, priced by a rule — ADDITIVE ONLY. Existing variants (active or inactive) are never touched: colliding coordinates are skipped and reported, never adopted, reactivated, or re-priced. Declared axes must cover the product's existing option set; new values on an existing axis are created, but a whole new axis stays on setProductVariants. Requires the current matrix_version; idempotent when re-run against the fresh one.
5932
+ */
5933
+ declare const generateVariants: <ThrowOnError extends boolean = false>(options: Options<GenerateVariantsData, ThrowOnError>) => RequestResult<GenerateVariantsResponses, GenerateVariantsErrors, ThrowOnError, "fields">;
4000
5934
  /**
4001
5935
  * Delete a variant
4002
5936
  *
@@ -4099,6 +6033,12 @@ declare const getCustomer: <ThrowOnError extends boolean = false>(options: Optio
4099
6033
  * Updates a customer name/phone/metadata. Email is immutable (it is the upsert identity).
4100
6034
  */
4101
6035
  declare const updateCustomer: <ThrowOnError extends boolean = false>(options: Options<UpdateCustomerData, ThrowOnError>) => RequestResult<UpdateCustomerResponses, UpdateCustomerErrors, ThrowOnError, "fields">;
6036
+ /**
6037
+ * Burn a customer's account credentials (org key only)
6038
+ *
6039
+ * Invalidates EVERY live credential this customer holds on their site: their storefront sessions, every long-lived `manage` doorway token emailed with their subscription receipts (plus any un-exchanged handoff code), and any magic-link code still sitting unspent in their inbox. This is the kill switch for a leaked or forwarded subscription email — a manage token is multi-use, lives for one billing interval + 30 days, and reads subscriber PII, cancels billing and opens a Stripe card-update portal, so before this endpoint existed nothing in the system could stop one. Rows are STAMPED, never deleted, so the revocation time stays on the record; retention collects them later. Idempotent — a second call reports zeros rather than moving the first stamp. The customer is not otherwise affected: they sign in again with a fresh magic link, and their subscriptions, orders and billing are untouched. Requires an organization API key (sk_xxx); site tokens are rejected, because a site token reaches browsers and the agent runtime.
6040
+ */
6041
+ declare const revokeCustomerAccess: <ThrowOnError extends boolean = false>(options: Options<RevokeCustomerAccessData, ThrowOnError>) => RequestResult<RevokeCustomerAccessResponses, RevokeCustomerAccessErrors, ThrowOnError, "fields">;
4102
6042
  /**
4103
6043
  * One-call business summary (site token, or org key with site_id)
4104
6044
  *
@@ -4135,6 +6075,36 @@ declare const getNextPayout: <ThrowOnError extends boolean = false>(options?: Op
4135
6075
  * Sets/clears merchant_fulfilled_at (+ optional tracking_number) — the merchant's own "I shipped it", ONE flag for the whole order. Allowed while the order is paid, partially_refunded, or disputed (disputed deliberately: dispute evidence wants the tracking number recorded); 409 on pending/failed/expired/refunded. Feeds the Orders view's unfulfilled filter and the needs-attention feed.
4136
6076
  */
4137
6077
  declare const setOrderFulfillment: <ThrowOnError extends boolean = false>(options: Options<SetOrderFulfillmentData, ThrowOnError>) => RequestResult<SetOrderFulfillmentResponses, SetOrderFulfillmentErrors, ThrowOnError, "fields">;
6078
+ /**
6079
+ * List subscriptions (site token, or org key with site_id)
6080
+ *
6081
+ * The site's subscription mirror rows, newest first, paginated. Each row carries BOTH the locked signup amount (plan_amount — the grandfathering record) and the current mirrored recurring amount (current_amount — Dashboard repricing shows up here). Statuses are Stripe's, stored verbatim; render unmodeled values generically. is_test rows are simulator/preview data — badge them and exclude them from revenue.
6082
+ */
6083
+ declare const listSubscriptions: <ThrowOnError extends boolean = false>(options?: Options<ListSubscriptionsData, ThrowOnError>) => RequestResult<ListSubscriptionsResponses, ListSubscriptionsErrors, ThrowOnError, "fields">;
6084
+ /**
6085
+ * Cancel a subscription at period end (org key only)
6086
+ *
6087
+ * Merchant-initiated cancel: sets cancel_at_period_end on the live Stripe subscription (account-scoped) and mirrors it synchronously with canceled_by='merchant' (existing subscriber provenance is preserved). The subscriber keeps access until the period lapses. Requires an organization API key (sk_xxx) — site tokens are explicitly rejected (a browser-held credential must not be able to end a customer's billing). is_test rows branch past Stripe.
6088
+ */
6089
+ declare const cancelSubscription: <ThrowOnError extends boolean = false>(options: Options<CancelSubscriptionData, ThrowOnError>) => RequestResult<CancelSubscriptionResponses, CancelSubscriptionErrors, ThrowOnError, "fields">;
6090
+ /**
6091
+ * Schedule ALL live subscriptions to cancel at period end (org key only)
6092
+ *
6093
+ * Merchant-exit / plan-lapse teardown (R20), idempotent: every active/past_due subscription is LIVE-verified against Stripe first — a row Stripe already shows scheduled to cancel (the subscriber's same-minute cancel; the lagged mirror) is mirrored but NEVER stamped. Only rows this call actually flips get teardown_at AND teardown_reason, which is exactly what makes reactivate-teardown money-safe and targetable. Requires an organization API key (sk_xxx).
6094
+ */
6095
+ declare const teardownSiteSubscriptions: <ThrowOnError extends boolean = false>(options: Options<TeardownSiteSubscriptionsData, ThrowOnError>) => RequestResult<TeardownSiteSubscriptionsResponses, TeardownSiteSubscriptionsErrors, ThrowOnError, "fields">;
6096
+ /**
6097
+ * Undo a teardown for rows IT flipped (org key only)
6098
+ *
6099
+ * Recovery counterpart to teardown: flips cancel_at_period_end back OFF, but ONLY for rows carrying the teardown_at stamp, never lapsed, with NO cancel provenance (a subscriber who canceled themselves is never re-billed by recovery), and live-verified against Stripe before every flip. Clears the stamp on success. Pass `reason` to reverse only the rows THAT teardown stamped — without it a ban reversal also un-cancels rows a plan-lapse teardown legitimately shut off. The body is strict (an unknown key is a 400, never a silent widening to 'reverse everything') and the response ECHOES the applied filter as `reason` — assert it matches what you sent. Requires an organization API key (sk_xxx).
6100
+ */
6101
+ declare const reactivateSiteSubscriptionsTeardown: <ThrowOnError extends boolean = false>(options: Options<ReactivateSiteSubscriptionsTeardownData, ThrowOnError>) => RequestResult<ReactivateSiteSubscriptionsTeardownResponses, ReactivateSiteSubscriptionsTeardownErrors, ThrowOnError, "fields">;
6102
+ /**
6103
+ * Mint an editor preview account session (org key only)
6104
+ *
6105
+ * Mints an is_preview customer session for the editor's account-page preview (R10): real session row, served ONLY is_test data, fixed 12-hour expiry (no sliding), refused by every checkout-creating path, and accepted only from the site's own preview host or an editor origin — never the public custom domain. A customers row is created/reused for (site, email). Requires an organization API key (sk_xxx); site tokens are rejected because a leaked editor credential must not mint bearer sessions.
6106
+ */
6107
+ declare const createPreviewSession: <ThrowOnError extends boolean = false>(options: Options<CreatePreviewSessionData, ThrowOnError>) => RequestResult<CreatePreviewSessionResponses, CreatePreviewSessionErrors, ThrowOnError, "fields">;
4138
6108
  /**
4139
6109
  * List all forms (site token)
4140
6110
  *
@@ -4249,6 +6219,92 @@ declare const getSubmission: <ThrowOnError extends boolean = false>(options: Opt
4249
6219
  * Downloads a file attachment from a submission. The path token is resolved as an attachment id first (see the Attachment schema `id` field), then as a filename for submissions created before attachments carried ids. Filename resolution returns the first match when several attachments share a name; unmatched tokens return 404. Returns the file with appropriate Content-Type and Content-Disposition headers.
4250
6220
  */
4251
6221
  declare const downloadAttachment: <ThrowOnError extends boolean = false>(options: Options<DownloadAttachmentData, ThrowOnError>) => RequestResult<DownloadAttachmentResponses, DownloadAttachmentErrors, ThrowOnError, "fields">;
6222
+ /**
6223
+ * List event destinations for a site
6224
+ *
6225
+ * Lists the site's outbound webhook destinations. Signing secrets are never returned here — they are shown once at creation and once per rotation.
6226
+ */
6227
+ declare const listEventDestinations: <ThrowOnError extends boolean = false>(options: Options<ListEventDestinationsData, ThrowOnError>) => RequestResult<ListEventDestinationsResponses, ListEventDestinationsErrors, ThrowOnError, "fields">;
6228
+ /**
6229
+ * Create an event destination
6230
+ *
6231
+ * Creates a webhook destination. Deliveries are signed per the Standard Webhooks spec (webhook-id / webhook-timestamp / webhook-signature) and the body is a CloudEvents 1.0 envelope. The signing secret is not returned here — read it from the /secret endpoint whenever you need it.
6232
+ */
6233
+ declare const createEventDestination: <ThrowOnError extends boolean = false>(options: Options<CreateEventDestinationData, ThrowOnError>) => RequestResult<CreateEventDestinationResponses, CreateEventDestinationErrors, ThrowOnError, "fields">;
6234
+ /**
6235
+ * Delete an event destination
6236
+ *
6237
+ * Deletes the destination and its delivery history. Undelivered events for it stop being retried.
6238
+ */
6239
+ declare const deleteEventDestination: <ThrowOnError extends boolean = false>(options: Options<DeleteEventDestinationData, ThrowOnError>) => RequestResult<DeleteEventDestinationResponses, DeleteEventDestinationErrors, ThrowOnError, "fields">;
6240
+ /**
6241
+ * Get an event destination
6242
+ */
6243
+ declare const getEventDestination: <ThrowOnError extends boolean = false>(options: Options<GetEventDestinationData, ThrowOnError>) => RequestResult<GetEventDestinationResponses, GetEventDestinationErrors, ThrowOnError, "fields">;
6244
+ /**
6245
+ * Update an event destination
6246
+ *
6247
+ * Changes the URL, the subscribed topics, or the status. Setting status back to 'active' re-enables a destination that was auto-disabled after repeated failures and clears its failure counter. api_version is immutable by design.
6248
+ */
6249
+ declare const updateEventDestination: <ThrowOnError extends boolean = false>(options: Options<UpdateEventDestinationData, ThrowOnError>) => RequestResult<UpdateEventDestinationResponses, UpdateEventDestinationErrors, ThrowOnError, "fields">;
6250
+ /**
6251
+ * Rotate a destination's signing secret
6252
+ *
6253
+ * Issues a new signing secret, replacing the old one. There is no overlap window: deliveries in flight at the moment of rotation are signed with whichever secret is current when each attempt runs, so update the consumer promptly. Read the new value from the /secret endpoint.
6254
+ */
6255
+ declare const rotateEventDestinationSecret: <ThrowOnError extends boolean = false>(options: Options<RotateEventDestinationSecretData, ThrowOnError>) => RequestResult<RotateEventDestinationSecretResponses, RotateEventDestinationSecretErrors, ThrowOnError, "fields">;
6256
+ /**
6257
+ * Read a destination's signing secret
6258
+ *
6259
+ * Returns the current signing secret. Deliberately re-readable rather than shown once: using it is OPTIONAL (an endpoint that skips verification works fine), so forcing a copy-it-now moment on every merchant would be a task most of them do not need. Anyone who can call this can already read the site's submissions and rotate this secret, so re-readability grants no access it does not already have. Rotate to invalidate.
6260
+ */
6261
+ declare const getEventDestinationSecret: <ThrowOnError extends boolean = false>(options: Options<GetEventDestinationSecretData, ThrowOnError>) => RequestResult<GetEventDestinationSecretResponses, GetEventDestinationSecretErrors, ThrowOnError, "fields">;
6262
+ /**
6263
+ * List recent deliveries for a destination
6264
+ *
6265
+ * The delivery log, newest first — what was sent, when, the HTTP status, and the error if it failed.
6266
+ */
6267
+ declare const listEventDeliveries: <ThrowOnError extends boolean = false>(options: Options<ListEventDeliveriesData, ThrowOnError>) => RequestResult<ListEventDeliveriesResponses, ListEventDeliveriesErrors, ThrowOnError, "fields">;
6268
+ /**
6269
+ * Retry one delivery now
6270
+ *
6271
+ * Re-sends the stored payload immediately, byte-identical to the original, so the consumer sees the same webhook-id and can deduplicate. Resets the attempt budget for that delivery. Works on delivered rows too, for replaying into a rebuilt consumer.
6272
+ */
6273
+ declare const retryEventDelivery: <ThrowOnError extends boolean = false>(options: Options<RetryEventDeliveryData, ThrowOnError>) => RequestResult<RetryEventDeliveryResponses, RetryEventDeliveryErrors, ThrowOnError, "fields">;
6274
+ /**
6275
+ * List event destinations (site token)
6276
+ */
6277
+ declare const listEventDestinationsWithSiteToken: <ThrowOnError extends boolean = false>(options?: Options<ListEventDestinationsWithSiteTokenData, ThrowOnError>) => RequestResult<ListEventDestinationsWithSiteTokenResponses, ListEventDestinationsWithSiteTokenErrors, ThrowOnError, "fields">;
6278
+ /**
6279
+ * Create an event destination (site token)
6280
+ *
6281
+ * Creates a webhook destination for the site the token belongs to. The signing secret is returned ONCE.
6282
+ */
6283
+ declare const createEventDestinationWithSiteToken: <ThrowOnError extends boolean = false>(options: Options<CreateEventDestinationWithSiteTokenData, ThrowOnError>) => RequestResult<CreateEventDestinationWithSiteTokenResponses, CreateEventDestinationWithSiteTokenErrors, ThrowOnError, "fields">;
6284
+ /**
6285
+ * Delete an event destination (site token)
6286
+ */
6287
+ declare const deleteEventDestinationWithSiteToken: <ThrowOnError extends boolean = false>(options: Options<DeleteEventDestinationWithSiteTokenData, ThrowOnError>) => RequestResult<DeleteEventDestinationWithSiteTokenResponses, DeleteEventDestinationWithSiteTokenErrors, ThrowOnError, "fields">;
6288
+ /**
6289
+ * Update an event destination (site token)
6290
+ */
6291
+ declare const updateEventDestinationWithSiteToken: <ThrowOnError extends boolean = false>(options: Options<UpdateEventDestinationWithSiteTokenData, ThrowOnError>) => RequestResult<UpdateEventDestinationWithSiteTokenResponses, UpdateEventDestinationWithSiteTokenErrors, ThrowOnError, "fields">;
6292
+ /**
6293
+ * Rotate a destination's signing secret (site token)
6294
+ */
6295
+ declare const rotateEventDestinationSecretWithSiteToken: <ThrowOnError extends boolean = false>(options: Options<RotateEventDestinationSecretWithSiteTokenData, ThrowOnError>) => RequestResult<RotateEventDestinationSecretWithSiteTokenResponses, RotateEventDestinationSecretWithSiteTokenErrors, ThrowOnError, "fields">;
6296
+ /**
6297
+ * Read a destination's signing secret (site token)
6298
+ */
6299
+ declare const getEventDestinationSecretWithSiteToken: <ThrowOnError extends boolean = false>(options: Options<GetEventDestinationSecretWithSiteTokenData, ThrowOnError>) => RequestResult<GetEventDestinationSecretWithSiteTokenResponses, GetEventDestinationSecretWithSiteTokenErrors, ThrowOnError, "fields">;
6300
+ /**
6301
+ * List recent deliveries (site token)
6302
+ */
6303
+ declare const listEventDeliveriesWithSiteToken: <ThrowOnError extends boolean = false>(options: Options<ListEventDeliveriesWithSiteTokenData, ThrowOnError>) => RequestResult<ListEventDeliveriesWithSiteTokenResponses, ListEventDeliveriesWithSiteTokenErrors, ThrowOnError, "fields">;
6304
+ /**
6305
+ * Retry one delivery now (site token)
6306
+ */
6307
+ declare const retryEventDeliveryWithSiteToken: <ThrowOnError extends boolean = false>(options: Options<RetryEventDeliveryWithSiteTokenData, ThrowOnError>) => RequestResult<RetryEventDeliveryWithSiteTokenResponses, RetryEventDeliveryWithSiteTokenErrors, ThrowOnError, "fields">;
4252
6308
  /**
4253
6309
  * Get public product config
4254
6310
  *
@@ -4264,7 +6320,7 @@ declare const createCheckout: <ThrowOnError extends boolean = false>(options: Op
4264
6320
  /**
4265
6321
  * Start a multi-item (cart) checkout
4266
6322
  *
4267
- * Public (unauthenticated) multi-item checkout: validates every cart line, then creates ONE pending order and ONE Stripe Checkout Session covering all lines, returning the Stripe-hosted payment URL. The site is derived from the items — every line must belong to the same site (there is no site key on the wire). Validation is batched: every currently-known conflict (unavailable line, insufficient stock, changed price, quantity over max) returns in a single 409 cart_conflict response with no side effects. All pricing is server-authoritative; the expected_* fields only let the server report price drift back as structured conflicts — a displayed price is never honored. Custom-amount (tip) products cannot be bought in a cart (single-item checkout only). Best-effort rate-limited per IP, sharing the single-item route's budget.
6323
+ * Public (unauthenticated) multi-item checkout: validates every cart line, then creates ONE pending order and ONE Stripe Checkout Session covering all lines, returning the Stripe-hosted payment URL. The site is derived from the items — every line must belong to the same site (there is no site key on the wire). Validation is batched: every currently-known conflict (unavailable line, subscription-only line, insufficient stock, changed price, quantity over max) returns in a single 409 cart_conflict response with no side effects. All pricing is server-authoritative; the expected_* fields only let the server report price drift back as structured conflicts — a displayed price is never honored. Custom-amount (tip) products cannot be bought in a cart (single-item checkout only). Best-effort rate-limited per IP, sharing the single-item route's budget.
4268
6324
  */
4269
6325
  declare const createCartCheckout: <ThrowOnError extends boolean = false>(options: Options<CreateCartCheckoutData, ThrowOnError>) => RequestResult<CreateCartCheckoutResponses, CreateCartCheckoutErrors, ThrowOnError, "fields">;
4270
6326
  /**
@@ -4291,5 +6347,95 @@ declare const downloadFile: <ThrowOnError extends boolean = false>(options: Opti
4291
6347
  * Public (unauthenticated) market-suggestion hint: the visitor's country as seen by the edge, for the storefront's currency picker to SUGGEST a local market. Nothing converts until the buyer explicitly chooses — product reads and checkout stay in the site's currency unless they carry an explicit country. This is deliberately the only endpoint that reads request geography.
4292
6348
  */
4293
6349
  declare const getGeo: <ThrowOnError extends boolean = false>(options?: Options<GetGeoData, ThrowOnError>) => RequestResult<GetGeoResponses, unknown, ThrowOnError, "fields">;
6350
+ /**
6351
+ * Email a sign-in link
6352
+ *
6353
+ * Sends a single-use magic link to the site's own domain. The response is UNIFORM — the same 200 body whether or not the email belongs to a customer, whether or not the Origin resolves to a site, and whether or not a rate limit suppressed the send — so it can never be used to probe who shops at a store. A 60-second cooldown and an hourly cap apply per INBOX (`+tag` subaddressing shares one budget), plus a per-site daily ceiling that addresses with an existing account on the site are exempt from, plus a per-IP limit. Only the IP limit answers 429, because a per-address 429 would itself leak existence. There is no separate signup: the first login creates the identity.
6354
+ */
6355
+ declare const accountLogin: <ThrowOnError extends boolean = false>(options: Options<AccountLoginData, ThrowOnError>) => RequestResult<AccountLoginResponses, AccountLoginErrors, ThrowOnError, "fields">;
6356
+ /**
6357
+ * Exchange a sign-in code for a session
6358
+ *
6359
+ * POST-to-consume: the emailed link only RENDERS a page, and the code is spent here, so an email scanner prefetching the link cannot burn it. Single-use, 15-minute TTL, hashed at rest; issuing a new link invalidates outstanding codes for that email and site. Unknown, expired and already-consumed codes answer one indistinguishable error (code invalid_code). On success the customer row is created if this is their first sign-in.
6360
+ */
6361
+ declare const accountVerify: <ThrowOnError extends boolean = false>(options: Options<AccountVerifyData, ThrowOnError>) => RequestResult<AccountVerifyResponses, AccountVerifyErrors, ThrowOnError, "fields">;
6362
+ /**
6363
+ * Sign out
6364
+ *
6365
+ * Deletes the session row server-side, so the token is dead everywhere rather than merely cleared on this device.
6366
+ */
6367
+ declare const accountLogout: <ThrowOnError extends boolean = false>(options?: Options<AccountLogoutData, ThrowOnError>) => RequestResult<AccountLogoutResponses, AccountLogoutErrors, ThrowOnError, "fields">;
6368
+ /**
6369
+ * The signed-in buyer's orders and subscriptions
6370
+ *
6371
+ * Everything the account page renders. Orders are matched by customer id OR the session's email, so a purchase made before the buyer ever signed in still appears. Editor preview sessions see test data only.
6372
+ */
6373
+ declare const accountMe: <ThrowOnError extends boolean = false>(options?: Options<AccountMeData, ThrowOnError>) => RequestResult<AccountMeResponses, AccountMeErrors, ThrowOnError, "fields">;
6374
+ /**
6375
+ * Start a subscription checkout (signed-in buyer)
6376
+ *
6377
+ * The session-authenticated twin of the anonymous subscription checkout (bearer = customer session token). Same server-authoritative gates; additionally reuses the buyer's existing Stripe Customer when ownership is proven (same connected account and currency) so their saved details prefill. Editor preview sessions are refused (no order, no Stripe call). On a definitive 401/404 clients fall back to the anonymous /v1/p checkout.
6378
+ */
6379
+ declare const accountSubscribe: <ThrowOnError extends boolean = false>(options: Options<AccountSubscribeData, ThrowOnError>) => RequestResult<AccountSubscribeResponses, AccountSubscribeErrors, ThrowOnError, "fields">;
6380
+ /**
6381
+ * Cancel own subscription at period end
6382
+ *
6383
+ * Session-authenticated subscriber cancel: schedules cancel-at-period-end on the buyer's own subscription (404 outside the session's scope). The response's current_period_end is the lapse date; status past_due means no further charges will be attempted. Test subscriptions branch past Stripe.
6384
+ */
6385
+ declare const accountCancelSubscription: <ThrowOnError extends boolean = false>(options: Options<AccountCancelSubscriptionData, ThrowOnError>) => RequestResult<AccountCancelSubscriptionResponses, AccountCancelSubscriptionErrors, ThrowOnError, "fields">;
6386
+ /**
6387
+ * Undo a scheduled cancellation
6388
+ *
6389
+ * Clears cancel-at-period-end before the period lapses. Refused with code 'ended' (no Stripe call) once the subscription is terminally canceled, its store's payments are shut down, or the store was torn down — resubscribing is the only path then.
6390
+ */
6391
+ declare const accountReactivateSubscription: <ThrowOnError extends boolean = false>(options: Options<AccountReactivateSubscriptionData, ThrowOnError>) => RequestResult<AccountReactivateSubscriptionResponses, AccountReactivateSubscriptionErrors, ThrowOnError, "fields">;
6392
+ /**
6393
+ * Update a subscription's shipping address
6394
+ *
6395
+ * Writes the address renewal orders will ship to (our row is fulfillment truth) and mirrors it to the Stripe Customer's shipping best-effort. line1 and a 2-letter country are required.
6396
+ */
6397
+ declare const accountUpdateSubscriptionAddress: <ThrowOnError extends boolean = false>(options: Options<AccountUpdateSubscriptionAddressData, ThrowOnError>) => RequestResult<AccountUpdateSubscriptionAddressResponses, AccountUpdateSubscriptionAddressErrors, ThrowOnError, "fields">;
6398
+ /**
6399
+ * Open the card-update portal (signed-in buyer)
6400
+ *
6401
+ * Mints a Stripe Billing Portal session under the site's FULL portal configuration (card update + invoice history; cancel disabled — cancel is our own endpoint) pinned to the payment_method_update flow, returning to the site's /account page with ?pm=updated. Fails closed with code portal_unavailable rather than ever minting a session without an explicit configuration.
6402
+ */
6403
+ declare const accountCreatePortalSession: <ThrowOnError extends boolean = false>(options: Options<AccountCreatePortalSessionData, ThrowOnError>) => RequestResult<AccountCreatePortalSessionResponses, AccountCreatePortalSessionErrors, ThrowOnError, "fields">;
6404
+ /**
6405
+ * Exchange a manage_code for grant access
6406
+ *
6407
+ * Exchanges the single-use, minutes-TTL manage_code the manage-link resolver's redirect carried for a short-lived manage token (keep it in memory — never persist or place in a URL) scoped to exactly one subscription. Unknown, expired, and consumed codes are indistinguishable.
6408
+ */
6409
+ declare const accountManageVerify: <ThrowOnError extends boolean = false>(options: Options<AccountManageVerifyData, ThrowOnError>) => RequestResult<AccountManageVerifyResponses, AccountManageVerifyErrors, ThrowOnError, "fields">;
6410
+ /**
6411
+ * Read the managed subscription (grant scope)
6412
+ *
6413
+ * Bearer = manage token. Returns exactly the one granted subscription — no orders, no customer PII beyond the subscription's own shipping name/city.
6414
+ */
6415
+ declare const accountManageGetSubscription: <ThrowOnError extends boolean = false>(options?: Options<AccountManageGetSubscriptionData, ThrowOnError>) => RequestResult<AccountManageGetSubscriptionResponses, AccountManageGetSubscriptionErrors, ThrowOnError, "fields">;
6416
+ /**
6417
+ * Cancel the managed subscription at period end
6418
+ *
6419
+ * Grant-scoped subscriber cancel — same semantics as the session cancel endpoint.
6420
+ */
6421
+ declare const accountManageCancel: <ThrowOnError extends boolean = false>(options?: Options<AccountManageCancelData, ThrowOnError>) => RequestResult<AccountManageCancelResponses, AccountManageCancelErrors, ThrowOnError, "fields">;
6422
+ /**
6423
+ * Open the card-update portal (grant scope)
6424
+ *
6425
+ * Mints a Stripe Billing Portal session under the site's MINIMAL portal configuration (payment_method_update ONLY — no invoice history, no cancel): portal sessions are customer-scoped and flow_data only picks the initial flow, so the configuration is the entire capability boundary for an emailed doorway token. Returns to the resolver URL with ?pm=updated. Fails closed with code portal_unavailable.
6426
+ */
6427
+ declare const accountManagePortalSession: <ThrowOnError extends boolean = false>(options?: Options<AccountManagePortalSessionData, ThrowOnError>) => RequestResult<AccountManagePortalSessionResponses, AccountManagePortalSessionErrors, ThrowOnError, "fields">;
6428
+ /**
6429
+ * Resolve a subscription manage link
6430
+ *
6431
+ * The doorway behind every manage link in subscriber emails. When the store's site still serves its account page (checked against our own serving state — never a public fetch), 302-redirects to https://<site>/account?manage_code=<single-use handoff code> (never the long-lived token). Otherwise renders a platform-hosted HTML manage page (view, cancel, card update — plus reactivate, which appears ONLY here and only because a site that cannot serve /account is a site nobody can sign in to). All error states are human-readable HTML — these links are opened as top-level navigations from emails. Unknown, expired and revoked tokens render identically.
6432
+ */
6433
+ declare const resolveManageLink: <ThrowOnError extends boolean = false>(options: Options<ResolveManageLinkData, ThrowOnError>) => RequestResult<ResolveManageLinkResponses, ResolveManageLinkErrors, ThrowOnError, "fields">;
6434
+ /**
6435
+ * Act on a subscription from the platform manage page
6436
+ *
6437
+ * The POST-to-act target of the platform fallback page's forms (the MUTATING twin of GET /v1/m/{token} — it cancels billing or opens Stripe's card-update portal). Body is a form post carrying `action` (view | confirm_cancel | cancel | reactivate | card_update) and `token`, which must equal the path token — a form scraped into another page cannot be re-pointed at a different subscription. `reactivate` is accepted ONLY while the store cannot serve its own /account page: where signing in is possible, restarting billing requires a session rather than an emailed bearer, and the action answers with the status page instead. Responses are HTML for the same reason the GET's are: this is a browser form submission from an emailed page, never a fetch(). Unknown, expired and revoked tokens render identically to the GET's.
6438
+ */
6439
+ declare const actOnManageLink: <ThrowOnError extends boolean = false>(options: Options<ActOnManageLinkData, ThrowOnError>) => RequestResult<ActOnManageLinkResponses, ActOnManageLinkErrors, ThrowOnError, "fields">;
4294
6440
 
4295
- export { type AdjustInventory, type AdjustVariantInventoryData, type AdjustVariantInventoryError, type AdjustVariantInventoryErrors, type AdjustVariantInventoryResponse, type AdjustVariantInventoryResponses, type AttachProductFileData, type AttachProductFileError, type AttachProductFileErrors, type AttachProductFileFromUrl, type AttachProductFileMultipart, type AttachProductFileResponse, type AttachProductFileResponses, type Attachment, type BusinessSummary, type CartCheckoutRequest, type CartConflict, type CartConflictItem, type CartSummaryRequest, type CartSummaryResult, type ChangedField, type CheckoutPauseRequest, type CheckoutPauseState, type CheckoutRequest, type CheckoutResult, type Client, type ClientOptions$1 as ClientConfig, type ClientOptions, type Config, type CreateCartCheckoutData, type CreateCartCheckoutError, type CreateCartCheckoutErrors, type CreateCartCheckoutResponse, type CreateCartCheckoutResponses, type CreateCheckoutData, type CreateCheckoutError, type CreateCheckoutErrors, type CreateCheckoutResponse, type CreateCheckoutResponses, type CreateCustomer, type CreateCustomerData, type CreateCustomerError, type CreateCustomerErrors, type CreateCustomerResponse, type CreateCustomerResponses, type CreateForm, type CreateFormData, type CreateFormError, type CreateFormErrors, type CreateFormResponse, type CreateFormResponses, type CreateFormWithSiteTokenData, type CreateFormWithSiteTokenError, type CreateFormWithSiteTokenErrors, type CreateFormWithSiteTokenResponse, type CreateFormWithSiteTokenResponses, type CreateMultiItemTestOrder, type CreateMultiItemTestOrderData, type CreateMultiItemTestOrderError, type CreateMultiItemTestOrderErrors, type CreateMultiItemTestOrderResponse, type CreateMultiItemTestOrderResponses, type CreateOption, type CreateOptionData, type CreateOptionError, type CreateOptionErrors, type CreateOptionResponse, type CreateOptionResponses, type CreateProduct, type CreateProductData, type CreateProductError, type CreateProductErrors, type CreateProductResponse, type CreateProductResponses, type CreateProductWithSiteTokenData, type CreateProductWithSiteTokenError, type CreateProductWithSiteTokenErrors, type CreateProductWithSiteTokenResponse, type CreateProductWithSiteTokenResponses, type CreateSite, type CreateSiteData, type CreateSiteError, type CreateSiteErrors, type CreateSiteResponse, type CreateSiteResponses, type CreateTestOrder, type CreateTestOrderData, type CreateTestOrderError, type CreateTestOrderErrors, type CreateTestOrderResponse, type CreateTestOrderResponses, type CreateVariant, type CreateVariantData, type CreateVariantError, type CreateVariantErrors, type CreateVariantResponse, type CreateVariantResponses, type CurrencyTotals, type Customer, type CustomerAddress, type CustomerDetail, type CustomersList, type DeleteFormData, type DeleteFormError, type DeleteFormErrors, type DeleteFormResponse, type DeleteFormResponses, type DeleteOptionData, type DeleteOptionError, type DeleteOptionErrors, type DeleteOptionResponse, type DeleteOptionResponses, type DeleteProductData, type DeleteProductError, type DeleteProductErrors, type DeleteProductResponse, type DeleteProductResponses, type DeleteSiteData, type DeleteSiteError, type DeleteSiteErrors, type DeleteSiteResponse, type DeleteSiteResponses, type DeleteSubmissionData, type DeleteSubmissionError, type DeleteSubmissionErrors, type DeleteSubmissionResponse, type DeleteSubmissionResponses, type DeleteVariantData, type DeleteVariantError, type DeleteVariantErrors, type DeleteVariantResponse, type DeleteVariantResponses, type DownloadAttachmentData, type DownloadAttachmentError, type DownloadAttachmentErrors, type DownloadAttachmentResponses, type DownloadFileData, type DownloadFileError, type DownloadFileErrors, type DownloadFileResponse, type DownloadFileResponses, type Error, type Form, type FormsList, type GeoSuggestion, type GetBusinessSummaryData, type GetBusinessSummaryErrors, type GetBusinessSummaryResponse, type GetBusinessSummaryResponses, type GetCartSummaryData, type GetCartSummaryError, type GetCartSummaryErrors, type GetCartSummaryResponse, type GetCartSummaryResponses, type GetCustomerData, type GetCustomerError, type GetCustomerErrors, type GetCustomerResponse, type GetCustomerResponses, type GetFormData, type GetFormError, type GetFormErrors, type GetFormResponse, type GetFormResponses, type GetGeoData, type GetGeoResponse, type GetGeoResponses, type GetNextPayoutData, type GetNextPayoutErrors, type GetNextPayoutResponse, type GetNextPayoutResponses, type GetOrderData, type GetOrderError, type GetOrderErrors, type GetOrderResponse, type GetOrderResponses, type GetOrderSessionData, type GetOrderSessionError, type GetOrderSessionErrors, type GetOrderSessionResponse, type GetOrderSessionResponses, type GetPaymentsStatusData, type GetPaymentsStatusError, type GetPaymentsStatusErrors, type GetPaymentsStatusResponse, type GetPaymentsStatusResponses, type GetPersonData, type GetPersonErrors, type GetPersonResponse, type GetPersonResponses, type GetProductData, type GetProductError, type GetProductErrors, type GetProductResponse, type GetProductResponses, type GetPublicProductData, type GetPublicProductError, type GetPublicProductErrors, type GetPublicProductResponse, type GetPublicProductResponses, type GetSalesSummaryData, type GetSalesSummaryErrors, type GetSalesSummaryResponse, type GetSalesSummaryResponses, type GetSiteCheckoutPauseData, type GetSiteCheckoutPauseError, type GetSiteCheckoutPauseErrors, type GetSiteCheckoutPauseResponse, type GetSiteCheckoutPauseResponses, type GetSiteData, type GetSiteError, type GetSiteErrors, type GetSiteResponse, type GetSiteResponses, type GetSubmissionData, type GetSubmissionError, type GetSubmissionErrors, type GetSubmissionResponse, type GetSubmissionResponses, type Inventory, type InventoryInput, type ListCustomersData, type ListCustomersError, type ListCustomersErrors, type ListCustomersResponse, type ListCustomersResponses, type ListFormsData, type ListFormsError, type ListFormsErrors, type ListFormsResponse, type ListFormsResponses, type ListFormsWithSiteTokenData, type ListFormsWithSiteTokenError, type ListFormsWithSiteTokenErrors, type ListFormsWithSiteTokenResponse, type ListFormsWithSiteTokenResponses, type ListOrdersWithSiteTokenData, type ListOrdersWithSiteTokenError, type ListOrdersWithSiteTokenErrors, type ListOrdersWithSiteTokenResponse, type ListOrdersWithSiteTokenResponses, type ListPeopleData, type ListPeopleErrors, type ListPeopleResponse, type ListPeopleResponses, type ListProductsData, type ListProductsError, type ListProductsErrors, type ListProductsResponse, type ListProductsResponses, type ListProductsWithSiteTokenData, type ListProductsWithSiteTokenError, type ListProductsWithSiteTokenErrors, type ListProductsWithSiteTokenResponse, type ListProductsWithSiteTokenResponses, type ListSitesData, type ListSitesError, type ListSitesErrors, type ListSitesResponse, type ListSitesResponses, type ListSubmissionsData, type ListSubmissionsError, type ListSubmissionsErrors, type ListSubmissionsResponse, type ListSubmissionsResponses, type NeedsAttentionItem, type NestedOptionInput, type NestedVariantInput, type NextPayout, type Option, type Options, type Order, type OrderCustomer, type OrderFulfillmentRequest, type OrderSessionStatus, type OrdersList, type PauseSiteCheckoutData, type PauseSiteCheckoutError, type PauseSiteCheckoutErrors, type PauseSiteCheckoutResponse, type PauseSiteCheckoutResponses, type PaymentsStatus, type PeopleList, type PersonDetail, type PersonRow, type Product, type ProductDetail, type ProductFulfillment, type ProductFulfillmentInput, type ProductsList, type PublicOption, type PublicProduct, type PublicVariant, type ReconcileOptionInput, type ReconcileOptionValueInput, type ReconcileVariantInput, type RefundOrder, type RefundOrderData, type RefundOrderError, type RefundOrderErrors, type RefundOrderResponse, type RefundOrderResponses, type RefundResult, type ResendOrderReceiptData, type ResendOrderReceiptError, type ResendOrderReceiptErrors, type ResendOrderReceiptResponse, type ResendOrderReceiptResponses, type ResendReceiptResult, type ResetOrderDownloadsData, type ResetOrderDownloadsError, type ResetOrderDownloadsErrors, type ResetOrderDownloadsResponse, type ResetOrderDownloadsResponses, type ResetWebhookEventData, type ResetWebhookEventError, type ResetWebhookEventErrors, type ResetWebhookEventResponse, type ResetWebhookEventResponses, type SalesSummary, type SalesSummaryProductRow, type SalesSummarySeriesEntry, type SetInventory, type SetOrderFulfillmentData, type SetOrderFulfillmentErrors, type SetOrderFulfillmentResponse, type SetOrderFulfillmentResponses, type SetProductVariants, type SetProductVariantsConflict, type SetProductVariantsData, type SetProductVariantsError, type SetProductVariantsErrors, type SetProductVariantsResponse, type SetProductVariantsResponses, type SetProductVariantsResult, type SetVariantInventoryData, type SetVariantInventoryError, type SetVariantInventoryErrors, type SetVariantInventoryResponse, type SetVariantInventoryResponses, type SettledTotals, type ShippingOptionUnavailable, type ShippingRateInput, type Site, type SiteDomains, type SitePayments, type SiteWithToken, type SitesList, type Submission, type SubmissionMetadata, type SubmissionsList, type SummaryPeriod, type TestOrderResult, type UpdateCustomer, type UpdateCustomerData, type UpdateCustomerError, type UpdateCustomerErrors, type UpdateCustomerResponse, type UpdateCustomerResponses, type UpdateForm, type UpdateFormData, type UpdateFormError, type UpdateFormErrors, type UpdateFormResponse, type UpdateFormResponses, type UpdateOption, type UpdateOptionData, type UpdateOptionError, type UpdateOptionErrors, type UpdateOptionResponse, type UpdateOptionResponses, type UpdateProduct, type UpdateProductData, type UpdateProductError, type UpdateProductErrors, type UpdateProductResponse, type UpdateProductResponses, type UpdateSite, type UpdateSiteData, type UpdateSiteDomains, type UpdateSiteDomainsData, type UpdateSiteDomainsError, type UpdateSiteDomainsErrors, type UpdateSiteDomainsResponse, type UpdateSiteDomainsResponses, type UpdateSiteError, type UpdateSiteErrors, type UpdateSitePayments, type UpdateSitePaymentsData, type UpdateSitePaymentsError, type UpdateSitePaymentsErrors, type UpdateSitePaymentsResponse, type UpdateSitePaymentsResponses, type UpdateSiteResponse, type UpdateSiteResponses, type UpdateVariant, type UpdateVariantData, type UpdateVariantError, type UpdateVariantErrors, type UpdateVariantResponse, type UpdateVariantResponses, type Variant, type VariantOptionValue, type WebhookEventResetResult, adjustVariantInventory, attachProductFile, createCartCheckout, createCheckout, createClient, createConfig, createCustomer, createForm, createFormWithSiteToken, createMultiItemTestOrder, createOption, createProduct, createProductWithSiteToken, createSite, createTestOrder, createVariant, deleteForm, deleteOption, deleteProduct, deleteSite, deleteSubmission, deleteVariant, downloadAttachment, downloadFile, getBusinessSummary, getCartSummary, getCustomer, getForm, getGeo, getNextPayout, getOrder, getOrderSession, getPaymentsStatus, getPerson, getProduct, getPublicProduct, getSalesSummary, getSite, getSiteCheckoutPause, getSubmission, listCustomers, listForms, listFormsWithSiteToken, listOrdersWithSiteToken, listPeople, listProducts, listProductsWithSiteToken, listSites, listSubmissions, pauseSiteCheckout, refundOrder, resendOrderReceipt, resetOrderDownloads, resetWebhookEvent, setOrderFulfillment, setProductVariants, setVariantInventory, updateCustomer, updateForm, updateOption, updateProduct, updateSite, updateSiteDomains, updateSitePayments, updateVariant };
6441
+ export { type AccountCancelSubscriptionData, type AccountCancelSubscriptionError, type AccountCancelSubscriptionErrors, type AccountCancelSubscriptionResponse, type AccountCancelSubscriptionResponses, type AccountCreatePortalSessionData, type AccountCreatePortalSessionError, type AccountCreatePortalSessionErrors, type AccountCreatePortalSessionResponse, type AccountCreatePortalSessionResponses, type AccountLoginData, type AccountLoginError, type AccountLoginErrors, type AccountLoginRequest, type AccountLoginResponse, type AccountLoginResponses, type AccountLoginResult, type AccountLogoutData, type AccountLogoutError, type AccountLogoutErrors, type AccountLogoutResponse, type AccountLogoutResponses, type AccountLogoutResult, type AccountManageCancelData, type AccountManageCancelError, type AccountManageCancelErrors, type AccountManageCancelResponse, type AccountManageCancelResponses, type AccountManageGetSubscriptionData, type AccountManageGetSubscriptionError, type AccountManageGetSubscriptionErrors, type AccountManageGetSubscriptionResponse, type AccountManageGetSubscriptionResponses, type AccountManagePortalSessionData, type AccountManagePortalSessionError, type AccountManagePortalSessionErrors, type AccountManagePortalSessionResponse, type AccountManagePortalSessionResponses, type AccountManageVerifyData, type AccountManageVerifyError, type AccountManageVerifyErrors, type AccountManageVerifyResponse, type AccountManageVerifyResponses, type AccountMeData, type AccountMeError, type AccountMeErrors, type AccountMeResponse, type AccountMeResponses, type AccountMeResult, type AccountReactivateSubscriptionData, type AccountReactivateSubscriptionError, type AccountReactivateSubscriptionErrors, type AccountReactivateSubscriptionResponse, type AccountReactivateSubscriptionResponses, type AccountSubscribeData, type AccountSubscribeError, type AccountSubscribeErrors, type AccountSubscribeRequest, type AccountSubscribeResponse, type AccountSubscribeResponses, type AccountUpdateSubscriptionAddressData, type AccountUpdateSubscriptionAddressError, type AccountUpdateSubscriptionAddressErrors, type AccountUpdateSubscriptionAddressResponse, type AccountUpdateSubscriptionAddressResponses, type AccountVerifyData, type AccountVerifyError, type AccountVerifyErrors, type AccountVerifyRequest, type AccountVerifyResponse, type AccountVerifyResponses, type AccountVerifyResult, type ActOnManageLinkData, type ActOnManageLinkError, type ActOnManageLinkErrors, type ActOnManageLinkResponse, type ActOnManageLinkResponses, type AdjustInventory, type AdjustVariantInventoryData, type AdjustVariantInventoryError, type AdjustVariantInventoryErrors, type AdjustVariantInventoryResponse, type AdjustVariantInventoryResponses, type AttachProductFileData, type AttachProductFileError, type AttachProductFileErrors, type AttachProductFileFromUrl, type AttachProductFileMultipart, type AttachProductFileResponse, type AttachProductFileResponses, type Attachment, type BusinessSummary, type CancelSubscriptionData, type CancelSubscriptionErrors, type CancelSubscriptionResponse, type CancelSubscriptionResponses, type CartCheckoutRequest, type CartConflict, type CartConflictItem, type CartSummaryRequest, type CartSummaryResult, type ChangedField, type CheckoutPauseRequest, type CheckoutPauseState, type CheckoutRequest, type CheckoutResult, type Client, type ClientOptions$1 as ClientConfig, type ClientOptions, type Config, type CreateCartCheckoutData, type CreateCartCheckoutError, type CreateCartCheckoutErrors, type CreateCartCheckoutResponse, type CreateCartCheckoutResponses, type CreateCheckoutData, type CreateCheckoutError, type CreateCheckoutErrors, type CreateCheckoutResponse, type CreateCheckoutResponses, type CreateCustomer, type CreateCustomerData, type CreateCustomerError, type CreateCustomerErrors, type CreateCustomerResponse, type CreateCustomerResponses, type CreateEventDestination, type CreateEventDestinationData, type CreateEventDestinationError, type CreateEventDestinationErrors, type CreateEventDestinationResponse, type CreateEventDestinationResponses, type CreateEventDestinationWithSiteTokenData, type CreateEventDestinationWithSiteTokenError, type CreateEventDestinationWithSiteTokenErrors, type CreateEventDestinationWithSiteTokenResponse, type CreateEventDestinationWithSiteTokenResponses, type CreateForm, type CreateFormData, type CreateFormError, type CreateFormErrors, type CreateFormResponse, type CreateFormResponses, type CreateFormWithSiteTokenData, type CreateFormWithSiteTokenError, type CreateFormWithSiteTokenErrors, type CreateFormWithSiteTokenResponse, type CreateFormWithSiteTokenResponses, type CreateMultiItemTestOrder, type CreateMultiItemTestOrderData, type CreateMultiItemTestOrderError, type CreateMultiItemTestOrderErrors, type CreateMultiItemTestOrderResponse, type CreateMultiItemTestOrderResponses, type CreateOption, type CreateOptionData, type CreateOptionError, type CreateOptionErrors, type CreateOptionResponse, type CreateOptionResponses, type CreatePreviewSession, type CreatePreviewSessionData, type CreatePreviewSessionError, type CreatePreviewSessionErrors, type CreatePreviewSessionResponse, type CreatePreviewSessionResponses, type CreateProduct, type CreateProductData, type CreateProductError, type CreateProductErrors, type CreateProductResponse, type CreateProductResponses, type CreateProductWithSiteTokenData, type CreateProductWithSiteTokenError, type CreateProductWithSiteTokenErrors, type CreateProductWithSiteTokenResponse, type CreateProductWithSiteTokenResponses, type CreateSite, type CreateSiteData, type CreateSiteError, type CreateSiteErrors, type CreateSiteResponse, type CreateSiteResponses, type CreateTestOrder, type CreateTestOrderData, type CreateTestOrderError, type CreateTestOrderErrors, type CreateTestOrderResponse, type CreateTestOrderResponses, type CreateTestSubscription, type CreateTestSubscriptionData, type CreateTestSubscriptionError, type CreateTestSubscriptionErrors, type CreateTestSubscriptionResponse, type CreateTestSubscriptionResponses, type CreateVariant, type CreateVariantData, type CreateVariantError, type CreateVariantErrors, type CreateVariantResponse, type CreateVariantResponses, type CurrencyRestatement, type CurrencyTotals, type Customer, type CustomerAddress, type CustomerDetail, type CustomersList, type DeleteEventDestinationData, type DeleteEventDestinationError, type DeleteEventDestinationErrors, type DeleteEventDestinationResponse, type DeleteEventDestinationResponses, type DeleteEventDestinationWithSiteTokenData, type DeleteEventDestinationWithSiteTokenError, type DeleteEventDestinationWithSiteTokenErrors, type DeleteEventDestinationWithSiteTokenResponse, type DeleteEventDestinationWithSiteTokenResponses, type DeleteFormData, type DeleteFormError, type DeleteFormErrors, type DeleteFormResponse, type DeleteFormResponses, type DeleteOptionData, type DeleteOptionError, type DeleteOptionErrors, type DeleteOptionResponse, type DeleteOptionResponses, type DeleteProductData, type DeleteProductError, type DeleteProductErrors, type DeleteProductResponse, type DeleteProductResponses, type DeleteSiteData, type DeleteSiteError, type DeleteSiteErrors, type DeleteSiteResponse, type DeleteSiteResponses, type DeleteSubmissionData, type DeleteSubmissionError, type DeleteSubmissionErrors, type DeleteSubmissionResponse, type DeleteSubmissionResponses, type DeleteVariantData, type DeleteVariantError, type DeleteVariantErrors, type DeleteVariantResponse, type DeleteVariantResponses, type DownloadAttachmentData, type DownloadAttachmentError, type DownloadAttachmentErrors, type DownloadAttachmentResponses, type DownloadFileData, type DownloadFileError, type DownloadFileErrors, type DownloadFileResponse, type DownloadFileResponses, type Error, type EventDeliveriesList, type EventDelivery, type EventDestination, type EventDestinationSecret, type EventDestinationsList, type Form, type FormsList, type GenerateVariants, type GenerateVariantsData, type GenerateVariantsError, type GenerateVariantsErrors, type GenerateVariantsResponse, type GenerateVariantsResponses, type GenerateVariantsResult, type GeoSuggestion, type GetBusinessSummaryData, type GetBusinessSummaryErrors, type GetBusinessSummaryResponse, type GetBusinessSummaryResponses, type GetCartSummaryData, type GetCartSummaryError, type GetCartSummaryErrors, type GetCartSummaryResponse, type GetCartSummaryResponses, type GetCustomerData, type GetCustomerError, type GetCustomerErrors, type GetCustomerResponse, type GetCustomerResponses, type GetEventDestinationData, type GetEventDestinationError, type GetEventDestinationErrors, type GetEventDestinationResponse, type GetEventDestinationResponses, type GetEventDestinationSecretData, type GetEventDestinationSecretError, type GetEventDestinationSecretErrors, type GetEventDestinationSecretResponse, type GetEventDestinationSecretResponses, type GetEventDestinationSecretWithSiteTokenData, type GetEventDestinationSecretWithSiteTokenError, type GetEventDestinationSecretWithSiteTokenErrors, type GetEventDestinationSecretWithSiteTokenResponse, type GetEventDestinationSecretWithSiteTokenResponses, type GetFormData, type GetFormError, type GetFormErrors, type GetFormResponse, type GetFormResponses, type GetGeoData, type GetGeoResponse, type GetGeoResponses, type GetNextPayoutData, type GetNextPayoutErrors, type GetNextPayoutResponse, type GetNextPayoutResponses, type GetOrderData, type GetOrderError, type GetOrderErrors, type GetOrderResponse, type GetOrderResponses, type GetOrderSessionData, type GetOrderSessionError, type GetOrderSessionErrors, type GetOrderSessionResponse, type GetOrderSessionResponses, type GetPaymentsStatusData, type GetPaymentsStatusError, type GetPaymentsStatusErrors, type GetPaymentsStatusResponse, type GetPaymentsStatusResponses, type GetPersonData, type GetPersonErrors, type GetPersonResponse, type GetPersonResponses, type GetProductData, type GetProductError, type GetProductErrors, type GetProductResponse, type GetProductResponses, type GetPublicProductData, type GetPublicProductError, type GetPublicProductErrors, type GetPublicProductResponse, type GetPublicProductResponses, type GetSalesSummaryData, type GetSalesSummaryErrors, type GetSalesSummaryResponse, type GetSalesSummaryResponses, type GetSiteCheckoutPauseData, type GetSiteCheckoutPauseError, type GetSiteCheckoutPauseErrors, type GetSiteCheckoutPauseResponse, type GetSiteCheckoutPauseResponses, type GetSiteData, type GetSiteError, type GetSiteErrors, type GetSiteResponse, type GetSiteResponses, type GetSubmissionData, type GetSubmissionError, type GetSubmissionErrors, type GetSubmissionResponse, type GetSubmissionResponses, type Inventory, type InventoryInput, type ListCustomersData, type ListCustomersError, type ListCustomersErrors, type ListCustomersResponse, type ListCustomersResponses, type ListEventDeliveriesData, type ListEventDeliveriesError, type ListEventDeliveriesErrors, type ListEventDeliveriesResponse, type ListEventDeliveriesResponses, type ListEventDeliveriesWithSiteTokenData, type ListEventDeliveriesWithSiteTokenError, type ListEventDeliveriesWithSiteTokenErrors, type ListEventDeliveriesWithSiteTokenResponse, type ListEventDeliveriesWithSiteTokenResponses, type ListEventDestinationsData, type ListEventDestinationsError, type ListEventDestinationsErrors, type ListEventDestinationsResponse, type ListEventDestinationsResponses, type ListEventDestinationsWithSiteTokenData, type ListEventDestinationsWithSiteTokenError, type ListEventDestinationsWithSiteTokenErrors, type ListEventDestinationsWithSiteTokenResponse, type ListEventDestinationsWithSiteTokenResponses, type ListFormsData, type ListFormsError, type ListFormsErrors, type ListFormsResponse, type ListFormsResponses, type ListFormsWithSiteTokenData, type ListFormsWithSiteTokenError, type ListFormsWithSiteTokenErrors, type ListFormsWithSiteTokenResponse, type ListFormsWithSiteTokenResponses, type ListOrdersWithSiteTokenData, type ListOrdersWithSiteTokenError, type ListOrdersWithSiteTokenErrors, type ListOrdersWithSiteTokenResponse, type ListOrdersWithSiteTokenResponses, type ListPeopleData, type ListPeopleErrors, type ListPeopleResponse, type ListPeopleResponses, type ListProductsData, type ListProductsError, type ListProductsErrors, type ListProductsResponse, type ListProductsResponses, type ListProductsWithSiteTokenData, type ListProductsWithSiteTokenError, type ListProductsWithSiteTokenErrors, type ListProductsWithSiteTokenResponse, type ListProductsWithSiteTokenResponses, type ListSitesData, type ListSitesError, type ListSitesErrors, type ListSitesResponse, type ListSitesResponses, type ListSubmissionsData, type ListSubmissionsError, type ListSubmissionsErrors, type ListSubmissionsResponse, type ListSubmissionsResponses, type ListSubscriptionsData, type ListSubscriptionsErrors, type ListSubscriptionsResponse, type ListSubscriptionsResponses, type ManageCancelResult, type ManageLinkAction, type ManageVerifyRequest, type ManageVerifyResult, type ManagedSubscription, type ManagedSubscriptionResult, type NeedsAttentionItem, type NestedOptionInput, type NestedVariantInput, type NextPayout, type Option, type Options, type Order, type OrderCustomer, type OrderFulfillmentRequest, type OrderSessionStatus, type OrdersList, type PauseSiteCheckoutData, type PauseSiteCheckoutError, type PauseSiteCheckoutErrors, type PauseSiteCheckoutResponse, type PauseSiteCheckoutResponses, type PaymentsStatus, type PeopleList, type PersonDetail, type PersonRow, type PortalSessionResult, type PreviewSessionResult, type Product, type ProductDetail, type ProductFulfillment, type ProductFulfillmentInput, type ProductSubscriptionConfig, type ProductsList, type PublicOption, type PublicProduct, type PublicSubscription, type PublicSubscriptionPlan, type PublicVariant, type ReactivateSiteSubscriptionsTeardownData, type ReactivateSiteSubscriptionsTeardownError, type ReactivateSiteSubscriptionsTeardownErrors, type ReactivateSiteSubscriptionsTeardownResponse, type ReactivateSiteSubscriptionsTeardownResponses, type ReconcileOptionInput, type ReconcileOptionValueInput, type ReconcileVariantInput, type RefundOrder, type RefundOrderData, type RefundOrderError, type RefundOrderErrors, type RefundOrderResponse, type RefundOrderResponses, type RefundResult, type ResendOrderReceiptData, type ResendOrderReceiptError, type ResendOrderReceiptErrors, type ResendOrderReceiptResponse, type ResendOrderReceiptResponses, type ResendReceiptResult, type ResetOrderDownloadsData, type ResetOrderDownloadsError, type ResetOrderDownloadsErrors, type ResetOrderDownloadsResponse, type ResetOrderDownloadsResponses, type ResetWebhookEventData, type ResetWebhookEventError, type ResetWebhookEventErrors, type ResetWebhookEventResponse, type ResetWebhookEventResponses, type ResolveManageLinkData, type ResolveManageLinkError, type ResolveManageLinkErrors, type ResolveManageLinkResponse, type ResolveManageLinkResponses, type RetryEventDeliveryData, type RetryEventDeliveryError, type RetryEventDeliveryErrors, type RetryEventDeliveryResponse, type RetryEventDeliveryResponses, type RetryEventDeliveryWithSiteTokenData, type RetryEventDeliveryWithSiteTokenError, type RetryEventDeliveryWithSiteTokenErrors, type RetryEventDeliveryWithSiteTokenResponse, type RetryEventDeliveryWithSiteTokenResponses, type RevokeCustomerAccessData, type RevokeCustomerAccessError, type RevokeCustomerAccessErrors, type RevokeCustomerAccessResponse, type RevokeCustomerAccessResponses, type RevokeCustomerAccessResult, type RotateEventDestinationSecretData, type RotateEventDestinationSecretError, type RotateEventDestinationSecretErrors, type RotateEventDestinationSecretResponse, type RotateEventDestinationSecretResponses, type RotateEventDestinationSecretWithSiteTokenData, type RotateEventDestinationSecretWithSiteTokenError, type RotateEventDestinationSecretWithSiteTokenErrors, type RotateEventDestinationSecretWithSiteTokenResponse, type RotateEventDestinationSecretWithSiteTokenResponses, type SalesSummary, type SalesSummaryProductRow, type SalesSummarySeriesEntry, type SetInventory, type SetOrderFulfillmentData, type SetOrderFulfillmentErrors, type SetOrderFulfillmentResponse, type SetOrderFulfillmentResponses, type SetProductSubscription, type SetProductSubscriptionData, type SetProductSubscriptionError, type SetProductSubscriptionErrors, type SetProductSubscriptionResponse, type SetProductSubscriptionResponses, type SetProductVariants, type SetProductVariantsConflict, type SetProductVariantsData, type SetProductVariantsError, type SetProductVariantsErrors, type SetProductVariantsResponse, type SetProductVariantsResponses, type SetProductVariantsResult, type SetVariantInventoryData, type SetVariantInventoryError, type SetVariantInventoryErrors, type SetVariantInventoryResponse, type SetVariantInventoryResponses, type SettledTotals, type ShippingOptionUnavailable, type ShippingRateInput, type Site, type SiteAccountRoute, type SiteDomains, type SitePayments, type SiteWithRestatement, type SiteWithToken, type SitesList, type Submission, type SubmissionMetadata, type SubmissionsList, type SubscriberActionResult, type SubscriberSubscription, type SubscriptionPlan, type SubscriptionPlanInput, type SubscriptionSummary, type SubscriptionsList, type SubscriptionsReactivateBody, type SubscriptionsReactivateResult, type SubscriptionsTeardownBody, type SubscriptionsTeardownResult, type SummaryPeriod, type TeardownReason, type TeardownSiteSubscriptionsData, type TeardownSiteSubscriptionsError, type TeardownSiteSubscriptionsErrors, type TeardownSiteSubscriptionsResponse, type TeardownSiteSubscriptionsResponses, type TestOrderResult, type TestShippingAddress, type TestSubscriptionResult, type UpdateCustomer, type UpdateCustomerData, type UpdateCustomerError, type UpdateCustomerErrors, type UpdateCustomerResponse, type UpdateCustomerResponses, type UpdateEventDestination, type UpdateEventDestinationData, type UpdateEventDestinationError, type UpdateEventDestinationErrors, type UpdateEventDestinationResponse, type UpdateEventDestinationResponses, type UpdateEventDestinationWithSiteTokenData, type UpdateEventDestinationWithSiteTokenError, type UpdateEventDestinationWithSiteTokenErrors, type UpdateEventDestinationWithSiteTokenResponse, type UpdateEventDestinationWithSiteTokenResponses, type UpdateForm, type UpdateFormData, type UpdateFormError, type UpdateFormErrors, type UpdateFormResponse, type UpdateFormResponses, type UpdateOption, type UpdateOptionData, type UpdateOptionError, type UpdateOptionErrors, type UpdateOptionResponse, type UpdateOptionResponses, type UpdateProduct, type UpdateProductData, type UpdateProductError, type UpdateProductErrors, type UpdateProductResponse, type UpdateProductResponses, type UpdateSite, type UpdateSiteAccountRoute, type UpdateSiteAccountRouteData, type UpdateSiteAccountRouteError, type UpdateSiteAccountRouteErrors, type UpdateSiteAccountRouteResponse, type UpdateSiteAccountRouteResponses, type UpdateSiteData, type UpdateSiteDomains, type UpdateSiteDomainsData, type UpdateSiteDomainsError, type UpdateSiteDomainsErrors, type UpdateSiteDomainsResponse, type UpdateSiteDomainsResponses, type UpdateSiteError, type UpdateSiteErrors, type UpdateSitePayments, type UpdateSitePaymentsData, type UpdateSitePaymentsError, type UpdateSitePaymentsErrors, type UpdateSitePaymentsResponse, type UpdateSitePaymentsResponses, type UpdateSiteResponse, type UpdateSiteResponses, type UpdateSubscriptionAddressRequest, type UpdateVariant, type UpdateVariantData, type UpdateVariantError, type UpdateVariantErrors, type UpdateVariantResponse, type UpdateVariantResponses, type Variant, type VariantOptionValue, type WebhookEventResetResult, accountCancelSubscription, accountCreatePortalSession, accountLogin, accountLogout, accountManageCancel, accountManageGetSubscription, accountManagePortalSession, accountManageVerify, accountMe, accountReactivateSubscription, accountSubscribe, accountUpdateSubscriptionAddress, accountVerify, actOnManageLink, adjustVariantInventory, attachProductFile, cancelSubscription, createCartCheckout, createCheckout, createClient, createConfig, createCustomer, createEventDestination, createEventDestinationWithSiteToken, createForm, createFormWithSiteToken, createMultiItemTestOrder, createOption, createPreviewSession, createProduct, createProductWithSiteToken, createSite, createTestOrder, createTestSubscription, createVariant, deleteEventDestination, deleteEventDestinationWithSiteToken, deleteForm, deleteOption, deleteProduct, deleteSite, deleteSubmission, deleteVariant, downloadAttachment, downloadFile, generateVariants, getBusinessSummary, getCartSummary, getCustomer, getEventDestination, getEventDestinationSecret, getEventDestinationSecretWithSiteToken, getForm, getGeo, getNextPayout, getOrder, getOrderSession, getPaymentsStatus, getPerson, getProduct, getPublicProduct, getSalesSummary, getSite, getSiteCheckoutPause, getSubmission, listCustomers, listEventDeliveries, listEventDeliveriesWithSiteToken, listEventDestinations, listEventDestinationsWithSiteToken, listForms, listFormsWithSiteToken, listOrdersWithSiteToken, listPeople, listProducts, listProductsWithSiteToken, listSites, listSubmissions, listSubscriptions, pauseSiteCheckout, reactivateSiteSubscriptionsTeardown, refundOrder, resendOrderReceipt, resetOrderDownloads, resetWebhookEvent, resolveManageLink, retryEventDelivery, retryEventDeliveryWithSiteToken, revokeCustomerAccess, rotateEventDestinationSecret, rotateEventDestinationSecretWithSiteToken, setOrderFulfillment, setProductSubscription, setProductVariants, setVariantInventory, teardownSiteSubscriptions, updateCustomer, updateEventDestination, updateEventDestinationWithSiteToken, updateForm, updateOption, updateProduct, updateSite, updateSiteAccountRoute, updateSiteDomains, updateSitePayments, updateVariant };