-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
…Textv2 and markdown in snippets J=BACK-2241 TEST=manual Tested using a modified version of the test site in the search-core repository. Also verified that the value field in direct answer snippet contained converted HTML for queries.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { EnumOrLiteral } from '../../../../utils/EnumOrLiteral'; | ||
import { BuiltInFieldType } from '../BuiltInFieldType'; | ||
import { BaseFeaturedSnippetDirectAnswer } from '../FeaturedSnippetDirectAnswer'; | ||
|
||
/** | ||
* A {@link BaseFeaturedSnippetDirectAnswer} with 'html' field type. | ||
* "value" field is omitted for featured snippet direct answer of this field type. | ||
* | ||
* @public | ||
*/ | ||
export interface HTMLSnippetDirectAnswer extends Omit<BaseFeaturedSnippetDirectAnswer<string>, 'value'> { | ||
/** {@inheritDoc DirectAnswer.fieldType} */ | ||
fieldType: EnumOrLiteral<BuiltInFieldType.Html> | ||
Check warning on line 13 in src/models/searchservice/response/directanswer/featuredsnippetdirectanswers/HTMLSnippetDirectAnswer.ts
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { EnumOrLiteral } from '../../../../utils/EnumOrLiteral'; | ||
import { BuiltInFieldType } from '../BuiltInFieldType'; | ||
import { BaseFeaturedSnippetDirectAnswer } from '../FeaturedSnippetDirectAnswer'; | ||
|
||
/** | ||
* A {@link BaseFeaturedSnippetDirectAnswer} with 'markdown' field type. | ||
* "value" field is omitted for featured snippet direct answer of this field type. | ||
* | ||
* @public | ||
*/ | ||
export interface MarkdownSnippetDirectAnswer extends Omit<BaseFeaturedSnippetDirectAnswer<string>, 'value'> { | ||
/** {@inheritDoc DirectAnswer.fieldType} */ | ||
fieldType: EnumOrLiteral<BuiltInFieldType.Markdown> | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { EnumOrLiteral } from '../../../../utils/EnumOrLiteral'; | ||
import { BuiltInFieldType } from '../BuiltInFieldType'; | ||
import { BaseFeaturedSnippetDirectAnswer } from '../FeaturedSnippetDirectAnswer'; | ||
|
||
/** | ||
* A {@link BaseFeaturedSnippetDirectAnswer} with 'rich_text_v2' field type. | ||
* "value" field is omitted for featured snippet direct answer of this field type. | ||
* | ||
* @public | ||
*/ | ||
export interface RichTextV2SnippetDirectAnswer extends Omit<BaseFeaturedSnippetDirectAnswer<string>, 'value'> { | ||
/** {@inheritDoc DirectAnswer.fieldType} */ | ||
fieldType: EnumOrLiteral<BuiltInFieldType.RichText_v2> | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
export { RichTextSnippetDirectAnswer } from './RichTextSnippetDirectAnswer'; | ||
export { MultiLineTextSnippetDirectAnswer } from './MultiLineTextSnippetDirectAnswer'; | ||
export { RichTextV2SnippetDirectAnswer } from './RichTextV2SnippetDirectAnswer'; | ||
export {HTMLSnippetDirectAnswer} from './HTMLSnippetDirectAnswer'; | ||
export {MarkdownSnippetDirectAnswer} from './MarkdownSnippetDirectAnswer'; |