@wix/auto_sdk_ecom_checkout 1.0.34 → 1.0.36

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 (41) hide show
  1. package/build/cjs/src/ecom-v1-checkout-checkout.http.d.ts +31 -52
  2. package/build/cjs/src/ecom-v1-checkout-checkout.http.js +31 -52
  3. package/build/cjs/src/ecom-v1-checkout-checkout.http.js.map +1 -1
  4. package/build/cjs/src/ecom-v1-checkout-checkout.public.d.ts +36 -48
  5. package/build/cjs/src/ecom-v1-checkout-checkout.public.js.map +1 -1
  6. package/build/cjs/src/ecom-v1-checkout-checkout.types.d.ts +18 -2
  7. package/build/cjs/src/ecom-v1-checkout-checkout.types.js.map +1 -1
  8. package/build/cjs/src/ecom-v1-checkout-checkout.universal.d.ts +120 -96
  9. package/build/cjs/src/ecom-v1-checkout-checkout.universal.js +36 -48
  10. package/build/cjs/src/ecom-v1-checkout-checkout.universal.js.map +1 -1
  11. package/build/es/src/ecom-v1-checkout-checkout.http.d.ts +31 -52
  12. package/build/es/src/ecom-v1-checkout-checkout.http.js +31 -52
  13. package/build/es/src/ecom-v1-checkout-checkout.http.js.map +1 -1
  14. package/build/es/src/ecom-v1-checkout-checkout.public.d.ts +36 -48
  15. package/build/es/src/ecom-v1-checkout-checkout.public.js.map +1 -1
  16. package/build/es/src/ecom-v1-checkout-checkout.types.d.ts +18 -2
  17. package/build/es/src/ecom-v1-checkout-checkout.types.js.map +1 -1
  18. package/build/es/src/ecom-v1-checkout-checkout.universal.d.ts +120 -96
  19. package/build/es/src/ecom-v1-checkout-checkout.universal.js +36 -48
  20. package/build/es/src/ecom-v1-checkout-checkout.universal.js.map +1 -1
  21. package/build/internal/cjs/src/ecom-v1-checkout-checkout.http.d.ts +31 -52
  22. package/build/internal/cjs/src/ecom-v1-checkout-checkout.http.js +31 -52
  23. package/build/internal/cjs/src/ecom-v1-checkout-checkout.http.js.map +1 -1
  24. package/build/internal/cjs/src/ecom-v1-checkout-checkout.public.d.ts +36 -48
  25. package/build/internal/cjs/src/ecom-v1-checkout-checkout.public.js.map +1 -1
  26. package/build/internal/cjs/src/ecom-v1-checkout-checkout.types.d.ts +18 -2
  27. package/build/internal/cjs/src/ecom-v1-checkout-checkout.types.js.map +1 -1
  28. package/build/internal/cjs/src/ecom-v1-checkout-checkout.universal.d.ts +106 -101
  29. package/build/internal/cjs/src/ecom-v1-checkout-checkout.universal.js +36 -48
  30. package/build/internal/cjs/src/ecom-v1-checkout-checkout.universal.js.map +1 -1
  31. package/build/internal/es/src/ecom-v1-checkout-checkout.http.d.ts +31 -52
  32. package/build/internal/es/src/ecom-v1-checkout-checkout.http.js +31 -52
  33. package/build/internal/es/src/ecom-v1-checkout-checkout.http.js.map +1 -1
  34. package/build/internal/es/src/ecom-v1-checkout-checkout.public.d.ts +36 -48
  35. package/build/internal/es/src/ecom-v1-checkout-checkout.public.js.map +1 -1
  36. package/build/internal/es/src/ecom-v1-checkout-checkout.types.d.ts +18 -2
  37. package/build/internal/es/src/ecom-v1-checkout-checkout.types.js.map +1 -1
  38. package/build/internal/es/src/ecom-v1-checkout-checkout.universal.d.ts +106 -101
  39. package/build/internal/es/src/ecom-v1-checkout-checkout.universal.js +36 -48
  40. package/build/internal/es/src/ecom-v1-checkout-checkout.universal.js.map +1 -1
  41. package/package.json +2 -2
