@wix/auto_sdk_ecom_checkout 1.0.16 → 1.0.18

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.
Files changed (134) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/ecom-v1-checkout-checkout.context.d.ts +34 -0
  11. package/build/cjs/src/ecom-v1-checkout-checkout.context.js +77 -0
  12. package/build/cjs/src/ecom-v1-checkout-checkout.context.js.map +1 -0
  13. package/build/cjs/src/ecom-v1-checkout-checkout.http.d.ts +122 -0
  14. package/build/cjs/src/ecom-v1-checkout-checkout.http.js +1338 -0
  15. package/build/cjs/src/ecom-v1-checkout-checkout.http.js.map +1 -0
  16. package/build/cjs/src/ecom-v1-checkout-checkout.meta.d.ts +59 -0
  17. package/build/cjs/src/ecom-v1-checkout-checkout.meta.js +351 -0
  18. package/build/cjs/src/ecom-v1-checkout-checkout.meta.js.map +1 -0
  19. package/build/cjs/src/ecom-v1-checkout-checkout.public.d.ts +186 -0
  20. package/build/cjs/src/ecom-v1-checkout-checkout.public.js +358 -0
  21. package/build/cjs/src/ecom-v1-checkout-checkout.public.js.map +1 -0
  22. package/build/{ecom-v1-checkout-checkout.universal-C4Y04uL3.d.mts → cjs/src/ecom-v1-checkout-checkout.types.d.ts} +382 -658
  23. package/build/cjs/src/ecom-v1-checkout-checkout.types.js +301 -0
  24. package/build/cjs/src/ecom-v1-checkout-checkout.types.js.map +1 -0
  25. package/build/{internal/ecom-v1-checkout-checkout.universal-ClmAJ_ss.d.mts → cjs/src/ecom-v1-checkout-checkout.universal.d.ts} +743 -449
  26. package/build/cjs/src/ecom-v1-checkout-checkout.universal.js +1559 -0
  27. package/build/cjs/src/ecom-v1-checkout-checkout.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/ecom-v1-checkout-checkout.context.d.ts +34 -0
  39. package/build/es/src/ecom-v1-checkout-checkout.context.js +42 -0
  40. package/build/es/src/ecom-v1-checkout-checkout.context.js.map +1 -0
  41. package/build/es/src/ecom-v1-checkout-checkout.http.d.ts +122 -0
  42. package/build/es/src/ecom-v1-checkout-checkout.http.js +1318 -0
  43. package/build/es/src/ecom-v1-checkout-checkout.http.js.map +1 -0
  44. package/build/es/src/ecom-v1-checkout-checkout.meta.d.ts +59 -0
  45. package/build/es/src/ecom-v1-checkout-checkout.meta.js +308 -0
  46. package/build/es/src/ecom-v1-checkout-checkout.meta.js.map +1 -0
  47. package/build/es/src/ecom-v1-checkout-checkout.public.d.ts +186 -0
  48. package/build/es/src/ecom-v1-checkout-checkout.public.js +306 -0
  49. package/build/es/src/ecom-v1-checkout-checkout.public.js.map +1 -0
  50. package/build/{ecom-v1-checkout-checkout.universal-C4Y04uL3.d.ts → es/src/ecom-v1-checkout-checkout.types.d.ts} +382 -658
  51. package/build/es/src/ecom-v1-checkout-checkout.types.js +298 -0
  52. package/build/es/src/ecom-v1-checkout-checkout.types.js.map +1 -0
  53. package/build/{internal/ecom-v1-checkout-checkout.universal-ClmAJ_ss.d.ts → es/src/ecom-v1-checkout-checkout.universal.d.ts} +743 -449
  54. package/build/es/src/ecom-v1-checkout-checkout.universal.js +1516 -0
  55. package/build/es/src/ecom-v1-checkout-checkout.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/ecom-v1-checkout-checkout.context.d.ts +42 -0
  66. package/build/internal/cjs/src/ecom-v1-checkout-checkout.context.js +77 -0
  67. package/build/internal/cjs/src/ecom-v1-checkout-checkout.context.js.map +1 -0
  68. package/build/internal/cjs/src/ecom-v1-checkout-checkout.http.d.ts +122 -0
  69. package/build/internal/cjs/src/ecom-v1-checkout-checkout.http.js +1338 -0
  70. package/build/internal/cjs/src/ecom-v1-checkout-checkout.http.js.map +1 -0
  71. package/build/internal/cjs/src/ecom-v1-checkout-checkout.meta.d.ts +59 -0
  72. package/build/internal/cjs/src/ecom-v1-checkout-checkout.meta.js +351 -0
  73. package/build/internal/cjs/src/ecom-v1-checkout-checkout.meta.js.map +1 -0
  74. package/build/internal/cjs/src/ecom-v1-checkout-checkout.public.d.ts +219 -0
  75. package/build/internal/cjs/src/ecom-v1-checkout-checkout.public.js +358 -0
  76. package/build/internal/cjs/src/ecom-v1-checkout-checkout.public.js.map +1 -0
  77. package/build/internal/cjs/src/ecom-v1-checkout-checkout.types.d.ts +3406 -0
  78. package/build/internal/cjs/src/ecom-v1-checkout-checkout.types.js +301 -0
  79. package/build/internal/cjs/src/ecom-v1-checkout-checkout.types.js.map +1 -0
  80. package/build/internal/cjs/src/ecom-v1-checkout-checkout.universal.d.ts +4468 -0
  81. package/build/internal/cjs/src/ecom-v1-checkout-checkout.universal.js +1559 -0
  82. package/build/internal/cjs/src/ecom-v1-checkout-checkout.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/ecom-v1-checkout-checkout.context.d.ts +42 -0
  93. package/build/internal/es/src/ecom-v1-checkout-checkout.context.js +42 -0
  94. package/build/internal/es/src/ecom-v1-checkout-checkout.context.js.map +1 -0
  95. package/build/internal/es/src/ecom-v1-checkout-checkout.http.d.ts +122 -0
  96. package/build/internal/es/src/ecom-v1-checkout-checkout.http.js +1318 -0
  97. package/build/internal/es/src/ecom-v1-checkout-checkout.http.js.map +1 -0
  98. package/build/internal/es/src/ecom-v1-checkout-checkout.meta.d.ts +59 -0
  99. package/build/internal/es/src/ecom-v1-checkout-checkout.meta.js +308 -0
  100. package/build/internal/es/src/ecom-v1-checkout-checkout.meta.js.map +1 -0
  101. package/build/internal/es/src/ecom-v1-checkout-checkout.public.d.ts +219 -0
  102. package/build/internal/es/src/ecom-v1-checkout-checkout.public.js +306 -0
  103. package/build/internal/es/src/ecom-v1-checkout-checkout.public.js.map +1 -0
  104. package/build/internal/es/src/ecom-v1-checkout-checkout.types.d.ts +3406 -0
  105. package/build/internal/es/src/ecom-v1-checkout-checkout.types.js +298 -0
  106. package/build/internal/es/src/ecom-v1-checkout-checkout.types.js.map +1 -0
  107. package/build/internal/es/src/ecom-v1-checkout-checkout.universal.d.ts +4468 -0
  108. package/build/internal/es/src/ecom-v1-checkout-checkout.universal.js +1516 -0
  109. package/build/internal/es/src/ecom-v1-checkout-checkout.universal.js.map +1 -0
  110. package/package.json +11 -12
  111. package/build/index.d.mts +0 -211
  112. package/build/index.d.ts +0 -211
  113. package/build/index.js +0 -2781
  114. package/build/index.js.map +0 -1
  115. package/build/index.mjs +0 -2707
  116. package/build/index.mjs.map +0 -1
  117. package/build/internal/index.d.mts +0 -252
  118. package/build/internal/index.d.ts +0 -252
  119. package/build/internal/index.js +0 -2781
  120. package/build/internal/index.js.map +0 -1
  121. package/build/internal/index.mjs +0 -2707
  122. package/build/internal/index.mjs.map +0 -1
  123. package/build/internal/meta.d.mts +0 -2322
  124. package/build/internal/meta.d.ts +0 -2322
  125. package/build/internal/meta.js +0 -1587
  126. package/build/internal/meta.js.map +0 -1
  127. package/build/internal/meta.mjs +0 -1544
  128. package/build/internal/meta.mjs.map +0 -1
  129. package/build/meta.d.mts +0 -2322
  130. package/build/meta.d.ts +0 -2322
  131. package/build/meta.js +0 -1587
  132. package/build/meta.js.map +0 -1
  133. package/build/meta.mjs +0 -1544
  134. package/build/meta.mjs.map +0 -1
