{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://main.pre.bi/schemas/action-envelope.schema.json","title":"Pre ActionEnvelope v1","type":"object","required":["schemaVersion","requestId","participant","actingIdentity","sourceInterface","contextGrants","action","target","claimedAuthority","input","riskClass","idempotencyKey","expectedEvidence","issuedAt"],"properties":{"schemaVersion":{"const":"pre.action.v1"},"requestId":{"$ref":"#/$defs/requestAddress"},"participant":{"$ref":"#/$defs/address"},"actingIdentity":{"$ref":"#/$defs/address"},"sourceInterface":{"$ref":"#/$defs/token"},"contextGrants":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/address"}},"action":{"$ref":"#/$defs/token"},"target":{"$ref":"#/$defs/address"},"claimedAuthority":{"type":"array","uniqueItems":true,"items":{"$ref":"#/$defs/address"}},"input":{"type":"object","additionalProperties":{"$ref":"#/$defs/jsonValue"}},"riskClass":{"$ref":"#/$defs/token"},"idempotencyKey":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-z0-9][a-z0-9._~:-]{0,127}$"},"expectedEvidence":{"type":"array","items":{"$ref":"#/$defs/evidenceExpectation"}},"issuedAt":{"$ref":"#/$defs/timestamp"}},"additionalProperties":false,"$defs":{"address":{"type":"string","minLength":3,"maxLength":255,"pattern":"^[a-z][a-z0-9-]{0,31}:[a-z0-9][a-z0-9._~-]{0,63}(?::[a-z0-9][a-z0-9._~-]{0,63})*$"},"requestAddress":{"type":"string","minLength":9,"maxLength":255,"pattern":"^request:[a-z0-9][a-z0-9._~-]{0,63}(?::[a-z0-9][a-z0-9._~-]{0,63})*$"},"token":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9-]{0,63}$"},"timestamp":{"type":"string","minLength":20,"maxLength":40,"pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$"},"jsonValue":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/jsonValue"}},{"type":"object","additionalProperties":{"$ref":"#/$defs/jsonValue"}}]},"evidenceExpectation":{"type":"object","required":["kind","required"],"properties":{"kind":{"$ref":"#/$defs/token"},"required":{"type":"boolean"},"target":{"$ref":"#/$defs/address"},"description":{"type":"string","maxLength":500}},"additionalProperties":false}}}
