3.0.0 • Published 5 years ago

@datafire/vonage_vgis v3.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

@datafire/vonage_vgis

Client library for Vonage Integration Suite

Installation and Usage

npm install --save @datafire/vonage_vgis
let vonage_vgis = require('@datafire/vonage_vgis').create();

.then(data => {
  console.log(data);
});

Description

The Vonage Integration Suite API enables call control and webhooks for call events.

Your application must subscribe to the VonageIntegrationSuite API suite to use this API.

Actions

getUser

User info

vonage_vgis.getUser(null, context)

Input

This action has no parameters

Output

getAccount

Account info

vonage_vgis.getAccount(null, context)

Input

This action has no parameters

Output

listCalls

Lists currently active calls

vonage_vgis.listCalls({}, context)

Input

  • input object
    • fromDate integer: Return calls that occurred after this point in time
    • toDate integer: Return calls that occurred before this point in time
    • direction string (values: INBOUND, OUTBOUND): Filter by call direction. For multiple criteria, seperate values by a comma.
    • states string (values: INITIALIZING, RINGING, ACTIVE, HELD, REMOTE_HELD): Filter calls by state. For multiple criteria, seperate values by a comma.
    • offset integer: Page number of calls to return
    • size integer: Return this amount of calls in the response
    • order string (values: DESC, ASC): Sort in either ascending or descending order
    • sort string: Sort calls by property

Output

  • output array

createCall

Place a call

vonage_vgis.createCall({
  "body": {
    "phoneNumber": ""
  }
}, context)

Input

Output

  • output array

getCallsCount

Get calls count

vonage_vgis.getCallsCount({}, context)

Input

  • input object
    • fromDate integer: Return calls that occurred after this point in time
    • toDate integer: Return calls that occurred before this point in time
    • direction string (values: INBOUND, OUTBOUND): Filter by call direction. For multiple criteria, seperate values by a comma.
    • states string (values: INITIALIZING, RINGING, ACTIVE, HELD, REMOTE_HELD): Filter calls by state. For multiple criteria, seperate values by a comma.

Output

destroyCall

End a call

vonage_vgis.destroyCall({
  "id": ""
}, context)

Input

  • input object
    • id required string: Unique identifier of the call

Output

  • output array

getRoles

Get a call

vonage_vgis.getRoles({
  "id": ""
}, context)

Input

  • input object
    • id required string: Unique identifier of the call

Output

  • output array

callAnswer

Answer call (On supported devices)

vonage_vgis.callAnswer({
  "id": ""
}, context)

Input

  • input object
    • id required string: Unique identifier of the call

Output

callUnold

Unhold

vonage_vgis.callUnold({
  "id": ""
}, context)

Input

  • input object
    • id required string: Unique identifier of the call

Output

callHold

Put call on hold

vonage_vgis.callHold({
  "id": ""
}, context)

Input

  • input object
    • id required string: Unique identifier of the call

Output

callTransfer

Transfer call

vonage_vgis.callTransfer({
  "id": "",
  "body": {
    "phoneNumber": ""
  }
}, context)

Input

  • input object
    • id required string: Unique identifier of the call
    • body required CallTransfer

Output

callVMTransfer

Send call to voicemail

vonage_vgis.callVMTransfer({
  "id": ""
}, context)

Input

  • input object
    • id required string: Unique identifier of the call

Output

listEvents

List events

vonage_vgis.listEvents({}, context)

Input

  • input object
    • types string (values: CALL): Record type
    • fromDate integer: Return events that occurred after this point in time
    • toDate integer: Return events that occurred before this point in time
    • direction string (values: INBOUND, OUTBOUND): Filter by event direction
    • states string (values: INITIALIZING, RINGING, ACTIVE, HELD, REMOTE_HELD, DETACHED, REJECTED, CANCELLED, ANSWERED, MISSED): Filter events by state
    • offset integer: Page number of events to return
    • size integer: Return this amount of events in the response
    • order string (values: DESC, ASC): Sort in either ascending or descending order'
    • sort string: Sort events by property

Output

getEventsCount

Get events count

vonage_vgis.getEventsCount({}, context)

Input

  • input object
    • fromDate integer: Return events that occurred after this point in time
    • toDate integer: Return events that occurred before this point in time
    • direction string (values: INBOUND, OUTBOUND): Filter by event direction
    • states string (values: INITIALIZING, RINGING, ACTIVE, HELD, REMOTE_HELD): Filter events by state

Output

getEvent

Get event

vonage_vgis.getEvent({
  "id": ""
}, context)

Input

  • input object
    • id required string: Unique identifier of the event

Output

listWebhooks

List web hooks

vonage_vgis.listWebhooks(null, context)

Input

This action has no parameters

Output

createWebhook

Create a new webhook subscription

vonage_vgis.createWebhook({
  "body": {}
}, context)

Input

Output

destroyWebhook

Remove a web hook

