@aifeatures/backend 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +1587 -70
- package/dist/index.d.ts +1587 -70
- package/dist/index.js +4 -4
- package/package.json +1 -1
package/dist/index.d.ts
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
|
|
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,6 +1494,109 @@ 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;
|
|
@@ -1362,6 +1672,10 @@ type Site = {
|
|
|
1362
1672
|
* 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
1673
|
*/
|
|
1364
1674
|
stripe_tax_enabled: boolean;
|
|
1675
|
+
/**
|
|
1676
|
+
* The store's selling currency (lowercase ISO 4217). Every stored amount — prices, shipping rates, thresholds — is in MINOR units of this currency.
|
|
1677
|
+
*/
|
|
1678
|
+
currency: string;
|
|
1365
1679
|
created_at: string;
|
|
1366
1680
|
updated_at: string;
|
|
1367
1681
|
};
|
|
@@ -1395,6 +1709,37 @@ type CreateSite = {
|
|
|
1395
1709
|
*/
|
|
1396
1710
|
domains?: Array<string>;
|
|
1397
1711
|
};
|
|
1712
|
+
type CurrencyRestatement = {
|
|
1713
|
+
applied: boolean;
|
|
1714
|
+
from: string;
|
|
1715
|
+
to: string;
|
|
1716
|
+
/**
|
|
1717
|
+
* Why the change did not apply (first reason when several rows block).
|
|
1718
|
+
*/
|
|
1719
|
+
reason?: string;
|
|
1720
|
+
/**
|
|
1721
|
+
* 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.
|
|
1722
|
+
*/
|
|
1723
|
+
reasons?: Array<string>;
|
|
1724
|
+
/**
|
|
1725
|
+
* 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.
|
|
1726
|
+
*/
|
|
1727
|
+
blockedBy?: "orders" | "amounts" | "concurrent";
|
|
1728
|
+
skipped?: "unsupported" | "merchant_set";
|
|
1729
|
+
/**
|
|
1730
|
+
* 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).
|
|
1731
|
+
*/
|
|
1732
|
+
retryable?: boolean;
|
|
1733
|
+
products?: number;
|
|
1734
|
+
variants?: number;
|
|
1735
|
+
/**
|
|
1736
|
+
* The change also pinned the currency as merchant-chosen.
|
|
1737
|
+
*/
|
|
1738
|
+
pinned?: boolean;
|
|
1739
|
+
};
|
|
1740
|
+
type SiteWithRestatement = Site & {
|
|
1741
|
+
currency_restatement?: CurrencyRestatement;
|
|
1742
|
+
};
|
|
1398
1743
|
type ShippingRateInput = {
|
|
1399
1744
|
/**
|
|
1400
1745
|
* 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 +1752,10 @@ type ShippingRateInput = {
|
|
|
1407
1752
|
};
|
|
1408
1753
|
type UpdateSite = {
|
|
1409
1754
|
name?: string;
|
|
1755
|
+
/**
|
|
1756
|
+
* 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.
|
|
1757
|
+
*/
|
|
1758
|
+
currency?: string;
|
|
1410
1759
|
default_email_recipients?: Array<string>;
|
|
1411
1760
|
/**
|
|
1412
1761
|
* 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.
|
|
@@ -1572,6 +1921,38 @@ type PublicVariant = {
|
|
|
1572
1921
|
*/
|
|
1573
1922
|
available: number | null;
|
|
1574
1923
|
};
|
|
1924
|
+
type PublicSubscriptionPlan = {
|
|
1925
|
+
id: string;
|
|
1926
|
+
interval: "week" | "month" | "year";
|
|
1927
|
+
interval_count: number;
|
|
1928
|
+
title: string | null;
|
|
1929
|
+
position: number;
|
|
1930
|
+
/**
|
|
1931
|
+
* 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.
|
|
1932
|
+
*/
|
|
1933
|
+
percent_off_bps: number | null;
|
|
1934
|
+
/**
|
|
1935
|
+
* Absolute recurring price in minor units of the store's BASE currency (never localized).
|
|
1936
|
+
*/
|
|
1937
|
+
unit_amount: number | null;
|
|
1938
|
+
};
|
|
1939
|
+
/**
|
|
1940
|
+
* 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.
|
|
1941
|
+
*/
|
|
1942
|
+
type PublicSubscription = {
|
|
1943
|
+
/**
|
|
1944
|
+
* true: the product can ONLY be bought through a plan — hide the one-time buy path.
|
|
1945
|
+
*/
|
|
1946
|
+
required: boolean;
|
|
1947
|
+
/**
|
|
1948
|
+
* Whether subscription checkout would be accepted right now (payments active AND the published site serves /account). false: render plans but degrade the subscribe CTA.
|
|
1949
|
+
*/
|
|
1950
|
+
ready: boolean;
|
|
1951
|
+
/**
|
|
1952
|
+
* Active selling plans in display order.
|
|
1953
|
+
*/
|
|
1954
|
+
plans: Array<PublicSubscriptionPlan>;
|
|
1955
|
+
} | null;
|
|
1575
1956
|
type PublicProduct = {
|
|
1576
1957
|
id: string;
|
|
1577
1958
|
name: string;
|
|
@@ -1635,6 +2016,7 @@ type PublicProduct = {
|
|
|
1635
2016
|
* Active purchasable variants with price + availability. One entry for single-variant products.
|
|
1636
2017
|
*/
|
|
1637
2018
|
variants: Array<PublicVariant>;
|
|
2019
|
+
subscription: PublicSubscription;
|
|
1638
2020
|
};
|
|
1639
2021
|
type CheckoutResult = {
|
|
1640
2022
|
/**
|
|
@@ -1655,6 +2037,10 @@ type CheckoutRequest = {
|
|
|
1655
2037
|
* Defaults to 1. Must be within [1, max_quantity]. Custom-amount products are always quantity 1.
|
|
1656
2038
|
*/
|
|
1657
2039
|
quantity?: number;
|
|
2040
|
+
/**
|
|
2041
|
+
* 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.
|
|
2042
|
+
*/
|
|
2043
|
+
plan_id?: string;
|
|
1658
2044
|
/**
|
|
1659
2045
|
* 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
2046
|
*/
|
|
@@ -1689,9 +2075,9 @@ type CheckoutRequest = {
|
|
|
1689
2075
|
type CartConflictItem = {
|
|
1690
2076
|
variant_id: string;
|
|
1691
2077
|
/**
|
|
1692
|
-
* Exactly one code per conflicted line, most-actionable-wins: unavailable > insufficient_stock > quantity_exceeds_max > price_changed.
|
|
2078
|
+
* 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
2079
|
*/
|
|
1694
|
-
code: "unavailable" | "insufficient_stock" | "price_changed" | "quantity_exceeds_max";
|
|
2080
|
+
code: "unavailable" | "subscription_only" | "insufficient_stock" | "price_changed" | "quantity_exceeds_max";
|
|
1695
2081
|
/**
|
|
1696
2082
|
* insufficient_stock only: units currently available (never negative).
|
|
1697
2083
|
*/
|
|
@@ -1836,7 +2222,7 @@ type CartSummaryResult = {
|
|
|
1836
2222
|
*/
|
|
1837
2223
|
total_is_final: boolean;
|
|
1838
2224
|
/**
|
|
1839
|
-
* Lines that no longer resolve (deleted, deactivated, or
|
|
2225
|
+
* 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
2226
|
*/
|
|
1841
2227
|
unavailable_variant_ids: Array<string>;
|
|
1842
2228
|
};
|
|
@@ -1930,6 +2316,22 @@ type OrderSessionStatus = {
|
|
|
1930
2316
|
*/
|
|
1931
2317
|
refund_reason?: "oversold" | "merchant";
|
|
1932
2318
|
}>;
|
|
2319
|
+
/**
|
|
2320
|
+
* 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.
|
|
2321
|
+
*/
|
|
2322
|
+
source?: string;
|
|
2323
|
+
/**
|
|
2324
|
+
* Present only on subscription signup orders (source 'subscription'): the renewal terms the confirmation page states — 'renews every {interval_count} {interval} at {amount}'.
|
|
2325
|
+
*/
|
|
2326
|
+
subscription?: {
|
|
2327
|
+
interval: "week" | "month" | "year";
|
|
2328
|
+
interval_count: number;
|
|
2329
|
+
/**
|
|
2330
|
+
* The locked recurring charge in minor units of `currency` — what every future cycle bills (the signup's plan snapshot, immune to later plan edits).
|
|
2331
|
+
*/
|
|
2332
|
+
amount: number;
|
|
2333
|
+
currency: string;
|
|
2334
|
+
};
|
|
1933
2335
|
};
|
|
1934
2336
|
type GeoSuggestion = {
|
|
1935
2337
|
/**
|
|
@@ -1937,45 +2339,234 @@ type GeoSuggestion = {
|
|
|
1937
2339
|
*/
|
|
1938
2340
|
country: string | null;
|
|
1939
2341
|
};
|
|
1940
|
-
type
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
2342
|
+
type AccountLoginResult = {
|
|
2343
|
+
ok: true;
|
|
2344
|
+
};
|
|
2345
|
+
type AccountLoginRequest = {
|
|
2346
|
+
email: string;
|
|
2347
|
+
};
|
|
2348
|
+
type AccountVerifyResult = {
|
|
2349
|
+
/**
|
|
2350
|
+
* 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.
|
|
2351
|
+
*/
|
|
2352
|
+
token: string;
|
|
2353
|
+
customer: {
|
|
2354
|
+
email: string;
|
|
2355
|
+
name: string | null;
|
|
1944
2356
|
};
|
|
1945
|
-
|
|
1946
|
-
url: "/api/v1/sites/{siteId}/payments";
|
|
2357
|
+
expires_at: string;
|
|
1947
2358
|
};
|
|
1948
|
-
type
|
|
2359
|
+
type AccountVerifyRequest = {
|
|
2360
|
+
code: string;
|
|
2361
|
+
};
|
|
2362
|
+
type AccountLogoutResult = {
|
|
2363
|
+
ok: true;
|
|
2364
|
+
};
|
|
2365
|
+
type SubscriberSubscription = {
|
|
2366
|
+
id: string;
|
|
1949
2367
|
/**
|
|
1950
|
-
*
|
|
2368
|
+
* Stripe subscription status, mirrored verbatim ('active', 'past_due', 'canceled', ...). past_due after a cancel means no further charges will be attempted.
|
|
1951
2369
|
*/
|
|
1952
|
-
|
|
2370
|
+
status: string;
|
|
2371
|
+
plan_title: string | null;
|
|
2372
|
+
plan_interval: string;
|
|
2373
|
+
plan_interval_count: number;
|
|
1953
2374
|
/**
|
|
1954
|
-
*
|
|
2375
|
+
* Locked signup recurring amount, minor units (grandfathering record).
|
|
1955
2376
|
*/
|
|
1956
|
-
|
|
2377
|
+
plan_amount: number;
|
|
1957
2378
|
/**
|
|
1958
|
-
*
|
|
2379
|
+
* Current recurring amount, minor units (Dashboard repricing mirrors here).
|
|
1959
2380
|
*/
|
|
1960
|
-
|
|
2381
|
+
current_amount: number;
|
|
2382
|
+
currency: string;
|
|
1961
2383
|
/**
|
|
1962
|
-
*
|
|
2384
|
+
* End of the paid-through period — the lapse date after a cancel.
|
|
1963
2385
|
*/
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
type UpdateSitePaymentsResponses = {
|
|
2386
|
+
current_period_end: string | null;
|
|
2387
|
+
cancel_at_period_end: boolean;
|
|
2388
|
+
canceled_at: string | null;
|
|
1968
2389
|
/**
|
|
1969
|
-
*
|
|
2390
|
+
* Terminal: the subscription is over (or its store was torn down) and cannot be reactivated — 'resubscribe' is the only path.
|
|
1970
2391
|
*/
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
type
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
2392
|
+
ended: boolean;
|
|
2393
|
+
is_test: boolean;
|
|
2394
|
+
};
|
|
2395
|
+
type AccountMeResult = {
|
|
2396
|
+
customer: {
|
|
2397
|
+
email: string;
|
|
2398
|
+
name: string | null;
|
|
2399
|
+
};
|
|
2400
|
+
site: {
|
|
2401
|
+
name: string | null;
|
|
2402
|
+
};
|
|
2403
|
+
orders: Array<{
|
|
2404
|
+
id: string;
|
|
2405
|
+
order_number: number | null;
|
|
2406
|
+
status: string;
|
|
2407
|
+
/**
|
|
2408
|
+
* 'checkout' for a one-time order, 'subscription' for a signup or renewal.
|
|
2409
|
+
*/
|
|
2410
|
+
source: string;
|
|
2411
|
+
amount_total: number;
|
|
2412
|
+
shipping_total: number | null;
|
|
2413
|
+
tax_total: number | null;
|
|
2414
|
+
currency: string;
|
|
2415
|
+
created_at: string;
|
|
2416
|
+
line_items: Array<{
|
|
2417
|
+
name: string | null;
|
|
2418
|
+
quantity: number | null;
|
|
2419
|
+
unit_amount: number | null;
|
|
2420
|
+
}>;
|
|
2421
|
+
}>;
|
|
2422
|
+
subscriptions: Array<SubscriberSubscription>;
|
|
2423
|
+
};
|
|
2424
|
+
type AccountSubscribeRequest = {
|
|
2425
|
+
product_id: string;
|
|
2426
|
+
plan_id: string;
|
|
2427
|
+
variant_id?: string;
|
|
2428
|
+
success_url: string;
|
|
2429
|
+
cancel_url: string;
|
|
2430
|
+
};
|
|
2431
|
+
type SubscriberActionResult = {
|
|
2432
|
+
subscription: SubscriberSubscription;
|
|
2433
|
+
};
|
|
2434
|
+
type UpdateSubscriptionAddressRequest = {
|
|
2435
|
+
/**
|
|
2436
|
+
* Stripe shipping_details shape.
|
|
2437
|
+
*/
|
|
2438
|
+
shipping_address: {
|
|
2439
|
+
name?: string;
|
|
2440
|
+
address: {
|
|
2441
|
+
line1: string;
|
|
2442
|
+
line2?: string;
|
|
2443
|
+
city?: string;
|
|
2444
|
+
state?: string;
|
|
2445
|
+
postal_code?: string;
|
|
2446
|
+
country: string;
|
|
2447
|
+
};
|
|
2448
|
+
};
|
|
2449
|
+
};
|
|
2450
|
+
type PortalSessionResult = {
|
|
2451
|
+
/**
|
|
2452
|
+
* Stripe Billing Portal session URL — top-level navigate the buyer there.
|
|
2453
|
+
*/
|
|
2454
|
+
url: string;
|
|
2455
|
+
};
|
|
2456
|
+
type ManagedSubscription = {
|
|
2457
|
+
id: string;
|
|
2458
|
+
status: string;
|
|
2459
|
+
plan_title: string | null;
|
|
2460
|
+
plan_interval: string;
|
|
2461
|
+
plan_interval_count: number;
|
|
2462
|
+
plan_amount: number;
|
|
2463
|
+
current_amount: number;
|
|
2464
|
+
currency: string;
|
|
2465
|
+
current_period_end: string | null;
|
|
2466
|
+
cancel_at_period_end: boolean;
|
|
2467
|
+
canceled_at: string | null;
|
|
2468
|
+
ended: boolean;
|
|
2469
|
+
is_test: boolean;
|
|
2470
|
+
shipping_name: string | null;
|
|
2471
|
+
shipping_city: string | null;
|
|
2472
|
+
};
|
|
2473
|
+
type ManageVerifyResult = {
|
|
2474
|
+
manage_token: string;
|
|
2475
|
+
expires_at: string;
|
|
2476
|
+
subscription: ManagedSubscription;
|
|
2477
|
+
};
|
|
2478
|
+
type ManageVerifyRequest = {
|
|
2479
|
+
manage_code: string;
|
|
2480
|
+
};
|
|
2481
|
+
type ManagedSubscriptionResult = {
|
|
2482
|
+
subscription: ManagedSubscription;
|
|
2483
|
+
site: {
|
|
2484
|
+
name: string;
|
|
2485
|
+
};
|
|
2486
|
+
};
|
|
2487
|
+
type ManageCancelResult = {
|
|
2488
|
+
subscription: ManagedSubscription;
|
|
2489
|
+
};
|
|
2490
|
+
type ManageLinkAction = {
|
|
2491
|
+
action: "view" | "confirm_cancel" | "cancel" | "reactivate" | "card_update";
|
|
2492
|
+
/**
|
|
2493
|
+
* Must equal the path token (replay/tamper guard).
|
|
2494
|
+
*/
|
|
2495
|
+
token: string;
|
|
2496
|
+
};
|
|
2497
|
+
type UpdateSitePaymentsData = {
|
|
2498
|
+
body: UpdateSitePayments;
|
|
2499
|
+
path: {
|
|
2500
|
+
siteId: string;
|
|
2501
|
+
};
|
|
2502
|
+
query?: never;
|
|
2503
|
+
url: "/api/v1/sites/{siteId}/payments";
|
|
2504
|
+
};
|
|
2505
|
+
type UpdateSitePaymentsErrors = {
|
|
2506
|
+
/**
|
|
2507
|
+
* Invalid payment settings (e.g. unsupported currency)
|
|
2508
|
+
*/
|
|
2509
|
+
400: Error;
|
|
2510
|
+
/**
|
|
2511
|
+
* Unauthorized
|
|
2512
|
+
*/
|
|
2513
|
+
401: Error;
|
|
2514
|
+
/**
|
|
2515
|
+
* Forbidden - site tokens cannot modify payment settings
|
|
2516
|
+
*/
|
|
2517
|
+
403: Error;
|
|
2518
|
+
/**
|
|
2519
|
+
* Site not found
|
|
2520
|
+
*/
|
|
2521
|
+
404: Error;
|
|
2522
|
+
};
|
|
2523
|
+
type UpdateSitePaymentsError = UpdateSitePaymentsErrors[keyof UpdateSitePaymentsErrors];
|
|
2524
|
+
type UpdateSitePaymentsResponses = {
|
|
2525
|
+
/**
|
|
2526
|
+
* Site payment settings updated
|
|
2527
|
+
*/
|
|
2528
|
+
200: SitePayments;
|
|
2529
|
+
};
|
|
2530
|
+
type UpdateSitePaymentsResponse = UpdateSitePaymentsResponses[keyof UpdateSitePaymentsResponses];
|
|
2531
|
+
type UpdateSiteAccountRouteData = {
|
|
2532
|
+
body: UpdateSiteAccountRoute;
|
|
2533
|
+
path: {
|
|
2534
|
+
siteId: string;
|
|
2535
|
+
};
|
|
2536
|
+
query?: never;
|
|
2537
|
+
url: "/api/v1/sites/{siteId}/account-route";
|
|
2538
|
+
};
|
|
2539
|
+
type UpdateSiteAccountRouteErrors = {
|
|
2540
|
+
/**
|
|
2541
|
+
* Unauthorized
|
|
2542
|
+
*/
|
|
2543
|
+
401: Error;
|
|
2544
|
+
/**
|
|
2545
|
+
* Forbidden - site tokens cannot set account-route readiness
|
|
2546
|
+
*/
|
|
2547
|
+
403: Error;
|
|
2548
|
+
/**
|
|
2549
|
+
* Site not found
|
|
2550
|
+
*/
|
|
2551
|
+
404: Error;
|
|
2552
|
+
/**
|
|
2553
|
+
* ready:true while the customer-account surface is disabled (code account_surface_disabled)
|
|
2554
|
+
*/
|
|
2555
|
+
409: Error;
|
|
2556
|
+
};
|
|
2557
|
+
type UpdateSiteAccountRouteError = UpdateSiteAccountRouteErrors[keyof UpdateSiteAccountRouteErrors];
|
|
2558
|
+
type UpdateSiteAccountRouteResponses = {
|
|
2559
|
+
/**
|
|
2560
|
+
* Account-route readiness updated
|
|
2561
|
+
*/
|
|
2562
|
+
200: SiteAccountRoute;
|
|
2563
|
+
};
|
|
2564
|
+
type UpdateSiteAccountRouteResponse = UpdateSiteAccountRouteResponses[keyof UpdateSiteAccountRouteResponses];
|
|
2565
|
+
type GetPaymentsStatusData = {
|
|
2566
|
+
body?: never;
|
|
2567
|
+
path?: never;
|
|
2568
|
+
query?: never;
|
|
2569
|
+
url: "/api/v1/payments/status";
|
|
1979
2570
|
};
|
|
1980
2571
|
type GetPaymentsStatusErrors = {
|
|
1981
2572
|
/**
|
|
@@ -2228,6 +2819,40 @@ type AttachProductFileResponses = {
|
|
|
2228
2819
|
200: Product;
|
|
2229
2820
|
};
|
|
2230
2821
|
type AttachProductFileResponse = AttachProductFileResponses[keyof AttachProductFileResponses];
|
|
2822
|
+
type SetProductSubscriptionData = {
|
|
2823
|
+
body: SetProductSubscription;
|
|
2824
|
+
path: {
|
|
2825
|
+
productId: string;
|
|
2826
|
+
};
|
|
2827
|
+
query?: never;
|
|
2828
|
+
url: "/api/v1/products/{productId}/subscription";
|
|
2829
|
+
};
|
|
2830
|
+
type SetProductSubscriptionErrors = {
|
|
2831
|
+
/**
|
|
2832
|
+
* Invalid plan set (bounds, exactly-one pricing rule, interval bound, floor matrix) — the error names the offending plan and carries a machine code
|
|
2833
|
+
*/
|
|
2834
|
+
400: Error;
|
|
2835
|
+
/**
|
|
2836
|
+
* Unauthorized
|
|
2837
|
+
*/
|
|
2838
|
+
401: Error;
|
|
2839
|
+
/**
|
|
2840
|
+
* Product not found
|
|
2841
|
+
*/
|
|
2842
|
+
404: Error;
|
|
2843
|
+
/**
|
|
2844
|
+
* Site payments not active (code payments_not_active) — connect Stripe first
|
|
2845
|
+
*/
|
|
2846
|
+
409: Error;
|
|
2847
|
+
};
|
|
2848
|
+
type SetProductSubscriptionError = SetProductSubscriptionErrors[keyof SetProductSubscriptionErrors];
|
|
2849
|
+
type SetProductSubscriptionResponses = {
|
|
2850
|
+
/**
|
|
2851
|
+
* Subscription config replaced
|
|
2852
|
+
*/
|
|
2853
|
+
200: ProductSubscriptionConfig;
|
|
2854
|
+
};
|
|
2855
|
+
type SetProductSubscriptionResponse = SetProductSubscriptionResponses[keyof SetProductSubscriptionResponses];
|
|
2231
2856
|
type CreateTestOrderData = {
|
|
2232
2857
|
body?: CreateTestOrder;
|
|
2233
2858
|
path: {
|
|
@@ -2262,6 +2887,44 @@ type CreateTestOrderResponses = {
|
|
|
2262
2887
|
200: TestOrderResult;
|
|
2263
2888
|
};
|
|
2264
2889
|
type CreateTestOrderResponse = CreateTestOrderResponses[keyof CreateTestOrderResponses];
|
|
2890
|
+
type CreateTestSubscriptionData = {
|
|
2891
|
+
body?: CreateTestSubscription;
|
|
2892
|
+
path: {
|
|
2893
|
+
productId: string;
|
|
2894
|
+
};
|
|
2895
|
+
query?: never;
|
|
2896
|
+
url: "/api/v1/products/{productId}/test-subscription";
|
|
2897
|
+
};
|
|
2898
|
+
type CreateTestSubscriptionErrors = {
|
|
2899
|
+
/**
|
|
2900
|
+
* Invalid variant, no active plans, inactive plan, or custom-amount product
|
|
2901
|
+
*/
|
|
2902
|
+
400: Error;
|
|
2903
|
+
/**
|
|
2904
|
+
* Unauthorized
|
|
2905
|
+
*/
|
|
2906
|
+
401: Error;
|
|
2907
|
+
/**
|
|
2908
|
+
* Site tokens are not permitted — org API key only
|
|
2909
|
+
*/
|
|
2910
|
+
403: Error;
|
|
2911
|
+
/**
|
|
2912
|
+
* Product or plan not found
|
|
2913
|
+
*/
|
|
2914
|
+
404: Error;
|
|
2915
|
+
/**
|
|
2916
|
+
* Test customer record could not be created
|
|
2917
|
+
*/
|
|
2918
|
+
500: Error;
|
|
2919
|
+
};
|
|
2920
|
+
type CreateTestSubscriptionError = CreateTestSubscriptionErrors[keyof CreateTestSubscriptionErrors];
|
|
2921
|
+
type CreateTestSubscriptionResponses = {
|
|
2922
|
+
/**
|
|
2923
|
+
* Test subscription and signup order created
|
|
2924
|
+
*/
|
|
2925
|
+
200: TestSubscriptionResult;
|
|
2926
|
+
};
|
|
2927
|
+
type CreateTestSubscriptionResponse = CreateTestSubscriptionResponses[keyof CreateTestSubscriptionResponses];
|
|
2265
2928
|
type CreateMultiItemTestOrderData = {
|
|
2266
2929
|
body: CreateMultiItemTestOrder;
|
|
2267
2930
|
path?: never;
|
|
@@ -2358,6 +3021,40 @@ type SetProductVariantsResponses = {
|
|
|
2358
3021
|
200: SetProductVariantsResult;
|
|
2359
3022
|
};
|
|
2360
3023
|
type SetProductVariantsResponse = SetProductVariantsResponses[keyof SetProductVariantsResponses];
|
|
3024
|
+
type GenerateVariantsData = {
|
|
3025
|
+
body: GenerateVariants;
|
|
3026
|
+
path: {
|
|
3027
|
+
productId: string;
|
|
3028
|
+
};
|
|
3029
|
+
query?: never;
|
|
3030
|
+
url: "/api/v1/products/{productId}/variants/generate";
|
|
3031
|
+
};
|
|
3032
|
+
type GenerateVariantsErrors = {
|
|
3033
|
+
/**
|
|
3034
|
+
* Invalid axes or rule, a new axis on a product with variants, or the generation would exceed the variant cap — nothing was created
|
|
3035
|
+
*/
|
|
3036
|
+
400: Error;
|
|
3037
|
+
/**
|
|
3038
|
+
* Unauthorized
|
|
3039
|
+
*/
|
|
3040
|
+
401: Error;
|
|
3041
|
+
/**
|
|
3042
|
+
* Product not found
|
|
3043
|
+
*/
|
|
3044
|
+
404: Error;
|
|
3045
|
+
/**
|
|
3046
|
+
* matrix_version is stale — the body carries the current matrix; rebuild the axes from it
|
|
3047
|
+
*/
|
|
3048
|
+
409: SetProductVariantsConflict;
|
|
3049
|
+
};
|
|
3050
|
+
type GenerateVariantsError = GenerateVariantsErrors[keyof GenerateVariantsErrors];
|
|
3051
|
+
type GenerateVariantsResponses = {
|
|
3052
|
+
/**
|
|
3053
|
+
* Grid generated — the full detail (with the fresh matrix_version) plus created/skipped/excluded counts
|
|
3054
|
+
*/
|
|
3055
|
+
200: GenerateVariantsResult;
|
|
3056
|
+
};
|
|
3057
|
+
type GenerateVariantsResponse = GenerateVariantsResponses[keyof GenerateVariantsResponses];
|
|
2361
3058
|
type DeleteVariantData = {
|
|
2362
3059
|
body?: never;
|
|
2363
3060
|
path: {
|
|
@@ -2929,6 +3626,36 @@ type UpdateCustomerResponses = {
|
|
|
2929
3626
|
200: Customer;
|
|
2930
3627
|
};
|
|
2931
3628
|
type UpdateCustomerResponse = UpdateCustomerResponses[keyof UpdateCustomerResponses];
|
|
3629
|
+
type RevokeCustomerAccessData = {
|
|
3630
|
+
body?: never;
|
|
3631
|
+
path: {
|
|
3632
|
+
customerId: string;
|
|
3633
|
+
};
|
|
3634
|
+
query?: never;
|
|
3635
|
+
url: "/api/v1/customers/{customerId}/revoke-access";
|
|
3636
|
+
};
|
|
3637
|
+
type RevokeCustomerAccessErrors = {
|
|
3638
|
+
/**
|
|
3639
|
+
* Unauthorized
|
|
3640
|
+
*/
|
|
3641
|
+
401: Error;
|
|
3642
|
+
/**
|
|
3643
|
+
* Forbidden — site tokens cannot revoke customer credentials
|
|
3644
|
+
*/
|
|
3645
|
+
403: Error;
|
|
3646
|
+
/**
|
|
3647
|
+
* Customer not found
|
|
3648
|
+
*/
|
|
3649
|
+
404: Error;
|
|
3650
|
+
};
|
|
3651
|
+
type RevokeCustomerAccessError = RevokeCustomerAccessErrors[keyof RevokeCustomerAccessErrors];
|
|
3652
|
+
type RevokeCustomerAccessResponses = {
|
|
3653
|
+
/**
|
|
3654
|
+
* Credentials burned (counts are for this call only)
|
|
3655
|
+
*/
|
|
3656
|
+
200: RevokeCustomerAccessResult;
|
|
3657
|
+
};
|
|
3658
|
+
type RevokeCustomerAccessResponse = RevokeCustomerAccessResponses[keyof RevokeCustomerAccessResponses];
|
|
2932
3659
|
type GetBusinessSummaryData = {
|
|
2933
3660
|
body?: never;
|
|
2934
3661
|
path?: never;
|
|
@@ -3138,61 +3865,221 @@ type SetOrderFulfillmentResponses = {
|
|
|
3138
3865
|
200: Order;
|
|
3139
3866
|
};
|
|
3140
3867
|
type SetOrderFulfillmentResponse = SetOrderFulfillmentResponses[keyof SetOrderFulfillmentResponses];
|
|
3141
|
-
type
|
|
3868
|
+
type ListSubscriptionsData = {
|
|
3142
3869
|
body?: never;
|
|
3143
3870
|
path?: never;
|
|
3144
|
-
query?:
|
|
3145
|
-
|
|
3871
|
+
query?: {
|
|
3872
|
+
/**
|
|
3873
|
+
* Required with an org key (sk_xxx); must match the token's site when using a site token.
|
|
3874
|
+
*/
|
|
3875
|
+
site_id?: string;
|
|
3876
|
+
/**
|
|
3877
|
+
* Exact status filter (verbatim Stripe values).
|
|
3878
|
+
*/
|
|
3879
|
+
status?: string;
|
|
3880
|
+
/**
|
|
3881
|
+
* Max rows (default 50, max 100).
|
|
3882
|
+
*/
|
|
3883
|
+
limit?: string;
|
|
3884
|
+
offset?: string;
|
|
3885
|
+
};
|
|
3886
|
+
url: "/api/v1/subscriptions";
|
|
3146
3887
|
};
|
|
3147
|
-
type
|
|
3888
|
+
type ListSubscriptionsErrors = {
|
|
3148
3889
|
/**
|
|
3149
|
-
*
|
|
3890
|
+
* site_id mismatch / does not belong to this organization
|
|
3150
3891
|
*/
|
|
3151
|
-
|
|
3892
|
+
400: unknown;
|
|
3152
3893
|
/**
|
|
3153
|
-
*
|
|
3894
|
+
* Missing or invalid token
|
|
3154
3895
|
*/
|
|
3155
|
-
|
|
3896
|
+
401: unknown;
|
|
3156
3897
|
};
|
|
3157
|
-
type
|
|
3158
|
-
type ListFormsWithSiteTokenResponses = {
|
|
3898
|
+
type ListSubscriptionsResponses = {
|
|
3159
3899
|
/**
|
|
3160
|
-
*
|
|
3900
|
+
* The subscriptions
|
|
3161
3901
|
*/
|
|
3162
|
-
200:
|
|
3902
|
+
200: SubscriptionsList;
|
|
3163
3903
|
};
|
|
3164
|
-
type
|
|
3165
|
-
type
|
|
3166
|
-
body
|
|
3167
|
-
path
|
|
3904
|
+
type ListSubscriptionsResponse = ListSubscriptionsResponses[keyof ListSubscriptionsResponses];
|
|
3905
|
+
type CancelSubscriptionData = {
|
|
3906
|
+
body?: never;
|
|
3907
|
+
path: {
|
|
3908
|
+
subscriptionId: string;
|
|
3909
|
+
};
|
|
3168
3910
|
query?: never;
|
|
3169
|
-
url: "/api/v1/
|
|
3911
|
+
url: "/api/v1/subscriptions/{subscriptionId}/cancel";
|
|
3170
3912
|
};
|
|
3171
|
-
type
|
|
3913
|
+
type CancelSubscriptionErrors = {
|
|
3172
3914
|
/**
|
|
3173
|
-
*
|
|
3915
|
+
* Site tokens are not permitted
|
|
3174
3916
|
*/
|
|
3175
|
-
|
|
3917
|
+
403: unknown;
|
|
3176
3918
|
/**
|
|
3177
|
-
*
|
|
3919
|
+
* Subscription not found (or belongs to another org)
|
|
3178
3920
|
*/
|
|
3179
|
-
|
|
3921
|
+
404: unknown;
|
|
3180
3922
|
/**
|
|
3181
|
-
*
|
|
3923
|
+
* Subscription already ended (code ended) — terminal locally, or Stripe says it is already canceled
|
|
3182
3924
|
*/
|
|
3183
|
-
|
|
3925
|
+
409: unknown;
|
|
3926
|
+
/**
|
|
3927
|
+
* Stripe unreachable — retry
|
|
3928
|
+
*/
|
|
3929
|
+
502: unknown;
|
|
3184
3930
|
};
|
|
3185
|
-
type
|
|
3186
|
-
type CreateFormWithSiteTokenResponses = {
|
|
3931
|
+
type CancelSubscriptionResponses = {
|
|
3187
3932
|
/**
|
|
3188
|
-
*
|
|
3933
|
+
* The updated subscription
|
|
3189
3934
|
*/
|
|
3190
|
-
|
|
3935
|
+
200: SubscriptionSummary;
|
|
3191
3936
|
};
|
|
3192
|
-
type
|
|
3193
|
-
type
|
|
3194
|
-
body?:
|
|
3195
|
-
path
|
|
3937
|
+
type CancelSubscriptionResponse = CancelSubscriptionResponses[keyof CancelSubscriptionResponses];
|
|
3938
|
+
type TeardownSiteSubscriptionsData = {
|
|
3939
|
+
body?: SubscriptionsTeardownBody;
|
|
3940
|
+
path: {
|
|
3941
|
+
siteId: string;
|
|
3942
|
+
};
|
|
3943
|
+
query?: never;
|
|
3944
|
+
url: "/api/v1/sites/{siteId}/subscriptions/teardown";
|
|
3945
|
+
};
|
|
3946
|
+
type TeardownSiteSubscriptionsErrors = {
|
|
3947
|
+
/**
|
|
3948
|
+
* Site tokens are not permitted
|
|
3949
|
+
*/
|
|
3950
|
+
403: unknown;
|
|
3951
|
+
/**
|
|
3952
|
+
* 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).
|
|
3953
|
+
*/
|
|
3954
|
+
404: Error;
|
|
3955
|
+
};
|
|
3956
|
+
type TeardownSiteSubscriptionsError = TeardownSiteSubscriptionsErrors[keyof TeardownSiteSubscriptionsErrors];
|
|
3957
|
+
type TeardownSiteSubscriptionsResponses = {
|
|
3958
|
+
/**
|
|
3959
|
+
* Teardown outcome
|
|
3960
|
+
*/
|
|
3961
|
+
200: SubscriptionsTeardownResult;
|
|
3962
|
+
};
|
|
3963
|
+
type TeardownSiteSubscriptionsResponse = TeardownSiteSubscriptionsResponses[keyof TeardownSiteSubscriptionsResponses];
|
|
3964
|
+
type ReactivateSiteSubscriptionsTeardownData = {
|
|
3965
|
+
body?: SubscriptionsReactivateBody;
|
|
3966
|
+
path: {
|
|
3967
|
+
siteId: string;
|
|
3968
|
+
};
|
|
3969
|
+
query?: never;
|
|
3970
|
+
url: "/api/v1/sites/{siteId}/subscriptions/reactivate-teardown";
|
|
3971
|
+
};
|
|
3972
|
+
type ReactivateSiteSubscriptionsTeardownErrors = {
|
|
3973
|
+
/**
|
|
3974
|
+
* Unknown key in the body (a misspelled `reason` is refused, never ignored)
|
|
3975
|
+
*/
|
|
3976
|
+
400: Error;
|
|
3977
|
+
/**
|
|
3978
|
+
* Site tokens are not permitted
|
|
3979
|
+
*/
|
|
3980
|
+
403: unknown;
|
|
3981
|
+
/**
|
|
3982
|
+
* 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).
|
|
3983
|
+
*/
|
|
3984
|
+
404: Error;
|
|
3985
|
+
};
|
|
3986
|
+
type ReactivateSiteSubscriptionsTeardownError = ReactivateSiteSubscriptionsTeardownErrors[keyof ReactivateSiteSubscriptionsTeardownErrors];
|
|
3987
|
+
type ReactivateSiteSubscriptionsTeardownResponses = {
|
|
3988
|
+
/**
|
|
3989
|
+
* Reactivation outcome
|
|
3990
|
+
*/
|
|
3991
|
+
200: SubscriptionsReactivateResult;
|
|
3992
|
+
};
|
|
3993
|
+
type ReactivateSiteSubscriptionsTeardownResponse = ReactivateSiteSubscriptionsTeardownResponses[keyof ReactivateSiteSubscriptionsTeardownResponses];
|
|
3994
|
+
type CreatePreviewSessionData = {
|
|
3995
|
+
body: CreatePreviewSession;
|
|
3996
|
+
path: {
|
|
3997
|
+
siteId: string;
|
|
3998
|
+
};
|
|
3999
|
+
query?: never;
|
|
4000
|
+
url: "/api/v1/sites/{siteId}/preview-session";
|
|
4001
|
+
};
|
|
4002
|
+
type CreatePreviewSessionErrors = {
|
|
4003
|
+
/**
|
|
4004
|
+
* Unauthorized
|
|
4005
|
+
*/
|
|
4006
|
+
401: unknown;
|
|
4007
|
+
/**
|
|
4008
|
+
* Site tokens are not permitted — org API key only
|
|
4009
|
+
*/
|
|
4010
|
+
403: unknown;
|
|
4011
|
+
/**
|
|
4012
|
+
* Site not found — `code` is 'site_not_found' (no such site) or 'site_not_accessible' (another organization's site).
|
|
4013
|
+
*/
|
|
4014
|
+
404: Error;
|
|
4015
|
+
/**
|
|
4016
|
+
* Preview customer record could not be created
|
|
4017
|
+
*/
|
|
4018
|
+
500: unknown;
|
|
4019
|
+
};
|
|
4020
|
+
type CreatePreviewSessionError = CreatePreviewSessionErrors[keyof CreatePreviewSessionErrors];
|
|
4021
|
+
type CreatePreviewSessionResponses = {
|
|
4022
|
+
/**
|
|
4023
|
+
* Preview session minted
|
|
4024
|
+
*/
|
|
4025
|
+
200: PreviewSessionResult;
|
|
4026
|
+
};
|
|
4027
|
+
type CreatePreviewSessionResponse = CreatePreviewSessionResponses[keyof CreatePreviewSessionResponses];
|
|
4028
|
+
type ListFormsWithSiteTokenData = {
|
|
4029
|
+
body?: never;
|
|
4030
|
+
path?: never;
|
|
4031
|
+
query?: never;
|
|
4032
|
+
url: "/api/v1/forms";
|
|
4033
|
+
};
|
|
4034
|
+
type ListFormsWithSiteTokenErrors = {
|
|
4035
|
+
/**
|
|
4036
|
+
* Unauthorized - requires site token
|
|
4037
|
+
*/
|
|
4038
|
+
401: Error;
|
|
4039
|
+
/**
|
|
4040
|
+
* Site not found
|
|
4041
|
+
*/
|
|
4042
|
+
404: Error;
|
|
4043
|
+
};
|
|
4044
|
+
type ListFormsWithSiteTokenError = ListFormsWithSiteTokenErrors[keyof ListFormsWithSiteTokenErrors];
|
|
4045
|
+
type ListFormsWithSiteTokenResponses = {
|
|
4046
|
+
/**
|
|
4047
|
+
* List of forms
|
|
4048
|
+
*/
|
|
4049
|
+
200: FormsList;
|
|
4050
|
+
};
|
|
4051
|
+
type ListFormsWithSiteTokenResponse = ListFormsWithSiteTokenResponses[keyof ListFormsWithSiteTokenResponses];
|
|
4052
|
+
type CreateFormWithSiteTokenData = {
|
|
4053
|
+
body: CreateForm;
|
|
4054
|
+
path?: never;
|
|
4055
|
+
query?: never;
|
|
4056
|
+
url: "/api/v1/forms";
|
|
4057
|
+
};
|
|
4058
|
+
type CreateFormWithSiteTokenErrors = {
|
|
4059
|
+
/**
|
|
4060
|
+
* Form name indicates credential/payment collection, which is not supported
|
|
4061
|
+
*/
|
|
4062
|
+
400: Error;
|
|
4063
|
+
/**
|
|
4064
|
+
* Unauthorized - requires site token
|
|
4065
|
+
*/
|
|
4066
|
+
401: Error;
|
|
4067
|
+
/**
|
|
4068
|
+
* Site not found
|
|
4069
|
+
*/
|
|
4070
|
+
404: Error;
|
|
4071
|
+
};
|
|
4072
|
+
type CreateFormWithSiteTokenError = CreateFormWithSiteTokenErrors[keyof CreateFormWithSiteTokenErrors];
|
|
4073
|
+
type CreateFormWithSiteTokenResponses = {
|
|
4074
|
+
/**
|
|
4075
|
+
* Form created successfully
|
|
4076
|
+
*/
|
|
4077
|
+
201: Form;
|
|
4078
|
+
};
|
|
4079
|
+
type CreateFormWithSiteTokenResponse = CreateFormWithSiteTokenResponses[keyof CreateFormWithSiteTokenResponses];
|
|
4080
|
+
type ListSitesData = {
|
|
4081
|
+
body?: never;
|
|
4082
|
+
path?: never;
|
|
3196
4083
|
query?: {
|
|
3197
4084
|
/**
|
|
3198
4085
|
* Exact match on the consumer-side id (the landingsite website id) — the lookup for "which aifeatures site is this website?"
|
|
@@ -3321,24 +4208,32 @@ type UpdateSiteData = {
|
|
|
3321
4208
|
};
|
|
3322
4209
|
type UpdateSiteErrors = {
|
|
3323
4210
|
/**
|
|
3324
|
-
* Invalid shipping configuration
|
|
4211
|
+
* 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
4212
|
*/
|
|
3326
4213
|
400: Error;
|
|
3327
4214
|
/**
|
|
3328
4215
|
* Unauthorized
|
|
3329
4216
|
*/
|
|
3330
4217
|
401: Error;
|
|
4218
|
+
/**
|
|
4219
|
+
* `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.
|
|
4220
|
+
*/
|
|
4221
|
+
403: Error;
|
|
3331
4222
|
/**
|
|
3332
4223
|
* Site not found
|
|
3333
4224
|
*/
|
|
3334
4225
|
404: Error;
|
|
4226
|
+
/**
|
|
4227
|
+
* Currency changed too recently — each accepted change restates the whole catalogue, so changes are rate-limited per site. Retry after the cooldown.
|
|
4228
|
+
*/
|
|
4229
|
+
429: Error;
|
|
3335
4230
|
};
|
|
3336
4231
|
type UpdateSiteError = UpdateSiteErrors[keyof UpdateSiteErrors];
|
|
3337
4232
|
type UpdateSiteResponses = {
|
|
3338
4233
|
/**
|
|
3339
|
-
* Site updated
|
|
4234
|
+
* 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
4235
|
*/
|
|
3341
|
-
200:
|
|
4236
|
+
200: SiteWithRestatement;
|
|
3342
4237
|
};
|
|
3343
4238
|
type UpdateSiteResponse = UpdateSiteResponses[keyof UpdateSiteResponses];
|
|
3344
4239
|
type GetSiteCheckoutPauseData = {
|
|
@@ -3739,7 +4634,7 @@ type CreateCheckoutErrors = {
|
|
|
3739
4634
|
*/
|
|
3740
4635
|
404: Error;
|
|
3741
4636
|
/**
|
|
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
|
|
4637
|
+
* 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
|
|
3743
4638
|
*/
|
|
3744
4639
|
409: Error;
|
|
3745
4640
|
/**
|
|
@@ -3776,7 +4671,7 @@ type CreateCartCheckoutErrors = {
|
|
|
3776
4671
|
code?: string;
|
|
3777
4672
|
};
|
|
3778
4673
|
/**
|
|
3779
|
-
* cart_conflict carrying every currently-known per-line conflict
|
|
4674
|
+
* 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
|
|
3780
4675
|
*/
|
|
3781
4676
|
409: CartConflict | ShippingOptionUnavailable | Error;
|
|
3782
4677
|
/**
|
|
@@ -3899,6 +4794,478 @@ type GetGeoResponses = {
|
|
|
3899
4794
|
200: GeoSuggestion;
|
|
3900
4795
|
};
|
|
3901
4796
|
type GetGeoResponse = GetGeoResponses[keyof GetGeoResponses];
|
|
4797
|
+
type AccountLoginData = {
|
|
4798
|
+
body: AccountLoginRequest;
|
|
4799
|
+
path?: never;
|
|
4800
|
+
query?: never;
|
|
4801
|
+
url: "/v1/account/login";
|
|
4802
|
+
};
|
|
4803
|
+
type AccountLoginErrors = {
|
|
4804
|
+
/**
|
|
4805
|
+
* Missing or malformed email
|
|
4806
|
+
*/
|
|
4807
|
+
400: Error;
|
|
4808
|
+
/**
|
|
4809
|
+
* Too many requests from this IP
|
|
4810
|
+
*/
|
|
4811
|
+
429: Error;
|
|
4812
|
+
/**
|
|
4813
|
+
* 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.
|
|
4814
|
+
*/
|
|
4815
|
+
500: Error;
|
|
4816
|
+
};
|
|
4817
|
+
type AccountLoginError = AccountLoginErrors[keyof AccountLoginErrors];
|
|
4818
|
+
type AccountLoginResponses = {
|
|
4819
|
+
/**
|
|
4820
|
+
* Accepted — a link may or may not have been sent (uniform by design)
|
|
4821
|
+
*/
|
|
4822
|
+
200: AccountLoginResult;
|
|
4823
|
+
};
|
|
4824
|
+
type AccountLoginResponse = AccountLoginResponses[keyof AccountLoginResponses];
|
|
4825
|
+
type AccountVerifyData = {
|
|
4826
|
+
body: AccountVerifyRequest;
|
|
4827
|
+
path?: never;
|
|
4828
|
+
query?: never;
|
|
4829
|
+
url: "/v1/account/verify";
|
|
4830
|
+
};
|
|
4831
|
+
type AccountVerifyErrors = {
|
|
4832
|
+
/**
|
|
4833
|
+
* Missing or malformed body
|
|
4834
|
+
*/
|
|
4835
|
+
400: Error;
|
|
4836
|
+
/**
|
|
4837
|
+
* Unknown, expired or already-used code (code invalid_code)
|
|
4838
|
+
*/
|
|
4839
|
+
401: Error;
|
|
4840
|
+
/**
|
|
4841
|
+
* Too many attempts from this IP
|
|
4842
|
+
*/
|
|
4843
|
+
429: Error;
|
|
4844
|
+
};
|
|
4845
|
+
type AccountVerifyError = AccountVerifyErrors[keyof AccountVerifyErrors];
|
|
4846
|
+
type AccountVerifyResponses = {
|
|
4847
|
+
/**
|
|
4848
|
+
* Signed in
|
|
4849
|
+
*/
|
|
4850
|
+
200: AccountVerifyResult;
|
|
4851
|
+
};
|
|
4852
|
+
type AccountVerifyResponse = AccountVerifyResponses[keyof AccountVerifyResponses];
|
|
4853
|
+
type AccountLogoutData = {
|
|
4854
|
+
body?: never;
|
|
4855
|
+
path?: never;
|
|
4856
|
+
query?: never;
|
|
4857
|
+
url: "/v1/account/logout";
|
|
4858
|
+
};
|
|
4859
|
+
type AccountLogoutErrors = {
|
|
4860
|
+
/**
|
|
4861
|
+
* Session expired (code session_expired)
|
|
4862
|
+
*/
|
|
4863
|
+
401: Error;
|
|
4864
|
+
/**
|
|
4865
|
+
* Wrong origin for this session (code origin_mismatch)
|
|
4866
|
+
*/
|
|
4867
|
+
403: Error;
|
|
4868
|
+
};
|
|
4869
|
+
type AccountLogoutError = AccountLogoutErrors[keyof AccountLogoutErrors];
|
|
4870
|
+
type AccountLogoutResponses = {
|
|
4871
|
+
/**
|
|
4872
|
+
* Signed out
|
|
4873
|
+
*/
|
|
4874
|
+
200: AccountLogoutResult;
|
|
4875
|
+
};
|
|
4876
|
+
type AccountLogoutResponse = AccountLogoutResponses[keyof AccountLogoutResponses];
|
|
4877
|
+
type AccountMeData = {
|
|
4878
|
+
body?: never;
|
|
4879
|
+
path?: never;
|
|
4880
|
+
query?: never;
|
|
4881
|
+
url: "/v1/account/me";
|
|
4882
|
+
};
|
|
4883
|
+
type AccountMeErrors = {
|
|
4884
|
+
/**
|
|
4885
|
+
* Session expired (code session_expired)
|
|
4886
|
+
*/
|
|
4887
|
+
401: Error;
|
|
4888
|
+
/**
|
|
4889
|
+
* Wrong origin for this session (code origin_mismatch)
|
|
4890
|
+
*/
|
|
4891
|
+
403: Error;
|
|
4892
|
+
};
|
|
4893
|
+
type AccountMeError = AccountMeErrors[keyof AccountMeErrors];
|
|
4894
|
+
type AccountMeResponses = {
|
|
4895
|
+
/**
|
|
4896
|
+
* The account shelf
|
|
4897
|
+
*/
|
|
4898
|
+
200: AccountMeResult;
|
|
4899
|
+
};
|
|
4900
|
+
type AccountMeResponse = AccountMeResponses[keyof AccountMeResponses];
|
|
4901
|
+
type AccountSubscribeData = {
|
|
4902
|
+
body: AccountSubscribeRequest;
|
|
4903
|
+
path?: never;
|
|
4904
|
+
query?: never;
|
|
4905
|
+
url: "/v1/account/subscribe";
|
|
4906
|
+
};
|
|
4907
|
+
type AccountSubscribeErrors = {
|
|
4908
|
+
/**
|
|
4909
|
+
* Invalid request (urls, variant, body shape)
|
|
4910
|
+
*/
|
|
4911
|
+
400: Error;
|
|
4912
|
+
/**
|
|
4913
|
+
* Session expired — sign in again (code session_expired)
|
|
4914
|
+
*/
|
|
4915
|
+
401: Error;
|
|
4916
|
+
/**
|
|
4917
|
+
* Wrong origin for this session (code origin_mismatch), or an editor preview session (code preview_session)
|
|
4918
|
+
*/
|
|
4919
|
+
403: Error;
|
|
4920
|
+
/**
|
|
4921
|
+
* Product not found on this site
|
|
4922
|
+
*/
|
|
4923
|
+
404: Error;
|
|
4924
|
+
/**
|
|
4925
|
+
* Plan/store not available (plan_not_available, subscription_not_ready, plan_currency_mismatch, store disabled)
|
|
4926
|
+
*/
|
|
4927
|
+
409: Error;
|
|
4928
|
+
/**
|
|
4929
|
+
* Too many requests from this IP
|
|
4930
|
+
*/
|
|
4931
|
+
429: Error;
|
|
4932
|
+
/**
|
|
4933
|
+
* Stripe rejected or failed the session creation
|
|
4934
|
+
*/
|
|
4935
|
+
502: Error;
|
|
4936
|
+
};
|
|
4937
|
+
type AccountSubscribeError = AccountSubscribeErrors[keyof AccountSubscribeErrors];
|
|
4938
|
+
type AccountSubscribeResponses = {
|
|
4939
|
+
/**
|
|
4940
|
+
* Checkout session created — redirect the buyer to url
|
|
4941
|
+
*/
|
|
4942
|
+
200: CheckoutResult;
|
|
4943
|
+
};
|
|
4944
|
+
type AccountSubscribeResponse = AccountSubscribeResponses[keyof AccountSubscribeResponses];
|
|
4945
|
+
type AccountCancelSubscriptionData = {
|
|
4946
|
+
body?: never;
|
|
4947
|
+
path: {
|
|
4948
|
+
subscriptionId: string;
|
|
4949
|
+
};
|
|
4950
|
+
query?: never;
|
|
4951
|
+
url: "/v1/account/subscriptions/{subscriptionId}/cancel";
|
|
4952
|
+
};
|
|
4953
|
+
type AccountCancelSubscriptionErrors = {
|
|
4954
|
+
/**
|
|
4955
|
+
* Session expired (code session_expired)
|
|
4956
|
+
*/
|
|
4957
|
+
401: Error;
|
|
4958
|
+
/**
|
|
4959
|
+
* Not this customer's subscription on this site
|
|
4960
|
+
*/
|
|
4961
|
+
404: Error;
|
|
4962
|
+
/**
|
|
4963
|
+
* Already ended (code ended)
|
|
4964
|
+
*/
|
|
4965
|
+
409: Error;
|
|
4966
|
+
/**
|
|
4967
|
+
* Too many requests from this IP
|
|
4968
|
+
*/
|
|
4969
|
+
429: Error;
|
|
4970
|
+
/**
|
|
4971
|
+
* Stripe failure — retry
|
|
4972
|
+
*/
|
|
4973
|
+
502: Error;
|
|
4974
|
+
};
|
|
4975
|
+
type AccountCancelSubscriptionError = AccountCancelSubscriptionErrors[keyof AccountCancelSubscriptionErrors];
|
|
4976
|
+
type AccountCancelSubscriptionResponses = {
|
|
4977
|
+
/**
|
|
4978
|
+
* Cancellation scheduled
|
|
4979
|
+
*/
|
|
4980
|
+
200: SubscriberActionResult;
|
|
4981
|
+
};
|
|
4982
|
+
type AccountCancelSubscriptionResponse = AccountCancelSubscriptionResponses[keyof AccountCancelSubscriptionResponses];
|
|
4983
|
+
type AccountReactivateSubscriptionData = {
|
|
4984
|
+
body?: never;
|
|
4985
|
+
path: {
|
|
4986
|
+
subscriptionId: string;
|
|
4987
|
+
};
|
|
4988
|
+
query?: never;
|
|
4989
|
+
url: "/v1/account/subscriptions/{subscriptionId}/reactivate";
|
|
4990
|
+
};
|
|
4991
|
+
type AccountReactivateSubscriptionErrors = {
|
|
4992
|
+
/**
|
|
4993
|
+
* Session expired (code session_expired)
|
|
4994
|
+
*/
|
|
4995
|
+
401: Error;
|
|
4996
|
+
/**
|
|
4997
|
+
* Not this customer's subscription on this site
|
|
4998
|
+
*/
|
|
4999
|
+
404: Error;
|
|
5000
|
+
/**
|
|
5001
|
+
* Ended — cannot be reactivated (code ended)
|
|
5002
|
+
*/
|
|
5003
|
+
409: Error;
|
|
5004
|
+
/**
|
|
5005
|
+
* Too many requests from this IP
|
|
5006
|
+
*/
|
|
5007
|
+
429: Error;
|
|
5008
|
+
/**
|
|
5009
|
+
* Stripe failure — retry
|
|
5010
|
+
*/
|
|
5011
|
+
502: Error;
|
|
5012
|
+
};
|
|
5013
|
+
type AccountReactivateSubscriptionError = AccountReactivateSubscriptionErrors[keyof AccountReactivateSubscriptionErrors];
|
|
5014
|
+
type AccountReactivateSubscriptionResponses = {
|
|
5015
|
+
/**
|
|
5016
|
+
* Subscription will continue
|
|
5017
|
+
*/
|
|
5018
|
+
200: SubscriberActionResult;
|
|
5019
|
+
};
|
|
5020
|
+
type AccountReactivateSubscriptionResponse = AccountReactivateSubscriptionResponses[keyof AccountReactivateSubscriptionResponses];
|
|
5021
|
+
type AccountUpdateSubscriptionAddressData = {
|
|
5022
|
+
body: UpdateSubscriptionAddressRequest;
|
|
5023
|
+
path: {
|
|
5024
|
+
subscriptionId: string;
|
|
5025
|
+
};
|
|
5026
|
+
query?: never;
|
|
5027
|
+
url: "/v1/account/subscriptions/{subscriptionId}/address";
|
|
5028
|
+
};
|
|
5029
|
+
type AccountUpdateSubscriptionAddressErrors = {
|
|
5030
|
+
/**
|
|
5031
|
+
* Invalid address shape
|
|
5032
|
+
*/
|
|
5033
|
+
400: Error;
|
|
5034
|
+
/**
|
|
5035
|
+
* Session expired (code session_expired)
|
|
5036
|
+
*/
|
|
5037
|
+
401: Error;
|
|
5038
|
+
/**
|
|
5039
|
+
* Not this customer's subscription on this site
|
|
5040
|
+
*/
|
|
5041
|
+
404: Error;
|
|
5042
|
+
/**
|
|
5043
|
+
* Too many requests from this IP
|
|
5044
|
+
*/
|
|
5045
|
+
429: Error;
|
|
5046
|
+
};
|
|
5047
|
+
type AccountUpdateSubscriptionAddressError = AccountUpdateSubscriptionAddressErrors[keyof AccountUpdateSubscriptionAddressErrors];
|
|
5048
|
+
type AccountUpdateSubscriptionAddressResponses = {
|
|
5049
|
+
/**
|
|
5050
|
+
* Address updated
|
|
5051
|
+
*/
|
|
5052
|
+
200: SubscriberActionResult;
|
|
5053
|
+
};
|
|
5054
|
+
type AccountUpdateSubscriptionAddressResponse = AccountUpdateSubscriptionAddressResponses[keyof AccountUpdateSubscriptionAddressResponses];
|
|
5055
|
+
type AccountCreatePortalSessionData = {
|
|
5056
|
+
body?: never;
|
|
5057
|
+
path: {
|
|
5058
|
+
subscriptionId: string;
|
|
5059
|
+
};
|
|
5060
|
+
query?: never;
|
|
5061
|
+
url: "/v1/account/subscriptions/{subscriptionId}/portal-session";
|
|
5062
|
+
};
|
|
5063
|
+
type AccountCreatePortalSessionErrors = {
|
|
5064
|
+
/**
|
|
5065
|
+
* Session expired (code session_expired)
|
|
5066
|
+
*/
|
|
5067
|
+
401: Error;
|
|
5068
|
+
/**
|
|
5069
|
+
* Not this customer's subscription on this site
|
|
5070
|
+
*/
|
|
5071
|
+
404: Error;
|
|
5072
|
+
/**
|
|
5073
|
+
* Too many requests from this IP
|
|
5074
|
+
*/
|
|
5075
|
+
429: Error;
|
|
5076
|
+
/**
|
|
5077
|
+
* Card update temporarily unavailable (code portal_unavailable)
|
|
5078
|
+
*/
|
|
5079
|
+
503: Error;
|
|
5080
|
+
};
|
|
5081
|
+
type AccountCreatePortalSessionError = AccountCreatePortalSessionErrors[keyof AccountCreatePortalSessionErrors];
|
|
5082
|
+
type AccountCreatePortalSessionResponses = {
|
|
5083
|
+
/**
|
|
5084
|
+
* Portal session created
|
|
5085
|
+
*/
|
|
5086
|
+
200: PortalSessionResult;
|
|
5087
|
+
};
|
|
5088
|
+
type AccountCreatePortalSessionResponse = AccountCreatePortalSessionResponses[keyof AccountCreatePortalSessionResponses];
|
|
5089
|
+
type AccountManageVerifyData = {
|
|
5090
|
+
body: ManageVerifyRequest;
|
|
5091
|
+
path?: never;
|
|
5092
|
+
query?: never;
|
|
5093
|
+
url: "/v1/account/manage/verify";
|
|
5094
|
+
};
|
|
5095
|
+
type AccountManageVerifyErrors = {
|
|
5096
|
+
/**
|
|
5097
|
+
* Invalid or expired code (code invalid_code)
|
|
5098
|
+
*/
|
|
5099
|
+
400: Error;
|
|
5100
|
+
/**
|
|
5101
|
+
* Too many requests from this IP
|
|
5102
|
+
*/
|
|
5103
|
+
429: Error;
|
|
5104
|
+
};
|
|
5105
|
+
type AccountManageVerifyError = AccountManageVerifyErrors[keyof AccountManageVerifyErrors];
|
|
5106
|
+
type AccountManageVerifyResponses = {
|
|
5107
|
+
/**
|
|
5108
|
+
* Grant token minted
|
|
5109
|
+
*/
|
|
5110
|
+
200: ManageVerifyResult;
|
|
5111
|
+
};
|
|
5112
|
+
type AccountManageVerifyResponse = AccountManageVerifyResponses[keyof AccountManageVerifyResponses];
|
|
5113
|
+
type AccountManageGetSubscriptionData = {
|
|
5114
|
+
body?: never;
|
|
5115
|
+
path?: never;
|
|
5116
|
+
query?: never;
|
|
5117
|
+
url: "/v1/account/manage/subscription";
|
|
5118
|
+
};
|
|
5119
|
+
type AccountManageGetSubscriptionErrors = {
|
|
5120
|
+
/**
|
|
5121
|
+
* Manage link invalid or expired (code manage_expired)
|
|
5122
|
+
*/
|
|
5123
|
+
401: Error;
|
|
5124
|
+
/**
|
|
5125
|
+
* Wrong origin for this grant (code origin_mismatch)
|
|
5126
|
+
*/
|
|
5127
|
+
403: Error;
|
|
5128
|
+
/**
|
|
5129
|
+
* Too many requests from this IP
|
|
5130
|
+
*/
|
|
5131
|
+
429: Error;
|
|
5132
|
+
};
|
|
5133
|
+
type AccountManageGetSubscriptionError = AccountManageGetSubscriptionErrors[keyof AccountManageGetSubscriptionErrors];
|
|
5134
|
+
type AccountManageGetSubscriptionResponses = {
|
|
5135
|
+
/**
|
|
5136
|
+
* The granted subscription
|
|
5137
|
+
*/
|
|
5138
|
+
200: ManagedSubscriptionResult;
|
|
5139
|
+
};
|
|
5140
|
+
type AccountManageGetSubscriptionResponse = AccountManageGetSubscriptionResponses[keyof AccountManageGetSubscriptionResponses];
|
|
5141
|
+
type AccountManageCancelData = {
|
|
5142
|
+
body?: never;
|
|
5143
|
+
path?: never;
|
|
5144
|
+
query?: never;
|
|
5145
|
+
url: "/v1/account/manage/cancel";
|
|
5146
|
+
};
|
|
5147
|
+
type AccountManageCancelErrors = {
|
|
5148
|
+
/**
|
|
5149
|
+
* Manage link invalid or expired (code manage_expired)
|
|
5150
|
+
*/
|
|
5151
|
+
401: Error;
|
|
5152
|
+
/**
|
|
5153
|
+
* Already ended (code ended)
|
|
5154
|
+
*/
|
|
5155
|
+
409: Error;
|
|
5156
|
+
/**
|
|
5157
|
+
* Too many requests from this IP
|
|
5158
|
+
*/
|
|
5159
|
+
429: Error;
|
|
5160
|
+
/**
|
|
5161
|
+
* Stripe failure — retry
|
|
5162
|
+
*/
|
|
5163
|
+
502: Error;
|
|
5164
|
+
};
|
|
5165
|
+
type AccountManageCancelError = AccountManageCancelErrors[keyof AccountManageCancelErrors];
|
|
5166
|
+
type AccountManageCancelResponses = {
|
|
5167
|
+
/**
|
|
5168
|
+
* Cancellation scheduled
|
|
5169
|
+
*/
|
|
5170
|
+
200: ManageCancelResult;
|
|
5171
|
+
};
|
|
5172
|
+
type AccountManageCancelResponse = AccountManageCancelResponses[keyof AccountManageCancelResponses];
|
|
5173
|
+
type AccountManagePortalSessionData = {
|
|
5174
|
+
body?: never;
|
|
5175
|
+
path?: never;
|
|
5176
|
+
query?: never;
|
|
5177
|
+
url: "/v1/account/manage/portal-session";
|
|
5178
|
+
};
|
|
5179
|
+
type AccountManagePortalSessionErrors = {
|
|
5180
|
+
/**
|
|
5181
|
+
* Manage link invalid or expired (code manage_expired)
|
|
5182
|
+
*/
|
|
5183
|
+
401: Error;
|
|
5184
|
+
/**
|
|
5185
|
+
* Too many requests from this IP
|
|
5186
|
+
*/
|
|
5187
|
+
429: Error;
|
|
5188
|
+
/**
|
|
5189
|
+
* Card update temporarily unavailable (code portal_unavailable)
|
|
5190
|
+
*/
|
|
5191
|
+
503: Error;
|
|
5192
|
+
};
|
|
5193
|
+
type AccountManagePortalSessionError = AccountManagePortalSessionErrors[keyof AccountManagePortalSessionErrors];
|
|
5194
|
+
type AccountManagePortalSessionResponses = {
|
|
5195
|
+
/**
|
|
5196
|
+
* Portal session created
|
|
5197
|
+
*/
|
|
5198
|
+
200: PortalSessionResult;
|
|
5199
|
+
};
|
|
5200
|
+
type AccountManagePortalSessionResponse = AccountManagePortalSessionResponses[keyof AccountManagePortalSessionResponses];
|
|
5201
|
+
type ResolveManageLinkData = {
|
|
5202
|
+
body?: never;
|
|
5203
|
+
path: {
|
|
5204
|
+
token: string;
|
|
5205
|
+
};
|
|
5206
|
+
query?: never;
|
|
5207
|
+
url: "/v1/m/{token}";
|
|
5208
|
+
};
|
|
5209
|
+
type ResolveManageLinkErrors = {
|
|
5210
|
+
/**
|
|
5211
|
+
* Unknown or expired link (rendered identically) — HTML page
|
|
5212
|
+
*/
|
|
5213
|
+
404: string;
|
|
5214
|
+
/**
|
|
5215
|
+
* Rate limited — HTML page
|
|
5216
|
+
*/
|
|
5217
|
+
429: string;
|
|
5218
|
+
/**
|
|
5219
|
+
* Temporarily unavailable (inert page, no controls)
|
|
5220
|
+
*/
|
|
5221
|
+
503: string;
|
|
5222
|
+
};
|
|
5223
|
+
type ResolveManageLinkError = ResolveManageLinkErrors[keyof ResolveManageLinkErrors];
|
|
5224
|
+
type ResolveManageLinkResponses = {
|
|
5225
|
+
/**
|
|
5226
|
+
* Platform fallback manage page
|
|
5227
|
+
*/
|
|
5228
|
+
200: string;
|
|
5229
|
+
};
|
|
5230
|
+
type ResolveManageLinkResponse = ResolveManageLinkResponses[keyof ResolveManageLinkResponses];
|
|
5231
|
+
type ActOnManageLinkData = {
|
|
5232
|
+
body: ManageLinkAction;
|
|
5233
|
+
path: {
|
|
5234
|
+
token: string;
|
|
5235
|
+
};
|
|
5236
|
+
query?: never;
|
|
5237
|
+
url: "/v1/m/{token}";
|
|
5238
|
+
};
|
|
5239
|
+
type ActOnManageLinkErrors = {
|
|
5240
|
+
/**
|
|
5241
|
+
* Unknown action or unreadable form body — HTML page, nothing changed
|
|
5242
|
+
*/
|
|
5243
|
+
400: string;
|
|
5244
|
+
/**
|
|
5245
|
+
* Unknown/expired token, or a hidden token that does not match the path (rendered identically) — HTML page
|
|
5246
|
+
*/
|
|
5247
|
+
404: string;
|
|
5248
|
+
/**
|
|
5249
|
+
* Rate limited — HTML page
|
|
5250
|
+
*/
|
|
5251
|
+
429: string;
|
|
5252
|
+
/**
|
|
5253
|
+
* Stripe refused the action — HTML page, nothing changed
|
|
5254
|
+
*/
|
|
5255
|
+
502: string;
|
|
5256
|
+
/**
|
|
5257
|
+
* Temporarily unavailable (inert page, no controls)
|
|
5258
|
+
*/
|
|
5259
|
+
503: string;
|
|
5260
|
+
};
|
|
5261
|
+
type ActOnManageLinkError = ActOnManageLinkErrors[keyof ActOnManageLinkErrors];
|
|
5262
|
+
type ActOnManageLinkResponses = {
|
|
5263
|
+
/**
|
|
5264
|
+
* The resulting manage page (status view, cancel confirmation, or cancel receipt)
|
|
5265
|
+
*/
|
|
5266
|
+
200: string;
|
|
5267
|
+
};
|
|
5268
|
+
type ActOnManageLinkResponse = ActOnManageLinkResponses[keyof ActOnManageLinkResponses];
|
|
3902
5269
|
|
|
3903
5270
|
type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options$1<TData, ThrowOnError> & {
|
|
3904
5271
|
/**
|
|
@@ -3919,6 +5286,12 @@ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean
|
|
|
3919
5286
|
* 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
5287
|
*/
|
|
3921
5288
|
declare const updateSitePayments: <ThrowOnError extends boolean = false>(options: Options<UpdateSitePaymentsData, ThrowOnError>) => RequestResult<UpdateSitePaymentsResponses, UpdateSitePaymentsErrors, ThrowOnError, "fields">;
|
|
5289
|
+
/**
|
|
5290
|
+
* Set /account route readiness (org key only)
|
|
5291
|
+
*
|
|
5292
|
+
* 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.
|
|
5293
|
+
*/
|
|
5294
|
+
declare const updateSiteAccountRoute: <ThrowOnError extends boolean = false>(options: Options<UpdateSiteAccountRouteData, ThrowOnError>) => RequestResult<UpdateSiteAccountRouteResponses, UpdateSiteAccountRouteErrors, ThrowOnError, "fields">;
|
|
3922
5295
|
/**
|
|
3923
5296
|
* Get payment readiness (site token)
|
|
3924
5297
|
*
|
|
@@ -3973,12 +5346,24 @@ declare const updateProduct: <ThrowOnError extends boolean = false>(options: Opt
|
|
|
3973
5346
|
* 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
5347
|
*/
|
|
3975
5348
|
declare const attachProductFile: <ThrowOnError extends boolean = false>(options: Options<AttachProductFileData, ThrowOnError>) => RequestResult<AttachProductFileResponses, AttachProductFileErrors, ThrowOnError, "fields">;
|
|
5349
|
+
/**
|
|
5350
|
+
* Set a product's subscription plans
|
|
5351
|
+
*
|
|
5352
|
+
* Replaces the product's subscription selling plans transactionally (full desired state — like setProductVariants) and sets whether the product is subscription-only. Requires the site's payments to be ACTIVE (error code payments_not_active otherwise — connect Stripe first; there is no draft config). 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.
|
|
5353
|
+
*/
|
|
5354
|
+
declare const setProductSubscription: <ThrowOnError extends boolean = false>(options: Options<SetProductSubscriptionData, ThrowOnError>) => RequestResult<SetProductSubscriptionResponses, SetProductSubscriptionErrors, ThrowOnError, "fields">;
|
|
3976
5355
|
/**
|
|
3977
5356
|
* Create a simulated test purchase
|
|
3978
5357
|
*
|
|
3979
5358
|
* 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
5359
|
*/
|
|
3981
5360
|
declare const createTestOrder: <ThrowOnError extends boolean = false>(options: Options<CreateTestOrderData, ThrowOnError>) => RequestResult<CreateTestOrderResponses, CreateTestOrderErrors, ThrowOnError, "fields">;
|
|
5361
|
+
/**
|
|
5362
|
+
* Create a simulated test subscription signup
|
|
5363
|
+
*
|
|
5364
|
+
* 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.
|
|
5365
|
+
*/
|
|
5366
|
+
declare const createTestSubscription: <ThrowOnError extends boolean = false>(options: Options<CreateTestSubscriptionData, ThrowOnError>) => RequestResult<CreateTestSubscriptionResponses, CreateTestSubscriptionErrors, ThrowOnError, "fields">;
|
|
3982
5367
|
/**
|
|
3983
5368
|
* Create a simulated multi-item test purchase
|
|
3984
5369
|
*
|
|
@@ -3997,6 +5382,12 @@ declare const createVariant: <ThrowOnError extends boolean = false>(options: Opt
|
|
|
3997
5382
|
* 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
5383
|
*/
|
|
3999
5384
|
declare const setProductVariants: <ThrowOnError extends boolean = false>(options: Options<SetProductVariantsData, ThrowOnError>) => RequestResult<SetProductVariantsResponses, SetProductVariantsErrors, ThrowOnError, "fields">;
|
|
5385
|
+
/**
|
|
5386
|
+
* Generate the missing cells of a variant grid
|
|
5387
|
+
*
|
|
5388
|
+
* 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.
|
|
5389
|
+
*/
|
|
5390
|
+
declare const generateVariants: <ThrowOnError extends boolean = false>(options: Options<GenerateVariantsData, ThrowOnError>) => RequestResult<GenerateVariantsResponses, GenerateVariantsErrors, ThrowOnError, "fields">;
|
|
4000
5391
|
/**
|
|
4001
5392
|
* Delete a variant
|
|
4002
5393
|
*
|
|
@@ -4099,6 +5490,12 @@ declare const getCustomer: <ThrowOnError extends boolean = false>(options: Optio
|
|
|
4099
5490
|
* Updates a customer name/phone/metadata. Email is immutable (it is the upsert identity).
|
|
4100
5491
|
*/
|
|
4101
5492
|
declare const updateCustomer: <ThrowOnError extends boolean = false>(options: Options<UpdateCustomerData, ThrowOnError>) => RequestResult<UpdateCustomerResponses, UpdateCustomerErrors, ThrowOnError, "fields">;
|
|
5493
|
+
/**
|
|
5494
|
+
* Burn a customer's account credentials (org key only)
|
|
5495
|
+
*
|
|
5496
|
+
* 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.
|
|
5497
|
+
*/
|
|
5498
|
+
declare const revokeCustomerAccess: <ThrowOnError extends boolean = false>(options: Options<RevokeCustomerAccessData, ThrowOnError>) => RequestResult<RevokeCustomerAccessResponses, RevokeCustomerAccessErrors, ThrowOnError, "fields">;
|
|
4102
5499
|
/**
|
|
4103
5500
|
* One-call business summary (site token, or org key with site_id)
|
|
4104
5501
|
*
|
|
@@ -4135,6 +5532,36 @@ declare const getNextPayout: <ThrowOnError extends boolean = false>(options?: Op
|
|
|
4135
5532
|
* 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
5533
|
*/
|
|
4137
5534
|
declare const setOrderFulfillment: <ThrowOnError extends boolean = false>(options: Options<SetOrderFulfillmentData, ThrowOnError>) => RequestResult<SetOrderFulfillmentResponses, SetOrderFulfillmentErrors, ThrowOnError, "fields">;
|
|
5535
|
+
/**
|
|
5536
|
+
* List subscriptions (site token, or org key with site_id)
|
|
5537
|
+
*
|
|
5538
|
+
* 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.
|
|
5539
|
+
*/
|
|
5540
|
+
declare const listSubscriptions: <ThrowOnError extends boolean = false>(options?: Options<ListSubscriptionsData, ThrowOnError>) => RequestResult<ListSubscriptionsResponses, ListSubscriptionsErrors, ThrowOnError, "fields">;
|
|
5541
|
+
/**
|
|
5542
|
+
* Cancel a subscription at period end (org key only)
|
|
5543
|
+
*
|
|
5544
|
+
* 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.
|
|
5545
|
+
*/
|
|
5546
|
+
declare const cancelSubscription: <ThrowOnError extends boolean = false>(options: Options<CancelSubscriptionData, ThrowOnError>) => RequestResult<CancelSubscriptionResponses, CancelSubscriptionErrors, ThrowOnError, "fields">;
|
|
5547
|
+
/**
|
|
5548
|
+
* Schedule ALL live subscriptions to cancel at period end (org key only)
|
|
5549
|
+
*
|
|
5550
|
+
* 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).
|
|
5551
|
+
*/
|
|
5552
|
+
declare const teardownSiteSubscriptions: <ThrowOnError extends boolean = false>(options: Options<TeardownSiteSubscriptionsData, ThrowOnError>) => RequestResult<TeardownSiteSubscriptionsResponses, TeardownSiteSubscriptionsErrors, ThrowOnError, "fields">;
|
|
5553
|
+
/**
|
|
5554
|
+
* Undo a teardown for rows IT flipped (org key only)
|
|
5555
|
+
*
|
|
5556
|
+
* 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).
|
|
5557
|
+
*/
|
|
5558
|
+
declare const reactivateSiteSubscriptionsTeardown: <ThrowOnError extends boolean = false>(options: Options<ReactivateSiteSubscriptionsTeardownData, ThrowOnError>) => RequestResult<ReactivateSiteSubscriptionsTeardownResponses, ReactivateSiteSubscriptionsTeardownErrors, ThrowOnError, "fields">;
|
|
5559
|
+
/**
|
|
5560
|
+
* Mint an editor preview account session (org key only)
|
|
5561
|
+
*
|
|
5562
|
+
* 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.
|
|
5563
|
+
*/
|
|
5564
|
+
declare const createPreviewSession: <ThrowOnError extends boolean = false>(options: Options<CreatePreviewSessionData, ThrowOnError>) => RequestResult<CreatePreviewSessionResponses, CreatePreviewSessionErrors, ThrowOnError, "fields">;
|
|
4138
5565
|
/**
|
|
4139
5566
|
* List all forms (site token)
|
|
4140
5567
|
*
|
|
@@ -4264,7 +5691,7 @@ declare const createCheckout: <ThrowOnError extends boolean = false>(options: Op
|
|
|
4264
5691
|
/**
|
|
4265
5692
|
* Start a multi-item (cart) checkout
|
|
4266
5693
|
*
|
|
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.
|
|
5694
|
+
* 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
5695
|
*/
|
|
4269
5696
|
declare const createCartCheckout: <ThrowOnError extends boolean = false>(options: Options<CreateCartCheckoutData, ThrowOnError>) => RequestResult<CreateCartCheckoutResponses, CreateCartCheckoutErrors, ThrowOnError, "fields">;
|
|
4270
5697
|
/**
|
|
@@ -4291,5 +5718,95 @@ declare const downloadFile: <ThrowOnError extends boolean = false>(options: Opti
|
|
|
4291
5718
|
* 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
5719
|
*/
|
|
4293
5720
|
declare const getGeo: <ThrowOnError extends boolean = false>(options?: Options<GetGeoData, ThrowOnError>) => RequestResult<GetGeoResponses, unknown, ThrowOnError, "fields">;
|
|
5721
|
+
/**
|
|
5722
|
+
* Email a sign-in link
|
|
5723
|
+
*
|
|
5724
|
+
* 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.
|
|
5725
|
+
*/
|
|
5726
|
+
declare const accountLogin: <ThrowOnError extends boolean = false>(options: Options<AccountLoginData, ThrowOnError>) => RequestResult<AccountLoginResponses, AccountLoginErrors, ThrowOnError, "fields">;
|
|
5727
|
+
/**
|
|
5728
|
+
* Exchange a sign-in code for a session
|
|
5729
|
+
*
|
|
5730
|
+
* 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.
|
|
5731
|
+
*/
|
|
5732
|
+
declare const accountVerify: <ThrowOnError extends boolean = false>(options: Options<AccountVerifyData, ThrowOnError>) => RequestResult<AccountVerifyResponses, AccountVerifyErrors, ThrowOnError, "fields">;
|
|
5733
|
+
/**
|
|
5734
|
+
* Sign out
|
|
5735
|
+
*
|
|
5736
|
+
* Deletes the session row server-side, so the token is dead everywhere rather than merely cleared on this device.
|
|
5737
|
+
*/
|
|
5738
|
+
declare const accountLogout: <ThrowOnError extends boolean = false>(options?: Options<AccountLogoutData, ThrowOnError>) => RequestResult<AccountLogoutResponses, AccountLogoutErrors, ThrowOnError, "fields">;
|
|
5739
|
+
/**
|
|
5740
|
+
* The signed-in buyer's orders and subscriptions
|
|
5741
|
+
*
|
|
5742
|
+
* 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.
|
|
5743
|
+
*/
|
|
5744
|
+
declare const accountMe: <ThrowOnError extends boolean = false>(options?: Options<AccountMeData, ThrowOnError>) => RequestResult<AccountMeResponses, AccountMeErrors, ThrowOnError, "fields">;
|
|
5745
|
+
/**
|
|
5746
|
+
* Start a subscription checkout (signed-in buyer)
|
|
5747
|
+
*
|
|
5748
|
+
* 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.
|
|
5749
|
+
*/
|
|
5750
|
+
declare const accountSubscribe: <ThrowOnError extends boolean = false>(options: Options<AccountSubscribeData, ThrowOnError>) => RequestResult<AccountSubscribeResponses, AccountSubscribeErrors, ThrowOnError, "fields">;
|
|
5751
|
+
/**
|
|
5752
|
+
* Cancel own subscription at period end
|
|
5753
|
+
*
|
|
5754
|
+
* 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.
|
|
5755
|
+
*/
|
|
5756
|
+
declare const accountCancelSubscription: <ThrowOnError extends boolean = false>(options: Options<AccountCancelSubscriptionData, ThrowOnError>) => RequestResult<AccountCancelSubscriptionResponses, AccountCancelSubscriptionErrors, ThrowOnError, "fields">;
|
|
5757
|
+
/**
|
|
5758
|
+
* Undo a scheduled cancellation
|
|
5759
|
+
*
|
|
5760
|
+
* 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.
|
|
5761
|
+
*/
|
|
5762
|
+
declare const accountReactivateSubscription: <ThrowOnError extends boolean = false>(options: Options<AccountReactivateSubscriptionData, ThrowOnError>) => RequestResult<AccountReactivateSubscriptionResponses, AccountReactivateSubscriptionErrors, ThrowOnError, "fields">;
|
|
5763
|
+
/**
|
|
5764
|
+
* Update a subscription's shipping address
|
|
5765
|
+
*
|
|
5766
|
+
* 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.
|
|
5767
|
+
*/
|
|
5768
|
+
declare const accountUpdateSubscriptionAddress: <ThrowOnError extends boolean = false>(options: Options<AccountUpdateSubscriptionAddressData, ThrowOnError>) => RequestResult<AccountUpdateSubscriptionAddressResponses, AccountUpdateSubscriptionAddressErrors, ThrowOnError, "fields">;
|
|
5769
|
+
/**
|
|
5770
|
+
* Open the card-update portal (signed-in buyer)
|
|
5771
|
+
*
|
|
5772
|
+
* 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.
|
|
5773
|
+
*/
|
|
5774
|
+
declare const accountCreatePortalSession: <ThrowOnError extends boolean = false>(options: Options<AccountCreatePortalSessionData, ThrowOnError>) => RequestResult<AccountCreatePortalSessionResponses, AccountCreatePortalSessionErrors, ThrowOnError, "fields">;
|
|
5775
|
+
/**
|
|
5776
|
+
* Exchange a manage_code for grant access
|
|
5777
|
+
*
|
|
5778
|
+
* 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.
|
|
5779
|
+
*/
|
|
5780
|
+
declare const accountManageVerify: <ThrowOnError extends boolean = false>(options: Options<AccountManageVerifyData, ThrowOnError>) => RequestResult<AccountManageVerifyResponses, AccountManageVerifyErrors, ThrowOnError, "fields">;
|
|
5781
|
+
/**
|
|
5782
|
+
* Read the managed subscription (grant scope)
|
|
5783
|
+
*
|
|
5784
|
+
* Bearer = manage token. Returns exactly the one granted subscription — no orders, no customer PII beyond the subscription's own shipping name/city.
|
|
5785
|
+
*/
|
|
5786
|
+
declare const accountManageGetSubscription: <ThrowOnError extends boolean = false>(options?: Options<AccountManageGetSubscriptionData, ThrowOnError>) => RequestResult<AccountManageGetSubscriptionResponses, AccountManageGetSubscriptionErrors, ThrowOnError, "fields">;
|
|
5787
|
+
/**
|
|
5788
|
+
* Cancel the managed subscription at period end
|
|
5789
|
+
*
|
|
5790
|
+
* Grant-scoped subscriber cancel — same semantics as the session cancel endpoint.
|
|
5791
|
+
*/
|
|
5792
|
+
declare const accountManageCancel: <ThrowOnError extends boolean = false>(options?: Options<AccountManageCancelData, ThrowOnError>) => RequestResult<AccountManageCancelResponses, AccountManageCancelErrors, ThrowOnError, "fields">;
|
|
5793
|
+
/**
|
|
5794
|
+
* Open the card-update portal (grant scope)
|
|
5795
|
+
*
|
|
5796
|
+
* 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.
|
|
5797
|
+
*/
|
|
5798
|
+
declare const accountManagePortalSession: <ThrowOnError extends boolean = false>(options?: Options<AccountManagePortalSessionData, ThrowOnError>) => RequestResult<AccountManagePortalSessionResponses, AccountManagePortalSessionErrors, ThrowOnError, "fields">;
|
|
5799
|
+
/**
|
|
5800
|
+
* Resolve a subscription manage link
|
|
5801
|
+
*
|
|
5802
|
+
* 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.
|
|
5803
|
+
*/
|
|
5804
|
+
declare const resolveManageLink: <ThrowOnError extends boolean = false>(options: Options<ResolveManageLinkData, ThrowOnError>) => RequestResult<ResolveManageLinkResponses, ResolveManageLinkErrors, ThrowOnError, "fields">;
|
|
5805
|
+
/**
|
|
5806
|
+
* Act on a subscription from the platform manage page
|
|
5807
|
+
*
|
|
5808
|
+
* 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.
|
|
5809
|
+
*/
|
|
5810
|
+
declare const actOnManageLink: <ThrowOnError extends boolean = false>(options: Options<ActOnManageLinkData, ThrowOnError>) => RequestResult<ActOnManageLinkResponses, ActOnManageLinkErrors, ThrowOnError, "fields">;
|
|
4294
5811
|
|
|
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 };
|
|
5812
|
+
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 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 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 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 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 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 RevokeCustomerAccessData, type RevokeCustomerAccessError, type RevokeCustomerAccessErrors, type RevokeCustomerAccessResponse, type RevokeCustomerAccessResponses, type RevokeCustomerAccessResult, 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 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, createForm, createFormWithSiteToken, createMultiItemTestOrder, createOption, createPreviewSession, createProduct, createProductWithSiteToken, createSite, createTestOrder, createTestSubscription, createVariant, deleteForm, deleteOption, deleteProduct, deleteSite, deleteSubmission, deleteVariant, downloadAttachment, downloadFile, generateVariants, 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, listSubscriptions, pauseSiteCheckout, reactivateSiteSubscriptionsTeardown, refundOrder, resendOrderReceipt, resetOrderDownloads, resetWebhookEvent, resolveManageLink, revokeCustomerAccess, setOrderFulfillment, setProductSubscription, setProductVariants, setVariantInventory, teardownSiteSubscriptions, updateCustomer, updateForm, updateOption, updateProduct, updateSite, updateSiteAccountRoute, updateSiteDomains, updateSitePayments, updateVariant };
|