Skip to content

Commit

Permalink
Merge bcfc454 into 6d666eb
Browse files Browse the repository at this point in the history
  • Loading branch information
yen-tt committed Aug 15, 2022
2 parents 6d666eb + bcfc454 commit 46f4849
Show file tree
Hide file tree
Showing 19 changed files with 212 additions and 52 deletions.
13 changes: 13 additions & 0 deletions docs/search-core.basefeaturedsnippetdirectanswer.fieldtype.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; [BaseFeaturedSnippetDirectAnswer](./search-core.basefeaturedsnippetdirectanswer.md) &gt; [fieldType](./search-core.basefeaturedsnippetdirectanswer.fieldtype.md)

## BaseFeaturedSnippetDirectAnswer.fieldType property

The field type of the direct answer.

<b>Signature:</b>

```typescript
fieldType: EnumOrLiteral<BuiltInFieldType.MultiLineText | BuiltInFieldType.RichText>;
```
23 changes: 23 additions & 0 deletions docs/search-core.basefeaturedsnippetdirectanswer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/search-core](./search-core.md) &gt; [BaseFeaturedSnippetDirectAnswer](./search-core.basefeaturedsnippetdirectanswer.md)

## BaseFeaturedSnippetDirectAnswer interface

A direct answer which was found within a document.

<b>Signature:</b>

```typescript
export interface BaseFeaturedSnippetDirectAnswer<T = unknown> extends DirectAnswer<T>
```
<b>Extends:</b> [DirectAnswer](./search-core.directanswer.md)<!-- -->&lt;T&gt;
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [fieldType](./search-core.basefeaturedsnippetdirectanswer.fieldtype.md) | [EnumOrLiteral](./search-core.enumorliteral.md)<!-- -->&lt;[BuiltInFieldType.MultiLineText](./search-core.builtinfieldtype.md) \| [BuiltInFieldType.RichText](./search-core.builtinfieldtype.md)<!-- -->&gt; | The field type of the direct answer. |
| [snippet](./search-core.basefeaturedsnippetdirectanswer.snippet.md) | [Snippet](./search-core.snippet.md) | The snippet where the direct answer was found. |
| [type](./search-core.basefeaturedsnippetdirectanswer.type.md) | [DirectAnswerType.FeaturedSnippet](./search-core.directanswertype.md) | [DirectAnswerType](./search-core.directanswertype.md)<!-- -->.FeaturedSnippet |
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/search-core](./search-core.md) &gt; [FeaturedSnippetDirectAnswer](./search-core.featuredsnippetdirectanswer.md) &gt; [snippet](./search-core.featuredsnippetdirectanswer.snippet.md)
[Home](./index.md) &gt; [@yext/search-core](./search-core.md) &gt; [BaseFeaturedSnippetDirectAnswer](./search-core.basefeaturedsnippetdirectanswer.md) &gt; [snippet](./search-core.basefeaturedsnippetdirectanswer.snippet.md)

## FeaturedSnippetDirectAnswer.snippet property
## BaseFeaturedSnippetDirectAnswer.snippet property

The snippet where the direct answer was found.

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/search-core](./search-core.md) &gt; [FeaturedSnippetDirectAnswer](./search-core.featuredsnippetdirectanswer.md) &gt; [type](./search-core.featuredsnippetdirectanswer.type.md)
[Home](./index.md) &gt; [@yext/search-core](./search-core.md) &gt; [BaseFeaturedSnippetDirectAnswer](./search-core.basefeaturedsnippetdirectanswer.md) &gt; [type](./search-core.basefeaturedsnippetdirectanswer.type.md)

## FeaturedSnippetDirectAnswer.type property
## BaseFeaturedSnippetDirectAnswer.type property

[DirectAnswerType](./search-core.directanswertype.md)<!-- -->.FeaturedSnippet

Expand Down
13 changes: 0 additions & 13 deletions docs/search-core.featuredsnippetdirectanswer.fieldtype.md

This file was deleted.

16 changes: 4 additions & 12 deletions docs/search-core.featuredsnippetdirectanswer.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,14 @@

[Home](./index.md) &gt; [@yext/search-core](./search-core.md) &gt; [FeaturedSnippetDirectAnswer](./search-core.featuredsnippetdirectanswer.md)

