@wix/auto_sdk_ecom_subscription-contracts 1.0.20 → 1.0.21
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 +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.d.ts +16 -0
- package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.js +35 -0
- package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.js.map +1 -0
- package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.http.d.ts +14 -0
- package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.http.js +198 -0
- package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.http.js.map +1 -0
- package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.meta.d.ts +16 -0
- package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.meta.js +66 -0
- package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.meta.js.map +1 -0
- package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.d.ts +32 -0
- package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.js +153 -0
- package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.js.map +1 -0
- package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.d.ts +1668 -0
- package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.js +161 -0
- package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.js.map +1 -0
- package/build/{ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal-C1mp-xS2.d.mts → cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.d.ts} +217 -117
- package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.js +342 -0
- package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.d.ts +16 -0
- package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.js +16 -0
- package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.js.map +1 -0
- package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.http.d.ts +14 -0
- package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.http.js +193 -0
- package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.http.js.map +1 -0
- package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.meta.d.ts +16 -0
- package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.meta.js +38 -0
- package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.meta.js.map +1 -0
- package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.d.ts +32 -0
- package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.js +132 -0
- package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.js.map +1 -0
- package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.d.ts +1668 -0
- package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.js +158 -0
- package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.js.map +1 -0
- package/build/{ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal-C1mp-xS2.d.ts → es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.d.ts} +217 -117
- package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.js +314 -0
- package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.d.ts +16 -0
- package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.js +35 -0
- package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.js.map +1 -0
- package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.http.d.ts +14 -0
- package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.http.js +198 -0
- package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.http.js.map +1 -0
- package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.meta.d.ts +16 -0
- package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.meta.js +66 -0
- package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.meta.js.map +1 -0
- package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.d.ts +32 -0
- package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.js +153 -0
- package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.js.map +1 -0
- package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.d.ts +1668 -0
- package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.js +161 -0
- package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.js.map +1 -0
- package/build/internal/{ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal-WYe0iZSk.d.mts → cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.d.ts} +217 -117
- package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.js +342 -0
- package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.d.ts +16 -0
- package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.js +16 -0
- package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.js.map +1 -0
- package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.http.d.ts +14 -0
- package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.http.js +193 -0
- package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.http.js.map +1 -0
- package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.meta.d.ts +16 -0
- package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.meta.js +38 -0
- package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.meta.js.map +1 -0
- package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.d.ts +32 -0
- package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.js +132 -0
- package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.js.map +1 -0
- package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.d.ts +1668 -0
- package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.js +158 -0
- package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.js.map +1 -0
- package/build/internal/{ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal-WYe0iZSk.d.ts → es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.d.ts} +217 -117
- package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.js +314 -0
- package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.js.map +1 -0
- package/package.json +11 -12
- package/build/index.d.mts +0 -39
- package/build/index.d.ts +0 -39
- package/build/index.js +0 -659
- package/build/index.js.map +0 -1
- package/build/index.mjs +0 -615
- package/build/index.mjs.map +0 -1
- package/build/internal/index.d.mts +0 -39
- package/build/internal/index.d.ts +0 -39
- package/build/internal/index.js +0 -659
- package/build/internal/index.js.map +0 -1
- package/build/internal/index.mjs +0 -615
- package/build/internal/index.mjs.map +0 -1
- package/build/internal/meta.d.mts +0 -1320
- package/build/internal/meta.d.ts +0 -1320
- package/build/internal/meta.js +0 -257
- package/build/internal/meta.js.map +0 -1
- package/build/internal/meta.mjs +0 -229
- package/build/internal/meta.mjs.map +0 -1
- package/build/meta.d.mts +0 -1320
- package/build/meta.d.ts +0 -1320
- package/build/meta.js +0 -257
- package/build/meta.js.map +0 -1
- package/build/meta.mjs +0 -229
- package/build/meta.mjs.map +0 -1
|
@@ -0,0 +1,1668 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A SubscriptionContract is a ...
|
|
3
|
+
* You can ...
|
|
4
|
+
* Read more about SubscriptionContracts
|
|
5
|
+
* in this [article](<LINK_TO_KB_ARTICLE>).
|
|
6
|
+
*/
|
|
7
|
+
export interface SubscriptionContract {
|
|
8
|
+
/**
|
|
9
|
+
* SubscriptionContract ID.
|
|
10
|
+
* @format GUID
|
|
11
|
+
* @readonly
|
|
12
|
+
*/
|
|
13
|
+
id?: string | null;
|
|
14
|
+
/**
|
|
15
|
+
* Revision number, which increments by 1 each time the SubscriptionContract is updated.
|
|
16
|
+
* To prevent conflicting changes, the current revision must be passed when updating the SubscriptionContract.
|
|
17
|
+
*
|
|
18
|
+
* Ignored when creating a SubscriptionOrderContract.
|
|
19
|
+
* @readonly
|
|
20
|
+
*/
|
|
21
|
+
revision?: string | null;
|
|
22
|
+
/**
|
|
23
|
+
* Date and time the subscription contract was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
|
|
24
|
+
* @readonly
|
|
25
|
+
*/
|
|
26
|
+
createdDate?: Date | null;
|
|
27
|
+
/**
|
|
28
|
+
* Date and time the subscription contract was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
|
|
29
|
+
* @readonly
|
|
30
|
+
*/
|
|
31
|
+
updatedDate?: Date | null;
|
|
32
|
+
/**
|
|
33
|
+
* Subscription option description. For example, `"1kg of selected coffee, once a month"`.
|
|
34
|
+
* @maxLength 500
|
|
35
|
+
* @deprecated Subscription option description. For example, `"1kg of selected coffee, once a month"`.
|
|
36
|
+
* @replacedBy subscription_description
|
|
37
|
+
* @targetRemovalDate 2025-10-01
|
|
38
|
+
*/
|
|
39
|
+
description?: string | null;
|
|
40
|
+
/**
|
|
41
|
+
* Subscription detailed information.
|
|
42
|
+
* @immutable
|
|
43
|
+
*/
|
|
44
|
+
subscriptionSettings?: V1SubscriptionSettings;
|
|
45
|
+
/**
|
|
46
|
+
* Order line items.
|
|
47
|
+
* @minSize 1
|
|
48
|
+
* @maxSize 1
|
|
49
|
+
* @readonly
|
|
50
|
+
*/
|
|
51
|
+
lineItems?: OrderLineItem[];
|
|
52
|
+
/** Buyer information. */
|
|
53
|
+
buyerInfo?: BuyerInfo;
|
|
54
|
+
/**
|
|
55
|
+
* Language for communication with the buyer. Defaults to the site language.
|
|
56
|
+
* For a site that supports multiple languages, this is the language the buyer selected.
|
|
57
|
+
*/
|
|
58
|
+
buyerLanguage?: string | null;
|
|
59
|
+
/** Weight measurement unit - defaults to site's weight unit. */
|
|
60
|
+
weightUnit?: WeightUnit;
|
|
61
|
+
/**
|
|
62
|
+
* Currency used for the pricing of this order in [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes) format.
|
|
63
|
+
* @format CURRENCY
|
|
64
|
+
* @immutable
|
|
65
|
+
*/
|
|
66
|
+
currency?: string | null;
|
|
67
|
+
/** Multi-currency information of the subscription. conversionRate may reflect updated exchange rate on created order per recurring cycle. */
|
|
68
|
+
currencyConversionDetails?: CurrencyConversionDetails;
|
|
69
|
+
/**
|
|
70
|
+
* Whether tax is included in line item prices.
|
|
71
|
+
*
|
|
72
|
+
* Default: `false`
|
|
73
|
+
* @immutable
|
|
74
|
+
*/
|
|
75
|
+
taxIncludedInPrices?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Order price summary.
|
|
78
|
+
* @readonly
|
|
79
|
+
*/
|
|
80
|
+
priceSummary?: PriceSummary;
|
|
81
|
+
/** Billing address and contact details. */
|
|
82
|
+
billingInfo?: AddressWithContact;
|
|
83
|
+
/** Shipping info and selected shipping option details. */
|
|
84
|
+
shippingInfo?: ShippingInformation;
|
|
85
|
+
/** Applied discounts. */
|
|
86
|
+
appliedDiscounts?: AppliedDiscount[];
|
|
87
|
+
/** Information about the sales channel that submitted this order. */
|
|
88
|
+
channelInfo?: ChannelInfo;
|
|
89
|
+
/** Custom fields. */
|
|
90
|
+
customFields?: CustomField[];
|
|
91
|
+
/**
|
|
92
|
+
* Order recipient address and contact details.
|
|
93
|
+
*
|
|
94
|
+
* This field may differ from the address in `shippingInfo.logistics` when:
|
|
95
|
+
* + The chosen shipping option is pickup point or store pickup.
|
|
96
|
+
* + No shipping option is selected.
|
|
97
|
+
*/
|
|
98
|
+
recipientInfo?: AddressWithContact;
|
|
99
|
+
/**
|
|
100
|
+
* Custom field data for the subscription contract object.
|
|
101
|
+
*
|
|
102
|
+
* [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls.
|
|
103
|
+
*/
|
|
104
|
+
extendedFields?: ExtendedFields;
|
|
105
|
+
/**
|
|
106
|
+
* Subscription option title. For example, `"Monthly coffee Subscription"`.
|
|
107
|
+
* @maxLength 150
|
|
108
|
+
* @deprecated Subscription option title. For example, `"Monthly coffee Subscription"`.
|
|
109
|
+
* @replacedBy subscription_title
|
|
110
|
+
* @targetRemovalDate 2025-10-01
|
|
111
|
+
*/
|
|
112
|
+
title?: string | null;
|
|
113
|
+
/**
|
|
114
|
+
* Additional fees applied to subscription contract.
|
|
115
|
+
* @maxSize 100
|
|
116
|
+
*/
|
|
117
|
+
additionalFees?: AdditionalFee[];
|
|
118
|
+
}
|
|
119
|
+
export interface V1SubscriptionDescription {
|
|
120
|
+
/**
|
|
121
|
+
* Subscription option description.
|
|
122
|
+
* @maxLength 500
|
|
123
|
+
*/
|
|
124
|
+
original?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Translated subscription option description.
|
|
127
|
+
* @maxLength 500
|
|
128
|
+
*/
|
|
129
|
+
translated?: string | null;
|
|
130
|
+
}
|
|
131
|
+
export interface V1SubscriptionSettings {
|
|
132
|
+
/** Frequency of recurring payment. */
|
|
133
|
+
frequency?: SubscriptionFrequency;
|
|
134
|
+
/**
|
|
135
|
+
* Interval of recurring payment.
|
|
136
|
+
* @min 1
|
|
137
|
+
* @max 50
|
|
138
|
+
*/
|
|
139
|
+
interval?: number | null;
|
|
140
|
+
/** Whether subscription is renewed automatically at the end of each period. */
|
|
141
|
+
autoRenewal?: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`.
|
|
144
|
+
* @min 1
|
|
145
|
+
*/
|
|
146
|
+
billingCycles?: number | null;
|
|
147
|
+
/** Whether to allow the customer to cancel the subscription. */
|
|
148
|
+
enableCustomerCancellation?: boolean;
|
|
149
|
+
}
|
|
150
|
+
export declare enum SubscriptionFrequency {
|
|
151
|
+
UNDEFINED = "UNDEFINED",
|
|
152
|
+
DAY = "DAY",
|
|
153
|
+
WEEK = "WEEK",
|
|
154
|
+
MONTH = "MONTH",
|
|
155
|
+
YEAR = "YEAR"
|
|
156
|
+
}
|
|
157
|
+
export interface V1FreeTrialPeriod {
|
|
158
|
+
/** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */
|
|
159
|
+
frequency?: SubscriptionFrequency;
|
|
160
|
+
/**
|
|
161
|
+
* interval of period
|
|
162
|
+
* @min 1
|
|
163
|
+
* @max 999
|
|
164
|
+
*/
|
|
165
|
+
interval?: number;
|
|
166
|
+
}
|
|
167
|
+
export interface OrderLineItem {
|
|
168
|
+
/**
|
|
169
|
+
* Line item ID.
|
|
170
|
+
* @immutable
|
|
171
|
+
*/
|
|
172
|
+
id?: string;
|
|
173
|
+
/**
|
|
174
|
+
* Item name.
|
|
175
|
+
* + Stores - `product.name`
|
|
176
|
+
* + Bookings - `service.info.name`
|
|
177
|
+
* + Events - `ticket.name`
|
|
178
|
+
*/
|
|
179
|
+
productName?: ProductName;
|
|
180
|
+
/**
|
|
181
|
+
* References to the line item's origin catalog.
|
|
182
|
+
* This field may be empty in the case of a custom line item.
|
|
183
|
+
*/
|
|
184
|
+
catalogReference?: CatalogReference;
|
|
185
|
+
/**
|
|
186
|
+
* Line item quantity.
|
|
187
|
+
* @min 1
|
|
188
|
+
* @max 100000
|
|
189
|
+
*/
|
|
190
|
+
quantity?: number;
|
|
191
|
+
/**
|
|
192
|
+
* Total discount for this line item's entire quantity.
|
|
193
|
+
* @readonly
|
|
194
|
+
*/
|
|
195
|
+
totalDiscount?: Price;
|
|
196
|
+
/**
|
|
197
|
+
* Line item description lines. Used for display purposes for the cart, checkout and order.
|
|
198
|
+
* @maxSize 20
|
|
199
|
+
*/
|
|
200
|
+
descriptionLines?: DescriptionLine[];
|
|
201
|
+
/** Line item image. */
|
|
202
|
+
image?: Image;
|
|
203
|
+
/** Physical properties of the item. When relevant, contains information such as SKU and item weight. */
|
|
204
|
+
physicalProperties?: PhysicalProperties;
|
|
205
|
+
/** Item type. Either a preset type or custom. */
|
|
206
|
+
itemType?: ItemType;
|
|
207
|
+
/**
|
|
208
|
+
* Fulfiller ID. Field is empty when the line item is self-fulfilled.
|
|
209
|
+
* To get fulfillment information, pass the order ID to [List Fulfillments For Single Order](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/order-fulfillments/list-fulfillments-for-single-order).
|
|
210
|
+
* @format GUID
|
|
211
|
+
*/
|
|
212
|
+
fulfillerId?: string | null;
|
|
213
|
+
/**
|
|
214
|
+
* Number of items that were refunded.
|
|
215
|
+
* @max 100000
|
|
216
|
+
*/
|
|
217
|
+
refundQuantity?: number | null;
|
|
218
|
+
/**
|
|
219
|
+
* Number of items restocked.
|
|
220
|
+
* @max 100000
|
|
221
|
+
*/
|
|
222
|
+
restockQuantity?: number | null;
|
|
223
|
+
/** Line item price after line item discounts for display purposes. */
|
|
224
|
+
price?: Price;
|
|
225
|
+
/**
|
|
226
|
+
* Line item price before line item discounts for display purposes. Defaults to `price` when not provided.
|
|
227
|
+
* @readonly
|
|
228
|
+
*/
|
|
229
|
+
priceBeforeDiscounts?: Price;
|
|
230
|
+
/**
|
|
231
|
+
* Total price after discounts, and before tax.
|
|
232
|
+
* @readonly
|
|
233
|
+
*/
|
|
234
|
+
totalPriceBeforeTax?: Price;
|
|
235
|
+
/**
|
|
236
|
+
* Total price after all discounts and tax.
|
|
237
|
+
* @readonly
|
|
238
|
+
*/
|
|
239
|
+
totalPriceAfterTax?: Price;
|
|
240
|
+
/**
|
|
241
|
+
* Type of selected payment option for current item.
|
|
242
|
+
*
|
|
243
|
+
* Default: `FULL_PAYMENT_ONLINE`
|
|
244
|
+
*/
|
|
245
|
+
paymentOption?: PaymentOptionType;
|
|
246
|
+
/**
|
|
247
|
+
* Deprecated. Use `taxInfo` instead.
|
|
248
|
+
* This field will be removed on September 30, 2024.
|
|
249
|
+
* Tax details for this line item.
|
|
250
|
+
* @deprecated Deprecated. Use `taxInfo` instead.
|
|
251
|
+
* This field will be removed on September 30, 2024.
|
|
252
|
+
* Tax details for this line item.
|
|
253
|
+
* @replacedBy tax_info
|
|
254
|
+
* @targetRemovalDate 2024-09-30
|
|
255
|
+
*/
|
|
256
|
+
taxDetails?: ItemTaxFullDetails;
|
|
257
|
+
/** Represents all the relevant tax details for a specific line item. */
|
|
258
|
+
taxInfo?: LineItemTaxInfo;
|
|
259
|
+
/** Digital file identifier, relevant only for items with type DIGITAL. */
|
|
260
|
+
digitalFile?: DigitalFile;
|
|
261
|
+
/** Subscription info. */
|
|
262
|
+
subscriptionInfo?: SubscriptionInfo;
|
|
263
|
+
/** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */
|
|
264
|
+
priceDescription?: PriceDescription;
|
|
265
|
+
/**
|
|
266
|
+
* Item's price amount to be charged during checkout. Relevant for items with a `paymentOption` value of `"DEPOSIT_ONLINE"`.
|
|
267
|
+
* @readonly
|
|
268
|
+
*/
|
|
269
|
+
depositAmount?: Price;
|
|
270
|
+
/**
|
|
271
|
+
* Line item locations.
|
|
272
|
+
*
|
|
273
|
+
* The location's total quantity must not exceed the line item quantity.
|
|
274
|
+
* @maxSize 5
|
|
275
|
+
*/
|
|
276
|
+
locations?: LocationAndQuantity[];
|
|
277
|
+
/**
|
|
278
|
+
* Custom extended fields for the line item object.
|
|
279
|
+
*
|
|
280
|
+
* [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.
|
|
281
|
+
*/
|
|
282
|
+
extendedFields?: ExtendedFields;
|
|
283
|
+
}
|
|
284
|
+
export interface ProductName {
|
|
285
|
+
/**
|
|
286
|
+
* __Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
|
|
287
|
+
*
|
|
288
|
+
* Min: 1 character.
|
|
289
|
+
* Max: 200 characters.
|
|
290
|
+
* @minLength 1
|
|
291
|
+
* @maxLength 200
|
|
292
|
+
*/
|
|
293
|
+
original?: string;
|
|
294
|
+
/**
|
|
295
|
+
* Item name translated into the buyer's language.
|
|
296
|
+
*
|
|
297
|
+
* Min: 1 character.
|
|
298
|
+
* Max: 400 characters.
|
|
299
|
+
* Default: Same as `original`.
|
|
300
|
+
* @minLength 1
|
|
301
|
+
* @maxLength 400
|
|
302
|
+
*/
|
|
303
|
+
translated?: string | null;
|
|
304
|
+
}
|
|
305
|
+
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
306
|
+
export interface CatalogReference {
|
|
307
|
+
/**
|
|
308
|
+
* ID of the item within the catalog it belongs to.
|
|
309
|
+
* @minLength 1
|
|
310
|
+
* @maxLength 36
|
|
311
|
+
*/
|
|
312
|
+
catalogItemId?: string;
|
|
313
|
+
/**
|
|
314
|
+
* ID of the app providing the catalog.
|
|
315
|
+
*
|
|
316
|
+
* You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
|
|
317
|
+
*
|
|
318
|
+
* For items from Wix catalogs, the following values always apply:
|
|
319
|
+
* + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
|
|
320
|
+
* + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
|
|
321
|
+
* + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
|
|
322
|
+
* @minLength 1
|
|
323
|
+
*/
|
|
324
|
+
appId?: string;
|
|
325
|
+
/**
|
|
326
|
+
* Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.
|
|
327
|
+
*
|
|
328
|
+
* For products and variants from a Wix Stores catalog, learn more about eCommerce integration ([SDK](https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/e-commerce-integration) | [REST](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration)).
|
|
329
|
+
*/
|
|
330
|
+
options?: Record<string, any> | null;
|
|
331
|
+
}
|
|
332
|
+
export interface Price {
|
|
333
|
+
/**
|
|
334
|
+
* Amount.
|
|
335
|
+
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
336
|
+
*/
|
|
337
|
+
amount?: string;
|
|
338
|
+
/**
|
|
339
|
+
* Amount formatted with currency symbol.
|
|
340
|
+
* @readonly
|
|
341
|
+
*/
|
|
342
|
+
formattedAmount?: string;
|
|
343
|
+
}
|
|
344
|
+
export interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf {
|
|
345
|
+
/** Description line plain text value. */
|
|
346
|
+
plainText?: PlainTextValue;
|
|
347
|
+
/** Description line color value. */
|
|
348
|
+
colorInfo?: Color;
|
|
349
|
+
/** Description line name. */
|
|
350
|
+
name?: DescriptionLineName;
|
|
351
|
+
}
|
|
352
|
+
/** @oneof */
|
|
353
|
+
export interface DescriptionLineValueOneOf {
|
|
354
|
+
/** Description line plain text value. */
|
|
355
|
+
plainText?: PlainTextValue;
|
|
356
|
+
/** Description line color value. */
|
|
357
|
+
colorInfo?: Color;
|
|
358
|
+
}
|
|
359
|
+
/** @oneof */
|
|
360
|
+
export interface DescriptionLineDescriptionLineValueOneOf {
|
|
361
|
+
}
|
|
362
|
+
export interface DescriptionLineName {
|
|
363
|
+
/**
|
|
364
|
+
* Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
|
|
365
|
+
* @maxLength 100
|
|
366
|
+
*/
|
|
367
|
+
original?: string;
|
|
368
|
+
/**
|
|
369
|
+
* Description line name translated into the buyer's language.
|
|
370
|
+
*
|
|
371
|
+
* Default: Same as `original`.
|
|
372
|
+
* @maxLength 200
|
|
373
|
+
*/
|
|
374
|
+
translated?: string | null;
|
|
375
|
+
}
|
|
376
|
+
export interface PlainTextValue {
|
|
377
|
+
/**
|
|
378
|
+
* Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
|
|
379
|
+
* @maxLength 600
|
|
380
|
+
*/
|
|
381
|
+
original?: string;
|
|
382
|
+
/**
|
|
383
|
+
* Description line plain text value translated into the buyer's language.
|
|
384
|
+
*
|
|
385
|
+
* Default: Same as `original`.
|
|
386
|
+
* @maxLength 600
|
|
387
|
+
*/
|
|
388
|
+
translated?: string | null;
|
|
389
|
+
}
|
|
390
|
+
export interface Color {
|
|
391
|
+
/**
|
|
392
|
+
* Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
|
|
393
|
+
* @maxLength 500
|
|
394
|
+
*/
|
|
395
|
+
original?: string;
|
|
396
|
+
/**
|
|
397
|
+
* Description line color name translated into the buyer's language.
|
|
398
|
+
*
|
|
399
|
+
* Default: Same as `original`.
|
|
400
|
+
* @maxLength 500
|
|
401
|
+
*/
|
|
402
|
+
translated?: string | null;
|
|
403
|
+
/** HEX or RGB color code for display. */
|
|
404
|
+
code?: string | null;
|
|
405
|
+
}
|
|
406
|
+
export declare enum DescriptionLineType {
|
|
407
|
+
/** Unrecognized type. */
|
|
408
|
+
UNRECOGNISED = "UNRECOGNISED",
|
|
409
|
+
/** Plain text type. */
|
|
410
|
+
PLAIN_TEXT = "PLAIN_TEXT",
|
|
411
|
+
/** Color type. */
|
|
412
|
+
COLOR = "COLOR"
|
|
413
|
+
}
|
|
414
|
+
export interface Image {
|
|
415
|
+
/** WixMedia image ID. */
|
|
416
|
+
id?: string;
|
|
417
|
+
/** Image URL. */
|
|
418
|
+
url?: string;
|
|
419
|
+
/**
|
|
420
|
+
* Original image height.
|
|
421
|
+
* @readonly
|
|
422
|
+
*/
|
|
423
|
+
height?: number;
|
|
424
|
+
/**
|
|
425
|
+
* Original image width.
|
|
426
|
+
* @readonly
|
|
427
|
+
*/
|
|
428
|
+
width?: number;
|
|
429
|
+
/** Image alt text. */
|
|
430
|
+
altText?: string | null;
|
|
431
|
+
/**
|
|
432
|
+
* Image filename.
|
|
433
|
+
* @readonly
|
|
434
|
+
*/
|
|
435
|
+
filename?: string | null;
|
|
436
|
+
}
|
|
437
|
+
export interface FocalPoint {
|
|
438
|
+
/** X-coordinate of the focal point. */
|
|
439
|
+
x?: number;
|
|
440
|
+
/** Y-coordinate of the focal point. */
|
|
441
|
+
y?: number;
|
|
442
|
+
/** crop by height */
|
|
443
|
+
height?: number | null;
|
|
444
|
+
/** crop by width */
|
|
445
|
+
width?: number | null;
|
|
446
|
+
}
|
|
447
|
+
export interface PhysicalProperties {
|
|
448
|
+
/** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
|
|
449
|
+
weight?: number | null;
|
|
450
|
+
/**
|
|
451
|
+
* Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).
|
|
452
|
+
* @maxLength 40
|
|
453
|
+
*/
|
|
454
|
+
sku?: string | null;
|
|
455
|
+
/** Whether this line item is shippable. */
|
|
456
|
+
shippable?: boolean;
|
|
457
|
+
}
|
|
458
|
+
export interface ItemType extends ItemTypeItemTypeDataOneOf {
|
|
459
|
+
/** Preset item type. */
|
|
460
|
+
preset?: ItemTypeItemType;
|
|
461
|
+
/** Custom item type. When none of the preset types are suitable, specifies the custom type. */
|
|
462
|
+
custom?: string;
|
|
463
|
+
}
|
|
464
|
+
/** @oneof */
|
|
465
|
+
export interface ItemTypeItemTypeDataOneOf {
|
|
466
|
+
/** Preset item type. */
|
|
467
|
+
preset?: ItemTypeItemType;
|
|
468
|
+
/** Custom item type. When none of the preset types are suitable, specifies the custom type. */
|
|
469
|
+
custom?: string;
|
|
470
|
+
}
|
|
471
|
+
export declare enum ItemTypeItemType {
|
|
472
|
+
UNRECOGNISED = "UNRECOGNISED",
|
|
473
|
+
PHYSICAL = "PHYSICAL",
|
|
474
|
+
DIGITAL = "DIGITAL",
|
|
475
|
+
GIFT_CARD = "GIFT_CARD",
|
|
476
|
+
SERVICE = "SERVICE"
|
|
477
|
+
}
|
|
478
|
+
/** Type of selected payment option for catalog item */
|
|
479
|
+
export declare enum PaymentOptionType {
|
|
480
|
+
/** The entire payment for this item happens as part of the checkout. */
|
|
481
|
+
FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE",
|
|
482
|
+
/** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */
|
|
483
|
+
FULL_PAYMENT_OFFLINE = "FULL_PAYMENT_OFFLINE",
|
|
484
|
+
/** Payment for this item is done by charging a membership. When selected, `price` is `0`. */
|
|
485
|
+
MEMBERSHIP = "MEMBERSHIP",
|
|
486
|
+
/** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */
|
|
487
|
+
DEPOSIT_ONLINE = "DEPOSIT_ONLINE",
|
|
488
|
+
/** Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */
|
|
489
|
+
MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE"
|
|
490
|
+
}
|
|
491
|
+
export interface ItemTaxFullDetails {
|
|
492
|
+
/** Taxable amount of this line item. */
|
|
493
|
+
taxableAmount?: Price;
|
|
494
|
+
/**
|
|
495
|
+
* Tax rate percentage, as a decimal numeral between 0 and 1. For example, `"0.13"`.
|
|
496
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
497
|
+
*/
|
|
498
|
+
taxRate?: string;
|
|
499
|
+
/** The calculated tax, based on the `taxableAmount` and `taxRate`. */
|
|
500
|
+
totalTax?: Price;
|
|
501
|
+
}
|
|
502
|
+
export interface LineItemTaxInfo {
|
|
503
|
+
/** Calculated tax, based on `taxable_amount` and `tax_rate`. */
|
|
504
|
+
taxAmount?: Price;
|
|
505
|
+
/** Amount for which tax is calculated. */
|
|
506
|
+
taxableAmount?: Price;
|
|
507
|
+
/**
|
|
508
|
+
* Tax rate %, as a decimal point.
|
|
509
|
+
* @format DECIMAL_VALUE
|
|
510
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
511
|
+
*/
|
|
512
|
+
taxRate?: string | null;
|
|
513
|
+
/**
|
|
514
|
+
* Tax group ID.
|
|
515
|
+
* @format GUID
|
|
516
|
+
*/
|
|
517
|
+
taxGroupId?: string | null;
|
|
518
|
+
/** Indicates whether the price already includes tax. */
|
|
519
|
+
taxIncludedInPrice?: boolean;
|
|
520
|
+
/**
|
|
521
|
+
* Tax information for a line item.
|
|
522
|
+
* @maxSize 7
|
|
523
|
+
*/
|
|
524
|
+
taxBreakdown?: LineItemTaxBreakdown[];
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* TaxBreakdown represents tax information for a line item.
|
|
528
|
+
* It holds the tax amount and the tax rate for each tax authority that apply on the line item.
|
|
529
|
+
*/
|
|
530
|
+
export interface LineItemTaxBreakdown {
|
|
531
|
+
/**
|
|
532
|
+
* Jurisdiction that taxes were calculated for. For example, "New York", or "Quebec".
|
|
533
|
+
* @maxLength 200
|
|
534
|
+
*/
|
|
535
|
+
jurisdiction?: string | null;
|
|
536
|
+
/**
|
|
537
|
+
* Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is 0.1000.
|
|
538
|
+
* @format DECIMAL_VALUE
|
|
539
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
540
|
+
*/
|
|
541
|
+
rate?: string | null;
|
|
542
|
+
/** Amount of tax calculated for this line item. */
|
|
543
|
+
taxAmount?: Price;
|
|
544
|
+
/**
|
|
545
|
+
* The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc.
|
|
546
|
+
* @maxLength 200
|
|
547
|
+
*/
|
|
548
|
+
taxType?: string | null;
|
|
549
|
+
/**
|
|
550
|
+
* The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc.
|
|
551
|
+
* This name should be explicit enough to allow the merchant to understand what tax was calculated.
|
|
552
|
+
* @maxLength 200
|
|
553
|
+
*/
|
|
554
|
+
taxName?: string | null;
|
|
555
|
+
/** Type of jurisdiction that taxes were calculated for. */
|
|
556
|
+
jurisdictionType?: JurisdictionType;
|
|
557
|
+
/** Non-taxable amount of the line item price. */
|
|
558
|
+
nonTaxableAmount?: Price;
|
|
559
|
+
/** Taxable amount of the line item price. */
|
|
560
|
+
taxableAmount?: Price;
|
|
561
|
+
}
|
|
562
|
+
/** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
|
|
563
|
+
export declare enum JurisdictionType {
|
|
564
|
+
UNDEFINED = "UNDEFINED",
|
|
565
|
+
COUNTRY = "COUNTRY",
|
|
566
|
+
STATE = "STATE",
|
|
567
|
+
COUNTY = "COUNTY",
|
|
568
|
+
CITY = "CITY",
|
|
569
|
+
SPECIAL = "SPECIAL"
|
|
570
|
+
}
|
|
571
|
+
export interface DigitalFile {
|
|
572
|
+
/**
|
|
573
|
+
* ID of the secure file in media.
|
|
574
|
+
* @minLength 1
|
|
575
|
+
* @maxLength 100
|
|
576
|
+
*/
|
|
577
|
+
fileId?: string;
|
|
578
|
+
/**
|
|
579
|
+
* Link will exist after the digital links have been generated on the order.
|
|
580
|
+
* @format WEB_URL
|
|
581
|
+
* @minLength 1
|
|
582
|
+
* @maxLength 2000
|
|
583
|
+
*/
|
|
584
|
+
link?: string | null;
|
|
585
|
+
/**
|
|
586
|
+
* Link expiration time and date.
|
|
587
|
+
* @readonly
|
|
588
|
+
*/
|
|
589
|
+
expirationDate?: Date | null;
|
|
590
|
+
}
|
|
591
|
+
export interface SubscriptionInfo {
|
|
592
|
+
/**
|
|
593
|
+
* Subscription ID.
|
|
594
|
+
* @format GUID
|
|
595
|
+
*/
|
|
596
|
+
id?: string | null;
|
|
597
|
+
/**
|
|
598
|
+
* Subscription cycle. For example, if this order is for the 3rd cycle of a subscription, value will be `3`.
|
|
599
|
+
* @min 1
|
|
600
|
+
*/
|
|
601
|
+
cycleNumber?: number;
|
|
602
|
+
/**
|
|
603
|
+
* Subscription option title. For example, `"Monthly coffee Subscription"`.
|
|
604
|
+
* @maxLength 20
|
|
605
|
+
* @deprecated Subscription option title. For example, `"Monthly coffee Subscription"`.
|
|
606
|
+
* @replacedBy title
|
|
607
|
+
* @targetRemovalDate 2025-10-01
|
|
608
|
+
*/
|
|
609
|
+
subscriptionOptionTitle?: string;
|
|
610
|
+
/**
|
|
611
|
+
* Subscription option description. For example, `"1kg of selected coffee, once a month"`.
|
|
612
|
+
* @maxLength 60
|
|
613
|
+
* @deprecated Subscription option description. For example, `"1kg of selected coffee, once a month"`.
|
|
614
|
+
* @replacedBy description
|
|
615
|
+
* @targetRemovalDate 2025-10-01
|
|
616
|
+
*/
|
|
617
|
+
subscriptionOptionDescription?: string | null;
|
|
618
|
+
/**
|
|
619
|
+
* Subscription detailed information.
|
|
620
|
+
* @immutable
|
|
621
|
+
*/
|
|
622
|
+
subscriptionSettings?: SubscriptionSettings;
|
|
623
|
+
}
|
|
624
|
+
export interface SubscriptionTitle {
|
|
625
|
+
/**
|
|
626
|
+
* Subscription option name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
|
|
627
|
+
* @minLength 1
|
|
628
|
+
* @maxLength 150
|
|
629
|
+
*/
|
|
630
|
+
original?: string;
|
|
631
|
+
/**
|
|
632
|
+
* Subscription option name translated into the buyer's language.
|
|
633
|
+
*
|
|
634
|
+
* Default: Same as `original`.
|
|
635
|
+
* @minLength 1
|
|
636
|
+
* @maxLength 150
|
|
637
|
+
*/
|
|
638
|
+
translated?: string | null;
|
|
639
|
+
}
|
|
640
|
+
export interface SubscriptionDescription {
|
|
641
|
+
/**
|
|
642
|
+
* Subscription option description.
|
|
643
|
+
* @maxLength 500
|
|
644
|
+
*/
|
|
645
|
+
original?: string;
|
|
646
|
+
/**
|
|
647
|
+
* Translated subscription option description.
|
|
648
|
+
* @maxLength 500
|
|
649
|
+
*/
|
|
650
|
+
translated?: string | null;
|
|
651
|
+
}
|
|
652
|
+
export interface SubscriptionSettings {
|
|
653
|
+
/** Frequency of recurring payment. */
|
|
654
|
+
frequency?: V2SubscriptionFrequency;
|
|
655
|
+
/**
|
|
656
|
+
* Interval of recurring payment.
|
|
657
|
+
* @min 1
|
|
658
|
+
* @max 50
|
|
659
|
+
*/
|
|
660
|
+
interval?: number | null;
|
|
661
|
+
/** Whether subscription is renewed automatically at the end of each period. */
|
|
662
|
+
autoRenewal?: boolean;
|
|
663
|
+
/**
|
|
664
|
+
* Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`.
|
|
665
|
+
* @min 1
|
|
666
|
+
*/
|
|
667
|
+
billingCycles?: number | null;
|
|
668
|
+
}
|
|
669
|
+
/** Frequency unit of recurring payment */
|
|
670
|
+
export declare enum V2SubscriptionFrequency {
|
|
671
|
+
UNDEFINED = "UNDEFINED",
|
|
672
|
+
DAY = "DAY",
|
|
673
|
+
WEEK = "WEEK",
|
|
674
|
+
MONTH = "MONTH",
|
|
675
|
+
YEAR = "YEAR"
|
|
676
|
+
}
|
|
677
|
+
export interface FreeTrialPeriod {
|
|
678
|
+
/** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */
|
|
679
|
+
frequency?: V2SubscriptionFrequency;
|
|
680
|
+
/**
|
|
681
|
+
* interval of period
|
|
682
|
+
* @min 1
|
|
683
|
+
* @max 999
|
|
684
|
+
*/
|
|
685
|
+
interval?: number;
|
|
686
|
+
}
|
|
687
|
+
export interface BillingAdjustment {
|
|
688
|
+
/** The type of adjustment. */
|
|
689
|
+
type?: AdjustmentType;
|
|
690
|
+
/** Summary of the prorated adjustment amount. */
|
|
691
|
+
priceSummary?: BillingAdjustmentPriceSummary;
|
|
692
|
+
}
|
|
693
|
+
export declare enum AdjustmentType {
|
|
694
|
+
UNKNOWN_ADJUSTMENT_TYPE = "UNKNOWN_ADJUSTMENT_TYPE",
|
|
695
|
+
/** Adjustment increases the total amount due to changes like covering extra billing days. Typically results in an additional fee. */
|
|
696
|
+
EXTRA_CHARGE = "EXTRA_CHARGE",
|
|
697
|
+
/** Adjustment reduces the total amount due to changes like covering fewer billing days. Typically results in a credit or discount. */
|
|
698
|
+
CREDIT = "CREDIT"
|
|
699
|
+
}
|
|
700
|
+
export interface BillingAdjustmentPriceSummary {
|
|
701
|
+
/** Subtotal of adjustment, before tax. */
|
|
702
|
+
subtotal?: Price;
|
|
703
|
+
/** Tax on adjustment. */
|
|
704
|
+
tax?: Price;
|
|
705
|
+
/** Total price after tax. */
|
|
706
|
+
total?: Price;
|
|
707
|
+
}
|
|
708
|
+
export interface PriceDescription {
|
|
709
|
+
/**
|
|
710
|
+
* __Required.__ Price description in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
|
|
711
|
+
* @minLength 1
|
|
712
|
+
* @maxLength 100
|
|
713
|
+
*/
|
|
714
|
+
original?: string;
|
|
715
|
+
/**
|
|
716
|
+
* Price description translated into the buyer's language.
|
|
717
|
+
*
|
|
718
|
+
* Default: Same as `original`.
|
|
719
|
+
* @minLength 1
|
|
720
|
+
* @maxLength 100
|
|
721
|
+
*/
|
|
722
|
+
translated?: string | null;
|
|
723
|
+
}
|
|
724
|
+
export interface LocationAndQuantity {
|
|
725
|
+
/**
|
|
726
|
+
* Location id in the associated owner app.
|
|
727
|
+
* @format GUID
|
|
728
|
+
*/
|
|
729
|
+
id?: string;
|
|
730
|
+
/**
|
|
731
|
+
* Location owner app, if not provided then the site business info locations will be used.
|
|
732
|
+
* @format GUID
|
|
733
|
+
* @deprecated Location owner app, if not provided then the site business info locations will be used.
|
|
734
|
+
* @targetRemovalDate 2025-03-01
|
|
735
|
+
*/
|
|
736
|
+
appId?: string | null;
|
|
737
|
+
/**
|
|
738
|
+
* Quantity for specific location.
|
|
739
|
+
* @min 1
|
|
740
|
+
* @max 100000
|
|
741
|
+
*/
|
|
742
|
+
quantity?: number;
|
|
743
|
+
/**
|
|
744
|
+
* Location name.
|
|
745
|
+
* @maxLength 500
|
|
746
|
+
* @readonly
|
|
747
|
+
*/
|
|
748
|
+
name?: string | null;
|
|
749
|
+
}
|
|
750
|
+
export interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {
|
|
751
|
+
/** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
|
|
752
|
+
addressType?: TaxableAddressType;
|
|
753
|
+
}
|
|
754
|
+
/** @oneof */
|
|
755
|
+
export interface TaxableAddressTaxableAddressDataOneOf {
|
|
756
|
+
/** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
|
|
757
|
+
addressType?: TaxableAddressType;
|
|
758
|
+
}
|
|
759
|
+
export declare enum TaxableAddressType {
|
|
760
|
+
UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS",
|
|
761
|
+
BUSINESS = "BUSINESS",
|
|
762
|
+
BILLING = "BILLING",
|
|
763
|
+
SHIPPING = "SHIPPING"
|
|
764
|
+
}
|
|
765
|
+
export interface ExtendedFields {
|
|
766
|
+
/**
|
|
767
|
+
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
768
|
+
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
769
|
+
*
|
|
770
|
+
* You can only access fields for which you have the appropriate permissions.
|
|
771
|
+
*
|
|
772
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
773
|
+
*/
|
|
774
|
+
namespaces?: Record<string, Record<string, any>>;
|
|
775
|
+
}
|
|
776
|
+
/** Buyer Info */
|
|
777
|
+
export interface BuyerInfo extends BuyerInfoIdOneOf {
|
|
778
|
+
/**
|
|
779
|
+
* Visitor ID (if site visitor is not a member).
|
|
780
|
+
* @format GUID
|
|
781
|
+
*/
|
|
782
|
+
visitorId?: string;
|
|
783
|
+
/**
|
|
784
|
+
* Member ID (if site visitor is a site member).
|
|
785
|
+
* @format GUID
|
|
786
|
+
*/
|
|
787
|
+
memberId?: string;
|
|
788
|
+
/**
|
|
789
|
+
* Contact ID. Auto-created if one does not yet exist. For more information, see [Contacts API](https://dev.wix.com/api/rest/contacts/contacts/introduction).
|
|
790
|
+
* @format GUID
|
|
791
|
+
*/
|
|
792
|
+
contactId?: string | null;
|
|
793
|
+
/**
|
|
794
|
+
* Buyer email address.
|
|
795
|
+
* @format EMAIL
|
|
796
|
+
*/
|
|
797
|
+
email?: string | null;
|
|
798
|
+
}
|
|
799
|
+
/** @oneof */
|
|
800
|
+
export interface BuyerInfoIdOneOf {
|
|
801
|
+
/**
|
|
802
|
+
* Visitor ID (if site visitor is not a member).
|
|
803
|
+
* @format GUID
|
|
804
|
+
*/
|
|
805
|
+
visitorId?: string;
|
|
806
|
+
/**
|
|
807
|
+
* Member ID (if site visitor is a site member).
|
|
808
|
+
* @format GUID
|
|
809
|
+
*/
|
|
810
|
+
memberId?: string;
|
|
811
|
+
}
|
|
812
|
+
export declare enum WeightUnit {
|
|
813
|
+
/** Weight unit can't be classified due to an error. */
|
|
814
|
+
UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
|
|
815
|
+
/** Kilograms. */
|
|
816
|
+
KG = "KG",
|
|
817
|
+
/** Pounds. */
|
|
818
|
+
LB = "LB"
|
|
819
|
+
}
|
|
820
|
+
export interface CurrencyConversionDetails {
|
|
821
|
+
/**
|
|
822
|
+
* Original currency used to calculate the pricing before conversion to payment currency set on the order [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes) format.
|
|
823
|
+
* @readonly
|
|
824
|
+
* @immutable
|
|
825
|
+
* @format CURRENCY
|
|
826
|
+
*/
|
|
827
|
+
originalCurrency?: string | null;
|
|
828
|
+
/**
|
|
829
|
+
* The rate used when converting from the original currency to the payment currency.
|
|
830
|
+
* @readonly
|
|
831
|
+
* @immutable
|
|
832
|
+
* @decimalValue options { gt:0, lte:1000000000000000 }
|
|
833
|
+
*/
|
|
834
|
+
conversionRate?: string | null;
|
|
835
|
+
}
|
|
836
|
+
export interface PriceSummary {
|
|
837
|
+
/** Subtotal of all the line items, before discounts and before tax. */
|
|
838
|
+
subtotal?: Price;
|
|
839
|
+
/** Total shipping price, before discounts and before tax. */
|
|
840
|
+
shipping?: Price;
|
|
841
|
+
/** Total tax on this order. */
|
|
842
|
+
tax?: Price;
|
|
843
|
+
/** Total calculated discount value. */
|
|
844
|
+
discount?: Price;
|
|
845
|
+
/** Order’s total price after discounts and tax. */
|
|
846
|
+
total?: Price;
|
|
847
|
+
/** Total price of additional fees before tax. */
|
|
848
|
+
totalAdditionalFees?: Price;
|
|
849
|
+
}
|
|
850
|
+
/** Billing Info and shipping details */
|
|
851
|
+
export interface AddressWithContact {
|
|
852
|
+
/** Address. */
|
|
853
|
+
address?: Address;
|
|
854
|
+
/** Contact details. */
|
|
855
|
+
contactDetails?: FullAddressContactDetails;
|
|
856
|
+
}
|
|
857
|
+
/** Physical address */
|
|
858
|
+
export interface Address {
|
|
859
|
+
/**
|
|
860
|
+
* Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
|
|
861
|
+
* @format COUNTRY
|
|
862
|
+
*/
|
|
863
|
+
country?: string | null;
|
|
864
|
+
/**
|
|
865
|
+
* Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.
|
|
866
|
+
* @maxLength 50
|
|
867
|
+
*/
|
|
868
|
+
subdivision?: string | null;
|
|
869
|
+
/**
|
|
870
|
+
* City name.
|
|
871
|
+
* @maxLength 50
|
|
872
|
+
*/
|
|
873
|
+
city?: string | null;
|
|
874
|
+
/**
|
|
875
|
+
* Postal or zip code.
|
|
876
|
+
* @maxLength 50
|
|
877
|
+
*/
|
|
878
|
+
postalCode?: string | null;
|
|
879
|
+
/** Street address. */
|
|
880
|
+
streetAddress?: StreetAddress;
|
|
881
|
+
/**
|
|
882
|
+
* Main address line (usually street name and number).
|
|
883
|
+
* @maxLength 150
|
|
884
|
+
*/
|
|
885
|
+
addressLine?: string | null;
|
|
886
|
+
/**
|
|
887
|
+
* Free text providing more detailed address info. Usually contains apt, suite, floor.
|
|
888
|
+
* @maxLength 100
|
|
889
|
+
*/
|
|
890
|
+
addressLine2?: string | null;
|
|
891
|
+
/**
|
|
892
|
+
* Country's full name.
|
|
893
|
+
* @readonly
|
|
894
|
+
*/
|
|
895
|
+
countryFullname?: string | null;
|
|
896
|
+
/**
|
|
897
|
+
* Subdivision full-name.
|
|
898
|
+
* @readonly
|
|
899
|
+
*/
|
|
900
|
+
subdivisionFullname?: string | null;
|
|
901
|
+
}
|
|
902
|
+
export interface StreetAddress {
|
|
903
|
+
/** Street number. */
|
|
904
|
+
number?: string;
|
|
905
|
+
/** Street name. */
|
|
906
|
+
name?: string;
|
|
907
|
+
}
|
|
908
|
+
export interface AddressLocation {
|
|
909
|
+
/** Address latitude. */
|
|
910
|
+
latitude?: number | null;
|
|
911
|
+
/** Address longitude. */
|
|
912
|
+
longitude?: number | null;
|
|
913
|
+
}
|
|
914
|
+
/** Full contact details for an address */
|
|
915
|
+
export interface FullAddressContactDetails {
|
|
916
|
+
/**
|
|
917
|
+
* First name.
|
|
918
|
+
* @maxLength 100
|
|
919
|
+
*/
|
|
920
|
+
firstName?: string | null;
|
|
921
|
+
/**
|
|
922
|
+
* Last name.
|
|
923
|
+
* @maxLength 100
|
|
924
|
+
*/
|
|
925
|
+
lastName?: string | null;
|
|
926
|
+
/**
|
|
927
|
+
* Phone number.
|
|
928
|
+
* @format PHONE
|
|
929
|
+
*/
|
|
930
|
+
phone?: string | null;
|
|
931
|
+
/**
|
|
932
|
+
* Company name.
|
|
933
|
+
* @maxLength 1000
|
|
934
|
+
*/
|
|
935
|
+
company?: string | null;
|
|
936
|
+
/** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
|
|
937
|
+
vatId?: VatId;
|
|
938
|
+
}
|
|
939
|
+
export interface VatId {
|
|
940
|
+
/** Customer's tax ID. */
|
|
941
|
+
id?: string;
|
|
942
|
+
/**
|
|
943
|
+
* Tax type.
|
|
944
|
+
*
|
|
945
|
+
* Supported values:
|
|
946
|
+
* + `CPF`: for individual tax payers
|
|
947
|
+
* + `CNPJ`: for corporations
|
|
948
|
+
*/
|
|
949
|
+
type?: VatType;
|
|
950
|
+
}
|
|
951
|
+
/** tax info types */
|
|
952
|
+
export declare enum VatType {
|
|
953
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
954
|
+
/** CPF - for individual tax payers. */
|
|
955
|
+
CPF = "CPF",
|
|
956
|
+
/** CNPJ - for corporations */
|
|
957
|
+
CNPJ = "CNPJ"
|
|
958
|
+
}
|
|
959
|
+
export interface ShippingInformation {
|
|
960
|
+
/**
|
|
961
|
+
* App Def Id of external provider which was a source of shipping info
|
|
962
|
+
* @minLength 1
|
|
963
|
+
* @maxLength 100
|
|
964
|
+
*/
|
|
965
|
+
carrierId?: string | null;
|
|
966
|
+
/**
|
|
967
|
+
* Unique code (or ID) of selected shipping option. For example, `"usps_std_overnight"`.
|
|
968
|
+
* @minLength 1
|
|
969
|
+
* @maxLength 100
|
|
970
|
+
*/
|
|
971
|
+
code?: string | null;
|
|
972
|
+
/**
|
|
973
|
+
* Shipping option title.
|
|
974
|
+
* For example, `"USPS Standard Overnight Delivery"`, `"Standard"` or `"First-Class Package International"`.
|
|
975
|
+
* @maxLength 250
|
|
976
|
+
*/
|
|
977
|
+
title?: string;
|
|
978
|
+
/** Shipping logistics. */
|
|
979
|
+
logistics?: DeliveryLogistics;
|
|
980
|
+
/** Shipping costs. */
|
|
981
|
+
cost?: ShippingPrice;
|
|
982
|
+
/** Shipping region. */
|
|
983
|
+
region?: ShippingRegion;
|
|
984
|
+
}
|
|
985
|
+
export interface DeliveryLogistics extends DeliveryLogisticsAddressOneOf {
|
|
986
|
+
/** Shipping address and contact details. */
|
|
987
|
+
shippingDestination?: AddressWithContact;
|
|
988
|
+
/** Pickup details. */
|
|
989
|
+
pickupDetails?: PickupDetails;
|
|
990
|
+
/**
|
|
991
|
+
* Expected delivery time in free text. For example, `"3-5 business days"`.
|
|
992
|
+
* @maxLength 500
|
|
993
|
+
*/
|
|
994
|
+
deliveryTime?: string | null;
|
|
995
|
+
/**
|
|
996
|
+
* Instructions for carrier. For example, `"Please knock on the door. If unanswered, please call contact number. Thanks."`.
|
|
997
|
+
* @maxLength 1000
|
|
998
|
+
*/
|
|
999
|
+
instructions?: string | null;
|
|
1000
|
+
/**
|
|
1001
|
+
* Deprecated - Latest expected delivery date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
|
|
1002
|
+
* @deprecated
|
|
1003
|
+
*/
|
|
1004
|
+
deliverByDate?: Date | null;
|
|
1005
|
+
/** Expected delivery time. */
|
|
1006
|
+
deliveryTimeSlot?: DeliveryTimeSlot;
|
|
1007
|
+
}
|
|
1008
|
+
/** @oneof */
|
|
1009
|
+
export interface DeliveryLogisticsAddressOneOf {
|
|
1010
|
+
/** Shipping address and contact details. */
|
|
1011
|
+
shippingDestination?: AddressWithContact;
|
|
1012
|
+
/** Pickup details. */
|
|
1013
|
+
pickupDetails?: PickupDetails;
|
|
1014
|
+
}
|
|
1015
|
+
export interface PickupDetails {
|
|
1016
|
+
/** Pickup address. */
|
|
1017
|
+
address?: PickupAddress;
|
|
1018
|
+
/** Pickup method */
|
|
1019
|
+
pickupMethod?: PickupMethod;
|
|
1020
|
+
}
|
|
1021
|
+
/** Physical address */
|
|
1022
|
+
export interface PickupAddress {
|
|
1023
|
+
/**
|
|
1024
|
+
* Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
|
|
1025
|
+
* @format COUNTRY
|
|
1026
|
+
*/
|
|
1027
|
+
country?: string | null;
|
|
1028
|
+
/**
|
|
1029
|
+
* Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.
|
|
1030
|
+
* @maxLength 50
|
|
1031
|
+
*/
|
|
1032
|
+
subdivision?: string | null;
|
|
1033
|
+
/**
|
|
1034
|
+
* City name.
|
|
1035
|
+
* @maxLength 1000
|
|
1036
|
+
*/
|
|
1037
|
+
city?: string | null;
|
|
1038
|
+
/**
|
|
1039
|
+
* Postal or zip code.
|
|
1040
|
+
* @maxLength 1000
|
|
1041
|
+
*/
|
|
1042
|
+
postalCode?: string | null;
|
|
1043
|
+
/** Street address object, with number, name, and apartment number in separate fields. */
|
|
1044
|
+
streetAddress?: StreetAddress;
|
|
1045
|
+
/**
|
|
1046
|
+
* Main address line (usually street name and number).
|
|
1047
|
+
* @maxLength 1000
|
|
1048
|
+
*/
|
|
1049
|
+
addressLine?: string | null;
|
|
1050
|
+
/**
|
|
1051
|
+
* Free text providing more detailed address info. Usually contains apt, suite, floor.
|
|
1052
|
+
* @maxLength 1000
|
|
1053
|
+
*/
|
|
1054
|
+
addressLine2?: string | null;
|
|
1055
|
+
/**
|
|
1056
|
+
* Country's full name.
|
|
1057
|
+
* @readonly
|
|
1058
|
+
*/
|
|
1059
|
+
countryFullname?: string | null;
|
|
1060
|
+
/**
|
|
1061
|
+
* Subdivision full-name.
|
|
1062
|
+
* @readonly
|
|
1063
|
+
*/
|
|
1064
|
+
subdivisionFullname?: string | null;
|
|
1065
|
+
}
|
|
1066
|
+
export declare enum PickupMethod {
|
|
1067
|
+
UNKNOWN_METHOD = "UNKNOWN_METHOD",
|
|
1068
|
+
STORE_PICKUP = "STORE_PICKUP",
|
|
1069
|
+
PICKUP_POINT = "PICKUP_POINT"
|
|
1070
|
+
}
|
|
1071
|
+
export interface DeliveryTimeSlot {
|
|
1072
|
+
/** Delivery slot starting time. */
|
|
1073
|
+
from?: Date | null;
|
|
1074
|
+
/** Delivery slot ending time. */
|
|
1075
|
+
to?: Date | null;
|
|
1076
|
+
}
|
|
1077
|
+
export interface ShippingPrice {
|
|
1078
|
+
/** Shipping price for display purposes. */
|
|
1079
|
+
price?: Price;
|
|
1080
|
+
/**
|
|
1081
|
+
* Total price of shipping after discounts (when relevant), and before tax.
|
|
1082
|
+
* @readonly
|
|
1083
|
+
*/
|
|
1084
|
+
totalPriceBeforeTax?: Price;
|
|
1085
|
+
/**
|
|
1086
|
+
* Shipping price after all discounts (if any exist), and after tax.
|
|
1087
|
+
* @readonly
|
|
1088
|
+
*/
|
|
1089
|
+
totalPriceAfterTax?: Price;
|
|
1090
|
+
/** Tax details. */
|
|
1091
|
+
taxDetails?: ItemTaxFullDetails;
|
|
1092
|
+
/**
|
|
1093
|
+
* Shipping discount before tax.
|
|
1094
|
+
* @readonly
|
|
1095
|
+
*/
|
|
1096
|
+
discount?: Price;
|
|
1097
|
+
}
|
|
1098
|
+
export interface ShippingRegion {
|
|
1099
|
+
/**
|
|
1100
|
+
* Name of shipping region. For example, `"Metropolitan London"`, or `"Outer Melbourne suburbs"`.
|
|
1101
|
+
* @maxLength 100
|
|
1102
|
+
*/
|
|
1103
|
+
name?: string | null;
|
|
1104
|
+
}
|
|
1105
|
+
export interface OrderTaxInfo {
|
|
1106
|
+
/** Calculated tax, added from line items. */
|
|
1107
|
+
totalTax?: Price;
|
|
1108
|
+
/**
|
|
1109
|
+
* The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate.
|
|
1110
|
+
* @maxSize 50
|
|
1111
|
+
*/
|
|
1112
|
+
taxBreakdown?: OrderTaxBreakdown[];
|
|
1113
|
+
/**
|
|
1114
|
+
* Whether the order is exempt from tax calculations.
|
|
1115
|
+
*
|
|
1116
|
+
* Default: `false`
|
|
1117
|
+
* @readonly
|
|
1118
|
+
*/
|
|
1119
|
+
taxExempt?: boolean | null;
|
|
1120
|
+
}
|
|
1121
|
+
/**
|
|
1122
|
+
* The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate.
|
|
1123
|
+
* Tax breakdown is the tax amount split to the tax authorities that applied on the line item.
|
|
1124
|
+
*/
|
|
1125
|
+
export interface OrderTaxBreakdown {
|
|
1126
|
+
/**
|
|
1127
|
+
* The name of the tax against which this tax amount was calculated.
|
|
1128
|
+
* @maxLength 200
|
|
1129
|
+
*/
|
|
1130
|
+
taxName?: string;
|
|
1131
|
+
/**
|
|
1132
|
+
* The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws.
|
|
1133
|
+
* @maxLength 200
|
|
1134
|
+
*/
|
|
1135
|
+
taxType?: string;
|
|
1136
|
+
/**
|
|
1137
|
+
* The name of the jurisdiction in which this tax detail applies.
|
|
1138
|
+
* @maxLength 200
|
|
1139
|
+
*/
|
|
1140
|
+
jurisdiction?: string;
|
|
1141
|
+
/** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
|
|
1142
|
+
jurisdictionType?: JurisdictionType;
|
|
1143
|
+
/**
|
|
1144
|
+
* The rate at which this tax detail was calculated.
|
|
1145
|
+
* @format DECIMAL_VALUE
|
|
1146
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
1147
|
+
*/
|
|
1148
|
+
rate?: string;
|
|
1149
|
+
/** The sum of all the tax from line items that calculated by the tax identifiers. */
|
|
1150
|
+
aggregatedTaxAmount?: Price;
|
|
1151
|
+
}
|
|
1152
|
+
export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
|
|
1153
|
+
/** Applied coupon info. */
|
|
1154
|
+
coupon?: Coupon;
|
|
1155
|
+
/** Merchant discount. */
|
|
1156
|
+
merchantDiscount?: MerchantDiscount;
|
|
1157
|
+
/** Automatic Discount */
|
|
1158
|
+
discountRule?: DiscountRule;
|
|
1159
|
+
/**
|
|
1160
|
+
* Discount type.
|
|
1161
|
+
* * `"GLOBAL"` - discount applies to entire order.
|
|
1162
|
+
* * `"SPECIFIC-ITEMS"` - discount applies to specific items.
|
|
1163
|
+
* * `"SHIPPING"` - discount applies to shipping. For example, free shipping.
|
|
1164
|
+
*/
|
|
1165
|
+
discountType?: DiscountType;
|
|
1166
|
+
/**
|
|
1167
|
+
* IDs of line items discount applies to.
|
|
1168
|
+
* Deprecated. Use `line_item_discounts` instead.
|
|
1169
|
+
* @format GUID
|
|
1170
|
+
* @maxSize 1
|
|
1171
|
+
* @deprecated IDs of line items discount applies to.
|
|
1172
|
+
* Deprecated. Use `line_item_discounts` instead.
|
|
1173
|
+
* @replacedBy line_item_discounts
|
|
1174
|
+
* @targetRemovalDate 2024-10-30
|
|
1175
|
+
*/
|
|
1176
|
+
lineItemIds?: string[];
|
|
1177
|
+
/**
|
|
1178
|
+
* Discount id.
|
|
1179
|
+
* @format GUID
|
|
1180
|
+
* @immutable
|
|
1181
|
+
*/
|
|
1182
|
+
id?: string | null;
|
|
1183
|
+
}
|
|
1184
|
+
/** @oneof */
|
|
1185
|
+
export interface AppliedDiscountDiscountSourceOneOf {
|
|
1186
|
+
/** Applied coupon info. */
|
|
1187
|
+
coupon?: Coupon;
|
|
1188
|
+
/** Merchant discount. */
|
|
1189
|
+
merchantDiscount?: MerchantDiscount;
|
|
1190
|
+
/** Automatic Discount */
|
|
1191
|
+
discountRule?: DiscountRule;
|
|
1192
|
+
}
|
|
1193
|
+
export declare enum DiscountType {
|
|
1194
|
+
GLOBAL = "GLOBAL",
|
|
1195
|
+
SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
|
|
1196
|
+
SHIPPING = "SHIPPING"
|
|
1197
|
+
}
|
|
1198
|
+
/** Coupon */
|
|
1199
|
+
export interface Coupon {
|
|
1200
|
+
/** Coupon ID. */
|
|
1201
|
+
id?: string;
|
|
1202
|
+
/** Coupon code. */
|
|
1203
|
+
code?: string;
|
|
1204
|
+
/** Coupon name. */
|
|
1205
|
+
name?: string;
|
|
1206
|
+
/** Coupon value. */
|
|
1207
|
+
amount?: Price;
|
|
1208
|
+
}
|
|
1209
|
+
export interface MerchantDiscount extends MerchantDiscountMerchantDiscountReasonOneOf {
|
|
1210
|
+
/**
|
|
1211
|
+
* Pre-defined discount reason (optional).
|
|
1212
|
+
* * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange.
|
|
1213
|
+
*/
|
|
1214
|
+
discountReason?: DiscountReason;
|
|
1215
|
+
/**
|
|
1216
|
+
* Discount description as free text (optional).
|
|
1217
|
+
* @maxLength 200
|
|
1218
|
+
*/
|
|
1219
|
+
description?: string | null;
|
|
1220
|
+
/** Discount amount. */
|
|
1221
|
+
amount?: Price;
|
|
1222
|
+
}
|
|
1223
|
+
/** @oneof */
|
|
1224
|
+
export interface MerchantDiscountMerchantDiscountReasonOneOf {
|
|
1225
|
+
/**
|
|
1226
|
+
* Pre-defined discount reason (optional).
|
|
1227
|
+
* * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange.
|
|
1228
|
+
*/
|
|
1229
|
+
discountReason?: DiscountReason;
|
|
1230
|
+
/**
|
|
1231
|
+
* Discount description as free text (optional).
|
|
1232
|
+
* @maxLength 200
|
|
1233
|
+
*/
|
|
1234
|
+
description?: string | null;
|
|
1235
|
+
}
|
|
1236
|
+
export declare enum DiscountReason {
|
|
1237
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
1238
|
+
EXCHANGED_ITEMS = "EXCHANGED_ITEMS",
|
|
1239
|
+
BILLING_ADJUSTMENT = "BILLING_ADJUSTMENT"
|
|
1240
|
+
}
|
|
1241
|
+
export interface DiscountRule {
|
|
1242
|
+
/**
|
|
1243
|
+
* Discount rule ID
|
|
1244
|
+
* @format GUID
|
|
1245
|
+
*/
|
|
1246
|
+
id?: string;
|
|
1247
|
+
/** Discount rule name */
|
|
1248
|
+
name?: DiscountRuleName;
|
|
1249
|
+
/** Discount value. */
|
|
1250
|
+
amount?: Price;
|
|
1251
|
+
}
|
|
1252
|
+
export interface DiscountRuleName {
|
|
1253
|
+
/**
|
|
1254
|
+
* Original discount rule name (in site's default language).
|
|
1255
|
+
* @minLength 1
|
|
1256
|
+
* @maxLength 256
|
|
1257
|
+
*/
|
|
1258
|
+
original?: string;
|
|
1259
|
+
/**
|
|
1260
|
+
* Translated discount rule name according to buyer language. Defaults to `original` when not provided.
|
|
1261
|
+
* @minLength 1
|
|
1262
|
+
* @maxLength 500
|
|
1263
|
+
*/
|
|
1264
|
+
translated?: string | null;
|
|
1265
|
+
}
|
|
1266
|
+
export interface LineItemDiscount {
|
|
1267
|
+
/**
|
|
1268
|
+
* ID of line item the discount applies to.
|
|
1269
|
+
* @format GUID
|
|
1270
|
+
*/
|
|
1271
|
+
id?: string;
|
|
1272
|
+
/** Total discount for this line item. */
|
|
1273
|
+
totalDiscount?: Price;
|
|
1274
|
+
}
|
|
1275
|
+
export interface ChannelInfo {
|
|
1276
|
+
/** Sales channel that submitted the order. */
|
|
1277
|
+
type?: ChannelType;
|
|
1278
|
+
/**
|
|
1279
|
+
* Reference to an order ID from an external system.
|
|
1280
|
+
* @maxLength 100
|
|
1281
|
+
*/
|
|
1282
|
+
externalOrderId?: string | null;
|
|
1283
|
+
/**
|
|
1284
|
+
* URL to the order in the external system.
|
|
1285
|
+
* @maxLength 300
|
|
1286
|
+
*/
|
|
1287
|
+
externalOrderUrl?: string | null;
|
|
1288
|
+
}
|
|
1289
|
+
export declare enum ChannelType {
|
|
1290
|
+
/** Unspecified sales channel. This value is not supported. */
|
|
1291
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
1292
|
+
/** A web client. */
|
|
1293
|
+
WEB = "WEB",
|
|
1294
|
+
/** [Point of sale solutions](https://support.wix.com/en/wix-mobile-pos-2196395). */
|
|
1295
|
+
POS = "POS",
|
|
1296
|
+
/** [eBay shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-ebay-shop). */
|
|
1297
|
+
EBAY = "EBAY",
|
|
1298
|
+
/** [Amazon shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-amazon-shop). */
|
|
1299
|
+
AMAZON = "AMAZON",
|
|
1300
|
+
/** Other sales platform. */
|
|
1301
|
+
OTHER_PLATFORM = "OTHER_PLATFORM",
|
|
1302
|
+
/** [Wix Owner app](https://support.wix.com/article/wix-owner-app-an-overview). */
|
|
1303
|
+
WIX_APP_STORE = "WIX_APP_STORE",
|
|
1304
|
+
/** Wix Invoices app in [your dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Finvoices/settings/general-settings) */
|
|
1305
|
+
WIX_INVOICES = "WIX_INVOICES",
|
|
1306
|
+
/** Wix merchant backoffice. */
|
|
1307
|
+
BACKOFFICE_MERCHANT = "BACKOFFICE_MERCHANT",
|
|
1308
|
+
/** Wish sales channel. */
|
|
1309
|
+
WISH = "WISH",
|
|
1310
|
+
/** [ClassPass sales channel](https://support.wix.com/en/article/wix-bookings-letting-clients-book-your-services-with-classpass). */
|
|
1311
|
+
CLASS_PASS = "CLASS_PASS",
|
|
1312
|
+
/** Global-E sales channel. */
|
|
1313
|
+
GLOBAL_E = "GLOBAL_E",
|
|
1314
|
+
/** [Facebook shop](https://support.wix.com/en/article/wix-stores-changes-to-facebook-shops). */
|
|
1315
|
+
FACEBOOK = "FACEBOOK",
|
|
1316
|
+
/** [Etsy sales channel](https://support.wix.com/en/article/wix-stores-request-adding-etsy-as-a-sales-channel). */
|
|
1317
|
+
ETSY = "ETSY",
|
|
1318
|
+
/** [TikTok sales channel](https://support.wix.com/en/article/wix-stores-request-adding-tiktok-as-a-sales-channel). */
|
|
1319
|
+
TIKTOK = "TIKTOK",
|
|
1320
|
+
/** [Faire marketplace integration](https://support.wix.com/en/article/wix-stores-creating-a-faire-store-using-the-faire-integration-app). */
|
|
1321
|
+
FAIRE_COM = "FAIRE_COM"
|
|
1322
|
+
}
|
|
1323
|
+
export interface CustomField {
|
|
1324
|
+
/** Custom field value. */
|
|
1325
|
+
value?: any;
|
|
1326
|
+
/**
|
|
1327
|
+
* Custom field title.
|
|
1328
|
+
* @minLength 1
|
|
1329
|
+
* @maxLength 500
|
|
1330
|
+
*/
|
|
1331
|
+
title?: string;
|
|
1332
|
+
/**
|
|
1333
|
+
* Translated custom field title.
|
|
1334
|
+
* @minLength 1
|
|
1335
|
+
* @maxLength 500
|
|
1336
|
+
*/
|
|
1337
|
+
translatedTitle?: string | null;
|
|
1338
|
+
}
|
|
1339
|
+
export interface V1SubscriptionTitle {
|
|
1340
|
+
/**
|
|
1341
|
+
* Subscription option name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
|
|
1342
|
+
* @minLength 1
|
|
1343
|
+
* @maxLength 150
|
|
1344
|
+
*/
|
|
1345
|
+
original?: string;
|
|
1346
|
+
/**
|
|
1347
|
+
* Subscription option name translated into the buyer's language.
|
|
1348
|
+
*
|
|
1349
|
+
* Default: Same as `original`.
|
|
1350
|
+
* @minLength 1
|
|
1351
|
+
* @maxLength 150
|
|
1352
|
+
*/
|
|
1353
|
+
translated?: string | null;
|
|
1354
|
+
}
|
|
1355
|
+
export interface AdditionalFee {
|
|
1356
|
+
/**
|
|
1357
|
+
* Additional fee's unique code for future processing.
|
|
1358
|
+
* @minLength 1
|
|
1359
|
+
* @maxLength 100
|
|
1360
|
+
*/
|
|
1361
|
+
code?: string | null;
|
|
1362
|
+
/**
|
|
1363
|
+
* Name of additional fee.
|
|
1364
|
+
* @minLength 1
|
|
1365
|
+
* @maxLength 50
|
|
1366
|
+
*/
|
|
1367
|
+
name?: string;
|
|
1368
|
+
/** Additional fee's price. */
|
|
1369
|
+
price?: Price;
|
|
1370
|
+
/** Tax details. */
|
|
1371
|
+
taxDetails?: ItemTaxFullDetails;
|
|
1372
|
+
/**
|
|
1373
|
+
* SPI implementer's `appId`.
|
|
1374
|
+
* @format GUID
|
|
1375
|
+
*/
|
|
1376
|
+
providerAppId?: string | null;
|
|
1377
|
+
/** Additional fee's price before tax. */
|
|
1378
|
+
priceBeforeTax?: Price;
|
|
1379
|
+
/** Additional fee's price after tax. */
|
|
1380
|
+
priceAfterTax?: Price;
|
|
1381
|
+
/**
|
|
1382
|
+
* Additional fee's id.
|
|
1383
|
+
* @format GUID
|
|
1384
|
+
* @immutable
|
|
1385
|
+
*/
|
|
1386
|
+
id?: string;
|
|
1387
|
+
/**
|
|
1388
|
+
* Optional - Line items associated with this additional fee.
|
|
1389
|
+
* If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order.
|
|
1390
|
+
* @format GUID
|
|
1391
|
+
*/
|
|
1392
|
+
lineItemIds?: string[];
|
|
1393
|
+
}
|
|
1394
|
+
export interface Location {
|
|
1395
|
+
/**
|
|
1396
|
+
* Location ID.
|
|
1397
|
+
* Learn more about the [Wix Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).
|
|
1398
|
+
* @format GUID
|
|
1399
|
+
*/
|
|
1400
|
+
id?: string;
|
|
1401
|
+
/**
|
|
1402
|
+
* Location name.
|
|
1403
|
+
* @minLength 1
|
|
1404
|
+
* @maxLength 500
|
|
1405
|
+
* @readonly
|
|
1406
|
+
*/
|
|
1407
|
+
name?: string;
|
|
1408
|
+
}
|
|
1409
|
+
export interface CreateSubscriptionContractRequest {
|
|
1410
|
+
/** SubscriptionContract to be created. */
|
|
1411
|
+
subscriptionContract?: SubscriptionContract;
|
|
1412
|
+
}
|
|
1413
|
+
export interface CreateSubscriptionContractResponse {
|
|
1414
|
+
/** The created SubscriptionContract. */
|
|
1415
|
+
subscriptionContract?: SubscriptionContract;
|
|
1416
|
+
}
|
|
1417
|
+
export interface GetSubscriptionContractRequest {
|
|
1418
|
+
/**
|
|
1419
|
+
* ID of the SubscriptionContract to retrieve.
|
|
1420
|
+
* @format GUID
|
|
1421
|
+
*/
|
|
1422
|
+
subscriptionContractId: string;
|
|
1423
|
+
}
|
|
1424
|
+
export interface GetSubscriptionContractResponse {
|
|
1425
|
+
/** The requested SubscriptionContract. */
|
|
1426
|
+
subscriptionContract?: SubscriptionContract;
|
|
1427
|
+
}
|
|
1428
|
+
export interface UpdateSubscriptionContractRequest {
|
|
1429
|
+
/** SubscriptionContract to be updated, may be partial. */
|
|
1430
|
+
subscriptionContract?: SubscriptionContract;
|
|
1431
|
+
}
|
|
1432
|
+
export interface UpdateSubscriptionContractResponse {
|
|
1433
|
+
/** Updated SubscriptionContract. */
|
|
1434
|
+
subscriptionContract?: SubscriptionContract;
|
|
1435
|
+
}
|
|
1436
|
+
export interface QuerySubscriptionContractsRequest {
|
|
1437
|
+
/** WQL expression. */
|
|
1438
|
+
query?: CursorQuery;
|
|
1439
|
+
}
|
|
1440
|
+
export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
1441
|
+
/** 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`. */
|
|
1442
|
+
cursorPaging?: CursorPaging;
|
|
1443
|
+
/**
|
|
1444
|
+
* Filter object in the following format:
|
|
1445
|
+
* `"filter" : {
|
|
1446
|
+
* "fieldName1": "value1",
|
|
1447
|
+
* "fieldName2":{"$operator":"value2"}
|
|
1448
|
+
* }`
|
|
1449
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
1450
|
+
* Learn more about the [filter format](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
1451
|
+
*/
|
|
1452
|
+
filter?: Record<string, any> | null;
|
|
1453
|
+
/**
|
|
1454
|
+
* Sort object in the following format:
|
|
1455
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
1456
|
+
* Learn more about the [sort format](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
1457
|
+
* @maxSize 5
|
|
1458
|
+
*/
|
|
1459
|
+
sort?: Sorting[];
|
|
1460
|
+
}
|
|
1461
|
+
/** @oneof */
|
|
1462
|
+
export interface CursorQueryPagingMethodOneOf {
|
|
1463
|
+
/** 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`. */
|
|
1464
|
+
cursorPaging?: CursorPaging;
|
|
1465
|
+
}
|
|
1466
|
+
export interface Sorting {
|
|
1467
|
+
/**
|
|
1468
|
+
* Name of the field to sort by.
|
|
1469
|
+
* @maxLength 512
|
|
1470
|
+
*/
|
|
1471
|
+
fieldName?: string;
|
|
1472
|
+
/** Sort order. */
|
|
1473
|
+
order?: SortOrder;
|
|
1474
|
+
}
|
|
1475
|
+
export declare enum SortOrder {
|
|
1476
|
+
ASC = "ASC",
|
|
1477
|
+
DESC = "DESC"
|
|
1478
|
+
}
|
|
1479
|
+
export interface CursorPaging {
|
|
1480
|
+
/**
|
|
1481
|
+
* Maximum number of items to return in the results.
|
|
1482
|
+
* @max 100
|
|
1483
|
+
*/
|
|
1484
|
+
limit?: number | null;
|
|
1485
|
+
/**
|
|
1486
|
+
* Pointer to the next or previous page in the list of results.
|
|
1487
|
+
*
|
|
1488
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
1489
|
+
* Not relevant for the first request.
|
|
1490
|
+
* @maxLength 16000
|
|
1491
|
+
*/
|
|
1492
|
+
cursor?: string | null;
|
|
1493
|
+
}
|
|
1494
|
+
export interface QuerySubscriptionContractsResponse {
|
|
1495
|
+
/** List of SubscriptionContracts. */
|
|
1496
|
+
subscriptionContracts?: SubscriptionContract[];
|
|
1497
|
+
/** Paging metadata */
|
|
1498
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
1499
|
+
}
|
|
1500
|
+
export interface CursorPagingMetadata {
|
|
1501
|
+
/** Number of items returned in the response. */
|
|
1502
|
+
count?: number | null;
|
|
1503
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
|
1504
|
+
cursors?: Cursors;
|
|
1505
|
+
/**
|
|
1506
|
+
* Whether there are more pages to retrieve following the current page.
|
|
1507
|
+
*
|
|
1508
|
+
* + `true`: Another page of results can be retrieved.
|
|
1509
|
+
* + `false`: This is the last page.
|
|
1510
|
+
*/
|
|
1511
|
+
hasNext?: boolean | null;
|
|
1512
|
+
}
|
|
1513
|
+
export interface Cursors {
|
|
1514
|
+
/**
|
|
1515
|
+
* Cursor string pointing to the next page in the list of results.
|
|
1516
|
+
* @maxLength 16000
|
|
1517
|
+
*/
|
|
1518
|
+
next?: string | null;
|
|
1519
|
+
/**
|
|
1520
|
+
* Cursor pointing to the previous page in the list of results.
|
|
1521
|
+
* @maxLength 16000
|
|
1522
|
+
*/
|
|
1523
|
+
prev?: string | null;
|
|
1524
|
+
}
|
|
1525
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
1526
|
+
createdEvent?: EntityCreatedEvent;
|
|
1527
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
1528
|
+
deletedEvent?: EntityDeletedEvent;
|
|
1529
|
+
actionEvent?: ActionEvent;
|
|
1530
|
+
/**
|
|
1531
|
+
* Unique event ID.
|
|
1532
|
+
* Allows clients to ignore duplicate webhooks.
|
|
1533
|
+
*/
|
|
1534
|
+
id?: string;
|
|
1535
|
+
/**
|
|
1536
|
+
* Assumes actions are also always typed to an entity_type
|
|
1537
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
1538
|
+
*/
|
|
1539
|
+
entityFqdn?: string;
|
|
1540
|
+
/**
|
|
1541
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
1542
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
1543
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
1544
|
+
*/
|
|
1545
|
+
slug?: string;
|
|
1546
|
+
/** ID of the entity associated with the event. */
|
|
1547
|
+
entityId?: string;
|
|
1548
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
1549
|
+
eventTime?: Date | null;
|
|
1550
|
+
/**
|
|
1551
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
1552
|
+
* (for example, GDPR).
|
|
1553
|
+
*/
|
|
1554
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
1555
|
+
/** If present, indicates the action that triggered the event. */
|
|
1556
|
+
originatedFrom?: string | null;
|
|
1557
|
+
/**
|
|
1558
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
1559
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
1560
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
1561
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
1562
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
1563
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
1564
|
+
*/
|
|
1565
|
+
entityEventSequence?: string | null;
|
|
1566
|
+
}
|
|
1567
|
+
/** @oneof */
|
|
1568
|
+
export interface DomainEventBodyOneOf {
|
|
1569
|
+
createdEvent?: EntityCreatedEvent;
|
|
1570
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
1571
|
+
deletedEvent?: EntityDeletedEvent;
|
|
1572
|
+
actionEvent?: ActionEvent;
|
|
1573
|
+
}
|
|
1574
|
+
export interface EntityCreatedEvent {
|
|
1575
|
+
entityAsJson?: string;
|
|
1576
|
+
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
1577
|
+
restoreInfo?: RestoreInfo;
|
|
1578
|
+
}
|
|
1579
|
+
export interface RestoreInfo {
|
|
1580
|
+
deletedDate?: Date | null;
|
|
1581
|
+
}
|
|
1582
|
+
export interface EntityUpdatedEvent {
|
|
1583
|
+
/**
|
|
1584
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
1585
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
1586
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
1587
|
+
*/
|
|
1588
|
+
currentEntityAsJson?: string;
|
|
1589
|
+
}
|
|
1590
|
+
export interface EntityDeletedEvent {
|
|
1591
|
+
/** Entity that was deleted */
|
|
1592
|
+
deletedEntityAsJson?: string | null;
|
|
1593
|
+
}
|
|
1594
|
+
export interface ActionEvent {
|
|
1595
|
+
bodyAsJson?: string;
|
|
1596
|
+
}
|
|
1597
|
+
export interface Empty {
|
|
1598
|
+
}
|
|
1599
|
+
export interface MessageEnvelope {
|
|
1600
|
+
/**
|
|
1601
|
+
* App instance ID.
|
|
1602
|
+
* @format GUID
|
|
1603
|
+
*/
|
|
1604
|
+
instanceId?: string | null;
|
|
1605
|
+
/**
|
|
1606
|
+
* Event type.
|
|
1607
|
+
* @maxLength 150
|
|
1608
|
+
*/
|
|
1609
|
+
eventType?: string;
|
|
1610
|
+
/** The identification type and identity data. */
|
|
1611
|
+
identity?: IdentificationData;
|
|
1612
|
+
/** Stringify payload. */
|
|
1613
|
+
data?: string;
|
|
1614
|
+
}
|
|
1615
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1616
|
+
/**
|
|
1617
|
+
* ID of a site visitor that has not logged in to the site.
|
|
1618
|
+
* @format GUID
|
|
1619
|
+
*/
|
|
1620
|
+
anonymousVisitorId?: string;
|
|
1621
|
+
/**
|
|
1622
|
+
* ID of a site visitor that has logged in to the site.
|
|
1623
|
+
* @format GUID
|
|
1624
|
+
*/
|
|
1625
|
+
memberId?: string;
|
|
1626
|
+
/**
|
|
1627
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
1628
|
+
* @format GUID
|
|
1629
|
+
*/
|
|
1630
|
+
wixUserId?: string;
|
|
1631
|
+
/**
|
|
1632
|
+
* ID of an app.
|
|
1633
|
+
* @format GUID
|
|
1634
|
+
*/
|
|
1635
|
+
appId?: string;
|
|
1636
|
+
/** @readonly */
|
|
1637
|
+
identityType?: WebhookIdentityType;
|
|
1638
|
+
}
|
|
1639
|
+
/** @oneof */
|
|
1640
|
+
export interface IdentificationDataIdOneOf {
|
|
1641
|
+
/**
|
|
1642
|
+
* ID of a site visitor that has not logged in to the site.
|
|
1643
|
+
* @format GUID
|
|
1644
|
+
*/
|
|
1645
|
+
anonymousVisitorId?: string;
|
|
1646
|
+
/**
|
|
1647
|
+
* ID of a site visitor that has logged in to the site.
|
|
1648
|
+
* @format GUID
|
|
1649
|
+
*/
|
|
1650
|
+
memberId?: string;
|
|
1651
|
+
/**
|
|
1652
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
1653
|
+
* @format GUID
|
|
1654
|
+
*/
|
|
1655
|
+
wixUserId?: string;
|
|
1656
|
+
/**
|
|
1657
|
+
* ID of an app.
|
|
1658
|
+
* @format GUID
|
|
1659
|
+
*/
|
|
1660
|
+
appId?: string;
|
|
1661
|
+
}
|
|
1662
|
+
export declare enum WebhookIdentityType {
|
|
1663
|
+
UNKNOWN = "UNKNOWN",
|
|
1664
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1665
|
+
MEMBER = "MEMBER",
|
|
1666
|
+
WIX_USER = "WIX_USER",
|
|
1667
|
+
APP = "APP"
|
|
1668
|
+
}
|