Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .changeset/changes_api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
'@commercetools/platform-sdk': minor
---

**Api changes**

<details>
<summary>Added Type(s)</summary>

- added type `ExactLockConflictError`
- added type `ValidityLockConflictError`
- added type `GraphQLExactLockConflictError`
- added type `GraphQLValidityLockConflictError`
</details>
29 changes: 4 additions & 25 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,8 @@
<details>
<summary>Added Type(s)</summary>

- added type `CartDiscountSetRecurringOrderScopeAction`
- added type `AnyOrder`
- added type `AnyOrderDraft`
- added type `ApplicableRecurrencePolicies`
- added type `ApplicableRecurrencePoliciesDraft`
- added type `NonRecurringOrdersOnly`
- added type `NonRecurringOrdersOnlyDraft`
- added type `RecurringOrderScope`
- added type `RecurringOrderScopeDraft`
- added type `RecurringOrdersOnly`
- added type `RecurringOrdersOnlyDraft`
</details>

<details>
<summary>Required Property(s)</summary>

- :warning: changed property `deleteDaysAfterLastModification` of type `CartsConfiguration` to be required
- :warning: changed property `deleteDaysAfterLastModification` of type `ShoppingListsConfiguration` to be required
</details>

<details>
<summary>Added Property(s)</summary>

