Skip to content

Commit

Permalink
Merge 01e5534 into 75a2d99
Browse files Browse the repository at this point in the history
  • Loading branch information
yen-tt committed Aug 12, 2022
2 parents 75a2d99 + 01e5534 commit 72d9d9d
Show file tree
Hide file tree
Showing 34 changed files with 229 additions and 90 deletions.
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; [FieldValueDirectAnswer](./search-core.fieldvaluedirectanswer.md) &gt; [entityName](./search-core.fieldvaluedirectanswer.entityname.md)
[Home](./index.md) &gt; [@yext/search-core](./search-core.md) &gt; [BaseFieldValueDirectAnswer](./search-core.basefieldvaluedirectanswer.md) &gt; [entityName](./search-core.basefieldvaluedirectanswer.entityname.md)

## FieldValueDirectAnswer.entityName property
## BaseFieldValueDirectAnswer.entityName property

The name of the entity that direct answer came from.

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; [FieldValueDirectAnswer](./search-core.fieldvaluedirectanswer.md) &gt; [fieldApiName](./search-core.fieldvaluedirectanswer.fieldapiname.md)
[Home](./index.md) &gt; [@yext/search-core](./search-core.md) &gt; [BaseFieldValueDirectAnswer](./search-core.basefieldvaluedirectanswer.md) &gt; [fieldApiName](./search-core.basefieldvaluedirectanswer.fieldapiname.md)

## FieldValueDirectAnswer.fieldApiName property
## BaseFieldValueDirectAnswer.fieldApiName property

The field api name of the direct answer.

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; [FieldValueDirectAnswer](./search-core.fieldvaluedirectanswer.md) &gt; [fieldName](./search-core.fieldvaluedirectanswer.fieldname.md)
[Home](./index.md) &gt; [@yext/search-core](./search-core.md) &gt; [BaseFieldValueDirectAnswer](./search-core.basefieldvaluedirectanswer.md) &gt; [fieldName](./search-core.basefieldvaluedirectanswer.fieldname.md)

## FieldValueDirectAnswer.fieldName property
## BaseFieldValueDirectAnswer.fieldName property

The field name of the direct answer.

Expand Down
13 changes: 13 additions & 0 deletions docs/search-core.basefieldvaluedirectanswer.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; [BaseFieldValueDirectAnswer](./search-core.basefieldvaluedirectanswer.md) &gt; [fieldType](./search-core.basefieldvaluedirectanswer.fieldtype.md)

## BaseFieldValueDirectAnswer.fieldType property

The field type of the direct answer.

<b>Signature:</b>

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

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

## BaseFieldValueDirectAnswer interface

A direct answer where the answer came from a field from the knowledge graph.

<b>Signature:</b>

```typescript
export interface BaseFieldValueDirectAnswer<T = unknown> extends DirectAnswer<T>
```
<b>Extends:</b> [DirectAnswer](./search-core.directanswer.md)<!-- -->&lt;T&gt;
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [entityName](./search-core.basefieldvaluedirectanswer.entityname.md) | string | The name of the entity that direct answer came from. |
| [fieldApiName](./search-core.basefieldvaluedirectanswer.fieldapiname.md) | string | The field api name of the direct answer. |
| [fieldName](./search-core.basefieldvaluedirectanswer.fieldname.md) | string | The field name of the direct answer. |
| [fieldType](./search-core.basefieldvaluedirectanswer.fieldtype.md) | [EnumOrLiteral](./search-core.enumorliteral.md)<!-- -->&lt;[BuiltInFieldType](./search-core.builtinfieldtype.md)<!-- -->&gt; \| 'unknown' | The field type of the direct answer. |
| [relatedResult](./search-core.basefieldvaluedirectanswer.relatedresult.md) | [Result](./search-core.result.md) | The entity associated with the direct answer. |
| [type](./search-core.basefieldvaluedirectanswer.type.md) | [DirectAnswerType.FieldValue](./search-core.directanswertype.md) | [DirectAnswerType](./search-core.directanswertype.md)<!-- -->.FieldValue. |
| [value](./search-core.basefieldvaluedirectanswer.value.md) | T | The result of the direct answer. |
| [verticalKey](./search-core.basefieldvaluedirectanswer.verticalkey.md) | string | The vertical key of the direct answer. |
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; [FieldValueDirectAnswer](./search-core.fieldvaluedirectanswer.md) &gt; [relatedResult](./search-core.fieldvaluedirectanswer.relatedresult.md)
[Home](./index.md) &gt; [@yext/search-core](./search-core.md) &gt; [BaseFieldValueDirectAnswer](./search-core.basefieldvaluedirectanswer.md) &gt; [relatedResult](./search-core.basefieldvaluedirectanswer.relatedresult.md)