@@ -20,7 +20,7 @@ export interface Checkout {
20
20
  /** Shipping information. */
21
21
  shippingInfo?: ShippingInfo;
22
22
  /**
23
- * [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer.
23
+ * [Buyer note](https://support.wix.com/en/article/collecting-and-viewing-buyer-notes) left by the customer.
24
24
  * @maxLength 1000
25
25
  */
26
26
  buyerNote?: string | null;
@@ -139,7 +139,7 @@ export interface Checkout {
139
139
  */
140
140
  cartId?: string | null;
141
141
  /**
142
- * List of validation violations raised by the [Validations Custom Extension SPI](https://www.wix.com/velo/reference/spis/wix-ecom/ecom-validations/introduction).
142
+ * 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)).
143
143
  * @readonly
144
144
  */
145
145
  violations?: Violation[];
@@ -158,7 +158,9 @@ export interface Checkout {
158
158
  /**
159
159
  * Additional settings for customization of the checkout process.
160
160
  *
161
- * Custom settings can only be defined when [creating a checkout](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/createcheckout).
161
+ * > **Notes:**
162
+ * > * Custom settings can only be set when creating a checkout.
163
+ * > * 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).
162
164
  * @immutable
163
165
  */
164
166
  customSettings?: CustomSettings;
@@ -210,7 +212,7 @@ export interface LineItem {
210
212
  * @max 100000
211
213
  */
212
214
  quantity?: number;
213
- /** 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. */
215
+ /** 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. */
214
216
  catalogReference?: CatalogReference;
215
217
  /**
216
218
  * Item name.
@@ -266,7 +268,7 @@ export interface LineItem {
266
268
  */
267
269
  discount?: MultiCurrencyPrice;
268
270
  /**
269
- * Line item description lines. Used for displaying the cart, checkout and order.
271
+ * Line item description lines. Used for display purposes for the cart, checkout and order.
270
272
  * @readonly
271
273
  */
272
274
  descriptionLines?: DescriptionLine[];
@@ -296,11 +298,9 @@ export interface LineItem {
296
298
  */
297
299
  subscriptionOptionInfo?: SubscriptionOptionInfo;
298
300
  /**
299
- * Type of selected payment option for current item. Defaults to `"FULL_PAYMENT_ONLINE"`.
300
- * + `"FULL_PAYMENT_ONLINE"`: The entire payment for this item happens as part of the checkout.
301
- * + `"FULL_PAYMENT_OFFLINE"`: The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.
302
- * + `"MEMBERSHIP"`: Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.
303
- * + `"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.
301
+ * Type of selected payment option for current item.
302
+ *
303
+ * Default: `FULL_PAYMENT_ONLINE`
304
304
  * @readonly
305
305
  */
306
306
  paymentOption?: PaymentOptionTypeWithLiterals;
@@ -386,6 +386,17 @@ export interface LineItem {
386
386
  * @readonly
387
387
  */
388
388
  membersOnly?: boolean;
389
+ /**
390
+ * Modifier groups that were added to the item.
391
+ * @readonly
392
+ * @maxSize 25
393
+ */
394
+ modifierGroups?: ModifierGroup[];
395
+ /**
396
+ * Total price of all item modifiers. Included in the item price.
397
+ * @readonly
398
+ */
399
+ modifiersTotalPrice?: MultiCurrencyPrice;
389
400
  }
390
401
  /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
391
402
  export interface CatalogReference {
@@ -408,11 +419,9 @@ export interface CatalogReference {
408
419
  */
409
420
  appId?: string;
410
421
  /**
411
- * Additional item details in key:value pairs.
412
- *
413
- * Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.
422
+ * 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.
414
423
  *
415
- * For products and variants from your Wix Stores catalog, learn more about [eCommerce integration](https://www.wix.com/velo/reference/wix-stores-backend/ecommerce-integration).
424
+ * 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)).
416
425
  */
417
426
  options?: Record<string, any> | null;
418
427
  }
@@ -637,7 +646,7 @@ export declare enum ItemAvailabilityStatus {
637
646
  /** @enumType */
638
647
  export type ItemAvailabilityStatusWithLiterals = ItemAvailabilityStatus | 'AVAILABLE' | 'NOT_FOUND' | 'NOT_AVAILABLE' | 'PARTIALLY_AVAILABLE';
639
648
  export interface PhysicalProperties {
640
- /** Line item weight. Measurement unit (`"KG"` or `"LB"`) is taken from `order.weightUnit`. */
649
+ /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
641
650
  weight?: number | null;
642
651
  /**
643
652
  * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).
@@ -933,7 +942,7 @@ export interface ModifierGroup {
933
942
  /**
934
943
  * List of modifiers in this group.
935
944
  * @minSize 1
936
- * @maxSize 10
945
+ * @maxSize 25
937
946
  */
938
947
  modifiers?: ItemModifier[];
939
948
  }
@@ -1327,19 +1336,19 @@ export interface OtherCharge {
1327
1336
  }
1328
1337
  export interface BuyerInfo extends BuyerInfoIdOneOf {
1329
1338
  /**
1330
- * Visitor ID - if the buyer is **not** a site member.
1339
+ * Visitor ID (if site visitor is **not** a member).
1331
1340
  * @format GUID
1332
1341
  * @readonly
1333
1342
  */
1334
1343
  visitorId?: string;
1335
1344
  /**
1336
- * Member ID - If the buyer is a site member.
1345
+ * Member ID (if site visitor is a site member).
1337
1346
  * @format GUID
1338
1347
  * @readonly
1339
1348
  */
1340
1349
  memberId?: string;
1341
1350
  /**
1342
- * Contact ID. For more information, see the Contacts API.
1351
+ * Contact ID. Auto-created if one does not yet exist. For more information, see the Contacts API.
1343
1352
  * @format GUID
1344
1353
  * @readonly
1345
1354
  */
@@ -1353,13 +1362,13 @@ export interface BuyerInfo extends BuyerInfoIdOneOf {
1353
1362
  /** @oneof */
1354
1363
  export interface BuyerInfoIdOneOf {
1355
1364
  /**
1356
- * Visitor ID - if the buyer is **not** a site member.
1365
+ * Visitor ID (if site visitor is **not** a member).
1357
1366
  * @format GUID
1358
1367
  * @readonly
1359
1368
  */
1360
1369
  visitorId?: string;
1361
1370
  /**
1362
- * Member ID - If the buyer is a site member.
1371
+ * Member ID (if site visitor is a site member).
1363
1372
  * @format GUID
1364
1373
  * @readonly
1365
1374
  */
@@ -1546,7 +1555,7 @@ export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
1546
1555
  /** Discount type. */
1547
1556
  discountType?: DiscountTypeWithLiterals;
1548
1557
  /**
1549
- * IDs of the line items the discount applies to.
1558
+ * IDs of line items the discount applies to.
1550
1559
  * @format GUID
1551
1560
  * @deprecated IDs of line items the discount applies to.
1552
1561
  * @replacedBy line_items_discounts
@@ -1862,7 +1871,7 @@ export interface Membership {
1862
1871
  /** The name of this membership. */
1863
1872
  name?: MembershipName;
1864
1873
  /**
1865
- * Line item IDs which are "paid for" by this membership.
1874
+ * Line item IDs which are "paid" for by this membership.
1866
1875
  * @minSize 1
1867
1876
  * @maxSize 300
1868
1877
  * @minLength 1
@@ -2166,7 +2175,7 @@ export interface UpdatedCheckoutMessage {
2166
2175
  export interface CreateCheckoutRequest {
2167
2176
  /** Checkout information. */
2168
2177
  checkoutInfo?: Checkout;
2169
- /** The code of an existing coupon to apply to checkout. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */
2178
+ /** Coupon code. */
2170
2179
  couponCode?: string | null;
2171
2180
  /**
2172
2181
  * Catalog line items to add to the checkout.
@@ -2194,7 +2203,9 @@ export interface CreateCheckoutRequest {
2194
2203
  /**
2195
2204
  * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
2196
2205
  *
2197
- * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
2206
+ * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used in the Abandoned Checkout API
2207
+ * to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a
2208
+ * standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
2198
2209
  * @maxLength 1000
2199
2210
  */
2200
2211
  overrideCheckoutUrl?: string | null;
@@ -2210,7 +2221,7 @@ export interface CustomLineItem {
2210
2221
  */
2211
2222
  quantity?: number;
2212
2223
  /**
2213
- * Custom line item price. For security reasons, the `price` field should come from backend Velo code, and not be passed from the frontend.
2224
+ * Custom line item price. For security reasons, the `price` field should come from backend code, and not be passed from the frontend.
2214
2225
  * @format DECIMAL_VALUE
2215
2226
  * @decimalValue options { gte:0, lte:1000000000000000 }
2216
2227
  */
@@ -2218,7 +2229,7 @@ export interface CustomLineItem {
2218
2229
  /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */
2219
2230
  priceDescription?: PriceDescription;
2220
2231
  /**
2221
- * Custom line item description lines. Used for displaying the cart, checkout and order.
2232
+ * Custom line item description lines. Used for display purposes for the cart, checkout and order.
2222
2233
  * @maxSize 10
2223
2234
  */
2224
2235
  descriptionLines?: DescriptionLine[];
@@ -2325,6 +2336,11 @@ export interface CustomLineItem {
2325
2336
  membersOnly?: boolean;
2326
2337
  /** Address to use for tax calculation purposes. */
2327
2338
  taxableAddress?: TaxableAddress;
2339
+ /**
2340
+ * Modifier groups that were added to the item.
2341
+ * @maxSize 25
2342
+ */
2343
+ modifierGroups?: V1ModifierGroup[];
2328
2344
  }
2329
2345
  export interface V1ModifierGroup {
2330
2346
  /**
@@ -2338,7 +2354,7 @@ export interface V1ModifierGroup {
2338
2354
  /**
2339
2355
  * List of modifiers in this group.
2340
2356
  * @minSize 1
2341
- * @maxSize 10
2357
+ * @maxSize 25
2342
2358
  */
2343
2359
  modifiers?: V1ItemModifier[];
2344
2360
  }
@@ -2372,7 +2388,7 @@ export interface MerchantDiscountInput {
2372
2388
  */
2373
2389
  amount?: string;
2374
2390
  /**
2375
- * IDs of the line items the discount applies to.
2391
+ * IDs of line items the discount applies to.
2376
2392
  * @format GUID
2377
2393
  * @maxSize 300
2378
2394
  */
@@ -2449,14 +2465,20 @@ export interface GetCheckoutURLResponse {
2449
2465
  export interface UpdateCheckoutRequest {
2450
2466
  /** Checkout information. */
2451
2467
  checkout: Checkout;
2452
- /** The code of an existing coupon to apply to checkout. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */
2468
+ /**
2469
+ * Coupon code.
2470
+ *
2471
+ * The checkout can only hold 1 `couponCode` at a time. If an additional `couponCode` is added, it will override the existing `couponCode`.
2472
+ */
2453
2473
  couponCode?: string | null;
2454
2474
  /** Gift card code. */
2455
2475
  giftCardCode?: string | null;
2456
2476
  /**
2457
2477
  * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
2458
2478
  *
2459
- * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
2479
+ * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used in the Abandoned Checkout API
2480
+ * to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a
2481
+ * standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
2460
2482
  * @maxLength 1000
2461
2483
  */
2462
2484
  overrideCheckoutUrl?: string | null;
@@ -2543,6 +2565,10 @@ export interface RemoveLineItemsRequest {
2543
2565
  _id: string;
2544
2566
  /**
2545
2567
  * IDs of the line items to remove from the checkout.
2568
+ *
2569
+ * To find the IDs of the checkout line items you'd like to remove,
2570
+ * pass the checkout ID to Get Checkout and look for the IDs under
2571
+ * `lineItems`.
2546
2572
  * @format GUID
2547
2573
  * @minSize 1
2548
2574
  * @maxSize 300
@@ -2566,7 +2592,7 @@ export interface CreateOrderRequest {
2566
2592
  }
2567
2593
  export interface CreateOrderResponse extends CreateOrderResponseIdOneOf {
2568
2594
  /**
2569
- * ID of the newly created order.
2595
+ * ID of newly created order.
2570
2596
  * @format GUID
2571
2597
  */
2572
2598
  orderId?: string;
@@ -2579,10 +2605,11 @@ export interface CreateOrderResponse extends CreateOrderResponseIdOneOf {
2579
2605
  * Payment gateway order ID.
2580
2606
  *
2581
2607
  * For online orders, pass this value as the `paymentId` parameter to the Wix Pay [`startPayment()`](https://www.wix.com/velo/reference/wix-pay-frontend/startpayment) function so your customer can pay for the order.
2608
+ * `paymentGatewayOrderId` will be returned if money needs to be charged.
2582
2609
  *
2583
- * This field will be returned if money needs to be charged. In some cases, money cannot be charged:
2584
- * + When the total price (the `priceSummary.total.amount` field in the checkout/order objects) is 0. For example, in the case of a free item or an item with a 100% discount.
2585
- * + If the total price is not 0, but the payment is covered by alternative payment methods, such as a gift card.
2610
+ * In some cases, money cannot be charged:
2611
+ * + When the total price (the `priceSummary.total.amount` field in the checkout/order objects) is `0`. For example, in the case of a free item or an item with a 100% discount.
2612
+ * + If the total price is not `0`, but the payment is covered by alternative payment methods, such as a gift card.
2586
2613
  */
2587
2614
  paymentGatewayOrderId?: string | null;
2588
2615
  }
@@ -2651,12 +2678,11 @@ export interface CreateOrderAndChargeResponse extends CreateOrderAndChargeRespon
2651
2678
  /** Payment response token. */
2652
2679
  paymentResponseToken?: string | null;
2653
2680
  /**
2654
- * For online orders, send this value as a parameter to the Wix Pay [`startPayment()`](https://www.wix.com/velo/reference/wix-pay/startpayment) function to enable your buyer to pay for the order.
2655
- * `paymentGatewayOrderId` will be returned if money needs to be charged.
2656
- *
2657
- * In some cases, money should not be charged:
2658
- * + If the total price is 0. For example, in the case of a free item or an item with 100% discount.
2659
- * + If the total price is not 0, but the payment is covered by alternative payment methods, such as a gift card.
2681
+ * The payment gateway is cashier.
2682
+ * payment_gateway_order_id will be returned given that money was charged.
2683
+ * In some cases, money will not be charged:
2684
+ * If the total price is 0 - For example, could be a free item or a an item with 100% discount
2685
+ * If the total price is not 0, but the payment is covered by alternative payment methods such as gift card
2660
2686
  */
2661
2687
  paymentGatewayOrderId?: string | null;
2662
2688
  }
@@ -3653,14 +3679,9 @@ type CheckoutNonNullablePaths = `lineItems` | `lineItems.${number}.quantity` | `
3653
3679
  /**
3654
3680
  * Creates a checkout.
3655
3681
  *
3682
+ * A checkout must include at least 1 item in `lineItems` or `customLineItems`.
3656
3683
  *
3657
- * The `createCheckout()` function returns a Promise that resolves to the new checkout when it's created.
3658
- *
3659
- * > **Notes:**
3660
- * > + Checkout must include at least 1 item in the `options.lineItems` array.
3661
- * > + `options.channelType` is required.
3662
- * > + If `_id` for `options.lineItems` is added, make sure that each `_id` is unique.
3663
- * > + If `options.checkoutInfo.customFields` are added, then `options.checkoutInfo.customFields.value` is required.
3684
+ * If passing `checkoutInfo.customFields`, then `checkoutInfo.customFields.value` is a required field.
3664
3685
  * @public
3665
3686
  * @requiredField options.channelType
3666
3687
  * @requiredField options.checkoutInfo.customFields.value
@@ -3702,14 +3723,14 @@ type CheckoutNonNullablePaths = `lineItems` | `lineItems.${number}.quantity` | `
3702
3723
  * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3703
3724
  * @applicableIdentity APP
3704
3725
  * @applicableIdentity VISITOR
3705
- * @returns Fulfilled - the newly created checkout.
3726
+ * @returns Newly created checkout.
3706
3727
  * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.CreateCheckout
3707
3728
  */
3708
3729
  export declare function createCheckout(options?: NonNullablePaths<CreateCheckoutOptions, `channelType` | `checkoutInfo.customFields.${number}.value` | `checkoutInfo.membershipOptions.selectedMemberships.memberships.${number}._id` | `checkoutInfo.membershipOptions.selectedMemberships.memberships.${number}.appId` | `checkoutInfo.membershipOptions.selectedMemberships.memberships.${number}.lineItemIds` | `customLineItems.${number}.descriptionLines` | `customLineItems.${number}.descriptionLines.${number}.name` | `customLineItems.${number}.itemType` | `customLineItems.${number}.price` | `customLineItems.${number}.productName` | `customLineItems.${number}.quantity` | `lineItems.${number}.catalogReference` | `lineItems.${number}.catalogReference.appId` | `lineItems.${number}.catalogReference.catalogItemId` | `lineItems.${number}.quantity`>): Promise<NonNullablePaths<Checkout, CheckoutNonNullablePaths>>;
3709
3730
  export interface CreateCheckoutOptions {
3710
3731
  /** Checkout information. */
3711
3732
  checkoutInfo?: Checkout;
3712
- /** The code of an existing coupon to apply to checkout. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */
3733
+ /** Coupon code. */
3713
3734
  couponCode?: string | null;
3714
3735
  /**
3715
3736
  * Catalog line items to add to the checkout.
@@ -3737,16 +3758,15 @@ export interface CreateCheckoutOptions {
3737
3758
  /**
3738
3759
  * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
3739
3760
  *
3740
- * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
3761
+ * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used in the Abandoned Checkout API
3762
+ * to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a
3763
+ * standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
3741
3764
  * @maxLength 1000
3742
3765
  */
3743
3766
  overrideCheckoutUrl?: string | null;
3744
3767
  }
3745
3768
  /**
3746
3769
  * Retrieves a checkout.
3747
- *
3748
- *
3749
- * The `getCheckout()` function returns a Promise that resolves when the specified checkout is retrieved.
3750
3770
  * @param _id - Checkout ID.
3751
3771
  * @public
3752
3772
  * @requiredField _id
@@ -3769,7 +3789,7 @@ export interface CreateCheckoutOptions {
3769
3789
  * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3770
3790
  * @applicableIdentity APP
3771
3791
  * @applicableIdentity VISITOR
3772
- * @returns Fulfilled - the requested checkout.
3792
+ * @returns Retrieved checkout.
3773
3793
  * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckout
3774
3794
  */
3775
3795
  export declare function getCheckout(_id: string): Promise<NonNullablePaths<Checkout, CheckoutNonNullablePaths>>;
@@ -3835,8 +3855,15 @@ export declare function getCheckoutUrl(_id: string): Promise<NonNullablePaths<Ge
3835
3855
  /**
3836
3856
  * Updates a checkout.
3837
3857
  *
3858
+ * Use this method to update checkout fields such as billing and shipping info, or to add a coupon code or gift card.
3838
3859
  *
3839
- * The `updateCheckout()` function returns a Promise that resolves to the updated checkout when the specified properties are updated.
3860
+ * To update a checkout's `lineItems`, `completed` status, or to remove coupons and gift cards, see these methods:
3861
+ * + Add to Checkout: Add line items to the checkout.
3862
+ * + Update Line Items Quantity: Update the quantity of 1 or more line items in the checkout.
3863
+ * + Remove Line Items: Remove a line item from the checkout.
3864
+ * + Mark Checkout As Completed: To update `completed` to `true` if the checkout was completed through a non-Wix orders or payments system.
3865
+ * + Remove Coupon: To remove an applied coupon from the checkout.
3866
+ * + Remove Gift Card: To remove an applied gift card from the checkout.
3840
3867
  *
3841
3868
  * >**Notes:**
3842
3869
  * > + If nothing is passed in the request, the call will fail.
@@ -3908,7 +3935,7 @@ export interface UpdateCheckout {
3908
3935
  /** Shipping information. */
3909
3936
  shippingInfo?: ShippingInfo;
3910
3937
  /**
3911
- * [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer.
3938
+ * [Buyer note](https://support.wix.com/en/article/collecting-and-viewing-buyer-notes) left by the customer.
3912
3939
  * @maxLength 1000
3913
3940
  */
3914
3941
  buyerNote?: string | null;
@@ -4027,7 +4054,7 @@ export interface UpdateCheckout {
4027
4054
  */
4028
4055
  cartId?: string | null;
4029
4056
  /**
4030
- * List of validation violations raised by the [Validations Custom Extension SPI](https://www.wix.com/velo/reference/spis/wix-ecom/ecom-validations/introduction).
4057
+ * 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)).
4031
4058
  * @readonly
4032
4059
  */
4033
4060
  violations?: Violation[];
@@ -4046,7 +4073,9 @@ export interface UpdateCheckout {
4046
4073
  /**
4047
4074
  * Additional settings for customization of the checkout process.
4048
4075
  *
4049
- * Custom settings can only be defined when [creating a checkout](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/createcheckout).
4076
+ * > **Notes:**
4077
+ * > * Custom settings can only be set when creating a checkout.
4078
+ * > * 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).
4050
4079
  * @immutable
4051
4080
  */
4052
4081
  customSettings?: CustomSettings;
@@ -4083,14 +4112,20 @@ export interface UpdateCheckout {
4083
4112
  paymentCurrency?: string;
4084
4113
  }
4085
4114
  export interface UpdateCheckoutOptions {
4086
- /** The code of an existing coupon to apply to checkout. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */
4115
+ /**
4116
+ * Coupon code.
4117
+ *
4118
+ * The checkout can only hold 1 `couponCode` at a time. If an additional `couponCode` is added, it will override the existing `couponCode`.
4119
+ */
4087
4120
  couponCode?: string | null;
4088
4121
  /** Gift card code. */
4089
4122
  giftCardCode?: string | null;
4090
4123
  /**
4091
4124
  * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
4092
4125
  *
4093
- * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
4126
+ * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used in the Abandoned Checkout API
4127
+ * to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a
4128
+ * standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
4094
4129
  * @maxLength 1000
4095
4130
  */
4096
4131
  overrideCheckoutUrl?: string | null;
@@ -4110,11 +4145,6 @@ export interface UpdateCheckoutOptions {
4110
4145
  }
4111
4146
  /**
4112
4147
  * Removes the coupon from a specified checkout.
4113
- *
4114
- *
4115
- * The `removeCoupon()` function returns a Promise that resolves to the updated checkout when the coupon is removed from the specified checkout.
4116
- *
4117
- * >**Note:** A checkout can only hold 1 coupon.
4118
4148
  * @param _id - ID of the checkout to remove the coupon from.
4119
4149
  * @public
4120
4150
  * @requiredField _id
@@ -4139,10 +4169,7 @@ export declare function removeCoupon(_id: string): Promise<NonNullablePaths<Remo
4139
4169
  /**
4140
4170
  * Removes the gift card from a specified checkout.
4141
4171
  *
4142
- *
4143
- * The `removeGiftCard()` function returns a Promise that resolves to the updated checkout when the gift card is removed from the specified checkout.
4144
- *
4145
- * >**Note:** A checkout can only hold 1 gift card.
4172
+ * A checkout can only hold 1 gift card.
4146
4173
  * @param _id - ID of the checkout to remove the gift card from.
4147
4174
  * @public
4148
4175
  * @requiredField _id
@@ -4193,9 +4220,8 @@ export declare function removeOverrideCheckoutUrl(_id: string): Promise<NonNulla
4193
4220
  /**
4194
4221
  * Adds catalog line items and/or custom line items to a checkout.
4195
4222
  *
4196
- *
4197
- * The `addToCheckout()` function returns a Promise that resolves to the updated checkout when the specified items have been added.
4198
- * > **Note:** When adding catalog items, `options.lineItems.catalogReference` is required.
4223
+ * When adding catalog ([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)) items
4224
+ * to a checkout, the `lineItems.catalogReference.appId` and `lineItems.catalogReference.catalogItemId` fields are required.
4199
4225
  * @param _id - Checkout ID.
4200
4226
  * @public
4201
4227
  * @requiredField _id
@@ -4255,15 +4281,15 @@ export interface AddToCheckoutOptions {
4255
4281
  }
4256
4282
  /**
4257
4283
  * Removes line items from the specified checkout.
4258
- *
4259
- *
4260
- * The `removeLineItems()` function returns a Promise that resolves to the updated checkout when the line items are removed from the specified checkout.
4261
4284
  * @param _id - ID of the checkout to remove line items from.
4285
+ * @param lineItemIds - IDs of the line items to remove from the checkout.
4286
+ *
4287
+ * To find the IDs of the checkout line items you'd like to remove,
4288
+ * pass the checkout ID to Get Checkout and look for the IDs under
4289
+ * `lineItems`.
4262
4290
  * @public
4263
4291
  * @requiredField _id
4264
4292
  * @requiredField lineItemIds
4265
- * @param lineItemIds - IDs of the line items to be removed.
4266
- * To find the IDs of the checkout line items you'd like to remove, pass the `checkout._id` to [getCheckout()](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/getcheckout) and look for the IDs under `lineItems` and/or `customLineItems`.
4267
4293
  * @permissionId ECOM.MODIFY_CHECKOUTS
4268
4294
  * @permissionScope Manage Stores - all permissions
4269
4295
  * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
@@ -4285,20 +4311,17 @@ export declare function removeLineItems(_id: string, lineItemIds: string[]): Pro
4285
4311
  /**
4286
4312
  * Creates an order from a specified checkout.
4287
4313
  *
4288
- * The `createOrder()` function returns a Promise that resolves to the new order's ID and `paymentGatewayOrderID` when the order is created.
4289
- * Pass the `paymentGatewayOrderId` as the `paymentId` param to the [`startPayment()`](https://www.wix.com/velo/reference/wix-pay-frontend/startpayment) function to allow a customer to pay for their order.
4290
- *
4291
- * > **Note:** The following requirements must be met for an order to be created from a checkout.
4292
- * > + A checkout cannot have calculation errors. Pass the `checkout._id` to [Get Checkout](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/getcheckout) and take a look at the `calculationErrors` field.
4293
- * > + A checkout must have at least 1 line item.
4294
- * > + All of the line Items have an `availability.status` of `"AVAILABLE"` or `"PARTIALLY_AVAILABLE"`.
4295
- * > + If there is a payment to be made, meaning that `priceSummary.total` is greater than 0, the `billingInfo.address` field must be provided.
4296
- * > + When a checkout has line items to be shipped, the `shippingInfo.shippingDestination.address` and `shippingInfo.selectedCarrierServiceOption` fields must be provided.
4297
- * > + When a checkout has line items for pickup, the `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails` field must be provided.
4314
+ * For an order to be created from a checkout, the following requirements must be met:
4315
+ * + A checkout cannot have calculation errors. Pass the checkout ID to Get Checkout and review the `calculationErrors` field.
4316
+ * + A checkout must have at least 1 line item or custom line item.
4317
+ * + All of the line Items have an `availability.status` of `"AVAILABLE"` or `"PARTIALLY_AVAILABLE"`.
4318
+ * + If there is a payment to be made, meaning that `priceSummary.total` is greater than `0`, the `billingInfo.address` field are required.
4319
+ * + When a checkout has line items to be shipped, the `shippingInfo.shippingDestination.address` and `shippingInfo.selectedCarrierServiceOption` fields are required.
4320
+ * + When a checkout has line items for pickup, the `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails` field are required.
4298
4321
  * @param _id - Checkout ID.
4299
4322
  * @public
4300
4323
  * @requiredField _id
4301
- * @param options - Further order creation options.
4324
+ * @param options - Additional order creation options.
4302
4325
  * @permissionId ECOM.CREATE_ORDER_FROM_CHECKOUT
4303
4326
  * @permissionScope Manage Stores - all permissions
4304
4327
  * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
@@ -4352,10 +4375,11 @@ export interface CreateOrderAndChargeOptions {
4352
4375
  */
4353
4376
  export declare function markCheckoutAsCompletedAndRedirectToUrl(token: string): Promise<NonNullablePaths<RawHttpResponse, `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`>>;
4354
4377
  /**
4355
- * Marks a checkout as completed - `checkout.complete` boolean is set to `true`.
4356
- *
4378
+ * Sets `completed` to `true` to mark a checkout as completed.
4357
4379
  *
4358
- * The `markCheckoutAsCompleted()` function returns a Promise that resolves when the specified checkout is marked as completed.
4380
+ * When an order is completed through Wix, the `completed` field in the associated checkout object
4381
+ * will automatically be updated to `true`. If an order is completed through a separate system,
4382
+ * use this method to manually mark the checkout as completed.
4359
4383
  * @param _id - Checkout ID.
4360
4384
  * @public
4361
4385
  * @requiredField _id
@@ -4378,11 +4402,11 @@ export declare function markCheckoutAsCompleted(_id: string): Promise<void>;
4378
4402
  /**
4379
4403
  * Updates the quantity of one or more line items in a checkout.
4380
4404
  *
4381
- * This endpoint is only for updating the quantity of line items. To entirely remove a line item from
4382
- * the checkout, use [`removeLineItems()`](#removelineitems).
4383
- * To add a new line item to the checkout, use [`addToCheckout()`](#addtocheckout).
4405
+ * This method is only for updating the quantity of line items. To entirely remove a line item from
4406
+ * the checkout, use the Remove Line Items method.
4407
+ * To add a new line item to the checkout, use the Add to Checkout method.
4384
4408
  *
4385
- * This endpoint checks the amount of stock remaining for this line item. If the specified `quantity`
4409
+ * This method checks the amount of stock remaining for this line item. If the specified `quantity`
4386
4410
  * is greater than the remaining stock, then the `quantity` returned in the response is the total amount
4387
4411
  * of remaining stock.
4388
4412
  * @param _id - Checkout ID.