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 TextValueDirectAnswer interface. #206

Merged
merged 4 commits into from
Aug 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/search-core.builtinfieldtype.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ export declare enum BuiltInFieldType
| MultiLineText | <code>&quot;multi_line_text&quot;</code> | |
| Phone | <code>&quot;phone&quot;</code> | |
| RichText | <code>&quot;rich_text&quot;</code> | |
| SingleLineText | <code>&quot;single_line_text&quot;</code> | |

4 changes: 3 additions & 1 deletion etc/search-core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ export enum BuiltInFieldType {
// (undocumented)
Phone = "phone",
// (undocumented)
RichText = "rich_text"
RichText = "rich_text",
// (undocumented)
SingleLineText = "single_line_text"
}

// @public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export enum BuiltInFieldType {
// Address = 'address',
// Hours = 'hours',
// Decimal = 'decimal',
SingleLineText = 'single_line_text',
RichText = 'rich_text',
// SingleLineText = 'single_line_text',
MultiLineText = 'multi_line_text'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { EnumOrLiteral } from '../../../utils/EnumOrLiteral';
import { BaseFieldValueDirectAnswer } from './BaseFieldValueDirectAnswer';
import { BuiltInFieldType } from './BuiltInFieldType';

/**
* A direct answer whose source is a string or string list field in the knowledge graph.
*
* @public
*/
export interface TextValueDirectAnswer extends BaseFieldValueDirectAnswer<string | string[]> {
fieldType: EnumOrLiteral<BuiltInFieldType.SingleLineText | BuiltInFieldType.MultiLineText>
}