{"asyncapi":"3.0.0","info":{"title":"Messages events","version":"0.1.0","description":"What Messages announces on the homelab's NATS message queue: one subject per event type, a JSON envelope that carries ids and never content, and Messages's own consumers. Read the note or file through the HTTP API."},"defaultContentType":"application/json","servers":{"homelab":{"host":"{host}","protocol":"nats","description":"The homelab's NATS server, with JetStream. Every app shares one account on it.","variables":{"host":{"description":"Its address and port, from the person who runs this server"}}}},"channels":{"note_created":{"address":"events.messages.business.note.created","title":"note.created","summary":"A note was written","messages":{"note_created":{"$ref":"#/components/messages/note_created"}}},"note_updated":{"address":"events.messages.business.note.updated","title":"note.updated","summary":"A note was edited","messages":{"note_updated":{"$ref":"#/components/messages/note_updated"}}},"note_deleted":{"address":"events.messages.business.note.deleted","title":"note.deleted","summary":"A note was deleted","messages":{"note_deleted":{"$ref":"#/components/messages/note_deleted"}}},"attachment_uploaded":{"address":"events.messages.business.attachment.uploaded","title":"attachment.uploaded","summary":"A file was uploaded; noteId names its note, or is null for a file on its own","messages":{"attachment_uploaded":{"$ref":"#/components/messages/attachment_uploaded"}}},"attachment_deleted":{"address":"events.messages.business.attachment.deleted","title":"attachment.deleted","summary":"A file was deleted","messages":{"attachment_deleted":{"$ref":"#/components/messages/attachment_deleted"}}},"conversation_started":{"address":"events.messages.business.conversation.started","title":"conversation.started","summary":"Someone started a conversation; conversationId names it, never its content","messages":{"conversation_started":{"$ref":"#/components/messages/conversation_started"}}},"conversation_deleted":{"address":"events.messages.business.conversation.deleted","title":"conversation.deleted","summary":"Someone deleted a conversation, for both people in it","messages":{"conversation_deleted":{"$ref":"#/components/messages/conversation_deleted"}}},"message_sent":{"address":"events.messages.business.message.sent","title":"message.sent","summary":"A message was sent; its content is encrypted and never in the event","messages":{"message_sent":{"$ref":"#/components/messages/message_sent"}}},"message_edited":{"address":"events.messages.business.message.edited","title":"message.edited","summary":"A message was edited by its sender","messages":{"message_edited":{"$ref":"#/components/messages/message_edited"}}},"message_deleted":{"address":"events.messages.business.message.deleted","title":"message.deleted","summary":"A message was deleted by its sender","messages":{"message_deleted":{"$ref":"#/components/messages/message_deleted"}}},"call_started":{"address":"events.messages.business.call.started","title":"call.started","summary":"Someone rang the other person in a conversation; callId names the call","messages":{"call_started":{"$ref":"#/components/messages/call_started"}}},"call_answered":{"address":"events.messages.business.call.answered","title":"call.answered","summary":"The person called took the call","messages":{"call_answered":{"$ref":"#/components/messages/call_answered"}}},"call_ended":{"address":"events.messages.business.call.ended","title":"call.ended","summary":"An answered call ended: someone hung up, or both apps went quiet","messages":{"call_ended":{"$ref":"#/components/messages/call_ended"}}},"call_declined":{"address":"events.messages.business.call.declined","title":"call.declined","summary":"The person called turned the call down","messages":{"call_declined":{"$ref":"#/components/messages/call_declined"}}},"call_cancelled":{"address":"events.messages.business.call.cancelled","title":"call.cancelled","summary":"The caller stopped ringing before anyone answered","messages":{"call_cancelled":{"$ref":"#/components/messages/call_cancelled"}}},"call_missed":{"address":"events.messages.business.call.missed","title":"call.missed","summary":"Nobody answered before the call stopped ringing","messages":{"call_missed":{"$ref":"#/components/messages/call_missed"}}},"user_signed_in":{"address":"events.messages.technical.user.signed_in","title":"user.signed_in","summary":"Someone signed in to the web or admin app","messages":{"user_signed_in":{"$ref":"#/components/messages/user_signed_in"}}},"user_signed_out":{"address":"events.messages.technical.user.signed_out","title":"user.signed_out","summary":"Someone signed out of the web or admin app","messages":{"user_signed_out":{"$ref":"#/components/messages/user_signed_out"}}},"appearance_updated":{"address":"events.messages.technical.appearance.updated","title":"appearance.updated","summary":"Someone changed the appearance","messages":{"appearance_updated":{"$ref":"#/components/messages/appearance_updated"}}},"servers_updated":{"address":"events.messages.technical.servers.updated","title":"servers.updated","summary":"Someone changed their server list","messages":{"servers_updated":{"$ref":"#/components/messages/servers_updated"}}},"avatar_updated":{"address":"events.messages.technical.avatar.updated","title":"avatar.updated","summary":"Someone set a profile photo","messages":{"avatar_updated":{"$ref":"#/components/messages/avatar_updated"}}},"avatar_removed":{"address":"events.messages.technical.avatar.removed","title":"avatar.removed","summary":"Someone removed their profile photo","messages":{"avatar_removed":{"$ref":"#/components/messages/avatar_removed"}}},"profile_updated":{"address":"events.messages.technical.profile.updated","title":"profile.updated","summary":"Someone changed their Messages handle or status","messages":{"profile_updated":{"$ref":"#/components/messages/profile_updated"}}},"encryption_set_up":{"address":"events.messages.technical.encryption.set_up","title":"encryption.set_up","summary":"Someone set up end-to-end encryption","messages":{"encryption_set_up":{"$ref":"#/components/messages/encryption_set_up"}}},"encryption_changed":{"address":"events.messages.technical.encryption.changed","title":"encryption.changed","summary":"Someone changed their encryption passphrase","messages":{"encryption_changed":{"$ref":"#/components/messages/encryption_changed"}}},"encryption_reset":{"address":"events.messages.technical.encryption.reset","title":"encryption.reset","summary":"Someone reset their encryption: their earlier messages are unreadable to them","messages":{"encryption_reset":{"$ref":"#/components/messages/encryption_reset"}}},"api_key_created":{"address":"events.messages.technical.api_key.created","title":"api_key.created","summary":"An API key was created","messages":{"api_key_created":{"$ref":"#/components/messages/api_key_created"}}},"api_key_deleted":{"address":"events.messages.technical.api_key.deleted","title":"api_key.deleted","summary":"An API key was revoked","messages":{"api_key_deleted":{"$ref":"#/components/messages/api_key_deleted"}}},"device_renamed":{"address":"events.messages.technical.device.renamed","title":"device.renamed","summary":"A device was renamed","messages":{"device_renamed":{"$ref":"#/components/messages/device_renamed"}}},"device_signed_out":{"address":"events.messages.technical.device.signed_out","title":"device.signed_out","summary":"A device was signed out from another one","messages":{"device_signed_out":{"$ref":"#/components/messages/device_signed_out"}}},"ai_chat_requested":{"address":"events.messages.technical.ai.chat_requested","title":"ai.chat_requested","summary":"Someone chatted with AI; model is null when unknown","messages":{"ai_chat_requested":{"$ref":"#/components/messages/ai_chat_requested"}}},"ai_note_summarized":{"address":"events.messages.technical.ai.note_summarized","title":"ai.note_summarized","summary":"A note was summarized with AI","messages":{"ai_note_summarized":{"$ref":"#/components/messages/ai_note_summarized"}}},"ai_audio_transcribed":{"address":"events.messages.technical.ai.audio_transcribed","title":"ai.audio_transcribed","summary":"Audio was transcribed with AI","messages":{"ai_audio_transcribed":{"$ref":"#/components/messages/ai_audio_transcribed"}}},"ai_command_interpreted":{"address":"events.messages.technical.ai.command_interpreted","title":"ai.command_interpreted","summary":"A spoken or typed command was understood with AI (built-in phrases aren't announced)","messages":{"ai_command_interpreted":{"$ref":"#/components/messages/ai_command_interpreted"}}},"user_suspended":{"address":"events.messages.technical.user.suspended","title":"user.suspended","summary":"An administrator suspended an account","messages":{"user_suspended":{"$ref":"#/components/messages/user_suspended"}}},"user_restored":{"address":"events.messages.technical.user.restored","title":"user.restored","summary":"An administrator restored an account","messages":{"user_restored":{"$ref":"#/components/messages/user_restored"}}},"user_data_deleted":{"address":"events.messages.technical.user.data_deleted","title":"user.data_deleted","summary":"An administrator deleted an account's notes and files","messages":{"user_data_deleted":{"$ref":"#/components/messages/user_data_deleted"}}}},"operations":{"publish_note_created":{"action":"send","title":"Publish note.created","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/note_created"},"messages":[{"$ref":"#/channels/note_created/messages/note_created"}]},"publish_note_updated":{"action":"send","title":"Publish note.updated","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/note_updated"},"messages":[{"$ref":"#/channels/note_updated/messages/note_updated"}]},"publish_note_deleted":{"action":"send","title":"Publish note.deleted","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/note_deleted"},"messages":[{"$ref":"#/channels/note_deleted/messages/note_deleted"}]},"publish_attachment_uploaded":{"action":"send","title":"Publish attachment.uploaded","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/attachment_uploaded"},"messages":[{"$ref":"#/channels/attachment_uploaded/messages/attachment_uploaded"}]},"publish_attachment_deleted":{"action":"send","title":"Publish attachment.deleted","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/attachment_deleted"},"messages":[{"$ref":"#/channels/attachment_deleted/messages/attachment_deleted"}]},"publish_conversation_started":{"action":"send","title":"Publish conversation.started","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/conversation_started"},"messages":[{"$ref":"#/channels/conversation_started/messages/conversation_started"}]},"publish_conversation_deleted":{"action":"send","title":"Publish conversation.deleted","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/conversation_deleted"},"messages":[{"$ref":"#/channels/conversation_deleted/messages/conversation_deleted"}]},"publish_message_sent":{"action":"send","title":"Publish message.sent","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/message_sent"},"messages":[{"$ref":"#/channels/message_sent/messages/message_sent"}]},"publish_message_edited":{"action":"send","title":"Publish message.edited","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/message_edited"},"messages":[{"$ref":"#/channels/message_edited/messages/message_edited"}]},"publish_message_deleted":{"action":"send","title":"Publish message.deleted","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/message_deleted"},"messages":[{"$ref":"#/channels/message_deleted/messages/message_deleted"}]},"publish_call_started":{"action":"send","title":"Publish call.started","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/call_started"},"messages":[{"$ref":"#/channels/call_started/messages/call_started"}]},"publish_call_answered":{"action":"send","title":"Publish call.answered","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/call_answered"},"messages":[{"$ref":"#/channels/call_answered/messages/call_answered"}]},"publish_call_ended":{"action":"send","title":"Publish call.ended","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/call_ended"},"messages":[{"$ref":"#/channels/call_ended/messages/call_ended"}]},"publish_call_declined":{"action":"send","title":"Publish call.declined","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/call_declined"},"messages":[{"$ref":"#/channels/call_declined/messages/call_declined"}]},"publish_call_cancelled":{"action":"send","title":"Publish call.cancelled","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/call_cancelled"},"messages":[{"$ref":"#/channels/call_cancelled/messages/call_cancelled"}]},"publish_call_missed":{"action":"send","title":"Publish call.missed","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/call_missed"},"messages":[{"$ref":"#/channels/call_missed/messages/call_missed"}]},"publish_user_signed_in":{"action":"send","title":"Publish user.signed_in","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/user_signed_in"},"messages":[{"$ref":"#/channels/user_signed_in/messages/user_signed_in"}]},"publish_user_signed_out":{"action":"send","title":"Publish user.signed_out","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/user_signed_out"},"messages":[{"$ref":"#/channels/user_signed_out/messages/user_signed_out"}]},"publish_appearance_updated":{"action":"send","title":"Publish appearance.updated","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/appearance_updated"},"messages":[{"$ref":"#/channels/appearance_updated/messages/appearance_updated"}]},"publish_servers_updated":{"action":"send","title":"Publish servers.updated","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/servers_updated"},"messages":[{"$ref":"#/channels/servers_updated/messages/servers_updated"}]},"publish_avatar_updated":{"action":"send","title":"Publish avatar.updated","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/avatar_updated"},"messages":[{"$ref":"#/channels/avatar_updated/messages/avatar_updated"}]},"publish_avatar_removed":{"action":"send","title":"Publish avatar.removed","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/avatar_removed"},"messages":[{"$ref":"#/channels/avatar_removed/messages/avatar_removed"}]},"publish_profile_updated":{"action":"send","title":"Publish profile.updated","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/profile_updated"},"messages":[{"$ref":"#/channels/profile_updated/messages/profile_updated"}]},"publish_encryption_set_up":{"action":"send","title":"Publish encryption.set_up","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/encryption_set_up"},"messages":[{"$ref":"#/channels/encryption_set_up/messages/encryption_set_up"}]},"publish_encryption_changed":{"action":"send","title":"Publish encryption.changed","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/encryption_changed"},"messages":[{"$ref":"#/channels/encryption_changed/messages/encryption_changed"}]},"publish_encryption_reset":{"action":"send","title":"Publish encryption.reset","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/encryption_reset"},"messages":[{"$ref":"#/channels/encryption_reset/messages/encryption_reset"}]},"publish_api_key_created":{"action":"send","title":"Publish api_key.created","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/api_key_created"},"messages":[{"$ref":"#/channels/api_key_created/messages/api_key_created"}]},"publish_api_key_deleted":{"action":"send","title":"Publish api_key.deleted","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/api_key_deleted"},"messages":[{"$ref":"#/channels/api_key_deleted/messages/api_key_deleted"}]},"publish_device_renamed":{"action":"send","title":"Publish device.renamed","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/device_renamed"},"messages":[{"$ref":"#/channels/device_renamed/messages/device_renamed"}]},"publish_device_signed_out":{"action":"send","title":"Publish device.signed_out","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/device_signed_out"},"messages":[{"$ref":"#/channels/device_signed_out/messages/device_signed_out"}]},"publish_ai_chat_requested":{"action":"send","title":"Publish ai.chat_requested","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/ai_chat_requested"},"messages":[{"$ref":"#/channels/ai_chat_requested/messages/ai_chat_requested"}]},"publish_ai_note_summarized":{"action":"send","title":"Publish ai.note_summarized","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/ai_note_summarized"},"messages":[{"$ref":"#/channels/ai_note_summarized/messages/ai_note_summarized"}]},"publish_ai_audio_transcribed":{"action":"send","title":"Publish ai.audio_transcribed","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/ai_audio_transcribed"},"messages":[{"$ref":"#/channels/ai_audio_transcribed/messages/ai_audio_transcribed"}]},"publish_ai_command_interpreted":{"action":"send","title":"Publish ai.command_interpreted","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/ai_command_interpreted"},"messages":[{"$ref":"#/channels/ai_command_interpreted/messages/ai_command_interpreted"}]},"publish_user_suspended":{"action":"send","title":"Publish user.suspended","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/user_suspended"},"messages":[{"$ref":"#/channels/user_suspended/messages/user_suspended"}]},"publish_user_restored":{"action":"send","title":"Publish user.restored","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/user_restored"},"messages":[{"$ref":"#/channels/user_restored/messages/user_restored"}]},"publish_user_data_deleted":{"action":"send","title":"Publish user.data_deleted","summary":"messages publishes this once the change has committed.","channel":{"$ref":"#/channels/user_data_deleted"},"messages":[{"$ref":"#/channels/user_data_deleted/messages/user_data_deleted"}]},"consume_note-created-logger":{"action":"receive","title":"note-created-logger","summary":"Reads the new note and logs its length: the example of a processor","channel":{"$ref":"#/channels/note_created"},"messages":[{"$ref":"#/channels/note_created/messages/note_created"}],"x-durable-consumer":"note-created-logger"},"consume_attachment-uploaded-notifier":{"action":"receive","title":"attachment-uploaded-notifier","summary":"Tells the file's owner File uploaded: the example of a notification raised from the bus","channel":{"$ref":"#/channels/attachment_uploaded"},"messages":[{"$ref":"#/channels/attachment_uploaded/messages/attachment_uploaded"}],"x-durable-consumer":"attachment-uploaded-notifier"}},"components":{"messages":{"note_created":{"name":"note.created","title":"note.created","summary":"A note was written","contentType":"application/json","tags":[{"name":"business"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"business"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"business"},"type":{"type":"string","const":"note.created"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"noteId":{"type":"string","minLength":1}},"required":["userId","noteId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"note_updated":{"name":"note.updated","title":"note.updated","summary":"A note was edited","contentType":"application/json","tags":[{"name":"business"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"business"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"business"},"type":{"type":"string","const":"note.updated"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"noteId":{"type":"string","minLength":1}},"required":["userId","noteId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"note_deleted":{"name":"note.deleted","title":"note.deleted","summary":"A note was deleted","contentType":"application/json","tags":[{"name":"business"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"business"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"business"},"type":{"type":"string","const":"note.deleted"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"noteId":{"type":"string","minLength":1}},"required":["userId","noteId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"attachment_uploaded":{"name":"attachment.uploaded","title":"attachment.uploaded","summary":"A file was uploaded; noteId names its note, or is null for a file on its own","contentType":"application/json","tags":[{"name":"business"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"business"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"business"},"type":{"type":"string","const":"attachment.uploaded"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"attachmentId":{"type":"string","minLength":1},"noteId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["userId","attachmentId","noteId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"attachment_deleted":{"name":"attachment.deleted","title":"attachment.deleted","summary":"A file was deleted","contentType":"application/json","tags":[{"name":"business"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"business"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"business"},"type":{"type":"string","const":"attachment.deleted"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"attachmentId":{"type":"string","minLength":1}},"required":["userId","attachmentId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"conversation_started":{"name":"conversation.started","title":"conversation.started","summary":"Someone started a conversation; conversationId names it, never its content","contentType":"application/json","tags":[{"name":"business"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"business"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"business"},"type":{"type":"string","const":"conversation.started"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1}},"required":["userId","conversationId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"conversation_deleted":{"name":"conversation.deleted","title":"conversation.deleted","summary":"Someone deleted a conversation, for both people in it","contentType":"application/json","tags":[{"name":"business"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"business"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"business"},"type":{"type":"string","const":"conversation.deleted"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1}},"required":["userId","conversationId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"message_sent":{"name":"message.sent","title":"message.sent","summary":"A message was sent; its content is encrypted and never in the event","contentType":"application/json","tags":[{"name":"business"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"business"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"business"},"type":{"type":"string","const":"message.sent"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1},"messageId":{"type":"string","minLength":1}},"required":["userId","conversationId","messageId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"message_edited":{"name":"message.edited","title":"message.edited","summary":"A message was edited by its sender","contentType":"application/json","tags":[{"name":"business"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"business"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"business"},"type":{"type":"string","const":"message.edited"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1},"messageId":{"type":"string","minLength":1}},"required":["userId","conversationId","messageId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"message_deleted":{"name":"message.deleted","title":"message.deleted","summary":"A message was deleted by its sender","contentType":"application/json","tags":[{"name":"business"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"business"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"business"},"type":{"type":"string","const":"message.deleted"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1},"messageId":{"type":"string","minLength":1}},"required":["userId","conversationId","messageId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"call_started":{"name":"call.started","title":"call.started","summary":"Someone rang the other person in a conversation; callId names the call","contentType":"application/json","tags":[{"name":"business"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"business"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"business"},"type":{"type":"string","const":"call.started"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1},"callId":{"type":"string","minLength":1}},"required":["userId","conversationId","callId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"call_answered":{"name":"call.answered","title":"call.answered","summary":"The person called took the call","contentType":"application/json","tags":[{"name":"business"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"business"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"business"},"type":{"type":"string","const":"call.answered"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1},"callId":{"type":"string","minLength":1}},"required":["userId","conversationId","callId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"call_ended":{"name":"call.ended","title":"call.ended","summary":"An answered call ended: someone hung up, or both apps went quiet","contentType":"application/json","tags":[{"name":"business"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"business"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"business"},"type":{"type":"string","const":"call.ended"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1},"callId":{"type":"string","minLength":1}},"required":["userId","conversationId","callId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"call_declined":{"name":"call.declined","title":"call.declined","summary":"The person called turned the call down","contentType":"application/json","tags":[{"name":"business"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"business"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"business"},"type":{"type":"string","const":"call.declined"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1},"callId":{"type":"string","minLength":1}},"required":["userId","conversationId","callId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"call_cancelled":{"name":"call.cancelled","title":"call.cancelled","summary":"The caller stopped ringing before anyone answered","contentType":"application/json","tags":[{"name":"business"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"business"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"business"},"type":{"type":"string","const":"call.cancelled"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1},"callId":{"type":"string","minLength":1}},"required":["userId","conversationId","callId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"call_missed":{"name":"call.missed","title":"call.missed","summary":"Nobody answered before the call stopped ringing","contentType":"application/json","tags":[{"name":"business"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"business"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"business"},"type":{"type":"string","const":"call.missed"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1},"callId":{"type":"string","minLength":1}},"required":["userId","conversationId","callId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"user_signed_in":{"name":"user.signed_in","title":"user.signed_in","summary":"Someone signed in to the web or admin app","contentType":"application/json","tags":[{"name":"technical"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"technical"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"technical"},"type":{"type":"string","const":"user.signed_in"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"client":{"type":"string","enum":["web","admin","phone","desktop"]}},"required":["userId","client"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"user_signed_out":{"name":"user.signed_out","title":"user.signed_out","summary":"Someone signed out of the web or admin app","contentType":"application/json","tags":[{"name":"technical"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"technical"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"technical"},"type":{"type":"string","const":"user.signed_out"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"client":{"type":"string","enum":["web","admin","phone","desktop"]}},"required":["userId","client"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"appearance_updated":{"name":"appearance.updated","title":"appearance.updated","summary":"Someone changed the appearance","contentType":"application/json","tags":[{"name":"technical"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"technical"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"technical"},"type":{"type":"string","const":"appearance.updated"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"client":{"type":"string","enum":["web","admin","phone","desktop"]}},"required":["userId","client"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"servers_updated":{"name":"servers.updated","title":"servers.updated","summary":"Someone changed their server list","contentType":"application/json","tags":[{"name":"technical"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"technical"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"technical"},"type":{"type":"string","const":"servers.updated"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1}},"required":["userId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"avatar_updated":{"name":"avatar.updated","title":"avatar.updated","summary":"Someone set a profile photo","contentType":"application/json","tags":[{"name":"technical"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"technical"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"technical"},"type":{"type":"string","const":"avatar.updated"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1}},"required":["userId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"avatar_removed":{"name":"avatar.removed","title":"avatar.removed","summary":"Someone removed their profile photo","contentType":"application/json","tags":[{"name":"technical"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"technical"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"technical"},"type":{"type":"string","const":"avatar.removed"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1}},"required":["userId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"profile_updated":{"name":"profile.updated","title":"profile.updated","summary":"Someone changed their Messages handle or status","contentType":"application/json","tags":[{"name":"technical"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"technical"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"technical"},"type":{"type":"string","const":"profile.updated"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1}},"required":["userId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"encryption_set_up":{"name":"encryption.set_up","title":"encryption.set_up","summary":"Someone set up end-to-end encryption","contentType":"application/json","tags":[{"name":"technical"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"technical"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"technical"},"type":{"type":"string","const":"encryption.set_up"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1}},"required":["userId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"encryption_changed":{"name":"encryption.changed","title":"encryption.changed","summary":"Someone changed their encryption passphrase","contentType":"application/json","tags":[{"name":"technical"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"technical"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"technical"},"type":{"type":"string","const":"encryption.changed"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1}},"required":["userId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"encryption_reset":{"name":"encryption.reset","title":"encryption.reset","summary":"Someone reset their encryption: their earlier messages are unreadable to them","contentType":"application/json","tags":[{"name":"technical"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"technical"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"technical"},"type":{"type":"string","const":"encryption.reset"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1}},"required":["userId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"api_key_created":{"name":"api_key.created","title":"api_key.created","summary":"An API key was created","contentType":"application/json","tags":[{"name":"technical"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"technical"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"technical"},"type":{"type":"string","const":"api_key.created"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"apiKeyId":{"type":"string","minLength":1}},"required":["userId","apiKeyId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"api_key_deleted":{"name":"api_key.deleted","title":"api_key.deleted","summary":"An API key was revoked","contentType":"application/json","tags":[{"name":"technical"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"technical"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"technical"},"type":{"type":"string","const":"api_key.deleted"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"apiKeyId":{"type":"string","minLength":1}},"required":["userId","apiKeyId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"device_renamed":{"name":"device.renamed","title":"device.renamed","summary":"A device was renamed","contentType":"application/json","tags":[{"name":"technical"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"technical"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"technical"},"type":{"type":"string","const":"device.renamed"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"deviceId":{"type":"string","minLength":1}},"required":["userId","deviceId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"device_signed_out":{"name":"device.signed_out","title":"device.signed_out","summary":"A device was signed out from another one","contentType":"application/json","tags":[{"name":"technical"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"technical"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"technical"},"type":{"type":"string","const":"device.signed_out"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"deviceId":{"type":"string","minLength":1}},"required":["userId","deviceId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"ai_chat_requested":{"name":"ai.chat_requested","title":"ai.chat_requested","summary":"Someone chatted with AI; model is null when unknown","contentType":"application/json","tags":[{"name":"technical"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"technical"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"technical"},"type":{"type":"string","const":"ai.chat_requested"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"model":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["userId","model"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"ai_note_summarized":{"name":"ai.note_summarized","title":"ai.note_summarized","summary":"A note was summarized with AI","contentType":"application/json","tags":[{"name":"technical"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"technical"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"technical"},"type":{"type":"string","const":"ai.note_summarized"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"noteId":{"type":"string","minLength":1}},"required":["userId","noteId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"ai_audio_transcribed":{"name":"ai.audio_transcribed","title":"ai.audio_transcribed","summary":"Audio was transcribed with AI","contentType":"application/json","tags":[{"name":"technical"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"technical"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"technical"},"type":{"type":"string","const":"ai.audio_transcribed"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1}},"required":["userId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"ai_command_interpreted":{"name":"ai.command_interpreted","title":"ai.command_interpreted","summary":"A spoken or typed command was understood with AI (built-in phrases aren't announced)","contentType":"application/json","tags":[{"name":"technical"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"technical"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"technical"},"type":{"type":"string","const":"ai.command_interpreted"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1}},"required":["userId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"user_suspended":{"name":"user.suspended","title":"user.suspended","summary":"An administrator suspended an account","contentType":"application/json","tags":[{"name":"technical"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"technical"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"technical"},"type":{"type":"string","const":"user.suspended"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"adminId":{"type":"string","minLength":1}},"required":["userId","adminId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"user_restored":{"name":"user.restored","title":"user.restored","summary":"An administrator restored an account","contentType":"application/json","tags":[{"name":"technical"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"technical"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"technical"},"type":{"type":"string","const":"user.restored"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"adminId":{"type":"string","minLength":1}},"required":["userId","adminId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}},"user_data_deleted":{"name":"user.data_deleted","title":"user.data_deleted","summary":"An administrator deleted an account's notes and files","contentType":"application/json","tags":[{"name":"technical"}],"headers":{"type":"object","properties":{"Nats-Msg-Id":{"type":"string","description":"The event id: JetStream drops a resend with the same id"},"App":{"type":"string","const":"messages"},"Category":{"type":"string","const":"technical"}}},"payload":{"type":"object","properties":{"id":{"type":"string","minLength":1},"app":{"type":"string","const":"messages"},"category":{"type":"string","const":"technical"},"type":{"type":"string","const":"user.data_deleted"},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"adminId":{"type":"string","minLength":1}},"required":["userId","adminId"],"additionalProperties":false}},"required":["id","app","category","type","occurredAt","data"],"additionalProperties":false}}}},"x-jetstream":{"stream":"EVENTS_MESSAGES","subjects":["events.messages.>"],"retentionDays":7,"delivery":"at least once, not always in order; the event id makes a repeat harmless"}}