Skip to content

Commit 894085a

Browse files
committed
build(codegen): updating SDK
1 parent 30f9965 commit 894085a

File tree

9 files changed

+75
-77
lines changed

9 files changed

+75
-77
lines changed

changes.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@
2020
</details>
2121

2222

23+
<details>
24+
<summary>Removed QueryParameter(s)</summary>
25+
26+
- :warning: removed query parameter `withTotal` from method `get /{projectKey}/product-projections/search`
27+
</details>
28+
29+
2330
<details>
2431
<summary>Added Type(s)</summary>
2532

@@ -37,6 +44,13 @@
3744
</details>
3845

3946

47+
<details>
48+
<summary>Required Property(s)</summary>
49+
50+
- changed property `facets` of type `ProductProjectionPagedSearchResponse` to be optional
51+
</details>
52+
53+
4054
<details>
4155
<summary>Added Property(s)</summary>
4256

commercetools.Sdk/Tests/commercetools.Sdk.Api.Tests/Generated/Client/RequestBuilders/ProductProjections/ByProjectKeyProductProjectionsSearchTest.cs

Lines changed: 22 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -35,65 +35,65 @@ public static IEnumerable<object[]> GetData()
3535
.ProductProjections()
3636
.Search()
3737
.Get()
38-
.WithFuzzy(true)
38+
.WithMarkMatchingVariants(true)
3939
.Build(),
4040
"Get",
41-
"/test_projectKey/product-projections/search?fuzzy=true",
41+
"/test_projectKey/product-projections/search?markMatchingVariants=true",
4242
},
4343
new Object[] {
4444
ApiRoot
4545
.WithProjectKey("test_projectKey")
4646
.ProductProjections()
4747
.Search()
4848
.Get()
49-
.WithFuzzyLevel(9)
49+
.WithText("locale", "text.locale")
5050
.Build(),
5151
"Get",
52-
"/test_projectKey/product-projections/search?fuzzyLevel=9",
52+
"/test_projectKey/product-projections/search?text.locale=text.locale",
5353
},
5454
new Object[] {
5555
ApiRoot
5656
.WithProjectKey("test_projectKey")
5757
.ProductProjections()
5858
.Search()
5959
.Get()
60-
.WithMarkMatchingVariants(true)
60+
.WithFuzzy(true)
6161
.Build(),
6262
"Get",
63-
"/test_projectKey/product-projections/search?markMatchingVariants=true",
63+
"/test_projectKey/product-projections/search?fuzzy=true",
6464
},
6565
new Object[] {
6666
ApiRoot
6767
.WithProjectKey("test_projectKey")
6868
.ProductProjections()
6969
.Search()
7070
.Get()
71-
.WithFilter("filter")
71+
.WithFuzzyLevel(9)
7272
.Build(),
7373
"Get",
74-
"/test_projectKey/product-projections/search?filter=filter",
74+
"/test_projectKey/product-projections/search?fuzzyLevel=9",
7575
},
7676
new Object[] {
7777
ApiRoot
7878
.WithProjectKey("test_projectKey")
7979
.ProductProjections()
8080
.Search()
8181
.Get()
82-
.WithFilterFacets("filter.facets")
82+
.WithFilterQuery("filter.query")
8383
.Build(),
8484
"Get",
85-
"/test_projectKey/product-projections/search?filter.facets=filter.facets",
85+
"/test_projectKey/product-projections/search?filter.query=filter.query",
8686
},
8787
new Object[] {
8888
ApiRoot
8989
.WithProjectKey("test_projectKey")
9090
.ProductProjections()
9191
.Search()
9292
.Get()
93-
.WithFilterQuery("filter.query")
93+
.WithFilter("filter")
9494
.Build(),
9595
"Get",
96-
"/test_projectKey/product-projections/search?filter.query=filter.query",
96+
"/test_projectKey/product-projections/search?filter=filter",
9797
},
9898
new Object[] {
9999
ApiRoot
@@ -112,54 +112,54 @@ public static IEnumerable<object[]> GetData()
112112
.ProductProjections()
113113
.Search()
114114
.Get()
115-
.WithText("locale", "text.locale")
115+
.WithFilterFacets("filter.facets")
116116
.Build(),
117117
"Get",
118-
"/test_projectKey/product-projections/search?text.locale=text.locale",
118+
"/test_projectKey/product-projections/search?filter.facets=filter.facets",
119119
},
120120
new Object[] {
121121
ApiRoot
122122
.WithProjectKey("test_projectKey")
123123
.ProductProjections()
124124
.Search()
125125
.Get()
126-
.WithSort("sort")
126+
.WithExpand("expand")
127127
.Build(),
128128
"Get",
129-
"/test_projectKey/product-projections/search?sort=sort",
129+
"/test_projectKey/product-projections/search?expand=expand",
130130
},
131131
new Object[] {
132132
ApiRoot
133133
.WithProjectKey("test_projectKey")
134134
.ProductProjections()
135135
.Search()
136136
.Get()
137-
.WithLimit(7)
137+
.WithSort("sort")
138138
.Build(),
139139
"Get",
140-
"/test_projectKey/product-projections/search?limit=7",
140+
"/test_projectKey/product-projections/search?sort=sort",
141141
},
142142
new Object[] {
143143
ApiRoot
144144
.WithProjectKey("test_projectKey")
145145
.ProductProjections()
146146
.Search()
147147
.Get()
148-
.WithOffset(3)
148+
.WithLimit(7)
149149
.Build(),
150150
"Get",
151-
"/test_projectKey/product-projections/search?offset=3",
151+
"/test_projectKey/product-projections/search?limit=7",
152152
},
153153
new Object[] {
154154
ApiRoot
155155
.WithProjectKey("test_projectKey")
156156
.ProductProjections()
157157
.Search()
158158
.Get()
159-
.WithWithTotal(true)
159+
.WithOffset(3)
160160
.Build(),
161161
"Get",
162-
"/test_projectKey/product-projections/search?withTotal=true",
162+
"/test_projectKey/product-projections/search?offset=3",
163163
},
164164
new Object[] {
165165
ApiRoot
@@ -249,17 +249,6 @@ public static IEnumerable<object[]> GetData()
249249
"Get",
250250
"/test_projectKey/product-projections/search?storeProjection=storeProjection",
251251
},
252-
new Object[] {
253-
ApiRoot
254-
.WithProjectKey("test_projectKey")
255-
.ProductProjections()
256-
.Search()
257-
.Get()
258-
.WithExpand("expand")
259-
.Build(),
260-
"Get",
261-
"/test_projectKey/product-projections/search?expand=expand",
262-
},
263252
new Object[] {
264253
ApiRoot
265254
.WithProjectKey("test_projectKey")

commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/ProductProjections/ByProjectKeyProductProjectionsSearchGet.cs

Lines changed: 24 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
namespace commercetools.Sdk.Api.Client.RequestBuilders.ProductProjections
1111
{
1212

13-
public partial class ByProjectKeyProductProjectionsSearchGet : ApiMethod<ByProjectKeyProductProjectionsSearchGet>, IApiMethod<ByProjectKeyProductProjectionsSearchGet, commercetools.Sdk.Api.Models.Products.IProductProjectionPagedSearchResponse>, commercetools.Sdk.Api.Client.ISortableTrait<ByProjectKeyProductProjectionsSearchGet>, commercetools.Sdk.Api.Client.IPagingTrait<ByProjectKeyProductProjectionsSearchGet>, commercetools.Sdk.Api.Client.IProjectionselectingTrait<ByProjectKeyProductProjectionsSearchGet>, commercetools.Sdk.Api.Client.IPriceselectingTrait<ByProjectKeyProductProjectionsSearchGet>, commercetools.Sdk.Api.Client.ILocaleprojectingTrait<ByProjectKeyProductProjectionsSearchGet>, commercetools.Sdk.Api.Client.IStoreprojectingtailoringTrait<ByProjectKeyProductProjectionsSearchGet>, commercetools.Sdk.Api.Client.IExpandableTrait<ByProjectKeyProductProjectionsSearchGet>, commercetools.Sdk.Api.Client.IErrorableTrait<ByProjectKeyProductProjectionsSearchGet>, commercetools.Sdk.Api.Client.IDeprecatable200Trait<ByProjectKeyProductProjectionsSearchGet>
13+
public partial class ByProjectKeyProductProjectionsSearchGet : ApiMethod<ByProjectKeyProductProjectionsSearchGet>, IApiMethod<ByProjectKeyProductProjectionsSearchGet, commercetools.Sdk.Api.Models.Products.IProductProjectionPagedSearchResponse>, commercetools.Sdk.Api.Client.IProjectionselectingTrait<ByProjectKeyProductProjectionsSearchGet>, commercetools.Sdk.Api.Client.IPriceselectingTrait<ByProjectKeyProductProjectionsSearchGet>, commercetools.Sdk.Api.Client.ILocaleprojectingTrait<ByProjectKeyProductProjectionsSearchGet>, commercetools.Sdk.Api.Client.IStoreprojectingtailoringTrait<ByProjectKeyProductProjectionsSearchGet>, commercetools.Sdk.Api.Client.IErrorableTrait<ByProjectKeyProductProjectionsSearchGet>, commercetools.Sdk.Api.Client.IDeprecatable200Trait<ByProjectKeyProductProjectionsSearchGet>
1414
{
1515

1616

@@ -28,6 +28,11 @@ public ByProjectKeyProductProjectionsSearchGet(IClient apiHttpClient, string pro
2828
this.RequestUrl = $"/{ProjectKey}/product-projections/search";
2929
}
3030

31+
public List<string> GetMarkMatchingVariants()
32+
{
33+
return this.GetQueryParam("markMatchingVariants");
34+
}
35+
3136
public List<string> GetFuzzy()
3237
{
3338
return this.GetQueryParam("fuzzy");
@@ -38,29 +43,29 @@ public List<string> GetFuzzyLevel()
3843
return this.GetQueryParam("fuzzyLevel");
3944
}
4045

41-
public List<string> GetMarkMatchingVariants()
46+
public List<string> GetFilterQuery()
4247
{
43-
return this.GetQueryParam("markMatchingVariants");
48+
return this.GetQueryParam("filter.query");
4449
}
4550

4651
public List<string> GetFilter()
4752
{
4853
return this.GetQueryParam("filter");
4954
}
5055

51-
public List<string> GetFilterFacets()
56+
public List<string> GetFacet()
5257
{
53-
return this.GetQueryParam("filter.facets");
58+
return this.GetQueryParam("facet");
5459
}
5560

56-
public List<string> GetFilterQuery()
61+
public List<string> GetFilterFacets()
5762
{
58-
return this.GetQueryParam("filter.query");
63+
return this.GetQueryParam("filter.facets");
5964
}
6065

61-
public List<string> GetFacet()
66+
public List<string> GetExpand()
6267
{
63-
return this.GetQueryParam("facet");
68+
return this.GetQueryParam("expand");
6469
}
6570

6671
public List<string> GetSort()
@@ -78,11 +83,6 @@ public List<string> GetOffset()
7883
return this.GetQueryParam("offset");
7984
}
8085

81-
public List<string> GetWithTotal()
82-
{
83-
return this.GetQueryParam("withTotal");
84-
}
85-
8686
public List<string> GetStaged()
8787
{
8888
return this.GetQueryParam("staged");
@@ -123,9 +123,9 @@ public List<string> GetStoreProjection()
123123
return this.GetQueryParam("storeProjection");
124124
}
125125

126-
public List<string> GetExpand()
126+
public ByProjectKeyProductProjectionsSearchGet WithMarkMatchingVariants(bool markMatchingVariants)
127127
{
128-
return this.GetQueryParam("expand");
128+
return this.AddQueryParam("markMatchingVariants", markMatchingVariants.ToString());
129129
}
130130

131131
public ByProjectKeyProductProjectionsSearchGet WithFuzzy(bool fuzzy)
@@ -138,29 +138,29 @@ public ByProjectKeyProductProjectionsSearchGet WithFuzzyLevel(long fuzzyLevel)
138138
return this.AddQueryParam("fuzzyLevel", fuzzyLevel.ToString(CultureInfo.InvariantCulture));
139139
}
140140

141-
public ByProjectKeyProductProjectionsSearchGet WithMarkMatchingVariants(bool markMatchingVariants)
141+
public ByProjectKeyProductProjectionsSearchGet WithFilterQuery(string filterQuery)
142142
{
143-
return this.AddQueryParam("markMatchingVariants", markMatchingVariants.ToString());
143+
return this.AddQueryParam("filter.query", filterQuery);
144144
}
145145

146146
public ByProjectKeyProductProjectionsSearchGet WithFilter(string filter)
147147
{
148148
return this.AddQueryParam("filter", filter);
149149
}
150150

151-
public ByProjectKeyProductProjectionsSearchGet WithFilterFacets(string filterFacets)
151+
public ByProjectKeyProductProjectionsSearchGet WithFacet(string facet)
152152
{
153-
return this.AddQueryParam("filter.facets", filterFacets);
153+
return this.AddQueryParam("facet", facet);
154154
}
155155

156-
public ByProjectKeyProductProjectionsSearchGet WithFilterQuery(string filterQuery)
156+
public ByProjectKeyProductProjectionsSearchGet WithFilterFacets(string filterFacets)
157157
{
158-
return this.AddQueryParam("filter.query", filterQuery);
158+
return this.AddQueryParam("filter.facets", filterFacets);
159159
}
160160

161-
public ByProjectKeyProductProjectionsSearchGet WithFacet(string facet)
161+
public ByProjectKeyProductProjectionsSearchGet WithExpand(string expand)
162162
{
163-
return this.AddQueryParam("facet", facet);
163+
return this.AddQueryParam("expand", expand);
164164
}
165165

166166
public ByProjectKeyProductProjectionsSearchGet WithSort(string sort)
@@ -178,11 +178,6 @@ public ByProjectKeyProductProjectionsSearchGet WithOffset(long offset)
178178
return this.AddQueryParam("offset", offset.ToString(CultureInfo.InvariantCulture));
179179
}
180180

