Remove extra operators

Summary: Project doc: https://docs.google.com/document/d/1miofxds9DJgWScj0zFyBbdpRH5Rj0T9FqiCapof5-vU

Reviewed By: lblasa

Differential Revision: D48605289

fbshipit-source-id: f3168a8db4532ddd368a96f013749e4abc627e0f
This commit is contained in:
Andrey Goncharov
2023-08-30 07:26:35 -07:00
committed by Facebook GitHub Bot
parent 9bca358ab2
commit f16ff8ade4
2 changed files with 3 additions and 134 deletions

View File

@@ -9,21 +9,12 @@
// Mostly matches https://www.internalfb.com/code/www/html/intern/js/ui/PowerSearch/PowerSearchExampleConfig.js
export type SimpleFilterValueType =
| 'NO_VALUE'
| 'INTEGER'
| 'FLOAT'
| 'STRING_SET'
| 'STRING';
export type SimpleFilterValueType = 'NO_VALUE' | 'INTEGER' | 'FLOAT' | 'STRING';
export type EnumFilterValueType = 'ENUM_SET' | 'ENUM';
export type RelativeDateFilterValueType = 'RELATIVE_DATE';
export type EnumFilterValueType = 'ENUM';
export type AbsoluteDateFilterValueType = 'ABSOLUTE_DATE';
export type TimeFilterValueType = 'TIME';
export type SimpleOperatorConfig = {
valueType: SimpleFilterValueType;
key: string;
@@ -37,19 +28,6 @@ export type EnumOperatorConfig = {
enumLabels: {[key: string]: string};
};
export type InternPowerSearchRelativeDateAllowableTensesType =
| 'PAST_ONLY'
| 'FUTURE_ONLY'
| 'PAST_AND_FUTURE';
export type RelativeDateOperatorConfig = {
valueType: RelativeDateFilterValueType;
key: string;
label: string;
allowableTenses: InternPowerSearchRelativeDateAllowableTensesType;
isNegative?: boolean;
};
export type AbsoluteDateOperatorConfig = {
valueType: AbsoluteDateFilterValueType;
key: string;
@@ -60,21 +38,10 @@ export type AbsoluteDateOperatorConfig = {
isNegative?: boolean;
};
export type TimeOperatorConfig = {
valueType: TimeFilterValueType;
key: string;
label: string;
minValue?: Date;
maxValue?: Date;
isNegative?: boolean;
};
export type OperatorConfig =
| SimpleOperatorConfig
| EnumOperatorConfig
| AbsoluteDateOperatorConfig
| RelativeDateOperatorConfig
| TimeOperatorConfig;
| AbsoluteDateOperatorConfig;
export type FieldConfig = {
key: string;