twilio 4.0.0-rc.5 → 4.0.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 (502) hide show
  1. package/README.md +17 -7
  2. package/dist/lib/base/BaseTwilio.d.ts +4 -0
  3. package/dist/lib/base/BaseTwilio.js +6 -1
  4. package/dist/lib/base/RequestClient.d.ts +21 -1
  5. package/dist/lib/base/RequestClient.js +35 -0
  6. package/dist/lib/base/serialize.d.ts +2 -0
  7. package/dist/lib/base/serialize.js +5 -1
  8. package/dist/lib/rest/Content.d.ts +5 -0
  9. package/dist/lib/rest/Content.js +7 -0
  10. package/dist/lib/rest/FlexApi.d.ts +10 -0
  11. package/dist/lib/rest/FlexApi.js +14 -0
  12. package/dist/lib/rest/Messaging.d.ts +10 -0
  13. package/dist/lib/rest/Messaging.js +14 -0
  14. package/dist/lib/rest/Oauth.d.ts +5 -0
  15. package/dist/lib/rest/Oauth.js +7 -0
  16. package/dist/lib/rest/Supersim.d.ts +5 -0
  17. package/dist/lib/rest/Supersim.js +7 -0
  18. package/dist/lib/rest/accounts/v1/authTokenPromotion.d.ts +4 -5
  19. package/dist/lib/rest/accounts/v1/credential/aws.d.ts +5 -6
  20. package/dist/lib/rest/accounts/v1/credential/publicKey.d.ts +5 -6
  21. package/dist/lib/rest/accounts/v1/credential.d.ts +0 -1
  22. package/dist/lib/rest/accounts/v1/secondaryAuthToken.d.ts +4 -5
  23. package/dist/lib/rest/api/v2010/account/address/dependentPhoneNumber.d.ts +24 -25
  24. package/dist/lib/rest/api/v2010/account/address.d.ts +16 -17
  25. package/dist/lib/rest/api/v2010/account/application.d.ts +30 -21
  26. package/dist/lib/rest/api/v2010/account/application.js +7 -0
  27. package/dist/lib/rest/api/v2010/account/authorizedConnectApp.d.ts +10 -11
  28. package/dist/lib/rest/api/v2010/account/availablePhoneNumberCountry/local.d.ts +12 -13
  29. package/dist/lib/rest/api/v2010/account/availablePhoneNumberCountry/machineToMachine.d.ts +12 -13
  30. package/dist/lib/rest/api/v2010/account/availablePhoneNumberCountry/mobile.d.ts +12 -13
  31. package/dist/lib/rest/api/v2010/account/availablePhoneNumberCountry/national.d.ts +12 -13
  32. package/dist/lib/rest/api/v2010/account/availablePhoneNumberCountry/sharedCost.d.ts +12 -13
  33. package/dist/lib/rest/api/v2010/account/availablePhoneNumberCountry/tollFree.d.ts +12 -13
  34. package/dist/lib/rest/api/v2010/account/availablePhoneNumberCountry/voip.d.ts +12 -13
  35. package/dist/lib/rest/api/v2010/account/availablePhoneNumberCountry.d.ts +5 -6
  36. package/dist/lib/rest/api/v2010/account/balance.d.ts +3 -4
  37. package/dist/lib/rest/api/v2010/account/call/event.d.ts +2 -3
  38. package/dist/lib/rest/api/v2010/account/call/feedback.d.ts +6 -7
  39. package/dist/lib/rest/api/v2010/account/call/feedbackSummary.d.ts +13 -14
  40. package/dist/lib/rest/api/v2010/account/call/notification.d.ts +17 -18
  41. package/dist/lib/rest/api/v2010/account/call/payment.d.ts +5 -6
  42. package/dist/lib/rest/api/v2010/account/call/recording.d.ts +15 -16
  43. package/dist/lib/rest/api/v2010/account/call/siprec.d.ts +5 -6
  44. package/dist/lib/rest/api/v2010/account/call/stream.d.ts +5 -6
  45. package/dist/lib/rest/api/v2010/account/call/userDefinedMessage.d.ts +4 -5
  46. package/dist/lib/rest/api/v2010/account/call/userDefinedMessageSubscription.d.ts +5 -6
  47. package/dist/lib/rest/api/v2010/account/call.d.ts +20 -20
  48. package/dist/lib/rest/api/v2010/account/call.js +2 -2
  49. package/dist/lib/rest/api/v2010/account/conference/participant.d.ts +13 -14
  50. package/dist/lib/rest/api/v2010/account/conference/recording.d.ts +15 -16
  51. package/dist/lib/rest/api/v2010/account/conference.d.ts +10 -11
  52. package/dist/lib/rest/api/v2010/account/connectApp.d.ts +11 -12
  53. package/dist/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn/assignedAddOnExtension.d.ts +9 -10
  54. package/dist/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn.d.ts +11 -12
  55. package/dist/lib/rest/api/v2010/account/incomingPhoneNumber/local.d.ts +28 -29
  56. package/dist/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.d.ts +28 -29
  57. package/dist/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.d.ts +28 -29
  58. package/dist/lib/rest/api/v2010/account/incomingPhoneNumber.d.ts +28 -29
  59. package/dist/lib/rest/api/v2010/account/key.d.ts +4 -5
  60. package/dist/lib/rest/api/v2010/account/message/feedback.d.ts +5 -6
  61. package/dist/lib/rest/api/v2010/account/message/media.d.ts +7 -8
  62. package/dist/lib/rest/api/v2010/account/message.d.ts +18 -19
  63. package/dist/lib/rest/api/v2010/account/newKey.d.ts +5 -6
  64. package/dist/lib/rest/api/v2010/account/newSigningKey.d.ts +5 -6
  65. package/dist/lib/rest/api/v2010/account/notification.d.ts +17 -18
  66. package/dist/lib/rest/api/v2010/account/outgoingCallerId.d.ts +7 -8
  67. package/dist/lib/rest/api/v2010/account/queue/member.d.ts +4 -5
  68. package/dist/lib/rest/api/v2010/account/queue.d.ts +8 -9
  69. package/dist/lib/rest/api/v2010/account/recording/addOnResult/payload.d.ts +11 -12
  70. package/dist/lib/rest/api/v2010/account/recording/addOnResult.d.ts +9 -10
  71. package/dist/lib/rest/api/v2010/account/recording/transcription.d.ts +10 -11
  72. package/dist/lib/rest/api/v2010/account/recording.d.ts +15 -16
  73. package/dist/lib/rest/api/v2010/account/shortCode.d.ts +11 -12
  74. package/dist/lib/rest/api/v2010/account/signingKey.d.ts +0 -1
  75. package/dist/lib/rest/api/v2010/account/sip/credentialList/credential.d.ts +4 -5
  76. package/dist/lib/rest/api/v2010/account/sip/credentialList.d.ts +7 -8
  77. package/dist/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls/authCallsCredentialListMapping.d.ts +5 -6
  78. package/dist/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls/authCallsIpAccessControlListMapping.d.ts +5 -6
  79. package/dist/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls.d.ts +0 -1
  80. package/dist/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeRegistrations/authRegistrationsCredentialListMapping.d.ts +5 -6
  81. package/dist/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeRegistrations.d.ts +0 -1
  82. package/dist/lib/rest/api/v2010/account/sip/domain/authTypes.d.ts +0 -1
  83. package/dist/lib/rest/api/v2010/account/sip/domain/credentialListMapping.d.ts +4 -5
  84. package/dist/lib/rest/api/v2010/account/sip/domain/ipAccessControlListMapping.d.ts +4 -5
  85. package/dist/lib/rest/api/v2010/account/sip/domain.d.ts +21 -22
  86. package/dist/lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.d.ts +3 -4
  87. package/dist/lib/rest/api/v2010/account/sip/ipAccessControlList.d.ts +7 -8
  88. package/dist/lib/rest/api/v2010/account/sip.d.ts +0 -1
  89. package/dist/lib/rest/api/v2010/account/token.d.ts +7 -8
  90. package/dist/lib/rest/api/v2010/account/transcription.d.ts +10 -11
  91. package/dist/lib/rest/api/v2010/account/usage/record/allTime.d.ts +14 -15
  92. package/dist/lib/rest/api/v2010/account/usage/record/daily.d.ts +14 -15
  93. package/dist/lib/rest/api/v2010/account/usage/record/lastMonth.d.ts +14 -15
  94. package/dist/lib/rest/api/v2010/account/usage/record/monthly.d.ts +14 -15
  95. package/dist/lib/rest/api/v2010/account/usage/record/thisMonth.d.ts +14 -15
  96. package/dist/lib/rest/api/v2010/account/usage/record/today.d.ts +14 -15
  97. package/dist/lib/rest/api/v2010/account/usage/record/yearly.d.ts +14 -15
  98. package/dist/lib/rest/api/v2010/account/usage/record/yesterday.d.ts +14 -15
  99. package/dist/lib/rest/api/v2010/account/usage/record.d.ts +14 -15
  100. package/dist/lib/rest/api/v2010/account/usage/trigger.d.ts +13 -14
  101. package/dist/lib/rest/api/v2010/account/usage.d.ts +0 -1
  102. package/dist/lib/rest/api/v2010/account/validationRequest.d.ts +5 -6
  103. package/dist/lib/rest/api/v2010/account.d.ts +6 -7
  104. package/dist/lib/rest/autopilot/v1/assistant/defaults.d.ts +4 -5
  105. package/dist/lib/rest/autopilot/v1/assistant/dialogue.d.ts +5 -6
  106. package/dist/lib/rest/autopilot/v1/assistant/fieldType/fieldValue.d.ts +10 -11
  107. package/dist/lib/rest/autopilot/v1/assistant/fieldType.d.ts +9 -10
  108. package/dist/lib/rest/autopilot/v1/assistant/modelBuild.d.ts +9 -10
  109. package/dist/lib/rest/autopilot/v1/assistant/query.d.ts +13 -14
  110. package/dist/lib/rest/autopilot/v1/assistant/styleSheet.d.ts +4 -5
  111. package/dist/lib/rest/autopilot/v1/assistant/task/field.d.ts +9 -10
  112. package/dist/lib/rest/autopilot/v1/assistant/task/sample.d.ts +10 -11
  113. package/dist/lib/rest/autopilot/v1/assistant/task/taskActions.d.ts +5 -6
  114. package/dist/lib/rest/autopilot/v1/assistant/task/taskStatistics.d.ts +6 -7
  115. package/dist/lib/rest/autopilot/v1/assistant/task.d.ts +10 -11
  116. package/dist/lib/rest/autopilot/v1/assistant/webhook.d.ts +7 -8
  117. package/dist/lib/rest/autopilot/v1/assistant.d.ts +13 -14
  118. package/dist/lib/rest/autopilot/v1/restoreAssistant.d.ts +11 -12
  119. package/dist/lib/rest/bulkexports/v1/export/day.d.ts +3 -4
  120. package/dist/lib/rest/bulkexports/v1/export/exportCustomJob.d.ts +6 -7
  121. package/dist/lib/rest/bulkexports/v1/export/job.d.ts +1 -2
  122. package/dist/lib/rest/bulkexports/v1/export.d.ts +1 -2
  123. package/dist/lib/rest/bulkexports/v1/exportConfiguration.d.ts +3 -4
  124. package/dist/lib/rest/chat/v1/credential.d.ts +7 -8
  125. package/dist/lib/rest/chat/v1/service/channel/invite.d.ts +10 -11
  126. package/dist/lib/rest/chat/v1/service/channel/member.d.ts +11 -12
  127. package/dist/lib/rest/chat/v1/service/channel/message.d.ts +13 -14
  128. package/dist/lib/rest/chat/v1/service/channel.d.ts +13 -14
  129. package/dist/lib/rest/chat/v1/service/role.d.ts +8 -9
  130. package/dist/lib/rest/chat/v1/service/user/userChannel.d.ts +7 -8
  131. package/dist/lib/rest/chat/v1/service/user.d.ts +14 -15
  132. package/dist/lib/rest/chat/v1/service.d.ts +21 -22
  133. package/dist/lib/rest/chat/v2/credential.d.ts +7 -8
  134. package/dist/lib/rest/chat/v2/service/binding.d.ts +11 -12
  135. package/dist/lib/rest/chat/v2/service/channel/invite.d.ts +10 -11
  136. package/dist/lib/rest/chat/v2/service/channel/member.d.ts +12 -13
  137. package/dist/lib/rest/chat/v2/service/channel/message.d.ts +16 -17
  138. package/dist/lib/rest/chat/v2/service/channel/webhook.d.ts +9 -10
  139. package/dist/lib/rest/chat/v2/service/channel.d.ts +13 -14
  140. package/dist/lib/rest/chat/v2/service/role.d.ts +8 -9
  141. package/dist/lib/rest/chat/v2/service/user/userBinding.d.ts +11 -12
  142. package/dist/lib/rest/chat/v2/service/user/userChannel.d.ts +9 -10
  143. package/dist/lib/rest/chat/v2/service/user.d.ts +14 -15
  144. package/dist/lib/rest/chat/v2/service.d.ts +23 -24
  145. package/dist/lib/rest/chat/v3/channel.d.ts +13 -14
  146. package/dist/lib/rest/content/v1/content/approvalFetch.d.ts +4 -5
  147. package/dist/lib/rest/content/v1/content.d.ts +10 -11
  148. package/dist/lib/rest/conversations/v1/addressConfiguration.d.ts +5 -6
  149. package/dist/lib/rest/conversations/v1/configuration/webhook.d.ts +3 -4
  150. package/dist/lib/rest/conversations/v1/configuration.d.ts +7 -8
  151. package/dist/lib/rest/conversations/v1/conversation/message/deliveryReceipt.d.ts +7 -8
  152. package/dist/lib/rest/conversations/v1/conversation/message.d.ts +12 -13
  153. package/dist/lib/rest/conversations/v1/conversation/participant.d.ts +9 -10
  154. package/dist/lib/rest/conversations/v1/conversation/webhook.d.ts +5 -6
  155. package/dist/lib/rest/conversations/v1/conversation.d.ts +9 -10
  156. package/dist/lib/rest/conversations/v1/credential.d.ts +4 -5
  157. package/dist/lib/rest/conversations/v1/participantConversation.d.ts +15 -16
  158. package/dist/lib/rest/conversations/v1/role.d.ts +8 -9
  159. package/dist/lib/rest/conversations/v1/service/binding.d.ts +7 -8
  160. package/dist/lib/rest/conversations/v1/service/configuration/notification.d.ts +3 -4
  161. package/dist/lib/rest/conversations/v1/service/configuration/webhook.d.ts +3 -4
  162. package/dist/lib/rest/conversations/v1/service/configuration.d.ts +7 -8
  163. package/dist/lib/rest/conversations/v1/service/conversation/message/deliveryReceipt.d.ts +8 -9
  164. package/dist/lib/rest/conversations/v1/service/conversation/message.d.ts +13 -14
  165. package/dist/lib/rest/conversations/v1/service/conversation/participant.d.ts +10 -11
  166. package/dist/lib/rest/conversations/v1/service/conversation/webhook.d.ts +6 -7
  167. package/dist/lib/rest/conversations/v1/service/conversation.d.ts +9 -10
  168. package/dist/lib/rest/conversations/v1/service/participantConversation.d.ts +14 -15
  169. package/dist/lib/rest/conversations/v1/service/role.d.ts +8 -9
  170. package/dist/lib/rest/conversations/v1/service/user/userConversation.d.ts +15 -16
  171. package/dist/lib/rest/conversations/v1/service/user.d.ts +12 -13
  172. package/dist/lib/rest/conversations/v1/service.d.ts +4 -5
  173. package/dist/lib/rest/conversations/v1/user/userConversation.d.ts +15 -16
  174. package/dist/lib/rest/conversations/v1/user.d.ts +12 -13
  175. package/dist/lib/rest/events/v1/eventType.d.ts +5 -6
  176. package/dist/lib/rest/events/v1/schema/schemaVersion.d.ts +2 -3
  177. package/dist/lib/rest/events/v1/schema.d.ts +4 -5
  178. package/dist/lib/rest/events/v1/sink/sinkTest.d.ts +0 -1
  179. package/dist/lib/rest/events/v1/sink/sinkValidate.d.ts +0 -1
  180. package/dist/lib/rest/events/v1/sink.d.ts +6 -7
  181. package/dist/lib/rest/events/v1/subscription/subscribedEvent.d.ts +2 -3
  182. package/dist/lib/rest/events/v1/subscription.d.ts +7 -8
  183. package/dist/lib/rest/flexApi/V1.d.ts +30 -10
  184. package/dist/lib/rest/flexApi/V1.js +45 -11
  185. package/dist/lib/rest/flexApi/v1/assessments.d.ts +0 -1
  186. package/dist/lib/rest/flexApi/v1/channel.d.ts +8 -9
  187. package/dist/lib/rest/flexApi/v1/configuration.d.ts +43 -44
  188. package/dist/lib/rest/flexApi/v1/flexFlow.d.ts +12 -13
  189. package/dist/lib/rest/flexApi/v1/insightsQuestionnairesCategory.d.ts +168 -0
  190. package/dist/lib/rest/flexApi/v1/insightsQuestionnairesCategory.js +167 -0
  191. package/dist/lib/rest/flexApi/v1/insightsQuestionnairesQuestion.d.ts +208 -0
  192. package/dist/lib/rest/flexApi/v1/insightsQuestionnairesQuestion.js +205 -0
  193. package/dist/lib/rest/flexApi/v1/insightsSession.d.ts +130 -0
  194. package/dist/lib/rest/flexApi/v1/{goodData.js → insightsSession.js} +11 -10
  195. package/dist/lib/rest/flexApi/v1/insightsSettingsAnswerSets.d.ts +82 -0
  196. package/dist/lib/rest/flexApi/v1/insightsSettingsAnswerSets.js +83 -0
  197. package/dist/lib/rest/flexApi/v1/insightsSettingsComment.d.ts +67 -0
  198. package/dist/lib/rest/flexApi/v1/insightsSettingsComment.js +79 -0
  199. package/dist/lib/rest/flexApi/v1/insightsUserRoles.d.ts +109 -0
  200. package/dist/lib/rest/flexApi/v1/{userRoles.js → insightsUserRoles.js} +11 -10
  201. package/dist/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.d.ts +4 -5
  202. package/dist/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.d.ts +1 -2
  203. package/dist/lib/rest/flexApi/v1/interaction/interactionChannel.d.ts +2 -3
  204. package/dist/lib/rest/flexApi/v1/interaction.d.ts +3 -4
  205. package/dist/lib/rest/flexApi/v1/webChannel.d.ts +6 -7
  206. package/dist/lib/rest/flexApi/v2/webChannels.d.ts +2 -3
  207. package/dist/lib/rest/frontlineApi/v1/user.d.ts +6 -7
  208. package/dist/lib/rest/insights/v1/call/annotation.d.ts +7 -8
  209. package/dist/lib/rest/insights/v1/call/callSummary.d.ts +0 -1
  210. package/dist/lib/rest/insights/v1/call/event.d.ts +0 -1
  211. package/dist/lib/rest/insights/v1/call/metric.d.ts +0 -1
  212. package/dist/lib/rest/insights/v1/call.d.ts +0 -1
  213. package/dist/lib/rest/insights/v1/callSummaries.d.ts +0 -1
  214. package/dist/lib/rest/insights/v1/conference/conferenceParticipant.d.ts +8 -9
  215. package/dist/lib/rest/insights/v1/conference.d.ts +16 -17
  216. package/dist/lib/rest/insights/v1/room/participant.d.ts +5 -6
  217. package/dist/lib/rest/insights/v1/room.d.ts +2 -3
  218. package/dist/lib/rest/insights/v1/setting.d.ts +0 -1
  219. package/dist/lib/rest/ipMessaging/v1/credential.d.ts +0 -1
  220. package/dist/lib/rest/ipMessaging/v1/service/channel/invite.d.ts +0 -1
  221. package/dist/lib/rest/ipMessaging/v1/service/channel/member.d.ts +0 -1
  222. package/dist/lib/rest/ipMessaging/v1/service/channel/message.d.ts +0 -1
  223. package/dist/lib/rest/ipMessaging/v1/service/channel.d.ts +0 -1
  224. package/dist/lib/rest/ipMessaging/v1/service/role.d.ts +0 -1
  225. package/dist/lib/rest/ipMessaging/v1/service/user/userChannel.d.ts +0 -1
  226. package/dist/lib/rest/ipMessaging/v1/service/user.d.ts +0 -1
  227. package/dist/lib/rest/ipMessaging/v1/service.d.ts +0 -1
  228. package/dist/lib/rest/ipMessaging/v2/credential.d.ts +0 -1
  229. package/dist/lib/rest/ipMessaging/v2/service/binding.d.ts +0 -1
  230. package/dist/lib/rest/ipMessaging/v2/service/channel/invite.d.ts +0 -1
  231. package/dist/lib/rest/ipMessaging/v2/service/channel/member.d.ts +0 -1
  232. package/dist/lib/rest/ipMessaging/v2/service/channel/message.d.ts +0 -1
  233. package/dist/lib/rest/ipMessaging/v2/service/channel/webhook.d.ts +0 -1
  234. package/dist/lib/rest/ipMessaging/v2/service/channel.d.ts +0 -1
  235. package/dist/lib/rest/ipMessaging/v2/service/role.d.ts +0 -1
  236. package/dist/lib/rest/ipMessaging/v2/service/user/userBinding.d.ts +0 -1
  237. package/dist/lib/rest/ipMessaging/v2/service/user/userChannel.d.ts +0 -1
  238. package/dist/lib/rest/ipMessaging/v2/service/user.d.ts +0 -1
  239. package/dist/lib/rest/ipMessaging/v2/service.d.ts +0 -1
  240. package/dist/lib/rest/lookups/v1/phoneNumber.d.ts +7 -8
  241. package/dist/lib/rest/lookups/v2/phoneNumber.d.ts +13 -14
  242. package/dist/lib/rest/media/v1/mediaProcessor.d.ts +11 -12
  243. package/dist/lib/rest/media/v1/mediaRecording.d.ts +13 -14
  244. package/dist/lib/rest/media/v1/playerStreamer/playbackGrant.d.ts +4 -5
  245. package/dist/lib/rest/media/v1/playerStreamer.d.ts +10 -11
  246. package/dist/lib/rest/messaging/v1/brandRegistration/brandVetting.d.ts +9 -10
  247. package/dist/lib/rest/messaging/v1/brandRegistration.d.ts +16 -17
  248. package/dist/lib/rest/messaging/v1/deactivations.d.ts +1 -2
  249. package/dist/lib/rest/messaging/v1/domainCerts.d.ts +3 -4
  250. package/dist/lib/rest/messaging/v1/domainConfig.d.ts +1 -2
  251. package/dist/lib/rest/messaging/v1/externalCampaign.d.ts +4 -5
  252. package/dist/lib/rest/messaging/v1/service/alphaSender.d.ts +8 -9
  253. package/dist/lib/rest/messaging/v1/service/phoneNumber.d.ts +9 -10
  254. package/dist/lib/rest/messaging/v1/service/shortCode.d.ts +9 -10
  255. package/dist/lib/rest/messaging/v1/service/usAppToPerson.d.ts +23 -24
  256. package/dist/lib/rest/messaging/v1/service/usAppToPersonUsecase.d.ts +1 -2
  257. package/dist/lib/rest/messaging/v1/service.d.ts +21 -22
  258. package/dist/lib/rest/messaging/v1/tollfreeVerification.d.ts +37 -30
  259. package/dist/lib/rest/messaging/v1/tollfreeVerification.js +4 -0
  260. package/dist/lib/rest/messaging/v1/usecase.d.ts +1 -2
  261. package/dist/lib/rest/microvisor/v1/app.d.ts +6 -7
  262. package/dist/lib/rest/microvisor/v1/device.d.ts +8 -9
  263. package/dist/lib/rest/monitor/v1/alert.d.ts +19 -20
  264. package/dist/lib/rest/monitor/v1/event.d.ts +14 -15
  265. package/dist/lib/rest/notify/v1/credential.d.ts +7 -8
  266. package/dist/lib/rest/notify/v1/service/binding.d.ts +14 -15
  267. package/dist/lib/rest/notify/v1/service/notification.d.ts +19 -20
  268. package/dist/lib/rest/notify/v1/service.d.ts +20 -21
  269. package/dist/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.d.ts +9 -10
  270. package/dist/lib/rest/numbers/v2/regulatoryCompliance/bundle/evaluation.d.ts +5 -6
  271. package/dist/lib/rest/numbers/v2/regulatoryCompliance/bundle/itemAssignment.d.ts +6 -7
  272. package/dist/lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.d.ts +9 -10
  273. package/dist/lib/rest/numbers/v2/regulatoryCompliance/bundle.d.ts +10 -11
  274. package/dist/lib/rest/numbers/v2/regulatoryCompliance/endUser.d.ts +7 -8
  275. package/dist/lib/rest/numbers/v2/regulatoryCompliance/endUserType.d.ts +5 -6
  276. package/dist/lib/rest/numbers/v2/regulatoryCompliance/regulation.d.ts +6 -7
  277. package/dist/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.d.ts +9 -10
  278. package/dist/lib/rest/numbers/v2/regulatoryCompliance/supportingDocumentType.d.ts +5 -6
  279. package/dist/lib/rest/numbers/v2/regulatoryCompliance.d.ts +0 -1
  280. package/dist/lib/rest/oauth/v1/deviceCode.d.ts +6 -7
  281. package/dist/lib/rest/oauth/v1/oauth.d.ts +1 -2
  282. package/dist/lib/rest/oauth/v1/openidDiscovery.d.ts +12 -13
  283. package/dist/lib/rest/oauth/v1/token.d.ts +4 -5
  284. package/dist/lib/rest/oauth/v1/userInfo.d.ts +5 -6
  285. package/dist/lib/rest/preview/deployed_devices/fleet/certificate.d.ts +9 -10
  286. package/dist/lib/rest/preview/deployed_devices/fleet/deployment.d.ts +8 -9
  287. package/dist/lib/rest/preview/deployed_devices/fleet/device.d.ts +12 -13
  288. package/dist/lib/rest/preview/deployed_devices/fleet/key.d.ts +9 -10
  289. package/dist/lib/rest/preview/deployed_devices/fleet.d.ts +9 -10
  290. package/dist/lib/rest/preview/hosted_numbers/authorizationDocument/dependentHostedNumberOrder.d.ts +18 -19
  291. package/dist/lib/rest/preview/hosted_numbers/authorizationDocument.d.ts +6 -7
  292. package/dist/lib/rest/preview/hosted_numbers/hostedNumberOrder.d.ts +19 -20
  293. package/dist/lib/rest/preview/marketplace/availableAddOn/availableAddOnExtension.d.ts +6 -7
  294. package/dist/lib/rest/preview/marketplace/availableAddOn.d.ts +7 -8
  295. package/dist/lib/rest/preview/marketplace/installedAddOn/installedAddOnExtension.d.ts +7 -8
  296. package/dist/lib/rest/preview/marketplace/installedAddOn.d.ts +10 -11
  297. package/dist/lib/rest/preview/sync/service/document/documentPermission.d.ts +8 -9
  298. package/dist/lib/rest/preview/sync/service/document.d.ts +0 -1
  299. package/dist/lib/rest/preview/sync/service/syncList/syncListItem.d.ts +0 -1
  300. package/dist/lib/rest/preview/sync/service/syncList/syncListPermission.d.ts +8 -9
  301. package/dist/lib/rest/preview/sync/service/syncList.d.ts +0 -1
  302. package/dist/lib/rest/preview/sync/service/syncMap/syncMapItem.d.ts +0 -1
  303. package/dist/lib/rest/preview/sync/service/syncMap/syncMapPermission.d.ts +8 -9
  304. package/dist/lib/rest/preview/sync/service/syncMap.d.ts +0 -1
  305. package/dist/lib/rest/preview/sync/service.d.ts +0 -1
  306. package/dist/lib/rest/preview/understand/assistant/assistantFallbackActions.d.ts +0 -1
  307. package/dist/lib/rest/preview/understand/assistant/assistantInitiationActions.d.ts +0 -1
  308. package/dist/lib/rest/preview/understand/assistant/dialogue.d.ts +0 -1
  309. package/dist/lib/rest/preview/understand/assistant/fieldType/fieldValue.d.ts +0 -1
  310. package/dist/lib/rest/preview/understand/assistant/fieldType.d.ts +0 -1
  311. package/dist/lib/rest/preview/understand/assistant/modelBuild.d.ts +0 -1
  312. package/dist/lib/rest/preview/understand/assistant/query.d.ts +0 -1
  313. package/dist/lib/rest/preview/understand/assistant/styleSheet.d.ts +0 -1
  314. package/dist/lib/rest/preview/understand/assistant/task/field.d.ts +1 -2
  315. package/dist/lib/rest/preview/understand/assistant/task/sample.d.ts +1 -2
  316. package/dist/lib/rest/preview/understand/assistant/task/taskActions.d.ts +0 -1
  317. package/dist/lib/rest/preview/understand/assistant/task/taskStatistics.d.ts +0 -1
  318. package/dist/lib/rest/preview/understand/assistant/task.d.ts +0 -1
  319. package/dist/lib/rest/preview/understand/assistant.d.ts +0 -1
  320. package/dist/lib/rest/preview/wireless/command.d.ts +0 -1
  321. package/dist/lib/rest/preview/wireless/ratePlan.d.ts +0 -1
  322. package/dist/lib/rest/preview/wireless/sim/usage.d.ts +0 -1
  323. package/dist/lib/rest/preview/wireless/sim.d.ts +0 -1
  324. package/dist/lib/rest/pricing/v1/messaging/country.d.ts +6 -7
  325. package/dist/lib/rest/pricing/v1/messaging.d.ts +0 -1
  326. package/dist/lib/rest/pricing/v1/phoneNumber/country.d.ts +5 -6
  327. package/dist/lib/rest/pricing/v1/phoneNumber.d.ts +0 -1
  328. package/dist/lib/rest/pricing/v1/voice/country.d.ts +6 -7
  329. package/dist/lib/rest/pricing/v1/voice/number.d.ts +7 -8
  330. package/dist/lib/rest/pricing/v1/voice/number.js +2 -2
  331. package/dist/lib/rest/pricing/v1/voice.d.ts +0 -1
  332. package/dist/lib/rest/pricing/v2/country.d.ts +6 -7
  333. package/dist/lib/rest/pricing/v2/number.d.ts +7 -8
  334. package/dist/lib/rest/pricing/v2/number.js +1 -1
  335. package/dist/lib/rest/pricing/v2/voice/country.d.ts +6 -7
  336. package/dist/lib/rest/pricing/v2/voice/number.d.ts +8 -9
  337. package/dist/lib/rest/pricing/v2/voice/number.js +1 -1
  338. package/dist/lib/rest/pricing/v2/voice.d.ts +0 -1
  339. package/dist/lib/rest/proxy/v1/service/phoneNumber.d.ts +11 -12
  340. package/dist/lib/rest/proxy/v1/service/session/interaction.d.ts +15 -16
  341. package/dist/lib/rest/proxy/v1/service/session/participant/messageInteraction.d.ts +17 -18
  342. package/dist/lib/rest/proxy/v1/service/session/participant.d.ts +13 -14
  343. package/dist/lib/rest/proxy/v1/service/session.d.ts +14 -15
  344. package/dist/lib/rest/proxy/v1/service/shortCode.d.ts +9 -10
  345. package/dist/lib/rest/proxy/v1/service.d.ts +12 -13
  346. package/dist/lib/rest/routes/v2/phoneNumber.d.ts +7 -8
  347. package/dist/lib/rest/routes/v2/sipDomain.d.ts +0 -1
  348. package/dist/lib/rest/routes/v2/trunk.d.ts +7 -8
  349. package/dist/lib/rest/serverless/v1/service/asset/assetVersion.d.ts +7 -8
  350. package/dist/lib/rest/serverless/v1/service/asset.d.ts +8 -9
  351. package/dist/lib/rest/serverless/v1/service/build/buildStatus.d.ts +4 -5
  352. package/dist/lib/rest/serverless/v1/service/build.d.ts +9 -10
  353. package/dist/lib/rest/serverless/v1/service/environment/deployment.d.ts +8 -9
  354. package/dist/lib/rest/serverless/v1/service/environment/log.d.ts +11 -12
  355. package/dist/lib/rest/serverless/v1/service/environment/variable.d.ts +9 -10
  356. package/dist/lib/rest/serverless/v1/service/environment.d.ts +11 -12
  357. package/dist/lib/rest/serverless/v1/service/function/functionVersion/functionVersionContent.d.ts +5 -6
  358. package/dist/lib/rest/serverless/v1/service/function/functionVersion.d.ts +7 -8
  359. package/dist/lib/rest/serverless/v1/service/function.d.ts +8 -9
  360. package/dist/lib/rest/serverless/v1/service.d.ts +11 -12
  361. package/dist/lib/rest/studio/v1/flow/engagement/engagementContext.d.ts +5 -6
  362. package/dist/lib/rest/studio/v1/flow/engagement/step/stepContext.d.ts +6 -7
  363. package/dist/lib/rest/studio/v1/flow/engagement/step.d.ts +12 -13
  364. package/dist/lib/rest/studio/v1/flow/engagement.d.ts +10 -11
  365. package/dist/lib/rest/studio/v1/flow/execution/executionContext.d.ts +5 -6
  366. package/dist/lib/rest/studio/v1/flow/execution/executionStep/executionStepContext.d.ts +6 -7
  367. package/dist/lib/rest/studio/v1/flow/execution/executionStep.d.ts +12 -13
  368. package/dist/lib/rest/studio/v1/flow/execution.d.ts +10 -11
  369. package/dist/lib/rest/studio/v1/flow.d.ts +8 -9
  370. package/dist/lib/rest/studio/v2/flow/execution/executionContext.d.ts +5 -6
  371. package/dist/lib/rest/studio/v2/flow/execution/executionStep/executionStepContext.d.ts +6 -7
  372. package/dist/lib/rest/studio/v2/flow/execution/executionStep.d.ts +12 -13
  373. package/dist/lib/rest/studio/v2/flow/execution.d.ts +9 -10
  374. package/dist/lib/rest/studio/v2/flow/flowRevision.d.ts +11 -12
  375. package/dist/lib/rest/studio/v2/flow/flowTestUser.d.ts +0 -1
  376. package/dist/lib/rest/studio/v2/flow.d.ts +13 -14
  377. package/dist/lib/rest/studio/v2/flowValidate.d.ts +1 -2
  378. package/dist/lib/rest/supersim/v1/esimProfile.d.ts +11 -12
  379. package/dist/lib/rest/supersim/v1/fleet.d.ts +14 -15
  380. package/dist/lib/rest/supersim/v1/ipCommand.d.ts +10 -11
  381. package/dist/lib/rest/supersim/v1/network.d.ts +5 -6
  382. package/dist/lib/rest/supersim/v1/networkAccessProfile/networkAccessProfileNetwork.d.ts +6 -7
  383. package/dist/lib/rest/supersim/v1/networkAccessProfile.d.ts +6 -7
  384. package/dist/lib/rest/supersim/v1/settingsUpdate.d.ts +7 -8
  385. package/dist/lib/rest/supersim/v1/sim/billingPeriod.d.ts +7 -8
  386. package/dist/lib/rest/supersim/v1/sim/simIpAddress.d.ts +0 -1
  387. package/dist/lib/rest/supersim/v1/sim.d.ts +8 -9
  388. package/dist/lib/rest/supersim/v1/smsCommand.d.ts +7 -8
  389. package/dist/lib/rest/supersim/v1/usageRecord.d.ts +8 -9
  390. package/dist/lib/rest/sync/v1/service/document/documentPermission.d.ts +8 -9
  391. package/dist/lib/rest/sync/v1/service/document.d.ts +12 -13
  392. package/dist/lib/rest/sync/v1/service/syncList/syncListItem.d.ts +11 -12
  393. package/dist/lib/rest/sync/v1/service/syncList/syncListPermission.d.ts +8 -9
  394. package/dist/lib/rest/sync/v1/service/syncList.d.ts +11 -12
  395. package/dist/lib/rest/sync/v1/service/syncMap/syncMapItem.d.ts +11 -12
  396. package/dist/lib/rest/sync/v1/service/syncMap/syncMapPermission.d.ts +8 -9
  397. package/dist/lib/rest/sync/v1/service/syncMap.d.ts +11 -12
  398. package/dist/lib/rest/sync/v1/service/syncStream/streamMessage.d.ts +2 -3
  399. package/dist/lib/rest/sync/v1/service/syncStream.d.ts +10 -11
  400. package/dist/lib/rest/sync/v1/service.d.ts +14 -15
  401. package/dist/lib/rest/taskrouter/v1/workspace/activity.d.ts +8 -9
  402. package/dist/lib/rest/taskrouter/v1/workspace/event.d.ts +17 -18
  403. package/dist/lib/rest/taskrouter/v1/workspace/task/reservation.d.ts +9 -10
  404. package/dist/lib/rest/taskrouter/v1/workspace/task.d.ts +20 -21
  405. package/dist/lib/rest/taskrouter/v1/workspace/taskChannel.d.ts +10 -11
  406. package/dist/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.d.ts +22 -23
  407. package/dist/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueRealTimeStatistics.d.ts +14 -15
  408. package/dist/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueStatistics.d.ts +6 -7
  409. package/dist/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueuesStatistics.d.ts +5 -6
  410. package/dist/lib/rest/taskrouter/v1/workspace/taskQueue.d.ts +14 -15
  411. package/dist/lib/rest/taskrouter/v1/workspace/worker/reservation.d.ts +9 -10
  412. package/dist/lib/rest/taskrouter/v1/workspace/worker/workerChannel.d.ts +13 -14
  413. package/dist/lib/rest/taskrouter/v1/workspace/worker/workerStatistics.d.ts +5 -6
  414. package/dist/lib/rest/taskrouter/v1/workspace/worker/workersCumulativeStatistics.d.ts +12 -13
  415. package/dist/lib/rest/taskrouter/v1/workspace/worker/workersRealTimeStatistics.d.ts +5 -6
  416. package/dist/lib/rest/taskrouter/v1/workspace/worker/workersStatistics.d.ts +5 -6
  417. package/dist/lib/rest/taskrouter/v1/workspace/worker.d.ts +13 -14
  418. package/dist/lib/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.d.ts +21 -22
  419. package/dist/lib/rest/taskrouter/v1/workspace/workflow/workflowRealTimeStatistics.d.ts +8 -9
  420. package/dist/lib/rest/taskrouter/v1/workspace/workflow/workflowStatistics.d.ts +6 -7
  421. package/dist/lib/rest/taskrouter/v1/workspace/workflow.d.ts +13 -14
  422. package/dist/lib/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.d.ts +21 -22
  423. package/dist/lib/rest/taskrouter/v1/workspace/workspaceRealTimeStatistics.d.ts +10 -11
  424. package/dist/lib/rest/taskrouter/v1/workspace/workspaceStatistics.d.ts +5 -6
  425. package/dist/lib/rest/taskrouter/v1/workspace.d.ts +14 -15
  426. package/dist/lib/rest/trunking/v1/trunk/credentialList.d.ts +7 -8
  427. package/dist/lib/rest/trunking/v1/trunk/ipAccessControlList.d.ts +7 -8
  428. package/dist/lib/rest/trunking/v1/trunk/originationUrl.d.ts +11 -12
  429. package/dist/lib/rest/trunking/v1/trunk/phoneNumber.d.ts +25 -26
  430. package/dist/lib/rest/trunking/v1/trunk/recording.d.ts +0 -1
  431. package/dist/lib/rest/trunking/v1/trunk.d.ts +15 -16
  432. package/dist/lib/rest/trusthub/v1/customerProfiles/customerProfilesChannelEndpointAssignment.d.ts +7 -8
  433. package/dist/lib/rest/trusthub/v1/customerProfiles/customerProfilesEntityAssignments.d.ts +6 -7
  434. package/dist/lib/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.d.ts +5 -6
  435. package/dist/lib/rest/trusthub/v1/customerProfiles.d.ts +10 -11
  436. package/dist/lib/rest/trusthub/v1/endUser.d.ts +8 -9
  437. package/dist/lib/rest/trusthub/v1/endUserType.d.ts +5 -6
  438. package/dist/lib/rest/trusthub/v1/policies.d.ts +4 -5
  439. package/dist/lib/rest/trusthub/v1/supportingDocument.d.ts +9 -10
  440. package/dist/lib/rest/trusthub/v1/supportingDocumentType.d.ts +5 -6
  441. package/dist/lib/rest/trusthub/v1/trustProducts/trustProductsChannelEndpointAssignment.d.ts +7 -8
  442. package/dist/lib/rest/trusthub/v1/trustProducts/trustProductsEntityAssignments.d.ts +6 -7
  443. package/dist/lib/rest/trusthub/v1/trustProducts/trustProductsEvaluations.d.ts +5 -6
  444. package/dist/lib/rest/trusthub/v1/trustProducts.d.ts +10 -11
  445. package/dist/lib/rest/verify/v2/form.d.ts +2 -3
  446. package/dist/lib/rest/verify/v2/safelist.d.ts +1 -2
  447. package/dist/lib/rest/verify/v2/service/accessToken.d.ts +8 -9
  448. package/dist/lib/rest/verify/v2/service/entity/challenge/notification.d.ts +9 -10
  449. package/dist/lib/rest/verify/v2/service/entity/challenge.d.ts +14 -15
  450. package/dist/lib/rest/verify/v2/service/entity/factor.d.ts +10 -11
  451. package/dist/lib/rest/verify/v2/service/entity/newFactor.d.ts +11 -12
  452. package/dist/lib/rest/verify/v2/service/entity.d.ts +7 -8
  453. package/dist/lib/rest/verify/v2/service/messagingConfiguration.d.ts +6 -7
  454. package/dist/lib/rest/verify/v2/service/rateLimit/bucket.d.ts +7 -8
  455. package/dist/lib/rest/verify/v2/service/rateLimit.d.ts +7 -8
  456. package/dist/lib/rest/verify/v2/service/verification.d.ts +17 -16
  457. package/dist/lib/rest/verify/v2/service/verification.js +2 -0
  458. package/dist/lib/rest/verify/v2/service/verificationCheck.d.ts +11 -12
  459. package/dist/lib/rest/verify/v2/service/webhook.d.ts +8 -9
  460. package/dist/lib/rest/verify/v2/service.d.ts +17 -18
  461. package/dist/lib/rest/verify/v2/template.d.ts +5 -6
  462. package/dist/lib/rest/verify/v2/verificationAttempt.d.ts +7 -8
  463. package/dist/lib/rest/verify/v2/verificationAttemptsSummary.d.ts +4 -5
  464. package/dist/lib/rest/video/v1/composition.d.ts +19 -20
  465. package/dist/lib/rest/video/v1/compositionHook.d.ts +14 -15
  466. package/dist/lib/rest/video/v1/compositionSettings.d.ts +8 -9
  467. package/dist/lib/rest/video/v1/recording.d.ts +14 -15
  468. package/dist/lib/rest/video/v1/recordingSettings.d.ts +8 -9
  469. package/dist/lib/rest/video/v1/room/participant/anonymize.d.ts +10 -11
  470. package/dist/lib/rest/video/v1/room/participant/publishedTrack.d.ts +8 -9
  471. package/dist/lib/rest/video/v1/room/participant/subscribeRules.d.ts +4 -5
  472. package/dist/lib/rest/video/v1/room/participant/subscribedTrack.d.ts +9 -10
  473. package/dist/lib/rest/video/v1/room/participant.d.ts +11 -12
  474. package/dist/lib/rest/video/v1/room/recordingRules.d.ts +3 -4
  475. package/dist/lib/rest/video/v1/room/roomRecording.d.ts +13 -14
  476. package/dist/lib/rest/video/v1/room.d.ts +21 -22
  477. package/dist/lib/rest/voice/v1/archivedCall.d.ts +0 -1
  478. package/dist/lib/rest/voice/v1/byocTrunk.d.ts +15 -16
  479. package/dist/lib/rest/voice/v1/connectionPolicy/connectionPolicyTarget.d.ts +11 -12
  480. package/dist/lib/rest/voice/v1/connectionPolicy.d.ts +7 -8
  481. package/dist/lib/rest/voice/v1/dialingPermissions/bulkCountryUpdate.d.ts +1 -2
  482. package/dist/lib/rest/voice/v1/dialingPermissions/country/highriskSpecialPrefix.d.ts +1 -2
  483. package/dist/lib/rest/voice/v1/dialingPermissions/country.d.ts +9 -10
  484. package/dist/lib/rest/voice/v1/dialingPermissions/settings.d.ts +2 -3
  485. package/dist/lib/rest/voice/v1/dialingPermissions.d.ts +0 -1
  486. package/dist/lib/rest/voice/v1/ipRecord.d.ts +6 -7
  487. package/dist/lib/rest/voice/v1/sourceIpMapping.d.ts +6 -7
  488. package/dist/lib/rest/wireless/v1/command.d.ts +8 -9
  489. package/dist/lib/rest/wireless/v1/ratePlan.d.ts +16 -17
  490. package/dist/lib/rest/wireless/v1/sim/dataSession.d.ts +16 -17
  491. package/dist/lib/rest/wireless/v1/sim/usageRecord.d.ts +5 -6
  492. package/dist/lib/rest/wireless/v1/sim.d.ts +22 -23
  493. package/dist/lib/rest/wireless/v1/usageRecord.d.ts +4 -5
  494. package/dist/lib/twiml/TwiML.d.ts +1 -0
  495. package/dist/lib/twiml/TwiML.js +0 -1
  496. package/dist/lib/twiml/VoiceResponse.d.ts +111 -16
  497. package/dist/lib/twiml/VoiceResponse.js +67 -7
  498. package/dist/lib/webhooks/webhooks.d.ts +2 -1
  499. package/dist/package.json +10 -10
  500. package/package.json +10 -10
  501. package/dist/lib/rest/flexApi/v1/goodData.d.ts +0 -131
  502. package/dist/lib/rest/flexApi/v1/userRoles.d.ts +0 -110
