Skip to content

Commit

Permalink
Merge 45f994a into b63d7a1
Browse files Browse the repository at this point in the history
  • Loading branch information
alextaing committed Jul 6, 2022
2 parents b63d7a1 + 45f994a commit 6ade434
Show file tree
Hide file tree
Showing 44 changed files with 276 additions and 177 deletions.
25 changes: 6 additions & 19 deletions docs/answers-core.answerscore.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,15 @@

## AnswersCore class

Provides methods for executing searches, submitting questions, and performing autocompletes.
> Warning: This API is now obsolete.
>
> AnswersCore is deprecated and has been replaced by [SearchCore](./answers-core.searchcore.md)
>
<b>Signature:</b>

```typescript
export declare class AnswersCore
export declare class AnswersCore extends SearchCore
```

## Constructors

| Constructor | Modifiers | Description |
| --- | --- | --- |
| [(constructor)(searchService, questionSubmissionService, autoCompleteService)](./answers-core.answerscore._constructor_.md) | | Constructs a new instance of the <code>AnswersCore</code> class |

## Methods

| Method | Modifiers | Description |
| --- | --- | --- |
| [filterSearch(request)](./answers-core.answerscore.filtersearch.md) | | Performs a filtersearch request against specified fields within a single vertical. |
| [submitQuestion(request)](./answers-core.answerscore.submitquestion.md) | | Submits a custom question to the Answers API. |
| [universalAutocomplete(request)](./answers-core.answerscore.universalautocomplete.md) | | Performs an autocomplete request across all verticals. |
| [universalSearch(request)](./answers-core.answerscore.universalsearch.md) | | Performs an Answers search across all verticals. |
| [verticalAutocomplete(request)](./answers-core.answerscore.verticalautocomplete.md) | | Performs an autocomplete request for a single vertical. |
| [verticalSearch(request)](./answers-core.answerscore.verticalsearch.md) | | Performs an Answers search for a single vertical. |
<b>Extends:</b> [SearchCore](./answers-core.searchcore.md)
25 changes: 7 additions & 18 deletions docs/answers-core.answerserror.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,17 @@

[Home](./index.md) &gt; [@yext/answers-core](./answers-core.md) &gt; [AnswersError](./answers-core.answerserror.md)

## AnswersError class
## AnswersError interface

Represents an error
> Warning: This API is now obsolete.
>
> AnswersError is deprecated and has been replaced by [SearchError](./answers-core.searcherror.md)
>
<b>Signature:</b>

```typescript
export declare class AnswersError extends Error
export interface AnswersError extends SearchError
```
<b>Extends:</b> Error
## Remarks
If the error originates from the Answer API, the code and type property will be present.
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `AnswersError` class.
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [code?](./answers-core.answerserror.code.md) | | number | <i>(Optional)</i> Answers API error code. |
| [message](./answers-core.answerserror.message.md) | | string | The error message. |
| [type?](./answers-core.answerserror.type.md) | | string | <i>(Optional)</i> Answers API error type. |
<b>Extends:</b> [SearchError](./answers-core.searcherror.md)
14 changes: 6 additions & 8 deletions docs/answers-core.answersrequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@

## AnswersRequest interface

Options for an Answers API request.
> Warning: This API is now obsolete.
>
> AnswersRequest is deprecated and has been replaced by [SearchRequest](./answers-core.searchrequest.md)
>
<b>Signature:</b>

