Story-1392: Staff Grant Detail Contract

This walkthrough documents the producer-side contract for GET /admin/staff/{user_id}/grants. The endpoint gives the admin staff-detail page the staff member's active support grants, recent grant history, and the exact firms where the staffer may create a self-grant.

What Changed

Contract Shape

The staff grant detail response is camelCase on the wire:

{
  "staffUserId": "...",
  "activeGrants": [
    {
      "id": "...",
      "firmId": "...",
      "firmRef": "FIRM-00042",
      "firmName": "Example LLP",
      "staffUserId": "...",
      "reason": "Customer support investigation",
      "grantedAt": "2026-06-18T00:00:00Z",
      "createdAt": "2026-06-18T00:00:00Z",
      "expiresAt": "2026-06-25T00:00:00Z",
      "grantedByUserId": "...",
      "revokedAt": null,
      "revokedReason": null,
      "revokedByUserId": null,
      "isActive": true
    }
  ],
  "recentGrantHistory": [],
  "eligibleGrantFirms": [
    {
      "firmId": "...",
      "firmRef": "FIRM-00042",
      "name": "Example LLP",
      "plan": "growth",
      "relationship": "csm"
    }
  ]
}

Verification

Consumer Impact

pramaan-admin must regenerate src/gen/, call GET /admin/staff/{user_id}/grants from the staff detail page, delete the adaptListItemToDetail stub for grant arrays, and use eligibleGrantFirms as the grant modal firm picker source.