twilio 3.71.2 → 3.73.1

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 (364) hide show
  1. package/CHANGES.md +91 -0
  2. package/README.md +1 -1
  3. package/lib/rest/Insights.d.ts +4 -0
  4. package/lib/rest/Insights.js +16 -0
  5. package/lib/rest/Supersim.d.ts +4 -0
  6. package/lib/rest/Supersim.js +17 -0
  7. package/lib/rest/Voice.d.ts +2 -0
  8. package/lib/rest/Voice.js +9 -0
  9. package/lib/rest/accounts/v1/credential/aws.js +2 -0
  10. package/lib/rest/accounts/v1/credential/publicKey.js +2 -0
  11. package/lib/rest/api/v2010/account/address/dependentPhoneNumber.js +2 -0
  12. package/lib/rest/api/v2010/account/address.js +2 -0
  13. package/lib/rest/api/v2010/account/application.js +2 -0
  14. package/lib/rest/api/v2010/account/authorizedConnectApp.js +2 -0
  15. package/lib/rest/api/v2010/account/availablePhoneNumber/local.js +2 -0
  16. package/lib/rest/api/v2010/account/availablePhoneNumber/machineToMachine.js +2 -0
  17. package/lib/rest/api/v2010/account/availablePhoneNumber/mobile.js +2 -0
  18. package/lib/rest/api/v2010/account/availablePhoneNumber/national.js +2 -0
  19. package/lib/rest/api/v2010/account/availablePhoneNumber/sharedCost.js +2 -0
  20. package/lib/rest/api/v2010/account/availablePhoneNumber/tollFree.js +2 -0
  21. package/lib/rest/api/v2010/account/availablePhoneNumber/voip.js +2 -0
  22. package/lib/rest/api/v2010/account/availablePhoneNumber.js +2 -0
  23. package/lib/rest/api/v2010/account/call/event.js +2 -0
  24. package/lib/rest/api/v2010/account/call/notification.js +2 -0
  25. package/lib/rest/api/v2010/account/call/recording.js +2 -0
  26. package/lib/rest/api/v2010/account/call.js +2 -0
  27. package/lib/rest/api/v2010/account/conference/participant.js +2 -0
  28. package/lib/rest/api/v2010/account/conference/recording.js +2 -0
  29. package/lib/rest/api/v2010/account/conference.js +2 -0
  30. package/lib/rest/api/v2010/account/connectApp.js +2 -0
  31. package/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn/assignedAddOnExtension.js +2 -0
  32. package/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn.js +2 -0
  33. package/lib/rest/api/v2010/account/incomingPhoneNumber/local.js +2 -0
  34. package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.js +2 -0
  35. package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.js +2 -0
  36. package/lib/rest/api/v2010/account/incomingPhoneNumber.js +2 -0
  37. package/lib/rest/api/v2010/account/key.js +2 -0
  38. package/lib/rest/api/v2010/account/message/media.js +2 -0
  39. package/lib/rest/api/v2010/account/message.d.ts +9 -1
  40. package/lib/rest/api/v2010/account/message.js +17 -2
  41. package/lib/rest/api/v2010/account/notification.js +2 -0
  42. package/lib/rest/api/v2010/account/outgoingCallerId.js +2 -0
  43. package/lib/rest/api/v2010/account/queue/member.js +2 -0
  44. package/lib/rest/api/v2010/account/queue.js +2 -0
  45. package/lib/rest/api/v2010/account/recording/addOnResult/payload.js +2 -0
  46. package/lib/rest/api/v2010/account/recording/addOnResult.js +2 -0
  47. package/lib/rest/api/v2010/account/recording/transcription.js +2 -0
  48. package/lib/rest/api/v2010/account/recording.js +2 -0
  49. package/lib/rest/api/v2010/account/shortCode.js +2 -0
  50. package/lib/rest/api/v2010/account/signingKey.js +2 -0
  51. package/lib/rest/api/v2010/account/sip/credentialList/credential.js +2 -0
  52. package/lib/rest/api/v2010/account/sip/credentialList.js +2 -0
  53. package/lib/rest/api/v2010/account/sip/domain/authTypes/authCallsMapping/authCallsCredentialListMapping.js +2 -0
  54. package/lib/rest/api/v2010/account/sip/domain/authTypes/authCallsMapping/authCallsIpAccessControlListMapping.js +2 -0
  55. package/lib/rest/api/v2010/account/sip/domain/authTypes/authRegistrationsMapping/authRegistrationsCredentialListMapping.js +2 -0
  56. package/lib/rest/api/v2010/account/sip/domain/credentialListMapping.js +2 -0
  57. package/lib/rest/api/v2010/account/sip/domain/ipAccessControlListMapping.js +2 -0
  58. package/lib/rest/api/v2010/account/sip/domain.js +2 -0
  59. package/lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.js +2 -0
  60. package/lib/rest/api/v2010/account/sip/ipAccessControlList.js +2 -0
  61. package/lib/rest/api/v2010/account/transcription.js +2 -0
  62. package/lib/rest/api/v2010/account/usage/record/allTime.js +2 -0
  63. package/lib/rest/api/v2010/account/usage/record/daily.js +2 -0
  64. package/lib/rest/api/v2010/account/usage/record/lastMonth.js +2 -0
  65. package/lib/rest/api/v2010/account/usage/record/monthly.js +2 -0
  66. package/lib/rest/api/v2010/account/usage/record/thisMonth.js +2 -0
  67. package/lib/rest/api/v2010/account/usage/record/today.js +2 -0
  68. package/lib/rest/api/v2010/account/usage/record/yearly.js +2 -0
  69. package/lib/rest/api/v2010/account/usage/record/yesterday.js +2 -0
  70. package/lib/rest/api/v2010/account/usage/record.js +2 -0
  71. package/lib/rest/api/v2010/account/usage/trigger.js +2 -0
  72. package/lib/rest/api/v2010/account.js +2 -0
  73. package/lib/rest/autopilot/v1/assistant/fieldType/fieldValue.js +2 -0
  74. package/lib/rest/autopilot/v1/assistant/fieldType.js +2 -0
  75. package/lib/rest/autopilot/v1/assistant/modelBuild.js +2 -0
  76. package/lib/rest/autopilot/v1/assistant/query.js +2 -0
  77. package/lib/rest/autopilot/v1/assistant/task/field.js +2 -0
  78. package/lib/rest/autopilot/v1/assistant/task/sample.js +2 -0
  79. package/lib/rest/autopilot/v1/assistant/task.js +2 -0
  80. package/lib/rest/autopilot/v1/assistant/webhook.js +2 -0
  81. package/lib/rest/autopilot/v1/assistant.js +2 -0
  82. package/lib/rest/bulkexports/v1/export/day.js +2 -0
  83. package/lib/rest/bulkexports/v1/export/exportCustomJob.js +2 -0
  84. package/lib/rest/chat/v1/credential.js +2 -0
  85. package/lib/rest/chat/v1/service/channel/invite.js +2 -0
  86. package/lib/rest/chat/v1/service/channel/member.js +2 -0
  87. package/lib/rest/chat/v1/service/channel/message.js +2 -0
  88. package/lib/rest/chat/v1/service/channel.js +2 -0
  89. package/lib/rest/chat/v1/service/role.js +2 -0
  90. package/lib/rest/chat/v1/service/user/userChannel.js +2 -0
  91. package/lib/rest/chat/v1/service/user.js +2 -0
  92. package/lib/rest/chat/v1/service.js +2 -0
  93. package/lib/rest/chat/v2/credential.js +2 -0
  94. package/lib/rest/chat/v2/service/binding.js +2 -0
  95. package/lib/rest/chat/v2/service/channel/invite.js +2 -0
  96. package/lib/rest/chat/v2/service/channel/member.js +2 -0
  97. package/lib/rest/chat/v2/service/channel/message.js +2 -0
  98. package/lib/rest/chat/v2/service/channel/webhook.js +2 -0
  99. package/lib/rest/chat/v2/service/channel.js +2 -0
  100. package/lib/rest/chat/v2/service/role.js +2 -0
  101. package/lib/rest/chat/v2/service/user/userBinding.js +2 -0
  102. package/lib/rest/chat/v2/service/user/userChannel.js +2 -0
  103. package/lib/rest/chat/v2/service/user.js +2 -0
  104. package/lib/rest/chat/v2/service.js +2 -0
  105. package/lib/rest/conversations/v1/conversation/message/deliveryReceipt.js +2 -0
  106. package/lib/rest/conversations/v1/conversation/message.js +2 -0
  107. package/lib/rest/conversations/v1/conversation/participant.js +2 -0
  108. package/lib/rest/conversations/v1/conversation/webhook.js +2 -0
  109. package/lib/rest/conversations/v1/conversation.js +2 -0
  110. package/lib/rest/conversations/v1/credential.js +2 -0
  111. package/lib/rest/conversations/v1/participantConversation.js +2 -0
  112. package/lib/rest/conversations/v1/role.js +2 -0
  113. package/lib/rest/conversations/v1/service/binding.js +2 -0
  114. package/lib/rest/conversations/v1/service/configuration/webhook.d.ts +172 -0
  115. package/lib/rest/conversations/v1/service/configuration/webhook.js +400 -0
  116. package/lib/rest/conversations/v1/service/configuration.d.ts +2 -0
  117. package/lib/rest/conversations/v1/service/configuration.js +13 -0
  118. package/lib/rest/conversations/v1/service/conversation/message/deliveryReceipt.js +2 -0
  119. package/lib/rest/conversations/v1/service/conversation/message.js +2 -0
  120. package/lib/rest/conversations/v1/service/conversation/participant.js +2 -0
  121. package/lib/rest/conversations/v1/service/conversation/webhook.js +2 -0
  122. package/lib/rest/conversations/v1/service/conversation.js +2 -0
  123. package/lib/rest/conversations/v1/service/participantConversation.js +2 -0
  124. package/lib/rest/conversations/v1/service/role.js +2 -0
  125. package/lib/rest/conversations/v1/service/user/userConversation.js +2 -0
  126. package/lib/rest/conversations/v1/service/user.js +2 -0
  127. package/lib/rest/conversations/v1/service.js +2 -0
  128. package/lib/rest/conversations/v1/user/userConversation.js +2 -0
  129. package/lib/rest/conversations/v1/user.js +2 -0
  130. package/lib/rest/events/v1/eventType.js +2 -0
  131. package/lib/rest/events/v1/schema/version.js +2 -0
  132. package/lib/rest/events/v1/sink.js +2 -0
  133. package/lib/rest/events/v1/subscription/subscribedEvent.js +2 -0
  134. package/lib/rest/events/v1/subscription.js +2 -0
  135. package/lib/rest/fax/v1/fax/faxMedia.js +2 -0
  136. package/lib/rest/fax/v1/fax.js +2 -0
  137. package/lib/rest/flexApi/v1/channel.js +2 -0
  138. package/lib/rest/flexApi/v1/configuration.d.ts +4 -0
  139. package/lib/rest/flexApi/v1/configuration.js +5 -0
  140. package/lib/rest/flexApi/v1/flexFlow.d.ts +2 -2
  141. package/lib/rest/flexApi/v1/flexFlow.js +5 -3
  142. package/lib/rest/flexApi/v1/webChannel.js +2 -0
  143. package/lib/rest/insights/V1.d.ts +6 -0
  144. package/lib/rest/insights/V1.js +22 -0
  145. package/lib/rest/insights/v1/call/event.js +2 -0
  146. package/lib/rest/insights/v1/call/metric.js +2 -0
  147. package/lib/rest/insights/v1/callSummaries.js +2 -0
  148. package/lib/rest/insights/v1/conference/conferenceParticipant.d.ts +385 -0
  149. package/lib/rest/insights/v1/conference/conferenceParticipant.js +663 -0
  150. package/lib/rest/insights/v1/conference.d.ts +387 -0
  151. package/lib/rest/insights/v1/conference.js +669 -0
  152. package/lib/rest/insights/v1/room/participant.js +2 -0
  153. package/lib/rest/insights/v1/room.js +2 -0
  154. package/lib/rest/insights/v1/setting.d.ts +181 -0
  155. package/lib/rest/insights/v1/setting.js +384 -0
  156. package/lib/rest/ipMessaging/v1/credential.js +2 -0
  157. package/lib/rest/ipMessaging/v1/service/channel/invite.js +2 -0
  158. package/lib/rest/ipMessaging/v1/service/channel/member.js +2 -0
  159. package/lib/rest/ipMessaging/v1/service/channel/message.js +2 -0
  160. package/lib/rest/ipMessaging/v1/service/channel.js +2 -0
  161. package/lib/rest/ipMessaging/v1/service/role.js +2 -0
  162. package/lib/rest/ipMessaging/v1/service/user/userChannel.js +2 -0
  163. package/lib/rest/ipMessaging/v1/service/user.js +2 -0
  164. package/lib/rest/ipMessaging/v1/service.js +2 -0
  165. package/lib/rest/ipMessaging/v2/credential.js +2 -0
  166. package/lib/rest/ipMessaging/v2/service/binding.js +2 -0
  167. package/lib/rest/ipMessaging/v2/service/channel/invite.js +2 -0
  168. package/lib/rest/ipMessaging/v2/service/channel/member.js +2 -0
  169. package/lib/rest/ipMessaging/v2/service/channel/message.js +2 -0
  170. package/lib/rest/ipMessaging/v2/service/channel/webhook.js +2 -0
  171. package/lib/rest/ipMessaging/v2/service/channel.js +2 -0
  172. package/lib/rest/ipMessaging/v2/service/role.js +2 -0
  173. package/lib/rest/ipMessaging/v2/service/user/userBinding.js +2 -0
  174. package/lib/rest/ipMessaging/v2/service/user/userChannel.js +2 -0
  175. package/lib/rest/ipMessaging/v2/service/user.js +2 -0
  176. package/lib/rest/ipMessaging/v2/service.js +2 -0
  177. package/lib/rest/media/v1/mediaProcessor.d.ts +4 -0
  178. package/lib/rest/media/v1/mediaProcessor.js +7 -1
  179. package/lib/rest/media/v1/playerStreamer.js +2 -0
  180. package/lib/rest/messaging/v1/brandRegistration/brandVetting.js +2 -0
  181. package/lib/rest/messaging/v1/brandRegistration.d.ts +14 -0
  182. package/lib/rest/messaging/v1/brandRegistration.js +51 -0
  183. package/lib/rest/messaging/v1/service/alphaSender.js +2 -0
  184. package/lib/rest/messaging/v1/service/phoneNumber.js +2 -0
  185. package/lib/rest/messaging/v1/service/shortCode.js +2 -0
  186. package/lib/rest/messaging/v1/service/usAppToPerson.js +2 -0
  187. package/lib/rest/messaging/v1/service.js +2 -0
  188. package/lib/rest/monitor/v1/alert.js +2 -0
  189. package/lib/rest/monitor/v1/event.js +2 -0
  190. package/lib/rest/notify/v1/credential.js +2 -0
  191. package/lib/rest/notify/v1/service/binding.js +2 -0
  192. package/lib/rest/notify/v1/service.js +2 -0
  193. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.d.ts +154 -1
  194. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.js +244 -0
  195. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/evaluation.js +2 -0
  196. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/itemAssignment.js +2 -0
  197. package/lib/rest/numbers/v2/regulatoryCompliance/bundle.js +2 -0
  198. package/lib/rest/numbers/v2/regulatoryCompliance/endUser.js +2 -0
  199. package/lib/rest/numbers/v2/regulatoryCompliance/endUserType.js +2 -0
  200. package/lib/rest/numbers/v2/regulatoryCompliance/regulation.js +2 -0
  201. package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.js +2 -0
  202. package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocumentType.js +2 -0
  203. package/lib/rest/preview/bulk_exports/export/day.js +2 -0
  204. package/lib/rest/preview/bulk_exports/export/exportCustomJob.js +2 -0
  205. package/lib/rest/preview/deployed_devices/fleet/certificate.js +2 -0
  206. package/lib/rest/preview/deployed_devices/fleet/deployment.js +2 -0
  207. package/lib/rest/preview/deployed_devices/fleet/device.js +2 -0
  208. package/lib/rest/preview/deployed_devices/fleet/key.js +2 -0
  209. package/lib/rest/preview/deployed_devices/fleet.js +2 -0
  210. package/lib/rest/preview/hosted_numbers/authorizationDocument/dependentHostedNumberOrder.js +2 -0
  211. package/lib/rest/preview/hosted_numbers/authorizationDocument.js +2 -0
  212. package/lib/rest/preview/hosted_numbers/hostedNumberOrder.js +2 -0
  213. package/lib/rest/preview/marketplace/availableAddOn/availableAddOnExtension.js +2 -0
  214. package/lib/rest/preview/marketplace/availableAddOn.js +2 -0
  215. package/lib/rest/preview/marketplace/installedAddOn/installedAddOnExtension.js +2 -0
  216. package/lib/rest/preview/marketplace/installedAddOn.js +2 -0
  217. package/lib/rest/preview/sync/service/document/documentPermission.js +2 -0
  218. package/lib/rest/preview/sync/service/document.js +2 -0
  219. package/lib/rest/preview/sync/service/syncList/syncListItem.js +2 -0
  220. package/lib/rest/preview/sync/service/syncList/syncListPermission.js +2 -0
  221. package/lib/rest/preview/sync/service/syncList.js +2 -0
  222. package/lib/rest/preview/sync/service/syncMap/syncMapItem.js +2 -0
  223. package/lib/rest/preview/sync/service/syncMap/syncMapPermission.js +2 -0
  224. package/lib/rest/preview/sync/service/syncMap.js +2 -0
  225. package/lib/rest/preview/sync/service.js +2 -0
  226. package/lib/rest/preview/understand/assistant/fieldType/fieldValue.js +2 -0
  227. package/lib/rest/preview/understand/assistant/fieldType.js +2 -0
  228. package/lib/rest/preview/understand/assistant/modelBuild.js +2 -0
  229. package/lib/rest/preview/understand/assistant/query.js +2 -0
  230. package/lib/rest/preview/understand/assistant/task/field.js +2 -0
  231. package/lib/rest/preview/understand/assistant/task/sample.js +2 -0
  232. package/lib/rest/preview/understand/assistant/task.js +2 -0
  233. package/lib/rest/preview/understand/assistant.js +2 -0
  234. package/lib/rest/preview/wireless/command.js +2 -0
  235. package/lib/rest/preview/wireless/ratePlan.js +2 -0
  236. package/lib/rest/preview/wireless/sim.js +2 -0
  237. package/lib/rest/pricing/v1/messaging/country.js +2 -0
  238. package/lib/rest/pricing/v1/phoneNumber/country.js +2 -0
  239. package/lib/rest/pricing/v1/voice/country.js +2 -0
  240. package/lib/rest/pricing/v2/country.js +2 -0
  241. package/lib/rest/pricing/v2/voice/country.js +2 -0
  242. package/lib/rest/proxy/v1/service/phoneNumber.js +2 -0
  243. package/lib/rest/proxy/v1/service/session/interaction.js +2 -0
  244. package/lib/rest/proxy/v1/service/session/participant/messageInteraction.js +2 -0
  245. package/lib/rest/proxy/v1/service/session/participant.js +2 -0
  246. package/lib/rest/proxy/v1/service/session.js +2 -0
  247. package/lib/rest/proxy/v1/service/shortCode.js +2 -0
  248. package/lib/rest/proxy/v1/service.js +2 -0
  249. package/lib/rest/serverless/v1/service/asset/assetVersion.js +2 -0
  250. package/lib/rest/serverless/v1/service/asset.js +2 -0
  251. package/lib/rest/serverless/v1/service/build.js +2 -0
  252. package/lib/rest/serverless/v1/service/environment/deployment.js +2 -0
  253. package/lib/rest/serverless/v1/service/environment/log.js +2 -0
  254. package/lib/rest/serverless/v1/service/environment/variable.js +2 -0
  255. package/lib/rest/serverless/v1/service/environment.js +2 -0
  256. package/lib/rest/serverless/v1/service/function/functionVersion.js +2 -0
  257. package/lib/rest/serverless/v1/service/function.js +2 -0
  258. package/lib/rest/serverless/v1/service.js +2 -0
  259. package/lib/rest/studio/v1/flow/engagement/step.js +2 -0
  260. package/lib/rest/studio/v1/flow/engagement.js +2 -0
  261. package/lib/rest/studio/v1/flow/execution/executionStep.js +2 -0
  262. package/lib/rest/studio/v1/flow/execution.js +2 -0
  263. package/lib/rest/studio/v1/flow.js +2 -0
  264. package/lib/rest/studio/v2/flow/execution/executionStep.js +2 -0
  265. package/lib/rest/studio/v2/flow/execution.js +2 -0
  266. package/lib/rest/studio/v2/flow/flowRevision.js +2 -0
  267. package/lib/rest/studio/v2/flow.js +2 -0
  268. package/lib/rest/supersim/V1.d.ts +6 -0
  269. package/lib/rest/supersim/V1.js +23 -0
  270. package/lib/rest/supersim/v1/command.js +2 -0
  271. package/lib/rest/supersim/v1/esimProfile.d.ts +344 -0
  272. package/lib/rest/supersim/v1/esimProfile.js +664 -0
  273. package/lib/rest/supersim/v1/fleet.js +2 -0
  274. package/lib/rest/supersim/v1/ipCommand.d.ts +362 -0
  275. package/lib/rest/supersim/v1/ipCommand.js +681 -0
  276. package/lib/rest/supersim/v1/network.js +2 -0
  277. package/lib/rest/supersim/v1/networkAccessProfile/networkAccessProfileNetwork.js +2 -0
  278. package/lib/rest/supersim/v1/networkAccessProfile.js +2 -0
  279. package/lib/rest/supersim/v1/sim/billingPeriod.js +2 -0
  280. package/lib/rest/supersim/v1/sim.js +2 -0
  281. package/lib/rest/supersim/v1/smsCommand.js +2 -0
  282. package/lib/rest/supersim/v1/usageRecord.js +2 -0
  283. package/lib/rest/sync/v1/service/document/documentPermission.js +2 -0
  284. package/lib/rest/sync/v1/service/document.js +2 -0
  285. package/lib/rest/sync/v1/service/syncList/syncListItem.js +2 -0
  286. package/lib/rest/sync/v1/service/syncList/syncListPermission.js +2 -0
  287. package/lib/rest/sync/v1/service/syncList.js +2 -0
  288. package/lib/rest/sync/v1/service/syncMap/syncMapItem.js +2 -0
  289. package/lib/rest/sync/v1/service/syncMap/syncMapPermission.js +2 -0
  290. package/lib/rest/sync/v1/service/syncMap.js +2 -0
  291. package/lib/rest/sync/v1/service/syncStream.js +2 -0
  292. package/lib/rest/sync/v1/service.js +2 -0
  293. package/lib/rest/taskrouter/v1/workspace/activity.js +2 -0
  294. package/lib/rest/taskrouter/v1/workspace/event.js +2 -0
  295. package/lib/rest/taskrouter/v1/workspace/task/reservation.js +2 -0
  296. package/lib/rest/taskrouter/v1/workspace/task.js +2 -0
  297. package/lib/rest/taskrouter/v1/workspace/taskChannel.js +2 -0
  298. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueuesStatistics.js +2 -0
  299. package/lib/rest/taskrouter/v1/workspace/taskQueue.js +2 -0
  300. package/lib/rest/taskrouter/v1/workspace/worker/reservation.js +2 -0
  301. package/lib/rest/taskrouter/v1/workspace/worker/workerChannel.js +2 -0
  302. package/lib/rest/taskrouter/v1/workspace/worker.js +2 -0
  303. package/lib/rest/taskrouter/v1/workspace/workflow.js +2 -0
  304. package/lib/rest/taskrouter/v1/workspace.js +2 -0
  305. package/lib/rest/trunking/v1/trunk/credentialList.js +2 -0
  306. package/lib/rest/trunking/v1/trunk/ipAccessControlList.js +2 -0
  307. package/lib/rest/trunking/v1/trunk/originationUrl.js +2 -0
  308. package/lib/rest/trunking/v1/trunk/phoneNumber.js +2 -0
  309. package/lib/rest/trunking/v1/trunk.js +2 -0
  310. package/lib/rest/trusthub/v1/customerProfiles/customerProfilesChannelEndpointAssignment.js +2 -0
  311. package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEntityAssignments.js +2 -0
  312. package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.js +2 -0
  313. package/lib/rest/trusthub/v1/customerProfiles.js +2 -0
  314. package/lib/rest/trusthub/v1/endUser.js +2 -0
  315. package/lib/rest/trusthub/v1/endUserType.js +2 -0
  316. package/lib/rest/trusthub/v1/policies.js +2 -0
  317. package/lib/rest/trusthub/v1/supportingDocument.js +2 -0
  318. package/lib/rest/trusthub/v1/supportingDocumentType.js +2 -0
  319. package/lib/rest/trusthub/v1/trustProducts/trustProductsChannelEndpointAssignment.js +2 -0
  320. package/lib/rest/trusthub/v1/trustProducts/trustProductsEntityAssignments.js +2 -0
  321. package/lib/rest/trusthub/v1/trustProducts/trustProductsEvaluations.js +2 -0
  322. package/lib/rest/trusthub/v1/trustProducts.js +2 -0
  323. package/lib/rest/verify/v2/service/accessToken.d.ts +64 -4
  324. package/lib/rest/verify/v2/service/accessToken.js +158 -8
  325. package/lib/rest/verify/v2/service/entity/challenge.js +2 -0
  326. package/lib/rest/verify/v2/service/entity/factor.js +2 -0
  327. package/lib/rest/verify/v2/service/entity.js +2 -0
  328. package/lib/rest/verify/v2/service/messagingConfiguration.js +2 -0
  329. package/lib/rest/verify/v2/service/rateLimit/bucket.js +2 -0
  330. package/lib/rest/verify/v2/service/rateLimit.js +2 -0
  331. package/lib/rest/verify/v2/service/webhook.js +2 -0
  332. package/lib/rest/verify/v2/service.js +2 -0
  333. package/lib/rest/verify/v2/template.js +2 -0
  334. package/lib/rest/verify/v2/verificationAttempt.js +2 -0
  335. package/lib/rest/video/v1/composition.d.ts +2 -0
  336. package/lib/rest/video/v1/composition.js +5 -0
  337. package/lib/rest/video/v1/compositionHook.js +2 -0
  338. package/lib/rest/video/v1/recording.d.ts +2 -0
  339. package/lib/rest/video/v1/recording.js +5 -0
  340. package/lib/rest/video/v1/room/recording.d.ts +2 -0
  341. package/lib/rest/video/v1/room/recording.js +5 -0
  342. package/lib/rest/video/v1/room/roomParticipant/roomParticipantPublishedTrack.js +2 -0
  343. package/lib/rest/video/v1/room/roomParticipant/roomParticipantSubscribedTrack.js +2 -0
  344. package/lib/rest/video/v1/room/roomParticipant.js +2 -0
  345. package/lib/rest/video/v1/room.d.ts +12 -0
  346. package/lib/rest/video/v1/room.js +21 -1
  347. package/lib/rest/voice/V1.d.ts +3 -0
  348. package/lib/rest/voice/V1.js +12 -0
  349. package/lib/rest/voice/v1/archivedCall.d.ts +136 -0
  350. package/lib/rest/voice/v1/archivedCall.js +325 -0
  351. package/lib/rest/voice/v1/byocTrunk.js +2 -0
  352. package/lib/rest/voice/v1/connectionPolicy/connectionPolicyTarget.js +2 -0
  353. package/lib/rest/voice/v1/connectionPolicy.js +2 -0
  354. package/lib/rest/voice/v1/dialingPermissions/country/highriskSpecialPrefix.js +2 -0
  355. package/lib/rest/voice/v1/dialingPermissions/country.js +2 -0
  356. package/lib/rest/voice/v1/ipRecord.js +2 -0
  357. package/lib/rest/voice/v1/sourceIpMapping.js +2 -0
  358. package/lib/rest/wireless/v1/command.js +2 -0
  359. package/lib/rest/wireless/v1/ratePlan.js +2 -0
  360. package/lib/rest/wireless/v1/sim/dataSession.js +2 -0
  361. package/lib/rest/wireless/v1/sim/usageRecord.js +2 -0
  362. package/lib/rest/wireless/v1/sim.js +6 -8
  363. package/lib/rest/wireless/v1/usageRecord.js +2 -0
  364. package/package.json +2 -2
