twilio 3.71.2 → 3.73.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (364) hide show
  1. package/CHANGES.md +91 -0
  2. package/README.md +1 -1
  3. package/lib/rest/Insights.d.ts +4 -0
  4. package/lib/rest/Insights.js +16 -0
  5. package/lib/rest/Supersim.d.ts +4 -0
  6. package/lib/rest/Supersim.js +17 -0
  7. package/lib/rest/Voice.d.ts +2 -0
  8. package/lib/rest/Voice.js +9 -0
  9. package/lib/rest/accounts/v1/credential/aws.js +2 -0
  10. package/lib/rest/accounts/v1/credential/publicKey.js +2 -0
  11. package/lib/rest/api/v2010/account/address/dependentPhoneNumber.js +2 -0
  12. package/lib/rest/api/v2010/account/address.js +2 -0
  13. package/lib/rest/api/v2010/account/application.js +2 -0
  14. package/lib/rest/api/v2010/account/authorizedConnectApp.js +2 -0
  15. package/lib/rest/api/v2010/account/availablePhoneNumber/local.js +2 -0
  16. package/lib/rest/api/v2010/account/availablePhoneNumber/machineToMachine.js +2 -0
  17. package/lib/rest/api/v2010/account/availablePhoneNumber/mobile.js +2 -0
  18. package/lib/rest/api/v2010/account/availablePhoneNumber/national.js +2 -0
  19. package/lib/rest/api/v2010/account/availablePhoneNumber/sharedCost.js +2 -0
  20. package/lib/rest/api/v2010/account/availablePhoneNumber/tollFree.js +2 -0
  21. package/lib/rest/api/v2010/account/availablePhoneNumber/voip.js +2 -0
  22. package/lib/rest/api/v2010/account/availablePhoneNumber.js +2 -0
  23. package/lib/rest/api/v2010/account/call/event.js +2 -0
  24. package/lib/rest/api/v2010/account/call/notification.js +2 -0
  25. package/lib/rest/api/v2010/account/call/recording.js +2 -0
  26. package/lib/rest/api/v2010/account/call.js +2 -0
  27. package/lib/rest/api/v2010/account/conference/participant.js +2 -0
  28. package/lib/rest/api/v2010/account/conference/recording.js +2 -0
  29. package/lib/rest/api/v2010/account/conference.js +2 -0
  30. package/lib/rest/api/v2010/account/connectApp.js +2 -0
  31. package/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn/assignedAddOnExtension.js +2 -0
  32. package/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn.js +2 -0
  33. package/lib/rest/api/v2010/account/incomingPhoneNumber/local.js +2 -0
  34. package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.js +2 -0
  35. package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.js +2 -0
  36. package/lib/rest/api/v2010/account/incomingPhoneNumber.js +2 -0
  37. package/lib/rest/api/v2010/account/key.js +2 -0
  38. package/lib/rest/api/v2010/account/message/media.js +2 -0
  39. package/lib/rest/api/v2010/account/message.d.ts +9 -1
  40. package/lib/rest/api/v2010/account/message.js +17 -2
  41. package/lib/rest/api/v2010/account/notification.js +2 -0
  42. package/lib/rest/api/v2010/account/outgoingCallerId.js +2 -0
  43. package/lib/rest/api/v2010/account/queue/member.js +2 -0
  44. package/lib/rest/api/v2010/account/queue.js +2 -0
  45. package/lib/rest/api/v2010/account/recording/addOnResult/payload.js +2 -0
  46. package/lib/rest/api/v2010/account/recording/addOnResult.js +2 -0
  47. package/lib/rest/api/v2010/account/recording/transcription.js +2 -0
  48. package/lib/rest/api/v2010/account/recording.js +2 -0
  49. package/lib/rest/api/v2010/account/shortCode.js +2 -0
  50. package/lib/rest/api/v2010/account/signingKey.js +2 -0
  51. package/lib/rest/api/v2010/account/sip/credentialList/credential.js +2 -0
  52. package/lib/rest/api/v2010/account/sip/credentialList.js +2 -0
  53. package/lib/rest/api/v2010/account/sip/domain/authTypes/authCallsMapping/authCallsCredentialListMapping.js +2 -0
  54. package/lib/rest/api/v2010/account/sip/domain/authTypes/authCallsMapping/authCallsIpAccessControlListMapping.js +2 -0
  55. package/lib/rest/api/v2010/account/sip/domain/authTypes/authRegistrationsMapping/authRegistrationsCredentialListMapping.js +2 -0
  56. package/lib/rest/api/v2010/account/sip/domain/credentialListMapping.js +2 -0
  57. package/lib/rest/api/v2010/account/sip/domain/ipAccessControlListMapping.js +2 -0
  58. package/lib/rest/api/v2010/account/sip/domain.js +2 -0
  59. package/lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.js +2 -0
  60. package/lib/rest/api/v2010/account/sip/ipAccessControlList.js +2 -0
  61. package/lib/rest/api/v2010/account/transcription.js +2 -0
  62. package/lib/rest/api/v2010/account/usage/record/allTime.js +2 -0
  63. package/lib/rest/api/v2010/account/usage/record/daily.js +2 -0
  64. package/lib/rest/api/v2010/account/usage/record/lastMonth.js +2 -0
  65. package/lib/rest/api/v2010/account/usage/record/monthly.js +2 -0
  66. package/lib/rest/api/v2010/account/usage/record/thisMonth.js +2 -0
  67. package/lib/rest/api/v2010/account/usage/record/today.js +2 -0
  68. package/lib/rest/api/v2010/account/usage/record/yearly.js +2 -0
  69. package/lib/rest/api/v2010/account/usage/record/yesterday.js +2 -0
  70. package/lib/rest/api/v2010/account/usage/record.js +2 -0
  71. package/lib/rest/api/v2010/account/usage/trigger.js +2 -0
  72. package/lib/rest/api/v2010/account.js +2 -0
  73. package/lib/rest/autopilot/v1/assistant/fieldType/fieldValue.js +2 -0
  74. package/lib/rest/autopilot/v1/assistant/fieldType.js +2 -0
  75. package/lib/rest/autopilot/v1/assistant/modelBuild.js +2 -0
  76. package/lib/rest/autopilot/v1/assistant/query.js +2 -0
  77. package/lib/rest/autopilot/v1/assistant/task/field.js +2 -0
  78. package/lib/rest/autopilot/v1/assistant/task/sample.js +2 -0
  79. package/lib/rest/autopilot/v1/assistant/task.js +2 -0
  80. package/lib/rest/autopilot/v1/assistant/webhook.js +2 -0
  81. package/lib/rest/autopilot/v1/assistant.js +2 -0
  82. package/lib/rest/bulkexports/v1/export/day.js +2 -0
  83. package/lib/rest/bulkexports/v1/export/exportCustomJob.js +2 -0
  84. package/lib/rest/chat/v1/credential.js +2 -0
  85. package/lib/rest/chat/v1/service/channel/invite.js +2 -0
  86. package/lib/rest/chat/v1/service/channel/member.js +2 -0
  87. package/lib/rest/chat/v1/service/channel/message.js +2 -0
  88. package/lib/rest/chat/v1/service/channel.js +2 -0
  89. package/lib/rest/chat/v1/service/role.js +2 -0
  90. package/lib/rest/chat/v1/service/user/userChannel.js +2 -0
  91. package/lib/rest/chat/v1/service/user.js +2 -0
  92. package/lib/rest/chat/v1/service.js +2 -0
  93. package/lib/rest/chat/v2/credential.js +2 -0
  94. package/lib/rest/chat/v2/service/binding.js +2 -0
  95. package/lib/rest/chat/v2/service/channel/invite.js +2 -0
  96. package/lib/rest/chat/v2/service/channel/member.js +2 -0
  97. package/lib/rest/chat/v2/service/channel/message.js +2 -0
  98. package/lib/rest/chat/v2/service/channel/webhook.js +2 -0
  99. package/lib/rest/chat/v2/service/channel.js +2 -0
  100. package/lib/rest/chat/v2/service/role.js +2 -0
  101. package/lib/rest/chat/v2/service/user/userBinding.js +2 -0
  102. package/lib/rest/chat/v2/service/user/userChannel.js +2 -0
  103. package/lib/rest/chat/v2/service/user.js +2 -0
  104. package/lib/rest/chat/v2/service.js +2 -0
  105. package/lib/rest/conversations/v1/conversation/message/deliveryReceipt.js +2 -0
  106. package/lib/rest/conversations/v1/conversation/message.js +2 -0
  107. package/lib/rest/conversations/v1/conversation/participant.js +2 -0
  108. package/lib/rest/conversations/v1/conversation/webhook.js +2 -0
  109. package/lib/rest/conversations/v1/conversation.js +2 -0
  110. package/lib/rest/conversations/v1/credential.js +2 -0
  111. package/lib/rest/conversations/v1/participantConversation.js +2 -0
  112. package/lib/rest/conversations/v1/role.js +2 -0
  113. package/lib/rest/conversations/v1/service/binding.js +2 -0
  114. package/lib/rest/conversations/v1/service/configuration/webhook.d.ts +172 -0
  115. package/lib/rest/conversations/v1/service/configuration/webhook.js +400 -0
  116. package/lib/rest/conversations/v1/service/configuration.d.ts +2 -0
  117. package/lib/rest/conversations/v1/service/configuration.js +13 -0
  118. package/lib/rest/conversations/v1/service/conversation/message/deliveryReceipt.js +2 -0
  119. package/lib/rest/conversations/v1/service/conversation/message.js +2 -0
  120. package/lib/rest/conversations/v1/service/conversation/participant.js +2 -0
  121. package/lib/rest/conversations/v1/service/conversation/webhook.js +2 -0
  122. package/lib/rest/conversations/v1/service/conversation.js +2 -0
  123. package/lib/rest/conversations/v1/service/participantConversation.js +2 -0
  124. package/lib/rest/conversations/v1/service/role.js +2 -0
  125. package/lib/rest/conversations/v1/service/user/userConversation.js +2 -0
  126. package/lib/rest/conversations/v1/service/user.js +2 -0
  127. package/lib/rest/conversations/v1/service.js +2 -0
  128. package/lib/rest/conversations/v1/user/userConversation.js +2 -0
  129. package/lib/rest/conversations/v1/user.js +2 -0
  130. package/lib/rest/events/v1/eventType.js +2 -0
  131. package/lib/rest/events/v1/schema/version.js +2 -0
  132. package/lib/rest/events/v1/sink.js +2 -0
  133. package/lib/rest/events/v1/subscription/subscribedEvent.js +2 -0
  134. package/lib/rest/events/v1/subscription.js +2 -0
  135. package/lib/rest/fax/v1/fax/faxMedia.js +2 -0
  136. package/lib/rest/fax/v1/fax.js +2 -0
  137. package/lib/rest/flexApi/v1/channel.js +2 -0
  138. package/lib/rest/flexApi/v1/configuration.d.ts +4 -0
  139. package/lib/rest/flexApi/v1/configuration.js +5 -0
  140. package/lib/rest/flexApi/v1/flexFlow.d.ts +2 -2
  141. package/lib/rest/flexApi/v1/flexFlow.js +5 -3
  142. package/lib/rest/flexApi/v1/webChannel.js +2 -0
  143. package/lib/rest/insights/V1.d.ts +6 -0
  144. package/lib/rest/insights/V1.js +22 -0
  145. package/lib/rest/insights/v1/call/event.js +2 -0
  146. package/lib/rest/insights/v1/call/metric.js +2 -0
  147. package/lib/rest/insights/v1/callSummaries.js +2 -0
  148. package/lib/rest/insights/v1/conference/conferenceParticipant.d.ts +385 -0
  149. package/lib/rest/insights/v1/conference/conferenceParticipant.js +663 -0
  150. package/lib/rest/insights/v1/conference.d.ts +387 -0
  151. package/lib/rest/insights/v1/conference.js +669 -0
  152. package/lib/rest/insights/v1/room/participant.js +2 -0
  153. package/lib/rest/insights/v1/room.js +2 -0
  154. package/lib/rest/insights/v1/setting.d.ts +181 -0
  155. package/lib/rest/insights/v1/setting.js +384 -0
  156. package/lib/rest/ipMessaging/v1/credential.js +2 -0
  157. package/lib/rest/ipMessaging/v1/service/channel/invite.js +2 -0
  158. package/lib/rest/ipMessaging/v1/service/channel/member.js +2 -0
  159. package/lib/rest/ipMessaging/v1/service/channel/message.js +2 -0
  160. package/lib/rest/ipMessaging/v1/service/channel.js +2 -0
  161. package/lib/rest/ipMessaging/v1/service/role.js +2 -0
  162. package/lib/rest/ipMessaging/v1/service/user/userChannel.js +2 -0
  163. package/lib/rest/ipMessaging/v1/service/user.js +2 -0
  164. package/lib/rest/ipMessaging/v1/service.js +2 -0
  165. package/lib/rest/ipMessaging/v2/credential.js +2 -0
  166. package/lib/rest/ipMessaging/v2/service/binding.js +2 -0
  167. package/lib/rest/ipMessaging/v2/service/channel/invite.js +2 -0
  168. package/lib/rest/ipMessaging/v2/service/channel/member.js +2 -0
  169. package/lib/rest/ipMessaging/v2/service/channel/message.js +2 -0
  170. package/lib/rest/ipMessaging/v2/service/channel/webhook.js +2 -0
  171. package/lib/rest/ipMessaging/v2/service/channel.js +2 -0
  172. package/lib/rest/ipMessaging/v2/service/role.js +2 -0
  173. package/lib/rest/ipMessaging/v2/service/user/userBinding.js +2 -0
  174. package/lib/rest/ipMessaging/v2/service/user/userChannel.js +2 -0
  175. package/lib/rest/ipMessaging/v2/service/user.js +2 -0
  176. package/lib/rest/ipMessaging/v2/service.js +2 -0
  177. package/lib/rest/media/v1/mediaProcessor.d.ts +4 -0
  178. package/lib/rest/media/v1/mediaProcessor.js +7 -1
  179. package/lib/rest/media/v1/playerStreamer.js +2 -0
  180. package/lib/rest/messaging/v1/brandRegistration/brandVetting.js +2 -0
  181. package/lib/rest/messaging/v1/brandRegistration.d.ts +14 -0
  182. package/lib/rest/messaging/v1/brandRegistration.js +51 -0
  183. package/lib/rest/messaging/v1/service/alphaSender.js +2 -0
  184. package/lib/rest/messaging/v1/service/phoneNumber.js +2 -0
  185. package/lib/rest/messaging/v1/service/shortCode.js +2 -0
  186. package/lib/rest/messaging/v1/service/usAppToPerson.js +2 -0
  187. package/lib/rest/messaging/v1/service.js +2 -0
  188. package/lib/rest/monitor/v1/alert.js +2 -0
  189. package/lib/rest/monitor/v1/event.js +2 -0
  190. package/lib/rest/notify/v1/credential.js +2 -0
  191. package/lib/rest/notify/v1/service/binding.js +2 -0
  192. package/lib/rest/notify/v1/service.js +2 -0
  193. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.d.ts +154 -1
  194. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.js +244 -0
  195. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/evaluation.js +2 -0
  196. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/itemAssignment.js +2 -0
  197. package/lib/rest/numbers/v2/regulatoryCompliance/bundle.js +2 -0
  198. package/lib/rest/numbers/v2/regulatoryCompliance/endUser.js +2 -0
  199. package/lib/rest/numbers/v2/regulatoryCompliance/endUserType.js +2 -0
  200. package/lib/rest/numbers/v2/regulatoryCompliance/regulation.js +2 -0
  201. package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.js +2 -0
  202. package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocumentType.js +2 -0
  203. package/lib/rest/preview/bulk_exports/export/day.js +2 -0
  204. package/lib/rest/preview/bulk_exports/export/exportCustomJob.js +2 -0
  205. package/lib/rest/preview/deployed_devices/fleet/certificate.js +2 -0
  206. package/lib/rest/preview/deployed_devices/fleet/deployment.js +2 -0
  207. package/lib/rest/preview/deployed_devices/fleet/device.js +2 -0
  208. package/lib/rest/preview/deployed_devices/fleet/key.js +2 -0
  209. package/lib/rest/preview/deployed_devices/fleet.js +2 -0
  210. package/lib/rest/preview/hosted_numbers/authorizationDocument/dependentHostedNumberOrder.js +2 -0
  211. package/lib/rest/preview/hosted_numbers/authorizationDocument.js +2 -0
  212. package/lib/rest/preview/hosted_numbers/hostedNumberOrder.js +2 -0
  213. package/lib/rest/preview/marketplace/availableAddOn/availableAddOnExtension.js +2 -0
  214. package/lib/rest/preview/marketplace/availableAddOn.js +2 -0
  215. package/lib/rest/preview/marketplace/installedAddOn/installedAddOnExtension.js +2 -0
  216. package/lib/rest/preview/marketplace/installedAddOn.js +2 -0
  217. package/lib/rest/preview/sync/service/document/documentPermission.js +2 -0
  218. package/lib/rest/preview/sync/service/document.js +2 -0
  219. package/lib/rest/preview/sync/service/syncList/syncListItem.js +2 -0
  220. package/lib/rest/preview/sync/service/syncList/syncListPermission.js +2 -0
  221. package/lib/rest/preview/sync/service/syncList.js +2 -0
  222. package/lib/rest/preview/sync/service/syncMap/syncMapItem.js +2 -0
  223. package/lib/rest/preview/sync/service/syncMap/syncMapPermission.js +2 -0
  224. package/lib/rest/preview/sync/service/syncMap.js +2 -0
  225. package/lib/rest/preview/sync/service.js +2 -0
  226. package/lib/rest/preview/understand/assistant/fieldType/fieldValue.js +2 -0
  227. package/lib/rest/preview/understand/assistant/fieldType.js +2 -0
  228. package/lib/rest/preview/understand/assistant/modelBuild.js +2 -0
  229. package/lib/rest/preview/understand/assistant/query.js +2 -0
  230. package/lib/rest/preview/understand/assistant/task/field.js +2 -0
  231. package/lib/rest/preview/understand/assistant/task/sample.js +2 -0
  232. package/lib/rest/preview/understand/assistant/task.js +2 -0
  233. package/lib/rest/preview/understand/assistant.js +2 -0
  234. package/lib/rest/preview/wireless/command.js +2 -0
  235. package/lib/rest/preview/wireless/ratePlan.js +2 -0
  236. package/lib/rest/preview/wireless/sim.js +2 -0
  237. package/lib/rest/pricing/v1/messaging/country.js +2 -0
  238. package/lib/rest/pricing/v1/phoneNumber/country.js +2 -0
  239. package/lib/rest/pricing/v1/voice/country.js +2 -0
  240. package/lib/rest/pricing/v2/country.js +2 -0
  241. package/lib/rest/pricing/v2/voice/country.js +2 -0
  242. package/lib/rest/proxy/v1/service/phoneNumber.js +2 -0
  243. package/lib/rest/proxy/v1/service/session/interaction.js +2 -0
  244. package/lib/rest/proxy/v1/service/session/participant/messageInteraction.js +2 -0
  245. package/lib/rest/proxy/v1/service/session/participant.js +2 -0
  246. package/lib/rest/proxy/v1/service/session.js +2 -0
  247. package/lib/rest/proxy/v1/service/shortCode.js +2 -0
  248. package/lib/rest/proxy/v1/service.js +2 -0
  249. package/lib/rest/serverless/v1/service/asset/assetVersion.js +2 -0
  250. package/lib/rest/serverless/v1/service/asset.js +2 -0
  251. package/lib/rest/serverless/v1/service/build.js +2 -0
  252. package/lib/rest/serverless/v1/service/environment/deployment.js +2 -0
  253. package/lib/rest/serverless/v1/service/environment/log.js +2 -0
  254. package/lib/rest/serverless/v1/service/environment/variable.js +2 -0
  255. package/lib/rest/serverless/v1/service/environment.js +2 -0
  256. package/lib/rest/serverless/v1/service/function/functionVersion.js +2 -0
  257. package/lib/rest/serverless/v1/service/function.js +2 -0
  258. package/lib/rest/serverless/v1/service.js +2 -0
  259. package/lib/rest/studio/v1/flow/engagement/step.js +2 -0
  260. package/lib/rest/studio/v1/flow/engagement.js +2 -0
  261. package/lib/rest/studio/v1/flow/execution/executionStep.js +2 -0
  262. package/lib/rest/studio/v1/flow/execution.js +2 -0
  263. package/lib/rest/studio/v1/flow.js +2 -0
  264. package/lib/rest/studio/v2/flow/execution/executionStep.js +2 -0
  265. package/lib/rest/studio/v2/flow/execution.js +2 -0
  266. package/lib/rest/studio/v2/flow/flowRevision.js +2 -0
  267. package/lib/rest/studio/v2/flow.js +2 -0
  268. package/lib/rest/supersim/V1.d.ts +6 -0
  269. package/lib/rest/supersim/V1.js +23 -0
  270. package/lib/rest/supersim/v1/command.js +2 -0
  271. package/lib/rest/supersim/v1/esimProfile.d.ts +344 -0
  272. package/lib/rest/supersim/v1/esimProfile.js +664 -0
  273. package/lib/rest/supersim/v1/fleet.js +2 -0
  274. package/lib/rest/supersim/v1/ipCommand.d.ts +362 -0
  275. package/lib/rest/supersim/v1/ipCommand.js +681 -0
  276. package/lib/rest/supersim/v1/network.js +2 -0
  277. package/lib/rest/supersim/v1/networkAccessProfile/networkAccessProfileNetwork.js +2 -0
  278. package/lib/rest/supersim/v1/networkAccessProfile.js +2 -0
  279. package/lib/rest/supersim/v1/sim/billingPeriod.js +2 -0
  280. package/lib/rest/supersim/v1/sim.js +2 -0
  281. package/lib/rest/supersim/v1/smsCommand.js +2 -0
  282. package/lib/rest/supersim/v1/usageRecord.js +2 -0
  283. package/lib/rest/sync/v1/service/document/documentPermission.js +2 -0
  284. package/lib/rest/sync/v1/service/document.js +2 -0
  285. package/lib/rest/sync/v1/service/syncList/syncListItem.js +2 -0
  286. package/lib/rest/sync/v1/service/syncList/syncListPermission.js +2 -0
  287. package/lib/rest/sync/v1/service/syncList.js +2 -0
  288. package/lib/rest/sync/v1/service/syncMap/syncMapItem.js +2 -0
  289. package/lib/rest/sync/v1/service/syncMap/syncMapPermission.js +2 -0
  290. package/lib/rest/sync/v1/service/syncMap.js +2 -0
  291. package/lib/rest/sync/v1/service/syncStream.js +2 -0
  292. package/lib/rest/sync/v1/service.js +2 -0
  293. package/lib/rest/taskrouter/v1/workspace/activity.js +2 -0
  294. package/lib/rest/taskrouter/v1/workspace/event.js +2 -0
  295. package/lib/rest/taskrouter/v1/workspace/task/reservation.js +2 -0
  296. package/lib/rest/taskrouter/v1/workspace/task.js +2 -0
  297. package/lib/rest/taskrouter/v1/workspace/taskChannel.js +2 -0
  298. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueuesStatistics.js +2 -0
  299. package/lib/rest/taskrouter/v1/workspace/taskQueue.js +2 -0
  300. package/lib/rest/taskrouter/v1/workspace/worker/reservation.js +2 -0
  301. package/lib/rest/taskrouter/v1/workspace/worker/workerChannel.js +2 -0
  302. package/lib/rest/taskrouter/v1/workspace/worker.js +2 -0
  303. package/lib/rest/taskrouter/v1/workspace/workflow.js +2 -0
  304. package/lib/rest/taskrouter/v1/workspace.js +2 -0
  305. package/lib/rest/trunking/v1/trunk/credentialList.js +2 -0
  306. package/lib/rest/trunking/v1/trunk/ipAccessControlList.js +2 -0
  307. package/lib/rest/trunking/v1/trunk/originationUrl.js +2 -0
  308. package/lib/rest/trunking/v1/trunk/phoneNumber.js +2 -0
  309. package/lib/rest/trunking/v1/trunk.js +2 -0
  310. package/lib/rest/trusthub/v1/customerProfiles/customerProfilesChannelEndpointAssignment.js +2 -0
  311. package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEntityAssignments.js +2 -0
  312. package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.js +2 -0
  313. package/lib/rest/trusthub/v1/customerProfiles.js +2 -0
  314. package/lib/rest/trusthub/v1/endUser.js +2 -0
  315. package/lib/rest/trusthub/v1/endUserType.js +2 -0
  316. package/lib/rest/trusthub/v1/policies.js +2 -0
  317. package/lib/rest/trusthub/v1/supportingDocument.js +2 -0
  318. package/lib/rest/trusthub/v1/supportingDocumentType.js +2 -0
  319. package/lib/rest/trusthub/v1/trustProducts/trustProductsChannelEndpointAssignment.js +2 -0
  320. package/lib/rest/trusthub/v1/trustProducts/trustProductsEntityAssignments.js +2 -0
  321. package/lib/rest/trusthub/v1/trustProducts/trustProductsEvaluations.js +2 -0
  322. package/lib/rest/trusthub/v1/trustProducts.js +2 -0
  323. package/lib/rest/verify/v2/service/accessToken.d.ts +64 -4
  324. package/lib/rest/verify/v2/service/accessToken.js +158 -8
  325. package/lib/rest/verify/v2/service/entity/challenge.js +2 -0
  326. package/lib/rest/verify/v2/service/entity/factor.js +2 -0
  327. package/lib/rest/verify/v2/service/entity.js +2 -0
  328. package/lib/rest/verify/v2/service/messagingConfiguration.js +2 -0
  329. package/lib/rest/verify/v2/service/rateLimit/bucket.js +2 -0
  330. package/lib/rest/verify/v2/service/rateLimit.js +2 -0
  331. package/lib/rest/verify/v2/service/webhook.js +2 -0
  332. package/lib/rest/verify/v2/service.js +2 -0
  333. package/lib/rest/verify/v2/template.js +2 -0
  334. package/lib/rest/verify/v2/verificationAttempt.js +2 -0
  335. package/lib/rest/video/v1/composition.d.ts +2 -0
  336. package/lib/rest/video/v1/composition.js +5 -0
  337. package/lib/rest/video/v1/compositionHook.js +2 -0
  338. package/lib/rest/video/v1/recording.d.ts +2 -0
  339. package/lib/rest/video/v1/recording.js +5 -0
  340. package/lib/rest/video/v1/room/recording.d.ts +2 -0
  341. package/lib/rest/video/v1/room/recording.js +5 -0
  342. package/lib/rest/video/v1/room/roomParticipant/roomParticipantPublishedTrack.js +2 -0
  343. package/lib/rest/video/v1/room/roomParticipant/roomParticipantSubscribedTrack.js +2 -0
  344. package/lib/rest/video/v1/room/roomParticipant.js +2 -0
  345. package/lib/rest/video/v1/room.d.ts +12 -0
  346. package/lib/rest/video/v1/room.js +21 -1
  347. package/lib/rest/voice/V1.d.ts +3 -0
  348. package/lib/rest/voice/V1.js +12 -0
  349. package/lib/rest/voice/v1/archivedCall.d.ts +136 -0
  350. package/lib/rest/voice/v1/archivedCall.js +325 -0
  351. package/lib/rest/voice/v1/byocTrunk.js +2 -0
  352. package/lib/rest/voice/v1/connectionPolicy/connectionPolicyTarget.js +2 -0
  353. package/lib/rest/voice/v1/connectionPolicy.js +2 -0
  354. package/lib/rest/voice/v1/dialingPermissions/country/highriskSpecialPrefix.js +2 -0
  355. package/lib/rest/voice/v1/dialingPermissions/country.js +2 -0
  356. package/lib/rest/voice/v1/ipRecord.js +2 -0
  357. package/lib/rest/voice/v1/sourceIpMapping.js +2 -0
  358. package/lib/rest/wireless/v1/command.js +2 -0
  359. package/lib/rest/wireless/v1/ratePlan.js +2 -0
  360. package/lib/rest/wireless/v1/sim/dataSession.js +2 -0
  361. package/lib/rest/wireless/v1/sim/usageRecord.js +2 -0
  362. package/lib/rest/wireless/v1/sim.js +6 -8
  363. package/lib/rest/wireless/v1/usageRecord.js +2 -0
  364. package/package.json +2 -2
