Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
oshi97 committed Mar 24, 2023
1 parent 20dafe0 commit 442e03e
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 9 deletions.
13 changes: 13 additions & 0 deletions docs/search-core.autocompleteresult.inputintents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/search-core](./search-core.md) &gt; [AutocompleteResult](./search-core.autocompleteresult.md) &gt; [inputIntents](./search-core.autocompleteresult.inputintents.md)

## AutocompleteResult.inputIntents property

[SearchIntent](./search-core.searchintent.md)<!-- -->s corresponding to the autocomplete result.

<b>Signature:</b>

```typescript
inputIntents: SearchIntent[];
```
1 change: 1 addition & 0 deletions docs/search-core.autocompleteresult.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export interface AutocompleteResult
| Property | Type | Description |
| --- | --- | --- |
| [filter?](./search-core.autocompleteresult.filter.md) | [FieldValueFilter](./search-core.fieldvaluefilter.md) | <i>(Optional)</i> A filter applied to the autocomplete response. |
| [inputIntents](./search-core.autocompleteresult.inputintents.md) | [SearchIntent](./search-core.searchintent.md)<!-- -->\[\] | [SearchIntent](./search-core.searchintent.md)<!-- -->s corresponding to the autocomplete result. |
| [key?](./search-core.autocompleteresult.key.md) | string | <i>(Optional)</i> The fieldId which corresponds to the AutocompleteResult value. |
| [matchedSubstrings?](./search-core.autocompleteresult.matchedsubstrings.md) | { length: number; offset: number; }\[\] | <i>(Optional)</i> An array of substrings which overlap with the autocomplete input. |
| [queryIntents](./search-core.autocompleteresult.queryintents.md) | [SearchIntent](./search-core.searchintent.md)<!-- -->\[\] | [SearchIntent](./search-core.searchintent.md)<!-- -->s corresponding to the autocomplete result. |
Expand Down
1 change: 1 addition & 0 deletions etc/search-core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export interface AutocompleteResponse {
// @public
export interface AutocompleteResult {
filter?: FieldValueFilter;
inputIntents: SearchIntent[];
key?: string;
matchedSubstrings?: {
length: number;
Expand Down
2 changes: 1 addition & 1 deletion src/models/autocompleteservice/AutocompleteResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,5 @@ export interface AutocompleteResult {
/**
* {@link SearchIntent}s corresponding to the autocomplete result.
*/
queryIntents: SearchIntent[]
inputIntents: SearchIntent[]
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ export function createAutocompleteResult(result: any): AutocompleteResult {
value: result.value,
relatedItem: relatedItem,
verticalKeys: result.verticalKeys,
queryIntents: result.queryIntents ?? []
inputIntents: result.queryIntents ?? []
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('AutocompleteResponse', () => {
results: [
{
value: 'salesforce',
queryIntents: [
inputIntents: [
SearchIntent.NearMe
],
matchedSubstrings: [
Expand All @@ -36,7 +36,7 @@ describe('AutocompleteResponse', () => {
results: [
{
value: 'Virginia Beach',
queryIntents: [],
inputIntents: [],
matchedSubstrings: [
{
offset: 0,
Expand Down Expand Up @@ -81,7 +81,7 @@ describe('AutocompleteResponse', () => {
fieldId: 'name'
},
key: 'name',
queryIntents: [],
inputIntents: [],
relatedItem: {
rawData: {
mock: 'data'
Expand Down Expand Up @@ -115,7 +115,7 @@ describe('AutocompleteResponse', () => {
fieldId: 'name2'
},
key: 'name',
queryIntents: [],
inputIntents: [],
relatedItem: {
rawData: {
mock: 'data2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('AutocompleteResult', () => {
const expectedResult = {
key: 'key',
value: 'salesforce',
queryIntents: [],
inputIntents: [],
matchedSubstrings: [
{
offset: 0,
Expand Down Expand Up @@ -70,7 +70,7 @@ describe('AutocompleteResult', () => {
fieldId: 'name'
},
key: 'name',
queryIntents: [],
inputIntents: [],
relatedItem: {
rawData: {
mock: 'data'
Expand Down Expand Up @@ -108,7 +108,7 @@ describe('AutocompleteResult', () => {
fieldId: 'name'
},
key: 'name',
queryIntents: [],
inputIntents: [],
matchedSubstrings: [
{
offset: 0,
Expand Down

0 comments on commit 442e03e

Please sign in to comment.