@@ -18,6 +18,7 @@ var values = require('../../../../base/values'); /* jshint ignore:line */
18
18
  var AccessTokenList;
19
19
  var AccessTokenPage;
20
20
  var AccessTokenInstance;
21
+ var AccessTokenContext;
21
22
 
22
23
  /* jshint ignore:start */
23
24
  /**
@@ -29,7 +30,7 @@ var AccessTokenInstance;
29
30
  * @constructor Twilio.Verify.V2.ServiceContext.AccessTokenList
30
31
  *
31
32
  * @param {Twilio.Verify.V2} version - Version of the resource
32
- * @param {string} serviceSid - The unique string that identifies the resource
33
+ * @param {string} serviceSid - Verify Service Sid.
33
34
  */
34
35
  /* jshint ignore:end */
35
36
  AccessTokenList = function AccessTokenList(version, serviceSid) {
@@ -61,6 +62,7 @@ AccessTokenList = function AccessTokenList(version, serviceSid) {
61
62
  * @param {object} opts - Options for request
62
63
  * @param {string} opts.identity - Unique external identifier of the Entity
63
64
  * @param {access_token.factor_types} opts.factorType - The Type of this Factor
65
+ * @param {string} [opts.factorFriendlyName] - The factor friendly name
64
66
  * @param {function} [callback] - Callback to handle processed record
65
67
  *
66
68
  * @returns {Promise} Resolves to processed AccessTokenInstance
@@ -80,13 +82,19 @@ AccessTokenList = function AccessTokenList(version, serviceSid) {
80
82
  var deferred = Q.defer();
81
83
  var data = values.of({
82
84
  'Identity': _.get(opts, 'identity'),
83
- 'FactorType': _.get(opts, 'factorType')
85
+ 'FactorType': _.get(opts, 'factorType'),
86
+ 'FactorFriendlyName': _.get(opts, 'factorFriendlyName')
84
87
  });
85
88
 
86
89
  var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
87
90
 
88
91
  promise = promise.then(function(payload) {
89
- deferred.resolve(new AccessTokenInstance(this._version, payload));
92
+ deferred.resolve(new AccessTokenInstance(
93
+ this._version,
94
+ payload,
95
+ this._solution.serviceSid,
96
+ this._solution.sid
97
+ ));
90
98
  }.bind(this));
91
99
 
92
100
  promise.catch(function(error) {
@@ -100,6 +108,22 @@ AccessTokenList = function AccessTokenList(version, serviceSid) {
100
108
  return deferred.promise;
101
109
  };
102
110
 
111
+ /* jshint ignore:start */
112
+ /**
113
+ * Constructs a access_token
114
+ *
115
+ * @function get
116
+ * @memberof Twilio.Verify.V2.ServiceContext.AccessTokenList#
117
+ *
118
+ * @param {string} sid - A string that uniquely identifies this Access Token.
119
+ *
120
+ * @returns {Twilio.Verify.V2.ServiceContext.AccessTokenContext}
121
+ */
122
+ /* jshint ignore:end */
123
+ AccessTokenListInstance.get = function get(sid) {
124
+ return new AccessTokenContext(this._version, this._solution.serviceSid, sid);
125
+ };
126
+
103
127
  /* jshint ignore:start */
104
128
  /**
105
129
  * Provide a user-friendly representation
@@ -200,23 +224,70 @@ AccessTokenPage.prototype[util.inspect.custom] = function inspect(depth,
200
224
  *
201
225
  * @constructor Twilio.Verify.V2.ServiceContext.AccessTokenInstance
202
226
  *
227
+ * @property {string} sid - A string that uniquely identifies this Access Token.
228
+ * @property {string} accountSid - Account Sid.
229
+ * @property {string} serviceSid - Verify Service Sid.
230
+ * @property {string} entityIdentity - Unique external identifier of the Entity
231
+ * @property {access_token.factor_types} factorType - The Type of the Factor
232
+ * @property {string} factorFriendlyName -
233
+ * A human readable description of this factor.
203
234
  * @property {string} token - Generated access token.
235
+ * @property {string} url - The URL of this resource.
204
236
  *
205
237
  * @param {V2} version - Version of the resource
206
238
  * @param {AccessTokenPayload} payload - The instance payload
207
- * @param {sid} serviceSid - The unique string that identifies the resource
239
+ * @param {sid} serviceSid - Verify Service Sid.
240
+ * @param {sid} sid - A string that uniquely identifies this Access Token.
208
241
  */
209
242
  /* jshint ignore:end */
210
- AccessTokenInstance = function AccessTokenInstance(version, payload, serviceSid)
211
- {
243
+ AccessTokenInstance = function AccessTokenInstance(version, payload, serviceSid,
244
+ sid) {
212
245
  this._version = version;
213
246
 
214
247
  // Marshaled Properties
248
+ this.sid = payload.sid; // jshint ignore:line
249
+ this.accountSid = payload.account_sid; // jshint ignore:line
250
+ this.serviceSid = payload.service_sid; // jshint ignore:line
251
+ this.entityIdentity = payload.entity_identity; // jshint ignore:line
252
+ this.factorType = payload.factor_type; // jshint ignore:line
253
+ this.factorFriendlyName = payload.factor_friendly_name; // jshint ignore:line
215
254
  this.token = payload.token; // jshint ignore:line
255
+ this.url = payload.url; // jshint ignore:line
216
256
 
217
257
  // Context
218
258
  this._context = undefined;
219
- this._solution = {serviceSid: serviceSid, };
259
+ this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };
260
+ };
261
+
262
+ Object.defineProperty(AccessTokenInstance.prototype,
263
+ '_proxy', {
264
+ get: function() {
265
+ if (!this._context) {
266
+ this._context = new AccessTokenContext(
267
+ this._version,
268
+ this._solution.serviceSid,
269
+ this._solution.sid
270
+ );
271
+ }
272
+
273
+ return this._context;
274
+ }
275
+ });
276
+
277
+ /* jshint ignore:start */
278
+ /**
279
+ * fetch a AccessTokenInstance
280
+ *
281
+ * @function fetch
282
+ * @memberof Twilio.Verify.V2.ServiceContext.AccessTokenInstance#
283
+ *
284
+ * @param {function} [callback] - Callback to handle processed record
285
+ *
286
+ * @returns {Promise} Resolves to processed AccessTokenInstance
287
+ */
288
+ /* jshint ignore:end */
289
+ AccessTokenInstance.prototype.fetch = function fetch(callback) {
290
+ return this._proxy.fetch(callback);
220
291
  };
221
292
 
222
293
  /* jshint ignore:start */
@@ -244,8 +315,87 @@ AccessTokenInstance.prototype[util.inspect.custom] = function inspect(depth,
244
315
  return util.inspect(this.toJSON(), options);
245
316
  };
246
317
 
318
+
319
+ /* jshint ignore:start */
320
+ /**
321
+ * Initialize the AccessTokenContext
322
+ *
323
+ * PLEASE NOTE that this class contains beta products that are subject to change.
324
+ * Use them with caution.
325
+ *
326
+ * @constructor Twilio.Verify.V2.ServiceContext.AccessTokenContext
327
+ *
328
+ * @param {V2} version - Version of the resource
329
+ * @param {sid} serviceSid - Service Sid.
330
+ * @param {sid} sid - A string that uniquely identifies this Access Token.
331
+ */
332
+ /* jshint ignore:end */
333
+ AccessTokenContext = function AccessTokenContext(version, serviceSid, sid) {
334
+ this._version = version;
335
+
336
+ // Path Solution
337
+ this._solution = {serviceSid: serviceSid, sid: sid, };
338
+ this._uri = `/Services/${serviceSid}/AccessTokens/${sid}`;
339
+ };
340
+
341
+ /* jshint ignore:start */
342
+ /**
343
+ * fetch a AccessTokenInstance
344
+ *
345
+ * @function fetch
346
+ * @memberof Twilio.Verify.V2.ServiceContext.AccessTokenContext#
347
+ *
348
+ * @param {function} [callback] - Callback to handle processed record
349
+ *
350
+ * @returns {Promise} Resolves to processed AccessTokenInstance
351
+ */
352
+ /* jshint ignore:end */
353
+ AccessTokenContext.prototype.fetch = function fetch(callback) {
354
+ var deferred = Q.defer();
355
+ var promise = this._version.fetch({uri: this._uri, method: 'GET'});
356
+
357
+ promise = promise.then(function(payload) {
358
+ deferred.resolve(new AccessTokenInstance(
359
+ this._version,
360
+ payload,
361
+ this._solution.serviceSid,
362
+ this._solution.sid
363
+ ));
364
+ }.bind(this));
365
+
366
+ promise.catch(function(error) {
367
+ deferred.reject(error);
368
+ });
369
+
370
+ if (_.isFunction(callback)) {
371
+ deferred.promise.nodeify(callback);
372
+ }
373
+
374
+ return deferred.promise;
375
+ };
376
+
377
+ /* jshint ignore:start */
378
+ /**
379
+ * Provide a user-friendly representation
380
+ *
381
+ * @function toJSON
382
+ * @memberof Twilio.Verify.V2.ServiceContext.AccessTokenContext#
383
+ *
384
+ * @returns Object
385
+ */
386
+ /* jshint ignore:end */
387
+ AccessTokenContext.prototype.toJSON = function toJSON() {
388
+ return this._solution;
389
+ };
390
+
391
+ AccessTokenContext.prototype[util.inspect.custom] = function inspect(depth,
392
+ options) {
393
+ return util.inspect(this.toJSON(), options);
394
+ };
395
+
247
396
  module.exports = {
248
397
  AccessTokenList: AccessTokenList,
249
398
  AccessTokenPage: AccessTokenPage,
250
- AccessTokenInstance: AccessTokenInstance
399
+ AccessTokenInstance: AccessTokenInstance,
400
+ AccessTokenContext: AccessTokenContext
251
401
  };
@@ -210,6 +210,8 @@ ChallengeList = function ChallengeList(version, serviceSid, identity) {
210
210
  if (!done) {
211
211
  currentPage++;
212
212
  fetchNextPage(_.bind(page.nextPage, page));
213
+ } else {
214
+ onComplete();
213
215
  }
214
216
  });
215
217
 
@@ -139,6 +139,8 @@ FactorList = function FactorList(version, serviceSid, identity) {
139
139
  if (!done) {
140
140
  currentPage++;
141
141
  fetchNextPage(_.bind(page.nextPage, page));
142
+ } else {
143
+ onComplete();
142
144
  }
143
145
  });
144
146
 
@@ -188,6 +188,8 @@ EntityList = function EntityList(version, serviceSid) {
188
188
  if (!done) {
189
189
  currentPage++;
190
190
  fetchNextPage(_.bind(page.nextPage, page));
191
+ } else {
192
+ onComplete();
191
193
  }
192
194
  });
193
195
 
@@ -193,6 +193,8 @@ MessagingConfigurationList = function MessagingConfigurationList(version,
193
193
  if (!done) {
194
194
  currentPage++;
195
195
  fetchNextPage(_.bind(page.nextPage, page));
196
+ } else {
197
+ onComplete();
196
198
  }
197
199
  });
198
200
 
@@ -190,6 +190,8 @@ BucketList = function BucketList(version, serviceSid, rateLimitSid) {
190
190
  if (!done) {
191
191
  currentPage++;
192
192
  fetchNextPage(_.bind(page.nextPage, page));
193
+ } else {
194
+ onComplete();
193
195
  }
194
196
  });
