## Context This PR introduces the new Create and Edit role components, behind the PERMISSIONS_ENABLED_V2 feature flag.
51 lines
968 B
TypeScript
51 lines
968 B
TypeScript
import { Field, InputType } from '@nestjs/graphql';
|
|
|
|
import { IsBoolean, IsOptional, IsString, IsUUID } from 'class-validator';
|
|
|
|
@InputType()
|
|
export class CreateRoleInput {
|
|
@IsUUID()
|
|
@IsOptional()
|
|
@Field({ nullable: true })
|
|
id?: string;
|
|
|
|
@IsString()
|
|
@Field({ nullable: false })
|
|
label: string;
|
|
|
|
@IsString()
|
|
@IsOptional()
|
|
@Field({ nullable: true })
|
|
description?: string;
|
|
|
|
@IsString()
|
|
@IsOptional()
|
|
@Field({ nullable: true })
|
|
icon?: string;
|
|
|
|
@IsBoolean()
|
|
@IsOptional()
|
|
@Field({ nullable: true })
|
|
canUpdateAllSettings?: boolean;
|
|
|
|
@IsBoolean()
|
|
@IsOptional()
|
|
@Field({ nullable: true })
|
|
canReadAllObjectRecords?: boolean;
|
|
|
|
@IsBoolean()
|
|
@IsOptional()
|
|
@Field({ nullable: true })
|
|
canUpdateAllObjectRecords?: boolean;
|
|
|
|
@IsBoolean()
|
|
@IsOptional()
|
|
@Field({ nullable: true })
|
|
canSoftDeleteAllObjectRecords?: boolean;
|
|
|
|
@IsBoolean()
|
|
@IsOptional()
|
|
@Field({ nullable: true })
|
|
canDestroyAllObjectRecords?: boolean;
|
|
}
|