From 5be2ca0deb7861b5bfaa3f1e85caab187d548d51 Mon Sep 17 00:00:00 2001 From: devlikepro Date: Tue, 15 Oct 2024 15:19:56 +0700 Subject: [PATCH] [core] delay policy fix #587 --- src/structures/webhooks.config.dto.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/structures/webhooks.config.dto.ts b/src/structures/webhooks.config.dto.ts index 3e308a26..df63ec91 100644 --- a/src/structures/webhooks.config.dto.ts +++ b/src/structures/webhooks.config.dto.ts @@ -11,6 +11,12 @@ import { ValidateNested, } from 'class-validator'; +export enum RetryPolicy { + LINEAR = 'linear', + EXPONENTIAL = 'exponential', + CONSTANT = 'constant', +} + export class RetriesConfiguration { @ApiProperty({ example: 2, @@ -25,6 +31,13 @@ export class RetriesConfiguration { @IsNumber() @IsOptional() attempts?: number; + + @ApiProperty({ + example: RetryPolicy.LINEAR, + }) + @IsOptional() + @IsEnum(RetryPolicy) + policy?: RetryPolicy; } export class CustomHeader {