Skip to content

Commit 0dc71fe

Browse files
authored
build(codegen): updating SDK (#1231)
Co-authored-by: ct-sdks[bot] <153784748+ct-sdks[bot]@users.noreply.github.com>
1 parent c08b835 commit 0dc71fe

File tree

8 files changed

+278
-25
lines changed

8 files changed

+278
-25
lines changed

.changeset/changes_api.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@commercetools/platform-sdk': minor
3+
---
4+
5+
**Api changes**
6+
7+
<details>
8+
<summary>Added Type(s)</summary>
9+
10+
- added type `ExactLockConflictError`
11+
- added type `ValidityLockConflictError`
12+
- added type `GraphQLExactLockConflictError`
13+
- added type `GraphQLValidityLockConflictError`
14+
</details>

changes.md

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

6-
- added type `CartDiscountSetRecurringOrderScopeAction`
7-
- added type `AnyOrder`
8-
- added type `AnyOrderDraft`
9-
- added type `ApplicableRecurrencePolicies`
10-
- added type `ApplicableRecurrencePoliciesDraft`
11-
- added type `NonRecurringOrdersOnly`
12-
- added type `NonRecurringOrdersOnlyDraft`
13-
- added type `RecurringOrderScope`
14-
- added type `RecurringOrderScopeDraft`
15-
- added type `RecurringOrdersOnly`
16-
- added type `RecurringOrdersOnlyDraft`
17-
</details>
18-
19-
<details>
20-
<summary>Required Property(s)</summary>
21-
22-
- :warning: changed property `deleteDaysAfterLastModification` of type `CartsConfiguration` to be required
23-
- :warning: changed property `deleteDaysAfterLastModification` of type `ShoppingListsConfiguration` to be required
24-
</details>
25-
26-
<details>
27-
<summary>Added Property(s)</summary>
28-
29-
- added property `recurringOrderScope` to type `CartDiscount`
30-
- added property `recurringOrderScope` to type `CartDiscountDraft`
6+
- added type `ExactLockConflictError`
7+
- added type `ValidityLockConflictError`
8+
- added type `GraphQLExactLockConflictError`
9+
- added type `GraphQLValidityLockConflictError`
3110
</details>

packages/platform-sdk/src/generated/client/standalone-prices/by-project-key-standalone-prices-by-id-request-builder.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ export class ByProjectKeyStandalonePricesByIDRequestBuilder {
6666
this.args.executeRequest
6767
)
6868
}
69+
/**
70+
* If a modification is already in progress for the exact combination of SKU and price scope fields, an [ExactLockConflict](ctp:api:type:ExactLockConflictError) or [ValidityLockConflict](ctp:api:type:ValidityLockConflictError) error is returned.
71+
*
72+
*/
6973
public post(methodArgs: {
7074
queryArgs?: {
7175
expand?: string | string[]

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ export class ByProjectKeyStandalonePricesKeyByKeyRequestBuilder {
6666
this.args.executeRequest
6767
)
6868
}
69+
/**
70+
* If a modification is already in progress for the exact combination of SKU and price scope fields, an [ExactLockConflict](ctp:api:type:ExactLockConflictError) or [ValidityLockConflict](ctp:api:type:ValidityLockConflictError) error is returned.
71+
*
72+
*/
6973
public post(methodArgs: {
7074
queryArgs?: {
7175
expand?: string | string[]

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ export class ByProjectKeyStandalonePricesRequestBuilder {
108108
*
109109
* - If the Standalone Price has the same price scope as an existing Standalone Price, a [DuplicateStandalonePriceScope](ctp:api:type:DuplicateStandalonePriceScopeError) error is returned.
110110
* - If the Standalone Price has overlapping validity periods within the same price scope, a [OverlappingStandalonePriceValidity](ctp:api:type:OverlappingStandalonePriceValidityError) error is returned. A Price without validity period does not conflict with a Price defined for a time period.
111+
* - If a modification is already in progress for the exact combination of SKU and price scope fields, an [ExactLockConflict](ctp:api:type:ExactLockConflictError) or [ValidityLockConflict](ctp:api:type:ValidityLockConflictError) error is returned.
111112
*
112113
*/
113114
public post(methodArgs: {

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

Lines changed: 244 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ import { OrderEditPreviewFailure } from './order-edit'
2727
import { Attribute, ProductReference } from './product'
2828
import { ProductSearchErrorResponse } from './product-search'
2929
import { ProductVariantSelection } from './product-selection'
30+
import {
31+
RecurrencePolicyReference,
32+
RecurrencePolicyResourceIdentifier,
33+
} from './recurrence-policy'
3034
import { StandalonePriceReference } from './standalone-price'
3135
import { StoreKeyReference } from './store'
3236

@@ -70,6 +74,7 @@ export type ErrorObject =
7074
| EnumKeyDoesNotExistError
7175
| EnumValueIsUsedError
7276
| EnumValuesMustMatchError
77+
| ExactLockConflictError
7378
| ExpiredCustomerEmailTokenError
7479
| ExpiredCustomerPasswordTokenError
7580
| ExtensionBadResponseError
@@ -127,6 +132,7 @@ export type ErrorObject =
127132
| ShippingMethodDoesNotMatchCartError
128133
| StoreCartDiscountsLimitReachedError
129134
| SyntaxErrorError
135+
| ValidityLockConflictError
130136
export interface IErrorObject {
131137
[key: string]: any
132138
/**
@@ -844,6 +850,74 @@ export interface AuthErrorResponse extends ErrorResponse {
844850
*/
845851
readonly errors: ErrorObject[]
846852
}
853+
/**
854+
* Returned when a modification is already in progress for the exact combination of SKU and price scope fields for a Standalone Price.
855+
* Retry the same request after 300 ms.
856+
*
857+
* The error is returned as a failed response to:
858+
* - [Create StandalonePrice](ctp:api:endpoint:/{projectKey}/standalone-prices:POST)
859+
* - [Update StandalonePrice by ID](ctp:api:endpoint:/{projectKey}/standalone-prices/{id}:POST)
860+
* - [Update StandalonePrice by Key](ctp:api:endpoint:/{projectKey}/standalone-prices/key={key}:POST)
861+
*
862+
*/
863+
export interface ExactLockConflictError extends IErrorObject {
864+
readonly code: 'ExactLockConflict'
865+
[key: string]: any
866+
/**
867+
* `"Modification already in progress for the combination of SKU and price scope fields."`
868+
*
869+
*
870+
*/
871+
readonly message: string
872+
/**
873+
* SKU for which the modification conflict occurred.
874+
*
875+
*
876+
*/
877+
readonly sku: string
878+
/**
879+
* Currency code of the Standalone Price.
880+
*
881+
*
882+
*/
883+
readonly currency: string
884+
/**
885+
* Country code of the geographic location.
886+
*
887+
*
888+
*/
889+
readonly country?: string
890+
/**
891+
* [CustomerGroup](ctp:api:type:CustomerGroup) for which the Standalone Price is valid.
892+
*
893+
*
894+
*/
895+
readonly customerGroup?: CustomerGroupResourceIdentifier
896+
/**
897+
* [Channel](ctp:api:type:Channel) for which the Standalone Price is valid.
898+
*
899+
*
900+
*/
901+
readonly channel?: ChannelResourceIdentifier
902+
/**
903+
* Date and time (UTC) from which the Standalone Price is valid.
904+
*
905+
*
906+
*/
907+
readonly validFrom?: string
908+
/**
909+
* Date and time (UTC) until which the Standalone Price is valid.
910+
*
911+
*
912+
*/
913+
readonly validUntil?: string
914+
/**
915+
* [RecurrencePolicy](ctp:api:type:RecurrencePolicy) that applies to the Standalone Price.
916+
*
917+
*
918+
*/
919+
readonly recurrencePolicy?: RecurrencePolicyReference
920+
}
847921
/**
848922
* Returned when the provided email token of the Customer has expired.
849923
*
@@ -2136,6 +2210,62 @@ export interface SyntaxErrorError extends IErrorObject {
21362210
*/
21372211
readonly message: string
21382212
}
2213+
/**
2214+
* Returned when a modification is already in progress for the combination of SKU and price scope fields (but potentially different validity period) for a Standalone Price.
2215+
* Retry the same request after 300 ms.
2216+
*
2217+
* The error is returned as a failed response to:
2218+
* - [Create StandalonePrice](ctp:api:endpoint:/{projectKey}/standalone-prices:POST)
2219+
* - [Update StandalonePrice by ID](ctp:api:endpoint:/{projectKey}/standalone-prices/{id}:POST)
2220+
* - [Update StandalonePrice by Key](ctp:api:endpoint:/{projectKey}/standalone-prices/key={key}:POST)
2221+
*
2222+
*/
2223+
export interface ValidityLockConflictError extends IErrorObject {
2224+
readonly code: 'ValidityLockConflict'
2225+
[key: string]: any
2226+
/**
2227+
* `"Modification already in progress for the combination of SKU, price scope fields (but potentially different validity period). Please retry after the current operation completes."`
2228+
*
2229+
*
2230+
*/
2231+
readonly message: string
2232+
/**
2233+
* SKU for which the modification conflict occurred.
2234+
*
2235+
*
2236+
*/
2237+
readonly sku: string
2238+
/**
2239+
* Currency code of the Standalone Price.
2240+
*
2241+
*
2242+
*/
2243+
readonly currency: string
2244+
/**
2245+
* Country code of the geographic location.
2246+
*
2247+
*
2248+
*/
2249+
readonly country?: string
2250+
/**
2251+
* [CustomerGroup](ctp:api:type:CustomerGroup) for which the Standalone Price is valid.
2252+
*
2253+
*
2254+
*/
2255+
readonly customerGroup?: CustomerGroupResourceIdentifier
2256+
/**
2257+
* [Channel](ctp:api:type:Channel) for which the Standalone Price is valid.
2258+
*
2259+
*
2260+
*/
2261+
readonly channel?: ChannelResourceIdentifier
2262+
/**
2263+
* [RecurrencePolicy](ctp:api:type:RecurrencePolicy) for which the Standalone Price is valid.
2264+
*
2265+
*
2266+
*/
2267+
readonly recurrencePolicy?: RecurrencePolicyResourceIdentifier
2268+
}
21392269
export interface VariantValues {
21402270
/**
21412271
* SKU of the [ProductVariant](ctp:api:type:ProductVariant).
@@ -2184,6 +2314,7 @@ export type GraphQLErrorObject =
21842314
| GraphQLEnumKeyDoesNotExistError
21852315
| GraphQLEnumValueIsUsedError
21862316
| GraphQLEnumValuesMustMatchError
2317+
| GraphQLExactLockConflictError
21872318
| GraphQLExpiredCustomerEmailTokenError
21882319
| GraphQLExpiredCustomerPasswordTokenError
21892320
| GraphQLExtensionBadResponseError
@@ -2241,6 +2372,7 @@ export type GraphQLErrorObject =
22412372
| GraphQLShippingMethodDoesNotMatchCartError
22422373
| GraphQLStoreCartDiscountsLimitReachedError
22432374
| GraphQLSyntaxErrorError
2375+
| GraphQLValidityLockConflictError
22442376
export interface IGraphQLErrorObject {
22452377
[key: string]: any
22462378
/**
@@ -2766,6 +2898,68 @@ export interface GraphQLEnumValuesMustMatchError extends IGraphQLErrorObject {
27662898
readonly code: 'EnumValuesMustMatch'
27672899
[key: string]: any
27682900
}
2901+
/**
2902+
* Returned when a modification is already in progress for the exact combination of SKU and price scope fields for a Standalone Price.
2903+
* Retry the same request after 300 ms.
2904+
*
2905+
* The error is returned as a failed response to:
2906+
* - [Create StandalonePrice](ctp:api:endpoint:/{projectKey}/standalone-prices:POST)
2907+
* - [Update StandalonePrice by ID](ctp:api:endpoint:/{projectKey}/standalone-prices/{id}:POST)
2908+
* - [Update StandalonePrice by Key](ctp:api:endpoint:/{projectKey}/standalone-prices/key={key}:POST)
2909+
*
2910+
*/
2911+
export interface GraphQLExactLockConflictError extends IGraphQLErrorObject {
2912+
readonly code: 'ExactLockConflict'
2913+
[key: string]: any
2914+
/**
2915+
* SKU for which the modification conflict occurred.
2916+
*
2917+
*
2918+
*/
2919+
readonly sku: string
2920+
/**
2921+
* Currency code of the Standalone Price.
2922+
*
2923+
*
2924+
*/
2925+
readonly currency: string
2926+
/**
2927+
* Country code of the geographic location.
2928+
*
2929+
*
2930+
*/
2931+
readonly country?: string
2932+
/**
2933+
* [CustomerGroup](ctp:api:type:CustomerGroup) for which the Standalone Price is valid.
2934+
*
2935+
*
2936+
*/
2937+
readonly customerGroup?: CustomerGroupResourceIdentifier
2938+
/**
2939+
* [Channel](ctp:api:type:Channel) for which the Standalone Price is valid.
2940+
*
2941+
*
2942+
*/
2943+
readonly channel?: ChannelResourceIdentifier
2944+
/**
2945+
* Date and time (UTC) from which the Standalone Price is valid.
2946+
*
2947+
*
2948+
*/
2949+
readonly validFrom?: string
2950+
/**
2951+
* Date and time (UTC) until which the Standalone Price is valid.
2952+
*
2953+
*
2954+
*/
2955+
readonly validUntil?: string
2956+
/**
2957+
* [RecurrencePolicy](ctp:api:type:RecurrencePolicy) that applies to the Standalone Price.
2958+
*
2959+
*
2960+
*/
2961+
readonly recurrencePolicy?: RecurrencePolicyReference
2962+
}
27692963
/**
27702964
* Returned when the provided email token of the Customer has expired.
27712965
*
@@ -3715,3 +3909,53 @@ export interface GraphQLSyntaxErrorError extends IGraphQLErrorObject {
37153909
readonly code: 'SyntaxError'
37163910
[key: string]: any
37173911
}
3912+
/**
3913+
* Returned when a modification is already in progress for the combination of SKU and price scope fields (but potentially different validity period) for a Standalone Price.
3914+
* Retry the same request after 300 ms.
3915+
*
3916+
* The error is returned as a failed response to:
3917+
* - [Create StandalonePrice](ctp:api:endpoint:/{projectKey}/standalone-prices:POST)
3918+
* - [Update StandalonePrice by ID](ctp:api:endpoint:/{projectKey}/standalone-prices/{id}:POST)
3919+
* - [Update StandalonePrice by Key](ctp:api:endpoint:/{projectKey}/standalone-prices/key={key}:POST)
3920+
*
3921+
*/
3922+
export interface GraphQLValidityLockConflictError extends IGraphQLErrorObject {
3923+
readonly code: 'ValidityLockConflict'
3924+
[key: string]: any
3925+
/**
3926+
* SKU for which the modification conflict occurred.
3927+
*
3928+
*
3929+
*/
3930+
readonly sku: string
3931+
/**
3932+
* Currency code of the Standalone Price.
3933+
*
3934+
*
3935+
*/
3936+
readonly currency: string
3937+
/**
3938+
* Country code of the geographic location.
3939+
*
3940+
*
3941+
*/
3942+
readonly country?: string
3943+
/**
3944+
* [CustomerGroup](ctp:api:type:CustomerGroup) for which the Standalone Price is valid.
3945+
*
3946+
*
3947+
*/
3948+
readonly customerGroup?: CustomerGroupResourceIdentifier
3949+
/**
3950+
* [Channel](ctp:api:type:Channel) for which the Standalone Price is valid.
3951+
*
3952+
*
3953+
*/
3954+
readonly channel?: ChannelResourceIdentifier
3955+
/**
3956+
* [RecurrencePolicy](ctp:api:type:RecurrencePolicy) for which the Standalone Price is valid.
3957+
*
3958+
*
3959+
*/
3960+
readonly recurrencePolicy?: RecurrencePolicyResourceIdentifier
3961+
}

0 commit comments

Comments
 (0)