3.0.0 • Published 5 years ago
@datafire/vonage_vgis v3.0.0
@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
- output User
getAccount
Account info
vonage_vgis.getAccount(null, context)
Input
This action has no parameters
Output
- output Account
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
- fromDate
Output
- output
array
- items Call
createCall
Place a call
vonage_vgis.createCall({
"body": {
"phoneNumber": ""
}
}, context)
Input
- input
object
- body required CallCreate
Output
- output
array
- items Call
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.
- fromDate
Output
- output EventsCount
destroyCall
End a call
vonage_vgis.destroyCall({
"id": ""
}, context)
Input
- input
object
- id required
string
: Unique identifier of the call
- id required
Output
- output
array
- items Call
getRoles
Get a call
vonage_vgis.getRoles({
"id": ""
}, context)
Input
- input
object
- id required
string
: Unique identifier of the call
- id required
Output
- output
array
- items Call
callAnswer
Answer call (On supported devices)
vonage_vgis.callAnswer({
"id": ""
}, context)
Input
- input
object
- id required
string
: Unique identifier of the call
- id required
Output
- output Call
callUnold
Unhold
vonage_vgis.callUnold({
"id": ""
}, context)
Input
- input
object
- id required
string
: Unique identifier of the call
- id required
Output
- output Call
callHold
Put call on hold
vonage_vgis.callHold({
"id": ""
}, context)
Input
- input
object
- id required
string
: Unique identifier of the call
- id required
Output
- output Call
callTransfer
Transfer call
vonage_vgis.callTransfer({
"id": "",
"body": {
"phoneNumber": ""
}
}, context)
Input
- input
object
- id required
string
: Unique identifier of the call - body required CallTransfer
- id required
Output
- output Call
callVMTransfer
Send call to voicemail
vonage_vgis.callVMTransfer({
"id": ""
}, context)
Input
- input
object
- id required
string
: Unique identifier of the call
- id required
Output
- output Call
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
- types
Output
- output
array
- items Event
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
- fromDate
Output
- output EventsCount
getEvent
Get event
vonage_vgis.getEvent({
"id": ""
}, context)
Input
- input
object
- id required
string
: Unique identifier of the event
- id required
Output
- output
array
- items Event
listWebhooks
List web hooks
vonage_vgis.listWebhooks(null, context)
Input
This action has no parameters
Output
- output
array
- items Webhook
createWebhook
Create a new webhook subscription
vonage_vgis.createWebhook({
"body": {}
}, context)
Input
- input
object
- body required WebhookCreate
Output
- output Webhook
destroyWebhook
Remove a web hook
vonage_vgis.destroyWebhook({
"id": ""
}, context)
Input
- input
object
- id required
string
: Unique identifier of the webhook
- id required
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
- id required
Output
- output Webhook
renewWebhook
Renews a web hook
vonage_vgis.renewWebhook({
"id": ""
}, context)
Input
- input
object
- id required
string
: Webhook ID
- id required
Output
- output Webhook
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
- message
- id
integer
- type
string
- ucpAccountId
string
- ucpLabel
string
- health
- items
- id
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
- accountId required
CallCreate
- CallCreate
object
- phoneNumber required
string
: Phone number to call
- phoneNumber required
CallTransfer
- CallTransfer
object
- phoneNumber required
string
: Phone number to transfer to
- phoneNumber required
Error
- Error
object
- field
string
- message
string
- field
ErrorResponse
- ErrorResponse
object
- errorCode
string
- errorMessage
string
- errors
array
- items Error
- errorCode
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
- accountId required
EventsCount
- EventsCount
object
- count
integer
: Number of events found
- count
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
- code
- items
- status
string
(values: PENDING, ACTIVE, DELETED, ARCHIVED): Status of the user - ucis
array
- items
object
- health
object
- message
string
- status
string
- message
- id
integer
- type
string
- ucpLabel
string
- health
- items
- accountId
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)
- items
- 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
- failed
- status
string
(values: ACTIVE, PAUSED): Status for the webhook - url
string
: Destination URL for events - userId
string
: Unique identifier of the user
- accountId
WebhookCreate
- WebhookCreate
object
- events
array
: Events to subscribe to the webhook- items
string
(values: CALL)
- items
- 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
- events
3.0.0
5 years ago