Skip to content
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
55 changes: 20 additions & 35 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,47 @@
**Api changes**

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

- added resource `/{projectKey}/channels/key={key}`
</details>


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

- added method `apiRoot.withProjectKey().channels().withKey().get()`
- added method `apiRoot.withProjectKey().channels().withKey().head()`
- added method `apiRoot.withProjectKey().channels().withKey().post()`
- added method `apiRoot.withProjectKey().channels().withKey().delete()`
- :warning: changed property `exact` of type `SearchExactExpression` from type `SearchAnyValue` to `SearchExactValue`
</details>


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

- added type `CartDiscountPatternTarget`
- added type `CountOnCustomLineItemUnits`
- added type `CountOnLineItemUnits`
- added type `PatternComponent`
- added type `ShoppingListLineItemAddedMessage`
- added type `ShoppingListLineItemRemovedMessage`
- added type `ShoppingListMessage`
- added type `ShoppingListLineItemAddedMessagePayload`
- added type `ShoppingListLineItemRemovedMessagePayload`
- added type `ShoppingListMessagePayload`
- added property `businessUnits` to type `SearchIndexingConfiguration`
</details>


<details>
<summary>Added Enum(s)</summary>
<summary>Added Resource(s)</summary>

- added enum `Canceled` to type `ShipmentState`
- added enum `shopping-list` to type `MessageSubscriptionResourceTypeId`
- added resource `/{projectKey}/business-units/search`
- added resource `/{projectKey}/business-units/search/indexing-status`
</details>


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

- added property `applicationMode` to type `CartDiscountValueFixed`
- added property `applicationMode` to type `CartDiscountValueFixedDraft`
- added property `custom` to type `CartSetCustomShippingMethodAction`
- added property `custom` to type `StagedOrderSetCustomShippingMethodAction`
- added property `custom` to type `StagedOrderSetShippingAddressAndCustomShippingMethodAction`
- added method `apiRoot.withProjectKey().businessUnits().search().post()`
- added method `apiRoot.withProjectKey().businessUnits().search().head()`
- added method `apiRoot.withProjectKey().businessUnits().searchIndexingStatus().get()`
</details>

**History changes**

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

- added type `ChangeTargetPatternChangeValue`
- added type `PatternComponent`
- added type `BusinessUnitIndexingProgress`
- added type `BusinessUnitIndexingStatus`
- added type `BusinessUnitPagedSearchResponse`
- added type `BusinessUnitSearchIndexingStatusResponse`
- added type `BusinessUnitSearchRequest`
- added type `BusinessUnitSearchResult`
- added type `BusinessUnitSearchStatus`
- added type `ProjectChangeBusinessUnitSearchStatusAction`
- added type `SearchExactValue`
</details>

Original file line number Diff line number Diff line change
Expand Up @@ -1596,6 +1596,19 @@ type BusinessUnitQueryResult {
results: [BusinessUnit!]!
}

"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
type BusinessUnitSearchConfiguration {
status: BusinessUnitSearchStatus!
lastModifiedAt: DateTime!
lastModifiedBy: Initiator
}

"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
enum BusinessUnitSearchStatus {
Activated
Deactivated
}

