Skip to content

Commit

Permalink
Merge pull request #222 from yext/release/v2
Browse files Browse the repository at this point in the history
## Version 2.0.0

### Changes
- `additionalQueryParameter` is now a public field in `SearchConfig` models (#217)

### Breaking Changes
- Updated default and sandbox URL endpoints from `../answers/..` to `../search/..` as part of rebranding process (#196 )
- Restructured StaticFilters models for better developer experience and enforce proper restriction in the kind of combinations of filters supported by the backend
  - Now, static filters can be either a field value filter or a nested object that is composed by combining field value filters. (#201 )
  - `ConjunctionStaticFilter` and `DisjunctionStaticFilter` models were created to reflect such limitation. For example, ANDs of ORs combination is allowed, ORs of ANDs combination is not allowed.  (#204 )
- Updated `FieldValueDirectAnswer` model to properly handle different `value` types. Previously, FieldValueDirectAnswer interface enforces that the `value` field will always be of type `string`. Now, `FieldValueDirectAnswer` is a union type of predefined interfaces with known `value` type and `UnknownFieldValueDirectAnswer` with a generic `value` type for other `fieldType` outside of `BuiltInFieldType`. (#200 #202 )
   - The newly added built-in interfaces can be found in the document page [**here**](https://github.com/yext/search-core/blob/develop/docs/search-core.fieldvaluedirectanswer.md)  (#206 #208 #210 #211 #205 #209 #203 #220 )
- Narrow down `FeaturedSnippetDirectAnswer` TypeScript model to be a union type of   `MultiLineTextSnippetDirectAnswer` and `RichTextSnippetDirectAnswer` as a featured snippet direct answer can only be of fieldType `multi_line_text` or `rich_text`. (#207 #212 )
- All exports marked as `@deprecated` in previous version(s) as part of the rebranding process is now removed in V2 (#216 )
  - For more details, the deprecated identifiers are listed in [v1.8 release notes](https://github.com/yext/search-core/releases/tag/v1.8.0)
  • Loading branch information
yen-tt committed Sep 8, 2022
2 parents 1e9084a + 5d7e7fa commit c0e7f82
Show file tree
Hide file tree
Showing 219 changed files with 2,827 additions and 819 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/run-tests.yml
Expand Up @@ -10,3 +10,9 @@ jobs:
uses: yext/slapshot-reusable-workflows/.github/workflows/run_tests.yml@v1
with:
build_script: npm run build-ci

compilation_check_for_test_site:
uses: yext/slapshot-reusable-workflows/.github/workflows/run_tests.yml@v1
with:
test_script: cd test-site && npm i && npm run build
node_matrix: '["16.x"]'
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -27,7 +27,7 @@ Search Core is a networking library for interacting with the Yext Search API.

## Getting Started

For a full getting started walk through, view our [official Hitchhiker Guide](https://hitchhikers.yext.com/guides/answers-core-getting-started/).
For a full getting started walk through, view our [official Hitchhiker Guide](https://hitchhikers.yext.com/guides/search-core-getting-started/).

First, install Search-core via [npm](https://www.npmjs.com/get-npm):

Expand Down
11 changes: 11 additions & 0 deletions docs/search-core.address.city.md
@@ -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; [Address](./search-core.address.md) &gt; [city](./search-core.address.city.md)

## Address.city property

<b>Signature:</b>

```typescript
city?: string;
```
11 changes: 11 additions & 0 deletions docs/search-core.address.countrycode.md
@@ -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; [Address](./search-core.address.md) &gt; [countryCode](./search-core.address.countrycode.md)

## Address.countryCode property

<b>Signature:</b>

```typescript
countryCode: string;
```
11 changes: 11 additions & 0 deletions docs/search-core.address.extradescription.md
@@ -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; [Address](./search-core.address.md) &gt; [extraDescription](./search-core.address.extradescription.md)

## Address.extraDescription property

<b>Signature:</b>

```typescript
extraDescription?: string;
```
11 changes: 11 additions & 0 deletions docs/search-core.address.line1.md
@@ -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; [Address](./search-core.address.md) &gt; [line1](./search-core.address.line1.md)

## Address.line1 property

<b>Signature:</b>

```typescript
line1?: string;
```
11 changes: 11 additions & 0 deletions docs/search-core.address.line2.md
@@ -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; [Address](./search-core.address.md) &gt; [line2](./search-core.address.line2.md)

## Address.line2 property

<b>Signature:</b>

```typescript
line2?: string;
```
11 changes: 11 additions & 0 deletions docs/search-core.address.line3.md
@@ -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; [Address](./search-core.address.md) &gt; [line3](./search-core.address.line3.md)

## Address.line3 property

<b>Signature:</b>

```typescript
line3?: string;
```
28 changes: 28 additions & 0 deletions docs/search-core.address.md
@@ -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; [Address](./search-core.address.md)

## Address interface

An interface with address fields to use in [BaseFieldValueDirectAnswer.value](./search-core.basefieldvaluedirectanswer.value.md)<!-- -->.

<b>Signature:</b>

```typescript
export interface Address
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [city?](./search-core.address.city.md) | string | <i>(Optional)</i> |
| [countryCode](./search-core.address.countrycode.md) | string | |
| [extraDescription?](./search-core.address.extradescription.md) | string | <i>(Optional)</i> |
| [line1?](./search-core.address.line1.md) | string | <i>(Optional)</i> |
| [line2?](./search-core.address.line2.md) | string | <i>(Optional)</i> |
| [line3?](./search-core.address.line3.md) | string | <i>(Optional)</i> |
| [postalCode?](./search-core.address.postalcode.md) | string | <i>(Optional)</i> |
| [region?](./search-core.address.region.md) | string | <i>(Optional)</i> |
| [sublocality?](./search-core.address.sublocality.md) | string | <i>(Optional)</i> |

11 changes: 11 additions & 0 deletions docs/search-core.address.postalcode.md
@@ -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; [Address](./search-core.address.md) &gt; [postalCode](./search-core.address.postalcode.md)

## Address.postalCode property

<b>Signature:</b>

```typescript
postalCode?: string;
```
11 changes: 11 additions & 0 deletions docs/search-core.address.region.md
@@ -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; [Address](./search-core.address.md) &gt; [region](./search-core.address.region.md)

## Address.region property

<b>Signature:</b>

```typescript
region?: string;
```
11 changes: 11 additions & 0 deletions docs/search-core.address.sublocality.md
@@ -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; [Address](./search-core.address.md) &gt; [sublocality](./search-core.address.sublocality.md)

## Address.sublocality property

<b>Signature:</b>

```typescript
sublocality?: string;
```
11 changes: 11 additions & 0 deletions docs/search-core.addressdirectanswer.fieldtype.md
@@ -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; [AddressDirectAnswer](./search-core.addressdirectanswer.md) &gt; [fieldType](./search-core.addressdirectanswer.fieldtype.md)

## AddressDirectAnswer.fieldType property

<b>Signature:</b>

```typescript
fieldType: EnumOrLiteral<BuiltInFieldType.Address>;
```
21 changes: 21 additions & 0 deletions docs/search-core.addressdirectanswer.md
@@ -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; [AddressDirectAnswer](./search-core.addressdirectanswer.md)

## AddressDirectAnswer interface

A [BaseFieldValueDirectAnswer](./search-core.basefieldvaluedirectanswer.md) interface with 'address' field type.

<b>Signature:</b>

```typescript
export interface AddressDirectAnswer extends BaseFieldValueDirectAnswer<Address>
```
<b>Extends:</b> [BaseFieldValueDirectAnswer](./search-core.basefieldvaluedirectanswer.md)<!-- -->&lt;[Address](./search-core.address.md)<!-- -->&gt;
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [fieldType](./search-core.addressdirectanswer.fieldtype.md) | [EnumOrLiteral](./search-core.enumorliteral.md)<!-- -->&lt;[BuiltInFieldType.Address](./search-core.builtinfieldtype.md)<!-- -->&gt; | |
11 changes: 11 additions & 0 deletions docs/search-core.androidappurldirectanswer.fieldtype.md
@@ -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; [AndroidAppUrlDirectAnswer](./search-core.androidappurldirectanswer.md) &gt; [fieldType](./search-core.androidappurldirectanswer.fieldtype.md)

## AndroidAppUrlDirectAnswer.fieldType property

<b>Signature:</b>

```typescript
fieldType: EnumOrLiteral<BuiltInFieldType.AndroidAppURL>;
```
21 changes: 21 additions & 0 deletions docs/search-core.androidappurldirectanswer.md
@@ -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; [AndroidAppUrlDirectAnswer](./search-core.androidappurldirectanswer.md)

## AndroidAppUrlDirectAnswer interface

A direct answer for an android app url field.

<b>Signature:</b>

```typescript
export interface AndroidAppUrlDirectAnswer extends BaseFieldValueDirectAnswer<string>
```
<b>Extends:</b> [BaseFieldValueDirectAnswer](./search-core.basefieldvaluedirectanswer.md)<!-- -->&lt;string&gt;
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [fieldType](./search-core.androidappurldirectanswer.fieldtype.md) | [EnumOrLiteral](./search-core.enumorliteral.md)<!-- -->&lt;[BuiltInFieldType.AndroidAppURL](./search-core.builtinfieldtype.md)<!-- -->&gt; | |
18 changes: 0 additions & 18 deletions docs/search-core.answersconfig.md

This file was deleted.

18 changes: 0 additions & 18 deletions docs/search-core.answersconfigwithapikey.md

This file was deleted.

18 changes: 0 additions & 18 deletions docs/search-core.answersconfigwithtoken.md

This file was deleted.

18 changes: 0 additions & 18 deletions docs/search-core.answerscore.md

This file was deleted.

18 changes: 0 additions & 18 deletions docs/search-core.answerserror.md

This file was deleted.

18 changes: 0 additions & 18 deletions docs/search-core.answersrequest.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/search-core.appliedqueryfilter.filter.md
Expand Up @@ -9,5 +9,5 @@ The filter applied to the query results.
<b>Signature:</b>

```typescript
filter: Filter;
filter: FieldValueFilter;
```
2 changes: 1 addition & 1 deletion docs/search-core.appliedqueryfilter.md
Expand Up @@ -19,6 +19,6 @@ export interface AppliedQueryFilter
| [details?](./search-core.appliedqueryfilter.details.md) | [LocationFilterDetails](./search-core.locationfilterdetails.md) | <i>(Optional)</i> Additional details relevant to the filter with "PLACE" for its [AppliedQueryFilterType](./search-core.appliedqueryfiltertype.md)<!-- -->. |
| [displayKey](./search-core.appliedqueryfilter.displaykey.md) | string | The display name of the filter key. |
| [displayValue](./search-core.appliedqueryfilter.displayvalue.md) | string | The value used in the filter. |
| [filter](./search-core.appliedqueryfilter.filter.md) | [Filter](./search-core.filter.md) | The filter applied to the query results. |
| [filter](./search-core.appliedqueryfilter.filter.md) | [FieldValueFilter](./search-core.fieldvaluefilter.md) | The filter applied to the query results. |
| [type](./search-core.appliedqueryfilter.type.md) | [AppliedQueryFilterType](./search-core.appliedqueryfiltertype.md) | Represents the type of [AppliedQueryFilter](./search-core.appliedqueryfilter.md) applied to a search. |

2 changes: 1 addition & 1 deletion docs/search-core.autocompleteresult.filter.md
Expand Up @@ -9,7 +9,7 @@ A filter applied to the autocomplete response.
<b>Signature:</b>

```typescript
filter?: Filter;
filter?: FieldValueFilter;
```

## Remarks
Expand Down
2 changes: 1 addition & 1 deletion docs/search-core.autocompleteresult.md
Expand Up @@ -16,7 +16,7 @@ export interface AutocompleteResult

| Property | Type | Description |
| --- | --- | --- |
| [filter?](./search-core.autocompleteresult.filter.md) | [Filter](./search-core.filter.md) | <i>(Optional)</i> A filter applied to the autocomplete response. |
| [filter?](./search-core.autocompleteresult.filter.md) | [FieldValueFilter](./search-core.fieldvaluefilter.md) | <i>(Optional)</i> A filter applied to the autocomplete response. |
| [key?](./search-core.autocompleteresult.key.md) | string | <i>(Optional)</i> The fieldId which corresponds to the AutocompleteResult value. |
| [matchedSubstrings?](./search-core.autocompleteresult.matchedsubstrings.md) | { length: number; offset: number; }\[\] | <i>(Optional)</i> An array of substrings which overlap with the autocomplete input. |
| [relatedItem?](./search-core.autocompleteresult.relateditem.md) | [Result](./search-core.result.md) | <i>(Optional)</i> An entity that corresponds to the autocomplete result. |
Expand Down
18 changes: 0 additions & 18 deletions docs/search-core.baseanswersconfig.md

This file was deleted.

0 comments on commit c0e7f82

Please sign in to comment.