EventContract
Defined in: packages/hoppity/src/contracts/types.ts:23
A contract describing a domain event — something that happened.
TDomain: the domain name literal (e.g. “orders”) TName: the operation name literal (e.g. “orderCreated”) TSchema: the zod schema for the event payload
Type Parameters
Section titled “Type Parameters”TDomain
Section titled “TDomain”TDomain extends string = string
TName extends string = string
TSchema
Section titled “TSchema”TSchema extends ZodTypeAny = ZodTypeAny
Properties
Section titled “Properties”_domain
Section titled “_domain”_domain:
TDomain
Defined in: packages/hoppity/src/contracts/types.ts:29
_name:
TName
Defined in: packages/hoppity/src/contracts/types.ts:30
_type:
"event"
Defined in: packages/hoppity/src/contracts/types.ts:28
delay?
Section titled “delay?”
optionaldelay:DelayConfig
Defined in: packages/hoppity/src/contracts/types.ts:44
Delayed delivery configuration. Present only when the contract was declared
with delay: true or delay: { default: N } in defineDomain.
exchange
Section titled “exchange”exchange:
string
Defined in: packages/hoppity/src/contracts/types.ts:33
The RabbitMQ exchange name for this domain’s events and commands
publicationName
Section titled “publicationName”publicationName:
string
Defined in: packages/hoppity/src/contracts/types.ts:37
The rascal publication name: {domain}event{snake_name}
routingKey
Section titled “routingKey”routingKey:
string
Defined in: packages/hoppity/src/contracts/types.ts:35
The topic routing key: {domain}.event.{snake_name}
schema
Section titled “schema”schema:
TSchema
Defined in: packages/hoppity/src/contracts/types.ts:31
subscriptionName
Section titled “subscriptionName”subscriptionName:
string
Defined in: packages/hoppity/src/contracts/types.ts:39
The rascal subscription name: {domain}event{snake_name}