@wix/auto_sdk_ecom_subscription-contracts 1.0.148 → 1.0.150

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.
@@ -4,7 +4,7 @@ import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types';
4
4
  /**
5
5
  * A subscription contract holds the terms of a buyer's subscription: the items, prices, billing frequency, and buyer, billing, and shipping details agreed on at checkout, or as later changed through draft subscription contracts.
6
6
  *
7
- * A subscription contract is created when a buyer checks out with a subscription item. Each billing cycle, an order is created from the contract's current content. The order's `lineItems.subscriptionInfo.id` holds the contract ID, and `lineItems.subscriptionInfo.cycleNumber` holds the billing cycle the order is for.
7
+ * When a buyer checks out with subscription items, a subscription contract is created for each group of items that are billed together. Physical items from the same catalog with identical `subscriptionInfo.subscriptionSettings` share a subscription contract. Every other subscription item gets its own subscription contract. Each billing cycle, an order is created from the contract's current content. The order's `lineItems.subscriptionInfo.id` holds the contract ID, and `lineItems.subscriptionInfo.cycleNumber` holds the billing cycle the order is for.
8
8
  *
9
9
  * To change a subscription contract, create a [draft subscription contract](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/payments/subscriptions/draft-subscription-contracts/introduction), edit it, and commit it.
10
10
  */
@@ -3085,6 +3085,8 @@ interface SubscriptionContractCommittedEnvelope {
3085
3085
  * The event holds the updated contract and every change that was applied.
3086
3086
  * @permissionScope Manage Stores - all permissions
3087
3087
  * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3088
+ * @permissionScope Read subscription contracts
3089
+ * @permissionScopeId SCOPE.ECOM.SUBSCRIPTION-CONTRACT-READ
3088
3090
  * @permissionScope Read eCommerce - all read permissions
3089
3091
  * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
3090
3092
  * @permissionScope Manage Restaurants - all permissions
@@ -3103,9 +3105,11 @@ interface SubscriptionContractCreatedEnvelope {
3103
3105
  metadata: EventMetadata;
3104
3106
  }
3105
3107
  /**
3106
- * Triggered when a subscription contract is created. A subscription contract is created when a buyer checks out with a subscription item.
3108
+ * Triggered when a subscription contract is created. Subscription contracts are created at checkout, 1 for each group of subscription items that are billed together, so 1 checkout can trigger this event more than once.
3107
3109
  * @permissionScope Manage Stores - all permissions
3108
3110
  * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3111
+ * @permissionScope Read subscription contracts
3112
+ * @permissionScopeId SCOPE.ECOM.SUBSCRIPTION-CONTRACT-READ
3109
3113
  * @permissionScope Read eCommerce - all read permissions
3110
3114
  * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
3111
3115
  * @permissionScope Manage Restaurants - all permissions
@@ -3123,9 +3127,12 @@ interface SubscriptionContractDeletedEnvelope {
3123
3127
  metadata: EventMetadata;
3124
3128
  }
3125
3129
  /**
3126
- * Triggered when a subscription contract is deleted. A subscription contract is deleted when the buyer's personal data is erased. It isn't deleted when the subscription ends.
3130
+ * Triggered when a subscription contract is deleted because the buyer's personal data is erased.
3131
+ * Doesn't fire when the subscription ends, because the subscription contract isn't deleted then. Also doesn't fire when the site is permanently deleted, even though its subscription contracts are deleted with it.
3127
3132
  * @permissionScope Manage Stores - all permissions
3128
3133
  * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3134
+ * @permissionScope Read subscription contracts
3135
+ * @permissionScopeId SCOPE.ECOM.SUBSCRIPTION-CONTRACT-READ
3129
3136
  * @permissionScope Read eCommerce - all read permissions
3130
3137
  * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
3131
3138
  * @permissionScope Manage Restaurants - all permissions
@@ -3151,6 +3158,8 @@ interface SubscriptionContractUpdatedEnvelope {
3151
3158
  * Also fires right after a subscription contract is created, while billing for the subscription is set up. These updates can leave every documented field unchanged.
3152
3159
  * @permissionScope Manage Stores - all permissions
3153
3160
  * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3161
+ * @permissionScope Read subscription contracts
3162
+ * @permissionScopeId SCOPE.ECOM.SUBSCRIPTION-CONTRACT-READ
3154
3163
  * @permissionScope Read eCommerce - all read permissions
3155
3164
  * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
3156
3165
  * @permissionScope Manage Restaurants - all permissions