First-Order Approach to Principal-Agent Problems: A Generalization