- added property `recurringOrderScope` to type `CartDiscount`
- added property `recurringOrderScope` to type `CartDiscountDraft`
- added type `ExactLockConflictError`
- added type `ValidityLockConflictError`
- added type `GraphQLExactLockConflictError`
- added type `GraphQLValidityLockConflictError`
</details>
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ export class ByProjectKeyStandalonePricesByIDRequestBuilder {
this.args.executeRequest
)
}
/**
* 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.
*
*/
public post(methodArgs: {
queryArgs?: {
expand?: string | string[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ export class ByProjectKeyStandalonePricesKeyByKeyRequestBuilder {
this.args.executeRequest
)
}
/**
* 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.
*
*/
public post(methodArgs: {
queryArgs?: {
expand?: string | string[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ export class ByProjectKeyStandalonePricesRequestBuilder {
*
* - If the Standalone Price has the same price scope as an existing Standalone Price, a [DuplicateStandalonePriceScope](ctp:api:type:DuplicateStandalonePriceScopeError) error is returned.
* - 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.
* - 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.
*
*/
public post(methodArgs: {
Expand Down
244 changes: 244 additions & 0 deletions packages/platform-sdk/src/generated/models/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ import { OrderEditPreviewFailure } from './order-edit'
import { Attribute, ProductReference } from './product'
import { ProductSearchErrorResponse } from './product-search'
import { ProductVariantSelection } from './product-selection'
import {
RecurrencePolicyReference,
RecurrencePolicyResourceIdentifier,
} from './recurrence-policy'
import { StandalonePriceReference } from './standalone-price'
import { StoreKeyReference } from './store'

Expand Down Expand Up @@ -70,6 +74,7 @@ export type ErrorObject =
| EnumKeyDoesNotExistError
| EnumValueIsUsedError
| EnumValuesMustMatchError
| ExactLockConflictError
| ExpiredCustomerEmailTokenError
| ExpiredCustomerPasswordTokenError
| ExtensionBadResponseError
Expand Down Expand Up @@ -127,6 +132,7 @@ export type ErrorObject =
| ShippingMethodDoesNotMatchCartError
| StoreCartDiscountsLimitReachedError
| SyntaxErrorError
| ValidityLockConflictError
export interface IErrorObject {
[key: string]: any
/**
Expand Down Expand Up @@ -844,6 +850,74 @@ export interface AuthErrorResponse extends ErrorResponse {
*/
readonly errors: ErrorObject[]
}
/**
* Returned when a modification is already in progress for the exact combination of SKU and price scope fields for a Standalone Price.
* Retry the same request after 300 ms.
*
* The error is returned as a failed response to:
* - [Create StandalonePrice](ctp:api:endpoint:/{projectKey}/standalone-prices:POST)
* - [Update StandalonePrice by ID](ctp:api:endpoint:/{projectKey}/standalone-prices/{id}:POST)
* - [Update StandalonePrice by Key](ctp:api:endpoint:/{projectKey}/standalone-prices/key={key}:POST)
*
*/
export interface ExactLockConflictError extends IErrorObject {
readonly code: 'ExactLockConflict'
[key: string]: any
/**
* `"Modification already in progress for the combination of SKU and price scope fields."`
*
*
*/
readonly message: string
/**
* SKU for which the modification conflict occurred.
*
*
*/
readonly sku: string
/**
* Currency code of the Standalone Price.
*
*
*/
readonly currency: string
/**
* Country code of the geographic location.
*
*
*/
readonly country?: string
/**
* [CustomerGroup](ctp:api:type:CustomerGroup) for which the Standalone Price is valid.
*
*
*/
readonly customerGroup?: CustomerGroupResourceIdentifier
/**
* [Channel](ctp:api:type:Channel) for which the Standalone Price is valid.
*
*
*/
readonly channel?: ChannelResourceIdentifier
/**
* Date and time (UTC) from which the Standalone Price is valid.
*
*
*/
readonly validFrom?: string
/**
* Date and time (UTC) until which the Standalone Price is valid.
*
*
*/
readonly validUntil?: string
/**
* [RecurrencePolicy](ctp:api:type:RecurrencePolicy) that applies to the Standalone Price.
*
*
*/
readonly recurrencePolicy?: RecurrencePolicyReference
}
/**
* Returned when the provided email token of the Customer has expired.
*
Expand Down Expand Up @@ -2136,6 +2210,62 @@ export interface SyntaxErrorError extends IErrorObject {
*/
readonly message: string
}
/**
* 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.
* Retry the same request after 300 ms.
*
* The error is returned as a failed response to:
* - [Create StandalonePrice](ctp:api:endpoint:/{projectKey}/standalone-prices:POST)
* - [Update StandalonePrice by ID](ctp:api:endpoint:/{projectKey}/standalone-prices/{id}:POST)
* - [Update StandalonePrice by Key](ctp:api:endpoint:/{projectKey}/standalone-prices/key={key}:POST)
*
*/
export interface ValidityLockConflictError extends IErrorObject {
readonly code: 'ValidityLockConflict'
[key: string]: any
/**
* `"Modification already in progress for the combination of SKU, price scope fields (but potentially different validity period). Please retry after the current operation completes."`
*
*
*/
readonly message: string
/**
* SKU for which the modification conflict occurred.
*
*
*/
readonly sku: string
/**
* Currency code of the Standalone Price.
*
*
*/
readonly currency: string
/**
* Country code of the geographic location.
*
*
*/
readonly country?: string
/**
* [CustomerGroup](ctp:api:type:CustomerGroup) for which the Standalone Price is valid.
*
*
*/
readonly customerGroup?: CustomerGroupResourceIdentifier
/**
* [Channel](ctp:api:type:Channel) for which the Standalone Price is valid.
*
*
*/
readonly channel?: ChannelResourceIdentifier
/**
* [RecurrencePolicy](ctp:api:type:RecurrencePolicy) for which the Standalone Price is valid.
*
*
*/
readonly recurrencePolicy?: RecurrencePolicyResourceIdentifier
}
export interface VariantValues {
/**
* SKU of the [ProductVariant](ctp:api:type:ProductVariant).
Expand Down Expand Up @@ -2184,6 +2314,7 @@ export type GraphQLErrorObject =
| GraphQLEnumKeyDoesNotExistError
| GraphQLEnumValueIsUsedError
| GraphQLEnumValuesMustMatchError
| GraphQLExactLockConflictError
| GraphQLExpiredCustomerEmailTokenError
| GraphQLExpiredCustomerPasswordTokenError
| GraphQLExtensionBadResponseError
Expand Down Expand Up @@ -2241,6 +2372,7 @@ export type GraphQLErrorObject =
| GraphQLShippingMethodDoesNotMatchCartError
| GraphQLStoreCartDiscountsLimitReachedError
| GraphQLSyntaxErrorError
| GraphQLValidityLockConflictError
export interface IGraphQLErrorObject {
[key: string]: any
/**
Expand Down Expand Up @@ -2766,6 +2898,68 @@ export interface GraphQLEnumValuesMustMatchError extends IGraphQLErrorObject {
readonly code: 'EnumValuesMustMatch'
[key: string]: any
}
/**
* Returned when a modification is already in progress for the exact combination of SKU and price scope fields for a Standalone Price.
* Retry the same request after 300 ms.
*
* The error is returned as a failed response to:
* - [Create StandalonePrice](ctp:api:endpoint:/{projectKey}/standalone-prices:POST)
* - [Update StandalonePrice by ID](ctp:api:endpoint:/{projectKey}/standalone-prices/{id}:POST)
* - [Update StandalonePrice by Key](ctp:api:endpoint:/{projectKey}/standalone-prices/key={key}:POST)
*
*/
export interface GraphQLExactLockConflictError extends IGraphQLErrorObject {
readonly code: 'ExactLockConflict'
[key: string]: any
/**
* SKU for which the modification conflict occurred.
*
*
*/
readonly sku: string
/**
* Currency code of the Standalone Price.
*
*
*/
readonly currency: string
/**
* Country code of the geographic location.
*
*
*/
readonly country?: string
/**
* [CustomerGroup](ctp:api:type:CustomerGroup) for which the Standalone Price is valid.
*
*
*/
readonly customerGroup?: CustomerGroupResourceIdentifier
/**
* [Channel](ctp:api:type:Channel) for which the Standalone Price is valid.
*
*
*/
readonly channel?: ChannelResourceIdentifier
/**
* Date and time (UTC) from which the Standalone Price is valid.
*
*
*/
readonly validFrom?: string
/**
* Date and time (UTC) until which the Standalone Price is valid.
*
*
*/
readonly validUntil?: string
/**
* [RecurrencePolicy](ctp:api:type:RecurrencePolicy) that applies to the Standalone Price.
*
*
*/
readonly recurrencePolicy?: RecurrencePolicyReference
}
/**
* Returned when the provided email token of the Customer has expired.
*
Expand Down Expand Up @@ -3715,3 +3909,53 @@ export interface GraphQLSyntaxErrorError extends IGraphQLErrorObject {
readonly code: 'SyntaxError'
[key: string]: any
}
/**
* 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.
* Retry the same request after 300 ms.
*
* The error is returned as a failed response to:
* - [Create StandalonePrice](ctp:api:endpoint:/{projectKey}/standalone-prices:POST)
* - [Update StandalonePrice by ID](ctp:api:endpoint:/{projectKey}/standalone-prices/{id}:POST)
* - [Update StandalonePrice by Key](ctp:api:endpoint:/{projectKey}/standalone-prices/key={key}:POST)
*
*/
export interface GraphQLValidityLockConflictError extends IGraphQLErrorObject {
readonly code: 'ValidityLockConflict'
[key: string]: any
/**
* SKU for which the modification conflict occurred.
*
*
*/
readonly sku: string
/**
* Currency code of the Standalone Price.
*
*
*/
readonly currency: string
/**
* Country code of the geographic location.
*
*
*/
readonly country?: string
/**
* [CustomerGroup](ctp:api:type:CustomerGroup) for which the Standalone Price is valid.
*
*
*/
readonly customerGroup?: CustomerGroupResourceIdentifier
/**
* [Channel](ctp:api:type:Channel) for which the Standalone Price is valid.
*
*
*/
readonly channel?: ChannelResourceIdentifier
/**
* [RecurrencePolicy](ctp:api:type:RecurrencePolicy) for which the Standalone Price is valid.
*
*
*/
readonly recurrencePolicy?: RecurrencePolicyResourceIdentifier
}
Loading
Loading