PlainApp
API-referentie

Meldingen

Controleer app.capabilities voor functieondersteuning en app.access plus hostrechten voor autorisatie. Voorbeelden gebruiken synthetische waarden; vervang paden, ID’s, invoer en filters vóór aanroepen.

Typedefinities

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

Bewerkingen

subscription

notificationCreated

Een nieuw waargenomen apparaatmelding ontvangen.

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

notificationUpdated

Een bijgewerkte apparaatmelding ontvangen.

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

notificationDeleted

Een verwijderde apparaatmelding ontvangen.

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

notificationRefreshed

Een signaal ontvangen om de huidige lijst met apparaatmeldingen te vernieuwen.

graphql
subscription notificationRefreshed {
  notificationRefreshed
}
mutation

deleteNotifications

De opgegeven meldingsrecords verwijderen en het aantal getroffen items melden.

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

replyNotification

Een melding beantwoorden via een inline-antwoordactie. actionIndex begint bij 0 binnen de acties waarmee kan worden geantwoord.

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

Opgeslagen meldingen tellen die met de query overeenkomen.

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

notifications

Een pagina opgeslagen apparaatmeldingen lezen die met de query overeenkomen.

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