feat(web/m7-recurring-scans): scan-schedule API client + query

Adds ScanSchedule type, getScanSchedule / updateScanSchedule
against the new admin endpoints, createScanScheduleQuery (60s
staleTime; refetches on focus + after PATCH invalidation — no
polling).

New qk.scanSchedule() key follows the existing tuple pattern.
ScanScheduleUpdate uses optional fields so mode=off updates can
omit per-mode fields entirely (server normalizes anyway).

Vitest covers the GET path, PATCH with body, and the mode=off
minimal-body case.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-06 22:28:22 -04:00
parent b650a121b5
commit 0cc3d6255d
3 changed files with 96 additions and 0 deletions
+1
View File
@@ -35,6 +35,7 @@ export const qk = {
adminQuarantineActions: (limit?: number) =>
['adminQuarantineActions', { limit: limit ?? 50 }] as const,
scanStatus: () => ['scanStatus'] as const,
scanSchedule: () => ['scanSchedule'] as const,
coverage: () => ['coverage'] as const,
coverProviders: () => ['coverProviders'] as const,
suggestions: (limit?: number) =>