feat(dlq): add DLQItem type definitions for dead letter queue
This commit is contained in:
1 parent
c24b41ecd9
commit
94ca9896db
2 files changed
+21
No files matched your search
@@ -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;
|
||||||
|
}
|
||||||
@@ -14,3 +14,4 @@ export * from "@/types/incident.js";
|
|||||||
export * from "@/types/email.js";
|
export * from "@/types/email.js";
|
||||||
export * from "@/types/team.js";
|
export * from "@/types/team.js";
|
||||||
export * from "@/types/maintenanceWindow.js";
|
export * from "@/types/maintenanceWindow.js";
|
||||||
|
export * from "@/types/dlqItem.js";
|
||||||
Reference in new issue
Block a user