## FeaturedSnippetDirectAnswer interface
## FeaturedSnippetDirectAnswer type

A direct answer which was found within a document.
Possible built-in [BaseFeaturedSnippetDirectAnswer](./search-core.basefeaturedsnippetdirectanswer.md) interfaces

<b>Signature:</b>

```typescript
export interface FeaturedSnippetDirectAnswer<T = unknown> extends DirectAnswer<T>
export declare type FeaturedSnippetDirectAnswer = MultiLineTextFeaturedSnippetDirectAnswer | RichTextFeaturedSnippetDirectAnswer;
```
<b>Extends:</b> [DirectAnswer](./search-core.directanswer.md)<!-- -->&lt;T&gt;
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [fieldType](./search-core.featuredsnippetdirectanswer.fieldtype.md) | [BuiltInFieldType.MultiLineText](./search-core.builtinfieldtype.md) \| [BuiltInFieldType.RichText](./search-core.builtinfieldtype.md) | The field type of the direct answer. |
| [snippet](./search-core.featuredsnippetdirectanswer.snippet.md) | [Snippet](./search-core.snippet.md) | The snippet where the direct answer was found. |
| [type](./search-core.featuredsnippetdirectanswer.type.md) | [DirectAnswerType.FeaturedSnippet](./search-core.directanswertype.md) | [DirectAnswerType](./search-core.directanswertype.md)<!-- -->.FeaturedSnippet |
<b>References:</b> [MultiLineTextFeaturedSnippetDirectAnswer](./search-core.multilinetextfeaturedsnippetdirectanswer.md)<!-- -->, [RichTextFeaturedSnippetDirectAnswer](./search-core.richtextfeaturedsnippetdirectanswer.md)

