Notas
Consultar app.capabilities para comprobar la compatibilidad de funciones y app.access junto con los permisos del anfitrión para la autorización. Los ejemplos usan valores sintéticos; sustituir las rutas, ID, entradas y filtros antes de llamar.
Definiciones de tipos
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!
}Operaciones
createNote
Crear y guardar una nota a partir de los datos de entrada indicados.
mutation createNote($input: NoteInput!) {
createNote(input: $input) { id title content deletedAt createdAt updatedAt }
}deleteNotes
Eliminar permanentemente las notas de la papelera que coincidan con una consulta. Solo afecta a notas que ya estén en la papelera.
mutation deleteNotes($query: String!) {
deleteNotes(query: $query) { affectedCount }
}restoreNotes
Restaurar las notas de la papelera que coincidan con una consulta.
mutation restoreNotes($query: String!) {
restoreNotes(query: $query) { affectedCount }
}saveFeedEntriesToNotes
Guardar como notas las entradas de fuentes coincidentes y devolver los ID de las notas creadas.
mutation saveFeedEntriesToNotes($query: String!) {
saveFeedEntriesToNotes(query: $query)
}trashNotes
Mover a la papelera las notas que coincidan con una consulta.
mutation trashNotes($query: String!) {
trashNotes(query: $query) { affectedCount }
}updateNote
Actualizar una nota almacenada a partir de los datos de entrada indicados.
mutation updateNote($id: ID!, $input: NoteInput!) {
updateNote(id: $id, input: $input) { id title content deletedAt createdAt updatedAt }
}exportNotes
Serializar las notas que coincidan con una consulta (incluidas sus etiquetas) como cadena JSON para copia de seguridad o transferencia.
query exportNotes($query: String!) {
exportNotes(query: $query)
}note
Obtener una nota por su ID.
query note($id: ID!) {
note(id: $id) { id title content deletedAt createdAt updatedAt }
}noteCount
Contar las notas que coincidan con una consulta.
query noteCount($query: String!) {
noteCount(query: $query)
}notes
Buscar notas (título + contenido). Dejar query vacío para listar todas las notas que no estén en la papelera.
query notes($query: String!, $offset: Int!, $limit: Int!) {
notes(query: $query, offset: $offset, limit: $limit) { id title content deletedAt createdAt updatedAt }
}