feat(federation): expose needsAttentionReason on peer API
This commit is contained in:
@@ -40,6 +40,7 @@ interface SanitizedPeer {
|
|||||||
rotationInProgress: boolean;
|
rotationInProgress: boolean;
|
||||||
secretRotatedAt: number | null;
|
secretRotatedAt: number | null;
|
||||||
autoRotateIntervalDays: number;
|
autoRotateIntervalDays: number;
|
||||||
|
needsAttentionReason: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function sanitizePeer(row: typeof schema.federationPeers.$inferSelect): SanitizedPeer {
|
function sanitizePeer(row: typeof schema.federationPeers.$inferSelect): SanitizedPeer {
|
||||||
@@ -56,6 +57,7 @@ function sanitizePeer(row: typeof schema.federationPeers.$inferSelect): Sanitize
|
|||||||
rotationInProgress: row.pendingHmacSecret !== null,
|
rotationInProgress: row.pendingHmacSecret !== null,
|
||||||
secretRotatedAt: row.secretRotatedAt,
|
secretRotatedAt: row.secretRotatedAt,
|
||||||
autoRotateIntervalDays: row.autoRotateIntervalDays,
|
autoRotateIntervalDays: row.autoRotateIntervalDays,
|
||||||
|
needsAttentionReason: row.needsAttentionReason,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1188,6 +1188,7 @@ export interface FederationPeer {
|
|||||||
secretRotatedAt: number | null;
|
secretRotatedAt: number | null;
|
||||||
rotationInProgress: boolean;
|
rotationInProgress: boolean;
|
||||||
createdAt: number;
|
createdAt: number;
|
||||||
|
needsAttentionReason: 'auth_failures' | 'peer_reset_detected' | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ─── Outbound peering gate ──────────────────────────────────────────────────
|
// ─── Outbound peering gate ──────────────────────────────────────────────────
|
||||||
|
|||||||
Reference in New Issue
Block a user