5 changes: 4 additions & 1 deletion docs/search-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
| [AutocompleteResult](./search-core.autocompleteresult.md) | An autocomplete suggestion. |
| [AutocompleteService](./search-core.autocompleteservice.md) | A service for autocomplete requests. |
| [BaseAnswersConfig](./search-core.baseanswersconfig.md) | |
| [BaseFeaturedSnippetDirectAnswer](./search-core.basefeaturedsnippetdirectanswer.md) | A direct answer which was found within a document. |
| [BaseFieldValueDirectAnswer](./search-core.basefieldvaluedirectanswer.md) | A direct answer where the answer came from a field from the knowledge graph. |
| [BaseSearchConfig](./search-core.basesearchconfig.md) | The base configuration options for [SearchCore](./search-core.searchcore.md)<!-- -->. |
| [ClientSDKHeaderValues](./search-core.clientsdkheadervalues.md) | 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. |
Expand All @@ -63,7 +64,6 @@
| [Facet](./search-core.facet.md) | Represents dynamic filter options for the Search API. |
| [FacetOption](./search-core.facetoption.md) | A filter associated with the facet. |
| [FailedVertical](./search-core.failedvertical.md) | Error information from when a vertical fails to return results. |
| [FeaturedSnippetDirectAnswer](./search-core.featuredsnippetdirectanswer.md) | A direct answer which was found within a document. |
| [FieldValueFilter](./search-core.fieldvaluefilter.md) | Represents a filter which compares values to a single field. |
| [FieldValueStaticFilter](./search-core.fieldvaluestaticfilter.md) | A [FieldValueFilter](./search-core.fieldvaluefilter.md) with the kind of filter specified to discriminate between static filter types. |
| [FilterSearchRequest](./search-core.filtersearchrequest.md) | Options for a filtersearch request. |
Expand All @@ -74,13 +74,15 @@
| [LocationBoundingBox](./search-core.locationboundingbox.md) | Location boundaries for a filter with "Place" for its [AppliedQueryFilterType](./search-core.appliedqueryfiltertype.md)<!-- -->. (e.g. boundary for a locality or region specific location filter) |
| [LocationFilterDetails](./search-core.locationfilterdetails.md) | Additional details relevant to the filter with "PLACE" for its [AppliedQueryFilterType](./search-core.appliedqueryfiltertype.md)<!-- -->. |
| [LowerNumberRangeLimit](./search-core.lowernumberrangelimit.md) | The start limit of [NumberRangeValue](./search-core.numberrangevalue.md)<!-- -->. |
| [MultiLineTextFeaturedSnippetDirectAnswer](./search-core.multilinetextfeaturedsnippetdirectanswer.md) | A [BaseFeaturedSnippetDirectAnswer](./search-core.basefeaturedsnippetdirectanswer.md) with 'multi\_line\_text' field type |
| [NearFilterValue](./search-core.nearfiltervalue.md) | A filter value for a filter with a $near [Matcher](./search-core.matcher.md)<!-- -->. |
| [NumberRangeValue](./search-core.numberrangevalue.md) | A filter value for a filter with a $between [Matcher](./search-core.matcher.md)<!-- -->. |
| [QueryRulesActionsData](./search-core.queryrulesactionsdata.md) | Data returned from the Search query rules system. |
| [QuestionSubmissionRequest](./search-core.questionsubmissionrequest.md) | Options for a QuestionSubmission request. |
| [QuestionSubmissionResponse](./search-core.questionsubmissionresponse.md) | A representation of a question submission response. |
| [QuestionSubmissionService](./search-core.questionsubmissionservice.md) | Submits a custom question to the Search API. |
| [Result](./search-core.result.md) | An individual search result. |
| [RichTextFeaturedSnippetDirectAnswer](./search-core.richtextfeaturedsnippetdirectanswer.md) | A [BaseFeaturedSnippetDirectAnswer](./search-core.basefeaturedsnippetdirectanswer.md) with 'rich\_text' field type. "value" field is omitted for featured snippet direct answer of this field type. |
| [SearchConfigWithApiKey](./search-core.searchconfigwithapikey.md) | Configuration options for [SearchCore](./search-core.searchcore.md)<!-- -->, which includes the options from [BaseSearchConfig](./search-core.basesearchconfig.md)<!-- -->, but requires apiKey. |
| [SearchConfigWithToken](./search-core.searchconfigwithtoken.md) | Configuration options for [SearchCore](./search-core.searchcore.md)<!-- -->, which includes the options from [BaseSearchConfig](./search-core.basesearchconfig.md)<!-- -->, but requires token. |
| [SearchParameterField](./search-core.searchparameterfield.md) | Indicates which entity field to perform the autocomplete request on. |
Expand Down Expand Up @@ -114,6 +116,7 @@
| [AnswersConfig](./search-core.answersconfig.md) | |
| [Context](./search-core.context.md) | Used to trigger Search [Query Rules](https://hitchhikers.yext.com/tracks/answers-advanced/ans302-query-rules/)<!-- -->. |
| [EnumOrLiteral](./search-core.enumorliteral.md) | Produces a union type from the enum passed as a generic which consists of the enum values and the string literals of the enum. |
| [FeaturedSnippetDirectAnswer](./search-core.featuredsnippetdirectanswer.md) | Possible built-in [BaseFeaturedSnippetDirectAnswer](./search-core.basefeaturedsnippetdirectanswer.md) interfaces |
| [FieldValueDirectAnswer](./search-core.fieldvaluedirectanswer.md) | Possible built-in and custom [BaseFieldValueDirectAnswer](./search-core.basefieldvaluedirectanswer.md) interfaces |
| [HighlightedFields](./search-core.highlightedfields.md) | A mapping of fields to the values emphasized by the Search API. |
| [SearchConfig](./search-core.searchconfig.md) | The main configuration options for [SearchCore](./search-core.searchcore.md)<!-- -->. For a full description of the options, see [BaseSearchConfig](./search-core.basesearchconfig.md)<!-- -->. The config requires either an apiKey or a token. |
Expand Down
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; [MultiLineTextFeaturedSnippetDirectAnswer](./search-core.multilinetextfeaturedsnippetdirectanswer.md) &gt; [fieldType](./search-core.multilinetextfeaturedsnippetdirectanswer.fieldtype.md)

## MultiLineTextFeaturedSnippetDirectAnswer.fieldType property

The field type of the direct answer.

<b>Signature:</b>

```typescript
fieldType: EnumOrLiteral<BuiltInFieldType.MultiLineText>;
```
22 changes: 22 additions & 0 deletions docs/search-core.multilinetextfeaturedsnippetdirectanswer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/search-core](./search-core.md) &gt; [MultiLineTextFeaturedSnippetDirectAnswer](./search-core.multilinetextfeaturedsnippetdirectanswer.md)

## MultiLineTextFeaturedSnippetDirectAnswer interface

