Skip to main content
Parmana policy version 2 models. Hand-maintained: the response bodies of the /v2/decisions and /v2/reviews routes (packages/api/src/routes/policy-v2-decisions.ts and policy-v2-reviews.ts). They mirror the TypeScript SDK’s policy-v2 models. Policy version 2 is not enabled on every deployment: a call for a capability the deployment has not enabled is refused with HTTP 404 and the error code not_enabled.

PolicyV2ValidationError Objects

One failed check of a policy, as the policy validator reports it.

check

The check number in the policy version 2 specification. 0 means structure.

PolicyV2Refusal Objects

A refusal that happens before any rule runs. It refuses the request. code is one of NO_APPROVED_POLICY, POLICY_INVALID, SOURCE_UNAVAILABLE, SOURCE_NOT_VERIFIED, STALE, INVALID, MISSING_VALUE or THRESHOLD_NOT_APPROVED.

PolicyV2Decision Objects

The recorded decision. released is always False: a policy version 2 decision never releases anything by itself. outcome is APPROVE, REJECT or REVIEW. A REVIEW outcome carries review_id; read the review with PolicyV2Api.review until it is final.

PolicyV2ReviewView Objects

A review item as its requester sees it. status is pending, approved, refused or expired.

PolicyV2ReviewDecision Objects

The result of a reviewer’s decision. outcome is APPROVED or REFUSED once the review is final, and None before that.

PolicyV2ReplayResult Objects

The result of replaying a recorded decision from its evidence record. reproduced is True when the replay gives the same outcome and inputs. differences lists what did not match. replayed is the decision the replay produced, as a mapping: its fields are those of the evidence record, which the SDK does not type further.