Creates a validated ArvoContract instance with full control over event types and schemas.
If the event types contain reserved prefix (ArvoOrchestratorEventTypeGen)
If any of the ArvoContract's internal validations fail. See ArvoContract
const contract = createArvoContract({ uri: 'com.example.contract', type: 'input.event', description: "Some example contract", metadata: { owner: 'team-a', priority: 'high' }, versions: { '1.0.0': { accepts: z.object({ data: z.string() }), emits: { 'output.event': z.object({ result: z.number() }) } } }}); Copy
const contract = createArvoContract({ uri: 'com.example.contract', type: 'input.event', description: "Some example contract", metadata: { owner: 'team-a', priority: 'high' }, versions: { '1.0.0': { accepts: z.object({ data: z.string() }), emits: { 'output.event': z.object({ result: z.number() }) } } }});
Contract specification object
Optional
A fully typed and validated ArvoContract instance
Creates a validated ArvoContract instance with full control over event types and schemas.
Throws
If the event types contain reserved prefix (ArvoOrchestratorEventTypeGen)
Throws
If any of the ArvoContract's internal validations fail. See ArvoContract
Example