{"asyncapi":"3.0.0","id":"https://ihgiz.net/api/engine/v0/documents/asyncapi.json","info":{"title":"IHGIZ Event Engine — webhooks","version":"0.1.0","description":"What the engine tells a tenant's endpoints. One message per history entry,\nsent as a CloudEvents 1.0 structured JSON event over HTTPS POST and signed\nwith the endpoint's secret: `x-ihgiz-signature` is the hex HMAC-SHA256 of\n`${x-ihgiz-timestamp}.${body}`. Deliveries come from the transactional\noutbox, so a message exists exactly when its transition committed; they are\nretried with backoff and keep their `id`, so receivers de-duplicate on it.\n\nStatus: delivered since Phase 2.3 (`docs/phase-2.md`); endpoints are added\nin the console or over the REST side (openapi.yaml, `/webhooks`).\n","license":{"name":"Proprietary"}},"defaultContentType":"application/cloudevents+json","servers":{"tenantEndpoint":{"host":"{endpointHost}","pathname":"{endpointPath}","protocol":"https","description":"The URL a tenant registers for its webhooks.","variables":{"endpointHost":{"description":"The tenant's host."},"endpointPath":{"description":"The tenant's path."}}}},"channels":{"eventChanges":{"address":null,"description":"Every committed change to an Event of the tenant.","messages":{"created":{"$ref":"#/components/messages/eventCreated"},"transitioned":{"$ref":"#/components/messages/eventTransitioned"},"replied":{"$ref":"#/components/messages/participantReplied"},"cancelled":{"$ref":"#/components/messages/eventCancelled"},"entityCreated":{"$ref":"#/components/messages/entityCreated"},"entityChanged":{"$ref":"#/components/messages/entityChanged"}}}},"operations":{"notifyEventChanges":{"action":"send","channel":{"$ref":"#/channels/eventChanges"},"summary":"The engine posts each change to the tenant's endpoint.","bindings":{"http":{"method":"POST"}},"messages":[{"$ref":"#/channels/eventChanges/messages/created"},{"$ref":"#/channels/eventChanges/messages/transitioned"},{"$ref":"#/channels/eventChanges/messages/replied"},{"$ref":"#/channels/eventChanges/messages/cancelled"},{"$ref":"#/channels/eventChanges/messages/entityCreated"},{"$ref":"#/channels/eventChanges/messages/entityChanged"}]}},"components":{"messageTraits":{"signed":{"headers":{"type":"object","required":["x-ihgiz-signature","x-ihgiz-timestamp"],"properties":{"x-ihgiz-signature":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Hex HMAC-SHA256 of `${timestamp}.${body}` with the endpoint secret."},"x-ihgiz-timestamp":{"type":"string","pattern":"^[0-9]+$","description":"Unix seconds when the delivery was signed; refuse stale ones."}}}}},"messages":{"eventCreated":{"name":"net.ihgiz.event.created","title":"Event created","summary":"An Event was created, in its graph's initial state or after the transition run with it.","traits":[{"$ref":"#/components/messageTraits/signed"}],"payload":{"$ref":"#/components/schemas/cloudEvent"}},"eventTransitioned":{"name":"net.ihgiz.event.transitioned","title":"Event changed","summary":"A transition applied — a new time, place or people, or a new state.","traits":[{"$ref":"#/components/messageTraits/signed"}],"payload":{"$ref":"#/components/schemas/cloudEvent"}},"participantReplied":{"name":"net.ihgiz.event.participant.replied","title":"Participant replied","summary":"A participant accepted, declined, answered tentatively or proposed a new time.","traits":[{"$ref":"#/components/messageTraits/signed"}],"payload":{"$ref":"#/components/schemas/cloudEvent"}},"eventCancelled":{"name":"net.ihgiz.event.cancelled","title":"Event cancelled","summary":"The Event reached the cancelled phase (iTIP CANCEL).","traits":[{"$ref":"#/components/messageTraits/signed"}],"payload":{"$ref":"#/components/schemas/cloudEvent"}},"entityCreated":{"name":"net.ihgiz.entity.created","title":"Entity created","summary":"A membership, a deal, an order — something with a lifecycle that is not an Event — was created.","traits":[{"$ref":"#/components/messageTraits/signed"}],"payload":{"$ref":"#/components/schemas/cloudEvent"}},"entityChanged":{"name":"net.ihgiz.entity.changed","title":"Entity changed","summary":"An entity moved by a named transition, in one region of its graph.","traits":[{"$ref":"#/components/messageTraits/signed"}],"payload":{"$ref":"#/components/schemas/cloudEvent"}}},"schemas":{"cloudEvent":{"description":"CloudEvents 1.0 structured mode. `data` is the TransitionResult defined in openapi.yaml — or, for an entity, its EntityResult; `source` and `dataschema` say which.","type":"object","required":["specversion","id","source","type","time","subject","data"],"properties":{"specversion":{"const":"1.0"},"id":{"type":"string","description":"The history entry id; identical across retries."},"source":{"type":"string","format":"uri-reference"},"type":{"type":"string","enum":["net.ihgiz.event.created","net.ihgiz.event.transitioned","net.ihgiz.event.participant.replied","net.ihgiz.event.cancelled","net.ihgiz.entity.created","net.ihgiz.entity.changed"]},"subject":{"type":"string","description":"The Event's or the entity's uid."},"time":{"type":"string","format":"date-time"},"datacontenttype":{"const":"application/json"},"dataschema":{"type":"string","format":"uri"},"data":{"oneOf":[{"$ref":"openapi.json#/components/schemas/TransitionResult"},{"$ref":"openapi.json#/components/schemas/EntityResult"}]}}}}}}