SMS
SMS/MMS संदेश पढ़ें और भेजें। SMS अनुमति आवश्यक। Google Play बिल्ड पर उपलब्ध नहीं।
प्रकार परिभाषाएँ
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!
}ऑपरेशन
sms
SMS संदेश खोजें। सभी सूचीबद्ध करने के लिए query में खाली स्ट्रिंग का उपयोग करें।
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
किसी query से मेल खाने वाले SMS संदेशों की गणना करें।
query GetSmsCount($query: String!) {
smsCount(query: $query)
}smsConversations
SMS वार्तालाप (threads) सूचीबद्ध करें, पेजिनेटेड।
query GetSmsConversations($offset: Int!, $limit: Int!, $query: String!) {
smsConversations(offset: $offset, limit: $limit, query: $query) {
id address snippet date messageCount read
}
}smsConversationCount
किसी query से मेल खाने वाले SMS वार्तालापों की गणना करें।
query GetSmsConversationCount($query: String!) {
smsConversationCount(query: $query)
}smsAllCounts
सभी SMS श्रेणियों के लिए गणना लौटाएँ।
query GetSmsAllCounts {
smsAllCounts { inbox sent draft failed }
}archivedConversations
संग्रहीत (छिपे हुए) वार्तालापों को सूचीबद्ध करें।
query GetArchivedConversations {
archivedConversations { id address snippet date messageCount read }
}sendSms
एक SMS भेजें। डिफ़ॉल्ट SIM का उपयोग करने के लिए subscriptionId=-1 पास करें।
mutation SendSms($number: String!, $body: String!, $subscriptionId: Int!) {
sendSms(number: $number, body: $body, subscriptionId: $subscriptionId)
}sendMms
डिफ़ॉल्ट SMS ऐप को एक MMS (एक या अधिक अटैचमेंट) के साथ पहले से भरा हुआ लॉन्च करें। एक लंबित MMS id लौटाता है; PlainApp भेजी गई स्थिति को पोल करता है और WebSocket इवेंट्स के माध्यम से सफलता रिपोर्ट करता है। attachmentPaths को PlainApp के AppFile store में फ़ाइलों (fid: URIs) की ओर इशारा करना चाहिए।
mutation SendMms($number: String!, $body: String!, $attachmentPaths: [String!]!, $threadId: String!) {
sendMms(number: $number, body: $body, attachmentPaths: $attachmentPaths, threadId: $threadId)
}archiveConversation
thread id और तारीख द्वारा एक वार्तालाप संग्रहित करें।
mutation ArchiveConversation($id: String!, $date: Long!) {
archiveConversation(id: $id, date: $date)
}unarchiveConversation
संग्रह से एक वार्तालाप हटाएँ।
mutation UnarchiveConversation($id: String!) {
unarchiveConversation(id: $id)
}