package io.heckel.ntfy.msg import androidx.annotation.Keep import io.heckel.ntfy.db.Action /* This annotation ensures that proguard still works in production builds, * see https://stackoverflow.com/a/62753300/1440785 */ @Keep data class Message( val id: String, val time: Long, val event: String, val topic: String, val priority: Int?, val tags: List?, val click: String?, val actions: List?, val title: String?, val message: String, val encoding: String?, val attachment: MessageAttachment?, ) @Keep data class MessageAttachment( val name: String, val type: String?, val size: Long?, val expires: Long?, val url: String, ) @Keep data class MessageAction( val id: String, val action: String, val label: String, // "view", "broadcast" or "http" val url: String?, // used in "view" and "http" val method: String?, // used in "http", default is POST (!) val headers: Map?, // used in "http" val body: String?, // used in "http" val extras: Map?, // used in "broadcast" ) const val MESSAGE_ENCODING_BASE64 = "base64"