feat(dlq): add DLQItem type definitions for dead letter queue

This commit is contained in:
Br0wnHammer committed 2026-03-27 20:05:03 +05:30
1 parent c24b41ecd9
commit 94ca9896db
2 files changed
+21

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
export const DLQItemTypes = ["notification", "incident_create", "incident_resolve"] as const;
export type DLQItemType = (typeof DLQItemTypes)[number];
export const DLQItemStatuses = ["pending", "retrying", "failed"] as const;
export type DLQItemStatus = (typeof DLQItemStatuses)[number];
export interface DLQItem {
id: string;
type: DLQItemType;
status: DLQItemStatus;
payload: Record<string, unknown>;
monitorId: string;
teamId: string;
retryCount: number;
maxRetries: number;
lastError: string;
nextRetryAt: string;
createdAt: string;
updatedAt: string;
}
+1
View File
@@ -14,3 +14,4 @@ export * from "@/types/incident.js";
export * from "@/types/email.js";
export * from "@/types/team.js";
export * from "@/types/maintenanceWindow.js";
export * from "@/types/dlqItem.js";