@aifeatures/backend 0.3.0 → 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 +1607 -57
- package/dist/index.d.ts +1607 -57
- package/dist/index.js +4 -4
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -316,11 +316,19 @@ type SitePayments = {
|
|
|
316
316
|
stripe_account_id: string | null;
|
|
317
317
|
payments_status: "none" | "pending" | "active" | "disabled";
|
|
318
318
|
currency: string;
|
|
319
|
+
/**
|
|
320
|
+
* The merchant explicitly chose this currency (via the agent). While true, currency values pushed on this route are skipped (reason 'merchant_set'). Cleared only by an explicit currency_pinned: false on this route.
|
|
321
|
+
*/
|
|
322
|
+
currency_pinned: boolean;
|
|
319
323
|
platform_fee_bps: number | null;
|
|
320
324
|
owner_email: string | null;
|
|
321
325
|
};
|
|
322
326
|
type Error = {
|
|
323
327
|
error: string;
|
|
328
|
+
/**
|
|
329
|
+
* Machine-readable error token, present on errors clients are expected to branch on. Match on this, never on the `error` text.
|
|
330
|
+
*/
|
|
331
|
+
code?: string;
|
|
324
332
|
};
|
|
325
333
|
type UpdateSitePayments = {
|
|
326
334
|
/**
|
|
@@ -339,11 +347,28 @@ type UpdateSitePayments = {
|
|
|
339
347
|
* Per-site platform fee override in basis points. Null falls back to the org default.
|
|
340
348
|
*/
|
|
341
349
|
platform_fee_bps?: number | null;
|
|
350
|
+
/**
|
|
351
|
+
* Set or clear the merchant currency pin. false (the unpin) re-enables platform-derived currency pushes for this site; combined with `currency` in one request, the unpin applies first, so the pushed currency lands. Omit to leave the pin alone.
|
|
352
|
+
*/
|
|
353
|
+
currency_pinned?: boolean;
|
|
342
354
|
/**
|
|
343
355
|
* Account owner's email — fallback notification recipient when the site has no default email recipients. Values that are not plausible emails are stored as null rather than rejected: this request must never fail over a notification fallback.
|
|
344
356
|
*/
|
|
345
357
|
owner_email?: string | null;
|
|
346
358
|
};
|
|
359
|
+
type SiteAccountRoute = {
|
|
360
|
+
site_id: string;
|
|
361
|
+
/**
|
|
362
|
+
* When the /account route was last verified present on the published site. Null = not ready; subscription checkout refuses.
|
|
363
|
+
*/
|
|
364
|
+
account_route_ready_at: string | null;
|
|
365
|
+
};
|
|
366
|
+
type UpdateSiteAccountRoute = {
|
|
367
|
+
/**
|
|
368
|
+
* true: the published site structurally serves /account (stamps account_route_ready_at). false: it does not (clears the stamp — subscription checkout refuses and the public payload flags ready:false).
|
|
369
|
+
*/
|
|
370
|
+
ready: boolean;
|
|
371
|
+
};
|
|
347
372
|
type PaymentsStatus = {
|
|
348
373
|
/**
|
|
349
374
|
* The site's payment readiness.
|
|
@@ -355,6 +380,10 @@ type PaymentsStatus = {
|
|
|
355
380
|
reason: "needs_stripe" | "needs_paid_plan" | "account_disabled";
|
|
356
381
|
stripe_account_connected: boolean;
|
|
357
382
|
currency: string;
|
|
383
|
+
/**
|
|
384
|
+
* The merchant explicitly set the currency (it is merchant-set and does NOT follow the Stripe account). Connecting or changing a Stripe account will not change a pinned currency.
|
|
385
|
+
*/
|
|
386
|
+
currency_pinned: boolean;
|
|
358
387
|
/**
|
|
359
388
|
* Stripe Tax (automatic tax) is on for this store's checkout: Stripe calculates and collects real jurisdiction-based tax on the merchant's connected account. Turns on automatically when the merchant finishes tax setup in their own Stripe Dashboard (business address + product category, plus registrations under Tax → Locations).
|
|
360
389
|
*/
|
|
@@ -462,6 +491,10 @@ type Option = {
|
|
|
462
491
|
* Images shown when this value is selected; empty = fall back to the product gallery.
|
|
463
492
|
*/
|
|
464
493
|
images: Array<string>;
|
|
494
|
+
/**
|
|
495
|
+
* Colour chip for this value — a hex colour or an image URL — shown instead of the text label on the storefront. null when unset; set it with setProductVariants.
|
|
496
|
+
*/
|
|
497
|
+
swatch: string | null;
|
|
465
498
|
}>;
|
|
466
499
|
};
|
|
467
500
|
type VariantOptionValue = {
|
|
@@ -538,6 +571,9 @@ type InventoryInput = {
|
|
|
538
571
|
};
|
|
539
572
|
type NestedVariantInput = {
|
|
540
573
|
title?: string | null;
|
|
574
|
+
/**
|
|
575
|
+
* Merchant SKU for this variant. Omitted or null = the server generates a stable opaque one (every variant always carries a SKU — it is the identifier fulfillment systems key on).
|
|
576
|
+
*/
|
|
541
577
|
sku?: string | null;
|
|
542
578
|
unit_amount?: number;
|
|
543
579
|
compare_at_amount?: number | null;
|
|
@@ -591,7 +627,7 @@ type CreateProduct = {
|
|
|
591
627
|
*/
|
|
592
628
|
options?: Array<NestedOptionInput>;
|
|
593
629
|
/**
|
|
594
|
-
* 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.
|
|
595
631
|
*/
|
|
596
632
|
variants?: Array<NestedVariantInput>;
|
|
597
633
|
};
|
|
@@ -632,6 +668,57 @@ type AttachProductFileMultipart = {
|
|
|
632
668
|
*/
|
|
633
669
|
file?: Blob | File;
|
|
634
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
|
+
};
|
|
635
722
|
type TestOrderResult = {
|
|
636
723
|
order_id: string;
|
|
637
724
|
/**
|
|
@@ -639,6 +726,29 @@ type TestOrderResult = {
|
|
|
639
726
|
*/
|
|
640
727
|
session_id: string;
|
|
641
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
|
+
};
|
|
642
752
|
type CreateTestOrder = {
|
|
643
753
|
/**
|
|
644
754
|
* The variant to buy. Required for multi-variant products; omit for single-variant products.
|
|
@@ -656,6 +766,38 @@ type CreateTestOrder = {
|
|
|
656
766
|
* Recorded as the buyer and receives the [TEST]-labeled receipt. Defaults to the site owner's email.
|
|
657
767
|
*/
|
|
658
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;
|
|
659
801
|
};
|
|
660
802
|
type CreateMultiItemTestOrder = {
|
|
661
803
|
/**
|
|
@@ -676,9 +818,19 @@ type CreateMultiItemTestOrder = {
|
|
|
676
818
|
*/
|
|
677
819
|
quantity?: number;
|
|
678
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;
|
|
679
828
|
};
|
|
680
829
|
type CreateVariant = {
|
|
681
830
|
title?: string | null;
|
|
831
|
+
/**
|
|
832
|
+
* Merchant SKU for this variant. Omitted or null = the server generates a stable opaque one (every variant always carries a SKU — it is the identifier fulfillment systems key on).
|
|
833
|
+
*/
|
|
682
834
|
sku?: string | null;
|
|
683
835
|
unit_amount?: number;
|
|
684
836
|
compare_at_amount?: number | null;
|
|
@@ -721,6 +873,10 @@ type ReconcileOptionValueInput = {
|
|
|
721
873
|
* Images shown when this value is selected (e.g. model shots of the Black colorway), in display order. REPLACES the value's whole gallery when present — to add an image, resend the existing URLs plus the new one. Omitted = keep the value's current images unchanged; [] = remove them all. Values without images fall back to the product-level gallery.
|
|
722
874
|
*/
|
|
723
875
|
images?: Array<string>;
|
|
876
|
+
/**
|
|
877
|
+
* The colour chip shown for this value instead of its text label: a hex colour ("#6B7A4F") or an image URL for a pattern/finish. NOTE the clear token differs from `images` above because this is a single value, not a list: omitted = keep the current swatch unchanged; null = remove it. Values without a swatch keep rendering as their text label, which is how a merchant sees which colours still need one. Never send product photography here — that is what `images` is for.
|
|
878
|
+
*/
|
|
879
|
+
swatch?: string | null;
|
|
724
880
|
};
|
|
725
881
|
type ReconcileOptionInput = {
|
|
726
882
|
/**
|
|
@@ -769,9 +925,60 @@ type SetProductVariants = {
|
|
|
769
925
|
options: Array<ReconcileOptionInput>;
|
|
770
926
|
variants: Array<ReconcileVariantInput>;
|
|
771
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
|
+
};
|
|
772
976
|
type UpdateVariant = {
|
|
773
977
|
title?: string | null;
|
|
774
|
-
|
|
978
|
+
/**
|
|
979
|
+
* New SKU for this variant. Cannot be cleared to null — every variant carries one. Omit the field to keep the current value.
|
|
980
|
+
*/
|
|
981
|
+
sku?: string;
|
|
775
982
|
unit_amount?: number | null;
|
|
776
983
|
compare_at_amount?: number | null;
|
|
777
984
|
allow_custom_amount?: boolean;
|
|
@@ -1028,6 +1235,23 @@ type CustomerDetail = Customer & {
|
|
|
1028
1235
|
addresses: Array<CustomerAddress>;
|
|
1029
1236
|
order_count: number;
|
|
1030
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
|
+
};
|
|
1031
1255
|
type CreateCustomer = {
|
|
1032
1256
|
email: string;
|
|
1033
1257
|
name?: string | null;
|
|
@@ -1270,6 +1494,109 @@ type OrderFulfillmentRequest = {
|
|
|
1270
1494
|
*/
|
|
1271
1495
|
tracking_number?: string;
|
|
1272
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
|
+
};
|
|
1273
1600
|
type Form = {
|
|
1274
1601
|
id: string;
|
|
1275
1602
|
name: string;
|
|
@@ -1345,6 +1672,10 @@ type Site = {
|
|
|
1345
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').
|
|
1346
1673
|
*/
|
|
1347
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;
|
|
1348
1679
|
created_at: string;
|
|
1349
1680
|
updated_at: string;
|
|
1350
1681
|
};
|
|
@@ -1378,6 +1709,37 @@ type CreateSite = {
|
|
|
1378
1709
|
*/
|
|
1379
1710
|
domains?: Array<string>;
|
|
1380
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
|
+
};
|
|
1381
1743
|
type ShippingRateInput = {
|
|
1382
1744
|
/**
|
|
1383
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.
|
|
@@ -1390,6 +1752,10 @@ type ShippingRateInput = {
|
|
|
1390
1752
|
};
|
|
1391
1753
|
type UpdateSite = {
|
|
1392
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;
|
|
1393
1759
|
default_email_recipients?: Array<string>;
|
|
1394
1760
|
/**
|
|
1395
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.
|
|
@@ -1512,6 +1878,10 @@ type PublicOption = {
|
|
|
1512
1878
|
* Images to show when this value is selected; empty = fall back to product.images.
|
|
1513
1879
|
*/
|
|
1514
1880
|
images: Array<string>;
|
|
1881
|
+
/**
|
|
1882
|
+
* Colour chip for this value — a hex colour or an image URL — rendered instead of the text label. null when the merchant hasn't set one, in which case the value renders as its text.
|
|
1883
|
+
*/
|
|
1884
|
+
swatch: string | null;
|
|
1515
1885
|
}>;
|
|
1516
1886
|
};
|
|
1517
1887
|
type PublicVariant = {
|
|
@@ -1551,6 +1921,38 @@ type PublicVariant = {
|
|
|
1551
1921
|
*/
|
|
1552
1922
|
available: number | null;
|
|
1553
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;
|
|
1554
1956
|
type PublicProduct = {
|
|
1555
1957
|
id: string;
|
|
1556
1958
|
name: string;
|
|
@@ -1614,6 +2016,7 @@ type PublicProduct = {
|
|
|
1614
2016
|
* Active purchasable variants with price + availability. One entry for single-variant products.
|
|
1615
2017
|
*/
|
|
1616
2018
|
variants: Array<PublicVariant>;
|
|
2019
|
+
subscription: PublicSubscription;
|
|
1617
2020
|
};
|
|
1618
2021
|
type CheckoutResult = {
|
|
1619
2022
|
/**
|
|
@@ -1634,6 +2037,10 @@ type CheckoutRequest = {
|
|
|
1634
2037
|
* Defaults to 1. Must be within [1, max_quantity]. Custom-amount products are always quantity 1.
|
|
1635
2038
|
*/
|
|
1636
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;
|
|
1637
2044
|
/**
|
|
1638
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.
|
|
1639
2046
|
*/
|
|
@@ -1668,9 +2075,9 @@ type CheckoutRequest = {
|
|
|
1668
2075
|
type CartConflictItem = {
|
|
1669
2076
|
variant_id: string;
|
|
1670
2077
|
/**
|
|
1671
|
-
* 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.
|
|
1672
2079
|
*/
|
|
1673
|
-
code: "unavailable" | "insufficient_stock" | "price_changed" | "quantity_exceeds_max";
|
|
2080
|
+
code: "unavailable" | "subscription_only" | "insufficient_stock" | "price_changed" | "quantity_exceeds_max";
|
|
1674
2081
|
/**
|
|
1675
2082
|
* insufficient_stock only: units currently available (never negative).
|
|
1676
2083
|
*/
|
|
@@ -1815,7 +2222,7 @@ type CartSummaryResult = {
|
|
|
1815
2222
|
*/
|
|
1816
2223
|
total_is_final: boolean;
|
|
1817
2224
|
/**
|
|
1818
|
-
* 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.
|
|
1819
2226
|
*/
|
|
1820
2227
|
unavailable_variant_ids: Array<string>;
|
|
1821
2228
|
};
|
|
@@ -1909,6 +2316,22 @@ type OrderSessionStatus = {
|
|
|
1909
2316
|
*/
|
|
1910
2317
|
refund_reason?: "oversold" | "merchant";
|
|
1911
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
|
+
};
|
|
1912
2335
|
};
|
|
1913
2336
|
type GeoSuggestion = {
|
|
1914
2337
|
/**
|
|
@@ -1916,31 +2339,186 @@ type GeoSuggestion = {
|
|
|
1916
2339
|
*/
|
|
1917
2340
|
country: string | null;
|
|
1918
2341
|
};
|
|
1919
|
-
type
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
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;
|
|
1923
2356
|
};
|
|
1924
|
-
|
|
1925
|
-
url: "/api/v1/sites/{siteId}/payments";
|
|
2357
|
+
expires_at: string;
|
|
1926
2358
|
};
|
|
1927
|
-
type
|
|
2359
|
+
type AccountVerifyRequest = {
|
|
2360
|
+
code: string;
|
|
2361
|
+
};
|
|
2362
|
+
type AccountLogoutResult = {
|
|
2363
|
+
ok: true;
|
|
2364
|
+
};
|
|
2365
|
+
type SubscriberSubscription = {
|
|
2366
|
+
id: string;
|
|
1928
2367
|
/**
|
|
1929
|
-
*
|
|
2368
|
+
* Stripe subscription status, mirrored verbatim ('active', 'past_due', 'canceled', ...). past_due after a cancel means no further charges will be attempted.
|
|
1930
2369
|
*/
|
|
1931
|
-
|
|
2370
|
+
status: string;
|
|
2371
|
+
plan_title: string | null;
|
|
2372
|
+
plan_interval: string;
|
|
2373
|
+
plan_interval_count: number;
|
|
1932
2374
|
/**
|
|
1933
|
-
*
|
|
2375
|
+
* Locked signup recurring amount, minor units (grandfathering record).
|
|
1934
2376
|
*/
|
|
1935
|
-
|
|
2377
|
+
plan_amount: number;
|
|
1936
2378
|
/**
|
|
1937
|
-
*
|
|
2379
|
+
* Current recurring amount, minor units (Dashboard repricing mirrors here).
|
|
1938
2380
|
*/
|
|
1939
|
-
|
|
2381
|
+
current_amount: number;
|
|
2382
|
+
currency: string;
|
|
1940
2383
|
/**
|
|
1941
|
-
*
|
|
2384
|
+
* End of the paid-through period — the lapse date after a cancel.
|
|
1942
2385
|
*/
|
|
1943
|
-
|
|
2386
|
+
current_period_end: string | null;
|
|
2387
|
+
cancel_at_period_end: boolean;
|
|
2388
|
+
canceled_at: string | null;
|
|
2389
|
+
/**
|
|
2390
|
+
* Terminal: the subscription is over (or its store was torn down) and cannot be reactivated — 'resubscribe' is the only path.
|
|
2391
|
+
*/
|
|
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;
|
|
1944
2522
|
};
|
|
1945
2523
|
type UpdateSitePaymentsError = UpdateSitePaymentsErrors[keyof UpdateSitePaymentsErrors];
|
|
1946
2524
|
type UpdateSitePaymentsResponses = {
|
|
@@ -1950,6 +2528,40 @@ type UpdateSitePaymentsResponses = {
|
|
|
1950
2528
|
200: SitePayments;
|
|
1951
2529
|
};
|
|
1952
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];
|
|
1953
2565
|
type GetPaymentsStatusData = {
|
|
1954
2566
|
body?: never;
|
|
1955
2567
|
path?: never;
|
|
@@ -2207,6 +2819,40 @@ type AttachProductFileResponses = {
|
|
|
2207
2819
|
200: Product;
|
|
2208
2820
|
};
|
|
2209
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];
|
|
2210
2856
|
type CreateTestOrderData = {
|
|
2211
2857
|
body?: CreateTestOrder;
|
|
2212
2858
|
path: {
|
|
@@ -2241,6 +2887,44 @@ type CreateTestOrderResponses = {
|
|
|
2241
2887
|
200: TestOrderResult;
|
|
2242
2888
|
};
|
|
2243
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];
|
|
2244
2928
|
type CreateMultiItemTestOrderData = {
|
|
2245
2929
|
body: CreateMultiItemTestOrder;
|
|
2246
2930
|
path?: never;
|
|
@@ -2337,6 +3021,40 @@ type SetProductVariantsResponses = {
|
|
|
2337
3021
|
200: SetProductVariantsResult;
|
|
2338
3022
|
};
|
|
2339
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];
|
|
2340
3058
|
type DeleteVariantData = {
|
|
2341
3059
|
body?: never;
|
|
2342
3060
|
path: {
|
|
@@ -2908,6 +3626,36 @@ type UpdateCustomerResponses = {
|
|
|
2908
3626
|
200: Customer;
|
|
2909
3627
|
};
|
|
2910
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];
|
|
2911
3659
|
type GetBusinessSummaryData = {
|
|
2912
3660
|
body?: never;
|
|
2913
3661
|
path?: never;
|
|
@@ -3117,58 +3865,222 @@ type SetOrderFulfillmentResponses = {
|
|
|
3117
3865
|
200: Order;
|
|
3118
3866
|
};
|
|
3119
3867
|
type SetOrderFulfillmentResponse = SetOrderFulfillmentResponses[keyof SetOrderFulfillmentResponses];
|
|
3120
|
-
type
|
|
3868
|
+
type ListSubscriptionsData = {
|
|
3121
3869
|
body?: never;
|
|
3122
3870
|
path?: never;
|
|
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";
|
|
3887
|
+
};
|
|
3888
|
+
type ListSubscriptionsErrors = {
|
|
3889
|
+
/**
|
|
3890
|
+
* site_id mismatch / does not belong to this organization
|
|
3891
|
+
*/
|
|
3892
|
+
400: unknown;
|
|
3893
|
+
/**
|
|
3894
|
+
* Missing or invalid token
|
|
3895
|
+
*/
|
|
3896
|
+
401: unknown;
|
|
3897
|
+
};
|
|
3898
|
+
type ListSubscriptionsResponses = {
|
|
3899
|
+
/**
|
|
3900
|
+
* The subscriptions
|
|
3901
|
+
*/
|
|
3902
|
+
200: SubscriptionsList;
|
|
3903
|
+
};
|
|
3904
|
+
type ListSubscriptionsResponse = ListSubscriptionsResponses[keyof ListSubscriptionsResponses];
|
|
3905
|
+
type CancelSubscriptionData = {
|
|
3906
|
+
body?: never;
|
|
3907
|
+
path: {
|
|
3908
|
+
subscriptionId: string;
|
|
3909
|
+
};
|
|
3123
3910
|
query?: never;
|
|
3124
|
-
url: "/api/v1/
|
|
3911
|
+
url: "/api/v1/subscriptions/{subscriptionId}/cancel";
|
|
3125
3912
|
};
|
|
3126
|
-
type
|
|
3913
|
+
type CancelSubscriptionErrors = {
|
|
3127
3914
|
/**
|
|
3128
|
-
*
|
|
3915
|
+
* Site tokens are not permitted
|
|
3129
3916
|
*/
|
|
3130
|
-
|
|
3917
|
+
403: unknown;
|
|
3131
3918
|
/**
|
|
3132
|
-
*
|
|
3919
|
+
* Subscription not found (or belongs to another org)
|
|
3133
3920
|
*/
|
|
3134
|
-
404:
|
|
3921
|
+
404: unknown;
|
|
3922
|
+
/**
|
|
3923
|
+
* Subscription already ended (code ended) — terminal locally, or Stripe says it is already canceled
|
|
3924
|
+
*/
|
|
3925
|
+
409: unknown;
|
|
3926
|
+
/**
|
|
3927
|
+
* Stripe unreachable — retry
|
|
3928
|
+
*/
|
|
3929
|
+
502: unknown;
|
|
3135
3930
|
};
|
|
3136
|
-
type
|
|
3137
|
-
type ListFormsWithSiteTokenResponses = {
|
|
3931
|
+
type CancelSubscriptionResponses = {
|
|
3138
3932
|
/**
|
|
3139
|
-
*
|
|
3933
|
+
* The updated subscription
|
|
3140
3934
|
*/
|
|
3141
|
-
200:
|
|
3935
|
+
200: SubscriptionSummary;
|
|
3142
3936
|
};
|
|
3143
|
-
type
|
|
3144
|
-
type
|
|
3145
|
-
body
|
|
3146
|
-
path
|
|
3937
|
+
type CancelSubscriptionResponse = CancelSubscriptionResponses[keyof CancelSubscriptionResponses];
|
|
3938
|
+
type TeardownSiteSubscriptionsData = {
|
|
3939
|
+
body?: SubscriptionsTeardownBody;
|
|
3940
|
+
path: {
|
|
3941
|
+
siteId: string;
|
|
3942
|
+
};
|
|
3147
3943
|
query?: never;
|
|
3148
|
-
url: "/api/v1/
|
|
3944
|
+
url: "/api/v1/sites/{siteId}/subscriptions/teardown";
|
|
3149
3945
|
};
|
|
3150
|
-
type
|
|
3946
|
+
type TeardownSiteSubscriptionsErrors = {
|
|
3151
3947
|
/**
|
|
3152
|
-
*
|
|
3948
|
+
* Site tokens are not permitted
|
|
3153
3949
|
*/
|
|
3154
|
-
|
|
3950
|
+
403: unknown;
|
|
3155
3951
|
/**
|
|
3156
|
-
* Site not found
|
|
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).
|
|
3157
3953
|
*/
|
|
3158
3954
|
404: Error;
|
|
3159
3955
|
};
|
|
3160
|
-
type
|
|
3161
|
-
type
|
|
3956
|
+
type TeardownSiteSubscriptionsError = TeardownSiteSubscriptionsErrors[keyof TeardownSiteSubscriptionsErrors];
|
|
3957
|
+
type TeardownSiteSubscriptionsResponses = {
|
|
3162
3958
|
/**
|
|
3163
|
-
*
|
|
3959
|
+
* Teardown outcome
|
|
3164
3960
|
*/
|
|
3165
|
-
|
|
3961
|
+
200: SubscriptionsTeardownResult;
|
|
3166
3962
|
};
|
|
3167
|
-
type
|
|
3168
|
-
type
|
|
3169
|
-
body?:
|
|
3170
|
-
path
|
|
3171
|
-
|
|
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;
|
|
4083
|
+
query?: {
|
|
3172
4084
|
/**
|
|
3173
4085
|
* Exact match on the consumer-side id (the landingsite website id) — the lookup for "which aifeatures site is this website?"
|
|
3174
4086
|
*/
|
|
@@ -3296,24 +4208,32 @@ type UpdateSiteData = {
|
|
|
3296
4208
|
};
|
|
3297
4209
|
type UpdateSiteErrors = {
|
|
3298
4210
|
/**
|
|
3299
|
-
* 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).
|
|
3300
4212
|
*/
|
|
3301
4213
|
400: Error;
|
|
3302
4214
|
/**
|
|
3303
4215
|
* Unauthorized
|
|
3304
4216
|
*/
|
|
3305
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;
|
|
3306
4222
|
/**
|
|
3307
4223
|
* Site not found
|
|
3308
4224
|
*/
|
|
3309
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;
|
|
3310
4230
|
};
|
|
3311
4231
|
type UpdateSiteError = UpdateSiteErrors[keyof UpdateSiteErrors];
|
|
3312
4232
|
type UpdateSiteResponses = {
|
|
3313
4233
|
/**
|
|
3314
|
-
* 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.
|
|
3315
4235
|
*/
|
|
3316
|
-
200:
|
|
4236
|
+
200: SiteWithRestatement;
|
|
3317
4237
|
};
|
|
3318
4238
|
type UpdateSiteResponse = UpdateSiteResponses[keyof UpdateSiteResponses];
|
|
3319
4239
|
type GetSiteCheckoutPauseData = {
|
|
@@ -3441,6 +4361,10 @@ type CreateFormData = {
|
|
|
3441
4361
|
url: "/api/v1/sites/{siteId}/forms";
|
|
3442
4362
|
};
|
|
3443
4363
|
type CreateFormErrors = {
|
|
4364
|
+
/**
|
|
4365
|
+
* Form name indicates credential/payment collection, which is not supported
|
|
4366
|
+
*/
|
|
4367
|
+
400: Error;
|
|
3444
4368
|
/**
|
|
3445
4369
|
* Unauthorized
|
|
3446
4370
|
*/
|
|
@@ -3519,6 +4443,10 @@ type UpdateFormData = {
|
|
|
3519
4443
|
url: "/api/v1/forms/{formId}";
|
|
3520
4444
|
};
|
|
3521
4445
|
type UpdateFormErrors = {
|
|
4446
|
+
/**
|
|
4447
|
+
* Form name indicates credential/payment collection, which is not supported
|
|
4448
|
+
*/
|
|
4449
|
+
400: Error;
|
|
3522
4450
|
/**
|
|
3523
4451
|
* Unauthorized
|
|
3524
4452
|
*/
|
|
@@ -3706,7 +4634,7 @@ type CreateCheckoutErrors = {
|
|
|
3706
4634
|
*/
|
|
3707
4635
|
404: Error;
|
|
3708
4636
|
/**
|
|
3709
|
-
* 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
|
|
3710
4638
|
*/
|
|
3711
4639
|
409: Error;
|
|
3712
4640
|
/**
|
|
@@ -3743,7 +4671,7 @@ type CreateCartCheckoutErrors = {
|
|
|
3743
4671
|
code?: string;
|
|
3744
4672
|
};
|
|
3745
4673
|
/**
|
|
3746
|
-
* 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
|
|
3747
4675
|
*/
|
|
3748
4676
|
409: CartConflict | ShippingOptionUnavailable | Error;
|
|
3749
4677
|
/**
|
|
@@ -3866,6 +4794,478 @@ type GetGeoResponses = {
|
|
|
3866
4794
|
200: GeoSuggestion;
|
|
3867
4795
|
};
|
|
3868
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];
|
|
3869
5269
|
|
|
3870
5270
|
type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options$1<TData, ThrowOnError> & {
|
|
3871
5271
|
/**
|
|
@@ -3886,6 +5286,12 @@ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean
|
|
|
3886
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.
|
|
3887
5287
|
*/
|
|
3888
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">;
|
|
3889
5295
|
/**
|
|
3890
5296
|
* Get payment readiness (site token)
|
|
3891
5297
|
*
|
|
@@ -3940,12 +5346,24 @@ declare const updateProduct: <ThrowOnError extends boolean = false>(options: Opt
|
|
|
3940
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.
|
|
3941
5347
|
*/
|
|
3942
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">;
|
|
3943
5355
|
/**
|
|
3944
5356
|
* Create a simulated test purchase
|
|
3945
5357
|
*
|
|
3946
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.
|
|
3947
5359
|
*/
|
|
3948
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">;
|
|
3949
5367
|
/**
|
|
3950
5368
|
* Create a simulated multi-item test purchase
|
|
3951
5369
|
*
|
|
@@ -3961,9 +5379,15 @@ declare const createVariant: <ThrowOnError extends boolean = false>(options: Opt
|
|
|
3961
5379
|
/**
|
|
3962
5380
|
* Reconcile the product's option/variant matrix
|
|
3963
5381
|
*
|
|
3964
|
-
* 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.
|
|
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 `[]`.
|
|
3965
5383
|
*/
|
|
3966
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">;
|
|
3967
5391
|
/**
|
|
3968
5392
|
* Delete a variant
|
|
3969
5393
|
*
|
|
@@ -4066,6 +5490,12 @@ declare const getCustomer: <ThrowOnError extends boolean = false>(options: Optio
|
|
|
4066
5490
|
* Updates a customer name/phone/metadata. Email is immutable (it is the upsert identity).
|
|
4067
5491
|
*/
|
|
4068
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">;
|
|
4069
5499
|
/**
|
|
4070
5500
|
* One-call business summary (site token, or org key with site_id)
|
|
4071
5501
|
*
|
|
@@ -4102,6 +5532,36 @@ declare const getNextPayout: <ThrowOnError extends boolean = false>(options?: Op
|
|
|
4102
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.
|
|
4103
5533
|
*/
|
|
4104
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">;
|
|
4105
5565
|
/**
|
|
4106
5566
|
* List all forms (site token)
|
|
4107
5567
|
*
|
|
@@ -4231,7 +5691,7 @@ declare const createCheckout: <ThrowOnError extends boolean = false>(options: Op
|
|
|
4231
5691
|
/**
|
|
4232
5692
|
* Start a multi-item (cart) checkout
|
|
4233
5693
|
*
|
|
4234
|
-
* 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.
|
|
4235
5695
|
*/
|
|
4236
5696
|
declare const createCartCheckout: <ThrowOnError extends boolean = false>(options: Options<CreateCartCheckoutData, ThrowOnError>) => RequestResult<CreateCartCheckoutResponses, CreateCartCheckoutErrors, ThrowOnError, "fields">;
|
|
4237
5697
|
/**
|
|
@@ -4258,5 +5718,95 @@ declare const downloadFile: <ThrowOnError extends boolean = false>(options: Opti
|
|
|
4258
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.
|
|
4259
5719
|
*/
|
|
4260
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">;
|
|
4261
5811
|
|
|
4262
|
-
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 };
|