## FieldValueDirectAnswer.relatedResult property
## BaseFieldValueDirectAnswer.relatedResult property

The entity associated with the direct answer.

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; [FieldValueDirectAnswer](./search-core.fieldvaluedirectanswer.md) &gt; [type](./search-core.fieldvaluedirectanswer.type.md)
[Home](./index.md) &gt; [@yext/search-core](./search-core.md) &gt; [BaseFieldValueDirectAnswer](./search-core.basefieldvaluedirectanswer.md) &gt; [type](./search-core.basefieldvaluedirectanswer.type.md)

## FieldValueDirectAnswer.type property
## BaseFieldValueDirectAnswer.type property

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

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; [FieldValueDirectAnswer](./search-core.fieldvaluedirectanswer.md) &gt; [value](./search-core.fieldvaluedirectanswer.value.md)
[Home](./index.md) &gt; [@yext/search-core](./search-core.md) &gt; [BaseFieldValueDirectAnswer](./search-core.basefieldvaluedirectanswer.md) &gt; [value](./search-core.basefieldvaluedirectanswer.value.md)

## FieldValueDirectAnswer.value property
## BaseFieldValueDirectAnswer.value property

The result of the direct answer.

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; [FieldValueDirectAnswer](./search-core.fieldvaluedirectanswer.md) &gt; [verticalKey](./search-core.fieldvaluedirectanswer.verticalkey.md)
[Home](./index.md) &gt; [@yext/search-core](./search-core.md) &gt; [BaseFieldValueDirectAnswer](./search-core.basefieldvaluedirectanswer.md) &gt; [verticalKey](./search-core.basefieldvaluedirectanswer.verticalkey.md)

## FieldValueDirectAnswer.verticalKey property
## BaseFieldValueDirectAnswer.verticalKey property

The vertical key of the direct answer.

Expand Down
3 changes: 2 additions & 1 deletion docs/search-core.builtinfieldtype.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ export declare enum BuiltInFieldType

| Member | Value | Description |
| --- | --- | --- |
| Address | <code>&quot;address&quot;</code> | |
| MultiLineText | <code>&quot;multi_line_text&quot;</code> | |
| Phone | <code>&quot;phone&quot;</code> | |

13 changes: 13 additions & 0 deletions docs/search-core.customfieldvalueda.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; [CustomFieldValueDA](./search-core.customfieldvalueda.md) &gt; [fieldType](./search-core.customfieldvalueda.fieldtype.md)

## CustomFieldValueDA.fieldType property

The field type of the direct answer.

<b>Signature:</b>

```typescript
fieldType: 'unknown';
```
21 changes: 21 additions & 0 deletions docs/search-core.customfieldvalueda.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; [CustomFieldValueDA](./search-core.customfieldvalueda.md)

## CustomFieldValueDA interface

A [BaseFieldValueDirectAnswer](./search-core.basefieldvaluedirectanswer.md) with a field type outside of [BuiltInFieldType](./search-core.builtinfieldtype.md)<!-- -->.

<b>Signature:</b>

```typescript
export interface CustomFieldValueDA<T = unknown> extends BaseFieldValueDirectAnswer<T>
```
<b>Extends:</b> [BaseFieldValueDirectAnswer](./search-core.basefieldvaluedirectanswer.md)<!-- -->&lt;T&gt;
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [fieldType](./search-core.customfieldvalueda.fieldtype.md) | 'unknown' | The field type of the direct answer. |
2 changes: 1 addition & 1 deletion docs/search-core.directanswer.fieldtype.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ The field type of the direct answer.
<b>Signature:</b>

```typescript
fieldType: BuiltInFieldType | string;
fieldType: EnumOrLiteral<BuiltInFieldType> | 'unknown';
```
2 changes: 1 addition & 1 deletion docs/search-core.directanswer.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface DirectAnswer<T = unknown>