@@ -0,0 +1,681 @@
1
+ 'use strict';
2
+
3
+ /* jshint ignore:start */
4
+ /**
5
+ * 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 util = require('util'); /* jshint ignore:line */
15
+ var Page = require('../../../base/Page'); /* jshint ignore:line */
16
+ var deserialize = require(
17
+ '../../../base/deserialize'); /* jshint ignore:line */
18
+ var values = require('../../../base/values'); /* jshint ignore:line */
19
+
20
+ var IpCommandList;
21
+ var IpCommandPage;
22
+ var IpCommandInstance;
23
+ var IpCommandContext;
24
+
25
+ /* jshint ignore:start */
26
+ /**
27
+ * Initialize the IpCommandList
28
+ *
29
+ * PLEASE NOTE that this class contains beta products that are subject to change.
30
+ * Use them with caution.
31
+ *
32
+ * @constructor Twilio.Supersim.V1.IpCommandList
33
+ *
34
+ * @param {Twilio.Supersim.V1} version - Version of the resource
35
+ */
36
+ /* jshint ignore:end */
37
+ IpCommandList = function IpCommandList(version) {
38
+ /* jshint ignore:start */
39
+ /**
40
+ * @function ipCommands
41
+ * @memberof Twilio.Supersim.V1#
42
+ *
43
+ * @param {string} sid - sid of instance
44
+ *
45
+ * @returns {Twilio.Supersim.V1.IpCommandContext}
46
+ */
47
+ /* jshint ignore:end */
48
+ function IpCommandListInstance(sid) {
49
+ return IpCommandListInstance.get(sid);
50
+ }
51
+
52
+ IpCommandListInstance._version = version;
53
+ // Path Solution
54
+ IpCommandListInstance._solution = {};
55
+ IpCommandListInstance._uri = `/IpCommands`;
56
+ /* jshint ignore:start */
57
+ /**
58
+ * create a IpCommandInstance
59
+ *
60
+ * @function create
61
+ * @memberof Twilio.Supersim.V1.IpCommandList#
62
+ *
63
+ * @param {object} opts - Options for request
64
+ * @param {string} opts.sim -
65
+ * The sid or unique_name of the Super SIM to send the IP Command to
66
+ * @param {string} opts.payload - The payload to be delivered to the device
67
+ * @param {number} opts.devicePort -
68
+ * The device port to which the IP Command will be sent
69
+ * @param {ip_command.payload_type} [opts.payloadType] -
70
+ * Indicates how the payload is encoded
71
+ * @param {string} [opts.callbackUrl] -
72
+ * The URL we should call after we have sent the IP Command
73
+ * @param {string} [opts.callbackMethod] -
74
+ * The HTTP method we should use to call callback_url
75
+ * @param {function} [callback] - Callback to handle processed record
76
+ *
77
+ * @returns {Promise} Resolves to processed IpCommandInstance
78
+ */
79
+ /* jshint ignore:end */
80
+ IpCommandListInstance.create = function create(opts, callback) {
81
+ if (_.isUndefined(opts)) {
82
+ throw new Error('Required parameter "opts" missing.');
83
+ }
84
+ if (_.isUndefined(opts.sim)) {
85
+ throw new Error('Required parameter "opts.sim" missing.');
86
+ }
87
+ if (_.isUndefined(opts.payload)) {
88
+ throw new Error('Required parameter "opts.payload" missing.');
89
+ }
90
+ if (_.isUndefined(opts.devicePort)) {
91
+ throw new Error('Required parameter "opts.devicePort" missing.');
92
+ }
93
+
94
+ var deferred = Q.defer();
95
+ var data = values.of({
96
+ 'Sim': _.get(opts, 'sim'),
97
+ 'Payload': _.get(opts, 'payload'),
98
+ 'DevicePort': _.get(opts, 'devicePort'),
99
+ 'PayloadType': _.get(opts, 'payloadType'),
100
+ 'CallbackUrl': _.get(opts, 'callbackUrl'),
101
+ 'CallbackMethod': _.get(opts, 'callbackMethod')
102
+ });
103
+
104
+ var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
105
+
106
+ promise = promise.then(function(payload) {
107
+ deferred.resolve(new IpCommandInstance(this._version, payload, this._solution.sid));
108
+ }.bind(this));
109
+
110
+ promise.catch(function(error) {
111
+ deferred.reject(error);
112
+ });
113
+
114
+ if (_.isFunction(callback)) {
115
+ deferred.promise.nodeify(callback);
116
+ }
117
+
118
+ return deferred.promise;
119
+ };
120
+
121
+ /* jshint ignore:start */
122
+ /**
123
+ * Streams IpCommandInstance records from the API.
124
+ *
125
+ * This operation lazily loads records as efficiently as possible until the limit
126
+ * is reached.
127
+ *
128
+ * The results are passed into the callback function, so this operation is memory
129
+ * efficient.
130
+ *
131
+ * If a function is passed as the first argument, it will be used as the callback
132
+ * function.
133
+ *
134
+ * @function each
135
+ * @memberof Twilio.Supersim.V1.IpCommandList#
136
+ *
137
+ * @param {object} [opts] - Options for request
138
+ * @param {string} [opts.sim] -
139
+ * The SID or unique name of the Sim resource that IP Command was sent to or from.
140
+ * @param {string} [opts.simIccid] -
141
+ * The ICCID of the Sim resource that IP Command was sent to or from.
142
+ * @param {ip_command.status} [opts.status] - The status of the IP Command
143
+ * @param {ip_command.direction} [opts.direction] - The direction of the IP Command
144
+ * @param {number} [opts.limit] -
145
+ * Upper limit for the number of records to return.
146
+ * each() guarantees never to return more than limit.
147
+ * Default is no limit
148
+ * @param {number} [opts.pageSize] -
149
+ * Number of records to fetch per request,
150
+ * when not set will use the default value of 50 records.
151
+ * If no pageSize is defined but a limit is defined,
152
+ * each() will attempt to read the limit with the most efficient
153
+ * page size, i.e. min(limit, 1000)
154
+ * @param {Function} [opts.callback] -
155
+ * Function to process each record. If this and a positional
156
+ * callback are passed, this one will be used
157
+ * @param {Function} [opts.done] -
158
+ * Function to be called upon completion of streaming
159
+ * @param {Function} [callback] - Function to process each record
160
+ */
161
+ /* jshint ignore:end */
162
+ IpCommandListInstance.each = function each(opts, callback) {
163
+ if (_.isFunction(opts)) {
164
+ callback = opts;
165
+ opts = {};
166
+ }
167
+ opts = opts || {};
168
+ if (opts.callback) {
169
+ callback = opts.callback;
170
+ }
171
+ if (_.isUndefined(callback)) {
172
+ throw new Error('Callback function must be provided');
173
+ }
174
+
175
+ var done = false;
176
+ var currentPage = 1;
177
+ var currentResource = 0;
178
+ var limits = this._version.readLimits({
179
+ limit: opts.limit,
180
+ pageSize: opts.pageSize
181
+ });
182
+
183
+ function onComplete(error) {
184
+ done = true;
185
+ if (_.isFunction(opts.done)) {
186
+ opts.done(error);
187
+ }
188
+ }
189
+
190
+ function fetchNextPage(fn) {
191
+ var promise = fn();
192
+ if (_.isUndefined(promise)) {
193
+ onComplete();
194
+ return;
195
+ }
196
+
197
+ promise.then(function(page) {
198
+ _.each(page.instances, function(instance) {
199
+ if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {
200
+ done = true;
201
+ return false;
202
+ }
203
+
204
+ currentResource++;
205
+ callback(instance, onComplete);
206
+ });
207
+
208
+ if (!done) {
209
+ currentPage++;
210
+ fetchNextPage(_.bind(page.nextPage, page));
211
+ } else {
212
+ onComplete();
213
+ }
214
+ });
215
+
216
+ promise.catch(onComplete);
217
+ }
218
+
219
+ fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));
220
+ };
221
+
222
+ /* jshint ignore:start */
223
+ /**
224
+ * Lists IpCommandInstance records from the API as a list.
225
+ *
226
+ * If a function is passed as the first argument, it will be used as the callback
227
+ * function.
228
+ *
229
+ * @function list
230
+ * @memberof Twilio.Supersim.V1.IpCommandList#
231
+ *
232
+ * @param {object} [opts] - Options for request
233
+ * @param {string} [opts.sim] -
234
+ * The SID or unique name of the Sim resource that IP Command was sent to or from.
235
+ * @param {string} [opts.simIccid] -
236
+ * The ICCID of the Sim resource that IP Command was sent to or from.
237
+ * @param {ip_command.status} [opts.status] - The status of the IP Command
238
+ * @param {ip_command.direction} [opts.direction] - The direction of the IP Command
239
+ * @param {number} [opts.limit] -
240
+ * Upper limit for the number of records to return.
241
+ * list() guarantees never to return more than limit.
242
+ * Default is no limit
243
+ * @param {number} [opts.pageSize] -
244
+ * Number of records to fetch per request,
245
+ * when not set will use the default value of 50 records.
246
+ * If no page_size is defined but a limit is defined,
247
+ * list() will attempt to read the limit with the most
248
+ * efficient page size, i.e. min(limit, 1000)
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
+ IpCommandListInstance.list = function list(opts, callback) {
255
+ if (_.isFunction(opts)) {
256
+ callback = opts;
257
+ opts = {};
258
+ }
259
+ opts = opts || {};
260
+ var deferred = Q.defer();
261
+ var allResources = [];
262
+ opts.callback = function(resource, done) {
263
+ allResources.push(resource);
264
+
265
+ if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {
266
+ done();
267
+ }
268
+ };
269
+
270
+ opts.done = function(error) {
271
+ if (_.isUndefined(error)) {
272
+ deferred.resolve(allResources);
273
+ } else {
274
+ deferred.reject(error);
275
+ }
276
+ };
277
+
278
+ if (_.isFunction(callback)) {
279
+ deferred.promise.nodeify(callback);
280
+ }
281
+
282
+ this.each(opts);
283
+ return deferred.promise;
284
+ };
285
+
286
+ /* jshint ignore:start */
287
+ /**
288
+ * Retrieve a single page of IpCommandInstance records from the API.
289
+ *
290
+ * The request is executed immediately.
291
+ *
292
+ * If a function is passed as the first argument, it will be used as the callback
293
+ * function.
294
+ *
295
+ * @function page
296
+ * @memberof Twilio.Supersim.V1.IpCommandList#
297
+ *
298
+ * @param {object} [opts] - Options for request
299
+ * @param {string} [opts.sim] -
300
+ * The SID or unique name of the Sim resource that IP Command was sent to or from.
301
+ * @param {string} [opts.simIccid] -
302
+ * The ICCID of the Sim resource that IP Command was sent to or from.
303
+ * @param {ip_command.status} [opts.status] - The status of the IP Command
304
+ * @param {ip_command.direction} [opts.direction] - The direction of the IP Command
305
+ * @param {string} [opts.pageToken] - PageToken provided by the API
306
+ * @param {number} [opts.pageNumber] -
307
+ * Page Number, this value is simply for client state
308
+ * @param {number} [opts.pageSize] - Number of records to return, defaults to 50
309
+ * @param {function} [callback] - Callback to handle list of records
310
+ *
311
+ * @returns {Promise} Resolves to a list of records
312
+ */
313
+ /* jshint ignore:end */
314
+ IpCommandListInstance.page = function page(opts, callback) {
315
+ if (_.isFunction(opts)) {
316
+ callback = opts;
317
+ opts = {};
318
+ }
319
+ opts = opts || {};
320
+
321
+ var deferred = Q.defer();
322
+ var data = values.of({
323
+ 'Sim': _.get(opts, 'sim'),
324
+ 'SimIccid': _.get(opts, 'simIccid'),
325
+ 'Status': _.get(opts, 'status'),
326
+ 'Direction': _.get(opts, 'direction'),
327
+ 'PageToken': opts.pageToken,
328
+ 'Page': opts.pageNumber,
329
+ 'PageSize': opts.pageSize
330
+ });
331
+
332
+ var promise = this._version.page({uri: this._uri, method: 'GET', params: data});
333
+
334
+ promise = promise.then(function(payload) {
335
+ deferred.resolve(new IpCommandPage(this._version, payload, this._solution));
336
+ }.bind(this));
337
+
338
+ promise.catch(function(error) {
339
+ deferred.reject(error);
340
+ });
341
+
342
+ if (_.isFunction(callback)) {
343
+ deferred.promise.nodeify(callback);
344
+ }
345
+
346
+ return deferred.promise;
347
+ };
348
+
349
+ /* jshint ignore:start */
350
+ /**
351
+ * Retrieve a single target page of IpCommandInstance records from the API.
352
+ *
353
+ * The request is executed immediately.
354
+ *
355
+ * If a function is passed as the first argument, it will be used as the callback
356
+ * function.
357
+ *
358
+ * @function getPage
359
+ * @memberof Twilio.Supersim.V1.IpCommandList#
360
+ *
361
+ * @param {string} [targetUrl] - API-generated URL for the requested results page
362
+ * @param {function} [callback] - Callback to handle list of records
363
+ *
364
+ * @returns {Promise} Resolves to a list of records
365
+ */
366
+ /* jshint ignore:end */
367
+ IpCommandListInstance.getPage = function getPage(targetUrl, callback) {
368
+ var deferred = Q.defer();
369
+
370
+ var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});
371
+
372
+ promise = promise.then(function(payload) {
373
+ deferred.resolve(new IpCommandPage(this._version, payload, this._solution));
374
+ }.bind(this));
375
+
376
+ promise.catch(function(error) {
377
+ deferred.reject(error);
378
+ });
379
+
380
+ if (_.isFunction(callback)) {
381
+ deferred.promise.nodeify(callback);
382
+ }
383
+
384
+ return deferred.promise;
385
+ };
386
+
387
+ /* jshint ignore:start */
388
+ /**
389
+ * Constructs a ip_command
390
+ *
391
+ * @function get
392
+ * @memberof Twilio.Supersim.V1.IpCommandList#
393
+ *
394
+ * @param {string} sid - The SID that identifies the resource to fetch
395
+ *
396
+ * @returns {Twilio.Supersim.V1.IpCommandContext}
397
+ */
398
+ /* jshint ignore:end */
399
+ IpCommandListInstance.get = function get(sid) {
400
+ return new IpCommandContext(this._version, sid);
401
+ };
402
+
403
+ /* jshint ignore:start */
404
+ /**
405
+ * Provide a user-friendly representation
406
+ *
407
+ * @function toJSON
408
+ * @memberof Twilio.Supersim.V1.IpCommandList#
409
+ *
410
+ * @returns Object
411
+ */
412
+ /* jshint ignore:end */
413
+ IpCommandListInstance.toJSON = function toJSON() {
414
+ return this._solution;
415
+ };
416
+
417
+ IpCommandListInstance[util.inspect.custom] = function inspect(depth, options) {
418
+ return util.inspect(this.toJSON(), options);
419
+ };
420
+
421
+ return IpCommandListInstance;
422
+ };
423
+
424
+
425
+ /* jshint ignore:start */
426
+ /**
427
+ * Initialize the IpCommandPage
428
+ *
429
+ * PLEASE NOTE that this class contains beta products that are subject to change.
430
+ * Use them with caution.
431
+ *
432
+ * @constructor Twilio.Supersim.V1.IpCommandPage
433
+ *
434
+ * @param {V1} version - Version of the resource
435
+ * @param {Response<string>} response - Response from the API
436
+ * @param {IpCommandSolution} solution - Path solution
437
+ *
438
+ * @returns IpCommandPage
439
+ */
440
+ /* jshint ignore:end */
441
+ IpCommandPage = function IpCommandPage(version, response, solution) {
442
+ // Path Solution
443
+ this._solution = solution;
444
+
445
+ Page.prototype.constructor.call(this, version, response, this._solution);
446
+ };
447
+
448
+ _.extend(IpCommandPage.prototype, Page.prototype);
449
+ IpCommandPage.prototype.constructor = IpCommandPage;
450
+
451
+ /* jshint ignore:start */
452
+ /**
453
+ * Build an instance of IpCommandInstance
454
+ *
455
+ * @function getInstance
456
+ * @memberof Twilio.Supersim.V1.IpCommandPage#
457
+ *
458
+ * @param {IpCommandPayload} payload - Payload response from the API
459
+ *
460
+ * @returns IpCommandInstance
461
+ */
462
+ /* jshint ignore:end */
463
+ IpCommandPage.prototype.getInstance = function getInstance(payload) {
464
+ return new IpCommandInstance(this._version, payload);
465
+ };
466
+
467
+ /* jshint ignore:start */
468
+ /**
469
+ * Provide a user-friendly representation
470
+ *
471
+ * @function toJSON
472
+ * @memberof Twilio.Supersim.V1.IpCommandPage#
473
+ *
474
+ * @returns Object
475
+ */
476
+ /* jshint ignore:end */
477
+ IpCommandPage.prototype.toJSON = function toJSON() {
478
+ let clone = {};
479
+ _.forOwn(this, function(value, key) {
480
+ if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
481
+ clone[key] = value;
482
+ }
483
+ });
484
+ return clone;
485
+ };
486
+
487
+ IpCommandPage.prototype[util.inspect.custom] = function inspect(depth, options)
488
+ {
489
+ return util.inspect(this.toJSON(), options);
490
+ };
491
+
492
+
493
+ /* jshint ignore:start */
494
+ /**
495
+ * Initialize the IpCommandContext
496
+ *
497
+ * PLEASE NOTE that this class contains beta products that are subject to change.
498
+ * Use them with caution.
499
+ *
500
+ * @constructor Twilio.Supersim.V1.IpCommandInstance
501
+ *
502
+ * @property {string} sid - The unique string that identifies the resource
503
+ * @property {string} accountSid - The SID of the Account that created the resource
504
+ * @property {string} simSid -
505
+ * The SID of the Super SIM that this IP Command was sent to or from
506
+ * @property {string} simIccid -
507
+ * The ICCID of the Super SIM that this IP Command was sent to or from
508
+ * @property {ip_command.status} status - The status of the IP Command
509
+ * @property {ip_command.direction} direction - The direction of the IP Command
510
+ * @property {string} deviceIp -
511
+ * The IP address of the device that the IP Command was sent to or received from
512
+ * @property {number} devicePort -
513
+ * The port that the IP Command either originated from or was sent to
514
+ * @property {ip_command.payload_type} payloadType -
515
+ * The payload type of the IP Command
516
+ * @property {string} payload -
517
+ * The payload of the IP Command sent to or from the Super SIM
518
+ * @property {Date} dateCreated -
519
+ * The ISO 8601 date and time in GMT when the resource was created
520
+ * @property {Date} dateUpdated -
521
+ * The ISO 8601 date and time in GMT when the resource was last updated
522
+ * @property {string} url - The absolute URL of the IP Command resource
523
+ *
524
+ * @param {V1} version - Version of the resource
525
+ * @param {IpCommandPayload} payload - The instance payload
526
+ * @param {sid} sid - The SID that identifies the resource to fetch
527
+ */
528
+ /* jshint ignore:end */
529
+ IpCommandInstance = function IpCommandInstance(version, payload, sid) {
530
+ this._version = version;
531
+
532
+ // Marshaled Properties
533
+ this.sid = payload.sid; // jshint ignore:line
534
+ this.accountSid = payload.account_sid; // jshint ignore:line
535
+ this.simSid = payload.sim_sid; // jshint ignore:line
536
+ this.simIccid = payload.sim_iccid; // jshint ignore:line
537
+ this.status = payload.status; // jshint ignore:line
538
+ this.direction = payload.direction; // jshint ignore:line
539
+ this.deviceIp = payload.device_ip; // jshint ignore:line
540
+ this.devicePort = deserialize.integer(payload.device_port); // jshint ignore:line
541
+ this.payloadType = payload.payload_type; // jshint ignore:line
542
+ this.payload = payload.payload; // jshint ignore:line
543
+ this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line
544
+ this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line
545
+ this.url = payload.url; // jshint ignore:line
546
+
547
+ // Context
548
+ this._context = undefined;
549
+ this._solution = {sid: sid || this.sid, };
550
+ };
551
+
552
+ Object.defineProperty(IpCommandInstance.prototype,
553
+ '_proxy', {
554
+ get: function() {
555
+ if (!this._context) {
556
+ this._context = new IpCommandContext(this._version, this._solution.sid);
557
+ }
558
+
559
+ return this._context;
560
+ }
561
+ });
562
+
563
+ /* jshint ignore:start */
564
+ /**
565
+ * fetch a IpCommandInstance
566
+ *
567
+ * @function fetch
568
+ * @memberof Twilio.Supersim.V1.IpCommandInstance#
569
+ *
570
+ * @param {function} [callback] - Callback to handle processed record
571
+ *
572
+ * @returns {Promise} Resolves to processed IpCommandInstance
573
+ */
574
+ /* jshint ignore:end */
575
+ IpCommandInstance.prototype.fetch = function fetch(callback) {
576
+ return this._proxy.fetch(callback);
577
+ };
578
+
579
+ /* jshint ignore:start */
580
+ /**
581
+ * Provide a user-friendly representation
582
+ *
583
+ * @function toJSON
584
+ * @memberof Twilio.Supersim.V1.IpCommandInstance#
585
+ *
586
+ * @returns Object
587
+ */
588
+ /* jshint ignore:end */
589
+ IpCommandInstance.prototype.toJSON = function toJSON() {
590
+ let clone = {};
591
+ _.forOwn(this, function(value, key) {
592
+ if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
593
+ clone[key] = value;
594
+ }
595
+ });
596
+ return clone;
597
+ };
598
+
599
+ IpCommandInstance.prototype[util.inspect.custom] = function inspect(depth,
600
+ options) {
601
+ return util.inspect(this.toJSON(), options);
602
+ };
603
+
604
+
605
+ /* jshint ignore:start */
606
+ /**
607
+ * Initialize the IpCommandContext
608
+ *
609
+ * PLEASE NOTE that this class contains beta products that are subject to change.
610
+ * Use them with caution.
611
+ *
612
+ * @constructor Twilio.Supersim.V1.IpCommandContext
613
+ *
614
+ * @param {V1} version - Version of the resource
615
+ * @param {sid} sid - The SID that identifies the resource to fetch
616
+ */
617
+ /* jshint ignore:end */
618
+ IpCommandContext = function IpCommandContext(version, sid) {
619
+ this._version = version;
620
+
621
+ // Path Solution
622
+ this._solution = {sid: sid, };
623
+ this._uri = `/IpCommands/${sid}`;
624
+ };
625
+
626
+ /* jshint ignore:start */
627
+ /**
628
+ * fetch a IpCommandInstance
629
+ *
630
+ * @function fetch
631
+ * @memberof Twilio.Supersim.V1.IpCommandContext#
632
+ *
633
+ * @param {function} [callback] - Callback to handle processed record
634
+ *
635
+ * @returns {Promise} Resolves to processed IpCommandInstance
636
+ */
637
+ /* jshint ignore:end */
638
+ IpCommandContext.prototype.fetch = function fetch(callback) {
639
+ var deferred = Q.defer();
640
+ var promise = this._version.fetch({uri: this._uri, method: 'GET'});
641
+
642
+ promise = promise.then(function(payload) {
643
+ deferred.resolve(new IpCommandInstance(this._version, payload, this._solution.sid));
644
+ }.bind(this));
645
+
646
+ promise.catch(function(error) {
647
+ deferred.reject(error);
648
+ });
649
+
650
+ if (_.isFunction(callback)) {
651
+ deferred.promise.nodeify(callback);
652
+ }
653
+
654
+ return deferred.promise;
655
+ };
656
+
657
+ /* jshint ignore:start */
658
+ /**
659
+ * Provide a user-friendly representation
660
+ *
661
+ * @function toJSON
662
+ * @memberof Twilio.Supersim.V1.IpCommandContext#
663
+ *
664
+ * @returns Object
665
+ */
666
+ /* jshint ignore:end */
667
+ IpCommandContext.prototype.toJSON = function toJSON() {
668
+ return this._solution;
669
+ };
670
+
671
+ IpCommandContext.prototype[util.inspect.custom] = function inspect(depth,
672
+ options) {
673
+ return util.inspect(this.toJSON(), options);
674
+ };
675
+
676
+ module.exports = {
677
+ IpCommandList: IpCommandList,
678
+ IpCommandPage: IpCommandPage,
679
+ IpCommandInstance: IpCommandInstance,
680
+ IpCommandContext: IpCommandContext
681
+ };
@@ -139,6 +139,8 @@ NetworkList = function NetworkList(version) {
139
139
  if (!done) {
140
140
  currentPage++;
141
141
  fetchNextPage(_.bind(page.nextPage, page));
142
+ } else {
143
+ onComplete();
142
144
  }
143
145
  });
144
146
 
@@ -140,6 +140,8 @@ NetworkAccessProfileNetworkList = function
140
140
  if (!done) {
141
141
  currentPage++;
142
142
  fetchNextPage(_.bind(page.nextPage, page));
143
+ } else {
144
+ onComplete();
143
145
  }
144
146
  });
145
147
 
@@ -187,6 +187,8 @@ NetworkAccessProfileList = function NetworkAccessProfileList(version) {
187
187
  if (!done) {
188
188
  currentPage++;
189
189
  fetchNextPage(_.bind(page.nextPage, page));
190
+ } else {
191
+ onComplete();
190
192
  }
191
193
  });
192
194