Skip to content

Commit

Permalink
Merge pull request #737 from commercetools/gen-sdk-updates
Browse files Browse the repository at this point in the history
Update generated SDKs
  • Loading branch information
kodiakhq[bot] authored Oct 1, 2024
2 parents cdcb542 + b7069f7 commit 3f58d4f
Show file tree
Hide file tree
Showing 13 changed files with 145 additions and 11 deletions.
1 change: 1 addition & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- added property `attributes` to type `ProductVariantTailoringDraft`
- added property `attributes` to type `ProductTailoringAddVariantAction`
- added property `warnings` to type `Product`
- added property `customers` to type `SearchIndexingConfiguration`
</details>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2618,6 +2618,10 @@ input ChangeProjectSettingsCurrencies {
currencies: [Currency!]!
}

input ChangeProjectSettingsCustomerSearchStatus {
status: CustomerSearchStatus!
}

input ChangeProjectSettingsLanguages {
languages: [Locale!]!
}
Expand Down Expand Up @@ -3702,6 +3706,17 @@ type CustomerQueryResult {
results: [Customer!]!
}

type CustomerSearchConfiguration {
status: CustomerSearchStatus!
lastModifiedAt: DateTime!
lastModifiedBy: Initiator
}

enum CustomerSearchStatus {
Activated
Deactivated
}

