signald-go/protocol.json

1 line
91 KiB
JSON
Raw Normal View History

2022-08-16 16:57:10 +00:00
{"doc_version":"v1","version":{"name":"signald","version":"unversioned","branch":"","commit":""},"info":"This document describes objects that may be used when communicating with signald.","types":{"v0":{"JsonAccountList":{"fields":{"accounts":{"list":true,"type":"JsonAccount","version":"v0"}},"deprecated":true,"removal_date":1641027661},"JsonMessageEnvelope":{"fields":{"username":{"type":"String","example":"\"+12024561414\""},"uuid":{"type":"String","example":"\"0cc10e61-d64c-4dbc-b51c-334f7dd45a4a\""},"source":{"type":"JsonAddress","version":"v0"},"sourceDevice":{"type":"int"},"type":{"type":"String"},"relay":{"type":"String","doc":"this field is no longer available and will never be populated"},"timestamp":{"type":"long","example":"1615576442475"},"timestampISO":{"type":"String"},"serverTimestamp":{"type":"long"},"serverDeliveredTimestamp":{"type":"long","example":"161557644247580"},"hasLegacyMessage":{"type":"boolean"},"hasContent":{"type":"boolean"},"isUnidentifiedSender":{"type":"boolean"},"dataMessage":{"type":"JsonDataMessage","version":"v0"},"syncMessage":{"type":"JsonSyncMessage","version":"v0"},"callMessage":{"type":"JsonCallMessage","version":"v0"},"receipt":{"type":"JsonReceiptMessage","version":"v0"},"typing":{"type":"JsonTypingMessage","version":"v0"}},"deprecated":true,"removal_date":1641027661},"JsonAccount":{"fields":{"deviceId":{"type":"int"},"username":{"type":"String"},"filename":{"type":"String"},"uuid":{"type":"String"},"registered":{"type":"boolean"},"has_keys":{"type":"boolean"},"subscribed":{"type":"boolean"}},"deprecated":true,"removal_date":1641027661},"JsonAddress":{"fields":{"number":{"type":"String"},"uuid":{"type":"UUID"},"relay":{"type":"String"}},"deprecated":true,"removal_date":1641027661},"JsonDataMessage":{"fields":{"timestamp":{"type":"long","doc":"the timestamp that the message was sent at, according to the sender's device. This is used to uniquely identify this message for things like reactions and quotes.","example":"1615576442475"},"attachments":{"list":true,"type":"JsonAttachment","version":"v0","doc":"files attached to the incoming message"},"body":{"type":"String","doc":"the text body of the incoming message.","example":"\"hello\""},"group":{"type":"JsonGroupInfo","version":"v0","doc":"if the incoming message was sent to a v1 group, information about that group will be here"},"groupV2":{"type":"JsonGroupV2Info","version":"v0","doc":"is the incoming message was sent to a v2 group, basic identifying information about that group will be here. For full information, use list_groups"},"endSession":{"type":"boolean"},"expiresInSeconds":{"type":"int","doc":"the expiry timer on the incoming message. Clients should delete records of the message within this number of seconds"},"profileKeyUpdate":{"type":"boolean"},"quote":{"type":"JsonQuote","version":"v0","doc":"if the incoming message is a quote or reply to another message, this will contain information about that message"},"contacts":{"list":true,"type":"SharedContact","version":"v0","doc":"if the incoming message has a shared contact, the contact's information will be here"},"previews":{"list":true,"type":"JsonPreview","version":"v0","doc":"if the incoming message has a link preview, information about that preview will be here"},"sticker":{"type":"JsonSticker","version":"v0","doc":"if the incoming message is a sticker, information about the sicker will be here"},"viewOnce":{"type":"boolean","doc":"indicates the message is a view once message. View once messages typically include no body and a single image attachment. Official Signal clients will prevent the user from saving the image, and once the user has viewed the image once they will destroy the image."},"reaction":{"type":"JsonReaction","version":"v0","doc":"if the message adds or removes a reaction to another message, this will indicate what change is being made"},"remoteDelete":{"type":"RemoteDelete","version":"v0","doc":"if the inbound message is deleting a previously sent message, indicates which message should be deleted"},"mentions":{"list":true,"type":"JsonMention","versi