-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Expand file tree
/
Copy pathduplicate-workflow.dto.ts
More file actions
49 lines (44 loc) · 1.16 KB
/
duplicate-workflow.dto.ts
File metadata and controls
49 lines (44 loc) · 1.16 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { SLUG_IDENTIFIER_REGEX, slugIdentifierFormatMessage } from '@novu/shared';
import { IsArray, IsBoolean, IsOptional, IsString, Matches } from 'class-validator';
export class DuplicateWorkflowDto {
@ApiProperty({
description: 'Name of the workflow',
required: false,
})
@IsOptional()
@IsString()
name?: string;
@ApiPropertyOptional({
description: 'Custom workflow identifier for the duplicated workflow',
type: String,
})
@IsOptional()
@IsString()
@Matches(SLUG_IDENTIFIER_REGEX, {
message: slugIdentifierFormatMessage('workflowId'),
})
workflowId?: string;
@ApiPropertyOptional({
description: 'Tags associated with the workflow',
type: [String],
})
@IsArray()
@IsOptional()
tags?: string[];
@ApiProperty({
description: 'Description of the workflow',
required: false,
})
@IsString()
@IsOptional()
description?: string;
@ApiPropertyOptional({
description: 'Enable or disable translations for this workflow',
required: false,
default: false,
})
@IsOptional()
@IsBoolean()
isTranslationEnabled?: boolean;
}