Skip to content

Commit 683c9a3

Browse files
algolia-botmillotp
andcommitted
chore: generated code for commit 23a72c39. [skip ci]
algolia/api-clients-automation@23a72c3 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent 046709e commit 683c9a3

21 files changed

+156
-93
lines changed
Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,3 @@
1-
import type { MatchLevel } from './matchLevel';
1+
import type { HighlightResultOption } from './highlightResultOption';
22

3-
/**
4-
* Highlighted attributes.
5-
*/
6-
export type HighlightResult = {
7-
/**
8-
* Markup text with occurrences highlighted.
9-
*/
10-
value?: string;
11-
matchLevel?: MatchLevel;
12-
/**
13-
* List of words from the query that matched the object.
14-
*/
15-
matchedWords?: string[];
16-
/**
17-
* Whether the entire attribute value is highlighted.
18-
*/
19-
fullyHighlighted?: boolean;
20-
};
3+
export type HighlightResult = HighlightResultOption | HighlightResultOption[];
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import type { MatchLevel } from './matchLevel';
2+
3+
/**
4+
* Show highlighted section and words matched on a query.
5+
*/
6+
export type HighlightResultOption = {
7+
/**
8+
* Markup text with occurrences highlighted.
9+
*/
10+
value: string;
11+
matchLevel: MatchLevel;
12+
/**
13+
* List of words from the query that matched the object.
14+
*/
15+
matchedWords: string[];
16+
/**
17+
* Whether the entire attribute value is highlighted.
18+
*/
19+
fullyHighlighted?: boolean;
20+
};

packages/algoliasearch/lite/model/hit.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,14 @@ export type Hit = Record<string, any> & {
1010
* Unique identifier of the object.
1111
*/
1212
objectID: string;
13-
_highlightResult?: HighlightResult;
14-
_snippetResult?: SnippetResult;
13+
/**
14+
* Show highlighted section and words matched on a query.
15+
*/
16+
_highlightResult?: Record<string, HighlightResult>;
17+
/**
18+
* Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty.
19+
*/
20+
_snippetResult?: Record<string, SnippetResult>;
1521
_rankingInfo?: RankingInfo;
1622
_distinctSeqID?: number;
1723
};

packages/algoliasearch/lite/model/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export * from './facets';
4040
export * from './facetsStats';
4141
export * from './fetchedIndex';
4242
export * from './highlightResult';
43+
export * from './highlightResultOption';
4344
export * from './hit';
4445
export * from './ignorePlurals';
4546
export * from './indexSettings';
@@ -85,6 +86,7 @@ export * from './searchSynonymsResponse';
8586
export * from './searchTypeDefault';
8687
export * from './searchTypeFacet';
8788
export * from './snippetResult';
89+
export * from './snippetResultOption';
8890
export * from './sortRemainingBy';
8991
export * from './source';
9092
export * from './standardEntries';
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
import type { MatchLevel } from './matchLevel';
1+
import type { SnippetResultOption } from './snippetResultOption';
22

3-
export type SnippetResult = {
4-
/**
5-
* Markup text with occurrences highlighted.
6-
*/
7-
value?: string;
8-
matchLevel?: MatchLevel;
9-
};
3+
export type SnippetResult = SnippetResultOption | SnippetResultOption[];
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import type { MatchLevel } from './matchLevel';
2+
3+
/**
4+
* Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty.
5+
*/
6+
export type SnippetResultOption = {
7+
/**
8+
* Markup text with occurrences highlighted.
9+
*/
10+
value: string;
11+
matchLevel: MatchLevel;
12+
};

