@wix/auto_sdk_ecom_checkout 1.0.35 → 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 (33) 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.universal.d.ts +102 -94
  7. package/build/cjs/src/ecom-v1-checkout-checkout.universal.js +36 -48
  8. package/build/cjs/src/ecom-v1-checkout-checkout.universal.js.map +1 -1
  9. package/build/es/src/ecom-v1-checkout-checkout.http.d.ts +31 -52
  10. package/build/es/src/ecom-v1-checkout-checkout.http.js +31 -52
  11. package/build/es/src/ecom-v1-checkout-checkout.http.js.map +1 -1
  12. package/build/es/src/ecom-v1-checkout-checkout.public.d.ts +36 -48
  13. package/build/es/src/ecom-v1-checkout-checkout.public.js.map +1 -1
  14. package/build/es/src/ecom-v1-checkout-checkout.universal.d.ts +102 -94
  15. package/build/es/src/ecom-v1-checkout-checkout.universal.js +36 -48
  16. package/build/es/src/ecom-v1-checkout-checkout.universal.js.map +1 -1
  17. package/build/internal/cjs/src/ecom-v1-checkout-checkout.http.d.ts +31 -52
  18. package/build/internal/cjs/src/ecom-v1-checkout-checkout.http.js +31 -52
  19. package/build/internal/cjs/src/ecom-v1-checkout-checkout.http.js.map +1 -1
  20. package/build/internal/cjs/src/ecom-v1-checkout-checkout.public.d.ts +36 -48
  21. package/build/internal/cjs/src/ecom-v1-checkout-checkout.public.js.map +1 -1
  22. package/build/internal/cjs/src/ecom-v1-checkout-checkout.universal.d.ts +102 -94
  23. package/build/internal/cjs/src/ecom-v1-checkout-checkout.universal.js +36 -48
  24. package/build/internal/cjs/src/ecom-v1-checkout-checkout.universal.js.map +1 -1
  25. package/build/internal/es/src/ecom-v1-checkout-checkout.http.d.ts +31 -52
  26. package/build/internal/es/src/ecom-v1-checkout-checkout.http.js +31 -52
  27. package/build/internal/es/src/ecom-v1-checkout-checkout.http.js.map +1 -1
  28. package/build/internal/es/src/ecom-v1-checkout-checkout.public.d.ts +36 -48
  29. package/build/internal/es/src/ecom-v1-checkout-checkout.public.js.map +1 -1
  30. package/build/internal/es/src/ecom-v1-checkout-checkout.universal.d.ts +102 -94
  31. package/build/internal/es/src/ecom-v1-checkout-checkout.universal.js +36 -48
  32. package/build/internal/es/src/ecom-v1-checkout-checkout.universal.js.map +1 -1
  33. 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;
@@ -419,11 +419,9 @@ export interface CatalogReference {
419
419
  */
420
420
  appId?: string;
421
421
  /**
422
- * Additional item details in key:value pairs.
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.
423
423
  *
424
- * Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.
425
- *
426
- * 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)).
427
425
  */
428
426
  options?: Record<string, any> | null;
429
427
  }
