testing ratelimit

This commit is contained in:
Boki 2025-07-06 17:18:01 -04:00
parent 95b1381480
commit a616c92656
14 changed files with 411 additions and 3 deletions

View file

@ -5,6 +5,15 @@
import type { JobHandler, ScheduledJob } from '@stock-bot/types';
/**
* Rate limit configuration
*/
export interface RateLimitConfig {
points: number;
duration: number;
blockDuration?: number;
}
/**
* Metadata for a single operation within a handler
*/
@ -12,6 +21,7 @@ export interface OperationMetadata {
name: string;
method: string;
description?: string;
rateLimit?: RateLimitConfig | null;
}
/**
@ -35,6 +45,7 @@ export interface HandlerMetadata {
schedules?: ScheduleMetadata[];
version?: string;
description?: string;
rateLimit?: RateLimitConfig | null;
}
/**