@wix/auto_sdk_ecom_checkout-templates 1.0.36 → 1.0.37

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