Skip to content

Commit

Permalink
[Librarian] Regenerated @ 0d359fdcea150a7f3ec36771ffeb0bd2bf34ea1d
Browse files Browse the repository at this point in the history
  • Loading branch information
twilio-ci committed Feb 5, 2020
1 parent 412b484 commit 2d7f7fa
Show file tree
Hide file tree
Showing 17 changed files with 138 additions and 28 deletions.
22 changes: 22 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
twilio-node changelog
=====================

[2020-02-05] Version 3.39.4
---------------------------
**Api**
- Making content retention and address retention public
- Update `status` enum for Messages to include 'partially_delivered'

**Authy**
- Added support for push factors

**Autopilot**
- Add one new property in Query i.e dialogue_sid

**Verify**
- Add `SendCodeAttempts` to create verification response.

**Video**
- Clarification in composition creation documentation: one source is mandatory, either `audio_sources` or `video_layout`, but on of them has to be provided

**Twiml**
- Add Polly Neural voices.


[2020-01-22] Version 3.39.3
---------------------------
**Library - Docs**
Expand Down
6 changes: 5 additions & 1 deletion lib/rest/api/v2010/account/message.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type MessageContentRetention = 'retain';

type MessageDirection = 'inbound'|'outbound-api'|'outbound-call'|'outbound-reply';

type MessageStatus = 'queued'|'sending'|'sent'|'failed'|'delivered'|'undelivered'|'receiving'|'received'|'accepted'|'scheduled'|'read';
type MessageStatus = 'queued'|'sending'|'sent'|'failed'|'delivered'|'undelivered'|'receiving'|'received'|'accepted'|'scheduled'|'read'|'partially_delivered';

type MessageTrafficType = 'free';