A [BaseFeaturedSnippetDirectAnswer](./search-core.basefeaturedsnippetdirectanswer.md) with 'multi\_line\_text' field type

<b>Signature:</b>

```typescript
export interface MultiLineTextFeaturedSnippetDirectAnswer extends BaseFeaturedSnippetDirectAnswer<string>
```
<b>Extends:</b> [BaseFeaturedSnippetDirectAnswer](./search-core.basefeaturedsnippetdirectanswer.md)<!-- -->&lt;string&gt;
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [fieldType](./search-core.multilinetextfeaturedsnippetdirectanswer.fieldtype.md) | [EnumOrLiteral](./search-core.enumorliteral.md)<!-- -->&lt;[BuiltInFieldType.MultiLineText](./search-core.builtinfieldtype.md)<!-- -->&gt; | The field type of the direct answer. |
| [value](./search-core.multilinetextfeaturedsnippetdirectanswer.value.md) | string | The value of the direct answer. |
13 changes: 13 additions & 0 deletions docs/search-core.multilinetextfeaturedsnippetdirectanswer.value.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; [MultiLineTextFeaturedSnippetDirectAnswer](./search-core.multilinetextfeaturedsnippetdirectanswer.md) &gt; [value](./search-core.multilinetextfeaturedsnippetdirectanswer.value.md)

## MultiLineTextFeaturedSnippetDirectAnswer.value property

The value of the direct answer.

<b>Signature:</b>

```typescript
value: string;
```
13 changes: 13 additions & 0 deletions docs/search-core.richtextfeaturedsnippetdirectanswer.fieldtype.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; [RichTextFeaturedSnippetDirectAnswer](./search-core.richtextfeaturedsnippetdirectanswer.md) &gt; [fieldType](./search-core.richtextfeaturedsnippetdirectanswer.fieldtype.md)

## RichTextFeaturedSnippetDirectAnswer.fieldType property

The field type of the direct answer.

<b>Signature:</b>

```typescript
fieldType: EnumOrLiteral<BuiltInFieldType.RichText>;
```
21 changes: 21 additions & 0 deletions docs/search-core.richtextfeaturedsnippetdirectanswer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/search-core](./search-core.md) &gt; [RichTextFeaturedSnippetDirectAnswer](./search-core.richtextfeaturedsnippetdirectanswer.md)

## RichTextFeaturedSnippetDirectAnswer interface

A [BaseFeaturedSnippetDirectAnswer](./search-core.basefeaturedsnippetdirectanswer.md) with 'rich\_text' field type. "value" field is omitted for featured snippet direct answer of this field type.

<b>Signature:</b>

