Skip to content

Commit c487f7c

Browse files
authored
Update generated SDKs (#1143)
* build(codegen): updating SDK * build(codegen): updating SDK * build(codegen): updating SDK * build(codegen): updating SDK --------- Co-authored-by: ct-sdks[bot] <153784748+ct-sdks[bot]@users.noreply.github.com>
1 parent 5098a87 commit c487f7c

12 files changed

Lines changed: 136 additions & 27 deletions

File tree

.changeset/changes_api.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
'@commercetools/platform-sdk': minor
3+
---
4+
5+
**Api changes**
6+
7+
<details>
8+
<summary>Added Type(s)</summary>
9+
10+
- added type `InventoryEntrySetInventoryLimitsAction`
11+
</details>
12+
13+
<details>
14+
<summary>Added Property(s)</summary>
15+
16+
- added property `minCartQuantity` to type `InventoryEntry`
17+
- added property `maxCartQuantity` to type `InventoryEntry`
18+
- added property `minCartQuantity` to type `InventoryEntryDraft`
19+
- added property `maxCartQuantity` to type `InventoryEntryDraft`
20+
</details>
21+
22+
<details>
23+
<summary>Added Enum(s)</summary>
24+
25+
- added enum `discount-group` to type `ChangeSubscriptionResourceTypeId`
26+
</details>

changes.md

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,20 @@
33
<details>
44
<summary>Added Type(s)</summary>
55

6-
- added type `RecurringOrderDeletedMessage`
7-
- added type `RecurringOrderExpiresAtSetMessage`
8-
- added type `RecurringOrderDeletedMessagePayload`
9-
- added type `RecurringOrderExpiresAtSetMessagePayload`
10-
- added type `RecurringOrderSetExpiresAtAction`
11-
</details>
12-
13-
<details>
14-
<summary>Added Method(s)</summary>
15-
16-
- added method `apiRoot.withProjectKey().recurringOrders().withId().delete()`
17-
- added method `apiRoot.withProjectKey().recurringOrders().withKey().delete()`
6+
- added type `InventoryEntrySetInventoryLimitsAction`
187
</details>
198

209
<details>
2110
<summary>Added Property(s)</summary>
2211

23-
- added property `expiresAt` to type `RecurringOrderDraft`
24-
</details>
25-
26-
**History changes**
27-
28-
<details>
29-
<summary>Added Type(s)</summary>
30-
31-
- added type `TooManyRequestsError`
32-
- added type `GraphQLTooManyRequestsError`
33-
- added type `GraphQLErrorObject`
12+
- added property `minCartQuantity` to type `InventoryEntry`
13+
- added property `maxCartQuantity` to type `InventoryEntry`
14+
- added property `minCartQuantity` to type `InventoryEntryDraft`
15+
- added property `maxCartQuantity` to type `InventoryEntryDraft`
3416
</details>
3517

3618
<details>
37-
<summary>Changed Property(s)</summary>
19+
<summary>Added Enum(s)</summary>
3820

39-
- :warning: changed property `extensions` of type `GraphQLError` from type `object` to `GraphQLErrorObject`
21+
- added enum `discount-group` to type `ChangeSubscriptionResourceTypeId`
4022
</details>

packages/importapi-sdk/src/generated/models/customers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ export interface CustomerImport extends ImportResource {
196196
*/
197197
readonly email: string
198198
/**
199-
* Maps to `Customer.password`. Required when `authenticationMode` is set to `Password`.
199+
* Maps to `Customer.password`. Required when `authenticationMode` is set to `Password`. This field is only used when creating new Customers, and is ignored when updating Customers. However, due to the Import API's [upsert behavior](/../import-export/overview#how-are-resources-created-or-updated), a non-empty value must still be provided when updating Customers.
200200
*
201201
*
202202
*/

packages/platform-sdk/src/generated/client/inventory/by-project-key-inventory-request-builder.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,12 @@ export class ByProjectKeyInventoryRequestBuilder {
104104
)
105105
}
106106
/**
107+
* Creates an InventoryEntry in the Project.
108+
*
109+
* If quantity limits are provided, existing Line Items that reference a Product Variant with an SKU that matches the Inventory Entry can be affected. For more information, see [Quantity limits](/../api/carts-orders-overview#quantity-limits).
110+
*
107111
* Produces the [InventoryEntryCreated](ctp:api:type:InventoryEntryCreatedMessage) Message.
112+
*
108113
*/
109114
public post(methodArgs: {
110115
queryArgs?: {

packages/platform-sdk/src/generated/models/cart.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -906,6 +906,8 @@ export interface CustomLineItemDraft {
906906
* Money value of the Custom Line Item.
907907
* The value can be negative.
908908
*
909+
* To set the money value in high precision, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft).
910+
*
909911
*
910912
*/
911913
readonly money: _Money
@@ -1254,6 +1256,8 @@ export interface ExternalLineItemTotalPrice {
12541256
/**
12551257
* Price of the Line Item.
12561258
*
1259+
* To set the money value in high precision, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft).
1260+
*
12571261
*
12581262
*/
12591263
readonly price: _Money
@@ -1660,6 +1664,8 @@ export interface LineItemDraft {
16601664
/**
16611665
* Sets the [LineItem](ctp:api:type:LineItem) `price` value, and the `priceMode` to `ExternalPrice` [LineItemPriceMode](ctp:api:type:LineItemPriceMode).
16621666
*
1667+
* To set the money value in high precision, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft).
1668+
*
16631669
*
16641670
*/
16651671
readonly externalPrice?: _Money
@@ -2236,6 +2242,8 @@ export interface CartAddCustomLineItemAction extends ICartUpdateAction {
22362242
* Money value of the Custom Line Item.
22372243
* The value can be negative.
22382244
*
2245+
* To set the money value in high precision, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft).
2246+
*
22392247
*
22402248
*/
22412249
readonly money: _Money
@@ -2484,6 +2492,8 @@ export interface CartAddLineItemAction extends ICartUpdateAction {
24842492
/**
24852493
* Sets the [LineItem](ctp:api:type:LineItem) `price` value, and the `priceMode` to `ExternalPrice` [LineItemPriceMode](ctp:api:type:LineItemPriceMode).
24862494
*
2495+
* To set the money value in high precision, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft).
2496+
*
24872497
*
24882498
*/
24892499
readonly externalPrice?: _Money
@@ -2688,6 +2698,8 @@ export interface CartChangeCustomLineItemMoneyAction extends ICartUpdateAction {
26882698
/**
26892699
* Value to set. Must not be empty. Can be a negative amount.
26902700
*
2701+
* To set the money value in high precision, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft).
2702+
*
26912703
*
26922704
*/
26932705
readonly money: _Money
@@ -2762,6 +2774,8 @@ export interface CartChangeCustomLineItemQuantityAction
27622774
*
27632775
* The [LineItem](ctp:api:type:LineItem) price is set as described in [Line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection).
27642776
*
2777+
* This action is subject to [InventoryEntry](ctp:api:type:InventoryEntry) min/max restrictions when applicable. For more information, see [Quantity limits](/../api/carts-orders-overview#quantity-limits).
2778+
*
27652779
*/
27662780
export interface CartChangeLineItemQuantityAction extends ICartUpdateAction {
27672781
readonly action: 'changeLineItemQuantity'
@@ -2791,6 +2805,8 @@ export interface CartChangeLineItemQuantityAction extends ICartUpdateAction {
27912805
*
27922806
* The LineItem price is updated as described in Line Item price selection.
27932807
*
2808+
* To set the money value in high precision, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft).
2809+
*
27942810
*
27952811
*/
27962812
readonly externalPrice?: _Money
@@ -2962,6 +2978,8 @@ export interface CartRemoveLineItemAction extends ICartUpdateAction {
29622978
/**
29632979
* Sets the [LineItem](ctp:api:type:LineItem) `price` to the given value when decreasing the quantity of a Line Item with the `ExternalPrice` [LineItemPriceMode](ctp:api:type:LineItemPriceMode).
29642980
*
2981+
* To set the money value in high precision, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft).
2982+
*
29652983
*
29662984
*/
29672985
readonly externalPrice?: _Money
@@ -3625,6 +3643,8 @@ export interface CartSetLineItemPriceAction extends ICartUpdateAction {
36253643
* Value to set.
36263644
* If `externalPrice` is not given and the `priceMode` is `ExternalPrice`, the external price is unset and the `priceMode` is set to `Platform`.
36273645
*
3646+
* To set the money value in high precision, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft).
3647+
*
36283648
*
36293649
*/
36303650
readonly externalPrice?: _Money
@@ -3682,6 +3702,8 @@ export interface CartSetLineItemShippingDetailsAction
36823702
/**
36833703
* Performing this action does not reserve stock. Stock is only reserved at Order creation if the [InventoryMode](ctp:api:type:InventoryMode) of the Cart is `TrackOnly` or `ReserveOnOrder`.
36843704
*
3705+
* This action is subject to [InventoryEntry](ctp:api:type:InventoryEntry) min/max restrictions when applicable. For more information, see [Quantity limits](/../api/carts-orders-overview#quantity-limits).
3706+
*
36853707
*/
36863708
export interface CartSetLineItemSupplyChannelAction extends ICartUpdateAction {
36873709
readonly action: 'setLineItemSupplyChannel'

packages/platform-sdk/src/generated/models/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,6 @@ export interface DiscountedPrice {
718718
export interface DiscountedPriceDraft {
719719
/**
720720
* Sets the money value for the discounted price.
721-
*
722721
* To set the money value in high precision, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft).
723722
*
724723
*
@@ -1091,6 +1090,7 @@ export interface PriceTierDraft {
10911090
readonly minimumQuantity: number
10921091
/**
10931092
* Money value that applies when the `minimumQuantity` is greater than or equal to the [LineItem](ctp:api:type:LineItem) `quantity`.
1093+
*
10941094
* To set the money value in high precision, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft).
10951095
*
10961096
* The `currencyCode` of a Price tier must be the same as the `currencyCode` in the `value` of the related Price.

packages/platform-sdk/src/generated/models/inventory.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,18 @@ export interface InventoryEntry extends BaseResource {
8484
*
8585
*/
8686
readonly availableQuantity: number
87+
/**
88+
* Minimum quantity that can be added to a Cart. See [Quantity limits](/../api/carts-orders-overview#quantity-limits).
89+
*
90+
*
91+
*/
92+
readonly minCartQuantity?: number
93+
/**
94+
* Maximum quantity that can be added to a Cart. See [Quantity limits](/../api/carts-orders-overview#quantity-limits).
95+
*
96+
*
97+
*/
98+
readonly maxCartQuantity?: number
8799
/**
88100
* How often the InventoryEntry is restocked (in days).
89101
*
@@ -129,6 +141,18 @@ export interface InventoryEntryDraft {
129141
*
130142
*/
131143
readonly quantityOnStock: number
144+
/**
145+
* Minimum quantity that can be added to a Cart. See [Quantity limits](/../api/carts-orders-overview#quantity-limits).
146+
*
147+
*
148+
*/
149+
readonly minCartQuantity?: number
150+
/**
151+
* Maximum quantity that can be added to a Cart. See [Quantity limits](/../api/carts-orders-overview#quantity-limits).
152+
*
153+
*
154+
*/
155+
readonly maxCartQuantity?: number
132156
/**
133157
* How often the InventoryEntry is restocked (in days).
134158
*
@@ -208,6 +232,7 @@ export type InventoryEntryUpdateAction =
208232
| InventoryEntrySetCustomFieldAction
209233
| InventoryEntrySetCustomTypeAction
210234
| InventoryEntrySetExpectedDeliveryAction
235+
| InventoryEntrySetInventoryLimitsAction
211236
| InventoryEntrySetKeyAction
212237
| InventoryEntrySetRestockableInDaysAction
213238
| InventoryEntrySetSupplyChannelAction
@@ -333,6 +358,29 @@ export interface InventoryEntrySetExpectedDeliveryAction
333358
*/
334359
readonly expectedDelivery?: string
335360
}
361+
/**
362+
* Sets the inventory limits for a specific InventoryEntry. This action allows you to define minimum and maximum
363+
* quantities that can be added to a Cart. For more information, see [Quantity limits](/../api/carts-orders-overview#quantity-limits).
364+
*
365+
*/
366+
export interface InventoryEntrySetInventoryLimitsAction
367+
extends IInventoryEntryUpdateAction {
368+
readonly action: 'setInventoryLimits'
369+
/**
370+
* Sets the minimum quantity that can be added to a Cart. If the value is absent or `null`
371+
* the inventory limit is removed.
372+
*
373+
*
374+
*/
375+
readonly minCartQuantity?: number
376+
/**
377+
* Sets the maximum quantity that can be added to a Cart. If the value is absent or `null`
378+
* the inventory limit is removed.
379+
*
380+
*
381+
*/
382+
readonly maxCartQuantity?: number
383+
}
336384
export interface InventoryEntrySetKeyAction
337385
extends IInventoryEntryUpdateAction {
338386
readonly action: 'setKey'

packages/platform-sdk/src/generated/models/me.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,6 +1625,8 @@ export interface MyCartApplyDeltaToLineItemShippingDetailsTargetsAction
16251625
* it will be changed to `ExternalPrice` and the existing `externalPrice` value, i.e. `LineItem.price`, will be retained.
16261626
* The LineItem total will be calculated by the system instead, so that the `externalTotalPrice` will be dropped.
16271627
*
1628+
* This action is subject to [InventoryEntry](ctp:api:type:InventoryEntry) min/max restrictions when applicable. For more information, see [Quantity limits](/../api/carts-orders-overview#quantity-limits).
1629+
*
16281630
*/
16291631
export interface MyCartChangeLineItemQuantityAction
16301632
extends IMyCartUpdateAction {
@@ -1743,6 +1745,8 @@ export interface MyCartRemoveLineItemAction extends IMyCartUpdateAction {
17431745
/**
17441746
* Sets the [LineItem](ctp:api:type:LineItem) `price` to the given value when decreasing the quantity of a Line Item with the `ExternalPrice` [LineItemPriceMode](ctp:api:type:LineItemPriceMode).
17451747
*
1748+
* To set the money value in high precision, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft).
1749+
*
17461750
*
17471751
*/
17481752
readonly externalPrice?: _Money
@@ -2037,6 +2041,8 @@ export interface MyCartSetLineItemShippingDetailsAction
20372041
/**
20382042
* Performing this action does not reserve stock. Stock is only reserved at Order creation if the [InventoryMode](ctp:api:type:InventoryMode) of the Cart is `TrackOnly` or `ReserveOnOrder`.
20392043
*
2044+
* This action is subject to [InventoryEntry](ctp:api:type:InventoryEntry) min/max restrictions when applicable. For more information, see [Quantity limits](/../api/carts-orders-overview#quantity-limits).
2045+
*
20402046
*/
20412047
export interface MyCartSetLineItemSupplyChannelAction
20422048
extends IMyCartUpdateAction {

packages/platform-sdk/src/generated/models/order-edit.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,8 @@ export interface StagedOrderAddCustomLineItemAction
519519
/**
520520
* Money value of the Custom Line Item. The value can be negative.
521521
*
522+
* To set the money value in high precision, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft).
523+
*
522524
*
523525
*/
524526
readonly money: _Money
@@ -744,6 +746,8 @@ export interface StagedOrderAddLineItemAction extends IStagedOrderUpdateAction {
744746
/**
745747
* Sets the [LineItem](ctp:api:type:LineItem) `price` value, and the `priceMode` to `ExternalPrice` [LineItemPriceMode](ctp:api:type:LineItemPriceMode).
746748
*
749+
* To set the money value in high precision, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft).
750+
*
747751
*
748752
*/
749753
readonly externalPrice?: _Money
@@ -927,6 +931,8 @@ export interface StagedOrderChangeCustomLineItemMoneyAction
927931
* Must not be empty.
928932
* Can be a negative amount.
929933
*
934+
* To set the money value in high precision, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft).
935+
*
930936
*
931937
*/
932938
readonly money: _Money
@@ -996,6 +1002,8 @@ export interface StagedOrderChangeLineItemQuantityAction
9961002
*
9971003
* The [LineItem](ctp:api:type:LineItem) price is updated as described in [Line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection).
9981004
*
1005+
* To set the money value in high precision, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft).
1006+
*
9991007
*
10001008
*/
10011009
readonly externalPrice?: _Money
@@ -1259,6 +1267,8 @@ export interface StagedOrderRemoveLineItemAction
12591267
/**
12601268
* Sets the [LineItem](ctp:api:type:LineItem) `price` to the given value when decreasing the quantity of a Line Item with the `ExternalPrice` [LineItemPriceMode](ctp:api:type:LineItemPriceMode).
12611269
*
1270+
* To set the money value in high precision, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft).
1271+
*
12621272
*
12631273
*/
12641274
readonly externalPrice?: _Money
@@ -2046,6 +2056,8 @@ export interface StagedOrderSetLineItemPriceAction
20462056
* Value to set.
20472057
* If `externalPrice` is not given and the `priceMode` is `ExternalPrice`, the external price is unset and the `priceMode` is set to `Platform`.
20482058
*
2059+
* To set the money value in high precision, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft).
2060+
*
20492061
*
20502062
*/
20512063
readonly externalPrice?: _Money

packages/platform-sdk/src/generated/models/order.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,8 @@ export interface CustomLineItemImportDraft {
500500
/**
501501
* The cost of individual items in the Custom Line Item. The amount can be negative.
502502
*
503+
* To set the money value in high precision, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft).
504+
*
503505
*/
504506
readonly money: _Money
505507
/**

0 commit comments

Comments
 (0)