@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;
|
|
@@ -40,10 +38,24 @@ interface SubscriptionContract {
|
|
|
40
38
|
* @targetRemovalDate 2025-10-01
|
|
41
39
|
*/
|
|
42
40
|
description?: string | null;
|
|
43
|
-
/**
|
|
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
|
-
*
|
|
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.
|
|
55
|
-
*
|
|
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
|
-
/**
|
|
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
|
|
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
|
|
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
|
-
*
|
|
94
|
+
* Price summary of a single billing cycle.
|
|
78
95
|
* @readonly
|
|
79
96
|
*/
|
|
80
97
|
priceSummary?: PriceSummary;
|
|
81
|
-
/**
|
|
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
|
|
106
|
+
/** Shipping information and selected shipping option details. */
|
|
86
107
|
shippingInfo?: ShippingInformation;
|
|
87
108
|
/**
|
|
88
|
-
*
|
|
109
|
+
* Discounts applied to the subscription contract.
|
|
89
110
|
* @maxSize 100
|
|
90
111
|
*/
|
|
91
112
|
appliedDiscounts?: AppliedDiscount[];
|
|
92
|
-
/** Information about the sales channel
|
|
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
|
-
*
|
|
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/
|
|
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
|
-
*
|
|
123
|
-
*
|
|
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
|
-
|
|
147
|
+
subscriptionTitle?: V1SubscriptionTitle;
|
|
126
148
|
/**
|
|
127
|
-
*
|
|
128
|
-
* @
|
|
129
|
-
* @maxSize 500
|
|
149
|
+
* Additional fees applied to the subscription contract.
|
|
150
|
+
* @maxSize 100
|
|
130
151
|
*/
|
|
131
|
-
|
|
152
|
+
additionalFees?: AdditionalFee[];
|
|
132
153
|
}
|
|
133
154
|
interface V1SubscriptionDescription {
|
|
134
155
|
/**
|
|
135
|
-
* Subscription
|
|
156
|
+
* Subscription description in the site's default language.
|
|
136
157
|
* @maxLength 500
|
|
137
158
|
*/
|
|
138
159
|
original?: string;
|
|
139
160
|
/**
|
|
140
|
-
*
|
|
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
|
|
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
|
|
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.
|
|
178
|
+
* Number of billing cycles before the subscription ends.
|
|
158
179
|
* @min 1
|
|
159
180
|
*/
|
|
160
181
|
billingCycles?: number | null;
|
|
161
|
-
/** Whether
|
|
182
|
+
/** Whether the buyer can cancel the subscription. */
|
|
162
183
|
enableCustomerCancellation?: boolean;
|
|
163
|
-
/**
|
|
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
|
|
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.
|
|
@@ -1779,15 +1804,13 @@ interface CustomField {
|
|
|
1779
1804
|
}
|
|
1780
1805
|
interface V1SubscriptionTitle {
|
|
1781
1806
|
/**
|
|
1782
|
-
* Subscription
|
|
1807
|
+
* Subscription title in the site's default language.
|
|
1783
1808
|
* @minLength 1
|
|
1784
1809
|
* @maxLength 150
|
|
1785
1810
|
*/
|
|
1786
1811
|
original?: string;
|
|
1787
1812
|
/**
|
|
1788
|
-
* Subscription
|
|
1789
|
-
*
|
|
1790
|
-
* Default: Same as `original`.
|
|
1813
|
+
* Subscription title translated into the buyer's language.
|
|
1791
1814
|
* @minLength 1
|
|
1792
1815
|
* @maxLength 150
|
|
1793
1816
|
*/
|
|
@@ -1890,7 +1913,7 @@ declare enum SpecificItemsCouponBehavior {
|
|
|
1890
1913
|
/** @enumType */
|
|
1891
1914
|
type SpecificItemsCouponBehaviorWithLiterals = SpecificItemsCouponBehavior | 'UNDEFINED_COUPON_BEHAVIOR' | 'ITEM_SUBTOTAL_INCLUDES_DISCOUNT' | 'LEGACY_ITEM_SUBTOTAL_DOES_NOT_INCLUDE_DISCOUNT';
|
|
1892
1915
|
interface SubscriptionContractActivity extends SubscriptionContractActivityTargetOneOf, SubscriptionContractActivityContentOneOf {
|
|
1893
|
-
/**
|
|
1916
|
+
/** The activity applies to all future billing cycles of the subscription contract. */
|
|
1894
1917
|
contractTarget?: ContractTarget;
|
|
1895
1918
|
/** Changes committed from a DraftSubscriptionContract. */
|
|
1896
1919
|
changesApplied?: ChangesAppliedActivity;
|
|
@@ -1901,12 +1924,12 @@ interface SubscriptionContractActivity extends SubscriptionContractActivityTarge
|
|
|
1901
1924
|
*/
|
|
1902
1925
|
_id?: string;
|
|
1903
1926
|
/**
|
|
1904
|
-
*
|
|
1927
|
+
* Date and time the activity occurred.
|
|
1905
1928
|
* @readonly
|
|
1906
1929
|
*/
|
|
1907
1930
|
_createdDate?: Date | null;
|
|
1908
1931
|
/**
|
|
1909
|
-
*
|
|
1932
|
+
* Wix user or app that made the change.
|
|
1910
1933
|
* @readonly
|
|
1911
1934
|
*/
|
|
1912
1935
|
author?: ActivityAuthor;
|
|
@@ -1915,7 +1938,7 @@ interface SubscriptionContractActivity extends SubscriptionContractActivityTarge
|
|
|
1915
1938
|
}
|
|
1916
1939
|
/** @oneof */
|
|
1917
1940
|
interface SubscriptionContractActivityTargetOneOf {
|
|
1918
|
-
/**
|
|
1941
|
+
/** The activity applies to all future billing cycles of the subscription contract. */
|
|
1919
1942
|
contractTarget?: ContractTarget;
|
|
1920
1943
|
}
|
|
1921
1944
|
/** @oneof */
|
|
@@ -1923,19 +1946,19 @@ interface SubscriptionContractActivityContentOneOf {
|
|
|
1923
1946
|
/** Changes committed from a DraftSubscriptionContract. */
|
|
1924
1947
|
changesApplied?: ChangesAppliedActivity;
|
|
1925
1948
|
}
|
|
1926
|
-
/**
|
|
1949
|
+
/** Target that applies changes to all future billing cycles of the subscription contract. */
|
|
1927
1950
|
interface ContractTarget {
|
|
1928
|
-
/**
|
|
1951
|
+
/** Number of the first billing cycle the changes apply to. Billing cycles are numbered from `1`. */
|
|
1929
1952
|
nextCycleNumber?: number | null;
|
|
1930
1953
|
}
|
|
1931
1954
|
interface ActivityAuthor extends ActivityAuthorValueOneOf {
|
|
1932
1955
|
/**
|
|
1933
|
-
*
|
|
1956
|
+
* Wix user ID. Returned when a Wix user made the change.
|
|
1934
1957
|
* @format GUID
|
|
1935
1958
|
*/
|
|
1936
1959
|
userId?: string;
|
|
1937
1960
|
/**
|
|
1938
|
-
* App ID.
|
|
1961
|
+
* App ID. Returned when an app made the change.
|
|
1939
1962
|
* @format GUID
|
|
1940
1963
|
*/
|
|
1941
1964
|
appId?: string;
|
|
@@ -1943,74 +1966,76 @@ interface ActivityAuthor extends ActivityAuthorValueOneOf {
|
|
|
1943
1966
|
/** @oneof */
|
|
1944
1967
|
interface ActivityAuthorValueOneOf {
|
|
1945
1968
|
/**
|
|
1946
|
-
*
|
|
1969
|
+
* Wix user ID. Returned when a Wix user made the change.
|
|
1947
1970
|
* @format GUID
|
|
1948
1971
|
*/
|
|
1949
1972
|
userId?: string;
|
|
1950
1973
|
/**
|
|
1951
|
-
* App ID.
|
|
1974
|
+
* App ID. Returned when an app made the change.
|
|
1952
1975
|
* @format GUID
|
|
1953
1976
|
*/
|
|
1954
1977
|
appId?: string;
|
|
1955
1978
|
}
|
|
1956
1979
|
interface ChangesAppliedActivity extends ChangesAppliedActivityTargetOneOf {
|
|
1957
|
-
/**
|
|
1980
|
+
/** The changes apply to all future billing cycles of the subscription contract. */
|
|
1958
1981
|
contractTarget?: ContractTarget;
|
|
1959
1982
|
/**
|
|
1960
|
-
* ID of the
|
|
1983
|
+
* ID of the draft subscription contract whose changes were committed.
|
|
1961
1984
|
* @format GUID
|
|
1962
1985
|
*/
|
|
1963
1986
|
draftSubscriptionContractId?: string;
|
|
1964
1987
|
/**
|
|
1965
|
-
*
|
|
1988
|
+
* Changes that were applied to the subscription contract.
|
|
1966
1989
|
* @maxSize 100
|
|
1967
1990
|
*/
|
|
1968
1991
|
changes?: ContractChange[];
|
|
1969
1992
|
/**
|
|
1970
|
-
* Reason for the
|
|
1993
|
+
* Reason for the change, provided by the business.
|
|
1971
1994
|
* @maxLength 200
|
|
1972
1995
|
*/
|
|
1973
1996
|
reason?: string | null;
|
|
1974
1997
|
}
|
|
1975
1998
|
/** @oneof */
|
|
1976
1999
|
interface ChangesAppliedActivityTargetOneOf {
|
|
1977
|
-
/**
|
|
2000
|
+
/** The changes apply to all future billing cycles of the subscription contract. */
|
|
1978
2001
|
contractTarget?: ContractTarget;
|
|
1979
2002
|
}
|
|
1980
|
-
interface ContractChange extends
|
|
2003
|
+
interface ContractChange extends ContractChangeChangeDetailsOneOf {
|
|
1981
2004
|
/** Line item was modified. */
|
|
1982
2005
|
lineItemChanged?: LineItemChanges;
|
|
1983
2006
|
/** Line item was added to the contract. */
|
|
1984
|
-
lineItemAdded?:
|
|
2007
|
+
lineItemAdded?: LineItemSummary;
|
|
1985
2008
|
/** Line item was removed from the contract. */
|
|
1986
|
-
lineItemRemoved?:
|
|
2009
|
+
lineItemRemoved?: LineItemSummary;
|
|
1987
2010
|
/** Discount was added to the contract. */
|
|
1988
|
-
discountAdded?:
|
|
2011
|
+
discountAdded?: DiscountSummary;
|
|
1989
2012
|
/** Discount was removed from the contract. */
|
|
1990
|
-
discountRemoved?:
|
|
2013
|
+
discountRemoved?: DiscountSummary;
|
|
1991
2014
|
/** Additional fee was added to the contract. */
|
|
1992
|
-
additionalFeeAdded?:
|
|
2015
|
+
additionalFeeAdded?: AdditionalFeeSummary;
|
|
1993
2016
|
/** Additional fee was removed from the contract. */
|
|
1994
|
-
additionalFeeRemoved?:
|
|
2017
|
+
additionalFeeRemoved?: AdditionalFeeSummary;
|
|
1995
2018
|
/** Total price changed. */
|
|
1996
2019
|
totalPriceChanged?: TotalPriceChange;
|
|
2020
|
+
/** Type of change. */
|
|
2021
|
+
changeType?: ContractChangeTypeWithLiterals;
|
|
1997
2022
|
}
|
|
1998
2023
|
/** @oneof */
|
|
1999
|
-
interface
|
|
2024
|
+
interface ContractChangeChangeDetailsOneOf {
|
|
2000
2025
|
/** Line item was modified. */
|
|
2001
2026
|
lineItemChanged?: LineItemChanges;
|
|
2002
2027
|
/** Line item was added to the contract. */
|
|
2003
|
-
lineItemAdded?:
|
|
2028
|
+
lineItemAdded?: LineItemSummary;
|
|
2004
2029
|
/** Line item was removed from the contract. */
|
|
2005
|
-
lineItemRemoved?:
|
|
2030
|
+
lineItemRemoved?: LineItemSummary;
|
|
2006
2031
|
/** Discount was added to the contract. */
|
|
2007
|
-
discountAdded?:
|
|
2032
|
+
discountAdded?: DiscountSummary;
|
|
2008
2033
|
/** Discount was removed from the contract. */
|
|
2009
|
-
discountRemoved?:
|
|
2034
|
+
discountRemoved?: DiscountSummary;
|
|
2010
2035
|
/** Additional fee was added to the contract. */
|
|
2011
|
-
additionalFeeAdded?:
|
|
2036
|
+
additionalFeeAdded?: AdditionalFeeSummary;
|
|
2012
2037
|
/** Additional fee was removed from the contract. */
|
|
2013
|
-
additionalFeeRemoved?:
|
|
2038
|
+
additionalFeeRemoved?: AdditionalFeeSummary;
|
|
2014
2039
|
/** Total price changed. */
|
|
2015
2040
|
totalPriceChanged?: TotalPriceChange;
|
|
2016
2041
|
}
|
|
@@ -2026,11 +2051,15 @@ interface LineItemChanges {
|
|
|
2026
2051
|
quantity?: LineItemQuantityChange;
|
|
2027
2052
|
}
|
|
2028
2053
|
declare enum LineItemQuantityChangeType {
|
|
2054
|
+
/** Unknown quantity change type. */
|
|
2055
|
+
UNKNOWN_LINE_ITEM_QUANTITY_CHANGE_TYPE = "UNKNOWN_LINE_ITEM_QUANTITY_CHANGE_TYPE",
|
|
2056
|
+
/** Quantity increased. */
|
|
2029
2057
|
QUANTITY_INCREASED = "QUANTITY_INCREASED",
|
|
2058
|
+
/** Quantity decreased. */
|
|
2030
2059
|
QUANTITY_DECREASED = "QUANTITY_DECREASED"
|
|
2031
2060
|
}
|
|
2032
2061
|
/** @enumType */
|
|
2033
|
-
type LineItemQuantityChangeTypeWithLiterals = LineItemQuantityChangeType | 'QUANTITY_INCREASED' | 'QUANTITY_DECREASED';
|
|
2062
|
+
type LineItemQuantityChangeTypeWithLiterals = LineItemQuantityChangeType | 'UNKNOWN_LINE_ITEM_QUANTITY_CHANGE_TYPE' | 'QUANTITY_INCREASED' | 'QUANTITY_DECREASED';
|
|
2034
2063
|
interface LineItemQuantityChange {
|
|
2035
2064
|
/**
|
|
2036
2065
|
* Original item quantity before the change.
|
|
@@ -2047,11 +2076,11 @@ interface LineItemQuantityChange {
|
|
|
2047
2076
|
* @min 1
|
|
2048
2077
|
* @max 1000000
|
|
2049
2078
|
*/
|
|
2050
|
-
|
|
2079
|
+
quantityDifference?: number;
|
|
2051
2080
|
/** Direction of the quantity change. */
|
|
2052
2081
|
deltaType?: LineItemQuantityChangeTypeWithLiterals;
|
|
2053
2082
|
}
|
|
2054
|
-
interface
|
|
2083
|
+
interface LineItemSummary {
|
|
2055
2084
|
/**
|
|
2056
2085
|
* Line item ID.
|
|
2057
2086
|
* @format GUID
|
|
@@ -2066,7 +2095,7 @@ interface ManagedLineItem {
|
|
|
2066
2095
|
*/
|
|
2067
2096
|
quantity?: number;
|
|
2068
2097
|
}
|
|
2069
|
-
interface
|
|
2098
|
+
interface DiscountSummary {
|
|
2070
2099
|
/**
|
|
2071
2100
|
* Discount ID.
|
|
2072
2101
|
* @format GUID
|
|
@@ -2089,7 +2118,7 @@ interface TranslatedValue {
|
|
|
2089
2118
|
*/
|
|
2090
2119
|
translated?: string | null;
|
|
2091
2120
|
}
|
|
2092
|
-
interface
|
|
2121
|
+
interface AdditionalFeeSummary {
|
|
2093
2122
|
/**
|
|
2094
2123
|
* Additional fee ID.
|
|
2095
2124
|
* @format GUID
|
|
@@ -2106,8 +2135,32 @@ interface TotalPriceChange {
|
|
|
2106
2135
|
/** Total price after the commit. */
|
|
2107
2136
|
newTotal?: Price;
|
|
2108
2137
|
}
|
|
2138
|
+
declare enum ContractChangeType {
|
|
2139
|
+
/** Unknown change type. */
|
|
2140
|
+
UNKNOWN_CONTRACT_CHANGE_TYPE = "UNKNOWN_CONTRACT_CHANGE_TYPE",
|
|
2141
|
+
/** Line item was modified. */
|
|
2142
|
+
LINE_ITEM_CHANGED = "LINE_ITEM_CHANGED",
|
|
2143
|
+
/** Line item was added to the contract. */
|
|
2144
|
+
LINE_ITEM_ADDED = "LINE_ITEM_ADDED",
|
|
2145
|
+
/** Line item was removed from the contract. */
|
|
2146
|
+
LINE_ITEM_REMOVED = "LINE_ITEM_REMOVED",
|
|
2147
|
+
/** Discount was added to the contract. */
|
|
2148
|
+
DISCOUNT_ADDED = "DISCOUNT_ADDED",
|
|
2149
|
+
/** Discount was removed from the contract. */
|
|
2150
|
+
DISCOUNT_REMOVED = "DISCOUNT_REMOVED",
|
|
2151
|
+
/** Additional fee was added to the contract. */
|
|
2152
|
+
ADDITIONAL_FEE_ADDED = "ADDITIONAL_FEE_ADDED",
|
|
2153
|
+
/** Additional fee was removed from the contract. */
|
|
2154
|
+
ADDITIONAL_FEE_REMOVED = "ADDITIONAL_FEE_REMOVED",
|
|
2155
|
+
/** Total price changed. */
|
|
2156
|
+
TOTAL_PRICE_CHANGED = "TOTAL_PRICE_CHANGED"
|
|
2157
|
+
}
|
|
2158
|
+
/** @enumType */
|
|
2159
|
+
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
2160
|
declare enum ActivityType {
|
|
2161
|
+
/** Unknown activity type. */
|
|
2110
2162
|
UNKNOWN_ACTIVITY_TYPE = "UNKNOWN_ACTIVITY_TYPE",
|
|
2163
|
+
/** Changes from a draft subscription contract were committed. */
|
|
2111
2164
|
CHANGES_APPLIED = "CHANGES_APPLIED"
|
|
2112
2165
|
}
|
|
2113
2166
|
/** @enumType */
|
|
@@ -2138,30 +2191,26 @@ interface SubscriptionContractExpired {
|
|
|
2138
2191
|
/** The subscription contract that expired. */
|
|
2139
2192
|
subscriptionContract?: SubscriptionContract;
|
|
2140
2193
|
}
|
|
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
|
-
*/
|
|
2194
|
+
/** Triggered when changes from a draft subscription contract are committed to a subscription contract. */
|
|
2146
2195
|
interface SubscriptionContractChangesCommitted {
|
|
2147
|
-
/**
|
|
2196
|
+
/** Subscription contract after the changes were committed. */
|
|
2148
2197
|
subscriptionContract?: SubscriptionContract;
|
|
2149
2198
|
/**
|
|
2150
|
-
* ID of the
|
|
2199
|
+
* ID of the draft subscription contract whose changes were committed.
|
|
2151
2200
|
* @format GUID
|
|
2152
2201
|
*/
|
|
2153
2202
|
draftSubscriptionContractId?: string;
|
|
2154
|
-
/**
|
|
2203
|
+
/** Changes that were applied to the subscription contract. */
|
|
2155
2204
|
changes?: SubscriptionContractDiffs;
|
|
2156
2205
|
/**
|
|
2157
2206
|
* Date and time the changes were committed.
|
|
2158
2207
|
* @readonly
|
|
2159
2208
|
*/
|
|
2160
2209
|
commitDate?: Date | null;
|
|
2161
|
-
/**
|
|
2210
|
+
/** Notification settings specified when the changes were committed. */
|
|
2162
2211
|
commitSettings?: SubscriptionCommitSettings;
|
|
2163
2212
|
/**
|
|
2164
|
-
* Reason for the
|
|
2213
|
+
* Reason for the change, provided by the business.
|
|
2165
2214
|
* @maxLength 200
|
|
2166
2215
|
*/
|
|
2167
2216
|
reason?: string | null;
|
|
@@ -2170,194 +2219,204 @@ interface SubscriptionContractChangesCommitted {
|
|
|
2170
2219
|
}
|
|
2171
2220
|
interface SubscriptionContractDiffs {
|
|
2172
2221
|
/**
|
|
2173
|
-
*
|
|
2222
|
+
* Line items that were added, changed, or removed.
|
|
2223
|
+
*
|
|
2224
|
+
* A line item is `CHANGED` when a field listed in `ItemChangedDetails` changed. Line items with no change aren't included.
|
|
2174
2225
|
* @maxSize 100
|
|
2175
2226
|
*/
|
|
2176
2227
|
lineItems?: LineItemDelta[];
|
|
2177
2228
|
/**
|
|
2178
|
-
*
|
|
2229
|
+
* Discounts that were added, changed, or removed.
|
|
2230
|
+
*
|
|
2231
|
+
* 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
2232
|
* @maxSize 100
|
|
2180
2233
|
*/
|
|
2181
2234
|
appliedDiscounts?: AppliedDiscountDelta[];
|
|
2182
2235
|
/**
|
|
2183
|
-
*
|
|
2236
|
+
* Additional fees that were added, changed, or removed.
|
|
2237
|
+
*
|
|
2238
|
+
* An additional fee is `CHANGED` when its price or the line items it applies to changed. Fees with no change aren't included.
|
|
2184
2239
|
* @maxSize 100
|
|
2185
2240
|
*/
|
|
2186
2241
|
additionalFees?: AdditionalFeeDelta[];
|
|
2187
|
-
/**
|
|
2242
|
+
/** Price summary after the changes. Replaces the subscription contract's previous price summary. */
|
|
2188
2243
|
priceSummary?: PriceSummary;
|
|
2189
|
-
/**
|
|
2244
|
+
/** Tax information after the changes. Replaces the subscription contract's previous tax information. */
|
|
2190
2245
|
taxInfo?: OrderTaxInfo;
|
|
2246
|
+
/** Shipping information after the changes. Replaces the subscription contract's previous shipping information. */
|
|
2247
|
+
shippingInfo?: ShippingInformation;
|
|
2191
2248
|
}
|
|
2192
2249
|
interface LineItemDelta extends LineItemDeltaDeltaDetailsOneOf {
|
|
2250
|
+
/** Values the line item had before the change. */
|
|
2193
2251
|
changed?: ItemChangedDetails;
|
|
2194
2252
|
/**
|
|
2195
2253
|
* Line item ID.
|
|
2196
2254
|
* @format GUID
|
|
2197
2255
|
*/
|
|
2198
2256
|
lineItemId?: string;
|
|
2199
|
-
/**
|
|
2257
|
+
/** Line item content. For a removed line item, the line item that was removed. */
|
|
2200
2258
|
lineItem?: OrderLineItem;
|
|
2201
2259
|
/** Type of change applied to this line item. */
|
|
2202
2260
|
changeType?: ChangeTypeWithLiterals;
|
|
2203
2261
|
}
|
|
2204
2262
|
/** @oneof */
|
|
2205
2263
|
interface LineItemDeltaDeltaDetailsOneOf {
|
|
2264
|
+
/** Values the line item had before the change. */
|
|
2206
2265
|
changed?: ItemChangedDetails;
|
|
2207
2266
|
}
|
|
2208
|
-
/**
|
|
2267
|
+
/** The catalog reference options before the change. */
|
|
2209
2268
|
interface CatalogReferenceOptionsBeforeChange {
|
|
2210
|
-
/**
|
|
2269
|
+
/** The catalog reference options. Absent when the line item had no options. */
|
|
2211
2270
|
options?: Record<string, any> | null;
|
|
2212
2271
|
}
|
|
2213
|
-
/**
|
|
2272
|
+
/** The product name before the change. */
|
|
2214
2273
|
interface ProductNameBeforeChange {
|
|
2215
|
-
/**
|
|
2274
|
+
/** The product name. Absent when the line item had no product name. */
|
|
2216
2275
|
productName?: ProductName;
|
|
2217
2276
|
}
|
|
2218
|
-
/**
|
|
2277
|
+
/** The description lines before the change. */
|
|
2219
2278
|
interface DescriptionLinesBeforeChange {
|
|
2220
2279
|
/**
|
|
2221
|
-
*
|
|
2280
|
+
* The description lines. Empty when the line item had no description lines.
|
|
2222
2281
|
* @maxSize 20
|
|
2223
2282
|
*/
|
|
2224
2283
|
descriptionLines?: DescriptionLine[];
|
|
2225
2284
|
}
|
|
2226
|
-
/**
|
|
2285
|
+
/** The image before the change. */
|
|
2227
2286
|
interface ImageBeforeChange {
|
|
2228
|
-
/**
|
|
2287
|
+
/** The image. Absent when the line item had no image. */
|
|
2229
2288
|
image?: string;
|
|
2230
2289
|
}
|
|
2231
|
-
/**
|
|
2290
|
+
/** The physical properties before the change. */
|
|
2232
2291
|
interface PhysicalPropertiesBeforeChange {
|
|
2233
|
-
/**
|
|
2292
|
+
/** The physical properties. Absent when the line item had no physical properties. */
|
|
2234
2293
|
physicalProperties?: PhysicalProperties;
|
|
2235
2294
|
}
|
|
2236
|
-
/**
|
|
2295
|
+
/** The item type before the change. */
|
|
2237
2296
|
interface ItemTypeBeforeChange {
|
|
2238
|
-
/**
|
|
2297
|
+
/** The item type. Absent when the line item had no item type. */
|
|
2239
2298
|
itemType?: ItemType;
|
|
2240
2299
|
}
|
|
2241
|
-
/**
|
|
2300
|
+
/** The fulfiller ID before the change. */
|
|
2242
2301
|
interface FulfillerIdBeforeChange {
|
|
2243
2302
|
/**
|
|
2244
|
-
*
|
|
2303
|
+
* The fulfiller ID. Absent when the line item had no fulfiller.
|
|
2245
2304
|
* @format GUID
|
|
2246
2305
|
*/
|
|
2247
2306
|
fulfillerId?: string | null;
|
|
2248
2307
|
}
|
|
2249
|
-
/**
|
|
2308
|
+
/** The digital file before the change. */
|
|
2250
2309
|
interface DigitalFileBeforeChange {
|
|
2251
|
-
/**
|
|
2310
|
+
/** The digital file. Absent when the line item had no digital file. */
|
|
2252
2311
|
digitalFile?: DigitalFile;
|
|
2253
2312
|
}
|
|
2254
|
-
/**
|
|
2313
|
+
/** The price description before the change. */
|
|
2255
2314
|
interface PriceDescriptionBeforeChange {
|
|
2256
|
-
/**
|
|
2315
|
+
/** The price description. Absent when the line item had no price description. */
|
|
2257
2316
|
priceDescription?: PriceDescription;
|
|
2258
2317
|
}
|
|
2259
|
-
/**
|
|
2318
|
+
/** The delivery profile ID before the change. */
|
|
2260
2319
|
interface DeliveryProfileIdBeforeChange {
|
|
2261
2320
|
/**
|
|
2262
|
-
*
|
|
2321
|
+
* The delivery profile ID. Absent when the line item had no delivery profile.
|
|
2263
2322
|
* @format GUID
|
|
2264
2323
|
*/
|
|
2265
2324
|
deliveryProfileId?: string | null;
|
|
2266
2325
|
}
|
|
2267
|
-
/**
|
|
2326
|
+
/** The shipping group ID before the change. */
|
|
2268
2327
|
interface ShippingGroupIdBeforeChange {
|
|
2269
2328
|
/**
|
|
2270
|
-
*
|
|
2329
|
+
* The shipping group ID. Absent when the line item had no shipping group.
|
|
2271
2330
|
* @format GUID
|
|
2272
2331
|
*/
|
|
2273
2332
|
shippingGroupId?: string | null;
|
|
2274
2333
|
}
|
|
2275
|
-
/**
|
|
2334
|
+
/** The tax info before the change. */
|
|
2276
2335
|
interface TaxInfoBeforeChange {
|
|
2277
|
-
/**
|
|
2336
|
+
/** The tax info. Absent when the line item had no tax info. */
|
|
2278
2337
|
taxInfo?: LineItemTaxInfo;
|
|
2279
2338
|
}
|
|
2280
|
-
/**
|
|
2339
|
+
/** The inventory app ID before the change. */
|
|
2281
2340
|
interface InventoryAppIdBeforeChange {
|
|
2282
2341
|
/**
|
|
2283
|
-
*
|
|
2342
|
+
* The inventory app ID. Absent when the line item had no inventory app.
|
|
2284
2343
|
* @format GUID
|
|
2285
2344
|
*/
|
|
2286
2345
|
inventoryAppId?: string | null;
|
|
2287
2346
|
}
|
|
2288
|
-
/**
|
|
2347
|
+
/** The root catalog item ID before the change. */
|
|
2289
2348
|
interface RootCatalogItemIdBeforeChange {
|
|
2290
2349
|
/**
|
|
2291
|
-
*
|
|
2350
|
+
* The root catalog item ID. Absent when the line item had no root catalog item.
|
|
2292
2351
|
* @minLength 1
|
|
2293
2352
|
* @maxLength 36
|
|
2294
2353
|
*/
|
|
2295
2354
|
rootCatalogItemId?: string | null;
|
|
2296
2355
|
}
|
|
2297
|
-
/**
|
|
2356
|
+
/** The modifier groups before the change. */
|
|
2298
2357
|
interface ModifierGroupsBeforeChange {
|
|
2299
2358
|
/**
|
|
2300
|
-
*
|
|
2359
|
+
* The modifier groups. Empty when the line item had no modifier groups.
|
|
2301
2360
|
* @maxSize 10
|
|
2302
2361
|
*/
|
|
2303
2362
|
modifierGroups?: ModifierGroup[];
|
|
2304
2363
|
}
|
|
2305
|
-
/**
|
|
2364
|
+
/** The price undetermined flag before the change. */
|
|
2306
2365
|
interface PriceUndeterminedBeforeChange {
|
|
2307
|
-
/**
|
|
2366
|
+
/** Whether the price of the line item was undetermined. */
|
|
2308
2367
|
priceUndetermined?: boolean;
|
|
2309
2368
|
}
|
|
2310
|
-
/**
|
|
2369
|
+
/** Type of change to a line item, discount, or additional fee. */
|
|
2311
2370
|
declare enum ChangeType {
|
|
2371
|
+
/** Unknown change type. */
|
|
2312
2372
|
UNKNOWN_CHANGE_TYPE = "UNKNOWN_CHANGE_TYPE",
|
|
2313
|
-
/**
|
|
2373
|
+
/** The line item, discount, or additional fee was added to the subscription contract. */
|
|
2314
2374
|
ADDED = "ADDED",
|
|
2315
|
-
/**
|
|
2375
|
+
/** The line item, discount, or additional fee was changed. */
|
|
2316
2376
|
CHANGED = "CHANGED",
|
|
2317
|
-
/**
|
|
2377
|
+
/** The line item, discount, or additional fee was removed from the subscription contract. */
|
|
2318
2378
|
REMOVED = "REMOVED"
|
|
2319
2379
|
}
|
|
2320
2380
|
/** @enumType */
|
|
2321
2381
|
type ChangeTypeWithLiterals = ChangeType | 'UNKNOWN_CHANGE_TYPE' | 'ADDED' | 'CHANGED' | 'REMOVED';
|
|
2322
2382
|
interface ItemChangedDetails {
|
|
2323
2383
|
/**
|
|
2324
|
-
* The quantity before the change.
|
|
2384
|
+
* The quantity before the change. Set only when the quantity changed.
|
|
2325
2385
|
* @min 1
|
|
2326
2386
|
* @max 1000000
|
|
2327
2387
|
*/
|
|
2328
2388
|
quantityBeforeChange?: number | null;
|
|
2329
|
-
/** The price before the change. */
|
|
2389
|
+
/** The price before the change. Set only when the price changed. */
|
|
2330
2390
|
priceBeforeChange?: Price;
|
|
2331
|
-
/**
|
|
2391
|
+
/** The catalog reference options before the change. Set only when the catalog reference options changed. */
|
|
2332
2392
|
catalogReferenceOptionsBeforeChange?: CatalogReferenceOptionsBeforeChange;
|
|
2333
|
-
/**
|
|
2393
|
+
/** The product name before the change. Set only when the product name changed. */
|
|
2334
2394
|
productNameBeforeChange?: ProductNameBeforeChange;
|
|
2335
|
-
/**
|
|
2395
|
+
/** The description lines before the change. Set only when the description lines changed. */
|
|
2336
2396
|
descriptionLinesBeforeChange?: DescriptionLinesBeforeChange;
|
|
2337
|
-
/**
|
|
2397
|
+
/** The image before the change. Set only when the image changed. */
|
|
2338
2398
|
imageBeforeChange?: ImageBeforeChange;
|
|
2339
|
-
/**
|
|
2399
|
+
/** The physical properties before the change. Set only when the physical properties changed. */
|
|
2340
2400
|
physicalPropertiesBeforeChange?: PhysicalPropertiesBeforeChange;
|
|
2341
|
-
/**
|
|
2401
|
+
/** The item type before the change. Set only when the item type changed. */
|
|
2342
2402
|
itemTypeBeforeChange?: ItemTypeBeforeChange;
|
|
2343
|
-
/**
|
|
2403
|
+
/** The fulfiller ID before the change. Set only when the fulfiller ID changed. */
|
|
2344
2404
|
fulfillerIdBeforeChange?: FulfillerIdBeforeChange;
|
|
2345
|
-
/**
|
|
2405
|
+
/** The digital file before the change. Set only when the digital file changed. */
|
|
2346
2406
|
digitalFileBeforeChange?: DigitalFileBeforeChange;
|
|
2347
|
-
/**
|
|
2407
|
+
/** The price description before the change. Set only when the price description changed. */
|
|
2348
2408
|
priceDescriptionBeforeChange?: PriceDescriptionBeforeChange;
|
|
2349
|
-
/**
|
|
2409
|
+
/** The tax info before the change. Set only when the line item's tax group changed because its catalog options changed. */
|
|
2350
2410
|
taxInfoBeforeChange?: TaxInfoBeforeChange;
|
|
2351
|
-
/**
|
|
2352
|
-
inventoryAppIdBeforeChange?: InventoryAppIdBeforeChange;
|
|
2353
|
-
/** the modifier groups before the change. Set only when the modifier groups changed. */
|
|
2411
|
+
/** The modifier groups before the change. Set only when the modifier groups changed. */
|
|
2354
2412
|
modifierGroupsBeforeChange?: ModifierGroupsBeforeChange;
|
|
2355
|
-
/**
|
|
2413
|
+
/** The price undetermined flag before the change. Set only when the price undetermined flag changed. */
|
|
2356
2414
|
priceUndeterminedBeforeChange?: PriceUndeterminedBeforeChange;
|
|
2357
2415
|
}
|
|
2358
2416
|
interface AppliedDiscountDelta extends AppliedDiscountDeltaDeltaDetailsOneOf {
|
|
2359
2417
|
/** Discount content after the change. */
|
|
2360
2418
|
changed?: AppliedDiscount;
|
|
2419
|
+
/** Discount that was added. */
|
|
2361
2420
|
added?: AppliedDiscount;
|
|
2362
2421
|
/**
|
|
2363
2422
|
* Discount ID.
|
|
@@ -2371,11 +2430,13 @@ interface AppliedDiscountDelta extends AppliedDiscountDeltaDeltaDetailsOneOf {
|
|
|
2371
2430
|
interface AppliedDiscountDeltaDeltaDetailsOneOf {
|
|
2372
2431
|
/** Discount content after the change. */
|
|
2373
2432
|
changed?: AppliedDiscount;
|
|
2433
|
+
/** Discount that was added. */
|
|
2374
2434
|
added?: AppliedDiscount;
|
|
2375
2435
|
}
|
|
2376
2436
|
interface AdditionalFeeDelta extends AdditionalFeeDeltaDeltaDetailsOneOf {
|
|
2377
2437
|
/** Additional fee content after the change. */
|
|
2378
2438
|
changed?: AdditionalFee;
|
|
2439
|
+
/** Additional fee that was added. */
|
|
2379
2440
|
added?: AdditionalFee;
|
|
2380
2441
|
/**
|
|
2381
2442
|
* Additional fee ID.
|
|
@@ -2389,12 +2450,21 @@ interface AdditionalFeeDelta extends AdditionalFeeDeltaDeltaDetailsOneOf {
|
|
|
2389
2450
|
interface AdditionalFeeDeltaDeltaDetailsOneOf {
|
|
2390
2451
|
/** Additional fee content after the change. */
|
|
2391
2452
|
changed?: AdditionalFee;
|
|
2453
|
+
/** Additional fee that was added. */
|
|
2392
2454
|
added?: AdditionalFee;
|
|
2393
2455
|
}
|
|
2394
2456
|
interface SubscriptionCommitSettings {
|
|
2395
|
-
/**
|
|
2457
|
+
/**
|
|
2458
|
+
* Whether to send the buyer a notification about the committed changes.
|
|
2459
|
+
*
|
|
2460
|
+
* Default: `true`
|
|
2461
|
+
*/
|
|
2396
2462
|
sendNotificationsToBuyer?: boolean | null;
|
|
2397
|
-
/**
|
|
2463
|
+
/**
|
|
2464
|
+
* Whether to send the business a notification about the committed changes.
|
|
2465
|
+
*
|
|
2466
|
+
* Default: `true`
|
|
2467
|
+
*/
|
|
2398
2468
|
sendNotificationsToBusiness?: boolean | null;
|
|
2399
2469
|
}
|
|
2400
2470
|
/** Triggered when a subscription contract's next charge is coming up. */
|
|
@@ -2425,13 +2495,13 @@ interface CreateSubscriptionContractResponse {
|
|
|
2425
2495
|
}
|
|
2426
2496
|
interface GetSubscriptionContractRequest {
|
|
2427
2497
|
/**
|
|
2428
|
-
* ID of the
|
|
2498
|
+
* ID of the subscription contract to retrieve.
|
|
2429
2499
|
* @format GUID
|
|
2430
2500
|
*/
|
|
2431
2501
|
subscriptionContractId: string;
|
|
2432
2502
|
}
|
|
2433
2503
|
interface GetSubscriptionContractResponse {
|
|
2434
|
-
/**
|
|
2504
|
+
/** Retrieved subscription contract. */
|
|
2435
2505
|
subscriptionContract?: SubscriptionContract;
|
|
2436
2506
|
}
|
|
2437
2507
|
interface UpdateSubscriptionContractRequest {
|
|
@@ -2443,26 +2513,24 @@ interface UpdateSubscriptionContractResponse {
|
|
|
2443
2513
|
subscriptionContract?: SubscriptionContract;
|
|
2444
2514
|
}
|
|
2445
2515
|
interface QuerySubscriptionContractsRequest {
|
|
2446
|
-
/**
|
|
2516
|
+
/** Filter, sort, and paging options for the query. */
|
|
2447
2517
|
query?: CursorQuery;
|
|
2448
2518
|
}
|
|
2449
2519
|
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
2450
2520
|
/** 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
2521
|
cursorPaging?: CursorPaging;
|
|
2452
2522
|
/**
|
|
2453
|
-
* Filter object
|
|
2454
|
-
*
|
|
2455
|
-
*
|
|
2456
|
-
*
|
|
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).
|
|
2523
|
+
* 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.
|
|
2524
|
+
*
|
|
2525
|
+
* Supported properties:
|
|
2526
|
+
* `id`, `buyerInfo.contactId`
|
|
2460
2527
|
*/
|
|
2461
2528
|
filter?: Record<string, any> | null;
|
|
2462
2529
|
/**
|
|
2463
2530
|
* Sort object in the following format:
|
|
2464
2531
|
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
2465
|
-
*
|
|
2532
|
+
*
|
|
2533
|
+
* Learn more about [sorting](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging).
|
|
2466
2534
|
* @maxSize 5
|
|
2467
2535
|
*/
|
|
2468
2536
|
sort?: Sorting[];
|
|
@@ -2474,11 +2542,18 @@ interface CursorQueryPagingMethodOneOf {
|
|
|
2474
2542
|
}
|
|
2475
2543
|
interface Sorting {
|
|
2476
2544
|
/**
|
|
2477
|
-
*
|
|
2545
|
+
* Field to sort by.
|
|
2546
|
+
*
|
|
2547
|
+
* Supported properties:
|
|
2548
|
+
* `id`, `buyerInfo.contactId`
|
|
2478
2549
|
* @maxLength 512
|
|
2479
2550
|
*/
|
|
2480
2551
|
fieldName?: string;
|
|
2481
|
-
/**
|
|
2552
|
+
/**
|
|
2553
|
+
* Sort order. Use `ASC` for ascending order or `DESC` for descending order.
|
|
2554
|
+
*
|
|
2555
|
+
* Default: `ASC`
|
|
2556
|
+
*/
|
|
2482
2557
|
order?: SortOrderWithLiterals;
|
|
2483
2558
|
}
|
|
2484
2559
|
declare enum SortOrder {
|
|
@@ -2503,9 +2578,9 @@ interface CursorPaging {
|
|
|
2503
2578
|
cursor?: string | null;
|
|
2504
2579
|
}
|
|
2505
2580
|
interface QuerySubscriptionContractsResponse {
|
|
2506
|
-
/**
|
|
2581
|
+
/** Retrieved subscription contracts. */
|
|
2507
2582
|
subscriptionContracts?: SubscriptionContract[];
|
|
2508
|
-
/** Paging metadata */
|
|
2583
|
+
/** Paging metadata. */
|
|
2509
2584
|
pagingMetadata?: CursorPagingMetadata;
|
|
2510
2585
|
}
|
|
2511
2586
|
interface CursorPagingMetadata {
|
|
@@ -2806,6 +2881,12 @@ interface AccountInfo {
|
|
|
2806
2881
|
*/
|
|
2807
2882
|
siteId?: string | null;
|
|
2808
2883
|
}
|
|
2884
|
+
/** @docsIgnore */
|
|
2885
|
+
type GetSubscriptionContractApplicationErrors = {
|
|
2886
|
+
code?: 'NOT_FOUND';
|
|
2887
|
+
description?: string;
|
|
2888
|
+
data?: Record<string, any>;
|
|
2889
|
+
};
|
|
2809
2890
|
interface BaseEventMetadata {
|
|
2810
2891
|
/**
|
|
2811
2892
|
* App instance ID.
|
|
@@ -2861,11 +2942,35 @@ interface AccountInfoMetadata {
|
|
|
2861
2942
|
/** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */
|
|
2862
2943
|
parentAccountId?: string;
|
|
2863
2944
|
}
|
|
2945
|
+
interface SubscriptionContractCommittedEnvelope {
|
|
2946
|
+
data: SubscriptionContractChangesCommitted;
|
|
2947
|
+
metadata: EventMetadata;
|
|
2948
|
+
}
|
|
2949
|
+
/**
|
|
2950
|
+
* Triggered when changes from a draft subscription contract are committed to a subscription contract.
|
|
2951
|
+
* The event holds the updated contract and every change that was applied.
|
|
2952
|
+
* @permissionScope Manage Stores - all permissions
|
|
2953
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
2954
|
+
* @permissionScope Read eCommerce - all read permissions
|
|
2955
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
2956
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
2957
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
2958
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
2959
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
2960
|
+
* @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
|
|
2961
|
+
* @webhook
|
|
2962
|
+
* @eventType wix.ecom.subscription_contracts.v1.subscription_contract_committed
|
|
2963
|
+
* @slug committed
|
|
2964
|
+
* @documentationMaturity preview
|
|
2965
|
+
*/
|
|
2966
|
+
declare function onSubscriptionContractCommitted(handler: (event: SubscriptionContractCommittedEnvelope) => void | Promise<void>): void;
|
|
2864
2967
|
interface SubscriptionContractCreatedEnvelope {
|
|
2865
2968
|
entity: SubscriptionContract;
|
|
2866
2969
|
metadata: EventMetadata;
|
|
2867
2970
|
}
|
|
2868
|
-
/**
|
|
2971
|
+
/**
|
|
2972
|
+
* Triggered when a subscription contract is created. A subscription contract is created when a buyer checks out with a subscription item.
|
|
2973
|
+
* @permissionScope Manage Stores - all permissions
|
|
2869
2974
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
2870
2975
|
* @permissionScope Read eCommerce - all read permissions
|
|
2871
2976
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
@@ -2883,7 +2988,9 @@ declare function onSubscriptionContractCreated(handler: (event: SubscriptionCont
|
|
|
2883
2988
|
interface SubscriptionContractDeletedEnvelope {
|
|
2884
2989
|
metadata: EventMetadata;
|
|
2885
2990
|
}
|
|
2886
|
-
/**
|
|
2991
|
+
/**
|
|
2992
|
+
* 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.
|
|
2993
|
+
* @permissionScope Manage Stores - all permissions
|
|
2887
2994
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
2888
2995
|
* @permissionScope Read eCommerce - all read permissions
|
|
2889
2996
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
@@ -2904,7 +3011,11 @@ interface SubscriptionContractUpdatedEnvelope {
|
|
|
2904
3011
|
/** @hidden */
|
|
2905
3012
|
modifiedFields: Record<string, any>;
|
|
2906
3013
|
}
|
|
2907
|
-
/**
|
|
3014
|
+
/**
|
|
3015
|
+
* Triggered when a subscription contract is updated.
|
|
3016
|
+
* 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.
|
|
3017
|
+
* 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.
|
|
3018
|
+
* @permissionScope Manage Stores - all permissions
|
|
2908
3019
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
2909
3020
|
* @permissionScope Read eCommerce - all read permissions
|
|
2910
3021
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
@@ -2920,26 +3031,36 @@ interface SubscriptionContractUpdatedEnvelope {
|
|
|
2920
3031
|
*/
|
|
2921
3032
|
declare function onSubscriptionContractUpdated(handler: (event: SubscriptionContractUpdatedEnvelope) => void | Promise<void>): void;
|
|
2922
3033
|
/**
|
|
2923
|
-
* Retrieves a
|
|
2924
|
-
*
|
|
3034
|
+
* Retrieves a subscription contract.
|
|
3035
|
+
*
|
|
3036
|
+
*
|
|
3037
|
+
* 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).
|
|
3038
|
+
*
|
|
3039
|
+
* 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`.
|
|
3040
|
+
* @param subscriptionContractId - ID of the subscription contract to retrieve.
|
|
2925
3041
|
* @public
|
|
2926
3042
|
* @documentationMaturity preview
|
|
2927
3043
|
* @requiredField subscriptionContractId
|
|
2928
3044
|
* @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
|
|
2929
3045
|
* @applicableIdentity APP
|
|
2930
|
-
* @returns
|
|
3046
|
+
* @returns Retrieved subscription contract.
|
|
2931
3047
|
* @fqn wix.ecom.subscription_contracts.v1.SubscriptionContracts.GetSubscriptionContract
|
|
2932
3048
|
*/
|
|
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` | `
|
|
3049
|
+
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> & {
|
|
3050
|
+
__applicationErrorsType?: GetSubscriptionContractApplicationErrors;
|
|
3051
|
+
}>;
|
|
2934
3052
|
/**
|
|
2935
|
-
* Retrieves a list of
|
|
3053
|
+
* Retrieves a list of up to 100 subscription contracts, given the provided paging, filtering, and sorting.
|
|
3054
|
+
*
|
|
3055
|
+
*
|
|
3056
|
+
* Query Subscription Contracts runs with these defaults, which you can override:
|
|
2936
3057
|
*
|
|
2937
|
-
*
|
|
3058
|
+
* - `id` is sorted in `ASC` order
|
|
3059
|
+
* - `cursorPaging.limit` is `50`
|
|
2938
3060
|
*
|
|
2939
|
-
*
|
|
3061
|
+
* 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`.
|
|
2940
3062
|
*
|
|
2941
|
-
* [
|
|
2942
|
-
* [2]: https://dev.wix.com/api/rest/getting-started/api-query-language
|
|
3063
|
+
* 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
3064
|
* @public
|
|
2944
3065
|
* @documentationMaturity preview
|
|
2945
3066
|
* @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
|
|
@@ -3024,7 +3145,7 @@ interface SubscriptionContractsQueryBuilder {
|
|
|
3024
3145
|
* @fqn wix.ecom.subscription_contracts.v1.SubscriptionContracts.QuerySubscriptionContracts
|
|
3025
3146
|
* @requiredField query
|
|
3026
3147
|
*/
|
|
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>>;
|
|
3148
|
+
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
3149
|
interface SubscriptionContractQuerySpec extends QuerySpec {
|
|
3029
3150
|
paging: 'cursor';
|
|
3030
3151
|
wql: [
|
|
@@ -3056,29 +3177,32 @@ type SubscriptionContractQuery = {
|
|
|
3056
3177
|
cursor?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor'] | null;
|
|
3057
3178
|
};
|
|
3058
3179
|
/**
|
|
3059
|
-
Filter object
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
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).
|
|
3180
|
+
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.
|
|
3181
|
+
|
|
3182
|
+
Supported properties:
|
|
3183
|
+
`id`, `buyerInfo.contactId`
|
|
3066
3184
|
*/
|
|
3067
3185
|
filter?: CommonQueryWithEntityContext['filter'] | null;
|
|
3068
3186
|
/**
|
|
3069
3187
|
Sort object in the following format:
|
|
3070
3188
|
`[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
3071
|
-
|
|
3189
|
+
|
|
3190
|
+
Learn more about [sorting](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging).
|
|
3072
3191
|
@maxSize: 5
|
|
3073
3192
|
*/
|
|
3074
3193
|
sort?: {
|
|
3075
3194
|
/**
|
|
3076
|
-
|
|
3195
|
+
Field to sort by.
|
|
3196
|
+
|
|
3197
|
+
Supported properties:
|
|
3198
|
+
`id`, `buyerInfo.contactId`
|
|
3077
3199
|
@maxLength: 512
|
|
3078
3200
|
*/
|
|
3079
3201
|
fieldName?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['fieldName'];
|
|
3080
3202
|
/**
|
|
3081
|
-
Sort order.
|
|
3203
|
+
Sort order. Use `ASC` for ascending order or `DESC` for descending order.
|
|
3204
|
+
|
|
3205
|
+
Default: `ASC`
|
|
3082
3206
|
*/
|
|
3083
3207
|
order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
|
|
3084
3208
|
}[];
|
|
@@ -3087,4 +3211,4 @@ declare const utils: {
|
|
|
3087
3211
|
query: _wix_sdk_types.QueryHelpers<SubscriptionContract, SubscriptionContractQuerySpec, SubscriptionContractQuery>;
|
|
3088
3212
|
};
|
|
3089
3213
|
|
|
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
|
|
3214
|
+
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 };
|