Skip to content

Commit 0cde03b

Browse files
committed
update builders
1 parent ccc857e commit 0cde03b

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

packages/client/src/builders/search/contentHighlightingBuilder.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ContentHighlightProps, ContentSearchSettingsHighlightSettings, HighlightSettings2ContentContentHighlightPropsHighlightSettings2Limits, HighlightSettings2ContentContentHighlightPropsHighlightSettings2ResponseShape, HighlightSettings2ContentContentHighlightPropsHighlightSettings2TextSnippetsSettings } from '../../models/data-contracts';
1+
import { ContentHighlightProps, ContentSearchSettingsHighlightSettings, HighlightSettings2ContentContentHighlightPropsHighlightSettings2Limits, HighlightSettings2ContentContentHighlightPropsHighlightSettings2ResponseShape } from '../../models/data-contracts';
22

33
export class ContentHighlightingBuilder {
44
private enabledState: boolean = true;
@@ -7,9 +7,7 @@ export class ContentHighlightingBuilder {
77
displayName: false
88
};
99
private limit: HighlightSettings2ContentContentHighlightPropsHighlightSettings2Limits = {};
10-
private shape: HighlightSettings2ContentContentHighlightPropsHighlightSettings2ResponseShape = {
11-
includeOffsets: false
12-
};
10+
private shape: HighlightSettings2ContentContentHighlightPropsHighlightSettings2ResponseShape = { };
1311

1412
public enabled(enabled: boolean): this {
1513
this.enabledState = enabled;
@@ -30,9 +28,8 @@ export class ContentHighlightingBuilder {
3028
return this;
3129
}
3230

33-
public setShape(shape: { includeOffsets: boolean, textSnippets?: HighlightSettings2ContentContentHighlightPropsHighlightSettings2TextSnippetsSettings }): this {
34-
this.shape.includeOffsets = shape.includeOffsets;
35-
this.shape.textSnippets = shape.textSnippets;
31+
public setShape(shape: HighlightSettings2ContentContentHighlightPropsHighlightSettings2ResponseShape): this {
32+
this.shape = shape;
3633

3734
return this;
3835
}

packages/client/src/builders/search/productHighlightingBuilder.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { HighlightSettings2ProductProductHighlightPropsHighlightSettings2Limits, HighlightSettings2ProductProductHighlightPropsHighlightSettings2ResponseShape, HighlightSettings2ProductProductHighlightPropsHighlightSettings2TextSnippetsSettings, ProductHighlightProps, ProductSearchSettingsHighlightSettings } from '../../models/data-contracts';
1+
import { HighlightSettings2ProductProductHighlightPropsHighlightSettings2Limits, HighlightSettings2ProductProductHighlightPropsHighlightSettings2ResponseShape, ProductHighlightProps, ProductSearchSettingsHighlightSettings } from '../../models/data-contracts';
22

33
export class ProductHighlightingBuilder {
44
private enabledState: boolean = true;
@@ -8,7 +8,6 @@ export class ProductHighlightingBuilder {
88
};
99
private limit: HighlightSettings2ProductProductHighlightPropsHighlightSettings2Limits = {};
1010
private shape: HighlightSettings2ProductProductHighlightPropsHighlightSettings2ResponseShape = {
11-
includeOffsets: false
1211
};
1312

1413
public enabled(enabled: boolean): this {
@@ -30,9 +29,8 @@ export class ProductHighlightingBuilder {
3029
return this;
3130
}
3231

33-
public setShape(shape: { includeOffsets: boolean, textSnippets?: HighlightSettings2ProductProductHighlightPropsHighlightSettings2TextSnippetsSettings }): this {
34-
this.shape.includeOffsets = shape.includeOffsets;
35-
this.shape.textSnippets = shape.textSnippets;
32+
public setShape(shape: HighlightSettings2ProductProductHighlightPropsHighlightSettings2ResponseShape): this {
33+
this.shape = shape;
3634

3735
return this;
3836
}

0 commit comments

Comments
 (0)