API রেফারেন্স

বিজ্ঞপ্তি

সমর্থনের জন্য app.capabilities এবং অনুমতির জন্য app.access ও হোস্টের অনুমতি দেখুন। ব্যবহারের আগে নমুনা মান বদলান।

টাইপ ডেফিনিশন

graphql
type Subscription {
  notificationCreated: Notification!
  notificationUpdated: Notification!
  notificationDeleted: Notification!
  notificationRefreshed: Boolean!
}

type Mutation {
  deleteNotifications(ids: [ID!]!): ActionResult!
  replyNotification(id: ID!, actionIndex: Int!, text: String!): Boolean!
}

type Query {
  notificationCount(query: String!): Int!
  notifications(query: String!, offset: Int!, limit: Int!): [Notification!]!
}

type ActionResult {
	affectedCount: Int!
}

scalar Instant

type Notification {
	id: ID!
	
	onlyOnce: Boolean!
	isClearable: Boolean!
	appId: ID!
	appName: String!
	postedAt: Instant!
	silent: Boolean!
	title: String!
	body: String!
	actions: [String!]!
	
	replyActions: [String!]!
}

অপারেশন

subscription

notificationCreated

নতুন পর্যবেক্ষিত ডিভাইস বিজ্ঞপ্তি পায়।

graphql
subscription notificationCreated {
  notificationCreated { id onlyOnce isClearable appId appName postedAt silent title }
}
subscription

notificationUpdated

আপডেট করা ডিভাইস বিজ্ঞপ্তি পায়।

graphql
subscription notificationUpdated {
  notificationUpdated { id onlyOnce isClearable appId appName postedAt silent title }
}
subscription

notificationDeleted

সরানো ডিভাইস বিজ্ঞপ্তি পায়।

graphql
subscription notificationDeleted {
  notificationDeleted { id onlyOnce isClearable appId appName postedAt silent title }
}
subscription

notificationRefreshed

বর্তমান ডিভাইস বিজ্ঞপ্তির তালিকা রিফ্রেশের সংকেত পায়।

graphql
subscription notificationRefreshed {
  notificationRefreshed
}
mutation

deleteNotifications

নির্দিষ্ট বিজ্ঞপ্তির রেকর্ড মুছে দেয় ও প্রভাবিত সংখ্যা জানায়।

graphql
mutation deleteNotifications($ids: [ID!]!) {
  deleteNotifications(ids: $ids) { affectedCount }
}
mutation

replyNotification

ইনলাইন-উত্তরের কাজ দিয়ে বিজ্ঞপ্তির উত্তর পাঠায়। উত্তর-সমর্থিত কাজগুলির মধ্যে actionIndex 0 থেকে শুরু।

graphql
# `actionIndex` indexes [`Notification::reply_actions`], the
# reply-capable subset — not the plain action list.
mutation replyNotification($id: ID!, $actionIndex: Int!, $text: String!) {
  replyNotification(id: $id, actionIndex: $actionIndex, text: $text)
}
query

notificationCount

কোয়েরির সঙ্গে মেলা সংরক্ষিত বিজ্ঞপ্তি গোনে।

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

notifications

কোয়েরির সঙ্গে মেলা সংরক্ষিত ডিভাইস বিজ্ঞপ্তির এক পাতা পড়ে।

graphql
query notifications($query: String!, $offset: Int!, $limit: Int!) {
  notifications(query: $query, offset: $offset, limit: $limit) { id onlyOnce isClearable appId appName postedAt silent title }
}