@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.
@@ -2815,27 +2815,29 @@ interface Membership {
2815
2815
  }
2816
2816
  interface MembershipName {
2817
2817
  /**
2818
- * Membership name.
2818
+ * Membership name in the site's original language.
2819
2819
  * @maxLength 100
2820
2820
  */
2821
2821
  original?: string;
2822
2822
  /**
2823
- * Translated membership name. Defaults to `original` when not provided.
2823
+ * Membership name translated into the buyer's language.
2824
+ *
2825
+ * Default: The value of `original`
2824
2826
  * @maxLength 100
2825
2827
  */
2826
2828
  translated?: string | null;
2827
2829
  }
2828
2830
  interface MembershipPaymentCredits {
2829
2831
  /**
2830
- * Membership's initial value.
2832
+ * Membership's initial balance.
2831
2833
  * @min 1
2832
2834
  */
2833
2835
  total?: number;
2834
- /** Membership's remaining value. */
2836
+ /** Membership's remaining balance. */
2835
2837
  remaining?: number;
2836
2838
  /**
2837
- * Deprecated. The new flow no longer exposes a per-item redemption cost on a membership's credits;
2838
- * what a membership can pay for is conveyed by `ExistingMembership.covered_line_items` (per-item redemption cost).
2839
+ * Deprecated. Use `ExistingMembership.coveredLineItems`, which carries the redemption cost per line
2840
+ * item. A membership's balance no longer states a per-item cost of its own.
2839
2841
  * @internal
2840
2842
  * @deprecated
2841
2843
  * @replacedBy ExistingMembership.covered_line_items.redemption_cost
@@ -2843,15 +2845,19 @@ interface MembershipPaymentCredits {
2843
2845
  */
2844
2846
  redemptionCost?: number;
2845
2847
  /**
2846
- * Membership's balance type.
2848
+ * How the membership's balance is measured.
2849
+ *
2850
+ * The same vocabulary as `LimitedQuota.limitedQuotaType` on the purchasable-plan side. The two are
2851
+ * separate types only because this one serves the legacy flow and is left untouched until List
2852
+ * Eligible Memberships is removed.
2847
2853
  * @internal
2848
2854
  */
2849
2855
  balanceType?: BalanceTypeWithLiterals;
2850
2856
  }
2851
2857
  declare enum BalanceType {
2852
- /** Balance is measured in discrete uses (e.g., sessions, visits). */
2858
+ /** Balance is measured in discrete uses, such as sessions or visits. */
2853
2859
  PUNCH_CARD = "PUNCH_CARD",
2854
- /** Balance is measured in a currency-like value (e.g., points). */
2860
+ /** Balance is measured in a currency-like value, such as points. */
2855
2861
  CREDIT = "CREDIT"
2856
2862
  }
2857
2863
  /** @enumType */
@@ -2866,25 +2872,26 @@ interface InvalidMembership {
2866
2872
  */
2867
2873
  reason?: string;
2868
2874
  }
2869
- /** Same shape as `ListExistingMembershipsResponse.memberships`. */
2875
+ /** The validated existing memberships. Same shape as `ListExistingMembershipsResponse.memberships`. */
2870
2876
  interface ValidatedExistingMemberships {
2871
2877
  /**
2872
- * The selected memberships, each paired with the line items it can redeem and the cost to redeem each.
2878
+ * The selected memberships, each paired with the line items it can pay for and the cost to redeem
2879
+ * each.
2873
2880
  * @maxSize 300
2874
2881
  */
2875
2882
  memberships?: ExistingMembership[];
2876
2883
  }
2877
2884
  /**
2878
- * A membership the member already owns, together with the input line items it can pay for.
2885
+ * A membership the member owns, together with the given line items it can pay for.
2879
2886
  *
2880
- * A membership is a single benefit granted by a plan the member has already paid for, so coverage is
2881
- * nested here per membership (no `benefit_id` linkage is needed, unlike a plan that grants many benefits).
2887
+ * A membership is a single benefit granted by a plan the member has already paid for, so its coverage
2888
+ * is nested directly here. No `benefitId` link is needed, unlike a plan that grants several benefits.
2882
2889
  */
