Skip to content

Update generated SDKs #439

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2025
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 changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
</details>


<details>
<summary>Removed QueryParameter(s)</summary>

- :warning: removed query parameter `withTotal` from method `get /{projectKey}/product-projections/search`
</details>


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

Expand All @@ -37,6 +44,13 @@
</details>


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

- changed property `facets` of type `ProductProjectionPagedSearchResponse` to be optional
</details>


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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,65 +35,65 @@ public static IEnumerable<object[]> 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
.WithProjectKey("test_projectKey")
.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
.WithProjectKey("test_projectKey")
.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
.WithProjectKey("test_projectKey")
.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
.WithProjectKey("test_projectKey")
.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
.WithProjectKey("test_projectKey")
.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
Expand All @@ -112,54 +112,54 @@ public static IEnumerable<object[]> 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
.WithProjectKey("test_projectKey")
.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
.WithProjectKey("test_projectKey")
.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
.WithProjectKey("test_projectKey")
.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
.WithProjectKey("test_projectKey")
.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
Expand Down Expand Up @@ -249,17 +249,6 @@ public static IEnumerable<object[]> 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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace commercetools.Sdk.Api.Client.RequestBuilders.ProductProjections
{

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>
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>
{


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

public List<string> GetMarkMatchingVariants()
{
return this.GetQueryParam("markMatchingVariants");
}

public List<string> GetFuzzy()
{
return this.GetQueryParam("fuzzy");
Expand All @@ -38,29 +43,29 @@ public List<string> GetFuzzyLevel()
return this.GetQueryParam("fuzzyLevel");
}

public List<string> GetMarkMatchingVariants()
public List<string> GetFilterQuery()
{
return this.GetQueryParam("markMatchingVariants");
return this.GetQueryParam("filter.query");
}

public List<string> GetFilter()
{
return this.GetQueryParam("filter");
}

public List<string> GetFilterFacets()
public List<string> GetFacet()
{
return this.GetQueryParam("filter.facets");
return this.GetQueryParam("facet");
}

public List<string> GetFilterQuery()
public List<string> GetFilterFacets()
{
return this.GetQueryParam("filter.query");
return this.GetQueryParam("filter.facets");
}

public List<string> GetFacet()
public List<string> GetExpand()
{
return this.GetQueryParam("facet");
return this.GetQueryParam("expand");
}

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

public List<string> GetWithTotal()
{
return this.GetQueryParam("withTotal");
}

public List<string> GetStaged()
{
return this.GetQueryParam("staged");
Expand Down Expand Up @@ -123,9 +123,9 @@ public List<string> GetStoreProjection()
return this.GetQueryParam("storeProjection");
}

public List<string> GetExpand()
public ByProjectKeyProductProjectionsSearchGet WithMarkMatchingVariants(bool markMatchingVariants)
{
return this.GetQueryParam("expand");
return this.AddQueryParam("markMatchingVariants", markMatchingVariants.ToString());
}

public ByProjectKeyProductProjectionsSearchGet WithFuzzy(bool fuzzy)
Expand All @@ -138,29 +138,29 @@ 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)
{
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)
Expand All @@ -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());
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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<IProductProjection> Results { get; set; }

IEnumerable<IProductProjection> ResultsEnumerable { set => Results = value.ToList(); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<IProductProjection> Results { get; set; }

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