Skip to content

Commit

Permalink
Merge 364f8cd into da871b1
Browse files Browse the repository at this point in the history
  • Loading branch information
ElemelonWind committed Jul 12, 2022
2 parents da871b1 + 364f8cd commit 7e70e6d
Show file tree
Hide file tree
Showing 129 changed files with 544 additions and 374 deletions.
4 changes: 2 additions & 2 deletions THIRD-PARTY-NOTICES
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ SOFTWARE.

The following NPM package may be included in this product:

- @yext/answers-core@1.7.0
- @yext/search-core@1.8.0

This package contains the following license and notice below:

The Answers Core files listed in this repository are licensed under the below license.  All other features and products are subject to separate agreements
The Search Core files listed in this repository are licensed under the below license.  All other features and products are subject to separate agreements
and certain functionality requires paid subscriptions to Yext products.

Contains information from the language-subtag-registry JSON Database (https://github.com/mattcg/language-subtag-registry/tree/master/data/json)
Expand Down
2 changes: 1 addition & 1 deletion __mocks__/@yext/answers-core.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from '@yext/answers-core';
export * from '@yext/search-core';

export function provideCore(): unknown {
return {
Expand Down
2 changes: 1 addition & 1 deletion api-extractor.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
* This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been
* local files for library1.
*/
"bundledPackages": [ "@yext/answers-core" ],
"bundledPackages": [ "@yext/search-core" ],

/**
* Determines how the TypeScript compiler engine will be invoked by API Extractor.
Expand Down
2 changes: 1 addition & 1 deletion docs/search-headless.additionalhttpheaders._client-sdk_.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## AdditionalHttpHeaders."Client-SDK" property

Additional agents and their versions used to create the Answers experience. The information for these agents is added to the Client-SDK HTTP header along with that of the ANSWERS\_CORE agent.
Additional agents and their versions used to create the Search experience. The information for these agents is added to the Client-SDK HTTP header along with that of the ANSWERS\_CORE agent.

<b>Signature:</b>

Expand Down
2 changes: 1 addition & 1 deletion docs/search-headless.additionalhttpheaders.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ export declare interface AdditionalHttpHeaders

| Property | Type | Description |
| --- | --- | --- |
| ["Client-SDK"?](./search-headless.additionalhttpheaders._client-sdk_.md) | [ClientSDKHeaderValues](./search-headless.clientsdkheadervalues.md) | <i>(Optional)</i> Additional agents and their versions used to create the Answers experience. The information for these agents is added to the Client-SDK HTTP header along with that of the ANSWERS\_CORE agent. |
| ["Client-SDK"?](./search-headless.additionalhttpheaders._client-sdk_.md) | [ClientSDKHeaderValues](./search-headless.clientsdkheadervalues.md) | <i>(Optional)</i> Additional agents and their versions used to create the Search experience. The information for these agents is added to the Client-SDK HTTP header along with that of the ANSWERS\_CORE agent. |

9 changes: 6 additions & 3 deletions docs/search-headless.answersconfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@

## AnswersConfig type

The main configuration options for [AnswersCore](./search-headless.answerscore.md)<!-- -->. For a full description of the options, see [BaseAnswersConfig](./search-headless.baseanswersconfig.md)<!-- -->. The config requires either an apiKey or a token.
> Warning: This API is now obsolete.
>
> AnswersConfig is deprecated and has been replaced by [SearchConfig](./search-headless.searchconfig.md)
>
<b>Signature:</b>

```typescript
export declare type AnswersConfig = AnswersConfigWithApiKey | AnswersConfigWithToken;
export declare type AnswersConfig = SearchConfig;
```
<b>References:</b> [AnswersConfigWithApiKey](./search-headless.answersconfigwithapikey.md)<!-- -->, [AnswersConfigWithToken](./search-headless.answersconfigwithtoken.md)
<b>References:</b> [SearchConfig](./search-headless.searchconfig.md)

13 changes: 0 additions & 13 deletions docs/search-headless.answersconfigwithapikey.apikey.md

This file was deleted.

16 changes: 6 additions & 10 deletions docs/search-headless.answersconfigwithapikey.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,15 @@

## AnswersConfigWithApiKey interface

Configuration options for [AnswersCore](./search-headless.answerscore.md)<!-- -->, which includes the options from [BaseAnswersConfig](./search-headless.baseanswersconfig.md)<!-- -->, but requires apiKey.
> Warning: This API is now obsolete.
>
> AnswersConfigWithApiKey is deprecated and has been replaced by [SearchConfigWithApiKey](./search-headless.searchconfigwithapikey.md)
>
<b>Signature:</b>

```typescript
export declare interface AnswersConfigWithApiKey extends BaseAnswersConfig
export declare interface AnswersConfigWithApiKey extends SearchConfigWithApiKey
```
<b>Extends:</b> [BaseAnswersConfig](./search-headless.baseanswersconfig.md)
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [apiKey](./search-headless.answersconfigwithapikey.apikey.md) | string | The api key of the answers experience which will be sent as a query param. |
| [token?](./search-headless.answersconfigwithapikey.token.md) | never | <i>(Optional)</i> token should NOT be provided along with apiKey. |
<b>Extends:</b> [SearchConfigWithApiKey](./search-headless.searchconfigwithapikey.md)
16 changes: 6 additions & 10 deletions docs/search-headless.answersconfigwithtoken.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,15 @@

## AnswersConfigWithToken interface

Configuration options for [AnswersCore](./search-headless.answerscore.md)<!-- -->, which includes the options from [BaseAnswersConfig](./search-headless.baseanswersconfig.md)<!-- -->, but requires token.
> Warning: This API is now obsolete.
>
> AnswersConfigWithToken is deprecated and has been replaced by [SearchConfigWithToken](./search-headless.searchconfigwithtoken.md)
>
<b>Signature:</b>

```typescript
export declare interface AnswersConfigWithToken extends BaseAnswersConfig
export declare interface AnswersConfigWithToken extends SearchConfigWithToken
```
<b>Extends:</b> [BaseAnswersConfig](./search-headless.baseanswersconfig.md)
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [apiKey?](./search-headless.answersconfigwithtoken.apikey.md) | never | <i>(Optional)</i> apiKey should NOT be provided along with token. |
| [token](./search-headless.answersconfigwithtoken.token.md) | string | The authentication token of the answers experience which will be passed in the Auth header as a Bearer token. |
<b>Extends:</b> [SearchConfigWithToken](./search-headless.searchconfigwithtoken.md)
13 changes: 0 additions & 13 deletions docs/search-headless.answersconfigwithtoken.token.md

This file was deleted.

25 changes: 6 additions & 19 deletions docs/search-headless.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](./search-headless.searchcore.md)
>
<b>Signature:</b>

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

## Constructors

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

## Methods

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

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

## AnswersError class
## AnswersError interface

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

```typescript
export declare class AnswersError extends Error
export declare 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.
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [code?](./search-headless.answerserror.code.md) | | number | <i>(Optional)</i> Answers API error code. |
| [message](./search-headless.answerserror.message.md) | | string | The error message. |
| [type?](./search-headless.answerserror.type.md) | | string | <i>(Optional)</i> Answers API error type. |
<b>Extends:</b> [SearchError](./search-headless.searcherror.md)
14 changes: 6 additions & 8 deletions docs/search-headless.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](./search-headless.searchrequest.md)
>
<b>Signature:</b>

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

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [additionalHttpHeaders?](./search-headless.answersrequest.additionalhttpheaders.md) | [AdditionalHttpHeaders](./search-headless.additionalhttpheaders.md) | <i>(Optional)</i> AdditionalHttpHeaders allows users to specify additional values for specific HTTP headers. |
<b>Extends:</b> [SearchRequest](./search-headless.searchrequest.md)
2 changes: 1 addition & 1 deletion docs/search-headless.appliedqueryfilter.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## AppliedQueryFilter interface

A filter that the Answers API applied to the search.
A filter that the Search API applied to the search.

<b>Signature:</b>

Expand Down
2 changes: 1 addition & 1 deletion docs/search-headless.autocompleteresponse.inputintents.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## AutocompleteResponse.inputIntents property

Represents intents from the Answers API.
Represents intents from the Search API.

<b>Signature:</b>

Expand Down
2 changes: 1 addition & 1 deletion docs/search-headless.autocompleteresponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export declare interface AutocompleteResponse

| Property | Type | Description |
| --- | --- | --- |
| [inputIntents](./search-headless.autocompleteresponse.inputintents.md) | [SearchIntent](./search-headless.searchintent.md)<!-- -->\[\] | Represents intents from the Answers API. |
| [inputIntents](./search-headless.autocompleteresponse.inputintents.md) | [SearchIntent](./search-headless.searchintent.md)<!-- -->\[\] | Represents intents from the Search API. |
| [queryId?](./search-headless.autocompleteresponse.queryid.md) | string | <i>(Optional)</i> The ID of the search query. |
| [results](./search-headless.autocompleteresponse.results.md) | [AutocompleteResult](./search-headless.autocompleteresult.md)<!-- -->\[\] | An array of [AutocompleteResult](./search-headless.autocompleteresult.md)<!-- -->s. |
| [uuid](./search-headless.autocompleteresponse.uuid.md) | string | A unique id which corresponds to the request. |
Expand Down
13 changes: 0 additions & 13 deletions docs/search-headless.baseanswersconfig.experiencekey.md

This file was deleted.

13 changes: 0 additions & 13 deletions docs/search-headless.baseanswersconfig.locale.md

This file was deleted.

18 changes: 6 additions & 12 deletions docs/search-headless.baseanswersconfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,15 @@

## BaseAnswersConfig interface

The base configuration options for [AnswersCore](./search-headless.answerscore.md)<!-- -->.
> Warning: This API is now obsolete.
>
> BaseAnswersConfig is deprecated and has been replaced by [BaseSearchConfig](./search-headless.basesearchconfig.md)
>
<b>Signature:</b>

```typescript
export declare interface BaseAnswersConfig
export declare interface BaseAnswersConfig extends BaseSearchConfig
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [endpoints?](./search-headless.baseanswersconfig.endpoints.md) | [Endpoints](./search-headless.endpoints.md) | <i>(Optional)</i> Overrides for the URLs which are used when making requests to the Answers API. |
| [experienceKey](./search-headless.baseanswersconfig.experiencekey.md) | string | The experience key of the answers experience. |
| [experienceVersion?](./search-headless.baseanswersconfig.experienceversion.md) | 'STAGING' \| 'PRODUCTION' \| string \| number | <i>(Optional)</i> The version of the answers experience configuration. |
| [locale](./search-headless.baseanswersconfig.locale.md) | string | The locale of the answers experience. |
| [visitor?](./search-headless.baseanswersconfig.visitor.md) | [Visitor](./search-headless.visitor.md) | <i>(Optional)</i> Information used to associate requests with a particular user. |
<b>Extends:</b> [BaseSearchConfig](./search-headless.basesearchconfig.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/search-headless](./search-headless.md) &gt; [BaseAnswersConfig](./search-headless.baseanswersconfig.md) &gt; [endpoints](./search-headless.baseanswersconfig.endpoints.md)
[Home](./index.md) &gt; [@yext/search-headless](./search-headless.md) &gt; [BaseSearchConfig](./search-headless.basesearchconfig.md) &gt; [endpoints](./search-headless.basesearchconfig.endpoints.md)

## BaseAnswersConfig.endpoints property
## BaseSearchConfig.endpoints property

Overrides for the URLs which are used when making requests to the Answers API.
Overrides for the URLs which are used when making requests to the Search API.

<b>Signature:</b>

Expand Down
13 changes: 13 additions & 0 deletions docs/search-headless.basesearchconfig.experiencekey.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-headless](./search-headless.md) &gt; [BaseSearchConfig](./search-headless.basesearchconfig.md) &gt; [experienceKey](./search-headless.basesearchconfig.experiencekey.md)

## BaseSearchConfig.experienceKey property

The experience key of the search experience.

<b>Signature:</b>

```typescript
experienceKey: string;
```
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/search-headless](./search-headless.md) &gt; [BaseAnswersConfig](./search-headless.baseanswersconfig.md) &gt; [experienceVersion](./search-headless.baseanswersconfig.experienceversion.md)
[Home](./index.md) &gt; [@yext/search-headless](./search-headless.md) &gt; [BaseSearchConfig](./search-headless.basesearchconfig.md) &gt; [experienceVersion](./search-headless.basesearchconfig.experienceversion.md)

## BaseAnswersConfig.experienceVersion property
## BaseSearchConfig.experienceVersion property

The version of the answers experience configuration.
The version of the search experience configuration.

<b>Signature:</b>

Expand Down
13 changes: 13 additions & 0 deletions docs/search-headless.basesearchconfig.locale.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-headless](./search-headless.md) &gt; [BaseSearchConfig](./search-headless.basesearchconfig.md) &gt; [locale](./search-headless.basesearchconfig.locale.md)

## BaseSearchConfig.locale property

The locale of the search experience.

<b>Signature:</b>

```typescript
locale: string;
```

0 comments on commit 7e70e6d

Please sign in to comment.