Notas
Verificar app.capabilities para o suporte de funcionalidades e app.access juntamente com as permissões do anfitrião para autorização. Os exemplos usam valores sintéticos; substituir caminhos, ID, entradas e filtros antes da chamada.
Definições de Tipo
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!
}Operações
createNote
Criar e guardar uma nota a partir dos dados fornecidos.
mutation createNote($input: NoteInput!) {
createNote(input: $input) { id title content deletedAt createdAt updatedAt }
}deleteNotes
Eliminar permanentemente as notas no lixo que correspondam a uma consulta. Só atua sobre notas já no lixo.
mutation deleteNotes($query: String!) {
deleteNotes(query: $query) { affectedCount }
}restoreNotes
Restaurar as notas no lixo que correspondam a uma consulta.
mutation restoreNotes($query: String!) {
restoreNotes(query: $query) { affectedCount }
}saveFeedEntriesToNotes
Guardar como notas as entradas de feeds correspondentes e devolver os ID das notas criadas.
mutation saveFeedEntriesToNotes($query: String!) {
saveFeedEntriesToNotes(query: $query)
}trashNotes
Mover para o lixo as notas que correspondam a uma consulta.
mutation trashNotes($query: String!) {
trashNotes(query: $query) { affectedCount }
}updateNote
Atualizar uma nota guardada a partir dos dados fornecidos.
mutation updateNote($id: ID!, $input: NoteInput!) {
updateNote(id: $id, input: $input) { id title content deletedAt createdAt updatedAt }
}exportNotes
Serializar as notas que correspondam a uma consulta (incluindo etiquetas) como cadeia JSON para cópia de segurança ou transferência.
query exportNotes($query: String!) {
exportNotes(query: $query)
}note
Obter uma nota pelo ID.
query note($id: ID!) {
note(id: $id) { id title content deletedAt createdAt updatedAt }
}noteCount
Contar as notas que correspondam a uma consulta.
query noteCount($query: String!) {
noteCount(query: $query)
}notes
Pesquisar notas (título + conteúdo). Deixar query vazio para listar todas as notas que não estejam no lixo.
query notes($query: String!, $offset: Int!, $limit: Int!) {
notes(query: $query, offset: $offset, limit: $limit) { id title content deletedAt createdAt updatedAt }
}