twilio 4.6.0 → 4.7.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 (1235) hide show
  1. package/{LICENSE.md → LICENSE} +2 -2
  2. package/README.md +149 -25
  3. package/index.d.ts +2 -0
  4. package/index.js +9 -1
  5. package/lib/base/BaseTwilio.d.ts +84 -0
  6. package/lib/base/BaseTwilio.js +174 -0
  7. package/lib/base/Domain.d.ts +29 -0
  8. package/lib/base/Domain.js +49 -35
  9. package/lib/base/Page.d.ts +104 -0
  10. package/lib/base/Page.js +187 -182
  11. package/lib/base/RequestClient.d.ts +145 -0
  12. package/lib/base/RequestClient.js +219 -67
  13. package/lib/base/RestException.d.ts +16 -0
  14. package/lib/base/RestException.js +32 -16
  15. package/lib/base/Version.d.ts +129 -0
  16. package/lib/base/Version.js +329 -171
  17. package/lib/base/deserialize.d.ts +41 -0
  18. package/lib/base/deserialize.js +48 -66
  19. package/lib/base/serialize.d.ts +53 -0
  20. package/lib/base/serialize.js +105 -105
  21. package/lib/base/utility.d.ts +2 -0
  22. package/lib/base/utility.js +13 -0
  23. package/lib/base/values.d.ts +10 -0
  24. package/lib/base/values.js +8 -14
  25. package/lib/http/request.d.ts +25 -0
  26. package/lib/http/request.js +84 -73
  27. package/lib/http/response.d.ts +7 -0
  28. package/lib/http/response.js +13 -12
  29. package/lib/index.d.ts +39 -0
  30. package/lib/index.js +81 -25
  31. package/lib/interfaces.d.ts +94 -0
  32. package/lib/interfaces.js +2 -0
  33. package/lib/jwt/AccessToken.d.ts +191 -0
  34. package/lib/jwt/AccessToken.js +244 -234
  35. package/lib/jwt/ClientCapability.d.ts +61 -0
  36. package/lib/jwt/ClientCapability.js +105 -124
  37. package/lib/jwt/taskrouter/TaskRouterCapability.d.ts +74 -0
  38. package/lib/jwt/taskrouter/TaskRouterCapability.js +95 -101
  39. package/lib/jwt/taskrouter/util.d.ts +66 -0
  40. package/lib/jwt/taskrouter/util.js +122 -117
  41. package/lib/rest/Accounts.d.ts +19 -0
  42. package/lib/rest/Accounts.js +27 -52
  43. package/lib/rest/AccountsBase.d.ts +13 -0
  44. package/lib/rest/AccountsBase.js +31 -0
  45. package/lib/rest/Api.d.ts +127 -0
  46. package/lib/rest/Api.js +180 -260
  47. package/lib/rest/ApiBase.d.ts +13 -0
  48. package/lib/rest/ApiBase.js +31 -0
  49. package/lib/rest/Autopilot.d.ts +14 -0
  50. package/lib/rest/Autopilot.js +22 -0
  51. package/lib/rest/AutopilotBase.d.ts +13 -0
  52. package/lib/rest/AutopilotBase.js +31 -0
  53. package/lib/rest/Bulkexports.d.ts +14 -0
  54. package/lib/rest/Bulkexports.js +22 -0
  55. package/lib/rest/BulkexportsBase.d.ts +13 -0
  56. package/lib/rest/BulkexportsBase.js +31 -0
  57. package/lib/rest/Chat.d.ts +19 -0
  58. package/lib/rest/Chat.js +27 -71
  59. package/lib/rest/ChatBase.d.ts +19 -0
  60. package/lib/rest/ChatBase.js +41 -0
  61. package/lib/rest/Content.d.ts +9 -0
  62. package/lib/rest/Content.js +15 -0
  63. package/lib/rest/ContentBase.d.ts +13 -0
  64. package/lib/rest/ContentBase.js +31 -0
  65. package/lib/rest/Conversations.d.ts +44 -0
  66. package/lib/rest/Conversations.js +64 -0
  67. package/lib/rest/ConversationsBase.d.ts +13 -0
  68. package/lib/rest/ConversationsBase.js +31 -0
  69. package/lib/rest/Events.d.ts +24 -0
  70. package/lib/rest/Events.js +36 -0
  71. package/lib/rest/EventsBase.d.ts +13 -0
  72. package/lib/rest/EventsBase.js +31 -0
  73. package/lib/rest/FlexApi.d.ts +39 -0
  74. package/lib/rest/FlexApi.js +57 -0
  75. package/lib/rest/FlexApiBase.d.ts +16 -0
  76. package/lib/rest/FlexApiBase.js +36 -0
  77. package/lib/rest/FrontlineApi.d.ts +9 -0
  78. package/lib/rest/FrontlineApi.js +15 -0
  79. package/lib/rest/FrontlineApiBase.d.ts +13 -0
  80. package/lib/rest/FrontlineApiBase.js +31 -0
  81. package/lib/rest/Insights.d.ts +29 -0
  82. package/lib/rest/Insights.js +43 -0
  83. package/lib/rest/InsightsBase.d.ts +13 -0
  84. package/lib/rest/InsightsBase.js +31 -0
  85. package/lib/rest/IpMessaging.d.ts +14 -0
  86. package/lib/rest/IpMessaging.js +20 -72
  87. package/lib/rest/IpMessagingBase.d.ts +16 -0
  88. package/lib/rest/IpMessagingBase.js +36 -0
  89. package/lib/rest/Lookups.d.ts +9 -0
  90. package/lib/rest/Lookups.js +13 -53
  91. package/lib/rest/LookupsBase.d.ts +16 -0
  92. package/lib/rest/LookupsBase.js +36 -0
  93. package/lib/rest/Media.d.ts +19 -0
  94. package/lib/rest/Media.js +29 -0
  95. package/lib/rest/MediaBase.d.ts +13 -0
  96. package/lib/rest/MediaBase.js +31 -0
  97. package/lib/rest/Messaging.d.ts +39 -0
  98. package/lib/rest/Messaging.js +55 -52
  99. package/lib/rest/MessagingBase.d.ts +13 -0
  100. package/lib/rest/MessagingBase.js +31 -0
  101. package/lib/rest/Microvisor.d.ts +14 -0
  102. package/lib/rest/Microvisor.js +22 -0
  103. package/lib/rest/MicrovisorBase.d.ts +13 -0
  104. package/lib/rest/MicrovisorBase.js +31 -0
  105. package/lib/rest/Monitor.d.ts +14 -0
  106. package/lib/rest/Monitor.js +20 -60
  107. package/lib/rest/MonitorBase.d.ts +13 -0
  108. package/lib/rest/MonitorBase.js +31 -0
  109. package/lib/rest/Notify.d.ts +14 -0
  110. package/lib/rest/Notify.js +20 -60
  111. package/lib/rest/NotifyBase.d.ts +13 -0
  112. package/lib/rest/NotifyBase.js +31 -0
  113. package/lib/rest/Numbers.d.ts +9 -0
  114. package/lib/rest/Numbers.js +15 -0
  115. package/lib/rest/NumbersBase.d.ts +13 -0
  116. package/lib/rest/NumbersBase.js +31 -0
  117. package/lib/rest/Oauth.d.ts +29 -0
  118. package/lib/rest/Oauth.js +43 -0
  119. package/lib/rest/OauthBase.d.ts +13 -0
  120. package/lib/rest/OauthBase.js +31 -0
  121. package/lib/rest/Preview.d.ts +54 -0
  122. package/lib/rest/Preview.js +76 -176
  123. package/lib/rest/PreviewBase.d.ts +28 -0
  124. package/lib/rest/PreviewBase.js +57 -0
  125. package/lib/rest/Pricing.d.ts +29 -0
  126. package/lib/rest/Pricing.js +41 -69
  127. package/lib/rest/PricingBase.d.ts +16 -0
  128. package/lib/rest/PricingBase.js +36 -0
  129. package/lib/rest/Proxy.d.ts +9 -0
  130. package/lib/rest/Proxy.js +15 -0
  131. package/lib/rest/ProxyBase.d.ts +13 -0
  132. package/lib/rest/ProxyBase.js +31 -0
  133. package/lib/rest/Routes.d.ts +19 -0
  134. package/lib/rest/Routes.js +29 -0
  135. package/lib/rest/RoutesBase.d.ts +13 -0
  136. package/lib/rest/RoutesBase.js +31 -0
  137. package/lib/rest/Serverless.d.ts +9 -0
  138. package/lib/rest/Serverless.js +15 -0
  139. package/lib/rest/ServerlessBase.d.ts +13 -0
  140. package/lib/rest/ServerlessBase.js +31 -0
  141. package/lib/rest/Studio.d.ts +14 -0
  142. package/lib/rest/Studio.js +22 -0
  143. package/lib/rest/StudioBase.d.ts +16 -0
  144. package/lib/rest/StudioBase.js +36 -0
  145. package/lib/rest/Supersim.d.ts +49 -0
  146. package/lib/rest/Supersim.js +71 -0
  147. package/lib/rest/SupersimBase.d.ts +13 -0
  148. package/lib/rest/SupersimBase.js +31 -0
  149. package/lib/rest/Sync.d.ts +9 -0
  150. package/lib/rest/Sync.js +13 -52
  151. package/lib/rest/SyncBase.d.ts +13 -0
  152. package/lib/rest/SyncBase.js +31 -0
  153. package/lib/rest/Taskrouter.d.ts +9 -0
  154. package/lib/rest/Taskrouter.js +13 -52
  155. package/lib/rest/TaskrouterBase.d.ts +13 -0
  156. package/lib/rest/TaskrouterBase.js +31 -0
  157. package/lib/rest/Trunking.d.ts +9 -0
  158. package/lib/rest/Trunking.js +13 -52
  159. package/lib/rest/TrunkingBase.d.ts +13 -0
  160. package/lib/rest/TrunkingBase.js +31 -0
  161. package/lib/rest/Trusthub.d.ts +39 -0
  162. package/lib/rest/Trusthub.js +57 -0
  163. package/lib/rest/TrusthubBase.d.ts +13 -0
  164. package/lib/rest/TrusthubBase.js +31 -0
  165. package/lib/rest/Twilio.d.ts +272 -0
  166. package/lib/rest/Twilio.js +308 -503
  167. package/lib/rest/Verify.d.ts +29 -0
  168. package/lib/rest/Verify.js +43 -0
  169. package/lib/rest/VerifyBase.d.ts +13 -0
  170. package/lib/rest/VerifyBase.js +31 -0
  171. package/lib/rest/Video.d.ts +34 -0
  172. package/lib/rest/Video.js +48 -60
  173. package/lib/rest/VideoBase.d.ts +13 -0
  174. package/lib/rest/VideoBase.js +31 -0
  175. package/lib/rest/Voice.d.ts +34 -0
  176. package/lib/rest/Voice.js +50 -0
  177. package/lib/rest/VoiceBase.d.ts +13 -0
  178. package/lib/rest/VoiceBase.js +31 -0
  179. package/lib/rest/Wireless.d.ts +24 -0
  180. package/lib/rest/Wireless.js +34 -68
  181. package/lib/rest/WirelessBase.d.ts +13 -0
  182. package/lib/rest/WirelessBase.js +31 -0
  183. package/lib/rest/accounts/V1.d.ts +25 -0
  184. package/lib/rest/accounts/V1.js +45 -41
  185. package/lib/rest/accounts/v1/authTokenPromotion.d.ts +105 -0
  186. package/lib/rest/accounts/v1/authTokenPromotion.js +109 -0
  187. package/lib/rest/accounts/v1/credential/aws.d.ts +296 -0
  188. package/lib/rest/accounts/v1/credential/aws.js +251 -0
  189. package/lib/rest/accounts/v1/credential/publicKey.d.ts +296 -0
  190. package/lib/rest/accounts/v1/credential/publicKey.js +236 -675
  191. package/lib/rest/accounts/v1/credential.d.ts +22 -0
  192. package/lib/rest/accounts/v1/credential.js +48 -63
  193. package/lib/rest/accounts/v1/secondaryAuthToken.d.ts +122 -0
  194. package/lib/rest/accounts/v1/secondaryAuthToken.js +128 -0
  195. package/lib/rest/api/V2010.d.ts +20 -0
  196. package/lib/rest/api/V2010.js +37 -260
  197. package/lib/rest/api/v2010/account/address/dependentPhoneNumber.d.ts +295 -0
  198. package/lib/rest/api/v2010/account/address/dependentPhoneNumber.js +164 -401
  199. package/lib/rest/api/v2010/account/address.d.ts +414 -0
  200. package/lib/rest/api/v2010/account/address.js +316 -793
  201. package/lib/rest/api/v2010/account/application.d.ts +463 -0
  202. package/lib/rest/api/v2010/account/application.js +333 -817
  203. package/lib/rest/api/v2010/account/authorizedConnectApp.d.ts +244 -0
  204. package/lib/rest/api/v2010/account/authorizedConnectApp.js +185 -519
  205. package/lib/rest/api/v2010/account/availablePhoneNumberCountry/local.d.ts +322 -0
  206. package/lib/rest/api/v2010/account/availablePhoneNumberCountry/local.js +185 -0
  207. package/lib/rest/api/v2010/account/availablePhoneNumberCountry/machineToMachine.d.ts +322 -0
  208. package/lib/rest/api/v2010/account/availablePhoneNumberCountry/machineToMachine.js +185 -0
  209. package/lib/rest/api/v2010/account/availablePhoneNumberCountry/mobile.d.ts +322 -0
  210. package/lib/rest/api/v2010/account/availablePhoneNumberCountry/mobile.js +185 -0
  211. package/lib/rest/api/v2010/account/availablePhoneNumberCountry/national.d.ts +322 -0
  212. package/lib/rest/api/v2010/account/availablePhoneNumberCountry/national.js +185 -0
  213. package/lib/rest/api/v2010/account/availablePhoneNumberCountry/sharedCost.d.ts +322 -0
  214. package/lib/rest/api/v2010/account/availablePhoneNumberCountry/sharedCost.js +185 -0
  215. package/lib/rest/api/v2010/account/availablePhoneNumberCountry/tollFree.d.ts +322 -0
  216. package/lib/rest/api/v2010/account/availablePhoneNumberCountry/tollFree.js +185 -0
  217. package/lib/rest/api/v2010/account/availablePhoneNumberCountry/voip.d.ts +322 -0
  218. package/lib/rest/api/v2010/account/availablePhoneNumberCountry/voip.js +185 -0
  219. package/lib/rest/api/v2010/account/availablePhoneNumberCountry.d.ts +269 -0
  220. package/lib/rest/api/v2010/account/availablePhoneNumberCountry.js +279 -0
  221. package/lib/rest/api/v2010/account/balance.d.ts +58 -0
  222. package/lib/rest/api/v2010/account/balance.js +70 -0
  223. package/lib/rest/api/v2010/account/call/event.d.ts +150 -0
  224. package/lib/rest/api/v2010/account/call/event.js +127 -0
  225. package/lib/rest/api/v2010/account/call/feedback.d.ts +160 -0
  226. package/lib/rest/api/v2010/account/call/feedback.js +149 -412
  227. package/lib/rest/api/v2010/account/call/feedbackSummary.d.ts +201 -0
  228. package/lib/rest/api/v2010/account/call/feedbackSummary.js +181 -397
  229. package/lib/rest/api/v2010/account/call/notification.d.ts +312 -0
  230. package/lib/rest/api/v2010/account/call/notification.js +210 -616
  231. package/lib/rest/api/v2010/account/call/payment.d.ts +182 -0
  232. package/lib/rest/api/v2010/account/call/payment.js +198 -0
  233. package/lib/rest/api/v2010/account/call/recording.d.ts +386 -0
  234. package/lib/rest/api/v2010/account/call/recording.js +289 -595
  235. package/lib/rest/api/v2010/account/call/siprec.d.ts +559 -0
  236. package/lib/rest/api/v2010/account/call/siprec.js +562 -0
  237. package/lib/rest/api/v2010/account/call/stream.d.ts +551 -0
  238. package/lib/rest/api/v2010/account/call/stream.js +560 -0
  239. package/lib/rest/api/v2010/account/call/userDefinedMessage.d.ts +75 -0
  240. package/lib/rest/api/v2010/account/call/userDefinedMessage.js +89 -0
  241. package/lib/rest/api/v2010/account/call/userDefinedMessageSubscription.d.ts +130 -0
  242. package/lib/rest/api/v2010/account/call/userDefinedMessageSubscription.js +150 -0
  243. package/lib/rest/api/v2010/account/call.d.ts +633 -0
  244. package/lib/rest/api/v2010/account/call.js +523 -991
  245. package/lib/rest/api/v2010/account/conference/participant.d.ts +472 -0
  246. package/lib/rest/api/v2010/account/conference/participant.js +390 -798
  247. package/lib/rest/api/v2010/account/conference/recording.d.ts +346 -0
  248. package/lib/rest/api/v2010/account/conference/recording.js +267 -0
  249. package/lib/rest/api/v2010/account/conference.d.ts +362 -0
  250. package/lib/rest/api/v2010/account/conference.js +256 -662
  251. package/lib/rest/api/v2010/account/connectApp.d.ts +324 -0
  252. package/lib/rest/api/v2010/account/connectApp.js +243 -616
  253. package/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn/assignedAddOnExtension.d.ts +241 -0
  254. package/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn/assignedAddOnExtension.js +197 -544
  255. package/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn.d.ts +292 -0
  256. package/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn.js +240 -678
  257. package/lib/rest/api/v2010/account/incomingPhoneNumber/local.d.ts +417 -0
  258. package/lib/rest/api/v2010/account/incomingPhoneNumber/local.js +247 -530
  259. package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.d.ts +417 -0
  260. package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.js +247 -530
  261. package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.d.ts +417 -0
  262. package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.js +247 -530
  263. package/lib/rest/api/v2010/account/incomingPhoneNumber.d.ts +593 -0
  264. package/lib/rest/api/v2010/account/incomingPhoneNumber.js +429 -960
  265. package/lib/rest/api/v2010/account/key.d.ts +266 -0
  266. package/lib/rest/api/v2010/account/key.js +215 -623
  267. package/lib/rest/api/v2010/account/message/feedback.d.ts +91 -0
  268. package/lib/rest/api/v2010/account/message/feedback.js +88 -196
  269. package/lib/rest/api/v2010/account/message/media.d.ts +262 -0
  270. package/lib/rest/api/v2010/account/message/media.js +207 -590
  271. package/lib/rest/api/v2010/account/message.d.ts +468 -0
  272. package/lib/rest/api/v2010/account/message.js +344 -838
  273. package/lib/rest/api/v2010/account/newKey.d.ts +86 -0
  274. package/lib/rest/api/v2010/account/newKey.js +83 -189
  275. package/lib/rest/api/v2010/account/newSigningKey.d.ts +86 -0
  276. package/lib/rest/api/v2010/account/newSigningKey.js +83 -190
  277. package/lib/rest/api/v2010/account/notification.d.ts +310 -0
  278. package/lib/rest/api/v2010/account/notification.js +204 -606
  279. package/lib/rest/api/v2010/account/outgoingCallerId.d.ts +296 -0
  280. package/lib/rest/api/v2010/account/outgoingCallerId.js +225 -648
  281. package/lib/rest/api/v2010/account/queue/member.d.ts +249 -0
  282. package/lib/rest/api/v2010/account/queue/member.js +207 -593
  283. package/lib/rest/api/v2010/account/queue.d.ts +324 -0
  284. package/lib/rest/api/v2010/account/queue.js +260 -725
  285. package/lib/rest/api/v2010/account/recording/addOnResult/payload.d.ts +270 -0
  286. package/lib/rest/api/v2010/account/recording/addOnResult/payload.js +220 -590
  287. package/lib/rest/api/v2010/account/recording/addOnResult.d.ts +268 -0
  288. package/lib/rest/api/v2010/account/recording/addOnResult.js +219 -613
  289. package/lib/rest/api/v2010/account/recording/transcription.d.ts +278 -0
  290. package/lib/rest/api/v2010/account/recording/transcription.js +213 -583
  291. package/lib/rest/api/v2010/account/recording.d.ts +387 -0
  292. package/lib/rest/api/v2010/account/recording.js +259 -663
  293. package/lib/rest/api/v2010/account/shortCode.d.ts +321 -0
  294. package/lib/rest/api/v2010/account/shortCode.js +227 -627
  295. package/lib/rest/api/v2010/account/signingKey.d.ts +254 -0
  296. package/lib/rest/api/v2010/account/signingKey.js +215 -624
  297. package/lib/rest/api/v2010/account/sip/credentialList/credential.d.ts +304 -0
  298. package/lib/rest/api/v2010/account/sip/credentialList/credential.js +249 -699
  299. package/lib/rest/api/v2010/account/sip/credentialList.d.ts +292 -0
  300. package/lib/rest/api/v2010/account/sip/credentialList.js +251 -718
  301. package/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls/authCallsCredentialListMapping.d.ts +248 -0
  302. package/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls/authCallsCredentialListMapping.js +232 -0
  303. package/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls/authCallsIpAccessControlListMapping.d.ts +248 -0
  304. package/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls/authCallsIpAccessControlListMapping.js +232 -0
  305. package/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls.d.ts +24 -0
  306. package/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls.js +60 -0
  307. package/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeRegistrations/authRegistrationsCredentialListMapping.d.ts +248 -0
  308. package/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeRegistrations/authRegistrationsCredentialListMapping.js +232 -0
  309. package/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeRegistrations.d.ts +21 -0
  310. package/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeRegistrations.js +50 -0
  311. package/lib/rest/api/v2010/account/sip/domain/authTypes.d.ts +24 -0
  312. package/lib/rest/api/v2010/account/sip/domain/authTypes.js +58 -0
  313. package/lib/rest/api/v2010/account/sip/domain/credentialListMapping.d.ts +260 -0
  314. package/lib/rest/api/v2010/account/sip/domain/credentialListMapping.js +220 -625
  315. package/lib/rest/api/v2010/account/sip/domain/ipAccessControlListMapping.d.ts +260 -0
  316. package/lib/rest/api/v2010/account/sip/domain/ipAccessControlListMapping.js +220 -628
  317. package/lib/rest/api/v2010/account/sip/domain.d.ts +459 -0
  318. package/lib/rest/api/v2010/account/sip/domain.js +351 -823
  319. package/lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.d.ts +322 -0
  320. package/lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.js +264 -704
  321. package/lib/rest/api/v2010/account/sip/ipAccessControlList.d.ts +292 -0
  322. package/lib/rest/api/v2010/account/sip/ipAccessControlList.js +251 -724
  323. package/lib/rest/api/v2010/account/sip.d.ts +26 -0
  324. package/lib/rest/api/v2010/account/sip.js +60 -101
  325. package/lib/rest/api/v2010/account/token.d.ts +104 -0
  326. package/lib/rest/api/v2010/account/token.js +90 -193
  327. package/lib/rest/api/v2010/account/transcription.d.ts +276 -0
  328. package/lib/rest/api/v2010/account/transcription.js +207 -571
  329. package/lib/rest/api/v2010/account/usage/record/allTime.d.ts +249 -0
  330. package/lib/rest/api/v2010/account/usage/record/allTime.js +147 -421
  331. package/lib/rest/api/v2010/account/usage/record/daily.d.ts +249 -0
  332. package/lib/rest/api/v2010/account/usage/record/daily.js +147 -421
  333. package/lib/rest/api/v2010/account/usage/record/lastMonth.d.ts +249 -0
  334. package/lib/rest/api/v2010/account/usage/record/lastMonth.js +147 -421
  335. package/lib/rest/api/v2010/account/usage/record/monthly.d.ts +249 -0
  336. package/lib/rest/api/v2010/account/usage/record/monthly.js +147 -421
  337. package/lib/rest/api/v2010/account/usage/record/thisMonth.d.ts +249 -0
  338. package/lib/rest/api/v2010/account/usage/record/thisMonth.js +147 -421
  339. package/lib/rest/api/v2010/account/usage/record/today.d.ts +249 -0
  340. package/lib/rest/api/v2010/account/usage/record/today.js +147 -421
  341. package/lib/rest/api/v2010/account/usage/record/yearly.d.ts +249 -0
  342. package/lib/rest/api/v2010/account/usage/record/yearly.js +147 -421
  343. package/lib/rest/api/v2010/account/usage/record/yesterday.d.ts +249 -0
  344. package/lib/rest/api/v2010/account/usage/record/yesterday.js +147 -421
  345. package/lib/rest/api/v2010/account/usage/record.d.ts +273 -0
  346. package/lib/rest/api/v2010/account/usage/record.js +221 -560
  347. package/lib/rest/api/v2010/account/usage/trigger.d.ts +383 -0
  348. package/lib/rest/api/v2010/account/usage/trigger.js +284 -753
  349. package/lib/rest/api/v2010/account/usage.d.ts +23 -0
  350. package/lib/rest/api/v2010/account/usage.js +51 -83
  351. package/lib/rest/api/v2010/account/validationRequest.d.ts +88 -0
  352. package/lib/rest/api/v2010/account/validationRequest.js +90 -200
  353. package/lib/rest/api/v2010/account.d.ts +509 -0
  354. package/lib/rest/api/v2010/account.js +540 -1392
  355. package/lib/rest/autopilot/V1.d.ts +20 -0
  356. package/lib/rest/autopilot/V1.js +43 -0
  357. package/lib/rest/autopilot/v1/assistant/defaults.d.ts +143 -0
  358. package/lib/rest/autopilot/v1/assistant/defaults.js +142 -0
  359. package/lib/rest/autopilot/v1/assistant/dialogue.d.ts +108 -0
  360. package/lib/rest/autopilot/v1/assistant/dialogue.js +120 -0
  361. package/lib/rest/autopilot/v1/assistant/fieldType/fieldValue.d.ts +288 -0
  362. package/lib/rest/autopilot/v1/assistant/fieldType/fieldValue.js +249 -0
  363. package/lib/rest/autopilot/v1/assistant/fieldType.d.ts +324 -0
  364. package/lib/rest/autopilot/v1/assistant/fieldType.js +277 -0
  365. package/lib/rest/autopilot/v1/assistant/modelBuild.d.ts +326 -0
  366. package/lib/rest/autopilot/v1/assistant/modelBuild.js +266 -0
  367. package/lib/rest/autopilot/v1/assistant/query.d.ts +374 -0
  368. package/lib/rest/autopilot/v1/assistant/query.js +288 -0
  369. package/lib/rest/autopilot/v1/assistant/styleSheet.d.ts +143 -0
  370. package/lib/rest/autopilot/v1/assistant/styleSheet.js +142 -0
  371. package/lib/rest/autopilot/v1/assistant/task/field.d.ts +274 -0
  372. package/lib/rest/autopilot/v1/assistant/task/field.js +243 -0
  373. package/lib/rest/autopilot/v1/assistant/task/sample.d.ts +334 -0
  374. package/lib/rest/autopilot/v1/assistant/task/sample.js +280 -0
  375. package/lib/rest/autopilot/v1/assistant/task/taskActions.d.ts +151 -0
  376. package/lib/rest/autopilot/v1/assistant/task/taskActions.js +150 -0
  377. package/lib/rest/autopilot/v1/assistant/task/taskStatistics.d.ts +115 -0
  378. package/lib/rest/autopilot/v1/assistant/task/taskStatistics.js +125 -0
  379. package/lib/rest/autopilot/v1/assistant/task.d.ts +362 -0
  380. package/lib/rest/autopilot/v1/assistant/task.js +326 -0
  381. package/lib/rest/autopilot/v1/assistant/webhook.d.ts +330 -0
  382. package/lib/rest/autopilot/v1/assistant/webhook.js +278 -0
  383. package/lib/rest/autopilot/v1/assistant.d.ts +438 -0
  384. package/lib/rest/autopilot/v1/assistant.js +392 -0
  385. package/lib/rest/autopilot/v1/restoreAssistant.d.ts +119 -0
  386. package/lib/rest/autopilot/v1/restoreAssistant.js +96 -0
  387. package/lib/rest/bulkexports/V1.d.ts +20 -0
  388. package/lib/rest/bulkexports/V1.js +43 -0
  389. package/lib/rest/bulkexports/v1/export/day.d.ts +216 -0
  390. package/lib/rest/bulkexports/v1/export/day.js +187 -0
  391. package/lib/rest/bulkexports/v1/export/exportCustomJob.d.ts +229 -0
  392. package/lib/rest/bulkexports/v1/export/exportCustomJob.js +178 -0
  393. package/lib/rest/bulkexports/v1/export/job.d.ts +162 -0
  394. package/lib/rest/bulkexports/v1/export/job.js +146 -0
  395. package/lib/rest/bulkexports/v1/export.d.ts +113 -0
  396. package/lib/rest/bulkexports/v1/export.js +144 -0
  397. package/lib/rest/bulkexports/v1/exportConfiguration.d.ts +152 -0
  398. package/lib/rest/bulkexports/v1/exportConfiguration.js +145 -0
  399. package/lib/rest/chat/V1.d.ts +20 -0
  400. package/lib/rest/chat/V1.js +37 -52
  401. package/lib/rest/chat/V2.d.ts +20 -0
  402. package/lib/rest/chat/V2.js +37 -52
  403. package/lib/rest/chat/V3.d.ts +15 -0
  404. package/lib/rest/chat/V3.js +36 -0
  405. package/lib/rest/chat/v1/credential.d.ts +324 -0
  406. package/lib/rest/chat/v1/credential.js +258 -697
  407. package/lib/rest/chat/v1/service/channel/invite.d.ts +286 -0
  408. package/lib/rest/chat/v1/service/channel/invite.js +229 -637
  409. package/lib/rest/chat/v1/service/channel/member.d.ts +336 -0
  410. package/lib/rest/chat/v1/service/channel/member.js +260 -717
  411. package/lib/rest/chat/v1/service/channel/message.d.ts +351 -0
  412. package/lib/rest/chat/v1/service/channel/message.js +266 -721
  413. package/lib/rest/chat/v1/service/channel.d.ts +388 -0
  414. package/lib/rest/chat/v1/service/channel.js +303 -812
  415. package/lib/rest/chat/v1/service/role.d.ts +298 -0
  416. package/lib/rest/chat/v1/service/role.js +249 -693
  417. package/lib/rest/chat/v1/service/user/userChannel.d.ts +184 -0
  418. package/lib/rest/chat/v1/service/user/userChannel.js +128 -392
  419. package/lib/rest/chat/v1/service/user.d.ts +360 -0
  420. package/lib/rest/chat/v1/service/user.js +277 -742
  421. package/lib/rest/chat/v1/service.d.ts +512 -0
  422. package/lib/rest/chat/v1/service.js +435 -1112
  423. package/lib/rest/chat/v2/credential.d.ts +324 -0
  424. package/lib/rest/chat/v2/credential.js +258 -697
  425. package/lib/rest/chat/v2/service/binding.d.ts +282 -0
  426. package/lib/rest/chat/v2/service/binding.js +222 -0
  427. package/lib/rest/chat/v2/service/channel/invite.d.ts +286 -0
  428. package/lib/rest/chat/v2/service/channel/invite.js +229 -637
  429. package/lib/rest/chat/v2/service/channel/member.d.ts +390 -0
  430. package/lib/rest/chat/v2/service/channel/member.js +290 -717
  431. package/lib/rest/chat/v2/service/channel/message.d.ts +423 -0
  432. package/lib/rest/chat/v2/service/channel/message.js +300 -721
  433. package/lib/rest/chat/v2/service/channel/webhook.d.ts +338 -0
  434. package/lib/rest/chat/v2/service/channel/webhook.js +288 -0
  435. package/lib/rest/chat/v2/service/channel.d.ts +438 -0
  436. package/lib/rest/chat/v2/service/channel.js +338 -812
  437. package/lib/rest/chat/v2/service/role.d.ts +298 -0
  438. package/lib/rest/chat/v2/service/role.js +249 -693
  439. package/lib/rest/chat/v2/service/user/userBinding.d.ts +278 -0
  440. package/lib/rest/chat/v2/service/user/userBinding.js +226 -0
  441. package/lib/rest/chat/v2/service/user/userChannel.d.ts +336 -0
  442. package/lib/rest/chat/v2/service/user/userChannel.js +249 -389
  443. package/lib/rest/chat/v2/service/user.d.ts +373 -0
  444. package/lib/rest/chat/v2/service/user.js +294 -742
  445. package/lib/rest/chat/v2/service.d.ts +486 -0
  446. package/lib/rest/chat/v2/service.js +381 -896
  447. package/lib/rest/chat/v3/channel.d.ts +189 -0
  448. package/lib/rest/chat/v3/channel.js +149 -0
  449. package/lib/rest/content/V1.d.ts +15 -0
  450. package/lib/rest/content/V1.js +36 -0
  451. package/lib/rest/content/v1/content/approvalFetch.d.ts +101 -0
  452. package/lib/rest/content/v1/content/approvalFetch.js +115 -0
  453. package/lib/rest/content/v1/content.d.ts +266 -0
  454. package/lib/rest/content/v1/content.js +221 -0
  455. package/lib/rest/conversations/V1.d.ts +50 -0
  456. package/lib/rest/conversations/V1.js +82 -0
  457. package/lib/rest/conversations/v1/addressConfiguration.d.ts +355 -0
  458. package/lib/rest/conversations/v1/addressConfiguration.js +298 -0
  459. package/lib/rest/conversations/v1/configuration/webhook.d.ts +163 -0
  460. package/lib/rest/conversations/v1/configuration/webhook.js +147 -0
  461. package/lib/rest/conversations/v1/configuration.d.ts +168 -0
  462. package/lib/rest/conversations/v1/configuration.js +155 -0
  463. package/lib/rest/conversations/v1/conversation/message/deliveryReceipt.d.ts +249 -0
  464. package/lib/rest/conversations/v1/conversation/message/deliveryReceipt.js +203 -0
  465. package/lib/rest/conversations/v1/conversation/message.d.ts +423 -0
  466. package/lib/rest/conversations/v1/conversation/message.js +321 -0
  467. package/lib/rest/conversations/v1/conversation/participant.d.ts +398 -0
  468. package/lib/rest/conversations/v1/conversation/participant.js +312 -0
  469. package/lib/rest/conversations/v1/conversation/webhook.d.ts +328 -0
  470. package/lib/rest/conversations/v1/conversation/webhook.js +278 -0
  471. package/lib/rest/conversations/v1/conversation.d.ts +429 -0
  472. package/lib/rest/conversations/v1/conversation.js +345 -0
  473. package/lib/rest/conversations/v1/credential.d.ts +326 -0
  474. package/lib/rest/conversations/v1/credential.js +276 -0
  475. package/lib/rest/conversations/v1/participantConversation.d.ts +242 -0
  476. package/lib/rest/conversations/v1/participantConversation.js +152 -0
  477. package/lib/rest/conversations/v1/role.d.ts +296 -0
  478. package/lib/rest/conversations/v1/role.js +260 -0
  479. package/lib/rest/conversations/v1/service/binding.d.ts +276 -0
  480. package/lib/rest/conversations/v1/service/binding.js +220 -0
  481. package/lib/rest/conversations/v1/service/configuration/notification.d.ts +185 -0
  482. package/lib/rest/conversations/v1/service/configuration/notification.js +176 -0
  483. package/lib/rest/conversations/v1/service/configuration/webhook.d.ts +165 -0
  484. package/lib/rest/conversations/v1/service/configuration/webhook.js +154 -0
  485. package/lib/rest/conversations/v1/service/configuration.d.ts +173 -0
  486. package/lib/rest/conversations/v1/service/configuration.js +174 -0
  487. package/lib/rest/conversations/v1/service/conversation/message/deliveryReceipt.d.ts +257 -0
  488. package/lib/rest/conversations/v1/service/conversation/message/deliveryReceipt.js +216 -0
  489. package/lib/rest/conversations/v1/service/conversation/message.d.ts +431 -0
  490. package/lib/rest/conversations/v1/service/conversation/message.js +329 -0
  491. package/lib/rest/conversations/v1/service/conversation/participant.d.ts +406 -0
  492. package/lib/rest/conversations/v1/service/conversation/participant.js +320 -0
  493. package/lib/rest/conversations/v1/service/conversation/webhook.d.ts +336 -0
  494. package/lib/rest/conversations/v1/service/conversation/webhook.js +286 -0
  495. package/lib/rest/conversations/v1/service/conversation.d.ts +431 -0
  496. package/lib/rest/conversations/v1/service/conversation.js +353 -0
  497. package/lib/rest/conversations/v1/service/participantConversation.d.ts +243 -0
  498. package/lib/rest/conversations/v1/service/participantConversation.js +156 -0
  499. package/lib/rest/conversations/v1/service/role.d.ts +298 -0
  500. package/lib/rest/conversations/v1/service/role.js +267 -0
  501. package/lib/rest/conversations/v1/service/user/userConversation.d.ts +349 -0
  502. package/lib/rest/conversations/v1/service/user/userConversation.js +271 -0
  503. package/lib/rest/conversations/v1/service/user.d.ts +381 -0
  504. package/lib/rest/conversations/v1/service/user.js +301 -0
  505. package/lib/rest/conversations/v1/service.d.ts +304 -0
  506. package/lib/rest/conversations/v1/service.js +299 -0
  507. package/lib/rest/conversations/v1/user/userConversation.d.ts +347 -0
  508. package/lib/rest/conversations/v1/user/userConversation.js +264 -0
  509. package/lib/rest/conversations/v1/user.d.ts +379 -0
  510. package/lib/rest/conversations/v1/user.js +294 -0
  511. package/lib/rest/events/V1.d.ts +30 -0
  512. package/lib/rest/events/V1.js +54 -0
  513. package/lib/rest/events/v1/eventType.d.ts +226 -0
  514. package/lib/rest/events/v1/eventType.js +185 -0
  515. package/lib/rest/events/v1/schema/schemaVersion.d.ts +210 -0
  516. package/lib/rest/events/v1/schema/schemaVersion.js +185 -0
  517. package/lib/rest/events/v1/schema.d.ts +114 -0
  518. package/lib/rest/events/v1/schema.js +126 -0
  519. package/lib/rest/events/v1/sink/sinkTest.d.ts +46 -0
  520. package/lib/rest/events/v1/sink/sinkTest.js +66 -0
  521. package/lib/rest/events/v1/sink/sinkValidate.d.ts +54 -0
  522. package/lib/rest/events/v1/sink/sinkValidate.js +78 -0
  523. package/lib/rest/events/v1/sink.d.ts +322 -0
  524. package/lib/rest/events/v1/sink.js +289 -0
  525. package/lib/rest/events/v1/subscription/subscribedEvent.d.ts +290 -0
  526. package/lib/rest/events/v1/subscription/subscribedEvent.js +254 -0
  527. package/lib/rest/events/v1/subscription.d.ts +324 -0
  528. package/lib/rest/events/v1/subscription.js +277 -0
  529. package/lib/rest/flexApi/V1.d.ts +70 -0
  530. package/lib/rest/flexApi/V1.js +113 -0
  531. package/lib/rest/flexApi/V2.d.ts +15 -0
  532. package/lib/rest/flexApi/V2.js +36 -0
  533. package/lib/rest/flexApi/v1/assessments.d.ts +81 -0
  534. package/lib/rest/flexApi/v1/assessments.js +100 -0
  535. package/lib/rest/flexApi/v1/channel.d.ts +280 -0
  536. package/lib/rest/flexApi/v1/channel.js +251 -0
  537. package/lib/rest/flexApi/v1/configuration.d.ts +368 -0
  538. package/lib/rest/flexApi/v1/configuration.js +195 -0
  539. package/lib/rest/flexApi/v1/flexFlow.d.ts +406 -0
  540. package/lib/rest/flexApi/v1/flexFlow.js +336 -0
  541. package/lib/rest/flexApi/v1/insightsQuestionnairesCategory.d.ts +168 -0
  542. package/lib/rest/flexApi/v1/insightsQuestionnairesCategory.js +167 -0
  543. package/lib/rest/flexApi/v1/insightsQuestionnairesQuestion.d.ts +208 -0
  544. package/lib/rest/flexApi/v1/insightsQuestionnairesQuestion.js +205 -0
  545. package/lib/rest/flexApi/v1/insightsSession.d.ts +130 -0
  546. package/lib/rest/flexApi/v1/insightsSession.js +115 -0
  547. package/lib/rest/flexApi/v1/insightsSettingsAnswerSets.d.ts +82 -0
  548. package/lib/rest/flexApi/v1/insightsSettingsAnswerSets.js +83 -0
  549. package/lib/rest/flexApi/v1/insightsSettingsComment.d.ts +67 -0
  550. package/lib/rest/flexApi/v1/insightsSettingsComment.js +79 -0
  551. package/lib/rest/flexApi/v1/insightsUserRoles.d.ts +109 -0
  552. package/lib/rest/flexApi/v1/insightsUserRoles.js +109 -0
  553. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.d.ts +181 -0
  554. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.js +154 -0
  555. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.d.ts +238 -0
  556. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.js +222 -0
  557. package/lib/rest/flexApi/v1/interaction/interactionChannel.d.ts +266 -0
  558. package/lib/rest/flexApi/v1/interaction/interactionChannel.js +244 -0
  559. package/lib/rest/flexApi/v1/interaction.d.ts +126 -0
  560. package/lib/rest/flexApi/v1/interaction.js +152 -0
  561. package/lib/rest/flexApi/v1/webChannel.d.ts +305 -0
  562. package/lib/rest/flexApi/v1/webChannel.js +268 -0
  563. package/lib/rest/flexApi/v2/webChannels.d.ts +65 -0
  564. package/lib/rest/flexApi/v2/webChannels.js +82 -0
  565. package/lib/rest/frontlineApi/V1.d.ts +15 -0
  566. package/lib/rest/frontlineApi/V1.js +36 -0
  567. package/lib/rest/frontlineApi/v1/user.d.ts +164 -0
  568. package/lib/rest/frontlineApi/v1/user.js +150 -0
  569. package/lib/rest/insights/V1.d.ts +35 -0
  570. package/lib/rest/insights/V1.js +61 -0
  571. package/lib/rest/insights/v1/call/annotation.d.ts +187 -0
  572. package/lib/rest/insights/v1/call/annotation.js +166 -0
  573. package/lib/rest/insights/v1/call/callSummary.d.ts +175 -0
  574. package/lib/rest/insights/v1/call/callSummary.js +159 -0
  575. package/lib/rest/insights/v1/call/event.d.ts +178 -0
  576. package/lib/rest/insights/v1/call/event.js +144 -0
  577. package/lib/rest/insights/v1/call/metric.d.ts +178 -0
  578. package/lib/rest/insights/v1/call/metric.js +142 -0
  579. package/lib/rest/insights/v1/call.d.ts +117 -0
  580. package/lib/rest/insights/v1/call.js +159 -0
  581. package/lib/rest/insights/v1/callSummaries.d.ts +316 -0
  582. package/lib/rest/insights/v1/callSummaries.js +196 -0
  583. package/lib/rest/insights/v1/conference/conferenceParticipant.d.ts +375 -0
  584. package/lib/rest/insights/v1/conference/conferenceParticipant.js +246 -0
  585. package/lib/rest/insights/v1/conference.d.ts +377 -0
  586. package/lib/rest/insights/v1/conference.js +248 -0
  587. package/lib/rest/insights/v1/room/participant.d.ts +280 -0
  588. package/lib/rest/insights/v1/room/participant.js +212 -0
  589. package/lib/rest/insights/v1/room.d.ts +363 -0
  590. package/lib/rest/insights/v1/room.js +244 -0
  591. package/lib/rest/insights/v1/setting.d.ts +158 -0
  592. package/lib/rest/insights/v1/setting.js +143 -0
  593. package/lib/rest/ipMessaging/V1.d.ts +20 -0
  594. package/lib/rest/ipMessaging/V1.js +37 -53
  595. package/lib/rest/ipMessaging/V2.d.ts +20 -0
  596. package/lib/rest/ipMessaging/V2.js +37 -53
  597. package/lib/rest/ipMessaging/v1/credential.d.ts +303 -0
  598. package/lib/rest/ipMessaging/v1/credential.js +258 -697
  599. package/lib/rest/ipMessaging/v1/service/channel/invite.d.ts +256 -0
  600. package/lib/rest/ipMessaging/v1/service/channel/invite.js +229 -637
  601. package/lib/rest/ipMessaging/v1/service/channel/member.d.ts +303 -0
  602. package/lib/rest/ipMessaging/v1/service/channel/member.js +260 -717
  603. package/lib/rest/ipMessaging/v1/service/channel/message.d.ts +312 -0
  604. package/lib/rest/ipMessaging/v1/service/channel/message.js +266 -721
  605. package/lib/rest/ipMessaging/v1/service/channel.d.ts +349 -0
  606. package/lib/rest/ipMessaging/v1/service/channel.js +303 -812
  607. package/lib/rest/ipMessaging/v1/service/role.d.ts +274 -0
  608. package/lib/rest/ipMessaging/v1/service/role.js +249 -693
  609. package/lib/rest/ipMessaging/v1/service/user/userChannel.d.ts +163 -0
  610. package/lib/rest/ipMessaging/v1/service/user/userChannel.js +128 -392
  611. package/lib/rest/ipMessaging/v1/service/user.d.ts +318 -0
  612. package/lib/rest/ipMessaging/v1/service/user.js +277 -742
  613. package/lib/rest/ipMessaging/v1/service.d.ts +449 -0
  614. package/lib/rest/ipMessaging/v1/service.js +435 -1112
  615. package/lib/rest/ipMessaging/v2/credential.d.ts +303 -0
  616. package/lib/rest/ipMessaging/v2/credential.js +258 -697
  617. package/lib/rest/ipMessaging/v2/service/binding.d.ts +249 -0
  618. package/lib/rest/ipMessaging/v2/service/binding.js +222 -0
  619. package/lib/rest/ipMessaging/v2/service/channel/invite.d.ts +256 -0
  620. package/lib/rest/ipMessaging/v2/service/channel/invite.js +229 -637
  621. package/lib/rest/ipMessaging/v2/service/channel/member.d.ts +354 -0
  622. package/lib/rest/ipMessaging/v2/service/channel/member.js +290 -717
  623. package/lib/rest/ipMessaging/v2/service/channel/message.d.ts +375 -0
  624. package/lib/rest/ipMessaging/v2/service/channel/message.js +300 -721
  625. package/lib/rest/ipMessaging/v2/service/channel/webhook.d.ts +311 -0
  626. package/lib/rest/ipMessaging/v2/service/channel/webhook.js +288 -0
  627. package/lib/rest/ipMessaging/v2/service/channel.d.ts +399 -0
  628. package/lib/rest/ipMessaging/v2/service/channel.js +338 -812
  629. package/lib/rest/ipMessaging/v2/service/role.d.ts +274 -0
  630. package/lib/rest/ipMessaging/v2/service/role.js +249 -693
  631. package/lib/rest/ipMessaging/v2/service/user/userBinding.d.ts +245 -0
  632. package/lib/rest/ipMessaging/v2/service/user/userBinding.js +226 -0
  633. package/lib/rest/ipMessaging/v2/service/user/userChannel.d.ts +283 -0
  634. package/lib/rest/ipMessaging/v2/service/user/userChannel.js +243 -389
  635. package/lib/rest/ipMessaging/v2/service/user.d.ts +331 -0
  636. package/lib/rest/ipMessaging/v2/service/user.js +294 -742
  637. package/lib/rest/ipMessaging/v2/service.d.ts +417 -0
  638. package/lib/rest/ipMessaging/v2/service.js +381 -896
  639. package/lib/rest/lookups/V1.d.ts +15 -0
  640. package/lib/rest/lookups/V1.js +31 -42
  641. package/lib/rest/lookups/V2.d.ts +15 -0
  642. package/lib/rest/lookups/V2.js +36 -0
  643. package/lib/rest/lookups/v1/phoneNumber.d.ts +149 -0
  644. package/lib/rest/lookups/v1/phoneNumber.js +128 -272
  645. package/lib/rest/lookups/v2/phoneNumber.d.ts +202 -0
  646. package/lib/rest/lookups/v2/phoneNumber.js +158 -0
  647. package/lib/rest/media/V1.d.ts +25 -0
  648. package/lib/rest/media/V1.js +51 -0
  649. package/lib/rest/media/v1/mediaProcessor.d.ts +318 -0
  650. package/lib/rest/media/v1/mediaProcessor.js +256 -0
  651. package/lib/rest/media/v1/mediaRecording.d.ts +310 -0
  652. package/lib/rest/media/v1/mediaRecording.js +226 -0
  653. package/lib/rest/media/v1/playerStreamer/playbackGrant.d.ts +151 -0
  654. package/lib/rest/media/v1/playerStreamer/playbackGrant.js +146 -0
  655. package/lib/rest/media/v1/playerStreamer.d.ts +328 -0
  656. package/lib/rest/media/v1/playerStreamer.js +264 -0
  657. package/lib/rest/messaging/V1.d.ts +50 -0
  658. package/lib/rest/messaging/V1.js +77 -41
  659. package/lib/rest/messaging/v1/brandRegistration/brandVetting.d.ts +265 -0
  660. package/lib/rest/messaging/v1/brandRegistration/brandVetting.js +224 -0
  661. package/lib/rest/messaging/v1/brandRegistration.d.ts +344 -0
  662. package/lib/rest/messaging/v1/brandRegistration.js +275 -0
  663. package/lib/rest/messaging/v1/deactivations.d.ts +106 -0
  664. package/lib/rest/messaging/v1/deactivations.js +107 -0
  665. package/lib/rest/messaging/v1/domainCerts.d.ts +164 -0
  666. package/lib/rest/messaging/v1/domainCerts.js +164 -0
  667. package/lib/rest/messaging/v1/domainConfig.d.ts +153 -0
  668. package/lib/rest/messaging/v1/domainConfig.js +152 -0
  669. package/lib/rest/messaging/v1/externalCampaign.d.ts +79 -0
  670. package/lib/rest/messaging/v1/externalCampaign.js +87 -0
  671. package/lib/rest/messaging/v1/service/alphaSender.d.ts +264 -0
  672. package/lib/rest/messaging/v1/service/alphaSender.js +215 -615
  673. package/lib/rest/messaging/v1/service/phoneNumber.d.ts +270 -0
  674. package/lib/rest/messaging/v1/service/phoneNumber.js +218 -617
  675. package/lib/rest/messaging/v1/service/shortCode.d.ts +270 -0
  676. package/lib/rest/messaging/v1/service/shortCode.js +218 -617
  677. package/lib/rest/messaging/v1/service/usAppToPerson.d.ts +384 -0
  678. package/lib/rest/messaging/v1/service/usAppToPerson.js +304 -0
  679. package/lib/rest/messaging/v1/service/usAppToPersonUsecase.d.ts +62 -0
  680. package/lib/rest/messaging/v1/service/usAppToPersonUsecase.js +79 -0
  681. package/lib/rest/messaging/v1/service.d.ts +494 -0
  682. package/lib/rest/messaging/v1/service.js +388 -862
  683. package/lib/rest/messaging/v1/tollfreeVerification.d.ts +521 -0
  684. package/lib/rest/messaging/v1/tollfreeVerification.js +396 -0
  685. package/lib/rest/messaging/v1/usecase.d.ts +45 -0
  686. package/lib/rest/messaging/v1/usecase.js +62 -0
  687. package/lib/rest/microvisor/V1.d.ts +20 -0
  688. package/lib/rest/microvisor/V1.js +42 -0
  689. package/lib/rest/microvisor/v1/app.d.ts +240 -0
  690. package/lib/rest/microvisor/v1/app.js +201 -0
  691. package/lib/rest/microvisor/v1/device.d.ts +281 -0
  692. package/lib/rest/microvisor/v1/device.js +217 -0
  693. package/lib/rest/monitor/V1.d.ts +20 -0
  694. package/lib/rest/monitor/V1.js +37 -52
  695. package/lib/rest/monitor/v1/alert.d.ts +314 -0
  696. package/lib/rest/monitor/v1/alert.js +199 -586
  697. package/lib/rest/monitor/v1/event.d.ts +301 -0
  698. package/lib/rest/monitor/v1/event.js +195 -543
  699. package/lib/rest/notify/V1.d.ts +20 -0
  700. package/lib/rest/notify/V1.js +37 -52
  701. package/lib/rest/notify/v1/credential.d.ts +324 -0
  702. package/lib/rest/notify/v1/credential.js +258 -701
  703. package/lib/rest/notify/v1/service/binding.d.ts +337 -0
  704. package/lib/rest/notify/v1/service/binding.js +250 -669
  705. package/lib/rest/notify/v1/service/notification.d.ts +208 -0
  706. package/lib/rest/notify/v1/service/notification.js +147 -255
  707. package/lib/rest/notify/v1/service.d.ts +458 -0
  708. package/lib/rest/notify/v1/service.js +349 -899
  709. package/lib/rest/numbers/V2.d.ts +15 -0
  710. package/lib/rest/numbers/V2.js +37 -0
  711. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.d.ts +219 -0
  712. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.js +163 -0
  713. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/evaluation.d.ts +231 -0
  714. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/evaluation.js +200 -0
  715. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/itemAssignment.d.ts +252 -0
  716. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/itemAssignment.js +227 -0
  717. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.d.ts +106 -0
  718. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.js +97 -0
  719. package/lib/rest/numbers/v2/regulatoryCompliance/bundle.d.ts +445 -0
  720. package/lib/rest/numbers/v2/regulatoryCompliance/bundle.js +354 -0
  721. package/lib/rest/numbers/v2/regulatoryCompliance/endUser.d.ts +308 -0
  722. package/lib/rest/numbers/v2/regulatoryCompliance/endUser.js +261 -0
  723. package/lib/rest/numbers/v2/regulatoryCompliance/endUserType.d.ts +211 -0
  724. package/lib/rest/numbers/v2/regulatoryCompliance/endUserType.js +179 -0
  725. package/lib/rest/numbers/v2/regulatoryCompliance/regulation.d.ts +239 -0
  726. package/lib/rest/numbers/v2/regulatoryCompliance/regulation.js +189 -0
  727. package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.d.ts +326 -0
  728. package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.js +267 -0
  729. package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocumentType.d.ts +211 -0
  730. package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocumentType.js +179 -0
  731. package/lib/rest/numbers/v2/regulatoryCompliance.d.ts +34 -0
  732. package/lib/rest/numbers/v2/regulatoryCompliance.js +87 -0
  733. package/lib/rest/oauth/V1.d.ts +35 -0
  734. package/lib/rest/oauth/V1.js +61 -0
  735. package/lib/rest/oauth/v1/deviceCode.d.ts +87 -0
  736. package/lib/rest/oauth/v1/deviceCode.js +90 -0
  737. package/lib/rest/oauth/v1/oauth.d.ts +84 -0
  738. package/lib/rest/oauth/v1/oauth.js +102 -0
  739. package/lib/rest/oauth/v1/openidDiscovery.d.ts +150 -0
  740. package/lib/rest/oauth/v1/openidDiscovery.js +126 -0
  741. package/lib/rest/oauth/v1/token.d.ts +88 -0
  742. package/lib/rest/oauth/v1/token.js +98 -0
  743. package/lib/rest/oauth/v1/userInfo.d.ts +108 -0
  744. package/lib/rest/oauth/v1/userInfo.js +110 -0
  745. package/lib/rest/preview/DeployedDevices.d.ts +15 -0
  746. package/lib/rest/preview/DeployedDevices.js +36 -0
  747. package/lib/rest/preview/HostedNumbers.d.ts +20 -0
  748. package/lib/rest/preview/HostedNumbers.js +39 -43
  749. package/lib/rest/preview/Marketplace.d.ts +20 -0
  750. package/lib/rest/preview/Marketplace.js +39 -56
  751. package/lib/rest/preview/Sync.d.ts +15 -0
  752. package/lib/rest/preview/Sync.js +31 -41
  753. package/lib/rest/preview/Understand.d.ts +15 -0
  754. package/lib/rest/preview/Understand.js +36 -0
  755. package/lib/rest/preview/Wireless.d.ts +25 -0
  756. package/lib/rest/preview/Wireless.js +43 -63
  757. package/lib/rest/preview/deployed_devices/fleet/certificate.d.ts +324 -0
  758. package/lib/rest/preview/deployed_devices/fleet/certificate.js +269 -0
  759. package/lib/rest/preview/deployed_devices/fleet/deployment.d.ts +318 -0
  760. package/lib/rest/preview/deployed_devices/fleet/deployment.js +264 -0
  761. package/lib/rest/preview/deployed_devices/fleet/device.d.ts +358 -0
  762. package/lib/rest/preview/deployed_devices/fleet/device.js +284 -0
  763. package/lib/rest/preview/deployed_devices/fleet/key.d.ts +330 -0
  764. package/lib/rest/preview/deployed_devices/fleet/key.js +268 -0
  765. package/lib/rest/preview/deployed_devices/fleet.d.ts +352 -0
  766. package/lib/rest/preview/deployed_devices/fleet.js +307 -0
  767. package/lib/rest/preview/hosted_numbers/authorizationDocument/dependentHostedNumberOrder.d.ts +293 -0
  768. package/lib/rest/preview/hosted_numbers/authorizationDocument/dependentHostedNumberOrder.js +174 -0
  769. package/lib/rest/preview/hosted_numbers/authorizationDocument.d.ts +327 -0
  770. package/lib/rest/preview/hosted_numbers/authorizationDocument.js +285 -0
  771. package/lib/rest/preview/hosted_numbers/hostedNumberOrder.d.ts +468 -0
  772. package/lib/rest/preview/hosted_numbers/hostedNumberOrder.js +325 -797
  773. package/lib/rest/preview/marketplace/availableAddOn/availableAddOnExtension.d.ts +219 -0
  774. package/lib/rest/preview/marketplace/availableAddOn/availableAddOnExtension.js +174 -513
  775. package/lib/rest/preview/marketplace/availableAddOn.d.ts +231 -0
  776. package/lib/rest/preview/marketplace/availableAddOn.js +183 -535
  777. package/lib/rest/preview/marketplace/installedAddOn/installedAddOnExtension.d.ts +251 -0
  778. package/lib/rest/preview/marketplace/installedAddOn/installedAddOnExtension.js +201 -594
  779. package/lib/rest/preview/marketplace/installedAddOn.d.ts +332 -0
  780. package/lib/rest/preview/marketplace/installedAddOn.js +264 -738
  781. package/lib/rest/preview/sync/service/document/documentPermission.d.ts +280 -0
  782. package/lib/rest/preview/sync/service/document/documentPermission.js +239 -666
  783. package/lib/rest/preview/sync/service/document.d.ts +295 -0
  784. package/lib/rest/preview/sync/service/document.js +266 -735
  785. package/lib/rest/preview/sync/service/syncList/syncListItem.d.ts +321 -0
  786. package/lib/rest/preview/sync/service/syncList/syncListItem.js +264 -727
  787. package/lib/rest/preview/sync/service/syncList/syncListPermission.d.ts +280 -0
  788. package/lib/rest/preview/sync/service/syncList/syncListPermission.js +239 -666
  789. package/lib/rest/preview/sync/service/syncList.d.ts +270 -0
  790. package/lib/rest/preview/sync/service/syncList.js +247 -689
  791. package/lib/rest/preview/sync/service/syncMap/syncMapItem.d.ts +323 -0
  792. package/lib/rest/preview/sync/service/syncMap/syncMapItem.js +267 -729
  793. package/lib/rest/preview/sync/service/syncMap/syncMapPermission.d.ts +280 -0
  794. package/lib/rest/preview/sync/service/syncMap/syncMapPermission.js +239 -666
  795. package/lib/rest/preview/sync/service/syncMap.d.ts +270 -0
  796. package/lib/rest/preview/sync/service/syncMap.js +247 -687
  797. package/lib/rest/preview/sync/service.d.ts +330 -0
  798. package/lib/rest/preview/sync/service.js +289 -792
  799. package/lib/rest/preview/understand/assistant/assistantFallbackActions.d.ts +131 -0
  800. package/lib/rest/preview/understand/assistant/assistantFallbackActions.js +142 -0
  801. package/lib/rest/preview/understand/assistant/assistantInitiationActions.d.ts +131 -0
  802. package/lib/rest/preview/understand/assistant/assistantInitiationActions.js +142 -0
  803. package/lib/rest/preview/understand/assistant/dialogue.d.ts +105 -0
  804. package/lib/rest/preview/understand/assistant/dialogue.js +120 -0
  805. package/lib/rest/preview/understand/assistant/fieldType/fieldValue.d.ts +285 -0
  806. package/lib/rest/preview/understand/assistant/fieldType/fieldValue.js +249 -0
  807. package/lib/rest/preview/understand/assistant/fieldType.d.ts +318 -0
  808. package/lib/rest/preview/understand/assistant/fieldType.js +277 -0
  809. package/lib/rest/preview/understand/assistant/modelBuild.d.ts +320 -0
  810. package/lib/rest/preview/understand/assistant/modelBuild.js +266 -0
  811. package/lib/rest/preview/understand/assistant/query.d.ts +361 -0
  812. package/lib/rest/preview/understand/assistant/query.js +286 -0
  813. package/lib/rest/preview/understand/assistant/styleSheet.d.ts +140 -0
  814. package/lib/rest/preview/understand/assistant/styleSheet.js +142 -0
  815. package/lib/rest/preview/understand/assistant/task/field.d.ts +271 -0
  816. package/lib/rest/preview/understand/assistant/task/field.js +243 -0
  817. package/lib/rest/preview/understand/assistant/task/sample.d.ts +331 -0
  818. package/lib/rest/preview/understand/assistant/task/sample.js +280 -0
  819. package/lib/rest/preview/understand/assistant/task/taskActions.d.ts +145 -0
  820. package/lib/rest/preview/understand/assistant/task/taskActions.js +150 -0
  821. package/lib/rest/preview/understand/assistant/task/taskStatistics.d.ts +112 -0
  822. package/lib/rest/preview/understand/assistant/task/taskStatistics.js +125 -0
  823. package/lib/rest/preview/understand/assistant/task.d.ts +356 -0
  824. package/lib/rest/preview/understand/assistant/task.js +326 -0
  825. package/lib/rest/preview/understand/assistant.d.ts +422 -0
  826. package/lib/rest/preview/understand/assistant.js +392 -0
  827. package/lib/rest/preview/wireless/command.d.ts +266 -0
  828. package/lib/rest/preview/wireless/command.js +217 -593
  829. package/lib/rest/preview/wireless/ratePlan.d.ts +326 -0
  830. package/lib/rest/preview/wireless/ratePlan.js +271 -707
  831. package/lib/rest/preview/wireless/sim/usage.d.ts +131 -0
  832. package/lib/rest/preview/wireless/sim/usage.js +128 -274
  833. package/lib/rest/preview/wireless/sim.d.ts +361 -0
  834. package/lib/rest/preview/wireless/sim.js +276 -705
  835. package/lib/rest/pricing/V1.d.ts +25 -0
  836. package/lib/rest/pricing/V1.js +43 -64
  837. package/lib/rest/pricing/V2.d.ts +25 -0
  838. package/lib/rest/pricing/V2.js +48 -0
  839. package/lib/rest/pricing/v1/messaging/country.d.ts +233 -0
  840. package/lib/rest/pricing/v1/messaging/country.js +177 -490
  841. package/lib/rest/pricing/v1/messaging.d.ts +19 -0
  842. package/lib/rest/pricing/v1/messaging.js +38 -138
  843. package/lib/rest/pricing/v1/phoneNumber/country.d.ts +216 -0
  844. package/lib/rest/pricing/v1/phoneNumber/country.js +169 -488
  845. package/lib/rest/pricing/v1/phoneNumber.d.ts +19 -0
  846. package/lib/rest/pricing/v1/phoneNumber.js +38 -138
  847. package/lib/rest/pricing/v1/voice/country.d.ts +228 -0
  848. package/lib/rest/pricing/v1/voice/country.js +174 -490
  849. package/lib/rest/pricing/v1/voice/number.d.ts +127 -0
  850. package/lib/rest/pricing/v1/voice/number.js +121 -242
  851. package/lib/rest/pricing/v1/voice.d.ts +22 -0
  852. package/lib/rest/pricing/v1/voice.js +47 -153
  853. package/lib/rest/pricing/v2/country.d.ts +229 -0
  854. package/lib/rest/pricing/v2/country.js +187 -0
  855. package/lib/rest/pricing/v2/number.d.ts +158 -0
  856. package/lib/rest/pricing/v2/number.js +137 -0
  857. package/lib/rest/pricing/v2/voice/country.d.ts +229 -0
  858. package/lib/rest/pricing/v2/voice/country.js +187 -0
  859. package/lib/rest/pricing/v2/voice/number.d.ts +159 -0
  860. package/lib/rest/pricing/v2/voice/number.js +137 -0
  861. package/lib/rest/pricing/v2/voice.d.ts +22 -0
  862. package/lib/rest/pricing/v2/voice.js +51 -0
  863. package/lib/rest/proxy/V1.d.ts +15 -0
  864. package/lib/rest/proxy/V1.js +36 -0
  865. package/lib/rest/proxy/v1/service/phoneNumber.d.ts +340 -0
  866. package/lib/rest/proxy/v1/service/phoneNumber.js +272 -0
  867. package/lib/rest/proxy/v1/service/session/interaction.d.ts +309 -0
  868. package/lib/rest/proxy/v1/service/session/interaction.js +238 -0
  869. package/lib/rest/proxy/v1/service/session/participant/messageInteraction.d.ts +326 -0
  870. package/lib/rest/proxy/v1/service/session/participant/messageInteraction.js +257 -0
  871. package/lib/rest/proxy/v1/service/session/participant.d.ts +310 -0
  872. package/lib/rest/proxy/v1/service/session/participant.js +266 -0
  873. package/lib/rest/proxy/v1/service/session.d.ts +388 -0
  874. package/lib/rest/proxy/v1/service/session.js +316 -0
  875. package/lib/rest/proxy/v1/service/shortCode.d.ts +316 -0
  876. package/lib/rest/proxy/v1/service/shortCode.js +262 -0
  877. package/lib/rest/proxy/v1/service.d.ts +388 -0
  878. package/lib/rest/proxy/v1/service.js +330 -0
  879. package/lib/rest/routes/V2.d.ts +25 -0
  880. package/lib/rest/routes/V2.js +48 -0
  881. package/lib/rest/routes/v2/phoneNumber.d.ts +168 -0
  882. package/lib/rest/routes/v2/phoneNumber.js +149 -0
  883. package/lib/rest/routes/v2/sipDomain.d.ts +144 -0
  884. package/lib/rest/routes/v2/sipDomain.js +149 -0
  885. package/lib/rest/routes/v2/trunk.d.ts +168 -0
  886. package/lib/rest/routes/v2/trunk.js +149 -0
  887. package/lib/rest/serverless/V1.d.ts +15 -0
  888. package/lib/rest/serverless/V1.js +36 -0
  889. package/lib/rest/serverless/v1/service/asset/assetVersion.d.ts +231 -0
  890. package/lib/rest/serverless/v1/service/asset/assetVersion.js +197 -0
  891. package/lib/rest/serverless/v1/service/asset.d.ts +298 -0
  892. package/lib/rest/serverless/v1/service/asset.js +271 -0
  893. package/lib/rest/serverless/v1/service/build/buildStatus.d.ts +107 -0
  894. package/lib/rest/serverless/v1/service/build/buildStatus.js +123 -0
  895. package/lib/rest/serverless/v1/service/build.d.ts +303 -0
  896. package/lib/rest/serverless/v1/service/build.js +260 -0
  897. package/lib/rest/serverless/v1/service/environment/deployment.d.ts +257 -0
  898. package/lib/rest/serverless/v1/service/environment/deployment.js +220 -0
  899. package/lib/rest/serverless/v1/service/environment/log.d.ts +273 -0
  900. package/lib/rest/serverless/v1/service/environment/log.js +211 -0
  901. package/lib/rest/serverless/v1/service/environment/variable.d.ts +318 -0
  902. package/lib/rest/serverless/v1/service/environment/variable.js +272 -0
  903. package/lib/rest/serverless/v1/service/environment.d.ts +308 -0
  904. package/lib/rest/serverless/v1/service/environment.js +278 -0
  905. package/lib/rest/serverless/v1/service/function/functionVersion/functionVersionContent.d.ts +114 -0
  906. package/lib/rest/serverless/v1/service/function/functionVersion/functionVersionContent.js +131 -0
  907. package/lib/rest/serverless/v1/service/function/functionVersion.d.ts +242 -0
  908. package/lib/rest/serverless/v1/service/function/functionVersion.js +212 -0
  909. package/lib/rest/serverless/v1/service/function.d.ts +298 -0
  910. package/lib/rest/serverless/v1/service/function.js +271 -0
  911. package/lib/rest/serverless/v1/service.d.ts +364 -0
  912. package/lib/rest/serverless/v1/service.js +321 -0
  913. package/lib/rest/studio/V1.d.ts +15 -0
  914. package/lib/rest/studio/V1.js +36 -0
  915. package/lib/rest/studio/V2.d.ts +20 -0
  916. package/lib/rest/studio/V2.js +42 -0
  917. package/lib/rest/studio/v1/flow/engagement/engagementContext.d.ts +109 -0
  918. package/lib/rest/studio/v1/flow/engagement/engagementContext.js +123 -0
  919. package/lib/rest/studio/v1/flow/engagement/step/stepContext.d.ts +117 -0
  920. package/lib/rest/studio/v1/flow/engagement/step/stepContext.js +131 -0
  921. package/lib/rest/studio/v1/flow/engagement/step.d.ts +265 -0
  922. package/lib/rest/studio/v1/flow/engagement/step.js +218 -0
  923. package/lib/rest/studio/v1/flow/engagement.d.ts +300 -0
  924. package/lib/rest/studio/v1/flow/engagement.js +269 -0
  925. package/lib/rest/studio/v1/flow/execution/executionContext.d.ts +109 -0
  926. package/lib/rest/studio/v1/flow/execution/executionContext.js +123 -0
  927. package/lib/rest/studio/v1/flow/execution/executionStep/executionStepContext.d.ts +117 -0
  928. package/lib/rest/studio/v1/flow/execution/executionStep/executionStepContext.js +131 -0
  929. package/lib/rest/studio/v1/flow/execution/executionStep.d.ts +265 -0
  930. package/lib/rest/studio/v1/flow/execution/executionStep.js +218 -0
  931. package/lib/rest/studio/v1/flow/execution.d.ts +338 -0
  932. package/lib/rest/studio/v1/flow/execution.js +298 -0
  933. package/lib/rest/studio/v1/flow.d.ts +266 -0
  934. package/lib/rest/studio/v1/flow.js +231 -0
  935. package/lib/rest/studio/v2/flow/execution/executionContext.d.ts +109 -0
  936. package/lib/rest/studio/v2/flow/execution/executionContext.js +123 -0
  937. package/lib/rest/studio/v2/flow/execution/executionStep/executionStepContext.d.ts +117 -0
  938. package/lib/rest/studio/v2/flow/execution/executionStep/executionStepContext.js +131 -0
  939. package/lib/rest/studio/v2/flow/execution/executionStep.d.ts +265 -0
  940. package/lib/rest/studio/v2/flow/execution/executionStep.js +218 -0
  941. package/lib/rest/studio/v2/flow/execution.d.ts +332 -0
  942. package/lib/rest/studio/v2/flow/execution.js +296 -0
  943. package/lib/rest/studio/v2/flow/flowRevision.d.ts +253 -0
  944. package/lib/rest/studio/v2/flow/flowRevision.js +199 -0
  945. package/lib/rest/studio/v2/flow/flowTestUser.d.ts +121 -0
  946. package/lib/rest/studio/v2/flow/flowTestUser.js +138 -0
  947. package/lib/rest/studio/v2/flow.d.ts +361 -0
  948. package/lib/rest/studio/v2/flow.js +319 -0
  949. package/lib/rest/studio/v2/flowValidate.d.ts +60 -0
  950. package/lib/rest/studio/v2/flowValidate.js +85 -0
  951. package/lib/rest/supersim/V1.d.ts +55 -0
  952. package/lib/rest/supersim/V1.js +86 -0
  953. package/lib/rest/supersim/v1/esimProfile.d.ts +297 -0
  954. package/lib/rest/supersim/v1/esimProfile.js +226 -0
  955. package/lib/rest/supersim/v1/fleet.d.ts +363 -0
  956. package/lib/rest/supersim/v1/fleet.js +277 -0
  957. package/lib/rest/supersim/v1/ipCommand.d.ts +303 -0
  958. package/lib/rest/supersim/v1/ipCommand.js +238 -0
  959. package/lib/rest/supersim/v1/network.d.ts +229 -0
  960. package/lib/rest/supersim/v1/network.js +185 -0
  961. package/lib/rest/supersim/v1/networkAccessProfile/networkAccessProfileNetwork.d.ts +252 -0
  962. package/lib/rest/supersim/v1/networkAccessProfile/networkAccessProfileNetwork.js +227 -0
  963. package/lib/rest/supersim/v1/networkAccessProfile.d.ts +296 -0
  964. package/lib/rest/supersim/v1/networkAccessProfile.js +248 -0
  965. package/lib/rest/supersim/v1/settingsUpdate.d.ts +194 -0
  966. package/lib/rest/supersim/v1/settingsUpdate.js +136 -0
  967. package/lib/rest/supersim/v1/sim/billingPeriod.d.ts +183 -0
  968. package/lib/rest/supersim/v1/sim/billingPeriod.js +136 -0
  969. package/lib/rest/supersim/v1/sim/simIpAddress.d.ts +147 -0
  970. package/lib/rest/supersim/v1/sim/simIpAddress.js +124 -0
  971. package/lib/rest/supersim/v1/sim.d.ts +341 -0
  972. package/lib/rest/supersim/v1/sim.js +283 -0
  973. package/lib/rest/supersim/v1/smsCommand.d.ts +271 -0
  974. package/lib/rest/supersim/v1/smsCommand.js +222 -0
  975. package/lib/rest/supersim/v1/usageRecord.d.ts +252 -0
  976. package/lib/rest/supersim/v1/usageRecord.js +154 -0
  977. package/lib/rest/sync/V1.d.ts +15 -0
  978. package/lib/rest/sync/V1.js +31 -41
  979. package/lib/rest/sync/v1/service/document/documentPermission.d.ts +280 -0
  980. package/lib/rest/sync/v1/service/document/documentPermission.js +239 -666
  981. package/lib/rest/sync/v1/service/document.d.ts +354 -0
  982. package/lib/rest/sync/v1/service/document.js +274 -735
  983. package/lib/rest/sync/v1/service/syncList/syncListItem.d.ts +385 -0
  984. package/lib/rest/sync/v1/service/syncList/syncListItem.js +280 -727
  985. package/lib/rest/sync/v1/service/syncList/syncListPermission.d.ts +280 -0
  986. package/lib/rest/sync/v1/service/syncList/syncListPermission.js +239 -666
  987. package/lib/rest/sync/v1/service/syncList.d.ts +354 -0
  988. package/lib/rest/sync/v1/service/syncList.js +281 -688
  989. package/lib/rest/sync/v1/service/syncMap/syncMapItem.d.ts +387 -0
  990. package/lib/rest/sync/v1/service/syncMap/syncMapItem.js +283 -729
  991. package/lib/rest/sync/v1/service/syncMap/syncMapPermission.d.ts +280 -0
  992. package/lib/rest/sync/v1/service/syncMap/syncMapPermission.js +239 -666
  993. package/lib/rest/sync/v1/service/syncMap.d.ts +354 -0
  994. package/lib/rest/sync/v1/service/syncMap.js +281 -686
  995. package/lib/rest/sync/v1/service/syncStream/streamMessage.d.ts +61 -0
  996. package/lib/rest/sync/v1/service/syncStream/streamMessage.js +83 -0
  997. package/lib/rest/sync/v1/service/syncStream.d.ts +336 -0
  998. package/lib/rest/sync/v1/service/syncStream.js +279 -0
  999. package/lib/rest/sync/v1/service.d.ts +404 -0
  1000. package/lib/rest/sync/v1/service.js +325 -792
  1001. package/lib/rest/taskrouter/V1.d.ts +15 -0
  1002. package/lib/rest/taskrouter/V1.js +31 -41
  1003. package/lib/rest/taskrouter/v1/workspace/activity.d.ts +323 -0
  1004. package/lib/rest/taskrouter/v1/workspace/activity.js +250 -699
  1005. package/lib/rest/taskrouter/v1/workspace/event.d.ts +351 -0
  1006. package/lib/rest/taskrouter/v1/workspace/event.js +218 -571
  1007. package/lib/rest/taskrouter/v1/workspace/task/reservation.d.ts +412 -0
  1008. package/lib/rest/taskrouter/v1/workspace/task/reservation.js +331 -772
  1009. package/lib/rest/taskrouter/v1/workspace/task.d.ts +495 -0
  1010. package/lib/rest/taskrouter/v1/workspace/task.js +323 -809
  1011. package/lib/rest/taskrouter/v1/workspace/taskChannel.d.ts +324 -0
  1012. package/lib/rest/taskrouter/v1/workspace/taskChannel.js +257 -507
  1013. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.d.ts +244 -0
  1014. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.js +172 -0
  1015. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueRealTimeStatistics.d.ts +188 -0
  1016. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueRealTimeStatistics.js +148 -0
  1017. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueStatistics.d.ts +148 -0
  1018. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueStatistics.js +134 -284
  1019. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueuesStatistics.d.ts +203 -0
  1020. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueuesStatistics.js +131 -409
  1021. package/lib/rest/taskrouter/v1/workspace/taskQueue.d.ts +417 -0
  1022. package/lib/rest/taskrouter/v1/workspace/taskQueue.js +327 -813
  1023. package/lib/rest/taskrouter/v1/workspace/worker/reservation.d.ts +401 -0
  1024. package/lib/rest/taskrouter/v1/workspace/worker/reservation.js +325 -772
  1025. package/lib/rest/taskrouter/v1/workspace/worker/workerChannel.d.ts +307 -0
  1026. package/lib/rest/taskrouter/v1/workspace/worker/workerChannel.js +223 -612
  1027. package/lib/rest/taskrouter/v1/workspace/worker/workerStatistics.d.ts +140 -0
  1028. package/lib/rest/taskrouter/v1/workspace/worker/workerStatistics.js +130 -282
  1029. package/lib/rest/taskrouter/v1/workspace/worker/workersCumulativeStatistics.d.ts +180 -0
  1030. package/lib/rest/taskrouter/v1/workspace/worker/workersCumulativeStatistics.js +143 -0
  1031. package/lib/rest/taskrouter/v1/workspace/worker/workersRealTimeStatistics.d.ts +132 -0
  1032. package/lib/rest/taskrouter/v1/workspace/worker/workersRealTimeStatistics.js +123 -0
  1033. package/lib/rest/taskrouter/v1/workspace/worker/workersStatistics.d.ts +144 -0
  1034. package/lib/rest/taskrouter/v1/workspace/worker/workersStatistics.js +130 -279
  1035. package/lib/rest/taskrouter/v1/workspace/worker.d.ts +454 -0
  1036. package/lib/rest/taskrouter/v1/workspace/worker.js +348 -858
  1037. package/lib/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.d.ts +244 -0
  1038. package/lib/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.js +171 -0
  1039. package/lib/rest/taskrouter/v1/workspace/workflow/workflowRealTimeStatistics.d.ts +158 -0
  1040. package/lib/rest/taskrouter/v1/workspace/workflow/workflowRealTimeStatistics.js +137 -0
  1041. package/lib/rest/taskrouter/v1/workspace/workflow/workflowStatistics.d.ts +148 -0
  1042. package/lib/rest/taskrouter/v1/workspace/workflow/workflowStatistics.js +134 -283
  1043. package/lib/rest/taskrouter/v1/workspace/workflow.d.ts +384 -0
  1044. package/lib/rest/taskrouter/v1/workspace/workflow.js +314 -762
  1045. package/lib/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.d.ts +236 -0
  1046. package/lib/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.js +163 -0
  1047. package/lib/rest/taskrouter/v1/workspace/workspaceRealTimeStatistics.d.ts +162 -0
  1048. package/lib/rest/taskrouter/v1/workspace/workspaceRealTimeStatistics.js +133 -0
  1049. package/lib/rest/taskrouter/v1/workspace/workspaceStatistics.d.ts +140 -0
  1050. package/lib/rest/taskrouter/v1/workspace/workspaceStatistics.js +126 -270
  1051. package/lib/rest/taskrouter/v1/workspace.d.ts +452 -0
  1052. package/lib/rest/taskrouter/v1/workspace.js +411 -994
  1053. package/lib/rest/trunking/V1.d.ts +15 -0
  1054. package/lib/rest/trunking/V1.js +31 -41
  1055. package/lib/rest/trunking/v1/trunk/credentialList.d.ts +258 -0
  1056. package/lib/rest/trunking/v1/trunk/credentialList.js +214 -609
  1057. package/lib/rest/trunking/v1/trunk/ipAccessControlList.d.ts +258 -0
  1058. package/lib/rest/trunking/v1/trunk/ipAccessControlList.js +214 -612
  1059. package/lib/rest/trunking/v1/trunk/originationUrl.d.ts +340 -0
  1060. package/lib/rest/trunking/v1/trunk/originationUrl.js +269 -718
  1061. package/lib/rest/trunking/v1/trunk/phoneNumber.d.ts +375 -0
  1062. package/lib/rest/trunking/v1/trunk/phoneNumber.js +252 -648
  1063. package/lib/rest/trunking/v1/trunk/recording.d.ts +129 -0
  1064. package/lib/rest/trunking/v1/trunk/recording.js +140 -0
  1065. package/lib/rest/trunking/v1/trunk.d.ts +431 -0
  1066. package/lib/rest/trunking/v1/trunk.js +344 -834
  1067. package/lib/rest/trusthub/V1.d.ts +45 -0
  1068. package/lib/rest/trusthub/V1.js +76 -0
  1069. package/lib/rest/trusthub/v1/customerProfiles/customerProfilesChannelEndpointAssignment.d.ts +272 -0
  1070. package/lib/rest/trusthub/v1/customerProfiles/customerProfilesChannelEndpointAssignment.js +239 -0
  1071. package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEntityAssignments.d.ts +252 -0
  1072. package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEntityAssignments.js +227 -0
  1073. package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.d.ts +239 -0
  1074. package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.js +212 -0
  1075. package/lib/rest/trusthub/v1/customerProfiles.d.ts +380 -0
  1076. package/lib/rest/trusthub/v1/customerProfiles.js +322 -0
  1077. package/lib/rest/trusthub/v1/endUser.d.ts +310 -0
  1078. package/lib/rest/trusthub/v1/endUser.js +261 -0
  1079. package/lib/rest/trusthub/v1/endUserType.d.ts +211 -0
  1080. package/lib/rest/trusthub/v1/endUserType.js +179 -0
  1081. package/lib/rest/trusthub/v1/policies.d.ts +205 -0
  1082. package/lib/rest/trusthub/v1/policies.js +177 -0
  1083. package/lib/rest/trusthub/v1/supportingDocument.d.ts +320 -0
  1084. package/lib/rest/trusthub/v1/supportingDocument.js +265 -0
  1085. package/lib/rest/trusthub/v1/supportingDocumentType.d.ts +211 -0
  1086. package/lib/rest/trusthub/v1/supportingDocumentType.js +179 -0
  1087. package/lib/rest/trusthub/v1/trustProducts/trustProductsChannelEndpointAssignment.d.ts +272 -0
  1088. package/lib/rest/trusthub/v1/trustProducts/trustProductsChannelEndpointAssignment.js +239 -0
  1089. package/lib/rest/trusthub/v1/trustProducts/trustProductsEntityAssignments.d.ts +252 -0
  1090. package/lib/rest/trusthub/v1/trustProducts/trustProductsEntityAssignments.js +227 -0
  1091. package/lib/rest/trusthub/v1/trustProducts/trustProductsEvaluations.d.ts +239 -0
  1092. package/lib/rest/trusthub/v1/trustProducts/trustProductsEvaluations.js +212 -0
  1093. package/lib/rest/trusthub/v1/trustProducts.d.ts +380 -0
  1094. package/lib/rest/trusthub/v1/trustProducts.js +322 -0
  1095. package/lib/rest/verify/V2.d.ts +40 -0
  1096. package/lib/rest/verify/V2.js +69 -0
  1097. package/lib/rest/verify/v2/form.d.ts +98 -0
  1098. package/lib/rest/verify/v2/form.js +112 -0
  1099. package/lib/rest/verify/v2/safelist.d.ts +127 -0
  1100. package/lib/rest/verify/v2/safelist.js +150 -0
  1101. package/lib/rest/verify/v2/service/accessToken.d.ts +158 -0
  1102. package/lib/rest/verify/v2/service/accessToken.js +159 -0
  1103. package/lib/rest/verify/v2/service/entity/challenge/notification.d.ts +112 -0
  1104. package/lib/rest/verify/v2/service/entity/challenge/notification.js +102 -0
  1105. package/lib/rest/verify/v2/service/entity/challenge.d.ts +384 -0
  1106. package/lib/rest/verify/v2/service/entity/challenge.js +296 -0
  1107. package/lib/rest/verify/v2/service/entity/factor.d.ts +335 -0
  1108. package/lib/rest/verify/v2/service/entity/factor.js +270 -0
  1109. package/lib/rest/verify/v2/service/entity/newFactor.d.ts +157 -0
  1110. package/lib/rest/verify/v2/service/entity/newFactor.js +137 -0
  1111. package/lib/rest/verify/v2/service/entity.d.ts +288 -0
  1112. package/lib/rest/verify/v2/service/entity.js +270 -0
  1113. package/lib/rest/verify/v2/service/messagingConfiguration.d.ts +286 -0
  1114. package/lib/rest/verify/v2/service/messagingConfiguration.js +260 -0
  1115. package/lib/rest/verify/v2/service/rateLimit/bucket.d.ts +318 -0
  1116. package/lib/rest/verify/v2/service/rateLimit/bucket.js +272 -0
  1117. package/lib/rest/verify/v2/service/rateLimit.d.ts +322 -0
  1118. package/lib/rest/verify/v2/service/rateLimit.js +275 -0
  1119. package/lib/rest/verify/v2/service/verification.d.ts +237 -0
  1120. package/lib/rest/verify/v2/service/verification.js +217 -0
  1121. package/lib/rest/verify/v2/service/verificationCheck.d.ts +134 -0
  1122. package/lib/rest/verify/v2/service/verificationCheck.js +110 -0
  1123. package/lib/rest/verify/v2/service/webhook.d.ts +340 -0
  1124. package/lib/rest/verify/v2/service/webhook.js +287 -0
  1125. package/lib/rest/verify/v2/service.d.ts +481 -0
  1126. package/lib/rest/verify/v2/service.js +426 -0
  1127. package/lib/rest/verify/v2/template.d.ts +172 -0
  1128. package/lib/rest/verify/v2/template.js +128 -0
  1129. package/lib/rest/verify/v2/verificationAttempt.d.ts +288 -0
  1130. package/lib/rest/verify/v2/verificationAttempt.js +207 -0
  1131. package/lib/rest/verify/v2/verificationAttemptsSummary.d.ts +138 -0
  1132. package/lib/rest/verify/v2/verificationAttemptsSummary.js +126 -0
  1133. package/lib/rest/video/V1.d.ts +40 -0
  1134. package/lib/rest/video/V1.js +64 -52
  1135. package/lib/rest/video/v1/composition.d.ts +377 -0
  1136. package/lib/rest/video/v1/composition.js +275 -0
  1137. package/lib/rest/video/v1/compositionHook.d.ts +389 -0
  1138. package/lib/rest/video/v1/compositionHook.js +310 -0
  1139. package/lib/rest/video/v1/compositionSettings.d.ts +159 -0
  1140. package/lib/rest/video/v1/compositionSettings.js +151 -0
  1141. package/lib/rest/video/v1/recording.d.ts +335 -0
  1142. package/lib/rest/video/v1/recording.js +223 -588
  1143. package/lib/rest/video/v1/recordingSettings.d.ts +159 -0
  1144. package/lib/rest/video/v1/recordingSettings.js +151 -0
  1145. package/lib/rest/video/v1/room/participant/anonymize.d.ts +143 -0
  1146. package/lib/rest/video/v1/room/participant/anonymize.js +135 -0
  1147. package/lib/rest/video/v1/room/participant/publishedTrack.d.ts +237 -0
  1148. package/lib/rest/video/v1/room/participant/publishedTrack.js +199 -0
  1149. package/lib/rest/video/v1/room/participant/subscribeRules.d.ts +103 -0
  1150. package/lib/rest/video/v1/room/participant/subscribeRules.js +103 -0
  1151. package/lib/rest/video/v1/room/participant/subscribedTrack.d.ts +243 -0
  1152. package/lib/rest/video/v1/room/participant/subscribedTrack.js +201 -0
  1153. package/lib/rest/video/v1/room/participant.d.ts +351 -0
  1154. package/lib/rest/video/v1/room/participant.js +286 -0
  1155. package/lib/rest/video/v1/room/recordingRules.d.ts +95 -0
  1156. package/lib/rest/video/v1/room/recordingRules.js +98 -0
  1157. package/lib/rest/video/v1/room/roomRecording.d.ts +318 -0
  1158. package/lib/rest/video/v1/room/roomRecording.js +236 -0
  1159. package/lib/rest/video/v1/room.d.ts +449 -0
  1160. package/lib/rest/video/v1/room.js +322 -706
  1161. package/lib/rest/voice/V1.d.ts +40 -0
  1162. package/lib/rest/voice/V1.js +69 -0
  1163. package/lib/rest/voice/v1/archivedCall.d.ts +51 -0
  1164. package/lib/rest/voice/v1/archivedCall.js +71 -0
  1165. package/lib/rest/voice/v1/byocTrunk.d.ts +393 -0
  1166. package/lib/rest/voice/v1/byocTrunk.js +304 -0
  1167. package/lib/rest/voice/v1/connectionPolicy/connectionPolicyTarget.d.ts +340 -0
  1168. package/lib/rest/voice/v1/connectionPolicy/connectionPolicyTarget.js +280 -0
  1169. package/lib/rest/voice/v1/connectionPolicy.d.ts +314 -0
  1170. package/lib/rest/voice/v1/connectionPolicy.js +265 -0
  1171. package/lib/rest/voice/v1/dialingPermissions/bulkCountryUpdate.d.ts +59 -0
  1172. package/lib/rest/voice/v1/dialingPermissions/bulkCountryUpdate.js +77 -0
  1173. package/lib/rest/voice/v1/dialingPermissions/country/highriskSpecialPrefix.d.ts +143 -0
  1174. package/lib/rest/voice/v1/dialingPermissions/country/highriskSpecialPrefix.js +122 -0
  1175. package/lib/rest/voice/v1/dialingPermissions/country.d.ts +279 -0
  1176. package/lib/rest/voice/v1/dialingPermissions/country.js +214 -0
  1177. package/lib/rest/voice/v1/dialingPermissions/settings.d.ts +129 -0
  1178. package/lib/rest/voice/v1/dialingPermissions/settings.js +130 -0
  1179. package/lib/rest/voice/v1/dialingPermissions.d.ts +25 -0
  1180. package/lib/rest/voice/v1/dialingPermissions.js +60 -0
  1181. package/lib/rest/voice/v1/ipRecord.d.ts +308 -0
  1182. package/lib/rest/voice/v1/ipRecord.js +256 -0
  1183. package/lib/rest/voice/v1/sourceIpMapping.d.ts +278 -0
  1184. package/lib/rest/voice/v1/sourceIpMapping.js +252 -0
  1185. package/lib/rest/wireless/V1.d.ts +30 -0
  1186. package/lib/rest/wireless/V1.js +49 -63
  1187. package/lib/rest/wireless/v1/command.d.ts +314 -0
  1188. package/lib/rest/wireless/v1/command.js +237 -583
  1189. package/lib/rest/wireless/v1/ratePlan.d.ts +382 -0
  1190. package/lib/rest/wireless/v1/ratePlan.js +278 -716
  1191. package/lib/rest/wireless/v1/sim/dataSession.d.ts +233 -0
  1192. package/lib/rest/wireless/v1/sim/dataSession.js +152 -0
  1193. package/lib/rest/wireless/v1/sim/usageRecord.d.ts +186 -0
  1194. package/lib/rest/wireless/v1/sim/usageRecord.js +125 -402
  1195. package/lib/rest/wireless/v1/sim.d.ts +465 -0
  1196. package/lib/rest/wireless/v1/sim.js +316 -705
  1197. package/lib/rest/wireless/v1/usageRecord.d.ts +179 -0
  1198. package/lib/rest/wireless/v1/usageRecord.js +130 -0
  1199. package/lib/twiml/FaxResponse.d.ts +66 -0
  1200. package/lib/twiml/FaxResponse.js +66 -0
  1201. package/lib/twiml/MessagingResponse.d.ts +117 -0
  1202. package/lib/twiml/MessagingResponse.js +115 -74
  1203. package/lib/twiml/TwiML.d.ts +42 -0
  1204. package/lib/twiml/TwiML.js +83 -0
  1205. package/lib/twiml/VoiceResponse.d.ts +2448 -0
  1206. package/lib/twiml/VoiceResponse.js +1428 -363
  1207. package/lib/webhooks/webhooks.d.ts +136 -0
  1208. package/lib/webhooks/webhooks.js +253 -117
  1209. package/package.json +48 -22
  1210. package/CHANGES.md +0 -95
  1211. package/lib/rest/Fax.js +0 -54
  1212. package/lib/rest/api/v2010/account/availablePhoneNumber/local.js +0 -517
  1213. package/lib/rest/api/v2010/account/availablePhoneNumber/mobile.js +0 -517
  1214. package/lib/rest/api/v2010/account/availablePhoneNumber/tollFree.js +0 -517
  1215. package/lib/rest/api/v2010/account/availablePhoneNumber.js +0 -623
  1216. package/lib/rest/fax/V1.js +0 -46
  1217. package/lib/rest/fax/v1/fax/faxMedia.js +0 -574
  1218. package/lib/rest/fax/v1/fax.js +0 -789
  1219. package/lib/rest/notify/v1/service/segment.js +0 -397
  1220. package/lib/rest/notify/v1/service/user/segmentMemberships.js +0 -385
  1221. package/lib/rest/notify/v1/service/user/userBinding.js +0 -691
  1222. package/lib/rest/notify/v1/service/user.js +0 -717
  1223. package/lib/rest/preview/BulkExports.js +0 -59
  1224. package/lib/rest/preview/Proxy.js +0 -46
  1225. package/lib/rest/preview/bulk_exports/export/day.js +0 -393
  1226. package/lib/rest/preview/bulk_exports/export.js +0 -282
  1227. package/lib/rest/preview/bulk_exports/exportConfiguration.js +0 -337
  1228. package/lib/rest/preview/proxy/service/phoneNumber.js +0 -633
  1229. package/lib/rest/preview/proxy/service/session/interaction.js +0 -584
  1230. package/lib/rest/preview/proxy/service/session/participant/messageInteraction.js +0 -635
  1231. package/lib/rest/preview/proxy/service/session/participant.js +0 -807
  1232. package/lib/rest/preview/proxy/service/session.js +0 -815
  1233. package/lib/rest/preview/proxy/service/shortCode.js +0 -632
  1234. package/lib/rest/preview/proxy/service.js +0 -807
  1235. package/lib/rest/video/v1/room/recording.js +0 -558
