Skip to content

Commit

Permalink
build(codegen): updating SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
ct-sdks[bot] committed Mar 26, 2024
1 parent efc7494 commit daeac7f
Show file tree
Hide file tree
Showing 280 changed files with 28,625 additions and 8 deletions.
65 changes: 65 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<summary>Added Property(s)</summary>

- added property `taxPortions` to type `TaxedItemPrice`
- added property `productsSearch` to type `SearchIndexingConfiguration`
- added property `mode` to type `ProjectChangeProductSearchIndexingEnabledAction`
</details>


Expand All @@ -19,6 +21,8 @@

- added method `apiRoot.withProjectKey().productTailoring().get()`
- added method `apiRoot.withProjectKey().productTailoring().post()`
- added method `apiRoot.withProjectKey().products().search().post()`
- added method `apiRoot.withProjectKey().products().search().head()`
- added method `apiRoot.withProjectKey().productTailoring().withKey().get()`
- added method `apiRoot.withProjectKey().productTailoring().withKey().post()`
- added method `apiRoot.withProjectKey().productTailoring().withKey().delete()`
Expand All @@ -40,6 +44,7 @@
<summary>Added Resource(s)</summary>

- added resource `/{projectKey}/product-tailoring`
- added resource `/{projectKey}/products/search`
- added resource `/{projectKey}/product-tailoring/key={key}`
- added resource `/{projectKey}/product-tailoring/{ID}`
- added resource `/{projectKey}/in-store/key={storeKey}/product-tailoring`
Expand Down Expand Up @@ -70,6 +75,30 @@
- added type `ProductTailoringPublishedMessagePayload`
- added type `ProductTailoringSlugSetMessagePayload`
- added type `ProductTailoringUnpublishedMessagePayload`
- added type `ProductPagedSearchResponse`
- added type `ProductSearchErrorResponse`
- added type `ProductSearchMatchingVariantEntry`
- added type `ProductSearchMatchingVariants`
- added type `ProductSearchProjectionParams`
- added type `ProductSearchRequest`
- added type `ProductSearchResult`
- added type `ProductSearchFacetCountExpression`
- added type `ProductSearchFacetCountLevelEnum`
- added type `ProductSearchFacetCountValue`
- added type `ProductSearchFacetDistinctBucketSortBy`
- added type `ProductSearchFacetDistinctBucketSortExpression`
- added type `ProductSearchFacetDistinctExpression`
- added type `ProductSearchFacetDistinctValue`
- added type `ProductSearchFacetExpression`
- added type `ProductSearchFacetRangesExpression`
- added type `ProductSearchFacetRangesFacetRange`
- added type `ProductSearchFacetRangesValue`
- added type `ProductSearchFacetResult`
- added type `ProductSearchFacetResultBucket`
- added type `ProductSearchFacetResultBucketEntry`
- added type `ProductSearchFacetResultCount`
- added type `ProductSearchFacetScope`
- added type `ProductSearchFacetScopeEnum`
- added type `ProductTailoring`
- added type `ProductTailoringData`
- added type `ProductTailoringDraft`
Expand All @@ -88,5 +117,41 @@
- added type `ProductTailoringSetNameAction`
- added type `ProductTailoringSetSlugAction`
- added type `ProductTailoringUnpublishAction`
- added type `ProductSearchIndexingMode`
- added type `ProductSearchStatus`
- added type `SearchAndExpression`
- added type `SearchAnyValue`
- added type `SearchCompoundExpression`
- added type `SearchDateRangeExpression`
- added type `SearchDateRangeValue`
- added type `SearchDateTimeRangeExpression`
- added type `SearchDateTimeRangeValue`
- added type `SearchExactExpression`
- added type `SearchExistsExpression`
- added type `SearchExistsValue`
- added type `SearchFieldType`
- added type `SearchFilterExpression`
- added type `SearchFullTextExpression`
- added type `SearchFullTextPrefixExpression`
- added type `SearchFullTextPrefixValue`
- added type `SearchFullTextValue`
- added type `SearchLongRangeExpression`
- added type `SearchLongRangeValue`
- added type `SearchMatchType`
- added type `SearchMatchingVariant`
- added type `SearchNotExpression`
- added type `SearchNumberRangeExpression`
- added type `SearchNumberRangeValue`
- added type `SearchOrExpression`
- added type `SearchPrefixExpression`
- added type `SearchQuery`
- added type `SearchQueryExpression`
- added type `SearchQueryExpressionValue`
- added type `SearchSortMode`
- added type `SearchSortOrder`
- added type `SearchSorting`
- added type `SearchTimeRangeExpression`
- added type `SearchTimeRangeValue`
- added type `SearchWildCardExpression`
</details>

Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,8 @@ public ByProjectKeyProductsByIDRequestBuilder withId(String ID) {
return new ByProjectKeyProductsByIDRequestBuilder(apiHttpClient, projectKey, ID);
}

