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