twilio 3.71.3 → 3.74.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (391) hide show
  1. package/README.md +2 -1
  2. package/lib/rest/Conversations.d.ts +2 -0
  3. package/lib/rest/Conversations.js +9 -0
  4. package/lib/rest/Insights.d.ts +4 -0
  5. package/lib/rest/Insights.js +16 -0
  6. package/lib/rest/Supersim.d.ts +2 -0
  7. package/lib/rest/Supersim.js +9 -0
  8. package/lib/rest/Voice.d.ts +2 -0
  9. package/lib/rest/Voice.js +9 -0
  10. package/lib/rest/accounts/v1/credential/aws.js +4 -2
  11. package/lib/rest/accounts/v1/credential/publicKey.js +4 -2
  12. package/lib/rest/api/v2010/account/address/dependentPhoneNumber.js +2 -0
  13. package/lib/rest/api/v2010/account/address.js +14 -12
  14. package/lib/rest/api/v2010/account/application.js +2 -0
  15. package/lib/rest/api/v2010/account/authorizedConnectApp.js +2 -0
  16. package/lib/rest/api/v2010/account/availablePhoneNumber/local.js +2 -0
  17. package/lib/rest/api/v2010/account/availablePhoneNumber/machineToMachine.js +2 -0
  18. package/lib/rest/api/v2010/account/availablePhoneNumber/mobile.js +2 -0
  19. package/lib/rest/api/v2010/account/availablePhoneNumber/national.js +2 -0
  20. package/lib/rest/api/v2010/account/availablePhoneNumber/sharedCost.js +2 -0
  21. package/lib/rest/api/v2010/account/availablePhoneNumber/tollFree.js +2 -0
  22. package/lib/rest/api/v2010/account/availablePhoneNumber/voip.js +2 -0
  23. package/lib/rest/api/v2010/account/availablePhoneNumber.js +2 -0
  24. package/lib/rest/api/v2010/account/call/event.js +2 -0
  25. package/lib/rest/api/v2010/account/call/feedback.js +2 -2
  26. package/lib/rest/api/v2010/account/call/feedbackSummary.js +4 -4
  27. package/lib/rest/api/v2010/account/call/notification.js +2 -0
  28. package/lib/rest/api/v2010/account/call/payment.js +8 -8
  29. package/lib/rest/api/v2010/account/call/recording.js +4 -2
  30. package/lib/rest/api/v2010/account/call/siprec.js +2 -2
  31. package/lib/rest/api/v2010/account/call/stream.d.ts +776 -0
  32. package/lib/rest/api/v2010/account/call/stream.js +810 -0
  33. package/lib/rest/api/v2010/account/call.d.ts +7 -0
  34. package/lib/rest/api/v2010/account/call.js +34 -4
  35. package/lib/rest/api/v2010/account/conference/participant.js +6 -4
  36. package/lib/rest/api/v2010/account/conference/recording.js +4 -2
  37. package/lib/rest/api/v2010/account/conference.js +2 -0
  38. package/lib/rest/api/v2010/account/connectApp.js +2 -0
  39. package/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn/assignedAddOnExtension.js +2 -0
  40. package/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn.js +4 -2
  41. package/lib/rest/api/v2010/account/incomingPhoneNumber/local.js +4 -2
  42. package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.js +4 -2
  43. package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.js +4 -2
  44. package/lib/rest/api/v2010/account/incomingPhoneNumber.js +2 -0
  45. package/lib/rest/api/v2010/account/key.js +2 -0
  46. package/lib/rest/api/v2010/account/message/media.js +2 -0
  47. package/lib/rest/api/v2010/account/message.d.ts +9 -1
  48. package/lib/rest/api/v2010/account/message.js +19 -4
  49. package/lib/rest/api/v2010/account/notification.js +2 -0
  50. package/lib/rest/api/v2010/account/outgoingCallerId.js +2 -0
  51. package/lib/rest/api/v2010/account/queue/member.js +4 -2
  52. package/lib/rest/api/v2010/account/queue.js +4 -2
  53. package/lib/rest/api/v2010/account/recording/addOnResult/payload.js +2 -0
  54. package/lib/rest/api/v2010/account/recording/addOnResult.js +2 -0
  55. package/lib/rest/api/v2010/account/recording/transcription.js +2 -0
  56. package/lib/rest/api/v2010/account/recording.js +2 -0
  57. package/lib/rest/api/v2010/account/shortCode.js +2 -0
  58. package/lib/rest/api/v2010/account/signingKey.js +2 -0
  59. package/lib/rest/api/v2010/account/sip/credentialList/credential.js +6 -4
  60. package/lib/rest/api/v2010/account/sip/credentialList.js +6 -4
  61. package/lib/rest/api/v2010/account/sip/domain/authTypes/authCallsMapping/authCallsCredentialListMapping.js +4 -2
  62. package/lib/rest/api/v2010/account/sip/domain/authTypes/authCallsMapping/authCallsIpAccessControlListMapping.js +4 -2
  63. package/lib/rest/api/v2010/account/sip/domain/authTypes/authRegistrationsMapping/authRegistrationsCredentialListMapping.js +4 -2
  64. package/lib/rest/api/v2010/account/sip/domain/credentialListMapping.js +4 -2
  65. package/lib/rest/api/v2010/account/sip/domain/ipAccessControlListMapping.js +4 -2
  66. package/lib/rest/api/v2010/account/sip/domain.js +4 -2
  67. package/lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.js +6 -4
  68. package/lib/rest/api/v2010/account/sip/ipAccessControlList.js +6 -4
  69. package/lib/rest/api/v2010/account/transcription.js +2 -0
  70. package/lib/rest/api/v2010/account/usage/record/allTime.js +2 -0
  71. package/lib/rest/api/v2010/account/usage/record/daily.js +2 -0
  72. package/lib/rest/api/v2010/account/usage/record/lastMonth.js +2 -0
  73. package/lib/rest/api/v2010/account/usage/record/monthly.js +2 -0
  74. package/lib/rest/api/v2010/account/usage/record/thisMonth.js +2 -0
  75. package/lib/rest/api/v2010/account/usage/record/today.js +2 -0
  76. package/lib/rest/api/v2010/account/usage/record/yearly.js +2 -0
  77. package/lib/rest/api/v2010/account/usage/record/yesterday.js +2 -0
  78. package/lib/rest/api/v2010/account/usage/record.js +2 -0
  79. package/lib/rest/api/v2010/account/usage/trigger.js +8 -6
  80. package/lib/rest/api/v2010/account/validationRequest.js +2 -2
  81. package/lib/rest/api/v2010/account.js +2 -0
  82. package/lib/rest/autopilot/v1/assistant/fieldType/fieldValue.js +6 -4
  83. package/lib/rest/autopilot/v1/assistant/fieldType.js +4 -2
  84. package/lib/rest/autopilot/v1/assistant/modelBuild.js +2 -0
  85. package/lib/rest/autopilot/v1/assistant/query.js +6 -4
  86. package/lib/rest/autopilot/v1/assistant/task/field.js +6 -4
  87. package/lib/rest/autopilot/v1/assistant/task/sample.js +6 -4
  88. package/lib/rest/autopilot/v1/assistant/task.js +4 -2
  89. package/lib/rest/autopilot/v1/assistant/webhook.js +8 -6
  90. package/lib/rest/autopilot/v1/assistant.js +2 -0
  91. package/lib/rest/autopilot/v1/restoreAssistant.js +2 -2
  92. package/lib/rest/bulkexports/v1/export/day.js +2 -0
  93. package/lib/rest/bulkexports/v1/export/exportCustomJob.js +8 -6
  94. package/lib/rest/chat/v1/credential.js +4 -2
  95. package/lib/rest/chat/v1/service/channel/invite.js +4 -2
  96. package/lib/rest/chat/v1/service/channel/member.js +4 -2
  97. package/lib/rest/chat/v1/service/channel/message.js +4 -2
  98. package/lib/rest/chat/v1/service/channel.js +2 -0
  99. package/lib/rest/chat/v1/service/role.js +10 -8
  100. package/lib/rest/chat/v1/service/user/userChannel.js +2 -0
  101. package/lib/rest/chat/v1/service/user.js +4 -2
  102. package/lib/rest/chat/v1/service.js +4 -2
  103. package/lib/rest/chat/v2/credential.js +4 -2
  104. package/lib/rest/chat/v2/service/binding.js +2 -0
  105. package/lib/rest/chat/v2/service/channel/invite.js +4 -2
  106. package/lib/rest/chat/v2/service/channel/member.js +4 -2
  107. package/lib/rest/chat/v2/service/channel/message.js +2 -0
  108. package/lib/rest/chat/v2/service/channel/webhook.js +4 -2
  109. package/lib/rest/chat/v2/service/channel.js +2 -0
  110. package/lib/rest/chat/v2/service/role.js +10 -8
  111. package/lib/rest/chat/v2/service/user/userBinding.js +2 -0
  112. package/lib/rest/chat/v2/service/user/userChannel.js +2 -0
  113. package/lib/rest/chat/v2/service/user.js +4 -2
  114. package/lib/rest/chat/v2/service.js +4 -2
  115. package/lib/rest/conversations/V1.d.ts +3 -0
  116. package/lib/rest/conversations/V1.js +13 -0
  117. package/lib/rest/conversations/v1/addressConfiguration.d.ts +397 -0
  118. package/lib/rest/conversations/v1/addressConfiguration.js +802 -0
  119. package/lib/rest/conversations/v1/conversation/message/deliveryReceipt.js +2 -0
  120. package/lib/rest/conversations/v1/conversation/message.js +2 -0
  121. package/lib/rest/conversations/v1/conversation/participant.js +2 -0
  122. package/lib/rest/conversations/v1/conversation/webhook.js +4 -2
  123. package/lib/rest/conversations/v1/conversation.js +2 -0
  124. package/lib/rest/conversations/v1/credential.js +4 -2
  125. package/lib/rest/conversations/v1/participantConversation.js +2 -0
  126. package/lib/rest/conversations/v1/role.js +10 -8
  127. package/lib/rest/conversations/v1/service/binding.js +2 -0
  128. package/lib/rest/conversations/v1/service/configuration/webhook.d.ts +2 -2
  129. package/lib/rest/conversations/v1/service/configuration/webhook.js +6 -5
  130. package/lib/rest/conversations/v1/service/conversation/message/deliveryReceipt.js +2 -0
  131. package/lib/rest/conversations/v1/service/conversation/message.js +2 -0
  132. package/lib/rest/conversations/v1/service/conversation/participant.js +2 -0
  133. package/lib/rest/conversations/v1/service/conversation/webhook.js +4 -2
  134. package/lib/rest/conversations/v1/service/conversation.js +2 -0
  135. package/lib/rest/conversations/v1/service/participantConversation.js +2 -0
  136. package/lib/rest/conversations/v1/service/role.js +10 -8
  137. package/lib/rest/conversations/v1/service/user/userConversation.js +2 -0
  138. package/lib/rest/conversations/v1/service/user.js +4 -2
  139. package/lib/rest/conversations/v1/service.js +4 -2
  140. package/lib/rest/conversations/v1/user/userConversation.js +2 -0
  141. package/lib/rest/conversations/v1/user.js +4 -2
  142. package/lib/rest/events/v1/eventType.js +2 -0
  143. package/lib/rest/events/v1/schema/version.js +2 -0
  144. package/lib/rest/events/v1/sink/sinkValidate.js +2 -2
  145. package/lib/rest/events/v1/sink.js +10 -8
  146. package/lib/rest/events/v1/subscription/subscribedEvent.js +4 -2
  147. package/lib/rest/events/v1/subscription.js +8 -6
  148. package/lib/rest/fax/v1/fax/faxMedia.js +2 -0
  149. package/lib/rest/fax/v1/fax.d.ts +1 -68
  150. package/lib/rest/fax/v1/fax.js +2 -123
  151. package/lib/rest/flexApi/v1/channel.js +10 -8
  152. package/lib/rest/flexApi/v1/flexFlow.d.ts +2 -2
  153. package/lib/rest/flexApi/v1/flexFlow.js +11 -9
  154. package/lib/rest/flexApi/v1/webChannel.js +10 -8
  155. package/lib/rest/insights/V1.d.ts +6 -0
  156. package/lib/rest/insights/V1.js +22 -0
  157. package/lib/rest/insights/v1/call/event.js +2 -0
  158. package/lib/rest/insights/v1/call/metric.js +2 -0
  159. package/lib/rest/insights/v1/callSummaries.js +2 -0
  160. package/lib/rest/insights/v1/conference/conferenceParticipant.d.ts +383 -0
  161. package/lib/rest/insights/v1/conference/conferenceParticipant.js +671 -0
  162. package/lib/rest/insights/v1/conference.d.ts +391 -0
  163. package/lib/rest/insights/v1/conference.js +683 -0
  164. package/lib/rest/insights/v1/room/participant.js +2 -0
  165. package/lib/rest/insights/v1/room.js +2 -0
  166. package/lib/rest/insights/v1/setting.d.ts +181 -0
  167. package/lib/rest/insights/v1/setting.js +384 -0
  168. package/lib/rest/ipMessaging/v1/credential.js +4 -2
  169. package/lib/rest/ipMessaging/v1/service/channel/invite.js +4 -2
  170. package/lib/rest/ipMessaging/v1/service/channel/member.js +4 -2
  171. package/lib/rest/ipMessaging/v1/service/channel/message.js +4 -2
  172. package/lib/rest/ipMessaging/v1/service/channel.js +2 -0
  173. package/lib/rest/ipMessaging/v1/service/role.js +10 -8
  174. package/lib/rest/ipMessaging/v1/service/user/userChannel.js +2 -0
  175. package/lib/rest/ipMessaging/v1/service/user.js +4 -2
  176. package/lib/rest/ipMessaging/v1/service.js +4 -2
  177. package/lib/rest/ipMessaging/v2/credential.js +4 -2
  178. package/lib/rest/ipMessaging/v2/service/binding.js +2 -0
  179. package/lib/rest/ipMessaging/v2/service/channel/invite.js +4 -2
  180. package/lib/rest/ipMessaging/v2/service/channel/member.js +4 -2
  181. package/lib/rest/ipMessaging/v2/service/channel/message.js +2 -0
  182. package/lib/rest/ipMessaging/v2/service/channel/webhook.js +4 -2
  183. package/lib/rest/ipMessaging/v2/service/channel.js +2 -0
  184. package/lib/rest/ipMessaging/v2/service/role.js +10 -8
  185. package/lib/rest/ipMessaging/v2/service/user/userBinding.js +2 -0
  186. package/lib/rest/ipMessaging/v2/service/user/userChannel.js +2 -0
  187. package/lib/rest/ipMessaging/v2/service/user.js +4 -2
  188. package/lib/rest/ipMessaging/v2/service.js +4 -2
  189. package/lib/rest/media/v1/mediaProcessor.d.ts +4 -0
  190. package/lib/rest/media/v1/mediaProcessor.js +13 -7
  191. package/lib/rest/media/v1/playerStreamer.js +4 -2
  192. package/lib/rest/messaging/v1/brandRegistration/brandVetting.js +4 -2
  193. package/lib/rest/messaging/v1/brandRegistration.d.ts +14 -0
  194. package/lib/rest/messaging/v1/brandRegistration.js +55 -4
  195. package/lib/rest/messaging/v1/externalCampaign.js +4 -4
  196. package/lib/rest/messaging/v1/service/alphaSender.js +4 -2
  197. package/lib/rest/messaging/v1/service/phoneNumber.js +4 -2
  198. package/lib/rest/messaging/v1/service/shortCode.js +4 -2
  199. package/lib/rest/messaging/v1/service/usAppToPerson.js +14 -12
  200. package/lib/rest/messaging/v1/service.js +4 -2
  201. package/lib/rest/monitor/v1/alert.js +2 -0
  202. package/lib/rest/monitor/v1/event.js +2 -0
  203. package/lib/rest/notify/v1/credential.js +4 -2
  204. package/lib/rest/notify/v1/service/binding.js +8 -6
  205. package/lib/rest/notify/v1/service.js +2 -0
  206. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.d.ts +154 -1
  207. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.js +244 -0
  208. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/evaluation.js +2 -0
  209. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/itemAssignment.js +4 -2
  210. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.js +2 -2
  211. package/lib/rest/numbers/v2/regulatoryCompliance/bundle.d.ts +41 -1
  212. package/lib/rest/numbers/v2/regulatoryCompliance/bundle.js +49 -4
  213. package/lib/rest/numbers/v2/regulatoryCompliance/endUser.js +6 -4
  214. package/lib/rest/numbers/v2/regulatoryCompliance/endUserType.js +2 -0
  215. package/lib/rest/numbers/v2/regulatoryCompliance/regulation.js +2 -0
  216. package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.js +6 -4
  217. package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocumentType.js +2 -0
  218. package/lib/rest/preview/bulk_exports/export/day.js +2 -0
  219. package/lib/rest/preview/bulk_exports/export/exportCustomJob.js +8 -6
  220. package/lib/rest/preview/deployed_devices/fleet/certificate.js +4 -2
  221. package/lib/rest/preview/deployed_devices/fleet/deployment.js +2 -0
  222. package/lib/rest/preview/deployed_devices/fleet/device.js +2 -0
  223. package/lib/rest/preview/deployed_devices/fleet/key.js +2 -0
  224. package/lib/rest/preview/deployed_devices/fleet.js +2 -0
  225. package/lib/rest/preview/hosted_numbers/authorizationDocument/dependentHostedNumberOrder.js +2 -0
  226. package/lib/rest/preview/hosted_numbers/authorizationDocument.js +12 -10
  227. package/lib/rest/preview/hosted_numbers/hostedNumberOrder.js +6 -4
  228. package/lib/rest/preview/marketplace/availableAddOn/availableAddOnExtension.js +2 -0
  229. package/lib/rest/preview/marketplace/availableAddOn.js +2 -0
  230. package/lib/rest/preview/marketplace/installedAddOn/installedAddOnExtension.js +4 -2
  231. package/lib/rest/preview/marketplace/installedAddOn.js +6 -4
  232. package/lib/rest/preview/sync/service/document/documentPermission.js +8 -6
  233. package/lib/rest/preview/sync/service/document.js +4 -2
  234. package/lib/rest/preview/sync/service/syncList/syncListItem.js +6 -4
  235. package/lib/rest/preview/sync/service/syncList/syncListPermission.js +8 -6
  236. package/lib/rest/preview/sync/service/syncList.js +2 -0
  237. package/lib/rest/preview/sync/service/syncMap/syncMapItem.js +8 -6
  238. package/lib/rest/preview/sync/service/syncMap/syncMapPermission.js +8 -6
  239. package/lib/rest/preview/sync/service/syncMap.js +2 -0
  240. package/lib/rest/preview/sync/service.js +2 -0
  241. package/lib/rest/preview/trusted_comms/brandedChannel/channel.js +2 -2
  242. package/lib/rest/preview/understand/assistant/fieldType/fieldValue.js +6 -4
  243. package/lib/rest/preview/understand/assistant/fieldType.js +4 -2
  244. package/lib/rest/preview/understand/assistant/modelBuild.js +2 -0
  245. package/lib/rest/preview/understand/assistant/query.js +6 -4
  246. package/lib/rest/preview/understand/assistant/task/field.js +6 -4
  247. package/lib/rest/preview/understand/assistant/task/sample.js +6 -4
  248. package/lib/rest/preview/understand/assistant/task.js +4 -2
  249. package/lib/rest/preview/understand/assistant.js +2 -0
  250. package/lib/rest/preview/wireless/command.js +4 -2
  251. package/lib/rest/preview/wireless/ratePlan.js +2 -0
  252. package/lib/rest/preview/wireless/sim.js +2 -0
  253. package/lib/rest/pricing/v1/messaging/country.js +2 -0
  254. package/lib/rest/pricing/v1/phoneNumber/country.js +2 -0
  255. package/lib/rest/pricing/v1/voice/country.js +2 -0
  256. package/lib/rest/pricing/v2/country.js +2 -0
  257. package/lib/rest/pricing/v2/voice/country.js +2 -0
  258. package/lib/rest/proxy/v1/service/phoneNumber.js +2 -0
  259. package/lib/rest/proxy/v1/service/session/interaction.js +2 -0
  260. package/lib/rest/proxy/v1/service/session/participant/messageInteraction.js +2 -0
  261. package/lib/rest/proxy/v1/service/session/participant.js +4 -2
  262. package/lib/rest/proxy/v1/service/session.js +2 -0
  263. package/lib/rest/proxy/v1/service/shortCode.js +4 -2
  264. package/lib/rest/proxy/v1/service.js +4 -2
  265. package/lib/rest/serverless/v1/service/asset/assetVersion.js +2 -0
  266. package/lib/rest/serverless/v1/service/asset.js +6 -4
  267. package/lib/rest/serverless/v1/service/build.js +2 -0
  268. package/lib/rest/serverless/v1/service/environment/deployment.js +2 -0
  269. package/lib/rest/serverless/v1/service/environment/log.js +2 -0
  270. package/lib/rest/serverless/v1/service/environment/variable.js +6 -4
  271. package/lib/rest/serverless/v1/service/environment.js +4 -2
  272. package/lib/rest/serverless/v1/service/function/functionVersion.js +2 -0
  273. package/lib/rest/serverless/v1/service/function.js +6 -4
  274. package/lib/rest/serverless/v1/service.js +6 -4
  275. package/lib/rest/studio/v1/flow/engagement/step.js +2 -0
  276. package/lib/rest/studio/v1/flow/engagement.js +6 -4
  277. package/lib/rest/studio/v1/flow/execution/executionStep.js +2 -0
  278. package/lib/rest/studio/v1/flow/execution.js +8 -6
  279. package/lib/rest/studio/v1/flow.js +2 -0
  280. package/lib/rest/studio/v2/flow/execution/executionStep.js +2 -0
  281. package/lib/rest/studio/v2/flow/execution.js +8 -6
  282. package/lib/rest/studio/v2/flow/flowRevision.js +2 -0
  283. package/lib/rest/studio/v2/flow/testUser.js +2 -2
  284. package/lib/rest/studio/v2/flow.js +10 -8
  285. package/lib/rest/studio/v2/flowValidate.js +6 -6
  286. package/lib/rest/supersim/V1.d.ts +3 -0
  287. package/lib/rest/supersim/V1.js +12 -0
  288. package/lib/rest/supersim/v1/command.js +6 -4
  289. package/lib/rest/supersim/v1/esimProfile.d.ts +344 -0
  290. package/lib/rest/supersim/v1/esimProfile.js +664 -0
  291. package/lib/rest/supersim/v1/fleet.d.ts +17 -5
  292. package/lib/rest/supersim/v1/fleet.js +36 -22
  293. package/lib/rest/supersim/v1/ipCommand.js +8 -6
  294. package/lib/rest/supersim/v1/network.js +2 -0
  295. package/lib/rest/supersim/v1/networkAccessProfile/networkAccessProfileNetwork.js +4 -2
  296. package/lib/rest/supersim/v1/networkAccessProfile.js +2 -0
  297. package/lib/rest/supersim/v1/sim/billingPeriod.js +2 -0
  298. package/lib/rest/supersim/v1/sim.js +6 -4
  299. package/lib/rest/supersim/v1/smsCommand.js +6 -4
  300. package/lib/rest/supersim/v1/usageRecord.js +2 -0
  301. package/lib/rest/sync/v1/service/document/documentPermission.js +8 -6
  302. package/lib/rest/sync/v1/service/document.js +2 -0
  303. package/lib/rest/sync/v1/service/syncList/syncListItem.js +4 -2
  304. package/lib/rest/sync/v1/service/syncList/syncListPermission.js +8 -6
  305. package/lib/rest/sync/v1/service/syncList.js +2 -0
  306. package/lib/rest/sync/v1/service/syncMap/syncMapItem.js +6 -4
  307. package/lib/rest/sync/v1/service/syncMap/syncMapPermission.js +8 -6
  308. package/lib/rest/sync/v1/service/syncMap.js +2 -0
  309. package/lib/rest/sync/v1/service/syncStream/streamMessage.js +2 -2
  310. package/lib/rest/sync/v1/service/syncStream.js +2 -0
  311. package/lib/rest/sync/v1/service.js +2 -0
  312. package/lib/rest/taskrouter/v1/workspace/activity.js +4 -2
  313. package/lib/rest/taskrouter/v1/workspace/event.js +2 -0
  314. package/lib/rest/taskrouter/v1/workspace/task/reservation.js +2 -0
  315. package/lib/rest/taskrouter/v1/workspace/task.js +2 -0
  316. package/lib/rest/taskrouter/v1/workspace/taskChannel.js +6 -4
  317. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueuesStatistics.js +2 -0
  318. package/lib/rest/taskrouter/v1/workspace/taskQueue.js +4 -2
  319. package/lib/rest/taskrouter/v1/workspace/worker/reservation.js +2 -0
  320. package/lib/rest/taskrouter/v1/workspace/worker/workerChannel.js +2 -0
  321. package/lib/rest/taskrouter/v1/workspace/worker.js +4 -2
  322. package/lib/rest/taskrouter/v1/workspace/workflow.js +6 -4
  323. package/lib/rest/taskrouter/v1/workspace.js +4 -2
  324. package/lib/rest/trunking/v1/trunk/credentialList.js +4 -2
  325. package/lib/rest/trunking/v1/trunk/ipAccessControlList.js +4 -2
  326. package/lib/rest/trunking/v1/trunk/originationUrl.js +12 -10
  327. package/lib/rest/trunking/v1/trunk/phoneNumber.js +4 -2
  328. package/lib/rest/trunking/v1/trunk.js +2 -0
  329. package/lib/rest/trusthub/v1/customerProfiles/customerProfilesChannelEndpointAssignment.js +6 -4
  330. package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEntityAssignments.js +4 -2
  331. package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.js +4 -2
  332. package/lib/rest/trusthub/v1/customerProfiles.js +8 -6
  333. package/lib/rest/trusthub/v1/endUser.js +6 -4
  334. package/lib/rest/trusthub/v1/endUserType.js +2 -0
  335. package/lib/rest/trusthub/v1/policies.js +2 -0
  336. package/lib/rest/trusthub/v1/supportingDocument.js +6 -4
  337. package/lib/rest/trusthub/v1/supportingDocumentType.js +2 -0
  338. package/lib/rest/trusthub/v1/trustProducts/trustProductsChannelEndpointAssignment.js +6 -4
  339. package/lib/rest/trusthub/v1/trustProducts/trustProductsEntityAssignments.js +4 -2
  340. package/lib/rest/trusthub/v1/trustProducts/trustProductsEvaluations.js +4 -2
  341. package/lib/rest/trusthub/v1/trustProducts.js +8 -6
  342. package/lib/rest/verify/v2/service/accessToken.d.ts +62 -4
  343. package/lib/rest/verify/v2/service/accessToken.js +159 -11
  344. package/lib/rest/verify/v2/service/entity/challenge.js +4 -2
  345. package/lib/rest/verify/v2/service/entity/factor.js +2 -0
  346. package/lib/rest/verify/v2/service/entity/newFactor.js +4 -4
  347. package/lib/rest/verify/v2/service/entity.js +4 -2
  348. package/lib/rest/verify/v2/service/messagingConfiguration.js +8 -6
  349. package/lib/rest/verify/v2/service/rateLimit/bucket.js +6 -4
  350. package/lib/rest/verify/v2/service/rateLimit.js +4 -2
  351. package/lib/rest/verify/v2/service/verification.js +6 -6
  352. package/lib/rest/verify/v2/service/verificationCheck.js +2 -2
  353. package/lib/rest/verify/v2/service/webhook.js +8 -6
  354. package/lib/rest/verify/v2/service.js +4 -2
  355. package/lib/rest/verify/v2/template.js +3 -1
  356. package/lib/rest/verify/v2/verificationAttempt.d.ts +50 -10
  357. package/lib/rest/verify/v2/verificationAttempt.js +61 -15
  358. package/lib/rest/video/v1/composition.d.ts +2 -0
  359. package/lib/rest/video/v1/composition.js +7 -2
  360. package/lib/rest/video/v1/compositionHook.js +6 -4
  361. package/lib/rest/video/v1/compositionSettings.js +2 -2
  362. package/lib/rest/video/v1/recording.d.ts +2 -0
  363. package/lib/rest/video/v1/recording.js +5 -0
  364. package/lib/rest/video/v1/recordingSettings.js +2 -2
  365. package/lib/rest/video/v1/room/recording.d.ts +2 -0
  366. package/lib/rest/video/v1/room/recording.js +5 -0
  367. package/lib/rest/video/v1/room/roomParticipant/roomParticipantPublishedTrack.js +2 -0
  368. package/lib/rest/video/v1/room/roomParticipant/roomParticipantSubscribedTrack.js +2 -0
  369. package/lib/rest/video/v1/room/roomParticipant.js +2 -0
  370. package/lib/rest/video/v1/room.d.ts +8 -0
  371. package/lib/rest/video/v1/room.js +17 -3
  372. package/lib/rest/voice/V1.d.ts +3 -0
  373. package/lib/rest/voice/V1.js +12 -0
  374. package/lib/rest/voice/v1/archivedCall.d.ts +136 -0
  375. package/lib/rest/voice/v1/archivedCall.js +325 -0
  376. package/lib/rest/voice/v1/byocTrunk.js +2 -0
  377. package/lib/rest/voice/v1/connectionPolicy/connectionPolicyTarget.js +4 -2
  378. package/lib/rest/voice/v1/connectionPolicy.js +2 -0
  379. package/lib/rest/voice/v1/dialingPermissions/bulkCountryUpdate.js +2 -2
  380. package/lib/rest/voice/v1/dialingPermissions/country/highriskSpecialPrefix.js +2 -0
  381. package/lib/rest/voice/v1/dialingPermissions/country.js +2 -0
  382. package/lib/rest/voice/v1/ipRecord.js +4 -2
  383. package/lib/rest/voice/v1/sourceIpMapping.js +8 -6
  384. package/lib/rest/wireless/v1/command.js +4 -2
  385. package/lib/rest/wireless/v1/ratePlan.js +2 -0
  386. package/lib/rest/wireless/v1/sim/dataSession.js +2 -0
  387. package/lib/rest/wireless/v1/sim/usageRecord.js +2 -0
  388. package/lib/rest/wireless/v1/sim.js +6 -8
  389. package/lib/rest/wireless/v1/usageRecord.js +2 -0
  390. package/package.json +3 -3
  391. package/CHANGES.md +0 -2517
