@wix/auto_sdk_ecom_cart 1.0.181 → 1.0.182
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/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +127 -56
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +127 -56
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +127 -56
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +127 -56
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +135 -60
- package/build/internal/cjs/meta.d.ts +135 -60
- package/build/internal/es/index.typings.d.mts +135 -60
- package/build/internal/es/meta.d.mts +135 -60
- package/package.json +2 -2
package/build/cjs/meta.d.ts
CHANGED
|
@@ -2446,29 +2446,31 @@ interface Membership {
|
|
|
2446
2446
|
}
|
|
2447
2447
|
interface MembershipName {
|
|
2448
2448
|
/**
|
|
2449
|
-
* Membership name.
|
|
2449
|
+
* Membership name in the site's original language.
|
|
2450
2450
|
* @maxLength 100
|
|
2451
2451
|
*/
|
|
2452
2452
|
original?: string;
|
|
2453
2453
|
/**
|
|
2454
|
-
*
|
|
2454
|
+
* Membership name translated into the buyer's language.
|
|
2455
|
+
*
|
|
2456
|
+
* Default: The value of `original`
|
|
2455
2457
|
* @maxLength 100
|
|
2456
2458
|
*/
|
|
2457
2459
|
translated?: string | null;
|
|
2458
2460
|
}
|
|
2459
2461
|
interface MembershipPaymentCredits {
|
|
2460
2462
|
/**
|
|
2461
|
-
* Membership's initial
|
|
2463
|
+
* Membership's initial balance.
|
|
2462
2464
|
* @min 1
|
|
2463
2465
|
*/
|
|
2464
2466
|
total?: number;
|
|
2465
|
-
/** Membership's remaining
|
|
2467
|
+
/** Membership's remaining balance. */
|
|
2466
2468
|
remaining?: number;
|
|
2467
2469
|
}
|
|
2468
2470
|
declare enum BalanceType {
|
|
2469
|
-
/** Balance is measured in discrete uses
|
|
2471
|
+
/** Balance is measured in discrete uses, such as sessions or visits. */
|
|
2470
2472
|
PUNCH_CARD = "PUNCH_CARD",
|
|
2471
|
-
/** Balance is measured in a currency-like value
|
|
2473
|
+
/** Balance is measured in a currency-like value, such as points. */
|
|
2472
2474
|
CREDIT = "CREDIT"
|
|
2473
2475
|
}
|
|
2474
2476
|
/** @enumType */
|
|
@@ -2483,25 +2485,26 @@ interface InvalidMembership {
|
|
|
2483
2485
|
*/
|
|
2484
2486
|
reason?: string;
|
|
2485
2487
|
}
|
|
2486
|
-
/** Same shape as `ListExistingMembershipsResponse.memberships`. */
|
|
2488
|
+
/** The validated existing memberships. Same shape as `ListExistingMembershipsResponse.memberships`. */
|
|
2487
2489
|
interface ValidatedExistingMemberships {
|
|
2488
2490
|
/**
|
|
2489
|
-
* The selected memberships, each paired with the line items it can
|
|
2491
|
+
* The selected memberships, each paired with the line items it can pay for and the cost to redeem
|
|
2492
|
+
* each.
|
|
2490
2493
|
* @maxSize 300
|
|
2491
2494
|
*/
|
|
2492
2495
|
memberships?: ExistingMembership[];
|
|
2493
2496
|
}
|
|
2494
2497
|
/**
|
|
2495
|
-
* A membership the member
|
|
2498
|
+
* A membership the member owns, together with the given line items it can pay for.
|
|
2496
2499
|
*
|
|
2497
|
-
* A membership is a single benefit granted by a plan the member has already paid for, so coverage
|
|
2498
|
-
* nested here
|
|
2500
|
+
* A membership is a single benefit granted by a plan the member has already paid for, so its coverage
|
|
2501
|
+
* is nested directly here. No `benefitId` link is needed, unlike a plan that grants several benefits.
|
|
2499
2502
|
*/
|
|
2500
2503
|
interface ExistingMembership {
|
|
2501
2504
|
/** The membership the member owns. */
|
|
2502
2505
|
membership?: V1Membership;
|
|
2503
2506
|
/**
|
|
2504
|
-
*
|
|
2507
|
+
* Line items this membership can pay for, and the cost to redeem each.
|
|
2505
2508
|
* @maxSize 300
|
|
2506
2509
|
*/
|
|
2507
2510
|
coveredLineItems?: CoveredLineItem[];
|
|
@@ -2516,11 +2519,10 @@ interface V1Membership {
|
|
|
2516
2519
|
/** Membership name. */
|
|
2517
2520
|
name?: MembershipName;
|
|
2518
2521
|
/**
|
|
2519
|
-
* Deprecated. Use `ExistingMembership.
|
|
2522
|
+
* Deprecated. Use `ExistingMembership.coveredLineItems` to see which line items this membership
|
|
2523
|
+
* covers.
|
|
2520
2524
|
*
|
|
2521
|
-
* Populate this only in the legacy
|
|
2522
|
-
* membership that omits it. Leave it empty everywhere else - `ListMembershipsByIds` receives no line items
|
|
2523
|
-
* at all, so there is nothing to report there.
|
|
2525
|
+
* Populate this only in the legacy [List Eligible Memberships](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/payments/memberships/memberships-service-plugin/list-eligible-memberships) flow, which still requires it and rejects a membership that omits it. Leave it empty everywhere else. [List Memberships By IDs](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/payments/memberships/memberships-service-plugin/list-memberships-by-ids) receives no line items at all, so there's nothing to report there.
|
|
2524
2526
|
* @maxSize 300
|
|
2525
2527
|
* @minLength 1
|
|
2526
2528
|
* @maxLength 100
|
|
@@ -2529,12 +2531,18 @@ interface V1Membership {
|
|
|
2529
2531
|
* @targetRemovalDate 2026-08-30
|
|
2530
2532
|
*/
|
|
2531
2533
|
lineItemIds?: string[];
|
|
2532
|
-
/**
|
|
2534
|
+
/**
|
|
2535
|
+
* Membership's balance.
|
|
2536
|
+
*
|
|
2537
|
+
* Omit this field for an unlimited membership, which has no balance to draw down. Every
|
|
2538
|
+
* `ExistingMembership.coveredLineItems.redemptionCost` is then `0`. Unlike a plan's benefit, a
|
|
2539
|
+
* membership carries no explicit unlimited marker: the absence of a balance is the marker.
|
|
2540
|
+
*/
|
|
2533
2541
|
credits?: MembershipPaymentCredits;
|
|
2534
|
-
/**
|
|
2542
|
+
/** Date and time the membership expires. */
|
|
2535
2543
|
expirationDate?: Date | null;
|
|
2536
2544
|
/**
|
|
2537
|
-
* Deprecated. Use `
|
|
2545
|
+
* Deprecated. Use `offeringDescription` for human-readable data about the offering.
|
|
2538
2546
|
* @deprecated
|
|
2539
2547
|
* @replacedBy offering_description
|
|
2540
2548
|
* @targetRemovalDate 2026-08-30
|
|
@@ -2544,18 +2552,21 @@ interface V1Membership {
|
|
|
2544
2552
|
/** A line item a membership can pay for, and the cost to redeem it. */
|
|
2545
2553
|
interface CoveredLineItem {
|
|
2546
2554
|
/**
|
|
2547
|
-
*
|
|
2555
|
+
* ID of the line item this membership can pay for. Matches the `id` of one of the given line items.
|
|
2548
2556
|
* @minLength 1
|
|
2549
2557
|
* @maxLength 100
|
|
2550
2558
|
*/
|
|
2551
2559
|
lineItemId?: string;
|
|
2552
2560
|
/**
|
|
2553
|
-
*
|
|
2554
|
-
*
|
|
2561
|
+
* Amount deducted from the membership's remaining balance (`credits.remaining`) when this line item
|
|
2562
|
+
* is redeemed.
|
|
2563
|
+
*
|
|
2564
|
+
* Always `0` for an unlimited membership, which is expressed by omitting `credits` and decrements
|
|
2565
|
+
* nothing.
|
|
2555
2566
|
*/
|
|
2556
2567
|
redemptionCost?: number;
|
|
2557
2568
|
}
|
|
2558
|
-
/** Same shape as `ListPurchasablePlansResponse`. */
|
|
2569
|
+
/** The validated purchasable plans. Same shape as `ListPurchasablePlansResponse`. */
|
|
2559
2570
|
interface ValidatedPurchasablePlans {
|
|
2560
2571
|
/**
|
|
2561
2572
|
* The selected plans.
|
|
@@ -2563,68 +2574,109 @@ interface ValidatedPurchasablePlans {
|
|
|
2563
2574
|
*/
|
|
2564
2575
|
purchasablePlans?: PurchasablePlan[];
|
|
2565
2576
|
/**
|
|
2566
|
-
* How the plans' benefits cover the line items,
|
|
2577
|
+
* How the plans' benefits cover the line items, each entry naming its benefit by `benefitId`.
|
|
2567
2578
|
* @maxSize 300
|
|
2568
2579
|
*/
|
|
2569
2580
|
coverages?: LineItemCoverage[];
|
|
2570
2581
|
}
|
|
2571
2582
|
interface PurchasablePlan {
|
|
2572
|
-
/**
|
|
2583
|
+
/**
|
|
2584
|
+
* Catalog and item reference identifying both the plan and the pricing variant.
|
|
2585
|
+
*
|
|
2586
|
+
* A purchasable plan has no ID of its own. The reference carries the plan in `catalogItemId` and
|
|
2587
|
+
* the chosen pricing variant in `options`, so the same plan appears once per variant with a
|
|
2588
|
+
* different reference each time. The plan ID alone repeats across entries; the full reference
|
|
2589
|
+
* doesn't.
|
|
2590
|
+
*
|
|
2591
|
+
* When the plan needs nothing further from the buyer, the reference can be added to the cart as it
|
|
2592
|
+
* stands. When it does, for example a plan carrying a form, a custom start date, or a buyer-chosen
|
|
2593
|
+
* price, the reference has to be completed with that input first. See `infoCollectionUrl`.
|
|
2594
|
+
*/
|
|
2573
2595
|
catalogReference?: CatalogReference;
|
|
2574
2596
|
/** Plan name. */
|
|
2575
2597
|
name?: MembershipName;
|
|
2576
2598
|
/**
|
|
2577
|
-
* Benefits the plan
|
|
2599
|
+
* Benefits the plan grants once purchased.
|
|
2600
|
+
*
|
|
2601
|
+
* A plan can grant several, for example a bundle granting separate yoga and pilates credits. Each
|
|
2602
|
+
* benefit becomes its own membership after purchase.
|
|
2578
2603
|
* @minSize 1
|
|
2579
2604
|
* @maxSize 50
|
|
2580
2605
|
*/
|
|
2581
2606
|
benefits?: Benefit[];
|
|
2582
2607
|
/**
|
|
2583
|
-
* Human-readable
|
|
2608
|
+
* Human-readable summary of what the plan offers, for display. For example, `8 yoga classes and 4
|
|
2609
|
+
* pilates classes, billed monthly`.
|
|
2610
|
+
*
|
|
2611
|
+
* Describe the offering here and the price in `priceDescription`.
|
|
2584
2612
|
* @maxLength 500
|
|
2585
2613
|
*/
|
|
2586
2614
|
offeringDescription?: string | null;
|
|
2587
2615
|
/**
|
|
2588
|
-
* URL the
|
|
2616
|
+
* URL of the page that collects the extra input this plan needs before it can be purchased.
|
|
2617
|
+
*
|
|
2618
|
+
* Return it only for a plan that needs more from the buyer, such as one carrying a form, a custom
|
|
2619
|
+
* start date, or a buyer-chosen price. Omitting it means the plan needs nothing further, and the
|
|
2620
|
+
* caller builds the cart itself.
|
|
2621
|
+
*
|
|
2622
|
+
* The buyer reaches this page before any cart exists, rather than from the checkout page, and
|
|
2623
|
+
* there's no return trip. The page receives the caller's already-created items, then builds the
|
|
2624
|
+
* cart and checkout from the plan plus those items. There's no return URL, no cart ID, no
|
|
2625
|
+
* preserved selection, and no completion signal: the purchase reaches Wix through the ordinary
|
|
2626
|
+
* checkout and order flow, and the membership through Membership Ready To Be Charged.
|
|
2627
|
+
*
|
|
2628
|
+
* The page covers a single plan. Items that plan covers can be mixed with directly-paid ones, but
|
|
2629
|
+
* a selection spanning two plans isn't supported here.
|
|
2589
2630
|
* @format WEB_URL
|
|
2590
2631
|
*/
|
|
2591
2632
|
infoCollectionUrl?: string | null;
|
|
2592
2633
|
/**
|
|
2593
|
-
* Plan price.
|
|
2634
|
+
* Plan price, in the plan's own configured currency.
|
|
2635
|
+
*
|
|
2636
|
+
* No currency accompanies the amount and none is converted, so prices from different plans aren't
|
|
2637
|
+
* comparable and the currency reaches the buyer only through `priceDescription`. Name the currency
|
|
2638
|
+
* there.
|
|
2594
2639
|
* @decimalValue options { gte:0, maxScale:3 }
|
|
2595
2640
|
*/
|
|
2596
2641
|
price?: string;
|
|
2597
2642
|
/**
|
|
2598
|
-
* Human-readable
|
|
2643
|
+
* Human-readable summary of the plan price, for display. For example, `First month free, then
|
|
2644
|
+
* $20/month`.
|
|
2599
2645
|
*
|
|
2600
|
-
* `price`
|
|
2601
|
-
*
|
|
2646
|
+
* Use `price` for the bare amount, which is what sorting and comparison rely on, and this field for
|
|
2647
|
+
* pricing a buyer needs prose to understand.
|
|
2602
2648
|
* @maxLength 500
|
|
2603
2649
|
*/
|
|
2604
2650
|
priceDescription?: string | null;
|
|
2605
2651
|
}
|
|
2606
2652
|
/**
|
|
2607
|
-
* A single redeemable benefit
|
|
2608
|
-
*
|
|
2653
|
+
* A single redeemable benefit granted by a plan.
|
|
2654
|
+
*
|
|
2655
|
+
* A purchasable plan grants one or more benefits in `benefits`. Once the plan is paid for, each benefit
|
|
2656
|
+
* becomes its own membership, charged by `membershipId`.
|
|
2609
2657
|
*/
|
|
2610
2658
|
interface Benefit extends BenefitQuotaOneOf {
|
|
2611
2659
|
limitedQuota?: LimitedQuota;
|
|
2612
2660
|
/**
|
|
2613
|
-
* Identifier for this benefit
|
|
2614
|
-
*
|
|
2661
|
+
* Identifier for this benefit, unique within its plan.
|
|
2662
|
+
*
|
|
2663
|
+
* Not unique across the response. A plan is returned once per pricing variant, and every variant
|
|
2664
|
+
* repeats that plan's benefit IDs. Two different plans can also share an ID when they grant the
|
|
2665
|
+
* same benefit, and a coverage entry naming it is then true for both.
|
|
2666
|
+
*
|
|
2667
|
+
* Never give two different benefits the same ID. That's the one case a caller can't recover from,
|
|
2668
|
+
* because a cost computed for one benefit would be applied to the other.
|
|
2615
2669
|
* @minLength 1
|
|
2616
2670
|
* @maxLength 200
|
|
2617
2671
|
*/
|
|
2618
2672
|
benefitId?: string;
|
|
2619
2673
|
/**
|
|
2620
|
-
* Human-readable label for this benefit
|
|
2674
|
+
* Human-readable label for this benefit. For example, `Manicure` or `Pedicure` on a multi-set
|
|
2675
|
+
* punch card.
|
|
2621
2676
|
* @maxLength 200
|
|
2622
2677
|
*/
|
|
2623
2678
|
label?: string | null;
|
|
2624
|
-
/**
|
|
2625
|
-
* The kind of quota this benefit grants: a countable amount drawn down on redemption (`LIMITED`),
|
|
2626
|
-
* or an unbounded amount that is never drawn down (`UNLIMITED`).
|
|
2627
|
-
*/
|
|
2679
|
+
/** Kind of quota this benefit grants. */
|
|
2628
2680
|
quotaType?: QuotaTypeWithLiterals;
|
|
2629
2681
|
}
|
|
2630
2682
|
/** @oneof */
|
|
@@ -2632,9 +2684,9 @@ interface BenefitQuotaOneOf {
|
|
|
2632
2684
|
limitedQuota?: LimitedQuota;
|
|
2633
2685
|
}
|
|
2634
2686
|
declare enum QuotaType {
|
|
2635
|
-
/** The benefit grants a countable quota that
|
|
2687
|
+
/** The benefit grants a countable quota that's drawn down on redemption. */
|
|
2636
2688
|
LIMITED = "LIMITED",
|
|
2637
|
-
/** The benefit is unlimited
|
|
2689
|
+
/** The benefit is unlimited and is never drawn down. */
|
|
2638
2690
|
UNLIMITED = "UNLIMITED"
|
|
2639
2691
|
}
|
|
2640
2692
|
/** @enumType */
|
|
@@ -2642,45 +2694,64 @@ type QuotaTypeWithLiterals = QuotaType | 'LIMITED' | 'UNLIMITED';
|
|
|
2642
2694
|
/** A limited, countable redeemable amount. */
|
|
2643
2695
|
interface LimitedQuota {
|
|
2644
2696
|
/**
|
|
2645
|
-
*
|
|
2697
|
+
* Quota's initial value.
|
|
2646
2698
|
* @min 1
|
|
2647
2699
|
*/
|
|
2648
2700
|
total?: number;
|
|
2649
|
-
/**
|
|
2701
|
+
/** Quota's remaining value. */
|
|
2650
2702
|
remaining?: number;
|
|
2651
|
-
/**
|
|
2703
|
+
/**
|
|
2704
|
+
* How the quota is measured.
|
|
2705
|
+
*
|
|
2706
|
+
* The same vocabulary as `MembershipPaymentCredits.balanceType` on the existing-membership side.
|
|
2707
|
+
*/
|
|
2652
2708
|
limitedQuotaType?: LimitedQuotaTypeWithLiterals;
|
|
2653
2709
|
}
|
|
2654
2710
|
declare enum LimitedQuotaType {
|
|
2655
|
-
/** Quota is measured in discrete uses
|
|
2711
|
+
/** Quota is measured in discrete uses, such as sessions or visits. */
|
|
2656
2712
|
PUNCH_CARD = "PUNCH_CARD",
|
|
2657
|
-
/** Quota is measured in a currency-like value
|
|
2713
|
+
/** Quota is measured in a currency-like value, such as points. */
|
|
2658
2714
|
CREDIT = "CREDIT"
|
|
2659
2715
|
}
|
|
2660
2716
|
/** @enumType */
|
|
2661
2717
|
type LimitedQuotaTypeWithLiterals = LimitedQuotaType | 'PUNCH_CARD' | 'CREDIT';
|
|
2662
2718
|
/**
|
|
2663
|
-
* Maps a
|
|
2664
|
-
*
|
|
2665
|
-
*
|
|
2666
|
-
*
|
|
2719
|
+
* Maps one of a plan's benefits to a line item it can cover, and at what cost.
|
|
2720
|
+
*
|
|
2721
|
+
* One entry per benefit and line item pair, returned by [List Purchasable Plans](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/payments/memberships/memberships-service-plugin/list-purchasable-plans) alongside `purchasablePlans`.
|
|
2722
|
+
*
|
|
2723
|
+
* An entry names a benefit and carries no plan identity, so match its `benefitId` against the
|
|
2724
|
+
* `benefits` of the returned plans and apply it to every entry that grants that benefit. Entries for
|
|
2725
|
+
* the same plan repeat it once per pricing variant, and two different plans sharing a benefit ID
|
|
2726
|
+
* grant the same benefit, so the entry holds for each of them. A caller that stops at the first
|
|
2727
|
+
* match shows nothing incorrect, but hides the other entries, which cover the item too.
|
|
2728
|
+
*
|
|
2729
|
+
* The cost is identical across a plan's variants, so there's one entry per benefit rather than one
|
|
2730
|
+
* per variant.
|
|
2731
|
+
*
|
|
2732
|
+
* For memberships the member already owns, the equivalent mapping is
|
|
2733
|
+
* `ExistingMembership.coveredLineItems`, which needs no `benefitId` because a membership is a single
|
|
2734
|
+
* benefit.
|
|
2667
2735
|
*/
|
|
2668
2736
|
interface LineItemCoverage {
|
|
2669
2737
|
/**
|
|
2670
|
-
*
|
|
2738
|
+
* ID of the benefit that covers the line item, as returned in `Benefit.benefitId`.
|
|
2739
|
+
*
|
|
2740
|
+
* Identifies a benefit within its plan, and repeats across that plan's pricing variants.
|
|
2671
2741
|
* @minLength 1
|
|
2672
2742
|
* @maxLength 200
|
|
2673
2743
|
*/
|
|
2674
2744
|
benefitId?: string;
|
|
2675
2745
|
/**
|
|
2676
|
-
*
|
|
2746
|
+
* ID of the line item this benefit covers.
|
|
2677
2747
|
* @minLength 1
|
|
2678
2748
|
* @maxLength 100
|
|
2679
2749
|
*/
|
|
2680
2750
|
lineItemId?: string;
|
|
2681
2751
|
/**
|
|
2682
|
-
*
|
|
2683
|
-
*
|
|
2752
|
+
* Amount deducted from the benefit's `limitedQuota.remaining` value when this line item is redeemed.
|
|
2753
|
+
*
|
|
2754
|
+
* Always `0` for an unlimited benefit, which decrements nothing.
|
|
2684
2755
|
*/
|
|
2685
2756
|
redemptionCost?: number;
|
|
2686
2757
|
}
|