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
4 changes: 2 additions & 2 deletions packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@relewise/client",
"version": "2.26.0",
"version": "2.27.0",
"description": "Relewise is a next generation personalization SaaS-platform, which offers functionality within product- and content recommendations and personalized search. This official SDK helps you interact with our API.",
"repository": {
"type": "git",
Expand Down Expand Up @@ -58,4 +58,4 @@
"tslib": "^2.8.1",
"typescript": "^6.0.3"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import { FeedCompositionBuilder, FeedCompositionOptions } from './feedCompositio
export class FeedRecommendationInitializationBuilder extends RecommendationRequestBuilder {
private feed: Feed;

constructor(settings: Settings, { minimumPageSize }: { minimumPageSize: number }) {
constructor(settings: Settings, { minimumPageSize, configurationKey }: { minimumPageSize: number, configurationKey?: string | null }) {
super(settings);

this.feed = {
minimumPageSize: minimumPageSize,
configurationKey: configurationKey,
compositions: [],
allowProductsCurrentlyInCart: false,
recommendVariant: false
Expand Down Expand Up @@ -106,6 +107,16 @@ export class FeedRecommendationInitializationBuilder extends RecommendationReque
return this;
}

/**
* Defines a configuration to be used for this feed.
* @param configurationKey
*/
public configurationKey(configurationKey: string | null = null): this {
this.feed.configurationKey = configurationKey;

return this;
}

public build() {
const request: FeedRecommendationInitializationRequest = {
$type: 'Relewise.Client.Requests.Recommendations.Feed.FeedRecommendationInitializationRequest, Relewise.Client',
Expand Down
Loading