Skip to content

Commit

Permalink
Version 2.4.0 (#154)
Browse files Browse the repository at this point in the history
# Version 2.4.0

### Features
Bump search-core version to 2.4.0 which introduces support for Markdown, RichText_v2 (Lexical), and HTML featured snippets
  • Loading branch information
cea2aj authored Jun 28, 2023
2 parents dad9f41 + e0152c7 commit fd2ec08
Show file tree
Hide file tree
Showing 19 changed files with 336 additions and 204 deletions.
6 changes: 3 additions & 3 deletions THIRD-PARTY-NOTICES
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ SOFTWARE.

The following NPM package may be included in this product:

- @yext/search-core@2.3.0
- @yext/search-core@2.4.0

This package contains the following license and notice below:

Expand Down Expand Up @@ -134,7 +134,7 @@ THE SOFTWARE.

The following NPM package may be included in this product:

- [email protected].5
- [email protected].6

This package contains the following license and notice below:

Expand Down Expand Up @@ -280,7 +280,7 @@ terms above.

The following NPM package may be included in this product:

- [email protected].7
- [email protected].11

This package contains the following license and notice below:

Expand Down
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: EnumOrLiteral<BuiltInFieldType.MultiLineText | BuiltInFieldType.RichText>;
fieldType: EnumOrLiteral<BuiltInFieldType.MultiLineText | BuiltInFieldType.RichText | BuiltInFieldType.RichText_v2 | BuiltInFieldType.Html | BuiltInFieldType.Markdown>;
```
2 changes: 1 addition & 1 deletion docs/search-headless.basefeaturedsnippetdirectanswer.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export declare interface BaseFeaturedSnippetDirectAnswer<T = unknown> extends Di
| Property | Type | Description |
| --- | --- | --- |
| [fieldType](./search-headless.basefeaturedsnippetdirectanswer.fieldtype.md) | [EnumOrLiteral](./search-headless.enumorliteral.md)<!-- -->&lt;[BuiltInFieldType.MultiLineText](./search-headless.builtinfieldtype.md) \| [BuiltInFieldType.RichText](./search-headless.builtinfieldtype.md)<!-- -->&gt; | The field type of the direct answer. |
| [fieldType](./search-headless.basefeaturedsnippetdirectanswer.fieldtype.md) | [EnumOrLiteral](./search-headless.enumorliteral.md)<!-- -->&lt;[BuiltInFieldType.MultiLineText](./search-headless.builtinfieldtype.md) \| [BuiltInFieldType.RichText](./search-headless.builtinfieldtype.md) \| [BuiltInFieldType.RichText\_v2](./search-headless.builtinfieldtype.md) \| [BuiltInFieldType.Html](./search-headless.builtinfieldtype.md) \| [BuiltInFieldType.Markdown](./search-headless.builtinfieldtype.md)<!-- -->&gt; | The field type of the direct answer. |
| [snippet](./search-headless.basefeaturedsnippetdirectanswer.snippet.md) | [Snippet](./search-headless.snippet.md) | The snippet where the direct answer was found. |
| [type](./search-headless.basefeaturedsnippetdirectanswer.type.md) | [DirectAnswerType.FeaturedSnippet](./search-headless.directanswertype.md) | Indicates that the DirectAnswer is a [FeaturedSnippetDirectAnswer](./search-headless.featuredsnippetdirectanswer.md)<!-- -->. |
3 changes: 3 additions & 0 deletions docs/search-headless.builtinfieldtype.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@ export declare enum BuiltInFieldType
| Email | <code>&quot;email&quot;</code> | |
| FacebookURL | <code>&quot;facebook_url&quot;</code> | |
| Hours | <code>&quot;hours&quot;</code> | |
| Html | <code>&quot;html&quot;</code> | |
| InstagramHandle | <code>&quot;instagram_handle&quot;</code> | |
| Integer | <code>&quot;integer&quot;</code> | |
| IOSAppURL | <code>&quot;ios_app_url&quot;</code> | |
| Markdown | <code>&quot;markdown&quot;</code> | |
| MultiLineText | <code>&quot;multi_line_text&quot;</code> | |
| Phone | <code>&quot;phone&quot;</code> | |
| RichText | <code>&quot;rich_text&quot;</code> | |
| RichText\_v2 | <code>&quot;rich_text_v2&quot;</code> | |
| SingleLineText | <code>&quot;single_line_text&quot;</code> | |
| TwitterHandle | <code>&quot;twitter_handle&quot;</code> | |
| URL | <code>&quot;url&quot;</code> | |
Expand Down
2 changes: 1 addition & 1 deletion docs/search-headless.directanswer.value.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ value?: T;

## Remarks

A value will not be present if the [DirectAnswer.type](./search-headless.directanswer.type.md) is 'FEATURED\_SNIPPET' and [DirectAnswer.fieldType](./search-headless.directanswer.fieldtype.md) is 'rich\_text'.
A value will not be present if the [DirectAnswer.type](./search-headless.directanswer.type.md) is 'FEATURED\_SNIPPET' and [DirectAnswer.fieldType](./search-headless.directanswer.fieldtype.md) is 'rich\_text', 'markdown', 'html' or 'rich\_text\_v2'.

4 changes: 2 additions & 2 deletions docs/search-headless.featuredsnippetdirectanswer.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ All possible built-in [BaseFeaturedSnippetDirectAnswer](./search-headless.basefe
<b>Signature:</b>

```typescript
export declare type FeaturedSnippetDirectAnswer = MultiLineTextSnippetDirectAnswer | RichTextSnippetDirectAnswer;
export declare type FeaturedSnippetDirectAnswer = MultiLineTextSnippetDirectAnswer | RichTextSnippetDirectAnswer | RichTextV2SnippetDirectAnswer | HTMLSnippetDirectAnswer | MarkdownSnippetDirectAnswer;
```
<b>References:</b> [MultiLineTextSnippetDirectAnswer](./search-headless.multilinetextsnippetdirectanswer.md)<!-- -->, [RichTextSnippetDirectAnswer](./search-headless.richtextsnippetdirectanswer.md)
<b>References:</b> [MultiLineTextSnippetDirectAnswer](./search-headless.multilinetextsnippetdirectanswer.md)<!-- -->, [RichTextSnippetDirectAnswer](./search-headless.richtextsnippetdirectanswer.md)<!-- -->, [RichTextV2SnippetDirectAnswer](./search-headless.richtextv2snippetdirectanswer.md)<!-- -->, [HTMLSnippetDirectAnswer](./search-headless.htmlsnippetdirectanswer.md)<!-- -->, [MarkdownSnippetDirectAnswer](./search-headless.markdownsnippetdirectanswer.md)

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

## HTMLSnippetDirectAnswer.fieldType property

The field type of the direct answer.

<b>Signature:</b>

```typescript
fieldType: EnumOrLiteral<BuiltInFieldType.Html>;
```
21 changes: 21 additions & 0 deletions docs/search-headless.htmlsnippetdirectanswer.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-headless](./search-headless.md) &gt; [HTMLSnippetDirectAnswer](./search-headless.htmlsnippetdirectanswer.md)

## HTMLSnippetDirectAnswer interface

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

<b>Signature:</b>

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

## MarkdownSnippetDirectAnswer.fieldType property

The field type of the direct answer.

<b>Signature:</b>

```typescript
fieldType: EnumOrLiteral<BuiltInFieldType.Markdown>;
```
21 changes: 21 additions & 0 deletions docs/search-headless.markdownsnippetdirectanswer.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-headless](./search-headless.md) &gt; [MarkdownSnippetDirectAnswer](./search-headless.markdownsnippetdirectanswer.md)

## MarkdownSnippetDirectAnswer interface

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

<b>Signature:</b>

```typescript
export declare interface MarkdownSnippetDirectAnswer extends Omit<BaseFeaturedSnippetDirectAnswer<string>, 'value'>
```
<b>Extends:</b> Omit&lt;[BaseFeaturedSnippetDirectAnswer](./search-headless.basefeaturedsnippetdirectanswer.md)<!-- -->&lt;string&gt;, 'value'&gt;
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [fieldType](./search-headless.markdownsnippetdirectanswer.fieldtype.md) | [EnumOrLiteral](./search-headless.enumorliteral.md)<!-- -->&lt;[BuiltInFieldType.Markdown](./search-headless.builtinfieldtype.md)<!-- -->&gt; | The field type of the direct answer. |
3 changes: 3 additions & 0 deletions docs/search-headless.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
| [HolidayHours](./search-headless.holidayhours.md) | An interface for holiday hours to use in [BaseFieldValueDirectAnswer.value](./search-headless.basefieldvaluedirectanswer.value.md)<!-- -->. |
| [Hours](./search-headless.hours.md) | An interface for hours fields to use in [BaseFieldValueDirectAnswer.value](./search-headless.basefieldvaluedirectanswer.value.md)<!-- -->. |
| [HoursDirectAnswer](./search-headless.hoursdirectanswer.md) | A [BaseFieldValueDirectAnswer](./search-headless.basefieldvaluedirectanswer.md) interface with 'hours' field type. |
| [HTMLSnippetDirectAnswer](./search-headless.htmlsnippetdirectanswer.md) | A [BaseFeaturedSnippetDirectAnswer](./search-headless.basefeaturedsnippetdirectanswer.md) with 'html' field type. "value" field is omitted for featured snippet direct answer of this field type. |
| [InstagramHandleDirectAnswer](./search-headless.instagramhandledirectanswer.md) | A direct answer for an instagram handle field. |
| [IntegerDirectAnswer](./search-headless.integerdirectanswer.md) | A direct answer for an integer field. |
| [Interval](./search-headless.interval.md) | An interface for a time interval to use in [BaseFieldValueDirectAnswer.value](./search-headless.basefieldvaluedirectanswer.value.md)<!-- -->. |
Expand All @@ -98,6 +99,7 @@
| [LocationFilterDetails](./search-headless.locationfilterdetails.md) | Additional details relevant to the filter with "PLACE" for its [AppliedQueryFilterType](./search-headless.appliedqueryfiltertype.md)<!-- -->. |
| [LocationState](./search-headless.locationstate.md) | Maintains the user's location, if given, or the inferred location, that is used to bias search results. |
| [LowerNumberRangeLimit](./search-headless.lowernumberrangelimit.md) | The start limit of [NumberRangeValue](./search-headless.numberrangevalue.md)<!-- -->. |
| [MarkdownSnippetDirectAnswer](./search-headless.markdownsnippetdirectanswer.md) | A [BaseFeaturedSnippetDirectAnswer](./search-headless.basefeaturedsnippetdirectanswer.md) with 'markdown' field type. "value" field is omitted for featured snippet direct answer of this field type. |
| [MetaState](./search-headless.metastate.md) | Maintains the metadata for Search Headless. |
| [MultiLineTextSnippetDirectAnswer](./search-headless.multilinetextsnippetdirectanswer.md) | A [BaseFeaturedSnippetDirectAnswer](./search-headless.basefeaturedsnippetdirectanswer.md) with 'multi\_line\_text' field type. |
| [NearFilterValue](./search-headless.nearfiltervalue.md) | A filter value for a filter with a $near [Matcher](./search-headless.matcher.md)<!-- -->. |
Expand All @@ -114,6 +116,7 @@
| [Result](./search-headless.result.md) | An individual search result. |
| [RichTextDirectAnswer](./search-headless.richtextdirectanswer.md) | A direct answer for a rich text field. |
| [RichTextSnippetDirectAnswer](./search-headless.richtextsnippetdirectanswer.md) | A [BaseFeaturedSnippetDirectAnswer](./search-headless.basefeaturedsnippetdirectanswer.md) with 'rich\_text' field type. "value" field is omitted for featured snippet direct answer of this field type. |
| [RichTextV2SnippetDirectAnswer](./search-headless.richtextv2snippetdirectanswer.md) | A [BaseFeaturedSnippetDirectAnswer](./search-headless.basefeaturedsnippetdirectanswer.md) with 'rich\_text\_v2' field type. "value" field is omitted for featured snippet direct answer of this field type. |
| [SearchConfigWithApiKey](./search-headless.searchconfigwithapikey.md) | Configuration options for [SearchCore](./search-headless.searchcore.md)<!-- -->, which includes the options from [BaseSearchConfig](./search-headless.basesearchconfig.md)<!-- -->, but requires apiKey. |
| [SearchConfigWithToken](./search-headless.searchconfigwithtoken.md) | Configuration options for [SearchCore](./search-headless.searchcore.md)<!-- -->, which includes the options from [BaseSearchConfig](./search-headless.basesearchconfig.md)<!-- -->, but requires token. |
| [SearchParameterField](./search-headless.searchparameterfield.md) | Indicates which entity field to perform the autocomplete request on. |
Expand Down
13 changes: 13 additions & 0 deletions docs/search-headless.richtextv2snippetdirectanswer.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-headless](./search-headless.md) &gt; [RichTextV2SnippetDirectAnswer](./search-headless.richtextv2snippetdirectanswer.md) &gt; [fieldType](./search-headless.richtextv2snippetdirectanswer.fieldtype.md)

## RichTextV2SnippetDirectAnswer.fieldType property

The field type of the direct answer.

<b>Signature:</b>

```typescript
fieldType: EnumOrLiteral<BuiltInFieldType.RichText_v2>;
```
21 changes: 21 additions & 0 deletions docs/search-headless.richtextv2snippetdirectanswer.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-headless](./search-headless.md) &gt; [RichTextV2SnippetDirectAnswer](./search-headless.richtextv2snippetdirectanswer.md)

## RichTextV2SnippetDirectAnswer interface

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

<b>Signature:</b>

```typescript
export declare interface RichTextV2SnippetDirectAnswer extends Omit<BaseFeaturedSnippetDirectAnswer<string>, 'value'>
```
<b>Extends:</b> Omit&lt;[BaseFeaturedSnippetDirectAnswer](./search-headless.basefeaturedsnippetdirectanswer.md)<!-- -->&lt;string&gt;, 'value'&gt;
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [fieldType](./search-headless.richtextv2snippetdirectanswer.fieldtype.md) | [EnumOrLiteral](./search-headless.enumorliteral.md)<!-- -->&lt;[BuiltInFieldType.RichText\_v2](./search-headless.builtinfieldtype.md)<!-- -->&gt; | The field type of the direct answer. |
2 changes: 1 addition & 1 deletion docs/search-headless.snippet.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ export declare interface Snippet
| Property | Type | Description |
| --- | --- | --- |
| [matchedSubstrings](./search-headless.snippet.matchedsubstrings.md) | { offset: number; length: number; }\[\] | The locations in the document text of the [DirectAnswer.value](./search-headless.directanswer.value.md) |
| [value](./search-headless.snippet.value.md) | string | The snippet's body of text |
| [value](./search-headless.snippet.value.md) | string | The raw snippet value, or HTML if - entity is of type HTML - the conversion to HTML is enabled in search configuration |

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

## Snippet.value property

The snippet's body of text
The raw snippet value, or HTML if - entity is of type HTML - the conversion to HTML is enabled in search configuration

<b>Signature:</b>

Expand Down
25 changes: 23 additions & 2 deletions etc/search-headless.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export interface AutocompleteService {

// @public
export interface BaseFeaturedSnippetDirectAnswer<T = unknown> extends DirectAnswer<T> {
fieldType: EnumOrLiteral<BuiltInFieldType.MultiLineText | BuiltInFieldType.RichText>;
fieldType: EnumOrLiteral<BuiltInFieldType.MultiLineText | BuiltInFieldType.RichText | BuiltInFieldType.RichText_v2 | BuiltInFieldType.Html | BuiltInFieldType.Markdown>;
snippet: Snippet;
type: DirectAnswerType.FeaturedSnippet;
}
Expand Down Expand Up @@ -150,18 +150,24 @@ export enum BuiltInFieldType {
// (undocumented)
Hours = "hours",
// (undocumented)
Html = "html",
// (undocumented)
InstagramHandle = "instagram_handle",
// (undocumented)
Integer = "integer",
// (undocumented)
IOSAppURL = "ios_app_url",
// (undocumented)
Markdown = "markdown",
// (undocumented)
MultiLineText = "multi_line_text",
// (undocumented)
Phone = "phone",
// (undocumented)
RichText = "rich_text",
// (undocumented)
RichText_v2 = "rich_text_v2",
// (undocumented)
SingleLineText = "single_line_text",
// (undocumented)
TwitterHandle = "twitter_handle",
Expand Down Expand Up @@ -359,7 +365,7 @@ export interface FailedVertical {
}

// @public
export type FeaturedSnippetDirectAnswer = MultiLineTextSnippetDirectAnswer | RichTextSnippetDirectAnswer;
export type FeaturedSnippetDirectAnswer = MultiLineTextSnippetDirectAnswer | RichTextSnippetDirectAnswer | RichTextV2SnippetDirectAnswer | HTMLSnippetDirectAnswer | MarkdownSnippetDirectAnswer;

// @public
export type FieldValueDirectAnswer = UnknownFieldValueDirectAnswer | TextDirectAnswer | UrlDirectAnswer | RichTextDirectAnswer | DecimalDirectAnswer | FacebookUrlDirectAnswer | InstagramHandleDirectAnswer | TwitterHandleDirectAnswer | IosAppUrlDirectAnswer | AndroidAppUrlDirectAnswer | ComplexUrlDirectAnswer | IntegerDirectAnswer | PhoneDirectAnswer | EmailDirectAnswer | AddressDirectAnswer | HoursDirectAnswer;
Expand Down Expand Up @@ -469,6 +475,11 @@ export interface HoursDirectAnswer extends BaseFieldValueDirectAnswer<Hours | Ho
fieldType: EnumOrLiteral<BuiltInFieldType.Hours>;
}

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

// @public
export interface InstagramHandleDirectAnswer extends BaseFieldValueDirectAnswer<string> {
// (undocumented)
Expand Down Expand Up @@ -548,6 +559,11 @@ export interface LowerNumberRangeLimit {
value: number;
}

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

// @public
export enum Matcher {
Between = "$between",
Expand Down Expand Up @@ -697,6 +713,11 @@ export interface RichTextSnippetDirectAnswer extends Omit<BaseFeaturedSnippetDir
fieldType: EnumOrLiteral<BuiltInFieldType.RichText>;
}

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

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

Expand Down
Loading

0 comments on commit fd2ec08

Please sign in to comment.