@@ -1810,6 +1810,7 @@ type CartDiscount implements Versioned & ReferenceExpandable {
18101810 requiresDiscountCode : Boolean !
18111811 sortOrder : String !
18121812 key : String
1813+ discountGroupRef : Reference
18131814 name (
18141815 "String is defined for different locales. This argument specifies the desired locale."
18151816 locale : Locale ,
@@ -1828,6 +1829,8 @@ type CartDiscount implements Versioned & ReferenceExpandable {
18281829 custom : CustomFieldsType
18291830 storesRef : [KeyReference ! ]!
18301831 stores : [Store ! ]!
1832+ "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
1833+ discountGroup : DiscountGroup
18311834 value : CartDiscountValue !
18321835 target : CartDiscountTarget
18331836 id : String !
@@ -1851,7 +1854,7 @@ input CartDiscountDraft {
18511854 value : CartDiscountValueInput !
18521855 cartPredicate : String !
18531856 target : CartDiscountTargetInput
1854- sortOrder : String !
1857+ sortOrder : String
18551858 name : [LocalizedStringItemInputType ! ]!
18561859 description : [LocalizedStringItemInputType ! ]
18571860 validFrom : DateTime
@@ -1862,6 +1865,8 @@ input CartDiscountDraft {
18621865 custom : CustomFieldsDraft
18631866 key : String
18641867 stores : [ResourceIdentifierInput ! ]
1868+ "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
1869+ discountGroup : ResourceIdentifierInput
18651870}
18661871
18671872type CartDiscountLimitWithCurrent implements LimitWithCurrent {
@@ -1966,6 +1971,7 @@ input CartDiscountUpdateAction {
19661971 setValidFrom : SetCartDiscountValidFrom
19671972 setValidFromAndUntil : SetCartDiscountValidFromAndUntil
19681973 setValidUntil : SetCartDiscountValidUntil
1974+ setDiscountGroup : SetCartDiscountDiscountGroup
19691975}
19701976
19711977interface CartDiscountValue {
@@ -4259,6 +4265,8 @@ enum DiscountCodeState {
42594265 "The discount code is active and none of the discounts were applied because the discount application was stopped by one discount that has the StackingMode of StopAfterThisDiscount defined"
42604266 ApplicationStoppedByPreviousDiscount
42614267
4268+ ApplicationStoppedByGroupBestDeal
4269+
42624270 "The discount code is active and it contains at least one active and valid CartDiscount. But its cart predicate does not match the cart or none of the contained active discount\u2019s cart predicates match the cart"
42634271 DoesNotMatchCart
42644272
@@ -4292,6 +4300,89 @@ input DiscountCodeUpdateAction {
42924300 setValidUntil : SetDiscountCodeValidUntil
42934301}
42944302
4303+ "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
4304+ type DiscountGroup implements Versioned {
4305+ id : String !
4306+ version : Long !
4307+ key : String !
4308+ sortOrder : String !
4309+ name (
4310+ "String is defined for different locales. This argument specifies the desired locale."
4311+ locale : Locale ,
4312+
4313+ "List of languages the client is able to understand, and which locale variant is preferred."
4314+ acceptLanguage : [Locale ! ]): String
4315+ nameAllLocales : [LocalizedString ! ]
4316+ description (
4317+ "String is defined for different locales. This argument specifies the desired locale."
4318+ locale : Locale ,
4319+
4320+ "List of languages the client is able to understand, and which locale variant is preferred."
4321+ acceptLanguage : [Locale ! ]): String
4322+ descriptionAllLocales : [LocalizedString ! ]
4323+ createdAt : DateTime !
4324+ lastModifiedAt : DateTime !
4325+ createdBy : Initiator
4326+ lastModifiedBy : Initiator
4327+ }
4328+
4329+ "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
4330+ input DiscountGroupDraft {
4331+ key : String !
4332+ sortOrder : String !
4333+ name : [LocalizedStringItemInputType ! ]
4334+ description : [LocalizedStringItemInputType ! ]
4335+ }
4336+
4337+ type DiscountGroupCreated implements MessagePayload {
4338+ discountGroup : DiscountGroup !
4339+ type : String !
4340+ }
4341+
4342+ type DiscountGroupDeleted implements MessagePayload {
4343+ discountGroupId : String !
4344+ type : String !
4345+ }
4346+
4347+ type DiscountGroupKeySet implements MessagePayload {
4348+ key : String !
4349+ discountGroupId : String !
4350+ oldKey : String
4351+ type : String !
4352+ }
4353+
4354+ type DiscountGroupSortOrderSet implements MessagePayload {
4355+ sortOrder : String !
4356+ discountGroupId : String !
4357+ oldSortOrder : String
4358+ type : String !
4359+ }
4360+
4361+ type DiscountGroupLimitWithCurrent implements LimitWithCurrent {
4362+ limit : Long
4363+ current : Long !
4364+ }
4365+
4366+ type DiscountGroupLimitsProjection {
4367+ totalActive : DiscountGroupLimitWithCurrent !
4368+ }
4369+
4370+ type DiscountGroupQueryResult {
4371+ offset : Int !
4372+ count : Int !
4373+ total : Long !
4374+ exists : Boolean !
4375+ results : [DiscountGroup ! ]!
4376+ }
4377+
4378+ "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
4379+ input DiscountGroupUpdateAction {
4380+ setKey : SetDiscountGroupKey
4381+ setSortOrder : SetDiscountGroupSortOrder
4382+ setName : SetDiscountGroupName
4383+ setDescription : SetDiscountGroupDescription
4384+ }
4385+
42954386type DiscountOnTotalPrice {
42964387 discountedAmount : BaseMoney !
42974388 includedDiscounts : [DiscountedTotalPricePortion ! ]!
@@ -5907,6 +5998,31 @@ type Mutation {
59075998
59085999 "Queries with specified key"
59096000 key : String ): ProductDiscount
6001+
6002+ "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
6003+ createDiscountGroup (
6004+ "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
6005+ draft : DiscountGroupDraft ! ): DiscountGroup
6006+
6007+ "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
6008+ updateDiscountGroup (version : Long ! ,
6009+ "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
6010+ actions : [DiscountGroupUpdateAction ! ]! ,
6011+
6012+ "Queries with specified ID"
6013+ id : String ,
6014+
6015+ "Queries with specified key"
6016+ key : String ): DiscountGroup
6017+
6018+ "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
6019+ deleteDiscountGroup (version : Long ! ,
6020+
6021+ "Queries with specified ID"
6022+ id : String ,
6023+
6024+ "Queries with specified key"
6025+ key : String ): DiscountGroup
59106026 createAttributeGroup (draft : AttributeGroupDraft ! ): AttributeGroup
59116027 updateAttributeGroup (version : Long ! , actions : [AttributeGroupUpdateAction ! ]! ,
59126028
@@ -9232,6 +9348,7 @@ type ProjectCustomLimitsProjection {
92329348 subscriptions : SubscriptionsLimitsProjection !
92339349 productDiscounts : ProductDiscountLimitsProjection !
92349350 cartDiscounts : CartDiscountLimitsProjection !
9351+ discountGroups : DiscountGroupLimitsProjection !
92359352 orderEdits : OrderEditLimitsProjection !
92369353 stores : StoreLimitsProjection !
92379354 customers : CustomerLimitsProjection !
@@ -9413,6 +9530,16 @@ type Query {
94139530 "Queries with specified key"
94149531 key : String ): ProductDiscount
94159532 productDiscounts (where : String , sort : [String ! ], limit : Int , offset : Int ): ProductDiscountQueryResult !
9533+ "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
9534+ discountGroup (
9535+ "Queries with specified ID"
9536+ id : String ,
9537+
9538+ "Queries with specified key"
9539+ key : String ): DiscountGroup
9540+
9541+ "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
9542+ discountGroups (where : String , sort : [String ! ], limit : Int , offset : Int ): DiscountGroupQueryResult !
94169543 attributeGroup (
94179544 "Queries with specified ID"
94189545 id : String ,
@@ -11021,6 +11148,11 @@ input SetCartDiscountDescription {
1102111148 description : [LocalizedStringItemInputType ! ]
1102211149}
1102311150
11151+ input SetCartDiscountDiscountGroup {
11152+ discountGroup : ResourceIdentifierInput
11153+ sortOrder : String
11154+ }
11155+
1102411156input SetCartDiscountKey {
1102511157 key : String
1102611158}
@@ -11462,6 +11594,26 @@ input SetDiscountCodeValidUntil {
1146211594 validUntil : DateTime
1146311595}
1146411596
11597+ "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
11598+ input SetDiscountGroupDescription {
11599+ description : [LocalizedStringItemInputType ! ]
11600+ }
11601+
11602+ "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
11603+ input SetDiscountGroupKey {
11604+ key : String !
11605+ }
11606+
11607+ "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
11608+ input SetDiscountGroupName {
11609+ name : [LocalizedStringItemInputType ! ]
11610+ }
11611+
11612+ "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
11613+ input SetDiscountGroupSortOrder {
11614+ sortOrder : String !
11615+ }
11616+
1146511617input SetExtensionKey {
1146611618 key : String
1146711619}
0 commit comments