// Grant - creates one, or updates it if this customer+feature already has one
await kerne.admin.grant('api_calls', {
customer: userId,
value: '50000', // same encoding as a normal entitlement value
reason: 'Annual contract - negotiated limit',
expiresAt: '2027-01-01T00:00:00.000Z', // omit for permanent
});
// One counter instead of the whole customer, on a feature limited per dimension
await kerne.admin.grant('machine_minutes', {
customer: userId,
dimension: 'machine_42', // only this machine; the others keep the plan's limit
value: '180',
reason: 'Loaner machine while theirs is repaired',
});
// List
const grants = await kerne.admin.listGrants(); // every override in the tenant
const forUser = await kerne.admin.listGrants(userId); // just this customer
// Revoke
await kerne.admin.revokeGrant(overrideId);