From e181dea4cb46cf74ce701cad34f399067a46b5d3 Mon Sep 17 00:00:00 2001 From: enlineawork Date: Wed, 9 Sep 2026 09:22:31 -0300 Subject: [PATCH] =?UTF-8?q?feat(f6):=20exponer=20campos=20t=C3=A9cnicos=20?= =?UTF-8?q?por=20clasificaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inventory-family-catalog.controller.ts | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/api-v3/src/asset-master/inventory-family-catalog.controller.ts b/api-v3/src/asset-master/inventory-family-catalog.controller.ts index 88708c2..1e03d3e 100644 --- a/api-v3/src/asset-master/inventory-family-catalog.controller.ts +++ b/api-v3/src/asset-master/inventory-family-catalog.controller.ts @@ -17,6 +17,10 @@ import { ReplaceInventoryFamilyFindingsDto, UpdateInventoryFamilyDto, } from './dto/inventory-family-admin.dto'; +import { + CreateInventoryFamilyAttributeDto, + UpdateInventoryFamilyAttributeDto, +} from './dto/inventory-family-attribute.dto'; import { InventoryFamilyCatalogService } from './inventory-family-catalog.service'; @Controller('inventory-families') @@ -50,6 +54,35 @@ export class InventoryFamilyCatalogController { return this.families.update(familyId,dto,principal,request); } + @Get(':familyId/attributes') + @RequirePermissions('asset_types.read') + attributes(@Param('familyId',new ParseUUIDPipe({version:'4'})) familyId:string) { + return this.families.attributes(familyId); + } + + @Post(':familyId/attributes') + @RequirePermissions('asset_types.manage') + createAttribute( + @Param('familyId',new ParseUUIDPipe({version:'4'})) familyId:string, + @Body() dto:CreateInventoryFamilyAttributeDto, + @CurrentAuth() principal:AuthPrincipal, + @Req() request:RequestWithContext, + ) { + return this.families.createAttribute(familyId,dto,principal,request); + } + + @Patch(':familyId/attributes/:attributeId') + @RequirePermissions('asset_types.manage') + updateAttribute( + @Param('familyId',new ParseUUIDPipe({version:'4'})) familyId:string, + @Param('attributeId',new ParseUUIDPipe({version:'4'})) attributeId:string, + @Body() dto:UpdateInventoryFamilyAttributeDto, + @CurrentAuth() principal:AuthPrincipal, + @Req() request:RequestWithContext, + ) { + return this.families.updateAttribute(familyId,attributeId,dto,principal,request); + } + @Put(':familyId/findings') @RequirePermissions('finding_catalog.manage') replaceFindings(