@wix/auto_sdk_ecom_subscription-contracts 1.0.144 → 1.0.145
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +31 -10
- package/build/cjs/index.js +118 -17
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +311 -187
- package/build/cjs/index.typings.js +15 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +245 -164
- package/build/cjs/meta.js +15 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +31 -10
- package/build/es/index.mjs +116 -17
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +311 -187
- package/build/es/index.typings.mjs +14 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +245 -164
- package/build/es/meta.mjs +14 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +31 -10
- package/build/internal/cjs/index.typings.d.ts +315 -189
- package/build/internal/cjs/meta.d.ts +249 -166
- package/build/internal/es/index.d.mts +31 -10
- package/build/internal/es/index.typings.d.mts +315 -189
- package/build/internal/es/meta.d.mts +249 -166
- package/package.json +2 -2
|
@@ -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
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
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
|
-
*
|
|
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
|
|
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
|
|
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
|
|
29
|
+
* Date and time the subscription contract was last updated.
|
|
32
30
|
* @readonly
|
|
33
31
|
*/
|
|
34
32
|
_updatedDate?: Date | null;
|
|
@@ -47,14 +45,23 @@ interface SubscriptionContract {
|
|
|
47
45
|
*/
|
|
48
46
|
description?: string | null;
|
|
49
47
|
/**
|
|
50
|
-
* Subscription
|
|
51
|
-
*
|
|
48
|
+
* Subscription description, in the site's default language and translated into the buyer's language. For example, `"1kg of selected coffee, once a month"`.
|
|
49
|
+
*
|
|
50
|
+
* For a subscription contract with more than one line item, holds a general name for the subscription.
|
|
52
51
|
*/
|
|
53
52
|
subscriptionDescription?: V1SubscriptionDescription;
|
|
54
|
-
/** Subscription
|
|
53
|
+
/** Subscription terms, such as the billing frequency, the number of billing cycles, and whether the subscription renews automatically. */
|
|
55
54
|
subscriptionSettings?: V1SubscriptionSettings;
|
|
56
55
|
/**
|
|
57
|
-
*
|
|
56
|
+
* Subscription line items. The order for each billing cycle is created with these line items.
|
|
57
|
+
*
|
|
58
|
+
* In a subscription contract:
|
|
59
|
+
* + `lineItems.subscriptionInfo.id` is the subscription contract's own ID.
|
|
60
|
+
* + `lineItems.subscriptionInfo.cycleNumber` is always `0`. The billing cycle is set on the line items of each cycle's order.
|
|
61
|
+
* + `subscriptionInfo.title` and `subscriptionInfo.description` hold the subscription contract's title and description, not the line item's own subscription option.
|
|
62
|
+
* + `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.
|
|
63
|
+
* + `extendedFields` and `decimalQuantity` aren't returned.
|
|
64
|
+
* + When coupons were included in item prices at checkout, `price` is the price before coupons, and the coupons are in `appliedDiscounts`.
|
|
58
65
|
* @minSize 1
|
|
59
66
|
* @maxSize 100
|
|
60
67
|
*/
|
|
@@ -62,20 +69,25 @@ interface SubscriptionContract {
|
|
|
62
69
|
/** Buyer information. */
|
|
63
70
|
buyerInfo?: BuyerInfo;
|
|
64
71
|
/**
|
|
65
|
-
* Language for communication with the buyer.
|
|
66
|
-
*
|
|
72
|
+
* Language for communication with the buyer. For a site that supports multiple languages, this is the language the buyer selected.
|
|
73
|
+
*
|
|
74
|
+
* Default: Site language
|
|
67
75
|
* @maxLength 10
|
|
68
76
|
*/
|
|
69
77
|
buyerLanguage?: string | null;
|
|
70
|
-
/**
|
|
78
|
+
/**
|
|
79
|
+
* Weight measurement unit.
|
|
80
|
+
*
|
|
81
|
+
* Default: Site's weight unit
|
|
82
|
+
*/
|
|
71
83
|
weightUnit?: WeightUnitWithLiterals;
|
|
72
84
|
/**
|
|
73
|
-
* Currency used for the pricing
|
|
85
|
+
* 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.
|
|
74
86
|
* @format CURRENCY
|
|
75
87
|
* @immutable
|
|
76
88
|
*/
|
|
77
89
|
currency?: string | null;
|
|
78
|
-
/** Multi-currency
|
|
90
|
+
/** Multi-currency details for a subscription paid in a currency other than the site's currency. */
|
|
79
91
|
currencyConversionDetails?: CurrencyConversionDetails;
|
|
80
92
|
/**
|
|
81
93
|
* Whether tax is included in line item prices.
|
|
@@ -85,15 +97,19 @@ interface SubscriptionContract {
|
|
|
85
97
|
*/
|
|
86
98
|
taxIncludedInPrices?: boolean;
|
|
87
99
|
/**
|
|
88
|
-
*
|
|
100
|
+
* Price summary of a single billing cycle.
|
|
89
101
|
* @readonly
|
|
90
102
|
*/
|
|
91
103
|
priceSummary?: PriceSummary;
|
|
92
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* Summary of platform fees calculated at checkout, including totals by charge type and a breakdown of individual fees.
|
|
106
|
+
*
|
|
107
|
+
* Not updated when draft changes are committed. Each billing cycle's order holds the platform fees for that cycle.
|
|
108
|
+
*/
|
|
93
109
|
platformFeeSummary?: PlatformFeeSummary;
|
|
94
110
|
/** Billing address and contact details. */
|
|
95
111
|
billingInfo?: AddressWithContact;
|
|
96
|
-
/** Shipping
|
|
112
|
+
/** Shipping information and selected shipping option details. */
|
|
97
113
|
shippingInfo?: ShippingInformation;
|
|
98
114
|
/**
|
|
99
115
|
* Tax information.
|
|
@@ -102,11 +118,11 @@ interface SubscriptionContract {
|
|
|
102
118
|
*/
|
|
103
119
|
taxInfo?: OrderTaxInfo;
|
|
104
120
|
/**
|
|
105
|
-
*
|
|
121
|
+
* Discounts applied to the subscription contract.
|
|
106
122
|
* @maxSize 100
|
|
107
123
|
*/
|
|
108
124
|
appliedDiscounts?: AppliedDiscount[];
|
|
109
|
-
/** Information about the sales channel
|
|
125
|
+
/** Information about the sales channel the subscription was purchased through. */
|
|
110
126
|
channelInfo?: ChannelInfo;
|
|
111
127
|
/**
|
|
112
128
|
* Custom fields.
|
|
@@ -114,7 +130,7 @@ interface SubscriptionContract {
|
|
|
114
130
|
*/
|
|
115
131
|
customFields?: CustomField[];
|
|
116
132
|
/**
|
|
117
|
-
*
|
|
133
|
+
* Recipient address and contact details.
|
|
118
134
|
*
|
|
119
135
|
* This field may differ from the address in `shippingInfo.logistics` when:
|
|
120
136
|
* + The chosen shipping option is pickup point or store pickup.
|
|
@@ -124,7 +140,7 @@ interface SubscriptionContract {
|
|
|
124
140
|
/**
|
|
125
141
|
* Custom field data for the subscription contract object.
|
|
126
142
|
*
|
|
127
|
-
* [Extended fields](https://dev.wix.com/docs/
|
|
143
|
+
* [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.
|
|
128
144
|
*/
|
|
129
145
|
extendedFields?: ExtendedFields;
|
|
130
146
|
/**
|
|
@@ -136,12 +152,13 @@ interface SubscriptionContract {
|
|
|
136
152
|
*/
|
|
137
153
|
title?: string | null;
|
|
138
154
|
/**
|
|
139
|
-
* Subscription title. For example, `"Monthly coffee
|
|
140
|
-
*
|
|
155
|
+
* Subscription title, in the site's default language and translated into the buyer's language. For example, `"Monthly coffee subscription"`.
|
|
156
|
+
*
|
|
157
|
+
* For a subscription contract with more than one line item, holds a general name for the subscription.
|
|
141
158
|
*/
|
|
142
159
|
subscriptionTitle?: V1SubscriptionTitle;
|
|
143
160
|
/**
|
|
144
|
-
* Additional fees applied to subscription contract.
|
|
161
|
+
* Additional fees applied to the subscription contract.
|
|
145
162
|
* @maxSize 100
|
|
146
163
|
*/
|
|
147
164
|
additionalFees?: AdditionalFee[];
|
|
@@ -156,7 +173,8 @@ interface SubscriptionContract {
|
|
|
156
173
|
*/
|
|
157
174
|
settings?: SubscriptionContractSettings;
|
|
158
175
|
/**
|
|
159
|
-
*
|
|
176
|
+
* Record of changes made to the subscription contract after checkout.
|
|
177
|
+
* @internal
|
|
160
178
|
* @readonly
|
|
161
179
|
* @maxSize 500
|
|
162
180
|
*/
|
|
@@ -164,18 +182,18 @@ interface SubscriptionContract {
|
|
|
164
182
|
}
|
|
165
183
|
interface V1SubscriptionDescription {
|
|
166
184
|
/**
|
|
167
|
-
* Subscription
|
|
185
|
+
* Subscription description in the site's default language.
|
|
168
186
|
* @maxLength 500
|
|
169
187
|
*/
|
|
170
188
|
original?: string;
|
|
171
189
|
/**
|
|
172
|
-
*
|
|
190
|
+
* Subscription description translated into the buyer's language.
|
|
173
191
|
* @maxLength 500
|
|
174
192
|
*/
|
|
175
193
|
translated?: string | null;
|
|
176
194
|
}
|
|
177
195
|
interface V1SubscriptionSettings {
|
|
178
|
-
/** Frequency of
|
|
196
|
+
/** Frequency unit of the billing cycle. */
|
|
179
197
|
frequency?: SubscriptionFrequencyWithLiterals;
|
|
180
198
|
/**
|
|
181
199
|
* Number of frequency units in a billing cycle. For example, frequency `MONTH` with interval `3` means billing every 3 months.
|
|
@@ -183,19 +201,23 @@ interface V1SubscriptionSettings {
|
|
|
183
201
|
* @max 3650
|
|
184
202
|
*/
|
|
185
203
|
interval?: number | null;
|
|
186
|
-
/** Whether subscription
|
|
204
|
+
/** Whether the subscription renews automatically at the end of each billing cycle. */
|
|
187
205
|
autoRenewal?: boolean;
|
|
188
206
|
/**
|
|
189
|
-
* Number of billing cycles before subscription ends.
|
|
207
|
+
* Number of billing cycles before the subscription ends.
|
|
190
208
|
* @min 1
|
|
191
209
|
*/
|
|
192
210
|
billingCycles?: number | null;
|
|
193
|
-
/** Whether
|
|
211
|
+
/** Whether the buyer can cancel the subscription. */
|
|
194
212
|
enableCustomerCancellation?: boolean;
|
|
195
|
-
/**
|
|
213
|
+
/**
|
|
214
|
+
* Free trial period before the first billing cycle starts.
|
|
215
|
+
*
|
|
216
|
+
* Returned only when the subscription has a free trial.
|
|
217
|
+
*/
|
|
196
218
|
freeTrialPeriod?: V1FreeTrialPeriod;
|
|
197
219
|
/**
|
|
198
|
-
*
|
|
220
|
+
* Date and time the subscription starts. The first charge is made on this date, or when the free trial ends.
|
|
199
221
|
* @internal
|
|
200
222
|
*/
|
|
201
223
|
startDate?: Date | null;
|
|
@@ -227,7 +249,7 @@ declare enum SubscriptionFrequency {
|
|
|
227
249
|
/** @enumType */
|
|
228
250
|
type SubscriptionFrequencyWithLiterals = SubscriptionFrequency | 'UNDEFINED' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
|
|
229
251
|
interface V1FreeTrialPeriod {
|
|
230
|
-
/** Frequency of
|
|
252
|
+
/** Frequency unit of the free trial period. */
|
|
231
253
|
frequency?: SubscriptionFrequencyWithLiterals;
|
|
232
254
|
/**
|
|
233
255
|
* Number of frequency units in the free trial period. For example, frequency `MONTH` with interval `3` means a 3-month free trial.
|
|
@@ -2113,15 +2135,13 @@ interface CustomField {
|
|
|
2113
2135
|
}
|
|
2114
2136
|
interface V1SubscriptionTitle {
|
|
2115
2137
|
/**
|
|
2116
|
-
* Subscription
|
|
2138
|
+
* Subscription title in the site's default language.
|
|
2117
2139
|
* @minLength 1
|
|
2118
2140
|
* @maxLength 150
|
|
2119
2141
|
*/
|
|
2120
2142
|
original?: string;
|
|
2121
2143
|
/**
|
|
2122
|
-
* Subscription
|
|
2123
|
-
*
|
|
2124
|
-
* Default: Same as `original`.
|
|
2144
|
+
* Subscription title translated into the buyer's language.
|
|
2125
2145
|
* @minLength 1
|
|
2126
2146
|
* @maxLength 150
|
|
2127
2147
|
*/
|
|
@@ -2232,7 +2252,7 @@ declare enum SpecificItemsCouponBehavior {
|
|
|
2232
2252
|
/** @enumType */
|
|
2233
2253
|
type SpecificItemsCouponBehaviorWithLiterals = SpecificItemsCouponBehavior | 'UNDEFINED_COUPON_BEHAVIOR' | 'ITEM_SUBTOTAL_INCLUDES_DISCOUNT' | 'LEGACY_ITEM_SUBTOTAL_DOES_NOT_INCLUDE_DISCOUNT';
|
|
2234
2254
|
interface SubscriptionContractActivity extends SubscriptionContractActivityTargetOneOf, SubscriptionContractActivityContentOneOf {
|
|
2235
|
-
/**
|
|
2255
|
+
/** The activity applies to all future billing cycles of the subscription contract. */
|
|
2236
2256
|
contractTarget?: ContractTarget;
|
|
2237
2257
|
/** Changes committed from a DraftSubscriptionContract. */
|
|
2238
2258
|
changesApplied?: ChangesAppliedActivity;
|
|
@@ -2243,12 +2263,12 @@ interface SubscriptionContractActivity extends SubscriptionContractActivityTarge
|
|
|
2243
2263
|
*/
|
|
2244
2264
|
_id?: string;
|
|
2245
2265
|
/**
|
|
2246
|
-
*
|
|
2266
|
+
* Date and time the activity occurred.
|
|
2247
2267
|
* @readonly
|
|
2248
2268
|
*/
|
|
2249
2269
|
_createdDate?: Date | null;
|
|
2250
2270
|
/**
|
|
2251
|
-
*
|
|
2271
|
+
* Wix user or app that made the change.
|
|
2252
2272
|
* @readonly
|
|
2253
2273
|
*/
|
|
2254
2274
|
author?: ActivityAuthor;
|
|
@@ -2257,7 +2277,7 @@ interface SubscriptionContractActivity extends SubscriptionContractActivityTarge
|
|
|
2257
2277
|
}
|
|
2258
2278
|
/** @oneof */
|
|
2259
2279
|
interface SubscriptionContractActivityTargetOneOf {
|
|
2260
|
-
/**
|
|
2280
|
+
/** The activity applies to all future billing cycles of the subscription contract. */
|
|
2261
2281
|
contractTarget?: ContractTarget;
|
|
2262
2282
|
}
|
|
2263
2283
|
/** @oneof */
|
|
@@ -2265,19 +2285,19 @@ interface SubscriptionContractActivityContentOneOf {
|
|
|
2265
2285
|
/** Changes committed from a DraftSubscriptionContract. */
|
|
2266
2286
|
changesApplied?: ChangesAppliedActivity;
|
|
2267
2287
|
}
|
|
2268
|
-
/**
|
|
2288
|
+
/** Target that applies changes to all future billing cycles of the subscription contract. */
|
|
2269
2289
|
interface ContractTarget {
|
|
2270
|
-
/**
|
|
2290
|
+
/** Number of the first billing cycle the changes apply to. Billing cycles are numbered from `1`. */
|
|
2271
2291
|
nextCycleNumber?: number | null;
|
|
2272
2292
|
}
|
|
2273
2293
|
interface ActivityAuthor extends ActivityAuthorValueOneOf {
|
|
2274
2294
|
/**
|
|
2275
|
-
*
|
|
2295
|
+
* Wix user ID. Returned when a Wix user made the change.
|
|
2276
2296
|
* @format GUID
|
|
2277
2297
|
*/
|
|
2278
2298
|
userId?: string;
|
|
2279
2299
|
/**
|
|
2280
|
-
* App ID.
|
|
2300
|
+
* App ID. Returned when an app made the change.
|
|
2281
2301
|
* @format GUID
|
|
2282
2302
|
*/
|
|
2283
2303
|
appId?: string;
|
|
@@ -2285,74 +2305,76 @@ interface ActivityAuthor extends ActivityAuthorValueOneOf {
|
|
|
2285
2305
|
/** @oneof */
|
|
2286
2306
|
interface ActivityAuthorValueOneOf {
|
|
2287
2307
|
/**
|
|
2288
|
-
*
|
|
2308
|
+
* Wix user ID. Returned when a Wix user made the change.
|
|
2289
2309
|
* @format GUID
|
|
2290
2310
|
*/
|
|
2291
2311
|
userId?: string;
|
|
2292
2312
|
/**
|
|
2293
|
-
* App ID.
|
|
2313
|
+
* App ID. Returned when an app made the change.
|
|
2294
2314
|
* @format GUID
|
|
2295
2315
|
*/
|
|
2296
2316
|
appId?: string;
|
|
2297
2317
|
}
|
|
2298
2318
|
interface ChangesAppliedActivity extends ChangesAppliedActivityTargetOneOf {
|
|
2299
|
-
/**
|
|
2319
|
+
/** The changes apply to all future billing cycles of the subscription contract. */
|
|
2300
2320
|
contractTarget?: ContractTarget;
|
|
2301
2321
|
/**
|
|
2302
|
-
* ID of the
|
|
2322
|
+
* ID of the draft subscription contract whose changes were committed.
|
|
2303
2323
|
* @format GUID
|
|
2304
2324
|
*/
|
|
2305
2325
|
draftSubscriptionContractId?: string;
|
|
2306
2326
|
/**
|
|
2307
|
-
*
|
|
2327
|
+
* Changes that were applied to the subscription contract.
|
|
2308
2328
|
* @maxSize 100
|
|
2309
2329
|
*/
|
|
2310
2330
|
changes?: ContractChange[];
|
|
2311
2331
|
/**
|
|
2312
|
-
* Reason for the
|
|
2332
|
+
* Reason for the change, provided by the business.
|
|
2313
2333
|
* @maxLength 200
|
|
2314
2334
|
*/
|
|
2315
2335
|
reason?: string | null;
|
|
2316
2336
|
}
|
|
2317
2337
|
/** @oneof */
|
|
2318
2338
|
interface ChangesAppliedActivityTargetOneOf {
|
|
2319
|
-
/**
|
|
2339
|
+
/** The changes apply to all future billing cycles of the subscription contract. */
|
|
2320
2340
|
contractTarget?: ContractTarget;
|
|
2321
2341
|
}
|
|
2322
|
-
interface ContractChange extends
|
|
2342
|
+
interface ContractChange extends ContractChangeChangeDetailsOneOf {
|
|
2323
2343
|
/** Line item was modified. */
|
|
2324
2344
|
lineItemChanged?: LineItemChanges;
|
|
2325
2345
|
/** Line item was added to the contract. */
|
|
2326
|
-
lineItemAdded?:
|
|
2346
|
+
lineItemAdded?: LineItemSummary;
|
|
2327
2347
|
/** Line item was removed from the contract. */
|
|
2328
|
-
lineItemRemoved?:
|
|
2348
|
+
lineItemRemoved?: LineItemSummary;
|
|
2329
2349
|
/** Discount was added to the contract. */
|
|
2330
|
-
discountAdded?:
|
|
2350
|
+
discountAdded?: DiscountSummary;
|
|
2331
2351
|
/** Discount was removed from the contract. */
|
|
2332
|
-
discountRemoved?:
|
|
2352
|
+
discountRemoved?: DiscountSummary;
|
|
2333
2353
|
/** Additional fee was added to the contract. */
|
|
2334
|
-
additionalFeeAdded?:
|
|
2354
|
+
additionalFeeAdded?: AdditionalFeeSummary;
|
|
2335
2355
|
/** Additional fee was removed from the contract. */
|
|
2336
|
-
additionalFeeRemoved?:
|
|
2356
|
+
additionalFeeRemoved?: AdditionalFeeSummary;
|
|
2337
2357
|
/** Total price changed. */
|
|
2338
2358
|
totalPriceChanged?: TotalPriceChange;
|
|
2359
|
+
/** Type of change. */
|
|
2360
|
+
changeType?: ContractChangeTypeWithLiterals;
|
|
2339
2361
|
}
|
|
2340
2362
|
/** @oneof */
|
|
2341
|
-
interface
|
|
2363
|
+
interface ContractChangeChangeDetailsOneOf {
|
|
2342
2364
|
/** Line item was modified. */
|
|
2343
2365
|
lineItemChanged?: LineItemChanges;
|
|
2344
2366
|
/** Line item was added to the contract. */
|
|
2345
|
-
lineItemAdded?:
|
|
2367
|
+
lineItemAdded?: LineItemSummary;
|
|
2346
2368
|
/** Line item was removed from the contract. */
|
|
2347
|
-
lineItemRemoved?:
|
|
2369
|
+
lineItemRemoved?: LineItemSummary;
|
|
2348
2370
|
/** Discount was added to the contract. */
|
|
2349
|
-
discountAdded?:
|
|
2371
|
+
discountAdded?: DiscountSummary;
|
|
2350
2372
|
/** Discount was removed from the contract. */
|
|
2351
|
-
discountRemoved?:
|
|
2373
|
+
discountRemoved?: DiscountSummary;
|
|
2352
2374
|
/** Additional fee was added to the contract. */
|
|
2353
|
-
additionalFeeAdded?:
|
|
2375
|
+
additionalFeeAdded?: AdditionalFeeSummary;
|
|
2354
2376
|
/** Additional fee was removed from the contract. */
|
|
2355
|
-
additionalFeeRemoved?:
|
|
2377
|
+
additionalFeeRemoved?: AdditionalFeeSummary;
|
|
2356
2378
|
/** Total price changed. */
|
|
2357
2379
|
totalPriceChanged?: TotalPriceChange;
|
|
2358
2380
|
}
|
|
@@ -2368,11 +2390,15 @@ interface LineItemChanges {
|
|
|
2368
2390
|
quantity?: LineItemQuantityChange;
|
|
2369
2391
|
}
|
|
2370
2392
|
declare enum LineItemQuantityChangeType {
|
|
2393
|
+
/** Unknown quantity change type. */
|
|
2394
|
+
UNKNOWN_LINE_ITEM_QUANTITY_CHANGE_TYPE = "UNKNOWN_LINE_ITEM_QUANTITY_CHANGE_TYPE",
|
|
2395
|
+
/** Quantity increased. */
|
|
2371
2396
|
QUANTITY_INCREASED = "QUANTITY_INCREASED",
|
|
2397
|
+
/** Quantity decreased. */
|
|
2372
2398
|
QUANTITY_DECREASED = "QUANTITY_DECREASED"
|
|
2373
2399
|
}
|
|
2374
2400
|
/** @enumType */
|
|
2375
|
-
type LineItemQuantityChangeTypeWithLiterals = LineItemQuantityChangeType | 'QUANTITY_INCREASED' | 'QUANTITY_DECREASED';
|
|
2401
|
+
type LineItemQuantityChangeTypeWithLiterals = LineItemQuantityChangeType | 'UNKNOWN_LINE_ITEM_QUANTITY_CHANGE_TYPE' | 'QUANTITY_INCREASED' | 'QUANTITY_DECREASED';
|
|
2376
2402
|
interface LineItemQuantityChange {
|
|
2377
2403
|
/**
|
|
2378
2404
|
* Original item quantity before the change.
|
|
@@ -2389,11 +2415,11 @@ interface LineItemQuantityChange {
|
|
|
2389
2415
|
* @min 1
|
|
2390
2416
|
* @max 1000000
|
|
2391
2417
|
*/
|
|
2392
|
-
|
|
2418
|
+
quantityDifference?: number;
|
|
2393
2419
|
/** Direction of the quantity change. */
|
|
2394
2420
|
deltaType?: LineItemQuantityChangeTypeWithLiterals;
|
|
2395
2421
|
}
|
|
2396
|
-
interface
|
|
2422
|
+
interface LineItemSummary {
|
|
2397
2423
|
/**
|
|
2398
2424
|
* Line item ID.
|
|
2399
2425
|
* @format GUID
|
|
@@ -2408,7 +2434,7 @@ interface ManagedLineItem {
|
|
|
2408
2434
|
*/
|
|
2409
2435
|
quantity?: number;
|
|
2410
2436
|
}
|
|
2411
|
-
interface
|
|
2437
|
+
interface DiscountSummary {
|
|
2412
2438
|
/**
|
|
2413
2439
|
* Discount ID.
|
|
2414
2440
|
* @format GUID
|
|
@@ -2431,7 +2457,7 @@ interface TranslatedValue {
|
|
|
2431
2457
|
*/
|
|
2432
2458
|
translated?: string | null;
|
|
2433
2459
|
}
|
|
2434
|
-
interface
|
|
2460
|
+
interface AdditionalFeeSummary {
|
|
2435
2461
|
/**
|
|
2436
2462
|
* Additional fee ID.
|
|
2437
2463
|
* @format GUID
|
|
@@ -2448,8 +2474,32 @@ interface TotalPriceChange {
|
|
|
2448
2474
|
/** Total price after the commit. */
|
|
2449
2475
|
newTotal?: Price;
|
|
2450
2476
|
}
|
|
2477
|
+
declare enum ContractChangeType {
|
|
2478
|
+
/** Unknown change type. */
|
|
2479
|
+
UNKNOWN_CONTRACT_CHANGE_TYPE = "UNKNOWN_CONTRACT_CHANGE_TYPE",
|
|
2480
|
+
/** Line item was modified. */
|
|
2481
|
+
LINE_ITEM_CHANGED = "LINE_ITEM_CHANGED",
|
|
2482
|
+
/** Line item was added to the contract. */
|
|
2483
|
+
LINE_ITEM_ADDED = "LINE_ITEM_ADDED",
|
|
2484
|
+
/** Line item was removed from the contract. */
|
|
2485
|
+
LINE_ITEM_REMOVED = "LINE_ITEM_REMOVED",
|
|
2486
|
+
/** Discount was added to the contract. */
|
|
2487
|
+
DISCOUNT_ADDED = "DISCOUNT_ADDED",
|
|
2488
|
+
/** Discount was removed from the contract. */
|
|
2489
|
+
DISCOUNT_REMOVED = "DISCOUNT_REMOVED",
|
|
2490
|
+
/** Additional fee was added to the contract. */
|
|
2491
|
+
ADDITIONAL_FEE_ADDED = "ADDITIONAL_FEE_ADDED",
|
|
2492
|
+
/** Additional fee was removed from the contract. */
|
|
2493
|
+
ADDITIONAL_FEE_REMOVED = "ADDITIONAL_FEE_REMOVED",
|
|
2494
|
+
/** Total price changed. */
|
|
2495
|
+
TOTAL_PRICE_CHANGED = "TOTAL_PRICE_CHANGED"
|
|
2496
|
+
}
|
|
2497
|
+
/** @enumType */
|
|
2498
|
+
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';
|
|
2451
2499
|
declare enum ActivityType {
|
|
2500
|
+
/** Unknown activity type. */
|
|
2452
2501
|
UNKNOWN_ACTIVITY_TYPE = "UNKNOWN_ACTIVITY_TYPE",
|
|
2502
|
+
/** Changes from a draft subscription contract were committed. */
|
|
2453
2503
|
CHANGES_APPLIED = "CHANGES_APPLIED"
|
|
2454
2504
|
}
|
|
2455
2505
|
/** @enumType */
|
|
@@ -2480,30 +2530,26 @@ interface SubscriptionContractExpired {
|
|
|
2480
2530
|
/** The subscription contract that expired. */
|
|
2481
2531
|
subscriptionContract?: SubscriptionContract;
|
|
2482
2532
|
}
|
|
2483
|
-
/**
|
|
2484
|
-
* ACTION event payload emitted after a successful commit.
|
|
2485
|
-
* Carries the full delta — downstream consumers (email notifications, activity feed)
|
|
2486
|
-
* subscribe to this event and have all details inline without fetching the draft.
|
|
2487
|
-
*/
|
|
2533
|
+
/** Triggered when changes from a draft subscription contract are committed to a subscription contract. */
|
|
2488
2534
|
interface SubscriptionContractChangesCommitted {
|
|
2489
|
-
/**
|
|
2535
|
+
/** Subscription contract after the changes were committed. */
|
|
2490
2536
|
subscriptionContract?: SubscriptionContract;
|
|
2491
2537
|
/**
|
|
2492
|
-
* ID of the
|
|
2538
|
+
* ID of the draft subscription contract whose changes were committed.
|
|
2493
2539
|
* @format GUID
|
|
2494
2540
|
*/
|
|
2495
2541
|
draftSubscriptionContractId?: string;
|
|
2496
|
-
/**
|
|
2542
|
+
/** Changes that were applied to the subscription contract. */
|
|
2497
2543
|
changes?: SubscriptionContractDiffs;
|
|
2498
2544
|
/**
|
|
2499
2545
|
* Date and time the changes were committed.
|
|
2500
2546
|
* @readonly
|
|
2501
2547
|
*/
|
|
2502
2548
|
commitDate?: Date | null;
|
|
2503
|
-
/**
|
|
2549
|
+
/** Notification settings specified when the changes were committed. */
|
|
2504
2550
|
commitSettings?: SubscriptionCommitSettings;
|
|
2505
2551
|
/**
|
|
2506
|
-
* Reason for the
|
|
2552
|
+
* Reason for the change, provided by the business.
|
|
2507
2553
|
* @maxLength 200
|
|
2508
2554
|
*/
|
|
2509
2555
|
reason?: string | null;
|
|
@@ -2512,209 +2558,224 @@ interface SubscriptionContractChangesCommitted {
|
|
|
2512
2558
|
}
|
|
2513
2559
|
interface SubscriptionContractDiffs {
|
|
2514
2560
|
/**
|
|
2515
|
-
*
|
|
2561
|
+
* Line items that were added, changed, or removed.
|
|
2562
|
+
*
|
|
2563
|
+
* A line item is `CHANGED` when a field listed in `ItemChangedDetails` changed. Line items with no change aren't included.
|
|
2516
2564
|
* @maxSize 100
|
|
2517
2565
|
*/
|
|
2518
2566
|
lineItems?: LineItemDelta[];
|
|
2519
2567
|
/**
|
|
2520
|
-
*
|
|
2568
|
+
* Discounts that were added, changed, or removed.
|
|
2569
|
+
*
|
|
2570
|
+
* 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.
|
|
2521
2571
|
* @maxSize 100
|
|
2522
2572
|
*/
|
|
2523
2573
|
appliedDiscounts?: AppliedDiscountDelta[];
|
|
2524
2574
|
/**
|
|
2525
|
-
*
|
|
2575
|
+
* Additional fees that were added, changed, or removed.
|
|
2576
|
+
*
|
|
2577
|
+
* An additional fee is `CHANGED` when its price or the line items it applies to changed. Fees with no change aren't included.
|
|
2526
2578
|
* @maxSize 100
|
|
2527
2579
|
*/
|
|
2528
2580
|
additionalFees?: AdditionalFeeDelta[];
|
|
2529
|
-
/**
|
|
2581
|
+
/** Price summary after the changes. Replaces the subscription contract's previous price summary. */
|
|
2530
2582
|
priceSummary?: PriceSummary;
|
|
2531
|
-
/**
|
|
2583
|
+
/** Tax information after the changes. Replaces the subscription contract's previous tax information. */
|
|
2532
2584
|
taxInfo?: OrderTaxInfo;
|
|
2585
|
+
/** Shipping information after the changes. Replaces the subscription contract's previous shipping information. */
|
|
2586
|
+
shippingInfo?: ShippingInformation;
|
|
2533
2587
|
}
|
|
2534
2588
|
interface LineItemDelta extends LineItemDeltaDeltaDetailsOneOf {
|
|
2589
|
+
/** Values the line item had before the change. */
|
|
2535
2590
|
changed?: ItemChangedDetails;
|
|
2536
2591
|
/**
|
|
2537
2592
|
* Line item ID.
|
|
2538
2593
|
* @format GUID
|
|
2539
2594
|
*/
|
|
2540
2595
|
lineItemId?: string;
|
|
2541
|
-
/**
|
|
2596
|
+
/** Line item content. For a removed line item, the line item that was removed. */
|
|
2542
2597
|
lineItem?: OrderLineItem;
|
|
2543
2598
|
/** Type of change applied to this line item. */
|
|
2544
2599
|
changeType?: ChangeTypeWithLiterals;
|
|
2545
2600
|
}
|
|
2546
2601
|
/** @oneof */
|
|
2547
2602
|
interface LineItemDeltaDeltaDetailsOneOf {
|
|
2603
|
+
/** Values the line item had before the change. */
|
|
2548
2604
|
changed?: ItemChangedDetails;
|
|
2549
2605
|
}
|
|
2550
|
-
/**
|
|
2606
|
+
/** The catalog reference options before the change. */
|
|
2551
2607
|
interface CatalogReferenceOptionsBeforeChange {
|
|
2552
|
-
/**
|
|
2608
|
+
/** The catalog reference options. Absent when the line item had no options. */
|
|
2553
2609
|
options?: Record<string, any> | null;
|
|
2554
2610
|
}
|
|
2555
|
-
/**
|
|
2611
|
+
/** The product name before the change. */
|
|
2556
2612
|
interface ProductNameBeforeChange {
|
|
2557
|
-
/**
|
|
2613
|
+
/** The product name. Absent when the line item had no product name. */
|
|
2558
2614
|
productName?: ProductName;
|
|
2559
2615
|
}
|
|
2560
|
-
/**
|
|
2616
|
+
/** The description lines before the change. */
|
|
2561
2617
|
interface DescriptionLinesBeforeChange {
|
|
2562
2618
|
/**
|
|
2563
|
-
*
|
|
2619
|
+
* The description lines. Empty when the line item had no description lines.
|
|
2564
2620
|
* @maxSize 20
|
|
2565
2621
|
*/
|
|
2566
2622
|
descriptionLines?: DescriptionLine[];
|
|
2567
2623
|
}
|
|
2568
|
-
/**
|
|
2624
|
+
/** The image before the change. */
|
|
2569
2625
|
interface ImageBeforeChange {
|
|
2570
|
-
/**
|
|
2626
|
+
/** The image. Absent when the line item had no image. */
|
|
2571
2627
|
image?: string;
|
|
2572
2628
|
}
|
|
2573
|
-
/**
|
|
2629
|
+
/** The physical properties before the change. */
|
|
2574
2630
|
interface PhysicalPropertiesBeforeChange {
|
|
2575
|
-
/**
|
|
2631
|
+
/** The physical properties. Absent when the line item had no physical properties. */
|
|
2576
2632
|
physicalProperties?: PhysicalProperties;
|
|
2577
2633
|
}
|
|
2578
|
-
/**
|
|
2634
|
+
/** The item type before the change. */
|
|
2579
2635
|
interface ItemTypeBeforeChange {
|
|
2580
|
-
/**
|
|
2636
|
+
/** The item type. Absent when the line item had no item type. */
|
|
2581
2637
|
itemType?: ItemType;
|
|
2582
2638
|
}
|
|
2583
|
-
/**
|
|
2639
|
+
/** The fulfiller ID before the change. */
|
|
2584
2640
|
interface FulfillerIdBeforeChange {
|
|
2585
2641
|
/**
|
|
2586
|
-
*
|
|
2642
|
+
* The fulfiller ID. Absent when the line item had no fulfiller.
|
|
2587
2643
|
* @format GUID
|
|
2588
2644
|
*/
|
|
2589
2645
|
fulfillerId?: string | null;
|
|
2590
2646
|
}
|
|
2591
|
-
/**
|
|
2647
|
+
/** The digital file before the change. */
|
|
2592
2648
|
interface DigitalFileBeforeChange {
|
|
2593
|
-
/**
|
|
2649
|
+
/** The digital file. Absent when the line item had no digital file. */
|
|
2594
2650
|
digitalFile?: DigitalFile;
|
|
2595
2651
|
}
|
|
2596
|
-
/**
|
|
2652
|
+
/** The price description before the change. */
|
|
2597
2653
|
interface PriceDescriptionBeforeChange {
|
|
2598
|
-
/**
|
|
2654
|
+
/** The price description. Absent when the line item had no price description. */
|
|
2599
2655
|
priceDescription?: PriceDescription;
|
|
2600
2656
|
}
|
|
2601
|
-
/**
|
|
2657
|
+
/** The delivery profile ID before the change. */
|
|
2602
2658
|
interface DeliveryProfileIdBeforeChange {
|
|
2603
2659
|
/**
|
|
2604
|
-
*
|
|
2660
|
+
* The delivery profile ID. Absent when the line item had no delivery profile.
|
|
2605
2661
|
* @format GUID
|
|
2606
2662
|
*/
|
|
2607
2663
|
deliveryProfileId?: string | null;
|
|
2608
2664
|
}
|
|
2609
|
-
/**
|
|
2665
|
+
/** The shipping group ID before the change. */
|
|
2610
2666
|
interface ShippingGroupIdBeforeChange {
|
|
2611
2667
|
/**
|
|
2612
|
-
*
|
|
2668
|
+
* The shipping group ID. Absent when the line item had no shipping group.
|
|
2613
2669
|
* @format GUID
|
|
2614
2670
|
*/
|
|
2615
2671
|
shippingGroupId?: string | null;
|
|
2616
2672
|
}
|
|
2617
|
-
/**
|
|
2673
|
+
/** The tax info before the change. */
|
|
2618
2674
|
interface TaxInfoBeforeChange {
|
|
2619
|
-
/**
|
|
2675
|
+
/** The tax info. Absent when the line item had no tax info. */
|
|
2620
2676
|
taxInfo?: LineItemTaxInfo;
|
|
2621
2677
|
}
|
|
2622
|
-
/**
|
|
2678
|
+
/** The inventory app ID before the change. */
|
|
2623
2679
|
interface InventoryAppIdBeforeChange {
|
|
2624
2680
|
/**
|
|
2625
|
-
*
|
|
2681
|
+
* The inventory app ID. Absent when the line item had no inventory app.
|
|
2626
2682
|
* @format GUID
|
|
2627
2683
|
*/
|
|
2628
2684
|
inventoryAppId?: string | null;
|
|
2629
2685
|
}
|
|
2630
|
-
/**
|
|
2686
|
+
/** The root catalog item ID before the change. */
|
|
2631
2687
|
interface RootCatalogItemIdBeforeChange {
|
|
2632
2688
|
/**
|
|
2633
|
-
*
|
|
2689
|
+
* The root catalog item ID. Absent when the line item had no root catalog item.
|
|
2634
2690
|
* @minLength 1
|
|
2635
2691
|
* @maxLength 36
|
|
2636
2692
|
*/
|
|
2637
2693
|
rootCatalogItemId?: string | null;
|
|
2638
2694
|
}
|
|
2639
|
-
/**
|
|
2695
|
+
/** The modifier groups before the change. */
|
|
2640
2696
|
interface ModifierGroupsBeforeChange {
|
|
2641
2697
|
/**
|
|
2642
|
-
*
|
|
2698
|
+
* The modifier groups. Empty when the line item had no modifier groups.
|
|
2643
2699
|
* @maxSize 10
|
|
2644
2700
|
*/
|
|
2645
2701
|
modifierGroups?: ModifierGroup[];
|
|
2646
2702
|
}
|
|
2647
|
-
/**
|
|
2703
|
+
/** The price undetermined flag before the change. */
|
|
2648
2704
|
interface PriceUndeterminedBeforeChange {
|
|
2649
|
-
/**
|
|
2705
|
+
/** Whether the price of the line item was undetermined. */
|
|
2650
2706
|
priceUndetermined?: boolean;
|
|
2651
2707
|
}
|
|
2652
|
-
/**
|
|
2708
|
+
/** Type of change to a line item, discount, or additional fee. */
|
|
2653
2709
|
declare enum ChangeType {
|
|
2710
|
+
/** Unknown change type. */
|
|
2654
2711
|
UNKNOWN_CHANGE_TYPE = "UNKNOWN_CHANGE_TYPE",
|
|
2655
|
-
/**
|
|
2712
|
+
/** The line item, discount, or additional fee was added to the subscription contract. */
|
|
2656
2713
|
ADDED = "ADDED",
|
|
2657
|
-
/**
|
|
2714
|
+
/** The line item, discount, or additional fee was changed. */
|
|
2658
2715
|
CHANGED = "CHANGED",
|
|
2659
|
-
/**
|
|
2716
|
+
/** The line item, discount, or additional fee was removed from the subscription contract. */
|
|
2660
2717
|
REMOVED = "REMOVED"
|
|
2661
2718
|
}
|
|
2662
2719
|
/** @enumType */
|
|
2663
2720
|
type ChangeTypeWithLiterals = ChangeType | 'UNKNOWN_CHANGE_TYPE' | 'ADDED' | 'CHANGED' | 'REMOVED';
|
|
2664
2721
|
interface ItemChangedDetails {
|
|
2665
2722
|
/**
|
|
2666
|
-
* The quantity before the change.
|
|
2723
|
+
* The quantity before the change. Set only when the quantity changed.
|
|
2667
2724
|
* @min 1
|
|
2668
2725
|
* @max 1000000
|
|
2669
2726
|
*/
|
|
2670
2727
|
quantityBeforeChange?: number | null;
|
|
2671
|
-
/** The price before the change. */
|
|
2728
|
+
/** The price before the change. Set only when the price changed. */
|
|
2672
2729
|
priceBeforeChange?: Price;
|
|
2673
|
-
/**
|
|
2730
|
+
/** The catalog reference options before the change. Set only when the catalog reference options changed. */
|
|
2674
2731
|
catalogReferenceOptionsBeforeChange?: CatalogReferenceOptionsBeforeChange;
|
|
2675
|
-
/**
|
|
2732
|
+
/** The product name before the change. Set only when the product name changed. */
|
|
2676
2733
|
productNameBeforeChange?: ProductNameBeforeChange;
|
|
2677
|
-
/**
|
|
2734
|
+
/** The description lines before the change. Set only when the description lines changed. */
|
|
2678
2735
|
descriptionLinesBeforeChange?: DescriptionLinesBeforeChange;
|
|
2679
|
-
/**
|
|
2736
|
+
/** The image before the change. Set only when the image changed. */
|
|
2680
2737
|
imageBeforeChange?: ImageBeforeChange;
|
|
2681
|
-
/**
|
|
2738
|
+
/** The physical properties before the change. Set only when the physical properties changed. */
|
|
2682
2739
|
physicalPropertiesBeforeChange?: PhysicalPropertiesBeforeChange;
|
|
2683
|
-
/**
|
|
2740
|
+
/** The item type before the change. Set only when the item type changed. */
|
|
2684
2741
|
itemTypeBeforeChange?: ItemTypeBeforeChange;
|
|
2685
|
-
/**
|
|
2742
|
+
/** The fulfiller ID before the change. Set only when the fulfiller ID changed. */
|
|
2686
2743
|
fulfillerIdBeforeChange?: FulfillerIdBeforeChange;
|
|
2687
|
-
/**
|
|
2744
|
+
/** The digital file before the change. Set only when the digital file changed. */
|
|
2688
2745
|
digitalFileBeforeChange?: DigitalFileBeforeChange;
|
|
2689
|
-
/**
|
|
2746
|
+
/** The price description before the change. Set only when the price description changed. */
|
|
2690
2747
|
priceDescriptionBeforeChange?: PriceDescriptionBeforeChange;
|
|
2691
2748
|
/**
|
|
2692
|
-
*
|
|
2749
|
+
* The delivery profile ID before the change. Set only when the delivery profile ID changed.
|
|
2693
2750
|
* @internal
|
|
2694
2751
|
*/
|
|
2695
2752
|
deliveryProfileIdBeforeChange?: DeliveryProfileIdBeforeChange;
|
|
2696
2753
|
/**
|
|
2697
|
-
*
|
|
2754
|
+
* The shipping group ID before the change. Set only when the shipping group ID changed.
|
|
2698
2755
|
* @internal
|
|
2699
2756
|
*/
|
|
2700
2757
|
shippingGroupIdBeforeChange?: ShippingGroupIdBeforeChange;
|
|
2701
|
-
/**
|
|
2758
|
+
/** The tax info before the change. Set only when the line item's tax group changed because its catalog options changed. */
|
|
2702
2759
|
taxInfoBeforeChange?: TaxInfoBeforeChange;
|
|
2703
|
-
/**
|
|
2760
|
+
/**
|
|
2761
|
+
* The inventory app ID before the change. Set only when the inventory app ID changed.
|
|
2762
|
+
* @internal
|
|
2763
|
+
*/
|
|
2704
2764
|
inventoryAppIdBeforeChange?: InventoryAppIdBeforeChange;
|
|
2705
2765
|
/**
|
|
2706
|
-
*
|
|
2766
|
+
* The root catalog item ID before the change. Set only when the root catalog item ID changed.
|
|
2707
2767
|
* @internal
|
|
2708
2768
|
*/
|
|
2709
2769
|
rootCatalogItemIdBeforeChange?: RootCatalogItemIdBeforeChange;
|
|
2710
|
-
/**
|
|
2770
|
+
/** The modifier groups before the change. Set only when the modifier groups changed. */
|
|
2711
2771
|
modifierGroupsBeforeChange?: ModifierGroupsBeforeChange;
|
|
2712
|
-
/**
|
|
2772
|
+
/** The price undetermined flag before the change. Set only when the price undetermined flag changed. */
|
|
2713
2773
|
priceUndeterminedBeforeChange?: PriceUndeterminedBeforeChange;
|
|
2714
2774
|
}
|
|
2715
2775
|
interface AppliedDiscountDelta extends AppliedDiscountDeltaDeltaDetailsOneOf {
|
|
2716
2776
|
/** Discount content after the change. */
|
|
2717
2777
|
changed?: AppliedDiscount;
|
|
2778
|
+
/** Discount that was added. */
|
|
2718
2779
|
added?: AppliedDiscount;
|
|
2719
2780
|
/**
|
|
2720
2781
|
* Discount ID.
|
|
@@ -2728,11 +2789,13 @@ interface AppliedDiscountDelta extends AppliedDiscountDeltaDeltaDetailsOneOf {
|
|
|
2728
2789
|
interface AppliedDiscountDeltaDeltaDetailsOneOf {
|
|
2729
2790
|
/** Discount content after the change. */
|
|
2730
2791
|
changed?: AppliedDiscount;
|
|
2792
|
+
/** Discount that was added. */
|
|
2731
2793
|
added?: AppliedDiscount;
|
|
2732
2794
|
}
|
|
2733
2795
|
interface AdditionalFeeDelta extends AdditionalFeeDeltaDeltaDetailsOneOf {
|
|
2734
2796
|
/** Additional fee content after the change. */
|
|
2735
2797
|
changed?: AdditionalFee;
|
|
2798
|
+
/** Additional fee that was added. */
|
|
2736
2799
|
added?: AdditionalFee;
|
|
2737
2800
|
/**
|
|
2738
2801
|
* Additional fee ID.
|
|
@@ -2746,12 +2809,21 @@ interface AdditionalFeeDelta extends AdditionalFeeDeltaDeltaDetailsOneOf {
|
|
|
2746
2809
|
interface AdditionalFeeDeltaDeltaDetailsOneOf {
|
|
2747
2810
|
/** Additional fee content after the change. */
|
|
2748
2811
|
changed?: AdditionalFee;
|
|
2812
|
+
/** Additional fee that was added. */
|
|
2749
2813
|
added?: AdditionalFee;
|
|
2750
2814
|
}
|
|
2751
2815
|
interface SubscriptionCommitSettings {
|
|
2752
|
-
/**
|
|
2816
|
+
/**
|
|
2817
|
+
* Whether to send the buyer a notification about the committed changes.
|
|
2818
|
+
*
|
|
2819
|
+
* Default: `true`
|
|
2820
|
+
*/
|
|
2753
2821
|
sendNotificationsToBuyer?: boolean | null;
|
|
2754
|
-
/**
|
|
2822
|
+
/**
|
|
2823
|
+
* Whether to send the business a notification about the committed changes.
|
|
2824
|
+
*
|
|
2825
|
+
* Default: `true`
|
|
2826
|
+
*/
|
|
2755
2827
|
sendNotificationsToBusiness?: boolean | null;
|
|
2756
2828
|
}
|
|
2757
2829
|
/** Triggered when a subscription contract's next charge is coming up. */
|
|
@@ -2782,13 +2854,13 @@ interface CreateSubscriptionContractResponse {
|
|
|
2782
2854
|
}
|
|
2783
2855
|
interface GetSubscriptionContractRequest {
|
|
2784
2856
|
/**
|
|
2785
|
-
* ID of the
|
|
2857
|
+
* ID of the subscription contract to retrieve.
|
|
2786
2858
|
* @format GUID
|
|
2787
2859
|
*/
|
|
2788
2860
|
subscriptionContractId: string;
|
|
2789
2861
|
}
|
|
2790
2862
|
interface GetSubscriptionContractResponse {
|
|
2791
|
-
/**
|
|
2863
|
+
/** Retrieved subscription contract. */
|
|
2792
2864
|
subscriptionContract?: SubscriptionContract;
|
|
2793
2865
|
}
|
|
2794
2866
|
interface UpdateSubscriptionContractRequest {
|
|
@@ -2807,26 +2879,24 @@ interface UpdateSubscriptionContractResponse {
|
|
|
2807
2879
|
subscriptionContract?: SubscriptionContract;
|
|
2808
2880
|
}
|
|
2809
2881
|
interface QuerySubscriptionContractsRequest {
|
|
2810
|
-
/**
|
|
2882
|
+
/** Filter, sort, and paging options for the query. */
|
|
2811
2883
|
query?: CursorQuery;
|
|
2812
2884
|
}
|
|
2813
2885
|
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
2814
2886
|
/** 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`. */
|
|
2815
2887
|
cursorPaging?: CursorPaging;
|
|
2816
2888
|
/**
|
|
2817
|
-
* Filter object
|
|
2818
|
-
*
|
|
2819
|
-
*
|
|
2820
|
-
*
|
|
2821
|
-
* }`
|
|
2822
|
-
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
2823
|
-
* Learn more about the [filter format](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
2889
|
+
* 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.
|
|
2890
|
+
*
|
|
2891
|
+
* Supported properties:
|
|
2892
|
+
* `id`, `buyerInfo.contactId`
|
|
2824
2893
|
*/
|
|
2825
2894
|
filter?: Record<string, any> | null;
|
|
2826
2895
|
/**
|
|
2827
2896
|
* Sort object in the following format:
|
|
2828
2897
|
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
2829
|
-
*
|
|
2898
|
+
*
|
|
2899
|
+
* Learn more about [sorting](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging).
|
|
2830
2900
|
* @maxSize 5
|
|
2831
2901
|
*/
|
|
2832
2902
|
sort?: Sorting[];
|
|
@@ -2838,11 +2908,18 @@ interface CursorQueryPagingMethodOneOf {
|
|
|
2838
2908
|
}
|
|
2839
2909
|
interface Sorting {
|
|
2840
2910
|
/**
|
|
2841
|
-
*
|
|
2911
|
+
* Field to sort by.
|
|
2912
|
+
*
|
|
2913
|
+
* Supported properties:
|
|
2914
|
+
* `id`, `buyerInfo.contactId`
|
|
2842
2915
|
* @maxLength 512
|
|
2843
2916
|
*/
|
|
2844
2917
|
fieldName?: string;
|
|
2845
|
-
/**
|
|
2918
|
+
/**
|
|
2919
|
+
* Sort order. Use `ASC` for ascending order or `DESC` for descending order.
|
|
2920
|
+
*
|
|
2921
|
+
* Default: `ASC`
|
|
2922
|
+
*/
|
|
2846
2923
|
order?: SortOrderWithLiterals;
|
|
2847
2924
|
}
|
|
2848
2925
|
declare enum SortOrder {
|
|
@@ -2867,9 +2944,9 @@ interface CursorPaging {
|
|
|
2867
2944
|
cursor?: string | null;
|
|
2868
2945
|
}
|
|
2869
2946
|
interface QuerySubscriptionContractsResponse {
|
|
2870
|
-
/**
|
|
2947
|
+
/** Retrieved subscription contracts. */
|
|
2871
2948
|
subscriptionContracts?: SubscriptionContract[];
|
|
2872
|
-
/** Paging metadata */
|
|
2949
|
+
/** Paging metadata. */
|
|
2873
2950
|
pagingMetadata?: CursorPagingMetadata;
|
|
2874
2951
|
}
|
|
2875
2952
|
interface CursorPagingMetadata {
|
|
@@ -3175,6 +3252,12 @@ interface AccountInfo {
|
|
|
3175
3252
|
*/
|
|
3176
3253
|
siteId?: string | null;
|
|
3177
3254
|
}
|
|
3255
|
+
/** @docsIgnore */
|
|
3256
|
+
type GetSubscriptionContractApplicationErrors = {
|
|
3257
|
+
code?: 'NOT_FOUND';
|
|
3258
|
+
description?: string;
|
|
3259
|
+
data?: Record<string, any>;
|
|
3260
|
+
};
|
|
3178
3261
|
interface BaseEventMetadata {
|
|
3179
3262
|
/**
|
|
3180
3263
|
* App instance ID.
|
|
@@ -3230,11 +3313,35 @@ interface AccountInfoMetadata {
|
|
|
3230
3313
|
/** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */
|
|
3231
3314
|
parentAccountId?: string;
|
|
3232
3315
|
}
|
|
3316
|
+
interface SubscriptionContractCommittedEnvelope {
|
|
3317
|
+
data: SubscriptionContractChangesCommitted;
|
|
3318
|
+
metadata: EventMetadata;
|
|
3319
|
+
}
|
|
3320
|
+
/**
|
|
3321
|
+
* Triggered when changes from a draft subscription contract are committed to a subscription contract.
|
|
3322
|
+
* The event holds the updated contract and every change that was applied.
|
|
3323
|
+
* @permissionScope Manage Stores - all permissions
|
|
3324
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3325
|
+
* @permissionScope Read eCommerce - all read permissions
|
|
3326
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
3327
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3328
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3329
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3330
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3331
|
+
* @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
|
|
3332
|
+
* @webhook
|
|
3333
|
+
* @eventType wix.ecom.subscription_contracts.v1.subscription_contract_committed
|
|
3334
|
+
* @slug committed
|
|
3335
|
+
* @documentationMaturity preview
|
|
3336
|
+
*/
|
|
3337
|
+
declare function onSubscriptionContractCommitted(handler: (event: SubscriptionContractCommittedEnvelope) => void | Promise<void>): void;
|
|
3233
3338
|
interface SubscriptionContractCreatedEnvelope {
|
|
3234
3339
|
entity: SubscriptionContract;
|
|
3235
3340
|
metadata: EventMetadata;
|
|
3236
3341
|
}
|
|
3237
|
-
/**
|
|
3342
|
+
/**
|
|
3343
|
+
* Triggered when a subscription contract is created. A subscription contract is created when a buyer checks out with a subscription item.
|
|
3344
|
+
* @permissionScope Manage Stores - all permissions
|
|
3238
3345
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3239
3346
|
* @permissionScope Read eCommerce - all read permissions
|
|
3240
3347
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
@@ -3252,7 +3359,9 @@ declare function onSubscriptionContractCreated(handler: (event: SubscriptionCont
|
|
|
3252
3359
|
interface SubscriptionContractDeletedEnvelope {
|
|
3253
3360
|
metadata: EventMetadata;
|
|
3254
3361
|
}
|
|
3255
|
-
/**
|
|
3362
|
+
/**
|
|
3363
|
+
* 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.
|
|
3364
|
+
* @permissionScope Manage Stores - all permissions
|
|
3256
3365
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3257
3366
|
* @permissionScope Read eCommerce - all read permissions
|
|
3258
3367
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
@@ -3273,7 +3382,11 @@ interface SubscriptionContractUpdatedEnvelope {
|
|
|
3273
3382
|
/** @hidden */
|
|
3274
3383
|
modifiedFields: Record<string, any>;
|
|
3275
3384
|
}
|
|
3276
|
-
/**
|
|
3385
|
+
/**
|
|
3386
|
+
* Triggered when a subscription contract is updated.
|
|
3387
|
+
* 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.
|
|
3388
|
+
* 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.
|
|
3389
|
+
* @permissionScope Manage Stores - all permissions
|
|
3277
3390
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3278
3391
|
* @permissionScope Read eCommerce - all read permissions
|
|
3279
3392
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
@@ -3289,26 +3402,36 @@ interface SubscriptionContractUpdatedEnvelope {
|
|
|
3289
3402
|
*/
|
|
3290
3403
|
declare function onSubscriptionContractUpdated(handler: (event: SubscriptionContractUpdatedEnvelope) => void | Promise<void>): void;
|
|
3291
3404
|
/**
|
|
3292
|
-
* Retrieves a
|
|
3293
|
-
*
|
|
3405
|
+
* Retrieves a subscription contract.
|
|
3406
|
+
*
|
|
3407
|
+
*
|
|
3408
|
+
* 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).
|
|
3409
|
+
*
|
|
3410
|
+
* 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`.
|
|
3411
|
+
* @param subscriptionContractId - ID of the subscription contract to retrieve.
|
|
3294
3412
|
* @public
|
|
3295
3413
|
* @documentationMaturity preview
|
|
3296
3414
|
* @requiredField subscriptionContractId
|
|
3297
3415
|
* @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
|
|
3298
3416
|
* @applicableIdentity APP
|
|
3299
|
-
* @returns
|
|
3417
|
+
* @returns Retrieved subscription contract.
|
|
3300
3418
|
* @fqn wix.ecom.subscription_contracts.v1.SubscriptionContracts.GetSubscriptionContract
|
|
3301
3419
|
*/
|
|
3302
|
-
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` | `
|
|
3420
|
+
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> & {
|
|
3421
|
+
__applicationErrorsType?: GetSubscriptionContractApplicationErrors;
|
|
3422
|
+
}>;
|
|
3303
3423
|
/**
|
|
3304
|
-
* Retrieves a list of
|
|
3424
|
+
* Retrieves a list of up to 100 subscription contracts, given the provided paging, filtering, and sorting.
|
|
3425
|
+
*
|
|
3426
|
+
*
|
|
3427
|
+
* Query Subscription Contracts runs with these defaults, which you can override:
|
|
3305
3428
|
*
|
|
3306
|
-
*
|
|
3429
|
+
* - `id` is sorted in `ASC` order
|
|
3430
|
+
* - `cursorPaging.limit` is `50`
|
|
3307
3431
|
*
|
|
3308
|
-
*
|
|
3432
|
+
* 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`.
|
|
3309
3433
|
*
|
|
3310
|
-
* [
|
|
3311
|
-
* [2]: https://dev.wix.com/api/rest/getting-started/api-query-language
|
|
3434
|
+
* 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).
|
|
3312
3435
|
* @public
|
|
3313
3436
|
* @documentationMaturity preview
|
|
3314
3437
|
* @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
|
|
@@ -3393,7 +3516,7 @@ interface SubscriptionContractsQueryBuilder {
|
|
|
3393
3516
|
* @fqn wix.ecom.subscription_contracts.v1.SubscriptionContracts.QuerySubscriptionContracts
|
|
3394
3517
|
* @requiredField query
|
|
3395
3518
|
*/
|
|
3396
|
-
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>>;
|
|
3519
|
+
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>>;
|
|
3397
3520
|
interface SubscriptionContractQuerySpec extends QuerySpec {
|
|
3398
3521
|
paging: 'cursor';
|
|
3399
3522
|
wql: [
|
|
@@ -3425,29 +3548,32 @@ type SubscriptionContractQuery = {
|
|
|
3425
3548
|
cursor?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor'] | null;
|
|
3426
3549
|
};
|
|
3427
3550
|
/**
|
|
3428
|
-
Filter object
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
}`
|
|
3433
|
-
Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
3434
|
-
Learn more about the [filter format](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
3551
|
+
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.
|
|
3552
|
+
|
|
3553
|
+
Supported properties:
|
|
3554
|
+
`id`, `buyerInfo.contactId`
|
|
3435
3555
|
*/
|
|
3436
3556
|
filter?: CommonQueryWithEntityContext['filter'] | null;
|
|
3437
3557
|
/**
|
|
3438
3558
|
Sort object in the following format:
|
|
3439
3559
|
`[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
3440
|
-
|
|
3560
|
+
|
|
3561
|
+
Learn more about [sorting](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging).
|
|
3441
3562
|
@maxSize: 5
|
|
3442
3563
|
*/
|
|
3443
3564
|
sort?: {
|
|
3444
3565
|
/**
|
|
3445
|
-
|
|
3566
|
+
Field to sort by.
|
|
3567
|
+
|
|
3568
|
+
Supported properties:
|
|
3569
|
+
`id`, `buyerInfo.contactId`
|
|
3446
3570
|
@maxLength: 512
|
|
3447
3571
|
*/
|
|
3448
3572
|
fieldName?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['fieldName'];
|
|
3449
3573
|
/**
|
|
3450
|
-
Sort order.
|
|
3574
|
+
Sort order. Use `ASC` for ascending order or `DESC` for descending order.
|
|
3575
|
+
|
|
3576
|
+
Default: `ASC`
|
|
3451
3577
|
*/
|
|
3452
3578
|
order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
|
|
3453
3579
|
}[];
|
|
@@ -3456,4 +3582,4 @@ declare const utils: {
|
|
|
3456
3582
|
query: _wix_sdk_types.QueryHelpers<SubscriptionContract, SubscriptionContractQuerySpec, SubscriptionContractQuery>;
|
|
3457
3583
|
};
|
|
3458
3584
|
|
|
3459
|
-
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
|
|
3585
|
+
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, 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 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, 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 };
|