FEAT: add CustomPropertyDto and update IUpdateDataRequest to use custom properties array

This commit is contained in:
viniciusgadea
2026-08-17 10:47:17 -03:00
parent d53dec6441
commit eabb8dfdbd
2 changed files with 47 additions and 3 deletions
+29 -1
View File
@@ -11265,6 +11265,31 @@
"docs" "docs"
] ]
}, },
"CustomPropertyDto": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"text",
"number",
"date",
"boolean"
]
}
},
"required": [
"key",
"value",
"type"
]
},
"IUpdateDataRequest": { "IUpdateDataRequest": {
"type": "object", "type": "object",
"properties": { "properties": {
@@ -11295,7 +11320,10 @@
"type": "string" "type": "string"
}, },
"custom_properties": { "custom_properties": {
"type": "object" "type": "array",
"items": {
"$ref": "#/components/schemas/CustomPropertyDto"
}
} }
}, },
"required": [ "required": [
+18 -2
View File
@@ -204,6 +204,22 @@ export class IData {
} }
export enum CustomPropertyType {
TEXT = 'text',
NUMBER = 'number',
DATE = 'date',
BOOLEAN = 'boolean',
}
export class CustomPropertyDto {
@ApiProperty()
key: string;
@ApiProperty()
value: string;
@ApiProperty({ enum: CustomPropertyType })
type: CustomPropertyType;
}
export class IUpdateDataRequest { export class IUpdateDataRequest {
@ApiProperty() @ApiProperty()
name: string; name: string;
@@ -217,8 +233,8 @@ export class IUpdateDataRequest {
share_type?: DataAssetShareType; share_type?: DataAssetShareType;
@ApiPropertyOptional() @ApiPropertyOptional()
docs?: string; docs?: string;
@ApiPropertyOptional() @ApiPropertyOptional({ type: [CustomPropertyDto] })
custom_properties?: Record<string, (string | number | boolean)[]>; custom_properties?: CustomPropertyDto[];
} }
export class IUpdateCertificationStatusRequest { export class IUpdateCertificationStatusRequest {