181-
public ByProjectKeyProductProjectionsSearchGet WithWithTotal(bool withTotal)
182-
{
183-
return this.AddQueryParam("withTotal", withTotal.ToString());
184-
}
185-
186181
public ByProjectKeyProductProjectionsSearchGet WithStaged(bool staged)
187182
{
188183
return this.AddQueryParam("staged", staged.ToString());
@@ -223,11 +218,6 @@ public ByProjectKeyProductProjectionsSearchGet WithStoreProjection(string storeP
223218
return this.AddQueryParam("storeProjection", storeProjection);
224219
}
225220

226-
public ByProjectKeyProductProjectionsSearchGet WithExpand(string expand)
227-
{
228-
return this.AddQueryParam("expand", expand);
229-
}
230-
231221
public ByProjectKeyProductProjectionsSearchGet WithText(string locale, string text)
232222
{
233223
return this.AddQueryParam($"text.{locale}", text);

commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/Errors/IGraphQLInsufficientScopeError.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ namespace commercetools.Sdk.Api.Models.Errors
55
[DeserializeAs(typeof(commercetools.Sdk.Api.Models.Errors.GraphQLInsufficientScopeError))]
66
public partial interface IGraphQLInsufficientScopeError : IGraphQLErrorObject
77
{
8+
new string Code { get; set; }
89

910
}
1011
}

commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/Errors/IInsufficientScopeError.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ namespace commercetools.Sdk.Api.Models.Errors
55
[DeserializeAs(typeof(commercetools.Sdk.Api.Models.Errors.InsufficientScopeError))]
66
public partial interface IInsufficientScopeError : IErrorObject
77
{
8+
new string Code { get; set; }
9+
10+
new string Message { get; set; }
811

912
}
1013
}

commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/Products/IProductProjectionPagedSearchResponse.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ public partial interface IProductProjectionPagedSearchResponse
99
{
1010
long Limit { get; set; }
1111

12+
long Offset { get; set; }
13+
1214
long Count { get; set; }
1315

1416
long? Total { get; set; }
1517

16-
long Offset { get; set; }
17-
1818
IList<IProductProjection> Results { get; set; }
1919

2020
IEnumerable<IProductProjection> ResultsEnumerable { set => Results = value.ToList(); }

commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/Products/ProductProjectionPagedSearchResponse.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ public partial class ProductProjectionPagedSearchResponse : IProductProjectionPa
88
{
99
public long Limit { get; set; }
1010

11+
public long Offset { get; set; }
12+
1113
public long Count { get; set; }
1214

1315
public long? Total { get; set; }
1416

15-
public long Offset { get; set; }
16-
1717
public IList<IProductProjection> Results { get; set; }
1818

1919
public IEnumerable<IProductProjection> ResultsEnumerable { set => Results = value.ToList(); }

0 commit comments

Comments
 (0)