@@ -648,7 +646,7 @@ export declare enum ItemAvailabilityStatus {
648
646
  /** @enumType */
649
647
  export type ItemAvailabilityStatusWithLiterals = ItemAvailabilityStatus | 'AVAILABLE' | 'NOT_FOUND' | 'NOT_AVAILABLE' | 'PARTIALLY_AVAILABLE';
650
648
  export interface PhysicalProperties {
651
- /** 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. */
652
650
  weight?: number | null;
653
651
  /**
654
652
  * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).
@@ -1338,19 +1336,19 @@ export interface OtherCharge {
1338
1336
  }
1339
1337
  export interface BuyerInfo extends BuyerInfoIdOneOf {
1340
1338
  /**
1341
- * Visitor ID - if the buyer is **not** a site member.
1339
+ * Visitor ID (if site visitor is **not** a member).
1342
1340
  * @format GUID
1343
1341
  * @readonly
1344
1342
  */
1345
1343
  visitorId?: string;
1346
1344
  /**
1347
- * Member ID - If the buyer is a site member.
1345
+ * Member ID (if site visitor is a site member).
1348
1346
  * @format GUID
1349
1347
  * @readonly
1350
1348
  */
1351
1349
  memberId?: string;
1352
1350
  /**
1353
- * 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.
1354
1352
  * @format GUID
1355
1353
  * @readonly
1356
1354
  */
@@ -1364,13 +1362,13 @@ export interface BuyerInfo extends BuyerInfoIdOneOf {
1364
1362
  /** @oneof */
1365
1363
  export interface BuyerInfoIdOneOf {
1366
1364
  /**
1367
- * Visitor ID - if the buyer is **not** a site member.
1365
+ * Visitor ID (if site visitor is **not** a member).
1368
1366
  * @format GUID
1369
1367
  * @readonly
1370
1368
  */
1371
1369
  visitorId?: string;
1372
1370
  /**
1373
- * Member ID - If the buyer is a site member.
1371
+ * Member ID (if site visitor is a site member).
1374
1372
  * @format GUID
1375
1373
  * @readonly
1376
1374
  */
@@ -1557,7 +1555,7 @@ export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
1557
1555
  /** Discount type. */
1558
1556
  discountType?: DiscountTypeWithLiterals;
1559
1557
  /**
1560
- * IDs of the line items the discount applies to.
1558
+ * IDs of line items the discount applies to.
1561
1559
  * @format GUID
1562
1560
  * @deprecated IDs of line items the discount applies to.
1563
1561
  * @replacedBy line_items_discounts
@@ -1873,7 +1871,7 @@ export interface Membership {
1873
1871
  /** The name of this membership. */
1874
1872
  name?: MembershipName;
1875
1873
  /**
1876
- * Line item IDs which are "paid for" by this membership.
1874
+ * Line item IDs which are "paid" for by this membership.
1877
1875
  * @minSize 1
1878
1876
  * @maxSize 300
1879
1877
  * @minLength 1
@@ -2177,7 +2175,7 @@ export interface UpdatedCheckoutMessage {
2177
2175
  export interface CreateCheckoutRequest {
2178
2176
  /** Checkout information. */
2179
2177
  checkoutInfo?: Checkout;
2180
- /** 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. */
2181
2179
  couponCode?: string | null;
2182
2180
  /**
2183
2181
  * Catalog line items to add to the checkout.
@@ -2205,7 +2203,9 @@ export interface CreateCheckoutRequest {
2205
2203
  /**
2206
2204
  * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
2207
2205
  *
2208
- * 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`.
2209
2209
  * @maxLength 1000
2210
2210
  */
2211
2211
  overrideCheckoutUrl?: string | null;
@@ -2221,7 +2221,7 @@ export interface CustomLineItem {
2221
2221
  */
2222
2222
  quantity?: number;
2223
2223
  /**
2224
- * 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.
2225
2225
  * @format DECIMAL_VALUE
2226
2226
  * @decimalValue options { gte:0, lte:1000000000000000 }
2227
2227
  */
@@ -2229,7 +2229,7 @@ export interface CustomLineItem {
2229
2229
  /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */
2230
2230
  priceDescription?: PriceDescription;
2231
2231
  /**
2232
- * 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.
2233
2233
  * @maxSize 10
2234
2234
  */
2235
2235
  descriptionLines?: DescriptionLine[];
@@ -2388,7 +2388,7 @@ export interface MerchantDiscountInput {
2388
2388
  */
2389
2389
  amount?: string;
2390
2390
  /**
2391
- * IDs of the line items the discount applies to.
2391
+ * IDs of line items the discount applies to.
2392
2392
  * @format GUID
2393
2393
  * @maxSize 300
2394
2394
  */
@@ -2465,14 +2465,20 @@ export interface GetCheckoutURLResponse {
2465
2465
  export interface UpdateCheckoutRequest {
2466
2466
  /** Checkout information. */
2467
2467
  checkout: Checkout;
2468
- /** 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
+ */
2469
2473
  couponCode?: string | null;
2470
2474
  /** Gift card code. */
2471
2475
  giftCardCode?: string | null;
2472
2476
  /**
2473
2477
  * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
2474
2478
  *
2475
- * 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`.
2476
2482
  * @maxLength 1000
2477
2483
  */
2478
2484
  overrideCheckoutUrl?: string | null;
@@ -2559,6 +2565,10 @@ export interface RemoveLineItemsRequest {
2559
2565
  _id: string;
2560
2566
  /**
2561
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`.
2562
2572
  * @format GUID
2563
2573
  * @minSize 1
2564
2574
  * @maxSize 300
@@ -2582,7 +2592,7 @@ export interface CreateOrderRequest {
2582
2592
  }
2583
2593
  export interface CreateOrderResponse extends CreateOrderResponseIdOneOf {
2584
2594
  /**
2585
- * ID of the newly created order.
2595
+ * ID of newly created order.
2586
2596
  * @format GUID
2587
2597
  */
2588
2598
  orderId?: string;
@@ -2595,10 +2605,11 @@ export interface CreateOrderResponse extends CreateOrderResponseIdOneOf {
2595
2605
  * Payment gateway order ID.
2596
2606
  *
2597
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.
2598
2609
  *
2599
- * This field will be returned if money needs to be charged. In some cases, money cannot be charged:
2600
- * + 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.
2601
- * + 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.
2602
2613
  */
2603
2614
  paymentGatewayOrderId?: string | null;
2604
2615
  }
@@ -2667,12 +2678,11 @@ export interface CreateOrderAndChargeResponse extends CreateOrderAndChargeRespon
2667
2678
  /** Payment response token. */
2668
2679
  paymentResponseToken?: string | null;
2669
2680
  /**
2670
- * 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.
2671
- * `paymentGatewayOrderId` will be returned if money needs to be charged.
2672
- *
2673
- * In some cases, money should not be charged:
2674
- * + If the total price is 0. For example, in the case of a free item or an item with 100% discount.
2675
- * + 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
2676
2686
  */
2677
2687
  paymentGatewayOrderId?: string | null;
2678
2688
  }
@@ -3669,14 +3679,9 @@ type CheckoutNonNullablePaths = `lineItems` | `lineItems.${number}.quantity` | `
3669
3679
  /**
3670
3680
  * Creates a checkout.
3671
3681
  *
3682
+ * A checkout must include at least 1 item in `lineItems` or `customLineItems`.
3672
3683
  *
3673
- * The `createCheckout()` function returns a Promise that resolves to the new checkout when it's created.
3674
- *
3675
- * > **Notes:**
3676
- * > + Checkout must include at least 1 item in the `options.lineItems` array.
3677
- * > + `options.channelType` is required.
3678
- * > + If `_id` for `options.lineItems` is added, make sure that each `_id` is unique.
3679
- * > + 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.
3680
3685
  * @public
3681
3686
  * @requiredField options.channelType
3682
3687
  * @requiredField options.checkoutInfo.customFields.value
@@ -3718,14 +3723,14 @@ type CheckoutNonNullablePaths = `lineItems` | `lineItems.${number}.quantity` | `
3718
3723
  * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
3719
3724
  * @applicableIdentity APP
3720
3725
  * @applicableIdentity VISITOR
3721
- * @returns Fulfilled - the newly created checkout.
3726
+ * @returns Newly created checkout.
3722
3727
  * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.CreateCheckout
3723
3728
  */
3724
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>>;
3725
3730
  export interface CreateCheckoutOptions {
3726
3731
  /** Checkout information. */
3727
3732
  checkoutInfo?: Checkout;
3728
- /** 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. */
3729
3734
  couponCode?: string | null;
3730
3735
  /**
3731
3736
  * Catalog line items to add to the checkout.
@@ -3753,16 +3758,15 @@ export interface CreateCheckoutOptions {
3753
3758
  /**
3754
3759
  * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
3755
3760
  *
3756
- * 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`.
3757
3764
  * @maxLength 1000
3758
3765
  */
3759
3766
  overrideCheckoutUrl?: string | null;
3760
3767
  }
3761
3768
  /**
3762
3769
  * Retrieves a checkout.
3763
- *
3764
- *
3765
- * The `getCheckout()` function returns a Promise that resolves when the specified checkout is retrieved.
3766
3770
  * @param _id - Checkout ID.
3767
3771
  * @public
3768
3772
  * @requiredField _id
@@ -3785,7 +3789,7 @@ export interface CreateCheckoutOptions {
3785
3789
  * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
3786
3790
  * @applicableIdentity APP
3787
3791
  * @applicableIdentity VISITOR
3788
- * @returns Fulfilled - the requested checkout.
3792
+ * @returns Retrieved checkout.
3789
3793
  * @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckout
3790
3794
  */
3791
3795
  export declare function getCheckout(_id: string): Promise<NonNullablePaths<Checkout, CheckoutNonNullablePaths>>;
@@ -3851,8 +3855,15 @@ export declare function getCheckoutUrl(_id: string): Promise<NonNullablePaths<Ge
3851
3855
  /**
3852
3856
  * Updates a checkout.
3853
3857
  *
3858
+ * Use this method to update checkout fields such as billing and shipping info, or to add a coupon code or gift card.
3854
3859
  *
3855
- * 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.
3856
3867
  *
3857
3868
  * >**Notes:**
3858
3869
  * > + If nothing is passed in the request, the call will fail.
@@ -3924,7 +3935,7 @@ export interface UpdateCheckout {
3924
3935
  /** Shipping information. */
3925
3936
  shippingInfo?: ShippingInfo;
3926
3937
  /**
3927
- * [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.
3928
3939
  * @maxLength 1000
3929
3940
  */
3930
3941
  buyerNote?: string | null;
@@ -4043,7 +4054,7 @@ export interface UpdateCheckout {
4043
4054
  */
4044
4055
  cartId?: string | null;
4045
4056
  /**
4046
- * 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)).
4047
4058
  * @readonly
4048
4059
  */
4049
4060
  violations?: Violation[];
@@ -4062,7 +4073,9 @@ export interface UpdateCheckout {
4062
4073
  /**
4063
4074
  * Additional settings for customization of the checkout process.
4064
4075
  *
4065
- * 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).
4066
4079
  * @immutable
4067
4080
  */
4068
4081
  customSettings?: CustomSettings;
@@ -4099,14 +4112,20 @@ export interface UpdateCheckout {
4099
4112
  paymentCurrency?: string;
4100
4113
  }
4101
4114
  export interface UpdateCheckoutOptions {
4102
- /** 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
+ */
4103
4120
  couponCode?: string | null;
4104
4121
  /** Gift card code. */
4105
4122
  giftCardCode?: string | null;
4106
4123
  /**
4107
4124
  * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
4108
4125
  *
4109
- * 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`.
4110
4129
  * @maxLength 1000
4111
4130
  */
4112
4131
  overrideCheckoutUrl?: string | null;
@@ -4126,11 +4145,6 @@ export interface UpdateCheckoutOptions {
4126
4145
  }
4127
4146
  /**
4128
4147
  * Removes the coupon from a specified checkout.
4129
- *
4130
- *
4131
- * The `removeCoupon()` function returns a Promise that resolves to the updated checkout when the coupon is removed from the specified checkout.
4132
- *
4133
- * >**Note:** A checkout can only hold 1 coupon.
4134
4148
  * @param _id - ID of the checkout to remove the coupon from.
4135
4149
  * @public
4136
4150
  * @requiredField _id
@@ -4155,10 +4169,7 @@ export declare function removeCoupon(_id: string): Promise<NonNullablePaths<Remo
4155
4169
  /**
4156
4170
  * Removes the gift card from a specified checkout.
4157
4171
  *
4158
- *
4159
- * The `removeGiftCard()` function returns a Promise that resolves to the updated checkout when the gift card is removed from the specified checkout.
4160
- *
4161
- * >**Note:** A checkout can only hold 1 gift card.
4172
+ * A checkout can only hold 1 gift card.
4162
4173
  * @param _id - ID of the checkout to remove the gift card from.
4163
4174
  * @public
4164
4175
  * @requiredField _id
@@ -4209,9 +4220,8 @@ export declare function removeOverrideCheckoutUrl(_id: string): Promise<NonNulla
4209
4220
  /**
4210
4221
  * Adds catalog line items and/or custom line items to a checkout.
4211
4222
  *
4212
- *
4213
- * The `addToCheckout()` function returns a Promise that resolves to the updated checkout when the specified items have been added.
4214
- * > **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.
4215
4225
  * @param _id - Checkout ID.
4216
4226
  * @public
4217
4227
  * @requiredField _id
@@ -4271,15 +4281,15 @@ export interface AddToCheckoutOptions {
4271
4281
  }
4272
4282
  /**
4273
4283
  * Removes line items from the specified checkout.
4274
- *
4275
- *
4276
- * The `removeLineItems()` function returns a Promise that resolves to the updated checkout when the line items are removed from the specified checkout.
4277
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`.
4278
4290
  * @public
4279
4291
  * @requiredField _id
4280
4292
  * @requiredField lineItemIds
4281
- * @param lineItemIds - IDs of the line items to be removed.
4282
- * 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`.
4283
4293
  * @permissionId ECOM.MODIFY_CHECKOUTS
4284
4294
  * @permissionScope Manage Stores - all permissions
4285
4295
  * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
@@ -4301,20 +4311,17 @@ export declare function removeLineItems(_id: string, lineItemIds: string[]): Pro
4301
4311
  /**
4302
4312
  * Creates an order from a specified checkout.
4303
4313
  *
4304
- * The `createOrder()` function returns a Promise that resolves to the new order's ID and `paymentGatewayOrderID` when the order is created.
4305
- * 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.
4306
- *
4307
- * > **Note:** The following requirements must be met for an order to be created from a checkout.
4308
- * > + 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.
4309
- * > + A checkout must have at least 1 line item.
4310
- * > + All of the line Items have an `availability.status` of `"AVAILABLE"` or `"PARTIALLY_AVAILABLE"`.
4311
- * > + If there is a payment to be made, meaning that `priceSummary.total` is greater than 0, the `billingInfo.address` field must be provided.
4312
- * > + When a checkout has line items to be shipped, the `shippingInfo.shippingDestination.address` and `shippingInfo.selectedCarrierServiceOption` fields must be provided.
4313
- * > + 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.
4314
4321
  * @param _id - Checkout ID.
4315
4322
  * @public
4316
4323
  * @requiredField _id
4317
- * @param options - Further order creation options.
4324
+ * @param options - Additional order creation options.
4318
4325
  * @permissionId ECOM.CREATE_ORDER_FROM_CHECKOUT
4319
4326
  * @permissionScope Manage Stores - all permissions
4320
4327
  * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
@@ -4368,10 +4375,11 @@ export interface CreateOrderAndChargeOptions {
4368
4375
  */
4369
4376
  export declare function markCheckoutAsCompletedAndRedirectToUrl(token: string): Promise<NonNullablePaths<RawHttpResponse, `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`>>;
4370
4377
  /**
4371
- * Marks a checkout as completed - `checkout.complete` boolean is set to `true`.
4372
- *
4378
+ * Sets `completed` to `true` to mark a checkout as completed.
4373
4379
  *
4374
- * 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.
4375
4383
  * @param _id - Checkout ID.
4376
4384
  * @public
4377
4385
  * @requiredField _id
@@ -4394,11 +4402,11 @@ export declare function markCheckoutAsCompleted(_id: string): Promise<void>;
4394
4402
  /**
4395
4403
  * Updates the quantity of one or more line items in a checkout.
4396
4404
  *
4397
- * This endpoint is only for updating the quantity of line items. To entirely remove a line item from
4398
- * the checkout, use [`removeLineItems()`](#removelineitems).
4399
- * 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.
4400
4408
  *
4401
- * 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`
4402
4410
  * is greater than the remaining stock, then the `quantity` returned in the response is the total amount
4403
4411
  * of remaining stock.
4404
4412
  * @param _id - Checkout ID.