feat(base): allow type on /properties/update, restricted to user types

This commit is contained in:
Philipinho
2026-05-24 02:21:47 +01:00
parent 64a1e22cb4
commit c8ce98347e
@@ -1,11 +1,15 @@
import { import {
IsEmpty, IsIn,
IsNotEmpty, IsNotEmpty,
IsObject, IsObject,
IsOptional, IsOptional,
IsString, IsString,
IsUUID, IsUUID,
} from 'class-validator'; } from 'class-validator';
import {
USER_PROPERTY_TYPES,
BasePropertyTypeValue,
} from '../base.schemas';
export class UpdatePropertyDto { export class UpdatePropertyDto {
@IsUUID() @IsUUID()
@@ -19,15 +23,9 @@ export class UpdatePropertyDto {
@IsNotEmpty() @IsNotEmpty()
name?: string; name?: string;
/* @IsOptional()
* Type changes are intentionally not exposed via the API in v1. The @IsIn(USER_PROPERTY_TYPES)
* conversion engine in apps/server/src/core/base/engine/ and the type?: BasePropertyTypeValue;
* worker in tasks/base-type-conversion.task.ts remain intact for
* a future v2 re-wire. Requests including `type` are rejected here
* so the service's type-change branches stay unreachable.
*/
@IsEmpty()
type?: string;
@IsOptional() @IsOptional()
@IsObject() @IsObject()