feat(federation): expose needsAttentionReason on peer API

This commit is contained in:
Jannis Braun
2026-07-02 01:43:12 +02:00
parent 732d146396
commit ee52ff0c7b
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -40,6 +40,7 @@ interface SanitizedPeer {
rotationInProgress: boolean;
secretRotatedAt: number | null;
autoRotateIntervalDays: number;
needsAttentionReason: string | null;
}
function sanitizePeer(row: typeof schema.federationPeers.$inferSelect): SanitizedPeer {
@@ -56,6 +57,7 @@ function sanitizePeer(row: typeof schema.federationPeers.$inferSelect): Sanitize
rotationInProgress: row.pendingHmacSecret !== null,
secretRotatedAt: row.secretRotatedAt,
autoRotateIntervalDays: row.autoRotateIntervalDays,
needsAttentionReason: row.needsAttentionReason,
};
}
+1
View File
@@ -1188,6 +1188,7 @@ export interface FederationPeer {
secretRotatedAt: number | null;
rotationInProgress: boolean;
createdAt: number;
needsAttentionReason: 'auth_failures' | 'peer_reset_detected' | null;
}
// ─── Outbound peering gate ──────────────────────────────────────────────────