SMS
SMS and MMS APIs.
प्रकार परिभाषाएँ
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!
}ऑपरेशन
smsChanged
डिवाइस पर SMS बदलने पर क्लाइंट को सूची रीफ़्रेश करने की सूचना देता है। संदेश का पाठ नहीं लौटाता।
subscription smsChanged {
smsChanged { uris }
}smsSendResult
SMS/MMS भेजने के परिणाम पाएँ और requestId से मिलाएँ। नतीजे के लिए success देखें: SMS सफलता -1 है; MMS में 0 सफलता, -1000 समय समाप्त और -1001 रद्द होना है। सफल भेजना प्राप्तकर्ता तक पहुँचने की पुष्टि नहीं है।
subscription smsSendResult {
smsSendResult { requestId success resultCode }
}archiveSmsConversation
संदेश वार्तालाप संग्रहित करें और वैकल्पिक रूप से संग्रह की तारीख रिकॉर्ड करें।
mutation archiveSmsConversation($id: ID!, $date: Instant) {
archiveSmsConversation(id: $id, date: $date)
}deleteSms
क्वेरी से मेल खाने वाले SMS संदेश स्थायी रूप से मिटाएँ।
mutation deleteSms($query: String!) {
deleteSms(query: $query) { affectedCount }
}restoreSms
क्वेरी से मेल खाने वाले ट्रैश के SMS संदेश बहाल करें।
mutation restoreSms($query: String!) {
restoreSms(query: $query) { affectedCount }
}sendSms
SMS भेजें या संलग्नकों के साथ फ़ोन का MMS संपादक खोलें।
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 }
}trashSms
क्वेरी से मेल खाने वाले SMS संदेश ट्रैश में ले जाएँ।
mutation trashSms($query: String!) {
trashSms(query: $query) { affectedCount }
}unarchiveSmsConversation
वार्तालाप की संग्रहित स्थिति हटाएँ।
mutation unarchiveSmsConversation($id: ID!) {
unarchiveSmsConversation(id: $id)
}archivedSmsConversations
संग्रहित SMS वार्तालाप पृष्ठों में खोजें।
query archivedSmsConversations($query: String!, $offset: Int!, $limit: Int!) {
archivedSmsConversations(query: $query, offset: $offset, limit: $limit) { id address snippet lastMessageAt messageCount read addresses }
}sims
डिवाइस पर उपलब्ध SIM कार्ड और फ़ोन खाते सूचीबद्ध करें।
query sims {
sims { id label number subscriptionId }
}sms
SMS संदेश खोजें। सब सूचीबद्ध करने के लिए query में खाली स्ट्रिंग दें।
query sms($query: String!, $offset: Int!, $limit: Int!) {
sms(query: $query, offset: $offset, limit: $limit) { id body address sentAt serviceCenter read threadId type }
}smsBoxCounts
उपलब्ध SMS बॉक्स की संदेश संख्याएँ पढ़ें।
query smsBoxCounts {
smsBoxCounts { total inbox sent drafts }
}smsConversationCount
क्वेरी से मेल खाने वाले SMS वार्तालाप गिनें।
query smsConversationCount($query: String!) {
smsConversationCount(query: $query)
}smsConversations
SMS वार्तालाप (थ्रेड) पृष्ठों में सूचीबद्ध करें।
query smsConversations($query: String!, $offset: Int!, $limit: Int!) {
smsConversations(query: $query, offset: $offset, limit: $limit) { id address snippet lastMessageAt messageCount read addresses }
}smsCount
क्वेरी से मेल खाने वाले SMS संदेश गिनें।
query smsCount($query: String!) {
smsCount(query: $query)
}