twilio 5.0.0-rc16 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +278 -24
- package/index.d.ts +2 -0
- package/index.js +9 -1
- package/lib/base/BaseTwilio.d.ts +86 -0
- package/lib/base/BaseTwilio.js +182 -0
- package/lib/base/Domain.d.ts +29 -0
- package/lib/base/Domain.js +49 -35
- package/lib/base/Page.d.ts +104 -0
- package/lib/base/Page.js +187 -182
- package/lib/base/RequestClient.d.ts +145 -0
- package/lib/base/RequestClient.js +224 -67
- package/lib/base/RestException.d.ts +16 -0
- package/lib/base/RestException.js +32 -16
- package/lib/base/Version.d.ts +129 -0
- package/lib/base/Version.js +330 -177
- package/lib/base/deserialize.d.ts +41 -0
- package/lib/base/deserialize.js +48 -66
- package/lib/base/serialize.d.ts +53 -0
- package/lib/base/serialize.js +103 -89
- package/lib/base/utility.d.ts +2 -0
- package/lib/base/utility.js +13 -0
- package/lib/base/values.d.ts +10 -0
- package/lib/base/values.js +8 -14
- package/lib/http/request.d.ts +25 -0
- package/lib/http/request.js +84 -73
- package/lib/http/response.d.ts +7 -0
- package/lib/http/response.js +13 -12
- package/lib/index.d.ts +55 -0
- package/lib/index.js +68 -31
- package/lib/interfaces.d.ts +94 -0
- package/lib/interfaces.js +2 -0
- package/lib/jwt/AccessToken.d.ts +186 -0
- package/lib/jwt/AccessToken.js +247 -242
- package/lib/jwt/ClientCapability.d.ts +61 -0
- package/lib/jwt/ClientCapability.js +105 -124
- package/lib/jwt/taskrouter/TaskRouterCapability.d.ts +74 -0
- package/lib/jwt/taskrouter/TaskRouterCapability.js +95 -101
- package/lib/jwt/taskrouter/util.d.ts +66 -0
- package/lib/jwt/taskrouter/util.js +157 -59
- package/lib/rest/Accounts.d.ts +19 -0
- package/lib/rest/Accounts.js +27 -43
- package/lib/rest/AccountsBase.d.ts +13 -0
- package/lib/rest/AccountsBase.js +31 -0
- package/lib/rest/Api.d.ts +127 -0
- package/lib/rest/Api.js +180 -251
- package/lib/rest/ApiBase.d.ts +13 -0
- package/lib/rest/ApiBase.js +31 -0
- package/lib/rest/Bulkexports.d.ts +14 -0
- package/lib/rest/Bulkexports.js +22 -0
- package/lib/rest/BulkexportsBase.d.ts +13 -0
- package/lib/rest/BulkexportsBase.js +31 -0
- package/lib/rest/Chat.d.ts +19 -0
- package/lib/rest/Chat.js +27 -62
- package/lib/rest/ChatBase.d.ts +19 -0
- package/lib/rest/ChatBase.js +41 -0
- package/lib/rest/Content.d.ts +9 -0
- package/lib/rest/Content.js +15 -0
- package/lib/rest/ContentBase.d.ts +13 -0
- package/lib/rest/ContentBase.js +31 -0
- package/lib/rest/Conversations.d.ts +44 -0
- package/lib/rest/Conversations.js +64 -0
- package/lib/rest/ConversationsBase.d.ts +13 -0
- package/lib/rest/ConversationsBase.js +31 -0
- package/lib/rest/Events.d.ts +24 -0
- package/lib/rest/Events.js +36 -0
- package/lib/rest/EventsBase.d.ts +13 -0
- package/lib/rest/EventsBase.js +31 -0
- package/lib/rest/FlexApi.d.ts +39 -0
- package/lib/rest/FlexApi.js +57 -0
- package/lib/rest/FlexApiBase.d.ts +16 -0
- package/lib/rest/FlexApiBase.js +36 -0
- package/lib/rest/FrontlineApi.d.ts +9 -0
- package/lib/rest/FrontlineApi.js +15 -0
- package/lib/rest/FrontlineApiBase.d.ts +13 -0
- package/lib/rest/FrontlineApiBase.js +31 -0
- package/lib/rest/Insights.d.ts +29 -0
- package/lib/rest/Insights.js +43 -0
- package/lib/rest/InsightsBase.d.ts +13 -0
- package/lib/rest/InsightsBase.js +31 -0
- package/lib/rest/Intelligence.d.ts +4 -0
- package/lib/rest/Intelligence.js +8 -0
- package/lib/rest/IntelligenceBase.d.ts +13 -0
- package/lib/rest/IntelligenceBase.js +31 -0
- package/lib/rest/IpMessaging.d.ts +14 -0
- package/lib/rest/IpMessaging.js +20 -63
- package/lib/rest/IpMessagingBase.d.ts +16 -0
- package/lib/rest/IpMessagingBase.js +36 -0
- package/lib/rest/Lookups.d.ts +9 -0
- package/lib/rest/Lookups.js +13 -44
- package/lib/rest/LookupsBase.d.ts +16 -0
- package/lib/rest/LookupsBase.js +36 -0
- package/lib/rest/Media.d.ts +4 -0
- package/lib/rest/Media.js +8 -0
- package/lib/rest/MediaBase.d.ts +13 -0
- package/lib/rest/MediaBase.js +31 -0
- package/lib/rest/Messaging.d.ts +39 -0
- package/lib/rest/Messaging.js +55 -43
- package/lib/rest/MessagingBase.d.ts +13 -0
- package/lib/rest/MessagingBase.js +31 -0
- package/lib/rest/Microvisor.d.ts +14 -0
- package/lib/rest/Microvisor.js +22 -0
- package/lib/rest/MicrovisorBase.d.ts +13 -0
- package/lib/rest/MicrovisorBase.js +31 -0
- package/lib/rest/Monitor.d.ts +14 -0
- package/lib/rest/Monitor.js +20 -51
- package/lib/rest/MonitorBase.d.ts +13 -0
- package/lib/rest/MonitorBase.js +31 -0
- package/lib/rest/Notify.d.ts +14 -0
- package/lib/rest/Notify.js +20 -51
- package/lib/rest/NotifyBase.d.ts +13 -0
- package/lib/rest/NotifyBase.js +31 -0
- package/lib/rest/Numbers.d.ts +9 -0
- package/lib/rest/Numbers.js +15 -0
- package/lib/rest/NumbersBase.d.ts +16 -0
- package/lib/rest/NumbersBase.js +36 -0
- package/lib/rest/Preview.d.ts +49 -0
- package/lib/rest/Preview.js +69 -107
- package/lib/rest/PreviewBase.d.ts +25 -0
- package/lib/rest/PreviewBase.js +52 -0
- package/lib/rest/PreviewMessaging.d.ts +9 -0
- package/lib/rest/PreviewMessaging.js +15 -0
- package/lib/rest/PreviewMessagingBase.d.ts +13 -0
- package/lib/rest/PreviewMessagingBase.js +31 -0
- package/lib/rest/Pricing.d.ts +29 -0
- package/lib/rest/Pricing.js +41 -60
- package/lib/rest/PricingBase.d.ts +16 -0
- package/lib/rest/PricingBase.js +36 -0
- package/lib/rest/Proxy.d.ts +9 -0
- package/lib/rest/Proxy.js +15 -0
- package/lib/rest/ProxyBase.d.ts +13 -0
- package/lib/rest/ProxyBase.js +31 -0
- package/lib/rest/Routes.d.ts +19 -0
- package/lib/rest/Routes.js +29 -0
- package/lib/rest/RoutesBase.d.ts +13 -0
- package/lib/rest/RoutesBase.js +31 -0
- package/lib/rest/Serverless.d.ts +9 -0
- package/lib/rest/Serverless.js +15 -0
- package/lib/rest/ServerlessBase.d.ts +13 -0
- package/lib/rest/ServerlessBase.js +31 -0
- package/lib/rest/Studio.d.ts +14 -0
- package/lib/rest/Studio.js +22 -0
- package/lib/rest/StudioBase.d.ts +16 -0
- package/lib/rest/StudioBase.js +36 -0
- package/lib/rest/Supersim.d.ts +49 -0
- package/lib/rest/Supersim.js +71 -0
- package/lib/rest/SupersimBase.d.ts +13 -0
- package/lib/rest/SupersimBase.js +31 -0
- package/lib/rest/Sync.d.ts +9 -0
- package/lib/rest/Sync.js +15 -0
- package/lib/rest/SyncBase.d.ts +13 -0
- package/lib/rest/SyncBase.js +31 -0
- package/lib/rest/Taskrouter.d.ts +9 -0
- package/lib/rest/Taskrouter.js +13 -43
- package/lib/rest/TaskrouterBase.d.ts +13 -0
- package/lib/rest/TaskrouterBase.js +31 -0
- package/lib/rest/Trunking.d.ts +9 -0
- package/lib/rest/Trunking.js +13 -43
- package/lib/rest/TrunkingBase.d.ts +13 -0
- package/lib/rest/TrunkingBase.js +31 -0
- package/lib/rest/Trusthub.d.ts +39 -0
- package/lib/rest/Trusthub.js +57 -0
- package/lib/rest/TrusthubBase.d.ts +13 -0
- package/lib/rest/TrusthubBase.js +31 -0
- package/lib/rest/Twilio.d.ts +272 -0
- package/lib/rest/Twilio.js +312 -467
- package/lib/rest/Verify.d.ts +29 -0
- package/lib/rest/Verify.js +43 -0
- package/lib/rest/VerifyBase.d.ts +13 -0
- package/lib/rest/VerifyBase.js +31 -0
- package/lib/rest/Video.d.ts +34 -0
- package/lib/rest/Video.js +48 -51
- package/lib/rest/VideoBase.d.ts +13 -0
- package/lib/rest/VideoBase.js +31 -0
- package/lib/rest/Voice.d.ts +34 -0
- package/lib/rest/Voice.js +50 -0
- package/lib/rest/VoiceBase.d.ts +13 -0
- package/lib/rest/VoiceBase.js +31 -0
- package/lib/rest/Wireless.d.ts +24 -0
- package/lib/rest/Wireless.js +36 -0
- package/lib/rest/WirelessBase.d.ts +13 -0
- package/lib/rest/WirelessBase.js +31 -0
- package/lib/rest/accounts/V1.d.ts +30 -0
- package/lib/rest/accounts/V1.js +52 -33
- package/lib/rest/accounts/v1/authTokenPromotion.d.ts +105 -0
- package/lib/rest/accounts/v1/authTokenPromotion.js +109 -0
- package/lib/rest/accounts/v1/credential/aws.d.ts +296 -0
- package/lib/rest/accounts/v1/credential/aws.js +251 -0
- package/lib/rest/accounts/v1/credential/publicKey.d.ts +296 -0
- package/lib/rest/accounts/v1/credential/publicKey.js +239 -625
- package/lib/rest/accounts/v1/credential.d.ts +22 -0
- package/lib/rest/accounts/v1/credential.js +49 -55
- package/lib/rest/accounts/v1/safelist.d.ts +107 -0
- package/lib/rest/accounts/v1/safelist.js +119 -0
- package/lib/rest/accounts/v1/secondaryAuthToken.d.ts +122 -0
- package/lib/rest/accounts/v1/secondaryAuthToken.js +128 -0
- package/lib/rest/api/V2010.d.ts +20 -0
- package/lib/rest/api/V2010.js +38 -252
- package/lib/rest/api/v2010/account/address/dependentPhoneNumber.d.ts +290 -0
- package/lib/rest/api/v2010/account/address/dependentPhoneNumber.js +166 -349
- package/lib/rest/api/v2010/account/address.d.ts +414 -0
- package/lib/rest/api/v2010/account/address.js +318 -738
- package/lib/rest/api/v2010/account/application.d.ts +458 -0
- package/lib/rest/api/v2010/account/application.js +334 -763
- package/lib/rest/api/v2010/account/authorizedConnectApp.d.ts +232 -0
- package/lib/rest/api/v2010/account/authorizedConnectApp.js +182 -466
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/local.d.ts +322 -0
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/local.js +185 -0
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/machineToMachine.d.ts +322 -0
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/machineToMachine.js +185 -0
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/mobile.d.ts +322 -0
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/mobile.js +185 -0
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/national.d.ts +322 -0
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/national.js +185 -0
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/sharedCost.d.ts +322 -0
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/sharedCost.js +185 -0
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/tollFree.d.ts +322 -0
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/tollFree.js +185 -0
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/voip.d.ts +322 -0
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/voip.js +185 -0
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry.d.ts +269 -0
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry.js +279 -0
- package/lib/rest/api/v2010/account/balance.d.ts +58 -0
- package/lib/rest/api/v2010/account/balance.js +70 -0
- package/lib/rest/api/v2010/account/call/event.d.ts +150 -0
- package/lib/rest/api/v2010/account/call/event.js +127 -0
- package/lib/rest/api/v2010/account/call/notification.d.ts +311 -0
- package/lib/rest/api/v2010/account/call/notification.js +212 -561
- package/lib/rest/api/v2010/account/call/payment.d.ts +182 -0
- package/lib/rest/api/v2010/account/call/payment.js +198 -0
- package/lib/rest/api/v2010/account/call/recording.d.ts +386 -0
- package/lib/rest/api/v2010/account/call/recording.js +290 -538
- package/lib/rest/api/v2010/account/call/siprec.d.ts +559 -0
- package/lib/rest/api/v2010/account/call/siprec.js +562 -0
- package/lib/rest/api/v2010/account/call/stream.d.ts +551 -0
- package/lib/rest/api/v2010/account/call/stream.js +560 -0
- package/lib/rest/api/v2010/account/call/userDefinedMessage.d.ts +75 -0
- package/lib/rest/api/v2010/account/call/userDefinedMessage.js +89 -0
- package/lib/rest/api/v2010/account/call/userDefinedMessageSubscription.d.ts +130 -0
- package/lib/rest/api/v2010/account/call/userDefinedMessageSubscription.js +150 -0
- package/lib/rest/api/v2010/account/call.d.ts +598 -0
- package/lib/rest/api/v2010/account/call.js +496 -930
- package/lib/rest/api/v2010/account/conference/participant.d.ts +476 -0
- package/lib/rest/api/v2010/account/conference/participant.js +395 -736
- package/lib/rest/api/v2010/account/conference/recording.d.ts +346 -0
- package/lib/rest/api/v2010/account/conference/recording.js +267 -0
- package/lib/rest/api/v2010/account/conference.d.ts +338 -0
- package/lib/rest/api/v2010/account/conference.js +250 -603
- package/lib/rest/api/v2010/account/connectApp.d.ts +323 -0
- package/lib/rest/api/v2010/account/connectApp.js +244 -564
- package/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn/assignedAddOnExtension.d.ts +241 -0
- package/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn/assignedAddOnExtension.js +198 -487
- package/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn.d.ts +292 -0
- package/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn.js +242 -623
- package/lib/rest/api/v2010/account/incomingPhoneNumber/local.d.ts +412 -0
- package/lib/rest/api/v2010/account/incomingPhoneNumber/local.js +248 -466
- package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.d.ts +412 -0
- package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.js +248 -466
- package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.d.ts +412 -0
- package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.js +248 -466
- package/lib/rest/api/v2010/account/incomingPhoneNumber.d.ts +588 -0
- package/lib/rest/api/v2010/account/incomingPhoneNumber.js +431 -897
- package/lib/rest/api/v2010/account/key.d.ts +266 -0
- package/lib/rest/api/v2010/account/key.js +217 -572
- package/lib/rest/api/v2010/account/message/feedback.d.ts +91 -0
- package/lib/rest/api/v2010/account/message/feedback.js +89 -188
- package/lib/rest/api/v2010/account/message/media.d.ts +262 -0
- package/lib/rest/api/v2010/account/message/media.js +209 -536
- package/lib/rest/api/v2010/account/message.d.ts +459 -0
- package/lib/rest/api/v2010/account/message.js +345 -771
- package/lib/rest/api/v2010/account/newKey.d.ts +86 -0
- package/lib/rest/api/v2010/account/newKey.js +84 -181
- package/lib/rest/api/v2010/account/newSigningKey.d.ts +86 -0
- package/lib/rest/api/v2010/account/newSigningKey.js +84 -182
- package/lib/rest/api/v2010/account/notification.d.ts +309 -0
- package/lib/rest/api/v2010/account/notification.js +206 -551
- package/lib/rest/api/v2010/account/outgoingCallerId.d.ts +296 -0
- package/lib/rest/api/v2010/account/outgoingCallerId.js +227 -595
- package/lib/rest/api/v2010/account/queue/member.d.ts +249 -0
- package/lib/rest/api/v2010/account/queue/member.js +209 -542
- package/lib/rest/api/v2010/account/queue.d.ts +324 -0
- package/lib/rest/api/v2010/account/queue.js +262 -674
- package/lib/rest/api/v2010/account/recording/addOnResult/payload.d.ts +270 -0
- package/lib/rest/api/v2010/account/recording/addOnResult/payload.js +222 -539
- package/lib/rest/api/v2010/account/recording/addOnResult.d.ts +268 -0
- package/lib/rest/api/v2010/account/recording/addOnResult.js +221 -562
- package/lib/rest/api/v2010/account/recording/transcription.d.ts +278 -0
- package/lib/rest/api/v2010/account/recording/transcription.js +215 -532
- package/lib/rest/api/v2010/account/recording.d.ts +387 -0
- package/lib/rest/api/v2010/account/recording.js +261 -606
- package/lib/rest/api/v2010/account/shortCode.d.ts +319 -0
- package/lib/rest/api/v2010/account/shortCode.js +229 -574
- package/lib/rest/api/v2010/account/signingKey.d.ts +254 -0
- package/lib/rest/api/v2010/account/signingKey.js +217 -573
- package/lib/rest/api/v2010/account/sip/credentialList/credential.d.ts +304 -0
- package/lib/rest/api/v2010/account/sip/credentialList/credential.js +251 -648
- package/lib/rest/api/v2010/account/sip/credentialList.d.ts +292 -0
- package/lib/rest/api/v2010/account/sip/credentialList.js +253 -667
- package/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls/authCallsCredentialListMapping.d.ts +248 -0
- package/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls/authCallsCredentialListMapping.js +232 -0
- package/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls/authCallsIpAccessControlListMapping.d.ts +248 -0
- package/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls/authCallsIpAccessControlListMapping.js +232 -0
- package/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls.d.ts +24 -0
- package/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls.js +60 -0
- package/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeRegistrations/authRegistrationsCredentialListMapping.d.ts +248 -0
- package/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeRegistrations/authRegistrationsCredentialListMapping.js +232 -0
- package/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeRegistrations.d.ts +21 -0
- package/lib/rest/api/v2010/account/sip/domain/authTypes/authTypeRegistrations.js +50 -0
- package/lib/rest/api/v2010/account/sip/domain/authTypes.d.ts +24 -0
- package/lib/rest/api/v2010/account/sip/domain/authTypes.js +58 -0
- package/lib/rest/api/v2010/account/sip/domain/credentialListMapping.d.ts +260 -0
- package/lib/rest/api/v2010/account/sip/domain/credentialListMapping.js +222 -573
- package/lib/rest/api/v2010/account/sip/domain/ipAccessControlListMapping.d.ts +260 -0
- package/lib/rest/api/v2010/account/sip/domain/ipAccessControlListMapping.js +222 -576
- package/lib/rest/api/v2010/account/sip/domain.d.ts +456 -0
- package/lib/rest/api/v2010/account/sip/domain.js +354 -773
- package/lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.d.ts +322 -0
- package/lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.js +266 -653
- package/lib/rest/api/v2010/account/sip/ipAccessControlList.d.ts +292 -0
- package/lib/rest/api/v2010/account/sip/ipAccessControlList.js +253 -672
- package/lib/rest/api/v2010/account/sip.d.ts +26 -0
- package/lib/rest/api/v2010/account/sip.js +61 -93
- package/lib/rest/api/v2010/account/token.d.ts +104 -0
- package/lib/rest/api/v2010/account/token.js +91 -185
- package/lib/rest/api/v2010/account/transcription.d.ts +276 -0
- package/lib/rest/api/v2010/account/transcription.js +209 -520
- package/lib/rest/api/v2010/account/usage/record/allTime.d.ts +249 -0
- package/lib/rest/api/v2010/account/usage/record/allTime.js +149 -367
- package/lib/rest/api/v2010/account/usage/record/daily.d.ts +249 -0
- package/lib/rest/api/v2010/account/usage/record/daily.js +149 -367
- package/lib/rest/api/v2010/account/usage/record/lastMonth.d.ts +249 -0
- package/lib/rest/api/v2010/account/usage/record/lastMonth.js +149 -367
- package/lib/rest/api/v2010/account/usage/record/monthly.d.ts +249 -0
- package/lib/rest/api/v2010/account/usage/record/monthly.js +149 -367
- package/lib/rest/api/v2010/account/usage/record/thisMonth.d.ts +249 -0
- package/lib/rest/api/v2010/account/usage/record/thisMonth.js +149 -367
- package/lib/rest/api/v2010/account/usage/record/today.d.ts +249 -0
- package/lib/rest/api/v2010/account/usage/record/today.js +149 -367
- package/lib/rest/api/v2010/account/usage/record/yearly.d.ts +249 -0
- package/lib/rest/api/v2010/account/usage/record/yearly.js +149 -367
- package/lib/rest/api/v2010/account/usage/record/yesterday.d.ts +249 -0
- package/lib/rest/api/v2010/account/usage/record/yesterday.js +149 -367
- package/lib/rest/api/v2010/account/usage/record.d.ts +273 -0
- package/lib/rest/api/v2010/account/usage/record.js +224 -506
- package/lib/rest/api/v2010/account/usage/trigger.d.ts +382 -0
- package/lib/rest/api/v2010/account/usage/trigger.js +285 -698
- package/lib/rest/api/v2010/account/usage.d.ts +24 -0
- package/lib/rest/api/v2010/account/usage.js +52 -75
- package/lib/rest/api/v2010/account/validationRequest.d.ts +88 -0
- package/lib/rest/api/v2010/account/validationRequest.js +91 -192
- package/lib/rest/api/v2010/account.d.ts +509 -0
- package/lib/rest/api/v2010/account.js +541 -1338
- package/lib/rest/bulkexports/V1.d.ts +20 -0
- package/lib/rest/bulkexports/V1.js +43 -0
- package/lib/rest/bulkexports/v1/export/day.d.ts +216 -0
- package/lib/rest/bulkexports/v1/export/day.js +187 -0
- package/lib/rest/bulkexports/v1/export/exportCustomJob.d.ts +229 -0
- package/lib/rest/bulkexports/v1/export/exportCustomJob.js +178 -0
- package/lib/rest/bulkexports/v1/export/job.d.ts +162 -0
- package/lib/rest/bulkexports/v1/export/job.js +146 -0
- package/lib/rest/bulkexports/v1/export.d.ts +113 -0
- package/lib/rest/bulkexports/v1/export.js +144 -0
- package/lib/rest/bulkexports/v1/exportConfiguration.d.ts +152 -0
- package/lib/rest/bulkexports/v1/exportConfiguration.js +145 -0
- package/lib/rest/chat/V1.d.ts +20 -0
- package/lib/rest/chat/V1.js +38 -44
- package/lib/rest/chat/V2.d.ts +20 -0
- package/lib/rest/chat/V2.js +38 -44
- package/lib/rest/chat/V3.d.ts +15 -0
- package/lib/rest/chat/V3.js +36 -0
- package/lib/rest/chat/v1/credential.d.ts +324 -0
- package/lib/rest/chat/v1/credential.js +260 -645
- package/lib/rest/chat/v1/service/channel/invite.d.ts +286 -0
- package/lib/rest/chat/v1/service/channel/invite.js +231 -585
- package/lib/rest/chat/v1/service/channel/member.d.ts +336 -0
- package/lib/rest/chat/v1/service/channel/member.js +261 -664
- package/lib/rest/chat/v1/service/channel/message.d.ts +351 -0
- package/lib/rest/chat/v1/service/channel/message.js +267 -668
- package/lib/rest/chat/v1/service/channel.d.ts +388 -0
- package/lib/rest/chat/v1/service/channel.js +306 -761
- package/lib/rest/chat/v1/service/role.d.ts +298 -0
- package/lib/rest/chat/v1/service/role.js +250 -641
- package/lib/rest/chat/v1/service/user/userChannel.d.ts +184 -0
- package/lib/rest/chat/v1/service/user/userChannel.js +130 -341
- package/lib/rest/chat/v1/service/user.d.ts +360 -0
- package/lib/rest/chat/v1/service/user.js +278 -690
- package/lib/rest/chat/v1/service.d.ts +512 -0
- package/lib/rest/chat/v1/service.js +438 -1061
- package/lib/rest/chat/v2/credential.d.ts +324 -0
- package/lib/rest/chat/v2/credential.js +260 -645
- package/lib/rest/chat/v2/service/binding.d.ts +282 -0
- package/lib/rest/chat/v2/service/binding.js +222 -0
- package/lib/rest/chat/v2/service/channel/invite.d.ts +286 -0
- package/lib/rest/chat/v2/service/channel/invite.js +231 -585
- package/lib/rest/chat/v2/service/channel/member.d.ts +390 -0
- package/lib/rest/chat/v2/service/channel/member.js +291 -664
- package/lib/rest/chat/v2/service/channel/message.d.ts +423 -0
- package/lib/rest/chat/v2/service/channel/message.js +301 -668
- package/lib/rest/chat/v2/service/channel/webhook.d.ts +338 -0
- package/lib/rest/chat/v2/service/channel/webhook.js +288 -0
- package/lib/rest/chat/v2/service/channel.d.ts +438 -0
- package/lib/rest/chat/v2/service/channel.js +341 -761
- package/lib/rest/chat/v2/service/role.d.ts +298 -0
- package/lib/rest/chat/v2/service/role.js +250 -641
- package/lib/rest/chat/v2/service/user/userBinding.d.ts +278 -0
- package/lib/rest/chat/v2/service/user/userBinding.js +226 -0
- package/lib/rest/chat/v2/service/user/userChannel.d.ts +336 -0
- package/lib/rest/chat/v2/service/user/userChannel.js +251 -338
- package/lib/rest/chat/v2/service/user.d.ts +373 -0
- package/lib/rest/chat/v2/service/user.js +295 -690
- package/lib/rest/chat/v2/service.d.ts +486 -0
- package/lib/rest/chat/v2/service.js +384 -845
- package/lib/rest/chat/v3/channel.d.ts +189 -0
- package/lib/rest/chat/v3/channel.js +149 -0
- package/lib/rest/content/V1.d.ts +25 -0
- package/lib/rest/content/V1.js +50 -0
- package/lib/rest/content/v1/content/approvalCreate.d.ts +79 -0
- package/lib/rest/content/v1/content/approvalCreate.js +91 -0
- package/lib/rest/content/v1/content/approvalFetch.d.ts +101 -0
- package/lib/rest/content/v1/content/approvalFetch.js +115 -0
- package/lib/rest/content/v1/content.d.ts +426 -0
- package/lib/rest/content/v1/content.js +333 -0
- package/lib/rest/content/v1/contentAndApprovals.d.ts +190 -0
- package/lib/rest/content/v1/contentAndApprovals.js +134 -0
- package/lib/rest/content/v1/legacyContent.d.ts +202 -0
- package/lib/rest/content/v1/legacyContent.js +138 -0
- package/lib/rest/conversations/V1.d.ts +50 -0
- package/lib/rest/conversations/V1.js +82 -0
- package/lib/rest/conversations/v1/addressConfiguration.d.ts +363 -0
- package/lib/rest/conversations/v1/addressConfiguration.js +302 -0
- package/lib/rest/conversations/v1/configuration/webhook.d.ts +163 -0
- package/lib/rest/conversations/v1/configuration/webhook.js +147 -0
- package/lib/rest/conversations/v1/configuration.d.ts +168 -0
- package/lib/rest/conversations/v1/configuration.js +155 -0
- package/lib/rest/conversations/v1/conversation/message/deliveryReceipt.d.ts +249 -0
- package/lib/rest/conversations/v1/conversation/message/deliveryReceipt.js +203 -0
- package/lib/rest/conversations/v1/conversation/message.d.ts +427 -0
- package/lib/rest/conversations/v1/conversation/message.js +325 -0
- package/lib/rest/conversations/v1/conversation/participant.d.ts +398 -0
- package/lib/rest/conversations/v1/conversation/participant.js +312 -0
- package/lib/rest/conversations/v1/conversation/webhook.d.ts +328 -0
- package/lib/rest/conversations/v1/conversation/webhook.js +278 -0
- package/lib/rest/conversations/v1/conversation.d.ts +455 -0
- package/lib/rest/conversations/v1/conversation.js +359 -0
- package/lib/rest/conversations/v1/credential.d.ts +326 -0
- package/lib/rest/conversations/v1/credential.js +276 -0
- package/lib/rest/conversations/v1/participantConversation.d.ts +242 -0
- package/lib/rest/conversations/v1/participantConversation.js +152 -0
- package/lib/rest/conversations/v1/role.d.ts +296 -0
- package/lib/rest/conversations/v1/role.js +260 -0
- package/lib/rest/conversations/v1/service/binding.d.ts +276 -0
- package/lib/rest/conversations/v1/service/binding.js +220 -0
- package/lib/rest/conversations/v1/service/configuration/notification.d.ts +185 -0
- package/lib/rest/conversations/v1/service/configuration/notification.js +176 -0
- package/lib/rest/conversations/v1/service/configuration/webhook.d.ts +165 -0
- package/lib/rest/conversations/v1/service/configuration/webhook.js +154 -0
- package/lib/rest/conversations/v1/service/configuration.d.ts +173 -0
- package/lib/rest/conversations/v1/service/configuration.js +174 -0
- package/lib/rest/conversations/v1/service/conversation/message/deliveryReceipt.d.ts +257 -0
- package/lib/rest/conversations/v1/service/conversation/message/deliveryReceipt.js +216 -0
- package/lib/rest/conversations/v1/service/conversation/message.d.ts +435 -0
- package/lib/rest/conversations/v1/service/conversation/message.js +333 -0
- package/lib/rest/conversations/v1/service/conversation/participant.d.ts +406 -0
- package/lib/rest/conversations/v1/service/conversation/participant.js +320 -0
- package/lib/rest/conversations/v1/service/conversation/webhook.d.ts +336 -0
- package/lib/rest/conversations/v1/service/conversation/webhook.js +286 -0
- package/lib/rest/conversations/v1/service/conversation.d.ts +457 -0
- package/lib/rest/conversations/v1/service/conversation.js +367 -0
- package/lib/rest/conversations/v1/service/participantConversation.d.ts +243 -0
- package/lib/rest/conversations/v1/service/participantConversation.js +156 -0
- package/lib/rest/conversations/v1/service/role.d.ts +298 -0
- package/lib/rest/conversations/v1/service/role.js +267 -0
- package/lib/rest/conversations/v1/service/user/userConversation.d.ts +349 -0
- package/lib/rest/conversations/v1/service/user/userConversation.js +271 -0
- package/lib/rest/conversations/v1/service/user.d.ts +381 -0
- package/lib/rest/conversations/v1/service/user.js +301 -0
- package/lib/rest/conversations/v1/service.d.ts +304 -0
- package/lib/rest/conversations/v1/service.js +299 -0
- package/lib/rest/conversations/v1/user/userConversation.d.ts +347 -0
- package/lib/rest/conversations/v1/user/userConversation.js +264 -0
- package/lib/rest/conversations/v1/user.d.ts +379 -0
- package/lib/rest/conversations/v1/user.js +294 -0
- package/lib/rest/events/V1.d.ts +30 -0
- package/lib/rest/events/V1.js +54 -0
- package/lib/rest/events/v1/eventType.d.ts +226 -0
- package/lib/rest/events/v1/eventType.js +185 -0
- package/lib/rest/events/v1/schema/schemaVersion.d.ts +210 -0
- package/lib/rest/events/v1/schema/schemaVersion.js +185 -0
- package/lib/rest/events/v1/schema.d.ts +114 -0
- package/lib/rest/events/v1/schema.js +126 -0
- package/lib/rest/events/v1/sink/sinkTest.d.ts +46 -0
- package/lib/rest/events/v1/sink/sinkTest.js +66 -0
- package/lib/rest/events/v1/sink/sinkValidate.d.ts +54 -0
- package/lib/rest/events/v1/sink/sinkValidate.js +78 -0
- package/lib/rest/events/v1/sink.d.ts +322 -0
- package/lib/rest/events/v1/sink.js +289 -0
- package/lib/rest/events/v1/subscription/subscribedEvent.d.ts +290 -0
- package/lib/rest/events/v1/subscription/subscribedEvent.js +254 -0
- package/lib/rest/events/v1/subscription.d.ts +324 -0
- package/lib/rest/events/v1/subscription.js +277 -0
- package/lib/rest/flexApi/V1.d.ts +125 -0
- package/lib/rest/flexApi/V1.js +191 -0
- package/lib/rest/flexApi/V2.d.ts +15 -0
- package/lib/rest/flexApi/V2.js +36 -0
- package/lib/rest/flexApi/v1/assessments.d.ts +322 -0
- package/lib/rest/flexApi/v1/assessments.js +277 -0
- package/lib/rest/flexApi/v1/channel.d.ts +280 -0
- package/lib/rest/flexApi/v1/channel.js +251 -0
- package/lib/rest/flexApi/v1/configuration.d.ts +434 -0
- package/lib/rest/flexApi/v1/configuration.js +229 -0
- package/lib/rest/flexApi/v1/flexFlow.d.ts +406 -0
- package/lib/rest/flexApi/v1/flexFlow.js +336 -0
- package/lib/rest/flexApi/v1/insightsAssessmentsComment.d.ts +251 -0
- package/lib/rest/flexApi/v1/insightsAssessmentsComment.js +190 -0
- package/lib/rest/flexApi/v1/insightsConversations.d.ts +172 -0
- package/lib/rest/flexApi/v1/insightsConversations.js +128 -0
- package/lib/rest/flexApi/v1/insightsQuestionnaires.d.ts +357 -0
- package/lib/rest/flexApi/v1/insightsQuestionnaires.js +282 -0
- package/lib/rest/flexApi/v1/insightsQuestionnairesCategory.d.ts +279 -0
- package/lib/rest/flexApi/v1/insightsQuestionnairesCategory.js +234 -0
- package/lib/rest/flexApi/v1/insightsQuestionnairesQuestion.d.ts +337 -0
- package/lib/rest/flexApi/v1/insightsQuestionnairesQuestion.js +270 -0
- package/lib/rest/flexApi/v1/insightsSegments.d.ts +277 -0
- package/lib/rest/flexApi/v1/insightsSegments.js +166 -0
- package/lib/rest/flexApi/v1/insightsSession.d.ts +130 -0
- package/lib/rest/flexApi/v1/insightsSession.js +115 -0
- package/lib/rest/flexApi/v1/insightsSettingsAnswerSets.d.ts +82 -0
- package/lib/rest/flexApi/v1/insightsSettingsAnswerSets.js +83 -0
- package/lib/rest/flexApi/v1/insightsSettingsComment.d.ts +67 -0
- package/lib/rest/flexApi/v1/insightsSettingsComment.js +79 -0
- package/lib/rest/flexApi/v1/insightsUserRoles.d.ts +109 -0
- package/lib/rest/flexApi/v1/insightsUserRoles.js +109 -0
- package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.d.ts +181 -0
- package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.js +154 -0
- package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.d.ts +246 -0
- package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.js +226 -0
- package/lib/rest/flexApi/v1/interaction/interactionChannel.d.ts +266 -0
- package/lib/rest/flexApi/v1/interaction/interactionChannel.js +244 -0
- package/lib/rest/flexApi/v1/interaction.d.ts +131 -0
- package/lib/rest/flexApi/v1/interaction.js +156 -0
- package/lib/rest/flexApi/v1/plugin/pluginVersions.d.ts +298 -0
- package/lib/rest/flexApi/v1/plugin/pluginVersions.js +234 -0
- package/lib/rest/flexApi/v1/plugin.d.ts +345 -0
- package/lib/rest/flexApi/v1/plugin.js +267 -0
- package/lib/rest/flexApi/v1/pluginArchive.d.ts +155 -0
- package/lib/rest/flexApi/v1/pluginArchive.js +128 -0
- package/lib/rest/flexApi/v1/pluginConfiguration/configuredPlugin.d.ts +310 -0
- package/lib/rest/flexApi/v1/pluginConfiguration/configuredPlugin.js +218 -0
- package/lib/rest/flexApi/v1/pluginConfiguration.d.ts +287 -0
- package/lib/rest/flexApi/v1/pluginConfiguration.js +233 -0
- package/lib/rest/flexApi/v1/pluginConfigurationArchive.d.ts +143 -0
- package/lib/rest/flexApi/v1/pluginConfigurationArchive.js +124 -0
- package/lib/rest/flexApi/v1/pluginRelease.d.ts +260 -0
- package/lib/rest/flexApi/v1/pluginRelease.js +211 -0
- package/lib/rest/flexApi/v1/pluginVersionArchive.d.ts +162 -0
- package/lib/rest/flexApi/v1/pluginVersionArchive.js +136 -0
- package/lib/rest/flexApi/v1/provisioningStatus.d.ts +85 -0
- package/lib/rest/flexApi/v1/provisioningStatus.js +103 -0
- package/lib/rest/flexApi/v1/webChannel.d.ts +305 -0
- package/lib/rest/flexApi/v1/webChannel.js +268 -0
- package/lib/rest/flexApi/v2/webChannels.d.ts +65 -0
- package/lib/rest/flexApi/v2/webChannels.js +82 -0
- package/lib/rest/frontlineApi/V1.d.ts +15 -0
- package/lib/rest/frontlineApi/V1.js +36 -0
- package/lib/rest/frontlineApi/v1/user.d.ts +164 -0
- package/lib/rest/frontlineApi/v1/user.js +150 -0
- package/lib/rest/insights/V1.d.ts +35 -0
- package/lib/rest/insights/V1.js +61 -0
- package/lib/rest/insights/v1/call/annotation.d.ts +184 -0
- package/lib/rest/insights/v1/call/annotation.js +166 -0
- package/lib/rest/insights/v1/call/callSummary.d.ts +232 -0
- package/lib/rest/insights/v1/call/callSummary.js +159 -0
- package/lib/rest/insights/v1/call/event.d.ts +205 -0
- package/lib/rest/insights/v1/call/event.js +144 -0
- package/lib/rest/insights/v1/call/metric.d.ts +199 -0
- package/lib/rest/insights/v1/call/metric.js +142 -0
- package/lib/rest/insights/v1/call.d.ts +117 -0
- package/lib/rest/insights/v1/call.js +159 -0
- package/lib/rest/insights/v1/callSummaries.d.ts +409 -0
- package/lib/rest/insights/v1/callSummaries.js +211 -0
- package/lib/rest/insights/v1/conference/conferenceParticipant.d.ts +375 -0
- package/lib/rest/insights/v1/conference/conferenceParticipant.js +246 -0
- package/lib/rest/insights/v1/conference.d.ts +377 -0
- package/lib/rest/insights/v1/conference.js +248 -0
- package/lib/rest/insights/v1/room/participant.d.ts +280 -0
- package/lib/rest/insights/v1/room/participant.js +212 -0
- package/lib/rest/insights/v1/room.d.ts +362 -0
- package/lib/rest/insights/v1/room.js +244 -0
- package/lib/rest/insights/v1/setting.d.ts +170 -0
- package/lib/rest/insights/v1/setting.js +143 -0
- package/lib/rest/intelligence/V2.d.ts +20 -0
- package/lib/rest/intelligence/V2.js +42 -0
- package/lib/rest/intelligence/v2/service.d.ts +378 -0
- package/lib/rest/intelligence/v2/service.js +300 -0
- package/lib/rest/intelligence/v2/transcript/media.d.ts +132 -0
- package/lib/rest/intelligence/v2/transcript/media.js +122 -0
- package/lib/rest/intelligence/v2/transcript/operatorResult.d.ts +302 -0
- package/lib/rest/intelligence/v2/transcript/operatorResult.js +216 -0
- package/lib/rest/intelligence/v2/transcript/sentence.d.ts +182 -0
- package/lib/rest/intelligence/v2/transcript/sentence.js +136 -0
- package/lib/rest/intelligence/v2/transcript.d.ts +374 -0
- package/lib/rest/intelligence/v2/transcript.js +301 -0
- package/lib/rest/ipMessaging/V1.d.ts +20 -0
- package/lib/rest/ipMessaging/V1.js +38 -45
- package/lib/rest/ipMessaging/V2.d.ts +20 -0
- package/lib/rest/ipMessaging/V2.js +38 -45
- package/lib/rest/ipMessaging/v1/credential.d.ts +303 -0
- package/lib/rest/ipMessaging/v1/credential.js +260 -645
- package/lib/rest/ipMessaging/v1/service/channel/invite.d.ts +256 -0
- package/lib/rest/ipMessaging/v1/service/channel/invite.js +231 -585
- package/lib/rest/ipMessaging/v1/service/channel/member.d.ts +303 -0
- package/lib/rest/ipMessaging/v1/service/channel/member.js +261 -664
- package/lib/rest/ipMessaging/v1/service/channel/message.d.ts +312 -0
- package/lib/rest/ipMessaging/v1/service/channel/message.js +267 -668
- package/lib/rest/ipMessaging/v1/service/channel.d.ts +349 -0
- package/lib/rest/ipMessaging/v1/service/channel.js +306 -761
- package/lib/rest/ipMessaging/v1/service/role.d.ts +274 -0
- package/lib/rest/ipMessaging/v1/service/role.js +250 -641
- package/lib/rest/ipMessaging/v1/service/user/userChannel.d.ts +163 -0
- package/lib/rest/ipMessaging/v1/service/user/userChannel.js +130 -341
- package/lib/rest/ipMessaging/v1/service/user.d.ts +318 -0
- package/lib/rest/ipMessaging/v1/service/user.js +278 -690
- package/lib/rest/ipMessaging/v1/service.d.ts +449 -0
- package/lib/rest/ipMessaging/v1/service.js +438 -1061
- package/lib/rest/ipMessaging/v2/credential.d.ts +303 -0
- package/lib/rest/ipMessaging/v2/credential.js +260 -645
- package/lib/rest/ipMessaging/v2/service/binding.d.ts +249 -0
- package/lib/rest/ipMessaging/v2/service/binding.js +222 -0
- package/lib/rest/ipMessaging/v2/service/channel/invite.d.ts +256 -0
- package/lib/rest/ipMessaging/v2/service/channel/invite.js +231 -585
- package/lib/rest/ipMessaging/v2/service/channel/member.d.ts +354 -0
- package/lib/rest/ipMessaging/v2/service/channel/member.js +291 -664
- package/lib/rest/ipMessaging/v2/service/channel/message.d.ts +375 -0
- package/lib/rest/ipMessaging/v2/service/channel/message.js +301 -668
- package/lib/rest/ipMessaging/v2/service/channel/webhook.d.ts +311 -0
- package/lib/rest/ipMessaging/v2/service/channel/webhook.js +288 -0
- package/lib/rest/ipMessaging/v2/service/channel.d.ts +399 -0
- package/lib/rest/ipMessaging/v2/service/channel.js +341 -761
- package/lib/rest/ipMessaging/v2/service/role.d.ts +274 -0
- package/lib/rest/ipMessaging/v2/service/role.js +250 -641
- package/lib/rest/ipMessaging/v2/service/user/userBinding.d.ts +245 -0
- package/lib/rest/ipMessaging/v2/service/user/userBinding.js +226 -0
- package/lib/rest/ipMessaging/v2/service/user/userChannel.d.ts +283 -0
- package/lib/rest/ipMessaging/v2/service/user/userChannel.js +245 -338
- package/lib/rest/ipMessaging/v2/service/user.d.ts +331 -0
- package/lib/rest/ipMessaging/v2/service/user.js +295 -690
- package/lib/rest/ipMessaging/v2/service.d.ts +417 -0
- package/lib/rest/ipMessaging/v2/service.js +384 -845
- package/lib/rest/lookups/V1.d.ts +15 -0
- package/lib/rest/lookups/V1.js +32 -34
- package/lib/rest/lookups/V2.d.ts +15 -0
- package/lib/rest/lookups/V2.js +36 -0
- package/lib/rest/lookups/v1/phoneNumber.d.ts +149 -0
- package/lib/rest/lookups/v1/phoneNumber.js +129 -264
- package/lib/rest/lookups/v2/phoneNumber.d.ts +222 -0
- package/lib/rest/lookups/v2/phoneNumber.js +166 -0
- package/lib/rest/media/V1.d.ts +25 -0
- package/lib/rest/media/V1.js +51 -0
- package/lib/rest/media/v1/mediaProcessor.d.ts +317 -0
- package/lib/rest/media/v1/mediaProcessor.js +256 -0
- package/lib/rest/media/v1/mediaRecording.d.ts +309 -0
- package/lib/rest/media/v1/mediaRecording.js +226 -0
- package/lib/rest/media/v1/playerStreamer/playbackGrant.d.ts +151 -0
- package/lib/rest/media/v1/playerStreamer/playbackGrant.js +146 -0
- package/lib/rest/media/v1/playerStreamer.d.ts +327 -0
- package/lib/rest/media/v1/playerStreamer.js +264 -0
- package/lib/rest/messaging/V1.d.ts +65 -0
- package/lib/rest/messaging/V1.js +102 -33
- package/lib/rest/messaging/v1/brandRegistration/brandRegistrationOtp.d.ts +52 -0
- package/lib/rest/messaging/v1/brandRegistration/brandRegistrationOtp.js +68 -0
- package/lib/rest/messaging/v1/brandRegistration/brandVetting.d.ts +265 -0
- package/lib/rest/messaging/v1/brandRegistration/brandVetting.js +224 -0
- package/lib/rest/messaging/v1/brandRegistration.d.ts +358 -0
- package/lib/rest/messaging/v1/brandRegistration.js +290 -0
- package/lib/rest/messaging/v1/deactivations.d.ts +106 -0
- package/lib/rest/messaging/v1/deactivations.js +107 -0
- package/lib/rest/messaging/v1/domainCerts.d.ts +164 -0
- package/lib/rest/messaging/v1/domainCerts.js +164 -0
- package/lib/rest/messaging/v1/domainConfig.d.ts +175 -0
- package/lib/rest/messaging/v1/domainConfig.js +155 -0
- package/lib/rest/messaging/v1/domainConfigMessagingService.d.ts +127 -0
- package/lib/rest/messaging/v1/domainConfigMessagingService.js +124 -0
- package/lib/rest/messaging/v1/externalCampaign.d.ts +79 -0
- package/lib/rest/messaging/v1/externalCampaign.js +87 -0
- package/lib/rest/messaging/v1/linkshorteningMessagingService.d.ts +109 -0
- package/lib/rest/messaging/v1/linkshorteningMessagingService.js +135 -0
- package/lib/rest/messaging/v1/linkshorteningMessagingServiceDomainAssociation.d.ts +91 -0
- package/lib/rest/messaging/v1/linkshorteningMessagingServiceDomainAssociation.js +112 -0
- package/lib/rest/messaging/v1/service/alphaSender.d.ts +264 -0
- package/lib/rest/messaging/v1/service/alphaSender.js +217 -560
- package/lib/rest/messaging/v1/service/channelSender.d.ts +237 -0
- package/lib/rest/messaging/v1/service/channelSender.js +193 -0
- package/lib/rest/messaging/v1/service/phoneNumber.d.ts +270 -0
- package/lib/rest/messaging/v1/service/phoneNumber.js +220 -562
- package/lib/rest/messaging/v1/service/shortCode.d.ts +270 -0
- package/lib/rest/messaging/v1/service/shortCode.js +220 -562
- package/lib/rest/messaging/v1/service/usAppToPerson.d.ts +452 -0
- package/lib/rest/messaging/v1/service/usAppToPerson.js +371 -0
- package/lib/rest/messaging/v1/service/usAppToPersonUsecase.d.ts +62 -0
- package/lib/rest/messaging/v1/service/usAppToPersonUsecase.js +79 -0
- package/lib/rest/messaging/v1/service.d.ts +500 -0
- package/lib/rest/messaging/v1/service.js +404 -768
- package/lib/rest/messaging/v1/tollfreeVerification.d.ts +570 -0
- package/lib/rest/messaging/v1/tollfreeVerification.js +427 -0
- package/lib/rest/messaging/v1/usecase.d.ts +45 -0
- package/lib/rest/messaging/v1/usecase.js +62 -0
- package/lib/rest/microvisor/V1.d.ts +30 -0
- package/lib/rest/microvisor/V1.js +56 -0
- package/lib/rest/microvisor/v1/accountConfig.d.ts +263 -0
- package/lib/rest/microvisor/v1/accountConfig.js +246 -0
- package/lib/rest/microvisor/v1/accountSecret.d.ts +257 -0
- package/lib/rest/microvisor/v1/accountSecret.js +244 -0
- package/lib/rest/microvisor/v1/app/appManifest.d.ts +101 -0
- package/lib/rest/microvisor/v1/app/appManifest.js +115 -0
- package/lib/rest/microvisor/v1/app.d.ts +251 -0
- package/lib/rest/microvisor/v1/app.js +216 -0
- package/lib/rest/microvisor/v1/device/deviceConfig.d.ts +271 -0
- package/lib/rest/microvisor/v1/device/deviceConfig.js +254 -0
- package/lib/rest/microvisor/v1/device/deviceSecret.d.ts +265 -0
- package/lib/rest/microvisor/v1/device/deviceSecret.js +252 -0
- package/lib/rest/microvisor/v1/device.d.ts +299 -0
- package/lib/rest/microvisor/v1/device.js +245 -0
- package/lib/rest/monitor/V1.d.ts +20 -0
- package/lib/rest/monitor/V1.js +38 -44
- package/lib/rest/monitor/v1/alert.d.ts +313 -0
- package/lib/rest/monitor/v1/alert.js +201 -532
- package/lib/rest/monitor/v1/event.d.ts +301 -0
- package/lib/rest/monitor/v1/event.js +196 -485
- package/lib/rest/notify/V1.d.ts +20 -0
- package/lib/rest/notify/V1.js +38 -44
- package/lib/rest/notify/v1/credential.d.ts +324 -0
- package/lib/rest/notify/v1/credential.js +260 -645
- package/lib/rest/notify/v1/service/binding.d.ts +337 -0
- package/lib/rest/notify/v1/service/binding.js +251 -609
- package/lib/rest/notify/v1/service/notification.d.ts +208 -0
- package/lib/rest/notify/v1/service/notification.js +148 -237
- package/lib/rest/notify/v1/service.d.ts +458 -0
- package/lib/rest/notify/v1/service.js +352 -825
- package/lib/rest/numbers/V1.d.ts +40 -0
- package/lib/rest/numbers/V1.js +72 -0
- package/lib/rest/numbers/V2.d.ts +30 -0
- package/lib/rest/numbers/V2.js +58 -0
- package/lib/rest/numbers/v1/bulkEligibility.d.ts +136 -0
- package/lib/rest/numbers/v1/bulkEligibility.js +140 -0
- package/lib/rest/numbers/v1/eligibility.d.ts +61 -0
- package/lib/rest/numbers/v1/eligibility.js +75 -0
- package/lib/rest/numbers/v1/portingBulkPortability.d.ts +120 -0
- package/lib/rest/numbers/v1/portingBulkPortability.js +136 -0
- package/lib/rest/numbers/v1/portingPortIn.d.ts +64 -0
- package/lib/rest/numbers/v1/portingPortIn.js +77 -0
- package/lib/rest/numbers/v1/portingPortInFetch.d.ts +136 -0
- package/lib/rest/numbers/v1/portingPortInFetch.js +126 -0
- package/lib/rest/numbers/v1/portingPortability.d.ts +165 -0
- package/lib/rest/numbers/v1/portingPortability.js +132 -0
- package/lib/rest/numbers/v2/authorizationDocument/dependentHostedNumberOrder.d.ts +265 -0
- package/lib/rest/numbers/v2/authorizationDocument/dependentHostedNumberOrder.js +164 -0
- package/lib/rest/numbers/v2/authorizationDocument.d.ts +290 -0
- package/lib/rest/numbers/v2/authorizationDocument.js +262 -0
- package/lib/rest/numbers/v2/bulkHostedNumberOrder.d.ts +177 -0
- package/lib/rest/numbers/v2/bulkHostedNumberOrder.js +150 -0
- package/lib/rest/numbers/v2/hostedNumberOrder.d.ts +384 -0
- package/lib/rest/numbers/v2/hostedNumberOrder.js +294 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.d.ts +219 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.js +163 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle/evaluation.d.ts +231 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle/evaluation.js +200 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle/itemAssignment.d.ts +252 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle/itemAssignment.js +227 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.d.ts +106 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.js +97 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle.d.ts +433 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle.js +350 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/endUser.d.ts +308 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/endUser.js +261 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/endUserType.d.ts +211 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/endUserType.js +179 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/regulation.d.ts +239 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/regulation.js +189 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.d.ts +326 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.js +267 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocumentType.d.ts +211 -0
- package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocumentType.js +179 -0
- package/lib/rest/numbers/v2/regulatoryCompliance.d.ts +35 -0
- package/lib/rest/numbers/v2/regulatoryCompliance.js +87 -0
- package/lib/rest/preview/DeployedDevices.d.ts +15 -0
- package/lib/rest/preview/DeployedDevices.js +36 -0
- package/lib/rest/preview/HostedNumbers.d.ts +20 -0
- package/lib/rest/preview/HostedNumbers.js +44 -0
- package/lib/rest/preview/Marketplace.d.ts +20 -0
- package/lib/rest/preview/Marketplace.js +40 -48
- package/lib/rest/preview/Sync.d.ts +15 -0
- package/lib/rest/preview/Sync.js +32 -33
- package/lib/rest/preview/Wireless.d.ts +25 -0
- package/lib/rest/preview/Wireless.js +44 -55
- package/lib/rest/preview/deployed_devices/fleet/certificate.d.ts +324 -0
- package/lib/rest/preview/deployed_devices/fleet/certificate.js +269 -0
- package/lib/rest/preview/deployed_devices/fleet/deployment.d.ts +318 -0
- package/lib/rest/preview/deployed_devices/fleet/deployment.js +264 -0
- package/lib/rest/preview/deployed_devices/fleet/device.d.ts +358 -0
- package/lib/rest/preview/deployed_devices/fleet/device.js +284 -0
- package/lib/rest/preview/deployed_devices/fleet/key.d.ts +330 -0
- package/lib/rest/preview/deployed_devices/fleet/key.js +268 -0
- package/lib/rest/preview/deployed_devices/fleet.d.ts +352 -0
- package/lib/rest/preview/deployed_devices/fleet.js +307 -0
- package/lib/rest/preview/hosted_numbers/authorizationDocument/dependentHostedNumberOrder.d.ts +293 -0
- package/lib/rest/preview/hosted_numbers/authorizationDocument/dependentHostedNumberOrder.js +174 -0
- package/lib/rest/preview/hosted_numbers/authorizationDocument.d.ts +327 -0
- package/lib/rest/preview/hosted_numbers/authorizationDocument.js +285 -0
- package/lib/rest/preview/hosted_numbers/hostedNumberOrder.d.ts +468 -0
- package/lib/rest/preview/hosted_numbers/hostedNumberOrder.js +345 -0
- package/lib/rest/preview/marketplace/availableAddOn/availableAddOnExtension.d.ts +219 -0
- package/lib/rest/preview/marketplace/availableAddOn/availableAddOnExtension.js +175 -456
- package/lib/rest/preview/marketplace/availableAddOn.d.ts +231 -0
- package/lib/rest/preview/marketplace/availableAddOn.js +185 -480
- package/lib/rest/preview/marketplace/installedAddOn/installedAddOnExtension.d.ts +251 -0
- package/lib/rest/preview/marketplace/installedAddOn/installedAddOnExtension.js +203 -537
- package/lib/rest/preview/marketplace/installedAddOn.d.ts +332 -0
- package/lib/rest/preview/marketplace/installedAddOn.js +265 -681
- package/lib/rest/preview/sync/service/document/documentPermission.d.ts +280 -0
- package/lib/rest/preview/sync/service/document/documentPermission.js +241 -609
- package/lib/rest/preview/sync/service/document.d.ts +295 -0
- package/lib/rest/preview/sync/service/document.js +267 -678
- package/lib/rest/preview/sync/service/syncList/syncListItem.d.ts +321 -0
- package/lib/rest/preview/sync/service/syncList/syncListItem.js +265 -666
- package/lib/rest/preview/sync/service/syncList/syncListPermission.d.ts +280 -0
- package/lib/rest/preview/sync/service/syncList/syncListPermission.js +241 -609
- package/lib/rest/preview/sync/service/syncList.d.ts +270 -0
- package/lib/rest/preview/sync/service/syncList.js +249 -634
- package/lib/rest/preview/sync/service/syncMap/syncMapItem.d.ts +323 -0
- package/lib/rest/preview/sync/service/syncMap/syncMapItem.js +268 -668
- package/lib/rest/preview/sync/service/syncMap/syncMapPermission.d.ts +280 -0
- package/lib/rest/preview/sync/service/syncMap/syncMapPermission.js +241 -609
- package/lib/rest/preview/sync/service/syncMap.d.ts +270 -0
- package/lib/rest/preview/sync/service/syncMap.js +249 -632
- package/lib/rest/preview/sync/service.d.ts +330 -0
- package/lib/rest/preview/sync/service.js +292 -737
- package/lib/rest/preview/wireless/command.d.ts +266 -0
- package/lib/rest/preview/wireless/command.js +218 -533
- package/lib/rest/preview/wireless/ratePlan.d.ts +326 -0
- package/lib/rest/preview/wireless/ratePlan.js +273 -639
- package/lib/rest/preview/wireless/sim/usage.d.ts +131 -0
- package/lib/rest/preview/wireless/sim/usage.js +129 -262
- package/lib/rest/preview/wireless/sim.d.ts +357 -0
- package/lib/rest/preview/wireless/sim.js +278 -605
- package/lib/rest/previewMessaging/V1.d.ts +20 -0
- package/lib/rest/previewMessaging/V1.js +42 -0
- package/lib/rest/previewMessaging/v1/broadcast.d.ts +108 -0
- package/lib/rest/previewMessaging/v1/broadcast.js +94 -0
- package/lib/rest/previewMessaging/v1/message.d.ts +178 -0
- package/lib/rest/previewMessaging/v1/message.js +91 -0
- package/lib/rest/pricing/V1.d.ts +25 -0
- package/lib/rest/pricing/V1.js +44 -56
- package/lib/rest/pricing/V2.d.ts +25 -0
- package/lib/rest/pricing/V2.js +48 -0
- package/lib/rest/pricing/v1/messaging/country.d.ts +233 -0
- package/lib/rest/pricing/v1/messaging/country.js +178 -438
- package/lib/rest/pricing/v1/messaging.d.ts +19 -0
- package/lib/rest/pricing/v1/messaging.js +41 -132
- package/lib/rest/pricing/v1/phoneNumber/country.d.ts +216 -0
- package/lib/rest/pricing/v1/phoneNumber/country.js +170 -436
- package/lib/rest/pricing/v1/phoneNumber.d.ts +19 -0
- package/lib/rest/pricing/v1/phoneNumber.js +41 -132
- package/lib/rest/pricing/v1/voice/country.d.ts +228 -0
- package/lib/rest/pricing/v1/voice/country.js +175 -438
- package/lib/rest/pricing/v1/voice/number.d.ts +127 -0
- package/lib/rest/pricing/v1/voice/number.js +122 -234
- package/lib/rest/pricing/v1/voice.d.ts +22 -0
- package/lib/rest/pricing/v1/voice.js +50 -147
- package/lib/rest/pricing/v2/country.d.ts +229 -0
- package/lib/rest/pricing/v2/country.js +187 -0
- package/lib/rest/pricing/v2/number.d.ts +158 -0
- package/lib/rest/pricing/v2/number.js +137 -0
- package/lib/rest/pricing/v2/voice/country.d.ts +229 -0
- package/lib/rest/pricing/v2/voice/country.js +187 -0
- package/lib/rest/pricing/v2/voice/number.d.ts +159 -0
- package/lib/rest/pricing/v2/voice/number.js +137 -0
- package/lib/rest/pricing/v2/voice.d.ts +22 -0
- package/lib/rest/pricing/v2/voice.js +51 -0
- package/lib/rest/proxy/V1.d.ts +15 -0
- package/lib/rest/proxy/V1.js +36 -0
- package/lib/rest/proxy/v1/service/phoneNumber.d.ts +340 -0
- package/lib/rest/proxy/v1/service/phoneNumber.js +272 -0
- package/lib/rest/proxy/v1/service/session/interaction.d.ts +309 -0
- package/lib/rest/proxy/v1/service/session/interaction.js +238 -0
- package/lib/rest/proxy/v1/service/session/participant/messageInteraction.d.ts +326 -0
- package/lib/rest/proxy/v1/service/session/participant/messageInteraction.js +257 -0
- package/lib/rest/proxy/v1/service/session/participant.d.ts +310 -0
- package/lib/rest/proxy/v1/service/session/participant.js +266 -0
- package/lib/rest/proxy/v1/service/session.d.ts +388 -0
- package/lib/rest/proxy/v1/service/session.js +316 -0
- package/lib/rest/proxy/v1/service/shortCode.d.ts +316 -0
- package/lib/rest/proxy/v1/service/shortCode.js +262 -0
- package/lib/rest/proxy/v1/service.d.ts +388 -0
- package/lib/rest/proxy/v1/service.js +330 -0
- package/lib/rest/routes/V2.d.ts +25 -0
- package/lib/rest/routes/V2.js +48 -0
- package/lib/rest/routes/v2/phoneNumber.d.ts +168 -0
- package/lib/rest/routes/v2/phoneNumber.js +149 -0
- package/lib/rest/routes/v2/sipDomain.d.ts +144 -0
- package/lib/rest/routes/v2/sipDomain.js +149 -0
- package/lib/rest/routes/v2/trunk.d.ts +168 -0
- package/lib/rest/routes/v2/trunk.js +149 -0
- package/lib/rest/serverless/V1.d.ts +15 -0
- package/lib/rest/serverless/V1.js +36 -0
- package/lib/rest/serverless/v1/service/asset/assetVersion.d.ts +231 -0
- package/lib/rest/serverless/v1/service/asset/assetVersion.js +197 -0
- package/lib/rest/serverless/v1/service/asset.d.ts +298 -0
- package/lib/rest/serverless/v1/service/asset.js +271 -0
- package/lib/rest/serverless/v1/service/build/buildStatus.d.ts +107 -0
- package/lib/rest/serverless/v1/service/build/buildStatus.js +123 -0
- package/lib/rest/serverless/v1/service/build.d.ts +303 -0
- package/lib/rest/serverless/v1/service/build.js +260 -0
- package/lib/rest/serverless/v1/service/environment/deployment.d.ts +257 -0
- package/lib/rest/serverless/v1/service/environment/deployment.js +220 -0
- package/lib/rest/serverless/v1/service/environment/log.d.ts +273 -0
- package/lib/rest/serverless/v1/service/environment/log.js +211 -0
- package/lib/rest/serverless/v1/service/environment/variable.d.ts +318 -0
- package/lib/rest/serverless/v1/service/environment/variable.js +272 -0
- package/lib/rest/serverless/v1/service/environment.d.ts +308 -0
- package/lib/rest/serverless/v1/service/environment.js +278 -0
- package/lib/rest/serverless/v1/service/function/functionVersion/functionVersionContent.d.ts +114 -0
- package/lib/rest/serverless/v1/service/function/functionVersion/functionVersionContent.js +131 -0
- package/lib/rest/serverless/v1/service/function/functionVersion.d.ts +242 -0
- package/lib/rest/serverless/v1/service/function/functionVersion.js +212 -0
- package/lib/rest/serverless/v1/service/function.d.ts +298 -0
- package/lib/rest/serverless/v1/service/function.js +271 -0
- package/lib/rest/serverless/v1/service.d.ts +364 -0
- package/lib/rest/serverless/v1/service.js +321 -0
- package/lib/rest/studio/V1.d.ts +15 -0
- package/lib/rest/studio/V1.js +36 -0
- package/lib/rest/studio/V2.d.ts +20 -0
- package/lib/rest/studio/V2.js +42 -0
- package/lib/rest/studio/v1/flow/engagement/engagementContext.d.ts +109 -0
- package/lib/rest/studio/v1/flow/engagement/engagementContext.js +123 -0
- package/lib/rest/studio/v1/flow/engagement/step/stepContext.d.ts +117 -0
- package/lib/rest/studio/v1/flow/engagement/step/stepContext.js +131 -0
- package/lib/rest/studio/v1/flow/engagement/step.d.ts +265 -0
- package/lib/rest/studio/v1/flow/engagement/step.js +218 -0
- package/lib/rest/studio/v1/flow/engagement.d.ts +300 -0
- package/lib/rest/studio/v1/flow/engagement.js +269 -0
- package/lib/rest/studio/v1/flow/execution/executionContext.d.ts +109 -0
- package/lib/rest/studio/v1/flow/execution/executionContext.js +123 -0
- package/lib/rest/studio/v1/flow/execution/executionStep/executionStepContext.d.ts +117 -0
- package/lib/rest/studio/v1/flow/execution/executionStep/executionStepContext.js +131 -0
- package/lib/rest/studio/v1/flow/execution/executionStep.d.ts +265 -0
- package/lib/rest/studio/v1/flow/execution/executionStep.js +218 -0
- package/lib/rest/studio/v1/flow/execution.d.ts +338 -0
- package/lib/rest/studio/v1/flow/execution.js +298 -0
- package/lib/rest/studio/v1/flow.d.ts +266 -0
- package/lib/rest/studio/v1/flow.js +231 -0
- package/lib/rest/studio/v2/flow/execution/executionContext.d.ts +109 -0
- package/lib/rest/studio/v2/flow/execution/executionContext.js +123 -0
- package/lib/rest/studio/v2/flow/execution/executionStep/executionStepContext.d.ts +117 -0
- package/lib/rest/studio/v2/flow/execution/executionStep/executionStepContext.js +131 -0
- package/lib/rest/studio/v2/flow/execution/executionStep.d.ts +265 -0
- package/lib/rest/studio/v2/flow/execution/executionStep.js +218 -0
- package/lib/rest/studio/v2/flow/execution.d.ts +332 -0
- package/lib/rest/studio/v2/flow/execution.js +296 -0
- package/lib/rest/studio/v2/flow/flowRevision.d.ts +253 -0
- package/lib/rest/studio/v2/flow/flowRevision.js +199 -0
- package/lib/rest/studio/v2/flow/flowTestUser.d.ts +121 -0
- package/lib/rest/studio/v2/flow/flowTestUser.js +138 -0
- package/lib/rest/studio/v2/flow.d.ts +361 -0
- package/lib/rest/studio/v2/flow.js +319 -0
- package/lib/rest/studio/v2/flowValidate.d.ts +60 -0
- package/lib/rest/studio/v2/flowValidate.js +85 -0
- package/lib/rest/supersim/V1.d.ts +55 -0
- package/lib/rest/supersim/V1.js +86 -0
- package/lib/rest/supersim/v1/esimProfile.d.ts +311 -0
- package/lib/rest/supersim/v1/esimProfile.js +232 -0
- package/lib/rest/supersim/v1/fleet.d.ts +361 -0
- package/lib/rest/supersim/v1/fleet.js +277 -0
- package/lib/rest/supersim/v1/ipCommand.d.ts +303 -0
- package/lib/rest/supersim/v1/ipCommand.js +238 -0
- package/lib/rest/supersim/v1/network.d.ts +229 -0
- package/lib/rest/supersim/v1/network.js +185 -0
- package/lib/rest/supersim/v1/networkAccessProfile/networkAccessProfileNetwork.d.ts +252 -0
- package/lib/rest/supersim/v1/networkAccessProfile/networkAccessProfileNetwork.js +227 -0
- package/lib/rest/supersim/v1/networkAccessProfile.d.ts +296 -0
- package/lib/rest/supersim/v1/networkAccessProfile.js +248 -0
- package/lib/rest/supersim/v1/settingsUpdate.d.ts +194 -0
- package/lib/rest/supersim/v1/settingsUpdate.js +136 -0
- package/lib/rest/supersim/v1/sim/billingPeriod.d.ts +183 -0
- package/lib/rest/supersim/v1/sim/billingPeriod.js +136 -0
- package/lib/rest/supersim/v1/sim/simIpAddress.d.ts +147 -0
- package/lib/rest/supersim/v1/sim/simIpAddress.js +124 -0
- package/lib/rest/supersim/v1/sim.d.ts +341 -0
- package/lib/rest/supersim/v1/sim.js +283 -0
- package/lib/rest/supersim/v1/smsCommand.d.ts +271 -0
- package/lib/rest/supersim/v1/smsCommand.js +222 -0
- package/lib/rest/supersim/v1/usageRecord.d.ts +252 -0
- package/lib/rest/supersim/v1/usageRecord.js +154 -0
- package/lib/rest/sync/V1.d.ts +15 -0
- package/lib/rest/sync/V1.js +36 -0
- package/lib/rest/sync/v1/service/document/documentPermission.d.ts +280 -0
- package/lib/rest/sync/v1/service/document/documentPermission.js +253 -0
- package/lib/rest/sync/v1/service/document.d.ts +354 -0
- package/lib/rest/sync/v1/service/document.js +289 -0
- package/lib/rest/sync/v1/service/syncList/syncListItem.d.ts +385 -0
- package/lib/rest/sync/v1/service/syncList/syncListItem.js +296 -0
- package/lib/rest/sync/v1/service/syncList/syncListPermission.d.ts +280 -0
- package/lib/rest/sync/v1/service/syncList/syncListPermission.js +253 -0
- package/lib/rest/sync/v1/service/syncList.d.ts +354 -0
- package/lib/rest/sync/v1/service/syncList.js +298 -0
- package/lib/rest/sync/v1/service/syncMap/syncMapItem.d.ts +387 -0
- package/lib/rest/sync/v1/service/syncMap/syncMapItem.js +300 -0
- package/lib/rest/sync/v1/service/syncMap/syncMapPermission.d.ts +280 -0
- package/lib/rest/sync/v1/service/syncMap/syncMapPermission.js +253 -0
- package/lib/rest/sync/v1/service/syncMap.d.ts +354 -0
- package/lib/rest/sync/v1/service/syncMap.js +298 -0
- package/lib/rest/sync/v1/service/syncStream/streamMessage.d.ts +61 -0
- package/lib/rest/sync/v1/service/syncStream/streamMessage.js +83 -0
- package/lib/rest/sync/v1/service/syncStream.d.ts +336 -0
- package/lib/rest/sync/v1/service/syncStream.js +279 -0
- package/lib/rest/sync/v1/service.d.ts +404 -0
- package/lib/rest/sync/v1/service.js +344 -0
- package/lib/rest/taskrouter/V1.d.ts +15 -0
- package/lib/rest/taskrouter/V1.js +32 -33
- package/lib/rest/taskrouter/v1/workspace/activity.d.ts +323 -0
- package/lib/rest/taskrouter/v1/workspace/activity.js +252 -645
- package/lib/rest/taskrouter/v1/workspace/event.d.ts +351 -0
- package/lib/rest/taskrouter/v1/workspace/event.js +219 -510
- package/lib/rest/taskrouter/v1/workspace/task/reservation.d.ts +414 -0
- package/lib/rest/taskrouter/v1/workspace/task/reservation.js +334 -613
- package/lib/rest/taskrouter/v1/workspace/task.d.ts +505 -0
- package/lib/rest/taskrouter/v1/workspace/task.js +331 -748
- package/lib/rest/taskrouter/v1/workspace/taskChannel.d.ts +324 -0
- package/lib/rest/taskrouter/v1/workspace/taskChannel.js +258 -455
- package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueBulkRealTimeStatistics.d.ts +86 -0
- package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueBulkRealTimeStatistics.js +87 -0
- package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.d.ts +244 -0
- package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.js +172 -0
- package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueRealTimeStatistics.d.ts +188 -0
- package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueRealTimeStatistics.js +148 -0
- package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueStatistics.d.ts +148 -0
- package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueStatistics.js +135 -276
- package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueuesStatistics.d.ts +203 -0
- package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueuesStatistics.js +133 -353
- package/lib/rest/taskrouter/v1/workspace/taskQueue.d.ts +420 -0
- package/lib/rest/taskrouter/v1/workspace/taskQueue.js +339 -759
- package/lib/rest/taskrouter/v1/workspace/worker/reservation.d.ts +403 -0
- package/lib/rest/taskrouter/v1/workspace/worker/reservation.js +328 -613
- package/lib/rest/taskrouter/v1/workspace/worker/workerChannel.d.ts +307 -0
- package/lib/rest/taskrouter/v1/workspace/worker/workerChannel.js +225 -559
- package/lib/rest/taskrouter/v1/workspace/worker/workerStatistics.d.ts +140 -0
- package/lib/rest/taskrouter/v1/workspace/worker/workerStatistics.js +131 -274
- package/lib/rest/taskrouter/v1/workspace/worker/workersCumulativeStatistics.d.ts +180 -0
- package/lib/rest/taskrouter/v1/workspace/worker/workersCumulativeStatistics.js +143 -0
- package/lib/rest/taskrouter/v1/workspace/worker/workersRealTimeStatistics.d.ts +132 -0
- package/lib/rest/taskrouter/v1/workspace/worker/workersRealTimeStatistics.js +123 -0
- package/lib/rest/taskrouter/v1/workspace/worker/workersStatistics.d.ts +144 -0
- package/lib/rest/taskrouter/v1/workspace/worker/workersStatistics.js +131 -271
- package/lib/rest/taskrouter/v1/workspace/worker.d.ts +454 -0
- package/lib/rest/taskrouter/v1/workspace/worker.js +351 -801
- package/lib/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.d.ts +244 -0
- package/lib/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.js +171 -0
- package/lib/rest/taskrouter/v1/workspace/workflow/workflowRealTimeStatistics.d.ts +158 -0
- package/lib/rest/taskrouter/v1/workspace/workflow/workflowRealTimeStatistics.js +137 -0
- package/lib/rest/taskrouter/v1/workspace/workflow/workflowStatistics.d.ts +148 -0
- package/lib/rest/taskrouter/v1/workspace/workflow/workflowStatistics.js +135 -275
- package/lib/rest/taskrouter/v1/workspace/workflow.d.ts +384 -0
- package/lib/rest/taskrouter/v1/workspace/workflow.js +316 -710
- package/lib/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.d.ts +236 -0
- package/lib/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.js +163 -0
- package/lib/rest/taskrouter/v1/workspace/workspaceRealTimeStatistics.d.ts +162 -0
- package/lib/rest/taskrouter/v1/workspace/workspaceRealTimeStatistics.js +133 -0
- package/lib/rest/taskrouter/v1/workspace/workspaceStatistics.d.ts +140 -0
- package/lib/rest/taskrouter/v1/workspace/workspaceStatistics.js +127 -262
- package/lib/rest/taskrouter/v1/workspace.d.ts +452 -0
- package/lib/rest/taskrouter/v1/workspace.js +413 -941
- package/lib/rest/trunking/V1.d.ts +15 -0
- package/lib/rest/trunking/V1.js +32 -33
- package/lib/rest/trunking/v1/trunk/credentialList.d.ts +258 -0
- package/lib/rest/trunking/v1/trunk/credentialList.js +216 -558
- package/lib/rest/trunking/v1/trunk/ipAccessControlList.d.ts +258 -0
- package/lib/rest/trunking/v1/trunk/ipAccessControlList.js +216 -560
- package/lib/rest/trunking/v1/trunk/originationUrl.d.ts +340 -0
- package/lib/rest/trunking/v1/trunk/originationUrl.js +270 -665
- package/lib/rest/trunking/v1/trunk/phoneNumber.d.ts +370 -0
- package/lib/rest/trunking/v1/trunk/phoneNumber.js +253 -596
- package/lib/rest/trunking/v1/trunk/recording.d.ts +129 -0
- package/lib/rest/trunking/v1/trunk/recording.js +140 -0
- package/lib/rest/trunking/v1/trunk.d.ts +430 -0
- package/lib/rest/trunking/v1/trunk.js +347 -783
- package/lib/rest/trusthub/V1.d.ts +60 -0
- package/lib/rest/trusthub/V1.js +99 -0
- package/lib/rest/trusthub/v1/complianceInquiries.d.ts +127 -0
- package/lib/rest/trusthub/v1/complianceInquiries.js +142 -0
- package/lib/rest/trusthub/v1/complianceRegistrationInquiries.d.ts +149 -0
- package/lib/rest/trusthub/v1/complianceRegistrationInquiries.js +167 -0
- package/lib/rest/trusthub/v1/complianceTollfreeInquiries.d.ts +112 -0
- package/lib/rest/trusthub/v1/complianceTollfreeInquiries.js +125 -0
- package/lib/rest/trusthub/v1/customerProfiles/customerProfilesChannelEndpointAssignment.d.ts +272 -0
- package/lib/rest/trusthub/v1/customerProfiles/customerProfilesChannelEndpointAssignment.js +239 -0
- package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEntityAssignments.d.ts +252 -0
- package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEntityAssignments.js +227 -0
- package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.d.ts +239 -0
- package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.js +212 -0
- package/lib/rest/trusthub/v1/customerProfiles.d.ts +380 -0
- package/lib/rest/trusthub/v1/customerProfiles.js +322 -0
- package/lib/rest/trusthub/v1/endUser.d.ts +310 -0
- package/lib/rest/trusthub/v1/endUser.js +261 -0
- package/lib/rest/trusthub/v1/endUserType.d.ts +211 -0
- package/lib/rest/trusthub/v1/endUserType.js +179 -0
- package/lib/rest/trusthub/v1/policies.d.ts +205 -0
- package/lib/rest/trusthub/v1/policies.js +177 -0
- package/lib/rest/trusthub/v1/supportingDocument.d.ts +320 -0
- package/lib/rest/trusthub/v1/supportingDocument.js +265 -0
- package/lib/rest/trusthub/v1/supportingDocumentType.d.ts +211 -0
- package/lib/rest/trusthub/v1/supportingDocumentType.js +179 -0
- package/lib/rest/trusthub/v1/trustProducts/trustProductsChannelEndpointAssignment.d.ts +272 -0
- package/lib/rest/trusthub/v1/trustProducts/trustProductsChannelEndpointAssignment.js +239 -0
- package/lib/rest/trusthub/v1/trustProducts/trustProductsEntityAssignments.d.ts +252 -0
- package/lib/rest/trusthub/v1/trustProducts/trustProductsEntityAssignments.js +227 -0
- package/lib/rest/trusthub/v1/trustProducts/trustProductsEvaluations.d.ts +239 -0
- package/lib/rest/trusthub/v1/trustProducts/trustProductsEvaluations.js +212 -0
- package/lib/rest/trusthub/v1/trustProducts.d.ts +380 -0
- package/lib/rest/trusthub/v1/trustProducts.js +322 -0
- package/lib/rest/verify/V2.d.ts +40 -0
- package/lib/rest/verify/V2.js +69 -0
- package/lib/rest/verify/v2/form.d.ts +98 -0
- package/lib/rest/verify/v2/form.js +112 -0
- package/lib/rest/verify/v2/safelist.d.ts +127 -0
- package/lib/rest/verify/v2/safelist.js +150 -0
- package/lib/rest/verify/v2/service/accessToken.d.ts +158 -0
- package/lib/rest/verify/v2/service/accessToken.js +159 -0
- package/lib/rest/verify/v2/service/entity/challenge/notification.d.ts +112 -0
- package/lib/rest/verify/v2/service/entity/challenge/notification.js +102 -0
- package/lib/rest/verify/v2/service/entity/challenge.d.ts +384 -0
- package/lib/rest/verify/v2/service/entity/challenge.js +296 -0
- package/lib/rest/verify/v2/service/entity/factor.d.ts +335 -0
- package/lib/rest/verify/v2/service/entity/factor.js +270 -0
- package/lib/rest/verify/v2/service/entity/newFactor.d.ts +157 -0
- package/lib/rest/verify/v2/service/entity/newFactor.js +137 -0
- package/lib/rest/verify/v2/service/entity.d.ts +288 -0
- package/lib/rest/verify/v2/service/entity.js +270 -0
- package/lib/rest/verify/v2/service/messagingConfiguration.d.ts +286 -0
- package/lib/rest/verify/v2/service/messagingConfiguration.js +260 -0
- package/lib/rest/verify/v2/service/rateLimit/bucket.d.ts +318 -0
- package/lib/rest/verify/v2/service/rateLimit/bucket.js +272 -0
- package/lib/rest/verify/v2/service/rateLimit.d.ts +322 -0
- package/lib/rest/verify/v2/service/rateLimit.js +275 -0
- package/lib/rest/verify/v2/service/verification.d.ts +242 -0
- package/lib/rest/verify/v2/service/verification.js +221 -0
- package/lib/rest/verify/v2/service/verificationCheck.d.ts +134 -0
- package/lib/rest/verify/v2/service/verificationCheck.js +110 -0
- package/lib/rest/verify/v2/service/webhook.d.ts +340 -0
- package/lib/rest/verify/v2/service/webhook.js +287 -0
- package/lib/rest/verify/v2/service.d.ts +491 -0
- package/lib/rest/verify/v2/service.js +433 -0
- package/lib/rest/verify/v2/template.d.ts +172 -0
- package/lib/rest/verify/v2/template.js +128 -0
- package/lib/rest/verify/v2/verificationAttempt.d.ts +288 -0
- package/lib/rest/verify/v2/verificationAttempt.js +207 -0
- package/lib/rest/verify/v2/verificationAttemptsSummary.d.ts +138 -0
- package/lib/rest/verify/v2/verificationAttemptsSummary.js +126 -0
- package/lib/rest/video/V1.d.ts +40 -0
- package/lib/rest/video/V1.js +65 -44
- package/lib/rest/video/v1/composition.d.ts +376 -0
- package/lib/rest/video/v1/composition.js +275 -0
- package/lib/rest/video/v1/compositionHook.d.ts +388 -0
- package/lib/rest/video/v1/compositionHook.js +310 -0
- package/lib/rest/video/v1/compositionSettings.d.ts +159 -0
- package/lib/rest/video/v1/compositionSettings.js +151 -0
- package/lib/rest/video/v1/recording.d.ts +334 -0
- package/lib/rest/video/v1/recording.js +225 -523
- package/lib/rest/video/v1/recordingSettings.d.ts +159 -0
- package/lib/rest/video/v1/recordingSettings.js +151 -0
- package/lib/rest/video/v1/room/participant/anonymize.d.ts +143 -0
- package/lib/rest/video/v1/room/participant/anonymize.js +135 -0
- package/lib/rest/video/v1/room/participant/publishedTrack.d.ts +237 -0
- package/lib/rest/video/v1/room/participant/publishedTrack.js +199 -0
- package/lib/rest/video/v1/room/participant/subscribeRules.d.ts +103 -0
- package/lib/rest/video/v1/room/participant/subscribeRules.js +103 -0
- package/lib/rest/video/v1/room/participant/subscribedTrack.d.ts +243 -0
- package/lib/rest/video/v1/room/participant/subscribedTrack.js +201 -0
- package/lib/rest/video/v1/room/participant.d.ts +351 -0
- package/lib/rest/video/v1/room/participant.js +286 -0
- package/lib/rest/video/v1/room/recordingRules.d.ts +95 -0
- package/lib/rest/video/v1/room/recordingRules.js +98 -0
- package/lib/rest/video/v1/room/roomRecording.d.ts +318 -0
- package/lib/rest/video/v1/room/roomRecording.js +236 -0
- package/lib/rest/video/v1/room.d.ts +448 -0
- package/lib/rest/video/v1/room.js +324 -614
- package/lib/rest/voice/V1.d.ts +40 -0
- package/lib/rest/voice/V1.js +69 -0
- package/lib/rest/voice/v1/archivedCall.d.ts +51 -0
- package/lib/rest/voice/v1/archivedCall.js +71 -0
- package/lib/rest/voice/v1/byocTrunk.d.ts +390 -0
- package/lib/rest/voice/v1/byocTrunk.js +304 -0
- package/lib/rest/voice/v1/connectionPolicy/connectionPolicyTarget.d.ts +340 -0
- package/lib/rest/voice/v1/connectionPolicy/connectionPolicyTarget.js +280 -0
- package/lib/rest/voice/v1/connectionPolicy.d.ts +314 -0
- package/lib/rest/voice/v1/connectionPolicy.js +265 -0
- package/lib/rest/voice/v1/dialingPermissions/bulkCountryUpdate.d.ts +59 -0
- package/lib/rest/voice/v1/dialingPermissions/bulkCountryUpdate.js +77 -0
- package/lib/rest/voice/v1/dialingPermissions/country/highriskSpecialPrefix.d.ts +143 -0
- package/lib/rest/voice/v1/dialingPermissions/country/highriskSpecialPrefix.js +122 -0
- package/lib/rest/voice/v1/dialingPermissions/country.d.ts +279 -0
- package/lib/rest/voice/v1/dialingPermissions/country.js +214 -0
- package/lib/rest/voice/v1/dialingPermissions/settings.d.ts +129 -0
- package/lib/rest/voice/v1/dialingPermissions/settings.js +130 -0
- package/lib/rest/voice/v1/dialingPermissions.d.ts +25 -0
- package/lib/rest/voice/v1/dialingPermissions.js +60 -0
- package/lib/rest/voice/v1/ipRecord.d.ts +308 -0
- package/lib/rest/voice/v1/ipRecord.js +256 -0
- package/lib/rest/voice/v1/sourceIpMapping.d.ts +278 -0
- package/lib/rest/voice/v1/sourceIpMapping.js +252 -0
- package/lib/rest/wireless/V1.d.ts +30 -0
- package/lib/rest/wireless/V1.js +54 -0
- package/lib/rest/wireless/v1/command.d.ts +314 -0
- package/lib/rest/wireless/v1/command.js +253 -0
- package/lib/rest/wireless/v1/ratePlan.d.ts +382 -0
- package/lib/rest/wireless/v1/ratePlan.js +293 -0
- package/lib/rest/wireless/v1/sim/dataSession.d.ts +233 -0
- package/lib/rest/wireless/v1/sim/dataSession.js +152 -0
- package/lib/rest/wireless/v1/sim/usageRecord.d.ts +186 -0
- package/lib/rest/wireless/v1/sim/usageRecord.js +136 -0
- package/lib/rest/wireless/v1/sim.d.ts +460 -0
- package/lib/rest/wireless/v1/sim.js +332 -0
- package/lib/rest/wireless/v1/usageRecord.d.ts +179 -0
- package/lib/rest/wireless/v1/usageRecord.js +130 -0
- package/lib/twiml/FaxResponse.d.ts +66 -0
- package/lib/twiml/FaxResponse.js +66 -0
- package/lib/twiml/MessagingResponse.d.ts +117 -0
- package/lib/twiml/MessagingResponse.js +115 -75
- package/lib/twiml/TwiML.d.ts +42 -0
- package/lib/twiml/TwiML.js +83 -0
- package/lib/twiml/VoiceResponse.d.ts +2457 -0
- package/lib/twiml/VoiceResponse.js +1428 -308
- package/lib/webhooks/webhooks.d.ts +136 -0
- package/lib/webhooks/webhooks.js +253 -117
- package/package.json +45 -22
- package/CHANGES.md +0 -61
- package/LICENSE.md +0 -8
- package/lib/rest/Fax.js +0 -45
- package/lib/rest/api/v2010/account/availablePhoneNumber/local.js +0 -436
- package/lib/rest/api/v2010/account/availablePhoneNumber/mobile.js +0 -436
- package/lib/rest/api/v2010/account/availablePhoneNumber/tollFree.js +0 -436
- package/lib/rest/api/v2010/account/availablePhoneNumber.js +0 -569
- package/lib/rest/api/v2010/account/call/feedback.js +0 -408
- package/lib/rest/api/v2010/account/call/feedbackSummary.js +0 -396
- package/lib/rest/fax/V1.js +0 -37
- package/lib/rest/fax/v1/fax.js +0 -622
- package/lib/rest/notify/v1/service/segment.js +0 -341
- package/lib/rest/notify/v1/service/user/segmentMemberships.js +0 -372
- package/lib/rest/notify/v1/service/user/userBinding.js +0 -631
- package/lib/rest/notify/v1/service/user.js +0 -658
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (C) 2023, Twilio, Inc. <https://www.twilio.com/help/contact>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
+
the Software without restriction, including without limitation the rights to
|
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
9
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
10
|
+
so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,51 +1,305 @@
|
|
|
1
1
|
# twilio-node
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[![][test-workflow-image]][test-workflow-url]
|
|
4
|
+
[![][npm-version-image]][npm-url]
|
|
5
|
+
[![][npm-install-size-image]][npm-install-size-url]
|
|
6
|
+
[![][npm-downloads-image]][npm-downloads-url]
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
## Documentation
|
|
6
9
|
|
|
7
|
-
[
|
|
10
|
+
The documentation for the Twilio API can be found [here][apidocs].
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
The Node library documentation can be found [here][libdocs].
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
## Versions
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
`twilio-node` uses a modified version of [Semantic Versioning](https://semver.org) for all changes. [See this document](VERSIONS.md) for details.
|
|
17
|
+
|
|
18
|
+
### Supported Node.js Versions
|
|
19
|
+
|
|
20
|
+
This library supports the following Node.js implementations:
|
|
21
|
+
|
|
22
|
+
- Node.js 14
|
|
23
|
+
- Node.js 16
|
|
24
|
+
- Node.js 18
|
|
25
|
+
|
|
26
|
+
TypeScript is supported for TypeScript version 2.9 and above.
|
|
27
|
+
|
|
28
|
+
> **Warning**
|
|
29
|
+
> Do not use this Node.js library in a front-end application. Doing so can expose your Twilio credentials to end-users as part of the bundled HTML/JavaScript sent to their browser.
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
`npm install twilio` or `yarn add twilio`
|
|
34
|
+
|
|
35
|
+
### Test your installation
|
|
36
|
+
|
|
37
|
+
To make sure the installation was successful, try sending yourself an SMS message, like this:
|
|
38
|
+
|
|
39
|
+
```js
|
|
40
|
+
// Your AccountSID and Auth Token from console.twilio.com
|
|
41
|
+
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
|
|
42
|
+
const authToken = 'your_auth_token';
|
|
43
|
+
|
|
44
|
+
const client = require('twilio')(accountSid, authToken);
|
|
45
|
+
|
|
46
|
+
client.messages
|
|
47
|
+
.create({
|
|
48
|
+
body: 'Hello from twilio-node',
|
|
49
|
+
to: '+12345678901', // Text your number
|
|
50
|
+
from: '+12345678901', // From a valid Twilio number
|
|
51
|
+
})
|
|
52
|
+
.then((message) => console.log(message.sid));
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
After a brief delay, you will receive the text message on your phone.
|
|
56
|
+
|
|
57
|
+
> **Warning**
|
|
58
|
+
> It's okay to hardcode your credentials when testing locally, but you should use environment variables to keep them secret before committing any code or deploying to production. Check out [How to Set Environment Variables](https://www.twilio.com/blog/2017/01/how-to-set-environment-variables.html) for more information.
|
|
59
|
+
|
|
60
|
+
## Usage
|
|
61
|
+
|
|
62
|
+
Check out these [code examples](examples) in JavaScript and TypeScript to get up and running quickly.
|
|
63
|
+
|
|
64
|
+
### Environment Variables
|
|
65
|
+
|
|
66
|
+
`twilio-node` supports credential storage in environment variables. If no credentials are provided when instantiating the Twilio client (e.g., `const client = require('twilio')();`), the values in following env vars will be used: `TWILIO_ACCOUNT_SID` and `TWILIO_AUTH_TOKEN`.
|
|
67
|
+
|
|
68
|
+
If your environment requires SSL decryption, you can set the path to CA bundle in the env var `TWILIO_CA_BUNDLE`.
|
|
69
|
+
|
|
70
|
+
### Client Initialization
|
|
71
|
+
|
|
72
|
+
If you invoke any V2010 operations without specifying an account SID, `twilio-node` will automatically use the `TWILIO_ACCOUNT_SID` value that the client was initialized with. This is useful for when you'd like to, for example, fetch resources for your main account but also your subaccount. See below:
|
|
73
|
+
|
|
74
|
+
```javascript
|
|
75
|
+
// Your Account SID, Subaccount SID Auth Token from console.twilio.com
|
|
76
|
+
const accountSid = process.env.TWILIO_ACCOUNT_SID;
|
|
77
|
+
const authToken = process.env.TWILIO_AUTH_TOKEN;
|
|
78
|
+
const subaccountSid = process.env.TWILIO_ACCOUNT_SUBACCOUNT_SID;
|
|
79
|
+
|
|
80
|
+
const client = require('twilio')(accountSid, authToken);
|
|
81
|
+
const mainAccountCalls = client.api.v2010.account.calls.list; // SID not specified, so defaults to accountSid
|
|
82
|
+
const subaccountCalls = client.api.v2010.account(subaccountSid).calls.list; // SID specified as subaccountSid
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Lazy Loading
|
|
86
|
+
|
|
87
|
+
`twilio-node` supports lazy loading required modules for faster loading time. Lazy loading is enabled by default. To disable lazy loading, simply instantiate the Twilio client with the `lazyLoading` flag set to `false`:
|
|
88
|
+
|
|
89
|
+
```javascript
|
|
90
|
+
// Your Account SID and Auth Token from console.twilio.com
|
|
91
|
+
const accountSid = process.env.TWILIO_ACCOUNT_SID;
|
|
92
|
+
const authToken = process.env.TWILIO_AUTH_TOKEN;
|
|
93
|
+
|
|
94
|
+
const client = require('twilio')(accountSid, authToken, {
|
|
95
|
+
lazyLoading: false,
|
|
96
|
+
});
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Enable Auto-Retry with Exponential Backoff
|
|
100
|
+
|
|
101
|
+
`twilio-node` supports automatic retry with exponential backoff when API requests receive an [Error 429 response](https://support.twilio.com/hc/en-us/articles/360044308153-Twilio-API-response-Error-429-Too-Many-Requests-). This retry with exponential backoff feature is disabled by default. To enable this feature, instantiate the Twilio client with the `autoRetry` flag set to `true`.
|
|
102
|
+
|
|
103
|
+
Optionally, the maximum number of retries performed by this feature can be set with the `maxRetries` flag. The default maximum number of retries is `3`.
|
|
104
|
+
|
|
105
|
+
```javascript
|
|
106
|
+
const accountSid = process.env.TWILIO_ACCOUNT_SID;
|
|
107
|
+
const authToken = process.env.TWILIO_AUTH_TOKEN;
|
|
108
|
+
|
|
109
|
+
const client = require('twilio')(accountSid, authToken, {
|
|
110
|
+
autoRetry: true,
|
|
111
|
+
maxRetries: 3,
|
|
112
|
+
});
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Specify Region and/or Edge
|
|
116
|
+
|
|
117
|
+
To take advantage of Twilio's [Global Infrastructure](https://www.twilio.com/docs/global-infrastructure), specify the target Region and/or Edge for the client:
|
|
118
|
+
|
|
119
|
+
```javascript
|
|
120
|
+
const accountSid = process.env.TWILIO_ACCOUNT_SID;
|
|
121
|
+
const authToken = process.env.TWILIO_AUTH_TOKEN;
|
|
122
|
+
|
|
123
|
+
const client = require('twilio')(accountSid, authToken, {
|
|
124
|
+
region: 'au1',
|
|
125
|
+
edge: 'sydney',
|
|
126
|
+
});
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Alternatively, specify the edge and/or region after constructing the Twilio client:
|
|
130
|
+
|
|
131
|
+
```javascript
|
|
132
|
+
const client = require('twilio')(accountSid, authToken);
|
|
133
|
+
client.region = 'au1';
|
|
134
|
+
client.edge = 'sydney';
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
This will result in the `hostname` transforming from `api.twilio.com` to `api.sydney.au1.twilio.com`.
|
|
138
|
+
|
|
139
|
+
### Iterate through records
|
|
140
|
+
|
|
141
|
+
The library automatically handles paging for you. Collections, such as `calls` and `messages`, have `list` and `each` methods that page under the hood. With both `list` and `each`, you can specify the number of records you want to receive (`limit`) and the maximum size you want each page fetch to be (`pageSize`). The library will then handle the task for you.
|
|
142
|
+
|
|
143
|
+
`list` eagerly fetches all records and returns them as a list, whereas `each` streams records and lazily retrieves pages of records as you iterate over the collection. You can also page manually using the `page` method.
|
|
144
|
+
|
|
145
|
+
For more information about these methods, view the [auto-generated library docs](https://www.twilio.com/docs/libraries/reference/twilio-node/).
|
|
146
|
+
|
|
147
|
+
```js
|
|
148
|
+
// Your Account SID and Auth Token from console.twilio.com
|
|
149
|
+
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
|
|
150
|
+
const authToken = 'your_auth_token';
|
|
151
|
+
const client = require('twilio')(accountSid, authToken);
|
|
152
|
+
|
|
153
|
+
client.calls.each((call) => console.log(call.direction));
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Enable Debug Logging
|
|
157
|
+
|
|
158
|
+
There are two ways to enable debug logging in the default HTTP client. You can create an environment variable called `TWILIO_LOG_LEVEL` and set it to `debug` or you can set the logLevel variable on the client as debug:
|
|
159
|
+
|
|
160
|
+
```javascript
|
|
161
|
+
const accountSid = process.env.TWILIO_ACCOUNT_SID;
|
|
162
|
+
const authToken = process.env.TWILIO_AUTH_TOKEN;
|
|
163
|
+
|
|
164
|
+
const client = require('twilio')(accountSid, authToken, {
|
|
165
|
+
logLevel: 'debug',
|
|
166
|
+
});
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
You can also set the logLevel variable on the client after constructing the Twilio client:
|
|
170
|
+
|
|
171
|
+
```javascript
|
|
172
|
+
const client = require('twilio')(accountSid, authToken);
|
|
173
|
+
client.logLevel = 'debug';
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Debug API requests
|
|
177
|
+
|
|
178
|
+
To assist with debugging, the library allows you to access the underlying request and response objects. This capability is built into the default HTTP client that ships with the library.
|
|
179
|
+
|
|
180
|
+
For example, you can retrieve the status code of the last response like so:
|
|
181
|
+
|
|
182
|
+
```js
|
|
183
|
+
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
|
|
184
|
+
const authToken = 'your_auth_token';
|
|
185
|
+
|
|
186
|
+
const client = require('twilio')(accountSid, authToken);
|
|
187
|
+
|
|
188
|
+
client.messages
|
|
189
|
+
.create({
|
|
190
|
+
to: '+14158675309',
|
|
191
|
+
from: '+14258675310',
|
|
192
|
+
body: 'Ahoy!',
|
|
193
|
+
})
|
|
194
|
+
.then(() => {
|
|
195
|
+
// Access details about the last request
|
|
196
|
+
console.log(client.lastRequest.method);
|
|
197
|
+
console.log(client.lastRequest.url);
|
|
198
|
+
console.log(client.lastRequest.auth);
|
|
199
|
+
console.log(client.lastRequest.params);
|
|
200
|
+
console.log(client.lastRequest.headers);
|
|
201
|
+
console.log(client.lastRequest.data);
|
|
202
|
+
|
|
203
|
+
// Access details about the last response
|
|
204
|
+
console.log(client.httpClient.lastResponse.statusCode);
|
|
205
|
+
console.log(client.httpClient.lastResponse.body);
|
|
206
|
+
});
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Handle exceptions
|
|
210
|
+
|
|
211
|
+
If the Twilio API returns a 400 or a 500 level HTTP response, `twilio-node` will throw an error including relevant information, which you can then `catch`:
|
|
212
|
+
|
|
213
|
+
```js
|
|
214
|
+
client.messages
|
|
215
|
+
.create({
|
|
216
|
+
body: 'Hello from Node',
|
|
217
|
+
to: '+12345678901',
|
|
218
|
+
from: '+12345678901',
|
|
219
|
+
})
|
|
220
|
+
.then((message) => console.log(message))
|
|
221
|
+
.catch((error) => {
|
|
222
|
+
// You can implement your fallback code here
|
|
223
|
+
console.log(error);
|
|
224
|
+
});
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
or with `async/await`:
|
|
228
|
+
|
|
229
|
+
```js
|
|
230
|
+
try {
|
|
231
|
+
const message = await client.messages.create({
|
|
232
|
+
body: 'Hello from Node',
|
|
233
|
+
to: '+12345678901',
|
|
234
|
+
from: '+12345678901',
|
|
235
|
+
});
|
|
236
|
+
console.log(message);
|
|
237
|
+
} catch (error) {
|
|
238
|
+
// You can implement your fallback code here
|
|
239
|
+
console.error(error);
|
|
240
|
+
}
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
If you are using callbacks, error information will be included in the `error` parameter of the callback.
|
|
244
|
+
|
|
245
|
+
400-level errors are [normal during API operation](https://www.twilio.com/docs/api/rest/request#get-responses) ("Invalid number", "Cannot deliver SMS to that number", for example) and should be handled appropriately.
|
|
246
|
+
|
|
247
|
+
### Use a custom HTTP Client
|
|
248
|
+
|
|
249
|
+
To use a custom HTTP client with this helper library, please see the [advanced example of how to do so](./advanced-examples/custom-http-client.md).
|
|
250
|
+
|
|
251
|
+
### Use webhook validation
|
|
252
|
+
|
|
253
|
+
See [example](examples/express.js) for a code sample for incoming Twilio request validation.
|
|
254
|
+
|
|
255
|
+
## Docker image
|
|
256
|
+
|
|
257
|
+
The `Dockerfile` present in this repository and its respective `twilio/twilio-node` Docker image are currently used by Twilio for testing purposes only.
|
|
14
258
|
|
|
15
259
|
## Getting help
|
|
16
260
|
|
|
17
|
-
If you need help installing or using the library, please
|
|
261
|
+
If you need help installing or using the library, please check the [Twilio Support Help Center](https://support.twilio.com) first, and [file a support ticket](https://twilio.com/help/contact) if you don't find an answer to your question.
|
|
18
262
|
|
|
19
263
|
If you've instead found a bug in the library or would like new features added, go ahead and open issues or pull requests against this repo!
|
|
20
264
|
|
|
21
265
|
## Contributing
|
|
22
266
|
|
|
23
|
-
Bug fixes, docs, and
|
|
267
|
+
Bug fixes, docs, and library improvements are always welcome. Please refer to our [Contributing Guide](CONTRIBUTING.md) for detailed information on how you can contribute.
|
|
24
268
|
|
|
25
|
-
|
|
26
|
-
Fork and clone the repository. Install dependencies with:
|
|
27
|
-
|
|
28
|
-
npm install
|
|
269
|
+
> ⚠️ Please be aware that a large share of the files are auto-generated by our backend tool. You are welcome to suggest changes and submit PRs illustrating the changes. However, we'll have to make the changes in the underlying tool. You can find more info about this in the [Contributing Guide](CONTRIBUTING.md).
|
|
29
270
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
To run just one specific test file instead of the whole suite, provide a JavaScript regular expression that will match your spec file's name, like:
|
|
271
|
+
If you're not familiar with the GitHub pull request/contribution process, [this is a nice tutorial](https://gun.io/blog/how-to-github-fork-branch-and-pull-request/).
|
|
33
272
|
|
|
34
|
-
|
|
273
|
+
### Get started
|
|
35
274
|
|
|
36
|
-
|
|
275
|
+
If you want to familiarize yourself with the project, you can start by [forking the repository](https://help.github.com/articles/fork-a-repo/) and [cloning it in your local development environment](https://help.github.com/articles/cloning-a-repository/). The project requires [Node.js](https://nodejs.org) to be installed on your machine.
|
|
37
276
|
|
|
38
|
-
|
|
39
|
-
* Edit `config.js` with your account information, a Twilio number, and your own mobile number
|
|
40
|
-
* Run the live tests
|
|
277
|
+
After cloning the repository, install the dependencies by running the following command in the directory of your cloned repository:
|
|
41
278
|
|
|
42
|
-
|
|
279
|
+
```bash
|
|
280
|
+
npm install
|
|
281
|
+
```
|
|
43
282
|
|
|
44
|
-
|
|
283
|
+
You can run the existing tests to see if everything is okay by executing:
|
|
45
284
|
|
|
46
|
-
|
|
285
|
+
```bash
|
|
286
|
+
npm test
|
|
287
|
+
```
|
|
47
288
|
|
|
48
|
-
|
|
289
|
+
To run just one specific test file instead of the whole suite, provide a JavaScript regular expression that will match your spec file's name, like:
|
|
49
290
|
|
|
291
|
+
```bash
|
|
292
|
+
npm run test:javascript -- -m .\*client.\*
|
|
293
|
+
```
|
|
50
294
|
|
|
295
|
+
[apidocs]: https://www.twilio.com/docs/api
|
|
296
|
+
[libdocs]: https://twilio.github.io/twilio-node
|
|
51
297
|
|
|
298
|
+
[test-workflow-image]: https://github.com/twilio/twilio-node/actions/workflows/test-and-deploy.yml/badge.svg
|
|
299
|
+
[test-workflow-url]: https://github.com/twilio/twilio-node/actions/workflows/test-and-deploy.yml
|
|
300
|
+
[npm-downloads-image]: https://img.shields.io/npm/dm/twilio.svg
|
|
301
|
+
[npm-downloads-url]: https://npmcharts.com/compare/twilio?minimal=true
|
|
302
|
+
[npm-install-size-image]: https://badgen.net/packagephobia/install/twilio
|
|
303
|
+
[npm-install-size-url]: https://packagephobia.com/result?p=twilio
|
|
304
|
+
[npm-url]: https://npmjs.org/package/twilio
|
|
305
|
+
[npm-version-image]: https://img.shields.io/npm/v/twilio.svg
|
package/index.d.ts
ADDED
package/index.js
CHANGED
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault =
|
|
3
|
+
(this && this.__importDefault) ||
|
|
4
|
+
function (mod) {
|
|
5
|
+
return mod && mod.__esModule ? mod : { default: mod };
|
|
6
|
+
};
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
const lib_1 = __importDefault(require("./lib"));
|
|
9
|
+
module.exports = lib_1.default;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import RequestClient from "./RequestClient";
|
|
3
|
+
import { HttpMethod } from "../interfaces";
|
|
4
|
+
import { Headers } from "../http/request";
|
|
5
|
+
declare namespace Twilio {
|
|
6
|
+
interface ClientOpts {
|
|
7
|
+
httpClient?: RequestClient;
|
|
8
|
+
accountSid?: string;
|
|
9
|
+
env?: NodeJS.ProcessEnv;
|
|
10
|
+
edge?: string;
|
|
11
|
+
region?: string;
|
|
12
|
+
lazyLoading?: boolean;
|
|
13
|
+
logLevel?: string;
|
|
14
|
+
userAgentExtensions?: string[];
|
|
15
|
+
autoRetry?: boolean;
|
|
16
|
+
maxRetries?: number;
|
|
17
|
+
}
|
|
18
|
+
interface RequestOpts {
|
|
19
|
+
method?: HttpMethod;
|
|
20
|
+
uri?: string;
|
|
21
|
+
username?: string;
|
|
22
|
+
password?: string;
|
|
23
|
+
headers?: Headers;
|
|
24
|
+
params?: object;
|
|
25
|
+
data?: object;
|
|
26
|
+
timeout?: number;
|
|
27
|
+
allowRedirects?: boolean;
|
|
28
|
+
logLevel?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Parent class for Twilio Client that implements request & validation logic
|
|
32
|
+
*/
|
|
33
|
+
class Client {
|
|
34
|
+
username: string;
|
|
35
|
+
password: string;
|
|
36
|
+
accountSid: string;
|
|
37
|
+
opts?: ClientOpts;
|
|
38
|
+
env?: NodeJS.ProcessEnv;
|
|
39
|
+
edge?: string;
|
|
40
|
+
region?: string;
|
|
41
|
+
logLevel?: string;
|
|
42
|
+
autoRetry: boolean;
|
|
43
|
+
maxRetries?: number;
|
|
44
|
+
userAgentExtensions?: string[];
|
|
45
|
+
_httpClient?: RequestClient;
|
|
46
|
+
/**
|
|
47
|
+
* Create a BaseTwilio instance
|
|
48
|
+
*
|
|
49
|
+
* @param username -
|
|
50
|
+
* The username used for authentication. This is normally account sid, but if using key/secret auth will be
|
|
51
|
+
* the api key sid.
|
|
52
|
+
* @param password -
|
|
53
|
+
* The password used for authentication. This is normally auth token, but if using key/secret auth will be
|
|
54
|
+
* the secret.
|
|
55
|
+
* @param opts - The options argument
|
|
56
|
+
*
|
|
57
|
+
* @returns A new instance of BaseTwilio
|
|
58
|
+
*/
|
|
59
|
+
constructor(username?: string, password?: string, opts?: ClientOpts);
|
|
60
|
+
get httpClient(): RequestClient;
|
|
61
|
+
/**
|
|
62
|
+
* Makes a request to the Twilio API using the configured http client.
|
|
63
|
+
* Authentication information is automatically added if none is provided.
|
|
64
|
+
*
|
|
65
|
+
* @param opts - The options argument
|
|
66
|
+
*/
|
|
67
|
+
request(opts: RequestOpts): Promise<any>;
|
|
68
|
+
/**
|
|
69
|
+
* Adds a region and/or edge to a given hostname
|
|
70
|
+
*
|
|
71
|
+
* @param hostname - A URI hostname (e.g. api.twilio.com)
|
|
72
|
+
* @param targetEdge - The targeted edge location (e.g. sydney)
|
|
73
|
+
* @param targetRegion - The targeted region location (e.g. au1)
|
|
74
|
+
*/
|
|
75
|
+
getHostname(hostname: string, targetEdge: string | undefined, targetRegion: string | undefined): string;
|
|
76
|
+
/**
|
|
77
|
+
* Test if your environment is impacted by a TLS or certificate
|
|
78
|
+
* change is by sending an HTTP request to the test endpoint
|
|
79
|
+
*
|
|
80
|
+
* @throws RestException if the request fails
|
|
81
|
+
*
|
|
82
|
+
*/
|
|
83
|
+
validateSslCert(): Promise<any>;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
export = Twilio;
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
const RequestClient_1 = __importDefault(require("./RequestClient")); /* jshint ignore:line */
|
|
6
|
+
const os = require("os"); /* jshint ignore:line */
|
|
7
|
+
const url = require("url"); /* jshint ignore:line */
|
|
8
|
+
const moduleInfo = require("../../package.json"); /* jshint ignore:line */
|
|
9
|
+
const util = require("util"); /* jshint ignore:line */
|
|
10
|
+
const RestException = require("../base/RestException"); /* jshint ignore:line */
|
|
11
|
+
var Twilio;
|
|
12
|
+
(function (Twilio) {
|
|
13
|
+
/* jshint ignore:start */
|
|
14
|
+
/**
|
|
15
|
+
* Parent class for Twilio Client that implements request & validation logic
|
|
16
|
+
*/
|
|
17
|
+
/* jshint ignore:end */
|
|
18
|
+
class Client {
|
|
19
|
+
/* jshint ignore:start */
|
|
20
|
+
/**
|
|
21
|
+
* Create a BaseTwilio instance
|
|
22
|
+
*
|
|
23
|
+
* @param username -
|
|
24
|
+
* The username used for authentication. This is normally account sid, but if using key/secret auth will be
|
|
25
|
+
* the api key sid.
|
|
26
|
+
* @param password -
|
|
27
|
+
* The password used for authentication. This is normally auth token, but if using key/secret auth will be
|
|
28
|
+
* the secret.
|
|
29
|
+
* @param opts - The options argument
|
|
30
|
+
*
|
|
31
|
+
* @returns A new instance of BaseTwilio
|
|
32
|
+
*/
|
|
33
|
+
/* jshint ignore:end */
|
|
34
|
+
constructor(username, password, opts) {
|
|
35
|
+
this.opts = opts || {};
|
|
36
|
+
this.env = this.opts.env || {};
|
|
37
|
+
this.username =
|
|
38
|
+
username ??
|
|
39
|
+
this.env.TWILIO_ACCOUNT_SID ??
|
|
40
|
+
process.env.TWILIO_ACCOUNT_SID ??
|
|
41
|
+
(() => {
|
|
42
|
+
throw new Error("username is required");
|
|
43
|
+
})();
|
|
44
|
+
this.password =
|
|
45
|
+
password ??
|
|
46
|
+
this.env.TWILIO_AUTH_TOKEN ??
|
|
47
|
+
process.env.TWILIO_AUTH_TOKEN ??
|
|
48
|
+
(() => {
|
|
49
|
+
throw new Error("password is required");
|
|
50
|
+
})();
|
|
51
|
+
this.accountSid = this.opts.accountSid || this.username;
|
|
52
|
+
this.edge =
|
|
53
|
+
this.opts.edge ?? this.env.TWILIO_EDGE ?? process.env.TWILIO_EDGE;
|
|
54
|
+
this.region =
|
|
55
|
+
this.opts.region ?? this.env.TWILIO_REGION ?? process.env.TWILIO_REGION;
|
|
56
|
+
this.logLevel =
|
|
57
|
+
this.opts.logLevel ??
|
|
58
|
+
this.env.TWILIO_LOG_LEVEL ??
|
|
59
|
+
process.env.TWILIO_LOG_LEVEL;
|
|
60
|
+
this.autoRetry = this.opts.autoRetry || false;
|
|
61
|
+
this.maxRetries = this.opts.maxRetries;
|
|
62
|
+
this.userAgentExtensions = this.opts.userAgentExtensions || [];
|
|
63
|
+
this._httpClient = this.opts.httpClient;
|
|
64
|
+
if (this.opts.lazyLoading === false) {
|
|
65
|
+
this._httpClient = this.httpClient;
|
|
66
|
+
}
|
|
67
|
+
if (!this.accountSid.startsWith("AC")) {
|
|
68
|
+
const apiKeyMsg = this.accountSid.startsWith("SK")
|
|
69
|
+
? ". The given SID indicates an API Key which requires the accountSid to be passed as an additional option"
|
|
70
|
+
: "";
|
|
71
|
+
throw new Error("accountSid must start with AC" + apiKeyMsg);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
get httpClient() {
|
|
75
|
+
if (!this._httpClient) {
|
|
76
|
+
this._httpClient = new RequestClient_1.default({
|
|
77
|
+
autoRetry: this.autoRetry,
|
|
78
|
+
maxRetries: this.maxRetries,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
return this._httpClient;
|
|
82
|
+
}
|
|
83
|
+
/* jshint ignore:start */
|
|
84
|
+
/**
|
|
85
|
+
* Makes a request to the Twilio API using the configured http client.
|
|
86
|
+
* Authentication information is automatically added if none is provided.
|
|
87
|
+
*
|
|
88
|
+
* @param opts - The options argument
|
|
89
|
+
*/
|
|
90
|
+
/* jshint ignore:end */
|
|
91
|
+
request(opts) {
|
|
92
|
+
opts = opts || {};
|
|
93
|
+
if (!opts.method) {
|
|
94
|
+
throw new Error("method is required");
|
|
95
|
+
}
|
|
96
|
+
if (!opts.uri) {
|
|
97
|
+
throw new Error("uri is required");
|
|
98
|
+
}
|
|
99
|
+
const username = opts.username || this.username;
|
|
100
|
+
const password = opts.password || this.password;
|
|
101
|
+
const headers = opts.headers || {};
|
|
102
|
+
const pkgVersion = moduleInfo.version;
|
|
103
|
+
const osName = os.platform();
|
|
104
|
+
const osArch = os.arch();
|
|
105
|
+
const nodeVersion = process.version;
|
|
106
|
+
headers["User-Agent"] = util.format("twilio-node/%s (%s %s) node/%s", pkgVersion, osName, osArch, nodeVersion);
|
|
107
|
+
this.userAgentExtensions?.forEach((extension) => {
|
|
108
|
+
headers["User-Agent"] += ` ${extension}`;
|
|
109
|
+
});
|
|
110
|
+
headers["Accept-Charset"] = "utf-8";
|
|
111
|
+
if (opts.method === "post" && !headers["Content-Type"]) {
|
|
112
|
+
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
113
|
+
}
|
|
114
|
+
if (!headers["Accept"]) {
|
|
115
|
+
headers["Accept"] = "application/json";
|
|
116
|
+
}
|
|
117
|
+
var uri = new url.URL(opts.uri);
|
|
118
|
+
uri.hostname = this.getHostname(uri.hostname, this.edge, this.region);
|
|
119
|
+
return this.httpClient?.request({
|
|
120
|
+
method: opts.method,
|
|
121
|
+
uri: uri.href,
|
|
122
|
+
username: username,
|
|
123
|
+
password: password,
|
|
124
|
+
headers: headers,
|
|
125
|
+
params: opts.params,
|
|
126
|
+
data: opts.data,
|
|
127
|
+
timeout: opts.timeout,
|
|
128
|
+
allowRedirects: opts.allowRedirects,
|
|
129
|
+
logLevel: opts.logLevel,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
/* jshint ignore:start */
|
|
133
|
+
/**
|
|
134
|
+
* Adds a region and/or edge to a given hostname
|
|
135
|
+
*
|
|
136
|
+
* @param hostname - A URI hostname (e.g. api.twilio.com)
|
|
137
|
+
* @param targetEdge - The targeted edge location (e.g. sydney)
|
|
138
|
+
* @param targetRegion - The targeted region location (e.g. au1)
|
|
139
|
+
*/
|
|
140
|
+
/* jshint ignore:end */
|
|
141
|
+
getHostname(hostname, targetEdge, targetRegion) {
|
|
142
|
+
const defaultRegion = "us1";
|
|
143
|
+
const domain = hostname.split(".").slice(-2).join(".");
|
|
144
|
+
const prefix = hostname.split("." + domain)[0];
|
|
145
|
+
let [product, edge, region] = prefix.split(".");
|
|
146
|
+
if (edge && !region) {
|
|
147
|
+
region = edge;
|
|
148
|
+
edge = undefined;
|
|
149
|
+
}
|
|
150
|
+
region = targetRegion || region || (targetEdge && defaultRegion);
|
|
151
|
+
if (!region) {
|
|
152
|
+
return hostname;
|
|
153
|
+
}
|
|
154
|
+
edge = targetEdge || edge;
|
|
155
|
+
return [product, edge, region, domain].filter((part) => part).join(".");
|
|
156
|
+
}
|
|
157
|
+
/* jshint ignore:start */
|
|
158
|
+
/**
|
|
159
|
+
* Test if your environment is impacted by a TLS or certificate
|
|
160
|
+
* change is by sending an HTTP request to the test endpoint
|
|
161
|
+
*
|
|
162
|
+
* @throws RestException if the request fails
|
|
163
|
+
*
|
|
164
|
+
*/
|
|
165
|
+
/* jshint ignore:end */
|
|
166
|
+
validateSslCert() {
|
|
167
|
+
return this.httpClient
|
|
168
|
+
?.request({
|
|
169
|
+
method: "get",
|
|
170
|
+
uri: "https://tls-test.twilio.com:443",
|
|
171
|
+
})
|
|
172
|
+
.then((response) => {
|
|
173
|
+
if (response["statusCode"] < 200 || response["statusCode"] >= 300) {
|
|
174
|
+
throw new RestException(response);
|
|
175
|
+
}
|
|
176
|
+
return response;
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
Twilio.Client = Client;
|
|
181
|
+
})(Twilio || (Twilio = {}));
|
|
182
|
+
module.exports = Twilio;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Client as BaseTwilio, RequestOpts } from "./BaseTwilio";
|
|
2
|
+
/**
|
|
3
|
+
* Base domain object
|
|
4
|
+
*/
|
|
5
|
+
export default class Domain {
|
|
6
|
+
twilio: BaseTwilio;
|
|
7
|
+
baseUrl: string;
|
|
8
|
+
/**
|
|
9
|
+
* Creates a Domain instance
|
|
10
|
+
*
|
|
11
|
+
* @param twilio - A Twilio Client
|
|
12
|
+
* @param baseUrl - Base url for this domain
|
|
13
|
+
*/
|
|
14
|
+
constructor(twilio: BaseTwilio, baseUrl: string);
|
|
15
|
+
/**
|
|
16
|
+
* Turn a uri into an absolute url
|
|
17
|
+
*
|
|
18
|
+
* @param uri - uri to transform
|
|
19
|
+
* @returns absolute url
|
|
20
|
+
*/
|
|
21
|
+
absoluteUrl(uri?: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Make request to this domain
|
|
24
|
+
*
|
|
25
|
+
* @param opts - request options
|
|
26
|
+
* @returns request promise
|
|
27
|
+
*/
|
|
28
|
+
request(opts: RequestOpts): Promise<any>;
|
|
29
|
+
}
|