packages/algoliasearch/lite/model/synonymHitHighlightResult.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import type { HighlightResult } from './highlightResult';
44
* Highlighted results.
55
*/
66
export type SynonymHitHighlightResult = {
7-
type?: HighlightResult;
8-
synonyms?: HighlightResult[];
7+
/**
8+
* Show highlighted section and words matched on a query.
9+
*/
10+
type?: Record<string, HighlightResult>;
11+
synonyms?: Array<Record<string, HighlightResult>>;
912
};
Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,3 @@
1-
import type { MatchLevel } from './matchLevel';
1+
import type { HighlightResultOption } from './highlightResultOption';
22

3-
/**
4-
* Highlighted attributes.
5-
*/
6-
export type HighlightResult = {
7-
/**
8-
* Markup text with occurrences highlighted.
9-
*/
10-
value?: string;
11-
matchLevel?: MatchLevel;
12-
/**
13-
* List of words from the query that matched the object.
14-
*/
15-
matchedWords?: string[];
16-
/**
17-
* Whether the entire attribute value is highlighted.
18-
*/
19-
fullyHighlighted?: boolean;
20-
};
3+
export type HighlightResult = HighlightResultOption | HighlightResultOption[];
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import type { MatchLevel } from './matchLevel';
2+
3+
/**
4+
* Show highlighted section and words matched on a query.
5+
*/
6+
export type HighlightResultOption = {
7+
/**
8+
* Markup text with occurrences highlighted.
9+
*/
10+
value: string;
11+
matchLevel: MatchLevel;
12+
/**
13+
* List of words from the query that matched the object.
14+
*/
15+
matchedWords: string[];
16+
/**
17+
* Whether the entire attribute value is highlighted.
18+
*/
19+
fullyHighlighted?: boolean;
20+
};

packages/client-search/model/hit.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,14 @@ export type Hit = Record<string, any> & {
1010
* Unique identifier of the object.
1111
*/
1212
objectID: string;
13-
_highlightResult?: HighlightResult;
14-
_snippetResult?: SnippetResult;
13+
/**
14+
* Show highlighted section and words matched on a query.
15+
*/
16+
_highlightResult?: Record<string, HighlightResult>;
17+
/**
18+
* Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty.
19+
*/
20+
_snippetResult?: Record<string, SnippetResult>;
1521
_rankingInfo?: RankingInfo;
1622
_distinctSeqID?: number;
1723
};

packages/client-search/model/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export * from './getTaskResponse';
6262
export * from './getTopUserIdsResponse';
6363
export * from './hasPendingMappingsResponse';
6464
export * from './highlightResult';
65+
export * from './highlightResultOption';
6566
export * from './hit';
6667
export * from './ignorePlurals';
6768
export * from './indexSettings';
@@ -127,6 +128,7 @@ export * from './searchTypeFacet';
127128
export * from './searchUserIdsParams';
128129
export * from './searchUserIdsResponse';
129130
export * from './snippetResult';
131+
export * from './snippetResultOption';
130132
export * from './sortRemainingBy';
131133
export * from './source';
132134
export * from './standardEntries';
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
import type { MatchLevel } from './matchLevel';
1+
import type { SnippetResultOption } from './snippetResultOption';
22

3-
export type SnippetResult = {
4-
/**
5-
* Markup text with occurrences highlighted.
6-
*/
7-
value?: string;
8-
matchLevel?: MatchLevel;
9-
};
3+
export type SnippetResult = SnippetResultOption | SnippetResultOption[];
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import type { MatchLevel } from './matchLevel';
2+
3+
/**
4+
* Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty.
5+
*/
6+
export type SnippetResultOption = {
7+
/**
8+
* Markup text with occurrences highlighted.
9+
*/
10+
value: string;
11+
matchLevel: MatchLevel;
12+
};

packages/client-search/model/synonymHitHighlightResult.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import type { HighlightResult } from './highlightResult';
44
* Highlighted results.
55
*/
66
export type SynonymHitHighlightResult = {
7-
type?: HighlightResult;
8-
synonyms?: HighlightResult[];
7+
/**
8+
* Show highlighted section and words matched on a query.
9+
*/
10+
type?: Record<string, HighlightResult>;
11+
synonyms?: Array<Record<string, HighlightResult>>;
912
};
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
import type { HighlightResult } from './highlightResult';
22

