voice-react-native-sdk 1.6.2-fork.4
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 +206 -0
- package/README.md +179 -0
- package/android/build.gradle +113 -0
- package/android/gradle.properties +29 -0
- package/android/src/main/AndroidManifest.xml +30 -0
- package/android/src/main/java/com/twiliovoicereactnative/AudioSwitchManager.java +141 -0
- package/android/src/main/java/com/twiliovoicereactnative/CallListenerProxy.java +186 -0
- package/android/src/main/java/com/twiliovoicereactnative/CallMessageListenerProxy.java +103 -0
- package/android/src/main/java/com/twiliovoicereactnative/CallRecordDatabase.java +183 -0
- package/android/src/main/java/com/twiliovoicereactnative/CommonConstants.java +195 -0
- package/android/src/main/java/com/twiliovoicereactnative/ConfigurationProperties.java +41 -0
- package/android/src/main/java/com/twiliovoicereactnative/Constants.java +23 -0
- package/android/src/main/java/com/twiliovoicereactnative/ExpoActivityLifecycleListener.java +27 -0
- package/android/src/main/java/com/twiliovoicereactnative/ExpoApplicationLifecycleListener.java +14 -0
- package/android/src/main/java/com/twiliovoicereactnative/ExpoModule.kt +36 -0
- package/android/src/main/java/com/twiliovoicereactnative/ExpoPackage.java +20 -0
- package/android/src/main/java/com/twiliovoicereactnative/JSEventEmitter.java +98 -0
- package/android/src/main/java/com/twiliovoicereactnative/MediaPlayerManager.java +58 -0
- package/android/src/main/java/com/twiliovoicereactnative/NotificationUtility.java +363 -0
- package/android/src/main/java/com/twiliovoicereactnative/ReactNativeArgumentsSerializer.java +276 -0
- package/android/src/main/java/com/twiliovoicereactnative/SDKLog.java +74 -0
- package/android/src/main/java/com/twiliovoicereactnative/StatsListenerProxy.java +178 -0
- package/android/src/main/java/com/twiliovoicereactnative/TwilioVoiceReactNativeModule.java +778 -0
- package/android/src/main/java/com/twiliovoicereactnative/TwilioVoiceReactNativePackage.java +28 -0
- package/android/src/main/java/com/twiliovoicereactnative/VoiceActivityProxy.java +101 -0
- package/android/src/main/java/com/twiliovoicereactnative/VoiceApplicationProxy.java +133 -0
- package/android/src/main/java/com/twiliovoicereactnative/VoiceFirebaseMessagingService.java +88 -0
- package/android/src/main/java/com/twiliovoicereactnative/VoiceService.java +403 -0
- package/android/src/main/res/drawable/answered_call_small_icon.png +0 -0
- package/android/src/main/res/drawable/ic_launcher_round.png +0 -0
- package/android/src/main/res/drawable/ic_launcher_sdk.png +0 -0
- package/android/src/main/res/drawable/incoming_call_small_icon.png +0 -0
- package/android/src/main/res/drawable/outgoing_call_small_icon.png +0 -0
- package/android/src/main/res/raw/disconnect.wav +0 -0
- package/android/src/main/res/raw/incoming.wav +0 -0
- package/android/src/main/res/raw/outgoing.wav +0 -0
- package/android/src/main/res/raw/ringtone.wav +0 -0
- package/android/src/main/res/raw/silent.wav +0 -0
- package/android/src/main/res/values/colors.xml +11 -0
- package/android/src/main/res/values/config.xml +5 -0
- package/android/src/main/res/values/dimens.xml +7 -0
- package/android/src/main/res/values/strings.xml +25 -0
- package/android/src/main/res/values/styles.xml +10 -0
- package/android/src/main/res/values-night/colors.xml +11 -0
- package/expo-config-plugin/android.js +191 -0
- package/expo-config-plugin/ios.js +22 -0
- package/expo-module.config.json +6 -0
- package/ios/TwilioVoicePushRegistry.h +19 -0
- package/ios/TwilioVoicePushRegistry.m +72 -0
- package/ios/TwilioVoiceReactNative+CallInvite.m +56 -0
- package/ios/TwilioVoiceReactNative+CallKit.m +533 -0
- package/ios/TwilioVoiceReactNative+CallMessage.m +81 -0
- package/ios/TwilioVoiceReactNative.h +74 -0
- package/ios/TwilioVoiceReactNative.m +1046 -0
- package/ios/TwilioVoiceReactNative.xcodeproj/project.pbxproj +328 -0
- package/ios/TwilioVoiceReactNativeConstants.h +200 -0
- package/ios/Utilities/TwilioVoiceStatsReport.h +175 -0
- package/lib/commonjs/AudioDevice.js +101 -0
- package/lib/commonjs/AudioDevice.js.map +1 -0
- package/lib/commonjs/Call.js +765 -0
- package/lib/commonjs/Call.js.map +1 -0
- package/lib/commonjs/CallInvite.js +452 -0
- package/lib/commonjs/CallInvite.js.map +1 -0
- package/lib/commonjs/CallMessage/CallMessage.js +54 -0
- package/lib/commonjs/CallMessage/CallMessage.js.map +1 -0
- package/lib/commonjs/CallMessage/IncomingCallMessage.js +120 -0
- package/lib/commonjs/CallMessage/IncomingCallMessage.js.map +1 -0
- package/lib/commonjs/CallMessage/OutgoingCallMessage.js +148 -0
- package/lib/commonjs/CallMessage/OutgoingCallMessage.js.map +1 -0
- package/lib/commonjs/ExpoModule.js +69 -0
- package/lib/commonjs/ExpoModule.js.map +1 -0
- package/lib/commonjs/Voice.js +611 -0
- package/lib/commonjs/Voice.js.map +1 -0
- package/lib/commonjs/common.js +26 -0
- package/lib/commonjs/common.js.map +1 -0
- package/lib/commonjs/constants.js +158 -0
- package/lib/commonjs/constants.js.map +1 -0
- package/lib/commonjs/error/InvalidArgumentError.js +32 -0
- package/lib/commonjs/error/InvalidArgumentError.js.map +1 -0
- package/lib/commonjs/error/InvalidStateError.js +33 -0
- package/lib/commonjs/error/InvalidStateError.js.map +1 -0
- package/lib/commonjs/error/TwilioError.js +38 -0
- package/lib/commonjs/error/TwilioError.js.map +1 -0
- package/lib/commonjs/error/UnsupportedPlatformError.js +33 -0
- package/lib/commonjs/error/UnsupportedPlatformError.js.map +1 -0
- package/lib/commonjs/error/generated.js +2343 -0
- package/lib/commonjs/error/generated.js.map +1 -0
- package/lib/commonjs/error/index.js +112 -0
- package/lib/commonjs/error/index.js.map +1 -0
- package/lib/commonjs/error/utility.js +37 -0
- package/lib/commonjs/error/utility.js.map +1 -0
- package/lib/commonjs/index.js +95 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/type/AudioDevice.js +6 -0
- package/lib/commonjs/type/AudioDevice.js.map +1 -0
- package/lib/commonjs/type/Call.js +6 -0
- package/lib/commonjs/type/Call.js.map +1 -0
- package/lib/commonjs/type/CallInvite.js +6 -0
- package/lib/commonjs/type/CallInvite.js.map +1 -0
- package/lib/commonjs/type/CallKit.js +30 -0
- package/lib/commonjs/type/CallKit.js.map +1 -0
- package/lib/commonjs/type/CallMessage.js +6 -0
- package/lib/commonjs/type/CallMessage.js.map +1 -0
- package/lib/commonjs/type/Error.js +6 -0
- package/lib/commonjs/type/Error.js.map +1 -0
- package/lib/commonjs/type/NativeModule.js +6 -0
- package/lib/commonjs/type/NativeModule.js.map +1 -0
- package/lib/commonjs/type/RTCStats.js +29 -0
- package/lib/commonjs/type/RTCStats.js.map +1 -0
- package/lib/commonjs/type/Voice.js +6 -0
- package/lib/commonjs/type/Voice.js.map +1 -0
- package/lib/commonjs/type/common.js +2 -0
- package/lib/commonjs/type/common.js.map +1 -0
- package/lib/module/AudioDevice.js +97 -0
- package/lib/module/AudioDevice.js.map +1 -0
- package/lib/module/Call.js +766 -0
- package/lib/module/Call.js.map +1 -0
- package/lib/module/CallInvite.js +450 -0
- package/lib/module/CallInvite.js.map +1 -0
- package/lib/module/CallMessage/CallMessage.js +51 -0
- package/lib/module/CallMessage/CallMessage.js.map +1 -0
- package/lib/module/CallMessage/IncomingCallMessage.js +116 -0
- package/lib/module/CallMessage/IncomingCallMessage.js.map +1 -0
- package/lib/module/CallMessage/OutgoingCallMessage.js +154 -0
- package/lib/module/CallMessage/OutgoingCallMessage.js.map +1 -0
- package/lib/module/ExpoModule.js +58 -0
- package/lib/module/ExpoModule.js.map +1 -0
- package/lib/module/Voice.js +598 -0
- package/lib/module/Voice.js.map +1 -0
- package/lib/module/common.js +11 -0
- package/lib/module/common.js.map +1 -0
- package/lib/module/constants.js +151 -0
- package/lib/module/constants.js.map +1 -0
- package/lib/module/error/InvalidArgumentError.js +23 -0
- package/lib/module/error/InvalidArgumentError.js.map +1 -0
- package/lib/module/error/InvalidStateError.js +24 -0
- package/lib/module/error/InvalidStateError.js.map +1 -0
- package/lib/module/error/TwilioError.js +29 -0
- package/lib/module/error/TwilioError.js.map +1 -0
- package/lib/module/error/UnsupportedPlatformError.js +24 -0
- package/lib/module/error/UnsupportedPlatformError.js.map +1 -0
- package/lib/module/error/generated.js +2315 -0
- package/lib/module/error/generated.js.map +1 -0
- package/lib/module/error/index.js +6 -0
- package/lib/module/error/index.js.map +1 -0
- package/lib/module/error/utility.js +27 -0
- package/lib/module/error/utility.js.map +1 -0
- package/lib/module/index.js +23 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/type/AudioDevice.js +2 -0
- package/lib/module/type/AudioDevice.js.map +1 -0
- package/lib/module/type/Call.js +2 -0
- package/lib/module/type/Call.js.map +1 -0
- package/lib/module/type/CallInvite.js +2 -0
- package/lib/module/type/CallInvite.js.map +1 -0
- package/lib/module/type/CallKit.js +22 -0
- package/lib/module/type/CallKit.js.map +1 -0
- package/lib/module/type/CallMessage.js +2 -0
- package/lib/module/type/CallMessage.js.map +1 -0
- package/lib/module/type/Error.js +2 -0
- package/lib/module/type/Error.js.map +1 -0
- package/lib/module/type/NativeModule.js +2 -0
- package/lib/module/type/NativeModule.js.map +1 -0
- package/lib/module/type/RTCStats.js +21 -0
- package/lib/module/type/RTCStats.js.map +1 -0
- package/lib/module/type/Voice.js +2 -0
- package/lib/module/type/Voice.js.map +1 -0
- package/lib/module/type/common.js +2 -0
- package/lib/module/type/common.js.map +1 -0
- package/lib/typescript/AudioDevice.d.ts +74 -0
- package/lib/typescript/Call.d.ts +874 -0
- package/lib/typescript/CallInvite.d.ts +484 -0
- package/lib/typescript/CallMessage/CallMessage.d.ts +53 -0
- package/lib/typescript/CallMessage/IncomingCallMessage.d.ts +75 -0
- package/lib/typescript/CallMessage/OutgoingCallMessage.d.ts +198 -0
- package/lib/typescript/ExpoModule.d.ts +13 -0
- package/lib/typescript/Voice.d.ts +620 -0
- package/lib/typescript/common.d.ts +11 -0
- package/lib/typescript/constants.d.ts +148 -0
- package/lib/typescript/error/InvalidArgumentError.d.ts +11 -0
- package/lib/typescript/error/InvalidStateError.d.ts +12 -0
- package/lib/typescript/error/TwilioError.d.ts +14 -0
- package/lib/typescript/error/UnsupportedPlatformError.d.ts +12 -0
- package/lib/typescript/error/generated.d.ts +1558 -0
- package/lib/typescript/error/index.d.ts +5 -0
- package/lib/typescript/error/utility.d.ts +12 -0
- package/lib/typescript/index.d.ts +18 -0
- package/lib/typescript/type/AudioDevice.d.ts +15 -0
- package/lib/typescript/type/Call.d.ts +59 -0
- package/lib/typescript/type/CallInvite.d.ts +40 -0
- package/lib/typescript/type/CallKit.d.ts +60 -0
- package/lib/typescript/type/CallMessage.d.ts +20 -0
- package/lib/typescript/type/Error.d.ts +9 -0
- package/lib/typescript/type/NativeModule.d.ts +59 -0
- package/lib/typescript/type/RTCStats.d.ts +91 -0
- package/lib/typescript/type/Voice.d.ts +16 -0
- package/lib/typescript/type/common.d.ts +15 -0
- package/package.json +167 -0
- package/src/AudioDevice.tsx +88 -0
- package/src/Call.tsx +1343 -0
- package/src/CallInvite.tsx +757 -0
- package/src/CallMessage/CallMessage.ts +83 -0
- package/src/CallMessage/IncomingCallMessage.ts +104 -0
- package/src/CallMessage/OutgoingCallMessage.ts +308 -0
- package/src/ExpoModule.ts +59 -0
- package/src/Voice.tsx +1010 -0
- package/src/common.ts +16 -0
- package/src/constants.ts +193 -0
- package/src/error/InvalidArgumentError.ts +19 -0
- package/src/error/InvalidStateError.ts +19 -0
- package/src/error/TwilioError.ts +22 -0
- package/src/error/UnsupportedPlatformError.ts +19 -0
- package/src/error/generated.ts +2277 -0
- package/src/error/index.ts +18 -0
- package/src/error/utility.ts +36 -0
- package/src/index.tsx +24 -0
- package/src/type/AudioDevice.ts +18 -0
- package/src/type/Call.ts +102 -0
- package/src/type/CallInvite.ts +59 -0
- package/src/type/CallKit.ts +61 -0
- package/src/type/CallMessage.ts +31 -0
- package/src/type/Error.ts +11 -0
- package/src/type/NativeModule.ts +93 -0
- package/src/type/RTCStats.ts +99 -0
- package/src/type/Voice.ts +31 -0
- package/src/type/common.ts +16 -0
- package/twilio-voice-react-native.podspec +22 -0
|
@@ -0,0 +1,2343 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.errorsByCode = exports.MediaErrors = exports.SignalingErrors = exports.UserMediaErrors = exports.RegistrationErrors = exports.MalformedRequestErrors = exports.GeneralErrors = exports.TwiMLErrors = exports.SIPServerErrors = exports.ServerErrors = exports.ClientErrors = exports.ForbiddenErrors = exports.AuthorizationErrors = void 0;
|
|
7
|
+
|
|
8
|
+
var _TwilioError = require("./TwilioError");
|
|
9
|
+
|
|
10
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @public
|
|
14
|
+
* Authorization errors.
|
|
15
|
+
*/
|
|
16
|
+
let AuthorizationErrors;
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
* Forbidden errors.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
exports.AuthorizationErrors = AuthorizationErrors;
|
|
23
|
+
|
|
24
|
+
(function (_AuthorizationErrors) {
|
|
25
|
+
class AccessTokenInvalid extends _TwilioError.TwilioError {
|
|
26
|
+
/**
|
|
27
|
+
* Not applicable.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Invalid access token
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Twilio was unable to validate your Access Token
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* AccessTokenInvalid
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Not applicable.
|
|
44
|
+
*/
|
|
45
|
+
constructor(message) {
|
|
46
|
+
super(message, 20101);
|
|
47
|
+
|
|
48
|
+
_defineProperty(this, "causes", []);
|
|
49
|
+
|
|
50
|
+
_defineProperty(this, "description", 'Invalid access token');
|
|
51
|
+
|
|
52
|
+
_defineProperty(this, "explanation", 'Twilio was unable to validate your Access Token');
|
|
53
|
+
|
|
54
|
+
_defineProperty(this, "name", 'AccessTokenInvalid');
|
|
55
|
+
|
|
56
|
+
_defineProperty(this, "solutions", []);
|
|
57
|
+
|
|
58
|
+
Object.setPrototypeOf(this, AuthorizationErrors.AccessTokenInvalid.prototype);
|
|
59
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
60
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
_AuthorizationErrors.AccessTokenInvalid = AccessTokenInvalid;
|
|
66
|
+
|
|
67
|
+
class AccessTokenHeaderInvalid extends _TwilioError.TwilioError {
|
|
68
|
+
/**
|
|
69
|
+
* Not applicable.
|
|
70
|
+
*/
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Invalid access token header
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The header of the Access Token provided to the Twilio API was invalid
|
|
78
|
+
*/
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* AccessTokenHeaderInvalid
|
|
82
|
+
*/
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Not applicable.
|
|
86
|
+
*/
|
|
87
|
+
constructor(message) {
|
|
88
|
+
super(message, 20102);
|
|
89
|
+
|
|
90
|
+
_defineProperty(this, "causes", []);
|
|
91
|
+
|
|
92
|
+
_defineProperty(this, "description", 'Invalid access token header');
|
|
93
|
+
|
|
94
|
+
_defineProperty(this, "explanation", 'The header of the Access Token provided to the Twilio API was invalid');
|
|
95
|
+
|
|
96
|
+
_defineProperty(this, "name", 'AccessTokenHeaderInvalid');
|
|
97
|
+
|
|
98
|
+
_defineProperty(this, "solutions", []);
|
|
99
|
+
|
|
100
|
+
Object.setPrototypeOf(this, AuthorizationErrors.AccessTokenHeaderInvalid.prototype);
|
|
101
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
102
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
_AuthorizationErrors.AccessTokenHeaderInvalid = AccessTokenHeaderInvalid;
|
|
108
|
+
|
|
109
|
+
class AccessTokenIssuerInvalid extends _TwilioError.TwilioError {
|
|
110
|
+
/**
|
|
111
|
+
* Not applicable.
|
|
112
|
+
*/
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Invalid access token issuer/subject
|
|
116
|
+
*/
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* The issuer or subject of the Access Token provided to the Twilio API was invalid
|
|
120
|
+
*/
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* AccessTokenIssuerInvalid
|
|
124
|
+
*/
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Not applicable.
|
|
128
|
+
*/
|
|
129
|
+
constructor(message) {
|
|
130
|
+
super(message, 20103);
|
|
131
|
+
|
|
132
|
+
_defineProperty(this, "causes", []);
|
|
133
|
+
|
|
134
|
+
_defineProperty(this, "description", 'Invalid access token issuer/subject');
|
|
135
|
+
|
|
136
|
+
_defineProperty(this, "explanation", 'The issuer or subject of the Access Token provided to the Twilio API was invalid');
|
|
137
|
+
|
|
138
|
+
_defineProperty(this, "name", 'AccessTokenIssuerInvalid');
|
|
139
|
+
|
|
140
|
+
_defineProperty(this, "solutions", []);
|
|
141
|
+
|
|
142
|
+
Object.setPrototypeOf(this, AuthorizationErrors.AccessTokenIssuerInvalid.prototype);
|
|
143
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
144
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
_AuthorizationErrors.AccessTokenIssuerInvalid = AccessTokenIssuerInvalid;
|
|
150
|
+
|
|
151
|
+
class AccessTokenExpired extends _TwilioError.TwilioError {
|
|
152
|
+
/**
|
|
153
|
+
* Not applicable.
|
|
154
|
+
*/
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Access token expired or expiration date invalid
|
|
158
|
+
*/
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* The Access Token provided to the Twilio API has expired, the expiration time specified in the token was invalid, or the expiration time specified was too far in the future
|
|
162
|
+
*/
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* AccessTokenExpired
|
|
166
|
+
*/
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Not applicable.
|
|
170
|
+
*/
|
|
171
|
+
constructor(message) {
|
|
172
|
+
super(message, 20104);
|
|
173
|
+
|
|
174
|
+
_defineProperty(this, "causes", []);
|
|
175
|
+
|
|
176
|
+
_defineProperty(this, "description", 'Access token expired or expiration date invalid');
|
|
177
|
+
|
|
178
|
+
_defineProperty(this, "explanation", 'The Access Token provided to the Twilio API has expired, the expiration time specified in the token was invalid, or the expiration time specified was too far in the future');
|
|
179
|
+
|
|
180
|
+
_defineProperty(this, "name", 'AccessTokenExpired');
|
|
181
|
+
|
|
182
|
+
_defineProperty(this, "solutions", []);
|
|
183
|
+
|
|
184
|
+
Object.setPrototypeOf(this, AuthorizationErrors.AccessTokenExpired.prototype);
|
|
185
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
186
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
_AuthorizationErrors.AccessTokenExpired = AccessTokenExpired;
|
|
192
|
+
|
|
193
|
+
class AccessTokenNotYetValid extends _TwilioError.TwilioError {
|
|
194
|
+
/**
|
|
195
|
+
* Not applicable.
|
|
196
|
+
*/
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Access token not yet valid
|
|
200
|
+
*/
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* The Access Token provided to the Twilio API is not yet valid
|
|
204
|
+
*/
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* AccessTokenNotYetValid
|
|
208
|
+
*/
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Not applicable.
|
|
212
|
+
*/
|
|
213
|
+
constructor(message) {
|
|
214
|
+
super(message, 20105);
|
|
215
|
+
|
|
216
|
+
_defineProperty(this, "causes", []);
|
|
217
|
+
|
|
218
|
+
_defineProperty(this, "description", 'Access token not yet valid');
|
|
219
|
+
|
|
220
|
+
_defineProperty(this, "explanation", 'The Access Token provided to the Twilio API is not yet valid');
|
|
221
|
+
|
|
222
|
+
_defineProperty(this, "name", 'AccessTokenNotYetValid');
|
|
223
|
+
|
|
224
|
+
_defineProperty(this, "solutions", []);
|
|
225
|
+
|
|
226
|
+
Object.setPrototypeOf(this, AuthorizationErrors.AccessTokenNotYetValid.prototype);
|
|
227
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
228
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
_AuthorizationErrors.AccessTokenNotYetValid = AccessTokenNotYetValid;
|
|
234
|
+
|
|
235
|
+
class AccessTokenGrantsInvalid extends _TwilioError.TwilioError {
|
|
236
|
+
/**
|
|
237
|
+
* Not applicable.
|
|
238
|
+
*/
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Invalid access token grants
|
|
242
|
+
*/
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* The Access Token signature and issuer were valid, but the grants specified in the token were invalid, unparseable, or did not authorize the action being requested
|
|
246
|
+
*/
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* AccessTokenGrantsInvalid
|
|
250
|
+
*/
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Not applicable.
|
|
254
|
+
*/
|
|
255
|
+
constructor(message) {
|
|
256
|
+
super(message, 20106);
|
|
257
|
+
|
|
258
|
+
_defineProperty(this, "causes", []);
|
|
259
|
+
|
|
260
|
+
_defineProperty(this, "description", 'Invalid access token grants');
|
|
261
|
+
|
|
262
|
+
_defineProperty(this, "explanation", 'The Access Token signature and issuer were valid, but the grants specified in the token were invalid, unparseable, or did not authorize the action being requested');
|
|
263
|
+
|
|
264
|
+
_defineProperty(this, "name", 'AccessTokenGrantsInvalid');
|
|
265
|
+
|
|
266
|
+
_defineProperty(this, "solutions", []);
|
|
267
|
+
|
|
268
|
+
Object.setPrototypeOf(this, AuthorizationErrors.AccessTokenGrantsInvalid.prototype);
|
|
269
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
270
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
_AuthorizationErrors.AccessTokenGrantsInvalid = AccessTokenGrantsInvalid;
|
|
276
|
+
|
|
277
|
+
class AccessTokenSignatureInvalid extends _TwilioError.TwilioError {
|
|
278
|
+
/**
|
|
279
|
+
* Not applicable.
|
|
280
|
+
*/
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Invalid access token signature
|
|
284
|
+
*/
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* The signature for the Access Token provided was invalid.
|
|
288
|
+
*/
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* AccessTokenSignatureInvalid
|
|
292
|
+
*/
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Not applicable.
|
|
296
|
+
*/
|
|
297
|
+
constructor(message) {
|
|
298
|
+
super(message, 20107);
|
|
299
|
+
|
|
300
|
+
_defineProperty(this, "causes", []);
|
|
301
|
+
|
|
302
|
+
_defineProperty(this, "description", 'Invalid access token signature');
|
|
303
|
+
|
|
304
|
+
_defineProperty(this, "explanation", 'The signature for the Access Token provided was invalid.');
|
|
305
|
+
|
|
306
|
+
_defineProperty(this, "name", 'AccessTokenSignatureInvalid');
|
|
307
|
+
|
|
308
|
+
_defineProperty(this, "solutions", []);
|
|
309
|
+
|
|
310
|
+
Object.setPrototypeOf(this, AuthorizationErrors.AccessTokenSignatureInvalid.prototype);
|
|
311
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
312
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
_AuthorizationErrors.AccessTokenSignatureInvalid = AccessTokenSignatureInvalid;
|
|
318
|
+
|
|
319
|
+
class AuthenticationFailed extends _TwilioError.TwilioError {
|
|
320
|
+
/**
|
|
321
|
+
* Not applicable.
|
|
322
|
+
*/
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Authentication Failed
|
|
326
|
+
*/
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* The Authentication with the provided JWT failed
|
|
330
|
+
*/
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* AuthenticationFailed
|
|
334
|
+
*/
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Not applicable.
|
|
338
|
+
*/
|
|
339
|
+
constructor(message) {
|
|
340
|
+
super(message, 20151);
|
|
341
|
+
|
|
342
|
+
_defineProperty(this, "causes", []);
|
|
343
|
+
|
|
344
|
+
_defineProperty(this, "description", 'Authentication Failed');
|
|
345
|
+
|
|
346
|
+
_defineProperty(this, "explanation", 'The Authentication with the provided JWT failed');
|
|
347
|
+
|
|
348
|
+
_defineProperty(this, "name", 'AuthenticationFailed');
|
|
349
|
+
|
|
350
|
+
_defineProperty(this, "solutions", []);
|
|
351
|
+
|
|
352
|
+
Object.setPrototypeOf(this, AuthorizationErrors.AuthenticationFailed.prototype);
|
|
353
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
354
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
_AuthorizationErrors.AuthenticationFailed = AuthenticationFailed;
|
|
360
|
+
|
|
361
|
+
class ExpirationTimeExceedsMaxTimeAllowed extends _TwilioError.TwilioError {
|
|
362
|
+
/**
|
|
363
|
+
* Not applicable.
|
|
364
|
+
*/
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Expiration Time Exceeds Maximum Time Allowed
|
|
368
|
+
*/
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* The expiration time provided when creating the JWT exceeds the maximum duration allowed
|
|
372
|
+
*/
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* ExpirationTimeExceedsMaxTimeAllowed
|
|
376
|
+
*/
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Not applicable.
|
|
380
|
+
*/
|
|
381
|
+
constructor(message) {
|
|
382
|
+
super(message, 20157);
|
|
383
|
+
|
|
384
|
+
_defineProperty(this, "causes", []);
|
|
385
|
+
|
|
386
|
+
_defineProperty(this, "description", 'Expiration Time Exceeds Maximum Time Allowed');
|
|
387
|
+
|
|
388
|
+
_defineProperty(this, "explanation", 'The expiration time provided when creating the JWT exceeds the maximum duration allowed');
|
|
389
|
+
|
|
390
|
+
_defineProperty(this, "name", 'ExpirationTimeExceedsMaxTimeAllowed');
|
|
391
|
+
|
|
392
|
+
_defineProperty(this, "solutions", []);
|
|
393
|
+
|
|
394
|
+
Object.setPrototypeOf(this, AuthorizationErrors.ExpirationTimeExceedsMaxTimeAllowed.prototype);
|
|
395
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
396
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
_AuthorizationErrors.ExpirationTimeExceedsMaxTimeAllowed = ExpirationTimeExceedsMaxTimeAllowed;
|
|
402
|
+
|
|
403
|
+
class AuthorizationError extends _TwilioError.TwilioError {
|
|
404
|
+
/**
|
|
405
|
+
* Not applicable.
|
|
406
|
+
*/
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Authorization error
|
|
410
|
+
*/
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* The request requires user authentication. The server understood the request, but is refusing to fulfill it.
|
|
414
|
+
*/
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* AuthorizationError
|
|
418
|
+
*/
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Not applicable.
|
|
422
|
+
*/
|
|
423
|
+
constructor(message) {
|
|
424
|
+
super(message, 31201);
|
|
425
|
+
|
|
426
|
+
_defineProperty(this, "causes", []);
|
|
427
|
+
|
|
428
|
+
_defineProperty(this, "description", 'Authorization error');
|
|
429
|
+
|
|
430
|
+
_defineProperty(this, "explanation", 'The request requires user authentication. The server understood the request, but is refusing to fulfill it.');
|
|
431
|
+
|
|
432
|
+
_defineProperty(this, "name", 'AuthorizationError');
|
|
433
|
+
|
|
434
|
+
_defineProperty(this, "solutions", []);
|
|
435
|
+
|
|
436
|
+
Object.setPrototypeOf(this, AuthorizationErrors.AuthorizationError.prototype);
|
|
437
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
438
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
_AuthorizationErrors.AuthorizationError = AuthorizationError;
|
|
444
|
+
|
|
445
|
+
class RateExceededError extends _TwilioError.TwilioError {
|
|
446
|
+
/**
|
|
447
|
+
* Rate limit exceeded.
|
|
448
|
+
*/
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Rate exceeded authorized limit.
|
|
452
|
+
*/
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* The request performed exceeds the authorized limit.
|
|
456
|
+
*/
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* RateExceededError
|
|
460
|
+
*/
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Ensure message send rate does not exceed authorized limits.
|
|
464
|
+
*/
|
|
465
|
+
constructor(message) {
|
|
466
|
+
super(message, 31206);
|
|
467
|
+
|
|
468
|
+
_defineProperty(this, "causes", ['Rate limit exceeded.']);
|
|
469
|
+
|
|
470
|
+
_defineProperty(this, "description", 'Rate exceeded authorized limit.');
|
|
471
|
+
|
|
472
|
+
_defineProperty(this, "explanation", 'The request performed exceeds the authorized limit.');
|
|
473
|
+
|
|
474
|
+
_defineProperty(this, "name", 'RateExceededError');
|
|
475
|
+
|
|
476
|
+
_defineProperty(this, "solutions", ['Ensure message send rate does not exceed authorized limits.']);
|
|
477
|
+
|
|
478
|
+
Object.setPrototypeOf(this, AuthorizationErrors.RateExceededError.prototype);
|
|
479
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
480
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
_AuthorizationErrors.RateExceededError = RateExceededError;
|
|
486
|
+
|
|
487
|
+
class CallMessageEventTypeInvalidError extends _TwilioError.TwilioError {
|
|
488
|
+
/**
|
|
489
|
+
* The Call Message Event Type is invalid and is not understood by Twilio Voice.
|
|
490
|
+
*/
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Call Message Event Type is invalid.
|
|
494
|
+
*/
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* The Call Message Event Type is invalid and is not understood by Twilio Voice.
|
|
498
|
+
*/
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* CallMessageEventTypeInvalidError
|
|
502
|
+
*/
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Ensure the Call Message Event Type is Valid and understood by Twilio Voice and try again.
|
|
506
|
+
*/
|
|
507
|
+
constructor(message) {
|
|
508
|
+
super(message, 31210);
|
|
509
|
+
|
|
510
|
+
_defineProperty(this, "causes", ['The Call Message Event Type is invalid and is not understood by Twilio Voice.']);
|
|
511
|
+
|
|
512
|
+
_defineProperty(this, "description", 'Call Message Event Type is invalid.');
|
|
513
|
+
|
|
514
|
+
_defineProperty(this, "explanation", 'The Call Message Event Type is invalid and is not understood by Twilio Voice.');
|
|
515
|
+
|
|
516
|
+
_defineProperty(this, "name", 'CallMessageEventTypeInvalidError');
|
|
517
|
+
|
|
518
|
+
_defineProperty(this, "solutions", ['Ensure the Call Message Event Type is Valid and understood by Twilio Voice and try again.']);
|
|
519
|
+
|
|
520
|
+
Object.setPrototypeOf(this, AuthorizationErrors.CallMessageEventTypeInvalidError.prototype);
|
|
521
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
522
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
_AuthorizationErrors.CallMessageEventTypeInvalidError = CallMessageEventTypeInvalidError;
|
|
528
|
+
|
|
529
|
+
class CallMessageUnexpectedStateError extends _TwilioError.TwilioError {
|
|
530
|
+
/**
|
|
531
|
+
* The Call should be at least in the ringing state to subscribe and send Call Message.
|
|
532
|
+
*/
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Call is not in the expected state.
|
|
536
|
+
*/
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* The Call should be at least in the ringing state to send Call Message.
|
|
540
|
+
*/
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* CallMessageUnexpectedStateError
|
|
544
|
+
*/
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* Ensure the Call is at least in the ringing state and the subscription is successful and try again.
|
|
548
|
+
*/
|
|
549
|
+
constructor(message) {
|
|
550
|
+
super(message, 31211);
|
|
551
|
+
|
|
552
|
+
_defineProperty(this, "causes", ['The Call should be at least in the ringing state to subscribe and send Call Message.']);
|
|
553
|
+
|
|
554
|
+
_defineProperty(this, "description", 'Call is not in the expected state.');
|
|
555
|
+
|
|
556
|
+
_defineProperty(this, "explanation", 'The Call should be at least in the ringing state to send Call Message.');
|
|
557
|
+
|
|
558
|
+
_defineProperty(this, "name", 'CallMessageUnexpectedStateError');
|
|
559
|
+
|
|
560
|
+
_defineProperty(this, "solutions", ['Ensure the Call is at least in the ringing state and the subscription is successful and try again.']);
|
|
561
|
+
|
|
562
|
+
Object.setPrototypeOf(this, AuthorizationErrors.CallMessageUnexpectedStateError.prototype);
|
|
563
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
564
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
_AuthorizationErrors.CallMessageUnexpectedStateError = CallMessageUnexpectedStateError;
|
|
570
|
+
|
|
571
|
+
class PayloadSizeExceededError extends _TwilioError.TwilioError {
|
|
572
|
+
/**
|
|
573
|
+
* The payload size of Call Message Event exceeds the authorized limit.
|
|
574
|
+
*/
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* Call Message Event Payload size exceeded authorized limit.
|
|
578
|
+
*/
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
* The request performed to send a Call Message Event exceeds the payload size authorized limit
|
|
582
|
+
*/
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* PayloadSizeExceededError
|
|
586
|
+
*/
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* Reduce payload size of Call Message Event to be within the authorized limit and try again.
|
|
590
|
+
*/
|
|
591
|
+
constructor(message) {
|
|
592
|
+
super(message, 31212);
|
|
593
|
+
|
|
594
|
+
_defineProperty(this, "causes", ['The payload size of Call Message Event exceeds the authorized limit.']);
|
|
595
|
+
|
|
596
|
+
_defineProperty(this, "description", 'Call Message Event Payload size exceeded authorized limit.');
|
|
597
|
+
|
|
598
|
+
_defineProperty(this, "explanation", 'The request performed to send a Call Message Event exceeds the payload size authorized limit');
|
|
599
|
+
|
|
600
|
+
_defineProperty(this, "name", 'PayloadSizeExceededError');
|
|
601
|
+
|
|
602
|
+
_defineProperty(this, "solutions", ['Reduce payload size of Call Message Event to be within the authorized limit and try again.']);
|
|
603
|
+
|
|
604
|
+
Object.setPrototypeOf(this, AuthorizationErrors.PayloadSizeExceededError.prototype);
|
|
605
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
606
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
_AuthorizationErrors.PayloadSizeExceededError = PayloadSizeExceededError;
|
|
612
|
+
|
|
613
|
+
class AccessTokenRejected extends _TwilioError.TwilioError {
|
|
614
|
+
/**
|
|
615
|
+
* Not applicable.
|
|
616
|
+
*/
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* Token authentication is rejected by authentication service
|
|
620
|
+
*/
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* The authentication service has rejected the provided Access Token. To check whether the Access Token is structurally correct, you can use the tools available at https://jwt.io. For the details of Twilio's specific Access Token implementation including the grant format, check https://www.twilio.com/docs/iam/access-tokens.
|
|
624
|
+
*/
|
|
625
|
+
|
|
626
|
+
/**
|
|
627
|
+
* AccessTokenRejected
|
|
628
|
+
*/
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* Not applicable.
|
|
632
|
+
*/
|
|
633
|
+
constructor(message) {
|
|
634
|
+
super(message, 51007);
|
|
635
|
+
|
|
636
|
+
_defineProperty(this, "causes", []);
|
|
637
|
+
|
|
638
|
+
_defineProperty(this, "description", 'Token authentication is rejected by authentication service');
|
|
639
|
+
|
|
640
|
+
_defineProperty(this, "explanation", 'The authentication service has rejected the provided Access Token. To check whether the Access Token is structurally correct, you can use the tools available at https://jwt.io. For the details of Twilio\'s specific Access Token implementation including the grant format, check https://www.twilio.com/docs/iam/access-tokens.');
|
|
641
|
+
|
|
642
|
+
_defineProperty(this, "name", 'AccessTokenRejected');
|
|
643
|
+
|
|
644
|
+
_defineProperty(this, "solutions", []);
|
|
645
|
+
|
|
646
|
+
Object.setPrototypeOf(this, AuthorizationErrors.AccessTokenRejected.prototype);
|
|
647
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
648
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
_AuthorizationErrors.AccessTokenRejected = AccessTokenRejected;
|
|
654
|
+
})(AuthorizationErrors || (exports.AuthorizationErrors = AuthorizationErrors = {}));
|
|
655
|
+
|
|
656
|
+
let ForbiddenErrors;
|
|
657
|
+
/**
|
|
658
|
+
* @public
|
|
659
|
+
* Client errors.
|
|
660
|
+
*/
|
|
661
|
+
|
|
662
|
+
exports.ForbiddenErrors = ForbiddenErrors;
|
|
663
|
+
|
|
664
|
+
(function (_ForbiddenErrors) {
|
|
665
|
+
class Forbidden extends _TwilioError.TwilioError {
|
|
666
|
+
/**
|
|
667
|
+
* Not applicable.
|
|
668
|
+
*/
|
|
669
|
+
|
|
670
|
+
/**
|
|
671
|
+
* 403 Forbidden
|
|
672
|
+
*/
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* The account lacks permission to access the Twilio API. Typically this means the account has been suspended or closed. For assistance, please contact support
|
|
676
|
+
*/
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* Forbidden
|
|
680
|
+
*/
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* Not applicable.
|
|
684
|
+
*/
|
|
685
|
+
constructor(message) {
|
|
686
|
+
super(message, 20403);
|
|
687
|
+
|
|
688
|
+
_defineProperty(this, "causes", []);
|
|
689
|
+
|
|
690
|
+
_defineProperty(this, "description", '403 Forbidden');
|
|
691
|
+
|
|
692
|
+
_defineProperty(this, "explanation", 'The account lacks permission to access the Twilio API. Typically this means the account has been suspended or closed. For assistance, please contact support');
|
|
693
|
+
|
|
694
|
+
_defineProperty(this, "name", 'Forbidden');
|
|
695
|
+
|
|
696
|
+
_defineProperty(this, "solutions", []);
|
|
697
|
+
|
|
698
|
+
Object.setPrototypeOf(this, ForbiddenErrors.Forbidden.prototype);
|
|
699
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
700
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
_ForbiddenErrors.Forbidden = Forbidden;
|
|
706
|
+
})(ForbiddenErrors || (exports.ForbiddenErrors = ForbiddenErrors = {}));
|
|
707
|
+
|
|
708
|
+
let ClientErrors;
|
|
709
|
+
/**
|
|
710
|
+
* @public
|
|
711
|
+
* Server errors.
|
|
712
|
+
*/
|
|
713
|
+
|
|
714
|
+
exports.ClientErrors = ClientErrors;
|
|
715
|
+
|
|
716
|
+
(function (_ClientErrors) {
|
|
717
|
+
class BadRequest extends _TwilioError.TwilioError {
|
|
718
|
+
/**
|
|
719
|
+
* Not applicable.
|
|
720
|
+
*/
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* Bad Request (HTTP/SIP)
|
|
724
|
+
*/
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* The request could not be understood due to malformed syntax.
|
|
728
|
+
*/
|
|
729
|
+
|
|
730
|
+
/**
|
|
731
|
+
* BadRequest
|
|
732
|
+
*/
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
* Not applicable.
|
|
736
|
+
*/
|
|
737
|
+
constructor(message) {
|
|
738
|
+
super(message, 31400);
|
|
739
|
+
|
|
740
|
+
_defineProperty(this, "causes", []);
|
|
741
|
+
|
|
742
|
+
_defineProperty(this, "description", 'Bad Request (HTTP/SIP)');
|
|
743
|
+
|
|
744
|
+
_defineProperty(this, "explanation", 'The request could not be understood due to malformed syntax.');
|
|
745
|
+
|
|
746
|
+
_defineProperty(this, "name", 'BadRequest');
|
|
747
|
+
|
|
748
|
+
_defineProperty(this, "solutions", []);
|
|
749
|
+
|
|
750
|
+
Object.setPrototypeOf(this, ClientErrors.BadRequest.prototype);
|
|
751
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
752
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
_ClientErrors.BadRequest = BadRequest;
|
|
758
|
+
|
|
759
|
+
class Forbidden extends _TwilioError.TwilioError {
|
|
760
|
+
/**
|
|
761
|
+
* Not applicable.
|
|
762
|
+
*/
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* Forbidden (HTTP/SIP)
|
|
766
|
+
*/
|
|
767
|
+
|
|
768
|
+
/**
|
|
769
|
+
* The server understood the request, but is refusing to fulfill it.
|
|
770
|
+
*/
|
|
771
|
+
|
|
772
|
+
/**
|
|
773
|
+
* Forbidden
|
|
774
|
+
*/
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* Not applicable.
|
|
778
|
+
*/
|
|
779
|
+
constructor(message) {
|
|
780
|
+
super(message, 31403);
|
|
781
|
+
|
|
782
|
+
_defineProperty(this, "causes", []);
|
|
783
|
+
|
|
784
|
+
_defineProperty(this, "description", 'Forbidden (HTTP/SIP)');
|
|
785
|
+
|
|
786
|
+
_defineProperty(this, "explanation", 'The server understood the request, but is refusing to fulfill it.');
|
|
787
|
+
|
|
788
|
+
_defineProperty(this, "name", 'Forbidden');
|
|
789
|
+
|
|
790
|
+
_defineProperty(this, "solutions", []);
|
|
791
|
+
|
|
792
|
+
Object.setPrototypeOf(this, ClientErrors.Forbidden.prototype);
|
|
793
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
794
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
_ClientErrors.Forbidden = Forbidden;
|
|
800
|
+
|
|
801
|
+
class NotFound extends _TwilioError.TwilioError {
|
|
802
|
+
/**
|
|
803
|
+
* The outbound call was made to an invalid phone number.
|
|
804
|
+
* The TwiML application sid is missing a Voice URL.
|
|
805
|
+
*/
|
|
806
|
+
|
|
807
|
+
/**
|
|
808
|
+
* Not Found (HTTP/SIP)
|
|
809
|
+
*/
|
|
810
|
+
|
|
811
|
+
/**
|
|
812
|
+
* The server has not found anything matching the request.
|
|
813
|
+
*/
|
|
814
|
+
|
|
815
|
+
/**
|
|
816
|
+
* NotFound
|
|
817
|
+
*/
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* Ensure the phone number dialed is valid.
|
|
821
|
+
* Ensure the TwiML application is configured correctly with a Voice URL link.
|
|
822
|
+
*/
|
|
823
|
+
constructor(message) {
|
|
824
|
+
super(message, 31404);
|
|
825
|
+
|
|
826
|
+
_defineProperty(this, "causes", ['The outbound call was made to an invalid phone number.', 'The TwiML application sid is missing a Voice URL.']);
|
|
827
|
+
|
|
828
|
+
_defineProperty(this, "description", 'Not Found (HTTP/SIP)');
|
|
829
|
+
|
|
830
|
+
_defineProperty(this, "explanation", 'The server has not found anything matching the request.');
|
|
831
|
+
|
|
832
|
+
_defineProperty(this, "name", 'NotFound');
|
|
833
|
+
|
|
834
|
+
_defineProperty(this, "solutions", ['Ensure the phone number dialed is valid.', 'Ensure the TwiML application is configured correctly with a Voice URL link.']);
|
|
835
|
+
|
|
836
|
+
Object.setPrototypeOf(this, ClientErrors.NotFound.prototype);
|
|
837
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
838
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
_ClientErrors.NotFound = NotFound;
|
|
844
|
+
|
|
845
|
+
class RequestTimeout extends _TwilioError.TwilioError {
|
|
846
|
+
/**
|
|
847
|
+
* Not applicable.
|
|
848
|
+
*/
|
|
849
|
+
|
|
850
|
+
/**
|
|
851
|
+
* Request Timeout (HTTP/SIP)
|
|
852
|
+
*/
|
|
853
|
+
|
|
854
|
+
/**
|
|
855
|
+
* A request timeout occurred.
|
|
856
|
+
*/
|
|
857
|
+
|
|
858
|
+
/**
|
|
859
|
+
* RequestTimeout
|
|
860
|
+
*/
|
|
861
|
+
|
|
862
|
+
/**
|
|
863
|
+
* Not applicable.
|
|
864
|
+
*/
|
|
865
|
+
constructor(message) {
|
|
866
|
+
super(message, 31408);
|
|
867
|
+
|
|
868
|
+
_defineProperty(this, "causes", []);
|
|
869
|
+
|
|
870
|
+
_defineProperty(this, "description", 'Request Timeout (HTTP/SIP)');
|
|
871
|
+
|
|
872
|
+
_defineProperty(this, "explanation", 'A request timeout occurred.');
|
|
873
|
+
|
|
874
|
+
_defineProperty(this, "name", 'RequestTimeout');
|
|
875
|
+
|
|
876
|
+
_defineProperty(this, "solutions", []);
|
|
877
|
+
|
|
878
|
+
Object.setPrototypeOf(this, ClientErrors.RequestTimeout.prototype);
|
|
879
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
880
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
_ClientErrors.RequestTimeout = RequestTimeout;
|
|
886
|
+
|
|
887
|
+
class Conflict extends _TwilioError.TwilioError {
|
|
888
|
+
/**
|
|
889
|
+
* Not applicable.
|
|
890
|
+
*/
|
|
891
|
+
|
|
892
|
+
/**
|
|
893
|
+
* Conflict (HTTP)
|
|
894
|
+
*/
|
|
895
|
+
|
|
896
|
+
/**
|
|
897
|
+
* The request could not be processed because of a conflict in the current state of the resource. Another request may be in progress.
|
|
898
|
+
*/
|
|
899
|
+
|
|
900
|
+
/**
|
|
901
|
+
* Conflict
|
|
902
|
+
*/
|
|
903
|
+
|
|
904
|
+
/**
|
|
905
|
+
* Not applicable.
|
|
906
|
+
*/
|
|
907
|
+
constructor(message) {
|
|
908
|
+
super(message, 31409);
|
|
909
|
+
|
|
910
|
+
_defineProperty(this, "causes", []);
|
|
911
|
+
|
|
912
|
+
_defineProperty(this, "description", 'Conflict (HTTP)');
|
|
913
|
+
|
|
914
|
+
_defineProperty(this, "explanation", 'The request could not be processed because of a conflict in the current state of the resource. Another request may be in progress.');
|
|
915
|
+
|
|
916
|
+
_defineProperty(this, "name", 'Conflict');
|
|
917
|
+
|
|
918
|
+
_defineProperty(this, "solutions", []);
|
|
919
|
+
|
|
920
|
+
Object.setPrototypeOf(this, ClientErrors.Conflict.prototype);
|
|
921
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
922
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
_ClientErrors.Conflict = Conflict;
|
|
928
|
+
|
|
929
|
+
class UpgradeRequired extends _TwilioError.TwilioError {
|
|
930
|
+
/**
|
|
931
|
+
* Not applicable.
|
|
932
|
+
*/
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* Upgrade Required (HTTP)
|
|
936
|
+
*/
|
|
937
|
+
|
|
938
|
+
/**
|
|
939
|
+
* This error is raised when an HTTP 426 response is received. The reason for this is most likely because of an incompatible TLS version. To mitigate this, you may need to upgrade the OS or download a more recent version of the SDK.
|
|
940
|
+
*/
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* UpgradeRequired
|
|
944
|
+
*/
|
|
945
|
+
|
|
946
|
+
/**
|
|
947
|
+
* Not applicable.
|
|
948
|
+
*/
|
|
949
|
+
constructor(message) {
|
|
950
|
+
super(message, 31426);
|
|
951
|
+
|
|
952
|
+
_defineProperty(this, "causes", []);
|
|
953
|
+
|
|
954
|
+
_defineProperty(this, "description", 'Upgrade Required (HTTP)');
|
|
955
|
+
|
|
956
|
+
_defineProperty(this, "explanation", 'This error is raised when an HTTP 426 response is received. The reason for this is most likely because of an incompatible TLS version. To mitigate this, you may need to upgrade the OS or download a more recent version of the SDK.');
|
|
957
|
+
|
|
958
|
+
_defineProperty(this, "name", 'UpgradeRequired');
|
|
959
|
+
|
|
960
|
+
_defineProperty(this, "solutions", []);
|
|
961
|
+
|
|
962
|
+
Object.setPrototypeOf(this, ClientErrors.UpgradeRequired.prototype);
|
|
963
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
964
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
_ClientErrors.UpgradeRequired = UpgradeRequired;
|
|
970
|
+
|
|
971
|
+
class TooManyRequests extends _TwilioError.TwilioError {
|
|
972
|
+
/**
|
|
973
|
+
* Not applicable.
|
|
974
|
+
*/
|
|
975
|
+
|
|
976
|
+
/**
|
|
977
|
+
* Too Many Requests (HTTP)
|
|
978
|
+
*/
|
|
979
|
+
|
|
980
|
+
/**
|
|
981
|
+
* Too many requests were sent in a given amount of time.
|
|
982
|
+
*/
|
|
983
|
+
|
|
984
|
+
/**
|
|
985
|
+
* TooManyRequests
|
|
986
|
+
*/
|
|
987
|
+
|
|
988
|
+
/**
|
|
989
|
+
* Not applicable.
|
|
990
|
+
*/
|
|
991
|
+
constructor(message) {
|
|
992
|
+
super(message, 31429);
|
|
993
|
+
|
|
994
|
+
_defineProperty(this, "causes", []);
|
|
995
|
+
|
|
996
|
+
_defineProperty(this, "description", 'Too Many Requests (HTTP)');
|
|
997
|
+
|
|
998
|
+
_defineProperty(this, "explanation", 'Too many requests were sent in a given amount of time.');
|
|
999
|
+
|
|
1000
|
+
_defineProperty(this, "name", 'TooManyRequests');
|
|
1001
|
+
|
|
1002
|
+
_defineProperty(this, "solutions", []);
|
|
1003
|
+
|
|
1004
|
+
Object.setPrototypeOf(this, ClientErrors.TooManyRequests.prototype);
|
|
1005
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
1006
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
_ClientErrors.TooManyRequests = TooManyRequests;
|
|
1012
|
+
|
|
1013
|
+
class TemporarilyUnavailable extends _TwilioError.TwilioError {
|
|
1014
|
+
/**
|
|
1015
|
+
* Not applicable.
|
|
1016
|
+
*/
|
|
1017
|
+
|
|
1018
|
+
/**
|
|
1019
|
+
* Temporarily Unavailable (SIP)
|
|
1020
|
+
*/
|
|
1021
|
+
|
|
1022
|
+
/**
|
|
1023
|
+
* The callee is currently unavailable.
|
|
1024
|
+
*/
|
|
1025
|
+
|
|
1026
|
+
/**
|
|
1027
|
+
* TemporarilyUnavailable
|
|
1028
|
+
*/
|
|
1029
|
+
|
|
1030
|
+
/**
|
|
1031
|
+
* Not applicable.
|
|
1032
|
+
*/
|
|
1033
|
+
constructor(message) {
|
|
1034
|
+
super(message, 31480);
|
|
1035
|
+
|
|
1036
|
+
_defineProperty(this, "causes", []);
|
|
1037
|
+
|
|
1038
|
+
_defineProperty(this, "description", 'Temporarily Unavailable (SIP)');
|
|
1039
|
+
|
|
1040
|
+
_defineProperty(this, "explanation", 'The callee is currently unavailable.');
|
|
1041
|
+
|
|
1042
|
+
_defineProperty(this, "name", 'TemporarilyUnavailable');
|
|
1043
|
+
|
|
1044
|
+
_defineProperty(this, "solutions", []);
|
|
1045
|
+
|
|
1046
|
+
Object.setPrototypeOf(this, ClientErrors.TemporarilyUnavailable.prototype);
|
|
1047
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
1048
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
_ClientErrors.TemporarilyUnavailable = TemporarilyUnavailable;
|
|
1054
|
+
|
|
1055
|
+
class CallTransactionDoesNotExist extends _TwilioError.TwilioError {
|
|
1056
|
+
/**
|
|
1057
|
+
* Not applicable.
|
|
1058
|
+
*/
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* Call/Transaction Does Not Exist (SIP)
|
|
1062
|
+
*/
|
|
1063
|
+
|
|
1064
|
+
/**
|
|
1065
|
+
* The call no longer exists.
|
|
1066
|
+
*/
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
* CallTransactionDoesNotExist
|
|
1070
|
+
*/
|
|
1071
|
+
|
|
1072
|
+
/**
|
|
1073
|
+
* Not applicable.
|
|
1074
|
+
*/
|
|
1075
|
+
constructor(message) {
|
|
1076
|
+
super(message, 31481);
|
|
1077
|
+
|
|
1078
|
+
_defineProperty(this, "causes", []);
|
|
1079
|
+
|
|
1080
|
+
_defineProperty(this, "description", 'Call/Transaction Does Not Exist (SIP)');
|
|
1081
|
+
|
|
1082
|
+
_defineProperty(this, "explanation", 'The call no longer exists.');
|
|
1083
|
+
|
|
1084
|
+
_defineProperty(this, "name", 'CallTransactionDoesNotExist');
|
|
1085
|
+
|
|
1086
|
+
_defineProperty(this, "solutions", []);
|
|
1087
|
+
|
|
1088
|
+
Object.setPrototypeOf(this, ClientErrors.CallTransactionDoesNotExist.prototype);
|
|
1089
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
1090
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
_ClientErrors.CallTransactionDoesNotExist = CallTransactionDoesNotExist;
|
|
1096
|
+
|
|
1097
|
+
class AddressIncomplete extends _TwilioError.TwilioError {
|
|
1098
|
+
/**
|
|
1099
|
+
* The outbound call was made with a phone number that has an invalid format.
|
|
1100
|
+
*/
|
|
1101
|
+
|
|
1102
|
+
/**
|
|
1103
|
+
* Address Incomplete (SIP)
|
|
1104
|
+
*/
|
|
1105
|
+
|
|
1106
|
+
/**
|
|
1107
|
+
* The provided phone number is malformed.
|
|
1108
|
+
*/
|
|
1109
|
+
|
|
1110
|
+
/**
|
|
1111
|
+
* AddressIncomplete
|
|
1112
|
+
*/
|
|
1113
|
+
|
|
1114
|
+
/**
|
|
1115
|
+
* Ensure the phone number dialed is formatted correctly.
|
|
1116
|
+
*/
|
|
1117
|
+
constructor(message) {
|
|
1118
|
+
super(message, 31484);
|
|
1119
|
+
|
|
1120
|
+
_defineProperty(this, "causes", ['The outbound call was made with a phone number that has an invalid format.']);
|
|
1121
|
+
|
|
1122
|
+
_defineProperty(this, "description", 'Address Incomplete (SIP)');
|
|
1123
|
+
|
|
1124
|
+
_defineProperty(this, "explanation", 'The provided phone number is malformed.');
|
|
1125
|
+
|
|
1126
|
+
_defineProperty(this, "name", 'AddressIncomplete');
|
|
1127
|
+
|
|
1128
|
+
_defineProperty(this, "solutions", ['Ensure the phone number dialed is formatted correctly.']);
|
|
1129
|
+
|
|
1130
|
+
Object.setPrototypeOf(this, ClientErrors.AddressIncomplete.prototype);
|
|
1131
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
1132
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
_ClientErrors.AddressIncomplete = AddressIncomplete;
|
|
1138
|
+
|
|
1139
|
+
class BusyHere extends _TwilioError.TwilioError {
|
|
1140
|
+
/**
|
|
1141
|
+
* Not applicable.
|
|
1142
|
+
*/
|
|
1143
|
+
|
|
1144
|
+
/**
|
|
1145
|
+
* Busy Here (SIP)
|
|
1146
|
+
*/
|
|
1147
|
+
|
|
1148
|
+
/**
|
|
1149
|
+
* The callee is busy.
|
|
1150
|
+
*/
|
|
1151
|
+
|
|
1152
|
+
/**
|
|
1153
|
+
* BusyHere
|
|
1154
|
+
*/
|
|
1155
|
+
|
|
1156
|
+
/**
|
|
1157
|
+
* Not applicable.
|
|
1158
|
+
*/
|
|
1159
|
+
constructor(message) {
|
|
1160
|
+
super(message, 31486);
|
|
1161
|
+
|
|
1162
|
+
_defineProperty(this, "causes", []);
|
|
1163
|
+
|
|
1164
|
+
_defineProperty(this, "description", 'Busy Here (SIP)');
|
|
1165
|
+
|
|
1166
|
+
_defineProperty(this, "explanation", 'The callee is busy.');
|
|
1167
|
+
|
|
1168
|
+
_defineProperty(this, "name", 'BusyHere');
|
|
1169
|
+
|
|
1170
|
+
_defineProperty(this, "solutions", []);
|
|
1171
|
+
|
|
1172
|
+
Object.setPrototypeOf(this, ClientErrors.BusyHere.prototype);
|
|
1173
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
1174
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
_ClientErrors.BusyHere = BusyHere;
|
|
1180
|
+
|
|
1181
|
+
class RequestTerminated extends _TwilioError.TwilioError {
|
|
1182
|
+
/**
|
|
1183
|
+
* Not applicable.
|
|
1184
|
+
*/
|
|
1185
|
+
|
|
1186
|
+
/**
|
|
1187
|
+
* Request Terminated (SIP)
|
|
1188
|
+
*/
|
|
1189
|
+
|
|
1190
|
+
/**
|
|
1191
|
+
* The request has terminated as a result of a bye or cancel.
|
|
1192
|
+
*/
|
|
1193
|
+
|
|
1194
|
+
/**
|
|
1195
|
+
* RequestTerminated
|
|
1196
|
+
*/
|
|
1197
|
+
|
|
1198
|
+
/**
|
|
1199
|
+
* Not applicable.
|
|
1200
|
+
*/
|
|
1201
|
+
constructor(message) {
|
|
1202
|
+
super(message, 31487);
|
|
1203
|
+
|
|
1204
|
+
_defineProperty(this, "causes", []);
|
|
1205
|
+
|
|
1206
|
+
_defineProperty(this, "description", 'Request Terminated (SIP)');
|
|
1207
|
+
|
|
1208
|
+
_defineProperty(this, "explanation", 'The request has terminated as a result of a bye or cancel.');
|
|
1209
|
+
|
|
1210
|
+
_defineProperty(this, "name", 'RequestTerminated');
|
|
1211
|
+
|
|
1212
|
+
_defineProperty(this, "solutions", []);
|
|
1213
|
+
|
|
1214
|
+
Object.setPrototypeOf(this, ClientErrors.RequestTerminated.prototype);
|
|
1215
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
1216
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
_ClientErrors.RequestTerminated = RequestTerminated;
|
|
1222
|
+
})(ClientErrors || (exports.ClientErrors = ClientErrors = {}));
|
|
1223
|
+
|
|
1224
|
+
let ServerErrors;
|
|
1225
|
+
/**
|
|
1226
|
+
* @public
|
|
1227
|
+
* SIPServer errors.
|
|
1228
|
+
*/
|
|
1229
|
+
|
|
1230
|
+
exports.ServerErrors = ServerErrors;
|
|
1231
|
+
|
|
1232
|
+
(function (_ServerErrors) {
|
|
1233
|
+
class InternalServerError extends _TwilioError.TwilioError {
|
|
1234
|
+
/**
|
|
1235
|
+
* Not applicable.
|
|
1236
|
+
*/
|
|
1237
|
+
|
|
1238
|
+
/**
|
|
1239
|
+
* Internal Server Error (HTTP/SIP)
|
|
1240
|
+
*/
|
|
1241
|
+
|
|
1242
|
+
/**
|
|
1243
|
+
* The server could not fulfill the request due to some unexpected condition.
|
|
1244
|
+
*/
|
|
1245
|
+
|
|
1246
|
+
/**
|
|
1247
|
+
* InternalServerError
|
|
1248
|
+
*/
|
|
1249
|
+
|
|
1250
|
+
/**
|
|
1251
|
+
* Not applicable.
|
|
1252
|
+
*/
|
|
1253
|
+
constructor(message) {
|
|
1254
|
+
super(message, 31500);
|
|
1255
|
+
|
|
1256
|
+
_defineProperty(this, "causes", []);
|
|
1257
|
+
|
|
1258
|
+
_defineProperty(this, "description", 'Internal Server Error (HTTP/SIP)');
|
|
1259
|
+
|
|
1260
|
+
_defineProperty(this, "explanation", 'The server could not fulfill the request due to some unexpected condition.');
|
|
1261
|
+
|
|
1262
|
+
_defineProperty(this, "name", 'InternalServerError');
|
|
1263
|
+
|
|
1264
|
+
_defineProperty(this, "solutions", []);
|
|
1265
|
+
|
|
1266
|
+
Object.setPrototypeOf(this, ServerErrors.InternalServerError.prototype);
|
|
1267
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
1268
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
_ServerErrors.InternalServerError = InternalServerError;
|
|
1274
|
+
|
|
1275
|
+
class BadGateway extends _TwilioError.TwilioError {
|
|
1276
|
+
/**
|
|
1277
|
+
* Not applicable.
|
|
1278
|
+
*/
|
|
1279
|
+
|
|
1280
|
+
/**
|
|
1281
|
+
* Bad Gateway (HTTP/SIP)
|
|
1282
|
+
*/
|
|
1283
|
+
|
|
1284
|
+
/**
|
|
1285
|
+
* The server is acting as a gateway or proxy, and received an invalid response from a downstream server while attempting to fulfill the request.
|
|
1286
|
+
*/
|
|
1287
|
+
|
|
1288
|
+
/**
|
|
1289
|
+
* BadGateway
|
|
1290
|
+
*/
|
|
1291
|
+
|
|
1292
|
+
/**
|
|
1293
|
+
* Not applicable.
|
|
1294
|
+
*/
|
|
1295
|
+
constructor(message) {
|
|
1296
|
+
super(message, 31502);
|
|
1297
|
+
|
|
1298
|
+
_defineProperty(this, "causes", []);
|
|
1299
|
+
|
|
1300
|
+
_defineProperty(this, "description", 'Bad Gateway (HTTP/SIP)');
|
|
1301
|
+
|
|
1302
|
+
_defineProperty(this, "explanation", 'The server is acting as a gateway or proxy, and received an invalid response from a downstream server while attempting to fulfill the request.');
|
|
1303
|
+
|
|
1304
|
+
_defineProperty(this, "name", 'BadGateway');
|
|
1305
|
+
|
|
1306
|
+
_defineProperty(this, "solutions", []);
|
|
1307
|
+
|
|
1308
|
+
Object.setPrototypeOf(this, ServerErrors.BadGateway.prototype);
|
|
1309
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
1310
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
_ServerErrors.BadGateway = BadGateway;
|
|
1316
|
+
|
|
1317
|
+
class ServiceUnavailable extends _TwilioError.TwilioError {
|
|
1318
|
+
/**
|
|
1319
|
+
* Not applicable.
|
|
1320
|
+
*/
|
|
1321
|
+
|
|
1322
|
+
/**
|
|
1323
|
+
* Service Unavailable (HTTP/SIP)
|
|
1324
|
+
*/
|
|
1325
|
+
|
|
1326
|
+
/**
|
|
1327
|
+
* The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. This error can also be caused by the Application SID provided in the access token pointing to an inaccessible URL.
|
|
1328
|
+
*/
|
|
1329
|
+
|
|
1330
|
+
/**
|
|
1331
|
+
* ServiceUnavailable
|
|
1332
|
+
*/
|
|
1333
|
+
|
|
1334
|
+
/**
|
|
1335
|
+
* Not applicable.
|
|
1336
|
+
*/
|
|
1337
|
+
constructor(message) {
|
|
1338
|
+
super(message, 31503);
|
|
1339
|
+
|
|
1340
|
+
_defineProperty(this, "causes", []);
|
|
1341
|
+
|
|
1342
|
+
_defineProperty(this, "description", 'Service Unavailable (HTTP/SIP)');
|
|
1343
|
+
|
|
1344
|
+
_defineProperty(this, "explanation", 'The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. This error can also be caused by the Application SID provided in the access token pointing to an inaccessible URL.');
|
|
1345
|
+
|
|
1346
|
+
_defineProperty(this, "name", 'ServiceUnavailable');
|
|
1347
|
+
|
|
1348
|
+
_defineProperty(this, "solutions", []);
|
|
1349
|
+
|
|
1350
|
+
Object.setPrototypeOf(this, ServerErrors.ServiceUnavailable.prototype);
|
|
1351
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
1352
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
_ServerErrors.ServiceUnavailable = ServiceUnavailable;
|
|
1358
|
+
|
|
1359
|
+
class GatewayTimeout extends _TwilioError.TwilioError {
|
|
1360
|
+
/**
|
|
1361
|
+
* Not applicable.
|
|
1362
|
+
*/
|
|
1363
|
+
|
|
1364
|
+
/**
|
|
1365
|
+
* Gateway Timeout (HTTP/SIP)
|
|
1366
|
+
*/
|
|
1367
|
+
|
|
1368
|
+
/**
|
|
1369
|
+
* The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server.
|
|
1370
|
+
*/
|
|
1371
|
+
|
|
1372
|
+
/**
|
|
1373
|
+
* GatewayTimeout
|
|
1374
|
+
*/
|
|
1375
|
+
|
|
1376
|
+
/**
|
|
1377
|
+
* Not applicable.
|
|
1378
|
+
*/
|
|
1379
|
+
constructor(message) {
|
|
1380
|
+
super(message, 31504);
|
|
1381
|
+
|
|
1382
|
+
_defineProperty(this, "causes", []);
|
|
1383
|
+
|
|
1384
|
+
_defineProperty(this, "description", 'Gateway Timeout (HTTP/SIP)');
|
|
1385
|
+
|
|
1386
|
+
_defineProperty(this, "explanation", 'The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server.');
|
|
1387
|
+
|
|
1388
|
+
_defineProperty(this, "name", 'GatewayTimeout');
|
|
1389
|
+
|
|
1390
|
+
_defineProperty(this, "solutions", []);
|
|
1391
|
+
|
|
1392
|
+
Object.setPrototypeOf(this, ServerErrors.GatewayTimeout.prototype);
|
|
1393
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
1394
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
_ServerErrors.GatewayTimeout = GatewayTimeout;
|
|
1400
|
+
|
|
1401
|
+
class DNSResolutionError extends _TwilioError.TwilioError {
|
|
1402
|
+
/**
|
|
1403
|
+
* Not applicable.
|
|
1404
|
+
*/
|
|
1405
|
+
|
|
1406
|
+
/**
|
|
1407
|
+
* DNS Resolution Error (HTTP/SIP)
|
|
1408
|
+
*/
|
|
1409
|
+
|
|
1410
|
+
/**
|
|
1411
|
+
* Could not connect to the server.
|
|
1412
|
+
*/
|
|
1413
|
+
|
|
1414
|
+
/**
|
|
1415
|
+
* DNSResolutionError
|
|
1416
|
+
*/
|
|
1417
|
+
|
|
1418
|
+
/**
|
|
1419
|
+
* Not applicable.
|
|
1420
|
+
*/
|
|
1421
|
+
constructor(message) {
|
|
1422
|
+
super(message, 31530);
|
|
1423
|
+
|
|
1424
|
+
_defineProperty(this, "causes", []);
|
|
1425
|
+
|
|
1426
|
+
_defineProperty(this, "description", 'DNS Resolution Error (HTTP/SIP)');
|
|
1427
|
+
|
|
1428
|
+
_defineProperty(this, "explanation", 'Could not connect to the server.');
|
|
1429
|
+
|
|
1430
|
+
_defineProperty(this, "name", 'DNSResolutionError');
|
|
1431
|
+
|
|
1432
|
+
_defineProperty(this, "solutions", []);
|
|
1433
|
+
|
|
1434
|
+
Object.setPrototypeOf(this, ServerErrors.DNSResolutionError.prototype);
|
|
1435
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
1436
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
_ServerErrors.DNSResolutionError = DNSResolutionError;
|
|
1442
|
+
})(ServerErrors || (exports.ServerErrors = ServerErrors = {}));
|
|
1443
|
+
|
|
1444
|
+
let SIPServerErrors;
|
|
1445
|
+
/**
|
|
1446
|
+
* @public
|
|
1447
|
+
* TwiML errors.
|
|
1448
|
+
*/
|
|
1449
|
+
|
|
1450
|
+
exports.SIPServerErrors = SIPServerErrors;
|
|
1451
|
+
|
|
1452
|
+
(function (_SIPServerErrors) {
|
|
1453
|
+
class BusyEverywhere extends _TwilioError.TwilioError {
|
|
1454
|
+
/**
|
|
1455
|
+
* Not applicable.
|
|
1456
|
+
*/
|
|
1457
|
+
|
|
1458
|
+
/**
|
|
1459
|
+
* Busy Everywhere (SIP)
|
|
1460
|
+
*/
|
|
1461
|
+
|
|
1462
|
+
/**
|
|
1463
|
+
* All possible destinations are busy.
|
|
1464
|
+
*/
|
|
1465
|
+
|
|
1466
|
+
/**
|
|
1467
|
+
* BusyEverywhere
|
|
1468
|
+
*/
|
|
1469
|
+
|
|
1470
|
+
/**
|
|
1471
|
+
* Not applicable.
|
|
1472
|
+
*/
|
|
1473
|
+
constructor(message) {
|
|
1474
|
+
super(message, 31600);
|
|
1475
|
+
|
|
1476
|
+
_defineProperty(this, "causes", []);
|
|
1477
|
+
|
|
1478
|
+
_defineProperty(this, "description", 'Busy Everywhere (SIP)');
|
|
1479
|
+
|
|
1480
|
+
_defineProperty(this, "explanation", 'All possible destinations are busy.');
|
|
1481
|
+
|
|
1482
|
+
_defineProperty(this, "name", 'BusyEverywhere');
|
|
1483
|
+
|
|
1484
|
+
_defineProperty(this, "solutions", []);
|
|
1485
|
+
|
|
1486
|
+
Object.setPrototypeOf(this, SIPServerErrors.BusyEverywhere.prototype);
|
|
1487
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
1488
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
_SIPServerErrors.BusyEverywhere = BusyEverywhere;
|
|
1494
|
+
|
|
1495
|
+
class Decline extends _TwilioError.TwilioError {
|
|
1496
|
+
/**
|
|
1497
|
+
* Not applicable.
|
|
1498
|
+
*/
|
|
1499
|
+
|
|
1500
|
+
/**
|
|
1501
|
+
* Decline (SIP)
|
|
1502
|
+
*/
|
|
1503
|
+
|
|
1504
|
+
/**
|
|
1505
|
+
* The callee does not wish to participate in the call.
|
|
1506
|
+
*/
|
|
1507
|
+
|
|
1508
|
+
/**
|
|
1509
|
+
* Decline
|
|
1510
|
+
*/
|
|
1511
|
+
|
|
1512
|
+
/**
|
|
1513
|
+
* Not applicable.
|
|
1514
|
+
*/
|
|
1515
|
+
constructor(message) {
|
|
1516
|
+
super(message, 31603);
|
|
1517
|
+
|
|
1518
|
+
_defineProperty(this, "causes", []);
|
|
1519
|
+
|
|
1520
|
+
_defineProperty(this, "description", 'Decline (SIP)');
|
|
1521
|
+
|
|
1522
|
+
_defineProperty(this, "explanation", 'The callee does not wish to participate in the call.');
|
|
1523
|
+
|
|
1524
|
+
_defineProperty(this, "name", 'Decline');
|
|
1525
|
+
|
|
1526
|
+
_defineProperty(this, "solutions", []);
|
|
1527
|
+
|
|
1528
|
+
Object.setPrototypeOf(this, SIPServerErrors.Decline.prototype);
|
|
1529
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
1530
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
_SIPServerErrors.Decline = Decline;
|
|
1536
|
+
|
|
1537
|
+
class DoesNotExistAnywhere extends _TwilioError.TwilioError {
|
|
1538
|
+
/**
|
|
1539
|
+
* Not applicable.
|
|
1540
|
+
*/
|
|
1541
|
+
|
|
1542
|
+
/**
|
|
1543
|
+
* Does Not Exist Anywhere (SIP)
|
|
1544
|
+
*/
|
|
1545
|
+
|
|
1546
|
+
/**
|
|
1547
|
+
* The requested callee does not exist anywhere.
|
|
1548
|
+
*/
|
|
1549
|
+
|
|
1550
|
+
/**
|
|
1551
|
+
* DoesNotExistAnywhere
|
|
1552
|
+
*/
|
|
1553
|
+
|
|
1554
|
+
/**
|
|
1555
|
+
* Not applicable.
|
|
1556
|
+
*/
|
|
1557
|
+
constructor(message) {
|
|
1558
|
+
super(message, 31604);
|
|
1559
|
+
|
|
1560
|
+
_defineProperty(this, "causes", []);
|
|
1561
|
+
|
|
1562
|
+
_defineProperty(this, "description", 'Does Not Exist Anywhere (SIP)');
|
|
1563
|
+
|
|
1564
|
+
_defineProperty(this, "explanation", 'The requested callee does not exist anywhere.');
|
|
1565
|
+
|
|
1566
|
+
_defineProperty(this, "name", 'DoesNotExistAnywhere');
|
|
1567
|
+
|
|
1568
|
+
_defineProperty(this, "solutions", []);
|
|
1569
|
+
|
|
1570
|
+
Object.setPrototypeOf(this, SIPServerErrors.DoesNotExistAnywhere.prototype);
|
|
1571
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
1572
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
_SIPServerErrors.DoesNotExistAnywhere = DoesNotExistAnywhere;
|
|
1578
|
+
})(SIPServerErrors || (exports.SIPServerErrors = SIPServerErrors = {}));
|
|
1579
|
+
|
|
1580
|
+
let TwiMLErrors;
|
|
1581
|
+
/**
|
|
1582
|
+
* @public
|
|
1583
|
+
* General errors.
|
|
1584
|
+
*/
|
|
1585
|
+
|
|
1586
|
+
exports.TwiMLErrors = TwiMLErrors;
|
|
1587
|
+
|
|
1588
|
+
(function (_TwiMLErrors) {
|
|
1589
|
+
class InvalidApplicationSid extends _TwilioError.TwilioError {
|
|
1590
|
+
/**
|
|
1591
|
+
* Not applicable.
|
|
1592
|
+
*/
|
|
1593
|
+
|
|
1594
|
+
/**
|
|
1595
|
+
* Invalid ApplicationSid
|
|
1596
|
+
*/
|
|
1597
|
+
|
|
1598
|
+
/**
|
|
1599
|
+
* You attempted to initiate an outbound phone call with an invalid ApplicationSid. The application may not exist anymore or may not be available within your account
|
|
1600
|
+
*/
|
|
1601
|
+
|
|
1602
|
+
/**
|
|
1603
|
+
* InvalidApplicationSid
|
|
1604
|
+
*/
|
|
1605
|
+
|
|
1606
|
+
/**
|
|
1607
|
+
* Not applicable.
|
|
1608
|
+
*/
|
|
1609
|
+
constructor(message) {
|
|
1610
|
+
super(message, 21218);
|
|
1611
|
+
|
|
1612
|
+
_defineProperty(this, "causes", []);
|
|
1613
|
+
|
|
1614
|
+
_defineProperty(this, "description", 'Invalid ApplicationSid');
|
|
1615
|
+
|
|
1616
|
+
_defineProperty(this, "explanation", 'You attempted to initiate an outbound phone call with an invalid ApplicationSid. The application may not exist anymore or may not be available within your account');
|
|
1617
|
+
|
|
1618
|
+
_defineProperty(this, "name", 'InvalidApplicationSid');
|
|
1619
|
+
|
|
1620
|
+
_defineProperty(this, "solutions", []);
|
|
1621
|
+
|
|
1622
|
+
Object.setPrototypeOf(this, TwiMLErrors.InvalidApplicationSid.prototype);
|
|
1623
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
1624
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
}
|
|
1628
|
+
|
|
1629
|
+
_TwiMLErrors.InvalidApplicationSid = InvalidApplicationSid;
|
|
1630
|
+
})(TwiMLErrors || (exports.TwiMLErrors = TwiMLErrors = {}));
|
|
1631
|
+
|
|
1632
|
+
let GeneralErrors;
|
|
1633
|
+
/**
|
|
1634
|
+
* @public
|
|
1635
|
+
* MalformedRequest errors.
|
|
1636
|
+
*/
|
|
1637
|
+
|
|
1638
|
+
exports.GeneralErrors = GeneralErrors;
|
|
1639
|
+
|
|
1640
|
+
(function (_GeneralErrors) {
|
|
1641
|
+
class ConnectionError extends _TwilioError.TwilioError {
|
|
1642
|
+
/**
|
|
1643
|
+
* Not applicable.
|
|
1644
|
+
*/
|
|
1645
|
+
|
|
1646
|
+
/**
|
|
1647
|
+
* Connection error
|
|
1648
|
+
*/
|
|
1649
|
+
|
|
1650
|
+
/**
|
|
1651
|
+
* A connection error occurred during the call
|
|
1652
|
+
*/
|
|
1653
|
+
|
|
1654
|
+
/**
|
|
1655
|
+
* ConnectionError
|
|
1656
|
+
*/
|
|
1657
|
+
|
|
1658
|
+
/**
|
|
1659
|
+
* Not applicable.
|
|
1660
|
+
*/
|
|
1661
|
+
constructor(message) {
|
|
1662
|
+
super(message, 31005);
|
|
1663
|
+
|
|
1664
|
+
_defineProperty(this, "causes", []);
|
|
1665
|
+
|
|
1666
|
+
_defineProperty(this, "description", 'Connection error');
|
|
1667
|
+
|
|
1668
|
+
_defineProperty(this, "explanation", 'A connection error occurred during the call');
|
|
1669
|
+
|
|
1670
|
+
_defineProperty(this, "name", 'ConnectionError');
|
|
1671
|
+
|
|
1672
|
+
_defineProperty(this, "solutions", []);
|
|
1673
|
+
|
|
1674
|
+
Object.setPrototypeOf(this, GeneralErrors.ConnectionError.prototype);
|
|
1675
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
1676
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
_GeneralErrors.ConnectionError = ConnectionError;
|
|
1682
|
+
|
|
1683
|
+
class CallCancelledError extends _TwilioError.TwilioError {
|
|
1684
|
+
/**
|
|
1685
|
+
* The incoming call was cancelled because it was not answered in time or it was accepted/rejected by another application instance registered with the same identity.
|
|
1686
|
+
*/
|
|
1687
|
+
|
|
1688
|
+
/**
|
|
1689
|
+
* Call cancelled
|
|
1690
|
+
*/
|
|
1691
|
+
|
|
1692
|
+
/**
|
|
1693
|
+
* Unable to answer because the call has ended
|
|
1694
|
+
*/
|
|
1695
|
+
|
|
1696
|
+
/**
|
|
1697
|
+
* CallCancelledError
|
|
1698
|
+
*/
|
|
1699
|
+
|
|
1700
|
+
/**
|
|
1701
|
+
* Not applicable.
|
|
1702
|
+
*/
|
|
1703
|
+
constructor(message) {
|
|
1704
|
+
super(message, 31008);
|
|
1705
|
+
|
|
1706
|
+
_defineProperty(this, "causes", ['The incoming call was cancelled because it was not answered in time or it was accepted/rejected by another application instance registered with the same identity.']);
|
|
1707
|
+
|
|
1708
|
+
_defineProperty(this, "description", 'Call cancelled');
|
|
1709
|
+
|
|
1710
|
+
_defineProperty(this, "explanation", 'Unable to answer because the call has ended');
|
|
1711
|
+
|
|
1712
|
+
_defineProperty(this, "name", 'CallCancelledError');
|
|
1713
|
+
|
|
1714
|
+
_defineProperty(this, "solutions", []);
|
|
1715
|
+
|
|
1716
|
+
Object.setPrototypeOf(this, GeneralErrors.CallCancelledError.prototype);
|
|
1717
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
1718
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
_GeneralErrors.CallCancelledError = CallCancelledError;
|
|
1724
|
+
|
|
1725
|
+
class TransportError extends _TwilioError.TwilioError {
|
|
1726
|
+
/**
|
|
1727
|
+
* Not applicable.
|
|
1728
|
+
*/
|
|
1729
|
+
|
|
1730
|
+
/**
|
|
1731
|
+
* Transport error
|
|
1732
|
+
*/
|
|
1733
|
+
|
|
1734
|
+
/**
|
|
1735
|
+
* No transport available to send or receive messages
|
|
1736
|
+
*/
|
|
1737
|
+
|
|
1738
|
+
/**
|
|
1739
|
+
* TransportError
|
|
1740
|
+
*/
|
|
1741
|
+
|
|
1742
|
+
/**
|
|
1743
|
+
* Not applicable.
|
|
1744
|
+
*/
|
|
1745
|
+
constructor(message) {
|
|
1746
|
+
super(message, 31009);
|
|
1747
|
+
|
|
1748
|
+
_defineProperty(this, "causes", []);
|
|
1749
|
+
|
|
1750
|
+
_defineProperty(this, "description", 'Transport error');
|
|
1751
|
+
|
|
1752
|
+
_defineProperty(this, "explanation", 'No transport available to send or receive messages');
|
|
1753
|
+
|
|
1754
|
+
_defineProperty(this, "name", 'TransportError');
|
|
1755
|
+
|
|
1756
|
+
_defineProperty(this, "solutions", []);
|
|
1757
|
+
|
|
1758
|
+
Object.setPrototypeOf(this, GeneralErrors.TransportError.prototype);
|
|
1759
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
1760
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1763
|
+
}
|
|
1764
|
+
|
|
1765
|
+
_GeneralErrors.TransportError = TransportError;
|
|
1766
|
+
})(GeneralErrors || (exports.GeneralErrors = GeneralErrors = {}));
|
|
1767
|
+
|
|
1768
|
+
let MalformedRequestErrors;
|
|
1769
|
+
/**
|
|
1770
|
+
* @public
|
|
1771
|
+
* Registration errors.
|
|
1772
|
+
*/
|
|
1773
|
+
|
|
1774
|
+
exports.MalformedRequestErrors = MalformedRequestErrors;
|
|
1775
|
+
|
|
1776
|
+
(function (_MalformedRequestErrors) {
|
|
1777
|
+
class MalformedRequestError extends _TwilioError.TwilioError {
|
|
1778
|
+
/**
|
|
1779
|
+
* Invalid content or MessageType passed to sendMessage method.
|
|
1780
|
+
*/
|
|
1781
|
+
|
|
1782
|
+
/**
|
|
1783
|
+
* The request had malformed syntax.
|
|
1784
|
+
*/
|
|
1785
|
+
|
|
1786
|
+
/**
|
|
1787
|
+
* The request could not be understood due to malformed syntax.
|
|
1788
|
+
*/
|
|
1789
|
+
|
|
1790
|
+
/**
|
|
1791
|
+
* MalformedRequestError
|
|
1792
|
+
*/
|
|
1793
|
+
|
|
1794
|
+
/**
|
|
1795
|
+
* Ensure content and MessageType passed to sendMessage method are valid.
|
|
1796
|
+
*/
|
|
1797
|
+
constructor(message) {
|
|
1798
|
+
super(message, 31100);
|
|
1799
|
+
|
|
1800
|
+
_defineProperty(this, "causes", ['Invalid content or MessageType passed to sendMessage method.']);
|
|
1801
|
+
|
|
1802
|
+
_defineProperty(this, "description", 'The request had malformed syntax.');
|
|
1803
|
+
|
|
1804
|
+
_defineProperty(this, "explanation", 'The request could not be understood due to malformed syntax.');
|
|
1805
|
+
|
|
1806
|
+
_defineProperty(this, "name", 'MalformedRequestError');
|
|
1807
|
+
|
|
1808
|
+
_defineProperty(this, "solutions", ['Ensure content and MessageType passed to sendMessage method are valid.']);
|
|
1809
|
+
|
|
1810
|
+
Object.setPrototypeOf(this, MalformedRequestErrors.MalformedRequestError.prototype);
|
|
1811
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
1812
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
}
|
|
1816
|
+
|
|
1817
|
+
_MalformedRequestErrors.MalformedRequestError = MalformedRequestError;
|
|
1818
|
+
})(MalformedRequestErrors || (exports.MalformedRequestErrors = MalformedRequestErrors = {}));
|
|
1819
|
+
|
|
1820
|
+
let RegistrationErrors;
|
|
1821
|
+
/**
|
|
1822
|
+
* @public
|
|
1823
|
+
* UserMedia errors.
|
|
1824
|
+
*/
|
|
1825
|
+
|
|
1826
|
+
exports.RegistrationErrors = RegistrationErrors;
|
|
1827
|
+
|
|
1828
|
+
(function (_RegistrationErrors) {
|
|
1829
|
+
class RegistrationError extends _TwilioError.TwilioError {
|
|
1830
|
+
/**
|
|
1831
|
+
* Not applicable.
|
|
1832
|
+
*/
|
|
1833
|
+
|
|
1834
|
+
/**
|
|
1835
|
+
* Registration error
|
|
1836
|
+
*/
|
|
1837
|
+
|
|
1838
|
+
/**
|
|
1839
|
+
*
|
|
1840
|
+
*/
|
|
1841
|
+
|
|
1842
|
+
/**
|
|
1843
|
+
* RegistrationError
|
|
1844
|
+
*/
|
|
1845
|
+
|
|
1846
|
+
/**
|
|
1847
|
+
* Not applicable.
|
|
1848
|
+
*/
|
|
1849
|
+
constructor(message) {
|
|
1850
|
+
super(message, 31301);
|
|
1851
|
+
|
|
1852
|
+
_defineProperty(this, "causes", []);
|
|
1853
|
+
|
|
1854
|
+
_defineProperty(this, "description", 'Registration error');
|
|
1855
|
+
|
|
1856
|
+
_defineProperty(this, "explanation", '');
|
|
1857
|
+
|
|
1858
|
+
_defineProperty(this, "name", 'RegistrationError');
|
|
1859
|
+
|
|
1860
|
+
_defineProperty(this, "solutions", []);
|
|
1861
|
+
|
|
1862
|
+
Object.setPrototypeOf(this, RegistrationErrors.RegistrationError.prototype);
|
|
1863
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
1864
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
1865
|
+
}
|
|
1866
|
+
|
|
1867
|
+
}
|
|
1868
|
+
|
|
1869
|
+
_RegistrationErrors.RegistrationError = RegistrationError;
|
|
1870
|
+
|
|
1871
|
+
class UnsupportedCancelMessageError extends _TwilioError.TwilioError {
|
|
1872
|
+
/**
|
|
1873
|
+
* The identity associated with the Twilio Voice SDK is still registered to receive cancel push notification messages.
|
|
1874
|
+
*/
|
|
1875
|
+
|
|
1876
|
+
/**
|
|
1877
|
+
* Unsupported Cancel Message Error
|
|
1878
|
+
*/
|
|
1879
|
+
|
|
1880
|
+
/**
|
|
1881
|
+
* This version of the SDK no longer supports processing cancel push notification messages. You must register via Voice.register(...) on Android or [TwilioVoice registerWithAccessToken:deviceToken:completion:] on iOS with this version of the SDK to stop receiving cancel push notification messages. Cancellations are now handled internally and reported to you on behalf of the SDK.
|
|
1882
|
+
*/
|
|
1883
|
+
|
|
1884
|
+
/**
|
|
1885
|
+
* UnsupportedCancelMessageError
|
|
1886
|
+
*/
|
|
1887
|
+
|
|
1888
|
+
/**
|
|
1889
|
+
* The application must register via Voice.register(...) on Android or [TwilioVoice registerWithAccessToken:deviceToken:completion:] on iOS to stop receiving cancel push notification messages.
|
|
1890
|
+
*/
|
|
1891
|
+
constructor(message) {
|
|
1892
|
+
super(message, 31302);
|
|
1893
|
+
|
|
1894
|
+
_defineProperty(this, "causes", ['The identity associated with the Twilio Voice SDK is still registered to receive cancel push notification messages.']);
|
|
1895
|
+
|
|
1896
|
+
_defineProperty(this, "description", 'Unsupported Cancel Message Error');
|
|
1897
|
+
|
|
1898
|
+
_defineProperty(this, "explanation", 'This version of the SDK no longer supports processing cancel push notification messages. You must register via Voice.register(...) on Android or [TwilioVoice registerWithAccessToken:deviceToken:completion:] on iOS with this version of the SDK to stop receiving cancel push notification messages. Cancellations are now handled internally and reported to you on behalf of the SDK.');
|
|
1899
|
+
|
|
1900
|
+
_defineProperty(this, "name", 'UnsupportedCancelMessageError');
|
|
1901
|
+
|
|
1902
|
+
_defineProperty(this, "solutions", ['The application must register via Voice.register(...) on Android or [TwilioVoice registerWithAccessToken:deviceToken:completion:] on iOS to stop receiving cancel push notification messages.']);
|
|
1903
|
+
|
|
1904
|
+
Object.setPrototypeOf(this, RegistrationErrors.UnsupportedCancelMessageError.prototype);
|
|
1905
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
1906
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
_RegistrationErrors.UnsupportedCancelMessageError = UnsupportedCancelMessageError;
|
|
1912
|
+
})(RegistrationErrors || (exports.RegistrationErrors = RegistrationErrors = {}));
|
|
1913
|
+
|
|
1914
|
+
let UserMediaErrors;
|
|
1915
|
+
/**
|
|
1916
|
+
* @public
|
|
1917
|
+
* Signaling errors.
|
|
1918
|
+
*/
|
|
1919
|
+
|
|
1920
|
+
exports.UserMediaErrors = UserMediaErrors;
|
|
1921
|
+
|
|
1922
|
+
(function (_UserMediaErrors) {
|
|
1923
|
+
class PermissionDeniedError extends _TwilioError.TwilioError {
|
|
1924
|
+
/**
|
|
1925
|
+
* The user denied the getUserMedia request.
|
|
1926
|
+
* The browser denied the getUserMedia request.
|
|
1927
|
+
* The application has not been configured with the proper permissions.
|
|
1928
|
+
*/
|
|
1929
|
+
|
|
1930
|
+
/**
|
|
1931
|
+
* UserMedia Permission Denied Error
|
|
1932
|
+
*/
|
|
1933
|
+
|
|
1934
|
+
/**
|
|
1935
|
+
* The browser or end-user denied permissions to user media. Therefore we were unable to acquire input audio.
|
|
1936
|
+
*/
|
|
1937
|
+
|
|
1938
|
+
/**
|
|
1939
|
+
* PermissionDeniedError
|
|
1940
|
+
*/
|
|
1941
|
+
|
|
1942
|
+
/**
|
|
1943
|
+
* The user should accept the request next time prompted. If the browser saved the deny, the user should change that permission in their browser.
|
|
1944
|
+
* The user should to verify that the browser has permission to access the microphone at this address.
|
|
1945
|
+
* The user should ensure that the proper permissions have been granted in the mobile device OS.
|
|
1946
|
+
*/
|
|
1947
|
+
constructor(message) {
|
|
1948
|
+
super(message, 31401);
|
|
1949
|
+
|
|
1950
|
+
_defineProperty(this, "causes", ['The user denied the getUserMedia request.', 'The browser denied the getUserMedia request.', 'The application has not been configured with the proper permissions.']);
|
|
1951
|
+
|
|
1952
|
+
_defineProperty(this, "description", 'UserMedia Permission Denied Error');
|
|
1953
|
+
|
|
1954
|
+
_defineProperty(this, "explanation", 'The browser or end-user denied permissions to user media. Therefore we were unable to acquire input audio.');
|
|
1955
|
+
|
|
1956
|
+
_defineProperty(this, "name", 'PermissionDeniedError');
|
|
1957
|
+
|
|
1958
|
+
_defineProperty(this, "solutions", ['The user should accept the request next time prompted. If the browser saved the deny, the user should change that permission in their browser.', 'The user should to verify that the browser has permission to access the microphone at this address.', 'The user should ensure that the proper permissions have been granted in the mobile device OS.']);
|
|
1959
|
+
|
|
1960
|
+
Object.setPrototypeOf(this, UserMediaErrors.PermissionDeniedError.prototype);
|
|
1961
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
1962
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
1963
|
+
}
|
|
1964
|
+
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1967
|
+
_UserMediaErrors.PermissionDeniedError = PermissionDeniedError;
|
|
1968
|
+
})(UserMediaErrors || (exports.UserMediaErrors = UserMediaErrors = {}));
|
|
1969
|
+
|
|
1970
|
+
let SignalingErrors;
|
|
1971
|
+
/**
|
|
1972
|
+
* @public
|
|
1973
|
+
* Media errors.
|
|
1974
|
+
*/
|
|
1975
|
+
|
|
1976
|
+
exports.SignalingErrors = SignalingErrors;
|
|
1977
|
+
|
|
1978
|
+
(function (_SignalingErrors) {
|
|
1979
|
+
class ConnectionDisconnected extends _TwilioError.TwilioError {
|
|
1980
|
+
/**
|
|
1981
|
+
* The device running your application lost its Internet connection.
|
|
1982
|
+
*/
|
|
1983
|
+
|
|
1984
|
+
/**
|
|
1985
|
+
* Signaling connection disconnected
|
|
1986
|
+
*/
|
|
1987
|
+
|
|
1988
|
+
/**
|
|
1989
|
+
* Raised whenever the signaling connection is unexpectedly disconnected.
|
|
1990
|
+
*/
|
|
1991
|
+
|
|
1992
|
+
/**
|
|
1993
|
+
* ConnectionDisconnected
|
|
1994
|
+
*/
|
|
1995
|
+
|
|
1996
|
+
/**
|
|
1997
|
+
* Ensure the device running your application has access to a stable Internet connection.
|
|
1998
|
+
*/
|
|
1999
|
+
constructor(message) {
|
|
2000
|
+
super(message, 53001);
|
|
2001
|
+
|
|
2002
|
+
_defineProperty(this, "causes", ['The device running your application lost its Internet connection.']);
|
|
2003
|
+
|
|
2004
|
+
_defineProperty(this, "description", 'Signaling connection disconnected');
|
|
2005
|
+
|
|
2006
|
+
_defineProperty(this, "explanation", 'Raised whenever the signaling connection is unexpectedly disconnected.');
|
|
2007
|
+
|
|
2008
|
+
_defineProperty(this, "name", 'ConnectionDisconnected');
|
|
2009
|
+
|
|
2010
|
+
_defineProperty(this, "solutions", ['Ensure the device running your application has access to a stable Internet connection.']);
|
|
2011
|
+
|
|
2012
|
+
Object.setPrototypeOf(this, SignalingErrors.ConnectionDisconnected.prototype);
|
|
2013
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
2014
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
2015
|
+
}
|
|
2016
|
+
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
_SignalingErrors.ConnectionDisconnected = ConnectionDisconnected;
|
|
2020
|
+
})(SignalingErrors || (exports.SignalingErrors = SignalingErrors = {}));
|
|
2021
|
+
|
|
2022
|
+
let MediaErrors;
|
|
2023
|
+
/**
|
|
2024
|
+
* @internal
|
|
2025
|
+
*/
|
|
2026
|
+
|
|
2027
|
+
exports.MediaErrors = MediaErrors;
|
|
2028
|
+
|
|
2029
|
+
(function (_MediaErrors) {
|
|
2030
|
+
class ClientLocalDescFailed extends _TwilioError.TwilioError {
|
|
2031
|
+
/**
|
|
2032
|
+
* The Client may not be using a supported WebRTC implementation.
|
|
2033
|
+
* The Client may not have the necessary resources to create or apply a new media description.
|
|
2034
|
+
*/
|
|
2035
|
+
|
|
2036
|
+
/**
|
|
2037
|
+
* Client is unable to create or apply a local media description
|
|
2038
|
+
*/
|
|
2039
|
+
|
|
2040
|
+
/**
|
|
2041
|
+
* Raised whenever a Client is unable to create or apply a local media description.
|
|
2042
|
+
*/
|
|
2043
|
+
|
|
2044
|
+
/**
|
|
2045
|
+
* ClientLocalDescFailed
|
|
2046
|
+
*/
|
|
2047
|
+
|
|
2048
|
+
/**
|
|
2049
|
+
* If you are experiencing this error using the JavaScript SDK, ensure you are running it with a supported WebRTC implementation.
|
|
2050
|
+
*/
|
|
2051
|
+
constructor(message) {
|
|
2052
|
+
super(message, 53400);
|
|
2053
|
+
|
|
2054
|
+
_defineProperty(this, "causes", ['The Client may not be using a supported WebRTC implementation.', 'The Client may not have the necessary resources to create or apply a new media description.']);
|
|
2055
|
+
|
|
2056
|
+
_defineProperty(this, "description", 'Client is unable to create or apply a local media description');
|
|
2057
|
+
|
|
2058
|
+
_defineProperty(this, "explanation", 'Raised whenever a Client is unable to create or apply a local media description.');
|
|
2059
|
+
|
|
2060
|
+
_defineProperty(this, "name", 'ClientLocalDescFailed');
|
|
2061
|
+
|
|
2062
|
+
_defineProperty(this, "solutions", ['If you are experiencing this error using the JavaScript SDK, ensure you are running it with a supported WebRTC implementation.']);
|
|
2063
|
+
|
|
2064
|
+
Object.setPrototypeOf(this, MediaErrors.ClientLocalDescFailed.prototype);
|
|
2065
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
2066
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
2067
|
+
}
|
|
2068
|
+
|
|
2069
|
+
}
|
|
2070
|
+
|
|
2071
|
+
_MediaErrors.ClientLocalDescFailed = ClientLocalDescFailed;
|
|
2072
|
+
|
|
2073
|
+
class ServerLocalDescFailed extends _TwilioError.TwilioError {
|
|
2074
|
+
/**
|
|
2075
|
+
* A server-side error has occurred.
|
|
2076
|
+
*/
|
|
2077
|
+
|
|
2078
|
+
/**
|
|
2079
|
+
* Server is unable to create or apply a local media description
|
|
2080
|
+
*/
|
|
2081
|
+
|
|
2082
|
+
/**
|
|
2083
|
+
* Raised whenever the Server is unable to create or apply a local media description.
|
|
2084
|
+
*/
|
|
2085
|
+
|
|
2086
|
+
/**
|
|
2087
|
+
* ServerLocalDescFailed
|
|
2088
|
+
*/
|
|
2089
|
+
|
|
2090
|
+
/**
|
|
2091
|
+
* If the problem persists, try connecting to another region.
|
|
2092
|
+
*/
|
|
2093
|
+
constructor(message) {
|
|
2094
|
+
super(message, 53401);
|
|
2095
|
+
|
|
2096
|
+
_defineProperty(this, "causes", ['A server-side error has occurred.']);
|
|
2097
|
+
|
|
2098
|
+
_defineProperty(this, "description", 'Server is unable to create or apply a local media description');
|
|
2099
|
+
|
|
2100
|
+
_defineProperty(this, "explanation", 'Raised whenever the Server is unable to create or apply a local media description.');
|
|
2101
|
+
|
|
2102
|
+
_defineProperty(this, "name", 'ServerLocalDescFailed');
|
|
2103
|
+
|
|
2104
|
+
_defineProperty(this, "solutions", ['If the problem persists, try connecting to another region.']);
|
|
2105
|
+
|
|
2106
|
+
Object.setPrototypeOf(this, MediaErrors.ServerLocalDescFailed.prototype);
|
|
2107
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
2108
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
2109
|
+
}
|
|
2110
|
+
|
|
2111
|
+
}
|
|
2112
|
+
|
|
2113
|
+
_MediaErrors.ServerLocalDescFailed = ServerLocalDescFailed;
|
|
2114
|
+
|
|
2115
|
+
class ClientRemoteDescFailed extends _TwilioError.TwilioError {
|
|
2116
|
+
/**
|
|
2117
|
+
* The Client may not be using a supported WebRTC implementation.
|
|
2118
|
+
* The Client may be connecting peer-to-peer with another Participant that is not using a supported WebRTC implementation.
|
|
2119
|
+
* The Client may not have the necessary resources to apply a new media description.
|
|
2120
|
+
*/
|
|
2121
|
+
|
|
2122
|
+
/**
|
|
2123
|
+
* Client is unable to apply a remote media description
|
|
2124
|
+
*/
|
|
2125
|
+
|
|
2126
|
+
/**
|
|
2127
|
+
* Raised whenever the Client receives a remote media description but is unable to apply it.
|
|
2128
|
+
*/
|
|
2129
|
+
|
|
2130
|
+
/**
|
|
2131
|
+
* ClientRemoteDescFailed
|
|
2132
|
+
*/
|
|
2133
|
+
|
|
2134
|
+
/**
|
|
2135
|
+
* If you are experiencing this error using the JavaScript SDK, ensure you are running it with a supported WebRTC implementation.
|
|
2136
|
+
*/
|
|
2137
|
+
constructor(message) {
|
|
2138
|
+
super(message, 53402);
|
|
2139
|
+
|
|
2140
|
+
_defineProperty(this, "causes", ['The Client may not be using a supported WebRTC implementation.', 'The Client may be connecting peer-to-peer with another Participant that is not using a supported WebRTC implementation.', 'The Client may not have the necessary resources to apply a new media description.']);
|
|
2141
|
+
|
|
2142
|
+
_defineProperty(this, "description", 'Client is unable to apply a remote media description');
|
|
2143
|
+
|
|
2144
|
+
_defineProperty(this, "explanation", 'Raised whenever the Client receives a remote media description but is unable to apply it.');
|
|
2145
|
+
|
|
2146
|
+
_defineProperty(this, "name", 'ClientRemoteDescFailed');
|
|
2147
|
+
|
|
2148
|
+
_defineProperty(this, "solutions", ['If you are experiencing this error using the JavaScript SDK, ensure you are running it with a supported WebRTC implementation.']);
|
|
2149
|
+
|
|
2150
|
+
Object.setPrototypeOf(this, MediaErrors.ClientRemoteDescFailed.prototype);
|
|
2151
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
2152
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
2153
|
+
}
|
|
2154
|
+
|
|
2155
|
+
}
|
|
2156
|
+
|
|
2157
|
+
_MediaErrors.ClientRemoteDescFailed = ClientRemoteDescFailed;
|
|
2158
|
+
|
|
2159
|
+
class ServerRemoteDescFailed extends _TwilioError.TwilioError {
|
|
2160
|
+
/**
|
|
2161
|
+
* The Client may not be using a supported WebRTC implementation.
|
|
2162
|
+
* The Client may not have the necessary resources to apply a new media description.
|
|
2163
|
+
* A Server-side error may have caused the Server to generate an invalid media description.
|
|
2164
|
+
*/
|
|
2165
|
+
|
|
2166
|
+
/**
|
|
2167
|
+
* Server is unable to apply a remote media description
|
|
2168
|
+
*/
|
|
2169
|
+
|
|
2170
|
+
/**
|
|
2171
|
+
* Raised whenever the Server receives a remote media description but is unable to apply it.
|
|
2172
|
+
*/
|
|
2173
|
+
|
|
2174
|
+
/**
|
|
2175
|
+
* ServerRemoteDescFailed
|
|
2176
|
+
*/
|
|
2177
|
+
|
|
2178
|
+
/**
|
|
2179
|
+
* If you are experiencing this error using the JavaScript SDK, ensure you are running it with a supported WebRTC implementation.
|
|
2180
|
+
* If the problem persists, try connecting to another region.
|
|
2181
|
+
*/
|
|
2182
|
+
constructor(message) {
|
|
2183
|
+
super(message, 53403);
|
|
2184
|
+
|
|
2185
|
+
_defineProperty(this, "causes", ['The Client may not be using a supported WebRTC implementation.', 'The Client may not have the necessary resources to apply a new media description.', 'A Server-side error may have caused the Server to generate an invalid media description.']);
|
|
2186
|
+
|
|
2187
|
+
_defineProperty(this, "description", 'Server is unable to apply a remote media description');
|
|
2188
|
+
|
|
2189
|
+
_defineProperty(this, "explanation", 'Raised whenever the Server receives a remote media description but is unable to apply it.');
|
|
2190
|
+
|
|
2191
|
+
_defineProperty(this, "name", 'ServerRemoteDescFailed');
|
|
2192
|
+
|
|
2193
|
+
_defineProperty(this, "solutions", ['If you are experiencing this error using the JavaScript SDK, ensure you are running it with a supported WebRTC implementation.', 'If the problem persists, try connecting to another region.']);
|
|
2194
|
+
|
|
2195
|
+
Object.setPrototypeOf(this, MediaErrors.ServerRemoteDescFailed.prototype);
|
|
2196
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
2197
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
2198
|
+
}
|
|
2199
|
+
|
|
2200
|
+
}
|
|
2201
|
+
|
|
2202
|
+
_MediaErrors.ServerRemoteDescFailed = ServerRemoteDescFailed;
|
|
2203
|
+
|
|
2204
|
+
class NoSupportedCodec extends _TwilioError.TwilioError {
|
|
2205
|
+
/**
|
|
2206
|
+
* The C++ SDK was built without the recommended set of codecs.
|
|
2207
|
+
* The JavaScript SDK is running in a browser that does not implement the recommended set of codecs.
|
|
2208
|
+
*/
|
|
2209
|
+
|
|
2210
|
+
/**
|
|
2211
|
+
* No supported codec
|
|
2212
|
+
*/
|
|
2213
|
+
|
|
2214
|
+
/**
|
|
2215
|
+
* Raised whenever the intersection of codecs supported by the Client and the Server (or, in peer-to-peer, the Client and another Participant) is empty.
|
|
2216
|
+
*/
|
|
2217
|
+
|
|
2218
|
+
/**
|
|
2219
|
+
* NoSupportedCodec
|
|
2220
|
+
*/
|
|
2221
|
+
|
|
2222
|
+
/**
|
|
2223
|
+
* If you are experiencing this error using the C++ SDK, ensure you build it with the recommended set of codecs.
|
|
2224
|
+
* If you are experiencing this error using the JavaScript SDK, ensure you are using a compatible browser.
|
|
2225
|
+
*/
|
|
2226
|
+
constructor(message) {
|
|
2227
|
+
super(message, 53404);
|
|
2228
|
+
|
|
2229
|
+
_defineProperty(this, "causes", ['The C++ SDK was built without the recommended set of codecs.', 'The JavaScript SDK is running in a browser that does not implement the recommended set of codecs.']);
|
|
2230
|
+
|
|
2231
|
+
_defineProperty(this, "description", 'No supported codec');
|
|
2232
|
+
|
|
2233
|
+
_defineProperty(this, "explanation", 'Raised whenever the intersection of codecs supported by the Client and the Server (or, in peer-to-peer, the Client and another Participant) is empty.');
|
|
2234
|
+
|
|
2235
|
+
_defineProperty(this, "name", 'NoSupportedCodec');
|
|
2236
|
+
|
|
2237
|
+
_defineProperty(this, "solutions", ['If you are experiencing this error using the C++ SDK, ensure you build it with the recommended set of codecs.', 'If you are experiencing this error using the JavaScript SDK, ensure you are using a compatible browser.']);
|
|
2238
|
+
|
|
2239
|
+
Object.setPrototypeOf(this, MediaErrors.NoSupportedCodec.prototype);
|
|
2240
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
2241
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
2242
|
+
}
|
|
2243
|
+
|
|
2244
|
+
}
|
|
2245
|
+
|
|
2246
|
+
_MediaErrors.NoSupportedCodec = NoSupportedCodec;
|
|
2247
|
+
|
|
2248
|
+
class ConnectionError extends _TwilioError.TwilioError {
|
|
2249
|
+
/**
|
|
2250
|
+
* The Client was unable to establish a media connection.
|
|
2251
|
+
* A media connection which was active failed liveliness checks.
|
|
2252
|
+
*/
|
|
2253
|
+
|
|
2254
|
+
/**
|
|
2255
|
+
* Media connection failed
|
|
2256
|
+
*/
|
|
2257
|
+
|
|
2258
|
+
/**
|
|
2259
|
+
* Raised by the Client or Server whenever a media connection fails.
|
|
2260
|
+
*/
|
|
2261
|
+
|
|
2262
|
+
/**
|
|
2263
|
+
* ConnectionError
|
|
2264
|
+
*/
|
|
2265
|
+
|
|
2266
|
+
/**
|
|
2267
|
+
* If the problem persists, try connecting to another region.
|
|
2268
|
+
* Check your Client's network connectivity.
|
|
2269
|
+
* If you've provided custom ICE Servers then ensure that the URLs and credentials are valid.
|
|
2270
|
+
*/
|
|
2271
|
+
constructor(message) {
|
|
2272
|
+
super(message, 53405);
|
|
2273
|
+
|
|
2274
|
+
_defineProperty(this, "causes", ['The Client was unable to establish a media connection.', 'A media connection which was active failed liveliness checks.']);
|
|
2275
|
+
|
|
2276
|
+
_defineProperty(this, "description", 'Media connection failed');
|
|
2277
|
+
|
|
2278
|
+
_defineProperty(this, "explanation", 'Raised by the Client or Server whenever a media connection fails.');
|
|
2279
|
+
|
|
2280
|
+
_defineProperty(this, "name", 'ConnectionError');
|
|
2281
|
+
|
|
2282
|
+
_defineProperty(this, "solutions", ['If the problem persists, try connecting to another region.', 'Check your Client\'s network connectivity.', 'If you\'ve provided custom ICE Servers then ensure that the URLs and credentials are valid.']);
|
|
2283
|
+
|
|
2284
|
+
Object.setPrototypeOf(this, MediaErrors.ConnectionError.prototype);
|
|
2285
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
2286
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
2287
|
+
}
|
|
2288
|
+
|
|
2289
|
+
}
|
|
2290
|
+
|
|
2291
|
+
_MediaErrors.ConnectionError = ConnectionError;
|
|
2292
|
+
|
|
2293
|
+
class MediaDtlsTransportFailedError extends _TwilioError.TwilioError {
|
|
2294
|
+
/**
|
|
2295
|
+
* One or both of the DTLS peers have an invalid certificate.
|
|
2296
|
+
* One or both of the DTLS peers have an outdated version of DTLS.
|
|
2297
|
+
* One or both of the DTLS peers lost internet connectivity while performing a DTLS handshake.
|
|
2298
|
+
*/
|
|
2299
|
+
|
|
2300
|
+
/**
|
|
2301
|
+
* The media connection failed due to DTLS handshake failure
|
|
2302
|
+
*/
|
|
2303
|
+
|
|
2304
|
+
/**
|
|
2305
|
+
* There was a problem while negotiating with the remote DTLS peer. Therefore the Client will not be able to establish the media connection.
|
|
2306
|
+
*/
|
|
2307
|
+
|
|
2308
|
+
/**
|
|
2309
|
+
* MediaDtlsTransportFailedError
|
|
2310
|
+
*/
|
|
2311
|
+
|
|
2312
|
+
/**
|
|
2313
|
+
* Ensure that your certificate is valid.
|
|
2314
|
+
* Ensure that you have a stable internet connection.
|
|
2315
|
+
* Ensure that the browser or the Mobile SDK supports newer versions of DTLS.
|
|
2316
|
+
*/
|
|
2317
|
+
constructor(message) {
|
|
2318
|
+
super(message, 53407);
|
|
2319
|
+
|
|
2320
|
+
_defineProperty(this, "causes", ['One or both of the DTLS peers have an invalid certificate.', 'One or both of the DTLS peers have an outdated version of DTLS.', 'One or both of the DTLS peers lost internet connectivity while performing a DTLS handshake.']);
|
|
2321
|
+
|
|
2322
|
+
_defineProperty(this, "description", 'The media connection failed due to DTLS handshake failure');
|
|
2323
|
+
|
|
2324
|
+
_defineProperty(this, "explanation", 'There was a problem while negotiating with the remote DTLS peer. Therefore the Client will not be able to establish the media connection.');
|
|
2325
|
+
|
|
2326
|
+
_defineProperty(this, "name", 'MediaDtlsTransportFailedError');
|
|
2327
|
+
|
|
2328
|
+
_defineProperty(this, "solutions", ['Ensure that your certificate is valid.', 'Ensure that you have a stable internet connection.', 'Ensure that the browser or the Mobile SDK supports newer versions of DTLS.']);
|
|
2329
|
+
|
|
2330
|
+
Object.setPrototypeOf(this, MediaErrors.MediaDtlsTransportFailedError.prototype);
|
|
2331
|
+
const msg = typeof message === 'string' ? message : this.explanation;
|
|
2332
|
+
this.message = `${this.name} (${this.code}): ${msg}`;
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2335
|
+
}
|
|
2336
|
+
|
|
2337
|
+
_MediaErrors.MediaDtlsTransportFailedError = MediaDtlsTransportFailedError;
|
|
2338
|
+
})(MediaErrors || (exports.MediaErrors = MediaErrors = {}));
|
|
2339
|
+
|
|
2340
|
+
const errorsByCode = new Map([[20101, AuthorizationErrors.AccessTokenInvalid], [20102, AuthorizationErrors.AccessTokenHeaderInvalid], [20103, AuthorizationErrors.AccessTokenIssuerInvalid], [20104, AuthorizationErrors.AccessTokenExpired], [20105, AuthorizationErrors.AccessTokenNotYetValid], [20106, AuthorizationErrors.AccessTokenGrantsInvalid], [20107, AuthorizationErrors.AccessTokenSignatureInvalid], [20151, AuthorizationErrors.AuthenticationFailed], [20157, AuthorizationErrors.ExpirationTimeExceedsMaxTimeAllowed], [20403, ForbiddenErrors.Forbidden], [21218, TwiMLErrors.InvalidApplicationSid], [31005, GeneralErrors.ConnectionError], [31008, GeneralErrors.CallCancelledError], [31009, GeneralErrors.TransportError], [31100, MalformedRequestErrors.MalformedRequestError], [31201, AuthorizationErrors.AuthorizationError], [31206, AuthorizationErrors.RateExceededError], [31210, AuthorizationErrors.CallMessageEventTypeInvalidError], [31211, AuthorizationErrors.CallMessageUnexpectedStateError], [31212, AuthorizationErrors.PayloadSizeExceededError], [31301, RegistrationErrors.RegistrationError], [31302, RegistrationErrors.UnsupportedCancelMessageError], [31400, ClientErrors.BadRequest], [31401, UserMediaErrors.PermissionDeniedError], [31403, ClientErrors.Forbidden], [31404, ClientErrors.NotFound], [31408, ClientErrors.RequestTimeout], [31409, ClientErrors.Conflict], [31426, ClientErrors.UpgradeRequired], [31429, ClientErrors.TooManyRequests], [31480, ClientErrors.TemporarilyUnavailable], [31481, ClientErrors.CallTransactionDoesNotExist], [31484, ClientErrors.AddressIncomplete], [31486, ClientErrors.BusyHere], [31487, ClientErrors.RequestTerminated], [31500, ServerErrors.InternalServerError], [31502, ServerErrors.BadGateway], [31503, ServerErrors.ServiceUnavailable], [31504, ServerErrors.GatewayTimeout], [31530, ServerErrors.DNSResolutionError], [31600, SIPServerErrors.BusyEverywhere], [31603, SIPServerErrors.Decline], [31604, SIPServerErrors.DoesNotExistAnywhere], [51007, AuthorizationErrors.AccessTokenRejected], [53001, SignalingErrors.ConnectionDisconnected], [53400, MediaErrors.ClientLocalDescFailed], [53401, MediaErrors.ServerLocalDescFailed], [53402, MediaErrors.ClientRemoteDescFailed], [53403, MediaErrors.ServerRemoteDescFailed], [53404, MediaErrors.NoSupportedCodec], [53405, MediaErrors.ConnectionError], [53407, MediaErrors.MediaDtlsTransportFailedError]]);
|
|
2341
|
+
exports.errorsByCode = errorsByCode;
|
|
2342
|
+
Object.freeze(errorsByCode);
|
|
2343
|
+
//# sourceMappingURL=generated.js.map
|