195
197
 
@@ -189,6 +189,8 @@ RateLimitList = function RateLimitList(version, serviceSid) {
189
189
  if (!done) {
190
190
  currentPage++;
191
191
  fetchNextPage(_.bind(page.nextPage, page));
192
+ } else {
193
+ onComplete();
192
194
  }
193
195
  });
194
196
 
@@ -204,6 +204,8 @@ WebhookList = function WebhookList(version, serviceSid) {
204
204
  if (!done) {
205
205
  currentPage++;
206
206
  fetchNextPage(_.bind(page.nextPage, page));
207
+ } else {
208
+ onComplete();
207
209
  }
208
210
  });
209
211
 
@@ -236,6 +236,8 @@ ServiceList = function ServiceList(version) {
236
236
  if (!done) {
237
237
  currentPage++;
238
238
  fetchNextPage(_.bind(page.nextPage, page));
239
+ } else {
240
+ onComplete();
239
241
  }
240
242
  });
241
243
 
@@ -132,6 +132,8 @@ TemplateList = function TemplateList(version) {
132
132
  if (!done) {
133
133
  currentPage++;
134
134
  fetchNextPage(_.bind(page.nextPage, page));
135
+ } else {
136
+ onComplete();
135
137
  }
136
138
  });
137
139
 
