diff --git a/apps/authz/src/app/http/rest/dto/policy-rules/policy-criterion-builder.dto.ts b/apps/authz/src/app/http/rest/dto/policy-rules/policy-criterion-builder.dto.ts deleted file mode 100644 index b8374d80b..000000000 --- a/apps/authz/src/app/http/rest/dto/policy-rules/policy-criterion-builder.dto.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { PolicyCriterionDto } from '@app/authz/app/http/rest/dto/policy-rules/policy-criterion.dto' -import { Then } from '@narval/authz-shared' -import { ApiProperty } from '@nestjs/swagger' -import { Type } from 'class-transformer' -import { IsDefined, IsIn, IsString, ValidateNested } from 'class-validator' - -export class PolicyDto { - @IsString() - @IsDefined() - @ApiProperty() - name: string - - @ValidateNested() - @Type(() => PolicyCriterionDto) - @ApiProperty({ - type: () => PolicyCriterionDto, - isArray: true - }) - when: PolicyCriterionDto[] - - @IsIn(Object.values(Then)) - @IsDefined() - @ApiProperty({ - enum: Object.values(Then), - default: Then.FORBID - }) - then: Then - - constructor(partial: Partial) { - Object.assign(this, partial) - } -}