Skip to content

Commit

Permalink
create email direct answer
Browse files Browse the repository at this point in the history
  • Loading branch information
juliannzhou committed Aug 15, 2022
1 parent 75a2d99 commit 6171800
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/search-core.builtinfieldtype.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ export declare enum BuiltInFieldType
| Member | Value | Description |
| --- | --- | --- |
| Address | <code>&quot;address&quot;</code> | |
| Email | <code>&quot;email&quot;</code> | |

13 changes: 13 additions & 0 deletions docs/search-core.email.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; [Email](./search-core.email.md)

## Email type

A type to use in email direct answer's value [FieldValueDirectAnswer.value](./search-core.fieldvaluedirectanswer.value.md)<!-- -->.

<b>Signature:</b>

```typescript
export declare type Email = string[];
```
11 changes: 11 additions & 0 deletions docs/search-core.emaildirectanswer.fieldtype.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/search-core](./search-core.md) &gt; [EmailDirectAnswer](./search-core.emaildirectanswer.md) &gt; [fieldType](./search-core.emaildirectanswer.fieldtype.md)

## EmailDirectAnswer.fieldType property

<b>Signature:</b>

```typescript
fieldType: BuiltInFieldType.Email;
```
21 changes: 21 additions & 0 deletions docs/search-core.emaildirectanswer.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; [EmailDirectAnswer](./search-core.emaildirectanswer.md)

## EmailDirectAnswer interface

A interface for direct answers [FieldValueDirectAnswer](./search-core.fieldvaluedirectanswer.md) with email values.

<b>Signature:</b>

```typescript
export interface EmailDirectAnswer extends FieldValueDirectAnswer<Email>
```
<b>Extends:</b> [FieldValueDirectAnswer](./search-core.fieldvaluedirectanswer.md)<!-- -->&lt;[Email](./search-core.email.md)<!-- -->&gt;
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [fieldType](./search-core.emaildirectanswer.fieldtype.md) | [BuiltInFieldType.Email](./search-core.builtinfieldtype.md) | |
2 changes: 2 additions & 0 deletions docs/search-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
| [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. |
| [EmailDirectAnswer](./search-core.emaildirectanswer.md) | A interface for direct answers [FieldValueDirectAnswer](./search-core.fieldvaluedirectanswer.md) with email values. |
| [Endpoints](./search-core.endpoints.md) | Overrides for the URLs which are used when making requests to the Search API. |
| [Facet](./search-core.facet.md) | Represents dynamic filter options for the Search API. |
| [FacetOption](./search-core.facetoption.md) | A filter associated with the facet. |
Expand Down Expand Up @@ -109,6 +110,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/)<!-- -->. |
| [Email](./search-core.email.md) | A type to use in email direct answer's value [FieldValueDirectAnswer.value](./search-core.fieldvaluedirectanswer.value.md)<!-- -->. |
| [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
13 changes: 12 additions & 1 deletion etc/search-core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ export interface BaseSearchConfig {
// @public
export enum BuiltInFieldType {
// (undocumented)
Address = "address"
Address = "address",
// (undocumented)
Email = "email"
}

// @public
Expand Down Expand Up @@ -142,6 +144,15 @@ export interface DisplayableFacetOption extends FacetOption {
selected: boolean;
}

// @public
export type Email = string[];

// @public
export interface EmailDirectAnswer extends FieldValueDirectAnswer<Email> {
// (undocumented)
fieldType: BuiltInFieldType.Email;
}

// @public
export interface Endpoints {
// (undocumented)
Expand Down
1 change: 1 addition & 0 deletions src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export { Snippet } from './searchservice/response/Snippet';
export { ErrorType } from './searchservice/response/ErrorType';
export { FailedVertical } from './searchservice/response/FailedVertical';
export { BuiltInFieldType } from './searchservice/response/BuiltInFieldType';
export { EmailDirectAnswer, Email } from './searchservice/response/EmailDirectAnswer';

// Search service common models
export { Matcher } from './searchservice/common/Matcher';
Expand Down
2 changes: 1 addition & 1 deletion src/models/searchservice/response/BuiltInFieldType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export enum BuiltInFieldType {
// IOSAppURL = 'ios_app_url',
// AndroidAppURL = 'android_app_url',
// FacebookURL = 'facebook_url',
// Email = 'email',
Email = 'email',
// InstagramHandle = 'instagram_handle',
// TwitterHandle = 'twitter_handle',
// Phone = 'phone',
Expand Down
18 changes: 18 additions & 0 deletions src/models/searchservice/response/EmailDirectAnswer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { FieldValueDirectAnswer } from './FieldValueDirectAnswer';
import { BuiltInFieldType } from './BuiltInFieldType';

/**
* A interface for direct answers {@link FieldValueDirectAnswer} with email values.
*
* @public
*/
export interface EmailDirectAnswer extends FieldValueDirectAnswer<Email> {
fieldType: BuiltInFieldType.Email
}

/**
* A type to use in email direct answer's value {@link FieldValueDirectAnswer.value}.
*
* @public
*/
export type Email = string[];

0 comments on commit 6171800

Please sign in to comment.