@@ -140,6 +140,8 @@ VerificationAttemptList = function VerificationAttemptList(version) {
140
140
  if (!done) {
141
141
  currentPage++;
142
142
  fetchNextPage(_.bind(page.nextPage, page));
143
+ } else {
144
+ onComplete();
143
145
  }
144
146
  });
145
147
 
@@ -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
 
@@ -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
 
@@ -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
@@ -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,7 +168,9 @@ 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
173
+ * @property maxParticipantDuration - The maximum number of seconds a Participant can be connected to the room
172
174
  * @property maxParticipants - The maximum number of concurrent Participants allowed in the room
173
175
  * @property mediaRegion - The region for the media server in Group Rooms
174
176
  * @property recordParticipantsOnConnect - Whether to start recording when Participants connect
@@ -177,11 +179,14 @@ interface RoomListInstance {
177
179
  * @property statusCallbackMethod - The HTTP method we should use to call status_callback
178
180
  * @property type - The type of room
179
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.
180
183
  * @property videoCodecs - An array of the video codecs that are supported when publishing a track in the room
181
184
  */
182
185
  interface RoomListInstanceCreateOptions {
183
186
  audioOnly?: boolean;
187
+ emptyRoomTimeout?: number;
184
188
  enableTurn?: boolean;
189
+ maxParticipantDuration?: number;
185
190
  maxParticipants?: number;
186
191
  mediaRegion?: string;
187
192
  recordParticipantsOnConnect?: boolean;
@@ -190,6 +195,7 @@ interface RoomListInstanceCreateOptions {
190
195
  statusCallbackMethod?: string;
191
196
  type?: RoomRoomType;
192
197
  uniqueName?: string;
198
+ unusedRoomTimeout?: number;
193
199
  videoCodecs?: RoomVideoCodec | RoomVideoCodec[];
194
200
  }
195
201
 
@@ -283,10 +289,12 @@ interface RoomResource {
283
289
  date_created: Date;
284
290
  date_updated: Date;
285
291
  duration: number;
292
+ empty_room_timeout: number;
286
293
  enable_turn: boolean;
287
294
  end_time: Date;
288
295
  links: string;
289
296
  max_concurrent_published_tracks: number;
297
+ max_participant_duration: number;
290
298
  max_participants: number;
291
299
  media_region: string;
292
300
  record_participants_on_connect: boolean;
@@ -296,6 +304,7 @@ interface RoomResource {
296
304
  status_callback_method: string;
297
305
  type: RoomRoomType;
298
306
  unique_name: string;
307
+ unused_room_timeout: number;
299
308
  url: string;
300
309
  video_codecs: RoomVideoCodec[];
301
310
  }
@@ -352,6 +361,7 @@ declare class RoomInstance extends SerializableClass {
352
361
  dateCreated: Date;
353
362
  dateUpdated: Date;
354
363
  duration: number;
364
+ emptyRoomTimeout: number;
355
365
  enableTurn: boolean;
356
366
  endTime: Date;
357
367
  /**
@@ -362,6 +372,7 @@ declare class RoomInstance extends SerializableClass {
362
372
  fetch(callback?: (error: Error | null, items: RoomInstance) => any): Promise<RoomInstance>;
363
373
  links: string;
364
374
  maxConcurrentPublishedTracks: number;
375
+ maxParticipantDuration: number;
365
376
  maxParticipants: number;
366
377
  mediaRegion: string;
367
378
  /**
@@ -387,6 +398,7 @@ declare class RoomInstance extends SerializableClass {
387
398
  toJSON(): any;
388
399
  type: RoomRoomType;
389
400
  uniqueName: string;
401
+ unusedRoomTimeout: number;
390
402
  /**
391
403
  * update a RoomInstance
392
404
  *
@@ -82,6 +82,12 @@ RoomList = function RoomList(version) {
82
82
  * @param {object} [opts.recordingRules] - A collection of Recording Rules
83
83
  * @param {boolean} [opts.audioOnly] -
84
84
  * Indicates whether the room will only contain audio track participants for group rooms.
85
+ * @param {number} [opts.maxParticipantDuration] -
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.
85
91
  * @param {function} [callback] - Callback to handle processed record
86
92
  *
87
93
  * @returns {Promise} Resolves to processed RoomInstance
@@ -106,7 +112,10 @@ RoomList = function RoomList(version) {
106
112
  'VideoCodecs': serialize.map(_.get(opts, 'videoCodecs'), function(e) { return e; }),
107
113
  'MediaRegion': _.get(opts, 'mediaRegion'),
108
114
  'RecordingRules': serialize.object(_.get(opts, 'recordingRules')),
109
- 'AudioOnly': serialize.bool(_.get(opts, 'audioOnly'))
115
+ 'AudioOnly': serialize.bool(_.get(opts, 'audioOnly')),
116
+ 'MaxParticipantDuration': _.get(opts, 'maxParticipantDuration'),
117
+ 'EmptyRoomTimeout': _.get(opts, 'emptyRoomTimeout'),
118
+ 'UnusedRoomTimeout': _.get(opts, 'unusedRoomTimeout')
110
119
  });
111
120
 
112
121
  var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
@@ -216,6 +225,8 @@ RoomList = function RoomList(version) {
216
225
  if (!done) {
217
226
  currentPage++;
218
227
  fetchNextPage(_.bind(page.nextPage, page));
228
+ } else {
229
+ onComplete();
219
230
  }
220
231
  });
221
232
 
@@ -517,6 +528,8 @@ RoomPage.prototype[util.inspect.custom] = function inspect(depth, options) {
517
528
  * @property {room.room_type} type - The type of room
518
529
  * @property {number} maxParticipants -
519
530
  * The maximum number of concurrent Participants allowed in the room
531
+ * @property {number} maxParticipantDuration -
532
+ * The maximum number of seconds a Participant can be connected to the room
520
533
  * @property {number} maxConcurrentPublishedTracks -
521
534
  * The maximum number of published tracks allowed in the room at the same time
522
535
  * @property {boolean} recordParticipantsOnConnect -
@@ -526,6 +539,10 @@ RoomPage.prototype[util.inspect.custom] = function inspect(depth, options) {
526
539
  * @property {string} mediaRegion - The region for the media server in Group Rooms
527
540
  * @property {boolean} audioOnly -
528
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.
529
546
  * @property {string} url - The absolute URL of the resource
530
547
  * @property {string} links - The URLs of related resources
531
548
  *
@@ -551,11 +568,14 @@ RoomInstance = function RoomInstance(version, payload, sid) {
551
568
  this.duration = deserialize.integer(payload.duration); // jshint ignore:line
552
569
  this.type = payload.type; // jshint ignore:line
553
570
  this.maxParticipants = deserialize.integer(payload.max_participants); // jshint ignore:line
571
+ this.maxParticipantDuration = deserialize.integer(payload.max_participant_duration); // jshint ignore:line
554
572
  this.maxConcurrentPublishedTracks = deserialize.integer(payload.max_concurrent_published_tracks); // jshint ignore:line
555
573
  this.recordParticipantsOnConnect = payload.record_participants_on_connect; // jshint ignore:line
556
574
  this.videoCodecs = payload.video_codecs; // jshint ignore:line
557
575
  this.mediaRegion = payload.media_region; // jshint ignore:line
558
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
559
579
  this.url = payload.url; // jshint ignore:line
560
580
  this.links = payload.links; // jshint ignore:line
561
581
 
@@ -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;