mirror of
https://github.com/docmost/docmost.git
synced 2026-06-10 10:13:01 +08:00
feat(base): add USER_PROPERTY_TYPES subset for type-change DTO
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user