From 956090b1671c4a1b7b71e75e693e92966a0a4e0f Mon Sep 17 00:00:00 2001 From: Twilio Date: Fri, 25 May 2018 12:36:24 -0400 Subject: [PATCH] [Librarian] Regenerated @ eb708812c2f90eac9e066ed4b9026bfb1276d419 --- CHANGES.md | 19 +++ lib/rest/api/v2010/account/call.js | 3 +- lib/rest/api/v2010/account/key.js | 6 +- .../api/v2010/account/usage/record/allTime.js | 5 + .../api/v2010/account/usage/record/daily.js | 5 + .../v2010/account/usage/record/lastMonth.js | 5 + .../api/v2010/account/usage/record/monthly.js | 5 + .../v2010/account/usage/record/thisMonth.js | 5 + .../api/v2010/account/usage/record/today.js | 5 + .../api/v2010/account/usage/record/yearly.js | 5 + .../v2010/account/usage/record/yesterday.js | 5 + lib/rest/chat/v2/service/channel/member.js | 45 ++++--- lib/rest/chat/v2/service/channel/message.js | 12 +- lib/rest/chat/v2/service/user/userChannel.js | 23 ++-- .../ipMessaging/v2/service/channel/member.js | 45 ++++--- .../ipMessaging/v2/service/channel/message.js | 12 +- .../v2/service/user/userChannel.js | 23 ++-- lib/rest/notify/v1/service/user.js | 30 +++-- lib/rest/studio/v1/flow/engagement.js | 49 ++++++++ lib/rest/trunking/v1/trunk.js | 20 +++- lib/rest/trunking/v1/trunk/credentialList.js | 3 +- .../trunking/v1/trunk/ipAccessControlList.js | 18 +-- lib/rest/video/v1/composition.js | 110 +++++++++++------- .../roomParticipantPublishedTrack.js | 48 +++++--- lib/twiml/VoiceResponse.d.ts | 32 ++--- .../rest/studio/v1/flow/engagement.spec.js | 42 +++++++ .../rest/trunking/v1/trunk.spec.js | 60 +++++----- .../trunking/v1/trunk/credentialList.spec.js | 18 +-- .../v1/trunk/ipAccessControlList.spec.js | 30 ++--- .../trunking/v1/trunk/originationUrl.spec.js | 30 ++--- 30 files changed, 484 insertions(+), 234 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 40e83b430d..2246ce4903 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,25 @@ twilio-node changelog ===================== +[2018-05-25] Version 3.17.1 +---------------------------- +**Library** +- PR #349: Update Contributing section in README.md. Thanks to @dkundel! +- PR #347: Update dependencies to fix vulnerabilities (#343). Thanks to @dkundel! +- PR #351: Update request dependency. Thanks to @cjcodes! + +**Api** +- Add more programmable video categories to usage records +- Add 'include_subaccounts' parameter to all variation of usage_record fetch + +**Studio** +- Add endpoint to delete engagements + +**Trunking** +- Added cnam_lookup_enabled parameter to Trunk resource. +- Added case-insensitivity for recording parameter to Trunk resource. + + [2018-05-11] Version 3.17.0 ---------------------------- **Library** diff --git a/lib/rest/api/v2010/account/call.js b/lib/rest/api/v2010/account/call.js index 67b40666d5..710f265ab5 100644 --- a/lib/rest/api/v2010/account/call.js +++ b/lib/rest/api/v2010/account/call.js @@ -82,8 +82,7 @@ CallList = function CallList(version, accountSid) { * @param {string} [opts.statusCallbackMethod] - * HTTP Method to use with StatusCallback * @param {string} [opts.sendDigits] - Digits to send - * @param {string} [opts.ifMachine] - - * Action to take if a machine has answered the call + * @param {string} [opts.ifMachine] - The if_machine * @param {number} [opts.timeout] - Number of seconds to wait for an answer * @param {boolean} [opts.record] - Whether or not to record the Call * @param {string} [opts.recordingChannels] - diff --git a/lib/rest/api/v2010/account/key.js b/lib/rest/api/v2010/account/key.js index e64a4e60f5..fa7dc48c68 100644 --- a/lib/rest/api/v2010/account/key.js +++ b/lib/rest/api/v2010/account/key.js @@ -422,7 +422,8 @@ KeyInstance.prototype.fetch = function fetch(callback) { * @instance * * @param {object|function} opts - ... - * @param {string} [opts.friendlyName] - The friendly_name + * @param {string} [opts.friendlyName] - + * A descriptive string for this resource, chosen by your application, up to 64 characters long. * @param {function} [callback] - Callback to handle processed record * * @returns {Promise} Resolves to processed KeyInstance @@ -538,7 +539,8 @@ KeyContext.prototype.fetch = function fetch(callback) { * @instance * * @param {object|function} opts - ... - * @param {string} [opts.friendlyName] - The friendly_name + * @param {string} [opts.friendlyName] - + * A descriptive string for this resource, chosen by your application, up to 64 characters long. * @param {function} [callback] - Callback to handle processed record * * @returns {Promise} Resolves to processed KeyInstance diff --git a/lib/rest/api/v2010/account/usage/record/allTime.js b/lib/rest/api/v2010/account/usage/record/allTime.js index 584e8515ef..9cb96a7c1a 100644 --- a/lib/rest/api/v2010/account/usage/record/allTime.js +++ b/lib/rest/api/v2010/account/usage/record/allTime.js @@ -76,6 +76,7 @@ AllTimeList = function AllTimeList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {number} [opts.limit] - * Upper limit for the number of records to return. * each() guarantees never to return more than limit. @@ -170,6 +171,7 @@ AllTimeList = function AllTimeList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {number} [opts.limit] - * Upper limit for the number of records to return. * list() guarantees never to return more than limit. @@ -235,6 +237,7 @@ AllTimeList = function AllTimeList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {string} [opts.pageToken] - PageToken provided by the API * @param {number} [opts.pageNumber] - * Page Number, this value is simply for client state @@ -256,6 +259,7 @@ AllTimeList = function AllTimeList(version, accountSid) { 'Category': _.get(opts, 'category'), 'StartDate': serialize.iso8601Date(_.get(opts, 'startDate')), 'EndDate': serialize.iso8601Date(_.get(opts, 'endDate')), + 'IncludeSubaccounts': serialize.bool(_.get(opts, 'includeSubaccounts')), 'PageToken': opts.pageToken, 'Page': opts.pageNumber, 'PageSize': opts.pageSize @@ -295,6 +299,7 @@ AllTimeList = function AllTimeList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {string} [targetUrl] - API-generated URL for the requested results page * @param {function} [callback] - Callback to handle list of records * diff --git a/lib/rest/api/v2010/account/usage/record/daily.js b/lib/rest/api/v2010/account/usage/record/daily.js index 01c02d226a..20064f6261 100644 --- a/lib/rest/api/v2010/account/usage/record/daily.js +++ b/lib/rest/api/v2010/account/usage/record/daily.js @@ -76,6 +76,7 @@ DailyList = function DailyList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {number} [opts.limit] - * Upper limit for the number of records to return. * each() guarantees never to return more than limit. @@ -170,6 +171,7 @@ DailyList = function DailyList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {number} [opts.limit] - * Upper limit for the number of records to return. * list() guarantees never to return more than limit. @@ -235,6 +237,7 @@ DailyList = function DailyList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {string} [opts.pageToken] - PageToken provided by the API * @param {number} [opts.pageNumber] - * Page Number, this value is simply for client state @@ -256,6 +259,7 @@ DailyList = function DailyList(version, accountSid) { 'Category': _.get(opts, 'category'), 'StartDate': serialize.iso8601Date(_.get(opts, 'startDate')), 'EndDate': serialize.iso8601Date(_.get(opts, 'endDate')), + 'IncludeSubaccounts': serialize.bool(_.get(opts, 'includeSubaccounts')), 'PageToken': opts.pageToken, 'Page': opts.pageNumber, 'PageSize': opts.pageSize @@ -295,6 +299,7 @@ DailyList = function DailyList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {string} [targetUrl] - API-generated URL for the requested results page * @param {function} [callback] - Callback to handle list of records * diff --git a/lib/rest/api/v2010/account/usage/record/lastMonth.js b/lib/rest/api/v2010/account/usage/record/lastMonth.js index 88a4c4eb73..7e8482eff5 100644 --- a/lib/rest/api/v2010/account/usage/record/lastMonth.js +++ b/lib/rest/api/v2010/account/usage/record/lastMonth.js @@ -76,6 +76,7 @@ LastMonthList = function LastMonthList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {number} [opts.limit] - * Upper limit for the number of records to return. * each() guarantees never to return more than limit. @@ -170,6 +171,7 @@ LastMonthList = function LastMonthList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {number} [opts.limit] - * Upper limit for the number of records to return. * list() guarantees never to return more than limit. @@ -235,6 +237,7 @@ LastMonthList = function LastMonthList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {string} [opts.pageToken] - PageToken provided by the API * @param {number} [opts.pageNumber] - * Page Number, this value is simply for client state @@ -256,6 +259,7 @@ LastMonthList = function LastMonthList(version, accountSid) { 'Category': _.get(opts, 'category'), 'StartDate': serialize.iso8601Date(_.get(opts, 'startDate')), 'EndDate': serialize.iso8601Date(_.get(opts, 'endDate')), + 'IncludeSubaccounts': serialize.bool(_.get(opts, 'includeSubaccounts')), 'PageToken': opts.pageToken, 'Page': opts.pageNumber, 'PageSize': opts.pageSize @@ -295,6 +299,7 @@ LastMonthList = function LastMonthList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {string} [targetUrl] - API-generated URL for the requested results page * @param {function} [callback] - Callback to handle list of records * diff --git a/lib/rest/api/v2010/account/usage/record/monthly.js b/lib/rest/api/v2010/account/usage/record/monthly.js index 504d0a08e3..c3f8d4e060 100644 --- a/lib/rest/api/v2010/account/usage/record/monthly.js +++ b/lib/rest/api/v2010/account/usage/record/monthly.js @@ -76,6 +76,7 @@ MonthlyList = function MonthlyList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {number} [opts.limit] - * Upper limit for the number of records to return. * each() guarantees never to return more than limit. @@ -170,6 +171,7 @@ MonthlyList = function MonthlyList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {number} [opts.limit] - * Upper limit for the number of records to return. * list() guarantees never to return more than limit. @@ -235,6 +237,7 @@ MonthlyList = function MonthlyList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {string} [opts.pageToken] - PageToken provided by the API * @param {number} [opts.pageNumber] - * Page Number, this value is simply for client state @@ -256,6 +259,7 @@ MonthlyList = function MonthlyList(version, accountSid) { 'Category': _.get(opts, 'category'), 'StartDate': serialize.iso8601Date(_.get(opts, 'startDate')), 'EndDate': serialize.iso8601Date(_.get(opts, 'endDate')), + 'IncludeSubaccounts': serialize.bool(_.get(opts, 'includeSubaccounts')), 'PageToken': opts.pageToken, 'Page': opts.pageNumber, 'PageSize': opts.pageSize @@ -295,6 +299,7 @@ MonthlyList = function MonthlyList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {string} [targetUrl] - API-generated URL for the requested results page * @param {function} [callback] - Callback to handle list of records * diff --git a/lib/rest/api/v2010/account/usage/record/thisMonth.js b/lib/rest/api/v2010/account/usage/record/thisMonth.js index 1c1a00e380..b9e07f918d 100644 --- a/lib/rest/api/v2010/account/usage/record/thisMonth.js +++ b/lib/rest/api/v2010/account/usage/record/thisMonth.js @@ -76,6 +76,7 @@ ThisMonthList = function ThisMonthList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {number} [opts.limit] - * Upper limit for the number of records to return. * each() guarantees never to return more than limit. @@ -170,6 +171,7 @@ ThisMonthList = function ThisMonthList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {number} [opts.limit] - * Upper limit for the number of records to return. * list() guarantees never to return more than limit. @@ -235,6 +237,7 @@ ThisMonthList = function ThisMonthList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {string} [opts.pageToken] - PageToken provided by the API * @param {number} [opts.pageNumber] - * Page Number, this value is simply for client state @@ -256,6 +259,7 @@ ThisMonthList = function ThisMonthList(version, accountSid) { 'Category': _.get(opts, 'category'), 'StartDate': serialize.iso8601Date(_.get(opts, 'startDate')), 'EndDate': serialize.iso8601Date(_.get(opts, 'endDate')), + 'IncludeSubaccounts': serialize.bool(_.get(opts, 'includeSubaccounts')), 'PageToken': opts.pageToken, 'Page': opts.pageNumber, 'PageSize': opts.pageSize @@ -295,6 +299,7 @@ ThisMonthList = function ThisMonthList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {string} [targetUrl] - API-generated URL for the requested results page * @param {function} [callback] - Callback to handle list of records * diff --git a/lib/rest/api/v2010/account/usage/record/today.js b/lib/rest/api/v2010/account/usage/record/today.js index 6eae793e99..51d3116ec7 100644 --- a/lib/rest/api/v2010/account/usage/record/today.js +++ b/lib/rest/api/v2010/account/usage/record/today.js @@ -76,6 +76,7 @@ TodayList = function TodayList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {number} [opts.limit] - * Upper limit for the number of records to return. * each() guarantees never to return more than limit. @@ -170,6 +171,7 @@ TodayList = function TodayList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {number} [opts.limit] - * Upper limit for the number of records to return. * list() guarantees never to return more than limit. @@ -235,6 +237,7 @@ TodayList = function TodayList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {string} [opts.pageToken] - PageToken provided by the API * @param {number} [opts.pageNumber] - * Page Number, this value is simply for client state @@ -256,6 +259,7 @@ TodayList = function TodayList(version, accountSid) { 'Category': _.get(opts, 'category'), 'StartDate': serialize.iso8601Date(_.get(opts, 'startDate')), 'EndDate': serialize.iso8601Date(_.get(opts, 'endDate')), + 'IncludeSubaccounts': serialize.bool(_.get(opts, 'includeSubaccounts')), 'PageToken': opts.pageToken, 'Page': opts.pageNumber, 'PageSize': opts.pageSize @@ -295,6 +299,7 @@ TodayList = function TodayList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {string} [targetUrl] - API-generated URL for the requested results page * @param {function} [callback] - Callback to handle list of records * diff --git a/lib/rest/api/v2010/account/usage/record/yearly.js b/lib/rest/api/v2010/account/usage/record/yearly.js index 3bea66e4ec..d2cab40162 100644 --- a/lib/rest/api/v2010/account/usage/record/yearly.js +++ b/lib/rest/api/v2010/account/usage/record/yearly.js @@ -76,6 +76,7 @@ YearlyList = function YearlyList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {number} [opts.limit] - * Upper limit for the number of records to return. * each() guarantees never to return more than limit. @@ -170,6 +171,7 @@ YearlyList = function YearlyList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {number} [opts.limit] - * Upper limit for the number of records to return. * list() guarantees never to return more than limit. @@ -235,6 +237,7 @@ YearlyList = function YearlyList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {string} [opts.pageToken] - PageToken provided by the API * @param {number} [opts.pageNumber] - * Page Number, this value is simply for client state @@ -256,6 +259,7 @@ YearlyList = function YearlyList(version, accountSid) { 'Category': _.get(opts, 'category'), 'StartDate': serialize.iso8601Date(_.get(opts, 'startDate')), 'EndDate': serialize.iso8601Date(_.get(opts, 'endDate')), + 'IncludeSubaccounts': serialize.bool(_.get(opts, 'includeSubaccounts')), 'PageToken': opts.pageToken, 'Page': opts.pageNumber, 'PageSize': opts.pageSize @@ -295,6 +299,7 @@ YearlyList = function YearlyList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {string} [targetUrl] - API-generated URL for the requested results page * @param {function} [callback] - Callback to handle list of records * diff --git a/lib/rest/api/v2010/account/usage/record/yesterday.js b/lib/rest/api/v2010/account/usage/record/yesterday.js index 0b72960298..2ae4be08c5 100644 --- a/lib/rest/api/v2010/account/usage/record/yesterday.js +++ b/lib/rest/api/v2010/account/usage/record/yesterday.js @@ -76,6 +76,7 @@ YesterdayList = function YesterdayList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {number} [opts.limit] - * Upper limit for the number of records to return. * each() guarantees never to return more than limit. @@ -170,6 +171,7 @@ YesterdayList = function YesterdayList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {number} [opts.limit] - * Upper limit for the number of records to return. * list() guarantees never to return more than limit. @@ -235,6 +237,7 @@ YesterdayList = function YesterdayList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {string} [opts.pageToken] - PageToken provided by the API * @param {number} [opts.pageNumber] - * Page Number, this value is simply for client state @@ -256,6 +259,7 @@ YesterdayList = function YesterdayList(version, accountSid) { 'Category': _.get(opts, 'category'), 'StartDate': serialize.iso8601Date(_.get(opts, 'startDate')), 'EndDate': serialize.iso8601Date(_.get(opts, 'endDate')), + 'IncludeSubaccounts': serialize.bool(_.get(opts, 'includeSubaccounts')), 'PageToken': opts.pageToken, 'Page': opts.pageNumber, 'PageSize': opts.pageSize @@ -295,6 +299,7 @@ YesterdayList = function YesterdayList(version, accountSid) { * Only include usage that has occurred on or after this date. * @param {Date} [opts.endDate] - * Only include usage that has occurred on or before this date. + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {string} [targetUrl] - API-generated URL for the requested results page * @param {function} [callback] - Callback to handle list of records * diff --git a/lib/rest/chat/v2/service/channel/member.js b/lib/rest/chat/v2/service/channel/member.js index 0526114b6e..198f9763d4 100644 --- a/lib/rest/chat/v2/service/channel/member.js +++ b/lib/rest/chat/v2/service/channel/member.js @@ -65,13 +65,18 @@ MemberList = function MemberList(version, serviceSid, channelSid) { * @instance * * @param {object} opts - ... - * @param {string} opts.identity - The identity - * @param {string} [opts.roleSid] - The role_sid + * @param {string} opts.identity - + * A unique string identifier for this User in this Service. See the access tokens docs for more details. (📇 PII MTL: 120 days) + * @param {string} [opts.roleSid] - + * The role to be assigned to this member. Defaults to the roles specified on the Service. * @param {number} [opts.lastConsumedMessageIndex] - - * The last_consumed_message_index - * @param {Date} [opts.lastConsumptionTimestamp] - The last_consumption_timestamp - * @param {Date} [opts.dateCreated] - The date_created - * @param {Date} [opts.dateUpdated] - The date_updated + * Field used to specify the last consumed Message index for the Channel for this Member. Should only be used when recreating a Member from a backup/separate source. + * @param {Date} [opts.lastConsumptionTimestamp] - + * ISO8601 time indicating the last datetime the Member consumed a Message in the Channel. Should only be used when recreating a Member from a backup/separate source + * @param {Date} [opts.dateCreated] - + * The ISO8601 time specifying the datetime the Members should be set as being created. Will be set to the current time by the Chat service if not specified. Note that this should only be used in cases where a Member is being recreated from a backup/separate source + * @param {Date} [opts.dateUpdated] - + * The ISO8601 time specifying the datetime the Member should be set as having been last updated. Will be set to the null by the Chat service if not specified. Note that this should only be used in cases where a Member is being recreated from a backup/separate source and where a Member was previously updated. * @param {function} [callback] - Callback to handle processed record * * @returns {Promise} Resolves to processed MemberInstance @@ -134,7 +139,8 @@ MemberList = function MemberList(version, serviceSid, channelSid) { * @instance * * @param {object|function} opts - ... - * @param {string|list} [opts.identity] - The identity + * @param {string|list} [opts.identity] - + * A unique string identifier for this User in this Service. See the access tokens docs for more details. (📇 PII MTL: 120 days) * @param {number} [opts.limit] - * Upper limit for the number of records to return. * each() guarantees never to return more than limit. @@ -223,7 +229,8 @@ MemberList = function MemberList(version, serviceSid, channelSid) { * @instance * * @param {object|function} opts - ... - * @param {string|list} [opts.identity] - The identity + * @param {string|list} [opts.identity] - + * A unique string identifier for this User in this Service. See the access tokens docs for more details. (📇 PII MTL: 120 days) * @param {number} [opts.limit] - * Upper limit for the number of records to return. * list() guarantees never to return more than limit. @@ -283,7 +290,8 @@ MemberList = function MemberList(version, serviceSid, channelSid) { * @instance * * @param {object|function} opts - ... - * @param {string|list} [opts.identity] - The identity + * @param {string|list} [opts.identity] - + * A unique string identifier for this User in this Service. See the access tokens docs for more details. (📇 PII MTL: 120 days) * @param {string} [opts.pageToken] - PageToken provided by the API * @param {number} [opts.pageNumber] - * Page Number, this value is simply for client state @@ -336,7 +344,8 @@ MemberList = function MemberList(version, serviceSid, channelSid) { * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MemberList * @instance * - * @param {string|list} [opts.identity] - The identity + * @param {string|list} [opts.identity] - + * A unique string identifier for this User in this Service. See the access tokens docs for more details. (📇 PII MTL: 120 days) * @param {string} [targetUrl] - API-generated URL for the requested results page * @param {function} [callback] - Callback to handle list of records * @@ -543,13 +552,13 @@ MemberInstance.prototype.remove = function remove(callback) { * @param {object|function} opts - ... * @param {string} [opts.roleSid] - The role to be assigned to this member. * @param {number} [opts.lastConsumedMessageIndex] - - * Optional field used to specify the last consumed Message index for the Channel for this Member. + * Field used to specify the last consumed Message index for the Channel for this Member. * @param {Date} [opts.lastConsumptionTimestamp] - - * Optional ISO8601 time indicating the last datetime the Member consumed a Message in the Channel. + * ISO8601 time indicating the last datetime the Member consumed a Message in the Channel. * @param {Date} [opts.dateCreated] - - * The optional ISO8601 time specifying the datetime the Members should be set as being created. + * The ISO8601 time specifying the datetime the Members should be set as being created. * @param {Date} [opts.dateUpdated] - - * The optional ISO8601 time specifying the datetime the Member should be set as having been last updated. + * The ISO8601 time specifying the datetime the Member should be set as having been last updated. * @param {function} [callback] - Callback to handle processed record * * @returns {Promise} Resolves to processed MemberInstance @@ -684,13 +693,13 @@ MemberContext.prototype.remove = function remove(callback) { * @param {object|function} opts - ... * @param {string} [opts.roleSid] - The role to be assigned to this member. * @param {number} [opts.lastConsumedMessageIndex] - - * Optional field used to specify the last consumed Message index for the Channel for this Member. + * Field used to specify the last consumed Message index for the Channel for this Member. * @param {Date} [opts.lastConsumptionTimestamp] - - * Optional ISO8601 time indicating the last datetime the Member consumed a Message in the Channel. + * ISO8601 time indicating the last datetime the Member consumed a Message in the Channel. * @param {Date} [opts.dateCreated] - - * The optional ISO8601 time specifying the datetime the Members should be set as being created. + * The ISO8601 time specifying the datetime the Members should be set as being created. * @param {Date} [opts.dateUpdated] - - * The optional ISO8601 time specifying the datetime the Member should be set as having been last updated. + * The ISO8601 time specifying the datetime the Member should be set as having been last updated. * @param {function} [callback] - Callback to handle processed record * * @returns {Promise} Resolves to processed MemberInstance diff --git a/lib/rest/chat/v2/service/channel/message.js b/lib/rest/chat/v2/service/channel/message.js index fe6043e6d9..8a6a3b6b20 100644 --- a/lib/rest/chat/v2/service/channel/message.js +++ b/lib/rest/chat/v2/service/channel/message.js @@ -68,14 +68,14 @@ MessageList = function MessageList(version, serviceSid, channelSid) { * @param {string} [opts.from] - * The identity of the message's author. Defaults to system if not specified. * @param {string} [opts.attributes] - - * The optional attributes metadata field you can use to store any data you wish. + * The attributes metadata field you can use to store any data you wish. * @param {Date} [opts.dateCreated] - * The ISO8601 time specifying the datetime the Message should be set as being created. * @param {Date} [opts.dateUpdated] - * The ISO8601 time specifying the datetime the Message should be set as having been last updated. * @param {string} [opts.lastUpdatedBy] - * Specify the Identity of the User that last updated the Message - * @param {string} [opts.body] - The optional message body string. + * @param {string} [opts.body] - The message body string. * @param {string} [opts.mediaSid] - The Media Sid to be attached to this Message. * @param {function} [callback] - Callback to handle processed record * @@ -449,7 +449,7 @@ MessagePage.prototype.getInstance = function getInstance(payload) { * @property {string} accountSid - * The unique id of the Account responsible for this message. * @property {string} attributes - - * An optional string metadata field you can use to store any data you wish. + * A string metadata field you can use to store any data you wish. * @property {string} serviceSid - * The unique id of the Service this message belongs to. * @property {string} to - The unique id of the Channel this message was sent to. @@ -457,15 +457,15 @@ MessagePage.prototype.getInstance = function getInstance(payload) { * @property {Date} dateCreated - The date that this resource was created. * @property {Date} dateUpdated - The date that this resource was last updated. * @property {string} lastUpdatedBy - - * Optional field to specify the Identity of the User that last updated the Message + * Field to specify the Identity of the User that last updated the Message * @property {boolean} wasEdited - * true if the message has been updated since it was created. * @property {string} from - The identity of the message's author. - * @property {string} body - Optional — the contents of the message. + * @property {string} body - The contents of the message. * @property {number} index - The index of the message within the Channel * @property {string} type - Message type. * @property {string} media - - * Optional — if a Media resource instance is attached to the Message, this will contain the Media object for the attached Media. + * If a Media resource instance is attached to the Message, this will contain the Media object for the attached Media. * @property {string} url - An absolute URL for this message. * * @param {Twilio.Chat.V2} version - Version of the resource diff --git a/lib/rest/chat/v2/service/user/userChannel.js b/lib/rest/chat/v2/service/user/userChannel.js index 9b05a37f3f..f5c6913795 100644 --- a/lib/rest/chat/v2/service/user/userChannel.js +++ b/lib/rest/chat/v2/service/user/userChannel.js @@ -26,7 +26,8 @@ var UserChannelInstance; * @description Initialize the UserChannelList * * @param {Twilio.Chat.V2} version - Version of the resource - * @param {string} serviceSid - The service_sid + * @param {string} serviceSid - + * The unique id of the Service this channel belongs to. * @param {string} userSid - * A 34 character string that uniquely identifies this resource. */ @@ -344,13 +345,19 @@ UserChannelPage.prototype.getInstance = function getInstance(payload) { * @constructor Twilio.Chat.V2.ServiceContext.UserContext.UserChannelInstance * @description Initialize the UserChannelContext * - * @property {string} accountSid - The account_sid - * @property {string} serviceSid - The service_sid - * @property {string} channelSid - The channel_sid - * @property {string} memberSid - The member_sid - * @property {user_channel.channel_status} status - The status - * @property {number} lastConsumedMessageIndex - The last_consumed_message_index - * @property {number} unreadMessagesCount - The unread_messages_count + * @property {string} accountSid - + * The unique id of the Account responsible for this channel. + * @property {string} serviceSid - + * The unique id of the Service this channel belongs to. + * @property {string} channelSid - The unique id of a Channel. + * @property {string} memberSid - + * The unique id of this User as a Member in this Channel. + * @property {user_channel.channel_status} status - + * The status of the User on this Channel. + * @property {number} lastConsumedMessageIndex - + * The index of the last read Message in this Channel for this User. + * @property {number} unreadMessagesCount - + * The count of unread Messages in this Channel for this User. * @property {string} links - The links * * @param {Twilio.Chat.V2} version - Version of the resource diff --git a/lib/rest/ipMessaging/v2/service/channel/member.js b/lib/rest/ipMessaging/v2/service/channel/member.js index 3e1e37dfb1..f99f2676b3 100644 --- a/lib/rest/ipMessaging/v2/service/channel/member.js +++ b/lib/rest/ipMessaging/v2/service/channel/member.js @@ -65,13 +65,18 @@ MemberList = function MemberList(version, serviceSid, channelSid) { * @instance * * @param {object} opts - ... - * @param {string} opts.identity - The identity - * @param {string} [opts.roleSid] - The role_sid + * @param {string} opts.identity - + * A unique string identifier for this User in this Service. See the access tokens docs for more details. (📇 PII MTL: 120 days) + * @param {string} [opts.roleSid] - + * The role to be assigned to this member. Defaults to the roles specified on the Service. * @param {number} [opts.lastConsumedMessageIndex] - - * The last_consumed_message_index - * @param {Date} [opts.lastConsumptionTimestamp] - The last_consumption_timestamp - * @param {Date} [opts.dateCreated] - The date_created - * @param {Date} [opts.dateUpdated] - The date_updated + * Field used to specify the last consumed Message index for the Channel for this Member. Should only be used when recreating a Member from a backup/separate source. + * @param {Date} [opts.lastConsumptionTimestamp] - + * ISO8601 time indicating the last datetime the Member consumed a Message in the Channel. Should only be used when recreating a Member from a backup/separate source + * @param {Date} [opts.dateCreated] - + * The ISO8601 time specifying the datetime the Members should be set as being created. Will be set to the current time by the Chat service if not specified. Note that this should only be used in cases where a Member is being recreated from a backup/separate source + * @param {Date} [opts.dateUpdated] - + * The ISO8601 time specifying the datetime the Member should be set as having been last updated. Will be set to the null by the Chat service if not specified. Note that this should only be used in cases where a Member is being recreated from a backup/separate source and where a Member was previously updated. * @param {function} [callback] - Callback to handle processed record * * @returns {Promise} Resolves to processed MemberInstance @@ -134,7 +139,8 @@ MemberList = function MemberList(version, serviceSid, channelSid) { * @instance * * @param {object|function} opts - ... - * @param {string|list} [opts.identity] - The identity + * @param {string|list} [opts.identity] - + * A unique string identifier for this User in this Service. See the access tokens docs for more details. (📇 PII MTL: 120 days) * @param {number} [opts.limit] - * Upper limit for the number of records to return. * each() guarantees never to return more than limit. @@ -223,7 +229,8 @@ MemberList = function MemberList(version, serviceSid, channelSid) { * @instance * * @param {object|function} opts - ... - * @param {string|list} [opts.identity] - The identity + * @param {string|list} [opts.identity] - + * A unique string identifier for this User in this Service. See the access tokens docs for more details. (📇 PII MTL: 120 days) * @param {number} [opts.limit] - * Upper limit for the number of records to return. * list() guarantees never to return more than limit. @@ -283,7 +290,8 @@ MemberList = function MemberList(version, serviceSid, channelSid) { * @instance * * @param {object|function} opts - ... - * @param {string|list} [opts.identity] - The identity + * @param {string|list} [opts.identity] - + * A unique string identifier for this User in this Service. See the access tokens docs for more details. (📇 PII MTL: 120 days) * @param {string} [opts.pageToken] - PageToken provided by the API * @param {number} [opts.pageNumber] - * Page Number, this value is simply for client state @@ -336,7 +344,8 @@ MemberList = function MemberList(version, serviceSid, channelSid) { * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MemberList * @instance * - * @param {string|list} [opts.identity] - The identity + * @param {string|list} [opts.identity] - + * A unique string identifier for this User in this Service. See the access tokens docs for more details. (📇 PII MTL: 120 days) * @param {string} [targetUrl] - API-generated URL for the requested results page * @param {function} [callback] - Callback to handle list of records * @@ -543,13 +552,13 @@ MemberInstance.prototype.remove = function remove(callback) { * @param {object|function} opts - ... * @param {string} [opts.roleSid] - The role to be assigned to this member. * @param {number} [opts.lastConsumedMessageIndex] - - * Optional field used to specify the last consumed Message index for the Channel for this Member. + * Field used to specify the last consumed Message index for the Channel for this Member. * @param {Date} [opts.lastConsumptionTimestamp] - - * Optional ISO8601 time indicating the last datetime the Member consumed a Message in the Channel. + * ISO8601 time indicating the last datetime the Member consumed a Message in the Channel. * @param {Date} [opts.dateCreated] - - * The optional ISO8601 time specifying the datetime the Members should be set as being created. + * The ISO8601 time specifying the datetime the Members should be set as being created. * @param {Date} [opts.dateUpdated] - - * The optional ISO8601 time specifying the datetime the Member should be set as having been last updated. + * The ISO8601 time specifying the datetime the Member should be set as having been last updated. * @param {function} [callback] - Callback to handle processed record * * @returns {Promise} Resolves to processed MemberInstance @@ -684,13 +693,13 @@ MemberContext.prototype.remove = function remove(callback) { * @param {object|function} opts - ... * @param {string} [opts.roleSid] - The role to be assigned to this member. * @param {number} [opts.lastConsumedMessageIndex] - - * Optional field used to specify the last consumed Message index for the Channel for this Member. + * Field used to specify the last consumed Message index for the Channel for this Member. * @param {Date} [opts.lastConsumptionTimestamp] - - * Optional ISO8601 time indicating the last datetime the Member consumed a Message in the Channel. + * ISO8601 time indicating the last datetime the Member consumed a Message in the Channel. * @param {Date} [opts.dateCreated] - - * The optional ISO8601 time specifying the datetime the Members should be set as being created. + * The ISO8601 time specifying the datetime the Members should be set as being created. * @param {Date} [opts.dateUpdated] - - * The optional ISO8601 time specifying the datetime the Member should be set as having been last updated. + * The ISO8601 time specifying the datetime the Member should be set as having been last updated. * @param {function} [callback] - Callback to handle processed record * * @returns {Promise} Resolves to processed MemberInstance diff --git a/lib/rest/ipMessaging/v2/service/channel/message.js b/lib/rest/ipMessaging/v2/service/channel/message.js index 78421caa52..2c7d1988a6 100644 --- a/lib/rest/ipMessaging/v2/service/channel/message.js +++ b/lib/rest/ipMessaging/v2/service/channel/message.js @@ -68,14 +68,14 @@ MessageList = function MessageList(version, serviceSid, channelSid) { * @param {string} [opts.from] - * The identity of the message's author. Defaults to system if not specified. * @param {string} [opts.attributes] - - * The optional attributes metadata field you can use to store any data you wish. + * The attributes metadata field you can use to store any data you wish. * @param {Date} [opts.dateCreated] - * The ISO8601 time specifying the datetime the Message should be set as being created. * @param {Date} [opts.dateUpdated] - * The ISO8601 time specifying the datetime the Message should be set as having been last updated. * @param {string} [opts.lastUpdatedBy] - * Specify the Identity of the User that last updated the Message - * @param {string} [opts.body] - The optional message body string. + * @param {string} [opts.body] - The message body string. * @param {string} [opts.mediaSid] - The Media Sid to be attached to this Message. * @param {function} [callback] - Callback to handle processed record * @@ -449,7 +449,7 @@ MessagePage.prototype.getInstance = function getInstance(payload) { * @property {string} accountSid - * The unique id of the Account responsible for this message. * @property {string} attributes - - * An optional string metadata field you can use to store any data you wish. + * A string metadata field you can use to store any data you wish. * @property {string} serviceSid - * The unique id of the Service this message belongs to. * @property {string} to - The unique id of the Channel this message was sent to. @@ -457,15 +457,15 @@ MessagePage.prototype.getInstance = function getInstance(payload) { * @property {Date} dateCreated - The date that this resource was created. * @property {Date} dateUpdated - The date that this resource was last updated. * @property {string} lastUpdatedBy - - * Optional field to specify the Identity of the User that last updated the Message + * Field to specify the Identity of the User that last updated the Message * @property {boolean} wasEdited - * true if the message has been updated since it was created. * @property {string} from - The identity of the message's author. - * @property {string} body - Optional — the contents of the message. + * @property {string} body - The contents of the message. * @property {number} index - The index of the message within the Channel * @property {string} type - Message type. * @property {string} media - - * Optional — if a Media resource instance is attached to the Message, this will contain the Media object for the attached Media. + * If a Media resource instance is attached to the Message, this will contain the Media object for the attached Media. * @property {string} url - An absolute URL for this message. * * @param {Twilio.IpMessaging.V2} version - Version of the resource diff --git a/lib/rest/ipMessaging/v2/service/user/userChannel.js b/lib/rest/ipMessaging/v2/service/user/userChannel.js index a79cf01023..3d35c101d5 100644 --- a/lib/rest/ipMessaging/v2/service/user/userChannel.js +++ b/lib/rest/ipMessaging/v2/service/user/userChannel.js @@ -26,7 +26,8 @@ var UserChannelInstance; * @description Initialize the UserChannelList * * @param {Twilio.IpMessaging.V2} version - Version of the resource - * @param {string} serviceSid - The service_sid + * @param {string} serviceSid - + * The unique id of the Service this channel belongs to. * @param {string} userSid - * A 34 character string that uniquely identifies this resource. */ @@ -344,13 +345,19 @@ UserChannelPage.prototype.getInstance = function getInstance(payload) { * @constructor Twilio.IpMessaging.V2.ServiceContext.UserContext.UserChannelInstance * @description Initialize the UserChannelContext * - * @property {string} accountSid - The account_sid - * @property {string} serviceSid - The service_sid - * @property {string} channelSid - The channel_sid - * @property {string} memberSid - The member_sid - * @property {user_channel.channel_status} status - The status - * @property {number} lastConsumedMessageIndex - The last_consumed_message_index - * @property {number} unreadMessagesCount - The unread_messages_count + * @property {string} accountSid - + * The unique id of the Account responsible for this channel. + * @property {string} serviceSid - + * The unique id of the Service this channel belongs to. + * @property {string} channelSid - The unique id of a Channel. + * @property {string} memberSid - + * The unique id of this User as a Member in this Channel. + * @property {user_channel.channel_status} status - + * The status of the User on this Channel. + * @property {number} lastConsumedMessageIndex - + * The index of the last read Message in this Channel for this User. + * @property {number} unreadMessagesCount - + * The count of unread Messages in this Channel for this User. * @property {string} links - The links * * @param {Twilio.IpMessaging.V2} version - Version of the resource diff --git a/lib/rest/notify/v1/service/user.js b/lib/rest/notify/v1/service/user.js index 2cbbcfe11b..6bc1711d6a 100644 --- a/lib/rest/notify/v1/service/user.js +++ b/lib/rest/notify/v1/service/user.js @@ -66,7 +66,8 @@ UserList = function UserList(version, serviceSid) { * @instance * * @param {object} opts - ... - * @param {string|list} [opts.segment] - The segment + * @param {string|list} [opts.segment] - + * The list of segments this User belongs to. Segments can be used to select recipients of a notification. Maximum 20 Segments per User allowed. * @param {function} [callback] - Callback to handle processed record * * @returns {Promise} Resolves to processed UserInstance @@ -124,8 +125,10 @@ UserList = function UserList(version, serviceSid) { * @instance * * @param {object|function} opts - ... - * @param {string|list} [opts.identity] - The identity - * @param {string} [opts.segment] - The segment + * @param {string|list} [opts.identity] - + * The identifier of the User, defined by your application. + * @param {string} [opts.segment] - + * The list of segments this User belongs to. Segments can be used to select recipients of a notification. Maximum 20 Segments per User allowed. * @param {number} [opts.limit] - * Upper limit for the number of records to return. * each() guarantees never to return more than limit. @@ -214,8 +217,10 @@ UserList = function UserList(version, serviceSid) { * @instance * * @param {object|function} opts - ... - * @param {string|list} [opts.identity] - The identity - * @param {string} [opts.segment] - The segment + * @param {string|list} [opts.identity] - + * The identifier of the User, defined by your application. + * @param {string} [opts.segment] - + * The list of segments this User belongs to. Segments can be used to select recipients of a notification. Maximum 20 Segments per User allowed. * @param {number} [opts.limit] - * Upper limit for the number of records to return. * list() guarantees never to return more than limit. @@ -275,8 +280,10 @@ UserList = function UserList(version, serviceSid) { * @instance * * @param {object|function} opts - ... - * @param {string|list} [opts.identity] - The identity - * @param {string} [opts.segment] - The segment + * @param {string|list} [opts.identity] - + * The identifier of the User, defined by your application. + * @param {string} [opts.segment] - + * The list of segments this User belongs to. Segments can be used to select recipients of a notification. Maximum 20 Segments per User allowed. * @param {string} [opts.pageToken] - PageToken provided by the API * @param {number} [opts.pageNumber] - * Page Number, this value is simply for client state @@ -330,8 +337,10 @@ UserList = function UserList(version, serviceSid) { * @memberof Twilio.Notify.V1.ServiceContext.UserList * @instance * - * @param {string|list} [opts.identity] - The identity - * @param {string} [opts.segment] - The segment + * @param {string|list} [opts.identity] - + * The identifier of the User, defined by your application. + * @param {string} [opts.segment] - + * The list of segments this User belongs to. Segments can be used to select recipients of a notification. Maximum 20 Segments per User allowed. * @param {string} [targetUrl] - API-generated URL for the requested results page * @param {function} [callback] - Callback to handle list of records * @@ -430,7 +439,8 @@ UserPage.prototype.getInstance = function getInstance(payload) { * @property {string} sid - The sid * @property {string} accountSid - The account_sid * @property {string} serviceSid - The service_sid - * @property {string} identity - The identity + * @property {string} identity - + * The identifier of the User, defined by your application. * @property {Date} dateCreated - The date_created * @property {Date} dateUpdated - The date_updated * @property {string} segments - The segments diff --git a/lib/rest/studio/v1/flow/engagement.js b/lib/rest/studio/v1/flow/engagement.js index 7f73710c01..3be2e95b7a 100644 --- a/lib/rest/studio/v1/flow/engagement.js +++ b/lib/rest/studio/v1/flow/engagement.js @@ -487,6 +487,23 @@ EngagementInstance.prototype.fetch = function fetch(callback) { return this._proxy.fetch(callback); }; +/* jshint ignore:start */ +/** + * remove a EngagementInstance + * + * @function remove + * @memberof Twilio.Studio.V1.FlowContext.EngagementInstance + * @instance + * + * @param {function} [callback] - Callback to handle processed record + * + * @returns {Promise} Resolves to processed EngagementInstance + */ +/* jshint ignore:end */ +EngagementInstance.prototype.remove = function remove(callback) { + return this._proxy.remove(callback); +}; + /* jshint ignore:start */ /** * Access the steps @@ -607,6 +624,38 @@ EngagementContext.prototype.fetch = function fetch(callback) { return deferred.promise; }; +/* jshint ignore:start */ +/** + * remove a EngagementInstance + * + * @function remove + * @memberof Twilio.Studio.V1.FlowContext.EngagementContext + * @instance + * + * @param {function} [callback] - Callback to handle processed record + * + * @returns {Promise} Resolves to processed EngagementInstance + */ +/* jshint ignore:end */ +EngagementContext.prototype.remove = function remove(callback) { + var deferred = Q.defer(); + var promise = this._version.remove({uri: this._uri, method: 'DELETE'}); + + promise = promise.then(function(payload) { + deferred.resolve(payload); + }.bind(this)); + + promise.catch(function(error) { + deferred.reject(error); + }); + + if (_.isFunction(callback)) { + deferred.promise.nodeify(callback); + } + + return deferred.promise; +}; + Object.defineProperty(EngagementContext.prototype, 'steps', { get: function() { diff --git a/lib/rest/trunking/v1/trunk.js b/lib/rest/trunking/v1/trunk.js index c8e9c13d3c..87585bc34c 100644 --- a/lib/rest/trunking/v1/trunk.js +++ b/lib/rest/trunking/v1/trunk.js @@ -73,8 +73,10 @@ TrunkList = function TrunkList(version) { * The HTTP URL that Twilio will request if an error occurs while sending SIP traffic towards your configured Origination URL. * @param {string} [opts.disasterRecoveryMethod] - * The HTTP method Twilio will use when requesting the DisasterRecoveryUrl. - * @param {string} [opts.recording] - The recording settings for this trunk. + * @param {trunk.recording_setting} [opts.recording] - + * The recording settings for this trunk. * @param {boolean} [opts.secure] - The Secure Trunking settings for this trunk. + * @param {boolean} [opts.cnamLookupEnabled] - The cnam_lookup_enabled * @param {function} [callback] - Callback to handle processed record * * @returns {Promise} Resolves to processed TrunkInstance @@ -94,7 +96,8 @@ TrunkList = function TrunkList(version) { 'DisasterRecoveryUrl': _.get(opts, 'disasterRecoveryUrl'), 'DisasterRecoveryMethod': _.get(opts, 'disasterRecoveryMethod'), 'Recording': _.get(opts, 'recording'), - 'Secure': serialize.bool(_.get(opts, 'secure')) + 'Secure': serialize.bool(_.get(opts, 'secure')), + 'CnamLookupEnabled': serialize.bool(_.get(opts, 'cnamLookupEnabled')) }); var promise = this._version.create({uri: this._uri, method: 'POST', data: data}); @@ -428,6 +431,7 @@ TrunkPage.prototype.getInstance = function getInstance(payload) { * @property {string} friendlyName - A human-readable name for the Trunk. * @property {boolean} secure - The Secure Trunking settings for this trunk. * @property {string} recording - The recording settings for this trunk. + * @property {boolean} cnamLookupEnabled - The cnam_lookup_enabled * @property {string} authType - * The types of authentication you have mapped to your domain. * @property {string} authTypeSet - The auth_type_set @@ -455,6 +459,7 @@ TrunkInstance = function TrunkInstance(version, payload, sid) { this.friendlyName = payload.friendly_name; // jshint ignore:line this.secure = payload.secure; // jshint ignore:line this.recording = payload.recording; // jshint ignore:line + this.cnamLookupEnabled = payload.cnam_lookup_enabled; // jshint ignore:line this.authType = payload.auth_type; // jshint ignore:line this.authTypeSet = payload.auth_type_set; // jshint ignore:line this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line @@ -529,8 +534,10 @@ TrunkInstance.prototype.remove = function remove(callback) { * The HTTP URL that Twilio will request if an error occurs while sending SIP traffic towards your configured Origination URL. * @param {string} [opts.disasterRecoveryMethod] - * The HTTP method Twilio will use when requesting the DisasterRecoveryUrl. - * @param {string} [opts.recording] - The recording settings for this trunk. + * @param {trunk.recording_setting} [opts.recording] - + * The recording settings for this trunk. * @param {boolean} [opts.secure] - The Secure Trunking settings for this trunk. + * @param {boolean} [opts.cnamLookupEnabled] - The cnam_lookup_enabled * @param {function} [callback] - Callback to handle processed record * * @returns {Promise} Resolves to processed TrunkInstance @@ -737,8 +744,10 @@ TrunkContext.prototype.remove = function remove(callback) { * The HTTP URL that Twilio will request if an error occurs while sending SIP traffic towards your configured Origination URL. * @param {string} [opts.disasterRecoveryMethod] - * The HTTP method Twilio will use when requesting the DisasterRecoveryUrl. - * @param {string} [opts.recording] - The recording settings for this trunk. + * @param {trunk.recording_setting} [opts.recording] - + * The recording settings for this trunk. * @param {boolean} [opts.secure] - The Secure Trunking settings for this trunk. + * @param {boolean} [opts.cnamLookupEnabled] - The cnam_lookup_enabled * @param {function} [callback] - Callback to handle processed record * * @returns {Promise} Resolves to processed TrunkInstance @@ -758,7 +767,8 @@ TrunkContext.prototype.update = function update(opts, callback) { 'DisasterRecoveryUrl': _.get(opts, 'disasterRecoveryUrl'), 'DisasterRecoveryMethod': _.get(opts, 'disasterRecoveryMethod'), 'Recording': _.get(opts, 'recording'), - 'Secure': serialize.bool(_.get(opts, 'secure')) + 'Secure': serialize.bool(_.get(opts, 'secure')), + 'CnamLookupEnabled': serialize.bool(_.get(opts, 'cnamLookupEnabled')) }); var promise = this._version.update({uri: this._uri, method: 'POST', data: data}); diff --git a/lib/rest/trunking/v1/trunk/credentialList.js b/lib/rest/trunking/v1/trunk/credentialList.js index d36da20330..dcfe75123c 100644 --- a/lib/rest/trunking/v1/trunk/credentialList.js +++ b/lib/rest/trunking/v1/trunk/credentialList.js @@ -61,7 +61,8 @@ CredentialListList = function CredentialListList(version, trunkSid) { * @instance * * @param {object} opts - ... - * @param {string} opts.credentialListSid - The credential_list_sid + * @param {string} opts.credentialListSid - + * The SID of the Credential List that you want to associate with this trunk. Once associated, Twilio will start authenticating access to the trunk against this list. * @param {function} [callback] - Callback to handle processed record * * @returns {Promise} Resolves to processed CredentialListInstance diff --git a/lib/rest/trunking/v1/trunk/ipAccessControlList.js b/lib/rest/trunking/v1/trunk/ipAccessControlList.js index 1130fc84c0..2b58faccf1 100644 --- a/lib/rest/trunking/v1/trunk/ipAccessControlList.js +++ b/lib/rest/trunking/v1/trunk/ipAccessControlList.js @@ -27,7 +27,7 @@ var IpAccessControlListContext; * @description Initialize the IpAccessControlListList * * @param {Twilio.Trunking.V1} version - Version of the resource - * @param {string} trunkSid - The trunk_sid + * @param {string} trunkSid - The unique sid that identifies the associated Trunk */ /* jshint ignore:end */ IpAccessControlListList = function IpAccessControlListList(version, trunkSid) { @@ -61,7 +61,8 @@ IpAccessControlListList = function IpAccessControlListList(version, trunkSid) { * @instance * * @param {object} opts - ... - * @param {string} opts.ipAccessControlListSid - The ip_access_control_list_sid + * @param {string} opts.ipAccessControlListSid - + * The SID of the IP Access Control List that you want to associate with this trunk. * @param {function} [callback] - Callback to handle processed record * * @returns {Promise} Resolves to processed IpAccessControlListInstance @@ -405,12 +406,13 @@ IpAccessControlListPage.prototype.getInstance = function getInstance(payload) { * @constructor Twilio.Trunking.V1.TrunkContext.IpAccessControlListInstance * @description Initialize the IpAccessControlListContext * - * @property {string} accountSid - The account_sid - * @property {string} sid - The sid - * @property {string} trunkSid - The trunk_sid - * @property {string} friendlyName - The friendly_name - * @property {Date} dateCreated - The date_created - * @property {Date} dateUpdated - The date_updated + * @property {string} accountSid - The unique sid that identifies this account + * @property {string} sid - A string that uniquely identifies this resource + * @property {string} trunkSid - + * The unique sid that identifies the associated Trunk + * @property {string} friendlyName - A human readable description of this resource + * @property {Date} dateCreated - The date this resource was created + * @property {Date} dateUpdated - The date this resource was last updated * @property {string} url - The url * * @param {Twilio.Trunking.V1} version - Version of the resource diff --git a/lib/rest/video/v1/composition.js b/lib/rest/video/v1/composition.js index fa9562aba3..abbb798eb8 100644 --- a/lib/rest/video/v1/composition.js +++ b/lib/rest/video/v1/composition.js @@ -69,9 +69,12 @@ CompositionList = function CompositionList(version) { * @instance * * @param {object|function} opts - ... - * @param {composition.status} [opts.status] - The status - * @param {Date} [opts.dateCreatedAfter] - The date_created_after - * @param {Date} [opts.dateCreatedBefore] - The date_created_before + * @param {composition.status} [opts.status] - + * Only show Compositions with the given status. + * @param {Date} [opts.dateCreatedAfter] - + * Only show Compositions that started on or after this ISO8601 date-time. + * @param {Date} [opts.dateCreatedBefore] - + * Only show Compositions that started before this this ISO8601 date-time. * @param {string} [opts.roomSid] - The room_sid * @param {number} [opts.limit] - * Upper limit for the number of records to return. @@ -161,9 +164,12 @@ CompositionList = function CompositionList(version) { * @instance * * @param {object|function} opts - ... - * @param {composition.status} [opts.status] - The status - * @param {Date} [opts.dateCreatedAfter] - The date_created_after - * @param {Date} [opts.dateCreatedBefore] - The date_created_before + * @param {composition.status} [opts.status] - + * Only show Compositions with the given status. + * @param {Date} [opts.dateCreatedAfter] - + * Only show Compositions that started on or after this ISO8601 date-time. + * @param {Date} [opts.dateCreatedBefore] - + * Only show Compositions that started before this this ISO8601 date-time. * @param {string} [opts.roomSid] - The room_sid * @param {number} [opts.limit] - * Upper limit for the number of records to return. @@ -224,9 +230,12 @@ CompositionList = function CompositionList(version) { * @instance * * @param {object|function} opts - ... - * @param {composition.status} [opts.status] - The status - * @param {Date} [opts.dateCreatedAfter] - The date_created_after - * @param {Date} [opts.dateCreatedBefore] - The date_created_before + * @param {composition.status} [opts.status] - + * Only show Compositions with the given status. + * @param {Date} [opts.dateCreatedAfter] - + * Only show Compositions that started on or after this ISO8601 date-time. + * @param {Date} [opts.dateCreatedBefore] - + * Only show Compositions that started before this this ISO8601 date-time. * @param {string} [opts.roomSid] - The room_sid * @param {string} [opts.pageToken] - PageToken provided by the API * @param {number} [opts.pageNumber] - @@ -283,9 +292,12 @@ CompositionList = function CompositionList(version) { * @memberof Twilio.Video.V1.CompositionList * @instance * - * @param {composition.status} [opts.status] - The status - * @param {Date} [opts.dateCreatedAfter] - The date_created_after - * @param {Date} [opts.dateCreatedBefore] - The date_created_before + * @param {composition.status} [opts.status] - + * Only show Compositions with the given status. + * @param {Date} [opts.dateCreatedAfter] - + * Only show Compositions that started on or after this ISO8601 date-time. + * @param {Date} [opts.dateCreatedBefore] - + * Only show Compositions that started before this this ISO8601 date-time. * @param {string} [opts.roomSid] - The room_sid * @param {string} [targetUrl] - API-generated URL for the requested results page * @param {function} [callback] - Callback to handle list of records @@ -322,15 +334,21 @@ CompositionList = function CompositionList(version) { * @instance * * @param {object|function} opts - ... - * @param {string} [opts.roomSid] - The room_sid - * @param {string} [opts.videoLayout] - The video_layout - * @param {string|list} [opts.audioSources] - The audio_sources - * @param {string|list} [opts.audioSourcesExcluded] - The audio_sources_excluded - * @param {string} [opts.resolution] - The resolution - * @param {composition.format} [opts.format] - The format - * @param {string} [opts.statusCallback] - The status_callback - * @param {string} [opts.statusCallbackMethod] - The status_callback_method - * @param {boolean} [opts.trim] - The trim + * @param {string} [opts.roomSid] - Twilio Room SID. + * @param {string} [opts.videoLayout] - The JSON video layout description. + * @param {string|list} [opts.audioSources] - + * A list of audio sources related to this Composition. + * @param {string|list} [opts.audioSourcesExcluded] - + * A list of audio sources excluded related to this Composition. + * @param {string} [opts.resolution] - Pixel resolution of the composed video. + * @param {composition.format} [opts.format] - + * ontainer format of the Composition media file. Any of the following: `mp4`, `webm`. + * @param {string} [opts.statusCallback] - + * A URL that Twilio sends asynchronous webhook requests to on every composition event. + * @param {string} [opts.statusCallbackMethod] - + * HTTP method Twilio should use when requesting the above URL. + * @param {boolean} [opts.trim] - + * Boolean flag for clipping intervals that have no media. * @param {function} [callback] - Callback to handle processed record * * @returns {Promise} Resolves to processed CompositionInstance @@ -381,7 +399,8 @@ CompositionList = function CompositionList(version) { * @memberof Twilio.Video.V1.CompositionList * @instance * - * @param {string} sid - The sid + * @param {string} sid - + * The Composition Sid that uniquely identifies the Composition to fetch. * * @returns {Twilio.Video.V1.CompositionContext} */ @@ -442,28 +461,36 @@ CompositionPage.prototype.getInstance = function getInstance(payload) { * @description Initialize the CompositionContext * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com. * - * @property {string} accountSid - The account_sid - * @property {composition.status} status - The status - * @property {Date} dateCreated - The date_created - * @property {string} dateCompleted - The date_completed - * @property {string} dateDeleted - The date_deleted - * @property {string} sid - The sid - * @property {string} roomSid - The room_sid - * @property {string} audioSources - The audio_sources - * @property {string} audioSourcesExcluded - The audio_sources_excluded - * @property {string} videoLayout - The video_layout - * @property {string} resolution - The resolution - * @property {boolean} trim - The trim - * @property {composition.format} format - The format + * @property {string} accountSid - Twilio Account SID. + * @property {composition.status} status - The status of the Composition. + * @property {Date} dateCreated - Date when the Composition Resource was created. + * @property {string} dateCompleted - Date when the media processing task finished. + * @property {string} dateDeleted - + * Date when the Composition Resource generated media was deleted. + * @property {string} sid - + * A 34-character string that uniquely identifies this Composition. + * @property {string} roomSid - + * A 34-character string that uniquely identifies the source of this Composition. + * @property {string} audioSources - + * A list of audio sources related to this Composition. + * @property {string} audioSourcesExcluded - + * A list of audio sources excluded related to this Composition. + * @property {string} videoLayout - The JSON video layout description. + * @property {string} resolution - Pixel resolution of the composed video. + * @property {boolean} trim - + * Boolean flag for clipping intervals that have no media. + * @property {composition.format} format - The file format for this Composition. * @property {number} bitrate - The bitrate - * @property {number} size - The size - * @property {number} duration - The duration - * @property {string} url - The url - * @property {string} links - The links + * @property {number} size - Size of the Composed media file expressed in bytes. + * @property {number} duration - Duration of the Composed media in seconds. + * @property {string} url - The absolute URL for this resource. + * @property {string} links - + * JSON object with the URL where the media file can be fetched. * * @param {Twilio.Video.V1} version - Version of the resource * @param {object} payload - The instance payload - * @param {sid} sid - The sid + * @param {sid} sid - + * The Composition Sid that uniquely identifies the Composition to fetch. */ /* jshint ignore:end */ CompositionInstance = function CompositionInstance(version, payload, sid) { @@ -569,7 +596,8 @@ CompositionInstance.prototype.toJSON = function toJSON() { * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com. * * @param {Twilio.Video.V1} version - Version of the resource - * @param {sid} sid - The sid + * @param {sid} sid - + * The Composition Sid that uniquely identifies the Composition to fetch. */ /* jshint ignore:end */ CompositionContext = function CompositionContext(version, sid) { diff --git a/lib/rest/video/v1/room/roomParticipant/roomParticipantPublishedTrack.js b/lib/rest/video/v1/room/roomParticipant/roomParticipantPublishedTrack.js index 61fcc39764..43566222a0 100644 --- a/lib/rest/video/v1/room/roomParticipant/roomParticipantPublishedTrack.js +++ b/lib/rest/video/v1/room/roomParticipant/roomParticipantPublishedTrack.js @@ -27,8 +27,9 @@ var PublishedTrackContext; * @description Initialize the PublishedTrackList * * @param {Twilio.Video.V1} version - Version of the resource - * @param {string} roomSid - The room_sid - * @param {string} participantSid - The participant_sid + * @param {string} roomSid - Unique Room identifier where this Track is published. + * @param {string} participantSid - + * Unique Participant identifier that publishes this Track. */ /* jshint ignore:end */ PublishedTrackList = function PublishedTrackList(version, roomSid, @@ -298,7 +299,8 @@ PublishedTrackList = function PublishedTrackList(version, roomSid, * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.PublishedTrackList * @instance * - * @param {string} sid - The sid + * @param {string} sid - + * A 34 character string that uniquely identifies this resource. * * @returns {Twilio.Video.V1.RoomContext.ParticipantContext.PublishedTrackContext} */ @@ -367,21 +369,28 @@ PublishedTrackPage.prototype.getInstance = function getInstance(payload) { * @constructor Twilio.Video.V1.RoomContext.ParticipantContext.PublishedTrackInstance * @description Initialize the PublishedTrackContext * - * @property {string} sid - The sid - * @property {string} participantSid - The participant_sid - * @property {string} roomSid - The room_sid - * @property {string} name - The name - * @property {Date} dateCreated - The date_created - * @property {Date} dateUpdated - The date_updated - * @property {boolean} enabled - The enabled - * @property {published_track.kind} kind - The kind - * @property {string} url - The url + * @property {string} sid - + * A 34 character string that uniquely identifies this resource. + * @property {string} participantSid - + * Unique Participant identifier that publishes this Track. + * @property {string} roomSid - + * Unique Room identifier where this Track is published. + * @property {string} name - Track name. Limited to 128 characters. + * @property {Date} dateCreated - The date that this resource was created. + * @property {Date} dateUpdated - The date that this resource was last updated. + * @property {boolean} enabled - Specifies whether the Track is enabled or not. + * @property {published_track.kind} kind - + * Specifies whether Track represents `audio`, `video` or `data` + * @property {string} url - The absolute URL for this resource. * * @param {Twilio.Video.V1} version - Version of the resource * @param {object} payload - The instance payload - * @param {sid_like} roomSid - The room_sid - * @param {sid_like} participantSid - The participant_sid - * @param {sid_like} sid - The sid + * @param {sid_like} roomSid - + * Unique Room identifier where this Track is published. + * @param {sid_like} participantSid - + * Unique Participant identifier that publishes this Track. + * @param {sid_like} sid - + * A 34 character string that uniquely identifies this resource. */ /* jshint ignore:end */ PublishedTrackInstance = function PublishedTrackInstance(version, payload, @@ -467,9 +476,12 @@ PublishedTrackInstance.prototype.toJSON = function toJSON() { * @description Initialize the PublishedTrackContext * * @param {Twilio.Video.V1} version - Version of the resource - * @param {sid_like} roomSid - The room_sid - * @param {sid_like} participantSid - The participant_sid - * @param {sid_like} sid - The sid + * @param {sid_like} roomSid - + * Unique Room identifier where this Track is published. + * @param {sid_like} participantSid - + * Unique Participant identifier that publishes this Track. + * @param {sid_like} sid - + * A 34 character string that uniquely identifies this resource. */ /* jshint ignore:end */ PublishedTrackContext = function PublishedTrackContext(version, roomSid, diff --git a/lib/twiml/VoiceResponse.d.ts b/lib/twiml/VoiceResponse.d.ts index 38a5090d4f..a4831bc83e 100644 --- a/lib/twiml/VoiceResponse.d.ts +++ b/lib/twiml/VoiceResponse.d.ts @@ -123,43 +123,43 @@ declare class VoiceResponse { declare namespace VoiceResponse { - type ConferenceTrim = 'trim-silence'|'do-not-trim'; + type RecordTrim = 'trim-silence'|'do-not-trim'; - type GatherLanguage = 'af-ZA'|'id-ID'|'ms-MY'|'ca-ES'|'cs-CZ'|'da-DK'|'de-DE'|'en-AU'|'en-CA'|'en-GB'|'en-IN'|'en-IE'|'en-NZ'|'en-PH'|'en-ZA'|'en-US'|'es-AR'|'es-BO'|'es-CL'|'es-CO'|'es-CR'|'es-EC'|'es-SV'|'es-ES'|'es-US'|'es-GT'|'es-HN'|'es-MX'|'es-NI'|'es-PA'|'es-PY'|'es-PE'|'es-PR'|'es-DO'|'es-UY'|'es-VE'|'eu-ES'|'il-PH'|'fr-CA'|'fr-FR'|'gl-ES'|'hr-HR'|'zu-ZA'|'is-IS'|'it-IT'|'lt-LT'|'hu-HU'|'nl-NL'|'nb-NO'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'sk-SK'|'sl-SI'|'fi-FI'|'sv-SE'|'vi-VN'|'tr-TR'|'el-GR'|'bg-BG'|'ru-RU'|'sr-RS'|'uk-UA'|'he-IL'|'ar-IL'|'ar-JO'|'ar-AE'|'ar-BH'|'ar-DZ'|'ar-SA'|'ar-IQ'|'ar-KW'|'ar-MA'|'ar-TN'|'ar-OM'|'ar-PS'|'ar-QA'|'ar-LB'|'ar-EG'|'fa-IR'|'hi-IN'|'th-TH'|'ko-KR'|'cmn-Hant-TW'|'yue-Hant-HK'|'ja-JP'|'cmn-Hans-HK'|'cmn-Hans-CN'; + type DialRingTone = 'at'|'au'|'bg'|'br'|'be'|'ch'|'cl'|'cn'|'cz'|'de'|'dk'|'ee'|'es'|'fi'|'fr'|'gr'|'hu'|'il'|'in'|'it'|'lt'|'jp'|'mx'|'my'|'nl'|'no'|'nz'|'ph'|'pl'|'pt'|'ru'|'se'|'sg'|'th'|'uk'|'us'|'us-old'|'tw'|'ve'|'za'; type SipEvent = 'initiated'|'ringing'|'answered'|'completed'; - type RejectReason = 'rejected'|'busy'; - - type ConferenceBeep = 'true'|'false'|'onEnter'|'onExit'; + type DialTrim = 'trim-silence'|'do-not-trim'; type ConferenceEvent = 'start'|'end'|'join'|'leave'|'mute'|'hold'|'speaker'; - type ConferenceRecord = 'do-not-record'|'record-from-start'; + type DialRecordingEvent = 'in-progress'|'completed'|'failed'; + + type RejectReason = 'rejected'|'busy'; type SayVoice = 'man'|'woman'|'alice'; + type ClientEvent = 'initiated'|'ringing'|'answered'|'completed'; + type NumberEvent = 'initiated'|'ringing'|'answered'|'completed'; - type RecordTrim = 'trim-silence'|'do-not-trim'; + type ConferenceRegion = 'us1'|'ie1'|'sg1'|'br1'|'au1'|'jp1'; type ConferenceRecordingEvent = 'started'|'stopped'|'paused'|'resumed'|'completed'|'failed'; - type SayLanguage = 'da-DK'|'de-DE'|'en-AU'|'en-CA'|'en-GB'|'en-IN'|'en-US'|'ca-ES'|'es-ES'|'es-MX'|'fi-FI'|'fr-CA'|'fr-FR'|'it-IT'|'ja-JP'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ru-RU'|'sv-SE'|'zh-CN'|'zh-HK'|'zh-TW'; - - type DialRingTone = 'at'|'au'|'bg'|'br'|'be'|'ch'|'cl'|'cn'|'cz'|'de'|'dk'|'ee'|'es'|'fi'|'fr'|'gr'|'hu'|'il'|'in'|'it'|'lt'|'jp'|'mx'|'my'|'nl'|'no'|'nz'|'ph'|'pl'|'pt'|'ru'|'se'|'sg'|'th'|'uk'|'us'|'us-old'|'tw'|'ve'|'za'; - - type DialRecordingEvent = 'in-progress'|'completed'|'failed'; + type ConferenceBeep = 'true'|'false'|'onEnter'|'onExit'; - type DialRecord = 'do-not-record'|'record-from-answer'|'record-from-ringing'|'record-from-answer-dual'|'record-from-ringing-dual'; + type ConferenceRecord = 'do-not-record'|'record-from-start'; - type ClientEvent = 'initiated'|'ringing'|'answered'|'completed'; + type ConferenceTrim = 'trim-silence'|'do-not-trim'; type GatherInput = 'dtmf'|'speech'; - type ConferenceRegion = 'us1'|'ie1'|'sg1'|'br1'|'au1'|'jp1'; + type GatherLanguage = 'af-ZA'|'id-ID'|'ms-MY'|'ca-ES'|'cs-CZ'|'da-DK'|'de-DE'|'en-AU'|'en-CA'|'en-GB'|'en-IN'|'en-IE'|'en-NZ'|'en-PH'|'en-ZA'|'en-US'|'es-AR'|'es-BO'|'es-CL'|'es-CO'|'es-CR'|'es-EC'|'es-SV'|'es-ES'|'es-US'|'es-GT'|'es-HN'|'es-MX'|'es-NI'|'es-PA'|'es-PY'|'es-PE'|'es-PR'|'es-DO'|'es-UY'|'es-VE'|'eu-ES'|'il-PH'|'fr-CA'|'fr-FR'|'gl-ES'|'hr-HR'|'zu-ZA'|'is-IS'|'it-IT'|'lt-LT'|'hu-HU'|'nl-NL'|'nb-NO'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'sk-SK'|'sl-SI'|'fi-FI'|'sv-SE'|'vi-VN'|'tr-TR'|'el-GR'|'bg-BG'|'ru-RU'|'sr-RS'|'uk-UA'|'he-IL'|'ar-IL'|'ar-JO'|'ar-AE'|'ar-BH'|'ar-DZ'|'ar-SA'|'ar-IQ'|'ar-KW'|'ar-MA'|'ar-TN'|'ar-OM'|'ar-PS'|'ar-QA'|'ar-LB'|'ar-EG'|'fa-IR'|'hi-IN'|'th-TH'|'ko-KR'|'cmn-Hant-TW'|'yue-Hant-HK'|'ja-JP'|'cmn-Hans-HK'|'cmn-Hans-CN'; - type DialTrim = 'trim-silence'|'do-not-trim'; + type DialRecord = 'do-not-record'|'record-from-answer'|'record-from-ringing'|'record-from-answer-dual'|'record-from-ringing-dual'; + + type SayLanguage = 'da-DK'|'de-DE'|'en-AU'|'en-CA'|'en-GB'|'en-IN'|'en-US'|'ca-ES'|'es-ES'|'es-MX'|'fi-FI'|'fr-CA'|'fr-FR'|'it-IT'|'ja-JP'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ru-RU'|'sv-SE'|'zh-CN'|'zh-HK'|'zh-TW'; /** * Attributes for TwiML for Voice diff --git a/spec/integration/rest/studio/v1/flow/engagement.spec.js b/spec/integration/rest/studio/v1/flow/engagement.spec.js index 98037a316b..83db05e373 100644 --- a/spec/integration/rest/studio/v1/flow/engagement.spec.js +++ b/spec/integration/rest/studio/v1/flow/engagement.spec.js @@ -192,6 +192,48 @@ describe('Engagement', function() { throw new Error('failed'); }); + promise.done(); + } + ); + it('should generate valid remove request', + function() { + holodeck.mock(new Response(500, '{}')); + + var promise = client.studio.v1.flows('FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') + .engagements('FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').remove(); + promise = promise.then(function() { + throw new Error('failed'); + }, function(error) { + expect(error.constructor).toBe(RestException.prototype.constructor); + }); + promise.done(); + + var solution = { + flowSid: 'FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', + sid: 'FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' + }; + var url = _.template('https://studio.twilio.com/v1/Flows/<%= flowSid %>/Engagements/<%= sid %>')(solution); + + holodeck.assertHasRequest(new Request({ + method: 'DELETE', + url: url + })); + } + ); + it('should generate valid delete response', + function() { + var body = JSON.stringify(null); + + holodeck.mock(new Response(204, body)); + + var promise = client.studio.v1.flows('FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') + .engagements('FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').remove(); + promise = promise.then(function(response) { + expect(response).toBe(true); + }, function() { + throw new Error('failed'); + }); + promise.done(); } ); diff --git a/spec/integration/rest/trunking/v1/trunk.spec.js b/spec/integration/rest/trunking/v1/trunk.spec.js index 05b047914d..4f019b0485 100644 --- a/spec/integration/rest/trunking/v1/trunk.spec.js +++ b/spec/integration/rest/trunking/v1/trunk.spec.js @@ -61,6 +61,7 @@ describe('Trunk', function() { 'disaster_recovery_url': 'http://disaster-recovery.com', 'friendly_name': 'friendly_name', 'secure': false, + 'cnam_lookup_enabled': false, 'recording': { 'mode': 'do-not-record', 'trim': 'do-not-trim' @@ -69,12 +70,12 @@ describe('Trunk', function() { 'auth_type_set': [], 'date_created': '2015-01-02T11:23:45Z', 'date_updated': '2015-01-02T11:23:45Z', - 'url': 'http://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'url': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'links': { - 'origination_urls': 'http://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls', - 'credential_lists': 'http://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialLists', - 'ip_access_control_lists': 'http://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlLists', - 'phone_numbers': 'http://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers' + 'origination_urls': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls', + 'credential_lists': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialLists', + 'ip_access_control_lists': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlLists', + 'phone_numbers': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers' } }); @@ -157,6 +158,7 @@ describe('Trunk', function() { 'disaster_recovery_url': 'http://disaster-recovery.com', 'friendly_name': 'friendly_name', 'secure': false, + 'cnam_lookup_enabled': false, 'recording': { 'mode': 'do-not-record', 'trim': 'do-not-trim' @@ -165,12 +167,12 @@ describe('Trunk', function() { 'auth_type_set': [], 'date_created': '2015-01-02T11:23:45Z', 'date_updated': '2015-01-02T11:23:45Z', - 'url': 'http://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'url': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'links': { - 'origination_urls': 'http://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls', - 'credential_lists': 'http://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialLists', - 'ip_access_control_lists': 'http://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlLists', - 'phone_numbers': 'http://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers' + 'origination_urls': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls', + 'credential_lists': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialLists', + 'ip_access_control_lists': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlLists', + 'phone_numbers': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers' } }); @@ -210,13 +212,13 @@ describe('Trunk', function() { function() { var body = JSON.stringify({ 'meta': { - 'first_page_url': 'https://trunking.twilio.com/v1/Trunks?PageSize=1&Page=0', + 'first_page_url': 'https://trunking.twilio.com/v1/Trunks?PageSize=50&Page=0', + 'url': 'https://trunking.twilio.com/v1/Trunks?PageSize=50&Page=0', + 'page_size': 50, 'key': 'trunks', 'next_page_url': null, 'page': 0, - 'page_size': 1, - 'previous_page_url': null, - 'url': 'https://trunking.twilio.com/v1/Trunks?PageSize=1&Page=0' + 'previous_page_url': null }, 'trunks': [ { @@ -227,6 +229,7 @@ describe('Trunk', function() { 'disaster_recovery_url': 'http://disaster-recovery.com', 'friendly_name': 'friendly_name', 'secure': false, + 'cnam_lookup_enabled': false, 'recording': { 'mode': 'do-not-record', 'trim': 'do-not-trim' @@ -235,12 +238,12 @@ describe('Trunk', function() { 'auth_type_set': [], 'date_created': '2015-01-02T11:23:45Z', 'date_updated': '2015-01-02T11:23:45Z', - 'url': 'http://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'url': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'links': { - 'origination_urls': 'http://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls', - 'credential_lists': 'http://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialLists', - 'ip_access_control_lists': 'http://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlLists', - 'phone_numbers': 'http://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers' + 'origination_urls': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls', + 'credential_lists': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialLists', + 'ip_access_control_lists': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlLists', + 'phone_numbers': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers' } } ] @@ -262,13 +265,13 @@ describe('Trunk', function() { function() { var body = JSON.stringify({ 'meta': { - 'first_page_url': 'https://trunking.twilio.com/v1/Trunks?PageSize=1&Page=0', + 'first_page_url': 'https://trunking.twilio.com/v1/Trunks?PageSize=50&Page=0', + 'url': 'https://trunking.twilio.com/v1/Trunks?PageSize=50&Page=0', + 'page_size': 50, 'key': 'trunks', 'next_page_url': null, 'page': 0, - 'page_size': 1, - 'previous_page_url': null, - 'url': 'https://trunking.twilio.com/v1/Trunks?PageSize=1&Page=0' + 'previous_page_url': null }, 'trunks': [] }); @@ -316,6 +319,7 @@ describe('Trunk', function() { 'disaster_recovery_url': 'http://updated-recovery.com', 'friendly_name': 'updated_name', 'secure': true, + 'cnam_lookup_enabled': true, 'recording': { 'mode': 'do-not-record', 'trim': 'do-not-trim' @@ -324,12 +328,12 @@ describe('Trunk', function() { 'auth_type_set': [], 'date_created': '2015-01-02T11:23:45Z', 'date_updated': '2015-01-02T11:23:45Z', - 'url': 'http://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'url': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'links': { - 'origination_urls': 'http://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls', - 'credential_lists': 'http://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialLists', - 'ip_access_control_lists': 'http://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlLists', - 'phone_numbers': 'http://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers' + 'origination_urls': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls', + 'credential_lists': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialLists', + 'ip_access_control_lists': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlLists', + 'phone_numbers': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers' } }); diff --git a/spec/integration/rest/trunking/v1/trunk/credentialList.spec.js b/spec/integration/rest/trunking/v1/trunk/credentialList.spec.js index 1c7340ee18..366726dee5 100644 --- a/spec/integration/rest/trunking/v1/trunk/credentialList.spec.js +++ b/spec/integration/rest/trunking/v1/trunk/credentialList.spec.js @@ -60,9 +60,9 @@ describe('CredentialList', function() { var body = JSON.stringify({ 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'trunk_sid': 'TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'date_created': 'Wed, 11 Sep 2013 17:51:38 -0000', - 'date_updated': 'Wed, 11 Sep 2013 17:51:38 -0000', - 'friendly_name': 'Low Rises', + 'date_created': '2018-04-28T00:10:23Z', + 'date_updated': '2018-04-28T00:10:23Z', + 'friendly_name': 'friendly_name', 'sid': 'CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'url': 'https://trunking.twilio.com/v1/Trunks/TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialLists/CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' }); @@ -152,9 +152,9 @@ describe('CredentialList', function() { var body = JSON.stringify({ 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'trunk_sid': 'TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'date_created': 'Wed, 11 Sep 2013 17:51:38 -0000', - 'date_updated': 'Wed, 11 Sep 2013 17:51:38 -0000', - 'friendly_name': 'Low Rises', + 'date_created': '2018-05-02T17:29:30Z', + 'date_updated': '2018-05-02T17:29:30Z', + 'friendly_name': 'friendly_name', 'sid': 'CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'url': 'https://trunking.twilio.com/v1/Trunks/TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialLists/CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' }); @@ -202,9 +202,9 @@ describe('CredentialList', function() { { 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'trunk_sid': 'TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'date_created': 'Wed, 11 Sep 2013 17:51:38 -0000', - 'date_updated': 'Wed, 11 Sep 2013 17:51:38 -0000', - 'friendly_name': 'Low Rises', + 'date_created': '2018-04-27T22:02:11Z', + 'date_updated': '2018-04-27T22:02:11Z', + 'friendly_name': 'friendly_name', 'sid': 'CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'url': 'https://trunking.twilio.com/v1/Trunks/TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialLists/CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' } diff --git a/spec/integration/rest/trunking/v1/trunk/ipAccessControlList.spec.js b/spec/integration/rest/trunking/v1/trunk/ipAccessControlList.spec.js index 2b14a1c15b..d222e24c0c 100644 --- a/spec/integration/rest/trunking/v1/trunk/ipAccessControlList.spec.js +++ b/spec/integration/rest/trunking/v1/trunk/ipAccessControlList.spec.js @@ -59,12 +59,12 @@ describe('IpAccessControlList', function() { function() { var body = JSON.stringify({ 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'date_created': '2015-07-30T20:00:00Z', - 'date_updated': '2015-07-30T20:00:00Z', + 'date_created': '2018-05-02T17:29:34Z', + 'date_updated': '2018-05-02T17:29:34Z', 'friendly_name': 'friendly_name', 'sid': 'ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'trunk_sid': 'TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'url': 'http://www.example.com' + 'url': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlLists/ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' }); holodeck.mock(new Response(200, body)); @@ -151,12 +151,12 @@ describe('IpAccessControlList', function() { function() { var body = JSON.stringify({ 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'date_created': '2015-07-30T20:00:00Z', - 'date_updated': '2015-07-30T20:00:00Z', + 'date_created': '2018-04-30T20:59:06Z', + 'date_updated': '2018-04-30T20:59:06Z', 'friendly_name': 'friendly_name', 'sid': 'ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'trunk_sid': 'TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'url': 'http://www.example.com' + 'url': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlLists/ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' }); holodeck.mock(new Response(201, body)); @@ -200,13 +200,13 @@ describe('IpAccessControlList', function() { var body = JSON.stringify({ 'ip_access_control_lists': [], 'meta': { - 'first_page_url': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlLists?Page=0&PageSize=50', + 'first_page_url': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlLists?PageSize=50&Page=0', 'key': 'ip_access_control_lists', 'next_page_url': null, 'page': 0, - 'page_size': 0, + 'page_size': 50, 'previous_page_url': null, - 'url': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlLists' + 'url': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlLists?PageSize=50&Page=0' } }); @@ -229,22 +229,22 @@ describe('IpAccessControlList', function() { 'ip_access_control_lists': [ { 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'date_created': '2015-07-30T20:00:00Z', - 'date_updated': '2015-07-30T20:00:00Z', + 'date_created': '2018-05-02T17:29:34Z', + 'date_updated': '2018-05-02T17:29:34Z', 'friendly_name': 'friendly_name', 'sid': 'ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'trunk_sid': 'TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'url': 'http://www.example.com' + 'url': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlLists/ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' } ], 'meta': { - 'first_page_url': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlLists?Page=0&PageSize=50', + 'first_page_url': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlLists?PageSize=50&Page=0', 'key': 'ip_access_control_lists', 'next_page_url': null, 'page': 0, - 'page_size': 1, + 'page_size': 50, 'previous_page_url': null, - 'url': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlLists' + 'url': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlLists?PageSize=50&Page=0' } }); diff --git a/spec/integration/rest/trunking/v1/trunk/originationUrl.spec.js b/spec/integration/rest/trunking/v1/trunk/originationUrl.spec.js index 43e06d428c..5d2efa379e 100644 --- a/spec/integration/rest/trunking/v1/trunk/originationUrl.spec.js +++ b/spec/integration/rest/trunking/v1/trunk/originationUrl.spec.js @@ -61,14 +61,14 @@ describe('OriginationUrl', function() { function() { var body = JSON.stringify({ 'weight': 1, - 'date_updated': '2015-01-02T11:23:45Z', - 'enabled': true, + 'date_updated': '2018-05-07T20:20:46Z', + 'enabled': false, 'friendly_name': 'friendly_name', 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'priority': 1, 'sip_url': 'sip://sip-box.com:1234', 'sid': 'OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'date_created': '2015-01-02T11:23:45Z', + 'date_created': '2018-05-07T20:20:46Z', 'trunk_sid': 'TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'url': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls/OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' }); @@ -169,14 +169,14 @@ describe('OriginationUrl', function() { function() { var body = JSON.stringify({ 'weight': 1, - 'date_updated': '2015-01-02T11:23:45Z', + 'date_updated': '2018-05-07T20:50:58Z', 'enabled': true, 'friendly_name': 'friendly_name', 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'priority': 1, 'sip_url': 'sip://sip-box.com:1234', 'sid': 'OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'date_created': '2015-01-02T11:23:45Z', + 'date_created': '2018-05-07T20:50:58Z', 'trunk_sid': 'TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'url': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls/OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' }); @@ -227,25 +227,25 @@ describe('OriginationUrl', function() { function() { var body = JSON.stringify({ 'meta': { - 'first_page_url': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls?PageSize=1&Page=0', + 'first_page_url': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls?PageSize=50&Page=0', 'key': 'origination_urls', 'next_page_url': null, 'page': 0, - 'page_size': 1, + 'page_size': 50, 'previous_page_url': null, - 'url': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls?PageSize=1&Page=0' + 'url': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls?PageSize=50&Page=0' }, 'origination_urls': [ { 'weight': 1, - 'date_updated': '2015-01-02T11:23:45Z', + 'date_updated': '2018-05-09T20:47:35Z', 'enabled': true, 'friendly_name': 'friendly_name', 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'priority': 1, 'sip_url': 'sip://sip-box.com:1234', 'sid': 'OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'date_created': '2015-01-02T11:23:45Z', + 'date_created': '2018-05-09T20:47:35Z', 'trunk_sid': 'TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'url': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls/OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' } @@ -269,13 +269,13 @@ describe('OriginationUrl', function() { function() { var body = JSON.stringify({ 'meta': { - 'first_page_url': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls?PageSize=1&Page=0', + 'first_page_url': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls?PageSize=50&Page=0', 'key': 'origination_urls', 'next_page_url': null, 'page': 0, - 'page_size': 1, + 'page_size': 50, 'previous_page_url': null, - 'url': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls?PageSize=1&Page=0' + 'url': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls?PageSize=50&Page=0' }, 'origination_urls': [] }); @@ -322,14 +322,14 @@ describe('OriginationUrl', function() { function() { var body = JSON.stringify({ 'weight': 2, - 'date_updated': '2015-01-02T11:23:45Z', + 'date_updated': '2018-05-07T20:50:58Z', 'enabled': false, 'friendly_name': 'updated_name', 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'priority': 2, 'sip_url': 'sip://sip-updated.com:4321', 'sid': 'OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'date_created': '2015-01-02T11:23:45Z', + 'date_created': '2018-05-07T20:50:58Z', 'trunk_sid': 'TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'url': 'https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls/OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' });