pushpull
08/02/2026, 9:14 PM@receiver
/**
* Deletes [ApiKeyEntity] owned by [userContext]
*
* @param id [ApiKeyEntity.id] primary key
*
* @throws [UnauthorizedContextError] Api key does not belong to [userContext]
* @throws [SError] Encounters unknown error
*
* @return [UnauthorizedContextError] | [SError] || [Unit] if successfully deletes the key
*/
context(userContext: UserContext)
fun deleteApiKey(id: Uuid): Either<SError, Unit>