| Property | Type | Description |
| --- | --- | --- |
| [fieldType](./search-core.directanswer.fieldtype.md) | [BuiltInFieldType](./search-core.builtinfieldtype.md) \| string | The field type of the direct answer. |
| [fieldType](./search-core.directanswer.fieldtype.md) | [EnumOrLiteral](./search-core.enumorliteral.md)<!-- -->&lt;[BuiltInFieldType](./search-core.builtinfieldtype.md)<!-- -->&gt; \| 'unknown' | The field type of the direct answer. |
| [relatedResult](./search-core.directanswer.relatedresult.md) | [Result](./search-core.result.md) | The entity associated with the direct answer. |
| [type](./search-core.directanswer.type.md) | [DirectAnswerType](./search-core.directanswertype.md) | The [DirectAnswerType](./search-core.directanswertype.md)<!-- -->. |
| [value?](./search-core.directanswer.value.md) | T | <i>(Optional)</i> The result of the direct answer. |
Expand Down
13 changes: 13 additions & 0 deletions docs/search-core.enumorliteral.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; [EnumOrLiteral](./search-core.enumorliteral.md)

## EnumOrLiteral type

Produces a union type from the enum passed as a generic which consists of the enum values and the string literals of the enum.

<b>Signature:</b>

```typescript
export declare type EnumOrLiteral<T extends string> = T | `${T}`;
```
2 changes: 1 addition & 1 deletion docs/search-core.featuredsnippetdirectanswer.fieldtype.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ The field type of the direct answer.
<b>Signature:</b>

```typescript
fieldType: BuiltInFieldType | string;
fieldType: EnumOrLiteral<BuiltInFieldType> | 'unknown';
```
2 changes: 1 addition & 1 deletion docs/search-core.featuredsnippetdirectanswer.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface FeaturedSnippetDirectAnswer<T = unknown> extends DirectAnswer<T
| Property | Type | Description |
| --- | --- | --- |
| [fieldType](./search-core.featuredsnippetdirectanswer.fieldtype.md) | [BuiltInFieldType](./search-core.builtinfieldtype.md) \| string | The field type of the direct answer. |
| [fieldType](./search-core.featuredsnippetdirectanswer.fieldtype.md) | [EnumOrLiteral](./search-core.enumorliteral.md)<!-- -->&lt;[BuiltInFieldType](./search-core.builtinfieldtype.md)<!-- -->&gt; \| 'unknown' | The field type of the direct answer. |
| [relatedResult](./search-core.featuredsnippetdirectanswer.relatedresult.md) | [Result](./search-core.result.md) | The entity associated with 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. |
Expand Down
13 changes: 0 additions & 13 deletions docs/search-core.fieldvaluedirectanswer.fieldtype.md

This file was deleted.

21 changes: 4 additions & 17 deletions docs/search-core.fieldvaluedirectanswer.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,14 @@

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

## FieldValueDirectAnswer interface
## FieldValueDirectAnswer type

A direct answer where the answer came from a field from the knowledge graph.
Possible built-in and custom [BaseFieldValueDirectAnswer](./search-core.basefieldvaluedirectanswer.md) interfaces

<b>Signature:</b>

```typescript
export interface FieldValueDirectAnswer<T = unknown> extends DirectAnswer<T>
export declare type FieldValueDirectAnswer = CustomFieldValueDA;
```
<b>Extends:</b> [DirectAnswer](./search-core.directanswer.md)<!-- -->&lt;T&gt;
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [entityName](./search-core.fieldvaluedirectanswer.entityname.md) | string | The name of the entity that direct answer came from. |
| [fieldApiName](./search-core.fieldvaluedirectanswer.fieldapiname.md) | string | The field api name of the direct answer. |
| [fieldName](./search-core.fieldvaluedirectanswer.fieldname.md) | string | The field name of the direct answer. |
| [fieldType](./search-core.fieldvaluedirectanswer.fieldtype.md) | [BuiltInFieldType](./search-core.builtinfieldtype.md) \| string | The field type of the direct answer. |
| [relatedResult](./search-core.fieldvaluedirectanswer.relatedresult.md) | [Result](./search-core.result.md) | The entity associated with the direct answer. |
| [type](./search-core.fieldvaluedirectanswer.type.md) | [DirectAnswerType.FieldValue](./search-core.directanswertype.md) | [DirectAnswerType](./search-core.directanswertype.md)<!-- -->.FieldValue. |
| [value](./search-core.fieldvaluedirectanswer.value.md) | T | The result of the direct answer. |
| [verticalKey](./search-core.fieldvaluedirectanswer.verticalkey.md) | string | The vertical key of the direct answer. |
<b>References:</b> [CustomFieldValueDA](./search-core.customfieldvalueda.md)

