@vonage/server-sdk
Advanced tools
Comparing version 2.10.5 to 2.10.6-beta
# Changelog | ||
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). | ||
## 2.10.6 | ||
### Fixed | ||
### Added | ||
* #432 - Fix new issue with host override. | ||
* #299 - Added Channel type support | ||
@@ -100,19 +102,37 @@ ## 2.10.4 | ||
## 2.7.0-beta-1 | ||
- ADDED: Change host via the config object, using `apiHost` & `restHost` | ||
## 2.6.0 | ||
- ADDED: Change host via the config object, using `apiHost` & `restHost` | ||
* ADDED: Change host via the config object, using `apiHost` & `restHost` | ||
## 2.5.3 | ||
- FIXED: URI Encode Signed SMS Message | ||
* FIXED: URI Encode Signed SMS Message | ||
## 2.5.2 | ||
- ADDED: Pricing API support | ||
* ADDED: Pricing API support | ||
## 2.5.1 | ||
- ADDED: typings for Verify API | ||
- ADDED: Applications API V2 support | ||
* ADDED: typings for Verify API | ||
* ADDED: Applications API V2 support | ||
## 2.6.0-beta-1 | ||
- Added beta2 API version for `get()` methods in `nexmo.users`, `nexmo.users.getConversations`, `nexmo.conversations`, `nexmo.conversations.members` and `nexmo.conversations.events` | ||
- Added cursor pagination methods `next()` and `prev()` for `nexmo.users`, `nexmo.conversations`, `nexmo.conversations.members` and `nexmo.conversations.events` | ||
- Added v1 API version for `nexmo.conversations.record()` | ||
- Added the ability to change host for `nexmo.users`, `nexmo.conversations`, `nexmo.conversations.members` and `nexmo.conversations.events` | ||
- Updated `nexmo.users.getConversations` to accept a query parameter | ||
## 2.5.4-beta-1 | ||
- Fix `applications.get` to use request query instead of request body | ||
## 2.5.3-beta-3 | ||
- Fix application V2 parsing error responses | ||
## 2.5.2-beta-1 | ||
- Add Conversation Recording | ||
- Rename `nexmo.conversations.members.add` to `nexmo.conversations.members.create` with backwards compatibility | ||
- Add Member Update and Deletions | ||
- Add Event Creation, Retrieval and Deletion | ||
## 2.4.2 | ||
@@ -119,0 +139,0 @@ |
{ | ||
"name": "@vonage/server-sdk", | ||
"author": "vonage", | ||
"version": "2.10.5", | ||
"version": "2.10.6-beta", | ||
"main": "lib/Vonage", | ||
@@ -30,3 +30,4 @@ "types": "./typings/index.d.ts", | ||
"ecwyne", | ||
"https://github.com/backhand" | ||
"https://github.com/backhand", | ||
"alexlakatos" | ||
], | ||
@@ -44,3 +45,4 @@ "scripts": { | ||
"prepublish": "npm run compile", | ||
"pretest": "npm run lint" | ||
"pretest": "npm run lint", | ||
"test-e2e": "npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./e2e/*.spec.js" | ||
}, | ||
@@ -53,4 +55,4 @@ "devDependencies": { | ||
"@babel/register": "^7.10.5", | ||
"babel-plugin-add-module-exports": "^1.0.4", | ||
"babel-plugin-istanbul": "^6.0.0", | ||
"babel-plugin-add-module-exports": "^1.0.4", | ||
"bluebird": "^3.5.3", | ||
@@ -57,0 +59,0 @@ "body-parser": "^1.18.3", |
@@ -36,2 +36,5 @@ # Vonage Server SDK for Node.js | ||
* `apiKey` and `apiSecret` are required for SMS, Verify, Number Insights, Account management APIs | ||
* `applicationId` and `privateKey` are required for Voice / Stitch applications | ||
```js | ||
@@ -38,0 +41,0 @@ const Vonage = require('@vonage/server-sdk'); |
@@ -460,130 +460,221 @@ /* | ||
): void; | ||
} | ||
/* voice API */ | ||
export interface To{ | ||
type: string; | ||
number: string; | ||
dtmfAnswer?: string; | ||
} | ||
export interface From{ | ||
type: string; | ||
number: string; | ||
} | ||
} | ||
export interface CallsResponse { | ||
count: number; | ||
page_size: number; | ||
record_index: number; | ||
_links: CallDetailLinks; | ||
_embedded: CallDetailEmbedded; | ||
} | ||
export interface CallDetailLinks { | ||
self: CallDetailsSelf; | ||
} | ||
export interface CallDetailsSelf { | ||
href: string; | ||
} | ||
export interface CallDetailEmbedded { | ||
calls: CallDetailCall[]; | ||
} | ||
export interface CallDetailCall { | ||
_links: CallDetailLinks; | ||
uuid: string; | ||
conversation_uuid: string; | ||
to: To; | ||
from: From; | ||
status: string; | ||
direction: string; | ||
rate: string; | ||
price: string; | ||
duration: string; | ||
start_time: Date; | ||
end_time: Date; | ||
network: string; | ||
} | ||
/* voice API */ | ||
export interface To{ | ||
type: string; | ||
number: string; | ||
dtmfAnswer?: string; | ||
} | ||
export interface OutboundCallRequest{ | ||
answer_url?: string[]; | ||
ncco?: Ncco[]; | ||
status: string; | ||
to: To[]; | ||
from: From; | ||
event_url: string[]; | ||
machine_detection: string; | ||
} | ||
export interface Ncco { | ||
action: string; | ||
text: string; | ||
} | ||
export interface OutboundCallResponse{ | ||
uuid: string; | ||
status: string; | ||
direction: string; | ||
conversation_uuid: string; | ||
} | ||
export interface From{ | ||
type: string; | ||
number: string; | ||
} | ||
export interface CallDetailResponse { | ||
_links: CallDetailLinks; | ||
uuid: string; | ||
conversation_uuid: string; | ||
to: To; | ||
from: From; | ||
status: string; | ||
direction: string; | ||
rate: string; | ||
price: string; | ||
duration: string; | ||
start_time: Date; | ||
end_time: Date; | ||
network: string; | ||
} | ||
export interface CallsResponse { | ||
count: number; | ||
page_size: number; | ||
record_index: number; | ||
_links: CallDetailLinks; | ||
_embedded: CallDetailEmbedded; | ||
} | ||
export interface InProgressCallRequest { | ||
action: string; | ||
destination?: Destination; | ||
} | ||
export interface CallDetailLinks { | ||
self: CallDetailsSelf; | ||
} | ||
export interface Destination { | ||
type: string; | ||
ncco?: Ncco[]; | ||
url?: string[]; | ||
} | ||
export interface CallDetailsSelf { | ||
href: string; | ||
} | ||
export interface StreamAudioInCallRequest { | ||
stream_url: string[]; | ||
level?: string; | ||
} | ||
export interface ModifyInProgressCallResponse { | ||
message: string; | ||
uuid: string; | ||
} | ||
export interface CallDetailEmbedded { | ||
calls: CallDetailCall[]; | ||
} | ||
export interface TextToSpeechRequest { | ||
text: string; | ||
level?: string; | ||
} | ||
export interface DTMFRequest { | ||
digits: number; | ||
} | ||
export interface CallDetailCall { | ||
_links: CallDetailLinks; | ||
uuid: string; | ||
conversation_uuid: string; | ||
to: To; | ||
from: From; | ||
status: string; | ||
direction: string; | ||
rate: string; | ||
price: string; | ||
duration: string; | ||
start_time: Date; | ||
end_time: Date; | ||
network: string; | ||
} | ||
export class Voice { | ||
constructor(credentials: CredentialsObject, options: { [key: string]: any }); | ||
sendTTSMessage(recipient: To, message: TextToSpeechRequest, options: CredentialsObject, callback: (data: ModifyInProgressCallResponse) => void ): void; | ||
sendTTSPromptWithCapture(recipient: To, message: TextToSpeechRequest, maxDigits: Number, callback: (data: ModifyInProgressCallResponse) => void ): void; | ||
sendTTSPromptWithConfirm(recipient: To, message: TextToSpeechRequest, maxDigits: Number, pinCode: string, byeText: string, failedText: string, callback: (data: ModifyInProgressCallResponse) => void ): void; | ||
call(recipient: To, answerUrl: string, opts: OutboundCallRequest, callback: (data: OutboundCallResponse) => void): void; | ||
__proto__: any; | ||
[key: string]: any; | ||
} | ||
export interface OutboundCallRequest{ | ||
answer_url?: string[]; | ||
ncco?: Ncco[]; | ||
status: string; | ||
to: To[]; | ||
from: From; | ||
event_url: string[]; | ||
machine_detection: string; | ||
} | ||
export interface Ncco { | ||
action: string; | ||
text: string; | ||
} | ||
export interface OutboundCallResponse{ | ||
uuid: string; | ||
status: string; | ||
direction: string; | ||
conversation_uuid: string; | ||
} | ||
export interface CallDetailResponse { | ||
_links: CallDetailLinks; | ||
uuid: string; | ||
conversation_uuid: string; | ||
to: To; | ||
from: From; | ||
status: string; | ||
direction: string; | ||
rate: string; | ||
price: string; | ||
duration: string; | ||
start_time: Date; | ||
end_time: Date; | ||
network: string; | ||
} | ||
export interface InProgressCallRequest { | ||
action: string; | ||
destination?: Destination; | ||
} | ||
export interface Destination { | ||
type: string; | ||
ncco?: Ncco[]; | ||
url?: string[]; | ||
} | ||
export interface StreamAudioInCallRequest { | ||
stream_url: string[]; | ||
level?: string; | ||
} | ||
export interface ModifyInProgressCallResponse { | ||
message: string; | ||
uuid: string; | ||
} | ||
export interface TextToSpeechRequest { | ||
text: string; | ||
level?: string; | ||
} | ||
export interface DTMFRequest { | ||
digits: number; | ||
} | ||
export class Voice { | ||
constructor(credentials: CredentialsObject, options: { [key: string]: any }); | ||
sendTTSMessage(recipient: To, message: TextToSpeechRequest, options: CredentialsObject, callback: (data: ModifyInProgressCallResponse) => void ): void; | ||
sendTTSPromptWithCapture(recipient: To, message: TextToSpeechRequest, maxDigits: Number, callback: (data: ModifyInProgressCallResponse) => void ): void; | ||
sendTTSPromptWithConfirm(recipient: To, message: TextToSpeechRequest, maxDigits: Number, pinCode: string, byeText: string, failedText: string, callback: (data: ModifyInProgressCallResponse) => void ): void; | ||
call(recipient: To, answerUrl: string, opts: OutboundCallRequest, callback: (data: OutboundCallResponse) => void): void; | ||
} | ||
type ChannelType = 'sms' | 'viber_service_msg' | 'messenger' | 'whatsapp' | 'mms'; | ||
type ChannelMessageType = 'text' | 'image' | 'audio' | 'video' | 'file' | 'template' | 'custom'; | ||
interface ChannelToFrom { | ||
// The type of message that you want to send. | ||
type: ChannelType; | ||
id?: string; | ||
/** | ||
* The phone number of the message recipient in the E.164 format. Don't use a leading + or 00 when entering a phone number, start with the country code, for example, 447700900000. | ||
*/ | ||
number: string; | ||
} | ||
interface ChannelContentImage { | ||
url: string; | ||
caption: string; | ||
} | ||
interface ChannelContentAudio { | ||
url: string; | ||
} | ||
interface ChannelContentVideo { | ||
url: string; | ||
} | ||
interface ChannelContentFile { | ||
url: string; | ||
caption: string; | ||
} | ||
interface ChannelContentTemplate { | ||
name: string; | ||
parameters: object[]; | ||
} | ||
interface ChannelContent { | ||
type: ChannelMessageType; | ||
text: string; | ||
image?: ChannelContentImage; | ||
audio?: ChannelContentAudio; | ||
video?: ChannelContentVideo; | ||
file?: ChannelContentFile; | ||
template?: ChannelContentTemplate; | ||
} | ||
interface ChannelViberServiceMsg { | ||
category?: 'transaction' | 'promotion'; | ||
ttl?: number; | ||
type?: string; | ||
} | ||
interface ChannelMessenger { | ||
category?: 'response' | 'update' | 'message_tag'; | ||
tag?: string; | ||
} | ||
interface ChannelWhatsApp { | ||
policy?: 'fallback' | 'deterministic'; | ||
locale?: string; | ||
} | ||
interface ChannelMessage { | ||
content: ChannelContent; | ||
viber_service_msg?: ChannelViberServiceMsg; | ||
channel?: ChannelMessenger; | ||
whatsapp?: ChannelWhatsApp; | ||
client_ref?: string; | ||
} | ||
export interface MessageSendResponse { | ||
message_uuid: string; | ||
} | ||
export interface MessageSendError { | ||
type: string; | ||
title: string; | ||
detail: string; | ||
instance: string; | ||
} | ||
export class Channel { | ||
constructor(credentials: CredentialsObject, options: { [key: string]: any }); | ||
static readonly PATH: string; | ||
send( | ||
to: ChannelToFrom, | ||
from: ChannelToFrom, | ||
message: ChannelMessage, | ||
callback: (err: MessageSendError, data: MessageSendResponse) => void | ||
); | ||
} | ||
/* Vonage */ | ||
@@ -596,5 +687,6 @@ export default class Vonage { | ||
public readonly number: Number; | ||
public readonly numberInsight: NumberInsight; | ||
public readonly voice: Voice; | ||
public readonly numberInsight: NumberInsight; | ||
public readonly voice: Voice; | ||
public readonly channel: Channel; | ||
} | ||
} |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
152
1
509011
50
4202
1