@wix/auto_sdk_ecom_checkout-templates 1.0.0

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 (111) 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-template-checkout-templates.context.d.ts +32 -0
  11. package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.context.js +61 -0
  12. package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.context.js.map +1 -0
  13. package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.http.d.ts +67 -0
  14. package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.http.js +377 -0
  15. package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.http.js.map +1 -0
  16. package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.meta.d.ts +29 -0
  17. package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.meta.js +161 -0
  18. package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.meta.js.map +1 -0
  19. package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.public.d.ts +111 -0
  20. package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.public.js +268 -0
  21. package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.public.js.map +1 -0
  22. package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.types.d.ts +2224 -0
  23. package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.types.js +259 -0
  24. package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.types.js.map +1 -0
  25. package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.universal.d.ts +2538 -0
  26. package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.universal.js +710 -0
  27. package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.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-template-checkout-templates.context.d.ts +32 -0
  39. package/build/es/src/ecom-v1-checkout-template-checkout-templates.context.js +32 -0
  40. package/build/es/src/ecom-v1-checkout-template-checkout-templates.context.js.map +1 -0
  41. package/build/es/src/ecom-v1-checkout-template-checkout-templates.http.d.ts +67 -0
  42. package/build/es/src/ecom-v1-checkout-template-checkout-templates.http.js +367 -0
  43. package/build/es/src/ecom-v1-checkout-template-checkout-templates.http.js.map +1 -0
  44. package/build/es/src/ecom-v1-checkout-template-checkout-templates.meta.d.ts +29 -0
  45. package/build/es/src/ecom-v1-checkout-template-checkout-templates.meta.js +128 -0
  46. package/build/es/src/ecom-v1-checkout-template-checkout-templates.meta.js.map +1 -0
  47. package/build/es/src/ecom-v1-checkout-template-checkout-templates.public.d.ts +111 -0
  48. package/build/es/src/ecom-v1-checkout-template-checkout-templates.public.js +232 -0
  49. package/build/es/src/ecom-v1-checkout-template-checkout-templates.public.js.map +1 -0
  50. package/build/es/src/ecom-v1-checkout-template-checkout-templates.types.d.ts +2224 -0
  51. package/build/es/src/ecom-v1-checkout-template-checkout-templates.types.js +256 -0
  52. package/build/es/src/ecom-v1-checkout-template-checkout-templates.types.js.map +1 -0
  53. package/build/es/src/ecom-v1-checkout-template-checkout-templates.universal.d.ts +2538 -0
  54. package/build/es/src/ecom-v1-checkout-template-checkout-templates.universal.js +677 -0
  55. package/build/es/src/ecom-v1-checkout-template-checkout-templates.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-template-checkout-templates.context.d.ts +32 -0
  66. package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.context.js +61 -0
  67. package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.context.js.map +1 -0
  68. package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.http.d.ts +67 -0
  69. package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.http.js +377 -0
  70. package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.http.js.map +1 -0
  71. package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.meta.d.ts +29 -0
  72. package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.meta.js +161 -0
  73. package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.meta.js.map +1 -0
  74. package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.public.d.ts +111 -0
  75. package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.public.js +268 -0
  76. package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.public.js.map +1 -0
  77. package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.types.d.ts +2243 -0
  78. package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.types.js +259 -0
  79. package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.types.js.map +1 -0
  80. package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.universal.d.ts +2694 -0
  81. package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.universal.js +710 -0
  82. package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.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-template-checkout-templates.context.d.ts +32 -0
  93. package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.context.js +32 -0
  94. package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.context.js.map +1 -0
  95. package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.http.d.ts +67 -0
  96. package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.http.js +367 -0
  97. package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.http.js.map +1 -0
  98. package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.meta.d.ts +29 -0
  99. package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.meta.js +128 -0
  100. package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.meta.js.map +1 -0
  101. package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.public.d.ts +111 -0
  102. package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.public.js +232 -0
  103. package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.public.js.map +1 -0
  104. package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.types.d.ts +2243 -0
  105. package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.types.js +256 -0
  106. package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.types.js.map +1 -0
  107. package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.universal.d.ts +2694 -0
  108. package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.universal.js +677 -0
  109. package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,2538 @@
