Skip to content

Commit 7cf17f6

Browse files
committed
build(codegen): updating SDK
1 parent b397c94 commit 7cf17f6

File tree

164 files changed

+17069
-39
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+17069
-39
lines changed

changes.md

Lines changed: 67 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,84 @@
11
**Api changes**
22

33
<details>
4-
<summary>Removed Property(s)</summary>
4+
<summary>Added Type(s)</summary>
55

6-
- :warning: removed property `/[0-9].[0-9]*[1-9]/` from type `CategoryOrderHints`
7-
- :warning: removed property `//` from type `ProductVariantChannelAvailabilityMap`
6+
- added type `CartDiscountSetDiscountGroupAction`
7+
- added type `DiscountGroup`
8+
- added type `DiscountGroupDraft`
9+
- added type `DiscountGroupPagedQueryResponse`
10+
- added type `DiscountGroupReference`
11+
- added type `DiscountGroupResourceIdentifier`
12+
- added type `DiscountGroupUpdate`
13+
- added type `DiscountGroupUpdateAction`
14+
- added type `DiscountGroupSetDescriptionAction`
15+
- added type `DiscountGroupSetKeyAction`
16+
- added type `DiscountGroupSetNameAction`
17+
- added type `DiscountGroupSetSortOrderAction`
18+
- added type `DiscountGroupCreatedMessage`
19+
- added type `DiscountGroupDeletedMessage`
20+
- added type `DiscountGroupKeySetMessage`
21+
- added type `DiscountGroupSortOrderSetMessage`
22+
- added type `DiscountGroupCreatedMessagePayload`
23+
- added type `DiscountGroupDeletedMessagePayload`
24+
- added type `DiscountGroupKeySetMessagePayload`
25+
- added type `DiscountGroupSortOrderSetMessagePayload`
826
</details>
927

1028

1129
<details>
12-
<summary>Changed Property(s)</summary>
30+
<summary>Added Resource(s)</summary>
1331

14-
- :warning: changed property `filter` of type `SearchSorting` from type `SearchQueryExpression` to `SearchQuery`
32+
- added resource `/{projectKey}/discount-groups`
33+
- added resource `/{projectKey}/discount-groups/key={key}`
34+
- added resource `/{projectKey}/discount-groups/{ID}`
35+
</details>
36+
37+
38+
<details>
39+
<summary>Required Property(s)</summary>
40+
41+
- changed property `sortOrder` of type `CartDiscountDraft` to be optional
1542
</details>
1643

1744

1845
<details>
1946
<summary>Added Property(s)</summary>
2047

21-
- added property `/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/` to type `CategoryOrderHints`
22-
- added property `/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/` to type `ProductVariantChannelAvailabilityMap`
48+
- added property `discountGroup` to type `CartDiscount`
49+
- added property `discountGroup` to type `CartDiscountDraft`
50+
</details>
51+
52+
53+
<details>
54+
<summary>Added Method(s)</summary>
55+
56+
- added method `apiRoot.withProjectKey().discountGroups().get()`
57+
- added method `apiRoot.withProjectKey().discountGroups().head()`
58+
- added method `apiRoot.withProjectKey().discountGroups().post()`
59+
- added method `apiRoot.withProjectKey().discountGroups().withKey().get()`
60+
- added method `apiRoot.withProjectKey().discountGroups().withKey().head()`
61+
- added method `apiRoot.withProjectKey().discountGroups().withKey().post()`
62+
- added method `apiRoot.withProjectKey().discountGroups().withKey().delete()`
63+
- added method `apiRoot.withProjectKey().discountGroups().withId().get()`
64+
- added method `apiRoot.withProjectKey().discountGroups().withId().head()`
65+
- added method `apiRoot.withProjectKey().discountGroups().withId().post()`
66+
- added method `apiRoot.withProjectKey().discountGroups().withId().delete()`
67+
</details>
68+
69+
70+
<details>
71+
<summary>Added Enum(s)</summary>
72+
73+
- added enum `ApplicationStoppedByGroupBestDeal` to type `DiscountCodeState`
74+
- added enum `discount-group` to type `ReferenceTypeId`
75+
</details>
76+
77+
**History changes**
78+
79+
<details>
80+
<summary>Added Enum(s)</summary>
81+
82+
- added enum `ApplicationStoppedByGroupBestDeal` to type `DiscountCodeState`
2383
</details>
2484

commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls

Lines changed: 153 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

18671872
type CartDiscountLimitWithCurrent implements LimitWithCurrent {
@@ -1966,6 +1971,7 @@ input CartDiscountUpdateAction {
19661971
setValidFrom: SetCartDiscountValidFrom
19671972
setValidFromAndUntil: SetCartDiscountValidFromAndUntil
19681973
setValidUntil: SetCartDiscountValidUntil
1974+
setDiscountGroup: SetCartDiscountDiscountGroup
19691975
}
19701976

19711977
interface 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+
42954386
type 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+
1102411156
input 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+
1146511617
input SetExtensionKey {
1146611618
key: String
1146711619
}

0 commit comments

Comments
 (0)