Referencia de la API

Llamadas

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

graphql
type Mutation {
  call(number: String!, showDialer: Boolean!): Boolean!
  deleteCalls(query: String!): ActionResult!
}

type Query {
  callCount(query: String!): Int!
  calls(query: String!, offset: Int!, limit: Int!): [Call!]!
}

type ActionResult {
	affectedCount: Int!
}

type Call {
	typeCode: Int!
	id: ID!
	number: String!
	name: String!
	photo: String!
	startedAt: Instant!
	durationSec: Int!
	type: CallType!
	accountId: ID!
	geo: PhoneGeo
	tags: [Tag!]!
}

enum CallType {
	INCOMING
	OUTGOING
	MISSED
	VOICEMAIL
	REJECTED
	BLOCKED
	ANSWERED_EXTERNALLY
	UNKNOWN
}

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

scalar Instant

type PhoneGeo {
	country: String!
	numberType: PhoneNumberType!
	carrier: String!
	description: String!
}

enum PhoneNumberType {
	FIXED_LINE
	MOBILE
	FIXED_LINE_OR_MOBILE
	TOLL_FREE
	PREMIUM_RATE
	SHARED_COST
	PERSONAL_NUMBER
	VOIP
	PAGER
	UAN
	VOICEMAIL
}

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

Operaciones

mutation

call

Iniciar una llamada al número indicado. Establecer showDialer en true para abrir el marcador de la aplicación de teléfono en lugar de llamar inmediatamente. Requiere el permiso CALL_PHONE.

graphql
# `showDialer` hands the number to the dialer instead of placing the
# call outright.
mutation call($number: String!, $showDialer: Boolean!) {
  call(number: $number, showDialer: $showDialer)
}
mutation

deleteCalls

Eliminar las entradas del registro de llamadas que coincidan con una consulta.

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

callCount

Contar las llamadas que coincidan con una consulta.

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

calls

Buscar entradas del registro de llamadas. Dejar query vacío para listar todas.

graphql
query calls($query: String!, $offset: Int!, $limit: Int!) {
  calls(query: $query, offset: $offset, limit: $limit) { typeCode id number name photo startedAt durationSec type }
}