Interface IApprovalService
- Namespace
- JD.AI.Core.Governance
- Assembly
- JD.AI.Core.dll
Provides human-in-the-loop or automated approval decisions for sensitive operations.
public interface IApprovalService
Remarks
Implementations include:
- AutoApproveService — always approves (automation / test use)
- AutoRejectService — always rejects (locked-down environments)
- PolicyBasedApprovalService — delegates to governance policy
Wire this into ApprovalService at startup.
Methods
RequestApprovalAsync(ApprovalRequest, CancellationToken)
Requests approval for the described operation.
Task<ApprovalResult> RequestApprovalAsync(ApprovalRequest request, CancellationToken ct = default)
Parameters
requestApprovalRequestDetails of the operation requiring approval.
ctCancellationTokenCancellation token.
Returns
- Task<ApprovalResult>
An ApprovalResult indicating whether to proceed.