type BusinessUnitShippingAddressAdded implements MessagePayload {
address: Address!
type: String!
Expand Down Expand Up @@ -2626,6 +2639,11 @@ input ChangeProductTailoringAssetOrder {
assetOrder: [String!]!
}

"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
input ChangeProjectSettingsBusinessUnitSearchStatus {
status: BusinessUnitSearchStatus!
}

input ChangeProjectSettingsCartsConfiguration {
cartsConfiguration: CartsConfigurationInput!
}
Expand Down Expand Up @@ -9114,6 +9132,9 @@ input ProjectSettingsUpdateAction {

"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
setMyBusinessUnitAssociateRoleOnCreation: SetProjectSettingsMyBusinessUnitAssociateRoleOnCreation

"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
changeBusinessUnitSearchStatus: ChangeProjectSettingsBusinessUnitSearchStatus
changeProductSearchIndexingEnabled: ChangeProjectSettingsProductSearchIndexingEnabled
}

Expand Down Expand Up @@ -10507,6 +10528,9 @@ type SearchIndexingConfiguration {
products: SearchIndexingConfigurationValues
orders: OrderSearchConfiguration
customers: CustomerSearchConfiguration

"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
businessUnits: BusinessUnitSearchConfiguration
}

type SearchIndexingConfigurationValues {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,12 @@ public ByProjectKeyBusinessUnitsByIDRequestBuilder withId(String ID) {
return new ByProjectKeyBusinessUnitsByIDRequestBuilder(apiHttpClient, projectKey, ID);
}

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

public ByProjectKeyBusinessUnitsSearchIndexingStatusRequestBuilder searchIndexingStatus() {
return new ByProjectKeyBusinessUnitsSearchIndexingStatusRequestBuilder(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 of Business Units exists for a Project. Returns a <code>200 OK</code> if an index exists; otherwise, returns a <code>409 Conflict</code>.</p>
*
* <hr>
* <div class=code-example>
* <pre><code class='java'>{@code
* CompletableFuture<ApiHttpResponse<com.fasterxml.jackson.databind.JsonNode>> result = apiRoot
* .withProjectKey("{projectKey}")
* .businessUnits()
* .search()
* .head()
* .execute()
* }</code></pre>
* </div>
*/
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class ByProjectKeyBusinessUnitsSearchHead
extends TypeApiMethod<ByProjectKeyBusinessUnitsSearchHead, com.fasterxml.jackson.databind.JsonNode>
implements com.commercetools.api.client.ErrorableTrait<ByProjectKeyBusinessUnitsSearchHead>,
com.commercetools.api.client.Deprecatable200Trait<ByProjectKeyBusinessUnitsSearchHead> {

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

private String projectKey;

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

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

@Override
protected ApiHttpRequest buildHttpRequest() {
List<String> params = new ArrayList<>(getQueryParamUriStrings());
String httpRequestPath = String.format("%s/business-units/search", encodePathParam(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;

ByProjectKeyBusinessUnitsSearchHead that = (ByProjectKeyBusinessUnitsSearchHead) o;

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

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

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

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>Returns the indexing status of the Business Unit Search for a Project.</p>
*
* <hr>
* <div class=code-example>
* <pre><code class='java'>{@code
* CompletableFuture<ApiHttpResponse<com.commercetools.api.models.business_unit_search.BusinessUnitSearchIndexingStatusResponse>> result = apiRoot
* .withProjectKey("{projectKey}")
* .businessUnits()
* .searchIndexingStatus()
* .get()
* .execute()
* }</code></pre>
* </div>
*/
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class ByProjectKeyBusinessUnitsSearchIndexingStatusGet extends
TypeApiMethod<ByProjectKeyBusinessUnitsSearchIndexingStatusGet, com.commercetools.api.models.business_unit_search.BusinessUnitSearchIndexingStatusResponse>
implements com.commercetools.api.client.ErrorableTrait<ByProjectKeyBusinessUnitsSearchIndexingStatusGet>,
com.commercetools.api.client.Deprecatable200Trait<ByProjectKeyBusinessUnitsSearchIndexingStatusGet> {

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

private String projectKey;

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

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

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

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

@Override
public CompletableFuture<ApiHttpResponse<com.commercetools.api.models.business_unit_search.BusinessUnitSearchIndexingStatusResponse>> execute(
final ApiHttpClient client) {
return execute(client,
com.commercetools.api.models.business_unit_search.BusinessUnitSearchIndexingStatusResponse.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;

ByProjectKeyBusinessUnitsSearchIndexingStatusGet that = (ByProjectKeyBusinessUnitsSearchIndexingStatusGet) o;

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

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

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

package com.commercetools.api.client;

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

@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class ByProjectKeyBusinessUnitsSearchIndexingStatusRequestBuilder {

private final ApiHttpClient apiHttpClient;
private final String projectKey;

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

public ByProjectKeyBusinessUnitsSearchIndexingStatusGet get() {
return new ByProjectKeyBusinessUnitsSearchIndexingStatusGet(apiHttpClient, projectKey);
}

}
Loading
Loading