Expand Down Expand Up @@ -119,8 +119,10 @@ interface MessageListInstance {
/**
* Options to pass to create
*
* @property addressRetention - Determines if the address can be stored or obfuscated based on privacy settings
* @property applicationSid - The application to use for callbacks
* @property body - The text of the message you want to send. Can be up to 1,600 characters in length.
* @property contentRetention - Determines if the message content can be stored or redacted based on privacy settings
* @property forceDelivery - Reserved
* @property from - The phone number that initiated the message
* @property maxPrice - The total maximum price up to 4 decimal places in US dollars acceptable for the message to be delivered.
Expand All @@ -134,8 +136,10 @@ interface MessageListInstance {
* @property validityPeriod - The number of seconds that the message can remain in our outgoing queue.
*/
interface MessageListInstanceCreateOptions {
addressRetention?: MessageAddressRetention;
applicationSid?: string;
body?: string;
contentRetention?: MessageContentRetention;
forceDelivery?: boolean;
from?: string;
maxPrice?: number;
Expand Down
6 changes: 6 additions & 0 deletions lib/rest/api/v2010/account/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ MessageList = function MessageList(version, accountSid) {
* @param {number} [opts.validityPeriod] -
* The number of seconds that the message can remain in our outgoing queue.
* @param {boolean} [opts.forceDelivery] - Reserved
* @param {message.content_retention} [opts.contentRetention] -
* Determines if the message content can be stored or redacted based on privacy settings
* @param {message.address_retention} [opts.addressRetention] -
* Determines if the address can be stored or obfuscated based on privacy settings
* @param {boolean} [opts.smartEncoded] -
* Whether to detect Unicode characters that have a similar GSM-7 character and replace them
* @param {string|list} [opts.persistentAction] -
Expand Down Expand Up @@ -110,6 +114,8 @@ MessageList = function MessageList(version, accountSid) {
'ProvideFeedback': serialize.bool(_.get(opts, 'provideFeedback')),
'ValidityPeriod': _.get(opts, 'validityPeriod'),
'ForceDelivery': serialize.bool(_.get(opts, 'forceDelivery')),
'ContentRetention': _.get(opts, 'contentRetention'),
'AddressRetention': _.get(opts, 'addressRetention'),
'SmartEncoded': serialize.bool(_.get(opts, 'smartEncoded')),
'PersistentAction': serialize.map(_.get(opts, 'persistentAction'), function(e) { return e; })
});
Expand Down
4 changes: 2 additions & 2 deletions lib/rest/authy/v1/service/entity/factor.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type FactorFactorStatuses = 'unverified'|'verified';

type FactorFactorStrengths = 'unknown'|'very_low'|'low'|'medium'|'high'|'very_high';

type FactorFactorTypes = 'app-push'|'sms'|'totp';
type FactorFactorTypes = 'app-push'|'sms'|'totp'|'push';

/**
* Initialize the FactorList
Expand Down Expand Up @@ -137,7 +137,7 @@ interface FactorListInstance {
/**
* Options to pass to create
*
* @property binding - A unique binding for this Factor
* @property binding - A unique binding for this Factor as a json string
* @property factorType - The Type of this Factor
* @property friendlyName - The friendly name of this Factor
* @property twilioAuthySandboxMode - The Twilio-Authy-Sandbox-Mode HTTP request header
Expand Down
2 changes: 1 addition & 1 deletion lib/rest/authy/v1/service/entity/factor.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ FactorList = function FactorList(version, serviceSid, identity) {
* @memberof Twilio.Authy.V1.ServiceContext.EntityContext.FactorList#
*
* @param {object} opts - Options for request
* @param {string} opts.binding - A unique binding for this Factor
* @param {string} opts.binding - A unique binding for this Factor as a json string
* @param {string} opts.friendlyName - The friendly name of this Factor
* @param {factor.factor_types} opts.factorType - The Type of this Factor
* @param {string} [opts.twilioAuthySandboxMode] -
Expand Down
2 changes: 2 additions & 0 deletions lib/rest/autopilot/v1/assistant/query.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ interface QueryResource {
assistant_sid: string;
date_created: Date;
date_updated: Date;
dialogue_sid: string;
language: string;
model_build_sid: string;
query: string;
Expand Down Expand Up @@ -281,6 +282,7 @@ declare class QueryInstance extends SerializableClass {
assistantSid: string;
dateCreated: Date;
dateUpdated: Date;
dialogueSid: string;
/**
* fetch a QueryInstance
*
Expand Down
3 changes: 3 additions & 0 deletions lib/rest/autopilot/v1/assistant/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,8 @@ QueryPage.prototype[util.inspect.custom] = function inspect(depth, options) {
* @property {string} url - The absolute URL of the Query resource
* @property {string} sourceChannel -
* The communication channel from where the end-user input came
* @property {string} dialogueSid -
* The SID of the [Dialogue](https://www.twilio.com/docs/autopilot/api/dialogue).
*
* @param {V1} version - Version of the resource
* @param {QueryPayload} payload - The instance payload
Expand All @@ -540,6 +542,7 @@ QueryInstance = function QueryInstance(version, payload, assistantSid, sid) {
this.status = payload.status; // jshint ignore:line
this.url = payload.url; // jshint ignore:line
this.sourceChannel = payload.source_channel; // jshint ignore:line
this.dialogueSid = payload.dialogue_sid; // jshint ignore:line

// Context
this._context = undefined;
Expand Down
12 changes: 6 additions & 6 deletions lib/rest/monitor/v1/alert.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ interface AlertListInstance {
* Function to process each record. If this and a positional
* callback are passed, this one will be used
* @property done - Function to be called upon completion of streaming
* @property endDate - Only include alerts that occurred on or before this date
* @property endDate - Only include alerts that occurred on or before this date and time
* @property limit -
* Upper limit for the number of records to return.
* each() guarantees never to return more than limit.
Expand All @@ -104,7 +104,7 @@ interface AlertListInstance {
* If no pageSize is defined but a limit is defined,
* each() will attempt to read the limit with the most efficient
* page size, i.e. min(limit, 1000)
* @property startDate - Only include alerts that occurred on or after this date
* @property startDate - Only include alerts that occurred on or after this date and time
*/
interface AlertListInstanceEachOptions {
callback?: (item: AlertInstance, done: (err?: Error) => void) => void;
Expand All @@ -119,7 +119,7 @@ interface AlertListInstanceEachOptions {
/**
* Options to pass to list
*
* @property endDate - Only include alerts that occurred on or before this date
* @property endDate - Only include alerts that occurred on or before this date and time
* @property limit -
* Upper limit for the number of records to return.
* list() guarantees never to return more than limit.
Expand All @@ -131,7 +131,7 @@ interface AlertListInstanceEachOptions {
* If no page_size is defined but a limit is defined,
* list() will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
* @property startDate - Only include alerts that occurred on or after this date
* @property startDate - Only include alerts that occurred on or after this date and time
*/
interface AlertListInstanceOptions {
endDate?: Date;
Expand All @@ -144,12 +144,12 @@ interface AlertListInstanceOptions {
/**
* Options to pass to page
*
* @property endDate - Only include alerts that occurred on or before this date
* @property endDate - Only include alerts that occurred on or before this date and time
* @property logLevel - Only show alerts for this log-level
* @property pageNumber - Page Number, this value is simply for client state
* @property pageSize - Number of records to return, defaults to 50
* @property pageToken - PageToken provided by the API
* @property startDate - Only include alerts that occurred on or after this date
* @property startDate - Only include alerts that occurred on or after this date and time
*/
interface AlertListInstancePageOptions {
endDate?: Date;
Expand Down
12 changes: 6 additions & 6 deletions lib/rest/monitor/v1/alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ AlertList = function AlertList(version) {
* @param {object} [opts] - Options for request
* @param {string} [opts.logLevel] - Only show alerts for this log-level
* @param {Date} [opts.startDate] -
* Only include alerts that occurred on or after this date
* Only include alerts that occurred on or after this date and time
* @param {Date} [opts.endDate] -
* Only include alerts that occurred on or before this date
* Only include alerts that occurred on or before this date and time
* @param {number} [opts.limit] -
* Upper limit for the number of records to return.
* each() guarantees never to return more than limit.
Expand Down Expand Up @@ -164,9 +164,9 @@ AlertList = function AlertList(version) {
* @param {object} [opts] - Options for request
* @param {string} [opts.logLevel] - Only show alerts for this log-level
* @param {Date} [opts.startDate] -
* Only include alerts that occurred on or after this date
* Only include alerts that occurred on or after this date and time
* @param {Date} [opts.endDate] -
* Only include alerts that occurred on or before this date
* Only include alerts that occurred on or before this date and time
* @param {number} [opts.limit] -
* Upper limit for the number of records to return.
* list() guarantees never to return more than limit.
Expand Down Expand Up @@ -229,9 +229,9 @@ AlertList = function AlertList(version) {
* @param {object} [opts] - Options for request
* @param {string} [opts.logLevel] - Only show alerts for this log-level
* @param {Date} [opts.startDate] -
* Only include alerts that occurred on or after this date
* Only include alerts that occurred on or after this date and time
* @param {Date} [opts.endDate] -
* Only include alerts that occurred on or before this date
* Only include alerts that occurred on or before this date and time
* @param {string} [opts.pageToken] - PageToken provided by the API
* @param {number} [opts.pageNumber] -
* Page Number, this value is simply for client state
Expand Down
2 changes: 2 additions & 0 deletions lib/rest/verify/v2/service/verification.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ interface VerificationResource {
date_updated: Date;
lookup: object;
payee: string;
send_code_attempts: object;
service_sid: string;
sid: string;
status: string;
Expand Down Expand Up @@ -164,6 +165,7 @@ declare class VerificationInstance extends SerializableClass {
fetch(callback?: (error: Error | null, items: VerificationInstance) => any): Promise<VerificationInstance>;
lookup: object;
payee: string;
sendCodeAttempts: object;
serviceSid: string;
sid: string;
status: string;
Expand Down
2 changes: 2 additions & 0 deletions lib/rest/verify/v2/service/verification.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ VerificationPage.prototype[util.inspect.custom] = function inspect(depth,
* The amount of the associated PSD2 compliant transaction.
* @property {string} payee -
* The payee of the associated PSD2 compliant transaction
* @property {object} sendCodeAttempts - An array of verification attempt objects.
* @property {Date} dateCreated -
* The RFC 2822 date and time in GMT when the resource was created
* @property {Date} dateUpdated -
Expand Down Expand Up @@ -283,6 +284,7 @@ VerificationInstance = function VerificationInstance(version, payload,
this.lookup = payload.lookup; // jshint ignore:line
this.amount = payload.amount; // jshint ignore:line
this.payee = payload.payee; // jshint ignore:line
this.sendCodeAttempts = payload.send_code_attempts; // jshint ignore:line
this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line
this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line
this.url = payload.url; // jshint ignore:line
Expand Down
2 changes: 1 addition & 1 deletion lib/twiml/VoiceResponse.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ declare namespace VoiceResponse {

type SayLanguage = 'arb'|'ca-ES'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-CA'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fi-FI'|'fr-CA'|'fr-FR'|'hi-IN'|'is-IS'|'it-IT'|'ja-JP'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR'|'zh-CN'|'zh-HK'|'zh-TW';

type SayVoice = 'man'|'woman'|'alice'|'Polly.Aditi'|'Polly.Amy'|'Polly.Astrid'|'Polly.Bianca'|'Polly.Brian'|'Polly.Carla'|'Polly.Carmen'|'Polly.Celine'|'Polly.Chantal'|'Polly.Conchita'|'Polly.Cristiano'|'Polly.Dora'|'Polly.Emma'|'Polly.Enrique'|'Polly.Ewa'|'Polly.Filiz'|'Polly.Geraint'|'Polly.Giorgio'|'Polly.Gwyneth'|'Polly.Hans'|'Polly.Ines'|'Polly.Ivy'|'Polly.Jacek'|'Polly.Jan'|'Polly.Joanna'|'Polly.Joey'|'Polly.Justin'|'Polly.Karl'|'Polly.Kendra'|'Polly.Kimberly'|'Polly.Lea'|'Polly.Liv'|'Polly.Lotte'|'Polly.Lucia'|'Polly.Mads'|'Polly.Maja'|'Polly.Marlene'|'Polly.Mathieu'|'Polly.Matthew'|'Polly.Maxim'|'Polly.Mia'|'Polly.Miguel'|'Polly.Mizuki'|'Polly.Naja'|'Polly.Nicole'|'Polly.Penelope'|'Polly.Raveena'|'Polly.Ricardo'|'Polly.Ruben'|'Polly.Russell'|'Polly.Salli'|'Polly.Seoyeon'|'Polly.Takumi'|'Polly.Tatyana'|'Polly.Vicki'|'Polly.Vitoria'|'Polly.Zeina'|'Polly.Zhiyu';
type SayVoice = 'man'|'woman'|'alice'|'Polly.Aditi'|'Polly.Amy'|'Polly.Astrid'|'Polly.Bianca'|'Polly.Brian'|'Polly.Camila'|'Polly.Carla'|'Polly.Carmen'|'Polly.Celine'|'Polly.Chantal'|'Polly.Conchita'|'Polly.Cristiano'|'Polly.Dora'|'Polly.Emma'|'Polly.Enrique'|'Polly.Ewa'|'Polly.Filiz'|'Polly.Geraint'|'Polly.Giorgio'|'Polly.Gwyneth'|'Polly.Hans'|'Polly.Ines'|'Polly.Ivy'|'Polly.Jacek'|'Polly.Jan'|'Polly.Joanna'|'Polly.Joey'|'Polly.Justin'|'Polly.Karl'|'Polly.Kendra'|'Polly.Kimberly'|'Polly.Lea'|'Polly.Liv'|'Polly.Lotte'|'Polly.Lucia'|'Polly.Lupe'|'Polly.Mads'|'Polly.Maja'|'Polly.Marlene'|'Polly.Mathieu'|'Polly.Matthew'|'Polly.Maxim'|'Polly.Mia'|'Polly.Miguel'|'Polly.Mizuki'|'Polly.Naja'|'Polly.Nicole'|'Polly.Penelope'|'Polly.Raveena'|'Polly.Ricardo'|'Polly.Ruben'|'Polly.Russell'|'Polly.Salli'|'Polly.Seoyeon'|'Polly.Takumi'|'Polly.Tatyana'|'Polly.Vicki'|'Polly.Vitoria'|'Polly.Zeina'|'Polly.Zhiyu'|'Polly.Amy-Neural'|'Polly.Emma-Neural'|'Polly.Brian-Neural'|'Polly.Salli-Neural'|'Polly.Ivy-Neural'|'Polly.Joanna-Neural'|'Polly.Kendra-Neural'|'Polly.Kimberly-Neural'|'Polly.Joey-Neural'|'Polly.Justin-Neural'|'Polly.Matthew-Neural'|'Polly.Camila-Neural'|'Polly.Lupe-Neural';

type SipEvent = 'initiated'|'ringing'|'answered'|'completed';

Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"dependencies": {
"@types/express": "^4.17.2",
"dayjs": "^1.8.19",
"dayjs": "^1.8.20",
"jsonwebtoken": "^8.5.1",
"lodash": "^4.17.15",
"q": "2.0.x",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,38 @@ describe('Participant', function() {
}).done();
}
);
it('should generate valid create_with_non_e164_number response',
function(done) {
var body = JSON.stringify({
'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'call_sid': 'CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'conference_sid': 'CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'date_created': 'Fri, 18 Feb 2011 21:07:19 +0000',
'date_updated': 'Fri, 18 Feb 2011 21:07:19 +0000',
'end_conference_on_exit': false,
'muted': false,
'hold': false,
'status': 'complete',
'start_conference_on_enter': true,
'coaching': false,
'call_sid_to_coach': null,
'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json'
});

holodeck.mock(new Response(201, body));

var opts = {from: '+15017122661', to: '+15558675310'};
var promise = client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
.conferences('CFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
.participants.create(opts);
promise.then(function(response) {
expect(response).toBeDefined();
done();
}, function() {
throw new Error('failed');
}).done();
}
);
it('should generate valid remove request',
function(done) {
holodeck.mock(new Response(500, '{}'));
Expand Down
Loading

0 comments on commit 2d7f7fa

Please sign in to comment.