(role: string | undefined)
| 46 | ); |
| 47 | |
| 48 | const narrowRole = (role: string | undefined): InviteRole => |
| 49 | role === "admin" ? "admin" : "member"; |
| 50 | |
| 51 | // Drop the internal audit columns (createdBy/usedBy) for the wire shape. |
| 52 | const toWire = (row: InviteCodeRow): typeof InviteCodeSchema.Type => ({ |