1
+ export interface CheckoutTemplate {
2
+ /**
3
+ * Checkout template ID.
4
+ * @readonly
5
+ */
6
+ _id?: string | null;
7
+ /**
8
+ * Status of the checkout template.
9
+ *
10
+ * When `status` is `INACTIVE` checkouts will not be created with this template `_id`. Instead, the function will redirect to the domain site.
11
+ *
12
+ * Default: `ACTIVE`
13
+ */
14
+ status?: Status;
15
+ /** Custom settings to apply to the checkout page created from this template. */
16
+ customization?: CheckoutCustomization;
17
+ /**
18
+ * Catalog line items.
19
+ *
20
+ * Max: 300 items
21
+ */
22
+ lineItems?: V1LineItem[];
23
+ /**
24
+ * Custom line items. Custom line items don't trigger the Catalog service plugin.
25
+ *
26
+ * Max: 300 items
27
+ */
28
+ customLineItems?: CustomLineItem[];
29
+ /**
30
+ * Coupon code.
31
+ *
32
+ * Note that a checkout can only hold one `couponCode` at a time. If an additional `couponCode` is added, it will override the existing `couponCode`.
33
+ * For additional information, see the Coupons API.
34
+ */
35
+ couponCode?: string | null;
36
+ /**
37
+ * Reference IDs for the app and component providing custom checkout page content.
38
+ *
39
+ * To access and manage custom checkout page content, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
40
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
41
+ */
42
+ customContentReference?: CustomContentReference;
43
+ }
44
+ export declare enum Status {
45
+ UNKNOWN_STATUS = "UNKNOWN_STATUS",
46
+ ACTIVE = "ACTIVE",
47
+ INACTIVE = "INACTIVE"
48
+ }
49
+ export interface CheckoutCustomization {
50
+ /** Web client customizations. These customizations only apply to the standard Wix checkout page. */
51
+ webClient?: WebClientCustomization;
52
+ /**
53
+ * Whether to lock the ability to add or remove a gift card.
54
+ *
55
+ * Default: `false`
56
+ */
57
+ lockedGiftCard?: boolean;
58
+ /**
59
+ * Whether to lock the ability to apply or remove a coupon code.
60
+ *
61
+ * Default: `false`
62
+ */
63
+ lockedCoupon?: boolean;
64
+ /**
65
+ * Whether to disable manual payment option for this checkout.
66
+ *
67
+ * Default: `false`
68
+ */
69
+ disabledManualPayment?: boolean;
70
+ }
71
+ export interface WebClientCustomization {
72
+ /**
73
+ * Whether to disable the "Continue shopping" button.
74
+ *
75
+ * Default: `false`
76
+ */
77
+ disabledContinueShoppingButton?: boolean;
78
+ /**
79
+ * Whether to disable policy agreement checkout in the checkout page
80
+ *
81
+ * Default: `false`
82
+ */
83
+ disabledPolicyAgreementCheckbox?: boolean;
84
+ }
85
+ export interface V1LineItem {
86
+ /**
87
+ * Item quantity.
88
+ *
89
+ * Min: `1` <br />
90
+ * Max: `100000`
91
+ */
92
+ quantity?: number;
93
+ /** Catalog and item reference. Holds 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. */
94
+ catalogReference?: CatalogReference;
95
+ /** Overriding values for catalog item properties. */
96
+ catalogOverrideFields?: CatalogOverrideFields;
97
+ }
98
+ /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
99
+ export interface CatalogReference {
100
+ /** ID of the item within the catalog it belongs to. */
101
+ catalogItemId?: string;
102
+ /**
103
+ * ID of the app providing the catalog.
104
+ *
105
+ * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
106
+ *
107
+ * For items from Wix catalogs, the following values always apply:
108
+ * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
109
+ * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
110
+ * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
111
+ */
112
+ appId?: string;
113
+ /**
114
+ * 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.
115
+ *
116
+ * For products and variants from a Wix Stores catalog, learn more about [eCommerce integration](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration).
117
+ */
118
+ options?: Record<string, any> | null;
119
+ }
120
+ export interface CatalogOverrideFields {
121
+ /** Item name. */
122
+ productName?: ProductName;
123
+ /** Item price **after** discounts. */
124
+ price?: string | null;
125
+ /** Item price **before** discounts. */
126
+ fullPrice?: string | null;
127
+ /** Item description lines. Used when displaying the line item to customers. */
128
+ descriptionLines?: DescriptionLine[];
129
+ /** Physical properties of the item. */
130
+ physicalProperties?: PhysicalProperties;
131
+ /** Item image. */
132
+ image?: string;
133
+ /** Payment method selected for the item. */
134
+ paymentOption?: PaymentOption;
135
+ /** Only eligible for catalog items with `lineItem.paymentOption.value` type of `DEPOSIT_ONLINE`. */
136
+ depositAmount?: string | null;
137
+ /**
138
+ * Whether to save the payment method on the order.
139
+ *
140
+ * Default: `false`
141
+ */
142
+ savePaymentMethod?: boolean | null;
143
+ }
144
+ export interface ProductName {
145
+ /**
146
+ * __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).
147
+ *
148
+ * Min: 1 character.
149
+ * Max: 200 characters.
150
+ */
151
+ original?: string;
152
+ /**
153
+ * Item name translated into the buyer's language.
154
+ *
155
+ * Min: 1 character.
156
+ * Max: 400 characters.
157
+ * Default: Same as `original`.
158
+ */
159
+ translated?: string | null;
160
+ }
161
+ export interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf {
162
+ /** Description line plain text value. */
163
+ plainText?: PlainTextValue;
164
+ /** Description line color value. */
165
+ colorInfo?: Color;
166
+ /** Description line name. */
167
+ name?: DescriptionLineName;
168
+ }
169
+ /** @oneof */
170
+ export interface DescriptionLineValueOneOf {
171
+ /** Description line plain text value. */
172
+ plainText?: PlainTextValue;
173
+ /** Description line color value. */
174
+ colorInfo?: Color;
175
+ }
176
+ /** @oneof */
177
+ export interface DescriptionLineDescriptionLineValueOneOf {
178
+ }
179
+ export interface DescriptionLineName {
180
+ /** 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). */
181
+ original?: string;
182
+ /**
183
+ * Description line name translated into the buyer's language.
184
+ *
185
+ * Default: Same as `original`.
186
+ */
187
+ translated?: string | null;
188
+ }
189
+ export interface PlainTextValue {
190
+ /** 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). */
191
+ original?: string;
192
+ /**
193
+ * Description line plain text value translated into the buyer's language.
194
+ *
195
+ * Default: Same as `original`.
196
+ */
197
+ translated?: string | null;
198
+ }
199
+ export interface Color {
200
+ /** 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). */
201
+ original?: string;
202
+ /**
203
+ * Description line color name translated into the buyer's language.
204
+ *
205
+ * Default: Same as `original`.
206
+ */
207
+ translated?: string | null;
208
+ /** HEX or RGB color code for display. */
209
+ code?: string | null;
210
+ }
211
+ export declare enum DescriptionLineType {
212
+ /** Unrecognized type. */
213
+ UNRECOGNISED = "UNRECOGNISED",
214
+ /** Plain text type. */
215
+ PLAIN_TEXT = "PLAIN_TEXT",
216
+ /** Color type. */
217
+ COLOR = "COLOR"
218
+ }
219
+ export interface PhysicalProperties {
220
+ /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
221
+ weight?: number | null;
222
+ /** Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */
223
+ sku?: string | null;
224
+ /** Whether this line item is shippable. */
225
+ shippable?: boolean;
226
+ }
227
+ export interface PaymentOption {
228
+ /**
229
+ * + `FULL_PAYMENT_ONLINE`: The entire payment for this item happens as part of the checkout.
230
+ * + `FULL_PAYMENT_OFFLINE`: The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.
231
+ * + `MEMBERSHIP`: Payment for this item is done by charging a membership. When selected, `price` is `0`.
232
+ * + `DEPOSIT_ONLINE`: Partial payment to be paid upfront during the checkout. Initial amount to be paid for each line item is specified in `depositAmount`.
233
+ * + `MEMBERSHIP_OFFLINE`: 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`.
234
+ */
235
+ value?: PaymentOptionType;
236
+ }
237
+ /** Type of selected payment option for catalog item */
238
+ export declare enum PaymentOptionType {
239
+ /** The entire payment for this item happens as part of the checkout. */
240
+ FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE",
241
+ /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */
242
+ FULL_PAYMENT_OFFLINE = "FULL_PAYMENT_OFFLINE",
243
+ /** Payment for this item is done by charging a membership. When selected, `price` is `0`. */
244
+ MEMBERSHIP = "MEMBERSHIP",
245
+ /** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */
246
+ DEPOSIT_ONLINE = "DEPOSIT_ONLINE",
247
+ /** 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`. */
248
+ MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE"
249
+ }
250
+ export interface CustomLineItem {
251
+ /**
252
+ * Custom line item quantity.
253
+ *
254
+ * Min: `1`
255
+ * Max: `100000`
256
+ */
257
+ quantity?: number;
258
+ /**
259
+ * Custom line item price.
260
+ *
261
+ * Must be a number or a decimal without symbols.
262
+ */
263
+ price?: string;
264
+ /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */
265
+ priceDescription?: PriceDescription;
266
+ /** Custom line item description lines. Used for display purposes for the cart, checkout and order. */
267
+ descriptionLines?: DescriptionLine[];
268
+ /** Custom line item's media. */
269
+ media?: string;
270
+ /**
271
+ * Custom line item ID. If passed, `id` must be unique.
272
+ *
273
+ * Default: auto-generated ID
274
+ */
275
+ _id?: string | null;
276
+ /** Tax group ID for this custom line item. */
277
+ taxGroupId?: string | null;
278
+ /** Name of the item or product. */
279
+ productName?: ProductName;
280
+ /** 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. */
281
+ url?: string;
282
+ /** Item type. Either a preset type or custom. */
283
+ itemType?: ItemType;
284
+ /** Item price **before** catalog-defined discount. Defaults to `price` when not provided. */
285
+ fullPrice?: string | null;
286
+ /**
287
+ * Item quantity available for purchase. Only return this if inventory is managed.
288
+ * Not returning this field means that the buyer can "infinitely" tick up the number of items in the cart.
289
+ */
290
+ quantityAvailable?: number | null;
291
+ /** Physical properties of the item. */
292
+ physicalProperties?: PhysicalProperties;
293
+ /**
294
+ * Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.
295
+ *
296
+ * + `FULL_PAYMENT_ONLINE` - Entire payment for this item happens as part of the checkout.
297
+ * + `FULL_PAYMENT_OFFLINE` - Entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.
298
+ * + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.
299
+ * + `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.
300
+ */
301
+ paymentOption?: PaymentOptionType;
302
+ /**
303
+ * Service properties. When relevant, this contains information such as date and number of participants.
304
+ * Used, among other things, when checking for valid memberships.
305
+ */
306
+ serviceProperties?: ServiceProperties;
307
+ /**
308
+ * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.
309
+ *
310
+ * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.
311
+ * + In most cases, this field is the same as `catalogReference.catalogItemId`.
312
+ * + Used in membership validation.
313
+ */
314
+ rootCatalogItemId?: string | null;
315
+ /**
316
+ * Partial payment for the given item to be paid upfront during the checkout.
317
+ *
318
+ * Eligible for catalog items with type `DEPOSIT_ONLINE`.
319
+ * When omitted, the item's price will not be split and is expected to be paid in a single installment.
320
+ */
321
+ depositAmount?: string | null;
322
+ /** 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. */
323
+ catalogReference?: CatalogReference;
324
+ /**
325
+ * Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.
326
+ * @readonly
327
+ */
328
+ consentRequiredPaymentPolicy?: string | null;
329
+ /**
330
+ * Whether to save the payment method on the order.
331
+ *
332
+ * Default: `false`
333
+ * @readonly
334
+ */
335
+ savePaymentMethod?: boolean;
336
+ }
337
+ export interface PriceDescription {
338
+ /** __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). */
339
+ original?: string;
340
+ /**
341
+ * Price description translated into the buyer's language.
342
+ *
343
+ * Default: Same as `original`.
344
+ */
345
+ translated?: string | null;
346
+ }
347
+ export interface ItemType extends ItemTypeItemTypeDataOneOf {
348
+ /** Preset item type. */
349
+ preset?: ItemTypeItemType;
350
+ /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
351
+ custom?: string;
352
+ }
353
+ /** @oneof */
354
+ export interface ItemTypeItemTypeDataOneOf {
355
+ /** Preset item type. */
356
+ preset?: ItemTypeItemType;
357
+ /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
358
+ custom?: string;
359
+ }
360
+ export declare enum ItemTypeItemType {
361
+ UNRECOGNISED = "UNRECOGNISED",
362
+ PHYSICAL = "PHYSICAL",
363
+ DIGITAL = "DIGITAL",
364
+ GIFT_CARD = "GIFT_CARD",
365
+ SERVICE = "SERVICE"
366
+ }
367
+ export interface SubscriptionOptionInfo {
368
+ /** Subscription option settings. */
369
+ subscriptionSettings?: SubscriptionSettings;
370
+ /** Subscription option title. */
371
+ title?: Title;
372
+ /** Subscription option description. */
373
+ description?: Description;
374
+ }
375
+ export interface SubscriptionSettings {
376
+ /** Frequency of recurring payment. */
377
+ frequency?: SubscriptionFrequency;
378
+ /**
379
+ * Interval of recurring payment.
380
+ *
381
+ * Default: `1`.
382
+ * If SubscriptionFrequency is Day the minimum interval is 7
383
+ */
384
+ interval?: number | null;
385
+ /** Whether subscription is renewed automatically at the end of each period. */
386
+ autoRenewal?: boolean;
387
+ /** Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`. */
388
+ billingCycles?: number | null;
389
+ }
390
+ /** Frequency unit of recurring payment */
391
+ export declare enum SubscriptionFrequency {
392
+ UNDEFINED = "UNDEFINED",
393
+ DAY = "DAY",
394
+ WEEK = "WEEK",
395
+ MONTH = "MONTH",
396
+ YEAR = "YEAR"
397
+ }
398
+ export interface FreeTrialPeriod {
399
+ /** Frequency of priod. Values: DAY, WEEK, MONTH, YEAR */
400
+ frequency?: SubscriptionFrequency;
401
+ /** interval of period */
402
+ interval?: number;
403
+ }
404
+ export interface Title {
405
+ /** 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). */
406
+ original?: string;
407
+ /**
408
+ * Subscription option name translated into the buyer's language.
409
+ *
410
+ * Default: Same as `original`.
411
+ */
412
+ translated?: string | null;
413
+ }
414
+ export interface Description {
415
+ /** Subscription option description. */
416
+ original?: string;
417
+ /** Translated subscription option description. */
418
+ translated?: string | null;
419
+ }
420
+ export interface SecuredMedia {
421
+ /** Media ID in Wix Media Manager. */
422
+ _id?: string;
423
+ /** Original filename. */
424
+ fileName?: string;
425
+ /** File type. */
426
+ fileType?: FileType;
427
+ }
428
+ export declare enum FileType {
429
+ UNSPECIFIED = "UNSPECIFIED",
430
+ SECURE_PICTURE = "SECURE_PICTURE",
431
+ SECURE_VIDEO = "SECURE_VIDEO",
432
+ SECURE_DOCUMENT = "SECURE_DOCUMENT",
433
+ SECURE_MUSIC = "SECURE_MUSIC",
434
+ SECURE_ARCHIVE = "SECURE_ARCHIVE"
435
+ }
436
+ export interface ServiceProperties {
437
+ /**
438
+ * 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.
439
+ * For example, the start time of a class.
440
+ */
441
+ scheduledDate?: Date | null;
442
+ /** 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. */
443
+ numberOfParticipants?: number | null;
444
+ }
445
+ export interface Policy {
446
+ /** Policy title - should be translated */
447
+ title?: string | null;
448
+ /** Policy content - should be translated */
449
+ content?: string;
450
+ }
451
+ export interface ExtendedFields {
452
+ /**
453
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
454
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
455
+ *
456
+ * You can only access fields for which you have the appropriate permissions.
457
+ *
458
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
459
+ */
460
+ namespaces?: Record<string, Record<string, any>>;
461
+ }
462
+ export interface CustomContentReference {
463
+ /**
464
+ * ID of the app providing the content.
465
+ *
466
+ * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
467
+ */
468
+ appId?: string;
469
+ /**
470
+ * ID of the component within the app it belongs to.
471
+ *
472
+ * You can get your component's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
473
+ */
474
+ componentId?: string;
475
+ }
476
+ export interface ExternalReference {
477
+ /**
478
+ * ID of the app associated with the purchase flow.
479
+ * For example, the Wix Pay Links app ID.
480
+ */
481
+ appId?: string;
482
+ /**
483
+ * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.
484
+ * For example, a Wix Pay Link ID.
485
+ */
486
+ resourceId?: string | null;
487
+ }
488
+ export interface CreateCheckoutTemplateRequest {
489
+ /** Checkout template to create. */
490
+ checkoutTemplate: CheckoutTemplate;
491
+ }
492
+ export interface CreateCheckoutTemplateResponse {
493
+ /** Created checkout template. */
494
+ checkoutTemplate?: CheckoutTemplate;
495
+ }
496
+ export interface GetCheckoutTemplateRequest {
497
+ /** ID of the checkout template to retrieve. */
498
+ checkoutTemplateId: string;
499
+ }
500
+ export interface GetCheckoutTemplateResponse {
501
+ /** Retrieved checkout template. */
502
+ checkoutTemplate?: CheckoutTemplate;
503
+ }
504
+ export interface UpdateCheckoutTemplateRequest {
505
+ /** Checkout template info to update. */
506
+ checkoutTemplate: CheckoutTemplate;
507
+ }
508
+ export interface UpdateCheckoutTemplateResponse {
509
+ /** Updated checkout template. */
510
+ checkoutTemplate?: CheckoutTemplate;
511
+ }
512
+ export interface DeleteCheckoutTemplateRequest {
513
+ /** ID of the checkout template to delete. */
514
+ checkoutTemplateId: string;
515
+ }
516
+ export interface DeleteCheckoutTemplateResponse {
517
+ }
518
+ export interface QueryCheckoutTemplatesRequest {
519
+ /** Query options. */
520
+ query?: CursorQuery;
521
+ }
522
+ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
523
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
524
+ cursorPaging?: CursorPaging;
525
+ /**
526
+ * Filter object in the following format:
527
+ * `"filter" : {
528
+ * "fieldName1": "value1",
529
+ * "fieldName2":{"$operator":"value2"}
530
+ * }`
531
+ *
532
+ * Example of operators: `$eq`, `$ne`, `$in`, `$startsWith`, `$exists`, `$hasSome`
533
+ */
534
+ filter?: Record<string, any> | null;
535
+ /**
536
+ * Sort object in the following format:
537
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
538
+ */
539
+ sort?: Sorting[];
540
+ }
541
+ /** @oneof */
542
+ export interface CursorQueryPagingMethodOneOf {
543
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
544
+ cursorPaging?: CursorPaging;
545
+ }
546
+ export interface Sorting {
547
+ /** Name of the field to sort by. */
548
+ fieldName?: string;
549
+ /** Sort order. */
550
+ order?: SortOrder;
551
+ }
552
+ export declare enum SortOrder {
553
+ /** Ascending order. */
554
+ ASC = "ASC",
555
+ /** Descending order. */
556
+ DESC = "DESC"
557
+ }
558
+ export interface CursorPaging {
559
+ /** Number of items to load. */
560
+ limit?: number | null;
561
+ /**
562
+ * Pointer to the next or previous page in the list of results. </ br>
563
+ *
564
+ * You can get the relevant cursor token
565
+ * from the `pagingMetadata` object in the previous call's response.
566
+ * Not relevant for the first request.
567
+ */
568
+ cursor?: string | null;
569
+ }
570
+ export interface QueryCheckoutTemplatesResponse {
571
+ /** Retrieved checkout templates. */
572
+ checkoutTemplates?: CheckoutTemplate[];
573
+ /** Paging metadata. */
574
+ pagingMetadata?: CursorPagingMetadata;
575
+ }
576
+ export interface CursorPagingMetadata {
577
+ /** Number of items returned in the response. */
578
+ count?: number | null;
579
+ /** Offset that was requested. */
580
+ cursors?: Cursors;
581
+ /**
582
+ * Indicates if there are more results after the current page.
583
+ * If `true`, another page of results can be retrieved.
584
+ * If `false`, this is the last page.
585
+ */
586
+ hasNext?: boolean | null;
587
+ }
588
+ export interface Cursors {
589
+ /** Cursor pointing to next page in the list of results. */
590
+ next?: string | null;
591
+ /** Cursor pointing to previous page in the list of results. */
592
+ prev?: string | null;
593
+ }
594
+ export interface CreateCheckoutFromTemplateRequest {
595
+ /** ID of the checkout template to use to create a checkout from. */
596
+ checkoutTemplateId: string;
597
+ /** ID of the site associated with the checkout template. */
598
+ siteId: string;
599
+ }
600
+ export interface CreateCheckoutFromTemplateResponse {
601
+ /** ID of the created checkout. */
602
+ checkoutId?: string;
603
+ /** URL of the created checkout page. */
604
+ checkoutUrl?: string;
605
+ /** Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. */
606
+ purchaseFlowId?: string | null;
607
+ }
608
+ /** Triggered when newly checkout created successfully from checkout template */
609
+ export interface CheckoutTemplateUsed {
610
+ /** checkout template */
611
+ checkoutTemplate?: CheckoutTemplate;
612
+ /** newly created checkout */
613
+ checkout?: Checkout;
614
+ }
615
+ export interface Checkout {
616
+ /**
617
+ * Checkout ID.
618
+ * @readonly
619
+ */
620
+ _id?: string | null;
621
+ /**
622
+ * Line items.
623
+ *
624
+ * Max: 300 items
625
+ * @readonly
626
+ */
627
+ lineItems?: LineItem[];
628
+ /** Billing information. */
629
+ billingInfo?: AddressWithContact;
630
+ /** Shipping information. */
631
+ shippingInfo?: ShippingInfo;
632
+ /** [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. */
633
+ buyerNote?: string | null;
634
+ /** Buyer information. */
635
+ buyerInfo?: BuyerInfo;
636
+ /**
637
+ * All converted prices are displayed in this currency in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
638
+ * @readonly
639
+ */
640
+ conversionCurrency?: string;
641
+ /**
642
+ * Calculated price summary for the checkout.
643
+ * @readonly
644
+ */
645
+ priceSummary?: PriceSummary;
646
+ /**
647
+ * Errors when calculating totals.
648
+ * @readonly
649
+ */
650
+ calculationErrors?: CalculationErrors;
651
+ /**
652
+ * Applied gift card details.
653
+ *
654
+ * >**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/wix-stores-setting-up-wix-gift-cards).
655
+ * @readonly
656
+ */
657
+ giftCard?: GiftCard;
658
+ /**
659
+ * Applied discounts.
660
+ * @readonly
661
+ */
662
+ appliedDiscounts?: AppliedDiscount[];
663
+ /** Custom fields. */
664
+ customFields?: CustomField[];
665
+ /**
666
+ * Weight measurement unit - defaults to site's weight unit.
667
+ * @readonly
668
+ */
669
+ weightUnit?: WeightUnit;
670
+ /**
671
+ * Tax summary.
672
+ * @readonly
673
+ */
674
+ taxSummary?: TaxSummary;
675
+ /**
676
+ * The currency used when submitting the order.
677
+ * @readonly
678
+ */
679
+ currency?: string;
680
+ /**
681
+ * Sales channel that submitted the order.
682
+ * @readonly
683
+ */
684
+ channelType?: ChannelType;
685
+ /**
686
+ * Site language in which original values are shown.
687
+ * @readonly
688
+ */
689
+ siteLanguage?: string;
690
+ /**
691
+ * Language for communication with the buyer. Defaults to the site language.
692
+ * For a site that supports multiple languages, this is the language the buyer selected.
693
+ * @readonly
694
+ */
695
+ buyerLanguage?: string;
696
+ /**
697
+ * Whether an order was successfully created from this checkout.
698
+ * For an order to be successful, it must be successfully paid for (unless the total is 0).
699
+ * @readonly
700
+ */
701
+ completed?: boolean;
702
+ /**
703
+ * Whether tax is included in line item prices.
704
+ * @readonly
705
+ */
706
+ taxIncludedInPrice?: boolean;
707
+ /**
708
+ * ID of the checkout's initiator.
709
+ * @readonly
710
+ */
711
+ createdBy?: CreatedBy;
712
+ /**
713
+ * Date and time the checkout was created.
714
+ * @readonly
715
+ */
716
+ _createdDate?: Date | null;
717
+ /**
718
+ * Date and time the checkout was updated.
719
+ * @readonly
720
+ */
721
+ _updatedDate?: Date | null;
722
+ /**
723
+ * Minimal amount to pay in order to place the order.
724
+ * @readonly
725
+ */
726
+ payNow?: PriceSummary;
727
+ /**
728
+ * Remaining amount for the order to be fully paid.
729
+ * @readonly
730
+ */
731
+ payLater?: PriceSummary;
732
+ /** Memberships to apply when creating the order. */
733
+ membershipOptions?: MembershipOptions;
734
+ /** Additional Fees. */
735
+ additionalFees?: AdditionalFee[];
736
+ /** Cart ID that this checkout was created from. Empty if this checkout wasn't created from a cart. */
737
+ cartId?: string | null;
738
+ /**
739
+ * List of validation violations raised by the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction).
740
+ * @readonly
741
+ */
742
+ violations?: Violation[];
743
+ /**
744
+ * Custom field data for the checkout object.
745
+ *
746
+ * [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.
747
+ */
748
+ extendedFields?: ExtendedFields;
749
+ /**
750
+ * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
751
+ * @readonly
752
+ */
753
+ purchaseFlowId?: string | null;
754
+ /**
755
+ * Additional settings for customization of the checkout process.
756
+ *
757
+ * > **Notes:**
758
+ * > * Custom settings can only be set when [creating a checkout](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/checkout/create-checkout).
759
+ * > * 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).
760
+ */
761
+ customSettings?: CustomSettings;
762
+ /**
763
+ * Reference IDs for the app and component providing custom checkout page content.
764
+ *
765
+ * To access and manage custom checkout page content, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
766
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
767
+ */
768
+ customContentReference?: CustomContentReference;
769
+ }
770
+ export interface LineItem {
771
+ /**
772
+ * Line item ID.
773
+ * @readonly
774
+ */
775
+ _id?: string | null;
776
+ /**
777
+ * Item quantity.
778
+ *
779
+ * Min: `"1"`
780
+ * Max: `"100000"`
781
+ */
782
+ quantity?: number;
783
+ /** 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. */
784
+ catalogReference?: CatalogReference;
785
+ /**
786
+ * Item name.
787
+ * + Stores - `product.name`
788
+ * + Bookings - `service.info.name`
789
+ * + Events - `ticket.name`
790
+ * @readonly
791
+ */
792
+ productName?: ProductName;
793
+ /**
794
+ * URL to the item's page on the site.
795
+ * @readonly
796
+ */
797
+ url?: string;
798
+ /**
799
+ * Item price **after** catalog-defined discount and line item discounts.
800
+ * @readonly
801
+ */
802
+ price?: MultiCurrencyPrice;
803
+ /**
804
+ * Total line item price **after** catalog-defined discount and line item discounts.
805
+ * @readonly
806
+ */
807
+ lineItemPrice?: MultiCurrencyPrice;
808
+ /**
809
+ * Item price **before** catalog-defined discount. Defaults to `price` when not provided.
810
+ * @readonly
811
+ */
812
+ fullPrice?: MultiCurrencyPrice;
813
+ /**
814
+ * Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided.
815
+ * @readonly
816
+ */
817
+ priceBeforeDiscounts?: MultiCurrencyPrice;
818
+ /**
819
+ * Total price after all discounts and tax.
820
+ * @readonly
821
+ */
822
+ totalPriceAfterTax?: MultiCurrencyPrice;
823
+ /**
824
+ * Total price after discounts, and before tax.
825
+ * @readonly
826
+ */
827
+ totalPriceBeforeTax?: MultiCurrencyPrice;
828
+ /**
829
+ * Tax details for this line item.
830
+ * @readonly
831
+ */
832
+ taxDetails?: ItemTaxFullDetails;
833
+ /**
834
+ * Discount for this line item's entire quantity.
835
+ * @readonly
836
+ */
837
+ discount?: MultiCurrencyPrice;
838
+ /**
839
+ * Line item description lines. Used for display purposes for the cart, checkout and order.
840
+ * @readonly
841
+ */
842
+ descriptionLines?: DescriptionLine[];
843
+ /**
844
+ * Line item image details.
845
+ * @readonly
846
+ */
847
+ media?: string;
848
+ /**
849
+ * Item availability details.
850
+ * @readonly
851
+ */
852
+ availability?: ItemAvailabilityInfo;
853
+ /**
854
+ * Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability.
855
+ * @readonly
856
+ */
857
+ physicalProperties?: PhysicalProperties;
858
+ /**
859
+ * Item type. Either a preset type or custom.
860
+ * @readonly
861
+ */
862
+ itemType?: ItemType;
863
+ /**
864
+ * Subscription option information.
865
+ * @readonly
866
+ */
867
+ subscriptionOptionInfo?: SubscriptionOptionInfo;
868
+ /**
869
+ * Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.
870
+ * + `FULL_PAYMENT_ONLINE`: The entire payment for this item happens as part of the checkout.
871
+ * + `FULL_PAYMENT_OFFLINE`: The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.
872
+ * + `MEMBERSHIP`: Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is `0`.
873
+ * + `DEPOSIT_ONLINE`: Partial payment to be paid upfront during the checkout. Initial amount to be paid for each line item is defined by `lineItem.deposit`.
874
+ * + `MEMBERSHIP_OFFLINE`: Payment for this item can only be performed by using a membership and must be manually redeemed in the dashboard by the site owner. When this option is used, `lineItem.price.amount` is `0`.
875
+ * @readonly
876
+ */
877
+ paymentOption?: PaymentOptionType;
878
+ /**
879
+ * Service properties. When relevant, this contains information such as date and number of participants.
880
+ * @readonly
881
+ */
882
+ serviceProperties?: ServiceProperties;
883
+ /**
884
+ * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.
885
+ * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.
886
+ * + In most cases, this field has the same value as `catalogReference.catalogItemId`.
887
+ * + Used in membership validation.
888
+ * @readonly
889
+ */
890
+ rootCatalogItemId?: string | null;
891
+ /**
892
+ * Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67".
893
+ * @readonly
894
+ */
895
+ priceDescription?: PriceDescription;
896
+ /**
897
+ * Partial payment to be paid upfront during the checkout. Eligible for catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only.
898
+ * @readonly
899
+ */
900
+ depositAmount?: MultiCurrencyPrice;
901
+ /**
902
+ * Whether the line item is a custom line item. Custom line items don't trigger the Catalog service plugin.
903
+ * @readonly
904
+ */
905
+ customLineItem?: boolean;
906
+ /**
907
+ * Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.
908
+ * @readonly
909
+ */
910
+ consentRequiredPaymentPolicy?: string | null;
911
+ /**
912
+ * Overriding values for catalog item properties.
913
+ *
914
+ * To override catalog fields, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
915
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
916
+ */
917
+ catalogOverrideFields?: CatalogOverrideFields;
918
+ /**
919
+ * Whether to save the payment method on the order.
920
+ *
921
+ * Default: `false`
922
+ * @readonly
923
+ */
924
+ savePaymentMethod?: boolean;
925
+ }
926
+ export interface MultiCurrencyPrice {
927
+ /** Amount. */
928
+ amount?: string;
929
+ /**
930
+ * Converted amount.
931
+ * @readonly
932
+ */
933
+ convertedAmount?: string;
934
+ /**
935
+ * Amount formatted with currency symbol.
936
+ * @readonly
937
+ */
938
+ formattedAmount?: string;
939
+ /**
940
+ * Converted amount formatted with currency symbol.
941
+ * @readonly
942
+ */
943
+ formattedConvertedAmount?: string;
944
+ }
945
+ export interface ItemTaxFullDetails {
946
+ /** Amount for which tax is calculated. */
947
+ taxableAmount?: MultiCurrencyPrice;
948
+ /** Tax rate %, as a decimal point between 0 and 1. */
949
+ taxRate?: string;
950
+ /** Calculated tax, based on `taxable_amount` and `tax_rate`. */
951
+ totalTax?: MultiCurrencyPrice;
952
+ /**
953
+ * If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. Deprecated - use 'tax_breakdown' instead.
954
+ * @readonly
955
+ * @deprecated
956
+ */
957
+ rateBreakdown?: TaxRateBreakdown[];
958
+ }
959
+ export interface TaxRateBreakdown {
960
+ /** Name of tax against which the calculation was performed. */
961
+ name?: string;
962
+ /** Rate at which this tax detail was calculated. */
963
+ rate?: string;
964
+ /** Amount of tax for this tax detail. */
965
+ tax?: MultiCurrencyPrice;
966
+ }
967
+ /**
968
+ * TaxBreakdown represents tax information for a line item.
969
+ * It holds the tax amount and the tax rate for each tax authority that apply on the line item.
970
+ */
971
+ export interface TaxBreakdown {
972
+ /** The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec". */
973
+ jurisdiction?: string | null;
974
+ /** The amount of this line item price that was considered nontaxable. (Decimal value) */
975
+ nonTaxableAmount?: MultiCurrencyPrice;
976
+ /** The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value) */
977
+ rate?: string | null;
978
+ /** The amount of tax estimated for this line item. (Decimal value) */
979
+ taxAmount?: MultiCurrencyPrice;
980
+ /** The taxable amount of this line item. */
981
+ taxableAmount?: MultiCurrencyPrice;
982
+ /** The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc. */
983
+ taxType?: string | null;
984
+ /**
985
+ * The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc.
986
+ * This name should be explicit enough to allow the merchant to understand what tax was calculated.
987
+ */
988
+ taxName?: string | null;
989
+ /** The type of the jurisdiction in which this tax detail applies. */
990
+ jurisdictionType?: JurisdictionType;
991
+ }
992
+ /** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
993
+ export declare enum JurisdictionType {
994
+ UNDEFINED = "UNDEFINED",
995
+ COUNTRY = "COUNTRY",
996
+ STATE = "STATE",
997
+ COUNTY = "COUNTY",
998
+ CITY = "CITY",
999
+ SPECIAL = "SPECIAL"
1000
+ }
1001
+ export interface FocalPoint {
1002
+ /** X-coordinate of the focal point. */
1003
+ x?: number;
1004
+ /** Y-coordinate of the focal point. */
1005
+ y?: number;
1006
+ /** crop by height */
1007
+ height?: number | null;
1008
+ /** crop by width */
1009
+ width?: number | null;
1010
+ }
1011
+ export interface ItemAvailabilityInfo {
1012
+ /** Item availability status. */
1013
+ status?: ItemAvailabilityStatus;
1014
+ /** Quantity available. */
1015
+ quantityAvailable?: number | null;
1016
+ }
1017
+ export declare enum ItemAvailabilityStatus {
1018
+ AVAILABLE = "AVAILABLE",
1019
+ /** Item does not exist */
1020
+ NOT_FOUND = "NOT_FOUND",
1021
+ /** Item not in stock */
1022
+ NOT_AVAILABLE = "NOT_AVAILABLE",
1023
+ /** Available quantity is less than requested */
1024
+ PARTIALLY_AVAILABLE = "PARTIALLY_AVAILABLE"
1025
+ }
1026
+ export interface Scope {
1027
+ /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
1028
+ namespace?: string;
1029
+ /** Coupon scope's applied group (e.g., event or ticket in Wix Events) */
1030
+ group?: Group;
1031
+ }
1032
+ export interface Group {
1033
+ /** 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). */
1034
+ name?: string;
1035
+ /** Item ID (when the coupon scope is limited to just one item). */
1036
+ entityId?: string | null;
1037
+ }
1038
+ export interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {
1039
+ /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
1040
+ addressType?: TaxableAddressType;
1041
+ }
1042
+ /** @oneof */
1043
+ export interface TaxableAddressTaxableAddressDataOneOf {
1044
+ /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
1045
+ addressType?: TaxableAddressType;
1046
+ }
1047
+ export declare enum TaxableAddressType {
1048
+ UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS",
1049
+ BUSINESS = "BUSINESS",
1050
+ BILLING = "BILLING",
1051
+ SHIPPING = "SHIPPING"
1052
+ }
1053
+ /** Billing Info and shipping details */
1054
+ export interface AddressWithContact {
1055
+ /** Address. */
1056
+ address?: Address;
1057
+ /** Contact details. */
1058
+ contactDetails?: FullAddressContactDetails;
1059
+ }
1060
+ /** Physical address */
1061
+ export interface Address {
1062
+ /** Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */
1063
+ country?: string | null;
1064
+ /** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */
1065
+ subdivision?: string | null;
1066
+ /** City name. */
1067
+ city?: string | null;
1068
+ /** Postal or zip code. */
1069
+ postalCode?: string | null;
1070
+ /** Street address. */
1071
+ streetAddress?: StreetAddress;
1072
+ /** Main address line (usually street name and number). */
1073
+ addressLine1?: string | null;
1074
+ /** Free text providing more detailed address info. Usually contains apt, suite, floor. */
1075
+ addressLine2?: string | null;
1076
+ /**
1077
+ * Country's full name.
1078
+ * @readonly
1079
+ */
1080
+ countryFullname?: string | null;
1081
+ /**
1082
+ * Subdivision full-name.
1083
+ * @readonly
1084
+ */
1085
+ subdivisionFullname?: string | null;
1086
+ }
1087
+ export interface StreetAddress {
1088
+ /** Street number. */
1089
+ number?: string;
1090
+ /** Street name. */
1091
+ name?: string;
1092
+ }
1093
+ export interface AddressLocation {
1094
+ /** Address latitude. */
1095
+ latitude?: number | null;
1096
+ /** Address longitude. */
1097
+ longitude?: number | null;
1098
+ }
1099
+ /** Full contact details for an address */
1100
+ export interface FullAddressContactDetails {
1101
+ /** First name. */
1102
+ firstName?: string | null;
1103
+ /** Last name. */
1104
+ lastName?: string | null;
1105
+ /** Phone number. */
1106
+ phone?: string | null;
1107
+ /** Company name. */
1108
+ company?: string | null;
1109
+ /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
1110
+ vatId?: VatId;
1111
+ }
1112
+ export interface VatId {
1113
+ /** Customer's tax ID. */
1114
+ _id?: string;
1115
+ /**
1116
+ * Tax type.
1117
+ *
1118
+ * Supported values:
1119
+ * + `CPF`: for individual tax payers
1120
+ * + `CNPJ`: for corporations
1121
+ */
1122
+ type?: VatType;
1123
+ }
1124
+ /** tax info types */
1125
+ export declare enum VatType {
1126
+ UNSPECIFIED = "UNSPECIFIED",
1127
+ /** CPF - for individual tax payers. */
1128
+ CPF = "CPF",
1129
+ /** CNPJ - for corporations */
1130
+ CNPJ = "CNPJ"
1131
+ }
1132
+ export interface ShippingInfo {
1133
+ /** Shipping address and contact details. */
1134
+ shippingDestination?: AddressWithContact;
1135
+ /** Selected option out of the options allowed for the `region`. */
1136
+ selectedCarrierServiceOption?: SelectedCarrierServiceOption;
1137
+ /**
1138
+ * Shipping region. Based on the address provided.
1139
+ * @readonly
1140
+ */
1141
+ region?: ShippingRegion;
1142
+ /**
1143
+ * All carrier options for this shipping rule.
1144
+ * @readonly
1145
+ */
1146
+ carrierServiceOptions?: CarrierServiceOption[];
1147
+ }
1148
+ export interface SelectedCarrierServiceOption {
1149
+ /** Unique identifier of selected option. For example, "usps_std_overnight". */
1150
+ code?: string;
1151
+ /**
1152
+ * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).
1153
+ * For example, "Standard" or "First-Class Package International".
1154
+ * @readonly
1155
+ */
1156
+ title?: string;
1157
+ /**
1158
+ * Delivery logistics.
1159
+ * @readonly
1160
+ */
1161
+ logistics?: DeliveryLogistics;
1162
+ /**
1163
+ * Shipping costs.
1164
+ * @readonly
1165
+ */
1166
+ cost?: SelectedCarrierServiceOptionPrices;
1167
+ /**
1168
+ * Were we able to find the requested shipping option, or otherwise we fallback to the default one (the first)
1169
+ * @readonly
1170
+ */
1171
+ requestedShippingOption?: boolean;
1172
+ /** Other charges */
1173
+ otherCharges?: SelectedCarrierServiceOptionOtherCharge[];
1174
+ /** This carrier's unique ID */
1175
+ carrierId?: string | null;
1176
+ /** Delivery solution allocations to different delivery carriers and delivery regions */
1177
+ deliveryAllocations?: DeliveryAllocation[];
1178
+ /** If the delivery solution is a partial and doesn't apply to all items. */
1179
+ partial?: boolean | null;
1180
+ }
1181
+ export interface DeliveryLogistics {
1182
+ /** Expected delivery time, in free text. For example, "3-5 business days". */
1183
+ deliveryTime?: string | null;
1184
+ /** Instructions for caller, e.g for pickup: "Please deliver during opening hours, and please don't park in disabled parking spot". */
1185
+ instructions?: string | null;
1186
+ /** Pickup details. */
1187
+ pickupDetails?: PickupDetails;
1188
+ }
1189
+ export interface PickupDetails {
1190
+ /** Pickup address. */
1191
+ address?: Address;
1192
+ /**
1193
+ * Whether the pickup address is that of a business - this may effect tax calculation.
1194
+ * @deprecated
1195
+ */
1196
+ businessLocation?: boolean;
1197
+ /** Pickup method */
1198
+ pickupMethod?: PickupMethod;
1199
+ }
1200
+ export declare enum PickupMethod {
1201
+ UNKNOWN_METHOD = "UNKNOWN_METHOD",
1202
+ STORE_PICKUP = "STORE_PICKUP",
1203
+ PICKUP_POINT = "PICKUP_POINT"
1204
+ }
1205
+ export interface DeliveryTimeSlot {
1206
+ /** starting time of the delivery time slot */
1207
+ from?: Date | null;
1208
+ /** ending time of the delivery time slot */
1209
+ to?: Date | null;
1210
+ }
1211
+ export interface SelectedCarrierServiceOptionPrices {
1212
+ /** Total shipping price, after discount and after tax. */
1213
+ totalPriceAfterTax?: MultiCurrencyPrice;
1214
+ /** Total price of shipping after discounts (when relevant), and before tax. */
1215
+ totalPriceBeforeTax?: MultiCurrencyPrice;
1216
+ /** Tax details. */
1217
+ taxDetails?: ItemTaxFullDetails;
1218
+ /** Shipping discount before tax. */
1219
+ totalDiscount?: MultiCurrencyPrice;
1220
+ /** Shipping price before discount and before tax. */
1221
+ price?: MultiCurrencyPrice;
1222
+ }
1223
+ export interface SelectedCarrierServiceOptionOtherCharge {
1224
+ /** Type of additional cost. */
1225
+ type?: ChargeType;
1226
+ /** Details of the charge, such as 'Full Coverage Insurance of up to 80% of value of shipment'. */
1227
+ details?: string | null;
1228
+ /** Price of added charge. */
1229
+ cost?: SelectedCarrierServiceOptionPrices;
1230
+ }
1231
+ export declare enum ChargeType {
1232
+ HANDLING_FEE = "HANDLING_FEE",
1233
+ INSURANCE = "INSURANCE"
1234
+ }
1235
+ export interface DeliveryAllocation {
1236
+ /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */
1237
+ deliveryCarrier?: Carrier;
1238
+ /** The delivery region that are relevant for this delivery solution. */
1239
+ deliveryRegion?: Region;
1240
+ /** Populated if the delivery solution is a partially supplied by this carrier. */
1241
+ applicableLineItems?: ApplicableLineItems;
1242
+ }
1243
+ export interface Carrier {
1244
+ /** The carrier app id */
1245
+ appId?: string | null;
1246
+ /** Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`. */
1247
+ code?: string;
1248
+ }
1249
+ export interface Region {
1250
+ /** The delivery region id. */
1251
+ _id?: string | null;
1252
+ /** The delivery region name. */
1253
+ name?: string | null;
1254
+ }
1255
+ export interface ApplicableLineItems {
1256
+ /** Line items that the delivery solution is for. */
1257
+ lineItemIds?: string[];
1258
+ }
1259
+ export interface ShippingRegion {
1260
+ /**
1261
+ * Shipping region ID.
1262
+ * @readonly
1263
+ */
1264
+ _id?: string;
1265
+ /** Shipping region name. */
1266
+ name?: string;
1267
+ }
1268
+ export interface CarrierServiceOption {
1269
+ /** Carrier ID. */
1270
+ carrierId?: string;
1271
+ /** Shipping options offered by this carrier for this request. */
1272
+ shippingOptions?: ShippingOption[];
1273
+ }
1274
+ export interface ShippingOption {
1275
+ /**
1276
+ * Unique code of provided shipping option like "usps_std_overnight".
1277
+ * For legacy calculators this would be the UUID of the option.
1278
+ */
1279
+ code?: string;
1280
+ /**
1281
+ * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).
1282
+ * For example, "Standard" or "First-Class Package International".
1283
+ */
1284
+ title?: string;
1285
+ /** Delivery logistics. */
1286
+ logistics?: DeliveryLogistics;
1287
+ /** Sipping price information. */
1288
+ cost?: ShippingPrice;
1289
+ /** Delivery solution allocations to different delivery carriers and delivery regions */
1290
+ deliveryAllocations?: DeliveryAllocation[];
1291
+ /** If the delivery solution is a partial and doesn't apply to all items. */
1292
+ partial?: boolean | null;
1293
+ }
1294
+ export interface ShippingPrice {
1295
+ /** Shipping price. */
1296
+ price?: MultiCurrencyPrice;
1297
+ /** Other costs such as insurance, handling & packaging for fragile items, etc. */
1298
+ otherCharges?: OtherCharge[];
1299
+ }
1300
+ export interface OtherCharge {
1301
+ /** Type of additional cost. */
1302
+ type?: ChargeType;
1303
+ /** Price of added cost. */
1304
+ price?: MultiCurrencyPrice;
1305
+ }
1306
+ export interface BuyerInfo extends BuyerInfoIdOneOf {
1307
+ /**
1308
+ * Visitor ID (if site visitor is **not** a member).
1309
+ * @readonly
1310
+ */
1311
+ visitorId?: string;
1312
+ /**
1313
+ * Member ID (if site visitor is a site member).
1314
+ * @readonly
1315
+ */
1316
+ memberId?: string;
1317
+ /**
1318
+ * Contact ID. Auto-created if one does not yet exist. For more information, see [Contacts API](https://dev.wix.com/api/rest/contacts/contacts/introduction).
1319
+ * @readonly
1320
+ */
1321
+ contactId?: string | null;
1322
+ /** Buyer email address. */
1323
+ email?: string | null;
1324
+ }
1325
+ /** @oneof */
1326
+ export interface BuyerInfoIdOneOf {
1327
+ /**
1328
+ * Visitor ID (if site visitor is **not** a member).
1329
+ * @readonly
1330
+ */
1331
+ visitorId?: string;
1332
+ /**
1333
+ * Member ID (if site visitor is a site member).
1334
+ * @readonly
1335
+ */
1336
+ memberId?: string;
1337
+ }
1338
+ export interface PriceSummary {
1339
+ /** Subtotal of all line items, before discounts and before tax. */
1340
+ subtotal?: MultiCurrencyPrice;
1341
+ /** Total shipping price, before discounts and before tax. */
1342
+ shipping?: MultiCurrencyPrice;
1343
+ /** Total tax. */
1344
+ tax?: MultiCurrencyPrice;
1345
+ /** Total calculated discount value. */
1346
+ discount?: MultiCurrencyPrice;
1347
+ /** Total price after discounts, gift cards, and tax. */
1348
+ total?: MultiCurrencyPrice;
1349
+ /** Total additional fees price before tax. */
1350
+ additionalFees?: MultiCurrencyPrice;
1351
+ }
1352
+ export interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
1353
+ /** General shipping calculation error. */
1354
+ generalShippingCalculationError?: Details;
1355
+ /** Carrier errors. */
1356
+ carrierErrors?: CarrierErrors;
1357
+ /** Tax calculation error. */
1358
+ taxCalculationError?: Details;
1359
+ /** Coupon calculation error. */
1360
+ couponCalculationError?: Details;
1361
+ /** Gift card calculation error. */
1362
+ giftCardCalculationError?: Details;
1363
+ /** Order validation errors. */
1364
+ orderValidationErrors?: ApplicationError[];
1365
+ /**
1366
+ * Membership payment methods calculation errors
1367
+ * For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid
1368
+ */
1369
+ membershipError?: Details;
1370
+ /** Discount Rule calculation error. */
1371
+ discountsCalculationError?: Details;
1372
+ }
1373
+ /** @oneof */
1374
+ export interface CalculationErrorsShippingCalculationErrorOneOf {
1375
+ /** General shipping calculation error. */
1376
+ generalShippingCalculationError?: Details;
1377
+ /** Carrier errors. */
1378
+ carrierErrors?: CarrierErrors;
1379
+ }
1380
+ export interface Details extends DetailsKindOneOf {
1381
+ applicationError?: ApplicationError;
1382
+ validationError?: ValidationError;
1383
+ systemError?: SystemError;
1384
+ /**
1385
+ * deprecated in API's - to enable migration from rendering arbitrary tracing to rest response
1386
+ * @deprecated
1387
+ */
1388
+ tracing?: Record<string, string>;
1389
+ }
1390
+ /** @oneof */
1391
+ export interface DetailsKindOneOf {
1392
+ applicationError?: ApplicationError;
1393
+ validationError?: ValidationError;
1394
+ systemError?: SystemError;
1395
+ }
1396
+ export interface ApplicationError {
1397
+ /** Error code. */
1398
+ code?: string;
1399
+ /** Description of the error. */
1400
+ description?: string;
1401
+ /** Data related to the error. */
1402
+ data?: Record<string, any> | null;
1403
+ }
1404
+ /**
1405
+ * example result:
1406
+ * {
1407
+ * "fieldViolations": [
1408
+ * {
1409
+ * "field": "fieldA",
1410
+ * "description": "invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]",
1411
+ * "violatedRule": "OTHER",
1412
+ * "ruleName": "INVALID_NOTE",
1413
+ * "data": {
1414
+ * "value": "FI"
1415
+ * }
1416
+ * },
1417
+ * {
1418
+ * "field": "fieldB",
1419
+ * "description": "field value out of range. supported range: [0-20]",
1420
+ * "violatedRule": "MAX",
1421
+ * "data": {
1422
+ * "threshold": 20
1423
+ * }
1424
+ * },
1425
+ * {
1426
+ * "field": "fieldC",
1427
+ * "description": "invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]",
1428
+ * "violatedRule": "FORMAT",
1429
+ * "data": {
1430
+ * "type": "PHONE"
1431
+ * }
1432
+ * }
1433
+ * ]
1434
+ * }
1435
+ */
1436
+ export interface ValidationError {
1437
+ fieldViolations?: FieldViolation[];
1438
+ }
1439
+ export declare enum RuleType {
1440
+ VALIDATION = "VALIDATION",
1441
+ OTHER = "OTHER",
1442
+ MAX = "MAX",
1443
+ MIN = "MIN",
1444
+ MAX_LENGTH = "MAX_LENGTH",
1445
+ MIN_LENGTH = "MIN_LENGTH",
1446
+ MAX_SIZE = "MAX_SIZE",
1447
+ MIN_SIZE = "MIN_SIZE",
1448
+ FORMAT = "FORMAT",
1449
+ DECIMAL_LTE = "DECIMAL_LTE",
1450
+ DECIMAL_GTE = "DECIMAL_GTE",
1451
+ DECIMAL_LT = "DECIMAL_LT",
1452
+ DECIMAL_GT = "DECIMAL_GT",
1453
+ DECIMAL_MAX_SCALE = "DECIMAL_MAX_SCALE",
1454
+ INVALID_ENUM_VALUE = "INVALID_ENUM_VALUE",
1455
+ REQUIRED_FIELD = "REQUIRED_FIELD",
1456
+ FIELD_NOT_ALLOWED = "FIELD_NOT_ALLOWED",
1457
+ ONE_OF_ALIGNMENT = "ONE_OF_ALIGNMENT",
1458
+ EXACT_LENGTH = "EXACT_LENGTH",
1459
+ EXACT_SIZE = "EXACT_SIZE",
1460
+ REQUIRED_ONE_OF_FIELD = "REQUIRED_ONE_OF_FIELD"
1461
+ }
1462
+ export interface FieldViolation {
1463
+ field?: string;
1464
+ description?: string;
1465
+ violatedRule?: RuleType;
1466
+ /** applicable when violated_rule=OTHER */
1467
+ ruleName?: string | null;
1468
+ data?: Record<string, any> | null;
1469
+ }
1470
+ export interface SystemError {
1471
+ /** Error code. */
1472
+ errorCode?: string | null;
1473
+ }
1474
+ export interface CarrierErrors {
1475
+ /** Carrier errors. */
1476
+ errors?: CarrierError[];
1477
+ }
1478
+ export interface CarrierError {
1479
+ /** Carrier ID. */
1480
+ carrierId?: string;
1481
+ /** Error details. */
1482
+ error?: Details;
1483
+ }
1484
+ export interface GiftCard {
1485
+ /**
1486
+ * Gift Card ID.
1487
+ * @deprecated
1488
+ */
1489
+ _id?: string;
1490
+ /** Gift card obfuscated code. */
1491
+ obfuscatedCode?: string;
1492
+ /** Gift card value. */
1493
+ amount?: MultiCurrencyPrice;
1494
+ /** App ID of the gift card provider. */
1495
+ appId?: string;
1496
+ /**
1497
+ * External ID in the gift card provider's system.
1498
+ * Used for integration and tracking across different platforms.
1499
+ */
1500
+ externalId?: string | null;
1501
+ }
1502
+ export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
1503
+ /** Coupon details. */
1504
+ coupon?: Coupon;
1505
+ /** Merchant discount. */
1506
+ merchantDiscount?: MerchantDiscount;
1507
+ /** Discount rule */
1508
+ discountRule?: DiscountRule;
1509
+ /** Discount type. */
1510
+ discountType?: DiscountType;
1511
+ /**
1512
+ * IDs of line items the discount applies to.
1513
+ * @deprecated IDs of line items the discount applies to.
1514
+ * @replacedBy line_items_discounts
1515
+ * @targetRemovalDate 2024-06-01
1516
+ */
1517
+ lineItemIds?: string[];
1518
+ }
1519
+ /** @oneof */
1520
+ export interface AppliedDiscountDiscountSourceOneOf {
1521
+ /** Coupon details. */
1522
+ coupon?: Coupon;
1523
+ /** Merchant discount. */
1524
+ merchantDiscount?: MerchantDiscount;
1525
+ /** Discount rule */
1526
+ discountRule?: DiscountRule;
1527
+ }
1528
+ export declare enum DiscountType {
1529
+ GLOBAL = "GLOBAL",
1530
+ SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
1531
+ SHIPPING = "SHIPPING"
1532
+ }
1533
+ /** Coupon */
1534
+ export interface Coupon {
1535
+ /** Coupon ID. */
1536
+ _id?: string;
1537
+ /** Coupon code. */
1538
+ code?: string;
1539
+ /** Coupon value. */
1540
+ amount?: MultiCurrencyPrice;
1541
+ /** Coupon name. */
1542
+ name?: string;
1543
+ }
1544
+ export interface MerchantDiscount {
1545
+ /** Discount value. */
1546
+ amount?: MultiCurrencyPrice;
1547
+ /** Discount Percentage. Will be calculated from items price before other discounts. */
1548
+ percentage?: number | null;
1549
+ }
1550
+ export interface DiscountRule {
1551
+ /** Discount rule ID */
1552
+ _id?: string;
1553
+ /** Discount rule name */
1554
+ name?: DiscountRuleName;
1555
+ /** Discount value. */
1556
+ amount?: MultiCurrencyPrice;
1557
+ }
1558
+ export interface DiscountRuleName {
1559
+ /** Original discount rule name (in site's default language). */
1560
+ original?: string;
1561
+ /** Translated discount rule name according to buyer language. Defaults to `original` when not provided. */
1562
+ translated?: string | null;
1563
+ }
1564
+ export interface LineItemDiscount {
1565
+ /** ID of line item the discount applies to. */
1566
+ _id?: string;
1567
+ /** Discount value. */
1568
+ totalDiscountAmount?: MultiCurrencyPrice;
1569
+ }
1570
+ export interface CustomField {
1571
+ /** Custom field value. */
1572
+ value?: any;
1573
+ /** Custom field title. */
1574
+ title?: string;
1575
+ /** Translated custom field title. */
1576
+ translatedTitle?: string | null;
1577
+ }
1578
+ export declare enum WeightUnit {
1579
+ /** Weight unit can't be classified, due to an error */
1580
+ UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
1581
+ /** Kilograms */
1582
+ KG = "KG",
1583
+ /** Pounds */
1584
+ LB = "LB"
1585
+ }
1586
+ export interface TaxSummary {
1587
+ /**
1588
+ * Amount for which tax is calculated, added from line items.
1589
+ * @readonly
1590
+ */
1591
+ taxableAmount?: MultiCurrencyPrice;
1592
+ /**
1593
+ * Calculated tax, added from line items.
1594
+ * @readonly
1595
+ */
1596
+ totalTax?: MultiCurrencyPrice;
1597
+ /**
1598
+ * Tax calculator that was active when the order was created.
1599
+ * @deprecated
1600
+ */
1601
+ calculationDetails?: TaxCalculationDetails;
1602
+ }
1603
+ export interface TaxCalculationDetails extends TaxCalculationDetailsCalculationDetailsOneOf {
1604
+ /** Reason the manual calculation was used. */
1605
+ manualRateReason?: ManualCalculationReason;
1606
+ /** Details of the fallback rate calculation. */
1607
+ autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;
1608
+ /** Rate calculation type. */
1609
+ rateType?: RateType;
1610
+ }
1611
+ /** @oneof */
1612
+ export interface TaxCalculationDetailsCalculationDetailsOneOf {
1613
+ /** Reason the manual calculation was used. */
1614
+ manualRateReason?: ManualCalculationReason;
1615
+ /** Details of the fallback rate calculation. */
1616
+ autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;
1617
+ }
1618
+ export declare enum RateType {
1619
+ /** no tax being collected for this request due to location of purchase */
1620
+ NO_TAX_COLLECTED = "NO_TAX_COLLECTED",
1621
+ /** manual rate used for calculation */
1622
+ MANUAL_RATE = "MANUAL_RATE",
1623
+ /** autotax rate used for calculation */
1624
+ AUTO_RATE = "AUTO_RATE",
1625
+ /** fallback rate used for calculation */
1626
+ FALLBACK_RATE = "FALLBACK_RATE"
1627
+ }
1628
+ export declare enum ManualCalculationReason {
1629
+ /** user set calculator in Business Manager to be Manual */
1630
+ GLOBAL_SETTING_TO_MANUAL = "GLOBAL_SETTING_TO_MANUAL",
1631
+ /** specific region is on manual even though Global setting is Auto-tax */
1632
+ REGION_SETTING_TO_MANUAL = "REGION_SETTING_TO_MANUAL"
1633
+ }
1634
+ export interface AutoTaxFallbackCalculationDetails {
1635
+ /** reason for fallback */
1636
+ fallbackReason?: FallbackReason;
1637
+ /** invalid request (i.e. address), timeout, internal error, license error, and others will be encoded here */
1638
+ error?: ApplicationError;
1639
+ }
1640
+ export declare enum FallbackReason {
1641
+ /** auto-tax failed to be calculated */
1642
+ AUTO_TAX_FAILED = "AUTO_TAX_FAILED",
1643
+ /** auto-tax was temporarily deactivated on a system-level */
1644
+ AUTO_TAX_DEACTIVATED = "AUTO_TAX_DEACTIVATED"
1645
+ }
1646
+ /**
1647
+ * 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.
1648
+ * Tax breakdown is the tax amount split to the tax authorities that applied on the line item.
1649
+ */
1650
+ export interface AggregatedTaxBreakdown {
1651
+ /** The name of the tax against which this tax amount was calculated. */
1652
+ taxName?: string;
1653
+ /** The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws. */
1654
+ taxType?: string;
1655
+ /** The name of the jurisdiction in which this tax detail applies. */
1656
+ jurisdiction?: string;
1657
+ /** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
1658
+ jurisdictionTypeEnum?: JurisdictionType;
1659
+ /** The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.000 signifies 200% tax. (Decimal value) */
1660
+ rate?: string;
1661
+ /** The sum of all the tax from line items that calculated by the tax identifiers. */
1662
+ aggregatedTaxAmount?: MultiCurrencyPrice;
1663
+ }
1664
+ export declare enum ChannelType {
1665
+ /** Unspecified sales channel. This value is not supported. */
1666
+ UNSPECIFIED = "UNSPECIFIED",
1667
+ /** A web client. */
1668
+ WEB = "WEB",
1669
+ /** [Point of sale solutions](https://support.wix.com/en/wix-mobile-pos-2196395). */
1670
+ POS = "POS",
1671
+ /** [eBay shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-ebay-shop). */
1672
+ EBAY = "EBAY",
1673
+ /** [Amazon shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-amazon-shop). */
1674
+ AMAZON = "AMAZON",
1675
+ /** Other sales platform. */
1676
+ OTHER_PLATFORM = "OTHER_PLATFORM",
1677
+ /** [Wix Owner app](https://support.wix.com/article/wix-owner-app-an-overview). */
1678
+ WIX_APP_STORE = "WIX_APP_STORE",
1679
+ /** 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) */
1680
+ WIX_INVOICES = "WIX_INVOICES",
1681
+ /** Wix merchant backoffice. */
1682
+ BACKOFFICE_MERCHANT = "BACKOFFICE_MERCHANT",
1683
+ /** Wish sales channel. */
1684
+ WISH = "WISH",
1685
+ /** [ClassPass sales channel](https://support.wix.com/en/article/wix-bookings-letting-clients-book-your-services-with-classpass). */
1686
+ CLASS_PASS = "CLASS_PASS",
1687
+ /** Global-E sales channel. */
1688
+ GLOBAL_E = "GLOBAL_E",
1689
+ /** [Facebook shop](https://support.wix.com/en/article/wix-stores-changes-to-facebook-shops). */
1690
+ FACEBOOK = "FACEBOOK",
1691
+ /** [Etsy sales channel](https://support.wix.com/en/article/wix-stores-request-adding-etsy-as-a-sales-channel). */
1692
+ ETSY = "ETSY",
1693
+ /** [TikTok sales channel](https://support.wix.com/en/article/wix-stores-request-adding-tiktok-as-a-sales-channel). */
1694
+ TIKTOK = "TIKTOK",
1695
+ /** [Faire marketplace integration](https://support.wix.com/en/article/wix-stores-creating-a-faire-store-using-the-faire-integration-app). */
1696
+ FAIRE_COM = "FAIRE_COM"
1697
+ }
1698
+ export interface CreatedBy extends CreatedByIdOneOf {
1699
+ /**
1700
+ * User ID - when the order was created by a Wix user on behalf of a buyer.
1701
+ * For example, via POS (point of service).
1702
+ */
1703
+ userId?: string;
1704
+ /** Member ID - when the order was created by a **logged in** site visitor. */
1705
+ memberId?: string;
1706
+ /** Visitor ID - when the order was created by a site visitor that was **not** logged in. */
1707
+ visitorId?: string;
1708
+ /** App ID - when the order was created by an external application or Wix service. */
1709
+ appId?: string;
1710
+ }
1711
+ /** @oneof */
1712
+ export interface CreatedByIdOneOf {
1713
+ /**
1714
+ * User ID - when the order was created by a Wix user on behalf of a buyer.
1715
+ * For example, via POS (point of service).
1716
+ */
1717
+ userId?: string;
1718
+ /** Member ID - when the order was created by a **logged in** site visitor. */
1719
+ memberId?: string;
1720
+ /** Visitor ID - when the order was created by a site visitor that was **not** logged in. */
1721
+ visitorId?: string;
1722
+ /** App ID - when the order was created by an external application or Wix service. */
1723
+ appId?: string;
1724
+ }
1725
+ /** Reserved for internal use. */
1726
+ export interface MembershipOptions {
1727
+ /**
1728
+ * Reserved for internal use.
1729
+ * @readonly
1730
+ */
1731
+ eligibleMemberships?: Membership[];
1732
+ /**
1733
+ * Reserved for internal use.
1734
+ * @readonly
1735
+ */
1736
+ invalidMemberships?: InvalidMembership[];
1737
+ /** Selected membership to apply to this checkout. */
1738
+ selectedMemberships?: SelectedMemberships;
1739
+ }
1740
+ export interface Membership {
1741
+ /** Membership ID. */
1742
+ _id?: string;
1743
+ /** ID of the application providing this payment option. */
1744
+ appId?: string;
1745
+ /** The name of this membership. */
1746
+ name?: MembershipName;
1747
+ /** Line item IDs which are "paid" for by this membership. */
1748
+ lineItemIds?: string[];
1749
+ /** Optional - For a membership that has limited credits, information about credit usage. */
1750
+ credits?: MembershipPaymentCredits;
1751
+ /** Optional - TMembership expiry date. */
1752
+ expirationDate?: Date | null;
1753
+ /** Additional data about this membership. */
1754
+ additionalData?: Record<string, any> | null;
1755
+ }
1756
+ export interface MembershipName {
1757
+ /** Membership name. */
1758
+ original?: string;
1759
+ /** Translated membership name. Defaults to `original` when not provided. */
1760
+ translated?: string | null;
1761
+ }
1762
+ export interface MembershipPaymentCredits {
1763
+ /** Membership's total amount of credits. */
1764
+ total?: number;
1765
+ /** Membership's remaining amount of credits. */
1766
+ remaining?: number;
1767
+ }
1768
+ export interface InvalidMembership {
1769
+ /** Membership details. */
1770
+ membership?: Membership;
1771
+ /** Reason why this membership is invalid and cannot be used. */
1772
+ reason?: string;
1773
+ }
1774
+ export interface SelectedMemberships {
1775
+ /** Selected memberships. */
1776
+ memberships?: SelectedMembership[];
1777
+ }
1778
+ export interface SelectedMembership {
1779
+ /** Membership ID. */
1780
+ _id?: string;
1781
+ /** ID of the app providing this payment option. */
1782
+ appId?: string;
1783
+ /** IDs of the line items this membership applies to. */
1784
+ lineItemIds?: string[];
1785
+ }
1786
+ export interface AdditionalFee {
1787
+ /** Additional fee's unique code (or ID) for future processing. */
1788
+ code?: string | null;
1789
+ /** Translated additional fee's name. */
1790
+ name?: string;
1791
+ /** Additional fee's price. */
1792
+ price?: MultiCurrencyPrice;
1793
+ /** Tax details. */
1794
+ taxDetails?: ItemTaxFullDetails;
1795
+ /** Provider's app id. */
1796
+ providerAppId?: string | null;
1797
+ /** Additional fee's price before tax. */
1798
+ priceBeforeTax?: MultiCurrencyPrice;
1799
+ /** Additional fee's price after tax. */
1800
+ priceAfterTax?: MultiCurrencyPrice;
1801
+ /**
1802
+ * Optional - Line items associated with this additional fee.
1803
+ * If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order.
1804
+ */
1805
+ lineItemIds?: string[];
1806
+ /** the source the additional fee was added from */
1807
+ source?: AdditionalFeeSource;
1808
+ }
1809
+ export declare enum AdditionalFeeSource {
1810
+ UNKNOWN_ADDITIONAL_FEE_SOURCE = "UNKNOWN_ADDITIONAL_FEE_SOURCE",
1811
+ /** The additional fee was added by an additional fee service plugin */
1812
+ SERVICE_PLUGIN = "SERVICE_PLUGIN",
1813
+ /** The additional fee was added on the item either via the catalog or on custom line item */
1814
+ ITEM = "ITEM",
1815
+ /** The additional fee was added manually on the request */
1816
+ MANUAL = "MANUAL"
1817
+ }
1818
+ export interface ConversionInfo {
1819
+ /**
1820
+ * The site currency.
1821
+ * @readonly
1822
+ */
1823
+ siteCurrency?: string;
1824
+ /**
1825
+ * The rate used when converting from the site currency to the checkout currency.
1826
+ * @readonly
1827
+ */
1828
+ conversionRate?: string;
1829
+ }
1830
+ export interface Violation {
1831
+ /** 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. */
1832
+ severity?: Severity;
1833
+ /** Target location on a checkout or cart page where the violation will be displayed. */
1834
+ target?: Target;
1835
+ /** 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>`. */
1836
+ description?: string | null;
1837
+ }
1838
+ export declare enum Severity {
1839
+ /** The user is allowed to move forward in the flow. */
1840
+ WARNING = "WARNING",
1841
+ /**
1842
+ * The user is blocked from moving forward in the flow.
1843
+ * For example, if callerContext is CART - moving to checkout is blocked. if callerContext is CHECKOUT, placing an order is blocked.
1844
+ */
1845
+ ERROR = "ERROR"
1846
+ }
1847
+ export interface Target extends TargetTargetTypeOneOf {
1848
+ /** General (other) violation. */
1849
+ other?: Other;
1850
+ /** Specific line item violation. */
1851
+ lineItem?: TargetLineItem;
1852
+ }
1853
+ /** @oneof */
1854
+ export interface TargetTargetTypeOneOf {
1855
+ /** General (other) violation. */
1856
+ other?: Other;
1857
+ /** Specific line item violation. */
1858
+ lineItem?: TargetLineItem;
1859
+ }
1860
+ /** Available locations on the webpage */
1861
+ export declare enum NameInOther {
1862
+ /** Default location, in case no specific location is specified. */
1863
+ OTHER_DEFAULT = "OTHER_DEFAULT"
1864
+ }
1865
+ /** Available locations on the line item */
1866
+ export declare enum NameInLineItem {
1867
+ /** Default location, in case no specific location is specified. */
1868
+ LINE_ITEM_DEFAULT = "LINE_ITEM_DEFAULT"
1869
+ }
1870
+ export declare enum SuggestedFix {
1871
+ /** No suggested fix is specified. The user should refer to the violation description to resolve the issue. */
1872
+ UNKNOWN_SUGGESTED_FIX = "UNKNOWN_SUGGESTED_FIX",
1873
+ /** The line item should be removed from the cart or checkout to resolve the violation. */
1874
+ REMOVE_LINE_ITEM = "REMOVE_LINE_ITEM"
1875
+ }
1876
+ /** General (other) violation. */
1877
+ export interface Other {
1878
+ /** Location on a checkout or a cart page where a general (other) violation will be displayed. */
1879
+ name?: NameInOther;
1880
+ }
1881
+ /** Specific line item violation. */
1882
+ export interface TargetLineItem {
1883
+ /** Location on a checkout or a cart page where the specific line item violation will be displayed. */
1884
+ name?: NameInLineItem;
1885
+ /** ID of the line item containing the violation. */
1886
+ _id?: string | null;
1887
+ }
1888
+ export interface CustomSettings {
1889
+ /**
1890
+ * Whether to restrict the option to add or remove a gift card on the checkout page.
1891
+ *
1892
+ * Default: `false`
1893
+ */
1894
+ lockGiftCard?: boolean;
1895
+ /**
1896
+ * Whether to restrict the option to add or remove a coupon code on the checkout page.
1897
+ *
1898
+ * Default: `false`
1899
+ */
1900
+ lockCouponCode?: boolean;
1901
+ /**
1902
+ * Whether to disable policy agreement checkout in the checkout page
1903
+ *
1904
+ * Default: `false`
1905
+ */
1906
+ disabledPolicyAgreementCheckbox?: boolean;
1907
+ /**
1908
+ * Whether to disable manual payment option for this checkout.
1909
+ *
1910
+ * Default: `false`
1911
+ */
1912
+ disabledManualPayment?: boolean;
1913
+ }
1914
+ export interface CreateAndRedirectToCheckoutRequest {
1915
+ /** ID of the checkout template to use to create a checkout. */
1916
+ checkoutTemplateId: string;
1917
+ /** ID of the site associated with the checkout template. */
1918
+ siteId: string;
1919
+ }
1920
+ export interface RawHttpResponse {
1921
+ body?: Uint8Array;
1922
+ statusCode?: number | null;
1923
+ headers?: HeadersEntry[];
1924
+ }
1925
+ export interface HeadersEntry {
1926
+ key?: string;
1927
+ value?: string;
1928
+ }
1929
+ export interface DomainEvent extends DomainEventBodyOneOf {
1930
+ createdEvent?: EntityCreatedEvent;
1931
+ updatedEvent?: EntityUpdatedEvent;
1932
+ deletedEvent?: EntityDeletedEvent;
1933
+ actionEvent?: ActionEvent;
1934
+ /**
1935
+ * Unique event ID.
1936
+ * Allows clients to ignore duplicate webhooks.
1937
+ */
1938
+ _id?: string;
1939
+ /**
1940
+ * Assumes actions are also always typed to an entity_type
1941
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
1942
+ */
1943
+ entityFqdn?: string;
1944
+ /**
1945
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
1946
+ * This is although the created/updated/deleted notion is duplication of the oneof types
1947
+ * Example: created/updated/deleted/started/completed/email_opened
1948
+ */
1949
+ slug?: string;
1950
+ /** ID of the entity associated with the event. */
1951
+ entityId?: string;
1952
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
1953
+ eventTime?: Date | null;
1954
+ /**
1955
+ * Whether the event was triggered as a result of a privacy regulation application
1956
+ * (for example, GDPR).
1957
+ */
1958
+ triggeredByAnonymizeRequest?: boolean | null;
1959
+ /** If present, indicates the action that triggered the event. */
1960
+ originatedFrom?: string | null;
1961
+ /**
1962
+ * A sequence number defining the order of updates to the underlying entity.
1963
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
1964
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
1965
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
1966
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
1967
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
1968
+ */
1969
+ entityEventSequence?: string | null;
1970
+ }
1971
+ /** @oneof */
1972
+ export interface DomainEventBodyOneOf {
1973
+ createdEvent?: EntityCreatedEvent;
1974
+ updatedEvent?: EntityUpdatedEvent;
1975
+ deletedEvent?: EntityDeletedEvent;
1976
+ actionEvent?: ActionEvent;
1977
+ }
1978
+ export interface EntityCreatedEvent {
1979
+ entity?: string;
1980
+ }
1981
+ export interface RestoreInfo {
1982
+ deletedDate?: Date | null;
1983
+ }
1984
+ export interface EntityUpdatedEvent {
1985
+ /**
1986
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
1987
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
1988
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
1989
+ */
1990
+ currentEntity?: string;
1991
+ }
1992
+ export interface EntityDeletedEvent {
1993
+ /** Entity that was deleted */
1994
+ deletedEntity?: string | null;
1995
+ }
1996
+ export interface ActionEvent {
1997
+ body?: string;
1998
+ }
1999
+ export interface MessageEnvelope {
2000
+ /** App instance ID. */
2001
+ instanceId?: string | null;
2002
+ /** Event type. */
2003
+ eventType?: string;
2004
+ /** The identification type and identity data. */
2005
+ identity?: IdentificationData;
2006
+ /** Stringify payload. */
2007
+ data?: string;
2008
+ }
2009
+ export interface IdentificationData extends IdentificationDataIdOneOf {
2010
+ /** ID of a site visitor that has not logged in to the site. */
2011
+ anonymousVisitorId?: string;
2012
+ /** ID of a site visitor that has logged in to the site. */
2013
+ memberId?: string;
2014
+ /** ID of a Wix user (site owner, contributor, etc.). */
2015
+ wixUserId?: string;
2016
+ /** ID of an app. */
2017
+ appId?: string;
2018
+ /** @readonly */
2019
+ identityType?: WebhookIdentityType;
2020
+ }
2021
+ /** @oneof */
2022
+ export interface IdentificationDataIdOneOf {
2023
+ /** ID of a site visitor that has not logged in to the site. */
2024
+ anonymousVisitorId?: string;
2025
+ /** ID of a site visitor that has logged in to the site. */
2026
+ memberId?: string;
2027
+ /** ID of a Wix user (site owner, contributor, etc.). */
2028
+ wixUserId?: string;
2029
+ /** ID of an app. */
2030
+ appId?: string;
2031
+ }
2032
+ export declare enum WebhookIdentityType {
2033
+ UNKNOWN = "UNKNOWN",
2034
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
2035
+ MEMBER = "MEMBER",
2036
+ WIX_USER = "WIX_USER",
2037
+ APP = "APP"
2038
+ }
2039
+ interface WebClientCustomizationNonNullableFields {
2040
+ disabledContinueShoppingButton: boolean;
2041
+ disabledPolicyAgreementCheckbox: boolean;
2042
+ }
2043
+ interface CheckoutCustomizationNonNullableFields {
2044
+ webClient?: WebClientCustomizationNonNullableFields;
2045
+ lockedGiftCard: boolean;
2046
+ lockedCoupon: boolean;
2047
+ disabledManualPayment: boolean;
2048
+ }
2049
+ interface CatalogReferenceNonNullableFields {
2050
+ catalogItemId: string;
2051
+ appId: string;
2052
+ }
2053
+ interface ProductNameNonNullableFields {
2054
+ original: string;
2055
+ }
2056
+ interface PlainTextValueNonNullableFields {
2057
+ original: string;
2058
+ }
2059
+ interface ColorNonNullableFields {
2060
+ original: string;
2061
+ }
2062
+ interface DescriptionLineNameNonNullableFields {
2063
+ original: string;
2064
+ }
2065
+ interface DescriptionLineNonNullableFields {
2066
+ plainText?: PlainTextValueNonNullableFields;
2067
+ colorInfo?: ColorNonNullableFields;
2068
+ plainTextValue?: PlainTextValueNonNullableFields;
2069
+ color: string;
2070
+ name?: DescriptionLineNameNonNullableFields;
2071
+ lineType: DescriptionLineType;
2072
+ }
2073
+ interface PhysicalPropertiesNonNullableFields {
2074
+ shippable: boolean;
2075
+ }
2076
+ interface PaymentOptionNonNullableFields {
2077
+ value: PaymentOptionType;
2078
+ }
2079
+ interface CatalogOverrideFieldsNonNullableFields {
2080
+ productName?: ProductNameNonNullableFields;
2081
+ descriptionLines: DescriptionLineNonNullableFields[];
2082
+ physicalProperties?: PhysicalPropertiesNonNullableFields;
2083
+ image: string;
2084
+ paymentOption?: PaymentOptionNonNullableFields;
2085
+ }
2086
+ interface V1LineItemNonNullableFields {
2087
+ quantity: number;
2088
+ catalogReference?: CatalogReferenceNonNullableFields;
2089
+ catalogOverrideFields?: CatalogOverrideFieldsNonNullableFields;
2090
+ }
2091
+ interface PriceDescriptionNonNullableFields {
2092
+ original: string;
2093
+ }
2094
+ interface ItemTypeNonNullableFields {
2095
+ preset: ItemTypeItemType;
2096
+ custom: string;
2097
+ }
2098
+ interface SubscriptionSettingsNonNullableFields {
2099
+ frequency: SubscriptionFrequency;
2100
+ autoRenewal: boolean;
2101
+ }
2102
+ interface TitleNonNullableFields {
2103
+ original: string;
2104
+ }
2105
+ interface DescriptionNonNullableFields {
2106
+ original: string;
2107
+ }
2108
+ interface SubscriptionOptionInfoNonNullableFields {
2109
+ subscriptionSettings?: SubscriptionSettingsNonNullableFields;
2110
+ title?: TitleNonNullableFields;
2111
+ description?: DescriptionNonNullableFields;
2112
+ }
2113
+ interface SecuredMediaNonNullableFields {
2114
+ _id: string;
2115
+ fileName: string;
2116
+ fileType: FileType;
2117
+ }
2118
+ interface CustomLineItemNonNullableFields {
2119
+ quantity: number;
2120
+ price: string;
2121
+ priceDescription?: PriceDescriptionNonNullableFields;
2122
+ descriptionLines: DescriptionLineNonNullableFields[];
2123
+ media: string;
2124
+ productName?: ProductNameNonNullableFields;
2125
+ url: string;
2126
+ itemType?: ItemTypeNonNullableFields;
2127
+ physicalProperties?: PhysicalPropertiesNonNullableFields;
2128
+ subscriptionOptionInfo?: SubscriptionOptionInfoNonNullableFields;
2129
+ digitalFile?: SecuredMediaNonNullableFields;
2130
+ paymentOption: PaymentOptionType;
2131
+ catalogReference?: CatalogReferenceNonNullableFields;
2132
+ savePaymentMethod: boolean;
2133
+ }
2134
+ interface CustomContentReferenceNonNullableFields {
2135
+ appId: string;
2136
+ componentId: string;
2137
+ }
2138
+ interface ExternalReferenceNonNullableFields {
2139
+ appId: string;
2140
+ }
2141
+ export interface CheckoutTemplateNonNullableFields {
2142
+ status: Status;
2143
+ customization?: CheckoutCustomizationNonNullableFields;
2144
+ lineItems: V1LineItemNonNullableFields[];
2145
+ customLineItems: CustomLineItemNonNullableFields[];
2146
+ customContentReference?: CustomContentReferenceNonNullableFields;
2147
+ externalReference?: ExternalReferenceNonNullableFields;
2148
+ }
2149
+ export interface CreateCheckoutTemplateResponseNonNullableFields {
2150
+ checkoutTemplate?: CheckoutTemplateNonNullableFields;
2151
+ }
2152
+ export interface GetCheckoutTemplateResponseNonNullableFields {
2153
+ checkoutTemplate?: CheckoutTemplateNonNullableFields;
2154
+ }
2155
+ export interface UpdateCheckoutTemplateResponseNonNullableFields {
2156
+ checkoutTemplate?: CheckoutTemplateNonNullableFields;
2157
+ }
2158
+ export interface QueryCheckoutTemplatesResponseNonNullableFields {
2159
+ checkoutTemplates: CheckoutTemplateNonNullableFields[];
2160
+ }
2161
+ export interface CreateCheckoutFromTemplateResponseNonNullableFields {
2162
+ checkoutId: string;
2163
+ checkoutUrl: string;
2164
+ }
2165
+ interface HeadersEntryNonNullableFields {
2166
+ key: string;
2167
+ value: string;
2168
+ }
2169
+ export interface RawHttpResponseNonNullableFields {
2170
+ body: Uint8Array;
2171
+ headers: HeadersEntryNonNullableFields[];
2172
+ }
2173
+ export interface BaseEventMetadata {
2174
+ /** App instance ID. */
2175
+ instanceId?: string | null;
2176
+ /** Event type. */
2177
+ eventType?: string;
2178
+ /** The identification type and identity data. */
2179
+ identity?: IdentificationData;
2180
+ }
2181
+ export interface EventMetadata extends BaseEventMetadata {
2182
+ /**
2183
+ * Unique event ID.
2184
+ * Allows clients to ignore duplicate webhooks.
2185
+ */
2186
+ _id?: string;
2187
+ /**
2188
+ * Assumes actions are also always typed to an entity_type
2189
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
2190
+ */
2191
+ entityFqdn?: string;
2192
+ /**
2193
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
2194
+ * This is although the created/updated/deleted notion is duplication of the oneof types
2195
+ * Example: created/updated/deleted/started/completed/email_opened
2196
+ */
2197
+ slug?: string;
2198
+ /** ID of the entity associated with the event. */
2199
+ entityId?: string;
2200
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
2201
+ eventTime?: Date | null;
2202
+ /**
2203
+ * Whether the event was triggered as a result of a privacy regulation application
2204
+ * (for example, GDPR).
2205
+ */
2206
+ triggeredByAnonymizeRequest?: boolean | null;
2207
+ /** If present, indicates the action that triggered the event. */
2208
+ originatedFrom?: string | null;
2209
+ /**
2210
+ * A sequence number defining the order of updates to the underlying entity.
2211
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
2212
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
2213
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
2214
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
2215
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
2216
+ */
2217
+ entityEventSequence?: string | null;
2218
+ }
2219
+ export interface CheckoutTemplateCreatedEnvelope {
2220
+ entity: CheckoutTemplate;
2221
+ metadata: EventMetadata;
2222
+ }
2223
+ /**
2224
+ * Triggered when a checkout template is created.
2225
+ * @permissionScope Manage Stores - all permissions
2226
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2227
+ * @permissionScope Manage eCommerce - all permissions
2228
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2229
+ * @permissionId ECOM.CHECKOUT_TEMPLATE_READ
2230
+ * @webhook
2231
+ * @eventType wix.ecom.v1.checkout_template_created
2232
+ * @documentationMaturity preview
2233
+ */
2234
+ export declare function onCheckoutTemplateCreated(handler: (event: CheckoutTemplateCreatedEnvelope) => void | Promise<void>): void;
2235
+ export interface CheckoutTemplateDeletedEnvelope {
2236
+ metadata: EventMetadata;
2237
+ }
2238
+ /**
2239
+ * Triggered when a checkout template is deleted.
2240
+ * @permissionScope Manage Stores - all permissions
2241
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2242
+ * @permissionScope Manage eCommerce - all permissions
2243
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2244
+ * @permissionId ECOM.CHECKOUT_TEMPLATE_READ
2245
+ * @webhook
2246
+ * @eventType wix.ecom.v1.checkout_template_deleted
2247
+ * @documentationMaturity preview
2248
+ */
2249
+ export declare function onCheckoutTemplateDeleted(handler: (event: CheckoutTemplateDeletedEnvelope) => void | Promise<void>): void;
2250
+ export interface CheckoutTemplateUpdatedEnvelope {
2251
+ entity: CheckoutTemplate;
2252
+ metadata: EventMetadata;
2253
+ }
2254
+ /**
2255
+ * Triggered when a checkout template is updated.
2256
+ * @permissionScope Manage Stores - all permissions
2257
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2258
+ * @permissionScope Manage eCommerce - all permissions
2259
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2260
+ * @permissionId ECOM.CHECKOUT_TEMPLATE_READ
2261
+ * @webhook
2262
+ * @eventType wix.ecom.v1.checkout_template_updated
2263
+ * @documentationMaturity preview
2264
+ */
2265
+ export declare function onCheckoutTemplateUpdated(handler: (event: CheckoutTemplateUpdatedEnvelope) => void | Promise<void>): void;
2266
+ export interface CheckoutTemplateUsedEnvelope {
2267
+ data: CheckoutTemplateUsed;
2268
+ metadata: EventMetadata;
2269
+ }
2270
+ /**
2271
+ * Triggered when a checkout is created from a checkout template.
2272
+ * @permissionScope Manage Stores - all permissions
2273
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2274
+ * @permissionScope Manage eCommerce - all permissions
2275
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2276
+ * @permissionId ECOM.CHECKOUT_TEMPLATE_READ
2277
+ * @webhook
2278
+ * @eventType wix.ecom.v1.checkout_template_used
2279
+ * @documentationMaturity preview
2280
+ */
2281
+ export declare function onCheckoutTemplateUsed(handler: (event: CheckoutTemplateUsedEnvelope) => void | Promise<void>): void;
2282
+ /**
2283
+ * Creates a checkout template.
2284
+ *
2285
+ * A checkout template is used to create a new checkout that will include predefined information. For example, a single link with
2286
+ * a `checkoutTemplateId` can be shared with customers and each time the link is clicked, a new checkout page will be created
2287
+ * for that customer with certain checkout information already populated.
2288
+ *
2289
+ * The customizable features include the option to allow or to lock coupon codes or gift cards. For example, if a store owner is
2290
+ * using the checkout template to offer a flash sale to their social media followers, they may want to lock the option to apply an
2291
+ * additional coupon on top of the sale being offered. If so, they can set `customization.lockedCoupon` to `true`.
2292
+ *
2293
+ * A checkout can be created with a checkout template by calling `createCheckoutFromTemplate()`. The site may add further customizations to the new checkout and then redirect the customer using the new checkout's `checkoutUrl`.
2294
+ * @param checkoutTemplate - Checkout template to create.
2295
+ * @public
2296
+ * @documentationMaturity preview
2297
+ * @requiredField checkoutTemplate
2298
+ * @requiredField checkoutTemplate.customLineItems.descriptionLines
2299
+ * @requiredField checkoutTemplate.customLineItems.descriptionLines.name
2300
+ * @requiredField checkoutTemplate.customLineItems.itemType
2301
+ * @requiredField checkoutTemplate.customLineItems.productName
2302
+ * @requiredField checkoutTemplate.customLineItems.quantity
2303
+ * @requiredField checkoutTemplate.lineItems.catalogReference
2304
+ * @requiredField checkoutTemplate.lineItems.catalogReference.appId
2305
+ * @requiredField checkoutTemplate.lineItems.catalogReference.catalogItemId
2306
+ * @requiredField checkoutTemplate.lineItems.quantity
2307
+ * @permissionId ECOM.CHECKOUT_TEMPLATE_CREATE
2308
+ * @permissionScope Manage Stores - all permissions
2309
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2310
+ * @permissionScope Manage eCommerce - all permissions
2311
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2312
+ * @applicableIdentity APP
2313
+ * @returns Created checkout template.
2314
+ * @fqn wix.ecom.checkout_template.api.v1.CheckoutTemplateService.CreateCheckoutTemplate
2315
+ */
2316
+ export declare function createCheckoutTemplate(checkoutTemplate: CheckoutTemplate): Promise<CheckoutTemplate & CheckoutTemplateNonNullableFields>;
2317
+ /**
2318
+ * Retrieves a checkout template.
2319
+ * @param checkoutTemplateId - ID of the checkout template to retrieve.
2320
+ * @public
2321
+ * @documentationMaturity preview
2322
+ * @requiredField checkoutTemplateId
2323
+ * @permissionId ECOM.CHECKOUT_TEMPLATE_READ
2324
+ * @permissionScope Manage Stores - all permissions
2325
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2326
+ * @permissionScope Manage eCommerce - all permissions
2327
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2328
+ * @applicableIdentity APP
2329
+ * @returns Retrieved checkout template.
2330
+ * @fqn wix.ecom.checkout_template.api.v1.CheckoutTemplateService.GetCheckoutTemplate
2331
+ */
2332
+ export declare function getCheckoutTemplate(checkoutTemplateId: string): Promise<CheckoutTemplate & CheckoutTemplateNonNullableFields>;
2333
+ /**
2334
+ * Updates a checkout template.
2335
+ *
2336
+ * If the info in a checkout template is updated, only new checkouts created from this template will include the updated items. Checkouts previously
2337
+ * created from this template before the update will not be affected.
2338
+ * @param _id - Checkout template ID.
2339
+ * @public
2340
+ * @documentationMaturity preview
2341
+ * @requiredField _id
2342
+ * @requiredField checkoutTemplate
2343
+ * @param checkoutTemplate - Checkout template info to update.
2344
+ * @permissionId ECOM.CHECKOUT_TEMPLATE_UPDATE
2345
+ * @permissionScope Manage Stores - all permissions
2346
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2347
+ * @permissionScope Manage eCommerce - all permissions
2348
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2349
+ * @applicableIdentity APP
2350
+ * @returns Updated checkout template.
2351
+ * @fqn wix.ecom.checkout_template.api.v1.CheckoutTemplateService.UpdateCheckoutTemplate
2352
+ */
2353
+ export declare function updateCheckoutTemplate(_id: string | null, checkoutTemplate: UpdateCheckoutTemplate): Promise<CheckoutTemplate & CheckoutTemplateNonNullableFields>;
2354
+ export interface UpdateCheckoutTemplate {
2355
+ /**
2356
+ * Checkout template ID.
2357
+ * @readonly
2358
+ */
2359
+ _id?: string | null;
2360
+ /**
2361
+ * Status of the checkout template.
2362
+ *
2363
+ * When `status` is `INACTIVE` checkouts will not be created with this template `_id`. Instead, the function will redirect to the domain site.
2364
+ *
2365
+ * Default: `ACTIVE`
2366
+ */
2367
+ status?: Status;
2368
+ /** Custom settings to apply to the checkout page created from this template. */
2369
+ customization?: CheckoutCustomization;
2370
+ /**
2371
+ * Catalog line items.
2372
+ *
2373
+ * Max: 300 items
2374
+ */
2375
+ lineItems?: V1LineItem[];
2376
+ /**
2377
+ * Custom line items. Custom line items don't trigger the Catalog service plugin.
2378
+ *
2379
+ * Max: 300 items
2380
+ */
2381
+ customLineItems?: CustomLineItem[];
2382
+ /**
2383
+ * Coupon code.
2384
+ *
2385
+ * Note that a checkout can only hold one `couponCode` at a time. If an additional `couponCode` is added, it will override the existing `couponCode`.
2386
+ * For additional information, see the Coupons API.
2387
+ */
2388
+ couponCode?: string | null;
2389
+ /**
2390
+ * Reference IDs for the app and component providing custom checkout page content.
2391
+ *
2392
+ * To access and manage custom checkout page content, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
2393
+ * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
2394
+ */
2395
+ customContentReference?: CustomContentReference;
2396
+ }
2397
+ /**
2398
+ * Deletes a checkout template.
2399
+ *
2400
+ * If a checkout template is deleted and a customer attempts to create a checkout with that `checkoutTemplateId` then
2401
+ * the customer will be redirected to the domain site.
2402
+ * @param checkoutTemplateId - ID of the checkout template to delete.
2403
+ * @public
2404
+ * @documentationMaturity preview
2405
+ * @requiredField checkoutTemplateId
2406
+ * @permissionId ECOM.CHECKOUT_TEMPLATE_DELETE
2407
+ * @permissionScope Manage Stores - all permissions
2408
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2409
+ * @permissionScope Manage eCommerce - all permissions
2410
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2411
+ * @applicableIdentity APP
2412
+ * @fqn wix.ecom.checkout_template.api.v1.CheckoutTemplateService.DeleteCheckoutTemplate
2413
+ */
2414
+ export declare function deleteCheckoutTemplate(checkoutTemplateId: string): Promise<void>;
2415
+ /**
2416
+ * Creates a query to retrieve a list of checkout templates.
2417
+ *
2418
+ * The `queryCheckoutTemplates()` function builds a query to retrieve a list of checkout templates and returns a `CheckoutTemplatesQueryBuilder` object.
2419
+ *
2420
+ * The returned object contains the query definition, which is typically used to run the query using the `find()` function.
2421
+ *
2422
+ * You can refine the query by chaining `CheckoutTemplatesQueryBuilder` functions onto the query. `CheckoutTemplatesQueryBuilder` functions enable you to sort, filter, and control the results that `queryCheckoutTemplates()` returns.
2423
+ *
2424
+ * `queryCheckoutTemplates()` runs with the following `CheckoutTemplatesQueryBuilder` default that you can override:
2425
+ * + `ascending("_id")`
2426
+ *
2427
+ * The functions that are chained to `queryCheckoutTemplates()` are applied in the order they are called. For example, if you apply `ascending("status")` and then `ascending("_id")`, the results are sorted first by the `"status"`, and then, if there are multiple results with the same `"status"`, the items are sorted by `"_id"`.
2428
+ *
2429
+ * The following `CheckoutTemplatesQueryBuilder` functions are supported for the `queryCheckoutTemplates()` function. For a full description of the checkout template object, see the object returned for the `items` property in `CheckoutTemplatesQueryResult`.
2430
+ * @public
2431
+ * @documentationMaturity preview
2432
+ * @permissionScope Manage Stores - all permissions
2433
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2434
+ * @permissionScope Manage eCommerce - all permissions
2435
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2436
+ * @permissionId ECOM.CHECKOUT_TEMPLATE_READ
2437
+ * @applicableIdentity APP
2438
+ * @fqn wix.ecom.checkout_template.api.v1.CheckoutTemplateService.QueryCheckoutTemplates
2439
+ */
2440
+ export declare function queryCheckoutTemplates(): CheckoutTemplatesQueryBuilder;
2441
+ interface QueryCursorResult {
2442
+ cursors: Cursors;
2443
+ hasNext: () => boolean;
2444
+ hasPrev: () => boolean;
2445
+ length: number;
2446
+ pageSize: number;
2447
+ }
2448
+ export interface CheckoutTemplatesQueryResult extends QueryCursorResult {
2449
+ items: CheckoutTemplate[];
2450
+ query: CheckoutTemplatesQueryBuilder;
2451
+ next: () => Promise<CheckoutTemplatesQueryResult>;
2452
+ prev: () => Promise<CheckoutTemplatesQueryResult>;
2453
+ }
2454
+ export interface CheckoutTemplatesQueryBuilder {
2455
+ /** @param propertyName - Property whose value is compared with `value`.
2456
+ * @param value - Value to compare against.
2457
+ * @documentationMaturity preview
2458
+ */
2459
+ eq: (propertyName: '_id' | 'status', value: any) => CheckoutTemplatesQueryBuilder;
2460
+ /** @param propertyName - Property whose value is compared with `value`.
2461
+ * @param value - Value to compare against.
2462
+ * @documentationMaturity preview
2463
+ */
2464
+ ne: (propertyName: '_id' | 'status', value: any) => CheckoutTemplatesQueryBuilder;
2465
+ /** @param propertyName - Property whose value is compared with `string`.
2466
+ * @param string - String to compare against. Case-insensitive.
2467
+ * @documentationMaturity preview
2468
+ */
2469
+ startsWith: (propertyName: '_id', value: string) => CheckoutTemplatesQueryBuilder;
2470
+ /** @param propertyName - Property whose value is compared with `values`.
2471
+ * @param values - List of values to compare against.
2472
+ * @documentationMaturity preview
2473
+ */
2474
+ hasSome: (propertyName: '_id' | 'status', value: any[]) => CheckoutTemplatesQueryBuilder;
2475
+ /** @documentationMaturity preview */
2476
+ in: (propertyName: '_id' | 'status', value: any) => CheckoutTemplatesQueryBuilder;
2477
+ /** @documentationMaturity preview */
2478
+ exists: (propertyName: '_id' | 'status', value: boolean) => CheckoutTemplatesQueryBuilder;
2479
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
2480
+ * @documentationMaturity preview
2481
+ */
2482
+ ascending: (...propertyNames: Array<'_id' | 'status'>) => CheckoutTemplatesQueryBuilder;
2483
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
2484
+ * @documentationMaturity preview
2485
+ */
2486
+ descending: (...propertyNames: Array<'_id' | 'status'>) => CheckoutTemplatesQueryBuilder;
2487
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
2488
+ * @documentationMaturity preview
2489
+ */
2490
+ limit: (limit: number) => CheckoutTemplatesQueryBuilder;
2491
+ /** @param cursor - A pointer to specific record
2492
+ * @documentationMaturity preview
2493
+ */
2494
+ skipTo: (cursor: string) => CheckoutTemplatesQueryBuilder;
2495
+ /** @documentationMaturity preview */
2496
+ find: () => Promise<CheckoutTemplatesQueryResult>;
2497
+ }
2498
+ /**
2499
+ * Creates a new checkout based on the checkout template.
2500
+ *
2501
+ * Before using this function, you must have a checkout template available. Create a checkout template with `createCheckoutTemplate()`.
2502
+ *
2503
+ * The customer can be directed to the new checkout using the checkout's `checkoutUrl`.
2504
+ * @param checkoutTemplateId - ID of the checkout template to use to create a checkout from.
2505
+ * @param siteId - ID of the site associated with the checkout template.
2506
+ * @public
2507
+ * @documentationMaturity preview
2508
+ * @requiredField checkoutTemplateId
2509
+ * @requiredField siteId
2510
+ * @permissionId ECOM.CHECKOUT_TEMPLATE_CREATE_CHECKOUT
2511
+ * @permissionScope Manage Stores - all permissions
2512
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2513
+ * @permissionScope Manage eCommerce - all permissions
2514
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2515
+ * @applicableIdentity APP
2516
+ * @applicableIdentity VISITOR
2517
+ * @fqn wix.ecom.checkout_template.api.v1.CheckoutTemplateService.CreateCheckoutFromTemplate
2518
+ */
2519
+ export declare function createCheckoutFromTemplate(checkoutTemplateId: string, siteId: string): Promise<CreateCheckoutFromTemplateResponse & CreateCheckoutFromTemplateResponseNonNullableFields>;
2520
+ /**
2521
+ * Creates a new checkout based on the checkout template and redirects to the new checkout page.
2522
+ *
2523
+ * Before using this function, you must have a checkout template available. Create a checkout template with `createCheckoutTemplate()`.
2524
+ *
2525
+ * To build a URL that uses this function, follow this format:
2526
+ * `https://www.wixapis.com/ecom/v1/checkout-templates/{checkoutTemplateId}/create-and-redirect-to-checkout?siteId={siteId}`
2527
+ *
2528
+ * To create a checkout but not automatically redirect to the checkout page, use `createCheckoutFromTemplate()`.
2529
+ * @param checkoutTemplateId - ID of the checkout template to use to create a checkout.
2530
+ * @param siteId - ID of the site associated with the checkout template.
2531
+ * @public
2532
+ * @documentationMaturity preview
2533
+ * @requiredField checkoutTemplateId
2534
+ * @requiredField siteId
2535
+ * @fqn wix.ecom.checkout_template.api.v1.CheckoutTemplateService.CreateAndRedirectToCheckout
2536
+ */
2537
+ export declare function createAndRedirectToCheckout(checkoutTemplateId: string, siteId: string): Promise<RawHttpResponse & RawHttpResponseNonNullableFields>;
2538
+ export {};