@@ -1,981 +1,450 @@
1
- 'use strict';
2
-
3
- /* jshint ignore:start */
4
- /**
1
+ "use strict";
2
+ /*
5
3
  * This code was generated by
6
- * \ / _ _ _| _ _
7
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
8
- * / /
9
- */
10
- /* jshint ignore:end */
11
-
12
- var Q = require('q'); /* jshint ignore:line */
13
- var _ = require('lodash'); /* jshint ignore:line */
14
- var AssignedAddOnList = require(
15
- './incomingPhoneNumber/assignedAddOn').AssignedAddOnList;
16
- var LocalList = require('./incomingPhoneNumber/local').LocalList;
17
- var MobileList = require('./incomingPhoneNumber/mobile').MobileList;
18
- var Page = require('../../../../base/Page'); /* jshint ignore:line */
19
- var TollFreeList = require('./incomingPhoneNumber/tollFree').TollFreeList;
20
- var deserialize = require(
21
- '../../../../base/deserialize'); /* jshint ignore:line */
22
- var serialize = require('../../../../base/serialize'); /* jshint ignore:line */
23
- var values = require('../../../../base/values'); /* jshint ignore:line */
24
-
25
- var IncomingPhoneNumberList;
26
- var IncomingPhoneNumberPage;
27
- var IncomingPhoneNumberInstance;
28
- var IncomingPhoneNumberContext;
29
-
30
- /* jshint ignore:start */
31
- /**
32
- * @constructor Twilio.Api.V2010.AccountContext.IncomingPhoneNumberList
33
- * @description Initialize the IncomingPhoneNumberList
4
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
+ *
8
+ * Twilio - Api
9
+ * This is the public Twilio REST API.
34
10
  *
35
- * @param {Twilio.Api.V2010} version - Version of the resource
36
- * @param {string} accountSid - The unique sid that identifies this account
11
+ * NOTE: This class is auto generated by OpenAPI Generator.
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
37
14
  */
