API-Referenz

SMS

SMS and MMS APIs.

Typdefinitionen

graphql
type Subscription {
  smsChanged: SmsProviderChange
  smsSendResult: SmsSendResult!
}

type Mutation {
  archiveSmsConversation(id: ID!, date: Instant): Boolean!
  deleteSms(query: String!): ActionResult!
  restoreSms(query: String!): ActionResult!
  sendSms(number: String!, body: String!, attachmentPaths: [String!]! = [], subscriptionId: Int, requestId: String!): SmsSendReceipt!
  trashSms(query: String!): ActionResult!
  unarchiveSmsConversation(id: ID!): Boolean!
}

type Query {
  archivedSmsConversations(query: String!, offset: Int!, limit: Int!): [SmsConversation!]!
  sims: [Sim!]!
  sms(query: String!, offset: Int!, limit: Int!): [Sms!]!
  smsBoxCounts: SmsCounts!
  smsConversationCount(query: String!): Int!
  smsConversations(query: String!, offset: Int!, limit: Int!): [SmsConversation!]!
  smsCount(query: String!): Int!
}

type ActionResult {
	affectedCount: Int!
}

enum DataType {
	DEFAULT
	AUDIO
	VIDEO
	IMAGE
	SMS
	CONTACT
	NOTE
	FEED_ENTRY
	CALL
	PACKAGE
	FILE
	APP_FILE
	DOC
}

scalar Instant

type Sim {
	id: ID!
	label: String!
	number: String!
	subscriptionId: Int!
}

type Sms {
	id: ID!
	body: String!
	address: String!
	sentAt: Instant!
	serviceCenter: String!
	read: Boolean!
	threadId: ID!
	type: SmsType!
	typeCode: Int!
	subscriptionId: Int!
	isMms: Boolean!
	attachments: [SmsAttachment!]!
	tags: [Tag!]!
}

type SmsAttachment {
	path: String!
	contentType: String!
	name: String!
}

type SmsConversation {
	id: ID!
	address: String!
	snippet: String!
	lastMessageAt: Instant!
	messageCount: Int!
	read: Boolean!
	addresses: [String!]!
}

type SmsCounts {
	total: Int!
	inbox: Int!
	sent: Int!
	drafts: Int!
}

type SmsProviderChange {
	uris: [String!]!
}

type SmsSendReceipt {
	requestId: String!
	requiresConfirmation: Boolean!
}

type SmsSendResult {
	requestId: String!
	success: Boolean!
	resultCode: Int
}

enum SmsType {
	INBOX
	SENT
	DRAFT
	OUTBOX
	FAILED
	QUEUED
	UNKNOWN
}

type Tag {
	id: ID!
	name: String!
	type: DataType!
	count: Int!
}

Operationen

subscription

smsChanged

Benachrichtigt Clients bei Änderungen an SMS auf dem Gerät, damit sie die SMS-Liste aktualisieren. Gibt keine Nachrichteninhalte zurück.

graphql
subscription smsChanged {
  smsChanged { uris }
}
subscription

smsSendResult

SMS-/MMS-Sendeergebnisse empfangen und über requestId zuordnen. success bestimmt das Ergebnis: SMS-Erfolg ist -1; bei MMS stehen 0 für Erfolg, -1000 für Zeitüberschreitung und -1001 für Abbruch. Sendeerfolg bestätigt keine Zustellung.

graphql
subscription smsSendResult {
  smsSendResult { requestId success resultCode }
}
mutation

archiveSmsConversation

Archiviert eine Nachrichtenkonversation und erfasst optional das Archivierungsdatum.

graphql
mutation archiveSmsConversation($id: ID!, $date: Instant) {
  archiveSmsConversation(id: $id, date: $date)
}
mutation

deleteSms

Löscht SMS, die der Abfrage entsprechen, endgültig.

graphql
mutation deleteSms($query: String!) {
  deleteSms(query: $query) { affectedCount }
}
mutation

restoreSms

Stellt passende SMS aus dem Papierkorb wieder her.

graphql
mutation restoreSms($query: String!) {
  restoreSms(query: $query) { affectedCount }
}
mutation

sendSms

SMS senden oder den MMS-Editor des Telefons mit Anhängen öffnen.

graphql
mutation sendSms($number: String!, $body: String!, $attachmentPaths: [String!]!, $subscriptionId: Int, $requestId: String!) {
  sendSms(number: $number, body: $body, attachmentPaths: $attachmentPaths, subscriptionId: $subscriptionId, requestId: $requestId) { requestId requiresConfirmation }
}
mutation

trashSms

Verschiebt SMS, die der Abfrage entsprechen, in den Papierkorb.

graphql
mutation trashSms($query: String!) {
  trashSms(query: $query) { affectedCount }
}
mutation

unarchiveSmsConversation

Hebt den Archivierungsstatus einer Konversation auf.

graphql
mutation unarchiveSmsConversation($id: ID!) {
  unarchiveSmsConversation(id: $id)
}
query

archivedSmsConversations

Durchsucht archivierte SMS-Konversationen mit Seitennavigation.

graphql
query archivedSmsConversations($query: String!, $offset: Int!, $limit: Int!) {
  archivedSmsConversations(query: $query, offset: $offset, limit: $limit) { id address snippet lastMessageAt messageCount read addresses }
}
query

sims

Verfügbare SIM-Karten und Telefonkonten des Geräts auflisten.

graphql
query sims {
  sims { id label number subscriptionId }
}
query

sms

Durchsucht SMS. Eine leere Zeichenfolge als query listet alle auf.

graphql
query sms($query: String!, $offset: Int!, $limit: Int!) {
  sms(query: $query, offset: $offset, limit: $limit) { id body address sentAt serviceCenter read threadId type }
}
query

smsBoxCounts

Liest die Nachrichtenanzahl der verfügbaren SMS-Ordner.

graphql
query smsBoxCounts {
  smsBoxCounts { total inbox sent drafts }
}
query

smsConversationCount

Zählt SMS-Konversationen, die einer Abfrage entsprechen.

graphql
query smsConversationCount($query: String!) {
  smsConversationCount(query: $query)
}
query

smsConversations

Listet SMS-Konversationen seitenweise auf.

graphql
query smsConversations($query: String!, $offset: Int!, $limit: Int!) {
  smsConversations(query: $query, offset: $offset, limit: $limit) { id address snippet lastMessageAt messageCount read addresses }
}
query

smsCount

Zählt SMS, die einer Abfrage entsprechen.

graphql
query smsCount($query: String!) {
  smsCount(query: $query)
}