33
export type UserHighlightResult = {
4-
userID: HighlightResult;
5-
clusterName: HighlightResult;
4+
/**
5+
* Show highlighted section and words matched on a query.
6+
*/
7+
userID: Record<string, HighlightResult>;
8+
/**
9+
* Show highlighted section and words matched on a query.
10+
*/
11+
clusterName: Record<string, HighlightResult>;
612
};
Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,3 @@
1-
import type { MatchLevel } from './matchLevel';
1+
import type { HighlightResultOption } from './highlightResultOption';
22

3-
/**
4-
* Highlighted attributes.
5-
*/
6-
export type HighlightResult = {
7-
/**
8-
* Markup text with occurrences highlighted.
9-
*/
10-
value?: string;
11-
matchLevel?: MatchLevel;
12-
/**
13-
* List of words from the query that matched the object.
14-
*/
15-
matchedWords?: string[];
16-
/**
17-
* Whether the entire attribute value is highlighted.
18-
*/
19-
fullyHighlighted?: boolean;
20-
};
3+
export type HighlightResult = HighlightResultOption | HighlightResultOption[];
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import type { MatchLevel } from './matchLevel';
2+
3+
/**
4+
* Show highlighted section and words matched on a query.
5+
*/
6+
export type HighlightResultOption = {
7+
/**
8+
* Markup text with occurrences highlighted.
9+
*/
10+
value: string;
11+
matchLevel: MatchLevel;
12+
/**
13+
* List of words from the query that matched the object.
14+
*/
15+
matchedWords: string[];
16+
/**
17+
* Whether the entire attribute value is highlighted.
18+
*/
19+
fullyHighlighted?: boolean;
20+
};

packages/recommend/model/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export * from './facetsStats';
1717
export * from './getRecommendationsParams';
1818
export * from './getRecommendationsResponse';
1919
export * from './highlightResult';
20+
export * from './highlightResultOption';
2021
export * from './ignorePlurals';
2122
export * from './indexSettingsAsSearchParams';
2223
export * from './matchLevel';
@@ -40,6 +41,7 @@ export * from './renderingContent';
4041
export * from './searchParamsObject';
4142
export * from './searchParamsQuery';
4243
export * from './snippetResult';
44+
export * from './snippetResultOption';
4345
export * from './sortRemainingBy';
4446
export * from './tagFilters';
4547
export * from './trendingModels';

packages/recommend/model/recommendHit.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,14 @@ export type RecommendHit = Record<string, any> & {
1010
* Unique identifier of the object.
1111
*/
1212
objectID: string;
13-
_highlightResult?: HighlightResult;
14-
_snippetResult?: SnippetResult;
13+
/**
14+
* Show highlighted section and words matched on a query.
15+
*/
16+
_highlightResult?: Record<string, HighlightResult>;
17+
/**
18+
* Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty.
19+
*/
20+
_snippetResult?: Record<string, SnippetResult>;
1521
_rankingInfo?: RankingInfo;
1622
_distinctSeqID?: number;
1723
/**
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
import type { MatchLevel } from './matchLevel';
1+
import type { SnippetResultOption } from './snippetResultOption';
22

3-
export type SnippetResult = {
4-
/**
5-
* Markup text with occurrences highlighted.
6-
*/
7-
value?: string;
8-
matchLevel?: MatchLevel;
9-
};
3+
export type SnippetResult = SnippetResultOption | SnippetResultOption[];
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import type { MatchLevel } from './matchLevel';
2+
3+
/**
4+
* Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty.
5+
*/
6+
export type SnippetResultOption = {
7+
/**
8+
* Markup text with occurrences highlighted.
9+
*/
10+
value: string;
11+
matchLevel: MatchLevel;
12+
};

0 commit comments

Comments
 (0)