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.
- package/CHANGES.md +91 -0
- package/README.md +1 -1
- package/lib/rest/Insights.d.ts +4 -0
- package/lib/rest/Insights.js +16 -0
- package/lib/rest/Supersim.d.ts +4 -0
- package/lib/rest/Supersim.js +17 -0
- package/lib/rest/Voice.d.ts +2 -0
- package/lib/rest/Voice.js +9 -0
- package/lib/rest/accounts/v1/credential/aws.js +2 -0
- package/lib/rest/accounts/v1/credential/publicKey.js +2 -0
- package/lib/rest/api/v2010/account/address/dependentPhoneNumber.js +2 -0
- package/lib/rest/api/v2010/account/address.js +2 -0
- package/lib/rest/api/v2010/account/application.js +2 -0
- package/lib/rest/api/v2010/account/authorizedConnectApp.js +2 -0
- package/lib/rest/api/v2010/account/availablePhoneNumber/local.js +2 -0
- package/lib/rest/api/v2010/account/availablePhoneNumber/machineToMachine.js +2 -0
- package/lib/rest/api/v2010/account/availablePhoneNumber/mobile.js +2 -0
- package/lib/rest/api/v2010/account/availablePhoneNumber/national.js +2 -0
- package/lib/rest/api/v2010/account/availablePhoneNumber/sharedCost.js +2 -0
- package/lib/rest/api/v2010/account/availablePhoneNumber/tollFree.js +2 -0
- package/lib/rest/api/v2010/account/availablePhoneNumber/voip.js +2 -0
- package/lib/rest/api/v2010/account/availablePhoneNumber.js +2 -0
- package/lib/rest/api/v2010/account/call/event.js +2 -0
- package/lib/rest/api/v2010/account/call/notification.js +2 -0
- package/lib/rest/api/v2010/account/call/recording.js +2 -0
- package/lib/rest/api/v2010/account/call.js +2 -0
- package/lib/rest/api/v2010/account/conference/participant.js +2 -0
- package/lib/rest/api/v2010/account/conference/recording.js +2 -0
- package/lib/rest/api/v2010/account/conference.js +2 -0
- package/lib/rest/api/v2010/account/connectApp.js +2 -0
- package/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn/assignedAddOnExtension.js +2 -0
- package/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn.js +2 -0
- package/lib/rest/api/v2010/account/incomingPhoneNumber/local.js +2 -0
- package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.js +2 -0
- package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.js +2 -0
- package/lib/rest/api/v2010/account/incomingPhoneNumber.js +2 -0
- package/lib/rest/api/v2010/account/key.js +2 -0
- package/lib/rest/api/v2010/account/message/media.js +2 -0
- package/lib/rest/api/v2010/account/message.d.ts +9 -1
- package/lib/rest/api/v2010/account/message.js +17 -2
- package/lib/rest/api/v2010/account/notification.js +2 -0
- package/lib/rest/api/v2010/account/outgoingCallerId.js +2 -0
- package/lib/rest/api/v2010/account/queue/member.js +2 -0
- package/lib/rest/api/v2010/account/queue.js +2 -0
- package/lib/rest/api/v2010/account/recording/addOnResult/payload.js +2 -0
- package/lib/rest/api/v2010/account/recording/addOnResult.js +2 -0
- package/lib/rest/api/v2010/account/recording/transcription.js +2 -0
- package/lib/rest/api/v2010/account/recording.js +2 -0
- package/lib/rest/api/v2010/account/shortCode.js +2 -0
- package/lib/rest/api/v2010/account/signingKey.js +2 -0
- package/lib/rest/api/v2010/account/sip/credentialList/credential.js +2 -0
- package/lib/rest/api/v2010/account/sip/credentialList.js +2 -0
- package/lib/rest/api/v2010/account/sip/domain/authTypes/authCallsMapping/authCallsCredentialListMapping.js +2 -0
- package/lib/rest/api/v2010/account/sip/domain/authTypes/authCallsMapping/authCallsIpAccessControlListMapping.js +2 -0
- package/lib/rest/api/v2010/account/sip/domain/authTypes/authRegistrationsMapping/authRegistrationsCredentialListMapping.js +2 -0
- package/lib/rest/api/v2010/account/sip/domain/credentialListMapping.js +2 -0
- package/lib/rest/api/v2010/account/sip/domain/ipAccessControlListMapping.js +2 -0
- package/lib/rest/api/v2010/account/sip/domain.js +2 -0
- package/lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.js +2 -0
- package/lib/rest/api/v2010/account/sip/ipAccessControlList.js +2 -0
- package/lib/rest/api/v2010/account/transcription.js +2 -0
- package/lib/rest/api/v2010/account/usage/record/allTime.js +2 -0
- package/lib/rest/api/v2010/account/usage/record/daily.js +2 -0
- package/lib/rest/api/v2010/account/usage/record/lastMonth.js +2 -0
- package/lib/rest/api/v2010/account/usage/record/monthly.js +2 -0
- package/lib/rest/api/v2010/account/usage/record/thisMonth.js +2 -0
- package/lib/rest/api/v2010/account/usage/record/today.js +2 -0
- package/lib/rest/api/v2010/account/usage/record/yearly.js +2 -0
- package/lib/rest/api/v2010/account/usage/record/yesterday.js +2 -0
- package/lib/rest/api/v2010/account/usage/record.js +2 -0
- package/lib/rest/api/v2010/account/usage/trigger.js +2 -0
- package/lib/rest/api/v2010/account.js +2 -0
- package/lib/rest/autopilot/v1/assistant/fieldType/fieldValue.js +2 -0
- package/lib/rest/autopilot/v1/assistant/fieldType.js +2 -0
- package/lib/rest/autopilot/v1/assistant/modelBuild.js +2 -0
- package/lib/rest/autopilot/v1/assistant/query.js +2 -0
- package/lib/rest/autopilot/v1/assistant/task/field.js +2 -0
- package/lib/rest/autopilot/v1/assistant/task/sample.js +2 -0
- package/lib/rest/autopilot/v1/assistant/task.js +2 -0
- package/lib/rest/autopilot/v1/assistant/webhook.js +2 -0
- package/lib/rest/autopilot/v1/assistant.js +2 -0
- package/lib/rest/bulkexports/v1/export/day.js +2 -0
- package/lib/rest/bulkexports/v1/export/exportCustomJob.js +2 -0
- package/lib/rest/chat/v1/credential.js +2 -0
- package/lib/rest/chat/v1/service/channel/invite.js +2 -0
- package/lib/rest/chat/v1/service/channel/member.js +2 -0
- package/lib/rest/chat/v1/service/channel/message.js +2 -0
- package/lib/rest/chat/v1/service/channel.js +2 -0
- package/lib/rest/chat/v1/service/role.js +2 -0
- package/lib/rest/chat/v1/service/user/userChannel.js +2 -0
- package/lib/rest/chat/v1/service/user.js +2 -0
- package/lib/rest/chat/v1/service.js +2 -0
- package/lib/rest/chat/v2/credential.js +2 -0
- package/lib/rest/chat/v2/service/binding.js +2 -0
- package/lib/rest/chat/v2/service/channel/invite.js +2 -0
- package/lib/rest/chat/v2/service/channel/member.js +2 -0
- package/lib/rest/chat/v2/service/channel/message.js +2 -0
- package/lib/rest/chat/v2/service/channel/webhook.js +2 -0
- package/lib/rest/chat/v2/service/channel.js +2 -0
- package/lib/rest/chat/v2/service/role.js +2 -0
- package/lib/rest/chat/v2/service/user/userBinding.js +2 -0
- package/lib/rest/chat/v2/service/user/userChannel.js +2 -0
- package/lib/rest/chat/v2/service/user.js +2 -0
- package/lib/rest/chat/v2/service.js +2 -0
- package/lib/rest/conversations/v1/conversation/message/deliveryReceipt.js +2 -0
- package/lib/rest/conversations/v1/conversation/message.js +2 -0
- package/lib/rest/conversations/v1/conversation/participant.js +2 -0
- package/lib/rest/conversations/v1/conversation/webhook.js +2 -0
- package/lib/rest/conversations/v1/conversation.js +2 -0
- package/lib/rest/conversations/v1/credential.js +2 -0
- package/lib/rest/conversations/v1/participantConversation.js +2 -0
- package/lib/rest/conversations/v1/role.js +2 -0
- package/lib/rest/conversations/v1/service/binding.js +2 -0
- package/lib/rest/conversations/v1/service/configuration/webhook.d.ts +172 -0
- package/lib/rest/conversations/v1/service/configuration/webhook.js +400 -0
- package/lib/rest/conversations/v1/service/configuration.d.ts +2 -0
- package/lib/rest/conversations/v1/service/configuration.js +13 -0
- package/lib/rest/conversations/v1/service/conversation/message/deliveryReceipt.js +2 -0
- package/lib/rest/conversations/v1/service/conversation/message.js +2 -0
- package/lib/rest/conversations/v1/service/conversation/participant.js +2 -0
- package/lib/rest/conversations/v1/service/conversation/webhook.js +2 -0
- package/lib/rest/conversations/v1/service/conversation.js +2 -0
- package/lib/rest/conversations/v1/service/participantConversation.js +2 -0
- package/lib/rest/conversations/v1/service/role.js +2 -0
- package/lib/rest/conversations/v1/service/user/userConversation.js +2 -0
- package/lib/rest/conversations/v1/service/user.js +2 -0
- package/lib/rest/conversations/v1/service.js +2 -0
- package/lib/rest/conversations/v1/user/userConversation.js +2 -0
- package/lib/rest/conversations/v1/user.js +2 -0
- package/lib/rest/events/v1/eventType.js +2 -0
- package/lib/rest/events/v1/schema/version.js +2 -0
- package/lib/rest/events/v1/sink.js +2 -0
- package/lib/rest/events/v1/subscription/subscribedEvent.js +2 -0
- package/lib/rest/events/v1/subscription.js +2 -0
- package/lib/rest/fax/v1/fax/faxMedia.js +2 -0
- package/lib/rest/fax/v1/fax.js +2 -0
- package/lib/rest/flexApi/v1/channel.js +2 -0
- package/lib/rest/flexApi/v1/configuration.d.ts +4 -0
- package/lib/rest/flexApi/v1/configuration.js +5 -0
- package/lib/rest/flexApi/v1/flexFlow.d.ts +2 -2
- package/lib/rest/flexApi/v1/flexFlow.js +5 -3
- package/lib/rest/flexApi/v1/webChannel.js +2 -0
- package/lib/rest/insights/V1.d.ts +6 -0
- package/lib/rest/insights/V1.js +22 -0
- package/lib/rest/insights/v1/call/event.js +2 -0
- package/lib/rest/insights/v1/call/metric.js +2 -0
- package/lib/rest/insights/v1/callSummaries.js +2 -0
- package/lib/rest/insights/v1/conference/conferenceParticipant.d.ts +385 -0
- package/lib/rest/insights/v1/conference/conferenceParticipant.js +663 -0
- package/lib/rest/insights/v1/conference.d.ts +387 -0
- package/lib/rest/insights/v1/conference.js +669 -0
- package/lib/rest/insights/v1/room/participant.js +2 -0
- package/lib/rest/insights/v1/room.js +2 -0
- package/lib/rest/insights/v1/setting.d.ts +181 -0
- package/lib/rest/insights/v1/setting.js +384 -0
- package/lib/rest/ipMessaging/v1/credential.js +2 -0
- package/lib/rest/ipMessaging/v1/service/channel/invite.js +2 -0
- package/lib/rest/ipMessaging/v1/service/channel/member.js +2 -0
- package/lib/rest/ipMessaging/v1/service/channel/message.js +2 -0
- package/lib/rest/ipMessaging/v1/service/channel.js +2 -0
- package/lib/rest/ipMessaging/v1/service/role.js +2 -0
- package/lib/rest/ipMessaging/v1/service/user/userChannel.js +2 -0
- package/lib/rest/ipMessaging/v1/service/user.js +2 -0
- package/lib/rest/ipMessaging/v1/service.js +2 -0
- package/lib/rest/ipMessaging/v2/credential.js +2 -0
- package/lib/rest/ipMessaging/v2/service/binding.js +2 -0
- package/lib/rest/ipMessaging/v2/service/channel/invite.js +2 -0
- package/lib/rest/ipMessaging/v2/service/channel/member.js +2 -0
- package/lib/rest/ipMessaging/v2/service/channel/message.js +2 -0
- package/lib/rest/ipMessaging/v2/service/channel/webhook.js +2 -0
- package/lib/rest/ipMessaging/v2/service/channel.js +2 -0
- package/lib/rest/ipMessaging/v2/service/role.js +2 -0
- package/lib/rest/ipMessaging/v2/service/user/userBinding.js +2 -0
- package/lib/rest/ipMessaging/v2/service/user/userChannel.js +2 -0
- package/lib/rest/ipMessaging/v2/service/user.js +2 -0
- package/lib/rest/ipMessaging/v2/service.js +2 -0
- package/lib/rest/media/v1/mediaProcessor.d.ts +4 -0
- package/lib/rest/media/v1/mediaProcessor.js +7 -1
- package/lib/rest/media/v1/playerStreamer.js +2 -0
- package/lib/rest/messaging/v1/brandRegistration/brandVetting.js +2 -0
- package/lib/rest/messaging/v1/brandRegistration.d.ts +14 -0
- package/lib/rest/messaging/v1/brandRegistration.js +51 -0
- package/lib/rest/messaging/v1/service/alphaSender.js +2 -0
- package/lib/rest/messaging/v1/service/phoneNumber.js +2 -0
- package/lib/rest/messaging/v1/service/shortCode.js +2 -0
- package/lib/rest/messaging/v1/service/usAppToPerson.js +2 -0
- package/lib/rest/messaging/v1/service.js +2 -0
- package/lib/rest/monitor/v1/alert.js +2 -0
- package/lib/rest/monitor/v1/event.js +2 -0
- package/lib/rest/notify/v1/credential.js +2 -0
- package/lib/rest/notify/v1/service/binding.js +2 -0
- package/lib/rest/notify/v1/service.js +2 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.d.ts +154 -1
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.js +244 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle/evaluation.js +2 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle/itemAssignment.js +2 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle.js +2 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/endUser.js +2 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/endUserType.js +2 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/regulation.js +2 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.js +2 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocumentType.js +2 -0
- package/lib/rest/preview/bulk_exports/export/day.js +2 -0
- package/lib/rest/preview/bulk_exports/export/exportCustomJob.js +2 -0
- package/lib/rest/preview/deployed_devices/fleet/certificate.js +2 -0
- package/lib/rest/preview/deployed_devices/fleet/deployment.js +2 -0
- package/lib/rest/preview/deployed_devices/fleet/device.js +2 -0
- package/lib/rest/preview/deployed_devices/fleet/key.js +2 -0
- package/lib/rest/preview/deployed_devices/fleet.js +2 -0
- package/lib/rest/preview/hosted_numbers/authorizationDocument/dependentHostedNumberOrder.js +2 -0
- package/lib/rest/preview/hosted_numbers/authorizationDocument.js +2 -0
- package/lib/rest/preview/hosted_numbers/hostedNumberOrder.js +2 -0
- package/lib/rest/preview/marketplace/availableAddOn/availableAddOnExtension.js +2 -0
- package/lib/rest/preview/marketplace/availableAddOn.js +2 -0
- package/lib/rest/preview/marketplace/installedAddOn/installedAddOnExtension.js +2 -0
- package/lib/rest/preview/marketplace/installedAddOn.js +2 -0
- package/lib/rest/preview/sync/service/document/documentPermission.js +2 -0
- package/lib/rest/preview/sync/service/document.js +2 -0
- package/lib/rest/preview/sync/service/syncList/syncListItem.js +2 -0
- package/lib/rest/preview/sync/service/syncList/syncListPermission.js +2 -0
- package/lib/rest/preview/sync/service/syncList.js +2 -0
- package/lib/rest/preview/sync/service/syncMap/syncMapItem.js +2 -0
- package/lib/rest/preview/sync/service/syncMap/syncMapPermission.js +2 -0
- package/lib/rest/preview/sync/service/syncMap.js +2 -0
- package/lib/rest/preview/sync/service.js +2 -0
- package/lib/rest/preview/understand/assistant/fieldType/fieldValue.js +2 -0
- package/lib/rest/preview/understand/assistant/fieldType.js +2 -0
- package/lib/rest/preview/understand/assistant/modelBuild.js +2 -0
- package/lib/rest/preview/understand/assistant/query.js +2 -0
- package/lib/rest/preview/understand/assistant/task/field.js +2 -0
- package/lib/rest/preview/understand/assistant/task/sample.js +2 -0
- package/lib/rest/preview/understand/assistant/task.js +2 -0
- package/lib/rest/preview/understand/assistant.js +2 -0
- package/lib/rest/preview/wireless/command.js +2 -0
- package/lib/rest/preview/wireless/ratePlan.js +2 -0
- package/lib/rest/preview/wireless/sim.js +2 -0
- package/lib/rest/pricing/v1/messaging/country.js +2 -0
- package/lib/rest/pricing/v1/phoneNumber/country.js +2 -0
- package/lib/rest/pricing/v1/voice/country.js +2 -0
- package/lib/rest/pricing/v2/country.js +2 -0
- package/lib/rest/pricing/v2/voice/country.js +2 -0
- package/lib/rest/proxy/v1/service/phoneNumber.js +2 -0
- package/lib/rest/proxy/v1/service/session/interaction.js +2 -0
- package/lib/rest/proxy/v1/service/session/participant/messageInteraction.js +2 -0
- package/lib/rest/proxy/v1/service/session/participant.js +2 -0
- package/lib/rest/proxy/v1/service/session.js +2 -0
- package/lib/rest/proxy/v1/service/shortCode.js +2 -0
- package/lib/rest/proxy/v1/service.js +2 -0
- package/lib/rest/serverless/v1/service/asset/assetVersion.js +2 -0
- package/lib/rest/serverless/v1/service/asset.js +2 -0
- package/lib/rest/serverless/v1/service/build.js +2 -0
- package/lib/rest/serverless/v1/service/environment/deployment.js +2 -0
- package/lib/rest/serverless/v1/service/environment/log.js +2 -0
- package/lib/rest/serverless/v1/service/environment/variable.js +2 -0
- package/lib/rest/serverless/v1/service/environment.js +2 -0
- package/lib/rest/serverless/v1/service/function/functionVersion.js +2 -0
- package/lib/rest/serverless/v1/service/function.js +2 -0
- package/lib/rest/serverless/v1/service.js +2 -0
- package/lib/rest/studio/v1/flow/engagement/step.js +2 -0
- package/lib/rest/studio/v1/flow/engagement.js +2 -0
- package/lib/rest/studio/v1/flow/execution/executionStep.js +2 -0
- package/lib/rest/studio/v1/flow/execution.js +2 -0
- package/lib/rest/studio/v1/flow.js +2 -0
- package/lib/rest/studio/v2/flow/execution/executionStep.js +2 -0
- package/lib/rest/studio/v2/flow/execution.js +2 -0
- package/lib/rest/studio/v2/flow/flowRevision.js +2 -0
- package/lib/rest/studio/v2/flow.js +2 -0
- package/lib/rest/supersim/V1.d.ts +6 -0
- package/lib/rest/supersim/V1.js +23 -0
- package/lib/rest/supersim/v1/command.js +2 -0
- package/lib/rest/supersim/v1/esimProfile.d.ts +344 -0
- package/lib/rest/supersim/v1/esimProfile.js +664 -0
- package/lib/rest/supersim/v1/fleet.js +2 -0
- package/lib/rest/supersim/v1/ipCommand.d.ts +362 -0
- package/lib/rest/supersim/v1/ipCommand.js +681 -0
- package/lib/rest/supersim/v1/network.js +2 -0
- package/lib/rest/supersim/v1/networkAccessProfile/networkAccessProfileNetwork.js +2 -0
- package/lib/rest/supersim/v1/networkAccessProfile.js +2 -0
- package/lib/rest/supersim/v1/sim/billingPeriod.js +2 -0
- package/lib/rest/supersim/v1/sim.js +2 -0
- package/lib/rest/supersim/v1/smsCommand.js +2 -0
- package/lib/rest/supersim/v1/usageRecord.js +2 -0
- package/lib/rest/sync/v1/service/document/documentPermission.js +2 -0
- package/lib/rest/sync/v1/service/document.js +2 -0
- package/lib/rest/sync/v1/service/syncList/syncListItem.js +2 -0
- package/lib/rest/sync/v1/service/syncList/syncListPermission.js +2 -0
- package/lib/rest/sync/v1/service/syncList.js +2 -0
- package/lib/rest/sync/v1/service/syncMap/syncMapItem.js +2 -0
- package/lib/rest/sync/v1/service/syncMap/syncMapPermission.js +2 -0
- package/lib/rest/sync/v1/service/syncMap.js +2 -0
- package/lib/rest/sync/v1/service/syncStream.js +2 -0
- package/lib/rest/sync/v1/service.js +2 -0
- package/lib/rest/taskrouter/v1/workspace/activity.js +2 -0
- package/lib/rest/taskrouter/v1/workspace/event.js +2 -0
- package/lib/rest/taskrouter/v1/workspace/task/reservation.js +2 -0
- package/lib/rest/taskrouter/v1/workspace/task.js +2 -0
- package/lib/rest/taskrouter/v1/workspace/taskChannel.js +2 -0
- package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueuesStatistics.js +2 -0
- package/lib/rest/taskrouter/v1/workspace/taskQueue.js +2 -0
- package/lib/rest/taskrouter/v1/workspace/worker/reservation.js +2 -0
- package/lib/rest/taskrouter/v1/workspace/worker/workerChannel.js +2 -0
- package/lib/rest/taskrouter/v1/workspace/worker.js +2 -0
- package/lib/rest/taskrouter/v1/workspace/workflow.js +2 -0
- package/lib/rest/taskrouter/v1/workspace.js +2 -0
- package/lib/rest/trunking/v1/trunk/credentialList.js +2 -0
- package/lib/rest/trunking/v1/trunk/ipAccessControlList.js +2 -0
- package/lib/rest/trunking/v1/trunk/originationUrl.js +2 -0
- package/lib/rest/trunking/v1/trunk/phoneNumber.js +2 -0
- package/lib/rest/trunking/v1/trunk.js +2 -0
- package/lib/rest/trusthub/v1/customerProfiles/customerProfilesChannelEndpointAssignment.js +2 -0
- package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEntityAssignments.js +2 -0
- package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.js +2 -0
- package/lib/rest/trusthub/v1/customerProfiles.js +2 -0
- package/lib/rest/trusthub/v1/endUser.js +2 -0
- package/lib/rest/trusthub/v1/endUserType.js +2 -0
- package/lib/rest/trusthub/v1/policies.js +2 -0
- package/lib/rest/trusthub/v1/supportingDocument.js +2 -0
- package/lib/rest/trusthub/v1/supportingDocumentType.js +2 -0
- package/lib/rest/trusthub/v1/trustProducts/trustProductsChannelEndpointAssignment.js +2 -0
- package/lib/rest/trusthub/v1/trustProducts/trustProductsEntityAssignments.js +2 -0
- package/lib/rest/trusthub/v1/trustProducts/trustProductsEvaluations.js +2 -0
- package/lib/rest/trusthub/v1/trustProducts.js +2 -0
- package/lib/rest/verify/v2/service/accessToken.d.ts +64 -4
- package/lib/rest/verify/v2/service/accessToken.js +158 -8
- package/lib/rest/verify/v2/service/entity/challenge.js +2 -0
- package/lib/rest/verify/v2/service/entity/factor.js +2 -0
- package/lib/rest/verify/v2/service/entity.js +2 -0
- package/lib/rest/verify/v2/service/messagingConfiguration.js +2 -0
- package/lib/rest/verify/v2/service/rateLimit/bucket.js +2 -0
- package/lib/rest/verify/v2/service/rateLimit.js +2 -0
- package/lib/rest/verify/v2/service/webhook.js +2 -0
- package/lib/rest/verify/v2/service.js +2 -0
- package/lib/rest/verify/v2/template.js +2 -0
- package/lib/rest/verify/v2/verificationAttempt.js +2 -0
- package/lib/rest/video/v1/composition.d.ts +2 -0
- package/lib/rest/video/v1/composition.js +5 -0
- package/lib/rest/video/v1/compositionHook.js +2 -0
- package/lib/rest/video/v1/recording.d.ts +2 -0
- package/lib/rest/video/v1/recording.js +5 -0
- package/lib/rest/video/v1/room/recording.d.ts +2 -0
- package/lib/rest/video/v1/room/recording.js +5 -0
- package/lib/rest/video/v1/room/roomParticipant/roomParticipantPublishedTrack.js +2 -0
- package/lib/rest/video/v1/room/roomParticipant/roomParticipantSubscribedTrack.js +2 -0
- package/lib/rest/video/v1/room/roomParticipant.js +2 -0
- package/lib/rest/video/v1/room.d.ts +12 -0
- package/lib/rest/video/v1/room.js +21 -1
- package/lib/rest/voice/V1.d.ts +3 -0
- package/lib/rest/voice/V1.js +12 -0
- package/lib/rest/voice/v1/archivedCall.d.ts +136 -0
- package/lib/rest/voice/v1/archivedCall.js +325 -0
- package/lib/rest/voice/v1/byocTrunk.js +2 -0
- package/lib/rest/voice/v1/connectionPolicy/connectionPolicyTarget.js +2 -0
- package/lib/rest/voice/v1/connectionPolicy.js +2 -0
- package/lib/rest/voice/v1/dialingPermissions/country/highriskSpecialPrefix.js +2 -0
- package/lib/rest/voice/v1/dialingPermissions/country.js +2 -0
- package/lib/rest/voice/v1/ipRecord.js +2 -0
- package/lib/rest/voice/v1/sourceIpMapping.js +2 -0
- package/lib/rest/wireless/v1/command.js +2 -0
- package/lib/rest/wireless/v1/ratePlan.js +2 -0
- package/lib/rest/wireless/v1/sim/dataSession.js +2 -0
- package/lib/rest/wireless/v1/sim/usageRecord.js +2 -0
- package/lib/rest/wireless/v1/sim.js +6 -8
- package/lib/rest/wireless/v1/usageRecord.js +2 -0
- 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
|
+
};
|