38
- /* jshint ignore:end */
39
- IncomingPhoneNumberList = function IncomingPhoneNumberList(version, accountSid)
40
- {
41
- /* jshint ignore:start */
42
- /**
43
- * @function incomingPhoneNumbers
44
- * @memberof Twilio.Api.V2010.AccountContext
45
- * @instance
46
- *
47
- * @param {string} sid - sid of instance
48
- *
49
- * @returns {Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext}
50
- */
51
- /* jshint ignore:end */
52
- function IncomingPhoneNumberListInstance(sid) {
53
- return IncomingPhoneNumberListInstance.get(sid);
54
- }
55
-
56
- IncomingPhoneNumberListInstance._version = version;
57
- // Path Solution
58
- IncomingPhoneNumberListInstance._solution = {
59
- accountSid: accountSid
60
- };
61
- IncomingPhoneNumberListInstance._uri = _.template(
62
- '/Accounts/<%= accountSid %>/IncomingPhoneNumbers.json' // jshint ignore:line
63
- )(IncomingPhoneNumberListInstance._solution);
64
-
65
- // Components
66
- IncomingPhoneNumberListInstance._local = undefined;
67
- IncomingPhoneNumberListInstance._mobile = undefined;
68
- IncomingPhoneNumberListInstance._tollFree = undefined;
69
-
70
- /* jshint ignore:start */
71
- /**
72
- * Streams IncomingPhoneNumberInstance records from the API.
73
- *
74
- * This operation lazily loads records as efficiently as possible until the limit
75
- * is reached.
76
- *
77
- * The results are passed into the callback function, so this operation is memory efficient.
78
- *
79
- * If a function is passed as the first argument, it will be used as the callback function.
80
- *
81
- * @function each
82
- * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberList
83
- * @instance
84
- *
85
- * @param {object|function} opts - ...
86
- * @param {boolean} [opts.beta] - Include new phone numbers
87
- * @param {string} [opts.friendlyName] - Filter by friendly name
88
- * @param {string} [opts.phoneNumber] - Filter by incoming phone number
89
- * @param {string} [opts.origin] - The origin
90
- * @param {number} [opts.limit] -
91
- * Upper limit for the number of records to return.
92
- * each() guarantees never to return more than limit.
93
- * Default is no limit
94
- * @param {number} [opts.pageSize=50] -
95
- * Number of records to fetch per request,
96
- * when not set will use the default value of 50 records.
97
- * If no pageSize is defined but a limit is defined,
98
- * each() will attempt to read the limit with the most efficient
99
- * page size, i.e. min(limit, 1000)
100
- * @param {Function} [opts.callback] -
101
- * Function to process each record. If this and a positional
102
- * callback are passed, this one will be used
103
- * @param {Function} [opts.done] -
104
- * Function to be called upon completion of streaming
105
- * @param {Function} [callback] - Function to process each record
106
- */
107
- /* jshint ignore:end */
108
- IncomingPhoneNumberListInstance.each = function each(opts, callback) {
109
- opts = opts || {};
110
- if (_.isFunction(opts)) {
111
- opts = { callback: opts };
112
- } else if (_.isFunction(callback) && !_.isFunction(opts.callback)) {
113
- opts.callback = callback;
15
+ var __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.IncomingPhoneNumberPage = exports.IncomingPhoneNumberListInstance = exports.IncomingPhoneNumberInstance = exports.IncomingPhoneNumberContextImpl = void 0;
20
+ const util_1 = require("util");
21
+ const Page_1 = __importDefault(require("../../../../base/Page"));
22
+ const deserialize = require("../../../../base/deserialize");
23
+ const serialize = require("../../../../base/serialize");
24
+ const utility_1 = require("../../../../base/utility");
25
+ const assignedAddOn_1 = require("./incomingPhoneNumber/assignedAddOn");
26
+ const local_1 = require("./incomingPhoneNumber/local");
27
+ const mobile_1 = require("./incomingPhoneNumber/mobile");
28
+ const tollFree_1 = require("./incomingPhoneNumber/tollFree");
29
+ class IncomingPhoneNumberContextImpl {
30
+ constructor(_version, accountSid, sid) {
31
+ this._version = _version;
32
+ if (!(0, utility_1.isValidPathParam)(accountSid)) {
33
+ throw new Error("Parameter 'accountSid' is not valid.");
34
+ }
35
+ if (!(0, utility_1.isValidPathParam)(sid)) {
36
+ throw new Error("Parameter 'sid' is not valid.");
37
+ }
38
+ this._solution = { accountSid, sid };
39
+ this._uri = `/Accounts/${accountSid}/IncomingPhoneNumbers/${sid}.json`;
114
40
  }
115
-
116
- if (_.isUndefined(opts.callback)) {
117
- throw new Error('Callback function must be provided');
41
+ get assignedAddOns() {
42
+ this._assignedAddOns =
43
+ this._assignedAddOns ||
44
+ (0, assignedAddOn_1.AssignedAddOnListInstance)(this._version, this._solution.accountSid, this._solution.sid);
45
+ return this._assignedAddOns;
118
46
  }
119
-
120
- var done = false;
121
- var currentPage = 1;
122
- var currentResource = 0;
123
- var limits = this._version.readLimits({
124
- limit: opts.limit,
125
- pageSize: opts.pageSize
126
- });
127
-
128
- function onComplete(error) {
129
- done = true;
130
- if (_.isFunction(opts.done)) {
131
- opts.done(error);
132
- }
47
+ remove(callback) {
48
+ const instance = this;
49
+ let operationVersion = instance._version, operationPromise = operationVersion.remove({
50
+ uri: instance._uri,
51
+ method: "delete",
52
+ });
53
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
54
+ return operationPromise;
133
55
  }
134
-
135
- function fetchNextPage(fn) {
136
- var promise = fn();
137
- if (_.isUndefined(promise)) {
138
- onComplete();
139
- return;
140
- }
141
-
142
- promise.then(function(page) {
143
- _.each(page.instances, function(instance) {
144
- if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {
145
- done = true;
146
- return false;
147
- }
148
-
149
- currentResource++;
150
- opts.callback(instance, onComplete);
56
+ fetch(callback) {
57
+ const instance = this;
58
+ let operationVersion = instance._version, operationPromise = operationVersion.fetch({
59
+ uri: instance._uri,
60
+ method: "get",
151
61
  });
152
-
153
- if ((limits.pageLimit && limits.pageLimit <= currentPage)) {
154
- onComplete();
155
- } else if (!done) {
156
- currentPage++;
157
- fetchNextPage(_.bind(page.nextPage, page));
62
+ operationPromise = operationPromise.then((payload) => new IncomingPhoneNumberInstance(operationVersion, payload, instance._solution.accountSid, instance._solution.sid));
63
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
64
+ return operationPromise;
65
+ }
66
+ update(params, callback) {
67
+ if (params instanceof Function) {
68
+ callback = params;
69
+ params = {};
70
+ }
71
+ else {
72
+ params = params || {};
158
73
  }
159
- });
160
-
161
- promise.catch(onComplete);
74
+ let data = {};
75
+ if (params["accountSid"] !== undefined)
76
+ data["AccountSid"] = params["accountSid"];
77
+ if (params["apiVersion"] !== undefined)
78
+ data["ApiVersion"] = params["apiVersion"];
79
+ if (params["friendlyName"] !== undefined)
80
+ data["FriendlyName"] = params["friendlyName"];
81
+ if (params["smsApplicationSid"] !== undefined)
82
+ data["SmsApplicationSid"] = params["smsApplicationSid"];
83
+ if (params["smsFallbackMethod"] !== undefined)
84
+ data["SmsFallbackMethod"] = params["smsFallbackMethod"];
85
+ if (params["smsFallbackUrl"] !== undefined)
86
+ data["SmsFallbackUrl"] = params["smsFallbackUrl"];
87
+ if (params["smsMethod"] !== undefined)
88
+ data["SmsMethod"] = params["smsMethod"];
89
+ if (params["smsUrl"] !== undefined)
90
+ data["SmsUrl"] = params["smsUrl"];
91
+ if (params["statusCallback"] !== undefined)
92
+ data["StatusCallback"] = params["statusCallback"];
93
+ if (params["statusCallbackMethod"] !== undefined)
94
+ data["StatusCallbackMethod"] = params["statusCallbackMethod"];
95
+ if (params["voiceApplicationSid"] !== undefined)
96
+ data["VoiceApplicationSid"] = params["voiceApplicationSid"];
97
+ if (params["voiceCallerIdLookup"] !== undefined)
98
+ data["VoiceCallerIdLookup"] = serialize.bool(params["voiceCallerIdLookup"]);
99
+ if (params["voiceFallbackMethod"] !== undefined)
100
+ data["VoiceFallbackMethod"] = params["voiceFallbackMethod"];
101
+ if (params["voiceFallbackUrl"] !== undefined)
102
+ data["VoiceFallbackUrl"] = params["voiceFallbackUrl"];
103
+ if (params["voiceMethod"] !== undefined)
104
+ data["VoiceMethod"] = params["voiceMethod"];
105
+ if (params["voiceUrl"] !== undefined)
106
+ data["VoiceUrl"] = params["voiceUrl"];
107
+ if (params["emergencyStatus"] !== undefined)
108
+ data["EmergencyStatus"] = params["emergencyStatus"];
109
+ if (params["emergencyAddressSid"] !== undefined)
110
+ data["EmergencyAddressSid"] = params["emergencyAddressSid"];
111
+ if (params["trunkSid"] !== undefined)
112
+ data["TrunkSid"] = params["trunkSid"];
113
+ if (params["voiceReceiveMode"] !== undefined)
114
+ data["VoiceReceiveMode"] = params["voiceReceiveMode"];
115
+ if (params["identitySid"] !== undefined)
116
+ data["IdentitySid"] = params["identitySid"];
117
+ if (params["addressSid"] !== undefined)
118
+ data["AddressSid"] = params["addressSid"];
119
+ if (params["bundleSid"] !== undefined)
120
+ data["BundleSid"] = params["bundleSid"];
121
+ const headers = {};
122
+ headers["Content-Type"] = "application/x-www-form-urlencoded";
123
+ const instance = this;
124
+ let operationVersion = instance._version, operationPromise = operationVersion.update({
125
+ uri: instance._uri,
126
+ method: "post",
127
+ data,
128
+ headers,
129
+ });
130
+ operationPromise = operationPromise.then((payload) => new IncomingPhoneNumberInstance(operationVersion, payload, instance._solution.accountSid, instance._solution.sid));
131
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
132
+ return operationPromise;
162
133
  }
163
-
164
- fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));
165
- };
166
-
167
- /* jshint ignore:start */
168
- /**
169
- * @description Lists IncomingPhoneNumberInstance records from the API as a list.
170
- *
171
- * If a function is passed as the first argument, it will be used as the callback function.
172
- *
173
- * @function list
174
- * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberList
175
- * @instance
176
- *
177
- * @param {object|function} opts - ...
178
- * @param {boolean} [opts.beta] - Include new phone numbers
179
- * @param {string} [opts.friendlyName] - Filter by friendly name
180
- * @param {string} [opts.phoneNumber] - Filter by incoming phone number
181
- * @param {string} [opts.origin] - The origin
182
- * @param {number} [opts.limit] -
183
- * Upper limit for the number of records to return.
184
- * list() guarantees never to return more than limit.
185
- * Default is no limit
186
- * @param {number} [opts.pageSize] -
187
- * Number of records to fetch per request,
188
- * when not set will use the default value of 50 records.
189
- * If no page_size is defined but a limit is defined,
190
- * list() will attempt to read the limit with the most
191
- * efficient page size, i.e. min(limit, 1000)
192
- * @param {function} [callback] - Callback to handle list of records
193
- *
194
- * @returns {Promise} Resolves to a list of records
195
- */
196
- /* jshint ignore:end */
197
- IncomingPhoneNumberListInstance.list = function list(opts, callback) {
198
- if (_.isFunction(opts)) {
199
- callback = opts;
200
- opts = {};
134
+ /**
135
+ * Provide a user-friendly representation
136
+ *
137
+ * @returns Object
138
+ */
139
+ toJSON() {
140
+ return this._solution;
201
141
  }
202
- opts = opts || {};
203
- var deferred = Q.defer();
204
- var allResources = [];
205
- opts.callback = function(resource, done) {
206
- allResources.push(resource);
207
-
208
- if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {
209
- done();
210
- }
211
- };
212
-
213
- opts.done = function(error) {
214
- if (_.isUndefined(error)) {
215
- deferred.resolve(allResources);
216
- } else {
217
- deferred.reject(error);
218
- }
219
- };
220
-
221
- if (_.isFunction(callback)) {
222
- deferred.promise.nodeify(callback);
142
+ [util_1.inspect.custom](_depth, options) {
143
+ return (0, util_1.inspect)(this.toJSON(), options);
223
144
  }
224
-
225
- this.each(opts);
226
- return deferred.promise;
227
- };
228
-
229
- /* jshint ignore:start */
230
- /**
231
- * Retrieve a single page of IncomingPhoneNumberInstance records from the API.
232
- * Request is executed immediately
233
- *
234
- * If a function is passed as the first argument, it will be used as the callback function.
235
- *
236
- * @function page
237
- * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberList
238
- * @instance
239
- *
240
- * @param {object|function} opts - ...
241
- * @param {boolean} [opts.beta] - Include new phone numbers
242
- * @param {string} [opts.friendlyName] - Filter by friendly name
243
- * @param {string} [opts.phoneNumber] - Filter by incoming phone number
244
- * @param {string} [opts.origin] - The origin
245
- * @param {string} [opts.pageToken] - PageToken provided by the API
246
- * @param {number} [opts.pageNumber] -
247
- * Page Number, this value is simply for client state
248
- * @param {number} [opts.pageSize] - Number of records to return, defaults to 50
249
- * @param {function} [callback] - Callback to handle list of records
250
- *
251
- * @returns {Promise} Resolves to a list of records
252
- */
253
- /* jshint ignore:end */
254
- IncomingPhoneNumberListInstance.page = function page(opts, callback) {
255
- if (_.isFunction(opts)) {
256
- callback = opts;
257
- opts = {};
145
+ }
146
+ exports.IncomingPhoneNumberContextImpl = IncomingPhoneNumberContextImpl;
147
+ class IncomingPhoneNumberInstance {
148
+ constructor(_version, payload, accountSid, sid) {
149
+ this._version = _version;
150
+ this.accountSid = payload.account_sid;
151
+ this.addressSid = payload.address_sid;
152
+ this.addressRequirements = payload.address_requirements;
153
+ this.apiVersion = payload.api_version;
154
+ this.beta = payload.beta;
155
+ this.capabilities = payload.capabilities;
156
+ this.dateCreated = deserialize.rfc2822DateTime(payload.date_created);
157
+ this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated);
158
+ this.friendlyName = payload.friendly_name;
159
+ this.identitySid = payload.identity_sid;
160
+ this.phoneNumber = payload.phone_number;
161
+ this.origin = payload.origin;
162
+ this.sid = payload.sid;
163
+ this.smsApplicationSid = payload.sms_application_sid;
164
+ this.smsFallbackMethod = payload.sms_fallback_method;
165
+ this.smsFallbackUrl = payload.sms_fallback_url;
166
+ this.smsMethod = payload.sms_method;
167
+ this.smsUrl = payload.sms_url;
168
+ this.statusCallback = payload.status_callback;
169
+ this.statusCallbackMethod = payload.status_callback_method;
170
+ this.trunkSid = payload.trunk_sid;
171
+ this.uri = payload.uri;
172
+ this.voiceReceiveMode = payload.voice_receive_mode;
173
+ this.voiceApplicationSid = payload.voice_application_sid;
174
+ this.voiceCallerIdLookup = payload.voice_caller_id_lookup;
175
+ this.voiceFallbackMethod = payload.voice_fallback_method;
176
+ this.voiceFallbackUrl = payload.voice_fallback_url;
177
+ this.voiceMethod = payload.voice_method;
178
+ this.voiceUrl = payload.voice_url;
179
+ this.emergencyStatus = payload.emergency_status;
180
+ this.emergencyAddressSid = payload.emergency_address_sid;
181
+ this.emergencyAddressStatus = payload.emergency_address_status;
182
+ this.bundleSid = payload.bundle_sid;
183
+ this.status = payload.status;
184
+ this._solution = { accountSid, sid: sid || this.sid };
258
185
  }
259
- opts = opts || {};
260
-
261
- var deferred = Q.defer();
262
- var data = values.of({
263
- 'Beta': serialize.bool(_.get(opts, 'beta')),
264
- 'FriendlyName': _.get(opts, 'friendlyName'),
265
- 'PhoneNumber': _.get(opts, 'phoneNumber'),
266
- 'Origin': _.get(opts, 'origin'),
267
- 'PageToken': opts.pageToken,
268
- 'Page': opts.pageNumber,
269
- 'PageSize': opts.pageSize
270
- });
271
-
272
- var promise = this._version.page({
273
- uri: this._uri,
274
- method: 'GET',
275
- params: data
276
- });
277
-
278
- promise = promise.then(function(payload) {
279
- deferred.resolve(new IncomingPhoneNumberPage(
280
- this._version,
281
- payload,
282
- this._solution
283
- ));
284
- }.bind(this));
285
-
286
- promise.catch(function(error) {
287
- deferred.reject(error);
288
- });
289
-
290
- if (_.isFunction(callback)) {
291
- deferred.promise.nodeify(callback);
186
+ get _proxy() {
187
+ this._context =
188
+ this._context ||
189
+ new IncomingPhoneNumberContextImpl(this._version, this._solution.accountSid, this._solution.sid);
190
+ return this._context;
292
191
  }
293
-
294
- return deferred.promise;
295
- };
296
-
297
- /* jshint ignore:start */
298
- /**
299
- * Retrieve a single target page of IncomingPhoneNumberInstance records from the API.
300
- * Request is executed immediately
301
- *
302
- * If a function is passed as the first argument, it will be used as the callback function.
303
- *
304
- * @function getPage
305
- * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberList
306
- * @instance
307
- *
308
- * @param {boolean} [opts.beta] - Include new phone numbers
309
- * @param {string} [opts.friendlyName] - Filter by friendly name
310
- * @param {string} [opts.phoneNumber] - Filter by incoming phone number
311
- * @param {string} [opts.origin] - The origin
312
- * @param {string} [targetUrl] - API-generated URL for the requested results page
313
- * @param {function} [callback] - Callback to handle list of records
314
- *
315
- * @returns {Promise} Resolves to a list of records
316
- */
317
- /* jshint ignore:end */
318
- IncomingPhoneNumberListInstance.getPage = function getPage(targetUrl, callback)
319
- {
320
- var deferred = Q.defer();
321
-
322
- var promise = this._version._domain.twilio.request({
323
- method: 'GET',
324
- uri: targetUrl
325
- });
326
-
327
- promise = promise.then(function(payload) {
328
- deferred.resolve(new IncomingPhoneNumberPage(
329
- this._version,
330
- payload,
331
- this._solution
332
- ));
333
- }.bind(this));
334
-
335
- promise.catch(function(error) {
336
- deferred.reject(error);
337
- });
338
-
339
- if (_.isFunction(callback)) {
340
- deferred.promise.nodeify(callback);
192
+ /**
193
+ * Remove a IncomingPhoneNumberInstance
194
+ *
195
+ * @param callback - Callback to handle processed record
196
+ *
197
+ * @returns Resolves to processed boolean
198
+ */
199
+ remove(callback) {
200
+ return this._proxy.remove(callback);
341
201
  }
342
-
343
- return deferred.promise;
344
- };
345
-
346
- /* jshint ignore:start */
347
- /**
348
- * create a IncomingPhoneNumberInstance
349
- *
350
- * @function create
351
- * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberList
352
- * @instance
353
- *
354
- * @param {object|function} opts - ...
355
- * @param {string} [opts.apiVersion] - The Twilio Rest API version to use
356
- * @param {string} [opts.friendlyName] -
357
- * A human readable description of this resource
358
- * @param {string} [opts.smsApplicationSid] -
359
- * Unique string that identifies the application
360
- * @param {string} [opts.smsFallbackMethod] -
361
- * HTTP method used with sms fallback url
362
- * @param {string} [opts.smsFallbackUrl] -
363
- * URL Twilio will request if an error occurs in executing TwiML
364
- * @param {string} [opts.smsMethod] - HTTP method to use with sms url
365
- * @param {string} [opts.smsUrl] - URL Twilio will request when receiving an SMS
366
- * @param {string} [opts.statusCallback] -
367
- * URL Twilio will use to pass status parameters
368
- * @param {string} [opts.statusCallbackMethod] -
369
- * HTTP method twilio will use with status callback
370
- * @param {string} [opts.voiceApplicationSid] -
371
- * The unique sid of the application to handle this number
372
- * @param {boolean} [opts.voiceCallerIdLookup] - Look up the caller's caller-ID
373
- * @param {string} [opts.voiceFallbackMethod] - HTTP method used with fallback_url
374
- * @param {string} [opts.voiceFallbackUrl] -
375
- * URL Twilio will request when an error occurs in TwiML
376
- * @param {string} [opts.voiceMethod] - HTTP method used with the voice url
377
- * @param {string} [opts.voiceUrl] - URL Twilio will request when receiving a call
378
- * @param {incoming_phone_number.emergency_status} [opts.emergencyStatus] -
379
- * The emergency_status
380
- * @param {string} [opts.emergencyAddressSid] - The emergency_address_sid
381
- * @param {string} [opts.trunkSid] - Unique string to identify the trunk
382
- * @param {string} [opts.phoneNumber] - The phone number
383
- * @param {string} [opts.areaCode] - The desired area code for the new number
384
- * @param {function} [callback] - Callback to handle processed record
385
- *
386
- * @returns {Promise} Resolves to processed IncomingPhoneNumberInstance
387
- */
388
- /* jshint ignore:end */
389
- IncomingPhoneNumberListInstance.create = function create(opts, callback) {
390
- if (_.isFunction(opts)) {
391
- callback = opts;
392
- opts = {};
202
+ /**
203
+ * Fetch a IncomingPhoneNumberInstance
204
+ *
205
+ * @param callback - Callback to handle processed record
206
+ *
207
+ * @returns Resolves to processed IncomingPhoneNumberInstance
208
+ */
209
+ fetch(callback) {
210
+ return this._proxy.fetch(callback);
393
211
  }
394
- opts = opts || {};
395
-
396
- var deferred = Q.defer();
397
- var data = values.of({
398
- 'PhoneNumber': _.get(opts, 'phoneNumber'),
399
- 'AreaCode': _.get(opts, 'areaCode'),
400
- 'ApiVersion': _.get(opts, 'apiVersion'),
401
- 'FriendlyName': _.get(opts, 'friendlyName'),
402
- 'SmsApplicationSid': _.get(opts, 'smsApplicationSid'),
403
- 'SmsFallbackMethod': _.get(opts, 'smsFallbackMethod'),
404
- 'SmsFallbackUrl': _.get(opts, 'smsFallbackUrl'),
405
- 'SmsMethod': _.get(opts, 'smsMethod'),
406
- 'SmsUrl': _.get(opts, 'smsUrl'),
407
- 'StatusCallback': _.get(opts, 'statusCallback'),
408
- 'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'),
409
- 'VoiceApplicationSid': _.get(opts, 'voiceApplicationSid'),
410
- 'VoiceCallerIdLookup': serialize.bool(_.get(opts, 'voiceCallerIdLookup')),
411
- 'VoiceFallbackMethod': _.get(opts, 'voiceFallbackMethod'),
412
- 'VoiceFallbackUrl': _.get(opts, 'voiceFallbackUrl'),
413
- 'VoiceMethod': _.get(opts, 'voiceMethod'),
414
- 'VoiceUrl': _.get(opts, 'voiceUrl'),
415
- 'EmergencyStatus': _.get(opts, 'emergencyStatus'),
416
- 'EmergencyAddressSid': _.get(opts, 'emergencyAddressSid'),
417
- 'TrunkSid': _.get(opts, 'trunkSid')
418
- });
419
-
420
- var promise = this._version.create({
421
- uri: this._uri,
422
- method: 'POST',
423
- data: data
424
- });
425
-
426
- promise = promise.then(function(payload) {
427
- deferred.resolve(new IncomingPhoneNumberInstance(
428
- this._version,
429
- payload,
430
- this._solution.accountSid,
431
- this._solution.sid
432
- ));
433
- }.bind(this));
434
-
435
- promise.catch(function(error) {
436
- deferred.reject(error);
437
- });
438
-
439
- if (_.isFunction(callback)) {
440
- deferred.promise.nodeify(callback);
212
+ update(params, callback) {
213
+ return this._proxy.update(params, callback);
441
214
  }
442
-
443
- return deferred.promise;
444
- };
445
-
446
- Object.defineProperty(IncomingPhoneNumberListInstance,
447
- 'local', {
448
- get: function local() {
449
- if (!this._local) {
450
- this._local = new LocalList(
451
- this._version,
452
- this._solution.accountSid
453
- );
454
- }
455
-
456
- return this._local;
215
+ /**
216
+ * Access the assignedAddOns.
217
+ */
218
+ assignedAddOns() {
219
+ return this._proxy.assignedAddOns;
457
220
  }
458
- });
459
-
460
- Object.defineProperty(IncomingPhoneNumberListInstance,
461
- 'mobile', {
462
- get: function mobile() {
463
- if (!this._mobile) {
464
- this._mobile = new MobileList(
465
- this._version,
466
- this._solution.accountSid
467
- );
468
- }
469
-
470
- return this._mobile;
221
+ /**
222
+ * Provide a user-friendly representation
223
+ *
224
+ * @returns Object
225
+ */
226
+ toJSON() {
227
+ return {
228
+ accountSid: this.accountSid,
229
+ addressSid: this.addressSid,
230
+ addressRequirements: this.addressRequirements,
231
+ apiVersion: this.apiVersion,
232
+ beta: this.beta,
233
+ capabilities: this.capabilities,
234
+ dateCreated: this.dateCreated,
235
+ dateUpdated: this.dateUpdated,
236
+ friendlyName: this.friendlyName,
237
+ identitySid: this.identitySid,
238
+ phoneNumber: this.phoneNumber,
239
+ origin: this.origin,
240
+ sid: this.sid,
241
+ smsApplicationSid: this.smsApplicationSid,
242
+ smsFallbackMethod: this.smsFallbackMethod,
243
+ smsFallbackUrl: this.smsFallbackUrl,
244
+ smsMethod: this.smsMethod,
245
+ smsUrl: this.smsUrl,
246
+ statusCallback: this.statusCallback,
247
+ statusCallbackMethod: this.statusCallbackMethod,
248
+ trunkSid: this.trunkSid,
249
+ uri: this.uri,
250
+ voiceReceiveMode: this.voiceReceiveMode,
251
+ voiceApplicationSid: this.voiceApplicationSid,
252
+ voiceCallerIdLookup: this.voiceCallerIdLookup,
253
+ voiceFallbackMethod: this.voiceFallbackMethod,
254
+ voiceFallbackUrl: this.voiceFallbackUrl,
255
+ voiceMethod: this.voiceMethod,
256
+ voiceUrl: this.voiceUrl,
257
+ emergencyStatus: this.emergencyStatus,
258
+ emergencyAddressSid: this.emergencyAddressSid,
259
+ emergencyAddressStatus: this.emergencyAddressStatus,
260
+ bundleSid: this.bundleSid,
261
+ status: this.status,
262
+ };
471
263
  }
472
- });
473
-
474
- Object.defineProperty(IncomingPhoneNumberListInstance,
475
- 'tollFree', {
476
- get: function tollFree() {
477
- if (!this._tollFree) {
478
- this._tollFree = new TollFreeList(
479
- this._version,
480
- this._solution.accountSid
481
- );
482
- }
483
-
484
- return this._tollFree;
264
+ [util_1.inspect.custom](_depth, options) {
265
+ return (0, util_1.inspect)(this.toJSON(), options);
485
266
  }
486
- });
487
-
488
- /* jshint ignore:start */
489
- /**
490
- * Constructs a incoming_phone_number
491
- *
492
- * @function get
493
- * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberList
494
- * @instance
495
- *
496
- * @param {string} sid - Fetch by unique incoming-phone-number Sid
497
- *
498
- * @returns {Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext}
499
- */
500
- /* jshint ignore:end */
501
- IncomingPhoneNumberListInstance.get = function get(sid) {
502
- return new IncomingPhoneNumberContext(
503
- this._version,
504
- this._solution.accountSid,
505
- sid
506
- );
507
- };
508
-
509
- return IncomingPhoneNumberListInstance;
510
- };
511
-
512
-
513
- /* jshint ignore:start */
514
- /**
515
- * @constructor Twilio.Api.V2010.AccountContext.IncomingPhoneNumberPage
516
- * @augments Page
517
- * @description Initialize the IncomingPhoneNumberPage
518
- *
519
- * @param {Twilio.Api.V2010} version - Version of the resource
520
- * @param {object} response - Response from the API
521
- * @param {object} solution - Path solution
522
- *
523
- * @returns IncomingPhoneNumberPage
524
- */
525
- /* jshint ignore:end */
526
- IncomingPhoneNumberPage = function IncomingPhoneNumberPage(version, response,
527
- solution) {
528
- // Path Solution
529
- this._solution = solution;
530
-
531
- Page.prototype.constructor.call(this, version, response, this._solution);
532
- };
533
-
534
- _.extend(IncomingPhoneNumberPage.prototype, Page.prototype);
535
- IncomingPhoneNumberPage.prototype.constructor = IncomingPhoneNumberPage;
536
-
537
- /* jshint ignore:start */
538
- /**
539
- * Build an instance of IncomingPhoneNumberInstance
540
- *
541
- * @function getInstance
542
- * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberPage
543
- * @instance
544
- *
545
- * @param {object} payload - Payload response from the API
546
- *
547
- * @returns IncomingPhoneNumberInstance
548
- */
549
- /* jshint ignore:end */
550
- IncomingPhoneNumberPage.prototype.getInstance = function getInstance(payload) {
551
- return new IncomingPhoneNumberInstance(
552
- this._version,
553
- payload,
554
- this._solution.accountSid
555
- );
556
- };
557
-
558
-
559
- /* jshint ignore:start */
560
- /**
561
- * @constructor Twilio.Api.V2010.AccountContext.IncomingPhoneNumberInstance
562
- * @description Initialize the IncomingPhoneNumberContext
563
- *
564
- * @property {string} accountSid - The unique sid that identifies this account
565
- * @property {incoming_phone_number.address_requirement} addressRequirements -
566
- * Indicates if the customer requires an address
567
- * @property {string} apiVersion - The Twilio REST API version to use
568
- * @property {boolean} beta - Indicates if the phone number is a beta number
569
- * @property {string} capabilities -
570
- * Indicate if a phone can receive calls or messages
571
- * @property {Date} dateCreated - The date this resource was created
572
- * @property {Date} dateUpdated - The date this resource was last updated
573
- * @property {string} friendlyName - A human readable description of this resouce
574
- * @property {string} phoneNumber - The incoming phone number
575
- * @property {string} origin - The origin
576
- * @property {string} sid - A string that uniquely identifies this resource
577
- * @property {string} smsApplicationSid -
578
- * Unique string that identifies the application
579
- * @property {string} smsFallbackMethod - HTTP method used with sms fallback url
580
- * @property {string} smsFallbackUrl -
581
- * URL Twilio will request if an error occurs in executing TwiML
582
- * @property {string} smsMethod - HTTP method to use with sms url
583
- * @property {string} smsUrl - URL Twilio will request when receiving an SMS
584
- * @property {string} statusCallback -
585
- * URL Twilio will use to pass status parameters
586
- * @property {string} statusCallbackMethod -
587
- * HTTP method twilio will use with status callback
588
- * @property {string} trunkSid - Unique string to identify the trunk
589
- * @property {string} uri - The URI for this resource
590
- * @property {string} voiceApplicationSid -
591
- * The unique sid of the application to handle this number
592
- * @property {boolean} voiceCallerIdLookup - Look up the caller's caller-ID
593
- * @property {string} voiceFallbackMethod - HTTP method used with fallback_url
594
- * @property {string} voiceFallbackUrl -
595
- * URL Twilio will request when an error occurs in TwiML
596
- * @property {string} voiceMethod - HTTP method used with the voice url
597
- * @property {string} voiceUrl - URL Twilio will request when receiving a call
598
- * @property {incoming_phone_number.emergency_status} emergencyStatus -
599
- * The emergency_status
600
- * @property {string} emergencyAddressSid - The emergency_address_sid
601
- *
602
- * @param {Twilio.Api.V2010} version - Version of the resource
603
- * @param {object} payload - The instance payload
604
- * @param {sid} accountSid - The account_sid
605
- * @param {sid} sid - Fetch by unique incoming-phone-number Sid
606
- */
607
- /* jshint ignore:end */
608
- IncomingPhoneNumberInstance = function IncomingPhoneNumberInstance(version,
609
- payload, accountSid, sid) {
610
- this._version = version;
611
-
612
- // Marshaled Properties
613
- this.accountSid = payload.account_sid; // jshint ignore:line
614
- this.addressRequirements = payload.address_requirements; // jshint ignore:line
615
- this.apiVersion = payload.api_version; // jshint ignore:line
616
- this.beta = payload.beta; // jshint ignore:line
617
- this.capabilities = payload.capabilities; // jshint ignore:line
618
- this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line
619
- this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line
620
- this.friendlyName = payload.friendly_name; // jshint ignore:line
621
- this.phoneNumber = payload.phone_number; // jshint ignore:line
622
- this.origin = payload.origin; // jshint ignore:line
623
- this.sid = payload.sid; // jshint ignore:line
624
- this.smsApplicationSid = payload.sms_application_sid; // jshint ignore:line
625
- this.smsFallbackMethod = payload.sms_fallback_method; // jshint ignore:line
626
- this.smsFallbackUrl = payload.sms_fallback_url; // jshint ignore:line
627
- this.smsMethod = payload.sms_method; // jshint ignore:line
628
- this.smsUrl = payload.sms_url; // jshint ignore:line
629
- this.statusCallback = payload.status_callback; // jshint ignore:line
630
- this.statusCallbackMethod = payload.status_callback_method; // jshint ignore:line
631
- this.trunkSid = payload.trunk_sid; // jshint ignore:line
632
- this.uri = payload.uri; // jshint ignore:line
633
- this.voiceApplicationSid = payload.voice_application_sid; // jshint ignore:line
634
- this.voiceCallerIdLookup = payload.voice_caller_id_lookup; // jshint ignore:line
635
- this.voiceFallbackMethod = payload.voice_fallback_method; // jshint ignore:line
636
- this.voiceFallbackUrl = payload.voice_fallback_url; // jshint ignore:line
637
- this.voiceMethod = payload.voice_method; // jshint ignore:line
638
- this.voiceUrl = payload.voice_url; // jshint ignore:line
639
- this.emergencyStatus = payload.emergency_status; // jshint ignore:line
640
- this.emergencyAddressSid = payload.emergency_address_sid; // jshint ignore:line
641
-
642
- // Context
643
- this._context = undefined;
644
- this._solution = {
645
- accountSid: accountSid,
646
- sid: sid || this.sid,
647
- };
648
- };
649
-
650
- Object.defineProperty(IncomingPhoneNumberInstance.prototype,
651
- '_proxy', {
652
- get: function() {
653
- if (!this._context) {
654
- this._context = new IncomingPhoneNumberContext(
655
- this._version,
656
- this._solution.accountSid,
657
- this._solution.sid
658
- );
267
+ }
268
+ exports.IncomingPhoneNumberInstance = IncomingPhoneNumberInstance;
269
+ function IncomingPhoneNumberListInstance(version, accountSid) {
270
+ if (!(0, utility_1.isValidPathParam)(accountSid)) {
271
+ throw new Error("Parameter 'accountSid' is not valid.");
659
272
  }
660
-
661
- return this._context;
662
- }
663
- });
664
-
665
- /* jshint ignore:start */
666
- /**
667
- * update a IncomingPhoneNumberInstance
668
- *
669
- * @function update
670
- * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberInstance
671
- * @instance
672
- *
673
- * @param {object|function} opts - ...
674
- * @param {string} [opts.apiVersion] - The Twilio REST API version to use
675
- * @param {string} [opts.friendlyName] -
676
- * A human readable description of this resource
677
- * @param {string} [opts.smsApplicationSid] -
678
- * Unique string that identifies the application
679
- * @param {string} [opts.smsFallbackMethod] -
680
- * HTTP method used with sms fallback url
681
- * @param {string} [opts.smsFallbackUrl] -
682
- * URL Twilio will request if an error occurs in executing TwiML
683
- * @param {string} [opts.smsMethod] - HTTP method to use with sms url
684
- * @param {string} [opts.smsUrl] - URL Twilio will request when receiving an SMS
685
- * @param {string} [opts.statusCallback] -
686
- * URL Twilio will use to pass status parameters
687
- * @param {string} [opts.statusCallbackMethod] -
688
- * HTTP method twilio will use with status callback
689
- * @param {string} [opts.voiceApplicationSid] -
690
- * The unique sid of the application to handle this number
691
- * @param {boolean} [opts.voiceCallerIdLookup] - Look up the caller's caller-ID
692
- * @param {string} [opts.voiceFallbackMethod] - HTTP method used with fallback_url
693
- * @param {string} [opts.voiceFallbackUrl] -
694
- * URL Twilio will request when an error occurs in TwiML
695
- * @param {string} [opts.voiceMethod] - HTTP method used with the voice url
696
- * @param {string} [opts.voiceUrl] - URL Twilio will request when receiving a call
697
- * @param {incoming_phone_number.emergency_status} [opts.emergencyStatus] -
698
- * The emergency_status
699
- * @param {string} [opts.emergencyAddressSid] - The emergency_address_sid
700
- * @param {string} [opts.trunkSid] - Unique string to identify the trunk
701
- * @param {function} [callback] - Callback to handle processed record
702
- *
703
- * @returns {Promise} Resolves to processed IncomingPhoneNumberInstance
704
- */
705
- /* jshint ignore:end */
706
- IncomingPhoneNumberInstance.prototype.update = function update(opts, callback) {
707
- return this._proxy.update(opts, callback);
708
- };
709
-
710
- /* jshint ignore:start */
711
- /**
712
- * fetch a IncomingPhoneNumberInstance
713
- *
714
- * @function fetch
715
- * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberInstance
716
- * @instance
717
- *
718
- * @param {function} [callback] - Callback to handle processed record
719
- *
720
- * @returns {Promise} Resolves to processed IncomingPhoneNumberInstance
721
- */
722
- /* jshint ignore:end */
723
- IncomingPhoneNumberInstance.prototype.fetch = function fetch(callback) {
724
- return this._proxy.fetch(callback);
725
- };
726
-
727
- /* jshint ignore:start */
728
- /**
729
- * remove a IncomingPhoneNumberInstance
730
- *
731
- * @function remove
732
- * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberInstance
733
- * @instance
734
- *
735
- * @param {function} [callback] - Callback to handle processed record
736
- *
737
- * @returns {Promise} Resolves to processed IncomingPhoneNumberInstance
738
- */
739
- /* jshint ignore:end */
740
- IncomingPhoneNumberInstance.prototype.remove = function remove(callback) {
741
- return this._proxy.remove(callback);
742
- };
743
-
744
- /* jshint ignore:start */
745
- /**
746
- * Access the assignedAddOns
747
- *
748
- * @function assignedAddOns
749
- * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberInstance
750
- * @instance
751
- *
752
- * @returns {Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnList}
753
- */
754
- /* jshint ignore:end */
755
- IncomingPhoneNumberInstance.prototype.assignedAddOns = function assignedAddOns()
756
- {
757
- return this._proxy.assignedAddOns;
758
- };
759
-
760
-
761
- /* jshint ignore:start */
762
- /**
763
- * @constructor Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext
764
- * @description Initialize the IncomingPhoneNumberContext
765
- *
766
- * @property {Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnList} assignedAddOns -
767
- * assignedAddOns resource
768
- *
769
- * @param {Twilio.Api.V2010} version - Version of the resource
770
- * @param {sid} accountSid - The account_sid
771
- * @param {sid} sid - Fetch by unique incoming-phone-number Sid
772
- */
773
- /* jshint ignore:end */
774
- IncomingPhoneNumberContext = function IncomingPhoneNumberContext(version,
775
- accountSid, sid) {
776
- this._version = version;
777
-
778
- // Path Solution
779
- this._solution = {
780
- accountSid: accountSid,
781
- sid: sid,
782
- };
783
- this._uri = _.template(
784
- '/Accounts/<%= accountSid %>/IncomingPhoneNumbers/<%= sid %>.json' // jshint ignore:line
785
- )(this._solution);
786
-
787
- // Dependents
788
- this._assignedAddOns = undefined;
789
- };
790
-
791
- /* jshint ignore:start */
792
- /**
793
- * update a IncomingPhoneNumberInstance
794
- *
795
- * @function update
796
- * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext
797
- * @instance
798
- *
799
- * @param {object|function} opts - ...
800
- * @param {string} [opts.apiVersion] - The Twilio REST API version to use
801
- * @param {string} [opts.friendlyName] -
802
- * A human readable description of this resource
803
- * @param {string} [opts.smsApplicationSid] -
804
- * Unique string that identifies the application
805
- * @param {string} [opts.smsFallbackMethod] -
806
- * HTTP method used with sms fallback url
807
- * @param {string} [opts.smsFallbackUrl] -
808
- * URL Twilio will request if an error occurs in executing TwiML
809
- * @param {string} [opts.smsMethod] - HTTP method to use with sms url
810
- * @param {string} [opts.smsUrl] - URL Twilio will request when receiving an SMS
811
- * @param {string} [opts.statusCallback] -
812
- * URL Twilio will use to pass status parameters
813
- * @param {string} [opts.statusCallbackMethod] -
814
- * HTTP method twilio will use with status callback
815
- * @param {string} [opts.voiceApplicationSid] -
816
- * The unique sid of the application to handle this number
817
- * @param {boolean} [opts.voiceCallerIdLookup] - Look up the caller's caller-ID
818
- * @param {string} [opts.voiceFallbackMethod] - HTTP method used with fallback_url
819
- * @param {string} [opts.voiceFallbackUrl] -
820
- * URL Twilio will request when an error occurs in TwiML
821
- * @param {string} [opts.voiceMethod] - HTTP method used with the voice url
822
- * @param {string} [opts.voiceUrl] - URL Twilio will request when receiving a call
823
- * @param {incoming_phone_number.emergency_status} [opts.emergencyStatus] -
824
- * The emergency_status
825
- * @param {string} [opts.emergencyAddressSid] - The emergency_address_sid
826
- * @param {string} [opts.trunkSid] - Unique string to identify the trunk
827
- * @param {function} [callback] - Callback to handle processed record
828
- *
829
- * @returns {Promise} Resolves to processed IncomingPhoneNumberInstance
830
- */
831
- /* jshint ignore:end */
832
- IncomingPhoneNumberContext.prototype.update = function update(opts, callback) {
833
- if (_.isFunction(opts)) {
834
- callback = opts;
835
- opts = {};
836
- }
837
- opts = opts || {};
838
-
839
- var deferred = Q.defer();
840
- var data = values.of({
841
- 'ApiVersion': _.get(opts, 'apiVersion'),
842
- 'FriendlyName': _.get(opts, 'friendlyName'),
843
- 'SmsApplicationSid': _.get(opts, 'smsApplicationSid'),
844
- 'SmsFallbackMethod': _.get(opts, 'smsFallbackMethod'),
845
- 'SmsFallbackUrl': _.get(opts, 'smsFallbackUrl'),
846
- 'SmsMethod': _.get(opts, 'smsMethod'),
847
- 'SmsUrl': _.get(opts, 'smsUrl'),
848
- 'StatusCallback': _.get(opts, 'statusCallback'),
849
- 'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'),
850
- 'VoiceApplicationSid': _.get(opts, 'voiceApplicationSid'),
851
- 'VoiceCallerIdLookup': serialize.bool(_.get(opts, 'voiceCallerIdLookup')),
852
- 'VoiceFallbackMethod': _.get(opts, 'voiceFallbackMethod'),
853
- 'VoiceFallbackUrl': _.get(opts, 'voiceFallbackUrl'),
854
- 'VoiceMethod': _.get(opts, 'voiceMethod'),
855
- 'VoiceUrl': _.get(opts, 'voiceUrl'),
856
- 'EmergencyStatus': _.get(opts, 'emergencyStatus'),
857
- 'EmergencyAddressSid': _.get(opts, 'emergencyAddressSid'),
858
- 'TrunkSid': _.get(opts, 'trunkSid')
859
- });
860
-
861
- var promise = this._version.update({
862
- uri: this._uri,
863
- method: 'POST',
864
- data: data
865
- });
866
-
867
- promise = promise.then(function(payload) {
868
- deferred.resolve(new IncomingPhoneNumberInstance(
869
- this._version,
870
- payload,
871
- this._solution.accountSid,
872
- this._solution.sid
873
- ));
874
- }.bind(this));
875
-
876
- promise.catch(function(error) {
877
- deferred.reject(error);
878
- });
879
-
880
- if (_.isFunction(callback)) {
881
- deferred.promise.nodeify(callback);
882
- }
883
-
884
- return deferred.promise;
885
- };
886
-
887
- /* jshint ignore:start */
888
- /**
889
- * fetch a IncomingPhoneNumberInstance
890
- *
891
- * @function fetch
892
- * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext
893
- * @instance
894
- *
895
- * @param {function} [callback] - Callback to handle processed record
896
- *
897
- * @returns {Promise} Resolves to processed IncomingPhoneNumberInstance
898
- */
899
- /* jshint ignore:end */
900
- IncomingPhoneNumberContext.prototype.fetch = function fetch(callback) {
901
- var deferred = Q.defer();
902
- var promise = this._version.fetch({
903
- uri: this._uri,
904
- method: 'GET'
905
- });
906
-
907
- promise = promise.then(function(payload) {
908
- deferred.resolve(new IncomingPhoneNumberInstance(
909
- this._version,
910
- payload,
911
- this._solution.accountSid,
912
- this._solution.sid
913
- ));
914
- }.bind(this));
915
-
916
- promise.catch(function(error) {
917
- deferred.reject(error);
918
- });
919
-
920
- if (_.isFunction(callback)) {
921
- deferred.promise.nodeify(callback);
922
- }
923
-
924
- return deferred.promise;
925
- };
926
-
927
- /* jshint ignore:start */
928
- /**
929
- * remove a IncomingPhoneNumberInstance
930
- *
931
- * @function remove
932
- * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext
933
- * @instance
934
- *
935
- * @param {function} [callback] - Callback to handle processed record
936
- *
937
- * @returns {Promise} Resolves to processed IncomingPhoneNumberInstance
938
- */
939
- /* jshint ignore:end */
940
- IncomingPhoneNumberContext.prototype.remove = function remove(callback) {
941
- var deferred = Q.defer();
942
- var promise = this._version.remove({
943
- uri: this._uri,
944
- method: 'DELETE'
945
- });
946
-
947
- promise = promise.then(function(payload) {
948
- deferred.resolve(payload);
949
- }.bind(this));
950
-
951
- promise.catch(function(error) {
952
- deferred.reject(error);
953
- });
954
-
955
- if (_.isFunction(callback)) {
956
- deferred.promise.nodeify(callback);
957
- }
958
-
959
- return deferred.promise;
960
- };
961
-
962
- Object.defineProperty(IncomingPhoneNumberContext.prototype,
963
- 'assignedAddOns', {
964
- get: function() {
965
- if (!this._assignedAddOns) {
966
- this._assignedAddOns = new AssignedAddOnList(
967
- this._version,
968
- this._solution.accountSid,
969
- this._solution.sid
970
- );
273
+ const instance = ((sid) => instance.get(sid));
274
+ instance.get = function get(sid) {
275
+ return new IncomingPhoneNumberContextImpl(version, accountSid, sid);
276
+ };
277
+ instance._version = version;
278
+ instance._solution = { accountSid };
279
+ instance._uri = `/Accounts/${accountSid}/IncomingPhoneNumbers.json`;
280
+ Object.defineProperty(instance, "local", {
281
+ get: function local() {
282
+ if (!instance._local) {
283
+ instance._local = (0, local_1.LocalListInstance)(instance._version, instance._solution.accountSid);
284
+ }
285
+ return instance._local;
286
+ },
287
+ });
288
+ Object.defineProperty(instance, "mobile", {
289
+ get: function mobile() {
290
+ if (!instance._mobile) {
291
+ instance._mobile = (0, mobile_1.MobileListInstance)(instance._version, instance._solution.accountSid);
292
+ }
293
+ return instance._mobile;
294
+ },
295
+ });
296
+ Object.defineProperty(instance, "tollFree", {
297
+ get: function tollFree() {
298
+ if (!instance._tollFree) {
299
+ instance._tollFree = (0, tollFree_1.TollFreeListInstance)(instance._version, instance._solution.accountSid);
300
+ }
301
+ return instance._tollFree;
302
+ },
303
+ });
304
+ instance.create = function create(params, callback) {
305
+ if (params instanceof Function) {
306
+ callback = params;
307
+ params = {};
308
+ }
309
+ else {
310
+ params = params || {};
311
+ }
312
+ let data = {};
313
+ if (params["apiVersion"] !== undefined)
314
+ data["ApiVersion"] = params["apiVersion"];
315
+ if (params["friendlyName"] !== undefined)
316
+ data["FriendlyName"] = params["friendlyName"];
317
+ if (params["smsApplicationSid"] !== undefined)
318
+ data["SmsApplicationSid"] = params["smsApplicationSid"];
319
+ if (params["smsFallbackMethod"] !== undefined)
320
+ data["SmsFallbackMethod"] = params["smsFallbackMethod"];
321
+ if (params["smsFallbackUrl"] !== undefined)
322
+ data["SmsFallbackUrl"] = params["smsFallbackUrl"];
323
+ if (params["smsMethod"] !== undefined)
324
+ data["SmsMethod"] = params["smsMethod"];
325
+ if (params["smsUrl"] !== undefined)
326
+ data["SmsUrl"] = params["smsUrl"];
327
+ if (params["statusCallback"] !== undefined)
328
+ data["StatusCallback"] = params["statusCallback"];
329
+ if (params["statusCallbackMethod"] !== undefined)
330
+ data["StatusCallbackMethod"] = params["statusCallbackMethod"];
331
+ if (params["voiceApplicationSid"] !== undefined)
332
+ data["VoiceApplicationSid"] = params["voiceApplicationSid"];
333
+ if (params["voiceCallerIdLookup"] !== undefined)
334
+ data["VoiceCallerIdLookup"] = serialize.bool(params["voiceCallerIdLookup"]);
335
+ if (params["voiceFallbackMethod"] !== undefined)
336
+ data["VoiceFallbackMethod"] = params["voiceFallbackMethod"];
337
+ if (params["voiceFallbackUrl"] !== undefined)
338
+ data["VoiceFallbackUrl"] = params["voiceFallbackUrl"];
339
+ if (params["voiceMethod"] !== undefined)
340
+ data["VoiceMethod"] = params["voiceMethod"];
341
+ if (params["voiceUrl"] !== undefined)
342
+ data["VoiceUrl"] = params["voiceUrl"];
343
+ if (params["emergencyStatus"] !== undefined)
344
+ data["EmergencyStatus"] = params["emergencyStatus"];
345
+ if (params["emergencyAddressSid"] !== undefined)
346
+ data["EmergencyAddressSid"] = params["emergencyAddressSid"];
347
+ if (params["trunkSid"] !== undefined)
348
+ data["TrunkSid"] = params["trunkSid"];
349
+ if (params["identitySid"] !== undefined)
350
+ data["IdentitySid"] = params["identitySid"];
351
+ if (params["addressSid"] !== undefined)
352
+ data["AddressSid"] = params["addressSid"];
353
+ if (params["voiceReceiveMode"] !== undefined)
354
+ data["VoiceReceiveMode"] = params["voiceReceiveMode"];
355
+ if (params["bundleSid"] !== undefined)
356
+ data["BundleSid"] = params["bundleSid"];
357
+ if (params["phoneNumber"] !== undefined)
358
+ data["PhoneNumber"] = params["phoneNumber"];
359
+ if (params["areaCode"] !== undefined)
360
+ data["AreaCode"] = params["areaCode"];
361
+ const headers = {};
362
+ headers["Content-Type"] = "application/x-www-form-urlencoded";
363
+ let operationVersion = version, operationPromise = operationVersion.create({
364
+ uri: instance._uri,
365
+ method: "post",
366
+ data,
367
+ headers,
368
+ });
369
+ operationPromise = operationPromise.then((payload) => new IncomingPhoneNumberInstance(operationVersion, payload, instance._solution.accountSid));
370
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
371
+ return operationPromise;
372
+ };
373
+ instance.page = function page(params, callback) {
374
+ if (params instanceof Function) {
375
+ callback = params;
376
+ params = {};
377
+ }
378
+ else {
379
+ params = params || {};
380
+ }
381
+ let data = {};
382
+ if (params["beta"] !== undefined)
383
+ data["Beta"] = serialize.bool(params["beta"]);
384
+ if (params["friendlyName"] !== undefined)
385
+ data["FriendlyName"] = params["friendlyName"];
386
+ if (params["phoneNumber"] !== undefined)
387
+ data["PhoneNumber"] = params["phoneNumber"];
388
+ if (params["origin"] !== undefined)
389
+ data["Origin"] = params["origin"];
390
+ if (params["pageSize"] !== undefined)
391
+ data["PageSize"] = params["pageSize"];
392
+ if (params.pageNumber !== undefined)
393
+ data["Page"] = params.pageNumber;
394
+ if (params.pageToken !== undefined)
395
+ data["PageToken"] = params.pageToken;
396
+ const headers = {};
397
+ let operationVersion = version, operationPromise = operationVersion.page({
398
+ uri: instance._uri,
399
+ method: "get",
400
+ params: data,
401
+ headers,
402
+ });
403
+ operationPromise = operationPromise.then((payload) => new IncomingPhoneNumberPage(operationVersion, payload, instance._solution));
404
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
405
+ return operationPromise;
406
+ };
407
+ instance.each = instance._version.each;
408
+ instance.list = instance._version.list;
409
+ instance.getPage = function getPage(targetUrl, callback) {
410
+ const operationPromise = instance._version._domain.twilio.request({
411
+ method: "get",
412
+ uri: targetUrl,
413
+ });
414
+ let pagePromise = operationPromise.then((payload) => new IncomingPhoneNumberPage(instance._version, payload, instance._solution));
415
+ pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
416
+ return pagePromise;
417
+ };
418
+ instance.toJSON = function toJSON() {
419
+ return instance._solution;
420
+ };
421
+ instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
422
+ return (0, util_1.inspect)(instance.toJSON(), options);
423
+ };
424
+ return instance;
425
+ }
426
+ exports.IncomingPhoneNumberListInstance = IncomingPhoneNumberListInstance;
427
+ class IncomingPhoneNumberPage extends Page_1.default {
428
+ /**
429
+ * Initialize the IncomingPhoneNumberPage
430
+ *
431
+ * @param version - Version of the resource
432
+ * @param response - Response from the API
433
+ * @param solution - Path solution
434
+ */
435
+ constructor(version, response, solution) {
436
+ super(version, response, solution);
971
437
  }
972
- return this._assignedAddOns;
973
- }
974
- });
975
-
976
- module.exports = {
977
- IncomingPhoneNumberList: IncomingPhoneNumberList,
978
- IncomingPhoneNumberPage: IncomingPhoneNumberPage,
979
- IncomingPhoneNumberInstance: IncomingPhoneNumberInstance,
980
- IncomingPhoneNumberContext: IncomingPhoneNumberContext
981
- };
438
+ /**
439
+ * Build an instance of IncomingPhoneNumberInstance
440
+ *
441
+ * @param payload - Payload response from the API
442
+ */
443
+ getInstance(payload) {
444
+ return new IncomingPhoneNumberInstance(this._version, payload, this._solution.accountSid);
445
+ }
446
+ [util_1.inspect.custom](depth, options) {
447
+ return (0, util_1.inspect)(this.toJSON(), options);
448
+ }
449
+ }
450
+ exports.IncomingPhoneNumberPage = IncomingPhoneNumberPage;