@@ -69,10 +69,20 @@ VerificationAttemptList = function VerificationAttemptList(version) {
69
69
  *
70
70
  * @param {object} [opts] - Options for request
71
71
  * @param {Date} [opts.dateCreatedAfter] -
72
- * Filter verification attempts after this date
72
+ * Filter verification attempts after this date.
73
73
  * @param {Date} [opts.dateCreatedBefore] -
74
- * Filter verification attempts befor this date
75
- * @param {string} [opts.channelData.to] - Destination of a verification
74
+ * Filter verification attempts before this date.
75
+ * @param {string} [opts.channelData.to] -
76
+ * Filters by destination of the verification attempt.
77
+ * @param {string} [opts.country] -
78
+ * Filter verification attempts by destination country.
79
+ * @param {verification_attempt.channels} [opts.channel] -
80
+ * Filter verification attempts by communication channel.
81
+ * @param {string} [opts.verifyServiceSid] -
82
+ * Filter verification attempts by verify service.
83
+ * @param {string} [opts.verificationSid] - Filter attempts by verification.
84
+ * @param {verification_attempt.conversion_status} [opts.status] -
85
+ * Filter verification attempts by conversion status.
76
86
  * @param {number} [opts.limit] -
77
87
  * Upper limit for the number of records to return.
78
88
  * each() guarantees never to return more than limit.
@@ -140,6 +150,8 @@ VerificationAttemptList = function VerificationAttemptList(version) {
140
150
  if (!done) {
141
151
  currentPage++;
142
152
  fetchNextPage(_.bind(page.nextPage, page));
153
+ } else {
154
+ onComplete();
143
155
  }
144
156
  });