5 changes: 4 additions & 1 deletion docs/search-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@
| [AutocompleteResult](./search-core.autocompleteresult.md) | An autocomplete suggestion. |
| [AutocompleteService](./search-core.autocompleteservice.md) | A service for autocomplete requests. |
| [BaseAnswersConfig](./search-core.baseanswersconfig.md) | |
| [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. |
| [CustomFieldValueDA](./search-core.customfieldvalueda.md) | A [BaseFieldValueDirectAnswer](./search-core.basefieldvaluedirectanswer.md) with a field type outside of [BuiltInFieldType](./search-core.builtinfieldtype.md)<!-- -->. |
| [DirectAnswer](./search-core.directanswer.md) | A direct answer to a search. |
| [DisplayableFacet](./search-core.displayablefacet.md) | A [Facet](./search-core.facet.md) which contains extra fields meant to be displayed to the end user. |
| [DisplayableFacetOption](./search-core.displayablefacetoption.md) | A [FacetOption](./search-core.facetoption.md) with extra data meant to be displayed to the end user. |
Expand All @@ -61,7 +63,6 @@
| [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. |
| [FieldValueDirectAnswer](./search-core.fieldvaluedirectanswer.md) | A direct answer where the answer came from a field from the knowledge graph. |
| [FieldValueFilter](./search-core.fieldvaluefilter.md) | Represents a filter which compares values to a single field. |
| [FilterSearchRequest](./search-core.filtersearchrequest.md) | Options for a filtersearch request. |
| [FilterSearchResponse](./search-core.filtersearchresponse.md) | The response of a filtersearch request. |
Expand Down Expand Up @@ -109,6 +110,8 @@
| --- | --- |
| [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. |
| [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. |
| [StaticFilter](./search-core.staticfilter.md) | Represents a static filter that will be used to refine results. |
Expand Down
39 changes: 26 additions & 13 deletions etc/search-core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,18 @@ export interface AutocompleteService {
export interface BaseAnswersConfig extends BaseSearchConfig {
}

// @public
export interface BaseFieldValueDirectAnswer<T = unknown> extends DirectAnswer<T> {
entityName: string;
fieldApiName: string;
fieldName: string;
fieldType: EnumOrLiteral<BuiltInFieldType> | 'unknown';
relatedResult: Result;
type: DirectAnswerType.FieldValue;
value: T;
verticalKey: string;
}

// @public
export interface BaseSearchConfig {
// @alpha
Expand All @@ -96,7 +108,9 @@ export interface BaseSearchConfig {
// @public
export enum BuiltInFieldType {
// (undocumented)
Address = "address"
MultiLineText = "multi_line_text",
// (undocumented)
Phone = "phone"
}

// @public
Expand All @@ -108,9 +122,14 @@ export interface ClientSDKHeaderValues {
// @public
export type Context = any;

// @public
export interface CustomFieldValueDA<T = unknown> extends BaseFieldValueDirectAnswer<T> {
fieldType: 'unknown';
}

// @public
export interface DirectAnswer<T = unknown> {
fieldType: BuiltInFieldType | string;
fieldType: EnumOrLiteral<BuiltInFieldType> | 'unknown';
relatedResult: Result;
type: DirectAnswerType;
value?: T;
Expand Down Expand Up @@ -160,6 +179,9 @@ export interface Endpoints {
verticalSearch?: string;
}

// @public
export type EnumOrLiteral<T extends string> = T | `${T}`;

// @public
export enum ErrorType {
BackendError = "BACKEND_ERROR",
Expand Down Expand Up @@ -192,7 +214,7 @@ export interface FailedVertical {

// @public
export interface FeaturedSnippetDirectAnswer<T = unknown> extends DirectAnswer<T> {
fieldType: BuiltInFieldType | string;
fieldType: EnumOrLiteral<BuiltInFieldType> | 'unknown';
relatedResult: Result;
snippet: Snippet;
type: DirectAnswerType.FeaturedSnippet;
Expand All @@ -201,16 +223,7 @@ export interface FeaturedSnippetDirectAnswer<T = unknown> extends DirectAnswer<T
}

// @public
export interface FieldValueDirectAnswer<T = unknown> extends DirectAnswer<T> {
entityName: string;
fieldApiName: string;
fieldName: string;
fieldType: BuiltInFieldType | string;
relatedResult: Result;
type: DirectAnswerType.FieldValue;
value: T;
verticalKey: string;
}
export type FieldValueDirectAnswer = CustomFieldValueDA;

// @public
export interface FieldValueFilter {
Expand Down
Loading

0 comments on commit 72d9d9d

Please sign in to comment.