@@ -0,0 +1,3406 @@
1
+ export interface Checkout {
2
+ /**
3
+ * Checkout ID.
4
+ * @format GUID
5
+ * @readonly
6
+ */
7
+ id?: string | null;
8
+ /**
9
+ * Line items.
10
+ *
11
+ * Max: 300 items
12
+ * @minSize 1
13
+ * @maxSize 300
14
+ * @readonly
15
+ */
16
+ lineItems?: LineItem[];
17
+ /** Billing information. */
18
+ billingInfo?: AddressWithContact;
19
+ /** Shipping information. */
20
+ shippingInfo?: ShippingInfo;
21
+ /**
22
+ * [Buyer note](https://support.wix.com/en/article/collecting-and-viewing-buyer-notes) left by the customer.
23
+ * @maxLength 1000
24
+ */
25
+ buyerNote?: string | null;
26
+ /** Buyer information. */
27
+ buyerInfo?: BuyerInfo;
28
+ /**
29
+ * All converted prices are displayed in this currency in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
30
+ * @readonly
31
+ * @format CURRENCY
32
+ */
33
+ conversionCurrency?: string;
34
+ /**
35
+ * Calculated price summary for the checkout.
36
+ * @readonly
37
+ */
38
+ priceSummary?: PriceSummary;
39
+ /**
40
+ * Errors when calculating totals.
41
+ * @readonly
42
+ */
43
+ calculationErrors?: CalculationErrors;
44
+ /**
45
+ * Applied gift card details.
46
+ *
47
+ * >**Note:** Gift cards are supported through the Wix UI, though the service plugin is not currently available. Learn more about [Wix Gift Cards](https://support.wix.com/en/article/setting-up-wix-gift-cards-9451439).
48
+ * @readonly
49
+ */
50
+ giftCard?: GiftCard;
51
+ /**
52
+ * Applied discounts.
53
+ * @readonly
54
+ */
55
+ appliedDiscounts?: AppliedDiscount[];
56
+ /** Custom fields. */
57
+ customFields?: CustomField[];
58
+ /**
59
+ * Weight measurement unit. Defaults to a site's weight unit.
60
+ * @readonly
61
+ */
62
+ weightUnit?: WeightUnit;
63
+ /**
64
+ * Tax summary.
65
+ * @readonly
66
+ */
67
+ taxSummary?: TaxSummary;
68
+ /**
69
+ * The currency used when submitting the order.
70
+ * @format CURRENCY
71
+ * @readonly
72
+ */
73
+ currency?: string;
74
+ /**
75
+ * Sales channel that submitted the order.
76
+ * @readonly
77
+ */
78
+ channelType?: ChannelType;
79
+ /**
80
+ * Site language in which original values are shown.
81
+ * @readonly
82
+ */
83
+ siteLanguage?: string;
84
+ /**
85
+ * Language for communication with the buyer. Defaults to the site language.
86
+ * For a site that supports multiple languages, this is the language the buyer selected.
87
+ * @readonly
88
+ */
89
+ buyerLanguage?: string;
90
+ /**
91
+ * Whether an order was successfully created from this checkout.
92
+ * For an order to be successful, it must be successfully paid for (unless the total is 0).
93
+ * @readonly
94
+ */
95
+ completed?: boolean;
96
+ /**
97
+ * Whether tax is included in line item prices.
98
+ * @readonly
99
+ */
100
+ taxIncludedInPrice?: boolean;
101
+ /**
102
+ * ID of the checkout's initiator.
103
+ * @readonly
104
+ */
105
+ createdBy?: CreatedBy;
106
+ /**
107
+ * Date and time the checkout was created.
108
+ * @readonly
109
+ */
110
+ createdDate?: Date | null;
111
+ /**
112
+ * Date and time the checkout was updated.
113
+ * @readonly
114
+ */
115
+ updatedDate?: Date | null;
116
+ /**
117
+ * Minimal amount to pay in order to place the order.
118
+ * @readonly
119
+ */
120
+ payNow?: PriceSummary;
121
+ /**
122
+ * Remaining amount for the order to be fully paid.
123
+ * @readonly
124
+ */
125
+ payLater?: PriceSummary;
126
+ /** Memberships to apply when creating the order. */
127
+ membershipOptions?: MembershipOptions;
128
+ /**
129
+ * Additional Fees.
130
+ * @maxSize 100
131
+ */
132
+ additionalFees?: AdditionalFee[];
133
+ /**
134
+ * Cart ID that this checkout was created from. Empty if this checkout wasn't created from a cart.
135
+ * @format GUID
136
+ */
137
+ cartId?: string | null;
138
+ /**
139
+ * List of validation violations raised by the Validations service plugin ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/service-plugins/validations/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/service-plugins/validations-integration-service-plugin/introduction)).
140
+ * @readonly
141
+ */
142
+ violations?: Violation[];
143
+ /**
144
+ * Custom field data for the checkout object.
145
+ *
146
+ * [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.
147
+ */
148
+ extendedFields?: ExtendedFields;
149
+ /**
150
+ * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
151
+ * @format GUID
152
+ * @readonly
153
+ */
154
+ purchaseFlowId?: string | null;
155
+ /**
156
+ * Additional settings for customization of the checkout process.
157
+ *
158
+ * > **Notes:**
159
+ * > * Custom settings can only be set when creating a checkout.
160
+ * > * To access and manage custom checkout page content, your app must have the permission scope named "Manage eCommerce - Admin Permissions". Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
161
+ * @immutable
162
+ */
163
+ customSettings?: CustomSettings;
164
+ /**
165
+ * Reference IDs for the app and component providing custom checkout page content.
166
+ *
167
+ * To access and manage custom checkout page content, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
168
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
169
+ */
170
+ customContentReference?: CustomContentReference;
171
+ /**
172
+ * References to an external app and resource associated with this checkout.
173
+ * Used for integration and tracking across different platforms.
174
+ * @immutable
175
+ */
176
+ externalReference?: ExternalReference;
177
+ /**
178
+ * The business location ID associated with the checkout.
179
+ *
180
+ * To learn more, see the Locations API.
181
+ * @format GUID
182
+ */
183
+ businessLocationId?: string | null;
184
+ }
185
+ export interface LineItem {
186
+ /**
187
+ * Line item ID.
188
+ * @format GUID
189
+ * @readonly
190
+ */
191
+ id?: string | null;
192
+ /**
193
+ * Item quantity.
194
+ *
195
+ * Min: `"1"`
196
+ * Max: `"100000"`
197
+ * @min 1
198
+ * @max 100000
199
+ */
200
+ quantity?: number;
201
+ /** Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */
202
+ catalogReference?: CatalogReference;
203
+ /**
204
+ * Item name.
205
+ * + Stores - `product.name`
206
+ * + Bookings - `service.info.name`
207
+ * + Events - `ticket.name`
208
+ * @readonly
209
+ */
210
+ productName?: ProductName;
211
+ /**
212
+ * URL to the item's page on the site.
213
+ * @readonly
214
+ */
215
+ url?: PageUrlV2;
216
+ /**
217
+ * Item price **after** catalog-defined discount and line item discounts.
218
+ * @readonly
219
+ */
220
+ price?: MultiCurrencyPrice;
221
+ /**
222
+ * Total line item price **after** catalog-defined discount and line item discounts.
223
+ * @readonly
224
+ */
225
+ lineItemPrice?: MultiCurrencyPrice;
226
+ /**
227
+ * Item price **before** catalog-defined discount. Defaults to `price` when not provided.
228
+ * @readonly
229
+ */
230
+ fullPrice?: MultiCurrencyPrice;
231
+ /**
232
+ * Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided.
233
+ * @readonly
234
+ */
235
+ priceBeforeDiscounts?: MultiCurrencyPrice;
236
+ /**
237
+ * Total price after all discounts and tax.
238
+ * @readonly
239
+ */
240
+ totalPriceAfterTax?: MultiCurrencyPrice;
241
+ /**
242
+ * Total price after discounts, and before tax.
243
+ * @readonly
244
+ */
245
+ totalPriceBeforeTax?: MultiCurrencyPrice;
246
+ /**
247
+ * Tax details for this line item.
248
+ * @readonly
249
+ */
250
+ taxDetails?: ItemTaxFullDetails;
251
+ /**
252
+ * Discount for this line item's entire quantity.
253
+ * @readonly
254
+ */
255
+ discount?: MultiCurrencyPrice;
256
+ /**
257
+ * Line item description lines. Used for display purposes for the cart, checkout and order.
258
+ * @readonly
259
+ */
260
+ descriptionLines?: DescriptionLine[];
261
+ /**
262
+ * Line item image details.
263
+ * @readonly
264
+ */
265
+ media?: CommonImage;
266
+ /**
267
+ * Item availability details.
268
+ * @readonly
269
+ */
270
+ availability?: ItemAvailabilityInfo;
271
+ /**
272
+ * Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability.
273
+ * @readonly
274
+ */
275
+ physicalProperties?: PhysicalProperties;
276
+ /**
277
+ * Item type. Either a preset type or custom.
278
+ * @readonly
279
+ */
280
+ itemType?: ItemType;
281
+ /**
282
+ * Subscription option information.
283
+ * @readonly
284
+ */
285
+ subscriptionOptionInfo?: SubscriptionOptionInfo;
286
+ /**
287
+ * Type of selected payment option for current item.
288
+ *
289
+ * Default: `FULL_PAYMENT_ONLINE`
290
+ * @readonly
291
+ */
292
+ paymentOption?: PaymentOptionType;
293
+ /**
294
+ * Service properties. When relevant, this contains information such as date and number of participants.
295
+ * @readonly
296
+ */
297
+ serviceProperties?: ServiceProperties;
298
+ /**
299
+ * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.
300
+ * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.
301
+ * + In most cases, this field has the same value as `catalogReference.catalogItemId`.
302
+ * + Used in membership validation.
303
+ * @minLength 1
304
+ * @maxLength 36
305
+ * @readonly
306
+ */
307
+ rootCatalogItemId?: string | null;
308
+ /**
309
+ * Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67".
310
+ * @readonly
311
+ */
312
+ priceDescription?: PriceDescription;
313
+ /**
314
+ * Partial payment to be paid upfront during the checkout. Eligible for catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only.
315
+ * @readonly
316
+ */
317
+ depositAmount?: MultiCurrencyPrice;
318
+ /**
319
+ * Delivery profile ID.
320
+ * @format GUID
321
+ * @readonly
322
+ */
323
+ deliveryProfileId?: string | null;
324
+ /**
325
+ * Whether the line item is a custom line item. Custom line items don't trigger the Catalog service plugin.
326
+ * @readonly
327
+ */
328
+ customLineItem?: boolean;
329
+ /**
330
+ * Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.
331
+ * @minLength 1
332
+ * @maxLength 2500
333
+ * @readonly
334
+ */
335
+ consentRequiredPaymentPolicy?: string | null;
336
+ /**
337
+ * Overriding values for catalog item properties.
338
+ *
339
+ * To override catalog fields, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
340
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
341
+ */
342
+ catalogOverrideFields?: CatalogOverrideFields;
343
+ /**
344
+ * Whether to save the payment method on the order.
345
+ *
346
+ * Default: `false`
347
+ * @readonly
348
+ */
349
+ savePaymentMethod?: boolean;
350
+ }
351
+ /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
352
+ export interface CatalogReference {
353
+ /**
354
+ * ID of the item within the catalog it belongs to.
355
+ * @minLength 1
356
+ * @maxLength 36
357
+ */
358
+ catalogItemId?: string;
359
+ /**
360
+ * ID of the app providing the catalog.
361
+ *
362
+ * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
363
+ *
364
+ * For items from Wix catalogs, the following values always apply:
365
+ * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
366
+ * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
367
+ * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
368
+ * @minLength 1
369
+ */
370
+ appId?: string;
371
+ /**
372
+ * 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.
373
+ *
374
+ * 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)).
375
+ */
376
+ options?: Record<string, any> | null;
377
+ }
378
+ export interface ProductName {
379
+ /**
380
+ * __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).
381
+ *
382
+ * Min: 1 character.
383
+ * Max: 200 characters.
384
+ * @minLength 1
385
+ * @maxLength 200
386
+ */
387
+ original?: string;
388
+ /**
389
+ * Item name translated into the buyer's language.
390
+ *
391
+ * Min: 1 character.
392
+ * Max: 400 characters.
393
+ * Default: Same as `original`.
394
+ * @minLength 1
395
+ * @maxLength 400
396
+ */
397
+ translated?: string | null;
398
+ }
399
+ export interface PageUrlV2 {
400
+ /** The relative path for the page within the site. For example, `/product-page/a-product`. */
401
+ relativePath?: string;
402
+ /** The page's full URL. For example, `https://mysite.com/product-page/a-product`. */
403
+ url?: string | null;
404
+ }
405
+ export interface MultiCurrencyPrice {
406
+ /**
407
+ * Amount.
408
+ * @decimalValue options { gte:0, lte:1000000000000000 }
409
+ */
410
+ amount?: string;
411
+ /**
412
+ * Converted amount.
413
+ * @readonly
414
+ * @decimalValue options { gte:0, lte:1000000000000000 }
415
+ */
416
+ convertedAmount?: string;
417
+ /**
418
+ * Amount formatted with currency symbol.
419
+ * @readonly
420
+ */
421
+ formattedAmount?: string;
422
+ /**
423
+ * Converted amount formatted with currency symbol.
424
+ * @readonly
425
+ */
426
+ formattedConvertedAmount?: string;
427
+ }
428
+ export interface ItemTaxFullDetails {
429
+ /** Amount for which tax is calculated. */
430
+ taxableAmount?: MultiCurrencyPrice;
431
+ /**
432
+ * Tax rate %, as a decimal point between 0 and 1.
433
+ * @decimalValue options { gte:0, lte:1, maxScale:6 }
434
+ */
435
+ taxRate?: string;
436
+ /** Calculated tax, based on `taxable_amount` and `tax_rate`. */
437
+ totalTax?: MultiCurrencyPrice;
438
+ /**
439
+ * If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. Deprecated - use 'tax_breakdown' instead.
440
+ * @readonly
441
+ * @deprecated
442
+ */
443
+ rateBreakdown?: TaxRateBreakdown[];
444
+ }
445
+ export interface TaxRateBreakdown {
446
+ /**
447
+ * Name of tax against which the calculation was performed.
448
+ * @maxLength 100
449
+ */
450
+ name?: string;
451
+ /**
452
+ * Rate at which this tax detail was calculated.
453
+ * @decimalValue options { gte:0, lte:1, maxScale:6 }
454
+ */
455
+ rate?: string;
456
+ /** Amount of tax for this tax detail. */
457
+ tax?: MultiCurrencyPrice;
458
+ }
459
+ /**
460
+ * TaxBreakdown represents tax information for a line item.
461
+ * It holds the tax amount and the tax rate for each tax authority that apply on the line item.
462
+ */
463
+ export interface TaxBreakdown {
464
+ /**
465
+ * The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec".
466
+ * @maxLength 200
467
+ */
468
+ jurisdiction?: string | null;
469
+ /** The amount of this line item price that was considered nontaxable. (Decimal value) */
470
+ nonTaxableAmount?: MultiCurrencyPrice;
471
+ /**
472
+ * The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value)
473
+ * @decimalValue options { gte:0, maxScale:6 }
474
+ */
475
+ rate?: string | null;
476
+ /** The amount of tax estimated for this line item. (Decimal value) */
477
+ taxAmount?: MultiCurrencyPrice;
478
+ /** The taxable amount of this line item. */
479
+ taxableAmount?: MultiCurrencyPrice;
480
+ /**
481
+ * The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc.
482
+ * @maxLength 200
483
+ */
484
+ taxType?: string | null;
485
+ /**
486
+ * The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc.
487
+ * This name should be explicit enough to allow the merchant to understand what tax was calculated.
488
+ * @maxLength 200
489
+ */
490
+ taxName?: string | null;
491
+ /** The type of the jurisdiction in which this tax detail applies. */
492
+ jurisdictionType?: JurisdictionType;
493
+ }
494
+ /** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
495
+ export declare enum JurisdictionType {
496
+ UNDEFINED = "UNDEFINED",
497
+ COUNTRY = "COUNTRY",
498
+ STATE = "STATE",
499
+ COUNTY = "COUNTY",
500
+ CITY = "CITY",
501
+ SPECIAL = "SPECIAL"
502
+ }
503
+ export interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf {
504
+ /** Description line plain text value. */
505
+ plainText?: PlainTextValue;
506
+ /** Description line color value. */
507
+ colorInfo?: Color;
508
+ /** Description line name. */
509
+ name?: DescriptionLineName;
510
+ }
511
+ /** @oneof */
512
+ export interface DescriptionLineValueOneOf {
513
+ /** Description line plain text value. */
514
+ plainText?: PlainTextValue;
515
+ /** Description line color value. */
516
+ colorInfo?: Color;
517
+ }
518
+ /** @oneof */
519
+ export interface DescriptionLineDescriptionLineValueOneOf {
520
+ }
521
+ export interface DescriptionLineName {
522
+ /**
523
+ * 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).
524
+ * @maxLength 100
525
+ */
526
+ original?: string;
527
+ /**
528
+ * Description line name translated into the buyer's language.
529
+ *
530
+ * Default: Same as `original`.
531
+ * @maxLength 200
532
+ */
533
+ translated?: string | null;
534
+ }
535
+ export interface PlainTextValue {
536
+ /**
537
+ * 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).
538
+ * @maxLength 600
539
+ */
540
+ original?: string;
541
+ /**
542
+ * Description line plain text value translated into the buyer's language.
543
+ *
544
+ * Default: Same as `original`.
545
+ * @maxLength 600
546
+ */
547
+ translated?: string | null;
548
+ }
549
+ export interface Color {
550
+ /**
551
+ * 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).
552
+ * @maxLength 500
553
+ */
554
+ original?: string;
555
+ /**
556
+ * Description line color name translated into the buyer's language.
557
+ *
558
+ * Default: Same as `original`.
559
+ * @maxLength 500
560
+ */
561
+ translated?: string | null;
562
+ /** HEX or RGB color code for display. */
563
+ code?: string | null;
564
+ }
565
+ export declare enum DescriptionLineType {
566
+ /** Unrecognized type. */
567
+ UNRECOGNISED = "UNRECOGNISED",
568
+ /** Plain text type. */
569
+ PLAIN_TEXT = "PLAIN_TEXT",
570
+ /** Color type. */
571
+ COLOR = "COLOR"
572
+ }
573
+ export interface CommonImage {
574
+ /** WixMedia image ID. */
575
+ id?: string;
576
+ /** Image URL. */
577
+ url?: string;
578
+ /**
579
+ * Original image height.
580
+ * @readonly
581
+ */
582
+ height?: number;
583
+ /**
584
+ * Original image width.
585
+ * @readonly
586
+ */
587
+ width?: number;
588
+ /** Image alt text. */
589
+ altText?: string | null;
590
+ /**
591
+ * Image filename.
592
+ * @readonly
593
+ */
594
+ filename?: string | null;
595
+ }
596
+ export interface FocalPoint {
597
+ /** X-coordinate of the focal point. */
598
+ x?: number;
599
+ /** Y-coordinate of the focal point. */
600
+ y?: number;
601
+ /** crop by height */
602
+ height?: number | null;
603
+ /** crop by width */
604
+ width?: number | null;
605
+ }
606
+ export interface ItemAvailabilityInfo {
607
+ /** Item availability status. */
608
+ status?: ItemAvailabilityStatus;
609
+ /** Quantity available. */
610
+ quantityAvailable?: number | null;
611
+ }
612
+ export declare enum ItemAvailabilityStatus {
613
+ AVAILABLE = "AVAILABLE",
614
+ /** Item does not exist. */
615
+ NOT_FOUND = "NOT_FOUND",
616
+ /** Item is not in stock. */
617
+ NOT_AVAILABLE = "NOT_AVAILABLE",
618
+ /** Available quantity is less than requested. */
619
+ PARTIALLY_AVAILABLE = "PARTIALLY_AVAILABLE"
620
+ }
621
+ export interface PhysicalProperties {
622
+ /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
623
+ weight?: number | null;
624
+ /**
625
+ * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).
626
+ * @maxLength 40
627
+ */
628
+ sku?: string | null;
629
+ /** Whether this line item is shippable. */
630
+ shippable?: boolean;
631
+ }
632
+ export interface Scope {
633
+ /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
634
+ namespace?: string;
635
+ /** Coupon scope's applied group (e.g., event or ticket in Wix Events) */
636
+ group?: Group;
637
+ }
638
+ export interface Group {
639
+ /** Coupon scope's group (e.g., product or collection in Wix Stores). See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */
640
+ name?: string;
641
+ /** Item ID (when the coupon scope is limited to just one item). */
642
+ entityId?: string | null;
643
+ }
644
+ export interface ItemType extends ItemTypeItemTypeDataOneOf {
645
+ /** Preset item type. */
646
+ preset?: ItemTypeItemType;
647
+ /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
648
+ custom?: string;
649
+ }
650
+ /** @oneof */
651
+ export interface ItemTypeItemTypeDataOneOf {
652
+ /** Preset item type. */
653
+ preset?: ItemTypeItemType;
654
+ /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
655
+ custom?: string;
656
+ }
657
+ export declare enum ItemTypeItemType {
658
+ UNRECOGNISED = "UNRECOGNISED",
659
+ PHYSICAL = "PHYSICAL",
660
+ DIGITAL = "DIGITAL",
661
+ GIFT_CARD = "GIFT_CARD",
662
+ SERVICE = "SERVICE"
663
+ }
664
+ export interface SubscriptionOptionInfo {
665
+ /** Subscription option settings. */
666
+ subscriptionSettings?: SubscriptionSettings;
667
+ /** Subscription option title. */
668
+ title?: Title;
669
+ /** Subscription option description. */
670
+ description?: Description;
671
+ }
672
+ export interface SubscriptionSettings {
673
+ /** Frequency of recurring payment. */
674
+ frequency?: SubscriptionFrequency;
675
+ /**
676
+ * Interval of recurring payment.
677
+ *
678
+ * Default: `1`.
679
+ * If SubscriptionFrequency is Day the minimum interval is 7
680
+ * @min 1
681
+ * @max 50
682
+ */
683
+ interval?: number | null;
684
+ /** Whether subscription is renewed automatically at the end of each period. */
685
+ autoRenewal?: boolean;
686
+ /**
687
+ * Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`.
688
+ * @min 1
689
+ */
690
+ billingCycles?: number | null;
691
+ }
692
+ /** Frequency unit of recurring payment */
693
+ export declare enum SubscriptionFrequency {
694
+ UNDEFINED = "UNDEFINED",
695
+ DAY = "DAY",
696
+ WEEK = "WEEK",
697
+ MONTH = "MONTH",
698
+ YEAR = "YEAR"
699
+ }
700
+ export interface FreeTrialPeriod {
701
+ /** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */
702
+ frequency?: SubscriptionFrequency;
703
+ /**
704
+ * interval of period
705
+ * @min 1
706
+ * @max 999
707
+ */
708
+ interval?: number;
709
+ }
710
+ export interface Title {
711
+ /**
712
+ * 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).
713
+ * @minLength 1
714
+ * @maxLength 150
715
+ */
716
+ original?: string;
717
+ /**
718
+ * Subscription option name translated into the buyer's language.
719
+ *
720
+ * Default: Same as `original`.
721
+ * @minLength 1
722
+ * @maxLength 150
723
+ */
724
+ translated?: string | null;
725
+ }
726
+ export interface Description {
727
+ /**
728
+ * Subscription option description.
729
+ * @maxLength 500
730
+ */
731
+ original?: string;
732
+ /**
733
+ * Translated subscription option description.
734
+ * @maxLength 500
735
+ */
736
+ translated?: string | null;
737
+ }
738
+ export interface SecuredMedia {
739
+ /**
740
+ * Media ID in Wix Media Manager.
741
+ * @minLength 1
742
+ * @maxLength 100
743
+ */
744
+ id?: string;
745
+ /**
746
+ * Original filename.
747
+ * @minLength 1
748
+ * @maxLength 1000
749
+ */
750
+ fileName?: string;
751
+ /** File type. */
752
+ fileType?: FileType;
753
+ }
754
+ export declare enum FileType {
755
+ UNSPECIFIED = "UNSPECIFIED",
756
+ SECURE_PICTURE = "SECURE_PICTURE",
757
+ SECURE_VIDEO = "SECURE_VIDEO",
758
+ SECURE_DOCUMENT = "SECURE_DOCUMENT",
759
+ SECURE_MUSIC = "SECURE_MUSIC",
760
+ SECURE_ARCHIVE = "SECURE_ARCHIVE"
761
+ }
762
+ /** Type of selected payment option for catalog item */
763
+ export declare enum PaymentOptionType {
764
+ /** The entire payment for this item happens as part of the checkout. */
765
+ FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE",
766
+ /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */
767
+ FULL_PAYMENT_OFFLINE = "FULL_PAYMENT_OFFLINE",
768
+ /** Payment for this item is done by charging a membership. When selected, `price` is `0`. */
769
+ MEMBERSHIP = "MEMBERSHIP",
770
+ /** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */
771
+ DEPOSIT_ONLINE = "DEPOSIT_ONLINE",
772
+ /** 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`. */
773
+ MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE"
774
+ }
775
+ export interface ServiceProperties {
776
+ /**
777
+ * Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
778
+ * For example, the start time of a class.
779
+ */
780
+ scheduledDate?: Date | null;
781
+ /**
782
+ * The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room.
783
+ * @min 1
784
+ * @max 10000
785
+ */
786
+ numberOfParticipants?: number | null;
787
+ }
788
+ export interface PriceDescription {
789
+ /**
790
+ * __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).
791
+ * @minLength 1
792
+ * @maxLength 100
793
+ */
794
+ original?: string;
795
+ /**
796
+ * Price description translated into the buyer's language.
797
+ *
798
+ * Default: Same as `original`.
799
+ * @minLength 1
800
+ * @maxLength 100
801
+ */
802
+ translated?: string | null;
803
+ }
804
+ export interface CatalogOverrideFields {
805
+ /** Item name. */
806
+ productName?: ProductName;
807
+ /**
808
+ * Item price **after** discounts.
809
+ * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
810
+ */
811
+ price?: string | null;
812
+ /**
813
+ * Item price **before** discounts.
814
+ * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
815
+ */
816
+ fullPrice?: string | null;
817
+ /**
818
+ * Item description lines. Used when displaying the line item to customers.
819
+ * @maxSize 20
820
+ */
821
+ descriptionLines?: DescriptionLine[];
822
+ /** Physical properties of the item. */
823
+ physicalProperties?: PhysicalProperties;
824
+ /** Item image. */
825
+ image?: Image;
826
+ /** Payment method selected for the item. */
827
+ paymentOption?: PaymentOption;
828
+ /**
829
+ * Only eligible for catalog items with `lineItem.paymentOption.value` type of `DEPOSIT_ONLINE`.
830
+ * @format DECIMAL_VALUE
831
+ * @decimalValue options { gt:0, lte:999999999, maxScale:3 }
832
+ */
833
+ depositAmount?: string | null;
834
+ /**
835
+ * Whether to save the payment method on the order.
836
+ *
837
+ * Default: `false`
838
+ */
839
+ savePaymentMethod?: boolean | null;
840
+ }
841
+ export interface Image {
842
+ /** WixMedia image ID. */
843
+ id?: string;
844
+ /** Original image height. */
845
+ height?: number;
846
+ /** Original image width. */
847
+ width?: number;
848
+ /** Image alt text. Optional. */
849
+ altText?: string | null;
850
+ /** Image filename. Optional. */
851
+ filename?: string | null;
852
+ }
853
+ export interface PaymentOption {
854
+ /**
855
+ * Type of selected payment option for current item.
856
+ *
857
+ * Default: `FULL_PAYMENT_ONLINE`
858
+ */
859
+ value?: PaymentOptionType;
860
+ }
861
+ export interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {
862
+ /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
863
+ addressType?: TaxableAddressType;
864
+ }
865
+ /** @oneof */
866
+ export interface TaxableAddressTaxableAddressDataOneOf {
867
+ /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
868
+ addressType?: TaxableAddressType;
869
+ }
870
+ export declare enum TaxableAddressType {
871
+ UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS",
872
+ BUSINESS = "BUSINESS",
873
+ BILLING = "BILLING",
874
+ SHIPPING = "SHIPPING"
875
+ }
876
+ export interface ExtendedFields {
877
+ /**
878
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
879
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
880
+ *
881
+ * You can only access fields for which you have the appropriate permissions.
882
+ *
883
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
884
+ */
885
+ namespaces?: Record<string, Record<string, any>>;
886
+ }
887
+ export interface Policy {
888
+ /**
889
+ * Policy title - should be translated
890
+ * @minLength 1
891
+ * @maxLength 29
892
+ */
893
+ title?: string | null;
894
+ /**
895
+ * Policy content - should be translated
896
+ * @minLength 1
897
+ * @maxLength 3000
898
+ */
899
+ content?: string;
900
+ }
901
+ export interface ModifierGroup {
902
+ /**
903
+ * Modifier group id.
904
+ * @minLength 1
905
+ * @maxLength 36
906
+ */
907
+ id?: string;
908
+ /** Modifier group name. */
909
+ name?: TranslatableString;
910
+ /**
911
+ * List of modifiers in this group.
912
+ * @minSize 1
913
+ * @maxSize 10
914
+ */
915
+ modifiers?: ItemModifier[];
916
+ }
917
+ export interface TranslatableString {
918
+ /**
919
+ * __Required.__ String 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).
920
+ *
921
+ * Min: 1 character.
922
+ * Max: 200 characters.
923
+ * @minLength 1
924
+ * @maxLength 200
925
+ */
926
+ original?: string;
927
+ /**
928
+ * String translated into the buyer's language.
929
+ *
930
+ * Min: 1 character.
931
+ * Max: 400 characters.
932
+ * Default: Same as `original`.
933
+ * @minLength 1
934
+ * @maxLength 400
935
+ */
936
+ translated?: string | null;
937
+ }
938
+ export interface ItemModifier {
939
+ /**
940
+ * Modifier ID.
941
+ * @minLength 1
942
+ * @maxLength 36
943
+ */
944
+ id?: string;
945
+ /**
946
+ * The quantity of this modifier.
947
+ * @min 1
948
+ * @max 100000
949
+ */
950
+ quantity?: number | null;
951
+ /** Primary display label for the modifier. */
952
+ label?: TranslatableString;
953
+ /** Optional additional details or clarification for the modifier. */
954
+ details?: TranslatableString;
955
+ /** The price of the modifier. */
956
+ price?: MultiCurrencyPrice;
957
+ }
958
+ /** Billing Info and shipping details */
959
+ export interface AddressWithContact {
960
+ /** Address. */
961
+ address?: ApiAddress;
962
+ /** Contact details. */
963
+ contactDetails?: FullAddressContactDetails;
964
+ }
965
+ /** Physical address */
966
+ export interface ApiAddress {
967
+ /**
968
+ * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
969
+ * @format COUNTRY
970
+ */
971
+ country?: string | null;
972
+ /**
973
+ * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.
974
+ * @maxLength 50
975
+ */
976
+ subdivision?: string | null;
977
+ /**
978
+ * City name.
979
+ * @maxLength 50
980
+ */
981
+ city?: string | null;
982
+ /**
983
+ * Postal or zip code.
984
+ * @maxLength 50
985
+ */
986
+ postalCode?: string | null;
987
+ /** Street address. */
988
+ streetAddress?: StreetAddress;
989
+ /**
990
+ * Main address line (usually street name and number).
991
+ * @maxLength 150
992
+ */
993
+ addressLine?: string | null;
994
+ /**
995
+ * Free text providing more detailed address info. Usually contains apt, suite, floor.
996
+ * @maxLength 100
997
+ */
998
+ addressLine2?: string | null;
999
+ /**
1000
+ * Country's full name.
1001
+ * @readonly
1002
+ */
1003
+ countryFullname?: string | null;
1004
+ /**
1005
+ * Subdivision full-name.
1006
+ * @readonly
1007
+ */
1008
+ subdivisionFullname?: string | null;
1009
+ }
1010
+ export interface StreetAddress {
1011
+ /** Street number. */
1012
+ number?: string;
1013
+ /** Street name. */
1014
+ name?: string;
1015
+ }
1016
+ export interface AddressLocation {
1017
+ /** Address latitude. */
1018
+ latitude?: number | null;
1019
+ /** Address longitude. */
1020
+ longitude?: number | null;
1021
+ }
1022
+ /** Full contact details for an address */
1023
+ export interface FullAddressContactDetails {
1024
+ /**
1025
+ * First name.
1026
+ * @maxLength 100
1027
+ */
1028
+ firstName?: string | null;
1029
+ /**
1030
+ * Last name.
1031
+ * @maxLength 100
1032
+ */
1033
+ lastName?: string | null;
1034
+ /**
1035
+ * Phone number.
1036
+ * @format PHONE
1037
+ */
1038
+ phone?: string | null;
1039
+ /**
1040
+ * Company name.
1041
+ * @maxLength 1000
1042
+ */
1043
+ company?: string | null;
1044
+ /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
1045
+ vatId?: CommonVatId;
1046
+ }
1047
+ export interface CommonVatId {
1048
+ /** Customer's tax ID. */
1049
+ id?: string;
1050
+ /**
1051
+ * Tax type.
1052
+ *
1053
+ * Supported values:
1054
+ * + `CPF`: for individual tax payers
1055
+ * + `CNPJ`: for corporations
1056
+ */
1057
+ type?: CommonVatType;
1058
+ }
1059
+ /** tax info types */
1060
+ export declare enum CommonVatType {
1061
+ UNSPECIFIED = "UNSPECIFIED",
1062
+ /** CPF - for individual tax payers. */
1063
+ CPF = "CPF",
1064
+ /** CNPJ - for corporations */
1065
+ CNPJ = "CNPJ"
1066
+ }
1067
+ export interface ShippingInfo {
1068
+ /** Shipping address and contact details. */
1069
+ shippingDestination?: AddressWithContact;
1070
+ /** Selected option out of the options allowed for the `region`. */
1071
+ selectedCarrierServiceOption?: SelectedCarrierServiceOption;
1072
+ /**
1073
+ * Shipping region. Based on the address provided.
1074
+ * @readonly
1075
+ */
1076
+ region?: ShippingRegion;
1077
+ /**
1078
+ * All carrier options for this shipping rule.
1079
+ * @readonly
1080
+ */
1081
+ carrierServiceOptions?: CarrierServiceOption[];
1082
+ }
1083
+ export interface SelectedCarrierServiceOption {
1084
+ /**
1085
+ * Unique identifier of selected option. For example, "usps_std_overnight".
1086
+ * @maxLength 100
1087
+ */
1088
+ code?: string;
1089
+ /**
1090
+ * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).
1091
+ * For example, "Standard" or "First-Class Package International".
1092
+ * @maxLength 250
1093
+ * @readonly
1094
+ */
1095
+ title?: string;
1096
+ /**
1097
+ * Delivery logistics.
1098
+ * @readonly
1099
+ */
1100
+ logistics?: DeliveryLogistics;
1101
+ /**
1102
+ * Shipping costs.
1103
+ * @readonly
1104
+ */
1105
+ cost?: SelectedCarrierServiceOptionPrices;
1106
+ /**
1107
+ * Were we able to find the requested shipping option, or otherwise we fallback to the default one (the first)
1108
+ * @readonly
1109
+ */
1110
+ requestedShippingOption?: boolean;
1111
+ /** Other charges */
1112
+ otherCharges?: SelectedCarrierServiceOptionOtherCharge[];
1113
+ /**
1114
+ * This carrier's unique ID
1115
+ * @format GUID
1116
+ */
1117
+ carrierId?: string | null;
1118
+ /**
1119
+ * Delivery solution allocations to different delivery carriers and delivery regions
1120
+ * @maxSize 300
1121
+ */
1122
+ deliveryAllocations?: DeliveryAllocation[];
1123
+ /** If the delivery solution is a partial and doesn't apply to all items. */
1124
+ partial?: boolean | null;
1125
+ }
1126
+ export interface DeliveryLogistics {
1127
+ /**
1128
+ * Expected delivery time, in free text. For example, "3-5 business days".
1129
+ * @maxLength 500
1130
+ */
1131
+ deliveryTime?: string | null;
1132
+ /**
1133
+ * Instructions for caller, e.g for pickup: "Please deliver during opening hours, and please don't park in disabled parking spot".
1134
+ * @maxLength 1000
1135
+ */
1136
+ instructions?: string | null;
1137
+ /** Pickup details. */
1138
+ pickupDetails?: PickupDetails;
1139
+ }
1140
+ export interface PickupDetails {
1141
+ /** Pickup address. */
1142
+ address?: ApiAddress;
1143
+ /**
1144
+ * Whether the pickup address is that of a business - this may effect tax calculation.
1145
+ * @deprecated
1146
+ */
1147
+ businessLocation?: boolean;
1148
+ /** Pickup method */
1149
+ pickupMethod?: PickupMethod;
1150
+ }
1151
+ export declare enum PickupMethod {
1152
+ UNKNOWN_METHOD = "UNKNOWN_METHOD",
1153
+ STORE_PICKUP = "STORE_PICKUP",
1154
+ PICKUP_POINT = "PICKUP_POINT"
1155
+ }
1156
+ export interface DeliveryTimeSlot {
1157
+ /** starting time of the delivery time slot */
1158
+ from?: Date | null;
1159
+ /** ending time of the delivery time slot */
1160
+ to?: Date | null;
1161
+ }
1162
+ export interface SelectedCarrierServiceOptionPrices {
1163
+ /** Total shipping price, after discount and after tax. */
1164
+ totalPriceAfterTax?: MultiCurrencyPrice;
1165
+ /** Total price of shipping after discounts (when relevant), and before tax. */
1166
+ totalPriceBeforeTax?: MultiCurrencyPrice;
1167
+ /** Tax details. */
1168
+ taxDetails?: ItemTaxFullDetails;
1169
+ /** Shipping discount before tax. */
1170
+ totalDiscount?: MultiCurrencyPrice;
1171
+ /** Shipping price before discount and before tax. */
1172
+ price?: MultiCurrencyPrice;
1173
+ }
1174
+ export interface SelectedCarrierServiceOptionOtherCharge {
1175
+ /** Type of additional cost. */
1176
+ type?: ChargeType;
1177
+ /**
1178
+ * Details of the charge, such as 'Full Coverage Insurance of up to 80% of value of shipment'.
1179
+ * @maxLength 200
1180
+ */
1181
+ details?: string | null;
1182
+ /** Price of added charge. */
1183
+ cost?: SelectedCarrierServiceOptionPrices;
1184
+ }
1185
+ export declare enum ChargeType {
1186
+ HANDLING_FEE = "HANDLING_FEE",
1187
+ INSURANCE = "INSURANCE"
1188
+ }
1189
+ export interface DeliveryAllocation {
1190
+ /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */
1191
+ deliveryCarrier?: Carrier;
1192
+ /** The delivery region that are relevant for this delivery solution. */
1193
+ deliveryRegion?: Region;
1194
+ /** Populated if the delivery solution is a partially supplied by this carrier. */
1195
+ applicableLineItems?: ApplicableLineItems;
1196
+ }
1197
+ export interface Carrier {
1198
+ /**
1199
+ * The carrier app id
1200
+ * @format GUID
1201
+ */
1202
+ appId?: string | null;
1203
+ /**
1204
+ * Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`.
1205
+ * @maxLength 250
1206
+ */
1207
+ code?: string;
1208
+ }
1209
+ export interface Region {
1210
+ /**
1211
+ * The delivery region id.
1212
+ * @format GUID
1213
+ */
1214
+ id?: string | null;
1215
+ /**
1216
+ * The delivery region name.
1217
+ * @maxLength 100
1218
+ */
1219
+ name?: string | null;
1220
+ }
1221
+ export interface ApplicableLineItems {
1222
+ /**
1223
+ * Line items that the delivery solution is for.
1224
+ * @maxSize 300
1225
+ * @minLength 1
1226
+ * @maxLength 100
1227
+ */
1228
+ lineItemIds?: string[];
1229
+ }
1230
+ export interface ShippingRegion {
1231
+ /**
1232
+ * Shipping region ID.
1233
+ * @format GUID
1234
+ * @readonly
1235
+ */
1236
+ id?: string;
1237
+ /**
1238
+ * Shipping region name.
1239
+ * @maxLength 100
1240
+ */
1241
+ name?: string;
1242
+ }
1243
+ export interface CarrierServiceOption {
1244
+ /**
1245
+ * Carrier ID.
1246
+ * @format GUID
1247
+ */
1248
+ carrierId?: string;
1249
+ /** Shipping options offered by this carrier for this request. */
1250
+ shippingOptions?: ShippingOption[];
1251
+ }
1252
+ export interface ShippingOption {
1253
+ /**
1254
+ * Unique code of provided shipping option like "usps_std_overnight".
1255
+ * For legacy calculators this would be the UUID of the option.
1256
+ * @maxLength 100
1257
+ */
1258
+ code?: string;
1259
+ /**
1260
+ * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).
1261
+ * For example, "Standard" or "First-Class Package International".
1262
+ * @maxLength 250
1263
+ */
1264
+ title?: string;
1265
+ /** Delivery logistics. */
1266
+ logistics?: DeliveryLogistics;
1267
+ /** Sipping price information. */
1268
+ cost?: ShippingPrice;
1269
+ /**
1270
+ * Delivery solution allocations to different delivery carriers and delivery regions
1271
+ * @maxSize 300
1272
+ */
1273
+ deliveryAllocations?: DeliveryAllocation[];
1274
+ /** If the delivery solution is a partial and doesn't apply to all items. */
1275
+ partial?: boolean | null;
1276
+ }
1277
+ export interface ShippingPrice {
1278
+ /** Shipping price. */
1279
+ price?: MultiCurrencyPrice;
1280
+ /** Other costs such as insurance, handling & packaging for fragile items, etc. */
1281
+ otherCharges?: OtherCharge[];
1282
+ }
1283
+ export interface OtherCharge {
1284
+ /** Type of additional cost. */
1285
+ type?: ChargeType;
1286
+ /** Price of added cost. */
1287
+ price?: MultiCurrencyPrice;
1288
+ }
1289
+ export interface BuyerInfo extends BuyerInfoIdOneOf {
1290
+ /**
1291
+ * Visitor ID (if site visitor is **not** a member).
1292
+ * @format GUID
1293
+ * @readonly
1294
+ */
1295
+ visitorId?: string;
1296
+ /**
1297
+ * Member ID (if site visitor is a site member).
1298
+ * @format GUID
1299
+ * @readonly
1300
+ */
1301
+ memberId?: string;
1302
+ /**
1303
+ * Contact ID. Auto-created if one does not yet exist. For more information, see the Contacts API.
1304
+ * @format GUID
1305
+ * @readonly
1306
+ */
1307
+ contactId?: string | null;
1308
+ /**
1309
+ * Buyer email address.
1310
+ * @format EMAIL
1311
+ */
1312
+ email?: string | null;
1313
+ }
1314
+ /** @oneof */
1315
+ export interface BuyerInfoIdOneOf {
1316
+ /**
1317
+ * Visitor ID (if site visitor is **not** a member).
1318
+ * @format GUID
1319
+ * @readonly
1320
+ */
1321
+ visitorId?: string;
1322
+ /**
1323
+ * Member ID (if site visitor is a site member).
1324
+ * @format GUID
1325
+ * @readonly
1326
+ */
1327
+ memberId?: string;
1328
+ }
1329
+ export interface PriceSummary {
1330
+ /** Subtotal of all line items, before discounts and before tax. */
1331
+ subtotal?: MultiCurrencyPrice;
1332
+ /** Total shipping price, before discounts and before tax. */
1333
+ shipping?: MultiCurrencyPrice;
1334
+ /** Total tax. */
1335
+ tax?: MultiCurrencyPrice;
1336
+ /** Total calculated discount value. */
1337
+ discount?: MultiCurrencyPrice;
1338
+ /** Total price after discounts, gift cards, and tax. */
1339
+ total?: MultiCurrencyPrice;
1340
+ /** Total additional fees price before tax. */
1341
+ additionalFees?: MultiCurrencyPrice;
1342
+ }
1343
+ export interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
1344
+ /** General shipping calculation error. */
1345
+ generalShippingCalculationError?: Details;
1346
+ /** Carrier errors. */
1347
+ carrierErrors?: CarrierErrors;
1348
+ /** Tax calculation error. */
1349
+ taxCalculationError?: Details;
1350
+ /** Coupon calculation error. */
1351
+ couponCalculationError?: Details;
1352
+ /** Gift card calculation error. */
1353
+ giftCardCalculationError?: Details;
1354
+ /** Order validation errors. */
1355
+ orderValidationErrors?: ApplicationError[];
1356
+ /**
1357
+ * Membership payment methods calculation errors
1358
+ * For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid
1359
+ */
1360
+ membershipError?: Details;
1361
+ /** Discount Rule calculation error. */
1362
+ discountsCalculationError?: Details;
1363
+ }
1364
+ /** @oneof */
1365
+ export interface CalculationErrorsShippingCalculationErrorOneOf {
1366
+ /** General shipping calculation error. */
1367
+ generalShippingCalculationError?: Details;
1368
+ /** Carrier errors. */
1369
+ carrierErrors?: CarrierErrors;
1370
+ }
1371
+ export interface Details extends DetailsKindOneOf {
1372
+ applicationError?: ApplicationError;
1373
+ validationError?: ValidationError;
1374
+ systemError?: SystemError;
1375
+ /**
1376
+ * deprecated in API's - to enable migration from rendering arbitrary tracing to rest response
1377
+ * @deprecated
1378
+ */
1379
+ tracing?: Record<string, string>;
1380
+ }
1381
+ /** @oneof */
1382
+ export interface DetailsKindOneOf {
1383
+ applicationError?: ApplicationError;
1384
+ validationError?: ValidationError;
1385
+ systemError?: SystemError;
1386
+ }
1387
+ export interface ApplicationError {
1388
+ /** Error code. */
1389
+ code?: string;
1390
+ /** Description of the error. */
1391
+ description?: string;
1392
+ /** Data related to the error. */
1393
+ data?: Record<string, any> | null;
1394
+ }
1395
+ /**
1396
+ * example result:
1397
+ * {
1398
+ * "fieldViolations": [
1399
+ * {
1400
+ * "field": "fieldA",
1401
+ * "description": "invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]",
1402
+ * "violatedRule": "OTHER",
1403
+ * "ruleName": "INVALID_NOTE",
1404
+ * "data": {
1405
+ * "value": "FI"
1406
+ * }
1407
+ * },
1408
+ * {
1409
+ * "field": "fieldB",
1410
+ * "description": "field value out of range. supported range: [0-20]",
1411
+ * "violatedRule": "MAX",
1412
+ * "data": {
1413
+ * "threshold": 20
1414
+ * }
1415
+ * },
1416
+ * {
1417
+ * "field": "fieldC",
1418
+ * "description": "invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]",
1419
+ * "violatedRule": "FORMAT",
1420
+ * "data": {
1421
+ * "type": "PHONE"
1422
+ * }
1423
+ * }
1424
+ * ]
1425
+ * }
1426
+ */
1427
+ export interface ValidationError {
1428
+ fieldViolations?: FieldViolation[];
1429
+ }
1430
+ export declare enum RuleType {
1431
+ VALIDATION = "VALIDATION",
1432
+ OTHER = "OTHER",
1433
+ MAX = "MAX",
1434
+ MIN = "MIN",
1435
+ MAX_LENGTH = "MAX_LENGTH",
1436
+ MIN_LENGTH = "MIN_LENGTH",
1437
+ MAX_SIZE = "MAX_SIZE",
1438
+ MIN_SIZE = "MIN_SIZE",
1439
+ FORMAT = "FORMAT",
1440
+ DECIMAL_LTE = "DECIMAL_LTE",
1441
+ DECIMAL_GTE = "DECIMAL_GTE",
1442
+ DECIMAL_LT = "DECIMAL_LT",
1443
+ DECIMAL_GT = "DECIMAL_GT",
1444
+ DECIMAL_MAX_SCALE = "DECIMAL_MAX_SCALE",
1445
+ INVALID_ENUM_VALUE = "INVALID_ENUM_VALUE",
1446
+ REQUIRED_FIELD = "REQUIRED_FIELD",
1447
+ FIELD_NOT_ALLOWED = "FIELD_NOT_ALLOWED",
1448
+ ONE_OF_ALIGNMENT = "ONE_OF_ALIGNMENT",
1449
+ EXACT_LENGTH = "EXACT_LENGTH",
1450
+ EXACT_SIZE = "EXACT_SIZE",
1451
+ REQUIRED_ONE_OF_FIELD = "REQUIRED_ONE_OF_FIELD"
1452
+ }
1453
+ export interface FieldViolation {
1454
+ field?: string;
1455
+ description?: string;
1456
+ violatedRule?: RuleType;
1457
+ /** applicable when violated_rule=OTHER */
1458
+ ruleName?: string | null;
1459
+ data?: Record<string, any> | null;
1460
+ }
1461
+ export interface SystemError {
1462
+ /** Error code. */
1463
+ errorCode?: string | null;
1464
+ }
1465
+ export interface CarrierErrors {
1466
+ /** Carrier errors. */
1467
+ errors?: CarrierError[];
1468
+ }
1469
+ export interface CarrierError {
1470
+ /** Carrier ID. */
1471
+ carrierId?: string;
1472
+ /** Error details. */
1473
+ error?: Details;
1474
+ }
1475
+ export interface GiftCard {
1476
+ /**
1477
+ * Gift Card ID.
1478
+ * @deprecated
1479
+ */
1480
+ id?: string;
1481
+ /** Gift card obfuscated code. */
1482
+ obfuscatedCode?: string;
1483
+ /** Gift card value. */
1484
+ amount?: MultiCurrencyPrice;
1485
+ /**
1486
+ * App ID of the gift card provider.
1487
+ * @format GUID
1488
+ */
1489
+ appId?: string;
1490
+ /**
1491
+ * External ID in the gift card provider's system.
1492
+ * Used for integration and tracking across different platforms.
1493
+ * @minLength 1
1494
+ * @maxLength 50
1495
+ */
1496
+ externalId?: string | null;
1497
+ }
1498
+ export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
1499
+ /** Coupon details. */
1500
+ coupon?: Coupon;
1501
+ /** Merchant discount. */
1502
+ merchantDiscount?: MerchantDiscount;
1503
+ /** Discount rule */
1504
+ discountRule?: DiscountRule;
1505
+ /** Discount type. */
1506
+ discountType?: DiscountType;
1507
+ /**
1508
+ * IDs of line items the discount applies to.
1509
+ * @format GUID
1510
+ * @deprecated IDs of line items the discount applies to.
1511
+ * @replacedBy line_items_discounts
1512
+ * @targetRemovalDate 2024-06-01
1513
+ */
1514
+ lineItemIds?: string[];
1515
+ }
1516
+ /** @oneof */
1517
+ export interface AppliedDiscountDiscountSourceOneOf {
1518
+ /** Coupon details. */
1519
+ coupon?: Coupon;
1520
+ /** Merchant discount. */
1521
+ merchantDiscount?: MerchantDiscount;
1522
+ /** Discount rule */
1523
+ discountRule?: DiscountRule;
1524
+ }
1525
+ export declare enum DiscountType {
1526
+ GLOBAL = "GLOBAL",
1527
+ SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
1528
+ SHIPPING = "SHIPPING"
1529
+ }
1530
+ /** Coupon */
1531
+ export interface Coupon {
1532
+ /** Coupon ID. */
1533
+ id?: string;
1534
+ /** Coupon code. */
1535
+ code?: string;
1536
+ /** Coupon value. */
1537
+ amount?: MultiCurrencyPrice;
1538
+ /** Coupon name. */
1539
+ name?: string;
1540
+ }
1541
+ export interface MerchantDiscount {
1542
+ /** Discount value. */
1543
+ amount?: MultiCurrencyPrice;
1544
+ /**
1545
+ * Discount Percentage. Will be calculated from items price before other discounts.
1546
+ * @min 1
1547
+ * @max 100
1548
+ */
1549
+ percentage?: number | null;
1550
+ }
1551
+ export interface DiscountRule {
1552
+ /**
1553
+ * Discount rule ID
1554
+ * @format GUID
1555
+ */
1556
+ id?: string;
1557
+ /** Discount rule name */
1558
+ name?: DiscountRuleName;
1559
+ /** Discount value. */
1560
+ amount?: MultiCurrencyPrice;
1561
+ }
1562
+ export interface DiscountRuleName {
1563
+ /**
1564
+ * Original discount rule name (in site's default language).
1565
+ * @minLength 1
1566
+ * @maxLength 256
1567
+ */
1568
+ original?: string;
1569
+ /**
1570
+ * Translated discount rule name according to buyer language. Defaults to `original` when not provided.
1571
+ * @minLength 1
1572
+ * @maxLength 500
1573
+ */
1574
+ translated?: string | null;
1575
+ }
1576
+ export interface LineItemDiscount {
1577
+ /**
1578
+ * ID of line item the discount applies to.
1579
+ * @format GUID
1580
+ */
1581
+ id?: string;
1582
+ /** Discount value. */
1583
+ totalDiscountAmount?: MultiCurrencyPrice;
1584
+ }
1585
+ export interface CustomField {
1586
+ /** Custom field value. */
1587
+ value?: any;
1588
+ /**
1589
+ * Custom field title.
1590
+ * @minLength 1
1591
+ * @maxLength 500
1592
+ */
1593
+ title?: string;
1594
+ /**
1595
+ * Translated custom field title.
1596
+ * @minLength 1
1597
+ * @maxLength 500
1598
+ */
1599
+ translatedTitle?: string | null;
1600
+ }
1601
+ export declare enum WeightUnit {
1602
+ /** Weight unit can't be classified due to an error. */
1603
+ UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
1604
+ /** Kilograms. */
1605
+ KG = "KG",
1606
+ /** Pounds. */
1607
+ LB = "LB"
1608
+ }
1609
+ export interface TaxSummary {
1610
+ /**
1611
+ * Amount for which tax is calculated, added from line items.
1612
+ * @readonly
1613
+ */
1614
+ taxableAmount?: MultiCurrencyPrice;
1615
+ /**
1616
+ * Calculated tax, added from line items.
1617
+ * @readonly
1618
+ */
1619
+ totalTax?: MultiCurrencyPrice;
1620
+ /**
1621
+ * Tax calculator that was active when the order was created.
1622
+ * @deprecated
1623
+ */
1624
+ calculationDetails?: TaxCalculationDetails;
1625
+ }
1626
+ export interface TaxCalculationDetails extends TaxCalculationDetailsCalculationDetailsOneOf {
1627
+ /** Reason the manual calculation was used. */
1628
+ manualRateReason?: ManualCalculationReason;
1629
+ /** Details of the fallback rate calculation. */
1630
+ autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;
1631
+ /** Rate calculation type. */
1632
+ rateType?: RateType;
1633
+ }
1634
+ /** @oneof */
1635
+ export interface TaxCalculationDetailsCalculationDetailsOneOf {
1636
+ /** Reason the manual calculation was used. */
1637
+ manualRateReason?: ManualCalculationReason;
1638
+ /** Details of the fallback rate calculation. */
1639
+ autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;
1640
+ }
1641
+ export declare enum RateType {
1642
+ /** no tax being collected for this request due to location of purchase */
1643
+ NO_TAX_COLLECTED = "NO_TAX_COLLECTED",
1644
+ /** manual rate used for calculation */
1645
+ MANUAL_RATE = "MANUAL_RATE",
1646
+ /** autotax rate used for calculation */
1647
+ AUTO_RATE = "AUTO_RATE",
1648
+ /** fallback rate used for calculation */
1649
+ FALLBACK_RATE = "FALLBACK_RATE"
1650
+ }
1651
+ export declare enum ManualCalculationReason {
1652
+ /** user set calculator in Business Manager to be Manual */
1653
+ GLOBAL_SETTING_TO_MANUAL = "GLOBAL_SETTING_TO_MANUAL",
1654
+ /** specific region is on manual even though Global setting is Auto-tax */
1655
+ REGION_SETTING_TO_MANUAL = "REGION_SETTING_TO_MANUAL"
1656
+ }
1657
+ export interface AutoTaxFallbackCalculationDetails {
1658
+ /** reason for fallback */
1659
+ fallbackReason?: FallbackReason;
1660
+ /** invalid request (i.e. address), timeout, internal error, license error, and others will be encoded here */
1661
+ error?: ApplicationError;
1662
+ }
1663
+ export declare enum FallbackReason {
1664
+ /** auto-tax failed to be calculated */
1665
+ AUTO_TAX_FAILED = "AUTO_TAX_FAILED",
1666
+ /** auto-tax was temporarily deactivated on a system-level */
1667
+ AUTO_TAX_DEACTIVATED = "AUTO_TAX_DEACTIVATED"
1668
+ }
1669
+ /**
1670
+ * 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.
1671
+ * Tax breakdown is the tax amount split to the tax authorities that applied on the line item.
1672
+ */
1673
+ export interface AggregatedTaxBreakdown {
1674
+ /**
1675
+ * The name of the tax against which this tax amount was calculated.
1676
+ * @maxLength 200
1677
+ */
1678
+ taxName?: string;
1679
+ /**
1680
+ * The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws.
1681
+ * @maxLength 200
1682
+ */
1683
+ taxType?: string;
1684
+ /**
1685
+ * The name of the jurisdiction in which this tax detail applies.
1686
+ * @maxLength 200
1687
+ */
1688
+ jurisdiction?: string;
1689
+ /** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
1690
+ jurisdictionTypeEnum?: JurisdictionType;
1691
+ /**
1692
+ * The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.000 signifies 200% tax. (Decimal value)
1693
+ * @decimalValue options { gte:0, maxScale:6 }
1694
+ */
1695
+ rate?: string;
1696
+ /** The sum of all the tax from line items that calculated by the tax identifiers. */
1697
+ aggregatedTaxAmount?: MultiCurrencyPrice;
1698
+ }
1699
+ export declare enum ChannelType {
1700
+ /** Unspecified sales channel. This value is not supported. */
1701
+ UNSPECIFIED = "UNSPECIFIED",
1702
+ /** A web client. */
1703
+ WEB = "WEB",
1704
+ /** [Point of sale solutions](https://support.wix.com/en/wix-mobile-pos-2196395). */
1705
+ POS = "POS",
1706
+ /** [eBay shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-ebay-shop). */
1707
+ EBAY = "EBAY",
1708
+ /** [Amazon shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-amazon-shop). */
1709
+ AMAZON = "AMAZON",
1710
+ /** Other sales platform. */
1711
+ OTHER_PLATFORM = "OTHER_PLATFORM",
1712
+ /** [Wix Owner app](https://support.wix.com/article/wix-owner-app-an-overview). */
1713
+ WIX_APP_STORE = "WIX_APP_STORE",
1714
+ /** 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) */
1715
+ WIX_INVOICES = "WIX_INVOICES",
1716
+ /** Wix merchant backoffice. */
1717
+ BACKOFFICE_MERCHANT = "BACKOFFICE_MERCHANT",
1718
+ /** Wish sales channel. */
1719
+ WISH = "WISH",
1720
+ /** [ClassPass sales channel](https://support.wix.com/en/article/wix-bookings-letting-clients-book-your-services-with-classpass). */
1721
+ CLASS_PASS = "CLASS_PASS",
1722
+ /** Global-E sales channel. */
1723
+ GLOBAL_E = "GLOBAL_E",
1724
+ /** [Facebook shop](https://support.wix.com/en/article/wix-stores-changes-to-facebook-shops). */
1725
+ FACEBOOK = "FACEBOOK",
1726
+ /** [Etsy sales channel](https://support.wix.com/en/article/wix-stores-request-adding-etsy-as-a-sales-channel). */
1727
+ ETSY = "ETSY",
1728
+ /** [TikTok sales channel](https://support.wix.com/en/article/wix-stores-request-adding-tiktok-as-a-sales-channel). */
1729
+ TIKTOK = "TIKTOK",
1730
+ /** [Faire marketplace integration](https://support.wix.com/en/article/wix-stores-creating-a-faire-store-using-the-faire-integration-app). */
1731
+ FAIRE_COM = "FAIRE_COM"
1732
+ }
1733
+ export interface CreatedBy extends CreatedByIdOneOf {
1734
+ /**
1735
+ * User ID. When the order was created by a Wix user on behalf of a buyer.
1736
+ * For example, via POS (point of service).
1737
+ * @format GUID
1738
+ */
1739
+ userId?: string;
1740
+ /**
1741
+ * Member ID. When the order was created by a **logged in** site visitor.
1742
+ * @format GUID
1743
+ */
1744
+ memberId?: string;
1745
+ /**
1746
+ * Visitor ID. When the order was created by a site visitor that was **not** logged in.
1747
+ * @format GUID
1748
+ */
1749
+ visitorId?: string;
1750
+ /**
1751
+ * App ID. When the order was created by an external application or Wix service.
1752
+ * @format GUID
1753
+ */
1754
+ appId?: string;
1755
+ }
1756
+ /** @oneof */
1757
+ export interface CreatedByIdOneOf {
1758
+ /**
1759
+ * User ID. When the order was created by a Wix user on behalf of a buyer.
1760
+ * For example, via POS (point of service).
1761
+ * @format GUID
1762
+ */
1763
+ userId?: string;
1764
+ /**
1765
+ * Member ID. When the order was created by a **logged in** site visitor.
1766
+ * @format GUID
1767
+ */
1768
+ memberId?: string;
1769
+ /**
1770
+ * Visitor ID. When the order was created by a site visitor that was **not** logged in.
1771
+ * @format GUID
1772
+ */
1773
+ visitorId?: string;
1774
+ /**
1775
+ * App ID. When the order was created by an external application or Wix service.
1776
+ * @format GUID
1777
+ */
1778
+ appId?: string;
1779
+ }
1780
+ /** Reserved for internal use. */
1781
+ export interface MembershipOptions {
1782
+ /**
1783
+ * Reserved for internal use.
1784
+ * @readonly
1785
+ * @maxSize 300
1786
+ */
1787
+ eligibleMemberships?: Membership[];
1788
+ /**
1789
+ * Reserved for internal use.
1790
+ * @readonly
1791
+ * @maxSize 300
1792
+ */
1793
+ invalidMemberships?: InvalidMembership[];
1794
+ /** Selected membership to apply to this checkout. */
1795
+ selectedMemberships?: SelectedMemberships;
1796
+ }
1797
+ export interface Membership {
1798
+ /**
1799
+ * Membership ID.
1800
+ * @minLength 1
1801
+ * @maxLength 100
1802
+ */
1803
+ id?: string;
1804
+ /**
1805
+ * ID of the application providing this payment option.
1806
+ * @format GUID
1807
+ */
1808
+ appId?: string;
1809
+ /** The name of this membership. */
1810
+ name?: MembershipName;
1811
+ /**
1812
+ * Line item IDs which are "paid" for by this membership.
1813
+ * @minSize 1
1814
+ * @maxSize 300
1815
+ * @minLength 1
1816
+ * @maxLength 100
1817
+ */
1818
+ lineItemIds?: string[];
1819
+ /** Optional - For a membership that has limited credits, information about credit usage. */
1820
+ credits?: MembershipPaymentCredits;
1821
+ /** Optional - TMembership expiry date. */
1822
+ expirationDate?: Date | null;
1823
+ /** Additional data about this membership. */
1824
+ additionalData?: Record<string, any> | null;
1825
+ }
1826
+ export interface MembershipName {
1827
+ /**
1828
+ * Membership name.
1829
+ * @maxLength 100
1830
+ */
1831
+ original?: string;
1832
+ /**
1833
+ * Translated membership name. Defaults to `original` when not provided.
1834
+ * @maxLength 100
1835
+ */
1836
+ translated?: string | null;
1837
+ }
1838
+ export interface MembershipPaymentCredits {
1839
+ /**
1840
+ * Membership's total amount of credits.
1841
+ * @min 1
1842
+ */
1843
+ total?: number;
1844
+ /** Membership's remaining amount of credits. */
1845
+ remaining?: number;
1846
+ }
1847
+ export interface InvalidMembership {
1848
+ /** Membership details. */
1849
+ membership?: Membership;
1850
+ /**
1851
+ * Reason why this membership is invalid and cannot be used.
1852
+ * @minLength 1
1853
+ * @maxLength 100
1854
+ */
1855
+ reason?: string;
1856
+ }
1857
+ export interface SelectedMemberships {
1858
+ /**
1859
+ * Selected memberships.
1860
+ * @maxSize 300
1861
+ */
1862
+ memberships?: SelectedMembership[];
1863
+ }
1864
+ export interface SelectedMembership {
1865
+ /**
1866
+ * Membership ID.
1867
+ * @minLength 1
1868
+ * @maxLength 100
1869
+ */
1870
+ id?: string;
1871
+ /**
1872
+ * ID of the app providing this payment option.
1873
+ * @format GUID
1874
+ */
1875
+ appId?: string;
1876
+ /**
1877
+ * IDs of the line items this membership applies to.
1878
+ * @minSize 1
1879
+ * @maxSize 300
1880
+ * @minLength 1
1881
+ * @maxLength 100
1882
+ */
1883
+ lineItemIds?: string[];
1884
+ }
1885
+ export interface AdditionalFee {
1886
+ /**
1887
+ * Additional fee's unique code (or ID) for future processing.
1888
+ * @minLength 1
1889
+ * @maxLength 100
1890
+ */
1891
+ code?: string | null;
1892
+ /**
1893
+ * Translated additional fee's name.
1894
+ * @minLength 1
1895
+ * @maxLength 50
1896
+ */
1897
+ name?: string;
1898
+ /** Additional fee's price. */
1899
+ price?: MultiCurrencyPrice;
1900
+ /** Tax details. */
1901
+ taxDetails?: ItemTaxFullDetails;
1902
+ /**
1903
+ * Provider's app id.
1904
+ * @minLength 1
1905
+ * @maxLength 100
1906
+ */
1907
+ providerAppId?: string | null;
1908
+ /** Additional fee's price before tax. */
1909
+ priceBeforeTax?: MultiCurrencyPrice;
1910
+ /** Additional fee's price after tax. */
1911
+ priceAfterTax?: MultiCurrencyPrice;
1912
+ /**
1913
+ * Optional - Line items associated with this additional fee.
1914
+ * If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order.
1915
+ * @format GUID
1916
+ */
1917
+ lineItemIds?: string[];
1918
+ /** the source the additional fee was added from */
1919
+ source?: AdditionalFeeSource;
1920
+ }
1921
+ export declare enum AdditionalFeeSource {
1922
+ UNKNOWN_ADDITIONAL_FEE_SOURCE = "UNKNOWN_ADDITIONAL_FEE_SOURCE",
1923
+ /** The additional fee was added by an additional fee service plugin */
1924
+ SERVICE_PLUGIN = "SERVICE_PLUGIN",
1925
+ /** The additional fee was added on the item either via the catalog or on custom line item */
1926
+ ITEM = "ITEM",
1927
+ /** The additional fee was added manually on the request */
1928
+ MANUAL = "MANUAL"
1929
+ }
1930
+ export interface ConversionInfo {
1931
+ /**
1932
+ * The site currency.
1933
+ * @readonly
1934
+ * @format CURRENCY
1935
+ */
1936
+ siteCurrency?: string;
1937
+ /**
1938
+ * The rate used when converting from the site currency to the checkout currency.
1939
+ * @readonly
1940
+ * @decimalValue options { gt:0, lte:1000000000000000 }
1941
+ */
1942
+ conversionRate?: string;
1943
+ }
1944
+ export interface Violation {
1945
+ /** Severity of the violation. The violations are shown on the cart and checkout pages. A warning is displayed as yellow, and allows a site visitor to proceed with caution. An error is displayed as red, and doesn't allow a site visitor to proceed with the eCommerce flow. */
1946
+ severity?: Severity;
1947
+ /** Target location on a checkout or cart page where the violation will be displayed. */
1948
+ target?: Target;
1949
+ /**
1950
+ * Violation description. Can include rich text. Only HTTP or HTTPS links in the following format are allowed: `<a href="https://www.wix.com">Click me</a>`.
1951
+ * @minLength 1
1952
+ * @maxLength 1000
1953
+ */
1954
+ description?: string | null;
1955
+ }
1956
+ export declare enum Severity {
1957
+ /** The user is allowed to move forward in the flow. */
1958
+ WARNING = "WARNING",
1959
+ /**
1960
+ * The user is blocked from moving forward in the flow.
1961
+ * For example, if callerContext is CART - moving to checkout is blocked. if callerContext is CHECKOUT, placing an order is blocked.
1962
+ */
1963
+ ERROR = "ERROR"
1964
+ }
1965
+ export interface Target extends TargetTargetTypeOneOf {
1966
+ /** General (other) violation. */
1967
+ other?: Other;
1968
+ /** Specific line item violation. */
1969
+ lineItem?: TargetLineItem;
1970
+ }
1971
+ /** @oneof */
1972
+ export interface TargetTargetTypeOneOf {
1973
+ /** General (other) violation. */
1974
+ other?: Other;
1975
+ /** Specific line item violation. */
1976
+ lineItem?: TargetLineItem;
1977
+ }
1978
+ /** Available locations on the webpage */
1979
+ export declare enum NameInOther {
1980
+ /** Default location, in case no specific location is specified. */
1981
+ OTHER_DEFAULT = "OTHER_DEFAULT"
1982
+ }
1983
+ /** Available locations on the line item */
1984
+ export declare enum NameInLineItem {
1985
+ /** Default location, in case no specific location is specified. */
1986
+ LINE_ITEM_DEFAULT = "LINE_ITEM_DEFAULT"
1987
+ }
1988
+ export declare enum SuggestedFix {
1989
+ /** No suggested fix is specified. The user should refer to the violation description to resolve the issue. */
1990
+ UNKNOWN_SUGGESTED_FIX = "UNKNOWN_SUGGESTED_FIX",
1991
+ /** The line item should be removed from the cart or checkout to resolve the violation. */
1992
+ REMOVE_LINE_ITEM = "REMOVE_LINE_ITEM"
1993
+ }
1994
+ /** General (other) violation. */
1995
+ export interface Other {
1996
+ /** Location on a checkout or a cart page where a general (other) violation will be displayed. */
1997
+ name?: NameInOther;
1998
+ }
1999
+ /** Specific line item violation. */
2000
+ export interface TargetLineItem {
2001
+ /** Location on a checkout or a cart page where the specific line item violation will be displayed. */
2002
+ name?: NameInLineItem;
2003
+ /** ID of the line item containing the violation. */
2004
+ id?: string | null;
2005
+ }
2006
+ export interface CustomSettings {
2007
+ /**
2008
+ * Whether to restrict the option to add or remove a gift card on the checkout page.
2009
+ *
2010
+ * Default: `false`
2011
+ */
2012
+ lockGiftCard?: boolean;
2013
+ /**
2014
+ * Whether to restrict the option to add or remove a coupon code on the checkout page.
2015
+ *
2016
+ * Default: `false`
2017
+ */
2018
+ lockCouponCode?: boolean;
2019
+ /**
2020
+ * Whether to disable policy agreement checkout in the checkout page
2021
+ *
2022
+ * Default: `false`
2023
+ */
2024
+ disabledPolicyAgreementCheckbox?: boolean;
2025
+ /**
2026
+ * Whether to disable manual payment option for this checkout.
2027
+ *
2028
+ * Default: `false`
2029
+ */
2030
+ disabledManualPayment?: boolean;
2031
+ }
2032
+ export interface CustomContentReference {
2033
+ /**
2034
+ * ID of the app providing the content.
2035
+ *
2036
+ * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
2037
+ * @format GUID
2038
+ */
2039
+ appId?: string;
2040
+ /**
2041
+ * ID of the component within the app it belongs to.
2042
+ *
2043
+ * You can get your component's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
2044
+ * @format GUID
2045
+ */
2046
+ componentId?: string;
2047
+ }
2048
+ export interface ExternalReference {
2049
+ /**
2050
+ * ID of the app associated with the purchase flow.
2051
+ * For example, the Wix Pay Links app ID.
2052
+ * @format GUID
2053
+ * @immutable
2054
+ */
2055
+ appId?: string;
2056
+ /**
2057
+ * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.
2058
+ * For example, a Wix Pay Link ID.
2059
+ * @minLength 1
2060
+ * @maxLength 100
2061
+ * @immutable
2062
+ */
2063
+ resourceId?: string | null;
2064
+ }
2065
+ export interface SubscriptionCharges {
2066
+ /**
2067
+ * ids of the items the subscription is defined on
2068
+ * @format GUID
2069
+ * @minSize 1
2070
+ * @maxSize 300
2071
+ */
2072
+ lineItemIds?: string[];
2073
+ /**
2074
+ * Generated description explaining future charges amount and schedule.
2075
+ * Translated to subscription order buyer language, or to site language if was not provided.
2076
+ * @maxLength 1000
2077
+ */
2078
+ description?: string | null;
2079
+ /**
2080
+ * Charges for subscription.
2081
+ * @maxSize 50
2082
+ */
2083
+ charges?: Charge[];
2084
+ }
2085
+ export interface Charge {
2086
+ /** The cycle number from which the charge starts. */
2087
+ cycleFrom?: number;
2088
+ /** The number of cycles for which the charge is applicable. */
2089
+ cycleCount?: number | null;
2090
+ /** Charge summary. */
2091
+ priceSummary?: PriceSummary;
2092
+ /** The billing date from which the charge starts. */
2093
+ cycleBillingDate?: Date | null;
2094
+ }
2095
+ export interface UpdatedCheckoutMessage {
2096
+ /** Previous checkout. */
2097
+ oldCheckout?: Checkout;
2098
+ /** Updated checkout. */
2099
+ updatedCheckout?: Checkout;
2100
+ }
2101
+ export interface CreateCheckoutRequest {
2102
+ /** Checkout information. */
2103
+ checkoutInfo?: Checkout;
2104
+ /** Coupon code. */
2105
+ couponCode?: string | null;
2106
+ /**
2107
+ * Catalog line items to add to the checkout.
2108
+ * @maxSize 300
2109
+ */
2110
+ lineItems?: LineItem[];
2111
+ /**
2112
+ * Custom line items to add to the checkout. Custom line items don't trigger the Catalog service plugin.
2113
+ *
2114
+ * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
2115
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
2116
+ * @maxSize 300
2117
+ */
2118
+ customLineItems?: CustomLineItem[];
2119
+ /** Sales channel that submitted the order. */
2120
+ channelType: ChannelType;
2121
+ /**
2122
+ * Gift card code.
2123
+ *
2124
+ * The checkout can only hold 1 `giftCardCode` at a time. If an additional `giftCardCode` is added, it will override the existing `giftCardCode`.
2125
+ *
2126
+ * >**Note:** Gift cards are supported through the Wix UI, though the service plugin is not currently available. Learn more about [Wix Gift Cards](https://support.wix.com/en/article/setting-up-wix-gift-cards-9451439).
2127
+ */
2128
+ giftCardCode?: string | null;
2129
+ /**
2130
+ * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
2131
+ *
2132
+ * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used in the Abandoned Checkout API
2133
+ * to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a
2134
+ * standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
2135
+ * @maxLength 1000
2136
+ */
2137
+ overrideCheckoutUrl?: string | null;
2138
+ }
2139
+ export interface CustomLineItem {
2140
+ /**
2141
+ * Custom line item quantity.
2142
+ *
2143
+ * Min: `1`
2144
+ * Max: `100000`
2145
+ * @min 1
2146
+ * @max 100000
2147
+ */
2148
+ quantity?: number;
2149
+ /**
2150
+ * Custom line item price.
2151
+ *
2152
+ * Must be a number or a decimal without symbols.
2153
+ * @format DECIMAL_VALUE
2154
+ * @decimalValue options { gte:0, lte:1000000000000000 }
2155
+ */
2156
+ price?: string;
2157
+ /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */
2158
+ priceDescription?: PriceDescription;
2159
+ /**
2160
+ * Custom line item description lines. Used for display purposes for the cart, checkout and order.
2161
+ * @maxSize 10
2162
+ */
2163
+ descriptionLines?: DescriptionLine[];
2164
+ /** Custom line item's media. */
2165
+ media?: Image;
2166
+ /**
2167
+ * Custom line item ID. If passed, `id` must be unique.
2168
+ *
2169
+ * Default: auto-generated ID
2170
+ * @format GUID
2171
+ */
2172
+ id?: string | null;
2173
+ /**
2174
+ * Tax group ID for this custom line item.
2175
+ * @format GUID
2176
+ */
2177
+ taxGroupId?: string | null;
2178
+ /** Name of the item or product. */
2179
+ productName?: ProductName;
2180
+ /** URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work. */
2181
+ url?: PageUrlV2;
2182
+ /** Item type. Either a preset type or custom. */
2183
+ itemType?: ItemType;
2184
+ /**
2185
+ * Item price **before** catalog-defined discount. Defaults to `price` when not provided.
2186
+ * @format DECIMAL_VALUE
2187
+ */
2188
+ fullPrice?: string | null;
2189
+ /**
2190
+ * Item quantity available for purchase. Only return this if inventory is managed.
2191
+ * Not returning this field means that the buyer can "infinitely" tick up the number of items in the cart.
2192
+ * @max 100000
2193
+ */
2194
+ quantityAvailable?: number | null;
2195
+ /** Physical properties of the item. */
2196
+ physicalProperties?: PhysicalProperties;
2197
+ /**
2198
+ * Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.
2199
+ *
2200
+ * + `FULL_PAYMENT_ONLINE` - Entire payment for this item happens as part of the checkout.
2201
+ * + `FULL_PAYMENT_OFFLINE` - Entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.
2202
+ * + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.
2203
+ * + `DEPOSIT_ONLINE` - Partial payment for the given item to be paid upfront during the checkout. Amount to be paid is defined by deposit_amount field.
2204
+ */
2205
+ paymentOption?: PaymentOptionType;
2206
+ /**
2207
+ * Service properties. When relevant, this contains information such as date and number of participants.
2208
+ * Used, among other things, when checking for valid memberships.
2209
+ */
2210
+ serviceProperties?: ServiceProperties;
2211
+ /**
2212
+ * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.
2213
+ *
2214
+ * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.
2215
+ * + In most cases, this field is the same as `catalogReference.catalogItemId`.
2216
+ * + Used in membership validation.
2217
+ * @minLength 1
2218
+ * @maxLength 36
2219
+ */
2220
+ rootCatalogItemId?: string | null;
2221
+ /**
2222
+ * Partial payment for the given item to be paid upfront during the checkout.
2223
+ *
2224
+ * Eligible for catalog items with type `DEPOSIT_ONLINE`.
2225
+ * When omitted, the item's price will not be split and is expected to be paid in a single installment.
2226
+ * @format DECIMAL_VALUE
2227
+ */
2228
+ depositAmount?: string | null;
2229
+ /**
2230
+ * Delivery profile ID.
2231
+ * @format GUID
2232
+ */
2233
+ deliveryProfileId?: string | null;
2234
+ /** Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */
2235
+ catalogReference?: CatalogReference;
2236
+ /**
2237
+ * Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.
2238
+ * @minLength 1
2239
+ * @maxLength 1000
2240
+ * @readonly
2241
+ */
2242
+ consentRequiredPaymentPolicy?: string | null;
2243
+ /**
2244
+ * Whether to save the payment method on the order.
2245
+ *
2246
+ * Default: `false`
2247
+ * @readonly
2248
+ */
2249
+ savePaymentMethod?: boolean;
2250
+ }
2251
+ export interface MerchantDiscountInput {
2252
+ /**
2253
+ * Discount amount.
2254
+ * @decimalValue options { gte:0 }
2255
+ */
2256
+ amount?: string;
2257
+ /**
2258
+ * IDs of line items the discount applies to.
2259
+ * @format GUID
2260
+ * @maxSize 300
2261
+ */
2262
+ lineItemIds?: string[];
2263
+ }
2264
+ export interface CreateCheckoutResponse {
2265
+ /** Newly created checkout. */
2266
+ checkout?: Checkout;
2267
+ }
2268
+ export interface ShippingCalculationErrorData extends ShippingCalculationErrorDataShippingCalculationErrorOneOf {
2269
+ generalShippingCalculationError?: Details;
2270
+ carrierErrors?: CarrierErrors;
2271
+ }
2272
+ /** @oneof */
2273
+ export interface ShippingCalculationErrorDataShippingCalculationErrorOneOf {
2274
+ generalShippingCalculationError?: Details;
2275
+ carrierErrors?: CarrierErrors;
2276
+ }
2277
+ export interface GetCheckoutRequest {
2278
+ /**
2279
+ * Checkout ID.
2280
+ * @format GUID
2281
+ */
2282
+ id: string;
2283
+ }
2284
+ export interface GetCheckoutResponse {
2285
+ /** Retrieved checkout. */
2286
+ checkout?: Checkout;
2287
+ }
2288
+ export interface GetCheckoutWithAllExtendedFieldsRequest {
2289
+ /**
2290
+ * Checkout ID.
2291
+ * @format GUID
2292
+ */
2293
+ id?: string;
2294
+ }
2295
+ export interface GetCheckoutWithAllExtendedFieldsResponse {
2296
+ /** Retrieved checkout. */
2297
+ checkout?: Checkout;
2298
+ }
2299
+ export interface GetCheckoutByCartIdRequest {
2300
+ /**
2301
+ * Cart ID.
2302
+ * @format GUID
2303
+ */
2304
+ id: string;
2305
+ }
2306
+ export interface GetCheckoutByCartIdResponse {
2307
+ /** Retrieved checkout. */
2308
+ checkout?: Checkout;
2309
+ }
2310
+ export interface GetWixCheckoutURLRequest {
2311
+ /**
2312
+ * Checkout ID.
2313
+ * @format GUID
2314
+ */
2315
+ id: string;
2316
+ }
2317
+ export interface GetWixCheckoutURLResponse {
2318
+ /** Checkout URL. */
2319
+ checkoutUrl?: string;
2320
+ }
2321
+ export interface GetCheckoutURLRequest {
2322
+ /**
2323
+ * Checkout ID.
2324
+ * @format GUID
2325
+ */
2326
+ id: string;
2327
+ }
2328
+ export interface GetCheckoutURLResponse {
2329
+ /** Checkout URL. */
2330
+ checkoutUrl?: string;
2331
+ }
2332
+ export interface UpdateCheckoutRequest {
2333
+ /** Checkout information. */
2334
+ checkout: Checkout;
2335
+ /**
2336
+ * Coupon code.
2337
+ *
2338
+ * The checkout can only hold 1 `couponCode` at a time. If an additional `couponCode` is added, it will override the existing `couponCode`.
2339
+ */
2340
+ couponCode?: string | null;
2341
+ /** Gift card code. */
2342
+ giftCardCode?: string | null;
2343
+ /**
2344
+ * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
2345
+ *
2346
+ * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used in the Abandoned Checkout API
2347
+ * to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a
2348
+ * standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
2349
+ * @maxLength 1000
2350
+ */
2351
+ overrideCheckoutUrl?: string | null;
2352
+ /**
2353
+ * Catalog line items.
2354
+ * @maxSize 300
2355
+ */
2356
+ lineItems?: LineItem[];
2357
+ /**
2358
+ * Custom line items. Custom line items don't trigger the Catalog service plugin.
2359
+ *
2360
+ * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
2361
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
2362
+ * @maxSize 300
2363
+ */
2364
+ customLineItems?: CustomLineItem[];
2365
+ }
2366
+ export interface UpdateCheckoutResponse {
2367
+ /** Updated checkout. */
2368
+ checkout?: Checkout;
2369
+ }
2370
+ export interface RemoveCouponRequest {
2371
+ /**
2372
+ * ID of the checkout to remove the coupon from.
2373
+ * @format GUID
2374
+ */
2375
+ id: string;
2376
+ }
2377
+ export interface RemoveCouponResponse {
2378
+ /** Updated checkout after removal of coupon. */
2379
+ checkout?: Checkout;
2380
+ }
2381
+ export interface RemoveGiftCardRequest {
2382
+ /**
2383
+ * ID of the checkout to remove the gift card from.
2384
+ * @format GUID
2385
+ */
2386
+ id: string;
2387
+ }
2388
+ export interface RemoveGiftCardResponse {
2389
+ /** Updated checkout after removal of gift card. */
2390
+ checkout?: Checkout;
2391
+ }
2392
+ export interface RemoveOverrideCheckoutUrlRequest {
2393
+ /**
2394
+ * ID of the checkout to remove the override checkout url from.
2395
+ * @format GUID
2396
+ */
2397
+ id: string;
2398
+ }
2399
+ export interface RemoveOverrideCheckoutUrlResponse {
2400
+ /** Updated checkout after removal of override checkout url. */
2401
+ checkout?: Checkout;
2402
+ }
2403
+ export interface AddToCheckoutRequest {
2404
+ /**
2405
+ * Checkout ID.
2406
+ * @format GUID
2407
+ */
2408
+ id: string;
2409
+ /**
2410
+ * Catalog line items.
2411
+ * @maxSize 100
2412
+ */
2413
+ lineItems?: LineItem[];
2414
+ /**
2415
+ * Custom line items. Custom line items don't trigger the Catalog service plugin.
2416
+ *
2417
+ * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
2418
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
2419
+ * @maxSize 100
2420
+ */
2421
+ customLineItems?: CustomLineItem[];
2422
+ }
2423
+ export interface AddToCheckoutResponse {
2424
+ /** Updated checkout. */
2425
+ checkout?: Checkout;
2426
+ }
2427
+ export interface RemoveLineItemsRequest {
2428
+ /**
2429
+ * ID of the checkout to remove line items from.
2430
+ * @format GUID
2431
+ */
2432
+ id: string;
2433
+ /**
2434
+ * IDs of the line items to remove from the checkout.
2435
+ *
2436
+ * To find the IDs of the checkout line items you'd like to remove,
2437
+ * pass the checkout ID to Get Checkout and look for the IDs under
2438
+ * `lineItems`.
2439
+ * @format GUID
2440
+ * @minSize 1
2441
+ * @maxSize 300
2442
+ */
2443
+ lineItemIds: string[];
2444
+ }
2445
+ export interface RemoveLineItemsResponse {
2446
+ /** Updated checkout after removal of line items. */
2447
+ checkout?: Checkout;
2448
+ }
2449
+ export interface CreateOrderRequest {
2450
+ /**
2451
+ * Checkout ID.
2452
+ * @format GUID
2453
+ */
2454
+ id: string;
2455
+ /** Whether the payment method should be saved on the order. */
2456
+ savePaymentMethod?: boolean;
2457
+ /** Whether to authorize the payment and delay the capture. */
2458
+ delayCapture?: boolean;
2459
+ }
2460
+ export interface CreateOrderResponse extends CreateOrderResponseIdOneOf {
2461
+ /**
2462
+ * ID of newly created order.
2463
+ * @format GUID
2464
+ */
2465
+ orderId?: string;
2466
+ /**
2467
+ * ID of newly created subscription. Learn more about your site's [Subscriptions](https://support.wix.com/en/article/wix-stores-managing-product-subscriptions).
2468
+ * @format GUID
2469
+ */
2470
+ subscriptionId?: string;
2471
+ /**
2472
+ * Payment gateway order ID.
2473
+ *
2474
+ * For online orders, pass this value as the `paymentId` parameter to the Wix Pay [`startPayment()`](https://www.wix.com/velo/reference/wix-pay-frontend/startpayment) function so your customer can pay for the order.
2475
+ * `paymentGatewayOrderId` will be returned if money needs to be charged.
2476
+ *
2477
+ * In some cases, money cannot be charged:
2478
+ * + When the total price (the `priceSummary.total.amount` field in the checkout/order objects) is `0`. For example, in the case of a free item or an item with a 100% discount.
2479
+ * + If the total price is not `0`, but the payment is covered by alternative payment methods, such as a gift card.
2480
+ */
2481
+ paymentGatewayOrderId?: string | null;
2482
+ }
2483
+ /** @oneof */
2484
+ export interface CreateOrderResponseIdOneOf {
2485
+ /**
2486
+ * ID of newly created order.
2487
+ * @format GUID
2488
+ */
2489
+ orderId?: string;
2490
+ /**
2491
+ * ID of newly created subscription. Learn more about your site's [Subscriptions](https://support.wix.com/en/article/wix-stores-managing-product-subscriptions).
2492
+ * @format GUID
2493
+ */
2494
+ subscriptionId?: string;
2495
+ }
2496
+ export interface PaymentErrorResponseData {
2497
+ paymentResponseToken?: string | null;
2498
+ transactionStatus?: string;
2499
+ failureDetails?: string | null;
2500
+ }
2501
+ export interface DoublePaymentErrorData extends DoublePaymentErrorDataIdOneOf {
2502
+ /** @format GUID */
2503
+ orderId?: string;
2504
+ /** @format GUID */
2505
+ subscriptionId?: string;
2506
+ }
2507
+ /** @oneof */
2508
+ export interface DoublePaymentErrorDataIdOneOf {
2509
+ /** @format GUID */
2510
+ orderId?: string;
2511
+ /** @format GUID */
2512
+ subscriptionId?: string;
2513
+ }
2514
+ export interface RedeemErrorData {
2515
+ reason?: string;
2516
+ }
2517
+ export interface ViolationsList {
2518
+ /** Violations risen by ValidationsSPI implementers. */
2519
+ violations?: Violation[];
2520
+ }
2521
+ export interface CreateOrderAndChargeRequest {
2522
+ /**
2523
+ * Checkout ID.
2524
+ * @format GUID
2525
+ */
2526
+ id: string;
2527
+ /** Payment token. */
2528
+ paymentToken?: string | null;
2529
+ /** Whether the payment method should be saved on the order. */
2530
+ savePaymentMethod?: boolean;
2531
+ /** Whether to authorize the payment and delay the capture. */
2532
+ delayCapture?: boolean;
2533
+ }
2534
+ export interface CreateOrderAndChargeResponse extends CreateOrderAndChargeResponseIdOneOf {
2535
+ /**
2536
+ * ID of newly created order.
2537
+ * @format GUID
2538
+ */
2539
+ orderId?: string;
2540
+ /**
2541
+ * ID of newly created subscription.
2542
+ * @format GUID
2543
+ */
2544
+ subscriptionId?: string;
2545
+ /** Payment response token. */
2546
+ paymentResponseToken?: string | null;
2547
+ /**
2548
+ * The payment gateway is cashier.
2549
+ * payment_gateway_order_id will be returned given that money was charged.
2550
+ * In some cases, money will not be charged:
2551
+ * If the total price is 0 - For example, could be a free item or a an item with 100% discount
2552
+ * If the total price is not 0, but the payment is covered by alternative payment methods such as gift card
2553
+ */
2554
+ paymentGatewayOrderId?: string | null;
2555
+ }
2556
+ /** @oneof */
2557
+ export interface CreateOrderAndChargeResponseIdOneOf {
2558
+ /**
2559
+ * ID of newly created order.
2560
+ * @format GUID
2561
+ */
2562
+ orderId?: string;
2563
+ /**
2564
+ * ID of newly created subscription.
2565
+ * @format GUID
2566
+ */
2567
+ subscriptionId?: string;
2568
+ }
2569
+ export interface MarkCheckoutAsCompletedAndRedirectToUrlRequest {
2570
+ /**
2571
+ * Server-signed JWT token with required information to complete checkout
2572
+ * @maxLength 4096
2573
+ */
2574
+ token: string;
2575
+ }
2576
+ export interface RawHttpResponse {
2577
+ body?: Uint8Array;
2578
+ statusCode?: number | null;
2579
+ headers?: HeadersEntry[];
2580
+ }
2581
+ export interface HeadersEntry {
2582
+ key?: string;
2583
+ value?: string;
2584
+ }
2585
+ export interface MarkCheckoutAsCompletedRequest {
2586
+ /**
2587
+ * Checkout ID.
2588
+ * @format GUID
2589
+ */
2590
+ id: string;
2591
+ }
2592
+ export interface MarkCheckoutAsCompletedResponse {
2593
+ }
2594
+ /** Triggered when an order created from this checkout is successfully paid for or when a checkout is marked as completed. */
2595
+ export interface CheckoutMarkedAsCompleted {
2596
+ checkout?: Checkout;
2597
+ }
2598
+ export interface UpdateLineItemsQuantityRequest {
2599
+ /**
2600
+ * Checkout ID.
2601
+ * @format GUID
2602
+ */
2603
+ id: string;
2604
+ /**
2605
+ * Line item info to update.
2606
+ * @minSize 1
2607
+ * @maxSize 100
2608
+ */
2609
+ lineItems: LineItemQuantityUpdate[];
2610
+ }
2611
+ export interface LineItemQuantityUpdate {
2612
+ /**
2613
+ * ID of the line item to update.
2614
+ * @format GUID
2615
+ */
2616
+ id?: string;
2617
+ /**
2618
+ * New total amount of the line item,
2619
+ * not the amount to add to the current `quantity`.
2620
+ *
2621
+ * Min: `1`
2622
+ *
2623
+ * Max: `100000`
2624
+ * @min 1
2625
+ * @max 100000
2626
+ */
2627
+ quantity?: number;
2628
+ }
2629
+ export interface UpdateLineItemsQuantityResponse {
2630
+ /** Updated checkout. */
2631
+ checkout?: Checkout;
2632
+ }
2633
+ export interface GetCheckoutPaymentSettingsRequest {
2634
+ /**
2635
+ * Checkout ID.
2636
+ * @format GUID
2637
+ */
2638
+ id: string;
2639
+ }
2640
+ export interface GetCheckoutPaymentSettingsResponse {
2641
+ blockedPaymentOptions?: GetCheckoutPaymentSettingsResponsePaymentOption[];
2642
+ }
2643
+ export declare enum GetCheckoutPaymentSettingsResponsePaymentOption {
2644
+ UNKNOWN_PAYMENT_OPTION = "UNKNOWN_PAYMENT_OPTION",
2645
+ MANUAL = "MANUAL"
2646
+ }
2647
+ export interface DeleteCheckoutRequest {
2648
+ /**
2649
+ * ID of the checkout to delete.
2650
+ * @format GUID
2651
+ */
2652
+ id?: string;
2653
+ }
2654
+ export interface DeleteCheckoutResponse {
2655
+ }
2656
+ export interface SubscriptionCreated {
2657
+ subscription?: Subscription;
2658
+ }
2659
+ export interface Subscription {
2660
+ /**
2661
+ * Subscription id (auto-generated upon subscription creation)
2662
+ * @readonly
2663
+ */
2664
+ id?: string;
2665
+ /**
2666
+ * id of subscription in external system
2667
+ * @format GUID
2668
+ */
2669
+ externalId?: string | null;
2670
+ /**
2671
+ * Subscription creation date
2672
+ * @readonly
2673
+ */
2674
+ dateCreated?: Date | null;
2675
+ /**
2676
+ * The id of the cart this order was created from
2677
+ * @format GUID
2678
+ */
2679
+ cartId?: string | null;
2680
+ /**
2681
+ * The id of the checkout this subscriptions was created from
2682
+ * @format GUID
2683
+ */
2684
+ checkoutId?: string | null;
2685
+ /** member or contact */
2686
+ buyerInfo?: V1BuyerInfo;
2687
+ /**
2688
+ * Line items ordered
2689
+ * @minSize 1
2690
+ * @maxSize 1
2691
+ */
2692
+ lineItems?: V1LineItem[];
2693
+ /** Totals for subscription's line items */
2694
+ totals?: Totals;
2695
+ /** site settings at the moment when subscription created */
2696
+ storeSettings?: StoreSettings;
2697
+ /** Full billing address */
2698
+ billingAddress?: Address;
2699
+ /** Delivery information */
2700
+ shippingInfo?: V1ShippingInfo;
2701
+ /** Coupon that was applied to subscription */
2702
+ appliedCoupon?: AppliedCoupon;
2703
+ /**
2704
+ * Message from the customer (e.g., customization request)
2705
+ * @maxLength 1000
2706
+ */
2707
+ buyerNote?: string | null;
2708
+ /** Custom field */
2709
+ customField?: V1CustomField;
2710
+ /** Information about subscription option from which subscription was created */
2711
+ subscriptionOptionInfo?: V1SubscriptionOptionInfo;
2712
+ /** Sales channel that submitted this subscription */
2713
+ channelInfo?: ChannelInfo;
2714
+ /** defines when subscriber will be charged: for frequency=MONTH, billingCycles=6, interval=2 payment will be done every 2 month during one year */
2715
+ subscriptionSettings?: V1SubscriptionSettings;
2716
+ /**
2717
+ * information about first subscription payment
2718
+ * @readonly
2719
+ */
2720
+ billingInfo?: BillingInfo;
2721
+ }
2722
+ /** Buyer Info */
2723
+ export interface V1BuyerInfo {
2724
+ /**
2725
+ * Wix customer ID
2726
+ * @format GUID
2727
+ */
2728
+ id?: string;
2729
+ /** Customer type */
2730
+ identityType?: IdentityType;
2731
+ }
2732
+ export declare enum IdentityType {
2733
+ UNSPECIFIED_IDENTITY_TYPE = "UNSPECIFIED_IDENTITY_TYPE",
2734
+ /** Site member */
2735
+ MEMBER = "MEMBER",
2736
+ /** Contact */
2737
+ CONTACT = "CONTACT"
2738
+ }
2739
+ export interface V1LineItem {
2740
+ /** Line item ID (auto-generated) */
2741
+ index?: number;
2742
+ /**
2743
+ * Line item quantity
2744
+ * @min 1
2745
+ * @max 100000
2746
+ */
2747
+ quantity?: number;
2748
+ /**
2749
+ * Line item variantId (from Stores Catalog)
2750
+ * @format GUID
2751
+ */
2752
+ variantId?: string | null;
2753
+ /**
2754
+ * Line item options ordered
2755
+ * @maxSize 6
2756
+ */
2757
+ options?: OptionSelection[];
2758
+ /**
2759
+ * Line item custom text field selections
2760
+ * @maxSize 20
2761
+ */
2762
+ customTextFields?: CustomTextFieldSelection[];
2763
+ /** Charges details */
2764
+ chargeDetails?: ChargeDetails;
2765
+ /** Product details */
2766
+ productDetails?: ProductDetails;
2767
+ }
2768
+ export interface OptionSelection {
2769
+ /**
2770
+ * Option name
2771
+ * @maxLength 200
2772
+ */
2773
+ option?: string;
2774
+ /**
2775
+ * Selected choice for this option
2776
+ * @maxLength 500
2777
+ */
2778
+ selection?: string;
2779
+ }
2780
+ export interface CustomTextFieldSelection {
2781
+ /**
2782
+ * Custom text field name
2783
+ * @maxLength 100
2784
+ */
2785
+ title?: string;
2786
+ /**
2787
+ * Custom text field value
2788
+ * @maxLength 500
2789
+ */
2790
+ value?: string;
2791
+ }
2792
+ export interface ChargeDetails {
2793
+ /**
2794
+ * price of line item (depends on subscription option)
2795
+ * @max 999999999.99
2796
+ */
2797
+ price?: number;
2798
+ /**
2799
+ * Total price charged to the customer (for this line items) after computation of quantity and discount
2800
+ * @max 999999999.99
2801
+ */
2802
+ totalPrice?: number | null;
2803
+ /**
2804
+ * Discount applied for this line item
2805
+ * @max 999999999.99
2806
+ */
2807
+ discount?: number | null;
2808
+ /**
2809
+ * Tax applied for this line item
2810
+ * @max 999999999.99
2811
+ */
2812
+ tax?: number | null;
2813
+ /** Is tax applied for this line item */
2814
+ taxIncludedInPrice?: boolean;
2815
+ /**
2816
+ * Tax rate %, as a decimal point >= 0
2817
+ * @decimalValue options { maxScale:6, gte:0 }
2818
+ */
2819
+ taxRate?: string | null;
2820
+ }
2821
+ export interface ProductDetails {
2822
+ /**
2823
+ * Line item product ID (optional for POS orders)
2824
+ * @minLength 1
2825
+ */
2826
+ productId?: string | null;
2827
+ /**
2828
+ * Line item name
2829
+ * @minLength 1
2830
+ * @maxLength 100
2831
+ */
2832
+ name?: string;
2833
+ /**
2834
+ * Line item name translated to buyer's language
2835
+ * @minLength 1
2836
+ * @maxLength 100
2837
+ */
2838
+ translatedName?: string | null;
2839
+ /** Line item type (may be extended) */
2840
+ lineItemType?: LineItemType;
2841
+ /** Line item primary media for preview */
2842
+ mediaItem?: MediaItem;
2843
+ /**
2844
+ * Line item SKU
2845
+ * @maxLength 40
2846
+ */
2847
+ sku?: string | null;
2848
+ /**
2849
+ * Line item weight
2850
+ * @max 999999999.99
2851
+ */
2852
+ weight?: number | null;
2853
+ /**
2854
+ * Line item notes
2855
+ * @maxLength 1000
2856
+ */
2857
+ notes?: string | null;
2858
+ /**
2859
+ * Line item fulfillerId from stores fulfillers. No value means self fulfilled
2860
+ * @format GUID
2861
+ */
2862
+ fulfillerId?: string | null;
2863
+ /**
2864
+ * Tax group id
2865
+ * @format GUID
2866
+ */
2867
+ taxGroupId?: string | null;
2868
+ /**
2869
+ * App id from the catalog reference
2870
+ * @format GUID
2871
+ */
2872
+ appId?: string | null;
2873
+ }
2874
+ export declare enum LineItemType {
2875
+ /** Line item type can't be classified, due to an error */
2876
+ UNSPECIFIED_LINE_ITEM_TYPE = "UNSPECIFIED_LINE_ITEM_TYPE",
2877
+ /** Physical item type */
2878
+ PHYSICAL = "PHYSICAL",
2879
+ /** Digital item type */
2880
+ DIGITAL = "DIGITAL",
2881
+ /** Custom item price */
2882
+ CUSTOM_AMOUNT_ITEM = "CUSTOM_AMOUNT_ITEM"
2883
+ }
2884
+ export interface MediaItem {
2885
+ /**
2886
+ * Media type
2887
+ * @readonly
2888
+ */
2889
+ mediaType?: MediaItemType;
2890
+ /**
2891
+ * Media URL
2892
+ * @format WEB_URL
2893
+ * @readonly
2894
+ */
2895
+ url?: string;
2896
+ /**
2897
+ * Media item width
2898
+ * @max 5000
2899
+ * @readonly
2900
+ */
2901
+ width?: number;
2902
+ /**
2903
+ * Media item height
2904
+ * @max 5000
2905
+ * @readonly
2906
+ */
2907
+ height?: number;
2908
+ /** Media ID (for media items previously saved in Wix Media) */
2909
+ id?: string | null;
2910
+ /** Media external URL */
2911
+ externalImageUrl?: string | null;
2912
+ /**
2913
+ * Alternative text for presentation when media cannot be displayed
2914
+ * @maxLength 256
2915
+ */
2916
+ altText?: string | null;
2917
+ }
2918
+ export declare enum MediaItemType {
2919
+ /** Media item type can't be classified, due to an error */
2920
+ UNSPECIFIED_MEDIA_TYPE_ITEM = "UNSPECIFIED_MEDIA_TYPE_ITEM",
2921
+ /** Image item type */
2922
+ IMAGE = "IMAGE"
2923
+ }
2924
+ export interface Totals {
2925
+ /**
2926
+ * Subtotal of all line items, before tax
2927
+ * @max 999999999.99
2928
+ */
2929
+ subtotal?: number;
2930
+ /**
2931
+ * Total shipping price, including tax
2932
+ * @max 999999999.99
2933
+ */
2934
+ shipping?: number;
2935
+ /**
2936
+ * Total tax
2937
+ * @max 999999999.99
2938
+ */
2939
+ tax?: number;
2940
+ /**
2941
+ * Total calculated discount value
2942
+ * @max 999999999.99
2943
+ */
2944
+ discount?: number;
2945
+ /**
2946
+ * Total price
2947
+ * @max 999999999.99
2948
+ */
2949
+ total?: number;
2950
+ /**
2951
+ * Total weight
2952
+ * @max 999999999.99
2953
+ */
2954
+ weight?: number | null;
2955
+ /**
2956
+ * Total line items quantity
2957
+ * @readonly
2958
+ */
2959
+ quantity?: number;
2960
+ }
2961
+ export interface StoreSettings {
2962
+ /**
2963
+ * Currency used for pricing in this store
2964
+ * @maxLength 3
2965
+ * @format CURRENCY
2966
+ */
2967
+ currency?: string | null;
2968
+ /** Weight unit used in this store */
2969
+ weightUnit?: WeightUnit;
2970
+ /**
2971
+ * The language to be used when communicating with the buyer
2972
+ * For a site that support multiple languages, this would be the language the buyer selected
2973
+ * Otherwise this would be the site language
2974
+ * @minLength 2
2975
+ * @maxLength 2
2976
+ */
2977
+ buyerLanguage?: string | null;
2978
+ }
2979
+ export interface Address extends AddressAddressLine1OptionsOneOf {
2980
+ /**
2981
+ * Address line 1 (free text)
2982
+ * @maxLength 1000
2983
+ */
2984
+ addressLine1?: string;
2985
+ /** Address line 1 (street) */
2986
+ street?: Street;
2987
+ /** Addressee name */
2988
+ fullName?: FullName;
2989
+ /**
2990
+ * Country code (2 letters)
2991
+ * @format COUNTRY
2992
+ */
2993
+ country?: string | null;
2994
+ /**
2995
+ * State or district
2996
+ * @maxLength 50
2997
+ */
2998
+ subdivision?: string | null;
2999
+ /**
3000
+ * City name
3001
+ * @maxLength 150
3002
+ */
3003
+ city?: string | null;
3004
+ /**
3005
+ * ZIP/postal code
3006
+ * @maxLength 200
3007
+ */
3008
+ zipCode?: string | null;
3009
+ /**
3010
+ * Phone number
3011
+ * @maxLength 200
3012
+ */
3013
+ phone?: string | null;
3014
+ /**
3015
+ * Company name
3016
+ * @maxLength 500
3017
+ */
3018
+ company?: string | null;
3019
+ /**
3020
+ * Email address
3021
+ * @maxLength 500
3022
+ */
3023
+ email?: string | null;
3024
+ /**
3025
+ * address line
3026
+ * @maxLength 250
3027
+ */
3028
+ addressLine2?: string | null;
3029
+ /** Tax information (for Brazil only) */
3030
+ vatId?: VatId;
3031
+ }
3032
+ /** @oneof */
3033
+ export interface AddressAddressLine1OptionsOneOf {
3034
+ /**
3035
+ * Address line 1 (free text)
3036
+ * @maxLength 1000
3037
+ */
3038
+ addressLine1?: string;
3039
+ /** Address line 1 (street) */
3040
+ street?: Street;
3041
+ }
3042
+ export interface FullName {
3043
+ /**
3044
+ * Customer's first name
3045
+ * @maxLength 1000
3046
+ */
3047
+ firstName?: string;
3048
+ /**
3049
+ * Customer's last name
3050
+ * @maxLength 1000
3051
+ */
3052
+ lastName?: string;
3053
+ }
3054
+ export interface Street {
3055
+ /**
3056
+ * Street number
3057
+ * @maxLength 500
3058
+ */
3059
+ number?: string;
3060
+ /**
3061
+ * Street name
3062
+ * @maxLength 1000
3063
+ */
3064
+ name?: string;
3065
+ }
3066
+ export interface VatId {
3067
+ /**
3068
+ * Customer's tax ID.
3069
+ * @maxLength 50
3070
+ */
3071
+ number?: string;
3072
+ /**
3073
+ * Tax type.
3074
+ * + `CPF`: For individual tax payers.
3075
+ * + `CNPJ`: For corporations.
3076
+ */
3077
+ type?: VatType;
3078
+ }
3079
+ /** Brazilian tax info types */
3080
+ export declare enum VatType {
3081
+ /** When the tax info type can't be classified, due to an error */
3082
+ UNSPECIFIED_TAX_TYPE = "UNSPECIFIED_TAX_TYPE",
3083
+ /** CPF - for individual tax payers */
3084
+ CPF = "CPF",
3085
+ /** CNPJ - for corporations */
3086
+ CNPJ = "CNPJ"
3087
+ }
3088
+ export interface V1ShippingInfo extends V1ShippingInfoDetailsOneOf {
3089
+ /** Shipment details (when this object describes shipment) */
3090
+ shipmentDetails?: ShipmentDetails;
3091
+ /** Pickup details (when this object describes pickup) */
3092
+ pickupDetails?: V1PickupDetails;
3093
+ /**
3094
+ * Delivery option name
3095
+ * @maxLength 250
3096
+ */
3097
+ deliveryOption?: string;
3098
+ /**
3099
+ * Delivery option delivery time
3100
+ * @maxLength 500
3101
+ */
3102
+ estimatedDeliveryTime?: string | null;
3103
+ }
3104
+ /** @oneof */
3105
+ export interface V1ShippingInfoDetailsOneOf {
3106
+ /** Shipment details (when this object describes shipment) */
3107
+ shipmentDetails?: ShipmentDetails;
3108
+ /** Pickup details (when this object describes pickup) */
3109
+ pickupDetails?: V1PickupDetails;
3110
+ }
3111
+ export interface ShipmentDetails {
3112
+ /** Shipping destination address */
3113
+ address?: Address;
3114
+ /**
3115
+ * Discount applied for shipping
3116
+ * @max 999999999.99
3117
+ */
3118
+ discount?: number | null;
3119
+ /**
3120
+ * Tax applied for shipping
3121
+ * @max 999999999.99
3122
+ */
3123
+ tax?: number | null;
3124
+ /** Whether tax is included in the price */
3125
+ taxIncludedInPrice?: boolean;
3126
+ /**
3127
+ * Tax rate % for shipping, as a decimal point >= 0
3128
+ * @decimalValue options { maxScale:6, gte:0 }
3129
+ */
3130
+ taxRate?: string | null;
3131
+ }
3132
+ export interface V1PickupDetails {
3133
+ /** Pickup address */
3134
+ address?: PickupAddress;
3135
+ /**
3136
+ * Store owner's pickup instructions
3137
+ * @maxLength 1000
3138
+ */
3139
+ pickupInstructions?: string | null;
3140
+ }
3141
+ export interface PickupAddress {
3142
+ /**
3143
+ * Country code (2 letters)
3144
+ * @format COUNTRY
3145
+ */
3146
+ country?: string;
3147
+ /**
3148
+ * State/District
3149
+ * @maxLength 50
3150
+ */
3151
+ subdivision?: string | null;
3152
+ /**
3153
+ * Address
3154
+ * @maxLength 200
3155
+ */
3156
+ addressLine?: string;
3157
+ /**
3158
+ * City
3159
+ * @maxLength 85
3160
+ */
3161
+ city?: string;
3162
+ /**
3163
+ * ZIP/postal code
3164
+ * @maxLength 50
3165
+ */
3166
+ zipCode?: string;
3167
+ }
3168
+ export interface AppliedCoupon {
3169
+ /** Coupon ID */
3170
+ couponId?: string;
3171
+ /**
3172
+ * Coupon name
3173
+ * @maxLength 100
3174
+ */
3175
+ name?: string;
3176
+ /**
3177
+ * Coupon code
3178
+ * @maxLength 100
3179
+ */
3180
+ code?: string;
3181
+ }
3182
+ /** Custom field */
3183
+ export interface V1CustomField {
3184
+ /**
3185
+ * Free text that the customer entered in the custom field during the checkout process
3186
+ * @maxLength 250
3187
+ */
3188
+ value?: string;
3189
+ /**
3190
+ * Title for the custom field
3191
+ * @maxLength 200
3192
+ */
3193
+ title?: string;
3194
+ /**
3195
+ * The title translated according to the buyer language
3196
+ * @maxLength 200
3197
+ */
3198
+ translatedTitle?: string;
3199
+ }
3200
+ export interface V1SubscriptionOptionInfo {
3201
+ /** @format GUID */
3202
+ id?: string | null;
3203
+ /**
3204
+ * @minLength 1
3205
+ * @maxLength 20
3206
+ */
3207
+ title?: string;
3208
+ /** @maxLength 60 */
3209
+ description?: string | null;
3210
+ discount?: Discount;
3211
+ }
3212
+ export interface Discount {
3213
+ /** Discount type. */
3214
+ type?: DiscountDiscountType;
3215
+ /** Discount value. */
3216
+ value?: number;
3217
+ }
3218
+ export declare enum DiscountDiscountType {
3219
+ UNDEFINED = "UNDEFINED",
3220
+ /** No discount */
3221
+ AMOUNT = "AMOUNT",
3222
+ PERCENT = "PERCENT"
3223
+ }
3224
+ export interface ChannelInfo {
3225
+ /** Sales channel that submitted the subscription */
3226
+ type?: ChannelInfoChannelType;
3227
+ }
3228
+ export declare enum ChannelInfoChannelType {
3229
+ UNSPECIFIED = "UNSPECIFIED",
3230
+ WEB = "WEB",
3231
+ OTHER_PLATFORM = "OTHER_PLATFORM",
3232
+ WIX_APP_STORE = "WIX_APP_STORE"
3233
+ }
3234
+ export interface V1SubscriptionSettings {
3235
+ /** Frequency of recurring payment. */
3236
+ frequency?: SubscriptionFrequency;
3237
+ /** Whether subscription is renewed automatically at the end of each period. */
3238
+ autoRenewal?: boolean;
3239
+ /**
3240
+ * Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`.
3241
+ * @min 2
3242
+ * @max 999
3243
+ */
3244
+ billingCycles?: number | null;
3245
+ }
3246
+ export interface BillingInfo {
3247
+ /**
3248
+ * Payment method used for this order
3249
+ * @maxLength 50
3250
+ */
3251
+ paymentMethod?: string | null;
3252
+ /**
3253
+ * Transaction ID from payment gateway (e.g., Wix Payments)
3254
+ * @maxLength 100
3255
+ */
3256
+ paymentGatewayTransactionId?: string | null;
3257
+ /**
3258
+ * Order ID from payment gateway (e.g., Wix Payments)
3259
+ * @maxLength 100
3260
+ */
3261
+ paymentGatewayOrderId?: string | null;
3262
+ }
3263
+ export interface Empty {
3264
+ }
3265
+ export interface DomainEvent extends DomainEventBodyOneOf {
3266
+ createdEvent?: EntityCreatedEvent;
3267
+ updatedEvent?: EntityUpdatedEvent;
3268
+ deletedEvent?: EntityDeletedEvent;
3269
+ actionEvent?: ActionEvent;
3270
+ /**
3271
+ * Unique event ID.
3272
+ * Allows clients to ignore duplicate webhooks.
3273
+ */
3274
+ id?: string;
3275
+ /**
3276
+ * Assumes actions are also always typed to an entity_type
3277
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
3278
+ */
3279
+ entityFqdn?: string;
3280
+ /**
3281
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
3282
+ * This is although the created/updated/deleted notion is duplication of the oneof types
3283
+ * Example: created/updated/deleted/started/completed/email_opened
3284
+ */
3285
+ slug?: string;
3286
+ /** ID of the entity associated with the event. */
3287
+ entityId?: string;
3288
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
3289
+ eventTime?: Date | null;
3290
+ /**
3291
+ * Whether the event was triggered as a result of a privacy regulation application
3292
+ * (for example, GDPR).
3293
+ */
3294
+ triggeredByAnonymizeRequest?: boolean | null;
3295
+ /** If present, indicates the action that triggered the event. */
3296
+ originatedFrom?: string | null;
3297
+ /**
3298
+ * A sequence number defining the order of updates to the underlying entity.
3299
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
3300
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
3301
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
3302
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
3303
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
3304
+ */
3305
+ entityEventSequence?: string | null;
3306
+ }
3307
+ /** @oneof */
3308
+ export interface DomainEventBodyOneOf {
3309
+ createdEvent?: EntityCreatedEvent;
3310
+ updatedEvent?: EntityUpdatedEvent;
3311
+ deletedEvent?: EntityDeletedEvent;
3312
+ actionEvent?: ActionEvent;
3313
+ }
3314
+ export interface EntityCreatedEvent {
3315
+ entityAsJson?: string;
3316
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
3317
+ restoreInfo?: RestoreInfo;
3318
+ }
3319
+ export interface RestoreInfo {
3320
+ deletedDate?: Date | null;
3321
+ }
3322
+ export interface EntityUpdatedEvent {
3323
+ /**
3324
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
3325
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
3326
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
3327
+ */
3328
+ currentEntityAsJson?: string;
3329
+ }
3330
+ export interface EntityDeletedEvent {
3331
+ /** Entity that was deleted */
3332
+ deletedEntityAsJson?: string | null;
3333
+ }
3334
+ export interface ActionEvent {
3335
+ bodyAsJson?: string;
3336
+ }
3337
+ export interface MessageEnvelope {
3338
+ /**
3339
+ * App instance ID.
3340
+ * @format GUID
3341
+ */
3342
+ instanceId?: string | null;
3343
+ /**
3344
+ * Event type.
3345
+ * @maxLength 150
3346
+ */
3347
+ eventType?: string;
3348
+ /** The identification type and identity data. */
3349
+ identity?: IdentificationData;
3350
+ /** Stringify payload. */
3351
+ data?: string;
3352
+ }
3353
+ export interface IdentificationData extends IdentificationDataIdOneOf {
3354
+ /**
3355
+ * ID of a site visitor that has not logged in to the site.
3356
+ * @format GUID
3357
+ */
3358
+ anonymousVisitorId?: string;
3359
+ /**
3360
+ * ID of a site visitor that has logged in to the site.
3361
+ * @format GUID
3362
+ */
3363
+ memberId?: string;
3364
+ /**
3365
+ * ID of a Wix user (site owner, contributor, etc.).
3366
+ * @format GUID
3367
+ */
3368
+ wixUserId?: string;
3369
+ /**
3370
+ * ID of an app.
3371
+ * @format GUID
3372
+ */
3373
+ appId?: string;
3374
+ /** @readonly */
3375
+ identityType?: WebhookIdentityType;
3376
+ }
3377
+ /** @oneof */
3378
+ export interface IdentificationDataIdOneOf {
3379
+ /**
3380
+ * ID of a site visitor that has not logged in to the site.
3381
+ * @format GUID
3382
+ */
3383
+ anonymousVisitorId?: string;
3384
+ /**
3385
+ * ID of a site visitor that has logged in to the site.
3386
+ * @format GUID
3387
+ */
3388
+ memberId?: string;
3389
+ /**
3390
+ * ID of a Wix user (site owner, contributor, etc.).
3391
+ * @format GUID
3392
+ */
3393
+ wixUserId?: string;
3394
+ /**
3395
+ * ID of an app.
3396
+ * @format GUID
3397
+ */
3398
+ appId?: string;
3399
+ }
3400
+ export declare enum WebhookIdentityType {
3401
+ UNKNOWN = "UNKNOWN",
3402
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
3403
+ MEMBER = "MEMBER",
3404
+ WIX_USER = "WIX_USER",
3405
+ APP = "APP"
3406
+ }