Jobs API - Expose positions pending approval
Description
The positionsPendingApproval array is now exposed on the get all positions endpoint. It contains the position changes that are waiting for approval when the job has an approval process enabled.
Each entry carries the same fields as a position, and its status says what is being requested:
PENDING_NEW: a new position has been requested. No position exists yet, so the entry has noidand its fields hold the requested values.PENDING_CHANGES: an existing position is being changed. The fields hold the values that will apply after approval.PENDING_REMOVAL: an existing position is queued for removal. Its fields hold the position's current values.
For PENDING_CHANGES and PENDING_REMOVAL, id matches the id of the corresponding position in content, so a pending change and the position it applies to appear in both arrays under the same id. The array is empty when no approval is pending or the job does not have an approval process enabled.
Impact
This enhancement is backwards-compatible. The positionsPendingApproval array is optional and read-only. content and totalFound keep their current meaning, with totalFound still counting content alone.