Function createArvoContract

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() })
}
}
}
});