@wix/auto_sdk_ecom_subscription-contracts 1.0.144 → 1.0.146

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.
@@ -2,33 +2,31 @@ import * as _wix_sdk_types from '@wix/sdk-types';
2
2
  import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types';
3
3
 
4
4
  /**
5
- * A SubscriptionContract is a ...
6
- * You can ...
7
- * Read more about SubscriptionContracts
8
- * in this [article](<LINK_TO_KB_ARTICLE>).
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
+ *
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.
8
+ *
9
+ * To change a subscription contract, create a draft subscription contract, edit it, and commit it.
9
10
  */
10
11
  interface SubscriptionContract {
11
12
  /**
12
- * SubscriptionContract ID.
13
+ * Subscription contract ID.
13
14
  * @format GUID
14
15
  * @readonly
15
16
  */
16
17
  _id?: string | null;
17
18
  /**
18
- * Revision number, which increments by 1 each time the SubscriptionContract is updated.
19
- * To prevent conflicting changes, the current revision must be passed when updating the SubscriptionContract.
20
- *
21
- * Ignored when creating a SubscriptionOrderContract.
19
+ * Revision number, which increments by 1 each time the subscription contract is updated.
22
20
  * @readonly
23
21
  */
24
22
  revision?: string | null;
25
23
  /**
26
- * Date and time the subscription contract was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
24
+ * Date and time the subscription contract was created.
27
25
  * @readonly
28
26
  */
29
27
  _createdDate?: Date | null;
30
28
  /**
31
- * Date and time the subscription contract was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
29
+ * Date and time the subscription contract was last updated.
32
30
  * @readonly
33
31
  */
34
32
  _updatedDate?: Date | null;
@@ -40,10 +38,24 @@ interface SubscriptionContract {
40
38
  * @targetRemovalDate 2025-10-01
41
39
  */
42
40
  description?: string | null;
43
- /** Subscription detailed information. */
41
+ /**
42
+ * Subscription description, in the site's default language and translated into the buyer's language. For example, `"1kg of selected coffee, once a month"`.
43
+ *
44
+ * For a subscription contract with more than one line item, holds a general name for the subscription.
45
+ */
46
+ subscriptionDescription?: V1SubscriptionDescription;
47
+ /** Subscription terms, such as the billing frequency, the number of billing cycles, and whether the subscription renews automatically. */
44
48
  subscriptionSettings?: V1SubscriptionSettings;
45
49
  /**
46
- * Order line items.
50
+ * Subscription line items. The order for each billing cycle is created with these line items.
51
+ *
52
+ * In a subscription contract:
53
+ * + `lineItems.subscriptionInfo.id` is the subscription contract's own ID.
54
+ * + `lineItems.subscriptionInfo.cycleNumber` is always `0`. The billing cycle is set on the line items of each cycle's order.
55
+ * + `subscriptionInfo.title` and `subscriptionInfo.description` hold the subscription contract's title and description, not the line item's own subscription option.
56
+ * + `refundQuantity`, `restockQuantity`, and `depositAmount` aren't updated after the line item is added. Refunds, restocks, and fulfillment are recorded on each billing cycle's order.
57
+ * + `extendedFields` and `decimalQuantity` aren't returned.
58
+ * + When coupons were included in item prices at checkout, `price` is the price before coupons, and the coupons are in `appliedDiscounts`.
47
59
  * @minSize 1
48
60
  * @maxSize 100
49
61
  */
@@ -51,20 +63,25 @@ interface SubscriptionContract {
51
63
  /** Buyer information. */
52
64
  buyerInfo?: BuyerInfo;
53
65
  /**
54
- * Language for communication with the buyer. Defaults to the site language.
55
- * For a site that supports multiple languages, this is the language the buyer selected.
66
+ * Language for communication with the buyer. For a site that supports multiple languages, this is the language the buyer selected.
67
+ *
68
+ * Default: Site language
56
69
  * @maxLength 10
57
70
  */
58
71
  buyerLanguage?: string | null;
59
- /** Weight measurement unit - defaults to site's weight unit. */
72
+ /**
73
+ * Weight measurement unit.
74
+ *
75
+ * Default: Site's weight unit
76
+ */
60
77
  weightUnit?: WeightUnitWithLiterals;
61
78
  /**
62
- * Currency used for the pricing of this order in [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes) format.
79
+ * Currency used for the subscription contract's pricing, as a three-letter currency code in [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes) alphabetic format.
63
80
  * @format CURRENCY
64
81
  * @immutable
65
82
  */
66
83
  currency?: string | null;
67
- /** Multi-currency information of the subscription. conversionRate may reflect updated exchange rate on created order per recurring cycle. */
84
+ /** Multi-currency details for a subscription paid in a currency other than the site's currency. */
68
85
  currencyConversionDetails?: CurrencyConversionDetails;
69
86
  /**
70
87
  * Whether tax is included in line item prices.
@@ -74,22 +91,26 @@ interface SubscriptionContract {
74
91
  */
75
92
  taxIncludedInPrices?: boolean;
76
93
  /**
77
- * Order price summary.
94
+ * Price summary of a single billing cycle.
78
95
  * @readonly
79
96
  */
80
97
  priceSummary?: PriceSummary;
81
- /** Summary of platform fees for this subscription contract, including totals by charge type and a breakdown of individual fees. */
98
+ /**
99
+ * Summary of platform fees calculated at checkout, including totals by charge type and a breakdown of individual fees.
100
+ *
101
+ * Not updated when draft changes are committed. Each billing cycle's order holds the platform fees for that cycle.
102
+ */
82
103
  platformFeeSummary?: PlatformFeeSummary;
83
104
  /** Billing address and contact details. */
84
105
  billingInfo?: AddressWithContact;
85
- /** Shipping info and selected shipping option details. */
106
+ /** Shipping information and selected shipping option details. */
86
107
  shippingInfo?: ShippingInformation;
87
108
  /**
88
- * Applied discounts.
109
+ * Discounts applied to the subscription contract.
89
110
  * @maxSize 100
90
111
  */
91
112
  appliedDiscounts?: AppliedDiscount[];
92
- /** Information about the sales channel that submitted this order. */
113
+ /** Information about the sales channel the subscription was purchased through. */
93
114
  channelInfo?: ChannelInfo;
94
115
  /**
95
116
  * Custom fields.
@@ -97,7 +118,7 @@ interface SubscriptionContract {
97
118
  */
98
119
  customFields?: CustomField[];
99
120
  /**
100
- * Order recipient address and contact details.
121
+ * Recipient address and contact details.
101
122
  *
102
123
  * This field may differ from the address in `shippingInfo.logistics` when:
103
124
  * + The chosen shipping option is pickup point or store pickup.
@@ -107,7 +128,7 @@ interface SubscriptionContract {
107
128
  /**
108
129
  * Custom field data for the subscription contract object.
109
130
  *
110
- * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls.
131
+ * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.
111
132
  */
112
133
  extendedFields?: ExtendedFields;
113
134
  /**
@@ -119,31 +140,31 @@ interface SubscriptionContract {
119
140
  */
120
141
  title?: string | null;
121
142
  /**
122
- * Additional fees applied to subscription contract.
123
- * @maxSize 100
143
+ * Subscription title, in the site's default language and translated into the buyer's language. For example, `"Monthly coffee subscription"`.
144
+ *
145
+ * For a subscription contract with more than one line item, holds a general name for the subscription.
124
146
  */
125
- additionalFees?: AdditionalFee[];
147
+ subscriptionTitle?: V1SubscriptionTitle;
126
148
  /**
127
- * Activities recorded on this contract (e.g. draft commits, status changes).
128
- * @readonly
129
- * @maxSize 500
149
+ * Additional fees applied to the subscription contract.
150
+ * @maxSize 100
130
151
  */
131
- activities?: SubscriptionContractActivity[];
152
+ additionalFees?: AdditionalFee[];
132
153
  }
133
154
  interface V1SubscriptionDescription {
134
155
  /**
135
- * Subscription option description.
156
+ * Subscription description in the site's default language.
136
157
  * @maxLength 500
137
158
  */
138
159
  original?: string;
139
160
  /**
140
- * Translated subscription option description.
161
+ * Subscription description translated into the buyer's language.
141
162
  * @maxLength 500
142
163
  */
143
164
  translated?: string | null;
144
165
  }
145
166
  interface V1SubscriptionSettings {
146
- /** Frequency of recurring payment. */
167
+ /** Frequency unit of the billing cycle. */
147
168
  frequency?: SubscriptionFrequencyWithLiterals;
148
169
  /**
149
170
  * Number of frequency units in a billing cycle. For example, frequency `MONTH` with interval `3` means billing every 3 months.
@@ -151,16 +172,20 @@ interface V1SubscriptionSettings {
151
172
  * @max 3650
152
173
  */
153
174
  interval?: number | null;
154
- /** Whether subscription is renewed automatically at the end of each period. */
175
+ /** Whether the subscription renews automatically at the end of each billing cycle. */
155
176
  autoRenewal?: boolean;
156
177
  /**
157
- * Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`.
178
+ * Number of billing cycles before the subscription ends.
158
179
  * @min 1
159
180
  */
160
181
  billingCycles?: number | null;
161
- /** Whether to allow the customer to cancel the subscription. */
182
+ /** Whether the buyer can cancel the subscription. */
162
183
  enableCustomerCancellation?: boolean;
163
- /** Period until first cycle starts. If None => no free trial */
184
+ /**
185
+ * Free trial period before the first billing cycle starts.
186
+ *
187
+ * Returned only when the subscription has a free trial.
188
+ */
164
189
  freeTrialPeriod?: V1FreeTrialPeriod;
165
190
  }
166
191
  declare enum SubscriptionFrequency {
@@ -173,7 +198,7 @@ declare enum SubscriptionFrequency {
173
198
  /** @enumType */
174
199
  type SubscriptionFrequencyWithLiterals = SubscriptionFrequency | 'UNDEFINED' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
175
200
  interface V1FreeTrialPeriod {
176
- /** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */
201
+ /** Frequency unit of the free trial period. */
177
202
  frequency?: SubscriptionFrequencyWithLiterals;
178
203
  /**
179
204
  * Number of frequency units in the free trial period. For example, frequency `MONTH` with interval `3` means a 3-month free trial.
@@ -1100,6 +1125,76 @@ interface ServiceProperties {
1100
1125
  */
1101
1126
  numberOfParticipants?: number | null;
1102
1127
  }
1128
+ /**
1129
+ * Record of the cross-border repricing of a single line item, shipping option or fee on a site whose catalog prices include tax:
1130
+ * the catalog price the merchant entered, the base region's tax removed from it per unit, and the rate used.
1131
+ *
1132
+ * This record describes how the price was reached, not the resulting amount. The repriced figures are on the line itself:
1133
+ * `price` and `taxInfo` on an order line item, and their counterparts on a shipping cost or a fee.
1134
+ * Written by the calculation that priced the line and carried unchanged onto orders, draft orders and subscription contracts.
1135
+ */
1136
+ interface CrossBorderPriceAdjustment {
1137
+ /**
1138
+ * ID of the tax region whose tax is built into the catalog prices.
1139
+ * @format GUID
1140
+ */
1141
+ baseTaxRegionId?: string;
1142
+ /**
1143
+ * ID of the tax region resolved for the destination. Absent when no region matched.
1144
+ * @format GUID
1145
+ */
1146
+ destinationTaxRegionId?: string | null;
1147
+ /** Price per unit as entered by the merchant, with the base region's tax inside it. */
1148
+ catalogPrice?: Price;
1149
+ /** Base region's tax removed per unit. Zero when `status` is `KEPT`, `SAME_REGION`, `SAME_COUNTRY`, `NOT_APPLICABLE`, `NOT_APPLICABLE_MODIFIERS` or `CONVERTED_CURRENCY_SUBSCRIPTION`, where nothing was removed. */
1150
+ baseTaxAmount?: Price;
1151
+ /** Outcome of the repricing for this line. */
1152
+ status?: RepriceStatusWithLiterals;
1153
+ /** Where the base region's rate came from. Meaningful only when a rate was applied, that is when `status` is `APPLIED`, `STRIP_ONLY` or `NO_DESTINATION_REGION`. */
1154
+ baseRateSource?: BaseRateSourceWithLiterals;
1155
+ /**
1156
+ * Base region's rate used to remove the tax, as a decimal numeral between 0 and 1. For example, `"0.22"`. Absent when no rate was applied.
1157
+ * @format DECIMAL_VALUE
1158
+ * @decimalValue options { gte:0, maxScale:6 }
1159
+ */
1160
+ baseRate?: string | null;
1161
+ /** When the base region's rate was captured. Set only when `baseRateSource` is `AVALARA_PROBE`. */
1162
+ baseRateCapturedDate?: Date | null;
1163
+ /** Whether the destination's tax is included in the repriced amount. Reserved for per-region display; not populated. */
1164
+ destinationTaxIncluded?: boolean | null;
1165
+ }
1166
+ /** Outcome of the repricing for one line. */
1167
+ declare enum RepriceStatus {
1168
+ /** Base tax removed and the destination's tax applied. */
1169
+ APPLIED = "APPLIED",
1170
+ /** The caller asked for the line to be left at its price. Nothing was removed. */
1171
+ KEPT = "KEPT",
1172
+ /** Base tax removed and no destination tax applied, as in a tax-exempt calculation. This is the outcome; the mode that asks for it is `CrossBorderRepricingMode.STRIP_ONLY`. */
1173
+ STRIP_ONLY = "STRIP_ONLY",
1174
+ /** The destination is the base region. Nothing was removed. */
1175
+ SAME_REGION = "SAME_REGION",
1176
+ /** The destination is in the base region's country, outside the US and Canada, so the catalog price already carries the destination's tax. Nothing was removed. */
1177
+ SAME_COUNTRY = "SAME_COUNTRY",
1178
+ /** No tax region matched the destination. Base tax removed and no destination tax applied. */
1179
+ NO_DESTINATION_REGION = "NO_DESTINATION_REGION",
1180
+ /** The calculation didn't reprice this line, for example because the feature was off or a pass failed. Nothing was removed. */
1181
+ NOT_APPLICABLE = "NOT_APPLICABLE",
1182
+ /** The line's modifiers exceed its price at the destination's rate. Nothing was removed. */
1183
+ NOT_APPLICABLE_MODIFIERS = "NOT_APPLICABLE_MODIFIERS",
1184
+ /** A subscription line in a checkout whose currency differs from the site currency. Nothing was removed. */
1185
+ CONVERTED_CURRENCY_SUBSCRIPTION = "CONVERTED_CURRENCY_SUBSCRIPTION"
1186
+ }
1187
+ /** @enumType */
1188
+ type RepriceStatusWithLiterals = RepriceStatus | 'APPLIED' | 'KEPT' | 'STRIP_ONLY' | 'SAME_REGION' | 'SAME_COUNTRY' | 'NO_DESTINATION_REGION' | 'NOT_APPLICABLE' | 'NOT_APPLICABLE_MODIFIERS' | 'CONVERTED_CURRENCY_SUBSCRIPTION';
1189
+ /** Where the base region's rate came from. */
1190
+ declare enum BaseRateSource {
1191
+ /** The manual tax calculator computed the base tax for this calculation. */
1192
+ MANUAL_SPI = "MANUAL_SPI",
1193
+ /** The rate captured from Avalara by the embedded-rate probe. */
1194
+ AVALARA_PROBE = "AVALARA_PROBE"
1195
+ }
1196
+ /** @enumType */
1197
+ type BaseRateSourceWithLiterals = BaseRateSource | 'MANUAL_SPI' | 'AVALARA_PROBE';
1103
1198
  /** Buyer information. */
1104
1199
  interface BuyerInfo extends BuyerInfoIdOneOf {
1105
1200
  /**
@@ -1543,6 +1638,56 @@ interface OrderTaxBreakdown {
1543
1638
  /** The sum of all the tax from line items that calculated by the tax identifiers. */
1544
1639
  aggregatedTaxAmount?: Price;
1545
1640
  }
1641
+ /** Cross-border repricing outcome of one calculation. Replaced on every recalculation of the order; the order-level marker that never changes is `Order.crossBorderRepricing`. */
1642
+ interface CrossBorderCalculation {
1643
+ /** Whether the calculation repriced the lines for the destination's tax. */
1644
+ applied?: boolean;
1645
+ /** Why the calculation didn't reprice the lines. Meaningful only when `applied` is `false`. */
1646
+ reason?: CrossBorderNotApplicableReasonWithLiterals;
1647
+ /** Mode the calculation ran in. `FULL` when the request set no mode. */
1648
+ mode?: CrossBorderRepricingModeWithLiterals;
1649
+ /**
1650
+ * Request ID of the calculation, for log correlation.
1651
+ * @maxLength 100
1652
+ */
1653
+ requestId?: string | null;
1654
+ }
1655
+ /** Why a cross-border repricing calculation didn't reprice the lines. */
1656
+ declare enum CrossBorderNotApplicableReason {
1657
+ /** The repricing feature toggle is off. */
1658
+ FEATURE_DISABLED = "FEATURE_DISABLED",
1659
+ /** The site hasn't opted in to cross-border repricing. */
1660
+ NOT_OPTED_IN = "NOT_OPTED_IN",
1661
+ /** The site's prices no longer include tax. */
1662
+ TAX_INCLUSIVE_PRICING_OFF = "TAX_INCLUSIVE_PRICING_OFF",
1663
+ /** The base tax region doesn't exist on the site. */
1664
+ BASE_TAX_REGION_NOT_FOUND = "BASE_TAX_REGION_NOT_FOUND",
1665
+ /** The base region uses the manual calculator and has no tax mapping. */
1666
+ BASE_REGION_HAS_NO_MANUAL_MAPPING = "BASE_REGION_HAS_NO_MANUAL_MAPPING",
1667
+ /** No embedded rate is stored for one of the tax groups in the calculation. */
1668
+ EMBEDDED_RATE_MISSING = "EMBEDDED_RATE_MISSING",
1669
+ /** Removing the base tax or applying the destination's tax failed for a line item. */
1670
+ CROSS_BORDER_REPRICING_FAILED = "CROSS_BORDER_REPRICING_FAILED",
1671
+ /** The line items were repriced. Repricing the shipping option failed. */
1672
+ SHIPPING_REPRICING_FAILED = "SHIPPING_REPRICING_FAILED",
1673
+ /** The line items were repriced. Repricing the additional fees failed. */
1674
+ FEES_REPRICING_FAILED = "FEES_REPRICING_FAILED",
1675
+ /** The site's tax settings couldn't be read, so the calculation couldn't tell whether the site opted in. */
1676
+ SETTINGS_UNAVAILABLE = "SETTINGS_UNAVAILABLE"
1677
+ }
1678
+ /** @enumType */
1679
+ type CrossBorderNotApplicableReasonWithLiterals = CrossBorderNotApplicableReason | 'FEATURE_DISABLED' | 'NOT_OPTED_IN' | 'TAX_INCLUSIVE_PRICING_OFF' | 'BASE_TAX_REGION_NOT_FOUND' | 'BASE_REGION_HAS_NO_MANUAL_MAPPING' | 'EMBEDDED_RATE_MISSING' | 'CROSS_BORDER_REPRICING_FAILED' | 'SHIPPING_REPRICING_FAILED' | 'FEES_REPRICING_FAILED' | 'SETTINGS_UNAVAILABLE';
1680
+ /** How a cross-border repricing calculation is asked to run. This is the requested mode; a line's outcome is `CrossBorderPriceAdjustment.RepriceStatus`. */
1681
+ declare enum CrossBorderRepricingMode {
1682
+ /** Nothing is repriced. */
1683
+ DISABLED = "DISABLED",
1684
+ /** Base tax removed and no destination tax applied. A line repriced this way has the outcome `CrossBorderPriceAdjustment.RepriceStatus.STRIP_ONLY`. */
1685
+ STRIP_ONLY = "STRIP_ONLY",
1686
+ /** Base tax removed and the destination's tax applied. A request that sets no mode runs this way. */
1687
+ FULL = "FULL"
1688
+ }
1689
+ /** @enumType */
1690
+ type CrossBorderRepricingModeWithLiterals = CrossBorderRepricingMode | 'DISABLED' | 'STRIP_ONLY' | 'FULL';
1546
1691
  interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
1547
1692
  /** Coupon applied by the customer. */
1548
1693
  coupon?: Coupon;
@@ -1779,15 +1924,13 @@ interface CustomField {
1779
1924
  }
1780
1925
  interface V1SubscriptionTitle {
1781
1926
  /**
1782
- * Subscription option name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
1927
+ * Subscription title in the site's default language.
1783
1928
  * @minLength 1
1784
1929
  * @maxLength 150
1785
1930
  */
1786
1931
  original?: string;
1787
1932
  /**
1788
- * Subscription option name translated into the buyer's language.
1789
- *
1790
- * Default: Same as `original`.
1933
+ * Subscription title translated into the buyer's language.
1791
1934
  * @minLength 1
1792
1935
  * @maxLength 150
1793
1936
  */
@@ -1890,7 +2033,7 @@ declare enum SpecificItemsCouponBehavior {
1890
2033
  /** @enumType */
1891
2034
  type SpecificItemsCouponBehaviorWithLiterals = SpecificItemsCouponBehavior | 'UNDEFINED_COUPON_BEHAVIOR' | 'ITEM_SUBTOTAL_INCLUDES_DISCOUNT' | 'LEGACY_ITEM_SUBTOTAL_DOES_NOT_INCLUDE_DISCOUNT';
1892
2035
  interface SubscriptionContractActivity extends SubscriptionContractActivityTargetOneOf, SubscriptionContractActivityContentOneOf {
1893
- /** Scopes the draft to the contract level, applying to all future cycles. */
2036
+ /** The activity applies to all future billing cycles of the subscription contract. */
1894
2037
  contractTarget?: ContractTarget;
1895
2038
  /** Changes committed from a DraftSubscriptionContract. */
1896
2039
  changesApplied?: ChangesAppliedActivity;
@@ -1901,12 +2044,12 @@ interface SubscriptionContractActivity extends SubscriptionContractActivityTarge
1901
2044
  */
1902
2045
  _id?: string;
1903
2046
  /**
1904
- * When the activity occurred.
2047
+ * Date and time the activity occurred.
1905
2048
  * @readonly
1906
2049
  */
1907
2050
  _createdDate?: Date | null;
1908
2051
  /**
1909
- * Identity of the draft order's initiator.
2052
+ * Wix user or app that made the change.
1910
2053
  * @readonly
1911
2054
  */
1912
2055
  author?: ActivityAuthor;
@@ -1915,7 +2058,7 @@ interface SubscriptionContractActivity extends SubscriptionContractActivityTarge
1915
2058
  }
1916
2059
  /** @oneof */
1917
2060
  interface SubscriptionContractActivityTargetOneOf {
1918
- /** Scopes the draft to the contract level, applying to all future cycles. */
2061
+ /** The activity applies to all future billing cycles of the subscription contract. */
1919
2062
  contractTarget?: ContractTarget;
1920
2063
  }
1921
2064
  /** @oneof */
@@ -1923,19 +2066,19 @@ interface SubscriptionContractActivityContentOneOf {
1923
2066
  /** Changes committed from a DraftSubscriptionContract. */
1924
2067
  changesApplied?: ChangesAppliedActivity;
1925
2068
  }
1926
- /** Scopes the draft to the contract level, applying to all future cycles. */
2069
+ /** Target that applies changes to all future billing cycles of the subscription contract. */
1927
2070
  interface ContractTarget {
1928
- /** Cycle number of the next billing cycle (1-based). Set by the caller; returned by the server on read. */
2071
+ /** Number of the first billing cycle the changes apply to. Billing cycles are numbered from `1`. */
1929
2072
  nextCycleNumber?: number | null;
1930
2073
  }
1931
2074
  interface ActivityAuthor extends ActivityAuthorValueOneOf {
1932
2075
  /**
1933
- * User ID. When the draft order was created by a Wix user.
2076
+ * Wix user ID. Returned when a Wix user made the change.
1934
2077
  * @format GUID
1935
2078
  */
1936
2079
  userId?: string;
1937
2080
  /**
1938
- * App ID. When the draft order was created by an app.
2081
+ * App ID. Returned when an app made the change.
1939
2082
  * @format GUID
1940
2083
  */
1941
2084
  appId?: string;
@@ -1943,74 +2086,76 @@ interface ActivityAuthor extends ActivityAuthorValueOneOf {
1943
2086
  /** @oneof */
1944
2087
  interface ActivityAuthorValueOneOf {
1945
2088
  /**
1946
- * User ID. When the draft order was created by a Wix user.
2089
+ * Wix user ID. Returned when a Wix user made the change.
1947
2090
  * @format GUID
1948
2091
  */
1949
2092
  userId?: string;
1950
2093
  /**
1951
- * App ID. When the draft order was created by an app.
2094
+ * App ID. Returned when an app made the change.
1952
2095
  * @format GUID
1953
2096
  */
1954
2097
  appId?: string;
1955
2098
  }
1956
2099
  interface ChangesAppliedActivity extends ChangesAppliedActivityTargetOneOf {
1957
- /** Scopes the draft to the contract level, applying to all future cycles. */
2100
+ /** The changes apply to all future billing cycles of the subscription contract. */
1958
2101
  contractTarget?: ContractTarget;
1959
2102
  /**
1960
- * ID of the DraftSubscriptionContract that was committed.
2103
+ * ID of the draft subscription contract whose changes were committed.
1961
2104
  * @format GUID
1962
2105
  */
1963
2106
  draftSubscriptionContractId?: string;
1964
2107
  /**
1965
- * Individual typed changes applied.
2108
+ * Changes that were applied to the subscription contract.
1966
2109
  * @maxSize 100
1967
2110
  */
1968
2111
  changes?: ContractChange[];
1969
2112
  /**
1970
- * Reason for the edit, provided by the merchant (optional).
2113
+ * Reason for the change, provided by the business.
1971
2114
  * @maxLength 200
1972
2115
  */
1973
2116
  reason?: string | null;
1974
2117
  }
1975
2118
  /** @oneof */
1976
2119
  interface ChangesAppliedActivityTargetOneOf {
1977
- /** Scopes the draft to the contract level, applying to all future cycles. */
2120
+ /** The changes apply to all future billing cycles of the subscription contract. */
1978
2121
  contractTarget?: ContractTarget;
1979
2122
  }
1980
- interface ContractChange extends ContractChangeValueOneOf {
2123
+ interface ContractChange extends ContractChangeChangeDetailsOneOf {
1981
2124
  /** Line item was modified. */
1982
2125
  lineItemChanged?: LineItemChanges;
1983
2126
  /** Line item was added to the contract. */
1984
- lineItemAdded?: ManagedLineItem;
2127
+ lineItemAdded?: LineItemSummary;
1985
2128
  /** Line item was removed from the contract. */
1986
- lineItemRemoved?: ManagedLineItem;
2129
+ lineItemRemoved?: LineItemSummary;
1987
2130
  /** Discount was added to the contract. */
1988
- discountAdded?: ManagedDiscount;
2131
+ discountAdded?: DiscountSummary;
1989
2132
  /** Discount was removed from the contract. */
1990
- discountRemoved?: ManagedDiscount;
2133
+ discountRemoved?: DiscountSummary;
1991
2134
  /** Additional fee was added to the contract. */
1992
- additionalFeeAdded?: ManagedAdditionalFee;
2135
+ additionalFeeAdded?: AdditionalFeeSummary;
1993
2136
  /** Additional fee was removed from the contract. */
1994
- additionalFeeRemoved?: ManagedAdditionalFee;
2137
+ additionalFeeRemoved?: AdditionalFeeSummary;
1995
2138
  /** Total price changed. */
1996
2139
  totalPriceChanged?: TotalPriceChange;
2140
+ /** Type of change. */
2141
+ changeType?: ContractChangeTypeWithLiterals;
1997
2142
  }
1998
2143
  /** @oneof */
1999
- interface ContractChangeValueOneOf {
2144
+ interface ContractChangeChangeDetailsOneOf {
2000
2145
  /** Line item was modified. */
2001
2146
  lineItemChanged?: LineItemChanges;
2002
2147
  /** Line item was added to the contract. */
2003
- lineItemAdded?: ManagedLineItem;
2148
+ lineItemAdded?: LineItemSummary;
2004
2149
  /** Line item was removed from the contract. */
2005
- lineItemRemoved?: ManagedLineItem;
2150
+ lineItemRemoved?: LineItemSummary;
2006
2151
  /** Discount was added to the contract. */
2007
- discountAdded?: ManagedDiscount;
2152
+ discountAdded?: DiscountSummary;
2008
2153
  /** Discount was removed from the contract. */
2009
- discountRemoved?: ManagedDiscount;
2154
+ discountRemoved?: DiscountSummary;
2010
2155
  /** Additional fee was added to the contract. */
2011
- additionalFeeAdded?: ManagedAdditionalFee;
2156
+ additionalFeeAdded?: AdditionalFeeSummary;
2012
2157
  /** Additional fee was removed from the contract. */
2013
- additionalFeeRemoved?: ManagedAdditionalFee;
2158
+ additionalFeeRemoved?: AdditionalFeeSummary;
2014
2159
  /** Total price changed. */
2015
2160
  totalPriceChanged?: TotalPriceChange;
2016
2161
  }
@@ -2026,11 +2171,15 @@ interface LineItemChanges {
2026
2171
  quantity?: LineItemQuantityChange;
2027
2172
  }
2028
2173
  declare enum LineItemQuantityChangeType {
2174
+ /** Unknown quantity change type. */
2175
+ UNKNOWN_LINE_ITEM_QUANTITY_CHANGE_TYPE = "UNKNOWN_LINE_ITEM_QUANTITY_CHANGE_TYPE",
2176
+ /** Quantity increased. */
2029
2177
  QUANTITY_INCREASED = "QUANTITY_INCREASED",
2178
+ /** Quantity decreased. */
2030
2179
  QUANTITY_DECREASED = "QUANTITY_DECREASED"
2031
2180
  }
2032
2181
  /** @enumType */
2033
- type LineItemQuantityChangeTypeWithLiterals = LineItemQuantityChangeType | 'QUANTITY_INCREASED' | 'QUANTITY_DECREASED';
2182
+ type LineItemQuantityChangeTypeWithLiterals = LineItemQuantityChangeType | 'UNKNOWN_LINE_ITEM_QUANTITY_CHANGE_TYPE' | 'QUANTITY_INCREASED' | 'QUANTITY_DECREASED';
2034
2183
  interface LineItemQuantityChange {
2035
2184
  /**
2036
2185
  * Original item quantity before the change.
@@ -2047,11 +2196,11 @@ interface LineItemQuantityChange {
2047
2196
  * @min 1
2048
2197
  * @max 1000000
2049
2198
  */
2050
- diff?: number;
2199
+ quantityDifference?: number;
2051
2200
  /** Direction of the quantity change. */
2052
2201
  deltaType?: LineItemQuantityChangeTypeWithLiterals;
2053
2202
  }
2054
- interface ManagedLineItem {
2203
+ interface LineItemSummary {
2055
2204
  /**
2056
2205
  * Line item ID.
2057
2206
  * @format GUID
@@ -2066,7 +2215,7 @@ interface ManagedLineItem {
2066
2215
  */
2067
2216
  quantity?: number;
2068
2217
  }
2069
- interface ManagedDiscount {
2218
+ interface DiscountSummary {
2070
2219
  /**
2071
2220
  * Discount ID.
2072
2221
  * @format GUID
@@ -2089,7 +2238,7 @@ interface TranslatedValue {
2089
2238
  */
2090
2239
  translated?: string | null;
2091
2240
  }
2092
- interface ManagedAdditionalFee {
2241
+ interface AdditionalFeeSummary {
2093
2242
  /**
2094
2243
  * Additional fee ID.
2095
2244
  * @format GUID
@@ -2106,8 +2255,32 @@ interface TotalPriceChange {
2106
2255
  /** Total price after the commit. */
2107
2256
  newTotal?: Price;
2108
2257
  }
2258
+ declare enum ContractChangeType {
2259
+ /** Unknown change type. */
2260
+ UNKNOWN_CONTRACT_CHANGE_TYPE = "UNKNOWN_CONTRACT_CHANGE_TYPE",
2261
+ /** Line item was modified. */
2262
+ LINE_ITEM_CHANGED = "LINE_ITEM_CHANGED",
2263
+ /** Line item was added to the contract. */
2264
+ LINE_ITEM_ADDED = "LINE_ITEM_ADDED",
2265
+ /** Line item was removed from the contract. */
2266
+ LINE_ITEM_REMOVED = "LINE_ITEM_REMOVED",
2267
+ /** Discount was added to the contract. */
2268
+ DISCOUNT_ADDED = "DISCOUNT_ADDED",
2269
+ /** Discount was removed from the contract. */
2270
+ DISCOUNT_REMOVED = "DISCOUNT_REMOVED",
2271
+ /** Additional fee was added to the contract. */
2272
+ ADDITIONAL_FEE_ADDED = "ADDITIONAL_FEE_ADDED",
2273
+ /** Additional fee was removed from the contract. */
2274
+ ADDITIONAL_FEE_REMOVED = "ADDITIONAL_FEE_REMOVED",
2275
+ /** Total price changed. */
2276
+ TOTAL_PRICE_CHANGED = "TOTAL_PRICE_CHANGED"
2277
+ }
2278
+ /** @enumType */
2279
+ type ContractChangeTypeWithLiterals = ContractChangeType | 'UNKNOWN_CONTRACT_CHANGE_TYPE' | 'LINE_ITEM_CHANGED' | 'LINE_ITEM_ADDED' | 'LINE_ITEM_REMOVED' | 'DISCOUNT_ADDED' | 'DISCOUNT_REMOVED' | 'ADDITIONAL_FEE_ADDED' | 'ADDITIONAL_FEE_REMOVED' | 'TOTAL_PRICE_CHANGED';
2109
2280
  declare enum ActivityType {
2281
+ /** Unknown activity type. */
2110
2282
  UNKNOWN_ACTIVITY_TYPE = "UNKNOWN_ACTIVITY_TYPE",
2283
+ /** Changes from a draft subscription contract were committed. */
2111
2284
  CHANGES_APPLIED = "CHANGES_APPLIED"
2112
2285
  }
2113
2286
  /** @enumType */
@@ -2138,30 +2311,26 @@ interface SubscriptionContractExpired {
2138
2311
  /** The subscription contract that expired. */
2139
2312
  subscriptionContract?: SubscriptionContract;
2140
2313
  }
2141
- /**
2142
- * ACTION event payload emitted after a successful commit.
2143
- * Carries the full delta — downstream consumers (email notifications, activity feed)
2144
- * subscribe to this event and have all details inline without fetching the draft.
2145
- */
2314
+ /** Triggered when changes from a draft subscription contract are committed to a subscription contract. */
2146
2315
  interface SubscriptionContractChangesCommitted {
2147
- /** Updated SubscriptionContract after commit. */
2316
+ /** Subscription contract after the changes were committed. */
2148
2317
  subscriptionContract?: SubscriptionContract;
2149
2318
  /**
2150
- * ID of the DraftSubscriptionContract that triggered this commit.
2319
+ * ID of the draft subscription contract whose changes were committed.
2151
2320
  * @format GUID
2152
2321
  */
2153
2322
  draftSubscriptionContractId?: string;
2154
- /** The actual delta applied. */
2323
+ /** Changes that were applied to the subscription contract. */
2155
2324
  changes?: SubscriptionContractDiffs;
2156
2325
  /**
2157
2326
  * Date and time the changes were committed.
2158
2327
  * @readonly
2159
2328
  */
2160
2329
  commitDate?: Date | null;
2161
- /** Side-effects requested by the caller when the changes were committed. */
2330
+ /** Notification settings specified when the changes were committed. */
2162
2331
  commitSettings?: SubscriptionCommitSettings;
2163
2332
  /**
2164
- * Reason for the edit, provided by the merchant.
2333
+ * Reason for the change, provided by the business.
2165
2334
  * @maxLength 200
2166
2335
  */
2167
2336
  reason?: string | null;
@@ -2170,194 +2339,204 @@ interface SubscriptionContractChangesCommitted {
2170
2339
  }
2171
2340
  interface SubscriptionContractDiffs {
2172
2341
  /**
2173
- * Per-item deltas: added, changed, or removed line items.
2342
+ * Line items that were added, changed, or removed.
2343
+ *
2344
+ * A line item is `CHANGED` when a field listed in `ItemChangedDetails` changed. Line items with no change aren't included.
2174
2345
  * @maxSize 100
2175
2346
  */
2176
2347
  lineItems?: LineItemDelta[];
2177
2348
  /**
2178
- * Per-discount deltas.
2349
+ * Discounts that were added, changed, or removed.
2350
+ *
2351
+ * A discount is `CHANGED` when its amount, the amount for any line item, or the line items it applies to changed. Discounts with no change aren't included.
2179
2352
  * @maxSize 100
2180
2353
  */
2181
2354
  appliedDiscounts?: AppliedDiscountDelta[];
2182
2355
  /**
2183
- * Per-fee deltas.
2356
+ * Additional fees that were added, changed, or removed.
2357
+ *
2358
+ * An additional fee is `CHANGED` when its price or the line items it applies to changed. Fees with no change aren't included.
2184
2359
  * @maxSize 100
2185
2360
  */
2186
2361
  additionalFees?: AdditionalFeeDelta[];
2187
- /** Updated price summary (overwrites existing). */
2362
+ /** Price summary after the changes. Replaces the subscription contract's previous price summary. */
2188
2363
  priceSummary?: PriceSummary;
2189
- /** Updated tax info (overwrites existing). */
2364
+ /** Tax information after the changes. Replaces the subscription contract's previous tax information. */
2190
2365
  taxInfo?: OrderTaxInfo;
2366
+ /** Shipping information after the changes. Replaces the subscription contract's previous shipping information. */
2367
+ shippingInfo?: ShippingInformation;
2191
2368
  }
2192
2369
  interface LineItemDelta extends LineItemDeltaDeltaDetailsOneOf {
2370
+ /** Values the line item had before the change. */
2193
2371
  changed?: ItemChangedDetails;
2194
2372
  /**
2195
2373
  * Line item ID.
2196
2374
  * @format GUID
2197
2375
  */
2198
2376
  lineItemId?: string;
2199
- /** Full line item content (absent for removed items). */
2377
+ /** Line item content. For a removed line item, the line item that was removed. */
2200
2378
  lineItem?: OrderLineItem;
2201
2379
  /** Type of change applied to this line item. */
2202
2380
  changeType?: ChangeTypeWithLiterals;
2203
2381
  }
2204
2382
  /** @oneof */
2205
2383
  interface LineItemDeltaDeltaDetailsOneOf {
2384
+ /** Values the line item had before the change. */
2206
2385
  changed?: ItemChangedDetails;
2207
2386
  }
2208
- /** the catalog reference options before the change. */
2387
+ /** The catalog reference options before the change. */
2209
2388
  interface CatalogReferenceOptionsBeforeChange {
2210
- /** the catalog reference options. Absent when the line item had no options. */
2389
+ /** The catalog reference options. Absent when the line item had no options. */
2211
2390
  options?: Record<string, any> | null;
2212
2391
  }
2213
- /** the product name before the change. */
2392
+ /** The product name before the change. */
2214
2393
  interface ProductNameBeforeChange {
2215
- /** the product name. Absent when the line item had no product name. */
2394
+ /** The product name. Absent when the line item had no product name. */
2216
2395
  productName?: ProductName;
2217
2396
  }
2218
- /** the description lines before the change. */
2397
+ /** The description lines before the change. */
2219
2398
  interface DescriptionLinesBeforeChange {
2220
2399
  /**
2221
- * the description lines. Empty when the line item had no description lines.
2400
+ * The description lines. Empty when the line item had no description lines.
2222
2401
  * @maxSize 20
2223
2402
  */
2224
2403
  descriptionLines?: DescriptionLine[];
2225
2404
  }
2226
- /** the image before the change. */
2405
+ /** The image before the change. */
2227
2406
  interface ImageBeforeChange {
2228
- /** the image. Absent when the line item had no image. */
2407
+ /** The image. Absent when the line item had no image. */
2229
2408
  image?: string;
2230
2409
  }
2231
- /** the physical properties before the change. */
2410
+ /** The physical properties before the change. */
2232
2411
  interface PhysicalPropertiesBeforeChange {
2233
- /** the physical properties. Absent when the line item had no physical properties. */
2412
+ /** The physical properties. Absent when the line item had no physical properties. */
2234
2413
  physicalProperties?: PhysicalProperties;
2235
2414
  }
2236
- /** the item type before the change. */
2415
+ /** The item type before the change. */
2237
2416
  interface ItemTypeBeforeChange {
2238
- /** the item type. Absent when the line item had no item type. */
2417
+ /** The item type. Absent when the line item had no item type. */
2239
2418
  itemType?: ItemType;
2240
2419
  }
2241
- /** the fulfiller ID before the change. */
2420
+ /** The fulfiller ID before the change. */
2242
2421
  interface FulfillerIdBeforeChange {
2243
2422
  /**
2244
- * the fulfiller ID. Absent when the line item had no fulfiller.
2423
+ * The fulfiller ID. Absent when the line item had no fulfiller.
2245
2424
  * @format GUID
2246
2425
  */
2247
2426
  fulfillerId?: string | null;
2248
2427
  }
2249
- /** the digital file before the change. */
2428
+ /** The digital file before the change. */
2250
2429
  interface DigitalFileBeforeChange {
2251
- /** the digital file. Absent when the line item had no digital file. */
2430
+ /** The digital file. Absent when the line item had no digital file. */
2252
2431
  digitalFile?: DigitalFile;
2253
2432
  }
2254
- /** the price description before the change. */
2433
+ /** The price description before the change. */
2255
2434
  interface PriceDescriptionBeforeChange {
2256
- /** the price description. Absent when the line item had no price description. */
2435
+ /** The price description. Absent when the line item had no price description. */
2257
2436
  priceDescription?: PriceDescription;
2258
2437
  }
2259
- /** the delivery profile ID before the change. */
2438
+ /** The delivery profile ID before the change. */
2260
2439
  interface DeliveryProfileIdBeforeChange {
2261
2440
  /**
2262
- * the delivery profile ID. Absent when the line item had no delivery profile.
2441
+ * The delivery profile ID. Absent when the line item had no delivery profile.
2263
2442
  * @format GUID
2264
2443
  */
2265
2444
  deliveryProfileId?: string | null;
2266
2445
  }
2267
- /** the shipping group ID before the change. */
2446
+ /** The shipping group ID before the change. */
2268
2447
  interface ShippingGroupIdBeforeChange {
2269
2448
  /**
2270
- * the shipping group ID. Absent when the line item had no shipping group.
2449
+ * The shipping group ID. Absent when the line item had no shipping group.
2271
2450
  * @format GUID
2272
2451
  */
2273
2452
  shippingGroupId?: string | null;
2274
2453
  }
2275
- /** the tax info before the change. */
2454
+ /** The tax info before the change. */
2276
2455
  interface TaxInfoBeforeChange {
2277
- /** the tax info. Absent when the line item had no tax info. */
2456
+ /** The tax info. Absent when the line item had no tax info. */
2278
2457
  taxInfo?: LineItemTaxInfo;
2279
2458
  }
2280
- /** the inventory app ID before the change. */
2459
+ /** The inventory app ID before the change. */
2281
2460
  interface InventoryAppIdBeforeChange {
2282
2461
  /**
2283
- * the inventory app ID. Absent when the line item had no inventory app.
2462
+ * The inventory app ID. Absent when the line item had no inventory app.
2284
2463
  * @format GUID
2285
2464
  */
2286
2465
  inventoryAppId?: string | null;
2287
2466
  }
2288
- /** the root catalog item ID before the change. */
2467
+ /** The root catalog item ID before the change. */
2289
2468
  interface RootCatalogItemIdBeforeChange {
2290
2469
  /**
2291
- * the root catalog item ID. Absent when the line item had no root catalog item.
2470
+ * The root catalog item ID. Absent when the line item had no root catalog item.
2292
2471
  * @minLength 1
2293
2472
  * @maxLength 36
2294
2473
  */
2295
2474
  rootCatalogItemId?: string | null;
2296
2475
  }
2297
- /** the modifier groups before the change. */
2476
+ /** The modifier groups before the change. */
2298
2477
  interface ModifierGroupsBeforeChange {
2299
2478
  /**
2300
- * the modifier groups. Empty when the line item had no modifier groups.
2479
+ * The modifier groups. Empty when the line item had no modifier groups.
2301
2480
  * @maxSize 10
2302
2481
  */
2303
2482
  modifierGroups?: ModifierGroup[];
2304
2483
  }
2305
- /** the price undetermined flag before the change. */
2484
+ /** The price undetermined flag before the change. */
2306
2485
  interface PriceUndeterminedBeforeChange {
2307
- /** whether the price of the line item was undetermined. */
2486
+ /** Whether the price of the line item was undetermined. */
2308
2487
  priceUndetermined?: boolean;
2309
2488
  }
2310
- /** Describes the type of change applied to an element. */
2489
+ /** Type of change to a line item, discount, or additional fee. */
2311
2490
  declare enum ChangeType {
2491
+ /** Unknown change type. */
2312
2492
  UNKNOWN_CHANGE_TYPE = "UNKNOWN_CHANGE_TYPE",
2313
- /** Element was added (absent in the original contract). */
2493
+ /** The line item, discount, or additional fee was added to the subscription contract. */
2314
2494
  ADDED = "ADDED",
2315
- /** Element was modified from the original contract. */
2495
+ /** The line item, discount, or additional fee was changed. */
2316
2496
  CHANGED = "CHANGED",
2317
- /** Element was removed from the contract. */
2497
+ /** The line item, discount, or additional fee was removed from the subscription contract. */
2318
2498
  REMOVED = "REMOVED"
2319
2499
  }
2320
2500
  /** @enumType */
2321
2501
  type ChangeTypeWithLiterals = ChangeType | 'UNKNOWN_CHANGE_TYPE' | 'ADDED' | 'CHANGED' | 'REMOVED';
2322
2502
  interface ItemChangedDetails {
2323
2503
  /**
2324
- * The quantity before the change.
2504
+ * The quantity before the change. Set only when the quantity changed.
2325
2505
  * @min 1
2326
2506
  * @max 1000000
2327
2507
  */
2328
2508
  quantityBeforeChange?: number | null;
2329
- /** The price before the change. */
2509
+ /** The price before the change. Set only when the price changed. */
2330
2510
  priceBeforeChange?: Price;
2331
- /** the catalog reference options before the change. Set only when the catalog reference options changed. */
2511
+ /** The catalog reference options before the change. Set only when the catalog reference options changed. */
2332
2512
  catalogReferenceOptionsBeforeChange?: CatalogReferenceOptionsBeforeChange;
2333
- /** the product name before the change. Set only when the product name changed. */
2513
+ /** The product name before the change. Set only when the product name changed. */
2334
2514
  productNameBeforeChange?: ProductNameBeforeChange;
2335
- /** the description lines before the change. Set only when the description lines changed. */
2515
+ /** The description lines before the change. Set only when the description lines changed. */
2336
2516
  descriptionLinesBeforeChange?: DescriptionLinesBeforeChange;
2337
- /** the image before the change. Set only when the image changed. */
2517
+ /** The image before the change. Set only when the image changed. */
2338
2518
  imageBeforeChange?: ImageBeforeChange;
2339
- /** the physical properties before the change. Set only when the physical properties changed. */
2519
+ /** The physical properties before the change. Set only when the physical properties changed. */
2340
2520
  physicalPropertiesBeforeChange?: PhysicalPropertiesBeforeChange;
2341
- /** the item type before the change. Set only when the item type changed. */
2521
+ /** The item type before the change. Set only when the item type changed. */
2342
2522
  itemTypeBeforeChange?: ItemTypeBeforeChange;
2343
- /** the fulfiller ID before the change. Set only when the fulfiller ID changed. */
2523
+ /** The fulfiller ID before the change. Set only when the fulfiller ID changed. */
2344
2524
  fulfillerIdBeforeChange?: FulfillerIdBeforeChange;
2345
- /** the digital file before the change. Set only when the digital file changed. */
2525
+ /** The digital file before the change. Set only when the digital file changed. */
2346
2526
  digitalFileBeforeChange?: DigitalFileBeforeChange;
2347
- /** the price description before the change. Set only when the price description changed. */
2527
+ /** The price description before the change. Set only when the price description changed. */
2348
2528
  priceDescriptionBeforeChange?: PriceDescriptionBeforeChange;
2349
- /** the tax info before the change. Set only when the tax group changed. */
2529
+ /** The tax info before the change. Set only when the line item's tax group changed because its catalog options changed. */
2350
2530
  taxInfoBeforeChange?: TaxInfoBeforeChange;
2351
- /** the inventory app ID before the change. Set only when the inventory app ID changed. */
2352
- inventoryAppIdBeforeChange?: InventoryAppIdBeforeChange;
2353
- /** the modifier groups before the change. Set only when the modifier groups changed. */
2531
+ /** The modifier groups before the change. Set only when the modifier groups changed. */
2354
2532
  modifierGroupsBeforeChange?: ModifierGroupsBeforeChange;
2355
- /** the price undetermined flag before the change. Set only when the price undetermined flag changed. */
2533
+ /** The price undetermined flag before the change. Set only when the price undetermined flag changed. */
2356
2534
  priceUndeterminedBeforeChange?: PriceUndeterminedBeforeChange;
2357
2535
  }
2358
2536
  interface AppliedDiscountDelta extends AppliedDiscountDeltaDeltaDetailsOneOf {
2359
2537
  /** Discount content after the change. */
2360
2538
  changed?: AppliedDiscount;
2539
+ /** Discount that was added. */
2361
2540
  added?: AppliedDiscount;
2362
2541
  /**
2363
2542
  * Discount ID.
@@ -2371,11 +2550,13 @@ interface AppliedDiscountDelta extends AppliedDiscountDeltaDeltaDetailsOneOf {
2371
2550
  interface AppliedDiscountDeltaDeltaDetailsOneOf {
2372
2551
  /** Discount content after the change. */
2373
2552
  changed?: AppliedDiscount;
2553
+ /** Discount that was added. */
2374
2554
  added?: AppliedDiscount;
2375
2555
  }
2376
2556
  interface AdditionalFeeDelta extends AdditionalFeeDeltaDeltaDetailsOneOf {
2377
2557
  /** Additional fee content after the change. */
2378
2558
  changed?: AdditionalFee;
2559
+ /** Additional fee that was added. */
2379
2560
  added?: AdditionalFee;
2380
2561
  /**
2381
2562
  * Additional fee ID.
@@ -2389,12 +2570,21 @@ interface AdditionalFeeDelta extends AdditionalFeeDeltaDeltaDetailsOneOf {
2389
2570
  interface AdditionalFeeDeltaDeltaDetailsOneOf {
2390
2571
  /** Additional fee content after the change. */
2391
2572
  changed?: AdditionalFee;
2573
+ /** Additional fee that was added. */
2392
2574
  added?: AdditionalFee;
2393
2575
  }
2394
2576
  interface SubscriptionCommitSettings {
2395
- /** If false, do not send notifications to buyer. Default is true. */
2577
+ /**
2578
+ * Whether to send the buyer a notification about the committed changes.
2579
+ *
2580
+ * Default: `true`
2581
+ */
2396
2582
  sendNotificationsToBuyer?: boolean | null;
2397
- /** If false, do not send notifications to business. Default is true. */
2583
+ /**
2584
+ * Whether to send the business a notification about the committed changes.
2585
+ *
2586
+ * Default: `true`
2587
+ */
2398
2588
  sendNotificationsToBusiness?: boolean | null;
2399
2589
  }
2400
2590
  /** Triggered when a subscription contract's next charge is coming up. */
@@ -2425,13 +2615,13 @@ interface CreateSubscriptionContractResponse {
2425
2615
  }
2426
2616
  interface GetSubscriptionContractRequest {
2427
2617
  /**
2428
- * ID of the SubscriptionContract to retrieve.
2618
+ * ID of the subscription contract to retrieve.
2429
2619
  * @format GUID
2430
2620
  */
2431
2621
  subscriptionContractId: string;
2432
2622
  }
2433
2623
  interface GetSubscriptionContractResponse {
2434
- /** The requested SubscriptionContract. */
2624
+ /** Retrieved subscription contract. */
2435
2625
  subscriptionContract?: SubscriptionContract;
2436
2626
  }
2437
2627
  interface UpdateSubscriptionContractRequest {
@@ -2443,26 +2633,24 @@ interface UpdateSubscriptionContractResponse {
2443
2633
  subscriptionContract?: SubscriptionContract;
2444
2634
  }
2445
2635
  interface QuerySubscriptionContractsRequest {
2446
- /** WQL expression. */
2636
+ /** Filter, sort, and paging options for the query. */
2447
2637
  query?: CursorQuery;
2448
2638
  }
2449
2639
  interface CursorQuery extends CursorQueryPagingMethodOneOf {
2450
2640
  /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
2451
2641
  cursorPaging?: CursorPaging;
2452
2642
  /**
2453
- * Filter object in the following format:
2454
- * `"filter" : {
2455
- * "fieldName1": "value1",
2456
- * "fieldName2":{"$operator":"value2"}
2457
- * }`
2458
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
2459
- * Learn more about the [filter format](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
2643
+ * Filter object. See [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language) for more information.
2644
+ *
2645
+ * Supported properties:
2646
+ * `id`, `buyerInfo.contactId`
2460
2647
  */
2461
2648
  filter?: Record<string, any> | null;
2462
2649
  /**
2463
2650
  * Sort object in the following format:
2464
2651
  * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
2465
- * Learn more about the [sort format](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
2652
+ *
2653
+ * Learn more about [sorting](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging).
2466
2654
  * @maxSize 5
2467
2655
  */
2468
2656
  sort?: Sorting[];
@@ -2474,11 +2662,18 @@ interface CursorQueryPagingMethodOneOf {
2474
2662
  }
2475
2663
  interface Sorting {
2476
2664
  /**
2477
- * Name of the field to sort by.
2665
+ * Field to sort by.
2666
+ *
2667
+ * Supported properties:
2668
+ * `id`, `buyerInfo.contactId`
2478
2669
  * @maxLength 512
2479
2670
  */
2480
2671
  fieldName?: string;
2481
- /** Sort order. */
2672
+ /**
2673
+ * Sort order. Use `ASC` for ascending order or `DESC` for descending order.
2674
+ *
2675
+ * Default: `ASC`
2676
+ */
2482
2677
  order?: SortOrderWithLiterals;
2483
2678
  }
2484
2679
  declare enum SortOrder {
@@ -2503,9 +2698,9 @@ interface CursorPaging {
2503
2698
  cursor?: string | null;
2504
2699
  }
2505
2700
  interface QuerySubscriptionContractsResponse {
2506
- /** List of SubscriptionContracts. */
2701
+ /** Retrieved subscription contracts. */
2507
2702
  subscriptionContracts?: SubscriptionContract[];
2508
- /** Paging metadata */
2703
+ /** Paging metadata. */
2509
2704
  pagingMetadata?: CursorPagingMetadata;
2510
2705
  }
2511
2706
  interface CursorPagingMetadata {
@@ -2806,6 +3001,12 @@ interface AccountInfo {
2806
3001
  */
2807
3002
  siteId?: string | null;
2808
3003
  }
3004
+ /** @docsIgnore */
3005
+ type GetSubscriptionContractApplicationErrors = {
3006
+ code?: 'NOT_FOUND';
3007
+ description?: string;
3008
+ data?: Record<string, any>;
3009
+ };
2809
3010
  interface BaseEventMetadata {
2810
3011
  /**
2811
3012
  * App instance ID.
@@ -2861,11 +3062,35 @@ interface AccountInfoMetadata {
2861
3062
  /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */
2862
3063
  parentAccountId?: string;
2863
3064
  }
3065
+ interface SubscriptionContractCommittedEnvelope {
3066
+ data: SubscriptionContractChangesCommitted;
3067
+ metadata: EventMetadata;
3068
+ }
3069
+ /**
3070
+ * Triggered when changes from a draft subscription contract are committed to a subscription contract.
3071
+ * The event holds the updated contract and every change that was applied.
3072
+ * @permissionScope Manage Stores - all permissions
3073
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
3074
+ * @permissionScope Read eCommerce - all read permissions
3075
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
3076
+ * @permissionScope Manage Restaurants - all permissions
3077
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
3078
+ * @permissionScope Manage eCommerce - all permissions
3079
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3080
+ * @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
3081
+ * @webhook
3082
+ * @eventType wix.ecom.subscription_contracts.v1.subscription_contract_committed
3083
+ * @slug committed
3084
+ * @documentationMaturity preview
3085
+ */
3086
+ declare function onSubscriptionContractCommitted(handler: (event: SubscriptionContractCommittedEnvelope) => void | Promise<void>): void;
2864
3087
  interface SubscriptionContractCreatedEnvelope {
2865
3088
  entity: SubscriptionContract;
2866
3089
  metadata: EventMetadata;
2867
3090
  }
2868
- /** @permissionScope Manage Stores - all permissions
3091
+ /**
3092
+ * Triggered when a subscription contract is created. A subscription contract is created when a buyer checks out with a subscription item.
3093
+ * @permissionScope Manage Stores - all permissions
2869
3094
  * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2870
3095
  * @permissionScope Read eCommerce - all read permissions
2871
3096
  * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
@@ -2883,7 +3108,9 @@ declare function onSubscriptionContractCreated(handler: (event: SubscriptionCont
2883
3108
  interface SubscriptionContractDeletedEnvelope {
2884
3109
  metadata: EventMetadata;
2885
3110
  }
2886
- /** @permissionScope Manage Stores - all permissions
3111
+ /**
3112
+ * 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.
3113
+ * @permissionScope Manage Stores - all permissions
2887
3114
  * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2888
3115
  * @permissionScope Read eCommerce - all read permissions
2889
3116
  * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
@@ -2904,7 +3131,11 @@ interface SubscriptionContractUpdatedEnvelope {
2904
3131
  /** @hidden */
2905
3132
  modifiedFields: Record<string, any>;
2906
3133
  }
2907
- /** @permissionScope Manage Stores - all permissions
3134
+ /**
3135
+ * Triggered when a subscription contract is updated.
3136
+ * Fires when changes from a draft subscription contract are committed, and when the contract's `priceSummary` is set to the billed totals at the start of the first billing cycle.
3137
+ * 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.
3138
+ * @permissionScope Manage Stores - all permissions
2908
3139
  * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2909
3140
  * @permissionScope Read eCommerce - all read permissions
2910
3141
  * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
@@ -2920,26 +3151,36 @@ interface SubscriptionContractUpdatedEnvelope {
2920
3151
  */
2921
3152
  declare function onSubscriptionContractUpdated(handler: (event: SubscriptionContractUpdatedEnvelope) => void | Promise<void>): void;
2922
3153
  /**
2923
- * Retrieves a SubscriptionContract.
2924
- * @param subscriptionContractId - ID of the SubscriptionContract to retrieve.
3154
+ * Retrieves a subscription contract.
3155
+ *
3156
+ *
3157
+ * To retrieve the subscription contract an order was created from, specify the order's `lineItems.subscriptionInfo.id` as `subscriptionContractId`. You can retrieve the order with [Get Order](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/get-order).
3158
+ *
3159
+ * To retrieve the orders created from a subscription contract, call [Search Orders](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/search-orders) with a filter on `lineItems.subscriptionInfo.id`.
3160
+ * @param subscriptionContractId - ID of the subscription contract to retrieve.
2925
3161
  * @public
2926
3162
  * @documentationMaturity preview
2927
3163
  * @requiredField subscriptionContractId
2928
3164
  * @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
2929
3165
  * @applicableIdentity APP
2930
- * @returns The requested SubscriptionContract.
3166
+ * @returns Retrieved subscription contract.
2931
3167
  * @fqn wix.ecom.subscription_contracts.v1.SubscriptionContracts.GetSubscriptionContract
2932
3168
  */
2933
- declare function getSubscriptionContract(subscriptionContractId: string): Promise<NonNullablePaths<SubscriptionContract, `subscriptionSettings.frequency` | `subscriptionSettings.autoRenewal` | `subscriptionSettings.enableCustomerCancellation` | `subscriptionSettings.freeTrialPeriod.frequency` | `subscriptionSettings.freeTrialPeriod.interval` | `lineItems` | `lineItems.${number}._id` | `lineItems.${number}.productName.original` | `lineItems.${number}.catalogReference.catalogItemId` | `lineItems.${number}.catalogReference.appId` | `lineItems.${number}.quantity` | `lineItems.${number}.totalDiscount.amount` | `lineItems.${number}.totalDiscount.formattedAmount` | `lineItems.${number}.physicalProperties.shippable` | `lineItems.${number}.itemType.preset` | `lineItems.${number}.itemType.custom` | `lineItems.${number}.paymentOption` | `lineItems.${number}.taxDetails.taxRate` | `lineItems.${number}.taxInfo.taxIncludedInPrice` | `lineItems.${number}.digitalFile.fileId` | `lineItems.${number}.subscriptionInfo.cycleNumber` | `lineItems.${number}.subscriptionInfo.subscriptionOptionTitle` | `lineItems.${number}.subscriptionInfo.subscriptionSettings.frequency` | `lineItems.${number}.subscriptionInfo.subscriptionSettings.autoRenewal` | `lineItems.${number}.subscriptionInfo.subscriptionSettings.enableCustomerCancellation` | `lineItems.${number}.priceDescription.original` | `lineItems.${number}.taxableAddress.addressType` | `lineItems.${number}.priceUndetermined` | `lineItems.${number}.fixedQuantity` | `lineItems.${number}.decimalQuantity.measurementUnit` | `lineItems.${number}.decimalQuantity.otherUnit` | `lineItems.${number}.decimalQuantity.value` | `lineItems.${number}.decimalQuantity.description.original` | `buyerInfo.visitorId` | `buyerInfo.memberId` | `weightUnit` | `taxIncludedInPrices` | `platformFeeSummary.fees` | `platformFeeSummary.fees.${number}.lineItemId` | `platformFeeSummary.fees.${number}.chargeType` | `platformFeeSummary.fees.${number}.percentageRate` | `billingInfo.address.streetAddress.number` | `billingInfo.address.streetAddress.name` | `billingInfo.contactDetails.vatId._id` | `billingInfo.contactDetails.vatId.type` | `shippingInfo.title` | `shippingInfo.logistics.pickupDetails.pickupMethod` | `appliedDiscounts` | `appliedDiscounts.${number}.coupon._id` | `appliedDiscounts.${number}.coupon.code` | `appliedDiscounts.${number}.coupon.name` | `appliedDiscounts.${number}.merchantDiscount.discountReason` | `appliedDiscounts.${number}.discountRule._id` | `appliedDiscounts.${number}.discountRule.name.original` | `appliedDiscounts.${number}.discountType` | `channelInfo.type` | `customFields` | `customFields.${number}.title` | `additionalFees` | `additionalFees.${number}.name` | `additionalFees.${number}._id` | `additionalFees.${number}.source` | `activities` | `activities.${number}.changesApplied.draftSubscriptionContractId` | `activities.${number}._id` | `activities.${number}.author.userId` | `activities.${number}.author.appId` | `activities.${number}.activityType`, 4>>;
3169
+ declare function getSubscriptionContract(subscriptionContractId: string): Promise<NonNullablePaths<SubscriptionContract, `subscriptionDescription.original` | `subscriptionSettings.frequency` | `subscriptionSettings.autoRenewal` | `subscriptionSettings.enableCustomerCancellation` | `subscriptionSettings.freeTrialPeriod.frequency` | `subscriptionSettings.freeTrialPeriod.interval` | `lineItems` | `lineItems.${number}._id` | `lineItems.${number}.productName.original` | `lineItems.${number}.catalogReference.catalogItemId` | `lineItems.${number}.catalogReference.appId` | `lineItems.${number}.quantity` | `lineItems.${number}.totalDiscount.amount` | `lineItems.${number}.totalDiscount.formattedAmount` | `lineItems.${number}.physicalProperties.shippable` | `lineItems.${number}.itemType.preset` | `lineItems.${number}.itemType.custom` | `lineItems.${number}.paymentOption` | `lineItems.${number}.taxDetails.taxRate` | `lineItems.${number}.taxInfo.taxIncludedInPrice` | `lineItems.${number}.digitalFile.fileId` | `lineItems.${number}.subscriptionInfo.cycleNumber` | `lineItems.${number}.subscriptionInfo.subscriptionOptionTitle` | `lineItems.${number}.subscriptionInfo.subscriptionSettings.frequency` | `lineItems.${number}.subscriptionInfo.subscriptionSettings.autoRenewal` | `lineItems.${number}.subscriptionInfo.subscriptionSettings.enableCustomerCancellation` | `lineItems.${number}.priceDescription.original` | `lineItems.${number}.taxableAddress.addressType` | `lineItems.${number}.priceUndetermined` | `lineItems.${number}.fixedQuantity` | `lineItems.${number}.decimalQuantity.measurementUnit` | `lineItems.${number}.decimalQuantity.otherUnit` | `lineItems.${number}.decimalQuantity.value` | `lineItems.${number}.decimalQuantity.description.original` | `buyerInfo.visitorId` | `buyerInfo.memberId` | `weightUnit` | `taxIncludedInPrices` | `platformFeeSummary.fees` | `platformFeeSummary.fees.${number}.lineItemId` | `platformFeeSummary.fees.${number}.chargeType` | `platformFeeSummary.fees.${number}.percentageRate` | `billingInfo.address.streetAddress.number` | `billingInfo.address.streetAddress.name` | `billingInfo.contactDetails.vatId._id` | `billingInfo.contactDetails.vatId.type` | `shippingInfo.title` | `shippingInfo.logistics.pickupDetails.pickupMethod` | `appliedDiscounts` | `appliedDiscounts.${number}.coupon._id` | `appliedDiscounts.${number}.coupon.code` | `appliedDiscounts.${number}.coupon.name` | `appliedDiscounts.${number}.merchantDiscount.discountReason` | `appliedDiscounts.${number}.discountRule._id` | `appliedDiscounts.${number}.discountRule.name.original` | `appliedDiscounts.${number}.discountType` | `channelInfo.type` | `customFields` | `customFields.${number}.title` | `subscriptionTitle.original` | `additionalFees` | `additionalFees.${number}.name` | `additionalFees.${number}._id` | `additionalFees.${number}.source`, 4> & {
3170
+ __applicationErrorsType?: GetSubscriptionContractApplicationErrors;
3171
+ }>;
2934
3172
  /**
2935
- * Retrieves a list of SubscriptionContracts, given the provided [paging, filtering, and sorting][1].
3173
+ * Retrieves a list of up to 100 subscription contracts, given the provided paging, filtering, and sorting.
3174
+ *
2936
3175
  *
2937
- * Up to 300 SubscriptionContracts can be returned per request.
3176
+ * Query Subscription Contracts runs with these defaults, which you can override:
2938
3177
  *
2939
- * To learn how to query SubscriptionContracts, see [API Query Language][2].
3178
+ * - `id` is sorted in `ASC` order
3179
+ * - `cursorPaging.limit` is `50`
2940
3180
  *
2941
- * [1]: https://dev.wix.com/api/rest/getting-started/sorting-and-paging
2942
- * [2]: https://dev.wix.com/api/rest/getting-started/api-query-language
3181
+ * You can filter and sort by `id` and `buyerInfo.contactId`. For example, to retrieve all of a buyer's subscription contracts, filter by `buyerInfo.contactId`.
3182
+ *
3183
+ * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language) and [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging).
2943
3184
  * @public
2944
3185
  * @documentationMaturity preview
2945
3186
  * @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
@@ -3024,7 +3265,7 @@ interface SubscriptionContractsQueryBuilder {
3024
3265
  * @fqn wix.ecom.subscription_contracts.v1.SubscriptionContracts.QuerySubscriptionContracts
3025
3266
  * @requiredField query
3026
3267
  */
3027
- declare function typedQuerySubscriptionContracts(query: SubscriptionContractQuery): Promise<NonNullablePaths<QuerySubscriptionContractsResponse, `subscriptionContracts` | `subscriptionContracts.${number}.subscriptionSettings.frequency` | `subscriptionContracts.${number}.subscriptionSettings.autoRenewal` | `subscriptionContracts.${number}.subscriptionSettings.enableCustomerCancellation` | `subscriptionContracts.${number}.subscriptionSettings.freeTrialPeriod.frequency` | `subscriptionContracts.${number}.subscriptionSettings.freeTrialPeriod.interval` | `subscriptionContracts.${number}.buyerInfo.visitorId` | `subscriptionContracts.${number}.buyerInfo.memberId` | `subscriptionContracts.${number}.weightUnit` | `subscriptionContracts.${number}.taxIncludedInPrices` | `subscriptionContracts.${number}.shippingInfo.title` | `subscriptionContracts.${number}.channelInfo.type`, 4>>;
3268
+ declare function typedQuerySubscriptionContracts(query: SubscriptionContractQuery): Promise<NonNullablePaths<QuerySubscriptionContractsResponse, `subscriptionContracts` | `subscriptionContracts.${number}.subscriptionDescription.original` | `subscriptionContracts.${number}.subscriptionSettings.frequency` | `subscriptionContracts.${number}.subscriptionSettings.autoRenewal` | `subscriptionContracts.${number}.subscriptionSettings.enableCustomerCancellation` | `subscriptionContracts.${number}.subscriptionSettings.freeTrialPeriod.frequency` | `subscriptionContracts.${number}.subscriptionSettings.freeTrialPeriod.interval` | `subscriptionContracts.${number}.buyerInfo.visitorId` | `subscriptionContracts.${number}.buyerInfo.memberId` | `subscriptionContracts.${number}.weightUnit` | `subscriptionContracts.${number}.taxIncludedInPrices` | `subscriptionContracts.${number}.shippingInfo.title` | `subscriptionContracts.${number}.channelInfo.type` | `subscriptionContracts.${number}.subscriptionTitle.original`, 4>>;
3028
3269
  interface SubscriptionContractQuerySpec extends QuerySpec {
3029
3270
  paging: 'cursor';
3030
3271
  wql: [
@@ -3056,29 +3297,32 @@ type SubscriptionContractQuery = {
3056
3297
  cursor?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor'] | null;
3057
3298
  };
3058
3299
  /**
3059
- Filter object in the following format:
3060
- `"filter" : {
3061
- "fieldName1": "value1",
3062
- "fieldName2":{"$operator":"value2"}
3063
- }`
3064
- Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
3065
- Learn more about the [filter format](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
3300
+ Filter object. See [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language) for more information.
3301
+
3302
+ Supported properties:
3303
+ `id`, `buyerInfo.contactId`
3066
3304
  */
3067
3305
  filter?: CommonQueryWithEntityContext['filter'] | null;
3068
3306
  /**
3069
3307
  Sort object in the following format:
3070
3308
  `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
3071
- Learn more about the [sort format](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
3309
+
3310
+ Learn more about [sorting](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging).
3072
3311
  @maxSize: 5
3073
3312
  */
3074
3313
  sort?: {
3075
3314
  /**
3076
- Name of the field to sort by.
3315
+ Field to sort by.
3316
+
3317
+ Supported properties:
3318
+ `id`, `buyerInfo.contactId`
3077
3319
  @maxLength: 512
3078
3320
  */
3079
3321
  fieldName?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['fieldName'];
3080
3322
  /**
3081
- Sort order.
3323
+ Sort order. Use `ASC` for ascending order or `DESC` for descending order.
3324
+
3325
+ Default: `ASC`
3082
3326
  */
3083
3327
  order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
3084
3328
  }[];
@@ -3087,4 +3331,4 @@ declare const utils: {
3087
3331
  query: _wix_sdk_types.QueryHelpers<SubscriptionContract, SubscriptionContractQuerySpec, SubscriptionContractQuery>;
3088
3332
  };
3089
3333
 
3090
- export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, ActionInitiator, type ActionInitiatorWithLiterals, type ActivityAuthor, type ActivityAuthorValueOneOf, ActivityType, type ActivityTypeWithLiterals, type AdditionalFee, type AdditionalFeeDelta, type AdditionalFeeDeltaDeltaDetailsOneOf, AdditionalFeeSource, type AdditionalFeeSourceWithLiterals, type Address, type AddressLocation, type AddressWithContact, AdjustmentType, type AdjustmentTypeWithLiterals, type ApplicationError, type AppliedDiscount, type AppliedDiscountDelta, type AppliedDiscountDeltaDeltaDetailsOneOf, type AppliedDiscountDiscountSourceOneOf, type BaseEventMetadata, type BillingAdjustment, type BillingAdjustmentPriceSummary, type BillingSettings, type BulkActionMetadata, type BulkCreateSubscriptionContractsRequest, type BulkCreateSubscriptionContractsResponse, type BulkSubscriptionContractResult, type BulkUpdateSubscriptionContractsRequest, type BulkUpdateSubscriptionContractsResponse, type BuyerInfo, type BuyerInfoIdOneOf, type CatalogReference, type CatalogReferenceOptionsBeforeChange, ChangeType, type ChangeTypeWithLiterals, type ChangesAppliedActivity, type ChangesAppliedActivityTargetOneOf, type ChannelInfo, ChannelType, type ChannelTypeWithLiterals, ChargeType, type ChargeTypeWithLiterals, type Color, type CommitSubscriptionContractChangesRequest, type CommitSubscriptionContractChangesResponse, type CommonQueryWithEntityContext, type ContractChange, type ContractChangeValueOneOf, type ContractTarget, type Coupon, type CreateSubscriptionContractRequest, type CreateSubscriptionContractResponse, type CurrencyConversionDetails, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomField, type CyclePriceOverride, type DecimalQuantity, type DecimalQuantityUnitOneOf, type DeliveryLogistics, type DeliveryLogisticsAddressOneOf, type DeliveryProfileIdBeforeChange, type DeliveryTimeSlot, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineTypeWithLiterals, type DescriptionLineValueOneOf, type DescriptionLinesBeforeChange, type DigitalFile, type DigitalFileBeforeChange, type Dimensions, DimensionsUnit, type DimensionsUnitWithLiterals, DiscountReason, type DiscountReasonWithLiterals, type DiscountRule, type DiscountRuleName, DiscountType, type DiscountTypeWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type FocalPoint, type FreeTrialPeriod, type FulfillerIdBeforeChange, type FullAddressContactDetails, type GetSubscriptionContractRequest, type GetSubscriptionContractResponse, type IdentificationData, type IdentificationDataIdOneOf, type ImageBeforeChange, type InventoryAppIdBeforeChange, type ItemChangedDetails, type ItemCombination, type ItemCombinationLineItem, type ItemMetadata, type ItemModifier, type ItemTaxFullDetails, type ItemType, type ItemTypeBeforeChange, type ItemTypeItemTypeDataOneOf, ItemTypePreset, type ItemTypePresetWithLiterals, JurisdictionType, type JurisdictionTypeWithLiterals, type LineItemChanges, type LineItemCyclePriceOverrides, type LineItemDelta, type LineItemDeltaDeltaDetailsOneOf, type LineItemDiscount, type LineItemQuantityChange, LineItemQuantityChangeType, type LineItemQuantityChangeTypeWithLiterals, type LineItemTaxBreakdown, type LineItemTaxInfo, type Location, type LocationAndQuantity, type ManagedAdditionalFee, type ManagedDiscount, type ManagedLineItem, type MaskedSubscriptionContract, MeasurementUnit, type MeasurementUnitWithLiterals, type MerchantDiscount, type MerchantDiscountMerchantDiscountReasonOneOf, type MessageEnvelope, type ModifierGroup, type ModifierGroupsBeforeChange, type OrderLineItem, type OrderTaxBreakdown, type OrderTaxInfo, PaymentOptionType, type PaymentOptionTypeWithLiterals, type PhysicalProperties, type PhysicalPropertiesBeforeChange, type PickupAddress, type PickupDetails, PickupMethod, type PickupMethodWithLiterals, type PlainTextValue, type PlatformFee, type PlatformFeeSummary, type Price, type PriceDescription, type PriceDescriptionBeforeChange, type PriceSummary, type PriceUndeterminedBeforeChange, type ProductName, type ProductNameBeforeChange, ProductPeriodAlignment, type ProductPeriodAlignmentWithLiterals, type QuerySubscriptionContractsRequest, type QuerySubscriptionContractsResponse, type RestockLocation, type RestoreInfo, type RootCatalogItemIdBeforeChange, type ServiceProperties, type ShippingGroupIdBeforeChange, type ShippingInformation, type ShippingPrice, type ShippingRegion, SortOrder, type SortOrderWithLiterals, type Sorting, SpecificItemsCouponBehavior, type SpecificItemsCouponBehaviorWithLiterals, type StreetAddress, type SubscriptionCommitSettings, type SubscriptionContract, type SubscriptionContractActivity, type SubscriptionContractActivityContentOneOf, type SubscriptionContractActivityTargetOneOf, type SubscriptionContractCanceled, type SubscriptionContractChangesCommitted, type SubscriptionContractChargeUpcoming, type SubscriptionContractCreatedEnvelope, type SubscriptionContractDeletedEnvelope, type SubscriptionContractDiffs, type SubscriptionContractExpired, type SubscriptionContractQuery, type SubscriptionContractQuerySpec, type SubscriptionContractSettings, type SubscriptionContractUpdatedEnvelope, type SubscriptionContractsQueryBuilder, type SubscriptionContractsQueryResult, type SubscriptionDescription, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type SubscriptionInfo, type SubscriptionSettings, SubscriptionSettingsProductPeriodAlignment, type SubscriptionSettingsProductPeriodAlignmentWithLiterals, type SubscriptionTitle, type TaxInfoBeforeChange, type TaxableAddress, type TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, type TaxableAddressTypeWithLiterals, type TotalPriceChange, type TranslatableString, type TranslatedValue, type UpdateSubscriptionContractRequest, type UpdateSubscriptionContractResponse, type V1BillingSettings, type V1CyclePriceOverride, type V1FreeTrialPeriod, type V1SubscriptionDescription, type V1SubscriptionSettings, type V1SubscriptionTitle, V2SubscriptionFrequency, type V2SubscriptionFrequencyWithLiterals, type VatId, VatType, type VatTypeWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals, getSubscriptionContract, onSubscriptionContractCreated, onSubscriptionContractDeleted, onSubscriptionContractUpdated, querySubscriptionContracts, typedQuerySubscriptionContracts, utils };
3334
+ export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, ActionInitiator, type ActionInitiatorWithLiterals, type ActivityAuthor, type ActivityAuthorValueOneOf, ActivityType, type ActivityTypeWithLiterals, type AdditionalFee, type AdditionalFeeDelta, type AdditionalFeeDeltaDeltaDetailsOneOf, AdditionalFeeSource, type AdditionalFeeSourceWithLiterals, type AdditionalFeeSummary, type Address, type AddressLocation, type AddressWithContact, AdjustmentType, type AdjustmentTypeWithLiterals, type ApplicationError, type AppliedDiscount, type AppliedDiscountDelta, type AppliedDiscountDeltaDeltaDetailsOneOf, type AppliedDiscountDiscountSourceOneOf, type BaseEventMetadata, BaseRateSource, type BaseRateSourceWithLiterals, type BillingAdjustment, type BillingAdjustmentPriceSummary, type BillingSettings, type BulkActionMetadata, type BulkCreateSubscriptionContractsRequest, type BulkCreateSubscriptionContractsResponse, type BulkSubscriptionContractResult, type BulkUpdateSubscriptionContractsRequest, type BulkUpdateSubscriptionContractsResponse, type BuyerInfo, type BuyerInfoIdOneOf, type CatalogReference, type CatalogReferenceOptionsBeforeChange, ChangeType, type ChangeTypeWithLiterals, type ChangesAppliedActivity, type ChangesAppliedActivityTargetOneOf, type ChannelInfo, ChannelType, type ChannelTypeWithLiterals, ChargeType, type ChargeTypeWithLiterals, type Color, type CommitSubscriptionContractChangesRequest, type CommitSubscriptionContractChangesResponse, type CommonQueryWithEntityContext, type ContractChange, type ContractChangeChangeDetailsOneOf, ContractChangeType, type ContractChangeTypeWithLiterals, type ContractTarget, type Coupon, type CreateSubscriptionContractRequest, type CreateSubscriptionContractResponse, type CrossBorderCalculation, CrossBorderNotApplicableReason, type CrossBorderNotApplicableReasonWithLiterals, type CrossBorderPriceAdjustment, CrossBorderRepricingMode, type CrossBorderRepricingModeWithLiterals, type CurrencyConversionDetails, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomField, type CyclePriceOverride, type DecimalQuantity, type DecimalQuantityUnitOneOf, type DeliveryLogistics, type DeliveryLogisticsAddressOneOf, type DeliveryProfileIdBeforeChange, type DeliveryTimeSlot, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineTypeWithLiterals, type DescriptionLineValueOneOf, type DescriptionLinesBeforeChange, type DigitalFile, type DigitalFileBeforeChange, type Dimensions, DimensionsUnit, type DimensionsUnitWithLiterals, DiscountReason, type DiscountReasonWithLiterals, type DiscountRule, type DiscountRuleName, type DiscountSummary, DiscountType, type DiscountTypeWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type FocalPoint, type FreeTrialPeriod, type FulfillerIdBeforeChange, type FullAddressContactDetails, type GetSubscriptionContractApplicationErrors, type GetSubscriptionContractRequest, type GetSubscriptionContractResponse, type IdentificationData, type IdentificationDataIdOneOf, type ImageBeforeChange, type InventoryAppIdBeforeChange, type ItemChangedDetails, type ItemCombination, type ItemCombinationLineItem, type ItemMetadata, type ItemModifier, type ItemTaxFullDetails, type ItemType, type ItemTypeBeforeChange, type ItemTypeItemTypeDataOneOf, ItemTypePreset, type ItemTypePresetWithLiterals, JurisdictionType, type JurisdictionTypeWithLiterals, type LineItemChanges, type LineItemCyclePriceOverrides, type LineItemDelta, type LineItemDeltaDeltaDetailsOneOf, type LineItemDiscount, type LineItemQuantityChange, LineItemQuantityChangeType, type LineItemQuantityChangeTypeWithLiterals, type LineItemSummary, type LineItemTaxBreakdown, type LineItemTaxInfo, type Location, type LocationAndQuantity, type MaskedSubscriptionContract, MeasurementUnit, type MeasurementUnitWithLiterals, type MerchantDiscount, type MerchantDiscountMerchantDiscountReasonOneOf, type MessageEnvelope, type ModifierGroup, type ModifierGroupsBeforeChange, type OrderLineItem, type OrderTaxBreakdown, type OrderTaxInfo, PaymentOptionType, type PaymentOptionTypeWithLiterals, type PhysicalProperties, type PhysicalPropertiesBeforeChange, type PickupAddress, type PickupDetails, PickupMethod, type PickupMethodWithLiterals, type PlainTextValue, type PlatformFee, type PlatformFeeSummary, type Price, type PriceDescription, type PriceDescriptionBeforeChange, type PriceSummary, type PriceUndeterminedBeforeChange, type ProductName, type ProductNameBeforeChange, ProductPeriodAlignment, type ProductPeriodAlignmentWithLiterals, type QuerySubscriptionContractsRequest, type QuerySubscriptionContractsResponse, RepriceStatus, type RepriceStatusWithLiterals, type RestockLocation, type RestoreInfo, type RootCatalogItemIdBeforeChange, type ServiceProperties, type ShippingGroupIdBeforeChange, type ShippingInformation, type ShippingPrice, type ShippingRegion, SortOrder, type SortOrderWithLiterals, type Sorting, SpecificItemsCouponBehavior, type SpecificItemsCouponBehaviorWithLiterals, type StreetAddress, type SubscriptionCommitSettings, type SubscriptionContract, type SubscriptionContractActivity, type SubscriptionContractActivityContentOneOf, type SubscriptionContractActivityTargetOneOf, type SubscriptionContractCanceled, type SubscriptionContractChangesCommitted, type SubscriptionContractChargeUpcoming, type SubscriptionContractCommittedEnvelope, type SubscriptionContractCreatedEnvelope, type SubscriptionContractDeletedEnvelope, type SubscriptionContractDiffs, type SubscriptionContractExpired, type SubscriptionContractQuery, type SubscriptionContractQuerySpec, type SubscriptionContractSettings, type SubscriptionContractUpdatedEnvelope, type SubscriptionContractsQueryBuilder, type SubscriptionContractsQueryResult, type SubscriptionDescription, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type SubscriptionInfo, type SubscriptionSettings, SubscriptionSettingsProductPeriodAlignment, type SubscriptionSettingsProductPeriodAlignmentWithLiterals, type SubscriptionTitle, type TaxInfoBeforeChange, type TaxableAddress, type TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, type TaxableAddressTypeWithLiterals, type TotalPriceChange, type TranslatableString, type TranslatedValue, type UpdateSubscriptionContractRequest, type UpdateSubscriptionContractResponse, type V1BillingSettings, type V1CyclePriceOverride, type V1FreeTrialPeriod, type V1SubscriptionDescription, type V1SubscriptionSettings, type V1SubscriptionTitle, V2SubscriptionFrequency, type V2SubscriptionFrequencyWithLiterals, type VatId, VatType, type VatTypeWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals, getSubscriptionContract, onSubscriptionContractCommitted, onSubscriptionContractCreated, onSubscriptionContractDeleted, onSubscriptionContractUpdated, querySubscriptionContracts, typedQuerySubscriptionContracts, utils };