FEAT: remove custom properties endpoints and DTOs from catalog management

This commit is contained in:
viniciusgadea
2026-07-21 16:32:38 -03:00
parent e1cfc6e1a8
commit a93fbfbbd9
6 changed files with 6 additions and 205 deletions
-44
View File
@@ -37,7 +37,6 @@ import { PackTheMetadata } from 'src/utils/PackTheMetadata';
import { RequestUser, User } from 'src/decorators/user.decorator';
import {
BatchRemoveRlsRulesRequest,
CustomPropertyDefinitionDto,
GetDatasetCatalogTaskRes,
ICatalogAllRequest,
ICatalogAllResponse,
@@ -289,49 +288,6 @@ export class CatalogController {
return this.catalogService.getCustomPropertyDefinitions(metadata);
}
@Post('custom-properties')
@RequireAllPermissions(PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER)
async upsertCustomPropertyDefinition(
@User() user: RequestUser,
@Body() definition: CustomPropertyDefinitionDto,
) {
const { customer_id, customer_name, user_id, username } = user;
const metadata = PackTheMetadata({
customer_id,
customer_name,
user_id,
username,
});
return this.catalogService.upsertCustomPropertyDefinition(
{
definition: {
key: definition.key || '',
name: definition.name,
type: definition.type,
},
},
metadata,
);
}
@Delete('custom-properties/:key')
@RequireAllPermissions(PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER)
async deleteCustomPropertyDefinition(
@User() user: RequestUser,
@Param('key') key: string,
) {
const { customer_id, customer_name, user_id, username } = user;
const metadata = PackTheMetadata({
customer_id,
customer_name,
user_id,
username,
});
return this.catalogService.deleteCustomPropertyDefinition({ key }, metadata);
}
@Get('data-asset/:id')
@RequireSomePermission(
PERMISSIONS_GROUPS.CATALOG.permissions.GET,