From 86c53b860ffc969286179834dad7f859569f212b Mon Sep 17 00:00:00 2001 From: Bilal Boussayoud Date: Thu, 15 Dec 2022 11:53:59 -0500 Subject: [PATCH 1/2] fix: resolve page payload types --- lib/base/Page.ts | 2 +- lib/rest/accounts/v1/authTokenPromotion.ts | 2 +- lib/rest/accounts/v1/credential/aws.ts | 8 +++++--- lib/rest/accounts/v1/credential/publicKey.ts | 12 +++++++++--- lib/rest/accounts/v1/secondaryAuthToken.ts | 2 +- lib/rest/api/v2010/account.ts | 8 +++++--- lib/rest/api/v2010/account/address.ts | 8 +++++--- .../v2010/account/address/dependentPhoneNumber.ts | 10 +++++----- lib/rest/api/v2010/account/application.ts | 10 +++++----- lib/rest/api/v2010/account/authorizedConnectApp.ts | 10 +++++----- .../v2010/account/availablePhoneNumberCountry.ts | 10 +++++----- .../account/availablePhoneNumberCountry/local.ts | 8 +++++--- .../availablePhoneNumberCountry/machineToMachine.ts | 10 +++++----- .../account/availablePhoneNumberCountry/mobile.ts | 8 +++++--- .../account/availablePhoneNumberCountry/national.ts | 8 +++++--- .../availablePhoneNumberCountry/sharedCost.ts | 8 +++++--- .../account/availablePhoneNumberCountry/tollFree.ts | 8 +++++--- .../account/availablePhoneNumberCountry/voip.ts | 8 +++++--- lib/rest/api/v2010/account/balance.ts | 2 +- lib/rest/api/v2010/account/call.ts | 8 +++++--- lib/rest/api/v2010/account/call/event.ts | 8 +++++--- lib/rest/api/v2010/account/call/feedback.ts | 2 +- lib/rest/api/v2010/account/call/feedbackSummary.ts | 2 +- lib/rest/api/v2010/account/call/notification.ts | 10 +++++----- lib/rest/api/v2010/account/call/payment.ts | 2 +- lib/rest/api/v2010/account/call/recording.ts | 8 +++++--- lib/rest/api/v2010/account/call/siprec.ts | 2 +- lib/rest/api/v2010/account/call/stream.ts | 2 +- .../api/v2010/account/call/userDefinedMessage.ts | 2 +- .../account/call/userDefinedMessageSubscription.ts | 2 +- lib/rest/api/v2010/account/conference.ts | 8 +++++--- .../api/v2010/account/conference/participant.ts | 10 +++++----- lib/rest/api/v2010/account/conference/recording.ts | 8 +++++--- lib/rest/api/v2010/account/connectApp.ts | 8 +++++--- lib/rest/api/v2010/account/incomingPhoneNumber.ts | 10 +++++----- .../account/incomingPhoneNumber/assignedAddOn.ts | 10 +++++----- .../assignedAddOn/assignedAddOnExtension.ts | 10 +++++----- .../api/v2010/account/incomingPhoneNumber/local.ts | 8 +++++--- .../api/v2010/account/incomingPhoneNumber/mobile.ts | 8 +++++--- .../v2010/account/incomingPhoneNumber/tollFree.ts | 8 +++++--- lib/rest/api/v2010/account/key.ts | 8 +++++--- lib/rest/api/v2010/account/message.ts | 8 +++++--- lib/rest/api/v2010/account/message/feedback.ts | 2 +- lib/rest/api/v2010/account/message/media.ts | 8 +++++--- lib/rest/api/v2010/account/newKey.ts | 2 +- lib/rest/api/v2010/account/newSigningKey.ts | 2 +- lib/rest/api/v2010/account/notification.ts | 10 +++++----- lib/rest/api/v2010/account/outgoingCallerId.ts | 10 +++++----- lib/rest/api/v2010/account/queue.ts | 8 +++++--- lib/rest/api/v2010/account/queue/member.ts | 8 +++++--- lib/rest/api/v2010/account/recording.ts | 8 +++++--- lib/rest/api/v2010/account/recording/addOnResult.ts | 10 +++++----- .../v2010/account/recording/addOnResult/payload.ts | 8 +++++--- .../api/v2010/account/recording/transcription.ts | 10 +++++----- lib/rest/api/v2010/account/shortCode.ts | 8 +++++--- lib/rest/api/v2010/account/signingKey.ts | 8 +++++--- lib/rest/api/v2010/account/sip/credentialList.ts | 10 +++++----- .../v2010/account/sip/credentialList/credential.ts | 8 +++++--- lib/rest/api/v2010/account/sip/domain.ts | 8 +++++--- .../authTypeCalls/authCallsCredentialListMapping.ts | 10 +++++----- .../authCallsIpAccessControlListMapping.ts | 9 +++++---- .../authRegistrationsCredentialListMapping.ts | 9 +++++---- .../account/sip/domain/credentialListMapping.ts | 10 +++++----- .../sip/domain/ipAccessControlListMapping.ts | 10 +++++----- .../api/v2010/account/sip/ipAccessControlList.ts | 10 +++++----- .../account/sip/ipAccessControlList/ipAddress.ts | 8 +++++--- lib/rest/api/v2010/account/token.ts | 2 +- lib/rest/api/v2010/account/transcription.ts | 10 +++++----- lib/rest/api/v2010/account/usage/record.ts | 8 +++++--- lib/rest/api/v2010/account/usage/record/allTime.ts | 8 +++++--- lib/rest/api/v2010/account/usage/record/daily.ts | 8 +++++--- .../api/v2010/account/usage/record/lastMonth.ts | 8 +++++--- lib/rest/api/v2010/account/usage/record/monthly.ts | 8 +++++--- .../api/v2010/account/usage/record/thisMonth.ts | 8 +++++--- lib/rest/api/v2010/account/usage/record/today.ts | 8 +++++--- lib/rest/api/v2010/account/usage/record/yearly.ts | 8 +++++--- .../api/v2010/account/usage/record/yesterday.ts | 8 +++++--- lib/rest/api/v2010/account/usage/trigger.ts | 8 +++++--- lib/rest/api/v2010/account/validationRequest.ts | 2 +- lib/rest/autopilot/v1/assistant.ts | 12 +++++++++--- lib/rest/autopilot/v1/assistant/defaults.ts | 2 +- lib/rest/autopilot/v1/assistant/dialogue.ts | 2 +- lib/rest/autopilot/v1/assistant/fieldType.ts | 8 +++++--- .../autopilot/v1/assistant/fieldType/fieldValue.ts | 8 +++++--- lib/rest/autopilot/v1/assistant/modelBuild.ts | 8 +++++--- lib/rest/autopilot/v1/assistant/query.ts | 8 +++++--- lib/rest/autopilot/v1/assistant/styleSheet.ts | 2 +- lib/rest/autopilot/v1/assistant/task.ts | 8 +++++--- lib/rest/autopilot/v1/assistant/task/field.ts | 8 +++++--- lib/rest/autopilot/v1/assistant/task/sample.ts | 8 +++++--- lib/rest/autopilot/v1/assistant/task/taskActions.ts | 2 +- .../autopilot/v1/assistant/task/taskStatistics.ts | 2 +- lib/rest/autopilot/v1/assistant/webhook.ts | 8 +++++--- lib/rest/autopilot/v1/restoreAssistant.ts | 2 +- lib/rest/bulkexports/v1/export.ts | 2 +- lib/rest/bulkexports/v1/export/day.ts | 8 +++++--- lib/rest/bulkexports/v1/export/exportCustomJob.ts | 10 +++++----- lib/rest/bulkexports/v1/export/job.ts | 2 +- lib/rest/bulkexports/v1/exportConfiguration.ts | 2 +- lib/rest/chat/v1/credential.ts | 8 +++++--- lib/rest/chat/v1/service.ts | 8 +++++--- lib/rest/chat/v1/service/channel.ts | 8 +++++--- lib/rest/chat/v1/service/channel/invite.ts | 8 +++++--- lib/rest/chat/v1/service/channel/member.ts | 8 +++++--- lib/rest/chat/v1/service/channel/message.ts | 8 +++++--- lib/rest/chat/v1/service/role.ts | 8 +++++--- lib/rest/chat/v1/service/user.ts | 8 +++++--- lib/rest/chat/v1/service/user/userChannel.ts | 10 +++++----- lib/rest/chat/v2/credential.ts | 8 +++++--- lib/rest/chat/v2/service.ts | 8 +++++--- lib/rest/chat/v2/service/binding.ts | 8 +++++--- lib/rest/chat/v2/service/channel.ts | 8 +++++--- lib/rest/chat/v2/service/channel/invite.ts | 8 +++++--- lib/rest/chat/v2/service/channel/member.ts | 8 +++++--- lib/rest/chat/v2/service/channel/message.ts | 8 +++++--- lib/rest/chat/v2/service/channel/webhook.ts | 8 +++++--- lib/rest/chat/v2/service/role.ts | 8 +++++--- lib/rest/chat/v2/service/user.ts | 8 +++++--- lib/rest/chat/v2/service/user/userBinding.ts | 10 +++++----- lib/rest/chat/v2/service/user/userChannel.ts | 10 +++++----- lib/rest/chat/v3/channel.ts | 2 +- lib/rest/content/v1/content.ts | 8 +++++--- lib/rest/content/v1/content/approvalFetch.ts | 2 +- lib/rest/conversations/v1/addressConfiguration.ts | 10 +++++----- lib/rest/conversations/v1/configuration.ts | 2 +- lib/rest/conversations/v1/configuration/webhook.ts | 2 +- lib/rest/conversations/v1/conversation.ts | 10 +++++----- lib/rest/conversations/v1/conversation/message.ts | 8 +++++--- .../v1/conversation/message/deliveryReceipt.ts | 10 +++++----- .../conversations/v1/conversation/participant.ts | 10 +++++----- lib/rest/conversations/v1/conversation/webhook.ts | 8 +++++--- lib/rest/conversations/v1/credential.ts | 8 +++++--- .../conversations/v1/participantConversation.ts | 13 ++++++++----- lib/rest/conversations/v1/role.ts | 8 +++++--- lib/rest/conversations/v1/service.ts | 8 +++++--- lib/rest/conversations/v1/service/binding.ts | 8 +++++--- lib/rest/conversations/v1/service/configuration.ts | 2 +- .../v1/service/configuration/notification.ts | 2 +- .../v1/service/configuration/webhook.ts | 2 +- lib/rest/conversations/v1/service/conversation.ts | 10 +++++----- .../v1/service/conversation/message.ts | 8 +++++--- .../service/conversation/message/deliveryReceipt.ts | 10 +++++----- .../v1/service/conversation/participant.ts | 10 +++++----- .../v1/service/conversation/webhook.ts | 8 +++++--- .../v1/service/participantConversation.ts | 10 +++++----- lib/rest/conversations/v1/service/role.ts | 8 +++++--- lib/rest/conversations/v1/service/user.ts | 8 +++++--- .../v1/service/user/userConversation.ts | 10 +++++----- lib/rest/conversations/v1/user.ts | 8 +++++--- lib/rest/conversations/v1/user/userConversation.ts | 10 +++++----- lib/rest/events/v1/eventType.ts | 8 +++++--- lib/rest/events/v1/schema.ts | 2 +- lib/rest/events/v1/schema/schemaVersion.ts | 10 +++++----- lib/rest/events/v1/sink.ts | 8 +++++--- lib/rest/events/v1/sink/sinkTest.ts | 2 +- lib/rest/events/v1/sink/sinkValidate.ts | 2 +- lib/rest/events/v1/subscription.ts | 10 +++++----- lib/rest/events/v1/subscription/subscribedEvent.ts | 10 +++++----- lib/rest/flexApi/v1/assessments.ts | 2 +- lib/rest/flexApi/v1/channel.ts | 8 +++++--- lib/rest/flexApi/v1/configuration.ts | 2 +- lib/rest/flexApi/v1/flexFlow.ts | 8 +++++--- lib/rest/flexApi/v1/goodData.ts | 2 +- lib/rest/flexApi/v1/interaction.ts | 2 +- .../flexApi/v1/interaction/interactionChannel.ts | 10 +++++----- .../interactionChannel/interactionChannelInvite.ts | 10 +++++----- .../interactionChannelParticipant.ts | 10 +++++----- lib/rest/flexApi/v1/userRoles.ts | 2 +- lib/rest/flexApi/v1/webChannel.ts | 8 +++++--- lib/rest/flexApi/v2/webChannels.ts | 2 +- lib/rest/frontlineApi/v1/user.ts | 2 +- lib/rest/insights/v1/call.ts | 2 +- lib/rest/insights/v1/call/annotation.ts | 2 +- lib/rest/insights/v1/call/callSummary.ts | 2 +- lib/rest/insights/v1/call/event.ts | 8 +++++--- lib/rest/insights/v1/call/metric.ts | 12 +++++++++--- lib/rest/insights/v1/callSummaries.ts | 10 +++++----- lib/rest/insights/v1/conference.ts | 8 +++++--- .../insights/v1/conference/conferenceParticipant.ts | 10 +++++----- lib/rest/insights/v1/room.ts | 8 +++++--- lib/rest/insights/v1/room/participant.ts | 10 +++++----- lib/rest/insights/v1/setting.ts | 2 +- lib/rest/ipMessaging/v1/credential.ts | 8 +++++--- lib/rest/ipMessaging/v1/service.ts | 8 +++++--- lib/rest/ipMessaging/v1/service/channel.ts | 8 +++++--- lib/rest/ipMessaging/v1/service/channel/invite.ts | 8 +++++--- lib/rest/ipMessaging/v1/service/channel/member.ts | 8 +++++--- lib/rest/ipMessaging/v1/service/channel/message.ts | 8 +++++--- lib/rest/ipMessaging/v1/service/role.ts | 8 +++++--- lib/rest/ipMessaging/v1/service/user.ts | 8 +++++--- lib/rest/ipMessaging/v1/service/user/userChannel.ts | 10 +++++----- lib/rest/ipMessaging/v2/credential.ts | 8 +++++--- lib/rest/ipMessaging/v2/service.ts | 8 +++++--- lib/rest/ipMessaging/v2/service/binding.ts | 8 +++++--- lib/rest/ipMessaging/v2/service/channel.ts | 8 +++++--- lib/rest/ipMessaging/v2/service/channel/invite.ts | 8 +++++--- lib/rest/ipMessaging/v2/service/channel/member.ts | 8 +++++--- lib/rest/ipMessaging/v2/service/channel/message.ts | 8 +++++--- lib/rest/ipMessaging/v2/service/channel/webhook.ts | 8 +++++--- lib/rest/ipMessaging/v2/service/role.ts | 8 +++++--- lib/rest/ipMessaging/v2/service/user.ts | 8 +++++--- lib/rest/ipMessaging/v2/service/user/userBinding.ts | 10 +++++----- lib/rest/ipMessaging/v2/service/user/userChannel.ts | 10 +++++----- lib/rest/lookups/v1/phoneNumber.ts | 2 +- lib/rest/lookups/v2/phoneNumber.ts | 2 +- lib/rest/media/v1/mediaProcessor.ts | 10 +++++----- lib/rest/media/v1/mediaRecording.ts | 10 +++++----- lib/rest/media/v1/playerStreamer.ts | 10 +++++----- lib/rest/media/v1/playerStreamer/playbackGrant.ts | 2 +- lib/rest/messaging/v1/brandRegistration.ts | 10 +++++----- .../messaging/v1/brandRegistration/brandVetting.ts | 10 +++++----- lib/rest/messaging/v1/deactivations.ts | 2 +- lib/rest/messaging/v1/domainCerts.ts | 2 +- lib/rest/messaging/v1/domainConfig.ts | 2 +- lib/rest/messaging/v1/externalCampaign.ts | 2 +- lib/rest/messaging/v1/service.ts | 8 +++++--- lib/rest/messaging/v1/service/alphaSender.ts | 10 +++++----- lib/rest/messaging/v1/service/phoneNumber.ts | 10 +++++----- lib/rest/messaging/v1/service/shortCode.ts | 8 +++++--- lib/rest/messaging/v1/service/usAppToPerson.ts | 10 +++++----- .../messaging/v1/service/usAppToPersonUsecase.ts | 2 +- lib/rest/messaging/v1/tollfreeVerification.ts | 10 +++++----- lib/rest/messaging/v1/usecase.ts | 2 +- lib/rest/microvisor/v1/app.ts | 8 +++++--- lib/rest/microvisor/v1/device.ts | 8 +++++--- lib/rest/monitor/v1/alert.ts | 8 +++++--- lib/rest/monitor/v1/event.ts | 8 +++++--- lib/rest/notify/v1/credential.ts | 8 +++++--- lib/rest/notify/v1/service.ts | 8 +++++--- lib/rest/notify/v1/service/binding.ts | 8 +++++--- lib/rest/notify/v1/service/notification.ts | 2 +- lib/rest/numbers/v2/regulatoryCompliance/bundle.ts | 8 +++++--- .../v2/regulatoryCompliance/bundle/bundleCopy.ts | 8 +++++--- .../v2/regulatoryCompliance/bundle/evaluation.ts | 8 +++++--- .../regulatoryCompliance/bundle/itemAssignment.ts | 10 +++++----- .../v2/regulatoryCompliance/bundle/replaceItems.ts | 2 +- lib/rest/numbers/v2/regulatoryCompliance/endUser.ts | 8 +++++--- .../numbers/v2/regulatoryCompliance/endUserType.ts | 10 +++++----- .../numbers/v2/regulatoryCompliance/regulation.ts | 8 +++++--- .../v2/regulatoryCompliance/supportingDocument.ts | 10 +++++----- .../regulatoryCompliance/supportingDocumentType.ts | 10 +++++----- lib/rest/oauth/v1/deviceCode.ts | 2 +- lib/rest/oauth/v1/oauth.ts | 2 +- lib/rest/oauth/v1/openidDiscovery.ts | 4 ++-- lib/rest/oauth/v1/token.ts | 2 +- lib/rest/oauth/v1/userInfo.ts | 2 +- lib/rest/preview/deployed_devices/fleet.ts | 8 +++++--- .../preview/deployed_devices/fleet/certificate.ts | 10 +++++----- .../preview/deployed_devices/fleet/deployment.ts | 8 +++++--- lib/rest/preview/deployed_devices/fleet/device.ts | 8 +++++--- lib/rest/preview/deployed_devices/fleet/key.ts | 8 +++++--- .../preview/hosted_numbers/authorizationDocument.ts | 10 +++++----- .../dependentHostedNumberOrder.ts | 10 +++++----- .../preview/hosted_numbers/hostedNumberOrder.ts | 10 +++++----- lib/rest/preview/marketplace/availableAddOn.ts | 10 +++++----- .../availableAddOn/availableAddOnExtension.ts | 10 +++++----- lib/rest/preview/marketplace/installedAddOn.ts | 10 +++++----- .../installedAddOn/installedAddOnExtension.ts | 10 +++++----- lib/rest/preview/sync/service.ts | 12 +++++++++--- lib/rest/preview/sync/service/document.ts | 8 +++++--- .../sync/service/document/documentPermission.ts | 10 +++++----- lib/rest/preview/sync/service/syncList.ts | 8 +++++--- .../preview/sync/service/syncList/syncListItem.ts | 10 +++++----- .../sync/service/syncList/syncListPermission.ts | 10 +++++----- lib/rest/preview/sync/service/syncMap.ts | 8 +++++--- .../preview/sync/service/syncMap/syncMapItem.ts | 10 +++++----- .../sync/service/syncMap/syncMapPermission.ts | 10 +++++----- lib/rest/preview/understand/assistant.ts | 8 +++++--- .../assistant/assistantFallbackActions.ts | 2 +- .../assistant/assistantInitiationActions.ts | 2 +- lib/rest/preview/understand/assistant/dialogue.ts | 2 +- lib/rest/preview/understand/assistant/fieldType.ts | 8 +++++--- .../understand/assistant/fieldType/fieldValue.ts | 8 +++++--- lib/rest/preview/understand/assistant/modelBuild.ts | 8 +++++--- lib/rest/preview/understand/assistant/query.ts | 8 +++++--- lib/rest/preview/understand/assistant/styleSheet.ts | 2 +- lib/rest/preview/understand/assistant/task.ts | 8 +++++--- lib/rest/preview/understand/assistant/task/field.ts | 8 +++++--- .../preview/understand/assistant/task/sample.ts | 8 +++++--- .../understand/assistant/task/taskActions.ts | 2 +- .../understand/assistant/task/taskStatistics.ts | 2 +- lib/rest/preview/wireless/command.ts | 8 +++++--- lib/rest/preview/wireless/ratePlan.ts | 8 +++++--- lib/rest/preview/wireless/sim.ts | 12 +++++++++--- lib/rest/preview/wireless/sim/usage.ts | 2 +- lib/rest/pricing/v1/messaging/country.ts | 8 +++++--- lib/rest/pricing/v1/phoneNumber/country.ts | 8 +++++--- lib/rest/pricing/v1/voice/country.ts | 8 +++++--- lib/rest/pricing/v1/voice/number.ts | 6 +++++- lib/rest/pricing/v2/country.ts | 8 +++++--- lib/rest/pricing/v2/number.ts | 2 +- lib/rest/pricing/v2/voice/country.ts | 8 +++++--- lib/rest/pricing/v2/voice/number.ts | 2 +- lib/rest/proxy/v1/service.ts | 8 +++++--- lib/rest/proxy/v1/service/phoneNumber.ts | 10 +++++----- lib/rest/proxy/v1/service/session.ts | 8 +++++--- lib/rest/proxy/v1/service/session/interaction.ts | 10 +++++----- lib/rest/proxy/v1/service/session/participant.ts | 10 +++++----- .../session/participant/messageInteraction.ts | 10 +++++----- lib/rest/proxy/v1/service/shortCode.ts | 8 +++++--- lib/rest/routes/v2/phoneNumber.ts | 2 +- lib/rest/routes/v2/sipDomain.ts | 2 +- lib/rest/routes/v2/trunk.ts | 2 +- lib/rest/serverless/v1/service.ts | 8 +++++--- lib/rest/serverless/v1/service/asset.ts | 8 +++++--- .../serverless/v1/service/asset/assetVersion.ts | 10 +++++----- lib/rest/serverless/v1/service/build.ts | 8 +++++--- lib/rest/serverless/v1/service/build/buildStatus.ts | 2 +- lib/rest/serverless/v1/service/environment.ts | 10 +++++----- .../serverless/v1/service/environment/deployment.ts | 8 +++++--- lib/rest/serverless/v1/service/environment/log.ts | 8 +++++--- .../serverless/v1/service/environment/variable.ts | 8 +++++--- lib/rest/serverless/v1/service/function.ts | 8 +++++--- .../v1/service/function/functionVersion.ts | 10 +++++----- .../functionVersion/functionVersionContent.ts | 2 +- lib/rest/studio/v1/flow.ts | 8 +++++--- lib/rest/studio/v1/flow/engagement.ts | 8 +++++--- .../studio/v1/flow/engagement/engagementContext.ts | 2 +- lib/rest/studio/v1/flow/engagement/step.ts | 8 +++++--- .../studio/v1/flow/engagement/step/stepContext.ts | 2 +- lib/rest/studio/v1/flow/execution.ts | 8 +++++--- .../studio/v1/flow/execution/executionContext.ts | 2 +- lib/rest/studio/v1/flow/execution/executionStep.ts | 10 +++++----- .../execution/executionStep/executionStepContext.ts | 2 +- lib/rest/studio/v2/flow.ts | 8 +++++--- lib/rest/studio/v2/flow/execution.ts | 8 +++++--- .../studio/v2/flow/execution/executionContext.ts | 2 +- lib/rest/studio/v2/flow/execution/executionStep.ts | 10 +++++----- .../execution/executionStep/executionStepContext.ts | 2 +- lib/rest/studio/v2/flow/flowRevision.ts | 10 +++++----- lib/rest/studio/v2/flow/flowTestUser.ts | 2 +- lib/rest/studio/v2/flowValidate.ts | 2 +- lib/rest/supersim/v1/esimProfile.ts | 10 +++++----- lib/rest/supersim/v1/fleet.ts | 8 +++++--- lib/rest/supersim/v1/ipCommand.ts | 12 +++++++++--- lib/rest/supersim/v1/network.ts | 8 +++++--- lib/rest/supersim/v1/networkAccessProfile.ts | 10 +++++----- .../networkAccessProfileNetwork.ts | 10 +++++----- lib/rest/supersim/v1/settingsUpdate.ts | 10 +++++----- lib/rest/supersim/v1/sim.ts | 8 +++++--- lib/rest/supersim/v1/sim/billingPeriod.ts | 10 +++++----- lib/rest/supersim/v1/sim/simIpAddress.ts | 10 +++++----- lib/rest/supersim/v1/smsCommand.ts | 8 +++++--- lib/rest/supersim/v1/usageRecord.ts | 10 +++++----- lib/rest/sync/v1/service.ts | 8 +++++--- lib/rest/sync/v1/service/document.ts | 8 +++++--- .../sync/v1/service/document/documentPermission.ts | 10 +++++----- lib/rest/sync/v1/service/syncList.ts | 8 +++++--- lib/rest/sync/v1/service/syncList/syncListItem.ts | 10 +++++----- .../sync/v1/service/syncList/syncListPermission.ts | 10 +++++----- lib/rest/sync/v1/service/syncMap.ts | 8 +++++--- lib/rest/sync/v1/service/syncMap/syncMapItem.ts | 10 +++++----- .../sync/v1/service/syncMap/syncMapPermission.ts | 10 +++++----- lib/rest/sync/v1/service/syncStream.ts | 8 +++++--- .../sync/v1/service/syncStream/streamMessage.ts | 2 +- lib/rest/taskrouter/v1/workspace.ts | 12 +++++++++--- lib/rest/taskrouter/v1/workspace/activity.ts | 8 +++++--- lib/rest/taskrouter/v1/workspace/event.ts | 8 +++++--- lib/rest/taskrouter/v1/workspace/task.ts | 8 +++++--- .../taskrouter/v1/workspace/task/reservation.ts | 10 +++++----- lib/rest/taskrouter/v1/workspace/taskChannel.ts | 10 +++++----- lib/rest/taskrouter/v1/workspace/taskQueue.ts | 8 +++++--- .../taskQueue/taskQueueCumulativeStatistics.ts | 2 +- .../taskQueue/taskQueueRealTimeStatistics.ts | 2 +- .../v1/workspace/taskQueue/taskQueueStatistics.ts | 2 +- .../v1/workspace/taskQueue/taskQueuesStatistics.ts | 10 +++++----- lib/rest/taskrouter/v1/workspace/worker.ts | 8 +++++--- .../taskrouter/v1/workspace/worker/reservation.ts | 10 +++++----- .../taskrouter/v1/workspace/worker/workerChannel.ts | 10 +++++----- .../v1/workspace/worker/workerStatistics.ts | 2 +- .../workspace/worker/workersCumulativeStatistics.ts | 2 +- .../workspace/worker/workersRealTimeStatistics.ts | 2 +- .../v1/workspace/worker/workersStatistics.ts | 2 +- lib/rest/taskrouter/v1/workspace/workflow.ts | 8 +++++--- .../workflow/workflowCumulativeStatistics.ts | 2 +- .../workflow/workflowRealTimeStatistics.ts | 2 +- .../v1/workspace/workflow/workflowStatistics.ts | 2 +- .../v1/workspace/workspaceCumulativeStatistics.ts | 2 +- .../v1/workspace/workspaceRealTimeStatistics.ts | 2 +- .../taskrouter/v1/workspace/workspaceStatistics.ts | 2 +- lib/rest/trunking/v1/trunk.ts | 8 +++++--- lib/rest/trunking/v1/trunk/credentialList.ts | 10 +++++----- lib/rest/trunking/v1/trunk/ipAccessControlList.ts | 10 +++++----- lib/rest/trunking/v1/trunk/originationUrl.ts | 10 +++++----- lib/rest/trunking/v1/trunk/phoneNumber.ts | 10 +++++----- lib/rest/trunking/v1/trunk/recording.ts | 2 +- lib/rest/trusthub/v1/customerProfiles.ts | 10 +++++----- .../customerProfilesChannelEndpointAssignment.ts | 9 +++++---- .../customerProfilesEntityAssignments.ts | 9 +++++---- .../customerProfiles/customerProfilesEvaluations.ts | 10 +++++----- lib/rest/trusthub/v1/endUser.ts | 8 +++++--- lib/rest/trusthub/v1/endUserType.ts | 10 +++++----- lib/rest/trusthub/v1/policies.ts | 8 +++++--- lib/rest/trusthub/v1/supportingDocument.ts | 10 +++++----- lib/rest/trusthub/v1/supportingDocumentType.ts | 10 +++++----- lib/rest/trusthub/v1/trustProducts.ts | 10 +++++----- .../trustProductsChannelEndpointAssignment.ts | 9 +++++---- .../trustProducts/trustProductsEntityAssignments.ts | 10 +++++----- .../v1/trustProducts/trustProductsEvaluations.ts | 10 +++++----- lib/rest/verify/v2/form.ts | 2 +- lib/rest/verify/v2/safelist.ts | 2 +- lib/rest/verify/v2/service.ts | 8 +++++--- lib/rest/verify/v2/service/accessToken.ts | 2 +- lib/rest/verify/v2/service/entity.ts | 8 +++++--- lib/rest/verify/v2/service/entity/challenge.ts | 8 +++++--- .../v2/service/entity/challenge/notification.ts | 2 +- lib/rest/verify/v2/service/entity/factor.ts | 8 +++++--- lib/rest/verify/v2/service/entity/newFactor.ts | 2 +- .../verify/v2/service/messagingConfiguration.ts | 10 +++++----- lib/rest/verify/v2/service/rateLimit.ts | 8 +++++--- lib/rest/verify/v2/service/rateLimit/bucket.ts | 8 +++++--- lib/rest/verify/v2/service/verification.ts | 2 +- lib/rest/verify/v2/service/verificationCheck.ts | 2 +- lib/rest/verify/v2/service/webhook.ts | 8 +++++--- lib/rest/verify/v2/template.ts | 8 +++++--- lib/rest/verify/v2/verificationAttempt.ts | 10 +++++----- lib/rest/verify/v2/verificationAttemptsSummary.ts | 2 +- lib/rest/video/v1/composition.ts | 10 +++++----- lib/rest/video/v1/compositionHook.ts | 10 +++++----- lib/rest/video/v1/compositionSettings.ts | 2 +- lib/rest/video/v1/recording.ts | 12 +++++++++--- lib/rest/video/v1/recordingSettings.ts | 2 +- lib/rest/video/v1/room.ts | 8 +++++--- lib/rest/video/v1/room/participant.ts | 10 +++++----- lib/rest/video/v1/room/participant/anonymize.ts | 2 +- .../video/v1/room/participant/publishedTrack.ts | 10 +++++----- .../video/v1/room/participant/subscribeRules.ts | 2 +- .../video/v1/room/participant/subscribedTrack.ts | 10 +++++----- lib/rest/video/v1/room/recordingRules.ts | 2 +- lib/rest/video/v1/room/roomRecording.ts | 10 +++++----- lib/rest/voice/v1/byocTrunk.ts | 12 +++++++++--- lib/rest/voice/v1/connectionPolicy.ts | 10 +++++----- .../v1/connectionPolicy/connectionPolicyTarget.ts | 10 +++++----- .../v1/dialingPermissions/bulkCountryUpdate.ts | 2 +- lib/rest/voice/v1/dialingPermissions/country.ts | 8 +++++--- .../country/highriskSpecialPrefix.ts | 10 +++++----- lib/rest/voice/v1/dialingPermissions/settings.ts | 2 +- lib/rest/voice/v1/ipRecord.ts | 8 +++++--- lib/rest/voice/v1/sourceIpMapping.ts | 10 +++++----- lib/rest/wireless/v1/command.ts | 8 +++++--- lib/rest/wireless/v1/ratePlan.ts | 8 +++++--- lib/rest/wireless/v1/sim.ts | 8 +++++--- lib/rest/wireless/v1/sim/dataSession.ts | 10 +++++----- lib/rest/wireless/v1/sim/usageRecord.ts | 10 +++++----- lib/rest/wireless/v1/usageRecord.ts | 10 +++++----- 445 files changed, 1809 insertions(+), 1365 deletions(-) diff --git a/lib/base/Page.ts b/lib/base/Page.ts index 0652a7a9e0..71521e9995 100644 --- a/lib/base/Page.ts +++ b/lib/base/Page.ts @@ -10,7 +10,7 @@ export interface TwilioResponsePayload { page: number; page_size: number; previous_page_uri: string; - uri: string; + uri?: string; meta?: { key?: string; next_page_url?: string; diff --git a/lib/rest/accounts/v1/authTokenPromotion.ts b/lib/rest/accounts/v1/authTokenPromotion.ts index c1f9ecdf5c..593bedf2f0 100644 --- a/lib/rest/accounts/v1/authTokenPromotion.ts +++ b/lib/rest/accounts/v1/authTokenPromotion.ts @@ -96,7 +96,7 @@ export class AuthTokenPromotionInstance { protected _solution: AuthTokenPromotionContextSolution; protected _context?: AuthTokenPromotionContext; - constructor(protected _version: V1, payload: AuthTokenPromotionPayload) { + constructor(protected _version: V1, payload: AuthTokenPromotionResource) { this.accountSid = payload.account_sid; this.authToken = payload.auth_token; this.dateCreated = deserialize.iso8601DateTime(payload.date_created); diff --git a/lib/rest/accounts/v1/credential/aws.ts b/lib/rest/accounts/v1/credential/aws.ts index c423c1723a..a2ac4a928e 100644 --- a/lib/rest/accounts/v1/credential/aws.ts +++ b/lib/rest/accounts/v1/credential/aws.ts @@ -242,7 +242,9 @@ export class AwsContextImpl implements AwsContext { } } -interface AwsPayload extends AwsResource, TwilioResponsePayload {} +interface AwsPayload extends TwilioResponsePayload { + credentials: AwsResource[]; +} interface AwsResource { sid?: string | null; @@ -257,7 +259,7 @@ export class AwsInstance { protected _solution: AwsContextSolution; protected _context?: AwsContext; - constructor(protected _version: V1, payload: AwsPayload, sid?: string) { + constructor(protected _version: V1, payload: AwsResource, sid?: string) { this.sid = payload.sid; this.accountSid = payload.account_sid; this.friendlyName = payload.friendly_name; @@ -671,7 +673,7 @@ export class AwsPage extends Page { * * @param payload - Payload response from the API */ - getInstance(payload: AwsPayload): AwsInstance { + getInstance(payload: AwsResource): AwsInstance { return new AwsInstance(this._version, payload); } diff --git a/lib/rest/accounts/v1/credential/publicKey.ts b/lib/rest/accounts/v1/credential/publicKey.ts index 9ebd6f057c..895e60dfca 100644 --- a/lib/rest/accounts/v1/credential/publicKey.ts +++ b/lib/rest/accounts/v1/credential/publicKey.ts @@ -242,7 +242,9 @@ export class PublicKeyContextImpl implements PublicKeyContext { } } -interface PublicKeyPayload extends PublicKeyResource, TwilioResponsePayload {} +interface PublicKeyPayload extends TwilioResponsePayload { + credentials: PublicKeyResource[]; +} interface PublicKeyResource { sid?: string | null; @@ -257,7 +259,11 @@ export class PublicKeyInstance { protected _solution: PublicKeyContextSolution; protected _context?: PublicKeyContext; - constructor(protected _version: V1, payload: PublicKeyPayload, sid?: string) { + constructor( + protected _version: V1, + payload: PublicKeyResource, + sid?: string + ) { this.sid = payload.sid; this.accountSid = payload.account_sid; this.friendlyName = payload.friendly_name; @@ -681,7 +687,7 @@ export class PublicKeyPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: PublicKeyPayload): PublicKeyInstance { + getInstance(payload: PublicKeyResource): PublicKeyInstance { return new PublicKeyInstance(this._version, payload); } diff --git a/lib/rest/accounts/v1/secondaryAuthToken.ts b/lib/rest/accounts/v1/secondaryAuthToken.ts index f96d891d84..dcd988d209 100644 --- a/lib/rest/accounts/v1/secondaryAuthToken.ts +++ b/lib/rest/accounts/v1/secondaryAuthToken.ts @@ -121,7 +121,7 @@ export class SecondaryAuthTokenInstance { protected _solution: SecondaryAuthTokenContextSolution; protected _context?: SecondaryAuthTokenContext; - constructor(protected _version: V1, payload: SecondaryAuthTokenPayload) { + constructor(protected _version: V1, payload: SecondaryAuthTokenResource) { this.accountSid = payload.account_sid; this.dateCreated = deserialize.iso8601DateTime(payload.date_created); this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); diff --git a/lib/rest/api/v2010/account.ts b/lib/rest/api/v2010/account.ts index e0baad202a..2cff2990a8 100644 --- a/lib/rest/api/v2010/account.ts +++ b/lib/rest/api/v2010/account.ts @@ -466,7 +466,9 @@ export class AccountContextImpl implements AccountContext { } } -interface AccountPayload extends AccountResource, TwilioResponsePayload {} +interface AccountPayload extends TwilioResponsePayload { + accounts: AccountResource[]; +} interface AccountResource { auth_token?: string | null; @@ -487,7 +489,7 @@ export class AccountInstance { constructor( protected _version: V2010, - payload: AccountPayload, + payload: AccountResource, sid?: string ) { this.authToken = payload.auth_token; @@ -1095,7 +1097,7 @@ export class AccountPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: AccountPayload): AccountInstance { + getInstance(payload: AccountResource): AccountInstance { return new AccountInstance(this._version, payload); } diff --git a/lib/rest/api/v2010/account/address.ts b/lib/rest/api/v2010/account/address.ts index a6f04995f6..b149ba6a39 100644 --- a/lib/rest/api/v2010/account/address.ts +++ b/lib/rest/api/v2010/account/address.ts @@ -334,7 +334,9 @@ export class AddressContextImpl implements AddressContext { } } -interface AddressPayload extends AddressResource, TwilioResponsePayload {} +interface AddressPayload extends TwilioResponsePayload { + addresses: AddressResource[]; +} interface AddressResource { account_sid?: string | null; @@ -361,7 +363,7 @@ export class AddressInstance { constructor( protected _version: V2010, - payload: AddressPayload, + payload: AddressResource, accountSid: string, sid?: string ) { @@ -916,7 +918,7 @@ export class AddressPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: AddressPayload): AddressInstance { + getInstance(payload: AddressResource): AddressInstance { return new AddressInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/address/dependentPhoneNumber.ts b/lib/rest/api/v2010/account/address/dependentPhoneNumber.ts index 944b2ecb74..19e04e9bfe 100644 --- a/lib/rest/api/v2010/account/address/dependentPhoneNumber.ts +++ b/lib/rest/api/v2010/account/address/dependentPhoneNumber.ts @@ -364,9 +364,9 @@ export type DependentPhoneNumberStatusCallbackMethod = | "PUT" | "DELETE"; -interface DependentPhoneNumberPayload - extends DependentPhoneNumberResource, - TwilioResponsePayload {} +interface DependentPhoneNumberPayload extends TwilioResponsePayload { + dependent_phone_numbers: DependentPhoneNumberResource[]; +} interface DependentPhoneNumberResource { sid?: string | null; @@ -400,7 +400,7 @@ interface DependentPhoneNumberResource { export class DependentPhoneNumberInstance { constructor( protected _version: V2010, - payload: DependentPhoneNumberPayload, + payload: DependentPhoneNumberResource, accountSid: string, addressSid: string ) { @@ -599,7 +599,7 @@ export class DependentPhoneNumberPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: DependentPhoneNumberPayload + payload: DependentPhoneNumberResource ): DependentPhoneNumberInstance { return new DependentPhoneNumberInstance( this._version, diff --git a/lib/rest/api/v2010/account/application.ts b/lib/rest/api/v2010/account/application.ts index c260ffbd40..4a71e71e1d 100644 --- a/lib/rest/api/v2010/account/application.ts +++ b/lib/rest/api/v2010/account/application.ts @@ -378,9 +378,9 @@ export type ApplicationVoiceMethod = | "PUT" | "DELETE"; -interface ApplicationPayload - extends ApplicationResource, - TwilioResponsePayload {} +interface ApplicationPayload extends TwilioResponsePayload { + applications: ApplicationResource[]; +} interface ApplicationResource { account_sid?: string | null; @@ -411,7 +411,7 @@ export class ApplicationInstance { constructor( protected _version: V2010, - payload: ApplicationPayload, + payload: ApplicationResource, accountSid: string, sid?: string ) { @@ -977,7 +977,7 @@ export class ApplicationPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ApplicationPayload): ApplicationInstance { + getInstance(payload: ApplicationResource): ApplicationInstance { return new ApplicationInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/authorizedConnectApp.ts b/lib/rest/api/v2010/account/authorizedConnectApp.ts index 51e1468939..da5cf63373 100644 --- a/lib/rest/api/v2010/account/authorizedConnectApp.ts +++ b/lib/rest/api/v2010/account/authorizedConnectApp.ts @@ -157,9 +157,9 @@ export class AuthorizedConnectAppContextImpl } } -interface AuthorizedConnectAppPayload - extends AuthorizedConnectAppResource, - TwilioResponsePayload {} +interface AuthorizedConnectAppPayload extends TwilioResponsePayload { + authorized_connect_apps: AuthorizedConnectAppResource[]; +} interface AuthorizedConnectAppResource { account_sid?: string | null; @@ -180,7 +180,7 @@ export class AuthorizedConnectAppInstance { constructor( protected _version: V2010, - payload: AuthorizedConnectAppPayload, + payload: AuthorizedConnectAppResource, accountSid: string, connectAppSid?: string ) { @@ -575,7 +575,7 @@ export class AuthorizedConnectAppPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: AuthorizedConnectAppPayload + payload: AuthorizedConnectAppResource ): AuthorizedConnectAppInstance { return new AuthorizedConnectAppInstance( this._version, diff --git a/lib/rest/api/v2010/account/availablePhoneNumberCountry.ts b/lib/rest/api/v2010/account/availablePhoneNumberCountry.ts index 57da2121d3..f0058b0900 100644 --- a/lib/rest/api/v2010/account/availablePhoneNumberCountry.ts +++ b/lib/rest/api/v2010/account/availablePhoneNumberCountry.ts @@ -258,9 +258,9 @@ export class AvailablePhoneNumberCountryContextImpl } } -interface AvailablePhoneNumberCountryPayload - extends AvailablePhoneNumberCountryResource, - TwilioResponsePayload {} +interface AvailablePhoneNumberCountryPayload extends TwilioResponsePayload { + countries: AvailablePhoneNumberCountryResource[]; +} interface AvailablePhoneNumberCountryResource { country_code?: string | null; @@ -276,7 +276,7 @@ export class AvailablePhoneNumberCountryInstance { constructor( protected _version: V2010, - payload: AvailablePhoneNumberCountryPayload, + payload: AvailablePhoneNumberCountryResource, accountSid: string, countryCode?: string ) { @@ -719,7 +719,7 @@ export class AvailablePhoneNumberCountryPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: AvailablePhoneNumberCountryPayload + payload: AvailablePhoneNumberCountryResource ): AvailablePhoneNumberCountryInstance { return new AvailablePhoneNumberCountryInstance( this._version, diff --git a/lib/rest/api/v2010/account/availablePhoneNumberCountry/local.ts b/lib/rest/api/v2010/account/availablePhoneNumberCountry/local.ts index 55944f9afe..2ebeeb8996 100644 --- a/lib/rest/api/v2010/account/availablePhoneNumberCountry/local.ts +++ b/lib/rest/api/v2010/account/availablePhoneNumberCountry/local.ts @@ -447,7 +447,9 @@ export function LocalListInstance( return instance; } -interface LocalPayload extends LocalResource, TwilioResponsePayload {} +interface LocalPayload extends TwilioResponsePayload { + available_phone_numbers: LocalResource[]; +} interface LocalResource { friendly_name?: string | null; @@ -468,7 +470,7 @@ interface LocalResource { export class LocalInstance { constructor( protected _version: V2010, - payload: LocalPayload, + payload: LocalResource, accountSid: string, countryCode: string ) { @@ -591,7 +593,7 @@ export class LocalPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: LocalPayload): LocalInstance { + getInstance(payload: LocalResource): LocalInstance { return new LocalInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/availablePhoneNumberCountry/machineToMachine.ts b/lib/rest/api/v2010/account/availablePhoneNumberCountry/machineToMachine.ts index 20a9ee5425..149b12241e 100644 --- a/lib/rest/api/v2010/account/availablePhoneNumberCountry/machineToMachine.ts +++ b/lib/rest/api/v2010/account/availablePhoneNumberCountry/machineToMachine.ts @@ -459,9 +459,9 @@ export function MachineToMachineListInstance( return instance; } -interface MachineToMachinePayload - extends MachineToMachineResource, - TwilioResponsePayload {} +interface MachineToMachinePayload extends TwilioResponsePayload { + available_phone_numbers: MachineToMachineResource[]; +} interface MachineToMachineResource { friendly_name?: string | null; @@ -482,7 +482,7 @@ interface MachineToMachineResource { export class MachineToMachineInstance { constructor( protected _version: V2010, - payload: MachineToMachinePayload, + payload: MachineToMachineResource, accountSid: string, countryCode: string ) { @@ -605,7 +605,7 @@ export class MachineToMachinePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: MachineToMachinePayload): MachineToMachineInstance { + getInstance(payload: MachineToMachineResource): MachineToMachineInstance { return new MachineToMachineInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/availablePhoneNumberCountry/mobile.ts b/lib/rest/api/v2010/account/availablePhoneNumberCountry/mobile.ts index e6a024e869..1078d86461 100644 --- a/lib/rest/api/v2010/account/availablePhoneNumberCountry/mobile.ts +++ b/lib/rest/api/v2010/account/availablePhoneNumberCountry/mobile.ts @@ -447,7 +447,9 @@ export function MobileListInstance( return instance; } -interface MobilePayload extends MobileResource, TwilioResponsePayload {} +interface MobilePayload extends TwilioResponsePayload { + available_phone_numbers: MobileResource[]; +} interface MobileResource { friendly_name?: string | null; @@ -468,7 +470,7 @@ interface MobileResource { export class MobileInstance { constructor( protected _version: V2010, - payload: MobilePayload, + payload: MobileResource, accountSid: string, countryCode: string ) { @@ -591,7 +593,7 @@ export class MobilePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: MobilePayload): MobileInstance { + getInstance(payload: MobileResource): MobileInstance { return new MobileInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/availablePhoneNumberCountry/national.ts b/lib/rest/api/v2010/account/availablePhoneNumberCountry/national.ts index c29efffe7c..255a6a606b 100644 --- a/lib/rest/api/v2010/account/availablePhoneNumberCountry/national.ts +++ b/lib/rest/api/v2010/account/availablePhoneNumberCountry/national.ts @@ -447,7 +447,9 @@ export function NationalListInstance( return instance; } -interface NationalPayload extends NationalResource, TwilioResponsePayload {} +interface NationalPayload extends TwilioResponsePayload { + available_phone_numbers: NationalResource[]; +} interface NationalResource { friendly_name?: string | null; @@ -468,7 +470,7 @@ interface NationalResource { export class NationalInstance { constructor( protected _version: V2010, - payload: NationalPayload, + payload: NationalResource, accountSid: string, countryCode: string ) { @@ -591,7 +593,7 @@ export class NationalPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: NationalPayload): NationalInstance { + getInstance(payload: NationalResource): NationalInstance { return new NationalInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/availablePhoneNumberCountry/sharedCost.ts b/lib/rest/api/v2010/account/availablePhoneNumberCountry/sharedCost.ts index 9f9ea7b364..ca4f560472 100644 --- a/lib/rest/api/v2010/account/availablePhoneNumberCountry/sharedCost.ts +++ b/lib/rest/api/v2010/account/availablePhoneNumberCountry/sharedCost.ts @@ -447,7 +447,9 @@ export function SharedCostListInstance( return instance; } -interface SharedCostPayload extends SharedCostResource, TwilioResponsePayload {} +interface SharedCostPayload extends TwilioResponsePayload { + available_phone_numbers: SharedCostResource[]; +} interface SharedCostResource { friendly_name?: string | null; @@ -468,7 +470,7 @@ interface SharedCostResource { export class SharedCostInstance { constructor( protected _version: V2010, - payload: SharedCostPayload, + payload: SharedCostResource, accountSid: string, countryCode: string ) { @@ -591,7 +593,7 @@ export class SharedCostPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SharedCostPayload): SharedCostInstance { + getInstance(payload: SharedCostResource): SharedCostInstance { return new SharedCostInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/availablePhoneNumberCountry/tollFree.ts b/lib/rest/api/v2010/account/availablePhoneNumberCountry/tollFree.ts index eeaa4d608e..87a7c68e9c 100644 --- a/lib/rest/api/v2010/account/availablePhoneNumberCountry/tollFree.ts +++ b/lib/rest/api/v2010/account/availablePhoneNumberCountry/tollFree.ts @@ -447,7 +447,9 @@ export function TollFreeListInstance( return instance; } -interface TollFreePayload extends TollFreeResource, TwilioResponsePayload {} +interface TollFreePayload extends TwilioResponsePayload { + available_phone_numbers: TollFreeResource[]; +} interface TollFreeResource { friendly_name?: string | null; @@ -468,7 +470,7 @@ interface TollFreeResource { export class TollFreeInstance { constructor( protected _version: V2010, - payload: TollFreePayload, + payload: TollFreeResource, accountSid: string, countryCode: string ) { @@ -591,7 +593,7 @@ export class TollFreePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: TollFreePayload): TollFreeInstance { + getInstance(payload: TollFreeResource): TollFreeInstance { return new TollFreeInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/availablePhoneNumberCountry/voip.ts b/lib/rest/api/v2010/account/availablePhoneNumberCountry/voip.ts index 3b3c5eaac3..5ef2bab1f6 100644 --- a/lib/rest/api/v2010/account/availablePhoneNumberCountry/voip.ts +++ b/lib/rest/api/v2010/account/availablePhoneNumberCountry/voip.ts @@ -447,7 +447,9 @@ export function VoipListInstance( return instance; } -interface VoipPayload extends VoipResource, TwilioResponsePayload {} +interface VoipPayload extends TwilioResponsePayload { + available_phone_numbers: VoipResource[]; +} interface VoipResource { friendly_name?: string | null; @@ -468,7 +470,7 @@ interface VoipResource { export class VoipInstance { constructor( protected _version: V2010, - payload: VoipPayload, + payload: VoipResource, accountSid: string, countryCode: string ) { @@ -591,7 +593,7 @@ export class VoipPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: VoipPayload): VoipInstance { + getInstance(payload: VoipResource): VoipInstance { return new VoipInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/balance.ts b/lib/rest/api/v2010/account/balance.ts index 9ff7ca1162..72d1c07d38 100644 --- a/lib/rest/api/v2010/account/balance.ts +++ b/lib/rest/api/v2010/account/balance.ts @@ -110,7 +110,7 @@ interface BalanceResource { export class BalanceInstance { constructor( protected _version: V2010, - payload: BalancePayload, + payload: BalanceResource, accountSid: string ) { this.accountSid = payload.account_sid; diff --git a/lib/rest/api/v2010/account/call.ts b/lib/rest/api/v2010/account/call.ts index 4af636f029..08b26302ab 100644 --- a/lib/rest/api/v2010/account/call.ts +++ b/lib/rest/api/v2010/account/call.ts @@ -551,7 +551,9 @@ export class CallContextImpl implements CallContext { } } -interface CallPayload extends CallResource, TwilioResponsePayload {} +interface CallPayload extends TwilioResponsePayload { + calls: CallResource[]; +} interface CallResource { sid?: string | null; @@ -588,7 +590,7 @@ export class CallInstance { constructor( protected _version: V2010, - payload: CallPayload, + payload: CallResource, accountSid: string, sid?: string ) { @@ -1313,7 +1315,7 @@ export class CallPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: CallPayload): CallInstance { + getInstance(payload: CallResource): CallInstance { return new CallInstance(this._version, payload, this._solution.accountSid); } diff --git a/lib/rest/api/v2010/account/call/event.ts b/lib/rest/api/v2010/account/call/event.ts index 891e9641b1..75b94951fa 100644 --- a/lib/rest/api/v2010/account/call/event.ts +++ b/lib/rest/api/v2010/account/call/event.ts @@ -301,7 +301,9 @@ export function EventListInstance( return instance; } -interface EventPayload extends EventResource, TwilioResponsePayload {} +interface EventPayload extends TwilioResponsePayload { + events: EventResource[]; +} interface EventResource { request?: any | null; @@ -311,7 +313,7 @@ interface EventResource { export class EventInstance { constructor( protected _version: V2010, - payload: EventPayload, + payload: EventResource, accountSid: string, callSid: string ) { @@ -371,7 +373,7 @@ export class EventPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: EventPayload): EventInstance { + getInstance(payload: EventResource): EventInstance { return new EventInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/call/feedback.ts b/lib/rest/api/v2010/account/call/feedback.ts index 09952c20db..c60377f71a 100644 --- a/lib/rest/api/v2010/account/call/feedback.ts +++ b/lib/rest/api/v2010/account/call/feedback.ts @@ -202,7 +202,7 @@ export class FeedbackInstance { constructor( protected _version: V2010, - payload: FeedbackPayload, + payload: FeedbackResource, accountSid: string, callSid: string ) { diff --git a/lib/rest/api/v2010/account/call/feedbackSummary.ts b/lib/rest/api/v2010/account/call/feedbackSummary.ts index bc46a69dff..24bb777cad 100644 --- a/lib/rest/api/v2010/account/call/feedbackSummary.ts +++ b/lib/rest/api/v2010/account/call/feedbackSummary.ts @@ -170,7 +170,7 @@ export class FeedbackSummaryInstance { constructor( protected _version: V2010, - payload: FeedbackSummaryPayload, + payload: FeedbackSummaryResource, accountSid: string, sid?: string ) { diff --git a/lib/rest/api/v2010/account/call/notification.ts b/lib/rest/api/v2010/account/call/notification.ts index ce223a4f15..a2f41750ae 100644 --- a/lib/rest/api/v2010/account/call/notification.ts +++ b/lib/rest/api/v2010/account/call/notification.ts @@ -188,9 +188,9 @@ export type NotificationRequestMethod = | "PUT" | "DELETE"; -interface NotificationPayload - extends NotificationResource, - TwilioResponsePayload {} +interface NotificationPayload extends TwilioResponsePayload { + notifications: NotificationResource[]; +} interface NotificationResource { account_sid?: string | null; @@ -218,7 +218,7 @@ export class NotificationInstance { constructor( protected _version: V2010, - payload: NotificationPayload, + payload: NotificationResource, accountSid: string, callSid: string, sid?: string @@ -645,7 +645,7 @@ export class NotificationPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: NotificationPayload): NotificationInstance { + getInstance(payload: NotificationResource): NotificationInstance { return new NotificationInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/call/payment.ts b/lib/rest/api/v2010/account/call/payment.ts index e1af32a626..53b8fee485 100644 --- a/lib/rest/api/v2010/account/call/payment.ts +++ b/lib/rest/api/v2010/account/call/payment.ts @@ -236,7 +236,7 @@ export class PaymentInstance { constructor( protected _version: V2010, - payload: PaymentPayload, + payload: PaymentResource, accountSid: string, callSid: string, sid?: string diff --git a/lib/rest/api/v2010/account/call/recording.ts b/lib/rest/api/v2010/account/call/recording.ts index 4d54822b6d..9bc5996f7e 100644 --- a/lib/rest/api/v2010/account/call/recording.ts +++ b/lib/rest/api/v2010/account/call/recording.ts @@ -304,7 +304,9 @@ export class RecordingContextImpl implements RecordingContext { } } -interface RecordingPayload extends RecordingResource, TwilioResponsePayload {} +interface RecordingPayload extends TwilioResponsePayload { + recordings: RecordingResource[]; +} interface RecordingResource { account_sid?: string | null; @@ -333,7 +335,7 @@ export class RecordingInstance { constructor( protected _version: V2010, - payload: RecordingPayload, + payload: RecordingResource, accountSid: string, callSid: string, sid?: string @@ -868,7 +870,7 @@ export class RecordingPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: RecordingPayload): RecordingInstance { + getInstance(payload: RecordingResource): RecordingInstance { return new RecordingInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/call/siprec.ts b/lib/rest/api/v2010/account/call/siprec.ts index 5a88765363..58ea02f41d 100644 --- a/lib/rest/api/v2010/account/call/siprec.ts +++ b/lib/rest/api/v2010/account/call/siprec.ts @@ -574,7 +574,7 @@ export class SiprecInstance { constructor( protected _version: V2010, - payload: SiprecPayload, + payload: SiprecResource, accountSid: string, callSid: string, sid?: string diff --git a/lib/rest/api/v2010/account/call/stream.ts b/lib/rest/api/v2010/account/call/stream.ts index 4ac63ac235..8f0ce49568 100644 --- a/lib/rest/api/v2010/account/call/stream.ts +++ b/lib/rest/api/v2010/account/call/stream.ts @@ -574,7 +574,7 @@ export class StreamInstance { constructor( protected _version: V2010, - payload: StreamPayload, + payload: StreamResource, accountSid: string, callSid: string, sid?: string diff --git a/lib/rest/api/v2010/account/call/userDefinedMessage.ts b/lib/rest/api/v2010/account/call/userDefinedMessage.ts index 55a9e09506..275bd62716 100644 --- a/lib/rest/api/v2010/account/call/userDefinedMessage.ts +++ b/lib/rest/api/v2010/account/call/userDefinedMessage.ts @@ -157,7 +157,7 @@ interface UserDefinedMessageResource { export class UserDefinedMessageInstance { constructor( protected _version: V2010, - payload: UserDefinedMessagePayload, + payload: UserDefinedMessageResource, accountSid: string, callSid: string ) { diff --git a/lib/rest/api/v2010/account/call/userDefinedMessageSubscription.ts b/lib/rest/api/v2010/account/call/userDefinedMessageSubscription.ts index c85215df24..9f068182be 100644 --- a/lib/rest/api/v2010/account/call/userDefinedMessageSubscription.ts +++ b/lib/rest/api/v2010/account/call/userDefinedMessageSubscription.ts @@ -129,7 +129,7 @@ export class UserDefinedMessageSubscriptionInstance { constructor( protected _version: V2010, - payload: UserDefinedMessageSubscriptionPayload, + payload: UserDefinedMessageSubscriptionResource, accountSid: string, callSid: string, sid?: string diff --git a/lib/rest/api/v2010/account/conference.ts b/lib/rest/api/v2010/account/conference.ts index 1b20d4ea05..c2681c45eb 100644 --- a/lib/rest/api/v2010/account/conference.ts +++ b/lib/rest/api/v2010/account/conference.ts @@ -315,7 +315,9 @@ export class ConferenceContextImpl implements ConferenceContext { } } -interface ConferencePayload extends ConferenceResource, TwilioResponsePayload {} +interface ConferencePayload extends TwilioResponsePayload { + conferences: ConferenceResource[]; +} interface ConferenceResource { account_sid?: string | null; @@ -338,7 +340,7 @@ export class ConferenceInstance { constructor( protected _version: V2010, - payload: ConferencePayload, + payload: ConferenceResource, accountSid: string, sid?: string ) { @@ -768,7 +770,7 @@ export class ConferencePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ConferencePayload): ConferenceInstance { + getInstance(payload: ConferenceResource): ConferenceInstance { return new ConferenceInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/conference/participant.ts b/lib/rest/api/v2010/account/conference/participant.ts index bbea31e3ce..cbe8ed4d3c 100644 --- a/lib/rest/api/v2010/account/conference/participant.ts +++ b/lib/rest/api/v2010/account/conference/participant.ts @@ -425,9 +425,9 @@ export class ParticipantContextImpl implements ParticipantContext { } } -interface ParticipantPayload - extends ParticipantResource, - TwilioResponsePayload {} +interface ParticipantPayload extends TwilioResponsePayload { + participants: ParticipantResource[]; +} interface ParticipantResource { account_sid?: string | null; @@ -452,7 +452,7 @@ export class ParticipantInstance { constructor( protected _version: V2010, - payload: ParticipantPayload, + payload: ParticipantResource, accountSid: string, conferenceSid: string, callSid?: string @@ -1074,7 +1074,7 @@ export class ParticipantPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ParticipantPayload): ParticipantInstance { + getInstance(payload: ParticipantResource): ParticipantInstance { return new ParticipantInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/conference/recording.ts b/lib/rest/api/v2010/account/conference/recording.ts index 61cd56bfb5..4752fa4b60 100644 --- a/lib/rest/api/v2010/account/conference/recording.ts +++ b/lib/rest/api/v2010/account/conference/recording.ts @@ -285,7 +285,9 @@ export class RecordingContextImpl implements RecordingContext { } } -interface RecordingPayload extends RecordingResource, TwilioResponsePayload {} +interface RecordingPayload extends TwilioResponsePayload { + recordings: RecordingResource[]; +} interface RecordingResource { account_sid?: string | null; @@ -313,7 +315,7 @@ export class RecordingInstance { constructor( protected _version: V2010, - payload: RecordingPayload, + payload: RecordingResource, accountSid: string, conferenceSid: string, sid?: string @@ -761,7 +763,7 @@ export class RecordingPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: RecordingPayload): RecordingInstance { + getInstance(payload: RecordingResource): RecordingInstance { return new RecordingInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/connectApp.ts b/lib/rest/api/v2010/account/connectApp.ts index 291525a9a0..2f830b39d1 100644 --- a/lib/rest/api/v2010/account/connectApp.ts +++ b/lib/rest/api/v2010/account/connectApp.ts @@ -281,7 +281,9 @@ export type ConnectAppDeauthorizeCallbackMethod = | "PUT" | "DELETE"; -interface ConnectAppPayload extends ConnectAppResource, TwilioResponsePayload {} +interface ConnectAppPayload extends TwilioResponsePayload { + connect_apps: ConnectAppResource[]; +} interface ConnectAppResource { account_sid?: string | null; @@ -303,7 +305,7 @@ export class ConnectAppInstance { constructor( protected _version: V2010, - payload: ConnectAppPayload, + payload: ConnectAppResource, accountSid: string, sid?: string ) { @@ -717,7 +719,7 @@ export class ConnectAppPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ConnectAppPayload): ConnectAppInstance { + getInstance(payload: ConnectAppResource): ConnectAppInstance { return new ConnectAppInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/incomingPhoneNumber.ts b/lib/rest/api/v2010/account/incomingPhoneNumber.ts index 9bfc575215..44d574df79 100644 --- a/lib/rest/api/v2010/account/incomingPhoneNumber.ts +++ b/lib/rest/api/v2010/account/incomingPhoneNumber.ts @@ -489,9 +489,9 @@ export type IncomingPhoneNumberVoiceMethod = | "PUT" | "DELETE"; -interface IncomingPhoneNumberPayload - extends IncomingPhoneNumberResource, - TwilioResponsePayload {} +interface IncomingPhoneNumberPayload extends TwilioResponsePayload { + incoming_phone_numbers: IncomingPhoneNumberResource[]; +} interface IncomingPhoneNumberResource { account_sid?: string | null; @@ -536,7 +536,7 @@ export class IncomingPhoneNumberInstance { constructor( protected _version: V2010, - payload: IncomingPhoneNumberPayload, + payload: IncomingPhoneNumberResource, accountSid: string, sid?: string ) { @@ -1258,7 +1258,7 @@ export class IncomingPhoneNumberPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: IncomingPhoneNumberPayload + payload: IncomingPhoneNumberResource ): IncomingPhoneNumberInstance { return new IncomingPhoneNumberInstance( this._version, diff --git a/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn.ts b/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn.ts index 834fe1c1aa..1df6db65e4 100644 --- a/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn.ts +++ b/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn.ts @@ -207,9 +207,9 @@ export class AssignedAddOnContextImpl implements AssignedAddOnContext { } } -interface AssignedAddOnPayload - extends AssignedAddOnResource, - TwilioResponsePayload {} +interface AssignedAddOnPayload extends TwilioResponsePayload { + assigned_add_ons: AssignedAddOnResource[]; +} interface AssignedAddOnResource { sid?: string | null; @@ -231,7 +231,7 @@ export class AssignedAddOnInstance { constructor( protected _version: V2010, - payload: AssignedAddOnPayload, + payload: AssignedAddOnResource, accountSid: string, resourceSid: string, sid?: string @@ -705,7 +705,7 @@ export class AssignedAddOnPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: AssignedAddOnPayload): AssignedAddOnInstance { + getInstance(payload: AssignedAddOnResource): AssignedAddOnInstance { return new AssignedAddOnInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn/assignedAddOnExtension.ts b/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn/assignedAddOnExtension.ts index c7c12a58e0..ec21ac5be3 100644 --- a/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn/assignedAddOnExtension.ts +++ b/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn/assignedAddOnExtension.ts @@ -172,9 +172,9 @@ export class AssignedAddOnExtensionContextImpl } } -interface AssignedAddOnExtensionPayload - extends AssignedAddOnExtensionResource, - TwilioResponsePayload {} +interface AssignedAddOnExtensionPayload extends TwilioResponsePayload { + extensions: AssignedAddOnExtensionResource[]; +} interface AssignedAddOnExtensionResource { sid?: string | null; @@ -194,7 +194,7 @@ export class AssignedAddOnExtensionInstance { constructor( protected _version: V2010, - payload: AssignedAddOnExtensionPayload, + payload: AssignedAddOnExtensionResource, accountSid: string, resourceSid: string, assignedAddOnSid: string, @@ -610,7 +610,7 @@ export class AssignedAddOnExtensionPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: AssignedAddOnExtensionPayload + payload: AssignedAddOnExtensionResource ): AssignedAddOnExtensionInstance { return new AssignedAddOnExtensionInstance( this._version, diff --git a/lib/rest/api/v2010/account/incomingPhoneNumber/local.ts b/lib/rest/api/v2010/account/incomingPhoneNumber/local.ts index 6ae3fcb8bf..8df9a796d4 100644 --- a/lib/rest/api/v2010/account/incomingPhoneNumber/local.ts +++ b/lib/rest/api/v2010/account/incomingPhoneNumber/local.ts @@ -528,7 +528,9 @@ export type LocalVoiceMethod = | "PUT" | "DELETE"; -interface LocalPayload extends LocalResource, TwilioResponsePayload {} +interface LocalPayload extends TwilioResponsePayload { + incoming_phone_numbers: LocalResource[]; +} interface LocalResource { account_sid?: string | null; @@ -570,7 +572,7 @@ interface LocalResource { export class LocalInstance { constructor( protected _version: V2010, - payload: LocalPayload, + payload: LocalResource, accountSid: string ) { this.accountSid = payload.account_sid; @@ -803,7 +805,7 @@ export class LocalPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: LocalPayload): LocalInstance { + getInstance(payload: LocalResource): LocalInstance { return new LocalInstance(this._version, payload, this._solution.accountSid); } diff --git a/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.ts b/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.ts index b1e32b73fd..feb785787d 100644 --- a/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.ts +++ b/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.ts @@ -528,7 +528,9 @@ export type MobileVoiceMethod = | "PUT" | "DELETE"; -interface MobilePayload extends MobileResource, TwilioResponsePayload {} +interface MobilePayload extends TwilioResponsePayload { + incoming_phone_numbers: MobileResource[]; +} interface MobileResource { account_sid?: string | null; @@ -570,7 +572,7 @@ interface MobileResource { export class MobileInstance { constructor( protected _version: V2010, - payload: MobilePayload, + payload: MobileResource, accountSid: string ) { this.accountSid = payload.account_sid; @@ -803,7 +805,7 @@ export class MobilePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: MobilePayload): MobileInstance { + getInstance(payload: MobileResource): MobileInstance { return new MobileInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.ts b/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.ts index 5d64cc0fea..8cab35fff4 100644 --- a/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.ts +++ b/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.ts @@ -532,7 +532,9 @@ export type TollFreeVoiceMethod = | "PUT" | "DELETE"; -interface TollFreePayload extends TollFreeResource, TwilioResponsePayload {} +interface TollFreePayload extends TwilioResponsePayload { + incoming_phone_numbers: TollFreeResource[]; +} interface TollFreeResource { account_sid?: string | null; @@ -574,7 +576,7 @@ interface TollFreeResource { export class TollFreeInstance { constructor( protected _version: V2010, - payload: TollFreePayload, + payload: TollFreeResource, accountSid: string ) { this.accountSid = payload.account_sid; @@ -807,7 +809,7 @@ export class TollFreePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: TollFreePayload): TollFreeInstance { + getInstance(payload: TollFreeResource): TollFreeInstance { return new TollFreeInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/key.ts b/lib/rest/api/v2010/account/key.ts index ec2d0939fb..1820aa7df6 100644 --- a/lib/rest/api/v2010/account/key.ts +++ b/lib/rest/api/v2010/account/key.ts @@ -244,7 +244,9 @@ export class KeyContextImpl implements KeyContext { } } -interface KeyPayload extends KeyResource, TwilioResponsePayload {} +interface KeyPayload extends TwilioResponsePayload { + keys: KeyResource[]; +} interface KeyResource { sid?: string | null; @@ -259,7 +261,7 @@ export class KeyInstance { constructor( protected _version: V2010, - payload: KeyPayload, + payload: KeyResource, accountSid: string, sid?: string ) { @@ -626,7 +628,7 @@ export class KeyPage extends Page { * * @param payload - Payload response from the API */ - getInstance(payload: KeyPayload): KeyInstance { + getInstance(payload: KeyResource): KeyInstance { return new KeyInstance(this._version, payload, this._solution.accountSid); } diff --git a/lib/rest/api/v2010/account/message.ts b/lib/rest/api/v2010/account/message.ts index e487c9a159..b32801263c 100644 --- a/lib/rest/api/v2010/account/message.ts +++ b/lib/rest/api/v2010/account/message.ts @@ -386,7 +386,9 @@ export class MessageContextImpl implements MessageContext { } } -interface MessagePayload extends MessageResource, TwilioResponsePayload {} +interface MessagePayload extends TwilioResponsePayload { + messages: MessageResource[]; +} interface MessageResource { body?: string | null; @@ -417,7 +419,7 @@ export class MessageInstance { constructor( protected _version: V2010, - payload: MessagePayload, + payload: MessageResource, accountSid: string, sid?: string ) { @@ -999,7 +1001,7 @@ export class MessagePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: MessagePayload): MessageInstance { + getInstance(payload: MessageResource): MessageInstance { return new MessageInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/message/feedback.ts b/lib/rest/api/v2010/account/message/feedback.ts index 3a84d5a7c4..fc905907ac 100644 --- a/lib/rest/api/v2010/account/message/feedback.ts +++ b/lib/rest/api/v2010/account/message/feedback.ts @@ -163,7 +163,7 @@ interface FeedbackResource { export class FeedbackInstance { constructor( protected _version: V2010, - payload: FeedbackPayload, + payload: FeedbackResource, accountSid: string, messageSid: string ) { diff --git a/lib/rest/api/v2010/account/message/media.ts b/lib/rest/api/v2010/account/message/media.ts index 6ba2cc6b93..80bcc38db3 100644 --- a/lib/rest/api/v2010/account/message/media.ts +++ b/lib/rest/api/v2010/account/message/media.ts @@ -200,7 +200,9 @@ export class MediaContextImpl implements MediaContext { } } -interface MediaPayload extends MediaResource, TwilioResponsePayload {} +interface MediaPayload extends TwilioResponsePayload { + media_list: MediaResource[]; +} interface MediaResource { account_sid?: string | null; @@ -218,7 +220,7 @@ export class MediaInstance { constructor( protected _version: V2010, - payload: MediaPayload, + payload: MediaResource, accountSid: string, messageSid: string, sid?: string @@ -600,7 +602,7 @@ export class MediaPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: MediaPayload): MediaInstance { + getInstance(payload: MediaResource): MediaInstance { return new MediaInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/newKey.ts b/lib/rest/api/v2010/account/newKey.ts index 373214226e..37052378ae 100644 --- a/lib/rest/api/v2010/account/newKey.ts +++ b/lib/rest/api/v2010/account/newKey.ts @@ -150,7 +150,7 @@ interface NewKeyResource { export class NewKeyInstance { constructor( protected _version: V2010, - payload: NewKeyPayload, + payload: NewKeyResource, accountSid: string ) { this.sid = payload.sid; diff --git a/lib/rest/api/v2010/account/newSigningKey.ts b/lib/rest/api/v2010/account/newSigningKey.ts index b5893db19a..26ec6587c8 100644 --- a/lib/rest/api/v2010/account/newSigningKey.ts +++ b/lib/rest/api/v2010/account/newSigningKey.ts @@ -154,7 +154,7 @@ interface NewSigningKeyResource { export class NewSigningKeyInstance { constructor( protected _version: V2010, - payload: NewSigningKeyPayload, + payload: NewSigningKeyResource, accountSid: string ) { this.sid = payload.sid; diff --git a/lib/rest/api/v2010/account/notification.ts b/lib/rest/api/v2010/account/notification.ts index b870e1656e..ae5e33c9e1 100644 --- a/lib/rest/api/v2010/account/notification.ts +++ b/lib/rest/api/v2010/account/notification.ts @@ -177,9 +177,9 @@ export type NotificationRequestMethod = | "PUT" | "DELETE"; -interface NotificationPayload - extends NotificationResource, - TwilioResponsePayload {} +interface NotificationPayload extends TwilioResponsePayload { + notifications: NotificationResource[]; +} interface NotificationResource { account_sid?: string | null; @@ -207,7 +207,7 @@ export class NotificationInstance { constructor( protected _version: V2010, - payload: NotificationPayload, + payload: NotificationResource, accountSid: string, sid?: string ) { @@ -626,7 +626,7 @@ export class NotificationPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: NotificationPayload): NotificationInstance { + getInstance(payload: NotificationResource): NotificationInstance { return new NotificationInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/outgoingCallerId.ts b/lib/rest/api/v2010/account/outgoingCallerId.ts index 8f217ecc3b..e0da8d0504 100644 --- a/lib/rest/api/v2010/account/outgoingCallerId.ts +++ b/lib/rest/api/v2010/account/outgoingCallerId.ts @@ -259,9 +259,9 @@ export class OutgoingCallerIdContextImpl implements OutgoingCallerIdContext { } } -interface OutgoingCallerIdPayload - extends OutgoingCallerIdResource, - TwilioResponsePayload {} +interface OutgoingCallerIdPayload extends TwilioResponsePayload { + outgoing_caller_ids: OutgoingCallerIdResource[]; +} interface OutgoingCallerIdResource { sid?: string | null; @@ -279,7 +279,7 @@ export class OutgoingCallerIdInstance { constructor( protected _version: V2010, - payload: OutgoingCallerIdPayload, + payload: OutgoingCallerIdResource, accountSid: string, sid?: string ) { @@ -683,7 +683,7 @@ export class OutgoingCallerIdPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: OutgoingCallerIdPayload): OutgoingCallerIdInstance { + getInstance(payload: OutgoingCallerIdResource): OutgoingCallerIdInstance { return new OutgoingCallerIdInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/queue.ts b/lib/rest/api/v2010/account/queue.ts index e4d816523e..2f7106c8ed 100644 --- a/lib/rest/api/v2010/account/queue.ts +++ b/lib/rest/api/v2010/account/queue.ts @@ -274,7 +274,9 @@ export class QueueContextImpl implements QueueContext { } } -interface QueuePayload extends QueueResource, TwilioResponsePayload {} +interface QueuePayload extends TwilioResponsePayload { + queues: QueueResource[]; +} interface QueueResource { date_updated?: string | null; @@ -294,7 +296,7 @@ export class QueueInstance { constructor( protected _version: V2010, - payload: QueuePayload, + payload: QueueResource, accountSid: string, sid?: string ) { @@ -760,7 +762,7 @@ export class QueuePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: QueuePayload): QueueInstance { + getInstance(payload: QueueResource): QueueInstance { return new QueueInstance(this._version, payload, this._solution.accountSid); } diff --git a/lib/rest/api/v2010/account/queue/member.ts b/lib/rest/api/v2010/account/queue/member.ts index 3aea391448..f6ef896907 100644 --- a/lib/rest/api/v2010/account/queue/member.ts +++ b/lib/rest/api/v2010/account/queue/member.ts @@ -224,7 +224,9 @@ export class MemberContextImpl implements MemberContext { } } -interface MemberPayload extends MemberResource, TwilioResponsePayload {} +interface MemberPayload extends TwilioResponsePayload { + queue_members: MemberResource[]; +} interface MemberResource { call_sid?: string | null; @@ -241,7 +243,7 @@ export class MemberInstance { constructor( protected _version: V2010, - payload: MemberPayload, + payload: MemberResource, accountSid: string, queueSid: string, callSid?: string @@ -611,7 +613,7 @@ export class MemberPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: MemberPayload): MemberInstance { + getInstance(payload: MemberResource): MemberInstance { return new MemberInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/recording.ts b/lib/rest/api/v2010/account/recording.ts index 16b0e1dea3..a3bd58e414 100644 --- a/lib/rest/api/v2010/account/recording.ts +++ b/lib/rest/api/v2010/account/recording.ts @@ -292,7 +292,9 @@ export class RecordingContextImpl implements RecordingContext { } } -interface RecordingPayload extends RecordingResource, TwilioResponsePayload {} +interface RecordingPayload extends TwilioResponsePayload { + recordings: RecordingResource[]; +} interface RecordingResource { account_sid?: string | null; @@ -322,7 +324,7 @@ export class RecordingInstance { constructor( protected _version: V2010, - payload: RecordingPayload, + payload: RecordingResource, accountSid: string, sid?: string ) { @@ -794,7 +796,7 @@ export class RecordingPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: RecordingPayload): RecordingInstance { + getInstance(payload: RecordingResource): RecordingInstance { return new RecordingInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/recording/addOnResult.ts b/lib/rest/api/v2010/account/recording/addOnResult.ts index bfa94553c2..74eca5c101 100644 --- a/lib/rest/api/v2010/account/recording/addOnResult.ts +++ b/lib/rest/api/v2010/account/recording/addOnResult.ts @@ -209,9 +209,9 @@ export class AddOnResultContextImpl implements AddOnResultContext { } } -interface AddOnResultPayload - extends AddOnResultResource, - TwilioResponsePayload {} +interface AddOnResultPayload extends TwilioResponsePayload { + add_on_results: AddOnResultResource[]; +} interface AddOnResultResource { sid?: string | null; @@ -232,7 +232,7 @@ export class AddOnResultInstance { constructor( protected _version: V2010, - payload: AddOnResultPayload, + payload: AddOnResultResource, accountSid: string, referenceSid: string, sid?: string @@ -627,7 +627,7 @@ export class AddOnResultPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: AddOnResultPayload): AddOnResultInstance { + getInstance(payload: AddOnResultResource): AddOnResultInstance { return new AddOnResultInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/recording/addOnResult/payload.ts b/lib/rest/api/v2010/account/recording/addOnResult/payload.ts index 45f4195081..5336208039 100644 --- a/lib/rest/api/v2010/account/recording/addOnResult/payload.ts +++ b/lib/rest/api/v2010/account/recording/addOnResult/payload.ts @@ -189,7 +189,9 @@ export class PayloadContextImpl implements PayloadContext { } } -interface PayloadPayload extends PayloadResource, TwilioResponsePayload {} +interface PayloadPayload extends TwilioResponsePayload { + payloads: PayloadResource[]; +} interface PayloadResource { sid?: string | null; @@ -211,7 +213,7 @@ export class PayloadInstance { constructor( protected _version: V2010, - payload: PayloadPayload, + payload: PayloadResource, accountSid: string, referenceSid: string, addOnResultSid: string, @@ -626,7 +628,7 @@ export class PayloadPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: PayloadPayload): PayloadInstance { + getInstance(payload: PayloadResource): PayloadInstance { return new PayloadInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/recording/transcription.ts b/lib/rest/api/v2010/account/recording/transcription.ts index af58aaf416..74b4bf70c7 100644 --- a/lib/rest/api/v2010/account/recording/transcription.ts +++ b/lib/rest/api/v2010/account/recording/transcription.ts @@ -184,9 +184,9 @@ export class TranscriptionContextImpl implements TranscriptionContext { } } -interface TranscriptionPayload - extends TranscriptionResource, - TwilioResponsePayload {} +interface TranscriptionPayload extends TwilioResponsePayload { + transcriptions: TranscriptionResource[]; +} interface TranscriptionResource { account_sid?: string | null; @@ -210,7 +210,7 @@ export class TranscriptionInstance { constructor( protected _version: V2010, - payload: TranscriptionPayload, + payload: TranscriptionResource, accountSid: string, recordingSid: string, sid?: string @@ -623,7 +623,7 @@ export class TranscriptionPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: TranscriptionPayload): TranscriptionInstance { + getInstance(payload: TranscriptionResource): TranscriptionInstance { return new TranscriptionInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/shortCode.ts b/lib/rest/api/v2010/account/shortCode.ts index 749761e47a..5e3d897d2d 100644 --- a/lib/rest/api/v2010/account/shortCode.ts +++ b/lib/rest/api/v2010/account/shortCode.ts @@ -264,7 +264,9 @@ export type ShortCodeSmsMethod = | "PUT" | "DELETE"; -interface ShortCodePayload extends ShortCodeResource, TwilioResponsePayload {} +interface ShortCodePayload extends TwilioResponsePayload { + short_codes: ShortCodeResource[]; +} interface ShortCodeResource { account_sid?: string | null; @@ -287,7 +289,7 @@ export class ShortCodeInstance { constructor( protected _version: V2010, - payload: ShortCodePayload, + payload: ShortCodeResource, accountSid: string, sid?: string ) { @@ -698,7 +700,7 @@ export class ShortCodePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ShortCodePayload): ShortCodeInstance { + getInstance(payload: ShortCodeResource): ShortCodeInstance { return new ShortCodeInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/signingKey.ts b/lib/rest/api/v2010/account/signingKey.ts index 1877faf3ba..e1ddc115b1 100644 --- a/lib/rest/api/v2010/account/signingKey.ts +++ b/lib/rest/api/v2010/account/signingKey.ts @@ -244,7 +244,9 @@ export class SigningKeyContextImpl implements SigningKeyContext { } } -interface SigningKeyPayload extends SigningKeyResource, TwilioResponsePayload {} +interface SigningKeyPayload extends TwilioResponsePayload { + signing_keys: SigningKeyResource[]; +} interface SigningKeyResource { sid?: string | null; @@ -259,7 +261,7 @@ export class SigningKeyInstance { constructor( protected _version: V2010, - payload: SigningKeyPayload, + payload: SigningKeyResource, accountSid: string, sid?: string ) { @@ -619,7 +621,7 @@ export class SigningKeyPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SigningKeyPayload): SigningKeyInstance { + getInstance(payload: SigningKeyResource): SigningKeyInstance { return new SigningKeyInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/sip/credentialList.ts b/lib/rest/api/v2010/account/sip/credentialList.ts index dbe330d4ed..1932f1f1ae 100644 --- a/lib/rest/api/v2010/account/sip/credentialList.ts +++ b/lib/rest/api/v2010/account/sip/credentialList.ts @@ -265,9 +265,9 @@ export class CredentialListContextImpl implements CredentialListContext { } } -interface CredentialListPayload - extends CredentialListResource, - TwilioResponsePayload {} +interface CredentialListPayload extends TwilioResponsePayload { + credential_lists: CredentialListResource[]; +} interface CredentialListResource { account_sid?: string | null; @@ -285,7 +285,7 @@ export class CredentialListInstance { constructor( protected _version: V2010, - payload: CredentialListPayload, + payload: CredentialListResource, accountSid: string, sid?: string ) { @@ -741,7 +741,7 @@ export class CredentialListPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: CredentialListPayload): CredentialListInstance { + getInstance(payload: CredentialListResource): CredentialListInstance { return new CredentialListInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/sip/credentialList/credential.ts b/lib/rest/api/v2010/account/sip/credentialList/credential.ts index 2d9eb3103f..e575f7d617 100644 --- a/lib/rest/api/v2010/account/sip/credentialList/credential.ts +++ b/lib/rest/api/v2010/account/sip/credentialList/credential.ts @@ -266,7 +266,9 @@ export class CredentialContextImpl implements CredentialContext { } } -interface CredentialPayload extends CredentialResource, TwilioResponsePayload {} +interface CredentialPayload extends TwilioResponsePayload { + credentials: CredentialResource[]; +} interface CredentialResource { sid?: string | null; @@ -284,7 +286,7 @@ export class CredentialInstance { constructor( protected _version: V2010, - payload: CredentialPayload, + payload: CredentialResource, accountSid: string, credentialListSid: string, sid?: string @@ -751,7 +753,7 @@ export class CredentialPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: CredentialPayload): CredentialInstance { + getInstance(payload: CredentialResource): CredentialInstance { return new CredentialInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/sip/domain.ts b/lib/rest/api/v2010/account/sip/domain.ts index 1e10bfd743..ffe88c1bdd 100644 --- a/lib/rest/api/v2010/account/sip/domain.ts +++ b/lib/rest/api/v2010/account/sip/domain.ts @@ -391,7 +391,9 @@ export type DomainVoiceStatusCallbackMethod = | "PUT" | "DELETE"; -interface DomainPayload extends DomainResource, TwilioResponsePayload {} +interface DomainPayload extends TwilioResponsePayload { + domains: DomainResource[]; +} interface DomainResource { account_sid?: string | null; @@ -423,7 +425,7 @@ export class DomainInstance { constructor( protected _version: V2010, - payload: DomainPayload, + payload: DomainResource, accountSid: string, sid?: string ) { @@ -996,7 +998,7 @@ export class DomainPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: DomainPayload): DomainInstance { + getInstance(payload: DomainResource): DomainInstance { return new DomainInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls/authCallsCredentialListMapping.ts b/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls/authCallsCredentialListMapping.ts index 80bdee5745..c4cc0ff70b 100644 --- a/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls/authCallsCredentialListMapping.ts +++ b/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls/authCallsCredentialListMapping.ts @@ -198,9 +198,9 @@ export class AuthCallsCredentialListMappingContextImpl } } -interface AuthCallsCredentialListMappingPayload - extends AuthCallsCredentialListMappingResource, - TwilioResponsePayload {} +interface AuthCallsCredentialListMappingPayload extends TwilioResponsePayload { + contents: AuthCallsCredentialListMappingResource[]; +} interface AuthCallsCredentialListMappingResource { account_sid?: string | null; @@ -216,7 +216,7 @@ export class AuthCallsCredentialListMappingInstance { constructor( protected _version: V2010, - payload: AuthCallsCredentialListMappingPayload, + payload: AuthCallsCredentialListMappingResource, accountSid: string, domainSid: string, sid?: string @@ -701,7 +701,7 @@ export class AuthCallsCredentialListMappingPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: AuthCallsCredentialListMappingPayload + payload: AuthCallsCredentialListMappingResource ): AuthCallsCredentialListMappingInstance { return new AuthCallsCredentialListMappingInstance( this._version, diff --git a/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls/authCallsIpAccessControlListMapping.ts b/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls/authCallsIpAccessControlListMapping.ts index fa54e62a3c..98779ee8c4 100644 --- a/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls/authCallsIpAccessControlListMapping.ts +++ b/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls/authCallsIpAccessControlListMapping.ts @@ -199,8 +199,9 @@ export class AuthCallsIpAccessControlListMappingContextImpl } interface AuthCallsIpAccessControlListMappingPayload - extends AuthCallsIpAccessControlListMappingResource, - TwilioResponsePayload {} + extends TwilioResponsePayload { + contents: AuthCallsIpAccessControlListMappingResource[]; +} interface AuthCallsIpAccessControlListMappingResource { account_sid?: string | null; @@ -216,7 +217,7 @@ export class AuthCallsIpAccessControlListMappingInstance { constructor( protected _version: V2010, - payload: AuthCallsIpAccessControlListMappingPayload, + payload: AuthCallsIpAccessControlListMappingResource, accountSid: string, domainSid: string, sid?: string @@ -701,7 +702,7 @@ export class AuthCallsIpAccessControlListMappingPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: AuthCallsIpAccessControlListMappingPayload + payload: AuthCallsIpAccessControlListMappingResource ): AuthCallsIpAccessControlListMappingInstance { return new AuthCallsIpAccessControlListMappingInstance( this._version, diff --git a/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeRegistrations/authRegistrationsCredentialListMapping.ts b/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeRegistrations/authRegistrationsCredentialListMapping.ts index 51b81fb1bb..9e4940538f 100644 --- a/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeRegistrations/authRegistrationsCredentialListMapping.ts +++ b/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeRegistrations/authRegistrationsCredentialListMapping.ts @@ -201,8 +201,9 @@ export class AuthRegistrationsCredentialListMappingContextImpl } interface AuthRegistrationsCredentialListMappingPayload - extends AuthRegistrationsCredentialListMappingResource, - TwilioResponsePayload {} + extends TwilioResponsePayload { + contents: AuthRegistrationsCredentialListMappingResource[]; +} interface AuthRegistrationsCredentialListMappingResource { account_sid?: string | null; @@ -218,7 +219,7 @@ export class AuthRegistrationsCredentialListMappingInstance { constructor( protected _version: V2010, - payload: AuthRegistrationsCredentialListMappingPayload, + payload: AuthRegistrationsCredentialListMappingResource, accountSid: string, domainSid: string, sid?: string @@ -707,7 +708,7 @@ export class AuthRegistrationsCredentialListMappingPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: AuthRegistrationsCredentialListMappingPayload + payload: AuthRegistrationsCredentialListMappingResource ): AuthRegistrationsCredentialListMappingInstance { return new AuthRegistrationsCredentialListMappingInstance( this._version, diff --git a/lib/rest/api/v2010/account/sip/domain/credentialListMapping.ts b/lib/rest/api/v2010/account/sip/domain/credentialListMapping.ts index 5541b7edff..fdc627a7eb 100644 --- a/lib/rest/api/v2010/account/sip/domain/credentialListMapping.ts +++ b/lib/rest/api/v2010/account/sip/domain/credentialListMapping.ts @@ -198,9 +198,9 @@ export class CredentialListMappingContextImpl } } -interface CredentialListMappingPayload - extends CredentialListMappingResource, - TwilioResponsePayload {} +interface CredentialListMappingPayload extends TwilioResponsePayload { + credential_list_mappings: CredentialListMappingResource[]; +} interface CredentialListMappingResource { account_sid?: string | null; @@ -218,7 +218,7 @@ export class CredentialListMappingInstance { constructor( protected _version: V2010, - payload: CredentialListMappingPayload, + payload: CredentialListMappingResource, accountSid: string, domainSid: string, sid?: string @@ -683,7 +683,7 @@ export class CredentialListMappingPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: CredentialListMappingPayload + payload: CredentialListMappingResource ): CredentialListMappingInstance { return new CredentialListMappingInstance( this._version, diff --git a/lib/rest/api/v2010/account/sip/domain/ipAccessControlListMapping.ts b/lib/rest/api/v2010/account/sip/domain/ipAccessControlListMapping.ts index 11cd85c45b..450972dfce 100644 --- a/lib/rest/api/v2010/account/sip/domain/ipAccessControlListMapping.ts +++ b/lib/rest/api/v2010/account/sip/domain/ipAccessControlListMapping.ts @@ -198,9 +198,9 @@ export class IpAccessControlListMappingContextImpl } } -interface IpAccessControlListMappingPayload - extends IpAccessControlListMappingResource, - TwilioResponsePayload {} +interface IpAccessControlListMappingPayload extends TwilioResponsePayload { + ip_access_control_list_mappings: IpAccessControlListMappingResource[]; +} interface IpAccessControlListMappingResource { account_sid?: string | null; @@ -218,7 +218,7 @@ export class IpAccessControlListMappingInstance { constructor( protected _version: V2010, - payload: IpAccessControlListMappingPayload, + payload: IpAccessControlListMappingResource, accountSid: string, domainSid: string, sid?: string @@ -712,7 +712,7 @@ export class IpAccessControlListMappingPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: IpAccessControlListMappingPayload + payload: IpAccessControlListMappingResource ): IpAccessControlListMappingInstance { return new IpAccessControlListMappingInstance( this._version, diff --git a/lib/rest/api/v2010/account/sip/ipAccessControlList.ts b/lib/rest/api/v2010/account/sip/ipAccessControlList.ts index 285d77e6df..313aad5f59 100644 --- a/lib/rest/api/v2010/account/sip/ipAccessControlList.ts +++ b/lib/rest/api/v2010/account/sip/ipAccessControlList.ts @@ -267,9 +267,9 @@ export class IpAccessControlListContextImpl } } -interface IpAccessControlListPayload - extends IpAccessControlListResource, - TwilioResponsePayload {} +interface IpAccessControlListPayload extends TwilioResponsePayload { + ip_access_control_lists: IpAccessControlListResource[]; +} interface IpAccessControlListResource { sid?: string | null; @@ -287,7 +287,7 @@ export class IpAccessControlListInstance { constructor( protected _version: V2010, - payload: IpAccessControlListPayload, + payload: IpAccessControlListResource, accountSid: string, sid?: string ) { @@ -753,7 +753,7 @@ export class IpAccessControlListPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: IpAccessControlListPayload + payload: IpAccessControlListResource ): IpAccessControlListInstance { return new IpAccessControlListInstance( this._version, diff --git a/lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.ts b/lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.ts index 57faef04ba..3d7bace661 100644 --- a/lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.ts +++ b/lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.ts @@ -277,7 +277,9 @@ export class IpAddressContextImpl implements IpAddressContext { } } -interface IpAddressPayload extends IpAddressResource, TwilioResponsePayload {} +interface IpAddressPayload extends TwilioResponsePayload { + ip_addresses: IpAddressResource[]; +} interface IpAddressResource { sid?: string | null; @@ -297,7 +299,7 @@ export class IpAddressInstance { constructor( protected _version: V2010, - payload: IpAddressPayload, + payload: IpAddressResource, accountSid: string, ipAccessControlListSid: string, sid?: string @@ -785,7 +787,7 @@ export class IpAddressPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: IpAddressPayload): IpAddressInstance { + getInstance(payload: IpAddressResource): IpAddressInstance { return new IpAddressInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/token.ts b/lib/rest/api/v2010/account/token.ts index 669fc3193b..be73cd986e 100644 --- a/lib/rest/api/v2010/account/token.ts +++ b/lib/rest/api/v2010/account/token.ts @@ -158,7 +158,7 @@ interface TokenResource { export class TokenInstance { constructor( protected _version: V2010, - payload: TokenPayload, + payload: TokenResource, accountSid: string ) { this.accountSid = payload.account_sid; diff --git a/lib/rest/api/v2010/account/transcription.ts b/lib/rest/api/v2010/account/transcription.ts index c8f250af58..810b934b39 100644 --- a/lib/rest/api/v2010/account/transcription.ts +++ b/lib/rest/api/v2010/account/transcription.ts @@ -173,9 +173,9 @@ export class TranscriptionContextImpl implements TranscriptionContext { } } -interface TranscriptionPayload - extends TranscriptionResource, - TwilioResponsePayload {} +interface TranscriptionPayload extends TwilioResponsePayload { + transcriptions: TranscriptionResource[]; +} interface TranscriptionResource { account_sid?: string | null; @@ -199,7 +199,7 @@ export class TranscriptionInstance { constructor( protected _version: V2010, - payload: TranscriptionPayload, + payload: TranscriptionResource, accountSid: string, sid?: string ) { @@ -604,7 +604,7 @@ export class TranscriptionPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: TranscriptionPayload): TranscriptionInstance { + getInstance(payload: TranscriptionResource): TranscriptionInstance { return new TranscriptionInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/usage/record.ts b/lib/rest/api/v2010/account/usage/record.ts index 10cdb2e151..fd9a625563 100644 --- a/lib/rest/api/v2010/account/usage/record.ts +++ b/lib/rest/api/v2010/account/usage/record.ts @@ -695,7 +695,9 @@ export function RecordListInstance( return instance; } -interface RecordPayload extends RecordResource, TwilioResponsePayload {} +interface RecordPayload extends TwilioResponsePayload { + usage_records: RecordResource[]; +} interface RecordResource { account_sid?: string | null; @@ -718,7 +720,7 @@ interface RecordResource { export class RecordInstance { constructor( protected _version: V2010, - payload: RecordPayload, + payload: RecordResource, accountSid: string ) { this.accountSid = payload.account_sid; @@ -852,7 +854,7 @@ export class RecordPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: RecordPayload): RecordInstance { + getInstance(payload: RecordResource): RecordInstance { return new RecordInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/usage/record/allTime.ts b/lib/rest/api/v2010/account/usage/record/allTime.ts index ff77f489a9..2a1e70a33b 100644 --- a/lib/rest/api/v2010/account/usage/record/allTime.ts +++ b/lib/rest/api/v2010/account/usage/record/allTime.ts @@ -573,7 +573,9 @@ export function AllTimeListInstance( return instance; } -interface AllTimePayload extends AllTimeResource, TwilioResponsePayload {} +interface AllTimePayload extends TwilioResponsePayload { + usage_records: AllTimeResource[]; +} interface AllTimeResource { account_sid?: string | null; @@ -596,7 +598,7 @@ interface AllTimeResource { export class AllTimeInstance { constructor( protected _version: V2010, - payload: AllTimePayload, + payload: AllTimeResource, accountSid: string ) { this.accountSid = payload.account_sid; @@ -730,7 +732,7 @@ export class AllTimePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: AllTimePayload): AllTimeInstance { + getInstance(payload: AllTimeResource): AllTimeInstance { return new AllTimeInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/usage/record/daily.ts b/lib/rest/api/v2010/account/usage/record/daily.ts index 8412793fd9..3fd5915bfe 100644 --- a/lib/rest/api/v2010/account/usage/record/daily.ts +++ b/lib/rest/api/v2010/account/usage/record/daily.ts @@ -573,7 +573,9 @@ export function DailyListInstance( return instance; } -interface DailyPayload extends DailyResource, TwilioResponsePayload {} +interface DailyPayload extends TwilioResponsePayload { + usage_records: DailyResource[]; +} interface DailyResource { account_sid?: string | null; @@ -596,7 +598,7 @@ interface DailyResource { export class DailyInstance { constructor( protected _version: V2010, - payload: DailyPayload, + payload: DailyResource, accountSid: string ) { this.accountSid = payload.account_sid; @@ -730,7 +732,7 @@ export class DailyPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: DailyPayload): DailyInstance { + getInstance(payload: DailyResource): DailyInstance { return new DailyInstance(this._version, payload, this._solution.accountSid); } diff --git a/lib/rest/api/v2010/account/usage/record/lastMonth.ts b/lib/rest/api/v2010/account/usage/record/lastMonth.ts index 21432bb800..21e5377ba6 100644 --- a/lib/rest/api/v2010/account/usage/record/lastMonth.ts +++ b/lib/rest/api/v2010/account/usage/record/lastMonth.ts @@ -573,7 +573,9 @@ export function LastMonthListInstance( return instance; } -interface LastMonthPayload extends LastMonthResource, TwilioResponsePayload {} +interface LastMonthPayload extends TwilioResponsePayload { + usage_records: LastMonthResource[]; +} interface LastMonthResource { account_sid?: string | null; @@ -596,7 +598,7 @@ interface LastMonthResource { export class LastMonthInstance { constructor( protected _version: V2010, - payload: LastMonthPayload, + payload: LastMonthResource, accountSid: string ) { this.accountSid = payload.account_sid; @@ -730,7 +732,7 @@ export class LastMonthPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: LastMonthPayload): LastMonthInstance { + getInstance(payload: LastMonthResource): LastMonthInstance { return new LastMonthInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/usage/record/monthly.ts b/lib/rest/api/v2010/account/usage/record/monthly.ts index 64eb4a0518..3931e7da9f 100644 --- a/lib/rest/api/v2010/account/usage/record/monthly.ts +++ b/lib/rest/api/v2010/account/usage/record/monthly.ts @@ -573,7 +573,9 @@ export function MonthlyListInstance( return instance; } -interface MonthlyPayload extends MonthlyResource, TwilioResponsePayload {} +interface MonthlyPayload extends TwilioResponsePayload { + usage_records: MonthlyResource[]; +} interface MonthlyResource { account_sid?: string | null; @@ -596,7 +598,7 @@ interface MonthlyResource { export class MonthlyInstance { constructor( protected _version: V2010, - payload: MonthlyPayload, + payload: MonthlyResource, accountSid: string ) { this.accountSid = payload.account_sid; @@ -730,7 +732,7 @@ export class MonthlyPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: MonthlyPayload): MonthlyInstance { + getInstance(payload: MonthlyResource): MonthlyInstance { return new MonthlyInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/usage/record/thisMonth.ts b/lib/rest/api/v2010/account/usage/record/thisMonth.ts index d6c6b29519..ddba509dc2 100644 --- a/lib/rest/api/v2010/account/usage/record/thisMonth.ts +++ b/lib/rest/api/v2010/account/usage/record/thisMonth.ts @@ -573,7 +573,9 @@ export function ThisMonthListInstance( return instance; } -interface ThisMonthPayload extends ThisMonthResource, TwilioResponsePayload {} +interface ThisMonthPayload extends TwilioResponsePayload { + usage_records: ThisMonthResource[]; +} interface ThisMonthResource { account_sid?: string | null; @@ -596,7 +598,7 @@ interface ThisMonthResource { export class ThisMonthInstance { constructor( protected _version: V2010, - payload: ThisMonthPayload, + payload: ThisMonthResource, accountSid: string ) { this.accountSid = payload.account_sid; @@ -730,7 +732,7 @@ export class ThisMonthPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ThisMonthPayload): ThisMonthInstance { + getInstance(payload: ThisMonthResource): ThisMonthInstance { return new ThisMonthInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/usage/record/today.ts b/lib/rest/api/v2010/account/usage/record/today.ts index 6c994f4555..e61e0c5082 100644 --- a/lib/rest/api/v2010/account/usage/record/today.ts +++ b/lib/rest/api/v2010/account/usage/record/today.ts @@ -573,7 +573,9 @@ export function TodayListInstance( return instance; } -interface TodayPayload extends TodayResource, TwilioResponsePayload {} +interface TodayPayload extends TwilioResponsePayload { + usage_records: TodayResource[]; +} interface TodayResource { account_sid?: string | null; @@ -596,7 +598,7 @@ interface TodayResource { export class TodayInstance { constructor( protected _version: V2010, - payload: TodayPayload, + payload: TodayResource, accountSid: string ) { this.accountSid = payload.account_sid; @@ -730,7 +732,7 @@ export class TodayPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: TodayPayload): TodayInstance { + getInstance(payload: TodayResource): TodayInstance { return new TodayInstance(this._version, payload, this._solution.accountSid); } diff --git a/lib/rest/api/v2010/account/usage/record/yearly.ts b/lib/rest/api/v2010/account/usage/record/yearly.ts index 79d5f05dee..927113a13c 100644 --- a/lib/rest/api/v2010/account/usage/record/yearly.ts +++ b/lib/rest/api/v2010/account/usage/record/yearly.ts @@ -573,7 +573,9 @@ export function YearlyListInstance( return instance; } -interface YearlyPayload extends YearlyResource, TwilioResponsePayload {} +interface YearlyPayload extends TwilioResponsePayload { + usage_records: YearlyResource[]; +} interface YearlyResource { account_sid?: string | null; @@ -596,7 +598,7 @@ interface YearlyResource { export class YearlyInstance { constructor( protected _version: V2010, - payload: YearlyPayload, + payload: YearlyResource, accountSid: string ) { this.accountSid = payload.account_sid; @@ -730,7 +732,7 @@ export class YearlyPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: YearlyPayload): YearlyInstance { + getInstance(payload: YearlyResource): YearlyInstance { return new YearlyInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/usage/record/yesterday.ts b/lib/rest/api/v2010/account/usage/record/yesterday.ts index 161d16049a..d9f882bc34 100644 --- a/lib/rest/api/v2010/account/usage/record/yesterday.ts +++ b/lib/rest/api/v2010/account/usage/record/yesterday.ts @@ -573,7 +573,9 @@ export function YesterdayListInstance( return instance; } -interface YesterdayPayload extends YesterdayResource, TwilioResponsePayload {} +interface YesterdayPayload extends TwilioResponsePayload { + usage_records: YesterdayResource[]; +} interface YesterdayResource { account_sid?: string | null; @@ -596,7 +598,7 @@ interface YesterdayResource { export class YesterdayInstance { constructor( protected _version: V2010, - payload: YesterdayPayload, + payload: YesterdayResource, accountSid: string ) { this.accountSid = payload.account_sid; @@ -730,7 +732,7 @@ export class YesterdayPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: YesterdayPayload): YesterdayInstance { + getInstance(payload: YesterdayResource): YesterdayInstance { return new YesterdayInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/usage/trigger.ts b/lib/rest/api/v2010/account/usage/trigger.ts index d9d9eecb98..d30e19c634 100644 --- a/lib/rest/api/v2010/account/usage/trigger.ts +++ b/lib/rest/api/v2010/account/usage/trigger.ts @@ -549,7 +549,9 @@ export type TriggerCallbackMethod = | "PUT" | "DELETE"; -interface TriggerPayload extends TriggerResource, TwilioResponsePayload {} +interface TriggerPayload extends TwilioResponsePayload { + usage_triggers: TriggerResource[]; +} interface TriggerResource { account_sid?: string | null; @@ -576,7 +578,7 @@ export class TriggerInstance { constructor( protected _version: V2010, - payload: TriggerPayload, + payload: TriggerResource, accountSid: string, sid?: string ) { @@ -1102,7 +1104,7 @@ export class TriggerPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: TriggerPayload): TriggerInstance { + getInstance(payload: TriggerResource): TriggerInstance { return new TriggerInstance( this._version, payload, diff --git a/lib/rest/api/v2010/account/validationRequest.ts b/lib/rest/api/v2010/account/validationRequest.ts index 0654f2e0b6..83eb270c64 100644 --- a/lib/rest/api/v2010/account/validationRequest.ts +++ b/lib/rest/api/v2010/account/validationRequest.ts @@ -167,7 +167,7 @@ interface ValidationRequestResource { export class ValidationRequestInstance { constructor( protected _version: V2010, - payload: ValidationRequestPayload, + payload: ValidationRequestResource, accountSid: string ) { this.accountSid = payload.account_sid; diff --git a/lib/rest/autopilot/v1/assistant.ts b/lib/rest/autopilot/v1/assistant.ts index 695f555210..f83621298e 100644 --- a/lib/rest/autopilot/v1/assistant.ts +++ b/lib/rest/autopilot/v1/assistant.ts @@ -356,7 +356,9 @@ export class AssistantContextImpl implements AssistantContext { } } -interface AssistantPayload extends AssistantResource, TwilioResponsePayload {} +interface AssistantPayload extends TwilioResponsePayload { + assistants: AssistantResource[]; +} interface AssistantResource { account_sid?: string | null; @@ -379,7 +381,11 @@ export class AssistantInstance { protected _solution: AssistantContextSolution; protected _context?: AssistantContext; - constructor(protected _version: V1, payload: AssistantPayload, sid?: string) { + constructor( + protected _version: V1, + payload: AssistantResource, + sid?: string + ) { this.accountSid = payload.account_sid; this.dateCreated = deserialize.iso8601DateTime(payload.date_created); this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); @@ -925,7 +931,7 @@ export class AssistantPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: AssistantPayload): AssistantInstance { + getInstance(payload: AssistantResource): AssistantInstance { return new AssistantInstance(this._version, payload); } diff --git a/lib/rest/autopilot/v1/assistant/defaults.ts b/lib/rest/autopilot/v1/assistant/defaults.ts index 4a5288e20e..8d5494a19c 100644 --- a/lib/rest/autopilot/v1/assistant/defaults.ts +++ b/lib/rest/autopilot/v1/assistant/defaults.ts @@ -179,7 +179,7 @@ export class DefaultsInstance { constructor( protected _version: V1, - payload: DefaultsPayload, + payload: DefaultsResource, assistantSid: string ) { this.accountSid = payload.account_sid; diff --git a/lib/rest/autopilot/v1/assistant/dialogue.ts b/lib/rest/autopilot/v1/assistant/dialogue.ts index 1762d0bdc9..cef01772cb 100644 --- a/lib/rest/autopilot/v1/assistant/dialogue.ts +++ b/lib/rest/autopilot/v1/assistant/dialogue.ts @@ -113,7 +113,7 @@ export class DialogueInstance { constructor( protected _version: V1, - payload: DialoguePayload, + payload: DialogueResource, assistantSid: string, sid?: string ) { diff --git a/lib/rest/autopilot/v1/assistant/fieldType.ts b/lib/rest/autopilot/v1/assistant/fieldType.ts index d3224e3f9d..1022a4de2c 100644 --- a/lib/rest/autopilot/v1/assistant/fieldType.ts +++ b/lib/rest/autopilot/v1/assistant/fieldType.ts @@ -275,7 +275,9 @@ export class FieldTypeContextImpl implements FieldTypeContext { } } -interface FieldTypePayload extends FieldTypeResource, TwilioResponsePayload {} +interface FieldTypePayload extends TwilioResponsePayload { + field_types: FieldTypeResource[]; +} interface FieldTypeResource { account_sid?: string | null; @@ -295,7 +297,7 @@ export class FieldTypeInstance { constructor( protected _version: V1, - payload: FieldTypePayload, + payload: FieldTypeResource, assistantSid: string, sid?: string ) { @@ -763,7 +765,7 @@ export class FieldTypePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: FieldTypePayload): FieldTypeInstance { + getInstance(payload: FieldTypeResource): FieldTypeInstance { return new FieldTypeInstance( this._version, payload, diff --git a/lib/rest/autopilot/v1/assistant/fieldType/fieldValue.ts b/lib/rest/autopilot/v1/assistant/fieldType/fieldValue.ts index 3821c59db9..a7e83ea66f 100644 --- a/lib/rest/autopilot/v1/assistant/fieldType/fieldValue.ts +++ b/lib/rest/autopilot/v1/assistant/fieldType/fieldValue.ts @@ -200,7 +200,9 @@ export class FieldValueContextImpl implements FieldValueContext { } } -interface FieldValuePayload extends FieldValueResource, TwilioResponsePayload {} +interface FieldValuePayload extends TwilioResponsePayload { + field_values: FieldValueResource[]; +} interface FieldValueResource { account_sid?: string | null; @@ -221,7 +223,7 @@ export class FieldValueInstance { constructor( protected _version: V1, - payload: FieldValuePayload, + payload: FieldValueResource, assistantSid: string, fieldTypeSid: string, sid?: string @@ -678,7 +680,7 @@ export class FieldValuePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: FieldValuePayload): FieldValueInstance { + getInstance(payload: FieldValueResource): FieldValueInstance { return new FieldValueInstance( this._version, payload, diff --git a/lib/rest/autopilot/v1/assistant/modelBuild.ts b/lib/rest/autopilot/v1/assistant/modelBuild.ts index 28d47b2871..7b5144815f 100644 --- a/lib/rest/autopilot/v1/assistant/modelBuild.ts +++ b/lib/rest/autopilot/v1/assistant/modelBuild.ts @@ -262,7 +262,9 @@ export class ModelBuildContextImpl implements ModelBuildContext { } } -interface ModelBuildPayload extends ModelBuildResource, TwilioResponsePayload {} +interface ModelBuildPayload extends TwilioResponsePayload { + model_builds: ModelBuildResource[]; +} interface ModelBuildResource { account_sid?: string | null; @@ -283,7 +285,7 @@ export class ModelBuildInstance { constructor( protected _version: V1, - payload: ModelBuildPayload, + payload: ModelBuildResource, assistantSid: string, sid?: string ) { @@ -757,7 +759,7 @@ export class ModelBuildPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ModelBuildPayload): ModelBuildInstance { + getInstance(payload: ModelBuildResource): ModelBuildInstance { return new ModelBuildInstance( this._version, payload, diff --git a/lib/rest/autopilot/v1/assistant/query.ts b/lib/rest/autopilot/v1/assistant/query.ts index 189835731b..ea7eebff9a 100644 --- a/lib/rest/autopilot/v1/assistant/query.ts +++ b/lib/rest/autopilot/v1/assistant/query.ts @@ -286,7 +286,9 @@ export class QueryContextImpl implements QueryContext { } } -interface QueryPayload extends QueryResource, TwilioResponsePayload {} +interface QueryPayload extends TwilioResponsePayload { + queries: QueryResource[]; +} interface QueryResource { account_sid?: string | null; @@ -311,7 +313,7 @@ export class QueryInstance { constructor( protected _version: V1, - payload: QueryPayload, + payload: QueryResource, assistantSid: string, sid?: string ) { @@ -815,7 +817,7 @@ export class QueryPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: QueryPayload): QueryInstance { + getInstance(payload: QueryResource): QueryInstance { return new QueryInstance( this._version, payload, diff --git a/lib/rest/autopilot/v1/assistant/styleSheet.ts b/lib/rest/autopilot/v1/assistant/styleSheet.ts index f167804628..0e8e70b08c 100644 --- a/lib/rest/autopilot/v1/assistant/styleSheet.ts +++ b/lib/rest/autopilot/v1/assistant/styleSheet.ts @@ -179,7 +179,7 @@ export class StyleSheetInstance { constructor( protected _version: V1, - payload: StyleSheetPayload, + payload: StyleSheetResource, assistantSid: string ) { this.accountSid = payload.account_sid; diff --git a/lib/rest/autopilot/v1/assistant/task.ts b/lib/rest/autopilot/v1/assistant/task.ts index c6d321004b..3f4e9d9f53 100644 --- a/lib/rest/autopilot/v1/assistant/task.ts +++ b/lib/rest/autopilot/v1/assistant/task.ts @@ -329,7 +329,9 @@ export class TaskContextImpl implements TaskContext { } } -interface TaskPayload extends TaskResource, TwilioResponsePayload {} +interface TaskPayload extends TwilioResponsePayload { + tasks: TaskResource[]; +} interface TaskResource { account_sid?: string | null; @@ -350,7 +352,7 @@ export class TaskInstance { constructor( protected _version: V1, - payload: TaskPayload, + payload: TaskResource, assistantSid: string, sid?: string ) { @@ -841,7 +843,7 @@ export class TaskPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: TaskPayload): TaskInstance { + getInstance(payload: TaskResource): TaskInstance { return new TaskInstance( this._version, payload, diff --git a/lib/rest/autopilot/v1/assistant/task/field.ts b/lib/rest/autopilot/v1/assistant/task/field.ts index ba474b4830..f9b73a3763 100644 --- a/lib/rest/autopilot/v1/assistant/task/field.ts +++ b/lib/rest/autopilot/v1/assistant/task/field.ts @@ -192,7 +192,9 @@ export class FieldContextImpl implements FieldContext { } } -interface FieldPayload extends FieldResource, TwilioResponsePayload {} +interface FieldPayload extends TwilioResponsePayload { + fields: FieldResource[]; +} interface FieldResource { account_sid?: string | null; @@ -212,7 +214,7 @@ export class FieldInstance { constructor( protected _version: V1, - payload: FieldPayload, + payload: FieldResource, assistantSid: string, taskSid: string, sid?: string @@ -660,7 +662,7 @@ export class FieldPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: FieldPayload): FieldInstance { + getInstance(payload: FieldResource): FieldInstance { return new FieldInstance( this._version, payload, diff --git a/lib/rest/autopilot/v1/assistant/task/sample.ts b/lib/rest/autopilot/v1/assistant/task/sample.ts index a49c862058..c9c893ecb0 100644 --- a/lib/rest/autopilot/v1/assistant/task/sample.ts +++ b/lib/rest/autopilot/v1/assistant/task/sample.ts @@ -282,7 +282,9 @@ export class SampleContextImpl implements SampleContext { } } -interface SamplePayload extends SampleResource, TwilioResponsePayload {} +interface SamplePayload extends TwilioResponsePayload { + samples: SampleResource[]; +} interface SampleResource { account_sid?: string | null; @@ -303,7 +305,7 @@ export class SampleInstance { constructor( protected _version: V1, - payload: SamplePayload, + payload: SampleResource, assistantSid: string, taskSid: string, sid?: string @@ -786,7 +788,7 @@ export class SamplePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SamplePayload): SampleInstance { + getInstance(payload: SampleResource): SampleInstance { return new SampleInstance( this._version, payload, diff --git a/lib/rest/autopilot/v1/assistant/task/taskActions.ts b/lib/rest/autopilot/v1/assistant/task/taskActions.ts index fae90f647a..e4fece50d3 100644 --- a/lib/rest/autopilot/v1/assistant/task/taskActions.ts +++ b/lib/rest/autopilot/v1/assistant/task/taskActions.ts @@ -187,7 +187,7 @@ export class TaskActionsInstance { constructor( protected _version: V1, - payload: TaskActionsPayload, + payload: TaskActionsResource, assistantSid: string, taskSid: string ) { diff --git a/lib/rest/autopilot/v1/assistant/task/taskStatistics.ts b/lib/rest/autopilot/v1/assistant/task/taskStatistics.ts index 39be37092f..181f2f1673 100644 --- a/lib/rest/autopilot/v1/assistant/task/taskStatistics.ts +++ b/lib/rest/autopilot/v1/assistant/task/taskStatistics.ts @@ -114,7 +114,7 @@ export class TaskStatisticsInstance { constructor( protected _version: V1, - payload: TaskStatisticsPayload, + payload: TaskStatisticsResource, assistantSid: string, taskSid: string ) { diff --git a/lib/rest/autopilot/v1/assistant/webhook.ts b/lib/rest/autopilot/v1/assistant/webhook.ts index ba848bc674..54be9bdc89 100644 --- a/lib/rest/autopilot/v1/assistant/webhook.ts +++ b/lib/rest/autopilot/v1/assistant/webhook.ts @@ -270,7 +270,9 @@ export class WebhookContextImpl implements WebhookContext { } } -interface WebhookPayload extends WebhookResource, TwilioResponsePayload {} +interface WebhookPayload extends TwilioResponsePayload { + webhooks: WebhookResource[]; +} interface WebhookResource { url?: string | null; @@ -291,7 +293,7 @@ export class WebhookInstance { constructor( protected _version: V1, - payload: WebhookPayload, + payload: WebhookResource, assistantSid: string, sid?: string ) { @@ -770,7 +772,7 @@ export class WebhookPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: WebhookPayload): WebhookInstance { + getInstance(payload: WebhookResource): WebhookInstance { return new WebhookInstance( this._version, payload, diff --git a/lib/rest/autopilot/v1/restoreAssistant.ts b/lib/rest/autopilot/v1/restoreAssistant.ts index 47b519ddb0..7cc56d5d21 100644 --- a/lib/rest/autopilot/v1/restoreAssistant.ts +++ b/lib/rest/autopilot/v1/restoreAssistant.ts @@ -138,7 +138,7 @@ interface RestoreAssistantResource { } export class RestoreAssistantInstance { - constructor(protected _version: V1, payload: RestoreAssistantPayload) { + constructor(protected _version: V1, payload: RestoreAssistantResource) { this.accountSid = payload.account_sid; this.sid = payload.sid; this.dateCreated = deserialize.iso8601DateTime(payload.date_created); diff --git a/lib/rest/bulkexports/v1/export.ts b/lib/rest/bulkexports/v1/export.ts index 61687695f9..c2dbae3c7e 100644 --- a/lib/rest/bulkexports/v1/export.ts +++ b/lib/rest/bulkexports/v1/export.ts @@ -128,7 +128,7 @@ export class ExportInstance { constructor( protected _version: V1, - payload: ExportPayload, + payload: ExportResource, resourceType?: string ) { this.resourceType = payload.resource_type; diff --git a/lib/rest/bulkexports/v1/export/day.ts b/lib/rest/bulkexports/v1/export/day.ts index 33a742d5c0..b74b0fb54d 100644 --- a/lib/rest/bulkexports/v1/export/day.ts +++ b/lib/rest/bulkexports/v1/export/day.ts @@ -146,7 +146,9 @@ export class DayContextImpl implements DayContext { } } -interface DayPayload extends DayResource, TwilioResponsePayload {} +interface DayPayload extends TwilioResponsePayload { + days: DayResource[]; +} interface DayResource { redirect_to?: string | null; @@ -163,7 +165,7 @@ export class DayInstance { constructor( protected _version: V1, - payload: DayPayload, + payload: DayResource, resourceType: string, day?: string ) { @@ -496,7 +498,7 @@ export class DayPage extends Page { * * @param payload - Payload response from the API */ - getInstance(payload: DayPayload): DayInstance { + getInstance(payload: DayResource): DayInstance { return new DayInstance(this._version, payload, this._solution.resourceType); } diff --git a/lib/rest/bulkexports/v1/export/exportCustomJob.ts b/lib/rest/bulkexports/v1/export/exportCustomJob.ts index ef9a770ca1..b5da2a97f3 100644 --- a/lib/rest/bulkexports/v1/export/exportCustomJob.ts +++ b/lib/rest/bulkexports/v1/export/exportCustomJob.ts @@ -401,9 +401,9 @@ export function ExportCustomJobListInstance( return instance; } -interface ExportCustomJobPayload - extends ExportCustomJobResource, - TwilioResponsePayload {} +interface ExportCustomJobPayload extends TwilioResponsePayload { + jobs: ExportCustomJobResource[]; +} interface ExportCustomJobResource { friendly_name?: string | null; @@ -422,7 +422,7 @@ interface ExportCustomJobResource { export class ExportCustomJobInstance { constructor( protected _version: V1, - payload: ExportCustomJobPayload, + payload: ExportCustomJobResource, resourceType: string ) { this.friendlyName = payload.friendly_name; @@ -535,7 +535,7 @@ export class ExportCustomJobPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ExportCustomJobPayload): ExportCustomJobInstance { + getInstance(payload: ExportCustomJobResource): ExportCustomJobInstance { return new ExportCustomJobInstance( this._version, payload, diff --git a/lib/rest/bulkexports/v1/export/job.ts b/lib/rest/bulkexports/v1/export/job.ts index 03e629d9f0..775546470e 100644 --- a/lib/rest/bulkexports/v1/export/job.ts +++ b/lib/rest/bulkexports/v1/export/job.ts @@ -133,7 +133,7 @@ export class JobInstance { protected _solution: JobContextSolution; protected _context?: JobContext; - constructor(protected _version: V1, payload: JobPayload, jobSid?: string) { + constructor(protected _version: V1, payload: JobResource, jobSid?: string) { this.resourceType = payload.resource_type; this.friendlyName = payload.friendly_name; this.details = payload.details; diff --git a/lib/rest/bulkexports/v1/exportConfiguration.ts b/lib/rest/bulkexports/v1/exportConfiguration.ts index e863b39fff..e30f6470a8 100644 --- a/lib/rest/bulkexports/v1/exportConfiguration.ts +++ b/lib/rest/bulkexports/v1/exportConfiguration.ts @@ -190,7 +190,7 @@ export class ExportConfigurationInstance { constructor( protected _version: V1, - payload: ExportConfigurationPayload, + payload: ExportConfigurationResource, resourceType?: string ) { this.enabled = payload.enabled; diff --git a/lib/rest/chat/v1/credential.ts b/lib/rest/chat/v1/credential.ts index a3972b5509..e42cd54ba1 100644 --- a/lib/rest/chat/v1/credential.ts +++ b/lib/rest/chat/v1/credential.ts @@ -270,7 +270,9 @@ export class CredentialContextImpl implements CredentialContext { } } -interface CredentialPayload extends CredentialResource, TwilioResponsePayload {} +interface CredentialPayload extends TwilioResponsePayload { + credentials: CredentialResource[]; +} interface CredentialResource { sid?: string | null; @@ -289,7 +291,7 @@ export class CredentialInstance { constructor( protected _version: V1, - payload: CredentialPayload, + payload: CredentialResource, sid?: string ) { this.sid = payload.sid; @@ -730,7 +732,7 @@ export class CredentialPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: CredentialPayload): CredentialInstance { + getInstance(payload: CredentialResource): CredentialInstance { return new CredentialInstance(this._version, payload); } diff --git a/lib/rest/chat/v1/service.ts b/lib/rest/chat/v1/service.ts index ae7c898931..0aa8b98280 100644 --- a/lib/rest/chat/v1/service.ts +++ b/lib/rest/chat/v1/service.ts @@ -524,7 +524,9 @@ export class ServiceContextImpl implements ServiceContext { } } -interface ServicePayload extends ServiceResource, TwilioResponsePayload {} +interface ServicePayload extends TwilioResponsePayload { + services: ServiceResource[]; +} interface ServiceResource { sid?: string | null; @@ -554,7 +556,7 @@ export class ServiceInstance { protected _solution: ServiceContextSolution; protected _context?: ServiceContext; - constructor(protected _version: V1, payload: ServicePayload, sid?: string) { + constructor(protected _version: V1, payload: ServiceResource, sid?: string) { this.sid = payload.sid; this.accountSid = payload.account_sid; this.friendlyName = payload.friendly_name; @@ -1093,7 +1095,7 @@ export class ServicePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ServicePayload): ServiceInstance { + getInstance(payload: ServiceResource): ServiceInstance { return new ServiceInstance(this._version, payload); } diff --git a/lib/rest/chat/v1/service/channel.ts b/lib/rest/chat/v1/service/channel.ts index 9bb0b982cf..f51613c93a 100644 --- a/lib/rest/chat/v1/service/channel.ts +++ b/lib/rest/chat/v1/service/channel.ts @@ -319,7 +319,9 @@ export class ChannelContextImpl implements ChannelContext { } } -interface ChannelPayload extends ChannelResource, TwilioResponsePayload {} +interface ChannelPayload extends TwilioResponsePayload { + channels: ChannelResource[]; +} interface ChannelResource { sid?: string | null; @@ -344,7 +346,7 @@ export class ChannelInstance { constructor( protected _version: V1, - payload: ChannelPayload, + payload: ChannelResource, serviceSid: string, sid?: string ) { @@ -868,7 +870,7 @@ export class ChannelPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ChannelPayload): ChannelInstance { + getInstance(payload: ChannelResource): ChannelInstance { return new ChannelInstance( this._version, payload, diff --git a/lib/rest/chat/v1/service/channel/invite.ts b/lib/rest/chat/v1/service/channel/invite.ts index ce1d4e458d..836eb108f7 100644 --- a/lib/rest/chat/v1/service/channel/invite.ts +++ b/lib/rest/chat/v1/service/channel/invite.ts @@ -198,7 +198,9 @@ export class InviteContextImpl implements InviteContext { } } -interface InvitePayload extends InviteResource, TwilioResponsePayload {} +interface InvitePayload extends TwilioResponsePayload { + invites: InviteResource[]; +} interface InviteResource { sid?: string | null; @@ -219,7 +221,7 @@ export class InviteInstance { constructor( protected _version: V1, - payload: InvitePayload, + payload: InviteResource, serviceSid: string, channelSid: string, sid?: string @@ -670,7 +672,7 @@ export class InvitePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: InvitePayload): InviteInstance { + getInstance(payload: InviteResource): InviteInstance { return new InviteInstance( this._version, payload, diff --git a/lib/rest/chat/v1/service/channel/member.ts b/lib/rest/chat/v1/service/channel/member.ts index d728550687..cdd1889dd0 100644 --- a/lib/rest/chat/v1/service/channel/member.ts +++ b/lib/rest/chat/v1/service/channel/member.ts @@ -276,7 +276,9 @@ export class MemberContextImpl implements MemberContext { } } -interface MemberPayload extends MemberResource, TwilioResponsePayload {} +interface MemberPayload extends TwilioResponsePayload { + members: MemberResource[]; +} interface MemberResource { sid?: string | null; @@ -298,7 +300,7 @@ export class MemberInstance { constructor( protected _version: V1, - payload: MemberPayload, + payload: MemberResource, serviceSid: string, channelSid: string, sid?: string @@ -785,7 +787,7 @@ export class MemberPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: MemberPayload): MemberInstance { + getInstance(payload: MemberResource): MemberInstance { return new MemberInstance( this._version, payload, diff --git a/lib/rest/chat/v1/service/channel/message.ts b/lib/rest/chat/v1/service/channel/message.ts index b7a61e99c4..5b4b93a147 100644 --- a/lib/rest/chat/v1/service/channel/message.ts +++ b/lib/rest/chat/v1/service/channel/message.ts @@ -280,7 +280,9 @@ export class MessageContextImpl implements MessageContext { } } -interface MessagePayload extends MessageResource, TwilioResponsePayload {} +interface MessagePayload extends TwilioResponsePayload { + messages: MessageResource[]; +} interface MessageResource { sid?: string | null; @@ -304,7 +306,7 @@ export class MessageInstance { constructor( protected _version: V1, - payload: MessagePayload, + payload: MessageResource, serviceSid: string, channelSid: string, sid?: string @@ -800,7 +802,7 @@ export class MessagePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: MessagePayload): MessageInstance { + getInstance(payload: MessageResource): MessageInstance { return new MessageInstance( this._version, payload, diff --git a/lib/rest/chat/v1/service/role.ts b/lib/rest/chat/v1/service/role.ts index f0aca1fcab..9fe4dac106 100644 --- a/lib/rest/chat/v1/service/role.ts +++ b/lib/rest/chat/v1/service/role.ts @@ -249,7 +249,9 @@ export class RoleContextImpl implements RoleContext { } } -interface RolePayload extends RoleResource, TwilioResponsePayload {} +interface RolePayload extends TwilioResponsePayload { + roles: RoleResource[]; +} interface RoleResource { sid?: string | null; @@ -269,7 +271,7 @@ export class RoleInstance { constructor( protected _version: V1, - payload: RolePayload, + payload: RoleResource, serviceSid: string, sid?: string ) { @@ -722,7 +724,7 @@ export class RolePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: RolePayload): RoleInstance { + getInstance(payload: RoleResource): RoleInstance { return new RoleInstance(this._version, payload, this._solution.serviceSid); } diff --git a/lib/rest/chat/v1/service/user.ts b/lib/rest/chat/v1/service/user.ts index f97a5cb97d..e8c5d82cc0 100644 --- a/lib/rest/chat/v1/service/user.ts +++ b/lib/rest/chat/v1/service/user.ts @@ -282,7 +282,9 @@ export class UserContextImpl implements UserContext { } } -interface UserPayload extends UserResource, TwilioResponsePayload {} +interface UserPayload extends TwilioResponsePayload { + users: UserResource[]; +} interface UserResource { sid?: string | null; @@ -307,7 +309,7 @@ export class UserInstance { constructor( protected _version: V1, - payload: UserPayload, + payload: UserResource, serviceSid: string, sid?: string ) { @@ -802,7 +804,7 @@ export class UserPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: UserPayload): UserInstance { + getInstance(payload: UserResource): UserInstance { return new UserInstance(this._version, payload, this._solution.serviceSid); } diff --git a/lib/rest/chat/v1/service/user/userChannel.ts b/lib/rest/chat/v1/service/user/userChannel.ts index 314956bc97..d9735468d7 100644 --- a/lib/rest/chat/v1/service/user/userChannel.ts +++ b/lib/rest/chat/v1/service/user/userChannel.ts @@ -304,9 +304,9 @@ export function UserChannelListInstance( return instance; } -interface UserChannelPayload - extends UserChannelResource, - TwilioResponsePayload {} +interface UserChannelPayload extends TwilioResponsePayload { + channels: UserChannelResource[]; +} interface UserChannelResource { account_sid?: string | null; @@ -322,7 +322,7 @@ interface UserChannelResource { export class UserChannelInstance { constructor( protected _version: V1, - payload: UserChannelPayload, + payload: UserChannelResource, serviceSid: string, userSid: string ) { @@ -419,7 +419,7 @@ export class UserChannelPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: UserChannelPayload): UserChannelInstance { + getInstance(payload: UserChannelResource): UserChannelInstance { return new UserChannelInstance( this._version, payload, diff --git a/lib/rest/chat/v2/credential.ts b/lib/rest/chat/v2/credential.ts index e6801a1fd3..16b73da4e5 100644 --- a/lib/rest/chat/v2/credential.ts +++ b/lib/rest/chat/v2/credential.ts @@ -270,7 +270,9 @@ export class CredentialContextImpl implements CredentialContext { } } -interface CredentialPayload extends CredentialResource, TwilioResponsePayload {} +interface CredentialPayload extends TwilioResponsePayload { + credentials: CredentialResource[]; +} interface CredentialResource { sid?: string | null; @@ -289,7 +291,7 @@ export class CredentialInstance { constructor( protected _version: V2, - payload: CredentialPayload, + payload: CredentialResource, sid?: string ) { this.sid = payload.sid; @@ -730,7 +732,7 @@ export class CredentialPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: CredentialPayload): CredentialInstance { + getInstance(payload: CredentialResource): CredentialInstance { return new CredentialInstance(this._version, payload); } diff --git a/lib/rest/chat/v2/service.ts b/lib/rest/chat/v2/service.ts index 703d309865..d2dd285169 100644 --- a/lib/rest/chat/v2/service.ts +++ b/lib/rest/chat/v2/service.ts @@ -422,7 +422,9 @@ export class ServiceContextImpl implements ServiceContext { } } -interface ServicePayload extends ServiceResource, TwilioResponsePayload {} +interface ServicePayload extends TwilioResponsePayload { + services: ServiceResource[]; +} interface ServiceResource { sid?: string | null; @@ -454,7 +456,7 @@ export class ServiceInstance { protected _solution: ServiceContextSolution; protected _context?: ServiceContext; - constructor(protected _version: V2, payload: ServicePayload, sid?: string) { + constructor(protected _version: V2, payload: ServiceResource, sid?: string) { this.sid = payload.sid; this.accountSid = payload.account_sid; this.friendlyName = payload.friendly_name; @@ -1016,7 +1018,7 @@ export class ServicePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ServicePayload): ServiceInstance { + getInstance(payload: ServiceResource): ServiceInstance { return new ServiceInstance(this._version, payload); } diff --git a/lib/rest/chat/v2/service/binding.ts b/lib/rest/chat/v2/service/binding.ts index 2e62d6cdf1..0efd8be69f 100644 --- a/lib/rest/chat/v2/service/binding.ts +++ b/lib/rest/chat/v2/service/binding.ts @@ -185,7 +185,9 @@ export class BindingContextImpl implements BindingContext { } } -interface BindingPayload extends BindingResource, TwilioResponsePayload {} +interface BindingPayload extends TwilioResponsePayload { + bindings: BindingResource[]; +} interface BindingResource { sid?: string | null; @@ -208,7 +210,7 @@ export class BindingInstance { constructor( protected _version: V2, - payload: BindingPayload, + payload: BindingResource, serviceSid: string, sid?: string ) { @@ -603,7 +605,7 @@ export class BindingPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: BindingPayload): BindingInstance { + getInstance(payload: BindingResource): BindingInstance { return new BindingInstance( this._version, payload, diff --git a/lib/rest/chat/v2/service/channel.ts b/lib/rest/chat/v2/service/channel.ts index 8f80e84f6f..94581773d3 100644 --- a/lib/rest/chat/v2/service/channel.ts +++ b/lib/rest/chat/v2/service/channel.ts @@ -396,7 +396,9 @@ export class ChannelContextImpl implements ChannelContext { } } -interface ChannelPayload extends ChannelResource, TwilioResponsePayload {} +interface ChannelPayload extends TwilioResponsePayload { + channels: ChannelResource[]; +} interface ChannelResource { sid?: string | null; @@ -421,7 +423,7 @@ export class ChannelInstance { constructor( protected _version: V2, - payload: ChannelPayload, + payload: ChannelResource, serviceSid: string, sid?: string ) { @@ -973,7 +975,7 @@ export class ChannelPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ChannelPayload): ChannelInstance { + getInstance(payload: ChannelResource): ChannelInstance { return new ChannelInstance( this._version, payload, diff --git a/lib/rest/chat/v2/service/channel/invite.ts b/lib/rest/chat/v2/service/channel/invite.ts index e2490b495f..e2296f6819 100644 --- a/lib/rest/chat/v2/service/channel/invite.ts +++ b/lib/rest/chat/v2/service/channel/invite.ts @@ -198,7 +198,9 @@ export class InviteContextImpl implements InviteContext { } } -interface InvitePayload extends InviteResource, TwilioResponsePayload {} +interface InvitePayload extends TwilioResponsePayload { + invites: InviteResource[]; +} interface InviteResource { sid?: string | null; @@ -219,7 +221,7 @@ export class InviteInstance { constructor( protected _version: V2, - payload: InvitePayload, + payload: InviteResource, serviceSid: string, channelSid: string, sid?: string @@ -670,7 +672,7 @@ export class InvitePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: InvitePayload): InviteInstance { + getInstance(payload: InviteResource): InviteInstance { return new InviteInstance( this._version, payload, diff --git a/lib/rest/chat/v2/service/channel/member.ts b/lib/rest/chat/v2/service/channel/member.ts index 0ad728cedb..d375493886 100644 --- a/lib/rest/chat/v2/service/channel/member.ts +++ b/lib/rest/chat/v2/service/channel/member.ts @@ -349,7 +349,9 @@ export class MemberContextImpl implements MemberContext { } } -interface MemberPayload extends MemberResource, TwilioResponsePayload {} +interface MemberPayload extends TwilioResponsePayload { + members: MemberResource[]; +} interface MemberResource { sid?: string | null; @@ -372,7 +374,7 @@ export class MemberInstance { constructor( protected _version: V2, - payload: MemberPayload, + payload: MemberResource, serviceSid: string, channelSid: string, sid?: string @@ -892,7 +894,7 @@ export class MemberPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: MemberPayload): MemberInstance { + getInstance(payload: MemberResource): MemberInstance { return new MemberInstance( this._version, payload, diff --git a/lib/rest/chat/v2/service/channel/message.ts b/lib/rest/chat/v2/service/channel/message.ts index 9b41918bd2..b93426ed24 100644 --- a/lib/rest/chat/v2/service/channel/message.ts +++ b/lib/rest/chat/v2/service/channel/message.ts @@ -348,7 +348,9 @@ export class MessageContextImpl implements MessageContext { } } -interface MessagePayload extends MessageResource, TwilioResponsePayload {} +interface MessagePayload extends TwilioResponsePayload { + messages: MessageResource[]; +} interface MessageResource { sid?: string | null; @@ -375,7 +377,7 @@ export class MessageInstance { constructor( protected _version: V2, - payload: MessagePayload, + payload: MessageResource, serviceSid: string, channelSid: string, sid?: string @@ -920,7 +922,7 @@ export class MessagePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: MessagePayload): MessageInstance { + getInstance(payload: MessageResource): MessageInstance { return new MessageInstance( this._version, payload, diff --git a/lib/rest/chat/v2/service/channel/webhook.ts b/lib/rest/chat/v2/service/channel/webhook.ts index 89b02779ab..bc4e0a0293 100644 --- a/lib/rest/chat/v2/service/channel/webhook.ts +++ b/lib/rest/chat/v2/service/channel/webhook.ts @@ -307,7 +307,9 @@ export class WebhookContextImpl implements WebhookContext { } } -interface WebhookPayload extends WebhookResource, TwilioResponsePayload {} +interface WebhookPayload extends TwilioResponsePayload { + webhooks: WebhookResource[]; +} interface WebhookResource { sid?: string | null; @@ -327,7 +329,7 @@ export class WebhookInstance { constructor( protected _version: V2, - payload: WebhookPayload, + payload: WebhookResource, serviceSid: string, channelSid: string, sid?: string @@ -813,7 +815,7 @@ export class WebhookPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: WebhookPayload): WebhookInstance { + getInstance(payload: WebhookResource): WebhookInstance { return new WebhookInstance( this._version, payload, diff --git a/lib/rest/chat/v2/service/role.ts b/lib/rest/chat/v2/service/role.ts index 674527ba09..e7e5324356 100644 --- a/lib/rest/chat/v2/service/role.ts +++ b/lib/rest/chat/v2/service/role.ts @@ -249,7 +249,9 @@ export class RoleContextImpl implements RoleContext { } } -interface RolePayload extends RoleResource, TwilioResponsePayload {} +interface RolePayload extends TwilioResponsePayload { + roles: RoleResource[]; +} interface RoleResource { sid?: string | null; @@ -269,7 +271,7 @@ export class RoleInstance { constructor( protected _version: V2, - payload: RolePayload, + payload: RoleResource, serviceSid: string, sid?: string ) { @@ -722,7 +724,7 @@ export class RolePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: RolePayload): RoleInstance { + getInstance(payload: RoleResource): RoleInstance { return new RoleInstance(this._version, payload, this._solution.serviceSid); } diff --git a/lib/rest/chat/v2/service/user.ts b/lib/rest/chat/v2/service/user.ts index 3c0e913b94..bfd6dd8496 100644 --- a/lib/rest/chat/v2/service/user.ts +++ b/lib/rest/chat/v2/service/user.ts @@ -304,7 +304,9 @@ export class UserContextImpl implements UserContext { } } -interface UserPayload extends UserResource, TwilioResponsePayload {} +interface UserPayload extends TwilioResponsePayload { + users: UserResource[]; +} interface UserResource { sid?: string | null; @@ -329,7 +331,7 @@ export class UserInstance { constructor( protected _version: V2, - payload: UserPayload, + payload: UserResource, serviceSid: string, sid?: string ) { @@ -833,7 +835,7 @@ export class UserPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: UserPayload): UserInstance { + getInstance(payload: UserResource): UserInstance { return new UserInstance(this._version, payload, this._solution.serviceSid); } diff --git a/lib/rest/chat/v2/service/user/userBinding.ts b/lib/rest/chat/v2/service/user/userBinding.ts index d5de5e18c6..f1640aba16 100644 --- a/lib/rest/chat/v2/service/user/userBinding.ts +++ b/lib/rest/chat/v2/service/user/userBinding.ts @@ -190,9 +190,9 @@ export class UserBindingContextImpl implements UserBindingContext { } } -interface UserBindingPayload - extends UserBindingResource, - TwilioResponsePayload {} +interface UserBindingPayload extends TwilioResponsePayload { + bindings: UserBindingResource[]; +} interface UserBindingResource { sid?: string | null; @@ -215,7 +215,7 @@ export class UserBindingInstance { constructor( protected _version: V2, - payload: UserBindingPayload, + payload: UserBindingResource, serviceSid: string, userSid: string, sid?: string @@ -617,7 +617,7 @@ export class UserBindingPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: UserBindingPayload): UserBindingInstance { + getInstance(payload: UserBindingResource): UserBindingInstance { return new UserBindingInstance( this._version, payload, diff --git a/lib/rest/chat/v2/service/user/userChannel.ts b/lib/rest/chat/v2/service/user/userChannel.ts index ae10d33550..96115d1d69 100644 --- a/lib/rest/chat/v2/service/user/userChannel.ts +++ b/lib/rest/chat/v2/service/user/userChannel.ts @@ -309,9 +309,9 @@ export class UserChannelContextImpl implements UserChannelContext { } } -interface UserChannelPayload - extends UserChannelResource, - TwilioResponsePayload {} +interface UserChannelPayload extends TwilioResponsePayload { + channels: UserChannelResource[]; +} interface UserChannelResource { account_sid?: string | null; @@ -333,7 +333,7 @@ export class UserChannelInstance { constructor( protected _version: V2, - payload: UserChannelPayload, + payload: UserChannelResource, serviceSid: string, userSid: string, channelSid?: string @@ -772,7 +772,7 @@ export class UserChannelPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: UserChannelPayload): UserChannelInstance { + getInstance(payload: UserChannelResource): UserChannelInstance { return new UserChannelInstance( this._version, payload, diff --git a/lib/rest/chat/v3/channel.ts b/lib/rest/chat/v3/channel.ts index dcf11d140c..0119a04639 100644 --- a/lib/rest/chat/v3/channel.ts +++ b/lib/rest/chat/v3/channel.ts @@ -172,7 +172,7 @@ export class ChannelInstance { constructor( protected _version: V3, - payload: ChannelPayload, + payload: ChannelResource, serviceSid?: string, sid?: string ) { diff --git a/lib/rest/content/v1/content.ts b/lib/rest/content/v1/content.ts index b644630156..02d563f06f 100644 --- a/lib/rest/content/v1/content.ts +++ b/lib/rest/content/v1/content.ts @@ -173,7 +173,9 @@ export class ContentContextImpl implements ContentContext { } } -interface ContentPayload extends ContentResource, TwilioResponsePayload {} +interface ContentPayload extends TwilioResponsePayload { + contents: ContentResource[]; +} interface ContentResource { date_created?: Date | null; @@ -192,7 +194,7 @@ export class ContentInstance { protected _solution: ContentContextSolution; protected _context?: ContentContext; - constructor(protected _version: V1, payload: ContentPayload, sid?: string) { + constructor(protected _version: V1, payload: ContentResource, sid?: string) { this.dateCreated = deserialize.iso8601DateTime(payload.date_created); this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); this.sid = payload.sid; @@ -565,7 +567,7 @@ export class ContentPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ContentPayload): ContentInstance { + getInstance(payload: ContentResource): ContentInstance { return new ContentInstance(this._version, payload); } diff --git a/lib/rest/content/v1/content/approvalFetch.ts b/lib/rest/content/v1/content/approvalFetch.ts index b50ee12eb1..382d8a5529 100644 --- a/lib/rest/content/v1/content/approvalFetch.ts +++ b/lib/rest/content/v1/content/approvalFetch.ts @@ -102,7 +102,7 @@ export class ApprovalFetchInstance { constructor( protected _version: V1, - payload: ApprovalFetchPayload, + payload: ApprovalFetchResource, sid: string ) { this.sid = payload.sid; diff --git a/lib/rest/conversations/v1/addressConfiguration.ts b/lib/rest/conversations/v1/addressConfiguration.ts index 9e384ca8e2..4926fe0033 100644 --- a/lib/rest/conversations/v1/addressConfiguration.ts +++ b/lib/rest/conversations/v1/addressConfiguration.ts @@ -322,9 +322,9 @@ export class AddressConfigurationContextImpl } } -interface AddressConfigurationPayload - extends AddressConfigurationResource, - TwilioResponsePayload {} +interface AddressConfigurationPayload extends TwilioResponsePayload { + address_configurations: AddressConfigurationResource[]; +} interface AddressConfigurationResource { sid?: string | null; @@ -344,7 +344,7 @@ export class AddressConfigurationInstance { constructor( protected _version: V1, - payload: AddressConfigurationPayload, + payload: AddressConfigurationResource, sid?: string ) { this.sid = payload.sid; @@ -837,7 +837,7 @@ export class AddressConfigurationPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: AddressConfigurationPayload + payload: AddressConfigurationResource ): AddressConfigurationInstance { return new AddressConfigurationInstance(this._version, payload); } diff --git a/lib/rest/conversations/v1/configuration.ts b/lib/rest/conversations/v1/configuration.ts index 80e0e9510c..0c79dc14f9 100644 --- a/lib/rest/conversations/v1/configuration.ts +++ b/lib/rest/conversations/v1/configuration.ts @@ -178,7 +178,7 @@ export class ConfigurationInstance { protected _solution: ConfigurationContextSolution; protected _context?: ConfigurationContext; - constructor(protected _version: V1, payload: ConfigurationPayload) { + constructor(protected _version: V1, payload: ConfigurationResource) { this.accountSid = payload.account_sid; this.defaultChatServiceSid = payload.default_chat_service_sid; this.defaultMessagingServiceSid = payload.default_messaging_service_sid; diff --git a/lib/rest/conversations/v1/configuration/webhook.ts b/lib/rest/conversations/v1/configuration/webhook.ts index a6b6501b24..c7f751d14e 100644 --- a/lib/rest/conversations/v1/configuration/webhook.ts +++ b/lib/rest/conversations/v1/configuration/webhook.ts @@ -182,7 +182,7 @@ export class WebhookInstance { protected _solution: WebhookContextSolution; protected _context?: WebhookContext; - constructor(protected _version: V1, payload: WebhookPayload) { + constructor(protected _version: V1, payload: WebhookResource) { this.accountSid = payload.account_sid; this.method = payload.method; this.filters = payload.filters; diff --git a/lib/rest/conversations/v1/conversation.ts b/lib/rest/conversations/v1/conversation.ts index b94e325f33..0c75c8a556 100644 --- a/lib/rest/conversations/v1/conversation.ts +++ b/lib/rest/conversations/v1/conversation.ts @@ -362,9 +362,9 @@ export class ConversationContextImpl implements ConversationContext { } } -interface ConversationPayload - extends ConversationResource, - TwilioResponsePayload {} +interface ConversationPayload extends TwilioResponsePayload { + conversations: ConversationResource[]; +} interface ConversationResource { account_sid?: string | null; @@ -389,7 +389,7 @@ export class ConversationInstance { constructor( protected _version: V1, - payload: ConversationPayload, + payload: ConversationResource, sid?: string ) { this.accountSid = payload.account_sid; @@ -917,7 +917,7 @@ export class ConversationPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ConversationPayload): ConversationInstance { + getInstance(payload: ConversationResource): ConversationInstance { return new ConversationInstance(this._version, payload); } diff --git a/lib/rest/conversations/v1/conversation/message.ts b/lib/rest/conversations/v1/conversation/message.ts index 3ef61bceeb..966c429e09 100644 --- a/lib/rest/conversations/v1/conversation/message.ts +++ b/lib/rest/conversations/v1/conversation/message.ts @@ -346,7 +346,9 @@ export class MessageContextImpl implements MessageContext { } } -interface MessagePayload extends MessageResource, TwilioResponsePayload {} +interface MessagePayload extends TwilioResponsePayload { + messages: MessageResource[]; +} interface MessageResource { account_sid?: string | null; @@ -371,7 +373,7 @@ export class MessageInstance { constructor( protected _version: V1, - payload: MessagePayload, + payload: MessageResource, conversationSid: string, sid?: string ) { @@ -900,7 +902,7 @@ export class MessagePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: MessagePayload): MessageInstance { + getInstance(payload: MessageResource): MessageInstance { return new MessageInstance( this._version, payload, diff --git a/lib/rest/conversations/v1/conversation/message/deliveryReceipt.ts b/lib/rest/conversations/v1/conversation/message/deliveryReceipt.ts index 3309f74b06..d922c30b17 100644 --- a/lib/rest/conversations/v1/conversation/message/deliveryReceipt.ts +++ b/lib/rest/conversations/v1/conversation/message/deliveryReceipt.ts @@ -167,9 +167,9 @@ export class DeliveryReceiptContextImpl implements DeliveryReceiptContext { } } -interface DeliveryReceiptPayload - extends DeliveryReceiptResource, - TwilioResponsePayload {} +interface DeliveryReceiptPayload extends TwilioResponsePayload { + delivery_receipts: DeliveryReceiptResource[]; +} interface DeliveryReceiptResource { account_sid?: string | null; @@ -191,7 +191,7 @@ export class DeliveryReceiptInstance { constructor( protected _version: V1, - payload: DeliveryReceiptPayload, + payload: DeliveryReceiptResource, conversationSid: string, messageSid: string, sid?: string @@ -585,7 +585,7 @@ export class DeliveryReceiptPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: DeliveryReceiptPayload): DeliveryReceiptInstance { + getInstance(payload: DeliveryReceiptResource): DeliveryReceiptInstance { return new DeliveryReceiptInstance( this._version, payload, diff --git a/lib/rest/conversations/v1/conversation/participant.ts b/lib/rest/conversations/v1/conversation/participant.ts index 5ed2a9b728..79551acd1e 100644 --- a/lib/rest/conversations/v1/conversation/participant.ts +++ b/lib/rest/conversations/v1/conversation/participant.ts @@ -344,9 +344,9 @@ export class ParticipantContextImpl implements ParticipantContext { } } -interface ParticipantPayload - extends ParticipantResource, - TwilioResponsePayload {} +interface ParticipantPayload extends TwilioResponsePayload { + participants: ParticipantResource[]; +} interface ParticipantResource { account_sid?: string | null; @@ -369,7 +369,7 @@ export class ParticipantInstance { constructor( protected _version: V1, - payload: ParticipantPayload, + payload: ParticipantResource, conversationSid: string, sid?: string ) { @@ -888,7 +888,7 @@ export class ParticipantPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ParticipantPayload): ParticipantInstance { + getInstance(payload: ParticipantResource): ParticipantInstance { return new ParticipantInstance( this._version, payload, diff --git a/lib/rest/conversations/v1/conversation/webhook.ts b/lib/rest/conversations/v1/conversation/webhook.ts index 0f3c84d2e1..f84bfe20d2 100644 --- a/lib/rest/conversations/v1/conversation/webhook.ts +++ b/lib/rest/conversations/v1/conversation/webhook.ts @@ -291,7 +291,9 @@ export class WebhookContextImpl implements WebhookContext { } } -interface WebhookPayload extends WebhookResource, TwilioResponsePayload {} +interface WebhookPayload extends TwilioResponsePayload { + webhooks: WebhookResource[]; +} interface WebhookResource { sid?: string | null; @@ -310,7 +312,7 @@ export class WebhookInstance { constructor( protected _version: V1, - payload: WebhookPayload, + payload: WebhookResource, conversationSid: string, sid?: string ) { @@ -781,7 +783,7 @@ export class WebhookPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: WebhookPayload): WebhookInstance { + getInstance(payload: WebhookResource): WebhookInstance { return new WebhookInstance( this._version, payload, diff --git a/lib/rest/conversations/v1/credential.ts b/lib/rest/conversations/v1/credential.ts index 1a4c588d8c..ba57498f2d 100644 --- a/lib/rest/conversations/v1/credential.ts +++ b/lib/rest/conversations/v1/credential.ts @@ -273,7 +273,9 @@ export class CredentialContextImpl implements CredentialContext { } } -interface CredentialPayload extends CredentialResource, TwilioResponsePayload {} +interface CredentialPayload extends TwilioResponsePayload { + credentials: CredentialResource[]; +} interface CredentialResource { sid?: string | null; @@ -292,7 +294,7 @@ export class CredentialInstance { constructor( protected _version: V1, - payload: CredentialPayload, + payload: CredentialResource, sid?: string ) { this.sid = payload.sid; @@ -733,7 +735,7 @@ export class CredentialPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: CredentialPayload): CredentialInstance { + getInstance(payload: CredentialResource): CredentialInstance { return new CredentialInstance(this._version, payload); } diff --git a/lib/rest/conversations/v1/participantConversation.ts b/lib/rest/conversations/v1/participantConversation.ts index 5f8b090a46..012d75f854 100644 --- a/lib/rest/conversations/v1/participantConversation.ts +++ b/lib/rest/conversations/v1/participantConversation.ts @@ -331,9 +331,9 @@ export function ParticipantConversationListInstance( return instance; } -interface ParticipantConversationPayload - extends ParticipantConversationResource, - TwilioResponsePayload {} +interface ParticipantConversationPayload extends TwilioResponsePayload { + conversations: ParticipantConversationResource[]; +} interface ParticipantConversationResource { account_sid?: string | null; @@ -355,7 +355,10 @@ interface ParticipantConversationResource { } export class ParticipantConversationInstance { - constructor(protected _version: V1, payload: ParticipantConversationPayload) { + constructor( + protected _version: V1, + payload: ParticipantConversationResource + ) { this.accountSid = payload.account_sid; this.chatServiceSid = payload.chat_service_sid; this.participantSid = payload.participant_sid; @@ -498,7 +501,7 @@ export class ParticipantConversationPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: ParticipantConversationPayload + payload: ParticipantConversationResource ): ParticipantConversationInstance { return new ParticipantConversationInstance(this._version, payload); } diff --git a/lib/rest/conversations/v1/role.ts b/lib/rest/conversations/v1/role.ts index c3322fb7e5..68e32620b5 100644 --- a/lib/rest/conversations/v1/role.ts +++ b/lib/rest/conversations/v1/role.ts @@ -234,7 +234,9 @@ export class RoleContextImpl implements RoleContext { } } -interface RolePayload extends RoleResource, TwilioResponsePayload {} +interface RolePayload extends TwilioResponsePayload { + roles: RoleResource[]; +} interface RoleResource { sid?: string | null; @@ -252,7 +254,7 @@ export class RoleInstance { protected _solution: RoleContextSolution; protected _context?: RoleContext; - constructor(protected _version: V1, payload: RolePayload, sid?: string) { + constructor(protected _version: V1, payload: RoleResource, sid?: string) { this.sid = payload.sid; this.accountSid = payload.account_sid; this.chatServiceSid = payload.chat_service_sid; @@ -687,7 +689,7 @@ export class RolePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: RolePayload): RoleInstance { + getInstance(payload: RoleResource): RoleInstance { return new RoleInstance(this._version, payload); } diff --git a/lib/rest/conversations/v1/service.ts b/lib/rest/conversations/v1/service.ts index 5f1411efca..2a5b290f9f 100644 --- a/lib/rest/conversations/v1/service.ts +++ b/lib/rest/conversations/v1/service.ts @@ -228,7 +228,9 @@ export class ServiceContextImpl implements ServiceContext { } } -interface ServicePayload extends ServiceResource, TwilioResponsePayload {} +interface ServicePayload extends TwilioResponsePayload { + services: ServiceResource[]; +} interface ServiceResource { account_sid?: string | null; @@ -244,7 +246,7 @@ export class ServiceInstance { protected _solution: ServiceContextSolution; protected _context?: ServiceContext; - constructor(protected _version: V1, payload: ServicePayload, sid?: string) { + constructor(protected _version: V1, payload: ServiceResource, sid?: string) { this.accountSid = payload.account_sid; this.sid = payload.sid; this.friendlyName = payload.friendly_name; @@ -689,7 +691,7 @@ export class ServicePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ServicePayload): ServiceInstance { + getInstance(payload: ServiceResource): ServiceInstance { return new ServiceInstance(this._version, payload); } diff --git a/lib/rest/conversations/v1/service/binding.ts b/lib/rest/conversations/v1/service/binding.ts index 0aa7398c8b..764b958a9e 100644 --- a/lib/rest/conversations/v1/service/binding.ts +++ b/lib/rest/conversations/v1/service/binding.ts @@ -185,7 +185,9 @@ export class BindingContextImpl implements BindingContext { } } -interface BindingPayload extends BindingResource, TwilioResponsePayload {} +interface BindingPayload extends TwilioResponsePayload { + bindings: BindingResource[]; +} interface BindingResource { sid?: string | null; @@ -207,7 +209,7 @@ export class BindingInstance { constructor( protected _version: V1, - payload: BindingPayload, + payload: BindingResource, chatServiceSid: string, sid?: string ) { @@ -596,7 +598,7 @@ export class BindingPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: BindingPayload): BindingInstance { + getInstance(payload: BindingResource): BindingInstance { return new BindingInstance( this._version, payload, diff --git a/lib/rest/conversations/v1/service/configuration.ts b/lib/rest/conversations/v1/service/configuration.ts index 2831d4f12b..316080edcc 100644 --- a/lib/rest/conversations/v1/service/configuration.ts +++ b/lib/rest/conversations/v1/service/configuration.ts @@ -200,7 +200,7 @@ export class ConfigurationInstance { constructor( protected _version: V1, - payload: ConfigurationPayload, + payload: ConfigurationResource, chatServiceSid: string ) { this.chatServiceSid = payload.chat_service_sid; diff --git a/lib/rest/conversations/v1/service/configuration/notification.ts b/lib/rest/conversations/v1/service/configuration/notification.ts index b15f0194ae..4450faafb1 100644 --- a/lib/rest/conversations/v1/service/configuration/notification.ts +++ b/lib/rest/conversations/v1/service/configuration/notification.ts @@ -242,7 +242,7 @@ export class NotificationInstance { constructor( protected _version: V1, - payload: NotificationPayload, + payload: NotificationResource, chatServiceSid: string ) { this.accountSid = payload.account_sid; diff --git a/lib/rest/conversations/v1/service/configuration/webhook.ts b/lib/rest/conversations/v1/service/configuration/webhook.ts index dbc5421101..e090d8920d 100644 --- a/lib/rest/conversations/v1/service/configuration/webhook.ts +++ b/lib/rest/conversations/v1/service/configuration/webhook.ts @@ -195,7 +195,7 @@ export class WebhookInstance { constructor( protected _version: V1, - payload: WebhookPayload, + payload: WebhookResource, chatServiceSid: string ) { this.accountSid = payload.account_sid; diff --git a/lib/rest/conversations/v1/service/conversation.ts b/lib/rest/conversations/v1/service/conversation.ts index d56fde3fb5..22d5139311 100644 --- a/lib/rest/conversations/v1/service/conversation.ts +++ b/lib/rest/conversations/v1/service/conversation.ts @@ -391,9 +391,9 @@ export class ConversationContextImpl implements ConversationContext { } } -interface ConversationPayload - extends ConversationResource, - TwilioResponsePayload {} +interface ConversationPayload extends TwilioResponsePayload { + conversations: ConversationResource[]; +} interface ConversationResource { account_sid?: string | null; @@ -418,7 +418,7 @@ export class ConversationInstance { constructor( protected _version: V1, - payload: ConversationPayload, + payload: ConversationResource, chatServiceSid: string, sid?: string ) { @@ -963,7 +963,7 @@ export class ConversationPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ConversationPayload): ConversationInstance { + getInstance(payload: ConversationResource): ConversationInstance { return new ConversationInstance( this._version, payload, diff --git a/lib/rest/conversations/v1/service/conversation/message.ts b/lib/rest/conversations/v1/service/conversation/message.ts index d147ad56d5..e7fc91e13c 100644 --- a/lib/rest/conversations/v1/service/conversation/message.ts +++ b/lib/rest/conversations/v1/service/conversation/message.ts @@ -359,7 +359,9 @@ export class MessageContextImpl implements MessageContext { } } -interface MessagePayload extends MessageResource, TwilioResponsePayload {} +interface MessagePayload extends TwilioResponsePayload { + messages: MessageResource[]; +} interface MessageResource { account_sid?: string | null; @@ -385,7 +387,7 @@ export class MessageInstance { constructor( protected _version: V1, - payload: MessagePayload, + payload: MessageResource, chatServiceSid: string, conversationSid: string, sid?: string @@ -934,7 +936,7 @@ export class MessagePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: MessagePayload): MessageInstance { + getInstance(payload: MessageResource): MessageInstance { return new MessageInstance( this._version, payload, diff --git a/lib/rest/conversations/v1/service/conversation/message/deliveryReceipt.ts b/lib/rest/conversations/v1/service/conversation/message/deliveryReceipt.ts index 8c5488009f..efda341839 100644 --- a/lib/rest/conversations/v1/service/conversation/message/deliveryReceipt.ts +++ b/lib/rest/conversations/v1/service/conversation/message/deliveryReceipt.ts @@ -174,9 +174,9 @@ export class DeliveryReceiptContextImpl implements DeliveryReceiptContext { } } -interface DeliveryReceiptPayload - extends DeliveryReceiptResource, - TwilioResponsePayload {} +interface DeliveryReceiptPayload extends TwilioResponsePayload { + delivery_receipts: DeliveryReceiptResource[]; +} interface DeliveryReceiptResource { account_sid?: string | null; @@ -199,7 +199,7 @@ export class DeliveryReceiptInstance { constructor( protected _version: V1, - payload: DeliveryReceiptPayload, + payload: DeliveryReceiptResource, chatServiceSid: string, conversationSid: string, messageSid: string, @@ -613,7 +613,7 @@ export class DeliveryReceiptPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: DeliveryReceiptPayload): DeliveryReceiptInstance { + getInstance(payload: DeliveryReceiptResource): DeliveryReceiptInstance { return new DeliveryReceiptInstance( this._version, payload, diff --git a/lib/rest/conversations/v1/service/conversation/participant.ts b/lib/rest/conversations/v1/service/conversation/participant.ts index c31cb3b1b8..eb38d95999 100644 --- a/lib/rest/conversations/v1/service/conversation/participant.ts +++ b/lib/rest/conversations/v1/service/conversation/participant.ts @@ -356,9 +356,9 @@ export class ParticipantContextImpl implements ParticipantContext { } } -interface ParticipantPayload - extends ParticipantResource, - TwilioResponsePayload {} +interface ParticipantPayload extends TwilioResponsePayload { + participants: ParticipantResource[]; +} interface ParticipantResource { account_sid?: string | null; @@ -382,7 +382,7 @@ export class ParticipantInstance { constructor( protected _version: V1, - payload: ParticipantPayload, + payload: ParticipantResource, chatServiceSid: string, conversationSid: string, sid?: string @@ -921,7 +921,7 @@ export class ParticipantPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ParticipantPayload): ParticipantInstance { + getInstance(payload: ParticipantResource): ParticipantInstance { return new ParticipantInstance( this._version, payload, diff --git a/lib/rest/conversations/v1/service/conversation/webhook.ts b/lib/rest/conversations/v1/service/conversation/webhook.ts index f5decdc918..ea581fbd0c 100644 --- a/lib/rest/conversations/v1/service/conversation/webhook.ts +++ b/lib/rest/conversations/v1/service/conversation/webhook.ts @@ -303,7 +303,9 @@ export class WebhookContextImpl implements WebhookContext { } } -interface WebhookPayload extends WebhookResource, TwilioResponsePayload {} +interface WebhookPayload extends TwilioResponsePayload { + webhooks: WebhookResource[]; +} interface WebhookResource { sid?: string | null; @@ -323,7 +325,7 @@ export class WebhookInstance { constructor( protected _version: V1, - payload: WebhookPayload, + payload: WebhookResource, chatServiceSid: string, conversationSid: string, sid?: string @@ -814,7 +816,7 @@ export class WebhookPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: WebhookPayload): WebhookInstance { + getInstance(payload: WebhookResource): WebhookInstance { return new WebhookInstance( this._version, payload, diff --git a/lib/rest/conversations/v1/service/participantConversation.ts b/lib/rest/conversations/v1/service/participantConversation.ts index bcc2833284..b13c41a9bc 100644 --- a/lib/rest/conversations/v1/service/participantConversation.ts +++ b/lib/rest/conversations/v1/service/participantConversation.ts @@ -338,9 +338,9 @@ export function ParticipantConversationListInstance( return instance; } -interface ParticipantConversationPayload - extends ParticipantConversationResource, - TwilioResponsePayload {} +interface ParticipantConversationPayload extends TwilioResponsePayload { + conversations: ParticipantConversationResource[]; +} interface ParticipantConversationResource { account_sid?: string | null; @@ -364,7 +364,7 @@ interface ParticipantConversationResource { export class ParticipantConversationInstance { constructor( protected _version: V1, - payload: ParticipantConversationPayload, + payload: ParticipantConversationResource, chatServiceSid: string ) { this.accountSid = payload.account_sid; @@ -509,7 +509,7 @@ export class ParticipantConversationPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: ParticipantConversationPayload + payload: ParticipantConversationResource ): ParticipantConversationInstance { return new ParticipantConversationInstance( this._version, diff --git a/lib/rest/conversations/v1/service/role.ts b/lib/rest/conversations/v1/service/role.ts index d91c4e9928..942cf0bffd 100644 --- a/lib/rest/conversations/v1/service/role.ts +++ b/lib/rest/conversations/v1/service/role.ts @@ -249,7 +249,9 @@ export class RoleContextImpl implements RoleContext { } } -interface RolePayload extends RoleResource, TwilioResponsePayload {} +interface RolePayload extends TwilioResponsePayload { + roles: RoleResource[]; +} interface RoleResource { sid?: string | null; @@ -269,7 +271,7 @@ export class RoleInstance { constructor( protected _version: V1, - payload: RolePayload, + payload: RoleResource, chatServiceSid: string, sid?: string ) { @@ -726,7 +728,7 @@ export class RolePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: RolePayload): RoleInstance { + getInstance(payload: RoleResource): RoleInstance { return new RoleInstance( this._version, payload, diff --git a/lib/rest/conversations/v1/service/user.ts b/lib/rest/conversations/v1/service/user.ts index 4c02e3546a..6b47c12d16 100644 --- a/lib/rest/conversations/v1/service/user.ts +++ b/lib/rest/conversations/v1/service/user.ts @@ -327,7 +327,9 @@ export class UserContextImpl implements UserContext { } } -interface UserPayload extends UserResource, TwilioResponsePayload {} +interface UserPayload extends TwilioResponsePayload { + users: UserResource[]; +} interface UserResource { sid?: string | null; @@ -351,7 +353,7 @@ export class UserInstance { constructor( protected _version: V1, - payload: UserPayload, + payload: UserResource, chatServiceSid: string, sid?: string ) { @@ -854,7 +856,7 @@ export class UserPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: UserPayload): UserInstance { + getInstance(payload: UserResource): UserInstance { return new UserInstance( this._version, payload, diff --git a/lib/rest/conversations/v1/service/user/userConversation.ts b/lib/rest/conversations/v1/service/user/userConversation.ts index 0a8bd7387d..33a3042d5d 100644 --- a/lib/rest/conversations/v1/service/user/userConversation.ts +++ b/lib/rest/conversations/v1/service/user/userConversation.ts @@ -273,9 +273,9 @@ export class UserConversationContextImpl implements UserConversationContext { } } -interface UserConversationPayload - extends UserConversationResource, - TwilioResponsePayload {} +interface UserConversationPayload extends TwilioResponsePayload { + conversations: UserConversationResource[]; +} interface UserConversationResource { account_sid?: string | null; @@ -304,7 +304,7 @@ export class UserConversationInstance { constructor( protected _version: V1, - payload: UserConversationPayload, + payload: UserConversationResource, chatServiceSid: string, userSid: string, conversationSid?: string @@ -782,7 +782,7 @@ export class UserConversationPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: UserConversationPayload): UserConversationInstance { + getInstance(payload: UserConversationResource): UserConversationInstance { return new UserConversationInstance( this._version, payload, diff --git a/lib/rest/conversations/v1/user.ts b/lib/rest/conversations/v1/user.ts index a5acc690b2..2a0cbee281 100644 --- a/lib/rest/conversations/v1/user.ts +++ b/lib/rest/conversations/v1/user.ts @@ -308,7 +308,9 @@ export class UserContextImpl implements UserContext { } } -interface UserPayload extends UserResource, TwilioResponsePayload {} +interface UserPayload extends TwilioResponsePayload { + users: UserResource[]; +} interface UserResource { sid?: string | null; @@ -330,7 +332,7 @@ export class UserInstance { protected _solution: UserContextSolution; protected _context?: UserContext; - constructor(protected _version: V1, payload: UserPayload, sid?: string) { + constructor(protected _version: V1, payload: UserResource, sid?: string) { this.sid = payload.sid; this.accountSid = payload.account_sid; this.chatServiceSid = payload.chat_service_sid; @@ -811,7 +813,7 @@ export class UserPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: UserPayload): UserInstance { + getInstance(payload: UserResource): UserInstance { return new UserInstance(this._version, payload); } diff --git a/lib/rest/conversations/v1/user/userConversation.ts b/lib/rest/conversations/v1/user/userConversation.ts index b1135ae062..978fed3675 100644 --- a/lib/rest/conversations/v1/user/userConversation.ts +++ b/lib/rest/conversations/v1/user/userConversation.ts @@ -265,9 +265,9 @@ export class UserConversationContextImpl implements UserConversationContext { } } -interface UserConversationPayload - extends UserConversationResource, - TwilioResponsePayload {} +interface UserConversationPayload extends TwilioResponsePayload { + conversations: UserConversationResource[]; +} interface UserConversationResource { account_sid?: string | null; @@ -296,7 +296,7 @@ export class UserConversationInstance { constructor( protected _version: V1, - payload: UserConversationPayload, + payload: UserConversationResource, userSid: string, conversationSid?: string ) { @@ -760,7 +760,7 @@ export class UserConversationPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: UserConversationPayload): UserConversationInstance { + getInstance(payload: UserConversationResource): UserConversationInstance { return new UserConversationInstance( this._version, payload, diff --git a/lib/rest/events/v1/eventType.ts b/lib/rest/events/v1/eventType.ts index 2eb6f17fea..409fd3e629 100644 --- a/lib/rest/events/v1/eventType.ts +++ b/lib/rest/events/v1/eventType.ts @@ -142,7 +142,9 @@ export class EventTypeContextImpl implements EventTypeContext { } } -interface EventTypePayload extends EventTypeResource, TwilioResponsePayload {} +interface EventTypePayload extends TwilioResponsePayload { + types: EventTypeResource[]; +} interface EventTypeResource { type?: string | null; @@ -160,7 +162,7 @@ export class EventTypeInstance { constructor( protected _version: V1, - payload: EventTypePayload, + payload: EventTypeResource, type?: string ) { this.type = payload.type; @@ -495,7 +497,7 @@ export class EventTypePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: EventTypePayload): EventTypeInstance { + getInstance(payload: EventTypeResource): EventTypeInstance { return new EventTypeInstance(this._version, payload); } diff --git a/lib/rest/events/v1/schema.ts b/lib/rest/events/v1/schema.ts index 27b999a9b3..7ddabfd29b 100644 --- a/lib/rest/events/v1/schema.ts +++ b/lib/rest/events/v1/schema.ts @@ -113,7 +113,7 @@ export class SchemaInstance { protected _solution: SchemaContextSolution; protected _context?: SchemaContext; - constructor(protected _version: V1, payload: SchemaPayload, id?: string) { + constructor(protected _version: V1, payload: SchemaResource, id?: string) { this.id = payload.id; this.url = payload.url; this.links = payload.links; diff --git a/lib/rest/events/v1/schema/schemaVersion.ts b/lib/rest/events/v1/schema/schemaVersion.ts index c82b4a616d..2b36ec8670 100644 --- a/lib/rest/events/v1/schema/schemaVersion.ts +++ b/lib/rest/events/v1/schema/schemaVersion.ts @@ -146,9 +146,9 @@ export class SchemaVersionContextImpl implements SchemaVersionContext { } } -interface SchemaVersionPayload - extends SchemaVersionResource, - TwilioResponsePayload {} +interface SchemaVersionPayload extends TwilioResponsePayload { + schema_versions: SchemaVersionResource[]; +} interface SchemaVersionResource { id?: string | null; @@ -164,7 +164,7 @@ export class SchemaVersionInstance { constructor( protected _version: V1, - payload: SchemaVersionPayload, + payload: SchemaVersionResource, id: string, schemaVersion?: number ) { @@ -508,7 +508,7 @@ export class SchemaVersionPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SchemaVersionPayload): SchemaVersionInstance { + getInstance(payload: SchemaVersionResource): SchemaVersionInstance { return new SchemaVersionInstance(this._version, payload, this._solution.id); } diff --git a/lib/rest/events/v1/sink.ts b/lib/rest/events/v1/sink.ts index 8e96cfd0e0..b524bb8e84 100644 --- a/lib/rest/events/v1/sink.ts +++ b/lib/rest/events/v1/sink.ts @@ -269,7 +269,9 @@ export class SinkContextImpl implements SinkContext { } } -interface SinkPayload extends SinkResource, TwilioResponsePayload {} +interface SinkPayload extends TwilioResponsePayload { + sinks: SinkResource[]; +} interface SinkResource { date_created?: Date | null; @@ -287,7 +289,7 @@ export class SinkInstance { protected _solution: SinkContextSolution; protected _context?: SinkContext; - constructor(protected _version: V1, payload: SinkPayload, sid?: string) { + constructor(protected _version: V1, payload: SinkResource, sid?: string) { this.dateCreated = deserialize.iso8601DateTime(payload.date_created); this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); this.description = payload.description; @@ -738,7 +740,7 @@ export class SinkPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SinkPayload): SinkInstance { + getInstance(payload: SinkResource): SinkInstance { return new SinkInstance(this._version, payload); } diff --git a/lib/rest/events/v1/sink/sinkTest.ts b/lib/rest/events/v1/sink/sinkTest.ts index 4702d0fb97..283bad40b8 100644 --- a/lib/rest/events/v1/sink/sinkTest.ts +++ b/lib/rest/events/v1/sink/sinkTest.ts @@ -102,7 +102,7 @@ interface SinkTestResource { } export class SinkTestInstance { - constructor(protected _version: V1, payload: SinkTestPayload, sid: string) { + constructor(protected _version: V1, payload: SinkTestResource, sid: string) { this.result = payload.result; } diff --git a/lib/rest/events/v1/sink/sinkValidate.ts b/lib/rest/events/v1/sink/sinkValidate.ts index 1f604e9545..411cb2aef6 100644 --- a/lib/rest/events/v1/sink/sinkValidate.ts +++ b/lib/rest/events/v1/sink/sinkValidate.ts @@ -136,7 +136,7 @@ interface SinkValidateResource { export class SinkValidateInstance { constructor( protected _version: V1, - payload: SinkValidatePayload, + payload: SinkValidateResource, sid: string ) { this.result = payload.result; diff --git a/lib/rest/events/v1/subscription.ts b/lib/rest/events/v1/subscription.ts index 163eab48db..c1c9e9c6e4 100644 --- a/lib/rest/events/v1/subscription.ts +++ b/lib/rest/events/v1/subscription.ts @@ -263,9 +263,9 @@ export class SubscriptionContextImpl implements SubscriptionContext { } } -interface SubscriptionPayload - extends SubscriptionResource, - TwilioResponsePayload {} +interface SubscriptionPayload extends TwilioResponsePayload { + subscriptions: SubscriptionResource[]; +} interface SubscriptionResource { account_sid?: string | null; @@ -284,7 +284,7 @@ export class SubscriptionInstance { constructor( protected _version: V1, - payload: SubscriptionPayload, + payload: SubscriptionResource, sid?: string ) { this.accountSid = payload.account_sid; @@ -741,7 +741,7 @@ export class SubscriptionPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SubscriptionPayload): SubscriptionInstance { + getInstance(payload: SubscriptionResource): SubscriptionInstance { return new SubscriptionInstance(this._version, payload); } diff --git a/lib/rest/events/v1/subscription/subscribedEvent.ts b/lib/rest/events/v1/subscription/subscribedEvent.ts index 962d28b3a3..5db8160010 100644 --- a/lib/rest/events/v1/subscription/subscribedEvent.ts +++ b/lib/rest/events/v1/subscription/subscribedEvent.ts @@ -258,9 +258,9 @@ export class SubscribedEventContextImpl implements SubscribedEventContext { } } -interface SubscribedEventPayload - extends SubscribedEventResource, - TwilioResponsePayload {} +interface SubscribedEventPayload extends TwilioResponsePayload { + types: SubscribedEventResource[]; +} interface SubscribedEventResource { account_sid?: string | null; @@ -276,7 +276,7 @@ export class SubscribedEventInstance { constructor( protected _version: V1, - payload: SubscribedEventPayload, + payload: SubscribedEventResource, subscriptionSid: string, type?: string ) { @@ -722,7 +722,7 @@ export class SubscribedEventPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SubscribedEventPayload): SubscribedEventInstance { + getInstance(payload: SubscribedEventResource): SubscribedEventInstance { return new SubscribedEventInstance( this._version, payload, diff --git a/lib/rest/flexApi/v1/assessments.ts b/lib/rest/flexApi/v1/assessments.ts index 273ab290f1..55175a8357 100644 --- a/lib/rest/flexApi/v1/assessments.ts +++ b/lib/rest/flexApi/v1/assessments.ts @@ -90,7 +90,7 @@ export class AssessmentsInstance { protected _solution: AssessmentsContextSolution; protected _context?: AssessmentsContext; - constructor(protected _version: V1, payload: AssessmentsPayload) { + constructor(protected _version: V1, payload: AssessmentsResource) { this.url = payload.url; this._solution = {}; diff --git a/lib/rest/flexApi/v1/channel.ts b/lib/rest/flexApi/v1/channel.ts index e27e68bf74..fa8747a31b 100644 --- a/lib/rest/flexApi/v1/channel.ts +++ b/lib/rest/flexApi/v1/channel.ts @@ -187,7 +187,9 @@ export class ChannelContextImpl implements ChannelContext { } } -interface ChannelPayload extends ChannelResource, TwilioResponsePayload {} +interface ChannelPayload extends TwilioResponsePayload { + flex_chat_channels: ChannelResource[]; +} interface ChannelResource { account_sid?: string | null; @@ -204,7 +206,7 @@ export class ChannelInstance { protected _solution: ChannelContextSolution; protected _context?: ChannelContext; - constructor(protected _version: V1, payload: ChannelPayload, sid?: string) { + constructor(protected _version: V1, payload: ChannelResource, sid?: string) { this.accountSid = payload.account_sid; this.flexFlowSid = payload.flex_flow_sid; this.sid = payload.sid; @@ -648,7 +650,7 @@ export class ChannelPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ChannelPayload): ChannelInstance { + getInstance(payload: ChannelResource): ChannelInstance { return new ChannelInstance(this._version, payload); } diff --git a/lib/rest/flexApi/v1/configuration.ts b/lib/rest/flexApi/v1/configuration.ts index c751062b49..495abeb398 100644 --- a/lib/rest/flexApi/v1/configuration.ts +++ b/lib/rest/flexApi/v1/configuration.ts @@ -174,7 +174,7 @@ export class ConfigurationInstance { protected _solution: ConfigurationContextSolution; protected _context?: ConfigurationContext; - constructor(protected _version: V1, payload: ConfigurationPayload) { + constructor(protected _version: V1, payload: ConfigurationResource) { this.accountSid = payload.account_sid; this.dateCreated = deserialize.iso8601DateTime(payload.date_created); this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); diff --git a/lib/rest/flexApi/v1/flexFlow.ts b/lib/rest/flexApi/v1/flexFlow.ts index 1103c6b168..7f2ae4338e 100644 --- a/lib/rest/flexApi/v1/flexFlow.ts +++ b/lib/rest/flexApi/v1/flexFlow.ts @@ -352,7 +352,9 @@ export class FlexFlowContextImpl implements FlexFlowContext { } } -interface FlexFlowPayload extends FlexFlowResource, TwilioResponsePayload {} +interface FlexFlowPayload extends TwilioResponsePayload { + flex_flows: FlexFlowResource[]; +} interface FlexFlowResource { account_sid?: string | null; @@ -375,7 +377,7 @@ export class FlexFlowInstance { protected _solution: FlexFlowContextSolution; protected _context?: FlexFlowContext; - constructor(protected _version: V1, payload: FlexFlowPayload, sid?: string) { + constructor(protected _version: V1, payload: FlexFlowResource, sid?: string) { this.accountSid = payload.account_sid; this.dateCreated = deserialize.iso8601DateTime(payload.date_created); this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); @@ -889,7 +891,7 @@ export class FlexFlowPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: FlexFlowPayload): FlexFlowInstance { + getInstance(payload: FlexFlowResource): FlexFlowInstance { return new FlexFlowInstance(this._version, payload); } diff --git a/lib/rest/flexApi/v1/goodData.ts b/lib/rest/flexApi/v1/goodData.ts index 53d1f49870..8027c0d0da 100644 --- a/lib/rest/flexApi/v1/goodData.ts +++ b/lib/rest/flexApi/v1/goodData.ts @@ -130,7 +130,7 @@ export class GoodDataInstance { protected _solution: GoodDataContextSolution; protected _context?: GoodDataContext; - constructor(protected _version: V1, payload: GoodDataPayload) { + constructor(protected _version: V1, payload: GoodDataResource) { this.workspaceId = payload.workspace_id; this.sessionExpiry = payload.session_expiry; this.sessionId = payload.session_id; diff --git a/lib/rest/flexApi/v1/interaction.ts b/lib/rest/flexApi/v1/interaction.ts index 68d8afbc03..7671e52691 100644 --- a/lib/rest/flexApi/v1/interaction.ts +++ b/lib/rest/flexApi/v1/interaction.ts @@ -126,7 +126,7 @@ export class InteractionInstance { constructor( protected _version: V1, - payload: InteractionPayload, + payload: InteractionResource, sid?: string ) { this.sid = payload.sid; diff --git a/lib/rest/flexApi/v1/interaction/interactionChannel.ts b/lib/rest/flexApi/v1/interaction/interactionChannel.ts index dceae813aa..45a62e4c85 100644 --- a/lib/rest/flexApi/v1/interaction/interactionChannel.ts +++ b/lib/rest/flexApi/v1/interaction/interactionChannel.ts @@ -262,9 +262,9 @@ export class InteractionChannelContextImpl } } -interface InteractionChannelPayload - extends InteractionChannelResource, - TwilioResponsePayload {} +interface InteractionChannelPayload extends TwilioResponsePayload { + channels: InteractionChannelResource[]; +} interface InteractionChannelResource { sid?: string | null; @@ -283,7 +283,7 @@ export class InteractionChannelInstance { constructor( protected _version: V1, - payload: InteractionChannelPayload, + payload: InteractionChannelResource, interactionSid: string, sid?: string ) { @@ -670,7 +670,7 @@ export class InteractionChannelPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: InteractionChannelPayload): InteractionChannelInstance { + getInstance(payload: InteractionChannelResource): InteractionChannelInstance { return new InteractionChannelInstance( this._version, payload, diff --git a/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.ts b/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.ts index 1b2f54e1c6..09ee8734f5 100644 --- a/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.ts +++ b/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.ts @@ -400,9 +400,9 @@ export function InteractionChannelInviteListInstance( return instance; } -interface InteractionChannelInvitePayload - extends InteractionChannelInviteResource, - TwilioResponsePayload {} +interface InteractionChannelInvitePayload extends TwilioResponsePayload { + invites: InteractionChannelInviteResource[]; +} interface InteractionChannelInviteResource { sid?: string | null; @@ -415,7 +415,7 @@ interface InteractionChannelInviteResource { export class InteractionChannelInviteInstance { constructor( protected _version: V1, - payload: InteractionChannelInvitePayload, + payload: InteractionChannelInviteResource, interactionSid: string, channelSid: string ) { @@ -491,7 +491,7 @@ export class InteractionChannelInvitePage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: InteractionChannelInvitePayload + payload: InteractionChannelInviteResource ): InteractionChannelInviteInstance { return new InteractionChannelInviteInstance( this._version, diff --git a/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.ts b/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.ts index 627ef600b4..490703a4e4 100644 --- a/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.ts +++ b/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.ts @@ -219,9 +219,9 @@ export class InteractionChannelParticipantContextImpl } } -interface InteractionChannelParticipantPayload - extends InteractionChannelParticipantResource, - TwilioResponsePayload {} +interface InteractionChannelParticipantPayload extends TwilioResponsePayload { + participants: InteractionChannelParticipantResource[]; +} interface InteractionChannelParticipantResource { sid?: string | null; @@ -237,7 +237,7 @@ export class InteractionChannelParticipantInstance { constructor( protected _version: V1, - payload: InteractionChannelParticipantPayload, + payload: InteractionChannelParticipantResource, interactionSid: string, channelSid: string, sid?: string @@ -715,7 +715,7 @@ export class InteractionChannelParticipantPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: InteractionChannelParticipantPayload + payload: InteractionChannelParticipantResource ): InteractionChannelParticipantInstance { return new InteractionChannelParticipantInstance( this._version, diff --git a/lib/rest/flexApi/v1/userRoles.ts b/lib/rest/flexApi/v1/userRoles.ts index d8973a18b4..9f600a2c58 100644 --- a/lib/rest/flexApi/v1/userRoles.ts +++ b/lib/rest/flexApi/v1/userRoles.ts @@ -127,7 +127,7 @@ export class UserRolesInstance { protected _solution: UserRolesContextSolution; protected _context?: UserRolesContext; - constructor(protected _version: V1, payload: UserRolesPayload) { + constructor(protected _version: V1, payload: UserRolesResource) { this.roles = payload.roles; this.url = payload.url; diff --git a/lib/rest/flexApi/v1/webChannel.ts b/lib/rest/flexApi/v1/webChannel.ts index 2d4867d177..0b5ecb7280 100644 --- a/lib/rest/flexApi/v1/webChannel.ts +++ b/lib/rest/flexApi/v1/webChannel.ts @@ -254,7 +254,9 @@ export class WebChannelContextImpl implements WebChannelContext { } } -interface WebChannelPayload extends WebChannelResource, TwilioResponsePayload {} +interface WebChannelPayload extends TwilioResponsePayload { + flex_chat_channels: WebChannelResource[]; +} interface WebChannelResource { account_sid?: string | null; @@ -271,7 +273,7 @@ export class WebChannelInstance { constructor( protected _version: V1, - payload: WebChannelPayload, + payload: WebChannelResource, sid?: string ) { this.accountSid = payload.account_sid; @@ -725,7 +727,7 @@ export class WebChannelPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: WebChannelPayload): WebChannelInstance { + getInstance(payload: WebChannelResource): WebChannelInstance { return new WebChannelInstance(this._version, payload); } diff --git a/lib/rest/flexApi/v2/webChannels.ts b/lib/rest/flexApi/v2/webChannels.ts index 2d3038b5b3..086d89ff00 100644 --- a/lib/rest/flexApi/v2/webChannels.ts +++ b/lib/rest/flexApi/v2/webChannels.ts @@ -137,7 +137,7 @@ interface WebChannelsResource { } export class WebChannelsInstance { - constructor(protected _version: V2, payload: WebChannelsPayload) { + constructor(protected _version: V2, payload: WebChannelsResource) { this.conversationSid = payload.conversation_sid; this.identity = payload.identity; } diff --git a/lib/rest/frontlineApi/v1/user.ts b/lib/rest/frontlineApi/v1/user.ts index a2e1be51bb..9771a5c35f 100644 --- a/lib/rest/frontlineApi/v1/user.ts +++ b/lib/rest/frontlineApi/v1/user.ts @@ -184,7 +184,7 @@ export class UserInstance { protected _solution: UserContextSolution; protected _context?: UserContext; - constructor(protected _version: V1, payload: UserPayload, sid?: string) { + constructor(protected _version: V1, payload: UserResource, sid?: string) { this.sid = payload.sid; this.identity = payload.identity; this.friendlyName = payload.friendly_name; diff --git a/lib/rest/insights/v1/call.ts b/lib/rest/insights/v1/call.ts index cd91bb0f72..a7be905ca3 100644 --- a/lib/rest/insights/v1/call.ts +++ b/lib/rest/insights/v1/call.ts @@ -139,7 +139,7 @@ export class CallInstance { protected _solution: CallContextSolution; protected _context?: CallContext; - constructor(protected _version: V1, payload: CallPayload, sid?: string) { + constructor(protected _version: V1, payload: CallResource, sid?: string) { this.sid = payload.sid; this.url = payload.url; this.links = payload.links; diff --git a/lib/rest/insights/v1/call/annotation.ts b/lib/rest/insights/v1/call/annotation.ts index 54eae8d9d0..10952b08ee 100644 --- a/lib/rest/insights/v1/call/annotation.ts +++ b/lib/rest/insights/v1/call/annotation.ts @@ -217,7 +217,7 @@ export class AnnotationInstance { constructor( protected _version: V1, - payload: AnnotationPayload, + payload: AnnotationResource, callSid: string ) { this.callSid = payload.call_sid; diff --git a/lib/rest/insights/v1/call/callSummary.ts b/lib/rest/insights/v1/call/callSummary.ts index 7b354133c6..bb3e61304d 100644 --- a/lib/rest/insights/v1/call/callSummary.ts +++ b/lib/rest/insights/v1/call/callSummary.ts @@ -186,7 +186,7 @@ export class CallSummaryInstance { constructor( protected _version: V1, - payload: CallSummaryPayload, + payload: CallSummaryResource, callSid: string ) { this.accountSid = payload.account_sid; diff --git a/lib/rest/insights/v1/call/event.ts b/lib/rest/insights/v1/call/event.ts index 7d21849694..34d38f71a2 100644 --- a/lib/rest/insights/v1/call/event.ts +++ b/lib/rest/insights/v1/call/event.ts @@ -311,7 +311,9 @@ export function EventListInstance( return instance; } -interface EventPayload extends EventResource, TwilioResponsePayload {} +interface EventPayload extends TwilioResponsePayload { + events: EventResource[]; +} interface EventResource { timestamp?: string | null; @@ -328,7 +330,7 @@ interface EventResource { } export class EventInstance { - constructor(protected _version: V1, payload: EventPayload, callSid: string) { + constructor(protected _version: V1, payload: EventResource, callSid: string) { this.timestamp = payload.timestamp; this.callSid = payload.call_sid; this.accountSid = payload.account_sid; @@ -406,7 +408,7 @@ export class EventPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: EventPayload): EventInstance { + getInstance(payload: EventResource): EventInstance { return new EventInstance(this._version, payload, this._solution.callSid); } diff --git a/lib/rest/insights/v1/call/metric.ts b/lib/rest/insights/v1/call/metric.ts index 53bb58f87c..4e47887256 100644 --- a/lib/rest/insights/v1/call/metric.ts +++ b/lib/rest/insights/v1/call/metric.ts @@ -319,7 +319,9 @@ export function MetricListInstance( return instance; } -interface MetricPayload extends MetricResource, TwilioResponsePayload {} +interface MetricPayload extends TwilioResponsePayload { + metrics: MetricResource[]; +} interface MetricResource { timestamp?: string | null; @@ -334,7 +336,11 @@ interface MetricResource { } export class MetricInstance { - constructor(protected _version: V1, payload: MetricPayload, callSid: string) { + constructor( + protected _version: V1, + payload: MetricResource, + callSid: string + ) { this.timestamp = payload.timestamp; this.callSid = payload.call_sid; this.accountSid = payload.account_sid; @@ -406,7 +412,7 @@ export class MetricPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: MetricPayload): MetricInstance { + getInstance(payload: MetricResource): MetricInstance { return new MetricInstance(this._version, payload, this._solution.callSid); } diff --git a/lib/rest/insights/v1/callSummaries.ts b/lib/rest/insights/v1/callSummaries.ts index df9d8baf4e..f8f9f02cdc 100644 --- a/lib/rest/insights/v1/callSummaries.ts +++ b/lib/rest/insights/v1/callSummaries.ts @@ -465,9 +465,9 @@ export function CallSummariesListInstance( return instance; } -interface CallSummariesPayload - extends CallSummariesResource, - TwilioResponsePayload {} +interface CallSummariesPayload extends TwilioResponsePayload { + call_summaries: CallSummariesResource[]; +} interface CallSummariesResource { account_sid?: string | null; @@ -495,7 +495,7 @@ interface CallSummariesResource { } export class CallSummariesInstance { - constructor(protected _version: V1, payload: CallSummariesPayload) { + constructor(protected _version: V1, payload: CallSummariesResource) { this.accountSid = payload.account_sid; this.callSid = payload.call_sid; this.answeredBy = payload.answered_by; @@ -606,7 +606,7 @@ export class CallSummariesPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: CallSummariesPayload): CallSummariesInstance { + getInstance(payload: CallSummariesResource): CallSummariesInstance { return new CallSummariesInstance(this._version, payload); } diff --git a/lib/rest/insights/v1/conference.ts b/lib/rest/insights/v1/conference.ts index 1147eb8635..d742613694 100644 --- a/lib/rest/insights/v1/conference.ts +++ b/lib/rest/insights/v1/conference.ts @@ -245,7 +245,9 @@ export class ConferenceContextImpl implements ConferenceContext { } } -interface ConferencePayload extends ConferenceResource, TwilioResponsePayload {} +interface ConferencePayload extends TwilioResponsePayload { + conferences: ConferenceResource[]; +} interface ConferenceResource { conference_sid?: string | null; @@ -279,7 +281,7 @@ export class ConferenceInstance { constructor( protected _version: V1, - payload: ConferencePayload, + payload: ConferenceResource, conferenceSid?: string ) { this.conferenceSid = payload.conference_sid; @@ -727,7 +729,7 @@ export class ConferencePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ConferencePayload): ConferenceInstance { + getInstance(payload: ConferenceResource): ConferenceInstance { return new ConferenceInstance(this._version, payload); } diff --git a/lib/rest/insights/v1/conference/conferenceParticipant.ts b/lib/rest/insights/v1/conference/conferenceParticipant.ts index cd7744510e..8845c5128f 100644 --- a/lib/rest/insights/v1/conference/conferenceParticipant.ts +++ b/lib/rest/insights/v1/conference/conferenceParticipant.ts @@ -252,9 +252,9 @@ export class ConferenceParticipantContextImpl } } -interface ConferenceParticipantPayload - extends ConferenceParticipantResource, - TwilioResponsePayload {} +interface ConferenceParticipantPayload extends TwilioResponsePayload { + participants: ConferenceParticipantResource[]; +} interface ConferenceParticipantResource { participant_sid?: string | null; @@ -292,7 +292,7 @@ export class ConferenceParticipantInstance { constructor( protected _version: V1, - payload: ConferenceParticipantPayload, + payload: ConferenceParticipantResource, conferenceSid: string, participantSid?: string ) { @@ -795,7 +795,7 @@ export class ConferenceParticipantPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: ConferenceParticipantPayload + payload: ConferenceParticipantResource ): ConferenceParticipantInstance { return new ConferenceParticipantInstance( this._version, diff --git a/lib/rest/insights/v1/room.ts b/lib/rest/insights/v1/room.ts index 6ffff3eae2..933a07a02e 100644 --- a/lib/rest/insights/v1/room.ts +++ b/lib/rest/insights/v1/room.ts @@ -220,7 +220,9 @@ export type RoomStatusCallbackMethod = | "PUT" | "DELETE"; -interface RoomPayload extends RoomResource, TwilioResponsePayload {} +interface RoomPayload extends TwilioResponsePayload { + rooms: RoomResource[]; +} interface RoomResource { account_sid?: string | null; @@ -255,7 +257,7 @@ export class RoomInstance { protected _solution: RoomContextSolution; protected _context?: RoomContext; - constructor(protected _version: V1, payload: RoomPayload, roomSid?: string) { + constructor(protected _version: V1, payload: RoomResource, roomSid?: string) { this.accountSid = payload.account_sid; this.roomSid = payload.room_sid; this.roomName = payload.room_name; @@ -703,7 +705,7 @@ export class RoomPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: RoomPayload): RoomInstance { + getInstance(payload: RoomResource): RoomInstance { return new RoomInstance(this._version, payload); } diff --git a/lib/rest/insights/v1/room/participant.ts b/lib/rest/insights/v1/room/participant.ts index 450c299994..6f5698fc97 100644 --- a/lib/rest/insights/v1/room/participant.ts +++ b/lib/rest/insights/v1/room/participant.ts @@ -173,9 +173,9 @@ export class ParticipantContextImpl implements ParticipantContext { } } -interface ParticipantPayload - extends ParticipantResource, - TwilioResponsePayload {} +interface ParticipantPayload extends TwilioResponsePayload { + participants: ParticipantResource[]; +} interface ParticipantResource { participant_sid?: string | null; @@ -203,7 +203,7 @@ export class ParticipantInstance { constructor( protected _version: V1, - payload: ParticipantPayload, + payload: ParticipantResource, roomSid: string, participantSid?: string ) { @@ -610,7 +610,7 @@ export class ParticipantPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ParticipantPayload): ParticipantInstance { + getInstance(payload: ParticipantResource): ParticipantInstance { return new ParticipantInstance( this._version, payload, diff --git a/lib/rest/insights/v1/setting.ts b/lib/rest/insights/v1/setting.ts index 58b8b973f3..2763a4b376 100644 --- a/lib/rest/insights/v1/setting.ts +++ b/lib/rest/insights/v1/setting.ts @@ -207,7 +207,7 @@ export class SettingInstance { protected _solution: SettingContextSolution; protected _context?: SettingContext; - constructor(protected _version: V1, payload: SettingPayload) { + constructor(protected _version: V1, payload: SettingResource) { this.accountSid = payload.account_sid; this.advancedFeatures = payload.advanced_features; this.voiceTrace = payload.voice_trace; diff --git a/lib/rest/ipMessaging/v1/credential.ts b/lib/rest/ipMessaging/v1/credential.ts index 9c2f2419b5..af150c2b54 100644 --- a/lib/rest/ipMessaging/v1/credential.ts +++ b/lib/rest/ipMessaging/v1/credential.ts @@ -270,7 +270,9 @@ export class CredentialContextImpl implements CredentialContext { } } -interface CredentialPayload extends CredentialResource, TwilioResponsePayload {} +interface CredentialPayload extends TwilioResponsePayload { + credentials: CredentialResource[]; +} interface CredentialResource { sid?: string | null; @@ -289,7 +291,7 @@ export class CredentialInstance { constructor( protected _version: V1, - payload: CredentialPayload, + payload: CredentialResource, sid?: string ) { this.sid = payload.sid; @@ -709,7 +711,7 @@ export class CredentialPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: CredentialPayload): CredentialInstance { + getInstance(payload: CredentialResource): CredentialInstance { return new CredentialInstance(this._version, payload); } diff --git a/lib/rest/ipMessaging/v1/service.ts b/lib/rest/ipMessaging/v1/service.ts index 1e37f063e7..5152d3e2a6 100644 --- a/lib/rest/ipMessaging/v1/service.ts +++ b/lib/rest/ipMessaging/v1/service.ts @@ -524,7 +524,9 @@ export class ServiceContextImpl implements ServiceContext { } } -interface ServicePayload extends ServiceResource, TwilioResponsePayload {} +interface ServicePayload extends TwilioResponsePayload { + services: ServiceResource[]; +} interface ServiceResource { sid?: string | null; @@ -554,7 +556,7 @@ export class ServiceInstance { protected _solution: ServiceContextSolution; protected _context?: ServiceContext; - constructor(protected _version: V1, payload: ServicePayload, sid?: string) { + constructor(protected _version: V1, payload: ServiceResource, sid?: string) { this.sid = payload.sid; this.accountSid = payload.account_sid; this.friendlyName = payload.friendly_name; @@ -1030,7 +1032,7 @@ export class ServicePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ServicePayload): ServiceInstance { + getInstance(payload: ServiceResource): ServiceInstance { return new ServiceInstance(this._version, payload); } diff --git a/lib/rest/ipMessaging/v1/service/channel.ts b/lib/rest/ipMessaging/v1/service/channel.ts index 0600d4c191..9ccfcca61c 100644 --- a/lib/rest/ipMessaging/v1/service/channel.ts +++ b/lib/rest/ipMessaging/v1/service/channel.ts @@ -319,7 +319,9 @@ export class ChannelContextImpl implements ChannelContext { } } -interface ChannelPayload extends ChannelResource, TwilioResponsePayload {} +interface ChannelPayload extends TwilioResponsePayload { + channels: ChannelResource[]; +} interface ChannelResource { sid?: string | null; @@ -344,7 +346,7 @@ export class ChannelInstance { constructor( protected _version: V1, - payload: ChannelPayload, + payload: ChannelResource, serviceSid: string, sid?: string ) { @@ -829,7 +831,7 @@ export class ChannelPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ChannelPayload): ChannelInstance { + getInstance(payload: ChannelResource): ChannelInstance { return new ChannelInstance( this._version, payload, diff --git a/lib/rest/ipMessaging/v1/service/channel/invite.ts b/lib/rest/ipMessaging/v1/service/channel/invite.ts index 01c9fc5b8f..a717ae4643 100644 --- a/lib/rest/ipMessaging/v1/service/channel/invite.ts +++ b/lib/rest/ipMessaging/v1/service/channel/invite.ts @@ -198,7 +198,9 @@ export class InviteContextImpl implements InviteContext { } } -interface InvitePayload extends InviteResource, TwilioResponsePayload {} +interface InvitePayload extends TwilioResponsePayload { + invites: InviteResource[]; +} interface InviteResource { sid?: string | null; @@ -219,7 +221,7 @@ export class InviteInstance { constructor( protected _version: V1, - payload: InvitePayload, + payload: InviteResource, serviceSid: string, channelSid: string, sid?: string @@ -640,7 +642,7 @@ export class InvitePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: InvitePayload): InviteInstance { + getInstance(payload: InviteResource): InviteInstance { return new InviteInstance( this._version, payload, diff --git a/lib/rest/ipMessaging/v1/service/channel/member.ts b/lib/rest/ipMessaging/v1/service/channel/member.ts index 47f3b960f6..3d95c219ce 100644 --- a/lib/rest/ipMessaging/v1/service/channel/member.ts +++ b/lib/rest/ipMessaging/v1/service/channel/member.ts @@ -276,7 +276,9 @@ export class MemberContextImpl implements MemberContext { } } -interface MemberPayload extends MemberResource, TwilioResponsePayload {} +interface MemberPayload extends TwilioResponsePayload { + members: MemberResource[]; +} interface MemberResource { sid?: string | null; @@ -298,7 +300,7 @@ export class MemberInstance { constructor( protected _version: V1, - payload: MemberPayload, + payload: MemberResource, serviceSid: string, channelSid: string, sid?: string @@ -752,7 +754,7 @@ export class MemberPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: MemberPayload): MemberInstance { + getInstance(payload: MemberResource): MemberInstance { return new MemberInstance( this._version, payload, diff --git a/lib/rest/ipMessaging/v1/service/channel/message.ts b/lib/rest/ipMessaging/v1/service/channel/message.ts index 0511b5e699..2149066d5b 100644 --- a/lib/rest/ipMessaging/v1/service/channel/message.ts +++ b/lib/rest/ipMessaging/v1/service/channel/message.ts @@ -280,7 +280,9 @@ export class MessageContextImpl implements MessageContext { } } -interface MessagePayload extends MessageResource, TwilioResponsePayload {} +interface MessagePayload extends TwilioResponsePayload { + messages: MessageResource[]; +} interface MessageResource { sid?: string | null; @@ -304,7 +306,7 @@ export class MessageInstance { constructor( protected _version: V1, - payload: MessagePayload, + payload: MessageResource, serviceSid: string, channelSid: string, sid?: string @@ -761,7 +763,7 @@ export class MessagePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: MessagePayload): MessageInstance { + getInstance(payload: MessageResource): MessageInstance { return new MessageInstance( this._version, payload, diff --git a/lib/rest/ipMessaging/v1/service/role.ts b/lib/rest/ipMessaging/v1/service/role.ts index 30845bc86a..8a170cc24e 100644 --- a/lib/rest/ipMessaging/v1/service/role.ts +++ b/lib/rest/ipMessaging/v1/service/role.ts @@ -249,7 +249,9 @@ export class RoleContextImpl implements RoleContext { } } -interface RolePayload extends RoleResource, TwilioResponsePayload {} +interface RolePayload extends TwilioResponsePayload { + roles: RoleResource[]; +} interface RoleResource { sid?: string | null; @@ -269,7 +271,7 @@ export class RoleInstance { constructor( protected _version: V1, - payload: RolePayload, + payload: RoleResource, serviceSid: string, sid?: string ) { @@ -698,7 +700,7 @@ export class RolePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: RolePayload): RoleInstance { + getInstance(payload: RoleResource): RoleInstance { return new RoleInstance(this._version, payload, this._solution.serviceSid); } diff --git a/lib/rest/ipMessaging/v1/service/user.ts b/lib/rest/ipMessaging/v1/service/user.ts index 24de860657..28d0a00aae 100644 --- a/lib/rest/ipMessaging/v1/service/user.ts +++ b/lib/rest/ipMessaging/v1/service/user.ts @@ -282,7 +282,9 @@ export class UserContextImpl implements UserContext { } } -interface UserPayload extends UserResource, TwilioResponsePayload {} +interface UserPayload extends TwilioResponsePayload { + users: UserResource[]; +} interface UserResource { sid?: string | null; @@ -307,7 +309,7 @@ export class UserInstance { constructor( protected _version: V1, - payload: UserPayload, + payload: UserResource, serviceSid: string, sid?: string ) { @@ -760,7 +762,7 @@ export class UserPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: UserPayload): UserInstance { + getInstance(payload: UserResource): UserInstance { return new UserInstance(this._version, payload, this._solution.serviceSid); } diff --git a/lib/rest/ipMessaging/v1/service/user/userChannel.ts b/lib/rest/ipMessaging/v1/service/user/userChannel.ts index b587e30d23..3e5ab7d01d 100644 --- a/lib/rest/ipMessaging/v1/service/user/userChannel.ts +++ b/lib/rest/ipMessaging/v1/service/user/userChannel.ts @@ -304,9 +304,9 @@ export function UserChannelListInstance( return instance; } -interface UserChannelPayload - extends UserChannelResource, - TwilioResponsePayload {} +interface UserChannelPayload extends TwilioResponsePayload { + channels: UserChannelResource[]; +} interface UserChannelResource { account_sid?: string | null; @@ -322,7 +322,7 @@ interface UserChannelResource { export class UserChannelInstance { constructor( protected _version: V1, - payload: UserChannelPayload, + payload: UserChannelResource, serviceSid: string, userSid: string ) { @@ -398,7 +398,7 @@ export class UserChannelPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: UserChannelPayload): UserChannelInstance { + getInstance(payload: UserChannelResource): UserChannelInstance { return new UserChannelInstance( this._version, payload, diff --git a/lib/rest/ipMessaging/v2/credential.ts b/lib/rest/ipMessaging/v2/credential.ts index 90b6c8e04d..2d29e0d734 100644 --- a/lib/rest/ipMessaging/v2/credential.ts +++ b/lib/rest/ipMessaging/v2/credential.ts @@ -270,7 +270,9 @@ export class CredentialContextImpl implements CredentialContext { } } -interface CredentialPayload extends CredentialResource, TwilioResponsePayload {} +interface CredentialPayload extends TwilioResponsePayload { + credentials: CredentialResource[]; +} interface CredentialResource { sid?: string | null; @@ -289,7 +291,7 @@ export class CredentialInstance { constructor( protected _version: V2, - payload: CredentialPayload, + payload: CredentialResource, sid?: string ) { this.sid = payload.sid; @@ -709,7 +711,7 @@ export class CredentialPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: CredentialPayload): CredentialInstance { + getInstance(payload: CredentialResource): CredentialInstance { return new CredentialInstance(this._version, payload); } diff --git a/lib/rest/ipMessaging/v2/service.ts b/lib/rest/ipMessaging/v2/service.ts index d877674253..453aaf03ad 100644 --- a/lib/rest/ipMessaging/v2/service.ts +++ b/lib/rest/ipMessaging/v2/service.ts @@ -422,7 +422,9 @@ export class ServiceContextImpl implements ServiceContext { } } -interface ServicePayload extends ServiceResource, TwilioResponsePayload {} +interface ServicePayload extends TwilioResponsePayload { + services: ServiceResource[]; +} interface ServiceResource { sid?: string | null; @@ -454,7 +456,7 @@ export class ServiceInstance { protected _solution: ServiceContextSolution; protected _context?: ServiceContext; - constructor(protected _version: V2, payload: ServicePayload, sid?: string) { + constructor(protected _version: V2, payload: ServiceResource, sid?: string) { this.sid = payload.sid; this.accountSid = payload.account_sid; this.friendlyName = payload.friendly_name; @@ -947,7 +949,7 @@ export class ServicePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ServicePayload): ServiceInstance { + getInstance(payload: ServiceResource): ServiceInstance { return new ServiceInstance(this._version, payload); } diff --git a/lib/rest/ipMessaging/v2/service/binding.ts b/lib/rest/ipMessaging/v2/service/binding.ts index 1c35993d86..609f82acbc 100644 --- a/lib/rest/ipMessaging/v2/service/binding.ts +++ b/lib/rest/ipMessaging/v2/service/binding.ts @@ -185,7 +185,9 @@ export class BindingContextImpl implements BindingContext { } } -interface BindingPayload extends BindingResource, TwilioResponsePayload {} +interface BindingPayload extends TwilioResponsePayload { + bindings: BindingResource[]; +} interface BindingResource { sid?: string | null; @@ -208,7 +210,7 @@ export class BindingInstance { constructor( protected _version: V2, - payload: BindingPayload, + payload: BindingResource, serviceSid: string, sid?: string ) { @@ -570,7 +572,7 @@ export class BindingPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: BindingPayload): BindingInstance { + getInstance(payload: BindingResource): BindingInstance { return new BindingInstance( this._version, payload, diff --git a/lib/rest/ipMessaging/v2/service/channel.ts b/lib/rest/ipMessaging/v2/service/channel.ts index 60bc54b4d2..c706f84e47 100644 --- a/lib/rest/ipMessaging/v2/service/channel.ts +++ b/lib/rest/ipMessaging/v2/service/channel.ts @@ -396,7 +396,9 @@ export class ChannelContextImpl implements ChannelContext { } } -interface ChannelPayload extends ChannelResource, TwilioResponsePayload {} +interface ChannelPayload extends TwilioResponsePayload { + channels: ChannelResource[]; +} interface ChannelResource { sid?: string | null; @@ -421,7 +423,7 @@ export class ChannelInstance { constructor( protected _version: V2, - payload: ChannelPayload, + payload: ChannelResource, serviceSid: string, sid?: string ) { @@ -934,7 +936,7 @@ export class ChannelPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ChannelPayload): ChannelInstance { + getInstance(payload: ChannelResource): ChannelInstance { return new ChannelInstance( this._version, payload, diff --git a/lib/rest/ipMessaging/v2/service/channel/invite.ts b/lib/rest/ipMessaging/v2/service/channel/invite.ts index 3df5e91e37..603f7e4d22 100644 --- a/lib/rest/ipMessaging/v2/service/channel/invite.ts +++ b/lib/rest/ipMessaging/v2/service/channel/invite.ts @@ -198,7 +198,9 @@ export class InviteContextImpl implements InviteContext { } } -interface InvitePayload extends InviteResource, TwilioResponsePayload {} +interface InvitePayload extends TwilioResponsePayload { + invites: InviteResource[]; +} interface InviteResource { sid?: string | null; @@ -219,7 +221,7 @@ export class InviteInstance { constructor( protected _version: V2, - payload: InvitePayload, + payload: InviteResource, serviceSid: string, channelSid: string, sid?: string @@ -640,7 +642,7 @@ export class InvitePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: InvitePayload): InviteInstance { + getInstance(payload: InviteResource): InviteInstance { return new InviteInstance( this._version, payload, diff --git a/lib/rest/ipMessaging/v2/service/channel/member.ts b/lib/rest/ipMessaging/v2/service/channel/member.ts index 504705e364..b613e1831b 100644 --- a/lib/rest/ipMessaging/v2/service/channel/member.ts +++ b/lib/rest/ipMessaging/v2/service/channel/member.ts @@ -349,7 +349,9 @@ export class MemberContextImpl implements MemberContext { } } -interface MemberPayload extends MemberResource, TwilioResponsePayload {} +interface MemberPayload extends TwilioResponsePayload { + members: MemberResource[]; +} interface MemberResource { sid?: string | null; @@ -372,7 +374,7 @@ export class MemberInstance { constructor( protected _version: V2, - payload: MemberPayload, + payload: MemberResource, serviceSid: string, channelSid: string, sid?: string @@ -856,7 +858,7 @@ export class MemberPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: MemberPayload): MemberInstance { + getInstance(payload: MemberResource): MemberInstance { return new MemberInstance( this._version, payload, diff --git a/lib/rest/ipMessaging/v2/service/channel/message.ts b/lib/rest/ipMessaging/v2/service/channel/message.ts index ef6bc92b75..70a0fd8528 100644 --- a/lib/rest/ipMessaging/v2/service/channel/message.ts +++ b/lib/rest/ipMessaging/v2/service/channel/message.ts @@ -348,7 +348,9 @@ export class MessageContextImpl implements MessageContext { } } -interface MessagePayload extends MessageResource, TwilioResponsePayload {} +interface MessagePayload extends TwilioResponsePayload { + messages: MessageResource[]; +} interface MessageResource { sid?: string | null; @@ -375,7 +377,7 @@ export class MessageInstance { constructor( protected _version: V2, - payload: MessagePayload, + payload: MessageResource, serviceSid: string, channelSid: string, sid?: string @@ -872,7 +874,7 @@ export class MessagePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: MessagePayload): MessageInstance { + getInstance(payload: MessageResource): MessageInstance { return new MessageInstance( this._version, payload, diff --git a/lib/rest/ipMessaging/v2/service/channel/webhook.ts b/lib/rest/ipMessaging/v2/service/channel/webhook.ts index 974dff8ad1..5752f02e09 100644 --- a/lib/rest/ipMessaging/v2/service/channel/webhook.ts +++ b/lib/rest/ipMessaging/v2/service/channel/webhook.ts @@ -307,7 +307,9 @@ export class WebhookContextImpl implements WebhookContext { } } -interface WebhookPayload extends WebhookResource, TwilioResponsePayload {} +interface WebhookPayload extends TwilioResponsePayload { + webhooks: WebhookResource[]; +} interface WebhookResource { sid?: string | null; @@ -327,7 +329,7 @@ export class WebhookInstance { constructor( protected _version: V2, - payload: WebhookPayload, + payload: WebhookResource, serviceSid: string, channelSid: string, sid?: string @@ -786,7 +788,7 @@ export class WebhookPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: WebhookPayload): WebhookInstance { + getInstance(payload: WebhookResource): WebhookInstance { return new WebhookInstance( this._version, payload, diff --git a/lib/rest/ipMessaging/v2/service/role.ts b/lib/rest/ipMessaging/v2/service/role.ts index d3f9bdec95..32a1708d5b 100644 --- a/lib/rest/ipMessaging/v2/service/role.ts +++ b/lib/rest/ipMessaging/v2/service/role.ts @@ -249,7 +249,9 @@ export class RoleContextImpl implements RoleContext { } } -interface RolePayload extends RoleResource, TwilioResponsePayload {} +interface RolePayload extends TwilioResponsePayload { + roles: RoleResource[]; +} interface RoleResource { sid?: string | null; @@ -269,7 +271,7 @@ export class RoleInstance { constructor( protected _version: V2, - payload: RolePayload, + payload: RoleResource, serviceSid: string, sid?: string ) { @@ -698,7 +700,7 @@ export class RolePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: RolePayload): RoleInstance { + getInstance(payload: RoleResource): RoleInstance { return new RoleInstance(this._version, payload, this._solution.serviceSid); } diff --git a/lib/rest/ipMessaging/v2/service/user.ts b/lib/rest/ipMessaging/v2/service/user.ts index 6a2f390627..44fbb899bc 100644 --- a/lib/rest/ipMessaging/v2/service/user.ts +++ b/lib/rest/ipMessaging/v2/service/user.ts @@ -304,7 +304,9 @@ export class UserContextImpl implements UserContext { } } -interface UserPayload extends UserResource, TwilioResponsePayload {} +interface UserPayload extends TwilioResponsePayload { + users: UserResource[]; +} interface UserResource { sid?: string | null; @@ -329,7 +331,7 @@ export class UserInstance { constructor( protected _version: V2, - payload: UserPayload, + payload: UserResource, serviceSid: string, sid?: string ) { @@ -791,7 +793,7 @@ export class UserPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: UserPayload): UserInstance { + getInstance(payload: UserResource): UserInstance { return new UserInstance(this._version, payload, this._solution.serviceSid); } diff --git a/lib/rest/ipMessaging/v2/service/user/userBinding.ts b/lib/rest/ipMessaging/v2/service/user/userBinding.ts index d1a783ff58..5046fe275c 100644 --- a/lib/rest/ipMessaging/v2/service/user/userBinding.ts +++ b/lib/rest/ipMessaging/v2/service/user/userBinding.ts @@ -190,9 +190,9 @@ export class UserBindingContextImpl implements UserBindingContext { } } -interface UserBindingPayload - extends UserBindingResource, - TwilioResponsePayload {} +interface UserBindingPayload extends TwilioResponsePayload { + bindings: UserBindingResource[]; +} interface UserBindingResource { sid?: string | null; @@ -215,7 +215,7 @@ export class UserBindingInstance { constructor( protected _version: V2, - payload: UserBindingPayload, + payload: UserBindingResource, serviceSid: string, userSid: string, sid?: string @@ -584,7 +584,7 @@ export class UserBindingPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: UserBindingPayload): UserBindingInstance { + getInstance(payload: UserBindingResource): UserBindingInstance { return new UserBindingInstance( this._version, payload, diff --git a/lib/rest/ipMessaging/v2/service/user/userChannel.ts b/lib/rest/ipMessaging/v2/service/user/userChannel.ts index dc601e7920..e454b6663e 100644 --- a/lib/rest/ipMessaging/v2/service/user/userChannel.ts +++ b/lib/rest/ipMessaging/v2/service/user/userChannel.ts @@ -270,9 +270,9 @@ export class UserChannelContextImpl implements UserChannelContext { } } -interface UserChannelPayload - extends UserChannelResource, - TwilioResponsePayload {} +interface UserChannelPayload extends TwilioResponsePayload { + channels: UserChannelResource[]; +} interface UserChannelResource { account_sid?: string | null; @@ -294,7 +294,7 @@ export class UserChannelInstance { constructor( protected _version: V2, - payload: UserChannelPayload, + payload: UserChannelResource, serviceSid: string, userSid: string, channelSid?: string @@ -693,7 +693,7 @@ export class UserChannelPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: UserChannelPayload): UserChannelInstance { + getInstance(payload: UserChannelResource): UserChannelInstance { return new UserChannelInstance( this._version, payload, diff --git a/lib/rest/lookups/v1/phoneNumber.ts b/lib/rest/lookups/v1/phoneNumber.ts index 31450a60d2..bf52247c6c 100644 --- a/lib/rest/lookups/v1/phoneNumber.ts +++ b/lib/rest/lookups/v1/phoneNumber.ts @@ -162,7 +162,7 @@ export class PhoneNumberInstance { constructor( protected _version: V1, - payload: PhoneNumberPayload, + payload: PhoneNumberResource, phoneNumber?: string ) { this.callerName = payload.caller_name; diff --git a/lib/rest/lookups/v2/phoneNumber.ts b/lib/rest/lookups/v2/phoneNumber.ts index 4114152495..d84bef4b7e 100644 --- a/lib/rest/lookups/v2/phoneNumber.ts +++ b/lib/rest/lookups/v2/phoneNumber.ts @@ -201,7 +201,7 @@ export class PhoneNumberInstance { constructor( protected _version: V2, - payload: PhoneNumberPayload, + payload: PhoneNumberResource, phoneNumber?: string ) { this.callingCountryCode = payload.calling_country_code; diff --git a/lib/rest/media/v1/mediaProcessor.ts b/lib/rest/media/v1/mediaProcessor.ts index 8e638e95a5..1504abdcc6 100644 --- a/lib/rest/media/v1/mediaProcessor.ts +++ b/lib/rest/media/v1/mediaProcessor.ts @@ -249,9 +249,9 @@ export type MediaProcessorStatusCallbackMethod = | "PUT" | "DELETE"; -interface MediaProcessorPayload - extends MediaProcessorResource, - TwilioResponsePayload {} +interface MediaProcessorPayload extends TwilioResponsePayload { + media_processors: MediaProcessorResource[]; +} interface MediaProcessorResource { account_sid?: string | null; @@ -274,7 +274,7 @@ export class MediaProcessorInstance { constructor( protected _version: V1, - payload: MediaProcessorPayload, + payload: MediaProcessorResource, sid?: string ) { this.accountSid = payload.account_sid; @@ -740,7 +740,7 @@ export class MediaProcessorPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: MediaProcessorPayload): MediaProcessorInstance { + getInstance(payload: MediaProcessorResource): MediaProcessorInstance { return new MediaProcessorInstance(this._version, payload); } diff --git a/lib/rest/media/v1/mediaRecording.ts b/lib/rest/media/v1/mediaRecording.ts index 76f29b5b4d..e5fcc90bfa 100644 --- a/lib/rest/media/v1/mediaRecording.ts +++ b/lib/rest/media/v1/mediaRecording.ts @@ -205,9 +205,9 @@ export type MediaRecordingStatusCallbackMethod = | "PUT" | "DELETE"; -interface MediaRecordingPayload - extends MediaRecordingResource, - TwilioResponsePayload {} +interface MediaRecordingPayload extends TwilioResponsePayload { + media_recordings: MediaRecordingResource[]; +} interface MediaRecordingResource { account_sid?: string | null; @@ -233,7 +233,7 @@ export class MediaRecordingInstance { constructor( protected _version: V1, - payload: MediaRecordingPayload, + payload: MediaRecordingResource, sid?: string ) { this.accountSid = payload.account_sid; @@ -642,7 +642,7 @@ export class MediaRecordingPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: MediaRecordingPayload): MediaRecordingInstance { + getInstance(payload: MediaRecordingResource): MediaRecordingInstance { return new MediaRecordingInstance(this._version, payload); } diff --git a/lib/rest/media/v1/playerStreamer.ts b/lib/rest/media/v1/playerStreamer.ts index 9b455ca23f..9f631daecf 100644 --- a/lib/rest/media/v1/playerStreamer.ts +++ b/lib/rest/media/v1/playerStreamer.ts @@ -263,9 +263,9 @@ export type PlayerStreamerStatusCallbackMethod = | "PUT" | "DELETE"; -interface PlayerStreamerPayload - extends PlayerStreamerResource, - TwilioResponsePayload {} +interface PlayerStreamerPayload extends TwilioResponsePayload { + player_streamers: PlayerStreamerResource[]; +} interface PlayerStreamerResource { account_sid?: string | null; @@ -288,7 +288,7 @@ export class PlayerStreamerInstance { constructor( protected _version: V1, - payload: PlayerStreamerPayload, + payload: PlayerStreamerResource, sid?: string ) { this.accountSid = payload.account_sid; @@ -753,7 +753,7 @@ export class PlayerStreamerPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: PlayerStreamerPayload): PlayerStreamerInstance { + getInstance(payload: PlayerStreamerResource): PlayerStreamerInstance { return new PlayerStreamerInstance(this._version, payload); } diff --git a/lib/rest/media/v1/playerStreamer/playbackGrant.ts b/lib/rest/media/v1/playerStreamer/playbackGrant.ts index 35a7e09441..563723fbc5 100644 --- a/lib/rest/media/v1/playerStreamer/playbackGrant.ts +++ b/lib/rest/media/v1/playerStreamer/playbackGrant.ts @@ -175,7 +175,7 @@ export class PlaybackGrantInstance { constructor( protected _version: V1, - payload: PlaybackGrantPayload, + payload: PlaybackGrantResource, sid: string ) { this.sid = payload.sid; diff --git a/lib/rest/messaging/v1/brandRegistration.ts b/lib/rest/messaging/v1/brandRegistration.ts index b6cda46ce4..bcb57aee10 100644 --- a/lib/rest/messaging/v1/brandRegistration.ts +++ b/lib/rest/messaging/v1/brandRegistration.ts @@ -225,9 +225,9 @@ export class BrandRegistrationContextImpl implements BrandRegistrationContext { } } -interface BrandRegistrationPayload - extends BrandRegistrationResource, - TwilioResponsePayload {} +interface BrandRegistrationPayload extends TwilioResponsePayload { + data: BrandRegistrationResource[]; +} interface BrandRegistrationResource { sid?: string | null; @@ -258,7 +258,7 @@ export class BrandRegistrationInstance { constructor( protected _version: V1, - payload: BrandRegistrationPayload, + payload: BrandRegistrationResource, sid?: string ) { this.sid = payload.sid; @@ -774,7 +774,7 @@ export class BrandRegistrationPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: BrandRegistrationPayload): BrandRegistrationInstance { + getInstance(payload: BrandRegistrationResource): BrandRegistrationInstance { return new BrandRegistrationInstance(this._version, payload); } diff --git a/lib/rest/messaging/v1/brandRegistration/brandVetting.ts b/lib/rest/messaging/v1/brandRegistration/brandVetting.ts index e563c1cf3c..82a6379478 100644 --- a/lib/rest/messaging/v1/brandRegistration/brandVetting.ts +++ b/lib/rest/messaging/v1/brandRegistration/brandVetting.ts @@ -168,9 +168,9 @@ export class BrandVettingContextImpl implements BrandVettingContext { } } -interface BrandVettingPayload - extends BrandVettingResource, - TwilioResponsePayload {} +interface BrandVettingPayload extends TwilioResponsePayload { + data: BrandVettingResource[]; +} interface BrandVettingResource { account_sid?: string | null; @@ -191,7 +191,7 @@ export class BrandVettingInstance { constructor( protected _version: V1, - payload: BrandVettingPayload, + payload: BrandVettingResource, brandSid: string, brandVettingSid?: string ) { @@ -628,7 +628,7 @@ export class BrandVettingPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: BrandVettingPayload): BrandVettingInstance { + getInstance(payload: BrandVettingResource): BrandVettingInstance { return new BrandVettingInstance( this._version, payload, diff --git a/lib/rest/messaging/v1/deactivations.ts b/lib/rest/messaging/v1/deactivations.ts index 4adc6a8df0..b67ac92099 100644 --- a/lib/rest/messaging/v1/deactivations.ts +++ b/lib/rest/messaging/v1/deactivations.ts @@ -128,7 +128,7 @@ export class DeactivationsInstance { protected _solution: DeactivationsContextSolution; protected _context?: DeactivationsContext; - constructor(protected _version: V1, payload: DeactivationsPayload) { + constructor(protected _version: V1, payload: DeactivationsResource) { this.redirectTo = payload.redirect_to; this._solution = {}; diff --git a/lib/rest/messaging/v1/domainCerts.ts b/lib/rest/messaging/v1/domainCerts.ts index 7ddbfc0d1f..5a8f18c5e9 100644 --- a/lib/rest/messaging/v1/domainCerts.ts +++ b/lib/rest/messaging/v1/domainCerts.ts @@ -198,7 +198,7 @@ export class DomainCertsInstance { constructor( protected _version: V1, - payload: DomainCertsPayload, + payload: DomainCertsResource, domainSid?: string ) { this.domainSid = payload.domain_sid; diff --git a/lib/rest/messaging/v1/domainConfig.ts b/lib/rest/messaging/v1/domainConfig.ts index 68b53a9bc3..4486ff6673 100644 --- a/lib/rest/messaging/v1/domainConfig.ts +++ b/lib/rest/messaging/v1/domainConfig.ts @@ -193,7 +193,7 @@ export class DomainConfigInstance { constructor( protected _version: V1, - payload: DomainConfigPayload, + payload: DomainConfigResource, domainSid?: string ) { this.domainSid = payload.domain_sid; diff --git a/lib/rest/messaging/v1/externalCampaign.ts b/lib/rest/messaging/v1/externalCampaign.ts index 18d40f4239..d3571cb41b 100644 --- a/lib/rest/messaging/v1/externalCampaign.ts +++ b/lib/rest/messaging/v1/externalCampaign.ts @@ -144,7 +144,7 @@ interface ExternalCampaignResource { } export class ExternalCampaignInstance { - constructor(protected _version: V1, payload: ExternalCampaignPayload) { + constructor(protected _version: V1, payload: ExternalCampaignResource) { this.sid = payload.sid; this.accountSid = payload.account_sid; this.campaignId = payload.campaign_id; diff --git a/lib/rest/messaging/v1/service.ts b/lib/rest/messaging/v1/service.ts index 1d0a303626..54fa1d5bcb 100644 --- a/lib/rest/messaging/v1/service.ts +++ b/lib/rest/messaging/v1/service.ts @@ -399,7 +399,9 @@ export type ServiceFallbackMethod = | "PUT" | "DELETE"; -interface ServicePayload extends ServiceResource, TwilioResponsePayload {} +interface ServicePayload extends TwilioResponsePayload { + services: ServiceResource[]; +} interface ServiceResource { sid?: string | null; @@ -431,7 +433,7 @@ export class ServiceInstance { protected _solution: ServiceContextSolution; protected _context?: ServiceContext; - constructor(protected _version: V1, payload: ServicePayload, sid?: string) { + constructor(protected _version: V1, payload: ServiceResource, sid?: string) { this.sid = payload.sid; this.accountSid = payload.account_sid; this.friendlyName = payload.friendly_name; @@ -1021,7 +1023,7 @@ export class ServicePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ServicePayload): ServiceInstance { + getInstance(payload: ServiceResource): ServiceInstance { return new ServiceInstance(this._version, payload); } diff --git a/lib/rest/messaging/v1/service/alphaSender.ts b/lib/rest/messaging/v1/service/alphaSender.ts index ce14f9c8d3..088b3c0b49 100644 --- a/lib/rest/messaging/v1/service/alphaSender.ts +++ b/lib/rest/messaging/v1/service/alphaSender.ts @@ -179,9 +179,9 @@ export class AlphaSenderContextImpl implements AlphaSenderContext { } } -interface AlphaSenderPayload - extends AlphaSenderResource, - TwilioResponsePayload {} +interface AlphaSenderPayload extends TwilioResponsePayload { + alpha_senders: AlphaSenderResource[]; +} interface AlphaSenderResource { sid?: string | null; @@ -200,7 +200,7 @@ export class AlphaSenderInstance { constructor( protected _version: V1, - payload: AlphaSenderPayload, + payload: AlphaSenderResource, serviceSid: string, sid?: string ) { @@ -628,7 +628,7 @@ export class AlphaSenderPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: AlphaSenderPayload): AlphaSenderInstance { + getInstance(payload: AlphaSenderResource): AlphaSenderInstance { return new AlphaSenderInstance( this._version, payload, diff --git a/lib/rest/messaging/v1/service/phoneNumber.ts b/lib/rest/messaging/v1/service/phoneNumber.ts index 0fe6fed346..c94d663e4e 100644 --- a/lib/rest/messaging/v1/service/phoneNumber.ts +++ b/lib/rest/messaging/v1/service/phoneNumber.ts @@ -179,9 +179,9 @@ export class PhoneNumberContextImpl implements PhoneNumberContext { } } -interface PhoneNumberPayload - extends PhoneNumberResource, - TwilioResponsePayload {} +interface PhoneNumberPayload extends TwilioResponsePayload { + phone_numbers: PhoneNumberResource[]; +} interface PhoneNumberResource { sid?: string | null; @@ -201,7 +201,7 @@ export class PhoneNumberInstance { constructor( protected _version: V1, - payload: PhoneNumberPayload, + payload: PhoneNumberResource, serviceSid: string, sid?: string ) { @@ -640,7 +640,7 @@ export class PhoneNumberPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: PhoneNumberPayload): PhoneNumberInstance { + getInstance(payload: PhoneNumberResource): PhoneNumberInstance { return new PhoneNumberInstance( this._version, payload, diff --git a/lib/rest/messaging/v1/service/shortCode.ts b/lib/rest/messaging/v1/service/shortCode.ts index b8dc5e3352..6341cb995e 100644 --- a/lib/rest/messaging/v1/service/shortCode.ts +++ b/lib/rest/messaging/v1/service/shortCode.ts @@ -179,7 +179,9 @@ export class ShortCodeContextImpl implements ShortCodeContext { } } -interface ShortCodePayload extends ShortCodeResource, TwilioResponsePayload {} +interface ShortCodePayload extends TwilioResponsePayload { + short_codes: ShortCodeResource[]; +} interface ShortCodeResource { sid?: string | null; @@ -199,7 +201,7 @@ export class ShortCodeInstance { constructor( protected _version: V1, - payload: ShortCodePayload, + payload: ShortCodeResource, serviceSid: string, sid?: string ) { @@ -635,7 +637,7 @@ export class ShortCodePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ShortCodePayload): ShortCodeInstance { + getInstance(payload: ShortCodeResource): ShortCodeInstance { return new ShortCodeInstance( this._version, payload, diff --git a/lib/rest/messaging/v1/service/usAppToPerson.ts b/lib/rest/messaging/v1/service/usAppToPerson.ts index 4b2c0744d7..b3222031e6 100644 --- a/lib/rest/messaging/v1/service/usAppToPerson.ts +++ b/lib/rest/messaging/v1/service/usAppToPerson.ts @@ -207,9 +207,9 @@ export class UsAppToPersonContextImpl implements UsAppToPersonContext { } } -interface UsAppToPersonPayload - extends UsAppToPersonResource, - TwilioResponsePayload {} +interface UsAppToPersonPayload extends TwilioResponsePayload { + compliance: UsAppToPersonResource[]; +} interface UsAppToPersonResource { sid?: string | null; @@ -244,7 +244,7 @@ export class UsAppToPersonInstance { constructor( protected _version: V1, - payload: UsAppToPersonPayload, + payload: UsAppToPersonResource, messagingServiceSid: string, sid?: string ) { @@ -851,7 +851,7 @@ export class UsAppToPersonPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: UsAppToPersonPayload): UsAppToPersonInstance { + getInstance(payload: UsAppToPersonResource): UsAppToPersonInstance { return new UsAppToPersonInstance( this._version, payload, diff --git a/lib/rest/messaging/v1/service/usAppToPersonUsecase.ts b/lib/rest/messaging/v1/service/usAppToPersonUsecase.ts index d510729529..143c639b13 100644 --- a/lib/rest/messaging/v1/service/usAppToPersonUsecase.ts +++ b/lib/rest/messaging/v1/service/usAppToPersonUsecase.ts @@ -152,7 +152,7 @@ interface UsAppToPersonUsecaseResource { export class UsAppToPersonUsecaseInstance { constructor( protected _version: V1, - payload: UsAppToPersonUsecasePayload, + payload: UsAppToPersonUsecaseResource, messagingServiceSid: string ) { this.usAppToPersonUsecases = payload.us_app_to_person_usecases; diff --git a/lib/rest/messaging/v1/tollfreeVerification.ts b/lib/rest/messaging/v1/tollfreeVerification.ts index 1a97a1afb0..e3a34ce4d4 100644 --- a/lib/rest/messaging/v1/tollfreeVerification.ts +++ b/lib/rest/messaging/v1/tollfreeVerification.ts @@ -220,9 +220,9 @@ export class TollfreeVerificationContextImpl } } -interface TollfreeVerificationPayload - extends TollfreeVerificationResource, - TwilioResponsePayload {} +interface TollfreeVerificationPayload extends TwilioResponsePayload { + verifications: TollfreeVerificationResource[]; +} interface TollfreeVerificationResource { sid?: string | null; @@ -264,7 +264,7 @@ export class TollfreeVerificationInstance { constructor( protected _version: V1, - payload: TollfreeVerificationPayload, + payload: TollfreeVerificationResource, sid?: string ) { this.sid = payload.sid; @@ -940,7 +940,7 @@ export class TollfreeVerificationPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: TollfreeVerificationPayload + payload: TollfreeVerificationResource ): TollfreeVerificationInstance { return new TollfreeVerificationInstance(this._version, payload); } diff --git a/lib/rest/messaging/v1/usecase.ts b/lib/rest/messaging/v1/usecase.ts index 1076b341fc..b48f0076c7 100644 --- a/lib/rest/messaging/v1/usecase.ts +++ b/lib/rest/messaging/v1/usecase.ts @@ -92,7 +92,7 @@ interface UsecaseResource { } export class UsecaseInstance { - constructor(protected _version: V1, payload: UsecasePayload) { + constructor(protected _version: V1, payload: UsecaseResource) { this.usecases = payload.usecases; } diff --git a/lib/rest/microvisor/v1/app.ts b/lib/rest/microvisor/v1/app.ts index c6fcc445b4..260bd09051 100644 --- a/lib/rest/microvisor/v1/app.ts +++ b/lib/rest/microvisor/v1/app.ts @@ -161,7 +161,9 @@ export class AppContextImpl implements AppContext { } } -interface AppPayload extends AppResource, TwilioResponsePayload {} +interface AppPayload extends TwilioResponsePayload { + apps: AppResource[]; +} interface AppResource { sid?: string | null; @@ -177,7 +179,7 @@ export class AppInstance { protected _solution: AppContextSolution; protected _context?: AppContext; - constructor(protected _version: V1, payload: AppPayload, sid?: string) { + constructor(protected _version: V1, payload: AppResource, sid?: string) { this.sid = payload.sid; this.accountSid = payload.account_sid; this.hash = payload.hash; @@ -515,7 +517,7 @@ export class AppPage extends Page { * * @param payload - Payload response from the API */ - getInstance(payload: AppPayload): AppInstance { + getInstance(payload: AppResource): AppInstance { return new AppInstance(this._version, payload); } diff --git a/lib/rest/microvisor/v1/device.ts b/lib/rest/microvisor/v1/device.ts index 28dd16aafc..201b8bd627 100644 --- a/lib/rest/microvisor/v1/device.ts +++ b/lib/rest/microvisor/v1/device.ts @@ -212,7 +212,9 @@ export class DeviceContextImpl implements DeviceContext { } } -interface DevicePayload extends DeviceResource, TwilioResponsePayload {} +interface DevicePayload extends TwilioResponsePayload { + devices: DeviceResource[]; +} interface DeviceResource { sid?: string | null; @@ -230,7 +232,7 @@ export class DeviceInstance { protected _solution: DeviceContextSolution; protected _context?: DeviceContext; - constructor(protected _version: V1, payload: DevicePayload, sid?: string) { + constructor(protected _version: V1, payload: DeviceResource, sid?: string) { this.sid = payload.sid; this.uniqueName = payload.unique_name; this.accountSid = payload.account_sid; @@ -602,7 +604,7 @@ export class DevicePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: DevicePayload): DeviceInstance { + getInstance(payload: DeviceResource): DeviceInstance { return new DeviceInstance(this._version, payload); } diff --git a/lib/rest/monitor/v1/alert.ts b/lib/rest/monitor/v1/alert.ts index e4e19613bf..5607ef3a6f 100644 --- a/lib/rest/monitor/v1/alert.ts +++ b/lib/rest/monitor/v1/alert.ts @@ -161,7 +161,9 @@ export type AlertRequestMethod = | "PUT" | "DELETE"; -interface AlertPayload extends AlertResource, TwilioResponsePayload {} +interface AlertPayload extends TwilioResponsePayload { + alerts: AlertResource[]; +} interface AlertResource { account_sid?: string | null; @@ -189,7 +191,7 @@ export class AlertInstance { protected _solution: AlertContextSolution; protected _context?: AlertContext; - constructor(protected _version: V1, payload: AlertPayload, sid?: string) { + constructor(protected _version: V1, payload: AlertResource, sid?: string) { this.accountSid = payload.account_sid; this.alertText = payload.alert_text; this.apiVersion = payload.api_version; @@ -600,7 +602,7 @@ export class AlertPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: AlertPayload): AlertInstance { + getInstance(payload: AlertResource): AlertInstance { return new AlertInstance(this._version, payload); } diff --git a/lib/rest/monitor/v1/event.ts b/lib/rest/monitor/v1/event.ts index b98fcb3cbc..0ae3e53e20 100644 --- a/lib/rest/monitor/v1/event.ts +++ b/lib/rest/monitor/v1/event.ts @@ -172,7 +172,9 @@ export class EventContextImpl implements EventContext { } } -interface EventPayload extends EventResource, TwilioResponsePayload {} +interface EventPayload extends TwilioResponsePayload { + events: EventResource[]; +} interface EventResource { account_sid?: string | null; @@ -195,7 +197,7 @@ export class EventInstance { protected _solution: EventContextSolution; protected _context?: EventContext; - constructor(protected _version: V1, payload: EventPayload, sid?: string) { + constructor(protected _version: V1, payload: EventResource, sid?: string) { this.accountSid = payload.account_sid; this.actorSid = payload.actor_sid; this.actorType = payload.actor_type; @@ -582,7 +584,7 @@ export class EventPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: EventPayload): EventInstance { + getInstance(payload: EventResource): EventInstance { return new EventInstance(this._version, payload); } diff --git a/lib/rest/notify/v1/credential.ts b/lib/rest/notify/v1/credential.ts index 07a90b5879..14c99e70e0 100644 --- a/lib/rest/notify/v1/credential.ts +++ b/lib/rest/notify/v1/credential.ts @@ -270,7 +270,9 @@ export class CredentialContextImpl implements CredentialContext { } } -interface CredentialPayload extends CredentialResource, TwilioResponsePayload {} +interface CredentialPayload extends TwilioResponsePayload { + credentials: CredentialResource[]; +} interface CredentialResource { sid?: string | null; @@ -289,7 +291,7 @@ export class CredentialInstance { constructor( protected _version: V1, - payload: CredentialPayload, + payload: CredentialResource, sid?: string ) { this.sid = payload.sid; @@ -730,7 +732,7 @@ export class CredentialPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: CredentialPayload): CredentialInstance { + getInstance(payload: CredentialResource): CredentialInstance { return new CredentialInstance(this._version, payload); } diff --git a/lib/rest/notify/v1/service.ts b/lib/rest/notify/v1/service.ts index f23bfe6bb9..845f112b92 100644 --- a/lib/rest/notify/v1/service.ts +++ b/lib/rest/notify/v1/service.ts @@ -349,7 +349,9 @@ export class ServiceContextImpl implements ServiceContext { } } -interface ServicePayload extends ServiceResource, TwilioResponsePayload {} +interface ServicePayload extends TwilioResponsePayload { + services: ServiceResource[]; +} interface ServiceResource { sid?: string | null; @@ -378,7 +380,7 @@ export class ServiceInstance { protected _solution: ServiceContextSolution; protected _context?: ServiceContext; - constructor(protected _version: V1, payload: ServicePayload, sid?: string) { + constructor(protected _version: V1, payload: ServiceResource, sid?: string) { this.sid = payload.sid; this.accountSid = payload.account_sid; this.friendlyName = payload.friendly_name; @@ -948,7 +950,7 @@ export class ServicePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ServicePayload): ServiceInstance { + getInstance(payload: ServiceResource): ServiceInstance { return new ServiceInstance(this._version, payload); } diff --git a/lib/rest/notify/v1/service/binding.ts b/lib/rest/notify/v1/service/binding.ts index 4680cea51d..97228935d4 100644 --- a/lib/rest/notify/v1/service/binding.ts +++ b/lib/rest/notify/v1/service/binding.ts @@ -223,7 +223,9 @@ export class BindingContextImpl implements BindingContext { } } -interface BindingPayload extends BindingResource, TwilioResponsePayload {} +interface BindingPayload extends TwilioResponsePayload { + bindings: BindingResource[]; +} interface BindingResource { sid?: string | null; @@ -248,7 +250,7 @@ export class BindingInstance { constructor( protected _version: V1, - payload: BindingPayload, + payload: BindingResource, serviceSid: string, sid?: string ) { @@ -739,7 +741,7 @@ export class BindingPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: BindingPayload): BindingInstance { + getInstance(payload: BindingResource): BindingInstance { return new BindingInstance( this._version, payload, diff --git a/lib/rest/notify/v1/service/notification.ts b/lib/rest/notify/v1/service/notification.ts index 6eae79352c..0f72d8cce8 100644 --- a/lib/rest/notify/v1/service/notification.ts +++ b/lib/rest/notify/v1/service/notification.ts @@ -233,7 +233,7 @@ interface NotificationResource { export class NotificationInstance { constructor( protected _version: V1, - payload: NotificationPayload, + payload: NotificationResource, serviceSid: string ) { this.sid = payload.sid; diff --git a/lib/rest/numbers/v2/regulatoryCompliance/bundle.ts b/lib/rest/numbers/v2/regulatoryCompliance/bundle.ts index 48ace1afcc..7219e717f5 100644 --- a/lib/rest/numbers/v2/regulatoryCompliance/bundle.ts +++ b/lib/rest/numbers/v2/regulatoryCompliance/bundle.ts @@ -382,7 +382,9 @@ export class BundleContextImpl implements BundleContext { } } -interface BundlePayload extends BundleResource, TwilioResponsePayload {} +interface BundlePayload extends TwilioResponsePayload { + results: BundleResource[]; +} interface BundleResource { sid?: string | null; @@ -403,7 +405,7 @@ export class BundleInstance { protected _solution: BundleContextSolution; protected _context?: BundleContext; - constructor(protected _version: V2, payload: BundlePayload, sid?: string) { + constructor(protected _version: V2, payload: BundleResource, sid?: string) { this.sid = payload.sid; this.accountSid = payload.account_sid; this.regulationSid = payload.regulation_sid; @@ -928,7 +930,7 @@ export class BundlePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: BundlePayload): BundleInstance { + getInstance(payload: BundleResource): BundleInstance { return new BundleInstance(this._version, payload); } diff --git a/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.ts b/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.ts index 4829a335af..c6e56d5e70 100644 --- a/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.ts +++ b/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.ts @@ -378,7 +378,9 @@ export function BundleCopyListInstance( return instance; } -interface BundleCopyPayload extends BundleCopyResource, TwilioResponsePayload {} +interface BundleCopyPayload extends TwilioResponsePayload { + results: BundleCopyResource[]; +} interface BundleCopyResource { sid?: string | null; @@ -396,7 +398,7 @@ interface BundleCopyResource { export class BundleCopyInstance { constructor( protected _version: V2, - payload: BundleCopyPayload, + payload: BundleCopyResource, bundleSid: string ) { this.sid = payload.sid; @@ -500,7 +502,7 @@ export class BundleCopyPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: BundleCopyPayload): BundleCopyInstance { + getInstance(payload: BundleCopyResource): BundleCopyInstance { return new BundleCopyInstance( this._version, payload, diff --git a/lib/rest/numbers/v2/regulatoryCompliance/bundle/evaluation.ts b/lib/rest/numbers/v2/regulatoryCompliance/bundle/evaluation.ts index fe2d7b2156..d701e97228 100644 --- a/lib/rest/numbers/v2/regulatoryCompliance/bundle/evaluation.ts +++ b/lib/rest/numbers/v2/regulatoryCompliance/bundle/evaluation.ts @@ -148,7 +148,9 @@ export class EvaluationContextImpl implements EvaluationContext { } } -interface EvaluationPayload extends EvaluationResource, TwilioResponsePayload {} +interface EvaluationPayload extends TwilioResponsePayload { + results: EvaluationResource[]; +} interface EvaluationResource { sid?: string | null; @@ -167,7 +169,7 @@ export class EvaluationInstance { constructor( protected _version: V2, - payload: EvaluationPayload, + payload: EvaluationResource, bundleSid: string, sid?: string ) { @@ -551,7 +553,7 @@ export class EvaluationPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: EvaluationPayload): EvaluationInstance { + getInstance(payload: EvaluationResource): EvaluationInstance { return new EvaluationInstance( this._version, payload, diff --git a/lib/rest/numbers/v2/regulatoryCompliance/bundle/itemAssignment.ts b/lib/rest/numbers/v2/regulatoryCompliance/bundle/itemAssignment.ts index b1a357ab7a..a4c3441884 100644 --- a/lib/rest/numbers/v2/regulatoryCompliance/bundle/itemAssignment.ts +++ b/lib/rest/numbers/v2/regulatoryCompliance/bundle/itemAssignment.ts @@ -182,9 +182,9 @@ export class ItemAssignmentContextImpl implements ItemAssignmentContext { } } -interface ItemAssignmentPayload - extends ItemAssignmentResource, - TwilioResponsePayload {} +interface ItemAssignmentPayload extends TwilioResponsePayload { + results: ItemAssignmentResource[]; +} interface ItemAssignmentResource { sid?: string | null; @@ -201,7 +201,7 @@ export class ItemAssignmentInstance { constructor( protected _version: V2, - payload: ItemAssignmentPayload, + payload: ItemAssignmentResource, bundleSid: string, sid?: string ) { @@ -625,7 +625,7 @@ export class ItemAssignmentPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ItemAssignmentPayload): ItemAssignmentInstance { + getInstance(payload: ItemAssignmentResource): ItemAssignmentInstance { return new ItemAssignmentInstance( this._version, payload, diff --git a/lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.ts b/lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.ts index 15bc87ff39..88bf0ba20c 100644 --- a/lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.ts +++ b/lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.ts @@ -162,7 +162,7 @@ interface ReplaceItemsResource { export class ReplaceItemsInstance { constructor( protected _version: V2, - payload: ReplaceItemsPayload, + payload: ReplaceItemsResource, bundleSid: string ) { this.sid = payload.sid; diff --git a/lib/rest/numbers/v2/regulatoryCompliance/endUser.ts b/lib/rest/numbers/v2/regulatoryCompliance/endUser.ts index 6f77638a65..d9d998f64d 100644 --- a/lib/rest/numbers/v2/regulatoryCompliance/endUser.ts +++ b/lib/rest/numbers/v2/regulatoryCompliance/endUser.ts @@ -248,7 +248,9 @@ export class EndUserContextImpl implements EndUserContext { } } -interface EndUserPayload extends EndUserResource, TwilioResponsePayload {} +interface EndUserPayload extends TwilioResponsePayload { + results: EndUserResource[]; +} interface EndUserResource { sid?: string | null; @@ -265,7 +267,7 @@ export class EndUserInstance { protected _solution: EndUserContextSolution; protected _context?: EndUserContext; - constructor(protected _version: V2, payload: EndUserPayload, sid?: string) { + constructor(protected _version: V2, payload: EndUserResource, sid?: string) { this.sid = payload.sid; this.accountSid = payload.account_sid; this.friendlyName = payload.friendly_name; @@ -705,7 +707,7 @@ export class EndUserPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: EndUserPayload): EndUserInstance { + getInstance(payload: EndUserResource): EndUserInstance { return new EndUserInstance(this._version, payload); } diff --git a/lib/rest/numbers/v2/regulatoryCompliance/endUserType.ts b/lib/rest/numbers/v2/regulatoryCompliance/endUserType.ts index 2b05425e93..8e4e1f6f02 100644 --- a/lib/rest/numbers/v2/regulatoryCompliance/endUserType.ts +++ b/lib/rest/numbers/v2/regulatoryCompliance/endUserType.ts @@ -136,9 +136,9 @@ export class EndUserTypeContextImpl implements EndUserTypeContext { } } -interface EndUserTypePayload - extends EndUserTypeResource, - TwilioResponsePayload {} +interface EndUserTypePayload extends TwilioResponsePayload { + end_user_types: EndUserTypeResource[]; +} interface EndUserTypeResource { sid?: string | null; @@ -154,7 +154,7 @@ export class EndUserTypeInstance { constructor( protected _version: V2, - payload: EndUserTypePayload, + payload: EndUserTypeResource, sid?: string ) { this.sid = payload.sid; @@ -480,7 +480,7 @@ export class EndUserTypePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: EndUserTypePayload): EndUserTypeInstance { + getInstance(payload: EndUserTypeResource): EndUserTypeInstance { return new EndUserTypeInstance(this._version, payload); } diff --git a/lib/rest/numbers/v2/regulatoryCompliance/regulation.ts b/lib/rest/numbers/v2/regulatoryCompliance/regulation.ts index 12064105d3..d216bba72f 100644 --- a/lib/rest/numbers/v2/regulatoryCompliance/regulation.ts +++ b/lib/rest/numbers/v2/regulatoryCompliance/regulation.ts @@ -156,7 +156,9 @@ export class RegulationContextImpl implements RegulationContext { } } -interface RegulationPayload extends RegulationResource, TwilioResponsePayload {} +interface RegulationPayload extends TwilioResponsePayload { + results: RegulationResource[]; +} interface RegulationResource { sid?: string | null; @@ -174,7 +176,7 @@ export class RegulationInstance { constructor( protected _version: V2, - payload: RegulationPayload, + payload: RegulationResource, sid?: string ) { this.sid = payload.sid; @@ -514,7 +516,7 @@ export class RegulationPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: RegulationPayload): RegulationInstance { + getInstance(payload: RegulationResource): RegulationInstance { return new RegulationInstance(this._version, payload); } diff --git a/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.ts b/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.ts index bd2df67e4a..d98ab66ceb 100644 --- a/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.ts +++ b/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.ts @@ -267,9 +267,9 @@ export class SupportingDocumentContextImpl } } -interface SupportingDocumentPayload - extends SupportingDocumentResource, - TwilioResponsePayload {} +interface SupportingDocumentPayload extends TwilioResponsePayload { + results: SupportingDocumentResource[]; +} interface SupportingDocumentResource { sid?: string | null; @@ -291,7 +291,7 @@ export class SupportingDocumentInstance { constructor( protected _version: V2, - payload: SupportingDocumentPayload, + payload: SupportingDocumentResource, sid?: string ) { this.sid = payload.sid; @@ -765,7 +765,7 @@ export class SupportingDocumentPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SupportingDocumentPayload): SupportingDocumentInstance { + getInstance(payload: SupportingDocumentResource): SupportingDocumentInstance { return new SupportingDocumentInstance(this._version, payload); } diff --git a/lib/rest/numbers/v2/regulatoryCompliance/supportingDocumentType.ts b/lib/rest/numbers/v2/regulatoryCompliance/supportingDocumentType.ts index 2f477cc592..750f57e27a 100644 --- a/lib/rest/numbers/v2/regulatoryCompliance/supportingDocumentType.ts +++ b/lib/rest/numbers/v2/regulatoryCompliance/supportingDocumentType.ts @@ -148,9 +148,9 @@ export class SupportingDocumentTypeContextImpl } } -interface SupportingDocumentTypePayload - extends SupportingDocumentTypeResource, - TwilioResponsePayload {} +interface SupportingDocumentTypePayload extends TwilioResponsePayload { + supporting_document_types: SupportingDocumentTypeResource[]; +} interface SupportingDocumentTypeResource { sid?: string | null; @@ -166,7 +166,7 @@ export class SupportingDocumentTypeInstance { constructor( protected _version: V2, - payload: SupportingDocumentTypePayload, + payload: SupportingDocumentTypeResource, sid?: string ) { this.sid = payload.sid; @@ -519,7 +519,7 @@ export class SupportingDocumentTypePage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: SupportingDocumentTypePayload + payload: SupportingDocumentTypeResource ): SupportingDocumentTypeInstance { return new SupportingDocumentTypeInstance(this._version, payload); } diff --git a/lib/rest/oauth/v1/deviceCode.ts b/lib/rest/oauth/v1/deviceCode.ts index 47ed3390d0..66ad5c2949 100644 --- a/lib/rest/oauth/v1/deviceCode.ts +++ b/lib/rest/oauth/v1/deviceCode.ts @@ -141,7 +141,7 @@ interface DeviceCodeResource { } export class DeviceCodeInstance { - constructor(protected _version: V1, payload: DeviceCodePayload) { + constructor(protected _version: V1, payload: DeviceCodeResource) { this.deviceCode = payload.device_code; this.userCode = payload.user_code; this.verificationUri = payload.verification_uri; diff --git a/lib/rest/oauth/v1/oauth.ts b/lib/rest/oauth/v1/oauth.ts index 01af6778c4..cd7241c5b0 100644 --- a/lib/rest/oauth/v1/oauth.ts +++ b/lib/rest/oauth/v1/oauth.ts @@ -91,7 +91,7 @@ export class OauthInstance { protected _solution: OauthContextSolution; protected _context?: OauthContext; - constructor(protected _version: V1, payload: OauthPayload) { + constructor(protected _version: V1, payload: OauthResource) { this.keys = payload.keys; this.url = payload.url; diff --git a/lib/rest/oauth/v1/openidDiscovery.ts b/lib/rest/oauth/v1/openidDiscovery.ts index 656abb5eb6..401420fa6d 100644 --- a/lib/rest/oauth/v1/openidDiscovery.ts +++ b/lib/rest/oauth/v1/openidDiscovery.ts @@ -45,7 +45,7 @@ export class OpenidDiscoveryContextImpl implements OpenidDiscoveryContext { constructor(protected _version: V1) { this._solution = {}; - this._uri = `/.well-known/openid-configuration`; + this._uri = `/well-known/openid-configuration`; } fetch(callback?: any): Promise { @@ -102,7 +102,7 @@ export class OpenidDiscoveryInstance { protected _solution: OpenidDiscoveryContextSolution; protected _context?: OpenidDiscoveryContext; - constructor(protected _version: V1, payload: OpenidDiscoveryPayload) { + constructor(protected _version: V1, payload: OpenidDiscoveryResource) { this.issuer = payload.issuer; this.authorizationEndpoint = payload.authorization_endpoint; this.deviceAuthorizationEndpoint = payload.device_authorization_endpoint; diff --git a/lib/rest/oauth/v1/token.ts b/lib/rest/oauth/v1/token.ts index 2c03d8a417..a3e093a425 100644 --- a/lib/rest/oauth/v1/token.ts +++ b/lib/rest/oauth/v1/token.ts @@ -158,7 +158,7 @@ interface TokenResource { } export class TokenInstance { - constructor(protected _version: V1, payload: TokenPayload) { + constructor(protected _version: V1, payload: TokenResource) { this.accessToken = payload.access_token; this.refreshToken = payload.refresh_token; this.idToken = payload.id_token; diff --git a/lib/rest/oauth/v1/userInfo.ts b/lib/rest/oauth/v1/userInfo.ts index 4d223174ba..bb2073e5aa 100644 --- a/lib/rest/oauth/v1/userInfo.ts +++ b/lib/rest/oauth/v1/userInfo.ts @@ -95,7 +95,7 @@ export class UserInfoInstance { protected _solution: UserInfoContextSolution; protected _context?: UserInfoContext; - constructor(protected _version: V1, payload: UserInfoPayload) { + constructor(protected _version: V1, payload: UserInfoResource) { this.userSid = payload.user_sid; this.firstName = payload.first_name; this.lastName = payload.last_name; diff --git a/lib/rest/preview/deployed_devices/fleet.ts b/lib/rest/preview/deployed_devices/fleet.ts index da647e5183..1cd08843ba 100644 --- a/lib/rest/preview/deployed_devices/fleet.ts +++ b/lib/rest/preview/deployed_devices/fleet.ts @@ -282,7 +282,9 @@ export class FleetContextImpl implements FleetContext { } } -interface FleetPayload extends FleetResource, TwilioResponsePayload {} +interface FleetPayload extends TwilioResponsePayload { + fleets: FleetResource[]; +} interface FleetResource { sid?: string | null; @@ -302,7 +304,7 @@ export class FleetInstance { constructor( protected _version: DeployedDevices, - payload: FleetPayload, + payload: FleetResource, sid?: string ) { this.sid = payload.sid; @@ -779,7 +781,7 @@ export class FleetPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: FleetPayload): FleetInstance { + getInstance(payload: FleetResource): FleetInstance { return new FleetInstance(this._version, payload); } diff --git a/lib/rest/preview/deployed_devices/fleet/certificate.ts b/lib/rest/preview/deployed_devices/fleet/certificate.ts index 95b2454905..dd207e65de 100644 --- a/lib/rest/preview/deployed_devices/fleet/certificate.ts +++ b/lib/rest/preview/deployed_devices/fleet/certificate.ts @@ -271,9 +271,9 @@ export class CertificateContextImpl implements CertificateContext { } } -interface CertificatePayload - extends CertificateResource, - TwilioResponsePayload {} +interface CertificatePayload extends TwilioResponsePayload { + certificates: CertificateResource[]; +} interface CertificateResource { sid?: string | null; @@ -293,7 +293,7 @@ export class CertificateInstance { constructor( protected _version: DeployedDevices, - payload: CertificatePayload, + payload: CertificateResource, fleetSid: string, sid?: string ) { @@ -764,7 +764,7 @@ export class CertificatePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: CertificatePayload): CertificateInstance { + getInstance(payload: CertificateResource): CertificateInstance { return new CertificateInstance( this._version, payload, diff --git a/lib/rest/preview/deployed_devices/fleet/deployment.ts b/lib/rest/preview/deployed_devices/fleet/deployment.ts index c58fabb765..cce0ec2141 100644 --- a/lib/rest/preview/deployed_devices/fleet/deployment.ts +++ b/lib/rest/preview/deployed_devices/fleet/deployment.ts @@ -263,7 +263,9 @@ export class DeploymentContextImpl implements DeploymentContext { } } -interface DeploymentPayload extends DeploymentResource, TwilioResponsePayload {} +interface DeploymentPayload extends TwilioResponsePayload { + deployments: DeploymentResource[]; +} interface DeploymentResource { sid?: string | null; @@ -282,7 +284,7 @@ export class DeploymentInstance { constructor( protected _version: DeployedDevices, - payload: DeploymentPayload, + payload: DeploymentResource, fleetSid: string, sid?: string ) { @@ -747,7 +749,7 @@ export class DeploymentPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: DeploymentPayload): DeploymentInstance { + getInstance(payload: DeploymentResource): DeploymentInstance { return new DeploymentInstance( this._version, payload, diff --git a/lib/rest/preview/deployed_devices/fleet/device.ts b/lib/rest/preview/deployed_devices/fleet/device.ts index 9b94bf494b..0c5907d110 100644 --- a/lib/rest/preview/deployed_devices/fleet/device.ts +++ b/lib/rest/preview/deployed_devices/fleet/device.ts @@ -282,7 +282,9 @@ export class DeviceContextImpl implements DeviceContext { } } -interface DevicePayload extends DeviceResource, TwilioResponsePayload {} +interface DevicePayload extends TwilioResponsePayload { + devices: DeviceResource[]; +} interface DeviceResource { sid?: string | null; @@ -305,7 +307,7 @@ export class DeviceInstance { constructor( protected _version: DeployedDevices, - payload: DevicePayload, + payload: DeviceResource, fleetSid: string, sid?: string ) { @@ -799,7 +801,7 @@ export class DevicePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: DevicePayload): DeviceInstance { + getInstance(payload: DeviceResource): DeviceInstance { return new DeviceInstance(this._version, payload, this._solution.fleetSid); } diff --git a/lib/rest/preview/deployed_devices/fleet/key.ts b/lib/rest/preview/deployed_devices/fleet/key.ts index d80494051f..502e7f2f79 100644 --- a/lib/rest/preview/deployed_devices/fleet/key.ts +++ b/lib/rest/preview/deployed_devices/fleet/key.ts @@ -269,7 +269,9 @@ export class KeyContextImpl implements KeyContext { } } -interface KeyPayload extends KeyResource, TwilioResponsePayload {} +interface KeyPayload extends TwilioResponsePayload { + keys: KeyResource[]; +} interface KeyResource { sid?: string | null; @@ -289,7 +291,7 @@ export class KeyInstance { constructor( protected _version: DeployedDevices, - payload: KeyPayload, + payload: KeyResource, fleetSid: string, sid?: string ) { @@ -758,7 +760,7 @@ export class KeyPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: KeyPayload): KeyInstance { + getInstance(payload: KeyResource): KeyInstance { return new KeyInstance(this._version, payload, this._solution.fleetSid); } diff --git a/lib/rest/preview/hosted_numbers/authorizationDocument.ts b/lib/rest/preview/hosted_numbers/authorizationDocument.ts index 9ab09d62c2..231d6714a3 100644 --- a/lib/rest/preview/hosted_numbers/authorizationDocument.ts +++ b/lib/rest/preview/hosted_numbers/authorizationDocument.ts @@ -301,9 +301,9 @@ export class AuthorizationDocumentContextImpl } } -interface AuthorizationDocumentPayload - extends AuthorizationDocumentResource, - TwilioResponsePayload {} +interface AuthorizationDocumentPayload extends TwilioResponsePayload { + items: AuthorizationDocumentResource[]; +} interface AuthorizationDocumentResource { sid?: string | null; @@ -323,7 +323,7 @@ export class AuthorizationDocumentInstance { constructor( protected _version: HostedNumbers, - payload: AuthorizationDocumentPayload, + payload: AuthorizationDocumentResource, sid?: string ) { this.sid = payload.sid; @@ -825,7 +825,7 @@ export class AuthorizationDocumentPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: AuthorizationDocumentPayload + payload: AuthorizationDocumentResource ): AuthorizationDocumentInstance { return new AuthorizationDocumentInstance(this._version, payload); } diff --git a/lib/rest/preview/hosted_numbers/authorizationDocument/dependentHostedNumberOrder.ts b/lib/rest/preview/hosted_numbers/authorizationDocument/dependentHostedNumberOrder.ts index 73b7862010..e35d89b9bb 100644 --- a/lib/rest/preview/hosted_numbers/authorizationDocument/dependentHostedNumberOrder.ts +++ b/lib/rest/preview/hosted_numbers/authorizationDocument/dependentHostedNumberOrder.ts @@ -394,9 +394,9 @@ export function DependentHostedNumberOrderListInstance( return instance; } -interface DependentHostedNumberOrderPayload - extends DependentHostedNumberOrderResource, - TwilioResponsePayload {} +interface DependentHostedNumberOrderPayload extends TwilioResponsePayload { + items: DependentHostedNumberOrderResource[]; +} interface DependentHostedNumberOrderResource { sid?: string | null; @@ -426,7 +426,7 @@ interface DependentHostedNumberOrderResource { export class DependentHostedNumberOrderInstance { constructor( protected _version: HostedNumbers, - payload: DependentHostedNumberOrderPayload, + payload: DependentHostedNumberOrderResource, signingDocumentSid: string ) { this.sid = payload.sid; @@ -599,7 +599,7 @@ export class DependentHostedNumberOrderPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: DependentHostedNumberOrderPayload + payload: DependentHostedNumberOrderResource ): DependentHostedNumberOrderInstance { return new DependentHostedNumberOrderInstance( this._version, diff --git a/lib/rest/preview/hosted_numbers/hostedNumberOrder.ts b/lib/rest/preview/hosted_numbers/hostedNumberOrder.ts index c9ba55d4a3..7bab2d20a1 100644 --- a/lib/rest/preview/hosted_numbers/hostedNumberOrder.ts +++ b/lib/rest/preview/hosted_numbers/hostedNumberOrder.ts @@ -359,9 +359,9 @@ export class HostedNumberOrderContextImpl implements HostedNumberOrderContext { } } -interface HostedNumberOrderPayload - extends HostedNumberOrderResource, - TwilioResponsePayload {} +interface HostedNumberOrderPayload extends TwilioResponsePayload { + items: HostedNumberOrderResource[]; +} interface HostedNumberOrderResource { sid?: string | null; @@ -395,7 +395,7 @@ export class HostedNumberOrderInstance { constructor( protected _version: HostedNumbers, - payload: HostedNumberOrderPayload, + payload: HostedNumberOrderResource, sid?: string ) { this.sid = payload.sid; @@ -974,7 +974,7 @@ export class HostedNumberOrderPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: HostedNumberOrderPayload): HostedNumberOrderInstance { + getInstance(payload: HostedNumberOrderResource): HostedNumberOrderInstance { return new HostedNumberOrderInstance(this._version, payload); } diff --git a/lib/rest/preview/marketplace/availableAddOn.ts b/lib/rest/preview/marketplace/availableAddOn.ts index e2a7223d57..9f7a1c5681 100644 --- a/lib/rest/preview/marketplace/availableAddOn.ts +++ b/lib/rest/preview/marketplace/availableAddOn.ts @@ -155,9 +155,9 @@ export class AvailableAddOnContextImpl implements AvailableAddOnContext { } } -interface AvailableAddOnPayload - extends AvailableAddOnResource, - TwilioResponsePayload {} +interface AvailableAddOnPayload extends TwilioResponsePayload { + available_add_ons: AvailableAddOnResource[]; +} interface AvailableAddOnResource { sid?: string | null; @@ -175,7 +175,7 @@ export class AvailableAddOnInstance { constructor( protected _version: Marketplace, - payload: AvailableAddOnPayload, + payload: AvailableAddOnResource, sid?: string ) { this.sid = payload.sid; @@ -530,7 +530,7 @@ export class AvailableAddOnPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: AvailableAddOnPayload): AvailableAddOnInstance { + getInstance(payload: AvailableAddOnResource): AvailableAddOnInstance { return new AvailableAddOnInstance(this._version, payload); } diff --git a/lib/rest/preview/marketplace/availableAddOn/availableAddOnExtension.ts b/lib/rest/preview/marketplace/availableAddOn/availableAddOnExtension.ts index 8cdfcf8171..9bf006b958 100644 --- a/lib/rest/preview/marketplace/availableAddOn/availableAddOnExtension.ts +++ b/lib/rest/preview/marketplace/availableAddOn/availableAddOnExtension.ts @@ -158,9 +158,9 @@ export class AvailableAddOnExtensionContextImpl } } -interface AvailableAddOnExtensionPayload - extends AvailableAddOnExtensionResource, - TwilioResponsePayload {} +interface AvailableAddOnExtensionPayload extends TwilioResponsePayload { + extensions: AvailableAddOnExtensionResource[]; +} interface AvailableAddOnExtensionResource { sid?: string | null; @@ -177,7 +177,7 @@ export class AvailableAddOnExtensionInstance { constructor( protected _version: Marketplace, - payload: AvailableAddOnExtensionPayload, + payload: AvailableAddOnExtensionResource, availableAddOnSid: string, sid?: string ) { @@ -555,7 +555,7 @@ export class AvailableAddOnExtensionPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: AvailableAddOnExtensionPayload + payload: AvailableAddOnExtensionResource ): AvailableAddOnExtensionInstance { return new AvailableAddOnExtensionInstance( this._version, diff --git a/lib/rest/preview/marketplace/installedAddOn.ts b/lib/rest/preview/marketplace/installedAddOn.ts index 069becd703..6f46d49f3a 100644 --- a/lib/rest/preview/marketplace/installedAddOn.ts +++ b/lib/rest/preview/marketplace/installedAddOn.ts @@ -271,9 +271,9 @@ export class InstalledAddOnContextImpl implements InstalledAddOnContext { } } -interface InstalledAddOnPayload - extends InstalledAddOnResource, - TwilioResponsePayload {} +interface InstalledAddOnPayload extends TwilioResponsePayload { + installed_add_ons: InstalledAddOnResource[]; +} interface InstalledAddOnResource { sid?: string | null; @@ -294,7 +294,7 @@ export class InstalledAddOnInstance { constructor( protected _version: Marketplace, - payload: InstalledAddOnPayload, + payload: InstalledAddOnResource, sid?: string ) { this.sid = payload.sid; @@ -780,7 +780,7 @@ export class InstalledAddOnPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: InstalledAddOnPayload): InstalledAddOnInstance { + getInstance(payload: InstalledAddOnResource): InstalledAddOnInstance { return new InstalledAddOnInstance(this._version, payload); } diff --git a/lib/rest/preview/marketplace/installedAddOn/installedAddOnExtension.ts b/lib/rest/preview/marketplace/installedAddOn/installedAddOnExtension.ts index b00fffc5b1..7397bb8a8a 100644 --- a/lib/rest/preview/marketplace/installedAddOn/installedAddOnExtension.ts +++ b/lib/rest/preview/marketplace/installedAddOn/installedAddOnExtension.ts @@ -227,9 +227,9 @@ export class InstalledAddOnExtensionContextImpl } } -interface InstalledAddOnExtensionPayload - extends InstalledAddOnExtensionResource, - TwilioResponsePayload {} +interface InstalledAddOnExtensionPayload extends TwilioResponsePayload { + extensions: InstalledAddOnExtensionResource[]; +} interface InstalledAddOnExtensionResource { sid?: string | null; @@ -247,7 +247,7 @@ export class InstalledAddOnExtensionInstance { constructor( protected _version: Marketplace, - payload: InstalledAddOnExtensionPayload, + payload: InstalledAddOnExtensionResource, installedAddOnSid: string, sid?: string ) { @@ -653,7 +653,7 @@ export class InstalledAddOnExtensionPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: InstalledAddOnExtensionPayload + payload: InstalledAddOnExtensionResource ): InstalledAddOnExtensionInstance { return new InstalledAddOnExtensionInstance( this._version, diff --git a/lib/rest/preview/sync/service.ts b/lib/rest/preview/sync/service.ts index 5f9e2508a5..9e0b9a25ec 100644 --- a/lib/rest/preview/sync/service.ts +++ b/lib/rest/preview/sync/service.ts @@ -289,7 +289,9 @@ export class ServiceContextImpl implements ServiceContext { } } -interface ServicePayload extends ServiceResource, TwilioResponsePayload {} +interface ServicePayload extends TwilioResponsePayload { + services: ServiceResource[]; +} interface ServiceResource { sid?: string | null; @@ -308,7 +310,11 @@ export class ServiceInstance { protected _solution: ServiceContextSolution; protected _context?: ServiceContext; - constructor(protected _version: Sync, payload: ServicePayload, sid?: string) { + constructor( + protected _version: Sync, + payload: ServiceResource, + sid?: string + ) { this.sid = payload.sid; this.accountSid = payload.account_sid; this.friendlyName = payload.friendly_name; @@ -761,7 +767,7 @@ export class ServicePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ServicePayload): ServiceInstance { + getInstance(payload: ServiceResource): ServiceInstance { return new ServiceInstance(this._version, payload); } diff --git a/lib/rest/preview/sync/service/document.ts b/lib/rest/preview/sync/service/document.ts index 667f47edfc..27d75f0547 100644 --- a/lib/rest/preview/sync/service/document.ts +++ b/lib/rest/preview/sync/service/document.ts @@ -265,7 +265,9 @@ export class DocumentContextImpl implements DocumentContext { } } -interface DocumentPayload extends DocumentResource, TwilioResponsePayload {} +interface DocumentPayload extends TwilioResponsePayload { + documents: DocumentResource[]; +} interface DocumentResource { sid?: string | null; @@ -287,7 +289,7 @@ export class DocumentInstance { constructor( protected _version: Sync, - payload: DocumentPayload, + payload: DocumentResource, serviceSid: string, sid?: string ) { @@ -734,7 +736,7 @@ export class DocumentPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: DocumentPayload): DocumentInstance { + getInstance(payload: DocumentResource): DocumentInstance { return new DocumentInstance( this._version, payload, diff --git a/lib/rest/preview/sync/service/document/documentPermission.ts b/lib/rest/preview/sync/service/document/documentPermission.ts index 4a80d3a61d..e4d6d655ac 100644 --- a/lib/rest/preview/sync/service/document/documentPermission.ts +++ b/lib/rest/preview/sync/service/document/documentPermission.ts @@ -267,9 +267,9 @@ export class DocumentPermissionContextImpl } } -interface DocumentPermissionPayload - extends DocumentPermissionResource, - TwilioResponsePayload {} +interface DocumentPermissionPayload extends TwilioResponsePayload { + permissions: DocumentPermissionResource[]; +} interface DocumentPermissionResource { account_sid?: string | null; @@ -288,7 +288,7 @@ export class DocumentPermissionInstance { constructor( protected _version: Sync, - payload: DocumentPermissionPayload, + payload: DocumentPermissionResource, serviceSid: string, documentSid: string, identity?: string @@ -703,7 +703,7 @@ export class DocumentPermissionPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: DocumentPermissionPayload): DocumentPermissionInstance { + getInstance(payload: DocumentPermissionResource): DocumentPermissionInstance { return new DocumentPermissionInstance( this._version, payload, diff --git a/lib/rest/preview/sync/service/syncList.ts b/lib/rest/preview/sync/service/syncList.ts index aa1dda6e27..a262f34d4e 100644 --- a/lib/rest/preview/sync/service/syncList.ts +++ b/lib/rest/preview/sync/service/syncList.ts @@ -209,7 +209,9 @@ export class SyncListContextImpl implements SyncListContext { } } -interface SyncListPayload extends SyncListResource, TwilioResponsePayload {} +interface SyncListPayload extends TwilioResponsePayload { + lists: SyncListResource[]; +} interface SyncListResource { sid?: string | null; @@ -230,7 +232,7 @@ export class SyncListInstance { constructor( protected _version: Sync, - payload: SyncListPayload, + payload: SyncListResource, serviceSid: string, sid?: string ) { @@ -663,7 +665,7 @@ export class SyncListPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SyncListPayload): SyncListInstance { + getInstance(payload: SyncListResource): SyncListInstance { return new SyncListInstance( this._version, payload, diff --git a/lib/rest/preview/sync/service/syncList/syncListItem.ts b/lib/rest/preview/sync/service/syncList/syncListItem.ts index f1675c4972..6cf25a55ec 100644 --- a/lib/rest/preview/sync/service/syncList/syncListItem.ts +++ b/lib/rest/preview/sync/service/syncList/syncListItem.ts @@ -318,9 +318,9 @@ export class SyncListItemContextImpl implements SyncListItemContext { } } -interface SyncListItemPayload - extends SyncListItemResource, - TwilioResponsePayload {} +interface SyncListItemPayload extends TwilioResponsePayload { + items: SyncListItemResource[]; +} interface SyncListItemResource { index?: number | null; @@ -341,7 +341,7 @@ export class SyncListItemInstance { constructor( protected _version: Sync, - payload: SyncListItemPayload, + payload: SyncListItemResource, serviceSid: string, listSid: string, index?: number @@ -793,7 +793,7 @@ export class SyncListItemPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SyncListItemPayload): SyncListItemInstance { + getInstance(payload: SyncListItemResource): SyncListItemInstance { return new SyncListItemInstance( this._version, payload, diff --git a/lib/rest/preview/sync/service/syncList/syncListPermission.ts b/lib/rest/preview/sync/service/syncList/syncListPermission.ts index 872e24c22e..6d4ef8f302 100644 --- a/lib/rest/preview/sync/service/syncList/syncListPermission.ts +++ b/lib/rest/preview/sync/service/syncList/syncListPermission.ts @@ -267,9 +267,9 @@ export class SyncListPermissionContextImpl } } -interface SyncListPermissionPayload - extends SyncListPermissionResource, - TwilioResponsePayload {} +interface SyncListPermissionPayload extends TwilioResponsePayload { + permissions: SyncListPermissionResource[]; +} interface SyncListPermissionResource { account_sid?: string | null; @@ -288,7 +288,7 @@ export class SyncListPermissionInstance { constructor( protected _version: Sync, - payload: SyncListPermissionPayload, + payload: SyncListPermissionResource, serviceSid: string, listSid: string, identity?: string @@ -703,7 +703,7 @@ export class SyncListPermissionPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SyncListPermissionPayload): SyncListPermissionInstance { + getInstance(payload: SyncListPermissionResource): SyncListPermissionInstance { return new SyncListPermissionInstance( this._version, payload, diff --git a/lib/rest/preview/sync/service/syncMap.ts b/lib/rest/preview/sync/service/syncMap.ts index 01f8626a96..2ef7ff51f9 100644 --- a/lib/rest/preview/sync/service/syncMap.ts +++ b/lib/rest/preview/sync/service/syncMap.ts @@ -209,7 +209,9 @@ export class SyncMapContextImpl implements SyncMapContext { } } -interface SyncMapPayload extends SyncMapResource, TwilioResponsePayload {} +interface SyncMapPayload extends TwilioResponsePayload { + maps: SyncMapResource[]; +} interface SyncMapResource { sid?: string | null; @@ -230,7 +232,7 @@ export class SyncMapInstance { constructor( protected _version: Sync, - payload: SyncMapPayload, + payload: SyncMapResource, serviceSid: string, sid?: string ) { @@ -663,7 +665,7 @@ export class SyncMapPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SyncMapPayload): SyncMapInstance { + getInstance(payload: SyncMapResource): SyncMapInstance { return new SyncMapInstance( this._version, payload, diff --git a/lib/rest/preview/sync/service/syncMap/syncMapItem.ts b/lib/rest/preview/sync/service/syncMap/syncMapItem.ts index 33fd988b1c..bd2e7fc23b 100644 --- a/lib/rest/preview/sync/service/syncMap/syncMapItem.ts +++ b/lib/rest/preview/sync/service/syncMap/syncMapItem.ts @@ -320,9 +320,9 @@ export class SyncMapItemContextImpl implements SyncMapItemContext { } } -interface SyncMapItemPayload - extends SyncMapItemResource, - TwilioResponsePayload {} +interface SyncMapItemPayload extends TwilioResponsePayload { + items: SyncMapItemResource[]; +} interface SyncMapItemResource { key?: string | null; @@ -343,7 +343,7 @@ export class SyncMapItemInstance { constructor( protected _version: Sync, - payload: SyncMapItemPayload, + payload: SyncMapItemResource, serviceSid: string, mapSid: string, key?: string @@ -800,7 +800,7 @@ export class SyncMapItemPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SyncMapItemPayload): SyncMapItemInstance { + getInstance(payload: SyncMapItemResource): SyncMapItemInstance { return new SyncMapItemInstance( this._version, payload, diff --git a/lib/rest/preview/sync/service/syncMap/syncMapPermission.ts b/lib/rest/preview/sync/service/syncMap/syncMapPermission.ts index 2df529b81f..b4f8780e1b 100644 --- a/lib/rest/preview/sync/service/syncMap/syncMapPermission.ts +++ b/lib/rest/preview/sync/service/syncMap/syncMapPermission.ts @@ -265,9 +265,9 @@ export class SyncMapPermissionContextImpl implements SyncMapPermissionContext { } } -interface SyncMapPermissionPayload - extends SyncMapPermissionResource, - TwilioResponsePayload {} +interface SyncMapPermissionPayload extends TwilioResponsePayload { + permissions: SyncMapPermissionResource[]; +} interface SyncMapPermissionResource { account_sid?: string | null; @@ -286,7 +286,7 @@ export class SyncMapPermissionInstance { constructor( protected _version: Sync, - payload: SyncMapPermissionPayload, + payload: SyncMapPermissionResource, serviceSid: string, mapSid: string, identity?: string @@ -701,7 +701,7 @@ export class SyncMapPermissionPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SyncMapPermissionPayload): SyncMapPermissionInstance { + getInstance(payload: SyncMapPermissionResource): SyncMapPermissionInstance { return new SyncMapPermissionInstance( this._version, payload, diff --git a/lib/rest/preview/understand/assistant.ts b/lib/rest/preview/understand/assistant.ts index 731c23674f..a8e12aa27f 100644 --- a/lib/rest/preview/understand/assistant.ts +++ b/lib/rest/preview/understand/assistant.ts @@ -360,7 +360,9 @@ export class AssistantContextImpl implements AssistantContext { } } -interface AssistantPayload extends AssistantResource, TwilioResponsePayload {} +interface AssistantPayload extends TwilioResponsePayload { + assistants: AssistantResource[]; +} interface AssistantResource { account_sid?: string | null; @@ -383,7 +385,7 @@ export class AssistantInstance { constructor( protected _version: Understand, - payload: AssistantPayload, + payload: AssistantResource, sid?: string ) { this.accountSid = payload.account_sid; @@ -917,7 +919,7 @@ export class AssistantPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: AssistantPayload): AssistantInstance { + getInstance(payload: AssistantResource): AssistantInstance { return new AssistantInstance(this._version, payload); } diff --git a/lib/rest/preview/understand/assistant/assistantFallbackActions.ts b/lib/rest/preview/understand/assistant/assistantFallbackActions.ts index ac860e11c6..5163811662 100644 --- a/lib/rest/preview/understand/assistant/assistantFallbackActions.ts +++ b/lib/rest/preview/understand/assistant/assistantFallbackActions.ts @@ -197,7 +197,7 @@ export class AssistantFallbackActionsInstance { constructor( protected _version: Understand, - payload: AssistantFallbackActionsPayload, + payload: AssistantFallbackActionsResource, assistantSid: string ) { this.accountSid = payload.account_sid; diff --git a/lib/rest/preview/understand/assistant/assistantInitiationActions.ts b/lib/rest/preview/understand/assistant/assistantInitiationActions.ts index 5b8eed112a..a4a7f3e2b6 100644 --- a/lib/rest/preview/understand/assistant/assistantInitiationActions.ts +++ b/lib/rest/preview/understand/assistant/assistantInitiationActions.ts @@ -197,7 +197,7 @@ export class AssistantInitiationActionsInstance { constructor( protected _version: Understand, - payload: AssistantInitiationActionsPayload, + payload: AssistantInitiationActionsResource, assistantSid: string ) { this.accountSid = payload.account_sid; diff --git a/lib/rest/preview/understand/assistant/dialogue.ts b/lib/rest/preview/understand/assistant/dialogue.ts index 16698b6625..0e2151d3e8 100644 --- a/lib/rest/preview/understand/assistant/dialogue.ts +++ b/lib/rest/preview/understand/assistant/dialogue.ts @@ -117,7 +117,7 @@ export class DialogueInstance { constructor( protected _version: Understand, - payload: DialoguePayload, + payload: DialogueResource, assistantSid: string, sid?: string ) { diff --git a/lib/rest/preview/understand/assistant/fieldType.ts b/lib/rest/preview/understand/assistant/fieldType.ts index b141755760..a214c8c13a 100644 --- a/lib/rest/preview/understand/assistant/fieldType.ts +++ b/lib/rest/preview/understand/assistant/fieldType.ts @@ -279,7 +279,9 @@ export class FieldTypeContextImpl implements FieldTypeContext { } } -interface FieldTypePayload extends FieldTypeResource, TwilioResponsePayload {} +interface FieldTypePayload extends TwilioResponsePayload { + field_types: FieldTypeResource[]; +} interface FieldTypeResource { account_sid?: string | null; @@ -299,7 +301,7 @@ export class FieldTypeInstance { constructor( protected _version: Understand, - payload: FieldTypePayload, + payload: FieldTypeResource, assistantSid: string, sid?: string ) { @@ -761,7 +763,7 @@ export class FieldTypePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: FieldTypePayload): FieldTypeInstance { + getInstance(payload: FieldTypeResource): FieldTypeInstance { return new FieldTypeInstance( this._version, payload, diff --git a/lib/rest/preview/understand/assistant/fieldType/fieldValue.ts b/lib/rest/preview/understand/assistant/fieldType/fieldValue.ts index 3436a40243..14c95c8680 100644 --- a/lib/rest/preview/understand/assistant/fieldType/fieldValue.ts +++ b/lib/rest/preview/understand/assistant/fieldType/fieldValue.ts @@ -200,7 +200,9 @@ export class FieldValueContextImpl implements FieldValueContext { } } -interface FieldValuePayload extends FieldValueResource, TwilioResponsePayload {} +interface FieldValuePayload extends TwilioResponsePayload { + field_values: FieldValueResource[]; +} interface FieldValueResource { account_sid?: string | null; @@ -221,7 +223,7 @@ export class FieldValueInstance { constructor( protected _version: Understand, - payload: FieldValuePayload, + payload: FieldValueResource, assistantSid: string, fieldTypeSid: string, sid?: string @@ -675,7 +677,7 @@ export class FieldValuePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: FieldValuePayload): FieldValueInstance { + getInstance(payload: FieldValueResource): FieldValueInstance { return new FieldValueInstance( this._version, payload, diff --git a/lib/rest/preview/understand/assistant/modelBuild.ts b/lib/rest/preview/understand/assistant/modelBuild.ts index 5fc8cf875f..72dab61786 100644 --- a/lib/rest/preview/understand/assistant/modelBuild.ts +++ b/lib/rest/preview/understand/assistant/modelBuild.ts @@ -266,7 +266,9 @@ export class ModelBuildContextImpl implements ModelBuildContext { } } -interface ModelBuildPayload extends ModelBuildResource, TwilioResponsePayload {} +interface ModelBuildPayload extends TwilioResponsePayload { + model_builds: ModelBuildResource[]; +} interface ModelBuildResource { account_sid?: string | null; @@ -287,7 +289,7 @@ export class ModelBuildInstance { constructor( protected _version: Understand, - payload: ModelBuildPayload, + payload: ModelBuildResource, assistantSid: string, sid?: string ) { @@ -755,7 +757,7 @@ export class ModelBuildPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ModelBuildPayload): ModelBuildInstance { + getInstance(payload: ModelBuildResource): ModelBuildInstance { return new ModelBuildInstance( this._version, payload, diff --git a/lib/rest/preview/understand/assistant/query.ts b/lib/rest/preview/understand/assistant/query.ts index 3ef2ec7dfc..2f7924adf5 100644 --- a/lib/rest/preview/understand/assistant/query.ts +++ b/lib/rest/preview/understand/assistant/query.ts @@ -286,7 +286,9 @@ export class QueryContextImpl implements QueryContext { } } -interface QueryPayload extends QueryResource, TwilioResponsePayload {} +interface QueryPayload extends TwilioResponsePayload { + queries: QueryResource[]; +} interface QueryResource { account_sid?: string | null; @@ -310,7 +312,7 @@ export class QueryInstance { constructor( protected _version: Understand, - payload: QueryPayload, + payload: QueryResource, assistantSid: string, sid?: string ) { @@ -804,7 +806,7 @@ export class QueryPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: QueryPayload): QueryInstance { + getInstance(payload: QueryResource): QueryInstance { return new QueryInstance( this._version, payload, diff --git a/lib/rest/preview/understand/assistant/styleSheet.ts b/lib/rest/preview/understand/assistant/styleSheet.ts index 9c05a7d2dd..f1888c4e43 100644 --- a/lib/rest/preview/understand/assistant/styleSheet.ts +++ b/lib/rest/preview/understand/assistant/styleSheet.ts @@ -179,7 +179,7 @@ export class StyleSheetInstance { constructor( protected _version: Understand, - payload: StyleSheetPayload, + payload: StyleSheetResource, assistantSid: string ) { this.accountSid = payload.account_sid; diff --git a/lib/rest/preview/understand/assistant/task.ts b/lib/rest/preview/understand/assistant/task.ts index a73a5027d8..51d8ff29ec 100644 --- a/lib/rest/preview/understand/assistant/task.ts +++ b/lib/rest/preview/understand/assistant/task.ts @@ -333,7 +333,9 @@ export class TaskContextImpl implements TaskContext { } } -interface TaskPayload extends TaskResource, TwilioResponsePayload {} +interface TaskPayload extends TwilioResponsePayload { + tasks: TaskResource[]; +} interface TaskResource { account_sid?: string | null; @@ -354,7 +356,7 @@ export class TaskInstance { constructor( protected _version: Understand, - payload: TaskPayload, + payload: TaskResource, assistantSid: string, sid?: string ) { @@ -843,7 +845,7 @@ export class TaskPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: TaskPayload): TaskInstance { + getInstance(payload: TaskResource): TaskInstance { return new TaskInstance( this._version, payload, diff --git a/lib/rest/preview/understand/assistant/task/field.ts b/lib/rest/preview/understand/assistant/task/field.ts index 3aa40f064a..d995d566a6 100644 --- a/lib/rest/preview/understand/assistant/task/field.ts +++ b/lib/rest/preview/understand/assistant/task/field.ts @@ -192,7 +192,9 @@ export class FieldContextImpl implements FieldContext { } } -interface FieldPayload extends FieldResource, TwilioResponsePayload {} +interface FieldPayload extends TwilioResponsePayload { + fields: FieldResource[]; +} interface FieldResource { account_sid?: string | null; @@ -212,7 +214,7 @@ export class FieldInstance { constructor( protected _version: Understand, - payload: FieldPayload, + payload: FieldResource, assistantSid: string, taskSid: string, sid?: string @@ -657,7 +659,7 @@ export class FieldPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: FieldPayload): FieldInstance { + getInstance(payload: FieldResource): FieldInstance { return new FieldInstance( this._version, payload, diff --git a/lib/rest/preview/understand/assistant/task/sample.ts b/lib/rest/preview/understand/assistant/task/sample.ts index 7d75c965b6..8d865580d5 100644 --- a/lib/rest/preview/understand/assistant/task/sample.ts +++ b/lib/rest/preview/understand/assistant/task/sample.ts @@ -282,7 +282,9 @@ export class SampleContextImpl implements SampleContext { } } -interface SamplePayload extends SampleResource, TwilioResponsePayload {} +interface SamplePayload extends TwilioResponsePayload { + samples: SampleResource[]; +} interface SampleResource { account_sid?: string | null; @@ -303,7 +305,7 @@ export class SampleInstance { constructor( protected _version: Understand, - payload: SamplePayload, + payload: SampleResource, assistantSid: string, taskSid: string, sid?: string @@ -783,7 +785,7 @@ export class SamplePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SamplePayload): SampleInstance { + getInstance(payload: SampleResource): SampleInstance { return new SampleInstance( this._version, payload, diff --git a/lib/rest/preview/understand/assistant/task/taskActions.ts b/lib/rest/preview/understand/assistant/task/taskActions.ts index 68fe415fb4..b5163be5a7 100644 --- a/lib/rest/preview/understand/assistant/task/taskActions.ts +++ b/lib/rest/preview/understand/assistant/task/taskActions.ts @@ -191,7 +191,7 @@ export class TaskActionsInstance { constructor( protected _version: Understand, - payload: TaskActionsPayload, + payload: TaskActionsResource, assistantSid: string, taskSid: string ) { diff --git a/lib/rest/preview/understand/assistant/task/taskStatistics.ts b/lib/rest/preview/understand/assistant/task/taskStatistics.ts index 87fc4cf1fc..4f9c710517 100644 --- a/lib/rest/preview/understand/assistant/task/taskStatistics.ts +++ b/lib/rest/preview/understand/assistant/task/taskStatistics.ts @@ -118,7 +118,7 @@ export class TaskStatisticsInstance { constructor( protected _version: Understand, - payload: TaskStatisticsPayload, + payload: TaskStatisticsResource, assistantSid: string, taskSid: string ) { diff --git a/lib/rest/preview/wireless/command.ts b/lib/rest/preview/wireless/command.ts index 64b41ad27d..68e9a6858b 100644 --- a/lib/rest/preview/wireless/command.ts +++ b/lib/rest/preview/wireless/command.ts @@ -180,7 +180,9 @@ export class CommandContextImpl implements CommandContext { } } -interface CommandPayload extends CommandResource, TwilioResponsePayload {} +interface CommandPayload extends TwilioResponsePayload { + commands: CommandResource[]; +} interface CommandResource { sid?: string | null; @@ -202,7 +204,7 @@ export class CommandInstance { constructor( protected _version: Wireless, - payload: CommandPayload, + payload: CommandResource, sid?: string ) { this.sid = payload.sid; @@ -597,7 +599,7 @@ export class CommandPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: CommandPayload): CommandInstance { + getInstance(payload: CommandResource): CommandInstance { return new CommandInstance(this._version, payload); } diff --git a/lib/rest/preview/wireless/ratePlan.ts b/lib/rest/preview/wireless/ratePlan.ts index 5647a1a8f3..c44c8dd0ae 100644 --- a/lib/rest/preview/wireless/ratePlan.ts +++ b/lib/rest/preview/wireless/ratePlan.ts @@ -260,7 +260,9 @@ export class RatePlanContextImpl implements RatePlanContext { } } -interface RatePlanPayload extends RatePlanResource, TwilioResponsePayload {} +interface RatePlanPayload extends TwilioResponsePayload { + rate_plans: RatePlanResource[]; +} interface RatePlanResource { sid?: string | null; @@ -285,7 +287,7 @@ export class RatePlanInstance { constructor( protected _version: Wireless, - payload: RatePlanPayload, + payload: RatePlanResource, sid?: string ) { this.sid = payload.sid; @@ -746,7 +748,7 @@ export class RatePlanPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: RatePlanPayload): RatePlanInstance { + getInstance(payload: RatePlanResource): RatePlanInstance { return new RatePlanInstance(this._version, payload); } diff --git a/lib/rest/preview/wireless/sim.ts b/lib/rest/preview/wireless/sim.ts index abbf116bfe..98eee8f49b 100644 --- a/lib/rest/preview/wireless/sim.ts +++ b/lib/rest/preview/wireless/sim.ts @@ -323,7 +323,9 @@ export type SimVoiceMethod = | "PUT" | "DELETE"; -interface SimPayload extends SimResource, TwilioResponsePayload {} +interface SimPayload extends TwilioResponsePayload { + sims: SimResource[]; +} interface SimResource { sid?: string | null; @@ -354,7 +356,11 @@ export class SimInstance { protected _solution: SimContextSolution; protected _context?: SimContext; - constructor(protected _version: Wireless, payload: SimPayload, sid?: string) { + constructor( + protected _version: Wireless, + payload: SimResource, + sid?: string + ) { this.sid = payload.sid; this.uniqueName = payload.unique_name; this.accountSid = payload.account_sid; @@ -751,7 +757,7 @@ export class SimPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SimPayload): SimInstance { + getInstance(payload: SimResource): SimInstance { return new SimInstance(this._version, payload); } diff --git a/lib/rest/preview/wireless/sim/usage.ts b/lib/rest/preview/wireless/sim/usage.ts index 1bef358fb0..080ca342bd 100644 --- a/lib/rest/preview/wireless/sim/usage.ts +++ b/lib/rest/preview/wireless/sim/usage.ts @@ -147,7 +147,7 @@ export class UsageInstance { constructor( protected _version: Wireless, - payload: UsagePayload, + payload: UsageResource, simSid: string ) { this.simSid = payload.sim_sid; diff --git a/lib/rest/pricing/v1/messaging/country.ts b/lib/rest/pricing/v1/messaging/country.ts index d35668e020..2478af8f9f 100644 --- a/lib/rest/pricing/v1/messaging/country.ts +++ b/lib/rest/pricing/v1/messaging/country.ts @@ -159,7 +159,9 @@ export class CountryContextImpl implements CountryContext { } } -interface CountryPayload extends CountryResource, TwilioResponsePayload {} +interface CountryPayload extends TwilioResponsePayload { + countries: CountryResource[]; +} interface CountryResource { country?: string | null; @@ -176,7 +178,7 @@ export class CountryInstance { constructor( protected _version: V1, - payload: CountryPayload, + payload: CountryResource, isoCountry?: string ) { this.country = payload.country; @@ -508,7 +510,7 @@ export class CountryPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: CountryPayload): CountryInstance { + getInstance(payload: CountryResource): CountryInstance { return new CountryInstance(this._version, payload); } diff --git a/lib/rest/pricing/v1/phoneNumber/country.ts b/lib/rest/pricing/v1/phoneNumber/country.ts index 4649e3fce8..d96aaae2c3 100644 --- a/lib/rest/pricing/v1/phoneNumber/country.ts +++ b/lib/rest/pricing/v1/phoneNumber/country.ts @@ -146,7 +146,9 @@ export class CountryContextImpl implements CountryContext { } } -interface CountryPayload extends CountryResource, TwilioResponsePayload {} +interface CountryPayload extends TwilioResponsePayload { + countries: CountryResource[]; +} interface CountryResource { country?: string | null; @@ -162,7 +164,7 @@ export class CountryInstance { constructor( protected _version: V1, - payload: CountryPayload, + payload: CountryResource, isoCountry?: string ) { this.country = payload.country; @@ -488,7 +490,7 @@ export class CountryPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: CountryPayload): CountryInstance { + getInstance(payload: CountryResource): CountryInstance { return new CountryInstance(this._version, payload); } diff --git a/lib/rest/pricing/v1/voice/country.ts b/lib/rest/pricing/v1/voice/country.ts index e90d8fdaea..a91503008d 100644 --- a/lib/rest/pricing/v1/voice/country.ts +++ b/lib/rest/pricing/v1/voice/country.ts @@ -153,7 +153,9 @@ export class CountryContextImpl implements CountryContext { } } -interface CountryPayload extends CountryResource, TwilioResponsePayload {} +interface CountryPayload extends TwilioResponsePayload { + countries: CountryResource[]; +} interface CountryResource { country?: string | null; @@ -170,7 +172,7 @@ export class CountryInstance { constructor( protected _version: V1, - payload: CountryPayload, + payload: CountryResource, isoCountry?: string ) { this.country = payload.country; @@ -502,7 +504,7 @@ export class CountryPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: CountryPayload): CountryInstance { + getInstance(payload: CountryResource): CountryInstance { return new CountryInstance(this._version, payload); } diff --git a/lib/rest/pricing/v1/voice/number.ts b/lib/rest/pricing/v1/voice/number.ts index e2667b6e90..af4a00eb63 100644 --- a/lib/rest/pricing/v1/voice/number.ts +++ b/lib/rest/pricing/v1/voice/number.ts @@ -120,7 +120,11 @@ export class NumberInstance { protected _solution: NumberContextSolution; protected _context?: NumberContext; - constructor(protected _version: V1, payload: NumberPayload, number?: string) { + constructor( + protected _version: V1, + payload: NumberResource, + number?: string + ) { this.number = payload.number; this.country = payload.country; this.isoCountry = payload.iso_country; diff --git a/lib/rest/pricing/v2/country.ts b/lib/rest/pricing/v2/country.ts index 36090eeda4..7f779254fd 100644 --- a/lib/rest/pricing/v2/country.ts +++ b/lib/rest/pricing/v2/country.ts @@ -154,7 +154,9 @@ export class CountryContextImpl implements CountryContext { } } -interface CountryPayload extends CountryResource, TwilioResponsePayload {} +interface CountryPayload extends TwilioResponsePayload { + countries: CountryResource[]; +} interface CountryResource { country?: string | null; @@ -171,7 +173,7 @@ export class CountryInstance { constructor( protected _version: V2, - payload: CountryPayload, + payload: CountryResource, isoCountry?: string ) { this.country = payload.country; @@ -503,7 +505,7 @@ export class CountryPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: CountryPayload): CountryInstance { + getInstance(payload: CountryResource): CountryInstance { return new CountryInstance(this._version, payload); } diff --git a/lib/rest/pricing/v2/number.ts b/lib/rest/pricing/v2/number.ts index 0b6d59ea54..f70c8f967c 100644 --- a/lib/rest/pricing/v2/number.ts +++ b/lib/rest/pricing/v2/number.ts @@ -165,7 +165,7 @@ export class NumberInstance { constructor( protected _version: V2, - payload: NumberPayload, + payload: NumberResource, destinationNumber?: string ) { this.destinationNumber = payload.destination_number; diff --git a/lib/rest/pricing/v2/voice/country.ts b/lib/rest/pricing/v2/voice/country.ts index c814627894..a474910ec5 100644 --- a/lib/rest/pricing/v2/voice/country.ts +++ b/lib/rest/pricing/v2/voice/country.ts @@ -154,7 +154,9 @@ export class CountryContextImpl implements CountryContext { } } -interface CountryPayload extends CountryResource, TwilioResponsePayload {} +interface CountryPayload extends TwilioResponsePayload { + countries: CountryResource[]; +} interface CountryResource { country?: string | null; @@ -171,7 +173,7 @@ export class CountryInstance { constructor( protected _version: V2, - payload: CountryPayload, + payload: CountryResource, isoCountry?: string ) { this.country = payload.country; @@ -503,7 +505,7 @@ export class CountryPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: CountryPayload): CountryInstance { + getInstance(payload: CountryResource): CountryInstance { return new CountryInstance(this._version, payload); } diff --git a/lib/rest/pricing/v2/voice/number.ts b/lib/rest/pricing/v2/voice/number.ts index 5654d57fb6..e0a6c1f049 100644 --- a/lib/rest/pricing/v2/voice/number.ts +++ b/lib/rest/pricing/v2/voice/number.ts @@ -163,7 +163,7 @@ export class NumberInstance { constructor( protected _version: V2, - payload: NumberPayload, + payload: NumberResource, destinationNumber?: string ) { this.destinationNumber = payload.destination_number; diff --git a/lib/rest/proxy/v1/service.ts b/lib/rest/proxy/v1/service.ts index 2c215f2151..58ebe8818b 100644 --- a/lib/rest/proxy/v1/service.ts +++ b/lib/rest/proxy/v1/service.ts @@ -315,7 +315,9 @@ export class ServiceContextImpl implements ServiceContext { } } -interface ServicePayload extends ServiceResource, TwilioResponsePayload {} +interface ServicePayload extends TwilioResponsePayload { + services: ServiceResource[]; +} interface ServiceResource { sid?: string | null; @@ -338,7 +340,7 @@ export class ServiceInstance { protected _solution: ServiceContextSolution; protected _context?: ServiceContext; - constructor(protected _version: V1, payload: ServicePayload, sid?: string) { + constructor(protected _version: V1, payload: ServiceResource, sid?: string) { this.sid = payload.sid; this.uniqueName = payload.unique_name; this.accountSid = payload.account_sid; @@ -835,7 +837,7 @@ export class ServicePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ServicePayload): ServiceInstance { + getInstance(payload: ServiceResource): ServiceInstance { return new ServiceInstance(this._version, payload); } diff --git a/lib/rest/proxy/v1/service/phoneNumber.ts b/lib/rest/proxy/v1/service/phoneNumber.ts index 2399680a31..b00f5f397e 100644 --- a/lib/rest/proxy/v1/service/phoneNumber.ts +++ b/lib/rest/proxy/v1/service/phoneNumber.ts @@ -258,9 +258,9 @@ export class PhoneNumberContextImpl implements PhoneNumberContext { } } -interface PhoneNumberPayload - extends PhoneNumberResource, - TwilioResponsePayload {} +interface PhoneNumberPayload extends TwilioResponsePayload { + phone_numbers: PhoneNumberResource[]; +} interface PhoneNumberResource { sid?: string | null; @@ -283,7 +283,7 @@ export class PhoneNumberInstance { constructor( protected _version: V1, - payload: PhoneNumberPayload, + payload: PhoneNumberResource, serviceSid: string, sid?: string ) { @@ -771,7 +771,7 @@ export class PhoneNumberPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: PhoneNumberPayload): PhoneNumberInstance { + getInstance(payload: PhoneNumberResource): PhoneNumberInstance { return new PhoneNumberInstance( this._version, payload, diff --git a/lib/rest/proxy/v1/service/session.ts b/lib/rest/proxy/v1/service/session.ts index d250438c0e..1bf8f885c0 100644 --- a/lib/rest/proxy/v1/service/session.ts +++ b/lib/rest/proxy/v1/service/session.ts @@ -303,7 +303,9 @@ export class SessionContextImpl implements SessionContext { } } -interface SessionPayload extends SessionResource, TwilioResponsePayload {} +interface SessionPayload extends TwilioResponsePayload { + sessions: SessionResource[]; +} interface SessionResource { sid?: string | null; @@ -330,7 +332,7 @@ export class SessionInstance { constructor( protected _version: V1, - payload: SessionPayload, + payload: SessionResource, serviceSid: string, sid?: string ) { @@ -860,7 +862,7 @@ export class SessionPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SessionPayload): SessionInstance { + getInstance(payload: SessionResource): SessionInstance { return new SessionInstance( this._version, payload, diff --git a/lib/rest/proxy/v1/service/session/interaction.ts b/lib/rest/proxy/v1/service/session/interaction.ts index 85aed8ce2b..5fe773fa25 100644 --- a/lib/rest/proxy/v1/service/session/interaction.ts +++ b/lib/rest/proxy/v1/service/session/interaction.ts @@ -207,9 +207,9 @@ export class InteractionContextImpl implements InteractionContext { } } -interface InteractionPayload - extends InteractionResource, - TwilioResponsePayload {} +interface InteractionPayload extends TwilioResponsePayload { + interactions: InteractionResource[]; +} interface InteractionResource { sid?: string | null; @@ -239,7 +239,7 @@ export class InteractionInstance { constructor( protected _version: V1, - payload: InteractionPayload, + payload: InteractionResource, serviceSid: string, sessionSid: string, sid?: string @@ -675,7 +675,7 @@ export class InteractionPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: InteractionPayload): InteractionInstance { + getInstance(payload: InteractionResource): InteractionInstance { return new InteractionInstance( this._version, payload, diff --git a/lib/rest/proxy/v1/service/session/participant.ts b/lib/rest/proxy/v1/service/session/participant.ts index 4de821b851..0fba505982 100644 --- a/lib/rest/proxy/v1/service/session/participant.ts +++ b/lib/rest/proxy/v1/service/session/participant.ts @@ -213,9 +213,9 @@ export class ParticipantContextImpl implements ParticipantContext { } } -interface ParticipantPayload - extends ParticipantResource, - TwilioResponsePayload {} +interface ParticipantPayload extends TwilioResponsePayload { + participants: ParticipantResource[]; +} interface ParticipantResource { sid?: string | null; @@ -239,7 +239,7 @@ export class ParticipantInstance { constructor( protected _version: V1, - payload: ParticipantPayload, + payload: ParticipantResource, serviceSid: string, sessionSid: string, sid?: string @@ -719,7 +719,7 @@ export class ParticipantPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ParticipantPayload): ParticipantInstance { + getInstance(payload: ParticipantResource): ParticipantInstance { return new ParticipantInstance( this._version, payload, diff --git a/lib/rest/proxy/v1/service/session/participant/messageInteraction.ts b/lib/rest/proxy/v1/service/session/participant/messageInteraction.ts index 44b75dcaf2..b715f8ffc9 100644 --- a/lib/rest/proxy/v1/service/session/participant/messageInteraction.ts +++ b/lib/rest/proxy/v1/service/session/participant/messageInteraction.ts @@ -204,9 +204,9 @@ export class MessageInteractionContextImpl } } -interface MessageInteractionPayload - extends MessageInteractionResource, - TwilioResponsePayload {} +interface MessageInteractionPayload extends TwilioResponsePayload { + interactions: MessageInteractionResource[]; +} interface MessageInteractionResource { sid?: string | null; @@ -237,7 +237,7 @@ export class MessageInteractionInstance { constructor( protected _version: V1, - payload: MessageInteractionPayload, + payload: MessageInteractionResource, serviceSid: string, sessionSid: string, participantSid: string, @@ -766,7 +766,7 @@ export class MessageInteractionPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: MessageInteractionPayload): MessageInteractionInstance { + getInstance(payload: MessageInteractionResource): MessageInteractionInstance { return new MessageInteractionInstance( this._version, payload, diff --git a/lib/rest/proxy/v1/service/shortCode.ts b/lib/rest/proxy/v1/service/shortCode.ts index 02e5623317..d79437180a 100644 --- a/lib/rest/proxy/v1/service/shortCode.ts +++ b/lib/rest/proxy/v1/service/shortCode.ts @@ -254,7 +254,9 @@ export class ShortCodeContextImpl implements ShortCodeContext { } } -interface ShortCodePayload extends ShortCodeResource, TwilioResponsePayload {} +interface ShortCodePayload extends TwilioResponsePayload { + short_codes: ShortCodeResource[]; +} interface ShortCodeResource { sid?: string | null; @@ -275,7 +277,7 @@ export class ShortCodeInstance { constructor( protected _version: V1, - payload: ShortCodePayload, + payload: ShortCodeResource, serviceSid: string, sid?: string ) { @@ -737,7 +739,7 @@ export class ShortCodePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ShortCodePayload): ShortCodeInstance { + getInstance(payload: ShortCodeResource): ShortCodeInstance { return new ShortCodeInstance( this._version, payload, diff --git a/lib/rest/routes/v2/phoneNumber.ts b/lib/rest/routes/v2/phoneNumber.ts index 20e0d7e26c..f5c1b57320 100644 --- a/lib/rest/routes/v2/phoneNumber.ts +++ b/lib/rest/routes/v2/phoneNumber.ts @@ -187,7 +187,7 @@ export class PhoneNumberInstance { constructor( protected _version: V2, - payload: PhoneNumberPayload, + payload: PhoneNumberResource, phoneNumber?: string ) { this.phoneNumber = payload.phone_number; diff --git a/lib/rest/routes/v2/sipDomain.ts b/lib/rest/routes/v2/sipDomain.ts index 6e45677f27..c3d28f57c7 100644 --- a/lib/rest/routes/v2/sipDomain.ts +++ b/lib/rest/routes/v2/sipDomain.ts @@ -187,7 +187,7 @@ export class SipDomainInstance { constructor( protected _version: V2, - payload: SipDomainPayload, + payload: SipDomainResource, sipDomain?: string ) { this.sipDomain = payload.sip_domain; diff --git a/lib/rest/routes/v2/trunk.ts b/lib/rest/routes/v2/trunk.ts index bdcd484f6c..008df79f68 100644 --- a/lib/rest/routes/v2/trunk.ts +++ b/lib/rest/routes/v2/trunk.ts @@ -187,7 +187,7 @@ export class TrunkInstance { constructor( protected _version: V2, - payload: TrunkPayload, + payload: TrunkResource, sipTrunkDomain?: string ) { this.sipTrunkDomain = payload.sip_trunk_domain; diff --git a/lib/rest/serverless/v1/service.ts b/lib/rest/serverless/v1/service.ts index 54746cd06f..4b0f3b8526 100644 --- a/lib/rest/serverless/v1/service.ts +++ b/lib/rest/serverless/v1/service.ts @@ -292,7 +292,9 @@ export class ServiceContextImpl implements ServiceContext { } } -interface ServicePayload extends ServiceResource, TwilioResponsePayload {} +interface ServicePayload extends TwilioResponsePayload { + services: ServiceResource[]; +} interface ServiceResource { sid?: string | null; @@ -312,7 +314,7 @@ export class ServiceInstance { protected _solution: ServiceContextSolution; protected _context?: ServiceContext; - constructor(protected _version: V1, payload: ServicePayload, sid?: string) { + constructor(protected _version: V1, payload: ServiceResource, sid?: string) { this.sid = payload.sid; this.accountSid = payload.account_sid; this.friendlyName = payload.friendly_name; @@ -803,7 +805,7 @@ export class ServicePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ServicePayload): ServiceInstance { + getInstance(payload: ServiceResource): ServiceInstance { return new ServiceInstance(this._version, payload); } diff --git a/lib/rest/serverless/v1/service/asset.ts b/lib/rest/serverless/v1/service/asset.ts index e060f9559c..9dd62dac8b 100644 --- a/lib/rest/serverless/v1/service/asset.ts +++ b/lib/rest/serverless/v1/service/asset.ts @@ -262,7 +262,9 @@ export class AssetContextImpl implements AssetContext { } } -interface AssetPayload extends AssetResource, TwilioResponsePayload {} +interface AssetPayload extends TwilioResponsePayload { + assets: AssetResource[]; +} interface AssetResource { sid?: string | null; @@ -281,7 +283,7 @@ export class AssetInstance { constructor( protected _version: V1, - payload: AssetPayload, + payload: AssetResource, serviceSid: string, sid?: string ) { @@ -730,7 +732,7 @@ export class AssetPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: AssetPayload): AssetInstance { + getInstance(payload: AssetResource): AssetInstance { return new AssetInstance(this._version, payload, this._solution.serviceSid); } diff --git a/lib/rest/serverless/v1/service/asset/assetVersion.ts b/lib/rest/serverless/v1/service/asset/assetVersion.ts index 2af4529ae7..61f8da8979 100644 --- a/lib/rest/serverless/v1/service/asset/assetVersion.ts +++ b/lib/rest/serverless/v1/service/asset/assetVersion.ts @@ -159,9 +159,9 @@ export class AssetVersionContextImpl implements AssetVersionContext { } } -interface AssetVersionPayload - extends AssetVersionResource, - TwilioResponsePayload {} +interface AssetVersionPayload extends TwilioResponsePayload { + asset_versions: AssetVersionResource[]; +} interface AssetVersionResource { sid?: string | null; @@ -180,7 +180,7 @@ export class AssetVersionInstance { constructor( protected _version: V1, - payload: AssetVersionPayload, + payload: AssetVersionResource, serviceSid: string, assetSid: string, sid?: string @@ -543,7 +543,7 @@ export class AssetVersionPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: AssetVersionPayload): AssetVersionInstance { + getInstance(payload: AssetVersionResource): AssetVersionInstance { return new AssetVersionInstance( this._version, payload, diff --git a/lib/rest/serverless/v1/service/build.ts b/lib/rest/serverless/v1/service/build.ts index 84f26da2cf..589e51aae3 100644 --- a/lib/rest/serverless/v1/service/build.ts +++ b/lib/rest/serverless/v1/service/build.ts @@ -205,7 +205,9 @@ export class BuildContextImpl implements BuildContext { } } -interface BuildPayload extends BuildResource, TwilioResponsePayload {} +interface BuildPayload extends TwilioResponsePayload { + builds: BuildResource[]; +} interface BuildResource { sid?: string | null; @@ -228,7 +230,7 @@ export class BuildInstance { constructor( protected _version: V1, - payload: BuildPayload, + payload: BuildResource, serviceSid: string, sid?: string ) { @@ -691,7 +693,7 @@ export class BuildPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: BuildPayload): BuildInstance { + getInstance(payload: BuildResource): BuildInstance { return new BuildInstance(this._version, payload, this._solution.serviceSid); } diff --git a/lib/rest/serverless/v1/service/build/buildStatus.ts b/lib/rest/serverless/v1/service/build/buildStatus.ts index f181c17135..2733c856a9 100644 --- a/lib/rest/serverless/v1/service/build/buildStatus.ts +++ b/lib/rest/serverless/v1/service/build/buildStatus.ts @@ -115,7 +115,7 @@ export class BuildStatusInstance { constructor( protected _version: V1, - payload: BuildStatusPayload, + payload: BuildStatusResource, serviceSid: string, sid: string ) { diff --git a/lib/rest/serverless/v1/service/environment.ts b/lib/rest/serverless/v1/service/environment.ts index c085bf76c5..878634eae8 100644 --- a/lib/rest/serverless/v1/service/environment.ts +++ b/lib/rest/serverless/v1/service/environment.ts @@ -225,9 +225,9 @@ export class EnvironmentContextImpl implements EnvironmentContext { } } -interface EnvironmentPayload - extends EnvironmentResource, - TwilioResponsePayload {} +interface EnvironmentPayload extends TwilioResponsePayload { + environments: EnvironmentResource[]; +} interface EnvironmentResource { sid?: string | null; @@ -249,7 +249,7 @@ export class EnvironmentInstance { constructor( protected _version: V1, - payload: EnvironmentPayload, + payload: EnvironmentResource, serviceSid: string, sid?: string ) { @@ -718,7 +718,7 @@ export class EnvironmentPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: EnvironmentPayload): EnvironmentInstance { + getInstance(payload: EnvironmentResource): EnvironmentInstance { return new EnvironmentInstance( this._version, payload, diff --git a/lib/rest/serverless/v1/service/environment/deployment.ts b/lib/rest/serverless/v1/service/environment/deployment.ts index 150c6563ad..c18c0c5863 100644 --- a/lib/rest/serverless/v1/service/environment/deployment.ts +++ b/lib/rest/serverless/v1/service/environment/deployment.ts @@ -165,7 +165,9 @@ export class DeploymentContextImpl implements DeploymentContext { } } -interface DeploymentPayload extends DeploymentResource, TwilioResponsePayload {} +interface DeploymentPayload extends TwilioResponsePayload { + deployments: DeploymentResource[]; +} interface DeploymentResource { sid?: string | null; @@ -184,7 +186,7 @@ export class DeploymentInstance { constructor( protected _version: V1, - payload: DeploymentPayload, + payload: DeploymentResource, serviceSid: string, environmentSid: string, sid?: string @@ -616,7 +618,7 @@ export class DeploymentPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: DeploymentPayload): DeploymentInstance { + getInstance(payload: DeploymentResource): DeploymentInstance { return new DeploymentInstance( this._version, payload, diff --git a/lib/rest/serverless/v1/service/environment/log.ts b/lib/rest/serverless/v1/service/environment/log.ts index 3844610fc5..1f7212a74e 100644 --- a/lib/rest/serverless/v1/service/environment/log.ts +++ b/lib/rest/serverless/v1/service/environment/log.ts @@ -177,7 +177,9 @@ export class LogContextImpl implements LogContext { } } -interface LogPayload extends LogResource, TwilioResponsePayload {} +interface LogPayload extends TwilioResponsePayload { + logs: LogResource[]; +} interface LogResource { sid?: string | null; @@ -200,7 +202,7 @@ export class LogInstance { constructor( protected _version: V1, - payload: LogPayload, + payload: LogResource, serviceSid: string, environmentSid: string, sid?: string @@ -583,7 +585,7 @@ export class LogPage extends Page { * * @param payload - Payload response from the API */ - getInstance(payload: LogPayload): LogInstance { + getInstance(payload: LogResource): LogInstance { return new LogInstance( this._version, payload, diff --git a/lib/rest/serverless/v1/service/environment/variable.ts b/lib/rest/serverless/v1/service/environment/variable.ts index 60374ab4d2..35bbfc5e78 100644 --- a/lib/rest/serverless/v1/service/environment/variable.ts +++ b/lib/rest/serverless/v1/service/environment/variable.ts @@ -269,7 +269,9 @@ export class VariableContextImpl implements VariableContext { } } -interface VariablePayload extends VariableResource, TwilioResponsePayload {} +interface VariablePayload extends TwilioResponsePayload { + variables: VariableResource[]; +} interface VariableResource { sid?: string | null; @@ -289,7 +291,7 @@ export class VariableInstance { constructor( protected _version: V1, - payload: VariablePayload, + payload: VariableResource, serviceSid: string, environmentSid: string, sid?: string @@ -763,7 +765,7 @@ export class VariablePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: VariablePayload): VariableInstance { + getInstance(payload: VariableResource): VariableInstance { return new VariableInstance( this._version, payload, diff --git a/lib/rest/serverless/v1/service/function.ts b/lib/rest/serverless/v1/service/function.ts index 76c794d084..3899a0bb06 100644 --- a/lib/rest/serverless/v1/service/function.ts +++ b/lib/rest/serverless/v1/service/function.ts @@ -262,7 +262,9 @@ export class FunctionContextImpl implements FunctionContext { } } -interface FunctionPayload extends FunctionResource, TwilioResponsePayload {} +interface FunctionPayload extends TwilioResponsePayload { + functions: FunctionResource[]; +} interface FunctionResource { sid?: string | null; @@ -281,7 +283,7 @@ export class FunctionInstance { constructor( protected _version: V1, - payload: FunctionPayload, + payload: FunctionResource, serviceSid: string, sid?: string ) { @@ -734,7 +736,7 @@ export class FunctionPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: FunctionPayload): FunctionInstance { + getInstance(payload: FunctionResource): FunctionInstance { return new FunctionInstance( this._version, payload, diff --git a/lib/rest/serverless/v1/service/function/functionVersion.ts b/lib/rest/serverless/v1/service/function/functionVersion.ts index dff2ac722b..f3f42034a7 100644 --- a/lib/rest/serverless/v1/service/function/functionVersion.ts +++ b/lib/rest/serverless/v1/service/function/functionVersion.ts @@ -179,9 +179,9 @@ export class FunctionVersionContextImpl implements FunctionVersionContext { } } -interface FunctionVersionPayload - extends FunctionVersionResource, - TwilioResponsePayload {} +interface FunctionVersionPayload extends TwilioResponsePayload { + function_versions: FunctionVersionResource[]; +} interface FunctionVersionResource { sid?: string | null; @@ -201,7 +201,7 @@ export class FunctionVersionInstance { constructor( protected _version: V1, - payload: FunctionVersionPayload, + payload: FunctionVersionResource, serviceSid: string, functionSid: string, sid?: string @@ -587,7 +587,7 @@ export class FunctionVersionPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: FunctionVersionPayload): FunctionVersionInstance { + getInstance(payload: FunctionVersionResource): FunctionVersionInstance { return new FunctionVersionInstance( this._version, payload, diff --git a/lib/rest/serverless/v1/service/function/functionVersion/functionVersionContent.ts b/lib/rest/serverless/v1/service/function/functionVersion/functionVersionContent.ts index f1e25b6653..ea53fdf176 100644 --- a/lib/rest/serverless/v1/service/function/functionVersion/functionVersionContent.ts +++ b/lib/rest/serverless/v1/service/function/functionVersion/functionVersionContent.ts @@ -131,7 +131,7 @@ export class FunctionVersionContentInstance { constructor( protected _version: V1, - payload: FunctionVersionContentPayload, + payload: FunctionVersionContentResource, serviceSid: string, functionSid: string, sid: string diff --git a/lib/rest/studio/v1/flow.ts b/lib/rest/studio/v1/flow.ts index c8f40e4bab..a6d6fed065 100644 --- a/lib/rest/studio/v1/flow.ts +++ b/lib/rest/studio/v1/flow.ts @@ -185,7 +185,9 @@ export class FlowContextImpl implements FlowContext { } } -interface FlowPayload extends FlowResource, TwilioResponsePayload {} +interface FlowPayload extends TwilioResponsePayload { + flows: FlowResource[]; +} interface FlowResource { sid?: string | null; @@ -203,7 +205,7 @@ export class FlowInstance { protected _solution: FlowContextSolution; protected _context?: FlowContext; - constructor(protected _version: V1, payload: FlowPayload, sid?: string) { + constructor(protected _version: V1, payload: FlowResource, sid?: string) { this.sid = payload.sid; this.accountSid = payload.account_sid; this.friendlyName = payload.friendly_name; @@ -569,7 +571,7 @@ export class FlowPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: FlowPayload): FlowInstance { + getInstance(payload: FlowResource): FlowInstance { return new FlowInstance(this._version, payload); } diff --git a/lib/rest/studio/v1/flow/engagement.ts b/lib/rest/studio/v1/flow/engagement.ts index 4baabda644..9495d6dd85 100644 --- a/lib/rest/studio/v1/flow/engagement.ts +++ b/lib/rest/studio/v1/flow/engagement.ts @@ -215,7 +215,9 @@ export class EngagementContextImpl implements EngagementContext { } } -interface EngagementPayload extends EngagementResource, TwilioResponsePayload {} +interface EngagementPayload extends TwilioResponsePayload { + engagements: EngagementResource[]; +} interface EngagementResource { sid?: string | null; @@ -237,7 +239,7 @@ export class EngagementInstance { constructor( protected _version: V1, - payload: EngagementPayload, + payload: EngagementResource, flowSid: string, sid?: string ) { @@ -701,7 +703,7 @@ export class EngagementPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: EngagementPayload): EngagementInstance { + getInstance(payload: EngagementResource): EngagementInstance { return new EngagementInstance( this._version, payload, diff --git a/lib/rest/studio/v1/flow/engagement/engagementContext.ts b/lib/rest/studio/v1/flow/engagement/engagementContext.ts index 68542897e3..4fe4e23d4c 100644 --- a/lib/rest/studio/v1/flow/engagement/engagementContext.ts +++ b/lib/rest/studio/v1/flow/engagement/engagementContext.ts @@ -113,7 +113,7 @@ export class EngagementContextInstance { constructor( protected _version: V1, - payload: EngagementContextPayload, + payload: EngagementContextResource, flowSid: string, engagementSid: string ) { diff --git a/lib/rest/studio/v1/flow/engagement/step.ts b/lib/rest/studio/v1/flow/engagement/step.ts index f0ba1bb91f..4d8f5c5758 100644 --- a/lib/rest/studio/v1/flow/engagement/step.ts +++ b/lib/rest/studio/v1/flow/engagement/step.ts @@ -174,7 +174,9 @@ export class StepContextImpl implements StepContext { } } -interface StepPayload extends StepResource, TwilioResponsePayload {} +interface StepPayload extends TwilioResponsePayload { + steps: StepResource[]; +} interface StepResource { sid?: string | null; @@ -197,7 +199,7 @@ export class StepInstance { constructor( protected _version: V1, - payload: StepPayload, + payload: StepResource, flowSid: string, engagementSid: string, sid?: string @@ -589,7 +591,7 @@ export class StepPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: StepPayload): StepInstance { + getInstance(payload: StepResource): StepInstance { return new StepInstance( this._version, payload, diff --git a/lib/rest/studio/v1/flow/engagement/step/stepContext.ts b/lib/rest/studio/v1/flow/engagement/step/stepContext.ts index f6b5bc9456..1d3a074d68 100644 --- a/lib/rest/studio/v1/flow/engagement/step/stepContext.ts +++ b/lib/rest/studio/v1/flow/engagement/step/stepContext.ts @@ -125,7 +125,7 @@ export class StepContextInstance { constructor( protected _version: V1, - payload: StepContextPayload, + payload: StepContextResource, flowSid: string, engagementSid: string, stepSid: string diff --git a/lib/rest/studio/v1/flow/execution.ts b/lib/rest/studio/v1/flow/execution.ts index ec9229afa1..08a624240c 100644 --- a/lib/rest/studio/v1/flow/execution.ts +++ b/lib/rest/studio/v1/flow/execution.ts @@ -291,7 +291,9 @@ export class ExecutionContextImpl implements ExecutionContext { } } -interface ExecutionPayload extends ExecutionResource, TwilioResponsePayload {} +interface ExecutionPayload extends TwilioResponsePayload { + executions: ExecutionResource[]; +} interface ExecutionResource { sid?: string | null; @@ -313,7 +315,7 @@ export class ExecutionInstance { constructor( protected _version: V1, - payload: ExecutionPayload, + payload: ExecutionResource, flowSid: string, sid?: string ) { @@ -797,7 +799,7 @@ export class ExecutionPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ExecutionPayload): ExecutionInstance { + getInstance(payload: ExecutionResource): ExecutionInstance { return new ExecutionInstance( this._version, payload, diff --git a/lib/rest/studio/v1/flow/execution/executionContext.ts b/lib/rest/studio/v1/flow/execution/executionContext.ts index 2e233d951b..ea85a534fe 100644 --- a/lib/rest/studio/v1/flow/execution/executionContext.ts +++ b/lib/rest/studio/v1/flow/execution/executionContext.ts @@ -113,7 +113,7 @@ export class ExecutionContextInstance { constructor( protected _version: V1, - payload: ExecutionContextPayload, + payload: ExecutionContextResource, flowSid: string, executionSid: string ) { diff --git a/lib/rest/studio/v1/flow/execution/executionStep.ts b/lib/rest/studio/v1/flow/execution/executionStep.ts index 33da0abcba..6e3190e072 100644 --- a/lib/rest/studio/v1/flow/execution/executionStep.ts +++ b/lib/rest/studio/v1/flow/execution/executionStep.ts @@ -174,9 +174,9 @@ export class ExecutionStepContextImpl implements ExecutionStepContext { } } -interface ExecutionStepPayload - extends ExecutionStepResource, - TwilioResponsePayload {} +interface ExecutionStepPayload extends TwilioResponsePayload { + steps: ExecutionStepResource[]; +} interface ExecutionStepResource { sid?: string | null; @@ -199,7 +199,7 @@ export class ExecutionStepInstance { constructor( protected _version: V1, - payload: ExecutionStepPayload, + payload: ExecutionStepResource, flowSid: string, executionSid: string, sid?: string @@ -603,7 +603,7 @@ export class ExecutionStepPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ExecutionStepPayload): ExecutionStepInstance { + getInstance(payload: ExecutionStepResource): ExecutionStepInstance { return new ExecutionStepInstance( this._version, payload, diff --git a/lib/rest/studio/v1/flow/execution/executionStep/executionStepContext.ts b/lib/rest/studio/v1/flow/execution/executionStep/executionStepContext.ts index a5e0ded944..6d396df428 100644 --- a/lib/rest/studio/v1/flow/execution/executionStep/executionStepContext.ts +++ b/lib/rest/studio/v1/flow/execution/executionStep/executionStepContext.ts @@ -127,7 +127,7 @@ export class ExecutionStepContextInstance { constructor( protected _version: V1, - payload: ExecutionStepContextPayload, + payload: ExecutionStepContextResource, flowSid: string, executionSid: string, stepSid: string diff --git a/lib/rest/studio/v2/flow.ts b/lib/rest/studio/v2/flow.ts index 1af9d88eb0..5fb64cb057 100644 --- a/lib/rest/studio/v2/flow.ts +++ b/lib/rest/studio/v2/flow.ts @@ -280,7 +280,9 @@ export class FlowContextImpl implements FlowContext { } } -interface FlowPayload extends FlowResource, TwilioResponsePayload {} +interface FlowPayload extends TwilioResponsePayload { + flows: FlowResource[]; +} interface FlowResource { sid?: string | null; @@ -304,7 +306,7 @@ export class FlowInstance { protected _solution: FlowContextSolution; protected _context?: FlowContext; - constructor(protected _version: V2, payload: FlowPayload, sid?: string) { + constructor(protected _version: V2, payload: FlowResource, sid?: string) { this.sid = payload.sid; this.accountSid = payload.account_sid; this.friendlyName = payload.friendly_name; @@ -795,7 +797,7 @@ export class FlowPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: FlowPayload): FlowInstance { + getInstance(payload: FlowResource): FlowInstance { return new FlowInstance(this._version, payload); } diff --git a/lib/rest/studio/v2/flow/execution.ts b/lib/rest/studio/v2/flow/execution.ts index 8d5543774b..60abde9ac9 100644 --- a/lib/rest/studio/v2/flow/execution.ts +++ b/lib/rest/studio/v2/flow/execution.ts @@ -291,7 +291,9 @@ export class ExecutionContextImpl implements ExecutionContext { } } -interface ExecutionPayload extends ExecutionResource, TwilioResponsePayload {} +interface ExecutionPayload extends TwilioResponsePayload { + executions: ExecutionResource[]; +} interface ExecutionResource { sid?: string | null; @@ -312,7 +314,7 @@ export class ExecutionInstance { constructor( protected _version: V2, - payload: ExecutionPayload, + payload: ExecutionResource, flowSid: string, sid?: string ) { @@ -790,7 +792,7 @@ export class ExecutionPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ExecutionPayload): ExecutionInstance { + getInstance(payload: ExecutionResource): ExecutionInstance { return new ExecutionInstance( this._version, payload, diff --git a/lib/rest/studio/v2/flow/execution/executionContext.ts b/lib/rest/studio/v2/flow/execution/executionContext.ts index 3d05b7f271..12f666daed 100644 --- a/lib/rest/studio/v2/flow/execution/executionContext.ts +++ b/lib/rest/studio/v2/flow/execution/executionContext.ts @@ -113,7 +113,7 @@ export class ExecutionContextInstance { constructor( protected _version: V2, - payload: ExecutionContextPayload, + payload: ExecutionContextResource, flowSid: string, executionSid: string ) { diff --git a/lib/rest/studio/v2/flow/execution/executionStep.ts b/lib/rest/studio/v2/flow/execution/executionStep.ts index ef8b02bfb1..ac12ef0b8a 100644 --- a/lib/rest/studio/v2/flow/execution/executionStep.ts +++ b/lib/rest/studio/v2/flow/execution/executionStep.ts @@ -174,9 +174,9 @@ export class ExecutionStepContextImpl implements ExecutionStepContext { } } -interface ExecutionStepPayload - extends ExecutionStepResource, - TwilioResponsePayload {} +interface ExecutionStepPayload extends TwilioResponsePayload { + steps: ExecutionStepResource[]; +} interface ExecutionStepResource { sid?: string | null; @@ -199,7 +199,7 @@ export class ExecutionStepInstance { constructor( protected _version: V2, - payload: ExecutionStepPayload, + payload: ExecutionStepResource, flowSid: string, executionSid: string, sid?: string @@ -603,7 +603,7 @@ export class ExecutionStepPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ExecutionStepPayload): ExecutionStepInstance { + getInstance(payload: ExecutionStepResource): ExecutionStepInstance { return new ExecutionStepInstance( this._version, payload, diff --git a/lib/rest/studio/v2/flow/execution/executionStep/executionStepContext.ts b/lib/rest/studio/v2/flow/execution/executionStep/executionStepContext.ts index 8c83ec1712..38a8a136e0 100644 --- a/lib/rest/studio/v2/flow/execution/executionStep/executionStepContext.ts +++ b/lib/rest/studio/v2/flow/execution/executionStep/executionStepContext.ts @@ -127,7 +127,7 @@ export class ExecutionStepContextInstance { constructor( protected _version: V2, - payload: ExecutionStepContextPayload, + payload: ExecutionStepContextResource, flowSid: string, executionSid: string, stepSid: string diff --git a/lib/rest/studio/v2/flow/flowRevision.ts b/lib/rest/studio/v2/flow/flowRevision.ts index aa146120b8..d98636df83 100644 --- a/lib/rest/studio/v2/flow/flowRevision.ts +++ b/lib/rest/studio/v2/flow/flowRevision.ts @@ -148,9 +148,9 @@ export class FlowRevisionContextImpl implements FlowRevisionContext { } } -interface FlowRevisionPayload - extends FlowRevisionResource, - TwilioResponsePayload {} +interface FlowRevisionPayload extends TwilioResponsePayload { + revisions: FlowRevisionResource[]; +} interface FlowRevisionResource { sid?: string | null; @@ -173,7 +173,7 @@ export class FlowRevisionInstance { constructor( protected _version: V2, - payload: FlowRevisionPayload, + payload: FlowRevisionResource, sid: string, revision?: string ) { @@ -553,7 +553,7 @@ export class FlowRevisionPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: FlowRevisionPayload): FlowRevisionInstance { + getInstance(payload: FlowRevisionResource): FlowRevisionInstance { return new FlowRevisionInstance(this._version, payload, this._solution.sid); } diff --git a/lib/rest/studio/v2/flow/flowTestUser.ts b/lib/rest/studio/v2/flow/flowTestUser.ts index 122185cd26..599c363fe4 100644 --- a/lib/rest/studio/v2/flow/flowTestUser.ts +++ b/lib/rest/studio/v2/flow/flowTestUser.ts @@ -160,7 +160,7 @@ export class FlowTestUserInstance { constructor( protected _version: V2, - payload: FlowTestUserPayload, + payload: FlowTestUserResource, sid: string ) { this.sid = payload.sid; diff --git a/lib/rest/studio/v2/flowValidate.ts b/lib/rest/studio/v2/flowValidate.ts index 9a924acb59..7cad58d36c 100644 --- a/lib/rest/studio/v2/flowValidate.ts +++ b/lib/rest/studio/v2/flowValidate.ts @@ -151,7 +151,7 @@ interface FlowValidateResource { } export class FlowValidateInstance { - constructor(protected _version: V2, payload: FlowValidatePayload) { + constructor(protected _version: V2, payload: FlowValidateResource) { this.valid = payload.valid; } diff --git a/lib/rest/supersim/v1/esimProfile.ts b/lib/rest/supersim/v1/esimProfile.ts index 9d67a3bfc5..5699912078 100644 --- a/lib/rest/supersim/v1/esimProfile.ts +++ b/lib/rest/supersim/v1/esimProfile.ts @@ -174,9 +174,9 @@ export class EsimProfileContextImpl implements EsimProfileContext { } } -interface EsimProfilePayload - extends EsimProfileResource, - TwilioResponsePayload {} +interface EsimProfilePayload extends TwilioResponsePayload { + esim_profiles: EsimProfileResource[]; +} interface EsimProfileResource { sid?: string | null; @@ -199,7 +199,7 @@ export class EsimProfileInstance { constructor( protected _version: V1, - payload: EsimProfilePayload, + payload: EsimProfileResource, sid?: string ) { this.sid = payload.sid; @@ -632,7 +632,7 @@ export class EsimProfilePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: EsimProfilePayload): EsimProfileInstance { + getInstance(payload: EsimProfileResource): EsimProfileInstance { return new EsimProfileInstance(this._version, payload); } diff --git a/lib/rest/supersim/v1/fleet.ts b/lib/rest/supersim/v1/fleet.ts index ead664e4fa..c5a4e7eaa6 100644 --- a/lib/rest/supersim/v1/fleet.ts +++ b/lib/rest/supersim/v1/fleet.ts @@ -275,7 +275,9 @@ export type FleetIpCommandsMethod = | "PUT" | "DELETE"; -interface FleetPayload extends FleetResource, TwilioResponsePayload {} +interface FleetPayload extends TwilioResponsePayload { + fleets: FleetResource[]; +} interface FleetResource { account_sid?: string | null; @@ -299,7 +301,7 @@ export class FleetInstance { protected _solution: FleetContextSolution; protected _context?: FleetContext; - constructor(protected _version: V1, payload: FleetPayload, sid?: string) { + constructor(protected _version: V1, payload: FleetResource, sid?: string) { this.accountSid = payload.account_sid; this.sid = payload.sid; this.uniqueName = payload.unique_name; @@ -779,7 +781,7 @@ export class FleetPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: FleetPayload): FleetInstance { + getInstance(payload: FleetResource): FleetInstance { return new FleetInstance(this._version, payload); } diff --git a/lib/rest/supersim/v1/ipCommand.ts b/lib/rest/supersim/v1/ipCommand.ts index 308a3d7c0f..24fb4c50d0 100644 --- a/lib/rest/supersim/v1/ipCommand.ts +++ b/lib/rest/supersim/v1/ipCommand.ts @@ -184,7 +184,9 @@ export class IpCommandContextImpl implements IpCommandContext { } } -interface IpCommandPayload extends IpCommandResource, TwilioResponsePayload {} +interface IpCommandPayload extends TwilioResponsePayload { + ip_commands: IpCommandResource[]; +} interface IpCommandResource { sid?: string | null; @@ -206,7 +208,11 @@ export class IpCommandInstance { protected _solution: IpCommandContextSolution; protected _context?: IpCommandContext; - constructor(protected _version: V1, payload: IpCommandPayload, sid?: string) { + constructor( + protected _version: V1, + payload: IpCommandResource, + sid?: string + ) { this.sid = payload.sid; this.accountSid = payload.account_sid; this.simSid = payload.sim_sid; @@ -643,7 +649,7 @@ export class IpCommandPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: IpCommandPayload): IpCommandInstance { + getInstance(payload: IpCommandResource): IpCommandInstance { return new IpCommandInstance(this._version, payload); } diff --git a/lib/rest/supersim/v1/network.ts b/lib/rest/supersim/v1/network.ts index 9d0eb6a772..c994886a27 100644 --- a/lib/rest/supersim/v1/network.ts +++ b/lib/rest/supersim/v1/network.ts @@ -154,7 +154,9 @@ export class NetworkContextImpl implements NetworkContext { } } -interface NetworkPayload extends NetworkResource, TwilioResponsePayload {} +interface NetworkPayload extends TwilioResponsePayload { + networks: NetworkResource[]; +} interface NetworkResource { sid?: string | null; @@ -168,7 +170,7 @@ export class NetworkInstance { protected _solution: NetworkContextSolution; protected _context?: NetworkContext; - constructor(protected _version: V1, payload: NetworkPayload, sid?: string) { + constructor(protected _version: V1, payload: NetworkResource, sid?: string) { this.sid = payload.sid; this.friendlyName = payload.friendly_name; this.url = payload.url; @@ -495,7 +497,7 @@ export class NetworkPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: NetworkPayload): NetworkInstance { + getInstance(payload: NetworkResource): NetworkInstance { return new NetworkInstance(this._version, payload); } diff --git a/lib/rest/supersim/v1/networkAccessProfile.ts b/lib/rest/supersim/v1/networkAccessProfile.ts index 556e682236..f456cae443 100644 --- a/lib/rest/supersim/v1/networkAccessProfile.ts +++ b/lib/rest/supersim/v1/networkAccessProfile.ts @@ -243,9 +243,9 @@ export class NetworkAccessProfileContextImpl } } -interface NetworkAccessProfilePayload - extends NetworkAccessProfileResource, - TwilioResponsePayload {} +interface NetworkAccessProfilePayload extends TwilioResponsePayload { + network_access_profiles: NetworkAccessProfileResource[]; +} interface NetworkAccessProfileResource { sid?: string | null; @@ -263,7 +263,7 @@ export class NetworkAccessProfileInstance { constructor( protected _version: V1, - payload: NetworkAccessProfilePayload, + payload: NetworkAccessProfileResource, sid?: string ) { this.sid = payload.sid; @@ -715,7 +715,7 @@ export class NetworkAccessProfilePage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: NetworkAccessProfilePayload + payload: NetworkAccessProfileResource ): NetworkAccessProfileInstance { return new NetworkAccessProfileInstance(this._version, payload); } diff --git a/lib/rest/supersim/v1/networkAccessProfile/networkAccessProfileNetwork.ts b/lib/rest/supersim/v1/networkAccessProfile/networkAccessProfileNetwork.ts index cd4975ac20..6f3d237e3a 100644 --- a/lib/rest/supersim/v1/networkAccessProfile/networkAccessProfileNetwork.ts +++ b/lib/rest/supersim/v1/networkAccessProfile/networkAccessProfileNetwork.ts @@ -191,9 +191,9 @@ export class NetworkAccessProfileNetworkContextImpl } } -interface NetworkAccessProfileNetworkPayload - extends NetworkAccessProfileNetworkResource, - TwilioResponsePayload {} +interface NetworkAccessProfileNetworkPayload extends TwilioResponsePayload { + networks: NetworkAccessProfileNetworkResource[]; +} interface NetworkAccessProfileNetworkResource { sid?: string | null; @@ -210,7 +210,7 @@ export class NetworkAccessProfileNetworkInstance { constructor( protected _version: V1, - payload: NetworkAccessProfileNetworkPayload, + payload: NetworkAccessProfileNetworkResource, networkAccessProfileSid: string, sid?: string ) { @@ -683,7 +683,7 @@ export class NetworkAccessProfileNetworkPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: NetworkAccessProfileNetworkPayload + payload: NetworkAccessProfileNetworkResource ): NetworkAccessProfileNetworkInstance { return new NetworkAccessProfileNetworkInstance( this._version, diff --git a/lib/rest/supersim/v1/settingsUpdate.ts b/lib/rest/supersim/v1/settingsUpdate.ts index 0e17339185..1d468f9a8d 100644 --- a/lib/rest/supersim/v1/settingsUpdate.ts +++ b/lib/rest/supersim/v1/settingsUpdate.ts @@ -319,9 +319,9 @@ export function SettingsUpdateListInstance( return instance; } -interface SettingsUpdatePayload - extends SettingsUpdateResource, - TwilioResponsePayload {} +interface SettingsUpdatePayload extends TwilioResponsePayload { + settings_updates: SettingsUpdateResource[]; +} interface SettingsUpdateResource { sid?: string | null; @@ -335,7 +335,7 @@ interface SettingsUpdateResource { } export class SettingsUpdateInstance { - constructor(protected _version: V1, payload: SettingsUpdatePayload) { + constructor(protected _version: V1, payload: SettingsUpdateResource) { this.sid = payload.sid; this.iccid = payload.iccid; this.simSid = payload.sim_sid; @@ -425,7 +425,7 @@ export class SettingsUpdatePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SettingsUpdatePayload): SettingsUpdateInstance { + getInstance(payload: SettingsUpdateResource): SettingsUpdateInstance { return new SettingsUpdateInstance(this._version, payload); } diff --git a/lib/rest/supersim/v1/sim.ts b/lib/rest/supersim/v1/sim.ts index 5f1a117b82..871af53ed0 100644 --- a/lib/rest/supersim/v1/sim.ts +++ b/lib/rest/supersim/v1/sim.ts @@ -277,7 +277,9 @@ export class SimContextImpl implements SimContext { } } -interface SimPayload extends SimResource, TwilioResponsePayload {} +interface SimPayload extends TwilioResponsePayload { + sims: SimResource[]; +} interface SimResource { sid?: string | null; @@ -296,7 +298,7 @@ export class SimInstance { protected _solution: SimContextSolution; protected _context?: SimContext; - constructor(protected _version: V1, payload: SimPayload, sid?: string) { + constructor(protected _version: V1, payload: SimResource, sid?: string) { this.sid = payload.sid; this.uniqueName = payload.unique_name; this.accountSid = payload.account_sid; @@ -739,7 +741,7 @@ export class SimPage extends Page { * * @param payload - Payload response from the API */ - getInstance(payload: SimPayload): SimInstance { + getInstance(payload: SimResource): SimInstance { return new SimInstance(this._version, payload); } diff --git a/lib/rest/supersim/v1/sim/billingPeriod.ts b/lib/rest/supersim/v1/sim/billingPeriod.ts index 3f867c0b9b..9e4f07caaa 100644 --- a/lib/rest/supersim/v1/sim/billingPeriod.ts +++ b/lib/rest/supersim/v1/sim/billingPeriod.ts @@ -304,9 +304,9 @@ export function BillingPeriodListInstance( return instance; } -interface BillingPeriodPayload - extends BillingPeriodResource, - TwilioResponsePayload {} +interface BillingPeriodPayload extends TwilioResponsePayload { + billing_periods: BillingPeriodResource[]; +} interface BillingPeriodResource { sid?: string | null; @@ -322,7 +322,7 @@ interface BillingPeriodResource { export class BillingPeriodInstance { constructor( protected _version: V1, - payload: BillingPeriodPayload, + payload: BillingPeriodResource, simSid: string ) { this.sid = payload.sid; @@ -414,7 +414,7 @@ export class BillingPeriodPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: BillingPeriodPayload): BillingPeriodInstance { + getInstance(payload: BillingPeriodResource): BillingPeriodInstance { return new BillingPeriodInstance( this._version, payload, diff --git a/lib/rest/supersim/v1/sim/simIpAddress.ts b/lib/rest/supersim/v1/sim/simIpAddress.ts index ddcc167016..657382bff8 100644 --- a/lib/rest/supersim/v1/sim/simIpAddress.ts +++ b/lib/rest/supersim/v1/sim/simIpAddress.ts @@ -298,9 +298,9 @@ export function SimIpAddressListInstance( return instance; } -interface SimIpAddressPayload - extends SimIpAddressResource, - TwilioResponsePayload {} +interface SimIpAddressPayload extends TwilioResponsePayload { + ip_addresses: SimIpAddressResource[]; +} interface SimIpAddressResource { ip_address?: string | null; @@ -310,7 +310,7 @@ interface SimIpAddressResource { export class SimIpAddressInstance { constructor( protected _version: V1, - payload: SimIpAddressPayload, + payload: SimIpAddressResource, simSid: string ) { this.ipAddress = payload.ip_address; @@ -366,7 +366,7 @@ export class SimIpAddressPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SimIpAddressPayload): SimIpAddressInstance { + getInstance(payload: SimIpAddressResource): SimIpAddressInstance { return new SimIpAddressInstance( this._version, payload, diff --git a/lib/rest/supersim/v1/smsCommand.ts b/lib/rest/supersim/v1/smsCommand.ts index 2a9b967829..59c6b93b21 100644 --- a/lib/rest/supersim/v1/smsCommand.ts +++ b/lib/rest/supersim/v1/smsCommand.ts @@ -172,7 +172,9 @@ export class SmsCommandContextImpl implements SmsCommandContext { } } -interface SmsCommandPayload extends SmsCommandResource, TwilioResponsePayload {} +interface SmsCommandPayload extends TwilioResponsePayload { + sms_commands: SmsCommandResource[]; +} interface SmsCommandResource { sid?: string | null; @@ -192,7 +194,7 @@ export class SmsCommandInstance { constructor( protected _version: V1, - payload: SmsCommandPayload, + payload: SmsCommandResource, sid?: string ) { this.sid = payload.sid; @@ -601,7 +603,7 @@ export class SmsCommandPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SmsCommandPayload): SmsCommandInstance { + getInstance(payload: SmsCommandResource): SmsCommandInstance { return new SmsCommandInstance(this._version, payload); } diff --git a/lib/rest/supersim/v1/usageRecord.ts b/lib/rest/supersim/v1/usageRecord.ts index a3aab60c9a..102c8e79b8 100644 --- a/lib/rest/supersim/v1/usageRecord.ts +++ b/lib/rest/supersim/v1/usageRecord.ts @@ -351,9 +351,9 @@ export function UsageRecordListInstance(version: V1): UsageRecordListInstance { return instance; } -interface UsageRecordPayload - extends UsageRecordResource, - TwilioResponsePayload {} +interface UsageRecordPayload extends TwilioResponsePayload { + usage_records: UsageRecordResource[]; +} interface UsageRecordResource { account_sid?: string | null; @@ -370,7 +370,7 @@ interface UsageRecordResource { } export class UsageRecordInstance { - constructor(protected _version: V1, payload: UsageRecordPayload) { + constructor(protected _version: V1, payload: UsageRecordResource) { this.accountSid = payload.account_sid; this.simSid = payload.sim_sid; this.networkSid = payload.network_sid; @@ -481,7 +481,7 @@ export class UsageRecordPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: UsageRecordPayload): UsageRecordInstance { + getInstance(payload: UsageRecordResource): UsageRecordInstance { return new UsageRecordInstance(this._version, payload); } diff --git a/lib/rest/sync/v1/service.ts b/lib/rest/sync/v1/service.ts index 37294cb42d..396230cb99 100644 --- a/lib/rest/sync/v1/service.ts +++ b/lib/rest/sync/v1/service.ts @@ -322,7 +322,9 @@ export class ServiceContextImpl implements ServiceContext { } } -interface ServicePayload extends ServiceResource, TwilioResponsePayload {} +interface ServicePayload extends TwilioResponsePayload { + services: ServiceResource[]; +} interface ServiceResource { sid?: string | null; @@ -345,7 +347,7 @@ export class ServiceInstance { protected _solution: ServiceContextSolution; protected _context?: ServiceContext; - constructor(protected _version: V1, payload: ServicePayload, sid?: string) { + constructor(protected _version: V1, payload: ServiceResource, sid?: string) { this.sid = payload.sid; this.uniqueName = payload.unique_name; this.accountSid = payload.account_sid; @@ -873,7 +875,7 @@ export class ServicePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ServicePayload): ServiceInstance { + getInstance(payload: ServiceResource): ServiceInstance { return new ServiceInstance(this._version, payload); } diff --git a/lib/rest/sync/v1/service/document.ts b/lib/rest/sync/v1/service/document.ts index 68789b2f07..d3e57ba508 100644 --- a/lib/rest/sync/v1/service/document.ts +++ b/lib/rest/sync/v1/service/document.ts @@ -280,7 +280,9 @@ export class DocumentContextImpl implements DocumentContext { } } -interface DocumentPayload extends DocumentResource, TwilioResponsePayload {} +interface DocumentPayload extends TwilioResponsePayload { + documents: DocumentResource[]; +} interface DocumentResource { sid?: string | null; @@ -303,7 +305,7 @@ export class DocumentInstance { constructor( protected _version: V1, - payload: DocumentPayload, + payload: DocumentResource, serviceSid: string, sid?: string ) { @@ -800,7 +802,7 @@ export class DocumentPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: DocumentPayload): DocumentInstance { + getInstance(payload: DocumentResource): DocumentInstance { return new DocumentInstance( this._version, payload, diff --git a/lib/rest/sync/v1/service/document/documentPermission.ts b/lib/rest/sync/v1/service/document/documentPermission.ts index eee0ee48a0..dfa64c4edf 100644 --- a/lib/rest/sync/v1/service/document/documentPermission.ts +++ b/lib/rest/sync/v1/service/document/documentPermission.ts @@ -267,9 +267,9 @@ export class DocumentPermissionContextImpl } } -interface DocumentPermissionPayload - extends DocumentPermissionResource, - TwilioResponsePayload {} +interface DocumentPermissionPayload extends TwilioResponsePayload { + permissions: DocumentPermissionResource[]; +} interface DocumentPermissionResource { account_sid?: string | null; @@ -288,7 +288,7 @@ export class DocumentPermissionInstance { constructor( protected _version: V1, - payload: DocumentPermissionPayload, + payload: DocumentPermissionResource, serviceSid: string, documentSid: string, identity?: string @@ -703,7 +703,7 @@ export class DocumentPermissionPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: DocumentPermissionPayload): DocumentPermissionInstance { + getInstance(payload: DocumentPermissionResource): DocumentPermissionInstance { return new DocumentPermissionInstance( this._version, payload, diff --git a/lib/rest/sync/v1/service/syncList.ts b/lib/rest/sync/v1/service/syncList.ts index 9655455ae5..79a7115bf2 100644 --- a/lib/rest/sync/v1/service/syncList.ts +++ b/lib/rest/sync/v1/service/syncList.ts @@ -290,7 +290,9 @@ export class SyncListContextImpl implements SyncListContext { } } -interface SyncListPayload extends SyncListResource, TwilioResponsePayload {} +interface SyncListPayload extends TwilioResponsePayload { + lists: SyncListResource[]; +} interface SyncListResource { sid?: string | null; @@ -312,7 +314,7 @@ export class SyncListInstance { constructor( protected _version: V1, - payload: SyncListPayload, + payload: SyncListResource, serviceSid: string, sid?: string ) { @@ -810,7 +812,7 @@ export class SyncListPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SyncListPayload): SyncListInstance { + getInstance(payload: SyncListResource): SyncListInstance { return new SyncListInstance( this._version, payload, diff --git a/lib/rest/sync/v1/service/syncList/syncListItem.ts b/lib/rest/sync/v1/service/syncList/syncListItem.ts index 1dc5fcda44..933367577e 100644 --- a/lib/rest/sync/v1/service/syncList/syncListItem.ts +++ b/lib/rest/sync/v1/service/syncList/syncListItem.ts @@ -344,9 +344,9 @@ export class SyncListItemContextImpl implements SyncListItemContext { } } -interface SyncListItemPayload - extends SyncListItemResource, - TwilioResponsePayload {} +interface SyncListItemPayload extends TwilioResponsePayload { + items: SyncListItemResource[]; +} interface SyncListItemResource { index?: number | null; @@ -368,7 +368,7 @@ export class SyncListItemInstance { constructor( protected _version: V1, - payload: SyncListItemPayload, + payload: SyncListItemResource, serviceSid: string, listSid: string, index?: number @@ -870,7 +870,7 @@ export class SyncListItemPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SyncListItemPayload): SyncListItemInstance { + getInstance(payload: SyncListItemResource): SyncListItemInstance { return new SyncListItemInstance( this._version, payload, diff --git a/lib/rest/sync/v1/service/syncList/syncListPermission.ts b/lib/rest/sync/v1/service/syncList/syncListPermission.ts index 0447375865..d293fa52ad 100644 --- a/lib/rest/sync/v1/service/syncList/syncListPermission.ts +++ b/lib/rest/sync/v1/service/syncList/syncListPermission.ts @@ -267,9 +267,9 @@ export class SyncListPermissionContextImpl } } -interface SyncListPermissionPayload - extends SyncListPermissionResource, - TwilioResponsePayload {} +interface SyncListPermissionPayload extends TwilioResponsePayload { + permissions: SyncListPermissionResource[]; +} interface SyncListPermissionResource { account_sid?: string | null; @@ -288,7 +288,7 @@ export class SyncListPermissionInstance { constructor( protected _version: V1, - payload: SyncListPermissionPayload, + payload: SyncListPermissionResource, serviceSid: string, listSid: string, identity?: string @@ -703,7 +703,7 @@ export class SyncListPermissionPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SyncListPermissionPayload): SyncListPermissionInstance { + getInstance(payload: SyncListPermissionResource): SyncListPermissionInstance { return new SyncListPermissionInstance( this._version, payload, diff --git a/lib/rest/sync/v1/service/syncMap.ts b/lib/rest/sync/v1/service/syncMap.ts index 87ee2cfd2d..dd147fc432 100644 --- a/lib/rest/sync/v1/service/syncMap.ts +++ b/lib/rest/sync/v1/service/syncMap.ts @@ -290,7 +290,9 @@ export class SyncMapContextImpl implements SyncMapContext { } } -interface SyncMapPayload extends SyncMapResource, TwilioResponsePayload {} +interface SyncMapPayload extends TwilioResponsePayload { + maps: SyncMapResource[]; +} interface SyncMapResource { sid?: string | null; @@ -312,7 +314,7 @@ export class SyncMapInstance { constructor( protected _version: V1, - payload: SyncMapPayload, + payload: SyncMapResource, serviceSid: string, sid?: string ) { @@ -810,7 +812,7 @@ export class SyncMapPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SyncMapPayload): SyncMapInstance { + getInstance(payload: SyncMapResource): SyncMapInstance { return new SyncMapInstance( this._version, payload, diff --git a/lib/rest/sync/v1/service/syncMap/syncMapItem.ts b/lib/rest/sync/v1/service/syncMap/syncMapItem.ts index 3348938dd6..74fbc434a3 100644 --- a/lib/rest/sync/v1/service/syncMap/syncMapItem.ts +++ b/lib/rest/sync/v1/service/syncMap/syncMapItem.ts @@ -346,9 +346,9 @@ export class SyncMapItemContextImpl implements SyncMapItemContext { } } -interface SyncMapItemPayload - extends SyncMapItemResource, - TwilioResponsePayload {} +interface SyncMapItemPayload extends TwilioResponsePayload { + items: SyncMapItemResource[]; +} interface SyncMapItemResource { key?: string | null; @@ -370,7 +370,7 @@ export class SyncMapItemInstance { constructor( protected _version: V1, - payload: SyncMapItemPayload, + payload: SyncMapItemResource, serviceSid: string, mapSid: string, key?: string @@ -877,7 +877,7 @@ export class SyncMapItemPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SyncMapItemPayload): SyncMapItemInstance { + getInstance(payload: SyncMapItemResource): SyncMapItemInstance { return new SyncMapItemInstance( this._version, payload, diff --git a/lib/rest/sync/v1/service/syncMap/syncMapPermission.ts b/lib/rest/sync/v1/service/syncMap/syncMapPermission.ts index 01ea631b05..978a001a4a 100644 --- a/lib/rest/sync/v1/service/syncMap/syncMapPermission.ts +++ b/lib/rest/sync/v1/service/syncMap/syncMapPermission.ts @@ -265,9 +265,9 @@ export class SyncMapPermissionContextImpl implements SyncMapPermissionContext { } } -interface SyncMapPermissionPayload - extends SyncMapPermissionResource, - TwilioResponsePayload {} +interface SyncMapPermissionPayload extends TwilioResponsePayload { + permissions: SyncMapPermissionResource[]; +} interface SyncMapPermissionResource { account_sid?: string | null; @@ -286,7 +286,7 @@ export class SyncMapPermissionInstance { constructor( protected _version: V1, - payload: SyncMapPermissionPayload, + payload: SyncMapPermissionResource, serviceSid: string, mapSid: string, identity?: string @@ -701,7 +701,7 @@ export class SyncMapPermissionPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SyncMapPermissionPayload): SyncMapPermissionInstance { + getInstance(payload: SyncMapPermissionResource): SyncMapPermissionInstance { return new SyncMapPermissionInstance( this._version, payload, diff --git a/lib/rest/sync/v1/service/syncStream.ts b/lib/rest/sync/v1/service/syncStream.ts index e5529a584f..9ae7fe8b22 100644 --- a/lib/rest/sync/v1/service/syncStream.ts +++ b/lib/rest/sync/v1/service/syncStream.ts @@ -270,7 +270,9 @@ export class SyncStreamContextImpl implements SyncStreamContext { } } -interface SyncStreamPayload extends SyncStreamResource, TwilioResponsePayload {} +interface SyncStreamPayload extends TwilioResponsePayload { + streams: SyncStreamResource[]; +} interface SyncStreamResource { sid?: string | null; @@ -291,7 +293,7 @@ export class SyncStreamInstance { constructor( protected _version: V1, - payload: SyncStreamPayload, + payload: SyncStreamResource, serviceSid: string, sid?: string ) { @@ -774,7 +776,7 @@ export class SyncStreamPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SyncStreamPayload): SyncStreamInstance { + getInstance(payload: SyncStreamResource): SyncStreamInstance { return new SyncStreamInstance( this._version, payload, diff --git a/lib/rest/sync/v1/service/syncStream/streamMessage.ts b/lib/rest/sync/v1/service/syncStream/streamMessage.ts index 488904c564..22cf452ad1 100644 --- a/lib/rest/sync/v1/service/syncStream/streamMessage.ts +++ b/lib/rest/sync/v1/service/syncStream/streamMessage.ts @@ -148,7 +148,7 @@ interface StreamMessageResource { export class StreamMessageInstance { constructor( protected _version: V1, - payload: StreamMessagePayload, + payload: StreamMessageResource, serviceSid: string, streamSid: string ) { diff --git a/lib/rest/taskrouter/v1/workspace.ts b/lib/rest/taskrouter/v1/workspace.ts index fcfeffd952..45cdc0a50c 100644 --- a/lib/rest/taskrouter/v1/workspace.ts +++ b/lib/rest/taskrouter/v1/workspace.ts @@ -385,7 +385,9 @@ export class WorkspaceContextImpl implements WorkspaceContext { } } -interface WorkspacePayload extends WorkspaceResource, TwilioResponsePayload {} +interface WorkspacePayload extends TwilioResponsePayload { + workspaces: WorkspaceResource[]; +} interface WorkspaceResource { account_sid?: string | null; @@ -409,7 +411,11 @@ export class WorkspaceInstance { protected _solution: WorkspaceContextSolution; protected _context?: WorkspaceContext; - constructor(protected _version: V1, payload: WorkspacePayload, sid?: string) { + constructor( + protected _version: V1, + payload: WorkspaceResource, + sid?: string + ) { this.accountSid = payload.account_sid; this.dateCreated = deserialize.iso8601DateTime(payload.date_created); this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); @@ -964,7 +970,7 @@ export class WorkspacePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: WorkspacePayload): WorkspaceInstance { + getInstance(payload: WorkspaceResource): WorkspaceInstance { return new WorkspaceInstance(this._version, payload); } diff --git a/lib/rest/taskrouter/v1/workspace/activity.ts b/lib/rest/taskrouter/v1/workspace/activity.ts index 523952d217..6ee31d5318 100644 --- a/lib/rest/taskrouter/v1/workspace/activity.ts +++ b/lib/rest/taskrouter/v1/workspace/activity.ts @@ -267,7 +267,9 @@ export class ActivityContextImpl implements ActivityContext { } } -interface ActivityPayload extends ActivityResource, TwilioResponsePayload {} +interface ActivityPayload extends TwilioResponsePayload { + activities: ActivityResource[]; +} interface ActivityResource { account_sid?: string | null; @@ -287,7 +289,7 @@ export class ActivityInstance { constructor( protected _version: V1, - payload: ActivityPayload, + payload: ActivityResource, workspaceSid: string, sid?: string ) { @@ -752,7 +754,7 @@ export class ActivityPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ActivityPayload): ActivityInstance { + getInstance(payload: ActivityResource): ActivityInstance { return new ActivityInstance( this._version, payload, diff --git a/lib/rest/taskrouter/v1/workspace/event.ts b/lib/rest/taskrouter/v1/workspace/event.ts index 19e4f072a0..c2be9b640b 100644 --- a/lib/rest/taskrouter/v1/workspace/event.ts +++ b/lib/rest/taskrouter/v1/workspace/event.ts @@ -212,7 +212,9 @@ export class EventContextImpl implements EventContext { } } -interface EventPayload extends EventResource, TwilioResponsePayload {} +interface EventPayload extends TwilioResponsePayload { + events: EventResource[]; +} interface EventResource { account_sid?: string | null; @@ -240,7 +242,7 @@ export class EventInstance { constructor( protected _version: V1, - payload: EventPayload, + payload: EventResource, workspaceSid: string, sid?: string ) { @@ -670,7 +672,7 @@ export class EventPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: EventPayload): EventInstance { + getInstance(payload: EventResource): EventInstance { return new EventInstance( this._version, payload, diff --git a/lib/rest/taskrouter/v1/workspace/task.ts b/lib/rest/taskrouter/v1/workspace/task.ts index 9f174c987c..d33cc2f9f0 100644 --- a/lib/rest/taskrouter/v1/workspace/task.ts +++ b/lib/rest/taskrouter/v1/workspace/task.ts @@ -394,7 +394,9 @@ export class TaskContextImpl implements TaskContext { } } -interface TaskPayload extends TaskResource, TwilioResponsePayload {} +interface TaskPayload extends TwilioResponsePayload { + tasks: TaskResource[]; +} interface TaskResource { account_sid?: string | null; @@ -426,7 +428,7 @@ export class TaskInstance { constructor( protected _version: V1, - payload: TaskPayload, + payload: TaskResource, workspaceSid: string, sid?: string ) { @@ -1003,7 +1005,7 @@ export class TaskPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: TaskPayload): TaskInstance { + getInstance(payload: TaskResource): TaskInstance { return new TaskInstance( this._version, payload, diff --git a/lib/rest/taskrouter/v1/workspace/task/reservation.ts b/lib/rest/taskrouter/v1/workspace/task/reservation.ts index ef19d75927..63c1c29b39 100644 --- a/lib/rest/taskrouter/v1/workspace/task/reservation.ts +++ b/lib/rest/taskrouter/v1/workspace/task/reservation.ts @@ -494,9 +494,9 @@ export class ReservationContextImpl implements ReservationContext { } } -interface ReservationPayload - extends ReservationResource, - TwilioResponsePayload {} +interface ReservationPayload extends TwilioResponsePayload { + reservations: ReservationResource[]; +} interface ReservationResource { account_sid?: string | null; @@ -518,7 +518,7 @@ export class ReservationInstance { constructor( protected _version: V1, - payload: ReservationPayload, + payload: ReservationResource, workspaceSid: string, taskSid: string, sid?: string @@ -929,7 +929,7 @@ export class ReservationPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ReservationPayload): ReservationInstance { + getInstance(payload: ReservationResource): ReservationInstance { return new ReservationInstance( this._version, payload, diff --git a/lib/rest/taskrouter/v1/workspace/taskChannel.ts b/lib/rest/taskrouter/v1/workspace/taskChannel.ts index 379f33bf1b..53dbc97a78 100644 --- a/lib/rest/taskrouter/v1/workspace/taskChannel.ts +++ b/lib/rest/taskrouter/v1/workspace/taskChannel.ts @@ -263,9 +263,9 @@ export class TaskChannelContextImpl implements TaskChannelContext { } } -interface TaskChannelPayload - extends TaskChannelResource, - TwilioResponsePayload {} +interface TaskChannelPayload extends TwilioResponsePayload { + channels: TaskChannelResource[]; +} interface TaskChannelResource { account_sid?: string | null; @@ -286,7 +286,7 @@ export class TaskChannelInstance { constructor( protected _version: V1, - payload: TaskChannelPayload, + payload: TaskChannelResource, workspaceSid: string, sid?: string ) { @@ -765,7 +765,7 @@ export class TaskChannelPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: TaskChannelPayload): TaskChannelInstance { + getInstance(payload: TaskChannelResource): TaskChannelInstance { return new TaskChannelInstance( this._version, payload, diff --git a/lib/rest/taskrouter/v1/workspace/taskQueue.ts b/lib/rest/taskrouter/v1/workspace/taskQueue.ts index de5f95de7c..df40a599cc 100644 --- a/lib/rest/taskrouter/v1/workspace/taskQueue.ts +++ b/lib/rest/taskrouter/v1/workspace/taskQueue.ts @@ -355,7 +355,9 @@ export class TaskQueueContextImpl implements TaskQueueContext { } } -interface TaskQueuePayload extends TaskQueueResource, TwilioResponsePayload {} +interface TaskQueuePayload extends TwilioResponsePayload { + task_queues: TaskQueueResource[]; +} interface TaskQueueResource { account_sid?: string | null; @@ -381,7 +383,7 @@ export class TaskQueueInstance { constructor( protected _version: V1, - payload: TaskQueuePayload, + payload: TaskQueueResource, workspaceSid: string, sid?: string ) { @@ -930,7 +932,7 @@ export class TaskQueuePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: TaskQueuePayload): TaskQueueInstance { + getInstance(payload: TaskQueueResource): TaskQueueInstance { return new TaskQueueInstance( this._version, payload, diff --git a/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.ts b/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.ts index 72774ab960..efabdb9897 100644 --- a/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.ts +++ b/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.ts @@ -202,7 +202,7 @@ export class TaskQueueCumulativeStatisticsInstance { constructor( protected _version: V1, - payload: TaskQueueCumulativeStatisticsPayload, + payload: TaskQueueCumulativeStatisticsResource, workspaceSid: string, taskQueueSid: string ) { diff --git a/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueRealTimeStatistics.ts b/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueRealTimeStatistics.ts index 42c03ea037..ab6eceff5b 100644 --- a/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueRealTimeStatistics.ts +++ b/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueRealTimeStatistics.ts @@ -179,7 +179,7 @@ export class TaskQueueRealTimeStatisticsInstance { constructor( protected _version: V1, - payload: TaskQueueRealTimeStatisticsPayload, + payload: TaskQueueRealTimeStatisticsResource, workspaceSid: string, taskQueueSid: string ) { diff --git a/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueStatistics.ts b/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueStatistics.ts index 3e65721d68..01f8289533 100644 --- a/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueStatistics.ts +++ b/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueStatistics.ts @@ -173,7 +173,7 @@ export class TaskQueueStatisticsInstance { constructor( protected _version: V1, - payload: TaskQueueStatisticsPayload, + payload: TaskQueueStatisticsResource, workspaceSid: string, taskQueueSid: string ) { diff --git a/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueuesStatistics.ts b/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueuesStatistics.ts index 9b6ed5e2c7..bd0148b09f 100644 --- a/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueuesStatistics.ts +++ b/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueuesStatistics.ts @@ -362,9 +362,9 @@ export function TaskQueuesStatisticsListInstance( return instance; } -interface TaskQueuesStatisticsPayload - extends TaskQueuesStatisticsResource, - TwilioResponsePayload {} +interface TaskQueuesStatisticsPayload extends TwilioResponsePayload { + task_queues_statistics: TaskQueuesStatisticsResource[]; +} interface TaskQueuesStatisticsResource { account_sid?: string | null; @@ -377,7 +377,7 @@ interface TaskQueuesStatisticsResource { export class TaskQueuesStatisticsInstance { constructor( protected _version: V1, - payload: TaskQueuesStatisticsPayload, + payload: TaskQueuesStatisticsResource, workspaceSid: string ) { this.accountSid = payload.account_sid; @@ -455,7 +455,7 @@ export class TaskQueuesStatisticsPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: TaskQueuesStatisticsPayload + payload: TaskQueuesStatisticsResource ): TaskQueuesStatisticsInstance { return new TaskQueuesStatisticsInstance( this._version, diff --git a/lib/rest/taskrouter/v1/workspace/worker.ts b/lib/rest/taskrouter/v1/workspace/worker.ts index 40bce6edfb..f5537b657c 100644 --- a/lib/rest/taskrouter/v1/workspace/worker.ts +++ b/lib/rest/taskrouter/v1/workspace/worker.ts @@ -408,7 +408,9 @@ export class WorkerContextImpl implements WorkerContext { } } -interface WorkerPayload extends WorkerResource, TwilioResponsePayload {} +interface WorkerPayload extends TwilioResponsePayload { + workers: WorkerResource[]; +} interface WorkerResource { account_sid?: string | null; @@ -432,7 +434,7 @@ export class WorkerInstance { constructor( protected _version: V1, - payload: WorkerPayload, + payload: WorkerResource, workspaceSid: string, sid?: string ) { @@ -1017,7 +1019,7 @@ export class WorkerPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: WorkerPayload): WorkerInstance { + getInstance(payload: WorkerResource): WorkerInstance { return new WorkerInstance( this._version, payload, diff --git a/lib/rest/taskrouter/v1/workspace/worker/reservation.ts b/lib/rest/taskrouter/v1/workspace/worker/reservation.ts index da0e69dc1f..f8b4b9cac1 100644 --- a/lib/rest/taskrouter/v1/workspace/worker/reservation.ts +++ b/lib/rest/taskrouter/v1/workspace/worker/reservation.ts @@ -478,9 +478,9 @@ export class ReservationContextImpl implements ReservationContext { } } -interface ReservationPayload - extends ReservationResource, - TwilioResponsePayload {} +interface ReservationPayload extends TwilioResponsePayload { + reservations: ReservationResource[]; +} interface ReservationResource { account_sid?: string | null; @@ -502,7 +502,7 @@ export class ReservationInstance { constructor( protected _version: V1, - payload: ReservationPayload, + payload: ReservationResource, workspaceSid: string, workerSid: string, sid?: string @@ -911,7 +911,7 @@ export class ReservationPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ReservationPayload): ReservationInstance { + getInstance(payload: ReservationResource): ReservationInstance { return new ReservationInstance( this._version, payload, diff --git a/lib/rest/taskrouter/v1/workspace/worker/workerChannel.ts b/lib/rest/taskrouter/v1/workspace/worker/workerChannel.ts index dd04083985..5b86ceaa1b 100644 --- a/lib/rest/taskrouter/v1/workspace/worker/workerChannel.ts +++ b/lib/rest/taskrouter/v1/workspace/worker/workerChannel.ts @@ -234,9 +234,9 @@ export class WorkerChannelContextImpl implements WorkerChannelContext { } } -interface WorkerChannelPayload - extends WorkerChannelResource, - TwilioResponsePayload {} +interface WorkerChannelPayload extends TwilioResponsePayload { + channels: WorkerChannelResource[]; +} interface WorkerChannelResource { account_sid?: string | null; @@ -260,7 +260,7 @@ export class WorkerChannelInstance { constructor( protected _version: V1, - payload: WorkerChannelPayload, + payload: WorkerChannelResource, workspaceSid: string, workerSid: string, sid?: string @@ -691,7 +691,7 @@ export class WorkerChannelPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: WorkerChannelPayload): WorkerChannelInstance { + getInstance(payload: WorkerChannelResource): WorkerChannelInstance { return new WorkerChannelInstance( this._version, payload, diff --git a/lib/rest/taskrouter/v1/workspace/worker/workerStatistics.ts b/lib/rest/taskrouter/v1/workspace/worker/workerStatistics.ts index d7363a38a1..a0974e368b 100644 --- a/lib/rest/taskrouter/v1/workspace/worker/workerStatistics.ts +++ b/lib/rest/taskrouter/v1/workspace/worker/workerStatistics.ts @@ -162,7 +162,7 @@ export class WorkerStatisticsInstance { constructor( protected _version: V1, - payload: WorkerStatisticsPayload, + payload: WorkerStatisticsResource, workspaceSid: string, workerSid: string ) { diff --git a/lib/rest/taskrouter/v1/workspace/worker/workersCumulativeStatistics.ts b/lib/rest/taskrouter/v1/workspace/worker/workersCumulativeStatistics.ts index 7324d2a5a9..9a6cc329d4 100644 --- a/lib/rest/taskrouter/v1/workspace/worker/workersCumulativeStatistics.ts +++ b/lib/rest/taskrouter/v1/workspace/worker/workersCumulativeStatistics.ts @@ -178,7 +178,7 @@ export class WorkersCumulativeStatisticsInstance { constructor( protected _version: V1, - payload: WorkersCumulativeStatisticsPayload, + payload: WorkersCumulativeStatisticsResource, workspaceSid: string ) { this.accountSid = payload.account_sid; diff --git a/lib/rest/taskrouter/v1/workspace/worker/workersRealTimeStatistics.ts b/lib/rest/taskrouter/v1/workspace/worker/workersRealTimeStatistics.ts index 2e6b0e4365..bb9e8cedef 100644 --- a/lib/rest/taskrouter/v1/workspace/worker/workersRealTimeStatistics.ts +++ b/lib/rest/taskrouter/v1/workspace/worker/workersRealTimeStatistics.ts @@ -160,7 +160,7 @@ export class WorkersRealTimeStatisticsInstance { constructor( protected _version: V1, - payload: WorkersRealTimeStatisticsPayload, + payload: WorkersRealTimeStatisticsResource, workspaceSid: string ) { this.accountSid = payload.account_sid; diff --git a/lib/rest/taskrouter/v1/workspace/worker/workersStatistics.ts b/lib/rest/taskrouter/v1/workspace/worker/workersStatistics.ts index 48396aa0a6..5eda73bc6c 100644 --- a/lib/rest/taskrouter/v1/workspace/worker/workersStatistics.ts +++ b/lib/rest/taskrouter/v1/workspace/worker/workersStatistics.ts @@ -168,7 +168,7 @@ export class WorkersStatisticsInstance { constructor( protected _version: V1, - payload: WorkersStatisticsPayload, + payload: WorkersStatisticsResource, workspaceSid: string ) { this.realtime = payload.realtime; diff --git a/lib/rest/taskrouter/v1/workspace/workflow.ts b/lib/rest/taskrouter/v1/workspace/workflow.ts index c5e728f9f7..8c3c4b4a64 100644 --- a/lib/rest/taskrouter/v1/workspace/workflow.ts +++ b/lib/rest/taskrouter/v1/workspace/workflow.ts @@ -332,7 +332,9 @@ export class WorkflowContextImpl implements WorkflowContext { } } -interface WorkflowPayload extends WorkflowResource, TwilioResponsePayload {} +interface WorkflowPayload extends TwilioResponsePayload { + workflows: WorkflowResource[]; +} interface WorkflowResource { account_sid?: string | null; @@ -356,7 +358,7 @@ export class WorkflowInstance { constructor( protected _version: V1, - payload: WorkflowPayload, + payload: WorkflowResource, workspaceSid: string, sid?: string ) { @@ -886,7 +888,7 @@ export class WorkflowPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: WorkflowPayload): WorkflowInstance { + getInstance(payload: WorkflowResource): WorkflowInstance { return new WorkflowInstance( this._version, payload, diff --git a/lib/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.ts b/lib/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.ts index 4892bcd453..4e4192a49a 100644 --- a/lib/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.ts +++ b/lib/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.ts @@ -202,7 +202,7 @@ export class WorkflowCumulativeStatisticsInstance { constructor( protected _version: V1, - payload: WorkflowCumulativeStatisticsPayload, + payload: WorkflowCumulativeStatisticsResource, workspaceSid: string, workflowSid: string ) { diff --git a/lib/rest/taskrouter/v1/workspace/workflow/workflowRealTimeStatistics.ts b/lib/rest/taskrouter/v1/workspace/workflow/workflowRealTimeStatistics.ts index 57819924a9..0469157618 100644 --- a/lib/rest/taskrouter/v1/workspace/workflow/workflowRealTimeStatistics.ts +++ b/lib/rest/taskrouter/v1/workspace/workflow/workflowRealTimeStatistics.ts @@ -174,7 +174,7 @@ export class WorkflowRealTimeStatisticsInstance { constructor( protected _version: V1, - payload: WorkflowRealTimeStatisticsPayload, + payload: WorkflowRealTimeStatisticsResource, workspaceSid: string, workflowSid: string ) { diff --git a/lib/rest/taskrouter/v1/workspace/workflow/workflowStatistics.ts b/lib/rest/taskrouter/v1/workspace/workflow/workflowStatistics.ts index 8e4e694664..074e089560 100644 --- a/lib/rest/taskrouter/v1/workspace/workflow/workflowStatistics.ts +++ b/lib/rest/taskrouter/v1/workspace/workflow/workflowStatistics.ts @@ -173,7 +173,7 @@ export class WorkflowStatisticsInstance { constructor( protected _version: V1, - payload: WorkflowStatisticsPayload, + payload: WorkflowStatisticsResource, workspaceSid: string, workflowSid: string ) { diff --git a/lib/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.ts b/lib/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.ts index 24a305d09c..f8996cf51d 100644 --- a/lib/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.ts +++ b/lib/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.ts @@ -191,7 +191,7 @@ export class WorkspaceCumulativeStatisticsInstance { constructor( protected _version: V1, - payload: WorkspaceCumulativeStatisticsPayload, + payload: WorkspaceCumulativeStatisticsResource, workspaceSid: string ) { this.accountSid = payload.account_sid; diff --git a/lib/rest/taskrouter/v1/workspace/workspaceRealTimeStatistics.ts b/lib/rest/taskrouter/v1/workspace/workspaceRealTimeStatistics.ts index 28fb6b063b..75a7bad1cb 100644 --- a/lib/rest/taskrouter/v1/workspace/workspaceRealTimeStatistics.ts +++ b/lib/rest/taskrouter/v1/workspace/workspaceRealTimeStatistics.ts @@ -165,7 +165,7 @@ export class WorkspaceRealTimeStatisticsInstance { constructor( protected _version: V1, - payload: WorkspaceRealTimeStatisticsPayload, + payload: WorkspaceRealTimeStatisticsResource, workspaceSid: string ) { this.accountSid = payload.account_sid; diff --git a/lib/rest/taskrouter/v1/workspace/workspaceStatistics.ts b/lib/rest/taskrouter/v1/workspace/workspaceStatistics.ts index ae8dcb4cdc..2113d9ec45 100644 --- a/lib/rest/taskrouter/v1/workspace/workspaceStatistics.ts +++ b/lib/rest/taskrouter/v1/workspace/workspaceStatistics.ts @@ -162,7 +162,7 @@ export class WorkspaceStatisticsInstance { constructor( protected _version: V1, - payload: WorkspaceStatisticsPayload, + payload: WorkspaceStatisticsResource, workspaceSid: string ) { this.realtime = payload.realtime; diff --git a/lib/rest/trunking/v1/trunk.ts b/lib/rest/trunking/v1/trunk.ts index fa7d469de2..9df989fe6e 100644 --- a/lib/rest/trunking/v1/trunk.ts +++ b/lib/rest/trunking/v1/trunk.ts @@ -343,7 +343,9 @@ export type TrunkDisasterRecoveryMethod = | "PUT" | "DELETE"; -interface TrunkPayload extends TrunkResource, TwilioResponsePayload {} +interface TrunkPayload extends TwilioResponsePayload { + trunks: TrunkResource[]; +} interface TrunkResource { account_sid?: string | null; @@ -369,7 +371,7 @@ export class TrunkInstance { protected _solution: TrunkContextSolution; protected _context?: TrunkContext; - constructor(protected _version: V1, payload: TrunkPayload, sid?: string) { + constructor(protected _version: V1, payload: TrunkResource, sid?: string) { this.accountSid = payload.account_sid; this.domainName = payload.domain_name; this.disasterRecoveryMethod = payload.disaster_recovery_method; @@ -907,7 +909,7 @@ export class TrunkPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: TrunkPayload): TrunkInstance { + getInstance(payload: TrunkResource): TrunkInstance { return new TrunkInstance(this._version, payload); } diff --git a/lib/rest/trunking/v1/trunk/credentialList.ts b/lib/rest/trunking/v1/trunk/credentialList.ts index 1962c0865d..a80c7061e4 100644 --- a/lib/rest/trunking/v1/trunk/credentialList.ts +++ b/lib/rest/trunking/v1/trunk/credentialList.ts @@ -182,9 +182,9 @@ export class CredentialListContextImpl implements CredentialListContext { } } -interface CredentialListPayload - extends CredentialListResource, - TwilioResponsePayload {} +interface CredentialListPayload extends TwilioResponsePayload { + credential_lists: CredentialListResource[]; +} interface CredentialListResource { account_sid?: string | null; @@ -202,7 +202,7 @@ export class CredentialListInstance { constructor( protected _version: V1, - payload: CredentialListPayload, + payload: CredentialListResource, trunkSid: string, sid?: string ) { @@ -637,7 +637,7 @@ export class CredentialListPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: CredentialListPayload): CredentialListInstance { + getInstance(payload: CredentialListResource): CredentialListInstance { return new CredentialListInstance( this._version, payload, diff --git a/lib/rest/trunking/v1/trunk/ipAccessControlList.ts b/lib/rest/trunking/v1/trunk/ipAccessControlList.ts index 1056f779f8..ad9d6a20cd 100644 --- a/lib/rest/trunking/v1/trunk/ipAccessControlList.ts +++ b/lib/rest/trunking/v1/trunk/ipAccessControlList.ts @@ -184,9 +184,9 @@ export class IpAccessControlListContextImpl } } -interface IpAccessControlListPayload - extends IpAccessControlListResource, - TwilioResponsePayload {} +interface IpAccessControlListPayload extends TwilioResponsePayload { + ip_access_control_lists: IpAccessControlListResource[]; +} interface IpAccessControlListResource { account_sid?: string | null; @@ -204,7 +204,7 @@ export class IpAccessControlListInstance { constructor( protected _version: V1, - payload: IpAccessControlListPayload, + payload: IpAccessControlListResource, trunkSid: string, sid?: string ) { @@ -649,7 +649,7 @@ export class IpAccessControlListPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: IpAccessControlListPayload + payload: IpAccessControlListResource ): IpAccessControlListInstance { return new IpAccessControlListInstance( this._version, diff --git a/lib/rest/trunking/v1/trunk/originationUrl.ts b/lib/rest/trunking/v1/trunk/originationUrl.ts index c01df71657..ff74a9ef3c 100644 --- a/lib/rest/trunking/v1/trunk/originationUrl.ts +++ b/lib/rest/trunking/v1/trunk/originationUrl.ts @@ -277,9 +277,9 @@ export class OriginationUrlContextImpl implements OriginationUrlContext { } } -interface OriginationUrlPayload - extends OriginationUrlResource, - TwilioResponsePayload {} +interface OriginationUrlPayload extends TwilioResponsePayload { + origination_urls: OriginationUrlResource[]; +} interface OriginationUrlResource { account_sid?: string | null; @@ -301,7 +301,7 @@ export class OriginationUrlInstance { constructor( protected _version: V1, - payload: OriginationUrlPayload, + payload: OriginationUrlResource, trunkSid: string, sid?: string ) { @@ -808,7 +808,7 @@ export class OriginationUrlPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: OriginationUrlPayload): OriginationUrlInstance { + getInstance(payload: OriginationUrlResource): OriginationUrlInstance { return new OriginationUrlInstance( this._version, payload, diff --git a/lib/rest/trunking/v1/trunk/phoneNumber.ts b/lib/rest/trunking/v1/trunk/phoneNumber.ts index 951640588e..512fb53576 100644 --- a/lib/rest/trunking/v1/trunk/phoneNumber.ts +++ b/lib/rest/trunking/v1/trunk/phoneNumber.ts @@ -216,9 +216,9 @@ export type PhoneNumberVoiceMethod = | "PUT" | "DELETE"; -interface PhoneNumberPayload - extends PhoneNumberResource, - TwilioResponsePayload {} +interface PhoneNumberPayload extends TwilioResponsePayload { + phone_numbers: PhoneNumberResource[]; +} interface PhoneNumberResource { account_sid?: string | null; @@ -255,7 +255,7 @@ export class PhoneNumberInstance { constructor( protected _version: V1, - payload: PhoneNumberPayload, + payload: PhoneNumberResource, trunkSid: string, sid?: string ) { @@ -793,7 +793,7 @@ export class PhoneNumberPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: PhoneNumberPayload): PhoneNumberInstance { + getInstance(payload: PhoneNumberResource): PhoneNumberInstance { return new PhoneNumberInstance( this._version, payload, diff --git a/lib/rest/trunking/v1/trunk/recording.ts b/lib/rest/trunking/v1/trunk/recording.ts index 87bbebfb6d..d61449b179 100644 --- a/lib/rest/trunking/v1/trunk/recording.ts +++ b/lib/rest/trunking/v1/trunk/recording.ts @@ -188,7 +188,7 @@ export class RecordingInstance { constructor( protected _version: V1, - payload: RecordingPayload, + payload: RecordingResource, trunkSid: string ) { this.mode = payload.mode; diff --git a/lib/rest/trusthub/v1/customerProfiles.ts b/lib/rest/trusthub/v1/customerProfiles.ts index cbc6d5a5b7..438e8803fe 100644 --- a/lib/rest/trusthub/v1/customerProfiles.ts +++ b/lib/rest/trusthub/v1/customerProfiles.ts @@ -331,9 +331,9 @@ export class CustomerProfilesContextImpl implements CustomerProfilesContext { } } -interface CustomerProfilesPayload - extends CustomerProfilesResource, - TwilioResponsePayload {} +interface CustomerProfilesPayload extends TwilioResponsePayload { + results: CustomerProfilesResource[]; +} interface CustomerProfilesResource { sid?: string | null; @@ -356,7 +356,7 @@ export class CustomerProfilesInstance { constructor( protected _version: V1, - payload: CustomerProfilesPayload, + payload: CustomerProfilesResource, sid?: string ) { this.sid = payload.sid; @@ -866,7 +866,7 @@ export class CustomerProfilesPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: CustomerProfilesPayload): CustomerProfilesInstance { + getInstance(payload: CustomerProfilesResource): CustomerProfilesInstance { return new CustomerProfilesInstance(this._version, payload); } diff --git a/lib/rest/trusthub/v1/customerProfiles/customerProfilesChannelEndpointAssignment.ts b/lib/rest/trusthub/v1/customerProfiles/customerProfilesChannelEndpointAssignment.ts index 325d0c0a1a..e4a69cd4c8 100644 --- a/lib/rest/trusthub/v1/customerProfiles/customerProfilesChannelEndpointAssignment.ts +++ b/lib/rest/trusthub/v1/customerProfiles/customerProfilesChannelEndpointAssignment.ts @@ -204,8 +204,9 @@ export class CustomerProfilesChannelEndpointAssignmentContextImpl } interface CustomerProfilesChannelEndpointAssignmentPayload - extends CustomerProfilesChannelEndpointAssignmentResource, - TwilioResponsePayload {} + extends TwilioResponsePayload { + results: CustomerProfilesChannelEndpointAssignmentResource[]; +} interface CustomerProfilesChannelEndpointAssignmentResource { sid?: string | null; @@ -223,7 +224,7 @@ export class CustomerProfilesChannelEndpointAssignmentInstance { constructor( protected _version: V1, - payload: CustomerProfilesChannelEndpointAssignmentPayload, + payload: CustomerProfilesChannelEndpointAssignmentResource, customerProfileSid: string, sid?: string ) { @@ -729,7 +730,7 @@ export class CustomerProfilesChannelEndpointAssignmentPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: CustomerProfilesChannelEndpointAssignmentPayload + payload: CustomerProfilesChannelEndpointAssignmentResource ): CustomerProfilesChannelEndpointAssignmentInstance { return new CustomerProfilesChannelEndpointAssignmentInstance( this._version, diff --git a/lib/rest/trusthub/v1/customerProfiles/customerProfilesEntityAssignments.ts b/lib/rest/trusthub/v1/customerProfiles/customerProfilesEntityAssignments.ts index ccad445d99..66ca2232a8 100644 --- a/lib/rest/trusthub/v1/customerProfiles/customerProfilesEntityAssignments.ts +++ b/lib/rest/trusthub/v1/customerProfiles/customerProfilesEntityAssignments.ts @@ -188,8 +188,9 @@ export class CustomerProfilesEntityAssignmentsContextImpl } interface CustomerProfilesEntityAssignmentsPayload - extends CustomerProfilesEntityAssignmentsResource, - TwilioResponsePayload {} + extends TwilioResponsePayload { + results: CustomerProfilesEntityAssignmentsResource[]; +} interface CustomerProfilesEntityAssignmentsResource { sid?: string | null; @@ -206,7 +207,7 @@ export class CustomerProfilesEntityAssignmentsInstance { constructor( protected _version: V1, - payload: CustomerProfilesEntityAssignmentsPayload, + payload: CustomerProfilesEntityAssignmentsResource, customerProfileSid: string, sid?: string ) { @@ -682,7 +683,7 @@ export class CustomerProfilesEntityAssignmentsPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: CustomerProfilesEntityAssignmentsPayload + payload: CustomerProfilesEntityAssignmentsResource ): CustomerProfilesEntityAssignmentsInstance { return new CustomerProfilesEntityAssignmentsInstance( this._version, diff --git a/lib/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.ts b/lib/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.ts index 9802012e99..d48370b314 100644 --- a/lib/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.ts +++ b/lib/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.ts @@ -164,9 +164,9 @@ export class CustomerProfilesEvaluationsContextImpl } } -interface CustomerProfilesEvaluationsPayload - extends CustomerProfilesEvaluationsResource, - TwilioResponsePayload {} +interface CustomerProfilesEvaluationsPayload extends TwilioResponsePayload { + results: CustomerProfilesEvaluationsResource[]; +} interface CustomerProfilesEvaluationsResource { sid?: string | null; @@ -185,7 +185,7 @@ export class CustomerProfilesEvaluationsInstance { constructor( protected _version: V1, - payload: CustomerProfilesEvaluationsPayload, + payload: CustomerProfilesEvaluationsResource, customerProfileSid: string, sid?: string ) { @@ -648,7 +648,7 @@ export class CustomerProfilesEvaluationsPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: CustomerProfilesEvaluationsPayload + payload: CustomerProfilesEvaluationsResource ): CustomerProfilesEvaluationsInstance { return new CustomerProfilesEvaluationsInstance( this._version, diff --git a/lib/rest/trusthub/v1/endUser.ts b/lib/rest/trusthub/v1/endUser.ts index 9ebf6f192a..64892f601b 100644 --- a/lib/rest/trusthub/v1/endUser.ts +++ b/lib/rest/trusthub/v1/endUser.ts @@ -246,7 +246,9 @@ export class EndUserContextImpl implements EndUserContext { } } -interface EndUserPayload extends EndUserResource, TwilioResponsePayload {} +interface EndUserPayload extends TwilioResponsePayload { + results: EndUserResource[]; +} interface EndUserResource { sid?: string | null; @@ -263,7 +265,7 @@ export class EndUserInstance { protected _solution: EndUserContextSolution; protected _context?: EndUserContext; - constructor(protected _version: V1, payload: EndUserPayload, sid?: string) { + constructor(protected _version: V1, payload: EndUserResource, sid?: string) { this.sid = payload.sid; this.accountSid = payload.account_sid; this.friendlyName = payload.friendly_name; @@ -706,7 +708,7 @@ export class EndUserPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: EndUserPayload): EndUserInstance { + getInstance(payload: EndUserResource): EndUserInstance { return new EndUserInstance(this._version, payload); } diff --git a/lib/rest/trusthub/v1/endUserType.ts b/lib/rest/trusthub/v1/endUserType.ts index b894c62df0..fd67eddb7a 100644 --- a/lib/rest/trusthub/v1/endUserType.ts +++ b/lib/rest/trusthub/v1/endUserType.ts @@ -136,9 +136,9 @@ export class EndUserTypeContextImpl implements EndUserTypeContext { } } -interface EndUserTypePayload - extends EndUserTypeResource, - TwilioResponsePayload {} +interface EndUserTypePayload extends TwilioResponsePayload { + end_user_types: EndUserTypeResource[]; +} interface EndUserTypeResource { sid?: string | null; @@ -154,7 +154,7 @@ export class EndUserTypeInstance { constructor( protected _version: V1, - payload: EndUserTypePayload, + payload: EndUserTypeResource, sid?: string ) { this.sid = payload.sid; @@ -480,7 +480,7 @@ export class EndUserTypePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: EndUserTypePayload): EndUserTypeInstance { + getInstance(payload: EndUserTypeResource): EndUserTypeInstance { return new EndUserTypeInstance(this._version, payload); } diff --git a/lib/rest/trusthub/v1/policies.ts b/lib/rest/trusthub/v1/policies.ts index 9c85846505..e7ae118e49 100644 --- a/lib/rest/trusthub/v1/policies.ts +++ b/lib/rest/trusthub/v1/policies.ts @@ -136,7 +136,9 @@ export class PoliciesContextImpl implements PoliciesContext { } } -interface PoliciesPayload extends PoliciesResource, TwilioResponsePayload {} +interface PoliciesPayload extends TwilioResponsePayload { + results: PoliciesResource[]; +} interface PoliciesResource { sid?: string | null; @@ -149,7 +151,7 @@ export class PoliciesInstance { protected _solution: PoliciesContextSolution; protected _context?: PoliciesContext; - constructor(protected _version: V1, payload: PoliciesPayload, sid?: string) { + constructor(protected _version: V1, payload: PoliciesResource, sid?: string) { this.sid = payload.sid; this.friendlyName = payload.friendly_name; this.requirements = payload.requirements; @@ -466,7 +468,7 @@ export class PoliciesPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: PoliciesPayload): PoliciesInstance { + getInstance(payload: PoliciesResource): PoliciesInstance { return new PoliciesInstance(this._version, payload); } diff --git a/lib/rest/trusthub/v1/supportingDocument.ts b/lib/rest/trusthub/v1/supportingDocument.ts index 7f351cd065..dc0fcaf0e9 100644 --- a/lib/rest/trusthub/v1/supportingDocument.ts +++ b/lib/rest/trusthub/v1/supportingDocument.ts @@ -267,9 +267,9 @@ export class SupportingDocumentContextImpl } } -interface SupportingDocumentPayload - extends SupportingDocumentResource, - TwilioResponsePayload {} +interface SupportingDocumentPayload extends TwilioResponsePayload { + results: SupportingDocumentResource[]; +} interface SupportingDocumentResource { sid?: string | null; @@ -290,7 +290,7 @@ export class SupportingDocumentInstance { constructor( protected _version: V1, - payload: SupportingDocumentPayload, + payload: SupportingDocumentResource, sid?: string ) { this.sid = payload.sid; @@ -758,7 +758,7 @@ export class SupportingDocumentPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SupportingDocumentPayload): SupportingDocumentInstance { + getInstance(payload: SupportingDocumentResource): SupportingDocumentInstance { return new SupportingDocumentInstance(this._version, payload); } diff --git a/lib/rest/trusthub/v1/supportingDocumentType.ts b/lib/rest/trusthub/v1/supportingDocumentType.ts index fc7053e196..a68d5d0313 100644 --- a/lib/rest/trusthub/v1/supportingDocumentType.ts +++ b/lib/rest/trusthub/v1/supportingDocumentType.ts @@ -148,9 +148,9 @@ export class SupportingDocumentTypeContextImpl } } -interface SupportingDocumentTypePayload - extends SupportingDocumentTypeResource, - TwilioResponsePayload {} +interface SupportingDocumentTypePayload extends TwilioResponsePayload { + supporting_document_types: SupportingDocumentTypeResource[]; +} interface SupportingDocumentTypeResource { sid?: string | null; @@ -166,7 +166,7 @@ export class SupportingDocumentTypeInstance { constructor( protected _version: V1, - payload: SupportingDocumentTypePayload, + payload: SupportingDocumentTypeResource, sid?: string ) { this.sid = payload.sid; @@ -519,7 +519,7 @@ export class SupportingDocumentTypePage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: SupportingDocumentTypePayload + payload: SupportingDocumentTypeResource ): SupportingDocumentTypeInstance { return new SupportingDocumentTypeInstance(this._version, payload); } diff --git a/lib/rest/trusthub/v1/trustProducts.ts b/lib/rest/trusthub/v1/trustProducts.ts index f5f1ab6e9d..813e4c8d00 100644 --- a/lib/rest/trusthub/v1/trustProducts.ts +++ b/lib/rest/trusthub/v1/trustProducts.ts @@ -317,9 +317,9 @@ export class TrustProductsContextImpl implements TrustProductsContext { } } -interface TrustProductsPayload - extends TrustProductsResource, - TwilioResponsePayload {} +interface TrustProductsPayload extends TwilioResponsePayload { + results: TrustProductsResource[]; +} interface TrustProductsResource { sid?: string | null; @@ -342,7 +342,7 @@ export class TrustProductsInstance { constructor( protected _version: V1, - payload: TrustProductsPayload, + payload: TrustProductsResource, sid?: string ) { this.sid = payload.sid; @@ -850,7 +850,7 @@ export class TrustProductsPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: TrustProductsPayload): TrustProductsInstance { + getInstance(payload: TrustProductsResource): TrustProductsInstance { return new TrustProductsInstance(this._version, payload); } diff --git a/lib/rest/trusthub/v1/trustProducts/trustProductsChannelEndpointAssignment.ts b/lib/rest/trusthub/v1/trustProducts/trustProductsChannelEndpointAssignment.ts index 4ac5e165f3..8166dfa4bf 100644 --- a/lib/rest/trusthub/v1/trustProducts/trustProductsChannelEndpointAssignment.ts +++ b/lib/rest/trusthub/v1/trustProducts/trustProductsChannelEndpointAssignment.ts @@ -204,8 +204,9 @@ export class TrustProductsChannelEndpointAssignmentContextImpl } interface TrustProductsChannelEndpointAssignmentPayload - extends TrustProductsChannelEndpointAssignmentResource, - TwilioResponsePayload {} + extends TwilioResponsePayload { + results: TrustProductsChannelEndpointAssignmentResource[]; +} interface TrustProductsChannelEndpointAssignmentResource { sid?: string | null; @@ -223,7 +224,7 @@ export class TrustProductsChannelEndpointAssignmentInstance { constructor( protected _version: V1, - payload: TrustProductsChannelEndpointAssignmentPayload, + payload: TrustProductsChannelEndpointAssignmentResource, trustProductSid: string, sid?: string ) { @@ -729,7 +730,7 @@ export class TrustProductsChannelEndpointAssignmentPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: TrustProductsChannelEndpointAssignmentPayload + payload: TrustProductsChannelEndpointAssignmentResource ): TrustProductsChannelEndpointAssignmentInstance { return new TrustProductsChannelEndpointAssignmentInstance( this._version, diff --git a/lib/rest/trusthub/v1/trustProducts/trustProductsEntityAssignments.ts b/lib/rest/trusthub/v1/trustProducts/trustProductsEntityAssignments.ts index 71c002c53b..aa0a705018 100644 --- a/lib/rest/trusthub/v1/trustProducts/trustProductsEntityAssignments.ts +++ b/lib/rest/trusthub/v1/trustProducts/trustProductsEntityAssignments.ts @@ -187,9 +187,9 @@ export class TrustProductsEntityAssignmentsContextImpl } } -interface TrustProductsEntityAssignmentsPayload - extends TrustProductsEntityAssignmentsResource, - TwilioResponsePayload {} +interface TrustProductsEntityAssignmentsPayload extends TwilioResponsePayload { + results: TrustProductsEntityAssignmentsResource[]; +} interface TrustProductsEntityAssignmentsResource { sid?: string | null; @@ -206,7 +206,7 @@ export class TrustProductsEntityAssignmentsInstance { constructor( protected _version: V1, - payload: TrustProductsEntityAssignmentsPayload, + payload: TrustProductsEntityAssignmentsResource, trustProductSid: string, sid?: string ) { @@ -682,7 +682,7 @@ export class TrustProductsEntityAssignmentsPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: TrustProductsEntityAssignmentsPayload + payload: TrustProductsEntityAssignmentsResource ): TrustProductsEntityAssignmentsInstance { return new TrustProductsEntityAssignmentsInstance( this._version, diff --git a/lib/rest/trusthub/v1/trustProducts/trustProductsEvaluations.ts b/lib/rest/trusthub/v1/trustProducts/trustProductsEvaluations.ts index f2efb0eb6c..00d3634295 100644 --- a/lib/rest/trusthub/v1/trustProducts/trustProductsEvaluations.ts +++ b/lib/rest/trusthub/v1/trustProducts/trustProductsEvaluations.ts @@ -164,9 +164,9 @@ export class TrustProductsEvaluationsContextImpl } } -interface TrustProductsEvaluationsPayload - extends TrustProductsEvaluationsResource, - TwilioResponsePayload {} +interface TrustProductsEvaluationsPayload extends TwilioResponsePayload { + results: TrustProductsEvaluationsResource[]; +} interface TrustProductsEvaluationsResource { sid?: string | null; @@ -185,7 +185,7 @@ export class TrustProductsEvaluationsInstance { constructor( protected _version: V1, - payload: TrustProductsEvaluationsPayload, + payload: TrustProductsEvaluationsResource, trustProductSid: string, sid?: string ) { @@ -629,7 +629,7 @@ export class TrustProductsEvaluationsPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: TrustProductsEvaluationsPayload + payload: TrustProductsEvaluationsResource ): TrustProductsEvaluationsInstance { return new TrustProductsEvaluationsInstance( this._version, diff --git a/lib/rest/verify/v2/form.ts b/lib/rest/verify/v2/form.ts index 45b3862a3d..cb3c0babdb 100644 --- a/lib/rest/verify/v2/form.ts +++ b/lib/rest/verify/v2/form.ts @@ -104,7 +104,7 @@ export class FormInstance { constructor( protected _version: V2, - payload: FormPayload, + payload: FormResource, formType?: FormFormTypes ) { this.formType = payload.form_type; diff --git a/lib/rest/verify/v2/safelist.ts b/lib/rest/verify/v2/safelist.ts index 27cf4ae9a3..7f1a359ce7 100644 --- a/lib/rest/verify/v2/safelist.ts +++ b/lib/rest/verify/v2/safelist.ts @@ -139,7 +139,7 @@ export class SafelistInstance { constructor( protected _version: V2, - payload: SafelistPayload, + payload: SafelistResource, phoneNumber?: string ) { this.sid = payload.sid; diff --git a/lib/rest/verify/v2/service.ts b/lib/rest/verify/v2/service.ts index 182b3e0e17..6e00e6f8dc 100644 --- a/lib/rest/verify/v2/service.ts +++ b/lib/rest/verify/v2/service.ts @@ -405,7 +405,9 @@ export class ServiceContextImpl implements ServiceContext { } } -interface ServicePayload extends ServiceResource, TwilioResponsePayload {} +interface ServicePayload extends TwilioResponsePayload { + services: ServiceResource[]; +} interface ServiceResource { sid?: string | null; @@ -432,7 +434,7 @@ export class ServiceInstance { protected _solution: ServiceContextSolution; protected _context?: ServiceContext; - constructor(protected _version: V2, payload: ServicePayload, sid?: string) { + constructor(protected _version: V2, payload: ServiceResource, sid?: string) { this.sid = payload.sid; this.accountSid = payload.account_sid; this.friendlyName = payload.friendly_name; @@ -1006,7 +1008,7 @@ export class ServicePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ServicePayload): ServiceInstance { + getInstance(payload: ServiceResource): ServiceInstance { return new ServiceInstance(this._version, payload); } diff --git a/lib/rest/verify/v2/service/accessToken.ts b/lib/rest/verify/v2/service/accessToken.ts index 434fbd54fd..a3ce4a1c2c 100644 --- a/lib/rest/verify/v2/service/accessToken.ts +++ b/lib/rest/verify/v2/service/accessToken.ts @@ -135,7 +135,7 @@ export class AccessTokenInstance { constructor( protected _version: V2, - payload: AccessTokenPayload, + payload: AccessTokenResource, serviceSid: string, sid?: string ) { diff --git a/lib/rest/verify/v2/service/entity.ts b/lib/rest/verify/v2/service/entity.ts index c909c20de2..03bd95b222 100644 --- a/lib/rest/verify/v2/service/entity.ts +++ b/lib/rest/verify/v2/service/entity.ts @@ -223,7 +223,9 @@ export class EntityContextImpl implements EntityContext { } } -interface EntityPayload extends EntityResource, TwilioResponsePayload {} +interface EntityPayload extends TwilioResponsePayload { + entities: EntityResource[]; +} interface EntityResource { sid?: string | null; @@ -242,7 +244,7 @@ export class EntityInstance { constructor( protected _version: V2, - payload: EntityPayload, + payload: EntityResource, serviceSid: string, identity?: string ) { @@ -687,7 +689,7 @@ export class EntityPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: EntityPayload): EntityInstance { + getInstance(payload: EntityResource): EntityInstance { return new EntityInstance( this._version, payload, diff --git a/lib/rest/verify/v2/service/entity/challenge.ts b/lib/rest/verify/v2/service/entity/challenge.ts index 6140ca7f2a..118c6ef730 100644 --- a/lib/rest/verify/v2/service/entity/challenge.ts +++ b/lib/rest/verify/v2/service/entity/challenge.ts @@ -297,7 +297,9 @@ export class ChallengeContextImpl implements ChallengeContext { } } -interface ChallengePayload extends ChallengeResource, TwilioResponsePayload {} +interface ChallengePayload extends TwilioResponsePayload { + challenges: ChallengeResource[]; +} interface ChallengeResource { sid?: string | null; @@ -326,7 +328,7 @@ export class ChallengeInstance { constructor( protected _version: V2, - payload: ChallengePayload, + payload: ChallengeResource, serviceSid: string, identity: string, sid?: string @@ -851,7 +853,7 @@ export class ChallengePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ChallengePayload): ChallengeInstance { + getInstance(payload: ChallengeResource): ChallengeInstance { return new ChallengeInstance( this._version, payload, diff --git a/lib/rest/verify/v2/service/entity/challenge/notification.ts b/lib/rest/verify/v2/service/entity/challenge/notification.ts index f7dbd62048..393284768e 100644 --- a/lib/rest/verify/v2/service/entity/challenge/notification.ts +++ b/lib/rest/verify/v2/service/entity/challenge/notification.ts @@ -171,7 +171,7 @@ interface NotificationResource { export class NotificationInstance { constructor( protected _version: V2, - payload: NotificationPayload, + payload: NotificationResource, serviceSid: string, identity: string, challengeSid: string diff --git a/lib/rest/verify/v2/service/entity/factor.ts b/lib/rest/verify/v2/service/entity/factor.ts index 06d35e44e0..f1fc8ab1d8 100644 --- a/lib/rest/verify/v2/service/entity/factor.ts +++ b/lib/rest/verify/v2/service/entity/factor.ts @@ -295,7 +295,9 @@ export class FactorContextImpl implements FactorContext { } } -interface FactorPayload extends FactorResource, TwilioResponsePayload {} +interface FactorPayload extends TwilioResponsePayload { + factors: FactorResource[]; +} interface FactorResource { sid?: string | null; @@ -319,7 +321,7 @@ export class FactorInstance { constructor( protected _version: V2, - payload: FactorPayload, + payload: FactorResource, serviceSid: string, identity: string, sid?: string @@ -747,7 +749,7 @@ export class FactorPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: FactorPayload): FactorInstance { + getInstance(payload: FactorResource): FactorInstance { return new FactorInstance( this._version, payload, diff --git a/lib/rest/verify/v2/service/entity/newFactor.ts b/lib/rest/verify/v2/service/entity/newFactor.ts index 0825cb18bc..4521c6d56f 100644 --- a/lib/rest/verify/v2/service/entity/newFactor.ts +++ b/lib/rest/verify/v2/service/entity/newFactor.ts @@ -228,7 +228,7 @@ interface NewFactorResource { export class NewFactorInstance { constructor( protected _version: V2, - payload: NewFactorPayload, + payload: NewFactorResource, serviceSid: string, identity: string ) { diff --git a/lib/rest/verify/v2/service/messagingConfiguration.ts b/lib/rest/verify/v2/service/messagingConfiguration.ts index 3d53376efa..e003a95d49 100644 --- a/lib/rest/verify/v2/service/messagingConfiguration.ts +++ b/lib/rest/verify/v2/service/messagingConfiguration.ts @@ -261,9 +261,9 @@ export class MessagingConfigurationContextImpl } } -interface MessagingConfigurationPayload - extends MessagingConfigurationResource, - TwilioResponsePayload {} +interface MessagingConfigurationPayload extends TwilioResponsePayload { + messaging_configurations: MessagingConfigurationResource[]; +} interface MessagingConfigurationResource { account_sid?: string | null; @@ -281,7 +281,7 @@ export class MessagingConfigurationInstance { constructor( protected _version: V2, - payload: MessagingConfigurationPayload, + payload: MessagingConfigurationResource, serviceSid: string, country?: string ) { @@ -761,7 +761,7 @@ export class MessagingConfigurationPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: MessagingConfigurationPayload + payload: MessagingConfigurationResource ): MessagingConfigurationInstance { return new MessagingConfigurationInstance( this._version, diff --git a/lib/rest/verify/v2/service/rateLimit.ts b/lib/rest/verify/v2/service/rateLimit.ts index 89a80f7472..7f9b36e17b 100644 --- a/lib/rest/verify/v2/service/rateLimit.ts +++ b/lib/rest/verify/v2/service/rateLimit.ts @@ -271,7 +271,9 @@ export class RateLimitContextImpl implements RateLimitContext { } } -interface RateLimitPayload extends RateLimitResource, TwilioResponsePayload {} +interface RateLimitPayload extends TwilioResponsePayload { + rate_limits: RateLimitResource[]; +} interface RateLimitResource { sid?: string | null; @@ -291,7 +293,7 @@ export class RateLimitInstance { constructor( protected _version: V2, - payload: RateLimitPayload, + payload: RateLimitResource, serviceSid: string, sid?: string ) { @@ -759,7 +761,7 @@ export class RateLimitPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: RateLimitPayload): RateLimitInstance { + getInstance(payload: RateLimitResource): RateLimitInstance { return new RateLimitInstance( this._version, payload, diff --git a/lib/rest/verify/v2/service/rateLimit/bucket.ts b/lib/rest/verify/v2/service/rateLimit/bucket.ts index 145123a6a8..9e336db2fd 100644 --- a/lib/rest/verify/v2/service/rateLimit/bucket.ts +++ b/lib/rest/verify/v2/service/rateLimit/bucket.ts @@ -269,7 +269,9 @@ export class BucketContextImpl implements BucketContext { } } -interface BucketPayload extends BucketResource, TwilioResponsePayload {} +interface BucketPayload extends TwilioResponsePayload { + buckets: BucketResource[]; +} interface BucketResource { sid?: string | null; @@ -289,7 +291,7 @@ export class BucketInstance { constructor( protected _version: V2, - payload: BucketPayload, + payload: BucketResource, serviceSid: string, rateLimitSid: string, sid?: string @@ -763,7 +765,7 @@ export class BucketPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: BucketPayload): BucketInstance { + getInstance(payload: BucketResource): BucketInstance { return new BucketInstance( this._version, payload, diff --git a/lib/rest/verify/v2/service/verification.ts b/lib/rest/verify/v2/service/verification.ts index f13587d734..17a3724f09 100644 --- a/lib/rest/verify/v2/service/verification.ts +++ b/lib/rest/verify/v2/service/verification.ts @@ -226,7 +226,7 @@ export class VerificationInstance { constructor( protected _version: V2, - payload: VerificationPayload, + payload: VerificationResource, serviceSid: string, sid?: string ) { diff --git a/lib/rest/verify/v2/service/verificationCheck.ts b/lib/rest/verify/v2/service/verificationCheck.ts index 0f7303a66d..2d35cf5300 100644 --- a/lib/rest/verify/v2/service/verificationCheck.ts +++ b/lib/rest/verify/v2/service/verificationCheck.ts @@ -178,7 +178,7 @@ interface VerificationCheckResource { export class VerificationCheckInstance { constructor( protected _version: V2, - payload: VerificationCheckPayload, + payload: VerificationCheckResource, serviceSid: string ) { this.sid = payload.sid; diff --git a/lib/rest/verify/v2/service/webhook.ts b/lib/rest/verify/v2/service/webhook.ts index cebf7e5de6..829a61727c 100644 --- a/lib/rest/verify/v2/service/webhook.ts +++ b/lib/rest/verify/v2/service/webhook.ts @@ -281,7 +281,9 @@ export class WebhookContextImpl implements WebhookContext { } } -interface WebhookPayload extends WebhookResource, TwilioResponsePayload {} +interface WebhookPayload extends TwilioResponsePayload { + webhooks: WebhookResource[]; +} interface WebhookResource { sid?: string | null; @@ -304,7 +306,7 @@ export class WebhookInstance { constructor( protected _version: V2, - payload: WebhookPayload, + payload: WebhookResource, serviceSid: string, sid?: string ) { @@ -789,7 +791,7 @@ export class WebhookPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: WebhookPayload): WebhookInstance { + getInstance(payload: WebhookResource): WebhookInstance { return new WebhookInstance( this._version, payload, diff --git a/lib/rest/verify/v2/template.ts b/lib/rest/verify/v2/template.ts index 1945a44e6d..2913c15efd 100644 --- a/lib/rest/verify/v2/template.ts +++ b/lib/rest/verify/v2/template.ts @@ -294,7 +294,9 @@ export function TemplateListInstance(version: V2): TemplateListInstance { return instance; } -interface TemplatePayload extends TemplateResource, TwilioResponsePayload {} +interface TemplatePayload extends TwilioResponsePayload { + templates: TemplateResource[]; +} interface TemplateResource { sid?: string | null; @@ -305,7 +307,7 @@ interface TemplateResource { } export class TemplateInstance { - constructor(protected _version: V2, payload: TemplatePayload) { + constructor(protected _version: V2, payload: TemplateResource) { this.sid = payload.sid; this.accountSid = payload.account_sid; this.friendlyName = payload.friendly_name; @@ -380,7 +382,7 @@ export class TemplatePage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: TemplatePayload): TemplateInstance { + getInstance(payload: TemplateResource): TemplateInstance { return new TemplateInstance(this._version, payload); } diff --git a/lib/rest/verify/v2/verificationAttempt.ts b/lib/rest/verify/v2/verificationAttempt.ts index 2935a68c4c..11218c81f7 100644 --- a/lib/rest/verify/v2/verificationAttempt.ts +++ b/lib/rest/verify/v2/verificationAttempt.ts @@ -197,9 +197,9 @@ export class VerificationAttemptContextImpl } } -interface VerificationAttemptPayload - extends VerificationAttemptResource, - TwilioResponsePayload {} +interface VerificationAttemptPayload extends TwilioResponsePayload { + attempts: VerificationAttemptResource[]; +} interface VerificationAttemptResource { sid?: string | null; @@ -221,7 +221,7 @@ export class VerificationAttemptInstance { constructor( protected _version: V2, - payload: VerificationAttemptPayload, + payload: VerificationAttemptResource, sid?: string ) { this.sid = payload.sid; @@ -611,7 +611,7 @@ export class VerificationAttemptPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: VerificationAttemptPayload + payload: VerificationAttemptResource ): VerificationAttemptInstance { return new VerificationAttemptInstance(this._version, payload); } diff --git a/lib/rest/verify/v2/verificationAttemptsSummary.ts b/lib/rest/verify/v2/verificationAttemptsSummary.ts index 62ecbb9e76..243cbb2fda 100644 --- a/lib/rest/verify/v2/verificationAttemptsSummary.ts +++ b/lib/rest/verify/v2/verificationAttemptsSummary.ts @@ -178,7 +178,7 @@ export class VerificationAttemptsSummaryInstance { constructor( protected _version: V2, - payload: VerificationAttemptsSummaryPayload + payload: VerificationAttemptsSummaryResource ) { this.totalAttempts = deserialize.integer(payload.total_attempts); this.totalConverted = deserialize.integer(payload.total_converted); diff --git a/lib/rest/video/v1/composition.ts b/lib/rest/video/v1/composition.ts index 4a6cc5a447..9dc2f62c65 100644 --- a/lib/rest/video/v1/composition.ts +++ b/lib/rest/video/v1/composition.ts @@ -225,9 +225,9 @@ export type CompositionStatusCallbackMethod = | "PUT" | "DELETE"; -interface CompositionPayload - extends CompositionResource, - TwilioResponsePayload {} +interface CompositionPayload extends TwilioResponsePayload { + compositions: CompositionResource[]; +} interface CompositionResource { account_sid?: string | null; @@ -259,7 +259,7 @@ export class CompositionInstance { constructor( protected _version: V1, - payload: CompositionPayload, + payload: CompositionResource, sid?: string ) { this.accountSid = payload.account_sid; @@ -768,7 +768,7 @@ export class CompositionPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: CompositionPayload): CompositionInstance { + getInstance(payload: CompositionResource): CompositionInstance { return new CompositionInstance(this._version, payload); } diff --git a/lib/rest/video/v1/compositionHook.ts b/lib/rest/video/v1/compositionHook.ts index f2d180a183..f619d80745 100644 --- a/lib/rest/video/v1/compositionHook.ts +++ b/lib/rest/video/v1/compositionHook.ts @@ -331,9 +331,9 @@ export type CompositionHookStatusCallbackMethod = | "PUT" | "DELETE"; -interface CompositionHookPayload - extends CompositionHookResource, - TwilioResponsePayload {} +interface CompositionHookPayload extends TwilioResponsePayload { + composition_hooks: CompositionHookResource[]; +} interface CompositionHookResource { account_sid?: string | null; @@ -359,7 +359,7 @@ export class CompositionHookInstance { constructor( protected _version: V1, - payload: CompositionHookPayload, + payload: CompositionHookResource, sid?: string ) { this.accountSid = payload.account_sid; @@ -868,7 +868,7 @@ export class CompositionHookPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: CompositionHookPayload): CompositionHookInstance { + getInstance(payload: CompositionHookResource): CompositionHookInstance { return new CompositionHookInstance(this._version, payload); } diff --git a/lib/rest/video/v1/compositionSettings.ts b/lib/rest/video/v1/compositionSettings.ts index 674e66d58f..65cf86ff78 100644 --- a/lib/rest/video/v1/compositionSettings.ts +++ b/lib/rest/video/v1/compositionSettings.ts @@ -179,7 +179,7 @@ export class CompositionSettingsInstance { protected _solution: CompositionSettingsContextSolution; protected _context?: CompositionSettingsContext; - constructor(protected _version: V1, payload: CompositionSettingsPayload) { + constructor(protected _version: V1, payload: CompositionSettingsResource) { this.accountSid = payload.account_sid; this.friendlyName = payload.friendly_name; this.awsCredentialsSid = payload.aws_credentials_sid; diff --git a/lib/rest/video/v1/recording.ts b/lib/rest/video/v1/recording.ts index b52624ff4c..a34d99e0f9 100644 --- a/lib/rest/video/v1/recording.ts +++ b/lib/rest/video/v1/recording.ts @@ -212,7 +212,9 @@ export type RecordingStatusCallbackMethod = | "PUT" | "DELETE"; -interface RecordingPayload extends RecordingResource, TwilioResponsePayload {} +interface RecordingPayload extends TwilioResponsePayload { + recordings: RecordingResource[]; +} interface RecordingResource { account_sid?: string | null; @@ -239,7 +241,11 @@ export class RecordingInstance { protected _solution: RecordingContextSolution; protected _context?: RecordingContext; - constructor(protected _version: V1, payload: RecordingPayload, sid?: string) { + constructor( + protected _version: V1, + payload: RecordingResource, + sid?: string + ) { this.accountSid = payload.account_sid; this.status = payload.status; this.dateCreated = deserialize.iso8601DateTime(payload.date_created); @@ -656,7 +662,7 @@ export class RecordingPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: RecordingPayload): RecordingInstance { + getInstance(payload: RecordingResource): RecordingInstance { return new RecordingInstance(this._version, payload); } diff --git a/lib/rest/video/v1/recordingSettings.ts b/lib/rest/video/v1/recordingSettings.ts index de982e8685..65a5342c15 100644 --- a/lib/rest/video/v1/recordingSettings.ts +++ b/lib/rest/video/v1/recordingSettings.ts @@ -177,7 +177,7 @@ export class RecordingSettingsInstance { protected _solution: RecordingSettingsContextSolution; protected _context?: RecordingSettingsContext; - constructor(protected _version: V1, payload: RecordingSettingsPayload) { + constructor(protected _version: V1, payload: RecordingSettingsResource) { this.accountSid = payload.account_sid; this.friendlyName = payload.friendly_name; this.awsCredentialsSid = payload.aws_credentials_sid; diff --git a/lib/rest/video/v1/room.ts b/lib/rest/video/v1/room.ts index 26f03e37c1..15b3cd1c12 100644 --- a/lib/rest/video/v1/room.ts +++ b/lib/rest/video/v1/room.ts @@ -300,7 +300,9 @@ export type RoomStatusCallbackMethod = | "PUT" | "DELETE"; -interface RoomPayload extends RoomResource, TwilioResponsePayload {} +interface RoomPayload extends TwilioResponsePayload { + rooms: RoomResource[]; +} interface RoomResource { sid?: string | null; @@ -333,7 +335,7 @@ export class RoomInstance { protected _solution: RoomContextSolution; protected _context?: RoomContext; - constructor(protected _version: V1, payload: RoomPayload, sid?: string) { + constructor(protected _version: V1, payload: RoomResource, sid?: string) { this.sid = payload.sid; this.status = payload.status; this.dateCreated = deserialize.iso8601DateTime(payload.date_created); @@ -902,7 +904,7 @@ export class RoomPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: RoomPayload): RoomInstance { + getInstance(payload: RoomResource): RoomInstance { return new RoomInstance(this._version, payload); } diff --git a/lib/rest/video/v1/room/participant.ts b/lib/rest/video/v1/room/participant.ts index f7251dbc78..6695fec729 100644 --- a/lib/rest/video/v1/room/participant.ts +++ b/lib/rest/video/v1/room/participant.ts @@ -302,9 +302,9 @@ export class ParticipantContextImpl implements ParticipantContext { } } -interface ParticipantPayload - extends ParticipantResource, - TwilioResponsePayload {} +interface ParticipantPayload extends TwilioResponsePayload { + participants: ParticipantResource[]; +} interface ParticipantResource { sid?: string | null; @@ -327,7 +327,7 @@ export class ParticipantInstance { constructor( protected _version: V1, - payload: ParticipantPayload, + payload: ParticipantResource, roomSid: string, sid?: string ) { @@ -770,7 +770,7 @@ export class ParticipantPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ParticipantPayload): ParticipantInstance { + getInstance(payload: ParticipantResource): ParticipantInstance { return new ParticipantInstance( this._version, payload, diff --git a/lib/rest/video/v1/room/participant/anonymize.ts b/lib/rest/video/v1/room/participant/anonymize.ts index fcc8cd396d..316cb79e81 100644 --- a/lib/rest/video/v1/room/participant/anonymize.ts +++ b/lib/rest/video/v1/room/participant/anonymize.ts @@ -121,7 +121,7 @@ export class AnonymizeInstance { constructor( protected _version: V1, - payload: AnonymizePayload, + payload: AnonymizeResource, roomSid: string, sid: string ) { diff --git a/lib/rest/video/v1/room/participant/publishedTrack.ts b/lib/rest/video/v1/room/participant/publishedTrack.ts index 641b7be86e..355aa54b1e 100644 --- a/lib/rest/video/v1/room/participant/publishedTrack.ts +++ b/lib/rest/video/v1/room/participant/publishedTrack.ts @@ -162,9 +162,9 @@ export class PublishedTrackContextImpl implements PublishedTrackContext { } } -interface PublishedTrackPayload - extends PublishedTrackResource, - TwilioResponsePayload {} +interface PublishedTrackPayload extends TwilioResponsePayload { + published_tracks: PublishedTrackResource[]; +} interface PublishedTrackResource { sid?: string | null; @@ -184,7 +184,7 @@ export class PublishedTrackInstance { constructor( protected _version: V1, - payload: PublishedTrackPayload, + payload: PublishedTrackResource, roomSid: string, participantSid: string, sid?: string @@ -561,7 +561,7 @@ export class PublishedTrackPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: PublishedTrackPayload): PublishedTrackInstance { + getInstance(payload: PublishedTrackResource): PublishedTrackInstance { return new PublishedTrackInstance( this._version, payload, diff --git a/lib/rest/video/v1/room/participant/subscribeRules.ts b/lib/rest/video/v1/room/participant/subscribeRules.ts index 5f39493169..df70cd324c 100644 --- a/lib/rest/video/v1/room/participant/subscribeRules.ts +++ b/lib/rest/video/v1/room/participant/subscribeRules.ts @@ -207,7 +207,7 @@ interface SubscribeRulesResource { export class SubscribeRulesInstance { constructor( protected _version: V1, - payload: SubscribeRulesPayload, + payload: SubscribeRulesResource, roomSid: string, participantSid: string ) { diff --git a/lib/rest/video/v1/room/participant/subscribedTrack.ts b/lib/rest/video/v1/room/participant/subscribedTrack.ts index 958fa65d65..4747f8865a 100644 --- a/lib/rest/video/v1/room/participant/subscribedTrack.ts +++ b/lib/rest/video/v1/room/participant/subscribedTrack.ts @@ -162,9 +162,9 @@ export class SubscribedTrackContextImpl implements SubscribedTrackContext { } } -interface SubscribedTrackPayload - extends SubscribedTrackResource, - TwilioResponsePayload {} +interface SubscribedTrackPayload extends TwilioResponsePayload { + subscribed_tracks: SubscribedTrackResource[]; +} interface SubscribedTrackResource { sid?: string | null; @@ -185,7 +185,7 @@ export class SubscribedTrackInstance { constructor( protected _version: V1, - payload: SubscribedTrackPayload, + payload: SubscribedTrackResource, roomSid: string, participantSid: string, sid?: string @@ -573,7 +573,7 @@ export class SubscribedTrackPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SubscribedTrackPayload): SubscribedTrackInstance { + getInstance(payload: SubscribedTrackResource): SubscribedTrackInstance { return new SubscribedTrackInstance( this._version, payload, diff --git a/lib/rest/video/v1/room/recordingRules.ts b/lib/rest/video/v1/room/recordingRules.ts index d37c0c8f1a..52471fcc03 100644 --- a/lib/rest/video/v1/room/recordingRules.ts +++ b/lib/rest/video/v1/room/recordingRules.ts @@ -197,7 +197,7 @@ interface RecordingRulesResource { export class RecordingRulesInstance { constructor( protected _version: V1, - payload: RecordingRulesPayload, + payload: RecordingRulesResource, roomSid: string ) { this.roomSid = payload.room_sid; diff --git a/lib/rest/video/v1/room/roomRecording.ts b/lib/rest/video/v1/room/roomRecording.ts index 3d08c99982..b2a41bd1c1 100644 --- a/lib/rest/video/v1/room/roomRecording.ts +++ b/lib/rest/video/v1/room/roomRecording.ts @@ -203,9 +203,9 @@ export class RoomRecordingContextImpl implements RoomRecordingContext { } } -interface RoomRecordingPayload - extends RoomRecordingResource, - TwilioResponsePayload {} +interface RoomRecordingPayload extends TwilioResponsePayload { + recordings: RoomRecordingResource[]; +} interface RoomRecordingResource { account_sid?: string | null; @@ -233,7 +233,7 @@ export class RoomRecordingInstance { constructor( protected _version: V1, - payload: RoomRecordingPayload, + payload: RoomRecordingResource, roomSid: string, sid?: string ) { @@ -664,7 +664,7 @@ export class RoomRecordingPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: RoomRecordingPayload): RoomRecordingInstance { + getInstance(payload: RoomRecordingResource): RoomRecordingInstance { return new RoomRecordingInstance( this._version, payload, diff --git a/lib/rest/voice/v1/byocTrunk.ts b/lib/rest/voice/v1/byocTrunk.ts index c2e4a9ec36..1ccffaec0a 100644 --- a/lib/rest/voice/v1/byocTrunk.ts +++ b/lib/rest/voice/v1/byocTrunk.ts @@ -312,7 +312,9 @@ export type ByocTrunkStatusCallbackMethod = | "PUT" | "DELETE"; -interface ByocTrunkPayload extends ByocTrunkResource, TwilioResponsePayload {} +interface ByocTrunkPayload extends TwilioResponsePayload { + byoc_trunks: ByocTrunkResource[]; +} interface ByocTrunkResource { account_sid?: string | null; @@ -336,7 +338,11 @@ export class ByocTrunkInstance { protected _solution: ByocTrunkContextSolution; protected _context?: ByocTrunkContext; - constructor(protected _version: V1, payload: ByocTrunkPayload, sid?: string) { + constructor( + protected _version: V1, + payload: ByocTrunkResource, + sid?: string + ) { this.accountSid = payload.account_sid; this.sid = payload.sid; this.friendlyName = payload.friendly_name; @@ -837,7 +843,7 @@ export class ByocTrunkPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ByocTrunkPayload): ByocTrunkInstance { + getInstance(payload: ByocTrunkResource): ByocTrunkInstance { return new ByocTrunkInstance(this._version, payload); } diff --git a/lib/rest/voice/v1/connectionPolicy.ts b/lib/rest/voice/v1/connectionPolicy.ts index 33810c2f0c..66d662c131 100644 --- a/lib/rest/voice/v1/connectionPolicy.ts +++ b/lib/rest/voice/v1/connectionPolicy.ts @@ -261,9 +261,9 @@ export class ConnectionPolicyContextImpl implements ConnectionPolicyContext { } } -interface ConnectionPolicyPayload - extends ConnectionPolicyResource, - TwilioResponsePayload {} +interface ConnectionPolicyPayload extends TwilioResponsePayload { + connection_policies: ConnectionPolicyResource[]; +} interface ConnectionPolicyResource { account_sid?: string | null; @@ -281,7 +281,7 @@ export class ConnectionPolicyInstance { constructor( protected _version: V1, - payload: ConnectionPolicyPayload, + payload: ConnectionPolicyResource, sid?: string ) { this.accountSid = payload.account_sid; @@ -738,7 +738,7 @@ export class ConnectionPolicyPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: ConnectionPolicyPayload): ConnectionPolicyInstance { + getInstance(payload: ConnectionPolicyResource): ConnectionPolicyInstance { return new ConnectionPolicyInstance(this._version, payload); } diff --git a/lib/rest/voice/v1/connectionPolicy/connectionPolicyTarget.ts b/lib/rest/voice/v1/connectionPolicy/connectionPolicyTarget.ts index 67ad50c29d..0c4c617d4a 100644 --- a/lib/rest/voice/v1/connectionPolicy/connectionPolicyTarget.ts +++ b/lib/rest/voice/v1/connectionPolicy/connectionPolicyTarget.ts @@ -295,9 +295,9 @@ export class ConnectionPolicyTargetContextImpl } } -interface ConnectionPolicyTargetPayload - extends ConnectionPolicyTargetResource, - TwilioResponsePayload {} +interface ConnectionPolicyTargetPayload extends TwilioResponsePayload { + targets: ConnectionPolicyTargetResource[]; +} interface ConnectionPolicyTargetResource { account_sid?: string | null; @@ -319,7 +319,7 @@ export class ConnectionPolicyTargetInstance { constructor( protected _version: V1, - payload: ConnectionPolicyTargetPayload, + payload: ConnectionPolicyTargetResource, connectionPolicySid: string, sid?: string ) { @@ -838,7 +838,7 @@ export class ConnectionPolicyTargetPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: ConnectionPolicyTargetPayload + payload: ConnectionPolicyTargetResource ): ConnectionPolicyTargetInstance { return new ConnectionPolicyTargetInstance( this._version, diff --git a/lib/rest/voice/v1/dialingPermissions/bulkCountryUpdate.ts b/lib/rest/voice/v1/dialingPermissions/bulkCountryUpdate.ts index 3722de1443..d4148be7b7 100644 --- a/lib/rest/voice/v1/dialingPermissions/bulkCountryUpdate.ts +++ b/lib/rest/voice/v1/dialingPermissions/bulkCountryUpdate.ts @@ -135,7 +135,7 @@ interface BulkCountryUpdateResource { } export class BulkCountryUpdateInstance { - constructor(protected _version: V1, payload: BulkCountryUpdatePayload) { + constructor(protected _version: V1, payload: BulkCountryUpdateResource) { this.updateCount = deserialize.integer(payload.update_count); this.updateRequest = payload.update_request; } diff --git a/lib/rest/voice/v1/dialingPermissions/country.ts b/lib/rest/voice/v1/dialingPermissions/country.ts index 6e8a0f0b60..9e6910971d 100644 --- a/lib/rest/voice/v1/dialingPermissions/country.ts +++ b/lib/rest/voice/v1/dialingPermissions/country.ts @@ -184,7 +184,9 @@ export class CountryContextImpl implements CountryContext { } } -interface CountryPayload extends CountryResource, TwilioResponsePayload {} +interface CountryPayload extends TwilioResponsePayload { + content: CountryResource[]; +} interface CountryResource { iso_code?: string | null; @@ -204,7 +206,7 @@ export class CountryInstance { constructor( protected _version: V1, - payload: CountryPayload, + payload: CountryResource, isoCode?: string ) { this.isoCode = payload.iso_code; @@ -580,7 +582,7 @@ export class CountryPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: CountryPayload): CountryInstance { + getInstance(payload: CountryResource): CountryInstance { return new CountryInstance(this._version, payload); } diff --git a/lib/rest/voice/v1/dialingPermissions/country/highriskSpecialPrefix.ts b/lib/rest/voice/v1/dialingPermissions/country/highriskSpecialPrefix.ts index 48f8bcbf37..1e56a18f1b 100644 --- a/lib/rest/voice/v1/dialingPermissions/country/highriskSpecialPrefix.ts +++ b/lib/rest/voice/v1/dialingPermissions/country/highriskSpecialPrefix.ts @@ -315,9 +315,9 @@ export function HighriskSpecialPrefixListInstance( return instance; } -interface HighriskSpecialPrefixPayload - extends HighriskSpecialPrefixResource, - TwilioResponsePayload {} +interface HighriskSpecialPrefixPayload extends TwilioResponsePayload { + content: HighriskSpecialPrefixResource[]; +} interface HighriskSpecialPrefixResource { prefix?: string | null; @@ -326,7 +326,7 @@ interface HighriskSpecialPrefixResource { export class HighriskSpecialPrefixInstance { constructor( protected _version: V1, - payload: HighriskSpecialPrefixPayload, + payload: HighriskSpecialPrefixResource, isoCode: string ) { this.prefix = payload.prefix; @@ -380,7 +380,7 @@ export class HighriskSpecialPrefixPage extends Page< * @param payload - Payload response from the API */ getInstance( - payload: HighriskSpecialPrefixPayload + payload: HighriskSpecialPrefixResource ): HighriskSpecialPrefixInstance { return new HighriskSpecialPrefixInstance( this._version, diff --git a/lib/rest/voice/v1/dialingPermissions/settings.ts b/lib/rest/voice/v1/dialingPermissions/settings.ts index 4ef0efb6ef..f29bb4a949 100644 --- a/lib/rest/voice/v1/dialingPermissions/settings.ts +++ b/lib/rest/voice/v1/dialingPermissions/settings.ts @@ -161,7 +161,7 @@ export class SettingsInstance { protected _solution: SettingsContextSolution; protected _context?: SettingsContext; - constructor(protected _version: V1, payload: SettingsPayload) { + constructor(protected _version: V1, payload: SettingsResource) { this.dialingPermissionsInheritance = payload.dialing_permissions_inheritance; this.url = payload.url; diff --git a/lib/rest/voice/v1/ipRecord.ts b/lib/rest/voice/v1/ipRecord.ts index db24e60b50..ef43dd97dc 100644 --- a/lib/rest/voice/v1/ipRecord.ts +++ b/lib/rest/voice/v1/ipRecord.ts @@ -242,7 +242,9 @@ export class IpRecordContextImpl implements IpRecordContext { } } -interface IpRecordPayload extends IpRecordResource, TwilioResponsePayload {} +interface IpRecordPayload extends TwilioResponsePayload { + ip_records: IpRecordResource[]; +} interface IpRecordResource { account_sid?: string | null; @@ -259,7 +261,7 @@ export class IpRecordInstance { protected _solution: IpRecordContextSolution; protected _context?: IpRecordContext; - constructor(protected _version: V1, payload: IpRecordPayload, sid?: string) { + constructor(protected _version: V1, payload: IpRecordResource, sid?: string) { this.accountSid = payload.account_sid; this.sid = payload.sid; this.friendlyName = payload.friendly_name; @@ -695,7 +697,7 @@ export class IpRecordPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: IpRecordPayload): IpRecordInstance { + getInstance(payload: IpRecordResource): IpRecordInstance { return new IpRecordInstance(this._version, payload); } diff --git a/lib/rest/voice/v1/sourceIpMapping.ts b/lib/rest/voice/v1/sourceIpMapping.ts index e93cebab56..b98a3ba737 100644 --- a/lib/rest/voice/v1/sourceIpMapping.ts +++ b/lib/rest/voice/v1/sourceIpMapping.ts @@ -244,9 +244,9 @@ export class SourceIpMappingContextImpl implements SourceIpMappingContext { } } -interface SourceIpMappingPayload - extends SourceIpMappingResource, - TwilioResponsePayload {} +interface SourceIpMappingPayload extends TwilioResponsePayload { + source_ip_mappings: SourceIpMappingResource[]; +} interface SourceIpMappingResource { sid?: string | null; @@ -263,7 +263,7 @@ export class SourceIpMappingInstance { constructor( protected _version: V1, - payload: SourceIpMappingPayload, + payload: SourceIpMappingResource, sid?: string ) { this.sid = payload.sid; @@ -695,7 +695,7 @@ export class SourceIpMappingPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: SourceIpMappingPayload): SourceIpMappingInstance { + getInstance(payload: SourceIpMappingResource): SourceIpMappingInstance { return new SourceIpMappingInstance(this._version, payload); } diff --git a/lib/rest/wireless/v1/command.ts b/lib/rest/wireless/v1/command.ts index 367a352e64..0ad55d2723 100644 --- a/lib/rest/wireless/v1/command.ts +++ b/lib/rest/wireless/v1/command.ts @@ -213,7 +213,9 @@ export class CommandContextImpl implements CommandContext { } } -interface CommandPayload extends CommandResource, TwilioResponsePayload {} +interface CommandPayload extends TwilioResponsePayload { + commands: CommandResource[]; +} interface CommandResource { sid?: string | null; @@ -234,7 +236,7 @@ export class CommandInstance { protected _solution: CommandContextSolution; protected _context?: CommandContext; - constructor(protected _version: V1, payload: CommandPayload, sid?: string) { + constructor(protected _version: V1, payload: CommandResource, sid?: string) { this.sid = payload.sid; this.accountSid = payload.account_sid; this.simSid = payload.sim_sid; @@ -671,7 +673,7 @@ export class CommandPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: CommandPayload): CommandInstance { + getInstance(payload: CommandResource): CommandInstance { return new CommandInstance(this._version, payload); } diff --git a/lib/rest/wireless/v1/ratePlan.ts b/lib/rest/wireless/v1/ratePlan.ts index 4f20765662..f309e84730 100644 --- a/lib/rest/wireless/v1/ratePlan.ts +++ b/lib/rest/wireless/v1/ratePlan.ts @@ -262,7 +262,9 @@ export class RatePlanContextImpl implements RatePlanContext { } } -interface RatePlanPayload extends RatePlanResource, TwilioResponsePayload {} +interface RatePlanPayload extends TwilioResponsePayload { + rate_plans: RatePlanResource[]; +} interface RatePlanResource { sid?: string | null; @@ -287,7 +289,7 @@ export class RatePlanInstance { protected _solution: RatePlanContextSolution; protected _context?: RatePlanContext; - constructor(protected _version: V1, payload: RatePlanPayload, sid?: string) { + constructor(protected _version: V1, payload: RatePlanResource, sid?: string) { this.sid = payload.sid; this.uniqueName = payload.unique_name; this.accountSid = payload.account_sid; @@ -807,7 +809,7 @@ export class RatePlanPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: RatePlanPayload): RatePlanInstance { + getInstance(payload: RatePlanResource): RatePlanInstance { return new RatePlanInstance(this._version, payload); } diff --git a/lib/rest/wireless/v1/sim.ts b/lib/rest/wireless/v1/sim.ts index 2aecc83073..2243088b70 100644 --- a/lib/rest/wireless/v1/sim.ts +++ b/lib/rest/wireless/v1/sim.ts @@ -386,7 +386,9 @@ export type SimVoiceMethod = | "PUT" | "DELETE"; -interface SimPayload extends SimResource, TwilioResponsePayload {} +interface SimPayload extends TwilioResponsePayload { + sims: SimResource[]; +} interface SimResource { sid?: string | null; @@ -419,7 +421,7 @@ export class SimInstance { protected _solution: SimContextSolution; protected _context?: SimContext; - constructor(protected _version: V1, payload: SimPayload, sid?: string) { + constructor(protected _version: V1, payload: SimResource, sid?: string) { this.sid = payload.sid; this.uniqueName = payload.unique_name; this.accountSid = payload.account_sid; @@ -899,7 +901,7 @@ export class SimPage extends Page { * * @param payload - Payload response from the API */ - getInstance(payload: SimPayload): SimInstance { + getInstance(payload: SimResource): SimInstance { return new SimInstance(this._version, payload); } diff --git a/lib/rest/wireless/v1/sim/dataSession.ts b/lib/rest/wireless/v1/sim/dataSession.ts index 929120e6ea..c1d51d4f23 100644 --- a/lib/rest/wireless/v1/sim/dataSession.ts +++ b/lib/rest/wireless/v1/sim/dataSession.ts @@ -296,9 +296,9 @@ export function DataSessionListInstance( return instance; } -interface DataSessionPayload - extends DataSessionResource, - TwilioResponsePayload {} +interface DataSessionPayload extends TwilioResponsePayload { + data_sessions: DataSessionResource[]; +} interface DataSessionResource { sid?: string | null; @@ -322,7 +322,7 @@ interface DataSessionResource { export class DataSessionInstance { constructor( protected _version: V1, - payload: DataSessionPayload, + payload: DataSessionResource, simSid: string ) { this.sid = payload.sid; @@ -465,7 +465,7 @@ export class DataSessionPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: DataSessionPayload): DataSessionInstance { + getInstance(payload: DataSessionResource): DataSessionInstance { return new DataSessionInstance( this._version, payload, diff --git a/lib/rest/wireless/v1/sim/usageRecord.ts b/lib/rest/wireless/v1/sim/usageRecord.ts index 1413d4c8aa..287b48d926 100644 --- a/lib/rest/wireless/v1/sim/usageRecord.ts +++ b/lib/rest/wireless/v1/sim/usageRecord.ts @@ -322,9 +322,9 @@ export function UsageRecordListInstance( return instance; } -interface UsageRecordPayload - extends UsageRecordResource, - TwilioResponsePayload {} +interface UsageRecordPayload extends TwilioResponsePayload { + usage_records: UsageRecordResource[]; +} interface UsageRecordResource { sim_sid?: string | null; @@ -337,7 +337,7 @@ interface UsageRecordResource { export class UsageRecordInstance { constructor( protected _version: V1, - payload: UsageRecordPayload, + payload: UsageRecordResource, simSid: string ) { this.simSid = payload.sim_sid; @@ -414,7 +414,7 @@ export class UsageRecordPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: UsageRecordPayload): UsageRecordInstance { + getInstance(payload: UsageRecordResource): UsageRecordInstance { return new UsageRecordInstance( this._version, payload, diff --git a/lib/rest/wireless/v1/usageRecord.ts b/lib/rest/wireless/v1/usageRecord.ts index a5adcc5722..b02f9f5dc0 100644 --- a/lib/rest/wireless/v1/usageRecord.ts +++ b/lib/rest/wireless/v1/usageRecord.ts @@ -313,9 +313,9 @@ export function UsageRecordListInstance(version: V1): UsageRecordListInstance { return instance; } -interface UsageRecordPayload - extends UsageRecordResource, - TwilioResponsePayload {} +interface UsageRecordPayload extends TwilioResponsePayload { + usage_records: UsageRecordResource[]; +} interface UsageRecordResource { account_sid?: string | null; @@ -325,7 +325,7 @@ interface UsageRecordResource { } export class UsageRecordInstance { - constructor(protected _version: V1, payload: UsageRecordPayload) { + constructor(protected _version: V1, payload: UsageRecordResource) { this.accountSid = payload.account_sid; this.period = payload.period; this.commands = payload.commands; @@ -394,7 +394,7 @@ export class UsageRecordPage extends Page< * * @param payload - Payload response from the API */ - getInstance(payload: UsageRecordPayload): UsageRecordInstance { + getInstance(payload: UsageRecordResource): UsageRecordInstance { return new UsageRecordInstance(this._version, payload); } From 1935d5fcfe1e9c5714393c07eb418ebc78ff16f0 Mon Sep 17 00:00:00 2001 From: Bilal Boussayoud Date: Thu, 15 Dec 2022 13:00:20 -0500 Subject: [PATCH 2/2] require uri --- lib/base/Page.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/base/Page.ts b/lib/base/Page.ts index 71521e9995..0652a7a9e0 100644 --- a/lib/base/Page.ts +++ b/lib/base/Page.ts @@ -10,7 +10,7 @@ export interface TwilioResponsePayload { page: number; page_size: number; previous_page_uri: string; - uri?: string; + uri: string; meta?: { key?: string; next_page_url?: string;