input CustomerSignInDraft {
email: String!
password: String!
Expand Down Expand Up @@ -8993,6 +9008,7 @@ input ProjectSettingsUpdateAction {
changeCountries: ChangeProjectSettingsCountries
changeCountryTaxRateFallbackEnabled: ChangeProjectSettingsCountryTaxRateFallbackEnabled
changeCurrencies: ChangeProjectSettingsCurrencies
changeCustomerSearchStatus: ChangeProjectSettingsCustomerSearchStatus
changeLanguages: ChangeProjectSettingsLanguages
changeMessagesConfiguration: ChangeProjectSettingsMessagesConfiguration
changeMessagesEnabled: ChangeProjectSettingsMessagesEnabled
Expand Down Expand Up @@ -10397,6 +10413,7 @@ input SearchFilterModelInput {
type SearchIndexingConfiguration {
products: SearchIndexingConfigurationValues
orders: OrderSearchConfiguration
customers: CustomerSearchConfiguration
}

type SearchIndexingConfigurationValues {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <p>Checks whether a search index for the Project's Customers exists. Returns a <code>200 OK</code> status if the index exists or <code>404 Not Found</code> otherwise.</p>
* <p>Checks whether a search index of Customers exists for a Project. If an index exists, a <code>200 OK</code> is returned; otherwise, a <code>409 Conflict</code>.</p>
*
* <hr>
* <div class=code-example>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
*
* <p>Returns the indexing status of the Customer Search for a Project.</p>
*
* <hr>
* <div class=code-example>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
*
* <p>A SearchNotReady error is returned if the indexing is in progress or the feature is deactivated. If deactivated, you can reactivate it.</p>
*
* <hr>
* <div class=code-example>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
*
* <p>A SearchNotReady error is returned if the indexing is in progress or the feature is deactivated. If deactivated, you can reactivate it.</p>
*
* <hr>
* <div class=code-example>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
public interface CustomerSearchStatus extends JsonEnum {

/**
<p>indicates that the Customer Search endpoint is fully operational.</p> */
<p>indicates that the Customer Search feature is fully operational.</p> */
CustomerSearchStatus ACTIVATED = CustomerSearchStatusEnum.ACTIVATED;
/**
<p>indicates that the Customer Search enpoint is currently not active.</p> */
<p>indicates that the Customer Search feature is currently not active.</p> */
CustomerSearchStatus DEACTIVATED = CustomerSearchStatusEnum.DEACTIVATED;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ public interface SearchIndexingConfiguration {
@JsonProperty("orders")
public SearchIndexingConfigurationValues getOrders();

/**
* <p>Configuration for the Customer Search feature.</p>
* @return customers
*/
@Valid
@JsonProperty("customers")
public SearchIndexingConfigurationValues getCustomers();

/**
* <p>Configuration for the Product Projection Search and Product Suggestions endpoints.</p>
* @param products value to be set
Expand All @@ -75,6 +83,13 @@ public interface SearchIndexingConfiguration {

public void setOrders(final SearchIndexingConfigurationValues orders);

/**
* <p>Configuration for the Customer Search feature.</p>
* @param customers value to be set
*/

public void setCustomers(final SearchIndexingConfigurationValues customers);

/**
* factory method
* @return instance of SearchIndexingConfiguration
Expand All @@ -93,6 +108,7 @@ public static SearchIndexingConfiguration of(final SearchIndexingConfiguration t
instance.setProducts(template.getProducts());
instance.setProductsSearch(template.getProductsSearch());
instance.setOrders(template.getOrders());
instance.setCustomers(template.getCustomers());
return instance;
}

Expand All @@ -113,6 +129,8 @@ public static SearchIndexingConfiguration deepCopy(@Nullable final SearchIndexin
.deepCopy(template.getProductsSearch()));
instance.setOrders(
com.commercetools.api.models.project.SearchIndexingConfigurationValues.deepCopy(template.getOrders()));
instance.setCustomers(
com.commercetools.api.models.project.SearchIndexingConfigurationValues.deepCopy(template.getCustomers()));
return instance;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public class SearchIndexingConfigurationBuilder implements Builder<SearchIndexin
@Nullable
private com.commercetools.api.models.project.SearchIndexingConfigurationValues orders;

@Nullable
private com.commercetools.api.models.project.SearchIndexingConfigurationValues customers;

/**
* <p>Configuration for the Product Projection Search and Product Suggestions endpoints.</p>
* @param builder function to build the products value
Expand Down Expand Up @@ -147,6 +150,45 @@ public SearchIndexingConfigurationBuilder orders(
return this;
}

/**
* <p>Configuration for the Customer Search feature.</p>
* @param builder function to build the customers value
* @return Builder
*/

public SearchIndexingConfigurationBuilder customers(
Function<com.commercetools.api.models.project.SearchIndexingConfigurationValuesBuilder, com.commercetools.api.models.project.SearchIndexingConfigurationValuesBuilder> builder) {
this.customers = builder
.apply(com.commercetools.api.models.project.SearchIndexingConfigurationValuesBuilder.of())
.build();
return this;
}

/**
* <p>Configuration for the Customer Search feature.</p>
* @param builder function to build the customers value
* @return Builder
*/

public SearchIndexingConfigurationBuilder withCustomers(
Function<com.commercetools.api.models.project.SearchIndexingConfigurationValuesBuilder, com.commercetools.api.models.project.SearchIndexingConfigurationValues> builder) {
this.customers = builder
.apply(com.commercetools.api.models.project.SearchIndexingConfigurationValuesBuilder.of());
return this;
}

/**
* <p>Configuration for the Customer Search feature.</p>
* @param customers value to be set
* @return Builder
*/

public SearchIndexingConfigurationBuilder customers(
@Nullable final com.commercetools.api.models.project.SearchIndexingConfigurationValues customers) {
this.customers = customers;
return this;
}

/**
* <p>Configuration for the Product Projection Search and Product Suggestions endpoints.</p>
* @return products
Expand Down Expand Up @@ -177,20 +219,30 @@ public com.commercetools.api.models.project.SearchIndexingConfigurationValues ge
return this.orders;
}

/**
* <p>Configuration for the Customer Search feature.</p>
* @return customers
*/

@Nullable
public com.commercetools.api.models.project.SearchIndexingConfigurationValues getCustomers() {
return this.customers;
}

/**
* builds SearchIndexingConfiguration with checking for non-null required values
* @return SearchIndexingConfiguration
*/
public SearchIndexingConfiguration build() {
return new SearchIndexingConfigurationImpl(products, productsSearch, orders);
return new SearchIndexingConfigurationImpl(products, productsSearch, orders, customers);
}

/**
* builds SearchIndexingConfiguration without checking for non-null required values
* @return SearchIndexingConfiguration
*/
public SearchIndexingConfiguration buildUnchecked() {
return new SearchIndexingConfigurationImpl(products, productsSearch, orders);
return new SearchIndexingConfigurationImpl(products, productsSearch, orders, customers);
}

/**
Expand All @@ -211,6 +263,7 @@ public static SearchIndexingConfigurationBuilder of(final SearchIndexingConfigur
builder.products = template.getProducts();
builder.productsSearch = template.getProductsSearch();
builder.orders = template.getOrders();
builder.customers = template.getCustomers();
return builder;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,21 @@ public class SearchIndexingConfigurationImpl implements SearchIndexingConfigurat

private com.commercetools.api.models.project.SearchIndexingConfigurationValues orders;

private com.commercetools.api.models.project.SearchIndexingConfigurationValues customers;

/**
* create instance with all properties
*/
@JsonCreator
SearchIndexingConfigurationImpl(
@JsonProperty("products") final com.commercetools.api.models.project.SearchIndexingConfigurationValues products,
@JsonProperty("productsSearch") final com.commercetools.api.models.project.SearchIndexingConfigurationValues productsSearch,
@JsonProperty("orders") final com.commercetools.api.models.project.SearchIndexingConfigurationValues orders) {
@JsonProperty("orders") final com.commercetools.api.models.project.SearchIndexingConfigurationValues orders,
@JsonProperty("customers") final com.commercetools.api.models.project.SearchIndexingConfigurationValues customers) {
this.products = products;
this.productsSearch = productsSearch;
this.orders = orders;
this.customers = customers;
}

/**
Expand Down Expand Up @@ -71,6 +75,14 @@ public com.commercetools.api.models.project.SearchIndexingConfigurationValues ge
return this.orders;
}

/**
* <p>Configuration for the Customer Search feature.</p>
*/

public com.commercetools.api.models.project.SearchIndexingConfigurationValues getCustomers() {
return this.customers;
}

public void setProducts(final com.commercetools.api.models.project.SearchIndexingConfigurationValues products) {
this.products = products;
}
Expand All @@ -84,6 +96,10 @@ public void setOrders(final com.commercetools.api.models.project.SearchIndexingC
this.orders = orders;
}

public void setCustomers(final com.commercetools.api.models.project.SearchIndexingConfigurationValues customers) {
this.customers = customers;
}

@Override
public boolean equals(Object o) {
if (this == o)
Expand All @@ -97,22 +113,29 @@ public boolean equals(Object o) {
return new EqualsBuilder().append(products, that.products)
.append(productsSearch, that.productsSearch)
.append(orders, that.orders)
.append(customers, that.customers)
.append(products, that.products)
.append(productsSearch, that.productsSearch)
.append(orders, that.orders)
.append(customers, that.customers)
.isEquals();
}

@Override
public int hashCode() {
return new HashCodeBuilder(17, 37).append(products).append(productsSearch).append(orders).toHashCode();
return new HashCodeBuilder(17, 37).append(products)
.append(productsSearch)
.append(orders)
.append(customers)
.toHashCode();
}

@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("products", products)
.append("productsSearch", productsSearch)
.append("orders", orders)
.append("customers", customers)
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,14 @@ public CombinationQueryPredicate<SearchIndexingConfigurationQueryBuilderDsl> ord
SearchIndexingConfigurationQueryBuilderDsl::of);
}

public CombinationQueryPredicate<SearchIndexingConfigurationQueryBuilderDsl> customers(
Function<com.commercetools.api.predicates.query.project.SearchIndexingConfigurationValuesQueryBuilderDsl, CombinationQueryPredicate<com.commercetools.api.predicates.query.project.SearchIndexingConfigurationValuesQueryBuilderDsl>> fn) {
return new CombinationQueryPredicate<>(ContainerQueryPredicate.of()
.parent(ConstantQueryPredicate.of().constant("customers"))
.inner(fn.apply(
com.commercetools.api.predicates.query.project.SearchIndexingConfigurationValuesQueryBuilderDsl
.of())),
SearchIndexingConfigurationQueryBuilderDsl::of);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ public static Object[][] objectBuilder() {
.productsSearch(
new com.commercetools.api.models.project.SearchIndexingConfigurationValuesImpl()) },
new Object[] { SearchIndexingConfiguration.builder()
.orders(new com.commercetools.api.models.project.SearchIndexingConfigurationValuesImpl()) } };
.orders(new com.commercetools.api.models.project.SearchIndexingConfigurationValuesImpl()) },
new Object[] { SearchIndexingConfiguration.builder()
.customers(
new com.commercetools.api.models.project.SearchIndexingConfigurationValuesImpl()) } };
}

@Test
Expand All @@ -57,4 +60,12 @@ public void orders() {
Assertions.assertThat(value.getOrders())
.isEqualTo(new com.commercetools.api.models.project.SearchIndexingConfigurationValuesImpl());
}

@Test
public void customers() {
SearchIndexingConfiguration value = SearchIndexingConfiguration.of();
value.setCustomers(new com.commercetools.api.models.project.SearchIndexingConfigurationValuesImpl());
Assertions.assertThat(value.getCustomers())
.isEqualTo(new com.commercetools.api.models.project.SearchIndexingConfigurationValuesImpl());
}
}
1 change: 1 addition & 0 deletions references.txt
Original file line number Diff line number Diff line change
Expand Up @@ -309,3 +309,4 @@ d947f454821e0834a2c8a8605d4a0f3347c11d4e
efc70952597a3160e6bb47891894b109bd82b7c3
4ee8b39787eb0f0b2d025520acdaa022122bd617
c77ec902f368c2c31505fcb65a835ce148350077
903922e6a2dc0ff9283757645395f5119f61be0e

0 comments on commit 3f58d4f

Please sign in to comment.