PlainApp
API-referentie

Notities

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 Mutation {
  createNote(input: NoteInput!): Note!
  deleteNotes(query: String!): ActionResult!
  restoreNotes(query: String!): ActionResult!
  saveFeedEntriesToNotes(query: String!): [ID!]!
  trashNotes(query: String!): ActionResult!
  updateNote(id: ID!, input: NoteInput!): Note!
}

type Query {
  exportNotes(query: String!): String!
  note(id: ID!): Note
  noteCount(query: String!): Int!
  notes(query: String!, offset: Int!, limit: Int!): [Note!]!
}

type ActionResult {
	affectedCount: Int!
}

enum DataType {
	DEFAULT
	AUDIO
	VIDEO
	IMAGE
	SMS
	CONTACT
	NOTE
	FEED_ENTRY
	CALL
	PACKAGE
	FILE
	APP_FILE
	DOC
}

scalar Instant

type Note {
	id: ID!
	title: String!
	content: String!
	deletedAt: Instant
	createdAt: Instant!
	updatedAt: Instant!
	tags: [Tag!]!
}

input NoteInput {
	title: String!
	content: String!
}

type Tag {
	id: ID!
	name: String!
	type: DataType!
	count: Int!
}

Bewerkingen

mutation

createNote

Een notitie uit de opgegeven invoer maken en blijvend opslaan.

graphql
mutation createNote($input: NoteInput!) {
  createNote(input: $input) { id title content deletedAt createdAt updatedAt }
}
mutation

deleteNotes

Notities in de prullenbak die met een query overeenkomen definitief verwijderen. Werkt alleen op notities die al in de prullenbak staan.

graphql
mutation deleteNotes($query: String!) {
  deleteNotes(query: $query) { affectedCount }
}
mutation

restoreNotes

Notities uit de prullenbak herstellen die met een query overeenkomen.

graphql
mutation restoreNotes($query: String!) {
  restoreNotes(query: $query) { affectedCount }
}
mutation

saveFeedEntriesToNotes

Overeenkomende feeditems als notities opslaan en de ID’s van de gemaakte notities teruggeven.

graphql
mutation saveFeedEntriesToNotes($query: String!) {
  saveFeedEntriesToNotes(query: $query)
}
mutation

trashNotes

Notities die met een query overeenkomen naar de prullenbak verplaatsen.

graphql
mutation trashNotes($query: String!) {
  trashNotes(query: $query) { affectedCount }
}
mutation

updateNote

Een opgeslagen notitie met de opgegeven invoer bijwerken.

graphql
mutation updateNote($id: ID!, $input: NoteInput!) {
  updateNote(id: $id, input: $input) { id title content deletedAt createdAt updatedAt }
}
query

exportNotes

Notities die met een query overeenkomen (inclusief tags) als JSON-tekenreeks serialiseren voor back-up/overdracht.

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

note

Eén notitie op ID ophalen.

graphql
query note($id: ID!) {
  note(id: $id) { id title content deletedAt createdAt updatedAt }
}
query

noteCount

Notities tellen die met een query overeenkomen.

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

notes

Notities doorzoeken (titel + inhoud). Laat query leeg om alle notities buiten de prullenbak weer te geven.

graphql
query notes($query: String!, $offset: Int!, $limit: Int!) {
  notes(query: $query, offset: $offset, limit: $limit) { id title content deletedAt createdAt updatedAt }
}