public ByProjectKeyProductsSearchRequestBuilder search() {
return new ByProjectKeyProductsSearchRequestBuilder(apiHttpClient, projectKey);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@

package com.commercetools.api.client;

import java.net.URI;
import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CompletableFuture;

import com.fasterxml.jackson.core.type.TypeReference;

import io.vrap.rmf.base.client.*;
import io.vrap.rmf.base.client.utils.Generated;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <p>Checks whether a search index for the Project's Products exists. Returns a <code>200 OK</code> status if the index exists, a <code>404 Not Found</code> error otherwise.</p>
*
* <hr>
* <div class=code-example>
* <pre><code class='java'>{@code
* CompletableFuture<ApiHttpResponse<com.fasterxml.jackson.databind.JsonNode>> result = apiRoot
* .withProjectKey("{projectKey}")
* .products()
* .search()
* .head()
* .execute()
* }</code></pre>
* </div>
*/
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class ByProjectKeyProductsSearchHead
extends TypeApiMethod<ByProjectKeyProductsSearchHead, com.fasterxml.jackson.databind.JsonNode>
implements com.commercetools.api.client.ErrorableTrait<ByProjectKeyProductsSearchHead>,
com.commercetools.api.client.Deprecatable200Trait<ByProjectKeyProductsSearchHead> {

@Override
public TypeReference<com.fasterxml.jackson.databind.JsonNode> resultType() {
return new TypeReference<com.fasterxml.jackson.databind.JsonNode>() {
};
}

private String projectKey;

public ByProjectKeyProductsSearchHead(final ApiHttpClient apiHttpClient, String projectKey) {
super(apiHttpClient);
this.projectKey = projectKey;
}

public ByProjectKeyProductsSearchHead(ByProjectKeyProductsSearchHead t) {
super(t);
this.projectKey = t.projectKey;
}

@Override
protected ApiHttpRequest buildHttpRequest() {
List<String> params = new ArrayList<>(getQueryParamUriStrings());
String httpRequestPath = String.format("%s/products/search", this.projectKey);
if (!params.isEmpty()) {
httpRequestPath += "?" + String.join("&", params);
}
return new ApiHttpRequest(ApiHttpMethod.HEAD, URI.create(httpRequestPath), getHeaders(), null);
}

@Override
public ApiHttpResponse<com.fasterxml.jackson.databind.JsonNode> executeBlocking(final ApiHttpClient client,
final Duration timeout) {
return executeBlocking(client, timeout, com.fasterxml.jackson.databind.JsonNode.class);
}

@Override
public CompletableFuture<ApiHttpResponse<com.fasterxml.jackson.databind.JsonNode>> execute(
final ApiHttpClient client) {
return execute(client, com.fasterxml.jackson.databind.JsonNode.class);
}

public String getProjectKey() {
return this.projectKey;
}

public void setProjectKey(final String projectKey) {
this.projectKey = projectKey;
}

@Override
public boolean equals(Object o) {
if (this == o)
return true;

if (o == null || getClass() != o.getClass())
return false;

ByProjectKeyProductsSearchHead that = (ByProjectKeyProductsSearchHead) o;

return new EqualsBuilder().append(projectKey, that.projectKey).isEquals();
}

@Override
public int hashCode() {
return new HashCodeBuilder(17, 37).append(projectKey).toHashCode();
}

@Override
protected ByProjectKeyProductsSearchHead copy() {
return new ByProjectKeyProductsSearchHead(this);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@

package com.commercetools.api.client;

import java.net.URI;
import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CompletableFuture;

import com.fasterxml.jackson.core.type.TypeReference;

import io.vrap.rmf.base.client.*;
import io.vrap.rmf.base.client.utils.Generated;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
*
*
* <hr>
* <div class=code-example>
* <pre><code class='java'>{@code
* CompletableFuture<ApiHttpResponse<com.commercetools.api.models.product_search.ProductPagedSearchResponse>> result = apiRoot
* .withProjectKey("{projectKey}")
* .products()
* .search()
* .post(null)
* .execute()
* }</code></pre>
* </div>
*/
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class ByProjectKeyProductsSearchPost extends
TypeBodyApiMethod<ByProjectKeyProductsSearchPost, com.commercetools.api.models.product_search.ProductPagedSearchResponse, com.commercetools.api.models.product_search.ProductSearchRequest>
implements com.commercetools.api.client.ErrorableTrait<ByProjectKeyProductsSearchPost> {

@Override
public TypeReference<com.commercetools.api.models.product_search.ProductPagedSearchResponse> resultType() {
return new TypeReference<com.commercetools.api.models.product_search.ProductPagedSearchResponse>() {
};
}

private String projectKey;

private com.commercetools.api.models.product_search.ProductSearchRequest productSearchRequest;

public ByProjectKeyProductsSearchPost(final ApiHttpClient apiHttpClient, String projectKey,
com.commercetools.api.models.product_search.ProductSearchRequest productSearchRequest) {
super(apiHttpClient);
this.projectKey = projectKey;
this.productSearchRequest = productSearchRequest;
}

public ByProjectKeyProductsSearchPost(ByProjectKeyProductsSearchPost t) {
super(t);
this.projectKey = t.projectKey;
this.productSearchRequest = t.productSearchRequest;
}

@Override
protected ApiHttpRequest buildHttpRequest() {
List<String> params = new ArrayList<>(getQueryParamUriStrings());
String httpRequestPath = String.format("%s/products/search", this.projectKey);
if (!params.isEmpty()) {
httpRequestPath += "?" + String.join("&", params);
}
return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(),
io.vrap.rmf.base.client.utils.json.JsonUtils
.executing(() -> apiHttpClient().getSerializerService().toJsonByteArray(productSearchRequest)));

}

@Override
public ApiHttpResponse<com.commercetools.api.models.product_search.ProductPagedSearchResponse> executeBlocking(
final ApiHttpClient client, final Duration timeout) {
return executeBlocking(client, timeout,
com.commercetools.api.models.product_search.ProductPagedSearchResponse.class);
}

@Override
public CompletableFuture<ApiHttpResponse<com.commercetools.api.models.product_search.ProductPagedSearchResponse>> execute(
final ApiHttpClient client) {
return execute(client, com.commercetools.api.models.product_search.ProductPagedSearchResponse.class);
}

public String getProjectKey() {
return this.projectKey;
}

public void setProjectKey(final String projectKey) {
this.projectKey = projectKey;
}

public com.commercetools.api.models.product_search.ProductSearchRequest getBody() {
return productSearchRequest;
}

public ByProjectKeyProductsSearchPost withBody(
com.commercetools.api.models.product_search.ProductSearchRequest productSearchRequest) {
ByProjectKeyProductsSearchPost t = copy();
t.productSearchRequest = productSearchRequest;
return t;
}

@Override
public boolean equals(Object o) {
if (this == o)
return true;

if (o == null || getClass() != o.getClass())
return false;

ByProjectKeyProductsSearchPost that = (ByProjectKeyProductsSearchPost) o;

return new EqualsBuilder().append(projectKey, that.projectKey)
.append(productSearchRequest, that.productSearchRequest)
.isEquals();
}

@Override
public int hashCode() {
return new HashCodeBuilder(17, 37).append(projectKey).append(productSearchRequest).toHashCode();
}

@Override
protected ByProjectKeyProductsSearchPost copy() {
return new ByProjectKeyProductsSearchPost(this);
}
}
Loading

0 comments on commit daeac7f

Please sign in to comment.