fix: prevent NUMERIC field type creation via API (#16038)
Block users from creating NUMERIC, POSITION, and TS_VECTOR fields via the API as these are system-only types. Users should use NUMBER instead of NUMERIC. /closes #16023
This commit is contained in:
-6
@@ -69,12 +69,6 @@ export const SETTINGS_NON_COMPOSITE_FIELD_TYPE_CONFIGS: SettingsNonCompositeFiel
|
||||
],
|
||||
category: 'Basic',
|
||||
} as const satisfies SettingsFieldTypeConfig<FieldTextValue>,
|
||||
[FieldMetadataType.NUMERIC]: {
|
||||
label: 'Numeric',
|
||||
Icon: IllustrationIconNumbers,
|
||||
exampleValues: [2000, 3000, 4000],
|
||||
category: 'Basic',
|
||||
} as const satisfies SettingsFieldTypeConfig<FieldNumberValue>,
|
||||
[FieldMetadataType.NUMBER]: {
|
||||
label: 'Number',
|
||||
Icon: IllustrationIconNumbers,
|
||||
|
||||
+1
-1
@@ -3,5 +3,5 @@ import { type PickLiteral } from '~/types/PickLiteral';
|
||||
|
||||
export type SettingsExcludedFieldType = PickLiteral<
|
||||
FieldType,
|
||||
'POSITION' | 'TS_VECTOR' | 'RICH_TEXT' | 'RICH_TEXT_V2'
|
||||
'POSITION' | 'TS_VECTOR' | 'RICH_TEXT' | 'RICH_TEXT_V2' | 'NUMERIC'
|
||||
>;
|
||||
|
||||
Reference in New Issue
Block a user