SMS
SMS/MMS-Nachrichten lesen und senden. Erfordert SMS-Berechtigung. In der Google Play-Version nicht verfügbar.
Typdefinitionen
type Message {
id: ID!
body: String!
address: String! # phone number
date: String! # ISO 8601
serviceCenter: String!
read: Boolean!
threadId: String!
type: Int! # 1=inbox 2=sent 3=draft 5=failed
subscriptionId: Int!
isMms: Boolean!
attachments: [MessageAttachment!]!
}
type MessageAttachment {
path: String!
contentType: String!
name: String!
}
type SmsConversation {
id: String!
address: String!
snippet: String!
date: String!
messageCount: Int!
read: Boolean!
}
type SmsCounts {
inbox: Int!
sent: Int!
draft: Int!
failed: Int!
}Operationen
sms
SMS-Nachrichten durchsuchen. Leerstring für die Abfrage verwenden, um alle aufzulisten.
query GetSms($offset: Int!, $limit: Int!, $query: String!) {
sms(offset: $offset, limit: $limit, query: $query) {
id body address date read threadId type subscriptionId isMms
attachments { path contentType name }
}
}smsCount
Anzahl der auf eine Abfrage passenden SMS-Nachrichten zählen.
query GetSmsCount($query: String!) {
smsCount(query: $query)
}smsConversations
SMS-Konversationen (Threads) paginiert auflisten.
query GetSmsConversations($offset: Int!, $limit: Int!, $query: String!) {
smsConversations(offset: $offset, limit: $limit, query: $query) {
id address snippet date messageCount read
}
}smsConversationCount
Anzahl der auf eine Abfrage passenden SMS-Konversationen zählen.
query GetSmsConversationCount($query: String!) {
smsConversationCount(query: $query)
}smsAllCounts
Anzahlen für alle SMS-Kategorien zurückgeben.
query GetSmsAllCounts {
smsAllCounts { inbox sent draft failed }
}archivedConversations
Archivierte (ausgeblendete) Konversationen auflisten.
query GetArchivedConversations {
archivedConversations { id address snippet date messageCount read }
}sendSms
Eine SMS senden. subscriptionId=-1 übergeben, um die Standard-SIM zu verwenden.
mutation SendSms($number: String!, $body: String!, $subscriptionId: Int!) {
sendSms(number: $number, body: $body, subscriptionId: $subscriptionId)
}sendMms
Startet die Standard-SMS-App vorab ausgefüllt mit einem MMS (eine oder mehrere Anhänge). Gibt eine ausstehende MMS-ID zurück; PlainApp pollt den Sende-Zustand und meldet Erfolg über WebSocket-Ereignisse. attachmentPaths muss auf Dateien im AppFile-Store von PlainApp verweisen (fid:-URIs).
mutation SendMms($number: String!, $body: String!, $attachmentPaths: [String!]!, $threadId: String!) {
sendMms(number: $number, body: $body, attachmentPaths: $attachmentPaths, threadId: $threadId)
}archiveSmsConversation
Archive a conversation by thread id; the server derives the snapshot date.
mutation ArchiveSmsConversation($id: String!) {
archiveSmsConversation(id: $id)
}unarchiveSmsConversation
Remove a conversation from the archive.
mutation UnarchiveSmsConversation($id: String!) {
unarchiveSmsConversation(id: $id)
}