```typescript
export interface AnswersRequest
export interface AnswersRequest extends SearchRequest
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [additionalHttpHeaders?](./answers-core.answersrequest.additionalhttpheaders.md) | [AdditionalHttpHeaders](./answers-core.additionalhttpheaders.md) | <i>(Optional)</i> AdditionalHttpHeaders allows users to specify additional values for specific HTTP headers. |
<b>Extends:</b> [SearchRequest](./answers-core.searchrequest.md)
4 changes: 2 additions & 2 deletions docs/answers-core.filtersearchrequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Options for a filtersearch request.
<b>Signature:</b>

```typescript
export interface FilterSearchRequest extends AnswersRequest
export interface FilterSearchRequest extends SearchRequest
```
<b>Extends:</b> [AnswersRequest](./answers-core.answersrequest.md)
<b>Extends:</b> [SearchRequest](./answers-core.searchrequest.md)
## Properties
Expand Down
9 changes: 6 additions & 3 deletions docs/answers-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@

| Class | Description |
| --- | --- |
| [AnswersCore](./answers-core.answerscore.md) | Provides methods for executing searches, submitting questions, and performing autocompletes. |
| [AnswersError](./answers-core.answerserror.md) | Represents an error |
| [AnswersCore](./answers-core.answerscore.md) | |
| [SearchCore](./answers-core.searchcore.md) | Provides methods for executing searches, submitting questions, and performing autocompletes. |
| [SearchError](./answers-core.searcherror.md) | Represents an error |

## Enumerations

Expand Down Expand Up @@ -42,7 +43,8 @@
| [AdditionalHttpHeaders](./answers-core.additionalhttpheaders.md) | AdditionalHttpHeaders allows users to specify additional values for specific HTTP headers. |
| [AnswersConfigWithApiKey](./answers-core.answersconfigwithapikey.md) | Configuration options for [AnswersCore](./answers-core.answerscore.md)<!-- -->, which includes the options from [BaseAnswersConfig](./answers-core.baseanswersconfig.md)<!-- -->, but requires apiKey. |
| [AnswersConfigWithToken](./answers-core.answersconfigwithtoken.md) | Configuration options for [AnswersCore](./answers-core.answerscore.md)<!-- -->, which includes the options from [BaseAnswersConfig](./answers-core.baseanswersconfig.md)<!-- -->, but requires token. |
| [AnswersRequest](./answers-core.answersrequest.md) | Options for an Answers API request. |
| [AnswersError](./answers-core.answerserror.md) | |
| [AnswersRequest](./answers-core.answersrequest.md) | |
| [AppliedQueryFilter](./answers-core.appliedqueryfilter.md) | A filter that the Answers API applied to the search. |
| [AutocompleteResponse](./answers-core.autocompleteresponse.md) | The response of a universal or vertical autocomplete request. |
| [AutocompleteResult](./answers-core.autocompleteresult.md) | An autocomplete suggestion. |
Expand Down Expand Up @@ -76,6 +78,7 @@
| [QuestionSubmissionService](./answers-core.questionsubmissionservice.md) | Submits a custom question to the Answers API. |
| [Result](./answers-core.result.md) | An individual search result. |
| [SearchParameterField](./answers-core.searchparameterfield.md) | Indicates which entity field to perform the autocomplete request on. |
| [SearchRequest](./answers-core.searchrequest.md) | Options for an Search API request. |
| [SearchService](./answers-core.searchservice.md) | A service which performs Yext Answers searches |
| [Snippet](./answers-core.snippet.md) | The section of text where a [FeaturedSnippetDirectAnswer](./answers-core.featuredsnippetdirectanswer.md) was found. |
| [SortBy](./answers-core.sortby.md) | Represents a criterion that can be used to sort results. |
Expand Down
6 changes: 3 additions & 3 deletions docs/answers-core.providecore.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The entrypoint to the answers-core library.
<b>Signature:</b>

```typescript
export declare function provideCore(config: AnswersConfig): AnswersCore;
export declare function provideCore(config: AnswersConfig): SearchCore;
```

## Parameters
Expand All @@ -20,9 +20,9 @@ export declare function provideCore(config: AnswersConfig): AnswersCore;

<b>Returns:</b>

[AnswersCore](./answers-core.answerscore.md)
[SearchCore](./answers-core.searchcore.md)

## Remarks

Returns an [AnswersCore](./answers-core.answerscore.md) instance.
Returns an [SearchCore](./answers-core.searchcore.md) instance.

4 changes: 2 additions & 2 deletions docs/answers-core.questionsubmissionrequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Options for a QuestionSubmission request.
<b>Signature:</b>

```typescript
export interface QuestionSubmissionRequest extends AnswersRequest
export interface QuestionSubmissionRequest extends SearchRequest
```
<b>Extends:</b> [AnswersRequest](./answers-core.answersrequest.md)
<b>Extends:</b> [SearchRequest](./answers-core.searchrequest.md)
## Properties
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/answers-core](./answers-core.md) &gt; [AnswersCore](./answers-core.answerscore.md) &gt; [(constructor)](./answers-core.answerscore._constructor_.md)
[Home](./index.md) &gt; [@yext/answers-core](./answers-core.md) &gt; [SearchCore](./answers-core.searchcore.md) &gt; [(constructor)](./answers-core.searchcore._constructor_.md)

## AnswersCore.(constructor)
## SearchCore.(constructor)

Constructs a new instance of the `AnswersCore` class
Constructs a new instance of the `SearchCore` class

<b>Signature:</b>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/answers-core](./answers-core.md) &gt; [AnswersCore](./answers-core.answerscore.md) &gt; [filterSearch](./answers-core.answerscore.filtersearch.md)
[Home](./index.md) &gt; [@yext/answers-core](./answers-core.md) &gt; [SearchCore](./answers-core.searchcore.md) &gt; [filterSearch](./answers-core.searchcore.filtersearch.md)

## AnswersCore.filterSearch() method
## SearchCore.filterSearch() method

Performs a filtersearch request against specified fields within a single vertical.

Expand All @@ -24,7 +24,7 @@ Promise&lt;[FilterSearchResponse](./answers-core.filtersearchresponse.md)<!-- --

## Remarks

This differs from the vertical autocomplete because the vertical autocomplete operates on all entity fields whereas filtersearch operates only on specified fields. If rejected, the reason will be an [AnswersError](./answers-core.answerserror.md)<!-- -->.
This differs from the vertical autocomplete because the vertical autocomplete operates on all entity fields whereas filtersearch operates only on specified fields. If rejected, the reason will be an [SearchError](./answers-core.searcherror.md)<!-- -->.

## Example

Expand Down
31 changes: 31 additions & 0 deletions docs/answers-core.searchcore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/answers-core](./answers-core.md) &gt; [SearchCore](./answers-core.searchcore.md)

## SearchCore class

Provides methods for executing searches, submitting questions, and performing autocompletes.

<b>Signature:</b>

```typescript
export declare class SearchCore
```

## Constructors

| Constructor | Modifiers | Description |
| --- | --- | --- |
| [(constructor)(searchService, questionSubmissionService, autoCompleteService)](./answers-core.searchcore._constructor_.md) | | Constructs a new instance of the <code>SearchCore</code> class |

## Methods

| Method | Modifiers | Description |
| --- | --- | --- |
| [filterSearch(request)](./answers-core.searchcore.filtersearch.md) | | Performs a filtersearch request against specified fields within a single vertical. |
| [submitQuestion(request)](./answers-core.searchcore.submitquestion.md) | | Submits a custom question to the Search API. |
| [universalAutocomplete(request)](./answers-core.searchcore.universalautocomplete.md) | | Performs an autocomplete request across all verticals. |
| [universalSearch(request)](./answers-core.searchcore.universalsearch.md) | | Performs a search across all verticals. |
| [verticalAutocomplete(request)](./answers-core.searchcore.verticalautocomplete.md) | | Performs an autocomplete request for a single vertical. |
| [verticalSearch(request)](./answers-core.searchcore.verticalsearch.md) | | Performs a search for a single vertical. |

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/answers-core](./answers-core.md) &gt; [AnswersCore](./answers-core.answerscore.md) &gt; [submitQuestion](./answers-core.answerscore.submitquestion.md)
[Home](./index.md) &gt; [@yext/answers-core](./answers-core.md) &gt; [SearchCore](./answers-core.searchcore.md) &gt; [submitQuestion](./answers-core.searchcore.submitquestion.md)

## AnswersCore.submitQuestion() method
## SearchCore.submitQuestion() method

Submits a custom question to the Answers API.
Submits a custom question to the Search API.

<b>Signature:</b>

Expand All @@ -24,5 +24,5 @@ Promise&lt;[QuestionSubmissionResponse](./answers-core.questionsubmissionrespons

## Remarks

If rejected, the reason will be an [AnswersError](./answers-core.answerserror.md)<!-- -->.
If rejected, the reason will be an [SearchError](./answers-core.searcherror.md)<!-- -->.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/answers-core](./answers-core.md) &gt; [AnswersCore](./answers-core.answerscore.md) &gt; [universalAutocomplete](./answers-core.answerscore.universalautocomplete.md)
[Home](./index.md) &gt; [@yext/answers-core](./answers-core.md) &gt; [SearchCore](./answers-core.searchcore.md) &gt; [universalAutocomplete](./answers-core.searchcore.universalautocomplete.md)

## AnswersCore.universalAutocomplete() method
## SearchCore.universalAutocomplete() method

Performs an autocomplete request across all verticals.

Expand All @@ -24,5 +24,5 @@ Promise&lt;[AutocompleteResponse](./answers-core.autocompleteresponse.md)<!-- --

## Remarks

If rejected, the reason will be an [AnswersError](./answers-core.answerserror.md)<!-- -->.
If rejected, the reason will be an [SearchError](./answers-core.searcherror.md)<!-- -->.

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/answers-core](./answers-core.md) &gt; [AnswersCore](./answers-core.answerscore.md) &gt; [universalSearch](./answers-core.answerscore.universalsearch.md)
[Home](./index.md) &gt; [@yext/answers-core](./answers-core.md) &gt; [SearchCore](./answers-core.searchcore.md) &gt; [universalSearch](./answers-core.searchcore.universalsearch.md)

## AnswersCore.universalSearch() method
## SearchCore.universalSearch() method

Performs an Answers search across all verticals.
Performs a search across all verticals.

<b>Signature:</b>

Expand All @@ -24,5 +24,5 @@ Promise&lt;[UniversalSearchResponse](./answers-core.universalsearchresponse.md)<

## Remarks

If rejected, the reason will be an [AnswersError](./answers-core.answerserror.md)<!-- -->.
If rejected, the reason will be an [SearchError](./answers-core.searcherror.md)<!-- -->.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/answers-core](./answers-core.md) &gt; [AnswersCore](./answers-core.answerscore.md) &gt; [verticalAutocomplete](./answers-core.answerscore.verticalautocomplete.md)
[Home](./index.md) &gt; [@yext/answers-core](./answers-core.md) &gt; [SearchCore](./answers-core.searchcore.md) &gt; [verticalAutocomplete](./answers-core.searchcore.verticalautocomplete.md)

## AnswersCore.verticalAutocomplete() method
## SearchCore.verticalAutocomplete() method

Performs an autocomplete request for a single vertical.

Expand All @@ -24,5 +24,5 @@ Promise&lt;[AutocompleteResponse](./answers-core.autocompleteresponse.md)<!-- --

## Remarks

If rejected, the reason will be an [AnswersError](./answers-core.answerserror.md)<!-- -->.
If rejected, the reason will be an [SearchError](./answers-core.searcherror.md)<!-- -->.

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/answers-core](./answers-core.md) &gt; [AnswersCore](./answers-core.answerscore.md) &gt; [verticalSearch](./answers-core.answerscore.verticalsearch.md)
[Home](./index.md) &gt; [@yext/answers-core](./answers-core.md) &gt; [SearchCore](./answers-core.searchcore.md) &gt; [verticalSearch](./answers-core.searchcore.verticalsearch.md)

## AnswersCore.verticalSearch() method
## SearchCore.verticalSearch() method

Performs an Answers search for a single vertical.
Performs a search for a single vertical.

<b>Signature:</b>

Expand All @@ -24,5 +24,5 @@ Promise&lt;[VerticalSearchResponse](./answers-core.verticalsearchresponse.md)<!-

## Remarks

If rejected, the reason will be an [AnswersError](./answers-core.answerserror.md)<!-- -->.
If rejected, the reason will be an [SearchError](./answers-core.searcherror.md)<!-- -->.

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/answers-core](./answers-core.md) &gt; [AnswersError](./answers-core.answerserror.md) &gt; [code](./answers-core.answerserror.code.md)
[Home](./index.md) &gt; [@yext/answers-core](./answers-core.md) &gt; [SearchError](./answers-core.searcherror.md) &gt; [code](./answers-core.searcherror.code.md)

## AnswersError.code property
## SearchError.code property

Answers API error code.
Search API error code.

<b>Signature:</b>

Expand Down
29 changes: 29 additions & 0 deletions docs/answers-core.searcherror.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/answers-core](./answers-core.md) &gt; [SearchError](./answers-core.searcherror.md)

## SearchError class

Represents an error

<b>Signature:</b>

```typescript
export declare class SearchError extends Error
```
<b>Extends:</b> Error
## Remarks
If the error originates from the Search API, the code and type property will be present.
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `SearchError` class.
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [code?](./answers-core.searcherror.code.md) | | number | <i>(Optional)</i> Search API error code. |
| [message](./answers-core.searcherror.message.md) | | string | The error message. |
| [type?](./answers-core.searcherror.type.md) | | string | <i>(Optional)</i> Search API error type. |
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/answers-core](./answers-core.md) &gt; [AnswersError](./answers-core.answerserror.md) &gt; [message](./answers-core.answerserror.message.md)
[Home](./index.md) &gt; [@yext/answers-core](./answers-core.md) &gt; [SearchError](./answers-core.searcherror.md) &gt; [message](./answers-core.searcherror.message.md)

## AnswersError.message property
## SearchError.message property

The error message.

Expand Down
Loading

0 comments on commit 6ade434

Please sign in to comment.