Todo evento é um CloudEvent 1.0: o mesmo envelope e, dentro de data, o que é próprio de cada evento. id é a chave de idempotência (vem do trabalho, não do acaso) e subject é o workspace, então um consumidor pode descartar duplicatas e processar em ordem por workspace. Os nomes seguem ai.qomni.<domínio>.<objeto>.<ação>.v<n>.
Envelope
CloudEvents 1.0 as every qomni event uses it (STYLE.md, events). Each event schema is this envelope plus its type and its data. id is the idempotency key, derived from the work; subject is the workspace slug, so brokers partition by workspace; time is when it happened.
| Campo | Tipo | Detalhe |
|---|---|---|
specversion Obrigatório |
string | "1.0" |
id Obrigatório |
string | ≤ 200 |
source Obrigatório |
string | Who publishes it, e.g. /cells/co1/agents |
type Obrigatório |
string | |
time Obrigatório |
string | date-time |
datacontenttype Obrigatório |
string | "application/json" |
subject Obrigatório |
string | The workspace slug. |
livemode Opcional |
boolean | CloudEvents extension: false for test-mode work. |
traceparent Opcional |
string | CloudEvents distributed-tracing extension. |
data Obrigatório |
object |
Objetos compartilhados
Objetos que vários eventos carregam dentro de data.
actor
Who or what acted: an agent, a member, an API key (its ID, never the key) or the system.
| Campo | Tipo | Detalhe |
|---|---|---|
type Obrigatório |
string | agent, member, api_key, system |
id Obrigatório |
string | |
on_behalf_of Opcional |
string | The member an API key or an approved agent action acts for. |
subject
| Campo | Tipo | Detalhe |
|---|---|---|
type Obrigatório |
string | agent, conversation, call, phone_number |
id Obrigatório |
string |