A fully typed and validated ArvoContract instance
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() })
}
}
}
});
Creates a validated ArvoContract instance with full control over event types and schemas.