diff --git a/packages/client/src/builders/recommendation/brands/brandSettingsRecommendationBuilder.ts b/packages/client/src/builders/recommendation/brands/brandSettingsRecommendationBuilder.ts index 8297c75..fa3b672 100644 --- a/packages/client/src/builders/recommendation/brands/brandSettingsRecommendationBuilder.ts +++ b/packages/client/src/builders/recommendation/brands/brandSettingsRecommendationBuilder.ts @@ -15,8 +15,12 @@ export class BrandSettingsRecommendationBuilder extends RecommendationRequestBui super(settings); } - public setSelectedBrandProperties(brandProperties: Partial): this { - this.recommendationSettings.selectedBrandProperties = brandProperties as SelectedBrandPropertiesSettings; + /** + * Select the properties of the brand to be returned, by default only the brand id is returned. + * @param brandProperties + */ + public setSelectedBrandProperties(brandProperties: Partial | null): this { + this.recommendationSettings.selectedBrandProperties = brandProperties as SelectedBrandPropertiesSettings | null; return this; } diff --git a/packages/client/src/builders/recommendation/content-categories/contentCategorySettingsRecommendationBuilder.ts b/packages/client/src/builders/recommendation/content-categories/contentCategorySettingsRecommendationBuilder.ts index b25bca2..0713ee3 100644 --- a/packages/client/src/builders/recommendation/content-categories/contentCategorySettingsRecommendationBuilder.ts +++ b/packages/client/src/builders/recommendation/content-categories/contentCategorySettingsRecommendationBuilder.ts @@ -15,12 +15,16 @@ export class ContentCategorySettingsRecommendationBuilder extends Recommendation super(settings); } - public setSelectedContentCategoryProperties(ContentCategoryProperties: Partial): this { - this.recommendationSettings.selectedContentCategoryProperties = ContentCategoryProperties as SelectedContentCategoryPropertiesSettings; + /** + * Select the properties of the content category to be returned, by default only the content category id is returned. + * @param contentCategoryProperties + */ + public setSelectedContentCategoryProperties(contentCategoryProperties: Partial | null): this { + this.recommendationSettings.selectedContentCategoryProperties = contentCategoryProperties as SelectedContentCategoryPropertiesSettings | null; return this; } - + public setNumberOfRecommendations(count: number): this { this.recommendationSettings.numberOfRecommendations = count; diff --git a/packages/client/src/builders/recommendation/contents/contentSettingsRecommendationBuilder.ts b/packages/client/src/builders/recommendation/contents/contentSettingsRecommendationBuilder.ts index 4ee366d..47c1810 100644 --- a/packages/client/src/builders/recommendation/contents/contentSettingsRecommendationBuilder.ts +++ b/packages/client/src/builders/recommendation/contents/contentSettingsRecommendationBuilder.ts @@ -15,8 +15,12 @@ export class ContentSettingsRecommendationBuilder extends RecommendationRequestB super(settings); } - public setSelectedContentProperties(contentProperties: Partial): this { - this.recommendationSettings.selectedContentProperties = contentProperties as SelectedContentPropertiesSettings; + /** + * Select the properties of the content to be returned, by default only the content id is returned. + * @param contentProperties + */ + public setSelectedContentProperties(contentProperties: Partial | null): this { + this.recommendationSettings.selectedContentProperties = contentProperties as SelectedContentPropertiesSettings | null; return this; } diff --git a/packages/client/src/builders/recommendation/products/productSettingsRecommendationBuilder.ts b/packages/client/src/builders/recommendation/products/productSettingsRecommendationBuilder.ts index df8041f..2a34464 100644 --- a/packages/client/src/builders/recommendation/products/productSettingsRecommendationBuilder.ts +++ b/packages/client/src/builders/recommendation/products/productSettingsRecommendationBuilder.ts @@ -16,20 +16,32 @@ export class ProductSettingsRecommendationBuilder extends RecommendationRequestB super(settings); } - public setSelectedProductProperties(productProperties: Partial): this { - this.recommendationSettings.selectedProductProperties = productProperties as SelectedProductPropertiesSettings; + /** + * Select the properties of the product to be returned, by default only the product id is returned. + * @param productProperties + */ + public setSelectedProductProperties(productProperties: Partial | null): this { + this.recommendationSettings.selectedProductProperties = productProperties as SelectedProductPropertiesSettings | null; return this; } - public setSelectedVariantProperties(variantProperties: Partial): this { - this.recommendationSettings.selectedVariantProperties = variantProperties as SelectedVariantPropertiesSettings; + /** + * Select the properties of the variant to be returned, by default only the variant id is returned. + * @param variantProperties + */ + public setSelectedVariantProperties(variantProperties: Partial | null): this { + this.recommendationSettings.selectedVariantProperties = variantProperties as SelectedVariantPropertiesSettings | null; return this; } - public setSelectedBrandProperties(brandProperties: Partial): this { - this.recommendationSettings.selectedBrandProperties = brandProperties as SelectedBrandPropertiesSettings; + /** + * Select the properties of the brand to be returned, by default only the brand id is returned. + * @param brandProperties + */ + public setSelectedBrandProperties(brandProperties: Partial | null): this { + this.recommendationSettings.selectedBrandProperties = brandProperties as SelectedBrandPropertiesSettings | null; return this; } diff --git a/packages/client/src/builders/search/productCategorySearchBuilder.ts b/packages/client/src/builders/search/productCategorySearchBuilder.ts index 69ecfc0..9125a90 100644 --- a/packages/client/src/builders/search/productCategorySearchBuilder.ts +++ b/packages/client/src/builders/search/productCategorySearchBuilder.ts @@ -21,8 +21,12 @@ export class ProductCategorySearchBuilder extends SearchRequestBuilder implement super(settings) } - public setSelectedCategoryProperties(productCategoryProperties: Partial): this { - this.searchSettings.selectedCategoryProperties = productCategoryProperties as SelectedProductCategoryPropertiesSettings; + /** + * Select the properties of the product category to be returned, by default only the product category id is returned. + * @param productCategoryProperties + */ + public setSelectedCategoryProperties(productCategoryProperties: Partial | null): this { + this.searchSettings.selectedCategoryProperties = productCategoryProperties as SelectedProductCategoryPropertiesSettings | null; return this; } diff --git a/packages/client/src/builders/search/productSearchBuilder.ts b/packages/client/src/builders/search/productSearchBuilder.ts index 1294e9b..f3f4eda 100644 --- a/packages/client/src/builders/search/productSearchBuilder.ts +++ b/packages/client/src/builders/search/productSearchBuilder.ts @@ -21,20 +21,32 @@ export class ProductSearchBuilder extends SearchRequestBuilder implements Search super(settings) } - public setSelectedProductProperties(productProperties: Partial): this { - this.searchSettings.selectedProductProperties = productProperties as SelectedProductPropertiesSettings; + /** + * Select the properties of the product to be returned, by default only the product id is returned. + * @param productProperties + */ + public setSelectedProductProperties(productProperties: Partial | null): this { + this.searchSettings.selectedProductProperties = productProperties as SelectedProductPropertiesSettings | null; return this; } - public setSelectedVariantProperties(variantProperties: Partial): this { - this.searchSettings.selectedVariantProperties = variantProperties as SelectedVariantPropertiesSettings; + /** + * Select the properties of the variant to be returned, by default only the variant id is returned. + * @param variantProperties + */ + public setSelectedVariantProperties(variantProperties: Partial | null): this { + this.searchSettings.selectedVariantProperties = variantProperties as SelectedVariantPropertiesSettings | null; return this; } - public setSelectedBrandProperties(brandProperties: Partial): this { - this.searchSettings.selectedBrandProperties = brandProperties as SelectedBrandPropertiesSettings; + /** + * Select the properties of the brand to be returned, by default only the brand id is returned. + * @param brandProperties + */ + public setSelectedBrandProperties(brandProperties: Partial | null): this { + this.searchSettings.selectedBrandProperties = brandProperties as SelectedBrandPropertiesSettings | null; return this; }