vonage_vgis.destroyWebhook({
  "id": ""
}, context)

Input

  • input object
    • id required string: Unique identifier of the webhook

Output

Output schema unknown

viewWebhook

Get web hook details

vonage_vgis.viewWebhook({
  "id": ""
}, context)

Input

  • input object
    • id required string: Unique identifier of the webhook

Output

renewWebhook

Renews a web hook

vonage_vgis.renewWebhook({
  "id": ""
}, context)

Input

  • input object
    • id required string: Webhook ID

Output

Definitions

Account

  • Account object
    • id integer: Unique identifier of the account
    • name string: Name of the account
    • org string: Organization of the account
    • status string (values: PENDING, ACTIVE, DELETED, ARCHIVED): Status of the account
    • ucis array
      • items object
        • health object
          • message string
          • status string
        • id integer
        • type string
        • ucpAccountId string
        • ucpLabel string

Call

  • Call object
    • accountId required integer: Unique identifier of the account
    • answerTime string: Time to answer the call
    • callerId string: Remote caller ID
    • direction required string (values: INBOUND, OUTBOUND): Direction of the call
    • duration required integer: Duration of the call in milliseconds
    • endTime string: End time of the call
    • externalId string: External identifier of the call
    • id required integer: Unique identifier of the call
    • phoneNumber required string: Unique identifier of the account
    • startTime required string: Start time of the call
    • state required string (values: INITIALIZING, RINGING, ACTIVE, HELD, REMOTE_HELD, DETACHED, REJECTED, CANCELLED, ANSWERED, MISSED): Status of the call
    • type required string (values: CALL): Record type
    • uciId required integer: Unique identifier of communications provider
    • userId required integer: Unique identifier of the user

CallCreate

  • CallCreate object
    • phoneNumber required string: Phone number to call

CallTransfer

  • CallTransfer object
    • phoneNumber required string: Phone number to transfer to

Error

  • Error object
    • field string
    • message string

ErrorResponse

  • ErrorResponse object
    • errorCode string
    • errorMessage string
    • errors array

Event

  • Event object
    • accountId required integer: Unique identifier of the account
    • answerTime string: Time to answer the event
    • callerId string: Remote caller ID
    • direction required string (values: INBOUND, OUTBOUND): Direction of the event
    • duration integer: Duration of the call in milliseconds
    • endTime string: End time of the event
    • externalId string: External identifier of the event
    • id required integer: Unique identifier of the event
    • phoneNumber required string: Unique identifier of the account
    • smsData string
    • startTime required string: Start time of the event
    • state required string (values: INITIALIZING, RINGING, ACTIVE, HELD, REMOTE_HELD, DETACHED, REJECTED, CANCELLED, ANSWERED, MISSED): Status of the event
    • type required string (values: CALL): Record type
    • uciId required integer: Unique identifier of communications provider
    • userId required integer: Unique identifier of the user

EventsCount

  • EventsCount object
    • count integer: Number of events found

User

  • User object
    • accountId integer: Unique identifier of the user's account
    • acountLabel string: The name of the user's account
    • contactNumber string: Contact number of the user
    • emailAddress string: Email address of the user
    • firstName string: First name of the user
    • id integer: Unique identifier of the user
    • lastName string: Last name of the user
    • roles array
      • items object
        • code string: Code for the role
        • name string: Name for the role
    • status string (values: PENDING, ACTIVE, DELETED, ARCHIVED): Status of the user
    • ucis array
      • items object
        • health object
          • message string
          • status string
        • id integer
        • type string
        • ucpLabel string

Webhook

  • Webhook object
    • accountId string: Unique identifier of the account
    • createdAt string: Created time for the webhook
    • events array: Subscribed events for the webhook
      • items string (values: CALL)
    • expireAt string: Expiration time for the webhook
    • id string: Unique identifier for the webhook
    • metadataPolicy string (values: NONE, HEADER, BODY): Metadata policy for the webhook
    • purgeAt string: Scheduled purge time for the webhook
    • renewedAt string: Last renewed time for the webhook
    • signingAlgo string (values: HMAC_SHA256, NONE): Signing algorithm for the webhook
    • signingKey string: Signing key for the webhook
    • statistics object
      • failed boolean: Current delivery status
      • totalAttempts integer: Total delivery attempts
      • totalFailures integer: Total failed deliveries
      • totalSuccesses integer: Total successful deliveries
    • status string (values: ACTIVE, PAUSED): Status for the webhook
    • url string: Destination URL for events
    • userId string: Unique identifier of the user

WebhookCreate

  • WebhookCreate object
    • events array: Events to subscribe to the webhook
      • items string (values: CALL)
    • metadataPolicy string (values: NONE, HEADER, BODY): Metadata policy for the webhook
    • signingAlgo string (values: HMAC_SHA256): Signing algorithm for the webhook
    • signingKey string: Signing key for the webhook
    • url string: Destination URL for events