Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add IntegerDirectAnswer #210

Merged
merged 3 commits into from
Aug 16, 2022
Merged

add IntegerDirectAnswer #210

merged 3 commits into from
Aug 16, 2022

Conversation

oshi97
Copy link
Contributor

@oshi97 oshi97 commented Aug 16, 2022

I checked that fieldType: integer with a number array value should never exists
(afaict) by adding all possible number fields in our test account to our
"Test Entity" entity type, hitting composeAbstractSchema, and checking that
type.integer was not present for any list types.

When you add a custom field, if you make it a number of list of number field,
the field type will be a "decimal" type not an "integer". (I am probably not
using terminology in an exact manner here).

J=SLAP-2314
TEST=manual

tested that I can get back an integer direct answer using the "oliver shi pool count?" query

I checked that fieldType: integer with a number array value should never exists
(afaict) by adding all possible number fields in our test account to our
"Test Entity" entity type, hitting composeAbstractSchema, and checking that
type.integer was not present for any list types.

When you add a custom field, if you make it a number of list of number field,
the field type will be a "decimal" type not an "integer". (I am probably not
using terminology in an exact manner here).

J=SLAP-2314
TEST=manual

tested that I can get back an integer direct answer
@oshi97 oshi97 requested a review from a team as a code owner August 16, 2022 14:44
@coveralls
Copy link

coveralls commented Aug 16, 2022

Pull Request Test Coverage Report for Build 2868880417

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 90.408%

Totals Coverage Status
Change from base Build 2868670331: 0.0%
Covered Lines: 214
Relevant Lines: 231

💛 - Coveralls

@oshi97 oshi97 merged commit b33f6f2 into develop Aug 16, 2022
@oshi97 oshi97 deleted the dev/integer-direct-answer branch August 16, 2022 15:15
@yen-tt yen-tt mentioned this pull request Sep 6, 2022
yen-tt added a commit that referenced this pull request Sep 8, 2022
## 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants