twilio 3.71.3 → 3.74.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/lib/rest/Conversations.d.ts +2 -0
- package/lib/rest/Conversations.js +9 -0
- package/lib/rest/Insights.d.ts +4 -0
- package/lib/rest/Insights.js +16 -0
- package/lib/rest/Supersim.d.ts +2 -0
- package/lib/rest/Supersim.js +9 -0
- package/lib/rest/Voice.d.ts +2 -0
- package/lib/rest/Voice.js +9 -0
- package/lib/rest/accounts/v1/credential/aws.js +4 -2
- package/lib/rest/accounts/v1/credential/publicKey.js +4 -2
- package/lib/rest/api/v2010/account/address/dependentPhoneNumber.js +2 -0
- package/lib/rest/api/v2010/account/address.js +14 -12
- 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/feedback.js +2 -2
- package/lib/rest/api/v2010/account/call/feedbackSummary.js +4 -4
- package/lib/rest/api/v2010/account/call/notification.js +2 -0
- package/lib/rest/api/v2010/account/call/payment.js +8 -8
- package/lib/rest/api/v2010/account/call/recording.js +4 -2
- package/lib/rest/api/v2010/account/call/siprec.js +2 -2
- package/lib/rest/api/v2010/account/call/stream.d.ts +776 -0
- package/lib/rest/api/v2010/account/call/stream.js +810 -0
- package/lib/rest/api/v2010/account/call.d.ts +7 -0
- package/lib/rest/api/v2010/account/call.js +34 -4
- package/lib/rest/api/v2010/account/conference/participant.js +6 -4
- package/lib/rest/api/v2010/account/conference/recording.js +4 -2
- 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 +4 -2
- package/lib/rest/api/v2010/account/incomingPhoneNumber/local.js +4 -2
- package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.js +4 -2
- package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.js +4 -2
- 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 +19 -4
- 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 +4 -2
- package/lib/rest/api/v2010/account/queue.js +4 -2
- 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 +6 -4
- package/lib/rest/api/v2010/account/sip/credentialList.js +6 -4
- package/lib/rest/api/v2010/account/sip/domain/authTypes/authCallsMapping/authCallsCredentialListMapping.js +4 -2
- package/lib/rest/api/v2010/account/sip/domain/authTypes/authCallsMapping/authCallsIpAccessControlListMapping.js +4 -2
- package/lib/rest/api/v2010/account/sip/domain/authTypes/authRegistrationsMapping/authRegistrationsCredentialListMapping.js +4 -2
- package/lib/rest/api/v2010/account/sip/domain/credentialListMapping.js +4 -2
- package/lib/rest/api/v2010/account/sip/domain/ipAccessControlListMapping.js +4 -2
- package/lib/rest/api/v2010/account/sip/domain.js +4 -2
- package/lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.js +6 -4
- package/lib/rest/api/v2010/account/sip/ipAccessControlList.js +6 -4
- 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 +8 -6
- package/lib/rest/api/v2010/account/validationRequest.js +2 -2
- package/lib/rest/api/v2010/account.js +2 -0
- package/lib/rest/autopilot/v1/assistant/fieldType/fieldValue.js +6 -4
- package/lib/rest/autopilot/v1/assistant/fieldType.js +4 -2
- package/lib/rest/autopilot/v1/assistant/modelBuild.js +2 -0
- package/lib/rest/autopilot/v1/assistant/query.js +6 -4
- package/lib/rest/autopilot/v1/assistant/task/field.js +6 -4
- package/lib/rest/autopilot/v1/assistant/task/sample.js +6 -4
- package/lib/rest/autopilot/v1/assistant/task.js +4 -2
- package/lib/rest/autopilot/v1/assistant/webhook.js +8 -6
- package/lib/rest/autopilot/v1/assistant.js +2 -0
- package/lib/rest/autopilot/v1/restoreAssistant.js +2 -2
- package/lib/rest/bulkexports/v1/export/day.js +2 -0
- package/lib/rest/bulkexports/v1/export/exportCustomJob.js +8 -6
- package/lib/rest/chat/v1/credential.js +4 -2
- package/lib/rest/chat/v1/service/channel/invite.js +4 -2
- package/lib/rest/chat/v1/service/channel/member.js +4 -2
- package/lib/rest/chat/v1/service/channel/message.js +4 -2
- package/lib/rest/chat/v1/service/channel.js +2 -0
- package/lib/rest/chat/v1/service/role.js +10 -8
- package/lib/rest/chat/v1/service/user/userChannel.js +2 -0
- package/lib/rest/chat/v1/service/user.js +4 -2
- package/lib/rest/chat/v1/service.js +4 -2
- package/lib/rest/chat/v2/credential.js +4 -2
- package/lib/rest/chat/v2/service/binding.js +2 -0
- package/lib/rest/chat/v2/service/channel/invite.js +4 -2
- package/lib/rest/chat/v2/service/channel/member.js +4 -2
- package/lib/rest/chat/v2/service/channel/message.js +2 -0
- package/lib/rest/chat/v2/service/channel/webhook.js +4 -2
- package/lib/rest/chat/v2/service/channel.js +2 -0
- package/lib/rest/chat/v2/service/role.js +10 -8
- 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 +4 -2
- package/lib/rest/chat/v2/service.js +4 -2
- package/lib/rest/conversations/V1.d.ts +3 -0
- package/lib/rest/conversations/V1.js +13 -0
- package/lib/rest/conversations/v1/addressConfiguration.d.ts +397 -0
- package/lib/rest/conversations/v1/addressConfiguration.js +802 -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 +4 -2
- package/lib/rest/conversations/v1/conversation.js +2 -0
- package/lib/rest/conversations/v1/credential.js +4 -2
- package/lib/rest/conversations/v1/participantConversation.js +2 -0
- package/lib/rest/conversations/v1/role.js +10 -8
- package/lib/rest/conversations/v1/service/binding.js +2 -0
- package/lib/rest/conversations/v1/service/configuration/webhook.d.ts +2 -2
- package/lib/rest/conversations/v1/service/configuration/webhook.js +6 -5
- 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 +4 -2
- 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 +10 -8
- package/lib/rest/conversations/v1/service/user/userConversation.js +2 -0
- package/lib/rest/conversations/v1/service/user.js +4 -2
- package/lib/rest/conversations/v1/service.js +4 -2
- package/lib/rest/conversations/v1/user/userConversation.js +2 -0
- package/lib/rest/conversations/v1/user.js +4 -2
- 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/sinkValidate.js +2 -2
- package/lib/rest/events/v1/sink.js +10 -8
- package/lib/rest/events/v1/subscription/subscribedEvent.js +4 -2
- package/lib/rest/events/v1/subscription.js +8 -6
- package/lib/rest/fax/v1/fax/faxMedia.js +2 -0
- package/lib/rest/fax/v1/fax.d.ts +1 -68
- package/lib/rest/fax/v1/fax.js +2 -123
- package/lib/rest/flexApi/v1/channel.js +10 -8
- package/lib/rest/flexApi/v1/flexFlow.d.ts +2 -2
- package/lib/rest/flexApi/v1/flexFlow.js +11 -9
- package/lib/rest/flexApi/v1/webChannel.js +10 -8
- 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 +383 -0
- package/lib/rest/insights/v1/conference/conferenceParticipant.js +671 -0
- package/lib/rest/insights/v1/conference.d.ts +391 -0
- package/lib/rest/insights/v1/conference.js +683 -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 +4 -2
- package/lib/rest/ipMessaging/v1/service/channel/invite.js +4 -2
- package/lib/rest/ipMessaging/v1/service/channel/member.js +4 -2
- package/lib/rest/ipMessaging/v1/service/channel/message.js +4 -2
- package/lib/rest/ipMessaging/v1/service/channel.js +2 -0
- package/lib/rest/ipMessaging/v1/service/role.js +10 -8
- package/lib/rest/ipMessaging/v1/service/user/userChannel.js +2 -0
- package/lib/rest/ipMessaging/v1/service/user.js +4 -2
- package/lib/rest/ipMessaging/v1/service.js +4 -2
- package/lib/rest/ipMessaging/v2/credential.js +4 -2
- package/lib/rest/ipMessaging/v2/service/binding.js +2 -0
- package/lib/rest/ipMessaging/v2/service/channel/invite.js +4 -2
- package/lib/rest/ipMessaging/v2/service/channel/member.js +4 -2
- package/lib/rest/ipMessaging/v2/service/channel/message.js +2 -0
- package/lib/rest/ipMessaging/v2/service/channel/webhook.js +4 -2
- package/lib/rest/ipMessaging/v2/service/channel.js +2 -0
- package/lib/rest/ipMessaging/v2/service/role.js +10 -8
- 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 +4 -2
- package/lib/rest/ipMessaging/v2/service.js +4 -2
- package/lib/rest/media/v1/mediaProcessor.d.ts +4 -0
- package/lib/rest/media/v1/mediaProcessor.js +13 -7
- package/lib/rest/media/v1/playerStreamer.js +4 -2
- package/lib/rest/messaging/v1/brandRegistration/brandVetting.js +4 -2
- package/lib/rest/messaging/v1/brandRegistration.d.ts +14 -0
- package/lib/rest/messaging/v1/brandRegistration.js +55 -4
- package/lib/rest/messaging/v1/externalCampaign.js +4 -4
- package/lib/rest/messaging/v1/service/alphaSender.js +4 -2
- package/lib/rest/messaging/v1/service/phoneNumber.js +4 -2
- package/lib/rest/messaging/v1/service/shortCode.js +4 -2
- package/lib/rest/messaging/v1/service/usAppToPerson.js +14 -12
- package/lib/rest/messaging/v1/service.js +4 -2
- 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 +4 -2
- package/lib/rest/notify/v1/service/binding.js +8 -6
- 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 +4 -2
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.js +2 -2
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle.d.ts +41 -1
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle.js +49 -4
- package/lib/rest/numbers/v2/regulatoryCompliance/endUser.js +6 -4
- 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 +6 -4
- 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 +8 -6
- package/lib/rest/preview/deployed_devices/fleet/certificate.js +4 -2
- 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 +12 -10
- package/lib/rest/preview/hosted_numbers/hostedNumberOrder.js +6 -4
- 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 +4 -2
- package/lib/rest/preview/marketplace/installedAddOn.js +6 -4
- package/lib/rest/preview/sync/service/document/documentPermission.js +8 -6
- package/lib/rest/preview/sync/service/document.js +4 -2
- package/lib/rest/preview/sync/service/syncList/syncListItem.js +6 -4
- package/lib/rest/preview/sync/service/syncList/syncListPermission.js +8 -6
- package/lib/rest/preview/sync/service/syncList.js +2 -0
- package/lib/rest/preview/sync/service/syncMap/syncMapItem.js +8 -6
- package/lib/rest/preview/sync/service/syncMap/syncMapPermission.js +8 -6
- package/lib/rest/preview/sync/service/syncMap.js +2 -0
- package/lib/rest/preview/sync/service.js +2 -0
- package/lib/rest/preview/trusted_comms/brandedChannel/channel.js +2 -2
- package/lib/rest/preview/understand/assistant/fieldType/fieldValue.js +6 -4
- package/lib/rest/preview/understand/assistant/fieldType.js +4 -2
- package/lib/rest/preview/understand/assistant/modelBuild.js +2 -0
- package/lib/rest/preview/understand/assistant/query.js +6 -4
- package/lib/rest/preview/understand/assistant/task/field.js +6 -4
- package/lib/rest/preview/understand/assistant/task/sample.js +6 -4
- package/lib/rest/preview/understand/assistant/task.js +4 -2
- package/lib/rest/preview/understand/assistant.js +2 -0
- package/lib/rest/preview/wireless/command.js +4 -2
- 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 +4 -2
- package/lib/rest/proxy/v1/service/session.js +2 -0
- package/lib/rest/proxy/v1/service/shortCode.js +4 -2
- package/lib/rest/proxy/v1/service.js +4 -2
- package/lib/rest/serverless/v1/service/asset/assetVersion.js +2 -0
- package/lib/rest/serverless/v1/service/asset.js +6 -4
- 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 +6 -4
- package/lib/rest/serverless/v1/service/environment.js +4 -2
- package/lib/rest/serverless/v1/service/function/functionVersion.js +2 -0
- package/lib/rest/serverless/v1/service/function.js +6 -4
- package/lib/rest/serverless/v1/service.js +6 -4
- package/lib/rest/studio/v1/flow/engagement/step.js +2 -0
- package/lib/rest/studio/v1/flow/engagement.js +6 -4
- package/lib/rest/studio/v1/flow/execution/executionStep.js +2 -0
- package/lib/rest/studio/v1/flow/execution.js +8 -6
- 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 +8 -6
- package/lib/rest/studio/v2/flow/flowRevision.js +2 -0
- package/lib/rest/studio/v2/flow/testUser.js +2 -2
- package/lib/rest/studio/v2/flow.js +10 -8
- package/lib/rest/studio/v2/flowValidate.js +6 -6
- package/lib/rest/supersim/V1.d.ts +3 -0
- package/lib/rest/supersim/V1.js +12 -0
- package/lib/rest/supersim/v1/command.js +6 -4
- 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.d.ts +17 -5
- package/lib/rest/supersim/v1/fleet.js +36 -22
- package/lib/rest/supersim/v1/ipCommand.js +8 -6
- package/lib/rest/supersim/v1/network.js +2 -0
- package/lib/rest/supersim/v1/networkAccessProfile/networkAccessProfileNetwork.js +4 -2
- 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 +6 -4
- package/lib/rest/supersim/v1/smsCommand.js +6 -4
- package/lib/rest/supersim/v1/usageRecord.js +2 -0
- package/lib/rest/sync/v1/service/document/documentPermission.js +8 -6
- package/lib/rest/sync/v1/service/document.js +2 -0
- package/lib/rest/sync/v1/service/syncList/syncListItem.js +4 -2
- package/lib/rest/sync/v1/service/syncList/syncListPermission.js +8 -6
- package/lib/rest/sync/v1/service/syncList.js +2 -0
- package/lib/rest/sync/v1/service/syncMap/syncMapItem.js +6 -4
- package/lib/rest/sync/v1/service/syncMap/syncMapPermission.js +8 -6
- package/lib/rest/sync/v1/service/syncMap.js +2 -0
- package/lib/rest/sync/v1/service/syncStream/streamMessage.js +2 -2
- 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 +4 -2
- 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 +6 -4
- package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueuesStatistics.js +2 -0
- package/lib/rest/taskrouter/v1/workspace/taskQueue.js +4 -2
- 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 +4 -2
- package/lib/rest/taskrouter/v1/workspace/workflow.js +6 -4
- package/lib/rest/taskrouter/v1/workspace.js +4 -2
- package/lib/rest/trunking/v1/trunk/credentialList.js +4 -2
- package/lib/rest/trunking/v1/trunk/ipAccessControlList.js +4 -2
- package/lib/rest/trunking/v1/trunk/originationUrl.js +12 -10
- package/lib/rest/trunking/v1/trunk/phoneNumber.js +4 -2
- package/lib/rest/trunking/v1/trunk.js +2 -0
- package/lib/rest/trusthub/v1/customerProfiles/customerProfilesChannelEndpointAssignment.js +6 -4
- package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEntityAssignments.js +4 -2
- package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.js +4 -2
- package/lib/rest/trusthub/v1/customerProfiles.js +8 -6
- package/lib/rest/trusthub/v1/endUser.js +6 -4
- 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 +6 -4
- package/lib/rest/trusthub/v1/supportingDocumentType.js +2 -0
- package/lib/rest/trusthub/v1/trustProducts/trustProductsChannelEndpointAssignment.js +6 -4
- package/lib/rest/trusthub/v1/trustProducts/trustProductsEntityAssignments.js +4 -2
- package/lib/rest/trusthub/v1/trustProducts/trustProductsEvaluations.js +4 -2
- package/lib/rest/trusthub/v1/trustProducts.js +8 -6
- package/lib/rest/verify/v2/service/accessToken.d.ts +62 -4
- package/lib/rest/verify/v2/service/accessToken.js +159 -11
- package/lib/rest/verify/v2/service/entity/challenge.js +4 -2
- package/lib/rest/verify/v2/service/entity/factor.js +2 -0
- package/lib/rest/verify/v2/service/entity/newFactor.js +4 -4
- package/lib/rest/verify/v2/service/entity.js +4 -2
- package/lib/rest/verify/v2/service/messagingConfiguration.js +8 -6
- package/lib/rest/verify/v2/service/rateLimit/bucket.js +6 -4
- package/lib/rest/verify/v2/service/rateLimit.js +4 -2
- package/lib/rest/verify/v2/service/verification.js +6 -6
- package/lib/rest/verify/v2/service/verificationCheck.js +2 -2
- package/lib/rest/verify/v2/service/webhook.js +8 -6
- package/lib/rest/verify/v2/service.js +4 -2
- package/lib/rest/verify/v2/template.js +3 -1
- package/lib/rest/verify/v2/verificationAttempt.d.ts +50 -10
- package/lib/rest/verify/v2/verificationAttempt.js +61 -15
- package/lib/rest/video/v1/composition.d.ts +2 -0
- package/lib/rest/video/v1/composition.js +7 -2
- package/lib/rest/video/v1/compositionHook.js +6 -4
- package/lib/rest/video/v1/compositionSettings.js +2 -2
- package/lib/rest/video/v1/recording.d.ts +2 -0
- package/lib/rest/video/v1/recording.js +5 -0
- package/lib/rest/video/v1/recordingSettings.js +2 -2
- 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 +8 -0
- package/lib/rest/video/v1/room.js +17 -3
- 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 +4 -2
- package/lib/rest/voice/v1/connectionPolicy.js +2 -0
- package/lib/rest/voice/v1/dialingPermissions/bulkCountryUpdate.js +2 -2
- 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 +4 -2
- package/lib/rest/voice/v1/sourceIpMapping.js +8 -6
- package/lib/rest/wireless/v1/command.js +4 -2
- 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 +3 -3
- package/CHANGES.md +0 -2517
|
@@ -0,0 +1,671 @@
|
|
|
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 ConferenceParticipantList;
|
|
21
|
+
var ConferenceParticipantPage;
|
|
22
|
+
var ConferenceParticipantInstance;
|
|
23
|
+
var ConferenceParticipantContext;
|
|
24
|
+
|
|
25
|
+
/* jshint ignore:start */
|
|
26
|
+
/**
|
|
27
|
+
* Initialize the ConferenceParticipantList
|
|
28
|
+
*
|
|
29
|
+
* @constructor Twilio.Insights.V1.ConferenceContext.ConferenceParticipantList
|
|
30
|
+
*
|
|
31
|
+
* @param {Twilio.Insights.V1} version - Version of the resource
|
|
32
|
+
* @param {string} conferenceSid - Conference SID.
|
|
33
|
+
*/
|
|
34
|
+
/* jshint ignore:end */
|
|
35
|
+
ConferenceParticipantList = function ConferenceParticipantList(version,
|
|
36
|
+
conferenceSid) {
|
|
37
|
+
/* jshint ignore:start */
|
|
38
|
+
/**
|
|
39
|
+
* @function conferenceParticipants
|
|
40
|
+
* @memberof Twilio.Insights.V1.ConferenceContext#
|
|
41
|
+
*
|
|
42
|
+
* @param {string} sid - sid of instance
|
|
43
|
+
*
|
|
44
|
+
* @returns {Twilio.Insights.V1.ConferenceContext.ConferenceParticipantContext}
|
|
45
|
+
*/
|
|
46
|
+
/* jshint ignore:end */
|
|
47
|
+
function ConferenceParticipantListInstance(sid) {
|
|
48
|
+
return ConferenceParticipantListInstance.get(sid);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
ConferenceParticipantListInstance._version = version;
|
|
52
|
+
// Path Solution
|
|
53
|
+
ConferenceParticipantListInstance._solution = {conferenceSid: conferenceSid};
|
|
54
|
+
ConferenceParticipantListInstance._uri = `/Conferences/${conferenceSid}/Participants`;
|
|
55
|
+
/* jshint ignore:start */
|
|
56
|
+
/**
|
|
57
|
+
* Streams ConferenceParticipantInstance records from the API.
|
|
58
|
+
*
|
|
59
|
+
* This operation lazily loads records as efficiently as possible until the limit
|
|
60
|
+
* is reached.
|
|
61
|
+
*
|
|
62
|
+
* The results are passed into the callback function, so this operation is memory
|
|
63
|
+
* efficient.
|
|
64
|
+
*
|
|
65
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
66
|
+
* function.
|
|
67
|
+
*
|
|
68
|
+
* @function each
|
|
69
|
+
* @memberof Twilio.Insights.V1.ConferenceContext.ConferenceParticipantList#
|
|
70
|
+
*
|
|
71
|
+
* @param {object} [opts] - Options for request
|
|
72
|
+
* @param {string} [opts.participantSid] - Participant SID.
|
|
73
|
+
* @param {string} [opts.label] - User-specified label for a participant.
|
|
74
|
+
* @param {string} [opts.events] -
|
|
75
|
+
* Conference events generated by application or participant activity.
|
|
76
|
+
* @param {number} [opts.limit] -
|
|
77
|
+
* Upper limit for the number of records to return.
|
|
78
|
+
* each() guarantees never to return more than limit.
|
|
79
|
+
* Default is no limit
|
|
80
|
+
* @param {number} [opts.pageSize] -
|
|
81
|
+
* Number of records to fetch per request,
|
|
82
|
+
* when not set will use the default value of 50 records.
|
|
83
|
+
* If no pageSize is defined but a limit is defined,
|
|
84
|
+
* each() will attempt to read the limit with the most efficient
|
|
85
|
+
* page size, i.e. min(limit, 1000)
|
|
86
|
+
* @param {Function} [opts.callback] -
|
|
87
|
+
* Function to process each record. If this and a positional
|
|
88
|
+
* callback are passed, this one will be used
|
|
89
|
+
* @param {Function} [opts.done] -
|
|
90
|
+
* Function to be called upon completion of streaming
|
|
91
|
+
* @param {Function} [callback] - Function to process each record
|
|
92
|
+
*/
|
|
93
|
+
/* jshint ignore:end */
|
|
94
|
+
ConferenceParticipantListInstance.each = function each(opts, callback) {
|
|
95
|
+
if (_.isFunction(opts)) {
|
|
96
|
+
callback = opts;
|
|
97
|
+
opts = {};
|
|
98
|
+
}
|
|
99
|
+
opts = opts || {};
|
|
100
|
+
if (opts.callback) {
|
|
101
|
+
callback = opts.callback;
|
|
102
|
+
}
|
|
103
|
+
if (_.isUndefined(callback)) {
|
|
104
|
+
throw new Error('Callback function must be provided');
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
var done = false;
|
|
108
|
+
var currentPage = 1;
|
|
109
|
+
var currentResource = 0;
|
|
110
|
+
var limits = this._version.readLimits({
|
|
111
|
+
limit: opts.limit,
|
|
112
|
+
pageSize: opts.pageSize
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
function onComplete(error) {
|
|
116
|
+
done = true;
|
|
117
|
+
if (_.isFunction(opts.done)) {
|
|
118
|
+
opts.done(error);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function fetchNextPage(fn) {
|
|
123
|
+
var promise = fn();
|
|
124
|
+
if (_.isUndefined(promise)) {
|
|
125
|
+
onComplete();
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
promise.then(function(page) {
|
|
130
|
+
_.each(page.instances, function(instance) {
|
|
131
|
+
if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {
|
|
132
|
+
done = true;
|
|
133
|
+
return false;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
currentResource++;
|
|
137
|
+
callback(instance, onComplete);
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
if (!done) {
|
|
141
|
+
currentPage++;
|
|
142
|
+
fetchNextPage(_.bind(page.nextPage, page));
|
|
143
|
+
} else {
|
|
144
|
+
onComplete();
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
promise.catch(onComplete);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
/* jshint ignore:start */
|
|
155
|
+
/**
|
|
156
|
+
* Lists ConferenceParticipantInstance records from the API as a list.
|
|
157
|
+
*
|
|
158
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
159
|
+
* function.
|
|
160
|
+
*
|
|
161
|
+
* @function list
|
|
162
|
+
* @memberof Twilio.Insights.V1.ConferenceContext.ConferenceParticipantList#
|
|
163
|
+
*
|
|
164
|
+
* @param {object} [opts] - Options for request
|
|
165
|
+
* @param {string} [opts.participantSid] - Participant SID.
|
|
166
|
+
* @param {string} [opts.label] - User-specified label for a participant.
|
|
167
|
+
* @param {string} [opts.events] -
|
|
168
|
+
* Conference events generated by application or participant activity.
|
|
169
|
+
* @param {number} [opts.limit] -
|
|
170
|
+
* Upper limit for the number of records to return.
|
|
171
|
+
* list() guarantees never to return more than limit.
|
|
172
|
+
* Default is no limit
|
|
173
|
+
* @param {number} [opts.pageSize] -
|
|
174
|
+
* Number of records to fetch per request,
|
|
175
|
+
* when not set will use the default value of 50 records.
|
|
176
|
+
* If no page_size is defined but a limit is defined,
|
|
177
|
+
* list() will attempt to read the limit with the most
|
|
178
|
+
* efficient page size, i.e. min(limit, 1000)
|
|
179
|
+
* @param {function} [callback] - Callback to handle list of records
|
|
180
|
+
*
|
|
181
|
+
* @returns {Promise} Resolves to a list of records
|
|
182
|
+
*/
|
|
183
|
+
/* jshint ignore:end */
|
|
184
|
+
ConferenceParticipantListInstance.list = function list(opts, callback) {
|
|
185
|
+
if (_.isFunction(opts)) {
|
|
186
|
+
callback = opts;
|
|
187
|
+
opts = {};
|
|
188
|
+
}
|
|
189
|
+
opts = opts || {};
|
|
190
|
+
var deferred = Q.defer();
|
|
191
|
+
var allResources = [];
|
|
192
|
+
opts.callback = function(resource, done) {
|
|
193
|
+
allResources.push(resource);
|
|
194
|
+
|
|
195
|
+
if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {
|
|
196
|
+
done();
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
opts.done = function(error) {
|
|
201
|
+
if (_.isUndefined(error)) {
|
|
202
|
+
deferred.resolve(allResources);
|
|
203
|
+
} else {
|
|
204
|
+
deferred.reject(error);
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
if (_.isFunction(callback)) {
|
|
209
|
+
deferred.promise.nodeify(callback);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
this.each(opts);
|
|
213
|
+
return deferred.promise;
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
/* jshint ignore:start */
|
|
217
|
+
/**
|
|
218
|
+
* Retrieve a single page of ConferenceParticipantInstance records from the API.
|
|
219
|
+
*
|
|
220
|
+
* The request is executed immediately.
|
|
221
|
+
*
|
|
222
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
223
|
+
* function.
|
|
224
|
+
*
|
|
225
|
+
* @function page
|
|
226
|
+
* @memberof Twilio.Insights.V1.ConferenceContext.ConferenceParticipantList#
|
|
227
|
+
*
|
|
228
|
+
* @param {object} [opts] - Options for request
|
|
229
|
+
* @param {string} [opts.participantSid] - Participant SID.
|
|
230
|
+
* @param {string} [opts.label] - User-specified label for a participant.
|
|
231
|
+
* @param {string} [opts.events] -
|
|
232
|
+
* Conference events generated by application or participant activity.
|
|
233
|
+
* @param {string} [opts.pageToken] - PageToken provided by the API
|
|
234
|
+
* @param {number} [opts.pageNumber] -
|
|
235
|
+
* Page Number, this value is simply for client state
|
|
236
|
+
* @param {number} [opts.pageSize] - Number of records to return, defaults to 50
|
|
237
|
+
* @param {function} [callback] - Callback to handle list of records
|
|
238
|
+
*
|
|
239
|
+
* @returns {Promise} Resolves to a list of records
|
|
240
|
+
*/
|
|
241
|
+
/* jshint ignore:end */
|
|
242
|
+
ConferenceParticipantListInstance.page = function page(opts, callback) {
|
|
243
|
+
if (_.isFunction(opts)) {
|
|
244
|
+
callback = opts;
|
|
245
|
+
opts = {};
|
|
246
|
+
}
|
|
247
|
+
opts = opts || {};
|
|
248
|
+
|
|
249
|
+
var deferred = Q.defer();
|
|
250
|
+
var data = values.of({
|
|
251
|
+
'ParticipantSid': _.get(opts, 'participantSid'),
|
|
252
|
+
'Label': _.get(opts, 'label'),
|
|
253
|
+
'Events': _.get(opts, 'events'),
|
|
254
|
+
'PageToken': opts.pageToken,
|
|
255
|
+
'Page': opts.pageNumber,
|
|
256
|
+
'PageSize': opts.pageSize
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
var promise = this._version.page({uri: this._uri, method: 'GET', params: data});
|
|
260
|
+
|
|
261
|
+
promise = promise.then(function(payload) {
|
|
262
|
+
deferred.resolve(new ConferenceParticipantPage(this._version, payload, this._solution));
|
|
263
|
+
}.bind(this));
|
|
264
|
+
|
|
265
|
+
promise.catch(function(error) {
|
|
266
|
+
deferred.reject(error);
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
if (_.isFunction(callback)) {
|
|
270
|
+
deferred.promise.nodeify(callback);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
return deferred.promise;
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
/* jshint ignore:start */
|
|
277
|
+
/**
|
|
278
|
+
* Retrieve a single target page of ConferenceParticipantInstance records from the
|
|
279
|
+
* API.
|
|
280
|
+
*
|
|
281
|
+
* The request is executed immediately.
|
|
282
|
+
*
|
|
283
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
284
|
+
* function.
|
|
285
|
+
*
|
|
286
|
+
* @function getPage
|
|
287
|
+
* @memberof Twilio.Insights.V1.ConferenceContext.ConferenceParticipantList#
|
|
288
|
+
*
|
|
289
|
+
* @param {string} [targetUrl] - API-generated URL for the requested results page
|
|
290
|
+
* @param {function} [callback] - Callback to handle list of records
|
|
291
|
+
*
|
|
292
|
+
* @returns {Promise} Resolves to a list of records
|
|
293
|
+
*/
|
|
294
|
+
/* jshint ignore:end */
|
|
295
|
+
ConferenceParticipantListInstance.getPage = function getPage(targetUrl,
|
|
296
|
+
callback) {
|
|
297
|
+
var deferred = Q.defer();
|
|
298
|
+
|
|
299
|
+
var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});
|
|
300
|
+
|
|
301
|
+
promise = promise.then(function(payload) {
|
|
302
|
+
deferred.resolve(new ConferenceParticipantPage(this._version, payload, this._solution));
|
|
303
|
+
}.bind(this));
|
|
304
|
+
|
|
305
|
+
promise.catch(function(error) {
|
|
306
|
+
deferred.reject(error);
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
if (_.isFunction(callback)) {
|
|
310
|
+
deferred.promise.nodeify(callback);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
return deferred.promise;
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
/* jshint ignore:start */
|
|
317
|
+
/**
|
|
318
|
+
* Constructs a conference_participant
|
|
319
|
+
*
|
|
320
|
+
* @function get
|
|
321
|
+
* @memberof Twilio.Insights.V1.ConferenceContext.ConferenceParticipantList#
|
|
322
|
+
*
|
|
323
|
+
* @param {string} participantSid - Participant SID.
|
|
324
|
+
*
|
|
325
|
+
* @returns {Twilio.Insights.V1.ConferenceContext.ConferenceParticipantContext}
|
|
326
|
+
*/
|
|
327
|
+
/* jshint ignore:end */
|
|
328
|
+
ConferenceParticipantListInstance.get = function get(participantSid) {
|
|
329
|
+
return new ConferenceParticipantContext(
|
|
330
|
+
this._version,
|
|
331
|
+
this._solution.conferenceSid,
|
|
332
|
+
participantSid
|
|
333
|
+
);
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
/* jshint ignore:start */
|
|
337
|
+
/**
|
|
338
|
+
* Provide a user-friendly representation
|
|
339
|
+
*
|
|
340
|
+
* @function toJSON
|
|
341
|
+
* @memberof Twilio.Insights.V1.ConferenceContext.ConferenceParticipantList#
|
|
342
|
+
*
|
|
343
|
+
* @returns Object
|
|
344
|
+
*/
|
|
345
|
+
/* jshint ignore:end */
|
|
346
|
+
ConferenceParticipantListInstance.toJSON = function toJSON() {
|
|
347
|
+
return this._solution;
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
ConferenceParticipantListInstance[util.inspect.custom] = function inspect(depth,
|
|
351
|
+
options) {
|
|
352
|
+
return util.inspect(this.toJSON(), options);
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
return ConferenceParticipantListInstance;
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
/* jshint ignore:start */
|
|
360
|
+
/**
|
|
361
|
+
* Initialize the ConferenceParticipantPage
|
|
362
|
+
*
|
|
363
|
+
* @constructor Twilio.Insights.V1.ConferenceContext.ConferenceParticipantPage
|
|
364
|
+
*
|
|
365
|
+
* @param {V1} version - Version of the resource
|
|
366
|
+
* @param {Response<string>} response - Response from the API
|
|
367
|
+
* @param {ConferenceParticipantSolution} solution - Path solution
|
|
368
|
+
*
|
|
369
|
+
* @returns ConferenceParticipantPage
|
|
370
|
+
*/
|
|
371
|
+
/* jshint ignore:end */
|
|
372
|
+
ConferenceParticipantPage = function ConferenceParticipantPage(version,
|
|
373
|
+
response, solution) {
|
|
374
|
+
// Path Solution
|
|
375
|
+
this._solution = solution;
|
|
376
|
+
|
|
377
|
+
Page.prototype.constructor.call(this, version, response, this._solution);
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
_.extend(ConferenceParticipantPage.prototype, Page.prototype);
|
|
381
|
+
ConferenceParticipantPage.prototype.constructor = ConferenceParticipantPage;
|
|
382
|
+
|
|
383
|
+
/* jshint ignore:start */
|
|
384
|
+
/**
|
|
385
|
+
* Build an instance of ConferenceParticipantInstance
|
|
386
|
+
*
|
|
387
|
+
* @function getInstance
|
|
388
|
+
* @memberof Twilio.Insights.V1.ConferenceContext.ConferenceParticipantPage#
|
|
389
|
+
*
|
|
390
|
+
* @param {ConferenceParticipantPayload} payload - Payload response from the API
|
|
391
|
+
*
|
|
392
|
+
* @returns ConferenceParticipantInstance
|
|
393
|
+
*/
|
|
394
|
+
/* jshint ignore:end */
|
|
395
|
+
ConferenceParticipantPage.prototype.getInstance = function getInstance(payload)
|
|
396
|
+
{
|
|
397
|
+
return new ConferenceParticipantInstance(this._version, payload, this._solution.conferenceSid);
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
/* jshint ignore:start */
|
|
401
|
+
/**
|
|
402
|
+
* Provide a user-friendly representation
|
|
403
|
+
*
|
|
404
|
+
* @function toJSON
|
|
405
|
+
* @memberof Twilio.Insights.V1.ConferenceContext.ConferenceParticipantPage#
|
|
406
|
+
*
|
|
407
|
+
* @returns Object
|
|
408
|
+
*/
|
|
409
|
+
/* jshint ignore:end */
|
|
410
|
+
ConferenceParticipantPage.prototype.toJSON = function toJSON() {
|
|
411
|
+
let clone = {};
|
|
412
|
+
_.forOwn(this, function(value, key) {
|
|
413
|
+
if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
|
|
414
|
+
clone[key] = value;
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
return clone;
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
ConferenceParticipantPage.prototype[util.inspect.custom] = function
|
|
421
|
+
inspect(depth, options) {
|
|
422
|
+
return util.inspect(this.toJSON(), options);
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
/* jshint ignore:start */
|
|
427
|
+
/**
|
|
428
|
+
* Initialize the ConferenceParticipantContext
|
|
429
|
+
*
|
|
430
|
+
* @constructor Twilio.Insights.V1.ConferenceContext.ConferenceParticipantInstance
|
|
431
|
+
*
|
|
432
|
+
* @property {string} participantSid - SID for this participant.
|
|
433
|
+
* @property {string} label - The user-specified label of this participant.
|
|
434
|
+
* @property {string} conferenceSid - Conference SID.
|
|
435
|
+
* @property {string} callSid - Unique SID identifier of the call.
|
|
436
|
+
* @property {string} accountSid - Account SID.
|
|
437
|
+
* @property {conference_participant.call_direction} callDirection -
|
|
438
|
+
* Call direction of the participant.
|
|
439
|
+
* @property {string} from - Caller ID of the calling party.
|
|
440
|
+
* @property {string} to - Called party.
|
|
441
|
+
* @property {conference_participant.call_status} callStatus -
|
|
442
|
+
* Call status of the call that generated the participant.
|
|
443
|
+
* @property {string} countryCode - ISO alpha-2 country code of the participant.
|
|
444
|
+
* @property {boolean} isModerator -
|
|
445
|
+
* Boolean. Indicates whether participant had startConferenceOnEnter=true or endConferenceOnExit=true.
|
|
446
|
+
* @property {Date} joinTime - ISO 8601 timestamp of participant join event.
|
|
447
|
+
* @property {Date} leaveTime - ISO 8601 timestamp of participant leave event.
|
|
448
|
+
* @property {number} durationSeconds - Participant durations in seconds.
|
|
449
|
+
* @property {number} outboundQueueLength -
|
|
450
|
+
* Estimated time in queue at call creation.
|
|
451
|
+
* @property {number} outboundTimeInQueue - Actual time in queue (seconds).
|
|
452
|
+
* @property {conference_participant.jitter_buffer_size} jitterBufferSize -
|
|
453
|
+
* The Jitter Buffer Size of this Conference Participant.
|
|
454
|
+
* @property {boolean} isCoach -
|
|
455
|
+
* Boolean. Indicated whether participant was a coach.
|
|
456
|
+
* @property {string} coachedParticipants - Call SIDs coached by this participant.
|
|
457
|
+
* @property {conference_participant.region} participantRegion -
|
|
458
|
+
* Twilio region where the participant media originates.
|
|
459
|
+
* @property {conference_participant.region} conferenceRegion -
|
|
460
|
+
* The Conference Region of this Conference Participant.
|
|
461
|
+
* @property {conference_participant.call_type} callType -
|
|
462
|
+
* The Call Type of this Conference Participant.
|
|
463
|
+
* @property {conference_participant.processing_state} processingState -
|
|
464
|
+
* Processing state of the Participant Summary.
|
|
465
|
+
* @property {object} properties - Participant properties and metadata.
|
|
466
|
+
* @property {object} events -
|
|
467
|
+
* Object containing information of actions taken by participants. Nested resource URLs.
|
|
468
|
+
* @property {object} metrics - Object. Contains participant quality metrics.
|
|
469
|
+
* @property {string} url - The URL of this resource.
|
|
470
|
+
*
|
|
471
|
+
* @param {V1} version - Version of the resource
|
|
472
|
+
* @param {ConferenceParticipantPayload} payload - The instance payload
|
|
473
|
+
* @param {sid} conferenceSid - Conference SID.
|
|
474
|
+
* @param {sid} participantSid - Participant SID.
|
|
475
|
+
*/
|
|
476
|
+
/* jshint ignore:end */
|
|
477
|
+
ConferenceParticipantInstance = function ConferenceParticipantInstance(version,
|
|
478
|
+
payload, conferenceSid, participantSid) {
|
|
479
|
+
this._version = version;
|
|
480
|
+
|
|
481
|
+
// Marshaled Properties
|
|
482
|
+
this.participantSid = payload.participant_sid; // jshint ignore:line
|
|
483
|
+
this.label = payload.label; // jshint ignore:line
|
|
484
|
+
this.conferenceSid = payload.conference_sid; // jshint ignore:line
|
|
485
|
+
this.callSid = payload.call_sid; // jshint ignore:line
|
|
486
|
+
this.accountSid = payload.account_sid; // jshint ignore:line
|
|
487
|
+
this.callDirection = payload.call_direction; // jshint ignore:line
|
|
488
|
+
this.from = payload.from; // jshint ignore:line
|
|
489
|
+
this.to = payload.to; // jshint ignore:line
|
|
490
|
+
this.callStatus = payload.call_status; // jshint ignore:line
|
|
491
|
+
this.countryCode = payload.country_code; // jshint ignore:line
|
|
492
|
+
this.isModerator = payload.is_moderator; // jshint ignore:line
|
|
493
|
+
this.joinTime = deserialize.iso8601DateTime(payload.join_time); // jshint ignore:line
|
|
494
|
+
this.leaveTime = deserialize.iso8601DateTime(payload.leave_time); // jshint ignore:line
|
|
495
|
+
this.durationSeconds = deserialize.integer(payload.duration_seconds); // jshint ignore:line
|
|
496
|
+
this.outboundQueueLength = deserialize.integer(payload.outbound_queue_length); // jshint ignore:line
|
|
497
|
+
this.outboundTimeInQueue = deserialize.integer(payload.outbound_time_in_queue); // jshint ignore:line
|
|
498
|
+
this.jitterBufferSize = payload.jitter_buffer_size; // jshint ignore:line
|
|
499
|
+
this.isCoach = payload.is_coach; // jshint ignore:line
|
|
500
|
+
this.coachedParticipants = payload.coached_participants; // jshint ignore:line
|
|
501
|
+
this.participantRegion = payload.participant_region; // jshint ignore:line
|
|
502
|
+
this.conferenceRegion = payload.conference_region; // jshint ignore:line
|
|
503
|
+
this.callType = payload.call_type; // jshint ignore:line
|
|
504
|
+
this.processingState = payload.processing_state; // jshint ignore:line
|
|
505
|
+
this.properties = payload.properties; // jshint ignore:line
|
|
506
|
+
this.events = payload.events; // jshint ignore:line
|
|
507
|
+
this.metrics = payload.metrics; // jshint ignore:line
|
|
508
|
+
this.url = payload.url; // jshint ignore:line
|
|
509
|
+
|
|
510
|
+
// Context
|
|
511
|
+
this._context = undefined;
|
|
512
|
+
this._solution = {
|
|
513
|
+
conferenceSid: conferenceSid,
|
|
514
|
+
participantSid: participantSid || this.participantSid,
|
|
515
|
+
};
|
|
516
|
+
};
|
|
517
|
+
|
|
518
|
+
Object.defineProperty(ConferenceParticipantInstance.prototype,
|
|
519
|
+
'_proxy', {
|
|
520
|
+
get: function() {
|
|
521
|
+
if (!this._context) {
|
|
522
|
+
this._context = new ConferenceParticipantContext(
|
|
523
|
+
this._version,
|
|
524
|
+
this._solution.conferenceSid,
|
|
525
|
+
this._solution.participantSid
|
|
526
|
+
);
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
return this._context;
|
|
530
|
+
}
|
|
531
|
+
});
|
|
532
|
+
|
|
533
|
+
/* jshint ignore:start */
|
|
534
|
+
/**
|
|
535
|
+
* fetch a ConferenceParticipantInstance
|
|
536
|
+
*
|
|
537
|
+
* @function fetch
|
|
538
|
+
* @memberof Twilio.Insights.V1.ConferenceContext.ConferenceParticipantInstance#
|
|
539
|
+
*
|
|
540
|
+
* @param {object} [opts] - Options for request
|
|
541
|
+
* @param {string} [opts.events] -
|
|
542
|
+
* Conference events generated by application or participant activity.
|
|
543
|
+
* @param {string} [opts.metrics] - Object. Contains call quality metrics.
|
|
544
|
+
* @param {function} [callback] - Callback to handle processed record
|
|
545
|
+
*
|
|
546
|
+
* @returns {Promise} Resolves to processed ConferenceParticipantInstance
|
|
547
|
+
*/
|
|
548
|
+
/* jshint ignore:end */
|
|
549
|
+
ConferenceParticipantInstance.prototype.fetch = function fetch(opts, callback) {
|
|
550
|
+
return this._proxy.fetch(opts, callback);
|
|
551
|
+
};
|
|
552
|
+
|
|
553
|
+
/* jshint ignore:start */
|
|
554
|
+
/**
|
|
555
|
+
* Provide a user-friendly representation
|
|
556
|
+
*
|
|
557
|
+
* @function toJSON
|
|
558
|
+
* @memberof Twilio.Insights.V1.ConferenceContext.ConferenceParticipantInstance#
|
|
559
|
+
*
|
|
560
|
+
* @returns Object
|
|
561
|
+
*/
|
|
562
|
+
/* jshint ignore:end */
|
|
563
|
+
ConferenceParticipantInstance.prototype.toJSON = function toJSON() {
|
|
564
|
+
let clone = {};
|
|
565
|
+
_.forOwn(this, function(value, key) {
|
|
566
|
+
if (!_.startsWith(key, '_') && ! _.isFunction(value)) {
|
|
567
|
+
clone[key] = value;
|
|
568
|
+
}
|
|
569
|
+
});
|
|
570
|
+
return clone;
|
|
571
|
+
};
|
|
572
|
+
|
|
573
|
+
ConferenceParticipantInstance.prototype[util.inspect.custom] = function
|
|
574
|
+
inspect(depth, options) {
|
|
575
|
+
return util.inspect(this.toJSON(), options);
|
|
576
|
+
};
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
/* jshint ignore:start */
|
|
580
|
+
/**
|
|
581
|
+
* Initialize the ConferenceParticipantContext
|
|
582
|
+
*
|
|
583
|
+
* @constructor Twilio.Insights.V1.ConferenceContext.ConferenceParticipantContext
|
|
584
|
+
*
|
|
585
|
+
* @param {V1} version - Version of the resource
|
|
586
|
+
* @param {sid} conferenceSid - Conference SID.
|
|
587
|
+
* @param {sid} participantSid - Participant SID.
|
|
588
|
+
*/
|
|
589
|
+
/* jshint ignore:end */
|
|
590
|
+
ConferenceParticipantContext = function ConferenceParticipantContext(version,
|
|
591
|
+
conferenceSid, participantSid) {
|
|
592
|
+
this._version = version;
|
|
593
|
+
|
|
594
|
+
// Path Solution
|
|
595
|
+
this._solution = {conferenceSid: conferenceSid, participantSid: participantSid, };
|
|
596
|
+
this._uri = `/Conferences/${conferenceSid}/Participants/${participantSid}`;
|
|
597
|
+
};
|
|
598
|
+
|
|
599
|
+
/* jshint ignore:start */
|
|
600
|
+
/**
|
|
601
|
+
* fetch a ConferenceParticipantInstance
|
|
602
|
+
*
|
|
603
|
+
* @function fetch
|
|
604
|
+
* @memberof Twilio.Insights.V1.ConferenceContext.ConferenceParticipantContext#
|
|
605
|
+
*
|
|
606
|
+
* @param {object} [opts] - Options for request
|
|
607
|
+
* @param {string} [opts.events] -
|
|
608
|
+
* Conference events generated by application or participant activity.
|
|
609
|
+
* @param {string} [opts.metrics] - Object. Contains call quality metrics.
|
|
610
|
+
* @param {function} [callback] - Callback to handle processed record
|
|
611
|
+
*
|
|
612
|
+
* @returns {Promise} Resolves to processed ConferenceParticipantInstance
|
|
613
|
+
*/
|
|
614
|
+
/* jshint ignore:end */
|
|
615
|
+
ConferenceParticipantContext.prototype.fetch = function fetch(opts, callback) {
|
|
616
|
+
if (_.isFunction(opts)) {
|
|
617
|
+
callback = opts;
|
|
618
|
+
opts = {};
|
|
619
|
+
}
|
|
620
|
+
opts = opts || {};
|
|
621
|
+
|
|
622
|
+
var deferred = Q.defer();
|
|
623
|
+
var data = values.of({'Events': _.get(opts, 'events'), 'Metrics': _.get(opts, 'metrics')});
|
|
624
|
+
|
|
625
|
+
var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});
|
|
626
|
+
|
|
627
|
+
promise = promise.then(function(payload) {
|
|
628
|
+
deferred.resolve(new ConferenceParticipantInstance(
|
|
629
|
+
this._version,
|
|
630
|
+
payload,
|
|
631
|
+
this._solution.conferenceSid,
|
|
632
|
+
this._solution.participantSid
|
|
633
|
+
));
|
|
634
|
+
}.bind(this));
|
|
635
|
+
|
|
636
|
+
promise.catch(function(error) {
|
|
637
|
+
deferred.reject(error);
|
|
638
|
+
});
|
|
639
|
+
|
|
640
|
+
if (_.isFunction(callback)) {
|
|
641
|
+
deferred.promise.nodeify(callback);
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
return deferred.promise;
|
|
645
|
+
};
|
|
646
|
+
|
|
647
|
+
/* jshint ignore:start */
|
|
648
|
+
/**
|
|
649
|
+
* Provide a user-friendly representation
|
|
650
|
+
*
|
|
651
|
+
* @function toJSON
|
|
652
|
+
* @memberof Twilio.Insights.V1.ConferenceContext.ConferenceParticipantContext#
|
|
653
|
+
*
|
|
654
|
+
* @returns Object
|
|
655
|
+
*/
|
|
656
|
+
/* jshint ignore:end */
|
|
657
|
+
ConferenceParticipantContext.prototype.toJSON = function toJSON() {
|
|
658
|
+
return this._solution;
|
|
659
|
+
};
|
|
660
|
+
|
|
661
|
+
ConferenceParticipantContext.prototype[util.inspect.custom] = function
|
|
662
|
+
inspect(depth, options) {
|
|
663
|
+
return util.inspect(this.toJSON(), options);
|
|
664
|
+
};
|
|
665
|
+
|
|
666
|
+
module.exports = {
|
|
667
|
+
ConferenceParticipantList: ConferenceParticipantList,
|
|
668
|
+
ConferenceParticipantPage: ConferenceParticipantPage,
|
|
669
|
+
ConferenceParticipantInstance: ConferenceParticipantInstance,
|
|
670
|
+
ConferenceParticipantContext: ConferenceParticipantContext
|
|
671
|
+
};
|