mirror of
https://github.com/docmost/docmost.git
synced 2026-07-25 16:14:44 +10: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);
|
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({
|
export const choiceSchema = z.object({
|
||||||
id: z.uuid(),
|
id: z.uuid(),
|
||||||
name: z.string().min(1),
|
name: z.string().min(1),
|
||||||
|
|||||||
Reference in New Issue
Block a user