2883
2890
  interface ExistingMembership {
2884
2891
  /** The membership the member owns. */
2885
2892
  membership?: V1Membership;
2886
2893
  /**
2887
- * The input line items this membership can pay for, and the cost to redeem each.
2894
+ * Line items this membership can pay for, and the cost to redeem each.
2888
2895
  * @maxSize 300
2889
2896
  */
2890
2897
  coveredLineItems?: CoveredLineItem[];
@@ -2899,11 +2906,10 @@ interface V1Membership {
2899
2906
  /** Membership name. */
2900
2907
  name?: MembershipName;
2901
2908
  /**
2902
- * Deprecated. Use `ExistingMembership.covered_line_items` to see which line items this membership covers.
2909
+ * Deprecated. Use `ExistingMembership.coveredLineItems` to see which line items this membership
2910
+ * covers.
2903
2911
  *
2904
- * Populate this only in the legacy `ListEligibleMemberships` flow, which still requires it and rejects a
2905
- * membership that omits it. Leave it empty everywhere else - `ListMembershipsByIds` receives no line items
2906
- * at all, so there is nothing to report there.
2912
+ * 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.
2907
2913
  * @maxSize 300
2908
2914
  * @minLength 1
2909
2915
  * @maxLength 100
@@ -2912,19 +2918,25 @@ interface V1Membership {
2912
2918
  * @targetRemovalDate 2026-08-30
2913
2919
  */
2914
2920
  lineItemIds?: string[];
2915
- /** Membership's payment credits (balance information). */
2921
+ /**
2922
+ * Membership's balance.
2923
+ *
2924
+ * Omit this field for an unlimited membership, which has no balance to draw down. Every
2925
+ * `ExistingMembership.coveredLineItems.redemptionCost` is then `0`. Unlike a plan's benefit, a
2926
+ * membership carries no explicit unlimited marker: the absence of a balance is the marker.
2927
+ */
2916
2928
  credits?: MembershipPaymentCredits;
2917
- /** Membership expiration date. */
2929
+ /** Date and time the membership expires. */
2918
2930
  expirationDate?: Date | null;
2919
2931
  /**
2920
- * Deprecated. Use `offering_description` for human-readable provider data.
2932
+ * Deprecated. Use `offeringDescription` for human-readable data about the offering.
2921
2933
  * @deprecated
2922
2934
  * @replacedBy offering_description
2923
2935
  * @targetRemovalDate 2026-08-30
2924
2936
  */
2925
2937
  additionalData?: Record<string, any> | null;
2926
2938
  /**
2927
- * Human-readable offering summary for display (for example price and validity text). Provider-supplied.
2939
+ * Human-readable summary of the offering, for display. For example, its price and validity text.
2928
2940
  * @internal
2929
2941
  * @maxLength 500
2930
2942
  */
@@ -2933,18 +2945,21 @@ interface V1Membership {
2933
2945
  /** A line item a membership can pay for, and the cost to redeem it. */
2934
2946
  interface CoveredLineItem {
2935
2947
  /**
2936
- * The input line item this membership can cover.
2948
+ * ID of the line item this membership can pay for. Matches the `id` of one of the given line items.
2937
2949
  * @minLength 1
2938
2950
  * @maxLength 100
2939
2951
  */
2940
2952
  lineItemId?: string;
2941
2953
  /**
2942
- * The amount to redeem from the membership's benefit quota (`benefit.limited_quota.remaining`) for this item.
2943
- * Always 0 when the benefit is unlimited (nothing is decremented).
2954
+ * Amount deducted from the membership's remaining balance (`credits.remaining`) when this line item
2955
+ * is redeemed.
2956
+ *
2957
+ * Always `0` for an unlimited membership, which is expressed by omitting `credits` and decrements
2958
+ * nothing.
2944
2959
  */
2945
2960
  redemptionCost?: number;
2946
2961
  }
2947
- /** Same shape as `ListPurchasablePlansResponse`. */
2962
+ /** The validated purchasable plans. Same shape as `ListPurchasablePlansResponse`. */
2948
2963
  interface ValidatedPurchasablePlans {
2949
2964
  /**
2950
2965
  * The selected plans.
@@ -2952,68 +2967,109 @@ interface ValidatedPurchasablePlans {
2952
2967
  */
2953
2968
  purchasablePlans?: PurchasablePlan[];
2954
2969
  /**
2955
- * How the plans' benefits cover the line items, linked to a benefit by `benefit_id`.
2970
+ * How the plans' benefits cover the line items, each entry naming its benefit by `benefitId`.
2956
2971
  * @maxSize 300
2957
2972
  */
2958
2973
  coverages?: LineItemCoverage[];
2959
2974
  }
2960
2975
  interface PurchasablePlan {
2961
- /** Catalog and item reference for the plan that can be purchased. */
2976
+ /**
2977
+ * Catalog and item reference identifying both the plan and the pricing variant.
2978
+ *
2979
+ * A purchasable plan has no ID of its own. The reference carries the plan in `catalogItemId` and
2980
+ * the chosen pricing variant in `options`, so the same plan appears once per variant with a
2981
+ * different reference each time. The plan ID alone repeats across entries; the full reference
2982
+ * doesn't.
2983
+ *
2984
+ * When the plan needs nothing further from the buyer, the reference can be added to the cart as it
2985
+ * stands. When it does, for example a plan carrying a form, a custom start date, or a buyer-chosen
2986
+ * price, the reference has to be completed with that input first. See `infoCollectionUrl`.
2987
+ */
2962
2988
  catalogReference?: CatalogReference;
2963
2989
  /** Plan name. */
2964
2990
  name?: MembershipName;
2965
2991
  /**
2966
- * Benefits the plan would grant once purchased. Multiple entries support multi-benefit plans (e.g., a bundle granting separate yoga and pilates credits).
2992
+ * Benefits the plan grants once purchased.
2993
+ *
2994
+ * A plan can grant several, for example a bundle granting separate yoga and pilates credits. Each
2995
+ * benefit becomes its own membership after purchase.
2967
2996
  * @minSize 1
2968
2997
  * @maxSize 50
2969
2998
  */
2970
2999
  benefits?: Benefit[];
2971
3000
  /**
2972
- * Human-readable offering summary for display (for example price and validity text). Provider-supplied.
3001
+ * Human-readable summary of what the plan offers, for display. For example, `8 yoga classes and 4
3002
+ * pilates classes, billed monthly`.
3003
+ *
3004
+ * Describe the offering here and the price in `priceDescription`.
2973
3005
  * @maxLength 500
2974
3006
  */
2975
3007
  offeringDescription?: string | null;
2976
3008
  /**
2977
- * URL the buyer is redirected to in order to collect additional info required to purchase this plan.
3009
+ * URL of the page that collects the extra input this plan needs before it can be purchased.
3010
+ *
3011
+ * Return it only for a plan that needs more from the buyer, such as one carrying a form, a custom
3012
+ * start date, or a buyer-chosen price. Omitting it means the plan needs nothing further, and the
3013
+ * caller builds the cart itself.
3014
+ *
3015
+ * The buyer reaches this page before any cart exists, rather than from the checkout page, and
3016
+ * there's no return trip. The page receives the caller's already-created items, then builds the
3017
+ * cart and checkout from the plan plus those items. There's no return URL, no cart ID, no
3018
+ * preserved selection, and no completion signal: the purchase reaches Wix through the ordinary
3019
+ * checkout and order flow, and the membership through Membership Ready To Be Charged.
3020
+ *
3021
+ * The page covers a single plan. Items that plan covers can be mixed with directly-paid ones, but
3022
+ * a selection spanning two plans isn't supported here.
2978
3023
  * @format WEB_URL
2979
3024
  */
2980
3025
  infoCollectionUrl?: string | null;
2981
3026
  /**
2982
- * Plan price.
3027
+ * Plan price, in the plan's own configured currency.
3028
+ *
3029
+ * No currency accompanies the amount and none is converted, so prices from different plans aren't
3030
+ * comparable and the currency reaches the buyer only through `priceDescription`. Name the currency
3031
+ * there.
2983
3032
  * @decimalValue options { gte:0, maxScale:3 }
2984
3033
  */
2985
3034
  price?: string;
2986
3035
  /**
2987
- * Human-readable description of the plan price (for example "First month free, then $20/month").
3036
+ * Human-readable summary of the plan price, for display. For example, `First month free, then
3037
+ * $20/month`.
2988
3038
  *
2989
- * `price` is simply the price (useful for sorting or comparison, for example), while this is a
2990
- * descriptive, display-oriented summary of it.
3039
+ * Use `price` for the bare amount, which is what sorting and comparison rely on, and this field for
3040
+ * pricing a buyer needs prose to understand.
2991
3041
  * @maxLength 500
2992
3042
  */
2993
3043
  priceDescription?: string | null;
2994
3044
  }
2995
3045
  /**
2996
- * A single redeemable benefit. A purchasable plan grants one or more benefits (`PurchasablePlan.benefits`);
2997
- * once the plan is paid, each benefit becomes its own membership (charged via `membership_id`).
3046
+ * A single redeemable benefit granted by a plan.
3047
+ *
3048
+ * A purchasable plan grants one or more benefits in `benefits`. Once the plan is paid for, each benefit
3049
+ * becomes its own membership, charged by `membershipId`.
2998
3050
  */
2999
3051
  interface Benefit extends BenefitQuotaOneOf {
3000
3052
  limitedQuota?: LimitedQuota;
3001
3053
  /**
3002
- * Identifier for this benefit. On a `PurchasablePlan` it must be unique within the response so
3003
- * `coverages` (`LineItemCoverage.benefit_id`) can reference it unambiguously across the plan's benefits.
3054
+ * Identifier for this benefit, unique within its plan.
3055
+ *
3056
+ * Not unique across the response. A plan is returned once per pricing variant, and every variant
3057
+ * repeats that plan's benefit IDs. Two different plans can also share an ID when they grant the
3058
+ * same benefit, and a coverage entry naming it is then true for both.
3059
+ *
3060
+ * Never give two different benefits the same ID. That's the one case a caller can't recover from,
3061
+ * because a cost computed for one benefit would be applied to the other.
3004
3062
  * @minLength 1
3005
3063
  * @maxLength 200
3006
3064
  */
3007
3065
  benefitId?: string;
3008
3066
  /**
3009
- * Human-readable label for this benefit (for example, "Manicure" or "Pedicure" on multi-set punchcards).
3067
+ * Human-readable label for this benefit. For example, `Manicure` or `Pedicure` on a multi-set
3068
+ * punch card.
3010
3069
  * @maxLength 200
3011
3070
  */
3012
3071
  label?: string | null;
3013
- /**
3014
- * The kind of quota this benefit grants: a countable amount drawn down on redemption (`LIMITED`),
3015
- * or an unbounded amount that is never drawn down (`UNLIMITED`).
3016
- */
3072
+ /** Kind of quota this benefit grants. */
3017
3073
  quotaType?: QuotaTypeWithLiterals;
3018
3074
  }
3019
3075
  /** @oneof */
@@ -3021,9 +3077,9 @@ interface BenefitQuotaOneOf {
3021
3077
  limitedQuota?: LimitedQuota;
3022
3078
  }
3023
3079
  declare enum QuotaType {
3024
- /** The benefit grants a countable quota that is drawn down on redemption. */
3080
+ /** The benefit grants a countable quota that's drawn down on redemption. */
3025
3081
  LIMITED = "LIMITED",
3026
- /** The benefit is unlimited (unbounded) and is never drawn down. */
3082
+ /** The benefit is unlimited and is never drawn down. */
3027
3083
  UNLIMITED = "UNLIMITED"
3028
3084
  }
3029
3085
  /** @enumType */
@@ -3031,45 +3087,64 @@ type QuotaTypeWithLiterals = QuotaType | 'LIMITED' | 'UNLIMITED';
3031
3087
  /** A limited, countable redeemable amount. */
3032
3088
  interface LimitedQuota {
3033
3089
  /**
3034
- * The quota's initial value.
3090
+ * Quota's initial value.
3035
3091
  * @min 1
3036
3092
  */
3037
3093
  total?: number;
3038
- /** The quota's remaining value. */
3094
+ /** Quota's remaining value. */
3039
3095
  remaining?: number;
3040
- /** How the quota is measured. */
3096
+ /**
3097
+ * How the quota is measured.
3098
+ *
3099
+ * The same vocabulary as `MembershipPaymentCredits.balanceType` on the existing-membership side.
3100
+ */
3041
3101
  limitedQuotaType?: LimitedQuotaTypeWithLiterals;
3042
3102
  }
3043
3103
  declare enum LimitedQuotaType {
3044
- /** Quota is measured in discrete uses (e.g., sessions, visits). */
3104
+ /** Quota is measured in discrete uses, such as sessions or visits. */
3045
3105
  PUNCH_CARD = "PUNCH_CARD",
3046
- /** Quota is measured in a currency-like value (e.g., points). */
3106
+ /** Quota is measured in a currency-like value, such as points. */
3047
3107
  CREDIT = "CREDIT"
3048
3108
  }
3049
3109
  /** @enumType */
3050
3110
  type LimitedQuotaTypeWithLiterals = LimitedQuotaType | 'PUNCH_CARD' | 'CREDIT';
3051
3111
  /**
3052
- * Maps a benefit to a line item it can cover, and at what cost, linked to a benefit by `benefit_id`.
3053
- * One entry per (benefit, line item). Returned by `ListPurchasablePlans` (alongside `purchasable_plans`).
3054
- * For the existing-memberships flow the equivalent mapping is `ExistingMembership.covered_line_items`,
3055
- * which needs no `benefit_id` because a membership is a single benefit.
3112
+ * Maps one of a plan's benefits to a line item it can cover, and at what cost.
3113
+ *
3114
+ * 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`.
3115
+ *
3116
+ * An entry names a benefit and carries no plan identity, so match its `benefitId` against the
3117
+ * `benefits` of the returned plans and apply it to every entry that grants that benefit. Entries for
3118
+ * the same plan repeat it once per pricing variant, and two different plans sharing a benefit ID
3119
+ * grant the same benefit, so the entry holds for each of them. A caller that stops at the first
3120
+ * match shows nothing incorrect, but hides the other entries, which cover the item too.
3121
+ *
3122
+ * The cost is identical across a plan's variants, so there's one entry per benefit rather than one
3123
+ * per variant.
3124
+ *
3125
+ * For memberships the member already owns, the equivalent mapping is
3126
+ * `ExistingMembership.coveredLineItems`, which needs no `benefitId` because a membership is a single
3127
+ * benefit.
3056
3128
  */
3057
3129
  interface LineItemCoverage {
3058
3130
  /**
3059
- * The benefit that covers the line item, as returned in `Benefit.benefit_id`.
3131
+ * ID of the benefit that covers the line item, as returned in `Benefit.benefitId`.
3132
+ *
3133
+ * Identifies a benefit within its plan, and repeats across that plan's pricing variants.
3060
3134
  * @minLength 1
3061
3135
  * @maxLength 200
3062
3136
  */
3063
3137
  benefitId?: string;
3064
3138
  /**
3065
- * The line item this benefit covers.
3139
+ * ID of the line item this benefit covers.
3066
3140
  * @minLength 1
3067
3141
  * @maxLength 100
3068
3142
  */
3069
3143
  lineItemId?: string;
3070
3144
  /**
3071
- * The amount to redeem from the benefit's `limited_quota.remaining` value for this item.
3072
- * Always 0 for an unlimited benefit (nothing is decremented).
3145
+ * Amount deducted from the benefit's `limitedQuota.remaining` value when this line item is redeemed.
3146
+ *
3147
+ * Always `0` for an unlimited benefit, which decrements nothing.
3073
3148
  */
3074
3149
  redemptionCost?: number;
3075
3150
  }