Referência do schema
Todos os tipos, campos e argumentos da API de leitura da Notrus, gerados a partir do schema em produção.
Query
conversationIdString!— Seu id de conversa nativo da plataforma.afterString— Cursor opaco do `pageInfo.endCursor` de uma página anterior.filterConversationFilter— Filtro booleano opcional sobre os tag-links das threads (retorna apenas as threads correspondentes), mais uma janela opcional e inclusiva de startDate/endDate sobre quando a conversa começou (nunca restringe as threads retornadas).firstInt— Tamanho da página (limitado pelo servidor).orderByConversationSortDirection— Direção de ordenação por quando cada conversa começou. Padrão ASC (mais antigas primeiro) — o comportamento histórico, inalterado a menos que você opte por DESC. Repita o mesmo valor em todas as páginas de uma mesma execução de paginação; cursores de `after` só são válidos combinados com a direção sob a qual foram emitidos.filterConversationCountFilter— Bool (must/should/mustNot) filter over thread tag-links, plus an optional inclusive startDate/endDate window over when the conversation started.
categoriesActive categories in the authenticated organization's classification catalog.
conversationUma única conversa pelo seu id de conversa nativo da plataforma; nulo se não encontrada.
conversationsLista paginada de conversas da organização autenticada, das mais antigas para as mais recentes por padrão (veja `orderBy`).
conversationsCountTotal conversations matching the filter, without paginating — prefer this over walking every page of `conversations` just to count. Computing the total still requires scanning every matching conversation once (no way around that for an exact count), but skips hydrating and returning their threads/messages. Also returns a per-day breakdown within the date window, a per-category breakdown (thread-level), and, when `filter.should` has more than one clause, each clause's own contribution.
CaseResolution
How a closed case ended.
NAO_RESOLVIDO— The customer request was not solved.RESOLVIDO— The customer request was solved.
CaseStatus
Status of an imported case.
ABERTO— Waiting for an agent in the queue.AGENDADO— Follow-up scheduled.ATENDIMENTO_HUMANO— With a human agent.ENCERRADO— Closed. Requires `resolution`.NOTRUS_ATENDIMENTO— Handled by the Notrus AI.
Category
A category from your classification catalog.
definitionDescription of when this category applies.
identifierStable machine identifier of the category.
nameHuman-readable name of the category.
subcategorySubcategory grouping, when defined.
ClassifiedCategory
A categoria em que uma thread foi classificada, do seu catálogo de categorias.
identifierIdentificador estável (de máquina) da categoria.
nameNome legível da categoria.
subcategoryAgrupamento de subcategoria, quando definido.
Conversation
Uma conversa — as threads que compartilham um mesmo id de conversa nativo da plataforma.
conversationIdSeu id de conversa nativo da plataforma, exatamente como enviado à Notrus.
threadsAs threads que pertencem a esta conversa, das mais antigas para as mais recentes.
ConversationConnection
Uma página de conversas no estilo Relay.
edgespageInfoConversationCount
Total conversations matching the filter, plus optional breakdowns.
byCategorybyDaybyTagtotalConversationCountByCategory
How many matching threads (not deduplicated by conversation — a conversation touching more than one category is counted in each) were classified into this category.
countidentifiernamesubcategoryConversationCountByDay
How many matching conversations started on this UTC calendar day.
countdateThe UTC calendar day, at midnight UTC.
ConversationCountByTag
How many matching conversations individually satisfy this `should` clause, on top of the shared must/mustNot/date bounds — only populated when `should` has more than one clause.
countreferencevalueConversationSortDirection
Direção de ordenação de `conversations`, por quando cada conversa começou.
ASC— Oldest conversations first (the default).DESC— Most recent conversations first.
ConversationTypeEdge
cursorCursor opaco que identifica esta aresta para paginação.
nodeO item nesta aresta.
DateTime
Uma data-hora em UTC, como 2019-12-03T09:54:33Z, em conformidade com o formato date-time.
DeletedCase
A case removed by a deletion.
codeReadable case code, e.g. CS-0042. It is never reused.
idNotrus case id.
DeletedCustomer
A customer removed by a deletion.
idNotrus customer id.
DeleteImportedCaseResult
What a case deletion removed.
caseNull when `NOT_FOUND`.
outcomeOverall result of the deletion.
threadsThreads deleted.
tracesMessages deleted.
DeleteImportedCustomerResult
What a customer deletion removed.
casesEvery case of the customer that was deleted.
customerNull when `NOT_FOUND`.
outcomeOverall result of the deletion.
threadsThreads deleted.
tracesMessages deleted.
DeleteOutcome
What a deletion did.
DELETED— The data was deleted.NOT_FOUND— Nothing to delete: it does not exist or was already deleted.
Document
Um documento armazenado no armazenamento de objetos.
bucketNameBucket em que o documento está armazenado.
fileNameNome do objeto dentro do bucket.
filePathCaminho do objeto dentro do bucket.
mimeTypeContent type com que o documento foi armazenado.
originalNameO nome de arquivo com que você o enviou.
ImportCaseResult
What an import stored.
caseconversationsThe conversations, in the order you sent them.
customeroutcomeOverall result of the import.
warningsCodes of the problems that did not stop the import. See the case import guide.
ImportChange
What an import did to a record.
CREATED— Something new was created.UNCHANGED— Everything sent was already stored.UPDATED— It already existed and changed.
ImportedCase
The case written by an import.
codeReadable case code generated by Notrus, e.g. CS-0042.
idNotrus case id.
outcomeWhat the import did to the case.
ImportedConversation
A conversation written by an import.
conversationIdThe conversation key you sent.
threadsIts threads, in the order you sent them.
ImportedCustomer
The customer the case was linked to.
idNotrus customer id.
outcomeWhether the customer is new.
ImportedMessageCounts
Messages of a thread in an import.
duplicatedMessages that were already stored.
insertedNew messages stored.
missingFromPayloadMessages stored earlier that were not in this request. They stay stored.
ImportedRecordOutcome
Whether an imported record is new or already existed.
CREATED— Created by this import.REUSED— Already existed.
ImportedTagCounts
Tags of a thread in an import.
linkedTag values linked to the thread.
replacedPrevious values of the same tag that were replaced.
tagsCreatedTags created in the organization catalog.
valuesCreatedTag values created in the organization catalog.
ImportedThread
A thread written by an import.
activeWhether this is the most recent thread of its conversation.
idNotrus thread id.
outcomeWhether the thread is new.
tagstracesJSONObject
A JSON object, e.g. { "plan": "gold", "customerSince": 2019 }.
Mutation
inputDeleteImportedCaseInput!inputDeleteImportedCustomerInput!inputImportCaseInput!fileUpload!— O arquivo a armazenar.folderString— Subpasta opcional em que gravar o documento, dentro da pasta de documentos da sua organização — ex.: `chats` grava em `<organizationId>/documents/chats/`. Um único segmento de caminho com letras minúsculas, dígitos, hífen e underscore. Omita para gravar direto em `<organizationId>/documents/`.
deleteImportedCaseDelete an imported case with its threads and messages. The customer is kept. Deleting a case that no longer exists returns NOT_FOUND.
deleteImportedCustomerDelete a customer and every imported case of that customer, with their threads and messages. Refused when the customer also has data that was not imported.
importCaseImport a case handled in your system, with its conversations, threads and messages. Sending the same case again never duplicates data.
uploadDocumentEnvia um documento. Mande como requisição multipart do GraphQL; o nome do arquivo e o content type são lidos da parte do arquivo.
PageInfo
Metadados de paginação no estilo Relay para uma página de conexão.
endCursorCursor opaco para passar como `after` na próxima página; nulo em uma página vazia.
hasNextPageVerdadeiro se houver mais itens após esta página.
TagLink
Um valor de tag de classificação vinculado a uma thread, com o momento em que foi aplicado.
labelRótulo legível para o valor, quando definido.
linkedAtQuando este valor foi vinculado à thread (ISO-8601, UTC).
referenceThe tag reference this value belongs to (e.g. "classifier_state", "chat_state", "classified_category", or an org catalog reference).
valueO valor da tag (forma de máquina).
Thread
Uma thread dentro de uma conversa, projetada para o seu estado de classificação.
chatStateValores de chat-state aplicados à thread, dos mais antigos para os mais recentes.
classifiedCategoryA categoria em que a thread foi classificada; nulo quando não categorizada.
classifierStateValores de classifier-state aplicados à thread, dos mais antigos para os mais recentes.
summaryResumo justificativo da Notrus para a thread, quando produzido.
tagsEvery tag link on the thread — system references (classifierState/chatState above) and your organization's catalog references alike (e.g. classified_category, l1, brand). Full link history, oldest first.
threadIdIdentificador interno de thread da Notrus (opaco, estável).
tracesThe thread's messages, most recent first.
Trace
One message within a thread, with the role that produced it.
agentNameThe specialist agent that wrote this message, when one did. Null for the client, for the AI and for system notices — `ownerId` says which channel the message left by, this says who wrote it.
createdAtWhen this message was recorded (ISO-8601, UTC).
isDammedWhether this message was flagged/blocked by Notrus at the time.
messageThe message text.
ownerIdWho this message is attributed to (e.g. "client", "system").
rawRoleThe role exactly as stored — the same as `role` in lower case, or the free text a case import sent.
roleWho produced this message.
TraceRole
Who produced a message within a thread.
AI— Sent by Notrus.HUMAN— Sent by a human agent.OTHER— Any other author, as sent by a case import. See `rawRole`.USER— Sent by the customer.
Upload
O escalar `Upload` representa o envio de um arquivo.