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 உரையாடல்களை (threads) பக்கங்களாகப் பட்டியலிடவும்.
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)
}