API संदर्भ

SMS

SMS/MMS संदेश पढ़ें और भेजें। SMS अनुमति आवश्यक। Google Play बिल्ड पर उपलब्ध नहीं।

प्रकार परिभाषाएँ

bash
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!
}

ऑपरेशन

query

sms

SMS संदेश खोजें। सभी सूचीबद्ध करने के लिए query में खाली स्ट्रिंग का उपयोग करें।

bash
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 }
  }
}
query

smsCount

किसी query से मेल खाने वाले SMS संदेशों की गणना करें।

bash
query GetSmsCount($query: String!) {
  smsCount(query: $query)
}
query

smsConversations

SMS वार्तालाप (threads) सूचीबद्ध करें, पेजिनेटेड।

bash
query GetSmsConversations($offset: Int!, $limit: Int!, $query: String!) {
  smsConversations(offset: $offset, limit: $limit, query: $query) {
    id address snippet date messageCount read
  }
}
query

smsConversationCount

किसी query से मेल खाने वाले SMS वार्तालापों की गणना करें।

bash
query GetSmsConversationCount($query: String!) {
  smsConversationCount(query: $query)
}
query

smsAllCounts

सभी SMS श्रेणियों के लिए गणना लौटाएँ।

bash
query GetSmsAllCounts {
  smsAllCounts { inbox sent draft failed }
}
query

archivedConversations

संग्रहीत (छिपे हुए) वार्तालापों को सूचीबद्ध करें।

bash
query GetArchivedConversations {
  archivedConversations { id address snippet date messageCount read }
}
mutation

sendSms

एक SMS भेजें। डिफ़ॉल्ट SIM का उपयोग करने के लिए subscriptionId=-1 पास करें।

bash
mutation SendSms($number: String!, $body: String!, $subscriptionId: Int!) {
  sendSms(number: $number, body: $body, subscriptionId: $subscriptionId)
}
mutation

sendMms

डिफ़ॉल्ट SMS ऐप को एक MMS (एक या अधिक अटैचमेंट) के साथ पहले से भरा हुआ लॉन्च करें। एक लंबित MMS id लौटाता है; PlainApp भेजी गई स्थिति को पोल करता है और WebSocket इवेंट्स के माध्यम से सफलता रिपोर्ट करता है। attachmentPaths को PlainApp के AppFile store में फ़ाइलों (fid: URIs) की ओर इशारा करना चाहिए।

bash
mutation SendMms($number: String!, $body: String!, $attachmentPaths: [String!]!, $threadId: String!) {
  sendMms(number: $number, body: $body, attachmentPaths: $attachmentPaths, threadId: $threadId)
}
mutation

archiveConversation

thread id और तारीख द्वारा एक वार्तालाप संग्रहित करें।

bash
mutation ArchiveConversation($id: String!, $date: Long!) {
  archiveConversation(id: $id, date: $date)
}
mutation

unarchiveConversation

संग्रह से एक वार्तालाप हटाएँ।

bash
mutation UnarchiveConversation($id: String!) {
  unarchiveConversation(id: $id)
}