feat(base): add USER_PROPERTY_TYPES subset for type-change DTO

This commit is contained in:
Philipinho
2026-05-24 02:19:42 +01:00
parent 218b5755a9
commit 64a1e22cb4
+11
View File
@@ -35,6 +35,17 @@ export type BasePropertyTypeValue =
export const BASE_PROPERTY_TYPES = Object.values(BasePropertyType);
/*
* The subset of property types that users can convert TO via the
* /bases/properties/update endpoint. Excludes system auto-types
* (createdAt/lastEditedAt/lastEditedBy) and formula — those have their
* own creation paths and are not valid one-click conversion targets.
*/
export const USER_PROPERTY_TYPES: readonly BasePropertyTypeValue[] =
BASE_PROPERTY_TYPES.filter(
(t) => !SYSTEM_PROPERTY_TYPES.has(t),
) as readonly BasePropertyTypeValue[];
export const choiceSchema = z.object({
id: z.uuid(),
name: z.string().min(1),