```typescript
export interface RichTextFeaturedSnippetDirectAnswer extends Omit<BaseFeaturedSnippetDirectAnswer<string>, 'value'>
```
<b>Extends:</b> Omit&lt;[BaseFeaturedSnippetDirectAnswer](./search-core.basefeaturedsnippetdirectanswer.md)<!-- -->&lt;string&gt;, 'value'&gt;
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [fieldType](./search-core.richtextfeaturedsnippetdirectanswer.fieldtype.md) | [EnumOrLiteral](./search-core.enumorliteral.md)<!-- -->&lt;[BuiltInFieldType.RichText](./search-core.builtinfieldtype.md)<!-- -->&gt; | The field type of the direct answer. |
24 changes: 19 additions & 5 deletions etc/search-core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ export interface AutocompleteService {
export interface BaseAnswersConfig extends BaseSearchConfig {
}

// @public
export interface BaseFeaturedSnippetDirectAnswer<T = unknown> extends DirectAnswer<T> {
fieldType: EnumOrLiteral<BuiltInFieldType.MultiLineText | BuiltInFieldType.RichText>;
snippet: Snippet;
type: DirectAnswerType.FeaturedSnippet;
}

// @public
export interface BaseFieldValueDirectAnswer<T = unknown> extends DirectAnswer<T> {
entityName: string;
Expand Down Expand Up @@ -221,11 +228,7 @@ export interface FailedVertical {
}

// @public
export interface FeaturedSnippetDirectAnswer<T = unknown> extends DirectAnswer<T> {
fieldType: BuiltInFieldType.MultiLineText | BuiltInFieldType.RichText;
snippet: Snippet;
type: DirectAnswerType.FeaturedSnippet;
}
export type FeaturedSnippetDirectAnswer = MultiLineTextFeaturedSnippetDirectAnswer | RichTextFeaturedSnippetDirectAnswer;

// @public
export type FieldValueDirectAnswer = UnknownFieldValueDirectAnswer;
Expand Down Expand Up @@ -339,6 +342,12 @@ export enum Matcher {
NotEquals = "!$eq"
}

// @public
export interface MultiLineTextFeaturedSnippetDirectAnswer extends BaseFeaturedSnippetDirectAnswer<string> {
fieldType: EnumOrLiteral<BuiltInFieldType.MultiLineText>;
value: string;
}

// @public
export interface NearFilterValue {
lat: number;
Expand Down Expand Up @@ -414,6 +423,11 @@ export interface Result<T = Record<string, unknown>> {
source: Source;
}

// @public
export interface RichTextFeaturedSnippetDirectAnswer extends Omit<BaseFeaturedSnippetDirectAnswer<string>, 'value'> {
fieldType: EnumOrLiteral<BuiltInFieldType.RichText>;
}

// @public
export const SandboxEndpoints: Required<Endpoints>;

Expand Down
11 changes: 9 additions & 2 deletions src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,20 @@ export { Direction } from './searchservice/request/Direction';
export { AppliedQueryFilter } from './searchservice/response/AppliedQueryFilter';
export { AppliedQueryFilterType } from './searchservice/response/AppliedQueryFilterType';
export { LocationFilterDetails, LocationBoundingBox } from './searchservice/response/LocationFilterDetails';

export { DirectAnswer } from './searchservice/response/directanswer/DirectAnswer';
export { DirectAnswerType } from './searchservice/response/directanswer/DirectAnswerType';
export { BuiltInFieldType } from './searchservice/response/directanswer/BuiltInFieldType';

export { BaseFieldValueDirectAnswer } from './searchservice/response/directanswer/BaseFieldValueDirectAnswer';
export { FieldValueDirectAnswer } from './searchservice/response/directanswer/FieldValueDirectAnswer';
export { UnknownFieldValueDirectAnswer } from './searchservice/response/directanswer/UnknownFieldValueDirectAnswer';

export { BaseFeaturedSnippetDirectAnswer } from './searchservice/response/directanswer/BaseFeaturedSnippetDirectAnswer';
export { FeaturedSnippetDirectAnswer } from './searchservice/response/directanswer/FeaturedSnippetDirectAnswer';
export { DirectAnswerType } from './searchservice/response/directanswer/DirectAnswerType';
export { BuiltInFieldType } from './searchservice/response/directanswer/BuiltInFieldType';
export { RichTextFeaturedSnippetDirectAnswer } from './searchservice/response/directanswer/RichTextFeaturedSnippetDirectAnswer';
export { MultiLineTextFeaturedSnippetDirectAnswer } from './searchservice/response/directanswer/MultiLineTextFeaturedSnippetDirectAnswer';

export { DisplayableFacet, DisplayableFacetOption } from './searchservice/response/DisplayableFacet';
export { HighlightedFields } from './searchservice/response/HighlightedFields';
export { HighlightedValue } from './searchservice/response/HighlightedValue';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { DirectAnswer } from './DirectAnswer';
import { DirectAnswerType } from './DirectAnswerType';
import { Snippet } from '../Snippet';
import { BuiltInFieldType } from './BuiltInFieldType';
import { EnumOrLiteral } from '../../../utils/EnumOrLiteral';

/**
* A direct answer which was found within a document.
*
* @public
*/
export interface BaseFeaturedSnippetDirectAnswer<T = unknown> extends DirectAnswer<T> {
/** {@link DirectAnswerType}.FeaturedSnippet */
type: DirectAnswerType.FeaturedSnippet,
/** {@inheritDoc DirectAnswer.fieldType} */
fieldType: EnumOrLiteral<BuiltInFieldType.MultiLineText | BuiltInFieldType.RichText>,
/** The snippet where the direct answer was found. */
snippet: Snippet
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ export interface DirectAnswer<T = unknown> {
verticalKey: string,
/** The field type of the direct answer. */
fieldType: EnumOrLiteral<BuiltInFieldType> | 'unknown'
}
}
Loading

0 comments on commit 46f4849

Please sign in to comment.