diff --git a/.changeset/changes_api.md b/.changeset/changes_api.md index 6ed5d5d5f..d64d46e5a 100644 --- a/.changeset/changes_api.md +++ b/.changeset/changes_api.md @@ -142,12 +142,14 @@ - added type `BusinessUnitApprovalRuleMode` - added type `BusinessUnitChangeApprovalRuleModeAction` +- added type `CartChangeLineItemsOrderAction` - added type `CustomerIndexingProgress` - added type `CustomerIndexingStatus` - added type `CustomerPagedSearchResponse` - added type `CustomerSearchIndexingStatusResponse` - added type `CustomerSearchRequest` - added type `CustomerSearchResult` +- added type `MyCartChangeLineItemsOrderAction` - added type `BusinessUnitApprovalRuleModeChangedMessage` - added type `ProductPriceCustomFieldAddedMessage` - added type `ProductPriceCustomFieldChangedMessage` diff --git a/changes.md b/changes.md index 187803592..0e1dfe421 100644 --- a/changes.md +++ b/changes.md @@ -138,12 +138,14 @@ - added type `BusinessUnitApprovalRuleMode` - added type `BusinessUnitChangeApprovalRuleModeAction` +- added type `CartChangeLineItemsOrderAction` - added type `CustomerIndexingProgress` - added type `CustomerIndexingStatus` - added type `CustomerPagedSearchResponse` - added type `CustomerSearchIndexingStatusResponse` - added type `CustomerSearchRequest` - added type `CustomerSearchResult` +- added type `MyCartChangeLineItemsOrderAction` - added type `BusinessUnitApprovalRuleModeChangedMessage` - added type `ProductPriceCustomFieldAddedMessage` - added type `ProductPriceCustomFieldChangedMessage` diff --git a/packages/platform-sdk/src/generated/models/cart.ts b/packages/platform-sdk/src/generated/models/cart.ts index 4bfdb6b20..1b69cb8ea 100644 --- a/packages/platform-sdk/src/generated/models/cart.ts +++ b/packages/platform-sdk/src/generated/models/cart.ts @@ -645,6 +645,7 @@ export type CartUpdateAction = | CartChangeCustomLineItemPriceModeAction | CartChangeCustomLineItemQuantityAction | CartChangeLineItemQuantityAction + | CartChangeLineItemsOrderAction | CartChangeTaxCalculationModeAction | CartChangeTaxModeAction | CartChangeTaxRoundingModeAction @@ -2580,6 +2581,15 @@ export interface CartChangeLineItemQuantityAction { */ readonly externalTotalPrice?: ExternalLineItemTotalPrice } +export interface CartChangeLineItemsOrderAction { + readonly action: 'changeLineItemsOrder' + /** + * All existing [LineItem](ctp:api:type:LineItem) `id`s in the desired new order. + * + * + */ + readonly lineItemOrder: string[] +} /** * Changing the tax calculation mode leads to [recalculation of taxes](/../api/carts-orders-overview#cart-tax-calculation). * diff --git a/packages/platform-sdk/src/generated/models/me.ts b/packages/platform-sdk/src/generated/models/me.ts index 244e73986..82e634e3b 100644 --- a/packages/platform-sdk/src/generated/models/me.ts +++ b/packages/platform-sdk/src/generated/models/me.ts @@ -245,6 +245,7 @@ export type MyCartUpdateAction = | MyCartAddPaymentAction | MyCartApplyDeltaToLineItemShippingDetailsTargetsAction | MyCartChangeLineItemQuantityAction + | MyCartChangeLineItemsOrderAction | MyCartChangeTaxModeAction | MyCartRecalculateAction | MyCartRemoveDiscountCodeAction @@ -1494,6 +1495,15 @@ export interface MyCartChangeLineItemQuantityAction { */ readonly quantity: number } +export interface MyCartChangeLineItemsOrderAction { + readonly action: 'changeLineItemsOrder' + /** + * All existing [LineItem](ctp:api:type:LineItem) `id`s of the [Cart](ctp:api:type:Cart) in the desired new order. + * + * + */ + readonly lineItemOrder: string[] +} /** * - When `External` [TaxMode](ctp:api:type:TaxMode) is changed to `Platform` or `Disabled`, all previously set external Tax Rates are removed. * - When set to `Platform`, Line Items, Custom Line Items, and Shipping Method require a Tax Category with a Tax Rate for the Cart's `shippingAddress`. diff --git a/references.txt b/references.txt index 912cfe539..6aeb77d00 100644 --- a/references.txt +++ b/references.txt @@ -288,3 +288,4 @@ d74a87f613d9efd31448c3b11f505f7bf6bf57c0 369fbe55d487e70a626a9c12a2cf3cfe891b5bf0 4c21b32d2f4bd2b61a9ee586c736672ad4b4ff0b 0de2b778a4e263ceec08d7cfd62f615bb2c34c7e +482680f2aa9a6729cc2187040570c5662b9e5d6a