typescript/src/models/index.ts re-exports one interface file per domain concept. These mirror the canonical domain model in @parmana/shared/src/domain/ closely — they’re independently hand-written types in the SDK package, not generated from @parmana/shared, but field-for-field they match for every type checked below.
| Model | File | Concept |
|---|---|---|
Authority | authority.ts | Authority |
Authorization | authorization.ts | Authorization |
Intent | intent.ts | Intent |
BusinessTransaction, BusinessTransactionMetadata | business-transaction.ts | Business Transaction |
Execution, Decision | execution.ts | Execution, Decision |
Override | override.ts | Override |
PolicyReference | policy.ts | Policy |
Receipt | receipt.ts | Receipt |
ReplayResult | replay-result.ts | Replay |
ExecutionTrustRecord | trust-record.ts | Execution Trust Record |
Verification | verification.ts | Verification |
Decision is defined inside execution.ts alongside Execution, not in its own file — there’s no separate decision.ts model despite Decision being documented as its own concept.PolicyReference vs. Policy
typescript/src/models/policy.ts defines only PolicyReference:
BusinessTransaction.policy — a lightweight pointer to a policy, not the policy itself. It is not the same shape as Policy from @parmana/policy (used by PolicyApi.validate()):
name/version vs. policyId/policyVersion) and two different amounts of detail (a reference vs. a full evaluable definition). Don’t use one where the other is expected.
Override has drifted from the canonical domain model
typescript/src/models/override.ts declares:
packages/shared/src/domain/override.ts), which is what OverrideService.create() (packages/runtime/src/services/override-service.ts) actually constructs, is:
Field types
Timestamps are typedDate throughout these models (issuedAt, createdAt, verifiedAt, evaluatedAt, startedAt, approvedAt, submittedAt). Since HttpTransport deserializes responses with a plain response.json() call (typescript/src/transport/HttpTransport.ts) with no custom reviver, these actually arrive over the wire — and get typed by TypeScript — as strings at runtime, not Date instances, despite the interface declarations. Don’t call .getTime() or other Date methods on these fields without constructing a Date yourself first.
Related
APIs
Methods that accept and return these types.
ParmanaClient
The top-level entry point.
Concepts
The domain concepts these models represent.
Python SDK
The equivalent Python models.