🔧 fix: align revokeCapability type annotation with implementation

The rebase auto-merge of systemGrant.ts kept dev's outer type annotation
(`revokeCapability: ... => Promise<void>`) but our implementation returns
`Promise<{ deletedCount: number }>` (added during the bot-review loop to
let the audit emitter distinguish a real revoke from a no-op against a
nonexistent grant). The mismatch surfaced as TS2719 on the methods record
return at line 520. Updated the type annotation to match the impl.

The caller at packages/api/src/admin/grants.ts:444 reads
`revokeResult.deletedCount` to gate the audit emit, so the wider return
type is what the rest of the code already assumes.
This commit is contained in:
Dustin Healy 2026-06-09 11:57:00 -07:00 • committed by Danny Avila
parent 26a3f0aab2
commit cefaaf0530

View file

@ -77,7 +77,7 @@ export function createSystemGrantMethods(mongoose: typeof import('mongoose')): {
tenantId?: string;
},
session?: ClientSession,
) => Promise<void>;
) => Promise<{ deletedCount: number }>;
hasCapabilityForPrincipals: ({
principals,
capability,