package/README.md CHANGED
@@ -29,12 +29,6 @@ TypeScript is supported for TypeScript version 2.9 and above.
29
29
 
30
30
  `npm install twilio` or `yarn add twilio`
31
31
 
32
- ### Installing Release Candidates
33
-
34
- Or, if you're wanting to install the latest release candidate use:
35
-
36
- `npm install twilio@rc` or `yarn add twilio@rc`
37
-
38
32
  ## Sample Usage
39
33
 
40
34
  Check out these [code examples](examples) in JavaScript and TypeScript to get up and running quickly.
@@ -70,6 +64,22 @@ const client = require('twilio')(accountSid, authToken, {
70
64
  });
71
65
  ```
72
66
 
67
+ ### Enable Auto-Retry with Exponential Backoff
68
+
69
+ `twilio-node` supports automatic retry with exponential backoff when API requests receive an [Error 429 response](https://support.twilio.com/hc/en-us/articles/360044308153-Twilio-API-response-Error-429-Too-Many-Requests-). This retry with exponential backoff feature is disabled by default. To enable this feature, instantiate the Twilio client with the `autoRetry` flag set to `true`.
70
+
71
+ Optionally, the maximum number of retries performed by this feature can be set with the `maxRetries` flag. The default maximum number of retries is `3`.
72
+
73
+ ```javascript
74
+ var accountSid = process.env.TWILIO_ACCOUNT_SID; // Your Account SID from www.twilio.com/console
75
+ var authToken = process.env.TWILIO_AUTH_TOKEN; // Your Auth Token from www.twilio.com/console
76
+
77
+ const client = require('twilio')(accountSid, authToken, {
78
+ autoRetry: true,
79
+ maxRetries: 3
80
+ });
81
+ ```
82
+
73
83
  ### Specify Region and/or Edge
74
84
 
75
85
  To take advantage of Twilio's [Global Infrastructure](https://www.twilio.com/docs/global-infrastructure), specify the target Region and/or Edge for the client:
@@ -115,7 +125,7 @@ See [example](examples/express.js) for a code sample for incoming Twilio request
115
125
 
116
126
  ## Handling Exceptions
117
127
 
118
- For an example on how to handle exceptions in this helper library, please see the [Twilio documentation](https://www.twilio.com/docs/libraries/node/usage-guide#exceptions).
128
+ For an example on how to handle exceptions in this helper library, please see the [Twilio documentation](https://www.twilio.com/docs/libraries/node#exceptions).
119
129
 
120
130
  ## Using a Custom HTTP Client
121
131
 
@@ -10,6 +10,8 @@ export interface ClientOpts {
10
10
  lazyLoading?: boolean;
11
11
  logLevel?: string;
12
12
  userAgentExtensions?: string[];
13
+ autoRetry?: boolean;
14
+ maxRetries?: number;
13
15
  }
14
16
  export interface RequestOpts {
15
17
  method?: HttpMethod;
@@ -35,6 +37,8 @@ export declare class BaseTwilio {
35
37
  edge?: string;
36
38
  region?: string;
37
39
  logLevel?: string;
40
+ autoRetry: boolean;
41
+ maxRetries?: number;
38
42
  userAgentExtensions?: string[];
39
43
  _httpClient?: RequestClient;
40
44
  /**
@@ -50,6 +50,8 @@ class BaseTwilio {
50
50
  this.edge = this.opts.edge || this.env.TWILIO_EDGE;
51
51
  this.region = this.opts.region || this.env.TWILIO_REGION;
52
52
  this.logLevel = this.opts.logLevel || this.env.TWILIO_LOG_LEVEL;
53
+ this.autoRetry = this.opts.autoRetry || false;
54
+ this.maxRetries = this.opts.maxRetries;
53
55
  this.userAgentExtensions = this.opts.userAgentExtensions || [];
54
56
  this._httpClient = this.opts.httpClient;
55
57
  if (this.opts.lazyLoading === false) {
@@ -64,7 +66,10 @@ class BaseTwilio {
64
66
  }
65
67
  get httpClient() {
66
68
  if (!this._httpClient) {
67
- this._httpClient = new RequestClient_1.default();
69
+ this._httpClient = new RequestClient_1.default({
70
+ autoRetry: this.autoRetry,
71
+ maxRetries: this.maxRetries,
72
+ });
68
73
  }
69
74
  return this._httpClient;
70
75
  }
@@ -79,17 +79,34 @@ export interface RequestClientOptions {
79
79
  /**
80
80
  * https.Agent scheduling option
81
81
  */
82
- scheduling?: string;
82
+ scheduling?: "fifo" | "lifo" | undefined;
83
83
  /**
84
84
  * The private CA certificate bundle (if private SSL certificate)
85
85
  */
86
86
  ca?: string | Buffer;
87
+ /**
88
+ * Enable auto-retry with exponential backoff when receiving 429 Errors from
89
+ * the API. Disabled by default.
90
+ */
91
+ autoRetry?: boolean;
92
+ /**
93
+ * Maximum retry delay in milliseconds for 429 Error response retries.
94
+ * Defaults to 3000.
95
+ */
96
+ maxRetryDelay?: number;
97
+ /**
98
+ * Maximum number of request retries for 429 Error responses. Defaults to 3.
99
+ */
100
+ maxRetries?: number;
87
101
  }
88
102
  export default class RequestClient {
89
103
  defaultTimeout: number;
90
104
  axios: AxiosInstance;
91
105
  lastResponse?: Response<any>;
92
106
  lastRequest?: Request<any>;
107
+ autoRetry: boolean;
108
+ maxRetryDelay: number;
109
+ maxRetries: number;
93
110
  /**
94
111
  * Make http request
95
112
  * @param opts - The options passed to https.Agent
@@ -100,6 +117,9 @@ export default class RequestClient {
100
117
  * @param opts.maxTotalSockets - https.Agent maxTotalSockets option
101
118
  * @param opts.maxFreeSockets - https.Agent maxFreeSockets option
102
119
  * @param opts.scheduling - https.Agent scheduling option
120
+ * @param opts.autoRetry - Enable auto-retry requests with exponential backoff on 429 responses. Defaults to false.
121
+ * @param opts.maxRetryDelay - Max retry delay in milliseconds for 429 Too Many Request response retries. Defaults to 3000.
122
+ * @param opts.maxRetries - Max number of request retries for 429 Too Many Request responses. Defaults to 3.
103
123
  */
104
124
  constructor(opts?: RequestClientOptions);
105
125
  /**
@@ -35,6 +35,29 @@ const response_1 = __importDefault(require("../http/response"));
35
35
  const request_1 = __importDefault(require("../http/request"));
36
36
  const DEFAULT_CONTENT_TYPE = "application/x-www-form-urlencoded";
37
37
  const DEFAULT_TIMEOUT = 30000;
38
+ const DEFAULT_INITIAL_RETRY_INTERVAL_MILLIS = 100;
39
+ const DEFAULT_MAX_RETRY_DELAY = 3000;
40
+ const DEFAULT_MAX_RETRIES = 3;
41
+ function getExpontentialBackoffResponseHandler(axios, opts) {
42
+ const maxIntervalMillis = opts.maxIntervalMillis;
43
+ const maxRetries = opts.maxRetries;
44
+ return function (res) {
45
+ const config = res.config;
46
+ if (res.status !== 429) {
47
+ return res;
48
+ }
49
+ const retryCount = (config.retryCount || 0) + 1;
50
+ if (retryCount <= maxRetries) {
51
+ config.retryCount = retryCount;
52
+ const baseDelay = Math.min(maxIntervalMillis, DEFAULT_INITIAL_RETRY_INTERVAL_MILLIS * Math.pow(2, retryCount));
53
+ const delay = Math.floor(baseDelay * Math.random()); // Full jitter backoff
54
+ return new Promise((resolve) => {
55
+ setTimeout(() => resolve(axios(config)), delay);
56
+ });
57
+ }
58
+ return res;
59
+ };
60
+ }
38
61
  class RequestClient {
39
62
  /**
40
63
  * Make http request
@@ -46,10 +69,16 @@ class RequestClient {
46
69
  * @param opts.maxTotalSockets - https.Agent maxTotalSockets option
47
70
  * @param opts.maxFreeSockets - https.Agent maxFreeSockets option
48
71
  * @param opts.scheduling - https.Agent scheduling option
72
+ * @param opts.autoRetry - Enable auto-retry requests with exponential backoff on 429 responses. Defaults to false.
73
+ * @param opts.maxRetryDelay - Max retry delay in milliseconds for 429 Too Many Request response retries. Defaults to 3000.
74
+ * @param opts.maxRetries - Max number of request retries for 429 Too Many Request responses. Defaults to 3.
49
75
  */
50
76
  constructor(opts) {
51
77
  opts = opts || {};
52
78
  this.defaultTimeout = opts.timeout || DEFAULT_TIMEOUT;
79
+ this.autoRetry = opts.autoRetry || false;
80
+ this.maxRetryDelay = opts.maxRetryDelay || DEFAULT_MAX_RETRY_DELAY;
81
+ this.maxRetries = opts.maxRetries || DEFAULT_MAX_RETRIES;
53
82
  // construct an https agent
54
83
  let agentOpts = {
55
84
  timeout: this.defaultTimeout,
@@ -80,6 +109,12 @@ class RequestClient {
80
109
  this.axios = axios_1.default.create();
81
110
  this.axios.defaults.headers.post["Content-Type"] = DEFAULT_CONTENT_TYPE;
82
111
  this.axios.defaults.httpsAgent = agent;
112
+ if (opts.autoRetry) {
113
+ this.axios.interceptors.response.use(getExpontentialBackoffResponseHandler(this.axios, {
114
+ maxIntervalMillis: this.maxRetryDelay,
115
+ maxRetries: this.maxRetries,
116
+ }));
117
+ }
83
118
  }
84
119
  /**
85
120
  * Make http request
@@ -1,3 +1,4 @@
1
+ import TwiML from "../twiml/TwiML";
1
2
  /**
2
3
  * @namespace serialize
3
4
  */
@@ -39,6 +40,7 @@ export declare function object<T>(o: T): T;
39
40
  * @returns a string 'true' or 'false' if passed a boolean, else the value
40
41
  */
41
42
  export declare function bool(input: string | boolean): string | "true" | "false";
43
+ export declare function twiml(input: TwiML | string): string;
42
44
  type MapFunction<TInput, TOutput> = (input: TInput) => TOutput;
43
45
  /**
44
46
  * Maps transform over each element in input if input is an array
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.map = exports.bool = exports.object = exports.prefixedCollapsibleMap = exports.iso8601DateTime = exports.iso8601Date = void 0;
6
+ exports.map = exports.twiml = exports.bool = exports.object = exports.prefixedCollapsibleMap = exports.iso8601DateTime = exports.iso8601Date = void 0;
7
7
  const dayjs_1 = __importDefault(require("dayjs"));
8
8
  const utc_1 = __importDefault(require("dayjs/plugin/utc"));
9
9
  dayjs_1.default.extend(utc_1.default);
@@ -102,6 +102,10 @@ function bool(input) {
102
102
  return input;
103
103
  }
104
104
  exports.bool = bool;
105
+ function twiml(input) {
106
+ return input.toString();
107
+ }
108
+ exports.twiml = twiml;
105
109
  /**
106
110
  * Maps transform over each element in input if input is an array
107
111
  *
@@ -1,4 +1,9 @@
1
1
  import ContentBase from "./ContentBase";
2
+ import { ContentListInstance } from "./content/v1/content";
2
3
  declare class Content extends ContentBase {
4
+ /**
5
+ * @deprecated - Use v1.contents instead
6
+ */
7
+ get contents(): ContentListInstance;
3
8
  }
4
9
  export = Content;
@@ -4,5 +4,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  const ContentBase_1 = __importDefault(require("./ContentBase"));
6
6
  class Content extends ContentBase_1.default {
7
+ /**
8
+ * @deprecated - Use v1.contents instead
9
+ */
10
+ get contents() {
11
+ console.warn("contents is deprecated. Use v1.contents instead.");
12
+ return this.v1.contents;
13
+ }
7
14
  }
8
15
  module.exports = Content;
@@ -3,8 +3,14 @@ import { ConfigurationListInstance } from "./flexApi/v1/configuration";
3
3
  import { FlexFlowListInstance } from "./flexApi/v1/flexFlow";
4
4
  import { InteractionListInstance } from "./flexApi/v1/interaction";
5
5
  import { WebChannelListInstance } from "./flexApi/v1/webChannel";
6
+ import { AssessmentsListInstance } from "./flexApi/v1/assessments";
7
+ import { WebChannelsListInstance } from "./flexApi/v2/webChannels";
6
8
  import FlexApiBase from "./FlexApiBase";
7
9
  declare class FlexApi extends FlexApiBase {
10
+ /**
11
+ * @deprecated - Use v1.assessments instead
12
+ */
13
+ get assessments(): AssessmentsListInstance;
8
14
  /**
9
15
  * @deprecated - Use v1.channel instead
10
16
  */
@@ -25,5 +31,9 @@ declare class FlexApi extends FlexApiBase {
25
31
  * @deprecated - Use v1.webChannel instead
26
32
  */
27
33
  get webChannel(): WebChannelListInstance;
34
+ /**
35
+ * @deprecated - Use v2.webChannels instead
36
+ */
37
+ get webChannels(): WebChannelsListInstance;
28
38
  }
29
39
  export = FlexApi;
@@ -4,6 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  const FlexApiBase_1 = __importDefault(require("./FlexApiBase"));
6
6
  class FlexApi extends FlexApiBase_1.default {
7
+ /**
8
+ * @deprecated - Use v1.assessments instead
9
+ */
10
+ get assessments() {
11
+ console.warn("assessments is deprecated. Use v1.assessments instead.");
12
+ return this.v1.assessments;
13
+ }
7
14
  /**
8
15
  * @deprecated - Use v1.channel instead
9
16
  */
@@ -39,5 +46,12 @@ class FlexApi extends FlexApiBase_1.default {
39
46
  console.warn("webChannel is deprecated. Use v1.webChannel instead.");
40
47
  return this.v1.webChannel;
41
48
  }
49
+ /**
50
+ * @deprecated - Use v2.webChannels instead
51
+ */
52
+ get webChannels() {
53
+ console.warn("webChannels is deprecated. Use v2.webChannels instead.");
54
+ return this.v2.webChannels;
55
+ }
42
56
  }
43
57
  module.exports = FlexApi;
@@ -3,6 +3,8 @@ import { DeactivationsListInstance } from "./messaging/v1/deactivations";
3
3
  import { ExternalCampaignListInstance } from "./messaging/v1/externalCampaign";
4
4
  import { ServiceListInstance } from "./messaging/v1/service";
5
5
  import { UsecaseListInstance } from "./messaging/v1/usecase";
6
+ import { DomainCertsListInstance } from "./messaging/v1/domainCerts";
7
+ import { DomainConfigListInstance } from "./messaging/v1/domainConfig";
6
8
  import MessagingBase from "./MessagingBase";
7
9
  declare class Messaging extends MessagingBase {
8
10
  /**
@@ -13,6 +15,14 @@ declare class Messaging extends MessagingBase {
13
15
  * @deprecated - Use v1.deactivations instead
14
16
  */
15
17
  get deactivations(): DeactivationsListInstance;
18
+ /**
19
+ * @deprecated - Use v1.domainCerts instead
20
+ */
21
+ get domainCerts(): DomainCertsListInstance;
22
+ /**
23
+ * @deprecated - Use v1.domainConfig instead
24
+ */
25
+ get domainConfig(): DomainConfigListInstance;
16
26
  /**
17
27
  * @deprecated - Use v1.externalCampaign instead
18
28
  */
@@ -18,6 +18,20 @@ class Messaging extends MessagingBase_1.default {
18
18
  console.warn("deactivations is deprecated. Use v1.deactivations instead.");
19
19
  return this.v1.deactivations;
20
20
  }
21
+ /**
22
+ * @deprecated - Use v1.domainCerts instead
23
+ */
24
+ get domainCerts() {
25
+ console.warn("domainCerts is deprecated. Use v1.domainCerts instead.");
26
+ return this.v1.domainCerts;
27
+ }
28
+ /**
29
+ * @deprecated - Use v1.domainConfig instead
30
+ */
31
+ get domainConfig() {
32
+ console.warn("domainConfig is deprecated. Use v1.domainConfig instead.");
33
+ return this.v1.domainConfig;
34
+ }
21
35
  /**
22
36
  * @deprecated - Use v1.externalCampaign instead
23
37
  */
@@ -1,9 +1,14 @@
1
1
  import OauthBase from "./OauthBase";
2
2
  import { OauthListInstance } from "./oauth/v1/oauth";
3
+ import { DeviceCodeListInstance } from "./oauth/v1/deviceCode";
3
4
  import { OpenidDiscoveryListInstance } from "./oauth/v1/openidDiscovery";
4
5
  import { TokenListInstance } from "./oauth/v1/token";
5
6
  import { UserInfoListInstance } from "./oauth/v1/userInfo";
6
7
  declare class Oauth extends OauthBase {
8
+ /**
9
+ * @deprecated - Use v1.deviceCode instead
10
+ */
11
+ get deviceCode(): DeviceCodeListInstance;
7
12
  /**
8
13
  * @deprecated - Use v1.oauth instead
9
14
  */
@@ -4,6 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  const OauthBase_1 = __importDefault(require("./OauthBase"));
6
6
  class Oauth extends OauthBase_1.default {
7
+ /**
8
+ * @deprecated - Use v1.deviceCode instead
9
+ */
10
+ get deviceCode() {
11
+ console.warn("deviceCode is deprecated. Use v1.deviceCode instead.");
12
+ return this.v1.deviceCode;
13
+ }
7
14
  /**
8
15
  * @deprecated - Use v1.oauth instead
9
16
  */
@@ -3,6 +3,7 @@ import { FleetListInstance } from "./supersim/v1/fleet";
3
3
  import { IpCommandListInstance } from "./supersim/v1/ipCommand";
4
4
  import { NetworkListInstance } from "./supersim/v1/network";
5
5
  import { NetworkAccessProfileListInstance } from "./supersim/v1/networkAccessProfile";
6
+ import { SettingsUpdateListInstance } from "./supersim/v1/settingsUpdate";
6
7
  import { SimListInstance } from "./supersim/v1/sim";
7
8
  import { SmsCommandListInstance } from "./supersim/v1/smsCommand";
8
9
  import { UsageRecordListInstance } from "./supersim/v1/usageRecord";
@@ -24,6 +25,10 @@ declare class Supersim extends SupersimBase {
24
25
  * @deprecated - Use v1.networks instead
25
26
  */
26
27
  get networks(): NetworkListInstance;
28
+ /**
29
+ * @deprecated - Use v1.settingsUpdates instead
30
+ */
31
+ get settingsUpdates(): SettingsUpdateListInstance;
27
32
  /**
28
33
  * @deprecated - Use v1.networkAccessProfiles instead
29
34
  */
@@ -32,6 +32,13 @@ class Supersim extends SupersimBase_1.default {
32
32
  console.warn("networks is deprecated. Use v1.networks instead.");
33
33
  return this.v1.networks;
34
34
  }
35
+ /**
36
+ * @deprecated - Use v1.settingsUpdates instead
37
+ */
38
+ get settingsUpdates() {
39
+ console.warn("settingsUpdates is deprecated. Use v1.settingsUpdates instead.");
40
+ return this.v1.settingsUpdates;
41
+ }
35
42
  /**
36
43
  * @deprecated - Use v1.networkAccessProfiles instead
37
44
  */
@@ -1,5 +1,4 @@
1
1
  /// <reference types="node" />
2
- /// <reference types="node" />
3
2
  import { inspect, InspectOptions } from "util";
4
3
  import V1 from "../V1";
5
4
  export interface AuthTokenPromotionContext {
@@ -46,19 +45,19 @@ export declare class AuthTokenPromotionInstance {
46
45
  protected _context?: AuthTokenPromotionContext;
47
46
  constructor(_version: V1, payload: AuthTokenPromotionResource);
48
47
  /**
49
- * The SID of the Account that the secondary Auth Token was created for
48
+ * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that the secondary Auth Token was created for.
50
49
  */
51
50
  accountSid: string;
52
51
  /**
53
- * The promoted Auth Token
52
+ * The promoted Auth Token that must be used to authenticate future API requests.
54
53
  */
55
54
  authToken: string;
56
55
  /**
57
- * The ISO 8601 formatted date and time in UTC when the resource was created
56
+ * The date and time in UTC when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
58
57
  */
59
58
  dateCreated: Date;
60
59
  /**
61
- * The ISO 8601 formatted date and time in UTC when the resource was last updated
60
+ * The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
62
61
  */
63
62
  dateUpdated: Date;
64
63
  /**
@@ -1,5 +1,4 @@
1
1
  /// <reference types="node" />
2
- /// <reference types="node" />
3
2
  import { inspect, InspectOptions } from "util";
4
3
  import Page, { TwilioResponsePayload } from "../../../../base/Page";
5
4
  import Response from "../../../../http/response";
@@ -131,23 +130,23 @@ export declare class AwsInstance {
131
130
  protected _context?: AwsContext;
132
131
  constructor(_version: V1, payload: AwsResource, sid?: string);
133
132
  /**
134
- * The unique string that identifies the resource
133
+ * The unique string that we created to identify the AWS resource.
135
134
  */
136
135
  sid: string;
137
136
  /**
138
- * The SID of the Account that created the resource
137
+ * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the AWS resource.
139
138
  */
140
139
  accountSid: string;
141
140
  /**
142
- * The string that you assigned to describe the resource
141
+ * The string that you assigned to describe the resource.
143
142
  */
144
143
  friendlyName: string;
145
144
  /**
146
- * The RFC 2822 date and time in GMT when the resource was created
145
+ * The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
147
146
  */
148
147
  dateCreated: Date;
149
148
  /**
150
- * The RFC 2822 date and time in GMT when the resource was last updated
149
+ * The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
151
150
  */
152
151
  dateUpdated: Date;
153
152
  /**
@@ -1,5 +1,4 @@
1
1
  /// <reference types="node" />
2
- /// <reference types="node" />
3
2
  import { inspect, InspectOptions } from "util";
4
3
  import Page, { TwilioResponsePayload } from "../../../../base/Page";
5
4
  import Response from "../../../../http/response";
@@ -131,23 +130,23 @@ export declare class PublicKeyInstance {
131
130
  protected _context?: PublicKeyContext;
132
131
  constructor(_version: V1, payload: PublicKeyResource, sid?: string);
133
132
  /**
134
- * The unique string that identifies the resource
133
+ * The unique string that that we created to identify the PublicKey resource.
135
134
  */
136
135
  sid: string;
137
136
  /**
138
- * The SID of the Account that created the Credential that the PublicKey resource belongs to
137
+ * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Credential that the PublicKey resource belongs to.
139
138
  */
140
139
  accountSid: string;
141
140
  /**
142
- * The string that you assigned to describe the resource
141
+ * The string that you assigned to describe the resource.
143
142
  */
144
143
  friendlyName: string;
145
144
  /**
146
- * The RFC 2822 date and time in GMT when the resource was created
145
+ * The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
147
146
  */
148
147
  dateCreated: Date;
149
148
  /**
150
- * The RFC 2822 date and time in GMT when the resource was last updated
149
+ * The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
151
150
  */
152
151
  dateUpdated: Date;
153
152
  /**
@@ -1,5 +1,4 @@
1
1
  /// <reference types="node" />
2
- /// <reference types="node" />
3
2
  import { inspect, InspectOptions } from "util";
4
3
  import V1 from "../V1";
5
4
  import { AwsListInstance } from "./credential/aws";
@@ -1,5 +1,4 @@
1
1
  /// <reference types="node" />
2
- /// <reference types="node" />
3
2
  import { inspect, InspectOptions } from "util";
4
3
  import V1 from "../V1";
5
4
  export interface SecondaryAuthTokenContext {
@@ -55,19 +54,19 @@ export declare class SecondaryAuthTokenInstance {
55
54
  protected _context?: SecondaryAuthTokenContext;
56
55
  constructor(_version: V1, payload: SecondaryAuthTokenResource);
57
56
  /**
58
- * The SID of the Account that the secondary Auth Token was created for
57
+ * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that the secondary Auth Token was created for.
59
58
  */
60
59
  accountSid: string;
61
60
  /**
62
- * The ISO 8601 formatted date and time in UTC when the resource was created
61
+ * The date and time in UTC when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
63
62
  */
64
63
  dateCreated: Date;
65
64
  /**
66
- * The ISO 8601 formatted date and time in UTC when the resource was last updated
65
+ * The date and time in UTC when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
67
66
  */
68
67
  dateUpdated: Date;
69
68
  /**
70
- * The generated secondary Auth Token
69
+ * The generated secondary Auth Token that can be used to authenticate future API requests.
71
70
  */
72
71
  secondaryAuthToken: string;
73
72
  /**