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