> ## Documentation Index
> Fetch the complete documentation index at: https://docs.parmanasystems.com/llms.txt
> Use this file to discover all available pages before exploring further.

# parmana.models.policy_v2

> Python SDK reference: Parmana policy version 2 models.

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

```python theme={null}
@dataclass(frozen=True)
class PolicyV2ValidationError()
```

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

```python theme={null}
@dataclass(frozen=True)
class PolicyV2Refusal()
```

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

```python theme={null}
@dataclass(frozen=True)
class PolicyV2Decision()
```

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

```python theme={null}
@dataclass(frozen=True)
class PolicyV2ReviewView()
```

A review item as its requester sees it.

status is pending, approved, refused or expired.

## PolicyV2ReviewDecision Objects

```python theme={null}
@dataclass(frozen=True)
class PolicyV2ReviewDecision()
```

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

## PolicyV2ReplayResult Objects

```python theme={null}
@dataclass(frozen=True)
class PolicyV2ReplayResult()
```

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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.