Constructors
Constructor
new PolicyApi(Defined in: typescript/src/client/PolicyApi.ts:40transport):PolicyApi
Parameters
transport
Transport
Returns
PolicyApi
Methods
validate()
validate(Defined in: typescript/src/client/PolicyApi.ts:59 Confirms that a policy (name + version) is loadable by the Runtime. POST /policies/validate does not accept or check a policy document body — it only checks that policyRepository.load(policyId, policyVersion) succeeds (packages/api/src/routes/policies.ts). POST /policies/validate does not use the sharedpolicyId,policyVersion):Promise<PolicyValidationResult>
{error, code?}
envelope for 400 or 404: both are {valid, errors}, its own shape,
the caller’s answer, not an SDK-level failure — so those two
statuses are exempted from the default throw-on-error behavior. 401
is not exempted: it is generated by caller-auth middleware before
this route’s own handler ever runs, and does use the shared
envelope, identically to every other route. See
/api-reference/error-handling.
Parameters
policyId
string
policyVersion
string
Returns
Promise<PolicyValidationResult>