From 894085a534c232ccf4625556ace72ccabde3b3f5 Mon Sep 17 00:00:00 2001 From: "ct-sdks[bot]" <153784748+ct-sdks[bot]@users.noreply.github.com> Date: Fri, 28 Mar 2025 12:35:00 +0000 Subject: [PATCH] build(codegen): updating SDK --- changes.md | 14 +++++ ...yProjectKeyProductProjectionsSearchTest.cs | 55 +++++++----------- ...ByProjectKeyProductProjectionsSearchGet.cs | 58 ++++++++----------- .../Errors/IGraphQLInsufficientScopeError.cs | 1 + .../Models/Errors/IInsufficientScopeError.cs | 3 + .../IProductProjectionPagedSearchResponse.cs | 4 +- .../ProductProjectionPagedSearchResponse.cs | 4 +- ...ctionPagedSearchResponseQueryBuilderDsl.cs | 12 ++-- references.txt | 1 + 9 files changed, 75 insertions(+), 77 deletions(-) diff --git a/changes.md b/changes.md index ac448df2800..3d0913af9db 100644 --- a/changes.md +++ b/changes.md @@ -20,6 +20,13 @@ +
+Removed QueryParameter(s) + +- :warning: removed query parameter `withTotal` from method `get /{projectKey}/product-projections/search` +
+ +
Added Type(s) @@ -37,6 +44,13 @@
+
+Required Property(s) + +- changed property `facets` of type `ProductProjectionPagedSearchResponse` to be optional +
+ +
Added Property(s) diff --git a/commercetools.Sdk/Tests/commercetools.Sdk.Api.Tests/Generated/Client/RequestBuilders/ProductProjections/ByProjectKeyProductProjectionsSearchTest.cs b/commercetools.Sdk/Tests/commercetools.Sdk.Api.Tests/Generated/Client/RequestBuilders/ProductProjections/ByProjectKeyProductProjectionsSearchTest.cs index 47f1beb7104..4dcad5f1198 100644 --- a/commercetools.Sdk/Tests/commercetools.Sdk.Api.Tests/Generated/Client/RequestBuilders/ProductProjections/ByProjectKeyProductProjectionsSearchTest.cs +++ b/commercetools.Sdk/Tests/commercetools.Sdk.Api.Tests/Generated/Client/RequestBuilders/ProductProjections/ByProjectKeyProductProjectionsSearchTest.cs @@ -35,10 +35,10 @@ public static IEnumerable GetData() .ProductProjections() .Search() .Get() - .WithFuzzy(true) + .WithMarkMatchingVariants(true) .Build(), "Get", - "/test_projectKey/product-projections/search?fuzzy=true", + "/test_projectKey/product-projections/search?markMatchingVariants=true", }, new Object[] { ApiRoot @@ -46,10 +46,10 @@ public static IEnumerable GetData() .ProductProjections() .Search() .Get() - .WithFuzzyLevel(9) + .WithText("locale", "text.locale") .Build(), "Get", - "/test_projectKey/product-projections/search?fuzzyLevel=9", + "/test_projectKey/product-projections/search?text.locale=text.locale", }, new Object[] { ApiRoot @@ -57,10 +57,10 @@ public static IEnumerable GetData() .ProductProjections() .Search() .Get() - .WithMarkMatchingVariants(true) + .WithFuzzy(true) .Build(), "Get", - "/test_projectKey/product-projections/search?markMatchingVariants=true", + "/test_projectKey/product-projections/search?fuzzy=true", }, new Object[] { ApiRoot @@ -68,10 +68,10 @@ public static IEnumerable GetData() .ProductProjections() .Search() .Get() - .WithFilter("filter") + .WithFuzzyLevel(9) .Build(), "Get", - "/test_projectKey/product-projections/search?filter=filter", + "/test_projectKey/product-projections/search?fuzzyLevel=9", }, new Object[] { ApiRoot @@ -79,10 +79,10 @@ public static IEnumerable GetData() .ProductProjections() .Search() .Get() - .WithFilterFacets("filter.facets") + .WithFilterQuery("filter.query") .Build(), "Get", - "/test_projectKey/product-projections/search?filter.facets=filter.facets", + "/test_projectKey/product-projections/search?filter.query=filter.query", }, new Object[] { ApiRoot @@ -90,10 +90,10 @@ public static IEnumerable GetData() .ProductProjections() .Search() .Get() - .WithFilterQuery("filter.query") + .WithFilter("filter") .Build(), "Get", - "/test_projectKey/product-projections/search?filter.query=filter.query", + "/test_projectKey/product-projections/search?filter=filter", }, new Object[] { ApiRoot @@ -112,10 +112,10 @@ public static IEnumerable GetData() .ProductProjections() .Search() .Get() - .WithText("locale", "text.locale") + .WithFilterFacets("filter.facets") .Build(), "Get", - "/test_projectKey/product-projections/search?text.locale=text.locale", + "/test_projectKey/product-projections/search?filter.facets=filter.facets", }, new Object[] { ApiRoot @@ -123,10 +123,10 @@ public static IEnumerable GetData() .ProductProjections() .Search() .Get() - .WithSort("sort") + .WithExpand("expand") .Build(), "Get", - "/test_projectKey/product-projections/search?sort=sort", + "/test_projectKey/product-projections/search?expand=expand", }, new Object[] { ApiRoot @@ -134,10 +134,10 @@ public static IEnumerable GetData() .ProductProjections() .Search() .Get() - .WithLimit(7) + .WithSort("sort") .Build(), "Get", - "/test_projectKey/product-projections/search?limit=7", + "/test_projectKey/product-projections/search?sort=sort", }, new Object[] { ApiRoot @@ -145,10 +145,10 @@ public static IEnumerable GetData() .ProductProjections() .Search() .Get() - .WithOffset(3) + .WithLimit(7) .Build(), "Get", - "/test_projectKey/product-projections/search?offset=3", + "/test_projectKey/product-projections/search?limit=7", }, new Object[] { ApiRoot @@ -156,10 +156,10 @@ public static IEnumerable GetData() .ProductProjections() .Search() .Get() - .WithWithTotal(true) + .WithOffset(3) .Build(), "Get", - "/test_projectKey/product-projections/search?withTotal=true", + "/test_projectKey/product-projections/search?offset=3", }, new Object[] { ApiRoot @@ -249,17 +249,6 @@ public static IEnumerable GetData() "Get", "/test_projectKey/product-projections/search?storeProjection=storeProjection", }, - new Object[] { - ApiRoot - .WithProjectKey("test_projectKey") - .ProductProjections() - .Search() - .Get() - .WithExpand("expand") - .Build(), - "Get", - "/test_projectKey/product-projections/search?expand=expand", - }, new Object[] { ApiRoot .WithProjectKey("test_projectKey") diff --git a/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/ProductProjections/ByProjectKeyProductProjectionsSearchGet.cs b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/ProductProjections/ByProjectKeyProductProjectionsSearchGet.cs index 85cd7dab0b1..b28773b5e8a 100644 --- a/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/ProductProjections/ByProjectKeyProductProjectionsSearchGet.cs +++ b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/ProductProjections/ByProjectKeyProductProjectionsSearchGet.cs @@ -10,7 +10,7 @@ namespace commercetools.Sdk.Api.Client.RequestBuilders.ProductProjections { - public partial class ByProjectKeyProductProjectionsSearchGet : ApiMethod, IApiMethod, commercetools.Sdk.Api.Client.ISortableTrait, commercetools.Sdk.Api.Client.IPagingTrait, commercetools.Sdk.Api.Client.IProjectionselectingTrait, commercetools.Sdk.Api.Client.IPriceselectingTrait, commercetools.Sdk.Api.Client.ILocaleprojectingTrait, commercetools.Sdk.Api.Client.IStoreprojectingtailoringTrait, commercetools.Sdk.Api.Client.IExpandableTrait, commercetools.Sdk.Api.Client.IErrorableTrait, commercetools.Sdk.Api.Client.IDeprecatable200Trait + public partial class ByProjectKeyProductProjectionsSearchGet : ApiMethod, IApiMethod, commercetools.Sdk.Api.Client.IProjectionselectingTrait, commercetools.Sdk.Api.Client.IPriceselectingTrait, commercetools.Sdk.Api.Client.ILocaleprojectingTrait, commercetools.Sdk.Api.Client.IStoreprojectingtailoringTrait, commercetools.Sdk.Api.Client.IErrorableTrait, commercetools.Sdk.Api.Client.IDeprecatable200Trait { @@ -28,6 +28,11 @@ public ByProjectKeyProductProjectionsSearchGet(IClient apiHttpClient, string pro this.RequestUrl = $"/{ProjectKey}/product-projections/search"; } + public List GetMarkMatchingVariants() + { + return this.GetQueryParam("markMatchingVariants"); + } + public List GetFuzzy() { return this.GetQueryParam("fuzzy"); @@ -38,9 +43,9 @@ public List GetFuzzyLevel() return this.GetQueryParam("fuzzyLevel"); } - public List GetMarkMatchingVariants() + public List GetFilterQuery() { - return this.GetQueryParam("markMatchingVariants"); + return this.GetQueryParam("filter.query"); } public List GetFilter() @@ -48,19 +53,19 @@ public List GetFilter() return this.GetQueryParam("filter"); } - public List GetFilterFacets() + public List GetFacet() { - return this.GetQueryParam("filter.facets"); + return this.GetQueryParam("facet"); } - public List GetFilterQuery() + public List GetFilterFacets() { - return this.GetQueryParam("filter.query"); + return this.GetQueryParam("filter.facets"); } - public List GetFacet() + public List GetExpand() { - return this.GetQueryParam("facet"); + return this.GetQueryParam("expand"); } public List GetSort() @@ -78,11 +83,6 @@ public List GetOffset() return this.GetQueryParam("offset"); } - public List GetWithTotal() - { - return this.GetQueryParam("withTotal"); - } - public List GetStaged() { return this.GetQueryParam("staged"); @@ -123,9 +123,9 @@ public List GetStoreProjection() return this.GetQueryParam("storeProjection"); } - public List GetExpand() + public ByProjectKeyProductProjectionsSearchGet WithMarkMatchingVariants(bool markMatchingVariants) { - return this.GetQueryParam("expand"); + return this.AddQueryParam("markMatchingVariants", markMatchingVariants.ToString()); } public ByProjectKeyProductProjectionsSearchGet WithFuzzy(bool fuzzy) @@ -138,9 +138,9 @@ public ByProjectKeyProductProjectionsSearchGet WithFuzzyLevel(long fuzzyLevel) return this.AddQueryParam("fuzzyLevel", fuzzyLevel.ToString(CultureInfo.InvariantCulture)); } - public ByProjectKeyProductProjectionsSearchGet WithMarkMatchingVariants(bool markMatchingVariants) + public ByProjectKeyProductProjectionsSearchGet WithFilterQuery(string filterQuery) { - return this.AddQueryParam("markMatchingVariants", markMatchingVariants.ToString()); + return this.AddQueryParam("filter.query", filterQuery); } public ByProjectKeyProductProjectionsSearchGet WithFilter(string filter) @@ -148,19 +148,19 @@ public ByProjectKeyProductProjectionsSearchGet WithFilter(string filter) return this.AddQueryParam("filter", filter); } - public ByProjectKeyProductProjectionsSearchGet WithFilterFacets(string filterFacets) + public ByProjectKeyProductProjectionsSearchGet WithFacet(string facet) { - return this.AddQueryParam("filter.facets", filterFacets); + return this.AddQueryParam("facet", facet); } - public ByProjectKeyProductProjectionsSearchGet WithFilterQuery(string filterQuery) + public ByProjectKeyProductProjectionsSearchGet WithFilterFacets(string filterFacets) { - return this.AddQueryParam("filter.query", filterQuery); + return this.AddQueryParam("filter.facets", filterFacets); } - public ByProjectKeyProductProjectionsSearchGet WithFacet(string facet) + public ByProjectKeyProductProjectionsSearchGet WithExpand(string expand) { - return this.AddQueryParam("facet", facet); + return this.AddQueryParam("expand", expand); } public ByProjectKeyProductProjectionsSearchGet WithSort(string sort) @@ -178,11 +178,6 @@ public ByProjectKeyProductProjectionsSearchGet WithOffset(long offset) return this.AddQueryParam("offset", offset.ToString(CultureInfo.InvariantCulture)); } - public ByProjectKeyProductProjectionsSearchGet WithWithTotal(bool withTotal) - { - return this.AddQueryParam("withTotal", withTotal.ToString()); - } - public ByProjectKeyProductProjectionsSearchGet WithStaged(bool staged) { return this.AddQueryParam("staged", staged.ToString()); @@ -223,11 +218,6 @@ public ByProjectKeyProductProjectionsSearchGet WithStoreProjection(string storeP return this.AddQueryParam("storeProjection", storeProjection); } - public ByProjectKeyProductProjectionsSearchGet WithExpand(string expand) - { - return this.AddQueryParam("expand", expand); - } - public ByProjectKeyProductProjectionsSearchGet WithText(string locale, string text) { return this.AddQueryParam($"text.{locale}", text); diff --git a/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/Errors/IGraphQLInsufficientScopeError.cs b/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/Errors/IGraphQLInsufficientScopeError.cs index 352a947ffb9..375767aadc8 100644 --- a/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/Errors/IGraphQLInsufficientScopeError.cs +++ b/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/Errors/IGraphQLInsufficientScopeError.cs @@ -5,6 +5,7 @@ namespace commercetools.Sdk.Api.Models.Errors [DeserializeAs(typeof(commercetools.Sdk.Api.Models.Errors.GraphQLInsufficientScopeError))] public partial interface IGraphQLInsufficientScopeError : IGraphQLErrorObject { + new string Code { get; set; } } } diff --git a/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/Errors/IInsufficientScopeError.cs b/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/Errors/IInsufficientScopeError.cs index 64b70b35a9f..770c75a53d5 100644 --- a/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/Errors/IInsufficientScopeError.cs +++ b/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/Errors/IInsufficientScopeError.cs @@ -5,6 +5,9 @@ namespace commercetools.Sdk.Api.Models.Errors [DeserializeAs(typeof(commercetools.Sdk.Api.Models.Errors.InsufficientScopeError))] public partial interface IInsufficientScopeError : IErrorObject { + new string Code { get; set; } + + new string Message { get; set; } } } diff --git a/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/Products/IProductProjectionPagedSearchResponse.cs b/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/Products/IProductProjectionPagedSearchResponse.cs index 8bb8a1a6144..8d95c8da028 100644 --- a/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/Products/IProductProjectionPagedSearchResponse.cs +++ b/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/Products/IProductProjectionPagedSearchResponse.cs @@ -9,12 +9,12 @@ public partial interface IProductProjectionPagedSearchResponse { long Limit { get; set; } + long Offset { get; set; } + long Count { get; set; } long? Total { get; set; } - long Offset { get; set; } - IList Results { get; set; } IEnumerable ResultsEnumerable { set => Results = value.ToList(); } diff --git a/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/Products/ProductProjectionPagedSearchResponse.cs b/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/Products/ProductProjectionPagedSearchResponse.cs index 84371158f6c..1ae91f62e97 100644 --- a/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/Products/ProductProjectionPagedSearchResponse.cs +++ b/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/Products/ProductProjectionPagedSearchResponse.cs @@ -8,12 +8,12 @@ public partial class ProductProjectionPagedSearchResponse : IProductProjectionPa { public long Limit { get; set; } + public long Offset { get; set; } + public long Count { get; set; } public long? Total { get; set; } - public long Offset { get; set; } - public IList Results { get; set; } public IEnumerable ResultsEnumerable { set => Results = value.ToList(); } diff --git a/commercetools.Sdk/commercetools.Sdk.Api/Predicates/Query/Generated/Products/ProductProjectionPagedSearchResponseQueryBuilderDsl.cs b/commercetools.Sdk/commercetools.Sdk.Api/Predicates/Query/Generated/Products/ProductProjectionPagedSearchResponseQueryBuilderDsl.cs index 37cef466901..d1de8c22264 100644 --- a/commercetools.Sdk/commercetools.Sdk.Api/Predicates/Query/Generated/Products/ProductProjectionPagedSearchResponseQueryBuilderDsl.cs +++ b/commercetools.Sdk/commercetools.Sdk.Api/Predicates/Query/Generated/Products/ProductProjectionPagedSearchResponseQueryBuilderDsl.cs @@ -21,21 +21,21 @@ public IComparisonPredicateBuilder new CombinationQueryPredicate(p, ProductProjectionPagedSearchResponseQueryBuilderDsl.Of), PredicateFormatter.Format); } - public IComparisonPredicateBuilder Count() + public IComparisonPredicateBuilder Offset() { - return new ComparisonPredicateBuilder(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("count")), + return new ComparisonPredicateBuilder(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("offset")), p => new CombinationQueryPredicate(p, ProductProjectionPagedSearchResponseQueryBuilderDsl.Of), PredicateFormatter.Format); } - public IComparisonPredicateBuilder Total() + public IComparisonPredicateBuilder Count() { - return new ComparisonPredicateBuilder(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("total")), + return new ComparisonPredicateBuilder(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("count")), p => new CombinationQueryPredicate(p, ProductProjectionPagedSearchResponseQueryBuilderDsl.Of), PredicateFormatter.Format); } - public IComparisonPredicateBuilder Offset() + public IComparisonPredicateBuilder Total() { - return new ComparisonPredicateBuilder(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("offset")), + return new ComparisonPredicateBuilder(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("total")), p => new CombinationQueryPredicate(p, ProductProjectionPagedSearchResponseQueryBuilderDsl.Of), PredicateFormatter.Format); } diff --git a/references.txt b/references.txt index 5d9034a7fab..55e07611eb4 100644 --- a/references.txt +++ b/references.txt @@ -329,3 +329,4 @@ ffa8644c871728467258443ffb54707031865c44 7e0d07d02382161fc6d401b83e03ad2754afbc9b a33feaab360e352573f683dd36889c80735e3900 6082ac4e80a66d271c68785c32ea07853e8211ef +4055fc15c037521387c7c7687cfceee73527f55f