145
157
 
@@ -161,10 +173,20 @@ VerificationAttemptList = function VerificationAttemptList(version) {
161
173
  *
162
174
  * @param {object} [opts] - Options for request
163
175
  * @param {Date} [opts.dateCreatedAfter] -
164
- * Filter verification attempts after this date
176
+ * Filter verification attempts after this date.
165
177
  * @param {Date} [opts.dateCreatedBefore] -
166
- * Filter verification attempts befor this date
167
- * @param {string} [opts.channelData.to] - Destination of a verification
178
+ * Filter verification attempts before this date.
179
+ * @param {string} [opts.channelData.to] -
180
+ * Filters by destination of the verification attempt.
181
+ * @param {string} [opts.country] -
182
+ * Filter verification attempts by destination country.
183
+ * @param {verification_attempt.channels} [opts.channel] -
184
+ * Filter verification attempts by communication channel.
185
+ * @param {string} [opts.verifyServiceSid] -
186
+ * Filter verification attempts by verify service.
187
+ * @param {string} [opts.verificationSid] - Filter attempts by verification.
188
+ * @param {verification_attempt.conversion_status} [opts.status] -
189
+ * Filter verification attempts by conversion status.
168
190
  * @param {number} [opts.limit] -
169
191
  * Upper limit for the number of records to return.
170
192
  * list() guarantees never to return more than limit.
@@ -226,10 +248,20 @@ VerificationAttemptList = function VerificationAttemptList(version) {
226
248
  *
227
249
  * @param {object} [opts] - Options for request
228
250
  * @param {Date} [opts.dateCreatedAfter] -
229
- * Filter verification attempts after this date
251
+ * Filter verification attempts after this date.
230
252
  * @param {Date} [opts.dateCreatedBefore] -
231
- * Filter verification attempts befor this date
232
- * @param {string} [opts.channelData.to] - Destination of a verification
253
+ * Filter verification attempts before this date.
254
+ * @param {string} [opts.channelData.to] -
255
+ * Filters by destination of the verification attempt.
256
+ * @param {string} [opts.country] -
257
+ * Filter verification attempts by destination country.
258
+ * @param {verification_attempt.channels} [opts.channel] -
259
+ * Filter verification attempts by communication channel.
260
+ * @param {string} [opts.verifyServiceSid] -
261
+ * Filter verification attempts by verify service.
262
+ * @param {string} [opts.verificationSid] - Filter attempts by verification.
263
+ * @param {verification_attempt.conversion_status} [opts.status] -
264
+ * Filter verification attempts by conversion status.
233
265
  * @param {string} [opts.pageToken] - PageToken provided by the API
234
266
  * @param {number} [opts.pageNumber] -
235
267
  * Page Number, this value is simply for client state
@@ -251,6 +283,11 @@ VerificationAttemptList = function VerificationAttemptList(version) {
251
283
  'DateCreatedAfter': serialize.iso8601DateTime(_.get(opts, 'dateCreatedAfter')),
252
284
  'DateCreatedBefore': serialize.iso8601DateTime(_.get(opts, 'dateCreatedBefore')),
253
285
  'ChannelData.To': _.get(opts, 'channelData.to'),
286
+ 'Country': _.get(opts, 'country'),
287
+ 'Channel': _.get(opts, 'channel'),
288
+ 'VerifyServiceSid': _.get(opts, 'verifyServiceSid'),
289
+ 'VerificationSid': _.get(opts, 'verificationSid'),
290
+ 'Status': _.get(opts, 'status'),
254
291
  'PageToken': opts.pageToken,
255
292
  'Page': opts.pageNumber,
256
293
  'PageSize': opts.pageSize
@@ -425,16 +462,23 @@ VerificationAttemptPage.prototype[util.inspect.custom] = function inspect(depth,
425
462
  * @constructor Twilio.Verify.V2.VerificationAttemptInstance
426
463
  *
427
464
  * @property {string} sid -
428
- * A string that uniquely identifies this Verification Attempt
429
- * @property {string} accountSid - Account Sid
430
- * @property {string} serviceSid - The service_sid
465
+ * The SID that uniquely identifies the verification attempt.
466
+ * @property {string} accountSid -
467
+ * The SID of the Account that created the verification.
468
+ * @property {string} serviceSid -
469
+ * The SID of the verify service that generated this attempt.
470
+ * @property {string} verificationSid -
471
+ * The SID of the verification that generated this attempt.
431
472
  * @property {Date} dateCreated - The date this Attempt was created
432
473
  * @property {Date} dateUpdated - The date this Attempt was updated
433
474
  * @property {verification_attempt.conversion_status} conversionStatus -
434
- * Status of a conversion
435
- * @property {verification_attempt.channels} channel - Channel used for the attempt
475
+ * Status of the conversion for the verification.
476
+ * @property {verification_attempt.channels} channel -
477
+ * Communication channel used for the attempt.
478
+ * @property {object} price -
479
+ * An object containing the charge for this verification attempt.
436
480
  * @property {object} channelData -
437
- * Object with the channel information for an attempt
481
+ * An object containing the channel specific information for an attempt.
438
482
  * @property {string} url - The url
439
483
  *
440
484
  * @param {V2} version - Version of the resource
@@ -450,10 +494,12 @@ VerificationAttemptInstance = function VerificationAttemptInstance(version,
450
494
  this.sid = payload.sid; // jshint ignore:line
451
495
  this.accountSid = payload.account_sid; // jshint ignore:line
452
496
  this.serviceSid = payload.service_sid; // jshint ignore:line
497
+ this.verificationSid = payload.verification_sid; // jshint ignore:line
453
498
  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line
454
499
  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line
455
500
  this.conversionStatus = payload.conversion_status; // jshint ignore:line
456
501
  this.channel = payload.channel; // jshint ignore:line
502
+ this.price = payload.price; // jshint ignore:line
457
503
  this.channelData = payload.channel_data; // jshint ignore:line
458
504
  this.url = payload.url; // jshint ignore:line
459
505
 
@@ -261,6 +261,7 @@ interface CompositionResource {
261
261
  duration: number;
262
262
  format: CompositionFormat;
263
263
  links: string;
264
+ media_external_location: string;
264
265
  resolution: string;
265
266
  room_sid: string;
266
267
  sid: string;
@@ -330,6 +331,7 @@ declare class CompositionInstance extends SerializableClass {
330
331
  fetch(callback?: (error: Error | null, items: CompositionInstance) => any): Promise<CompositionInstance>;
331
332
  format: CompositionFormat;
332
333
  links: string;
334
+ mediaExternalLocation: string;
333
335
  /**
334
336
  * remove a CompositionInstance
335
337
  *
@@ -143,6 +143,8 @@ CompositionList = function CompositionList(version) {
143
143
  if (!done) {
144
144
  currentPage++;
145
145
  fetchNextPage(_.bind(page.nextPage, page));
146
+ } else {
147
+ onComplete();
146
148
  }
147
149
  });
148
150
 
@@ -356,8 +358,8 @@ CompositionList = function CompositionList(version) {
356
358
  if (_.isUndefined(opts)) {
357
359
  throw new Error('Required parameter "opts" missing.');
358
360
  }
359
- if (_.isUndefined(opts.roomSid)) {
360
- throw new Error('Required parameter "opts.roomSid" missing.');
361
+ if (_.isUndefined(opts['roomSid'])) {
362
+ throw new Error('Required parameter "opts[\'roomSid\']" missing.');
361
363
  }
362
364
 
363
365
  var deferred = Q.defer();
@@ -525,6 +527,8 @@ CompositionPage.prototype[util.inspect.custom] = function inspect(depth,
525
527
  * @property {number} size - The size of the composed media file in bytes
526
528
  * @property {number} duration -
527
529
  * The duration of the composition's media file in seconds
530
+ * @property {string} mediaExternalLocation -
531
+ * The URL of the media file associated with the composition when stored externally
528
532
  * @property {string} url - The absolute URL of the resource
529
533
  * @property {string} links -
530
534
  * The URL of the media file associated with the composition
@@ -554,6 +558,7 @@ CompositionInstance = function CompositionInstance(version, payload, sid) {
554
558
  this.bitrate = deserialize.integer(payload.bitrate); // jshint ignore:line
555
559
  this.size = deserialize.integer(payload.size); // jshint ignore:line
556
560
  this.duration = deserialize.integer(payload.duration); // jshint ignore:line
561
+ this.mediaExternalLocation = payload.media_external_location; // jshint ignore:line
557
562
  this.url = payload.url; // jshint ignore:line
558
563
  this.links = payload.links; // jshint ignore:line
559
564
 
@@ -143,6 +143,8 @@ CompositionHookList = function CompositionHookList(version) {
143
143
  if (!done) {
144
144
  currentPage++;
145
145
  fetchNextPage(_.bind(page.nextPage, page));
146
+ } else {
147
+ onComplete();
146
148
  }
147
149
  });
148
150
 
@@ -356,8 +358,8 @@ CompositionHookList = function CompositionHookList(version) {
356
358
  if (_.isUndefined(opts)) {
357
359
  throw new Error('Required parameter "opts" missing.');
358
360
  }
359
- if (_.isUndefined(opts.friendlyName)) {
360
- throw new Error('Required parameter "opts.friendlyName" missing.');
361
+ if (_.isUndefined(opts['friendlyName'])) {
362
+ throw new Error('Required parameter "opts[\'friendlyName\']" missing.');
361
363
  }
362
364
 
363
365
  var deferred = Q.defer();
@@ -778,8 +780,8 @@ CompositionHookContext.prototype.update = function update(opts, callback) {
778
780
  if (_.isUndefined(opts)) {
779
781
  throw new Error('Required parameter "opts" missing.');
780
782
  }
781
- if (_.isUndefined(opts.friendlyName)) {
782
- throw new Error('Required parameter "opts.friendlyName" missing.');
783
+ if (_.isUndefined(opts['friendlyName'])) {
784
+ throw new Error('Required parameter "opts[\'friendlyName\']" missing.');
783
785
  }
784
786
 
785
787
  var deferred = Q.defer();
@@ -353,8 +353,8 @@ CompositionSettingsContext.prototype.create = function create(opts, callback) {
353
353
  if (_.isUndefined(opts)) {
354
354
  throw new Error('Required parameter "opts" missing.');
355
355
  }
356
- if (_.isUndefined(opts.friendlyName)) {
357
- throw new Error('Required parameter "opts.friendlyName" missing.');
356
+ if (_.isUndefined(opts['friendlyName'])) {
357
+ throw new Error('Required parameter "opts[\'friendlyName\']" missing.');
358
358
  }
359
359
 
360
360
  var deferred = Q.defer();
@@ -242,6 +242,7 @@ interface RecordingResource {
242
242
  duration: number;
243
243
  grouping_sids: object;
244
244
  links: string;
245
+ media_external_location: string;
245
246
  offset: number;
246
247
  sid: string;
247
248
  size: number;
@@ -308,6 +309,7 @@ declare class RecordingInstance extends SerializableClass {
308
309
  fetch(callback?: (error: Error | null, items: RecordingInstance) => any): Promise<RecordingInstance>;
309
310
  groupingSids: any;
310
311
  links: string;
312
+ mediaExternalLocation: string;
311
313
  offset: number;
312
314
  /**
313
315
  * remove a RecordingInstance
@@ -147,6 +147,8 @@ RecordingList = function RecordingList(version) {
147
147
  if (!done) {
148
148
  currentPage++;
149
149
  fetchNextPage(_.bind(page.nextPage, page));
150
+ } else {
151
+ onComplete();
150
152
  }
151
153
  });
152
154
 
@@ -461,6 +463,8 @@ RecordingPage.prototype[util.inspect.custom] = function inspect(depth, options)
461
463
  * The name that was given to the source track of the recording
462
464
  * @property {number} offset -
463
465
  * The number of milliseconds between a point in time that is common to all rooms in a group and when the source room of the recording started
466
+ * @property {string} mediaExternalLocation -
467
+ * The URL of the media file associated with the recording when stored externally
464
468
  * @property {string} links - The URLs of related resources
465
469
  *
466
470
  * @param {V1} version - Version of the resource
@@ -486,6 +490,7 @@ RecordingInstance = function RecordingInstance(version, payload, sid) {
486
490
  this.groupingSids = payload.grouping_sids; // jshint ignore:line
487
491
  this.trackName = payload.track_name; // jshint ignore:line
488
492
  this.offset = deserialize.integer(payload.offset); // jshint ignore:line
493
+ this.mediaExternalLocation = payload.media_external_location; // jshint ignore:line
489
494
  this.links = payload.links; // jshint ignore:line
490
495
 
491
496
  // Context
@@ -351,8 +351,8 @@ RecordingSettingsContext.prototype.create = function create(opts, callback) {
351
351
  if (_.isUndefined(opts)) {
352
352
  throw new Error('Required parameter "opts" missing.');
353
353
  }
354
- if (_.isUndefined(opts.friendlyName)) {
355
- throw new Error('Required parameter "opts.friendlyName" missing.');
354
+ if (_.isUndefined(opts['friendlyName'])) {
355
+ throw new Error('Required parameter "opts[\'friendlyName\']" missing.');
356
356
  }
357
357
 
358
358
  var deferred = Q.defer();
@@ -231,6 +231,7 @@ interface RoomRecordingResource {
231
231
  duration: number;
232
232
  grouping_sids: object;
233
233
  links: string;
234
+ media_external_location: string;
234
235
  offset: number;
235
236
  room_sid: string;
236
237
  sid: string;
@@ -301,6 +302,7 @@ declare class RoomRecordingInstance extends SerializableClass {
301
302
  fetch(callback?: (error: Error | null, items: RoomRecordingInstance) => any): Promise<RoomRecordingInstance>;
302
303
  groupingSids: any;
303
304
  links: string;
305
+ mediaExternalLocation: string;
304
306
  offset: number;
305
307
  /**
306
308
  * remove a RoomRecordingInstance
@@ -145,6 +145,8 @@ RoomRecordingList = function RoomRecordingList(version, roomSid) {
145
145
  if (!done) {
146
146
  currentPage++;
147
147
  fetchNextPage(_.bind(page.nextPage, page));
148
+ } else {
149
+ onComplete();
148
150
  }
149
151
  });
150
152
 
@@ -451,6 +453,8 @@ RoomRecordingPage.prototype[util.inspect.custom] = function inspect(depth,
451
453
  * The name that was given to the source track of the recording
452
454
  * @property {number} offset -
453
455
  * The number of milliseconds between a point in time that is common to all rooms in a group and when the source room of the recording started
456
+ * @property {string} mediaExternalLocation -
457
+ * The URL of the media file associated with the recording when stored externally
454
458
  * @property {string} roomSid -
455
459
  * The SID of the Room resource the recording is associated with
456
460
  * @property {string} links - The URLs of related resources
@@ -481,6 +485,7 @@ RoomRecordingInstance = function RoomRecordingInstance(version, payload,
481
485
  this.groupingSids = payload.grouping_sids; // jshint ignore:line
482
486
  this.trackName = payload.track_name; // jshint ignore:line
483
487
  this.offset = deserialize.integer(payload.offset); // jshint ignore:line
488
+ this.mediaExternalLocation = payload.media_external_location; // jshint ignore:line
484
489
  this.roomSid = payload.room_sid; // jshint ignore:line
485
490
  this.links = payload.links; // jshint ignore:line
486
491
 
@@ -139,6 +139,8 @@ PublishedTrackList = function PublishedTrackList(version, roomSid,
139
139
  if (!done) {
140
140
  currentPage++;
141
141
  fetchNextPage(_.bind(page.nextPage, page));
142
+ } else {
143
+ onComplete();
142
144
  }
143
145
  });
144
146
 
@@ -138,6 +138,8 @@ SubscribedTrackList = function SubscribedTrackList(version, roomSid,
138
138
  if (!done) {
139
139
  currentPage++;
140
140
  fetchNextPage(_.bind(page.nextPage, page));
141
+ } else {
142
+ onComplete();
141
143
  }
142
144
  });
143
145
 
@@ -150,6 +150,8 @@ ParticipantList = function ParticipantList(version, roomSid) {
150
150
  if (!done) {
151
151
  currentPage++;
152
152
  fetchNextPage(_.bind(page.nextPage, page));
153
+ } else {
154
+ onComplete();
153
155
  }
154
156
  });
155
157
 
@@ -168,6 +168,7 @@ interface RoomListInstance {
168
168
  * Options to pass to create
169
169
  *
170
170
  * @property audioOnly - Indicates whether the room will only contain audio track participants for group rooms.
171
+ * @property emptyRoomTimeout - Configures the time a room will remain active after last participant leaves.
171
172
  * @property enableTurn - Enable Twilio's Network Traversal TURN service
172
173
  * @property maxParticipantDuration - The maximum number of seconds a Participant can be connected to the room
173
174
  * @property maxParticipants - The maximum number of concurrent Participants allowed in the room
@@ -178,10 +179,12 @@ interface RoomListInstance {
178
179
  * @property statusCallbackMethod - The HTTP method we should use to call status_callback
179
180
  * @property type - The type of room
180
181
  * @property uniqueName - An application-defined string that uniquely identifies the resource
182
+ * @property unusedRoomTimeout - Configures the time a room will remain active when no one joins.
181
183
  * @property videoCodecs - An array of the video codecs that are supported when publishing a track in the room
182
184
  */
183
185
  interface RoomListInstanceCreateOptions {
184
186
  audioOnly?: boolean;
187
+ emptyRoomTimeout?: number;
185
188
  enableTurn?: boolean;
186
189
  maxParticipantDuration?: number;
187
190
  maxParticipants?: number;
@@ -192,6 +195,7 @@ interface RoomListInstanceCreateOptions {
192
195
  statusCallbackMethod?: string;
193
196
  type?: RoomRoomType;
194
197
  uniqueName?: string;
198
+ unusedRoomTimeout?: number;
195
199
  videoCodecs?: RoomVideoCodec | RoomVideoCodec[];
196
200
  }
197
201
 
@@ -285,6 +289,7 @@ interface RoomResource {
285
289
  date_created: Date;
286
290
  date_updated: Date;
287
291
  duration: number;
292
+ empty_room_timeout: number;
288
293
  enable_turn: boolean;
289
294
  end_time: Date;
290
295
  links: string;
@@ -299,6 +304,7 @@ interface RoomResource {
299
304
  status_callback_method: string;
300
305
  type: RoomRoomType;
301
306
  unique_name: string;
307
+ unused_room_timeout: number;
302
308
  url: string;
303
309
  video_codecs: RoomVideoCodec[];
304
310
  }
@@ -355,6 +361,7 @@ declare class RoomInstance extends SerializableClass {
355
361
  dateCreated: Date;
356
362
  dateUpdated: Date;
357
363
  duration: number;
364
+ emptyRoomTimeout: number;
358
365
  enableTurn: boolean;
359
366
  endTime: Date;
360
367
  /**
@@ -391,6 +398,7 @@ declare class RoomInstance extends SerializableClass {
391
398
  toJSON(): any;
392
399
  type: RoomRoomType;
393
400
  uniqueName: string;
401
+ unusedRoomTimeout: number;
394
402
  /**
395
403
  * update a RoomInstance
396
404
  *
@@ -84,6 +84,10 @@ RoomList = function RoomList(version) {
84
84
  * Indicates whether the room will only contain audio track participants for group rooms.
85
85
  * @param {number} [opts.maxParticipantDuration] -
86
86
  * The maximum number of seconds a Participant can be connected to the room
87
+ * @param {number} [opts.emptyRoomTimeout] -
88
+ * Configures the time a room will remain active after last participant leaves.
89
+ * @param {number} [opts.unusedRoomTimeout] -
90
+ * Configures the time a room will remain active when no one joins.
87
91
  * @param {function} [callback] - Callback to handle processed record
88
92
  *
89
93
  * @returns {Promise} Resolves to processed RoomInstance
@@ -109,7 +113,9 @@ RoomList = function RoomList(version) {
109
113
  'MediaRegion': _.get(opts, 'mediaRegion'),
110
114
  'RecordingRules': serialize.object(_.get(opts, 'recordingRules')),
111
115
  'AudioOnly': serialize.bool(_.get(opts, 'audioOnly')),
112
- 'MaxParticipantDuration': _.get(opts, 'maxParticipantDuration')
116
+ 'MaxParticipantDuration': _.get(opts, 'maxParticipantDuration'),
117
+ 'EmptyRoomTimeout': _.get(opts, 'emptyRoomTimeout'),
118
+ 'UnusedRoomTimeout': _.get(opts, 'unusedRoomTimeout')
113
119
  });
114
120
 
115
121
  var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
@@ -219,6 +225,8 @@ RoomList = function RoomList(version) {
219
225
  if (!done) {
220
226
  currentPage++;
221
227
  fetchNextPage(_.bind(page.nextPage, page));
228
+ } else {
229
+ onComplete();
222
230
  }
223
231
  });
224
232
 
@@ -531,6 +539,10 @@ RoomPage.prototype[util.inspect.custom] = function inspect(depth, options) {
531
539
  * @property {string} mediaRegion - The region for the media server in Group Rooms
532
540
  * @property {boolean} audioOnly -
533
541
  * Indicates whether the room will only contain audio track participants for group rooms.
542
+ * @property {number} emptyRoomTimeout -
543
+ * The time a room will remain active after last participant leaves.
544
+ * @property {number} unusedRoomTimeout -
545
+ * The time a room will remain active when no one joins.
534
546
  * @property {string} url - The absolute URL of the resource
535
547
  * @property {string} links - The URLs of related resources
536
548
  *
@@ -562,6 +574,8 @@ RoomInstance = function RoomInstance(version, payload, sid) {
562
574
  this.videoCodecs = payload.video_codecs; // jshint ignore:line
563
575
  this.mediaRegion = payload.media_region; // jshint ignore:line
564
576
  this.audioOnly = payload.audio_only; // jshint ignore:line
577
+ this.emptyRoomTimeout = deserialize.integer(payload.empty_room_timeout); // jshint ignore:line
578
+ this.unusedRoomTimeout = deserialize.integer(payload.unused_room_timeout); // jshint ignore:line
565
579
  this.url = payload.url; // jshint ignore:line
566
580
  this.links = payload.links; // jshint ignore:line
567
581
 
@@ -761,8 +775,8 @@ RoomContext.prototype.update = function update(opts, callback) {
761
775
  if (_.isUndefined(opts)) {
762
776
  throw new Error('Required parameter "opts" missing.');
763
777
  }
764
- if (_.isUndefined(opts.status)) {
765
- throw new Error('Required parameter "opts.status" missing.');
778
+ if (_.isUndefined(opts['status'])) {
779
+ throw new Error('Required parameter "opts[\'status\']" missing.');
766
780
  }
767
781
 
768
782
  var deferred = Q.defer();
@@ -7,6 +7,8 @@
7
7
 
8
8
  import Version = require('../../base/Version');
9
9
  import Voice = require('../Voice');
10
+ import { ArchivedCallList } from './v1/archivedCall';
11
+ import { ArchivedCallListInstance } from './v1/archivedCall';
10
12
  import { ByocTrunkList } from './v1/byocTrunk';
11
13
  import { ByocTrunkListInstance } from './v1/byocTrunk';
12
14
  import { ConnectionPolicyList } from './v1/connectionPolicy';
@@ -27,6 +29,7 @@ declare class V1 extends Version {
27
29
  */
28
30
  constructor(domain: Voice);
29
31
 
32
+ readonly archivedCalls: ArchivedCallListInstance;
30
33
  readonly byocTrunks: ByocTrunkListInstance;
31
34
  readonly connectionPolicies: ConnectionPolicyListInstance;
32
35
  readonly dialingPermissions: DialingPermissionsListInstance;
@@ -10,6 +10,7 @@
10
10
  /* jshint ignore:end */
11
11
 
12
12
  var _ = require('lodash'); /* jshint ignore:line */
13
+ var ArchivedCallList = require('./v1/archivedCall').ArchivedCallList;
13
14
  var ByocTrunkList = require('./v1/byocTrunk').ByocTrunkList;
14
15
  var ConnectionPolicyList = require(
15
16
  './v1/connectionPolicy').ConnectionPolicyList;
@@ -26,6 +27,8 @@ var Version = require('../../base/Version'); /* jshint ignore:line */
26
27
  *
27
28
  * @constructor Twilio.Voice.V1
28
29
  *
30
+ * @property {Twilio.Voice.V1.ArchivedCallList} archivedCalls -
31
+ * archivedCalls resource
29
32
  * @property {Twilio.Voice.V1.ByocTrunkList} byocTrunks - byocTrunks resource
30
33
  * @property {Twilio.Voice.V1.ConnectionPolicyList} connectionPolicies -
31
34
  * connectionPolicies resource
@@ -42,6 +45,7 @@ function V1(domain) {
42
45
  Version.prototype.constructor.call(this, domain, 'v1');
43
46
 
44
47
  // Resources
48
+ this._archivedCalls = undefined;
45
49
  this._byocTrunks = undefined;
46
50
  this._connectionPolicies = undefined;
47
51
  this._dialingPermissions = undefined;
@@ -52,6 +56,14 @@ function V1(domain) {
52
56
  _.extend(V1.prototype, Version.prototype);
53
57
  V1.prototype.constructor = V1;
54
58
 
59
+ Object.defineProperty(V1.prototype,
60
+ 'archivedCalls', {
61
+ get: function() {
62
+ this._archivedCalls = this._archivedCalls || new ArchivedCallList(this);
63
+ return this._archivedCalls;
64
+ }
65
+ });
66
+
55
67
  Object.defineProperty(V1.prototype,
56
68
  'byocTrunks', {
57
69
  get: function() {