Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | 6x 6x 6x 6x 6x 6x 6x | import { IsBoolean, IsIn, IsNotEmpty, IsString } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
export class CreateToolHookDto {
@ApiProperty({
description: 'Name of the tool this hook attaches to',
example: 'create_file',
})
@IsString()
@IsNotEmpty()
tool_name: string;
@ApiProperty({
description: 'When to execute the hook',
enum: ['before', 'after'],
})
@IsString()
@IsIn(['before', 'after'])
timing: 'before' | 'after';
@ApiProperty({
description: 'Filename of the hook script',
example: 'create_file_before_hook.ts',
})
@IsString()
@IsNotEmpty()
script_filename: string;
@ApiProperty({ description: 'Whether the hook is active' })
@IsBoolean()
is_active: boolean;
}
|