@twilio/mcs-client 0.5.3 → 0.6.0-rc.1
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/CHANGELOG.md +8 -0
- package/builds/browser.js +506 -350
- package/builds/browser.js.map +1 -1
- package/builds/lib.d.ts +54 -26
- package/builds/lib.js +506 -350
- package/builds/lib.js.map +1 -1
- package/builds/twilio-mcs-client.js +10038 -9435
- package/builds/twilio-mcs-client.min.js +37 -37
- package/dist/cancellable-promise.js +88 -0
- package/dist/cancellable-promise.js.map +1 -0
- package/dist/client.js +88 -23
- package/dist/client.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/media.js +15 -22
- package/dist/media.js.map +1 -1
- package/dist/packages/mcs-client/package.json.js +1 -1
- package/dist/services/network.js +48 -31
- package/dist/services/network.js.map +1 -1
- package/dist/services/transport.js +11 -5
- package/dist/services/transport.js.map +1 -1
- package/package.json +1 -1
package/builds/lib.js
CHANGED
|
@@ -19,9 +19,13 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
19
19
|
|
|
20
20
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
21
21
|
|
|
22
|
+
require('core-js/modules/es.promise.js');
|
|
22
23
|
var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
|
|
23
24
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
24
|
-
require('core-js/modules/es.
|
|
25
|
+
require('core-js/modules/es.array.iterator.js');
|
|
26
|
+
require('core-js/modules/es.map.js');
|
|
27
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
28
|
+
require('core-js/modules/web.dom-collections.for-each.js');
|
|
25
29
|
var _regeneratorRuntime = require('@babel/runtime/regenerator');
|
|
26
30
|
require('core-js/modules/es.array.from.js');
|
|
27
31
|
var log$2 = require('loglevel');
|
|
@@ -30,8 +34,6 @@ require('core-js/modules/es.array.reduce.js');
|
|
|
30
34
|
require('core-js/modules/es.regexp.exec.js');
|
|
31
35
|
require('core-js/modules/es.string.split.js');
|
|
32
36
|
require('core-js/modules/es.object.assign.js');
|
|
33
|
-
require('core-js/modules/es.array.iterator.js');
|
|
34
|
-
require('core-js/modules/web.dom-collections.iterator.js');
|
|
35
37
|
require('core-js/modules/web.url.js');
|
|
36
38
|
var operationRetrier = require('@twilio/operation-retrier');
|
|
37
39
|
var declarativeTypeValidator = require('@twilio/declarative-type-validator');
|
|
@@ -39,23 +41,23 @@ var declarativeTypeValidator = require('@twilio/declarative-type-validator');
|
|
|
39
41
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
40
42
|
|
|
41
43
|
function _interopNamespace(e) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
});
|
|
54
|
-
}
|
|
44
|
+
if (e && e.__esModule) return e;
|
|
45
|
+
var n = Object.create(null);
|
|
46
|
+
if (e) {
|
|
47
|
+
Object.keys(e).forEach(function (k) {
|
|
48
|
+
if (k !== 'default') {
|
|
49
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
50
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function () {
|
|
53
|
+
return e[k];
|
|
54
|
+
}
|
|
55
55
|
});
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
n['default'] = e;
|
|
60
|
+
return Object.freeze(n);
|
|
59
61
|
}
|
|
60
62
|
|
|
61
63
|
var _asyncToGenerator__default = /*#__PURE__*/_interopDefaultLegacy(_asyncToGenerator);
|
|
@@ -63,6 +65,66 @@ var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_definePropert
|
|
|
63
65
|
var _regeneratorRuntime__default = /*#__PURE__*/_interopDefaultLegacy(_regeneratorRuntime);
|
|
64
66
|
var log__namespace = /*#__PURE__*/_interopNamespace(log$2);
|
|
65
67
|
|
|
68
|
+
/**
|
|
69
|
+
* Cancellable promise. Extends the functionality of the native Promise to include the cancel method.
|
|
70
|
+
*
|
|
71
|
+
* Example:
|
|
72
|
+
*
|
|
73
|
+
* ```ts
|
|
74
|
+
*
|
|
75
|
+
* const cancellableFetchPromise = new CancellablePromise(async (resolve, reject, onCancel) => {
|
|
76
|
+
* const request = fetch("https://example.com/");
|
|
77
|
+
*
|
|
78
|
+
* onCancel(() => request.cancel());
|
|
79
|
+
*
|
|
80
|
+
* try {
|
|
81
|
+
* const response = await request;
|
|
82
|
+
* resolve(response);
|
|
83
|
+
* } catch (err) {
|
|
84
|
+
* reject(err);
|
|
85
|
+
* }
|
|
86
|
+
* });
|
|
87
|
+
*
|
|
88
|
+
* cancellableFetchPromise.cancel();
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
class CancellablePromise extends Promise {
|
|
92
|
+
/**
|
|
93
|
+
* Creates a new CancellablePromise.
|
|
94
|
+
* @param executor A callback used to initialize the promise. This callback is passed three arguments:
|
|
95
|
+
* a resolve callback used to resolve the promise with a value or the result of another promise,
|
|
96
|
+
* a reject callback used to reject the promise with a provided reason or error,
|
|
97
|
+
* and an onCancel callback used to define behavior of cancellation.
|
|
98
|
+
*/
|
|
99
|
+
constructor(executor) {
|
|
100
|
+
var outerCancellationFunction;
|
|
101
|
+
var outerRejectPromise;
|
|
102
|
+
super((resolve, reject) => {
|
|
103
|
+
outerRejectPromise = reject;
|
|
104
|
+
return executor(resolve, reject, cancellationFunction => {
|
|
105
|
+
outerCancellationFunction = cancellationFunction;
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
this.cancel = outerCancellationFunction;
|
|
109
|
+
this.rejectPromise = outerRejectPromise;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Cancels the promise and invokes the cancellation callback if it was defined during instantiation. Cancellation will result in the promise being rejected.
|
|
113
|
+
*/
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
cancel() {
|
|
117
|
+
if (this.onCancel) {
|
|
118
|
+
this.onCancel();
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (this.rejectPromise) {
|
|
122
|
+
this.rejectPromise(new Error("Promise was cancelled"));
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
}
|
|
127
|
+
|
|
66
128
|
/*! *****************************************************************************
|
|
67
129
|
Copyright (c) Microsoft Corporation.
|
|
68
130
|
|
|
@@ -250,6 +312,7 @@ class Configuration {
|
|
|
250
312
|
* @property {String} fileName - file name, if present, null otherwise
|
|
251
313
|
* @property {MediaCategory} category - attachment category
|
|
252
314
|
*/
|
|
315
|
+
|
|
253
316
|
class Media {
|
|
254
317
|
constructor(config, network, data) {
|
|
255
318
|
this.config = config;
|
|
@@ -302,79 +365,51 @@ class Media {
|
|
|
302
365
|
*
|
|
303
366
|
* It is reasonable to build your own refresh logic upon these two functions: as soon as URL returned
|
|
304
367
|
* by getCachedContentUrl() returns 40x status you should call getContentUrl() to refresh it.
|
|
305
|
-
*
|
|
306
|
-
* @returns {Promise<string>}
|
|
307
368
|
*/
|
|
308
369
|
|
|
309
370
|
|
|
310
371
|
getContentUrl() {
|
|
311
372
|
var _this = this;
|
|
312
373
|
|
|
313
|
-
return
|
|
314
|
-
var
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
}
|
|
334
|
-
}, _callee);
|
|
335
|
-
}))();
|
|
336
|
-
}
|
|
337
|
-
/**
|
|
338
|
-
* Returns direct content URL to uploaded binary. This URL will expire after some time.
|
|
339
|
-
* This function does not support getting a new URL however. Once set it will remain the same.
|
|
340
|
-
* Use getContentUrl() to query a new one.
|
|
341
|
-
*
|
|
342
|
-
* It is reasonable to build your own refresh logic upon these two functions: as soon as URL returned
|
|
343
|
-
* by getCachedContentUrl() returns 40x status you should call getContentUrl() to refresh it.
|
|
344
|
-
*
|
|
345
|
-
* @returns {Promise<string>}
|
|
346
|
-
*/
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
getCachedContentUrl() {
|
|
350
|
-
var _this2 = this;
|
|
351
|
-
|
|
352
|
-
return _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee2() {
|
|
353
|
-
return _regeneratorRuntime__default['default'].wrap(function _callee2$(_context2) {
|
|
354
|
-
while (1) {
|
|
355
|
-
switch (_context2.prev = _context2.next) {
|
|
356
|
-
case 0:
|
|
357
|
-
if (!_this2.state.contentDirectUrl) {
|
|
358
|
-
_context2.next = 2;
|
|
374
|
+
return new CancellablePromise( /*#__PURE__*/function () {
|
|
375
|
+
var _ref = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee(resolve, reject, onCancel) {
|
|
376
|
+
var request, response;
|
|
377
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee$(_context) {
|
|
378
|
+
while (1) {
|
|
379
|
+
switch (_context.prev = _context.next) {
|
|
380
|
+
case 0:
|
|
381
|
+
request = _this.network.get("".concat(_this.config.mediaUrl, "/").concat(_this.sid));
|
|
382
|
+
onCancel(() => request.cancel());
|
|
383
|
+
_context.prev = 2;
|
|
384
|
+
_context.next = 5;
|
|
385
|
+
return request;
|
|
386
|
+
|
|
387
|
+
case 5:
|
|
388
|
+
response = _context.sent;
|
|
389
|
+
|
|
390
|
+
_this._update(response.body);
|
|
391
|
+
|
|
392
|
+
resolve(_this.state.contentDirectUrl);
|
|
393
|
+
_context.next = 13;
|
|
359
394
|
break;
|
|
360
|
-
}
|
|
361
395
|
|
|
362
|
-
|
|
396
|
+
case 10:
|
|
397
|
+
_context.prev = 10;
|
|
398
|
+
_context.t0 = _context["catch"](2);
|
|
399
|
+
reject(_context.t0);
|
|
363
400
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
case 4:
|
|
369
|
-
return _context2.abrupt("return", _context2.sent);
|
|
370
|
-
|
|
371
|
-
case 5:
|
|
372
|
-
case "end":
|
|
373
|
-
return _context2.stop();
|
|
401
|
+
case 13:
|
|
402
|
+
case "end":
|
|
403
|
+
return _context.stop();
|
|
404
|
+
}
|
|
374
405
|
}
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
|
|
406
|
+
}, _callee, null, [[2, 10]]);
|
|
407
|
+
}));
|
|
408
|
+
|
|
409
|
+
return function (_x, _x2, _x3) {
|
|
410
|
+
return _ref.apply(this, arguments);
|
|
411
|
+
};
|
|
412
|
+
}());
|
|
378
413
|
}
|
|
379
414
|
|
|
380
415
|
_update(data) {
|
|
@@ -446,64 +481,56 @@ function extractBody(xhr) {
|
|
|
446
481
|
|
|
447
482
|
class Transport {
|
|
448
483
|
static request(method, url, headers, body) {
|
|
449
|
-
return
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
var headers = parseResponseHeaders(xhr.getAllResponseHeaders());
|
|
464
|
-
var body = extractBody(xhr);
|
|
465
|
-
|
|
466
|
-
if (200 <= xhr.status && xhr.status < 300) {
|
|
467
|
-
resolve({
|
|
468
|
-
status: xhr.status,
|
|
469
|
-
headers,
|
|
470
|
-
body
|
|
471
|
-
});
|
|
472
|
-
} else {
|
|
473
|
-
var _xhr$statusText;
|
|
474
|
-
|
|
475
|
-
var status = (_xhr$statusText = xhr.statusText) !== null && _xhr$statusText !== void 0 ? _xhr$statusText : "NONE";
|
|
476
|
-
var bodyRepresentation;
|
|
477
|
-
|
|
478
|
-
if (typeof body === "string") {
|
|
479
|
-
bodyRepresentation = body && body.split("\n", 2).length === 1 ? body : "";
|
|
480
|
-
} else {
|
|
481
|
-
bodyRepresentation = JSON.stringify(body);
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
var message = "".concat(xhr.status, ": [").concat(status, "] ").concat(bodyRepresentation);
|
|
485
|
-
reject(new TransportError(message, xhr.status, body, status, headers));
|
|
486
|
-
}
|
|
487
|
-
};
|
|
484
|
+
return new CancellablePromise((resolve, reject, onCancel) => {
|
|
485
|
+
var xhr = new XHR();
|
|
486
|
+
var isCancelled = false;
|
|
487
|
+
onCancel(() => {
|
|
488
|
+
xhr.abort();
|
|
489
|
+
isCancelled = true;
|
|
490
|
+
});
|
|
491
|
+
xhr.open(method, url, true);
|
|
492
|
+
|
|
493
|
+
xhr.onreadystatechange = function onreadystatechange() {
|
|
494
|
+
if (xhr.readyState !== 4 || isCancelled) {
|
|
495
|
+
return;
|
|
496
|
+
}
|
|
488
497
|
|
|
489
|
-
|
|
490
|
-
|
|
498
|
+
var headers = parseResponseHeaders(xhr.getAllResponseHeaders());
|
|
499
|
+
var body = extractBody(xhr);
|
|
500
|
+
|
|
501
|
+
if (200 <= xhr.status && xhr.status < 300) {
|
|
502
|
+
resolve({
|
|
503
|
+
status: xhr.status,
|
|
504
|
+
headers,
|
|
505
|
+
body
|
|
506
|
+
});
|
|
507
|
+
} else {
|
|
508
|
+
var _xhr$statusText;
|
|
509
|
+
|
|
510
|
+
var status = (_xhr$statusText = xhr.statusText) !== null && _xhr$statusText !== void 0 ? _xhr$statusText : "NONE";
|
|
511
|
+
var bodyRepresentation;
|
|
512
|
+
|
|
513
|
+
if (typeof body === "string") {
|
|
514
|
+
bodyRepresentation = body && body.split("\n", 2).length === 1 ? body : "";
|
|
515
|
+
} else {
|
|
516
|
+
bodyRepresentation = JSON.stringify(body);
|
|
517
|
+
}
|
|
491
518
|
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
519
|
+
var message = "".concat(xhr.status, ": [").concat(status, "] ").concat(bodyRepresentation);
|
|
520
|
+
reject(new TransportError(message, xhr.status, body, status, headers));
|
|
521
|
+
}
|
|
522
|
+
};
|
|
496
523
|
|
|
497
|
-
|
|
498
|
-
|
|
524
|
+
for (var headerName in headers) {
|
|
525
|
+
xhr.setRequestHeader(headerName, headers[headerName]);
|
|
499
526
|
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
return _context.stop();
|
|
503
|
-
}
|
|
527
|
+
if (headerName === "Content-Type" && headers[headerName] === "application/json") {
|
|
528
|
+
body = JSON.stringify(body);
|
|
504
529
|
}
|
|
505
|
-
}
|
|
506
|
-
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
xhr.send(body);
|
|
533
|
+
});
|
|
507
534
|
}
|
|
508
535
|
/**
|
|
509
536
|
* Make a GET request by given URL
|
|
@@ -511,20 +538,7 @@ class Transport {
|
|
|
511
538
|
|
|
512
539
|
|
|
513
540
|
get(url, headers) {
|
|
514
|
-
return
|
|
515
|
-
return _regeneratorRuntime__default['default'].wrap(function _callee2$(_context2) {
|
|
516
|
-
while (1) {
|
|
517
|
-
switch (_context2.prev = _context2.next) {
|
|
518
|
-
case 0:
|
|
519
|
-
return _context2.abrupt("return", Transport.request("GET", url, headers));
|
|
520
|
-
|
|
521
|
-
case 1:
|
|
522
|
-
case "end":
|
|
523
|
-
return _context2.stop();
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
}, _callee2);
|
|
527
|
-
}))();
|
|
541
|
+
return Transport.request("GET", url, headers);
|
|
528
542
|
}
|
|
529
543
|
/**
|
|
530
544
|
* Make a POST request by given URL
|
|
@@ -532,20 +546,7 @@ class Transport {
|
|
|
532
546
|
|
|
533
547
|
|
|
534
548
|
post(url, headers, body) {
|
|
535
|
-
return
|
|
536
|
-
return _regeneratorRuntime__default['default'].wrap(function _callee3$(_context3) {
|
|
537
|
-
while (1) {
|
|
538
|
-
switch (_context3.prev = _context3.next) {
|
|
539
|
-
case 0:
|
|
540
|
-
return _context3.abrupt("return", Transport.request("POST", url, headers, body));
|
|
541
|
-
|
|
542
|
-
case 1:
|
|
543
|
-
case "end":
|
|
544
|
-
return _context3.stop();
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
}, _callee3);
|
|
548
|
-
}))();
|
|
549
|
+
return Transport.request("POST", url, headers, body);
|
|
549
550
|
}
|
|
550
551
|
|
|
551
552
|
}
|
|
@@ -571,19 +572,25 @@ class Network {
|
|
|
571
572
|
executeWithRetry(request, retryWhenThrottled) {
|
|
572
573
|
var _this = this;
|
|
573
574
|
|
|
574
|
-
return
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
575
|
+
return new CancellablePromise( /*#__PURE__*/function () {
|
|
576
|
+
var _ref2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee2(resolve, reject, onCancel) {
|
|
577
|
+
var retrier, codesToRetryOn;
|
|
578
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee2$(_context2) {
|
|
579
|
+
while (1) {
|
|
580
|
+
switch (_context2.prev = _context2.next) {
|
|
581
|
+
case 0:
|
|
582
|
+
retrier = new operationRetrier.Retrier(_this.backoffConfig());
|
|
583
|
+
onCancel(() => {
|
|
584
|
+
request.cancel();
|
|
585
|
+
retrier.removeAllListeners();
|
|
586
|
+
retrier.cancel();
|
|
587
|
+
});
|
|
588
|
+
codesToRetryOn = [502, 503, 504];
|
|
581
589
|
|
|
582
590
|
if (retryWhenThrottled) {
|
|
583
591
|
codesToRetryOn.push(429);
|
|
584
592
|
}
|
|
585
593
|
|
|
586
|
-
var retrier = new operationRetrier.Retrier(_this.backoffConfig());
|
|
587
594
|
retrier.on("attempt", /*#__PURE__*/_asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee() {
|
|
588
595
|
var result;
|
|
589
596
|
return _regeneratorRuntime__default['default'].wrap(function _callee$(_context) {
|
|
@@ -629,124 +636,148 @@ class Network {
|
|
|
629
636
|
retrier.on("cancelled", err => reject(err));
|
|
630
637
|
retrier.on("failed", err => reject(err));
|
|
631
638
|
retrier.start();
|
|
632
|
-
}));
|
|
633
639
|
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
640
|
+
case 9:
|
|
641
|
+
case "end":
|
|
642
|
+
return _context2.stop();
|
|
643
|
+
}
|
|
637
644
|
}
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
|
|
645
|
+
}, _callee2);
|
|
646
|
+
}));
|
|
647
|
+
|
|
648
|
+
return function (_x, _x2, _x3) {
|
|
649
|
+
return _ref2.apply(this, arguments);
|
|
650
|
+
};
|
|
651
|
+
}());
|
|
641
652
|
}
|
|
642
653
|
|
|
643
654
|
get(url) {
|
|
644
655
|
var _this2 = this;
|
|
645
656
|
|
|
646
|
-
return
|
|
647
|
-
var
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
657
|
+
return new CancellablePromise( /*#__PURE__*/function () {
|
|
658
|
+
var _ref4 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee3(resolve, reject, onCancel) {
|
|
659
|
+
var headers, request, response;
|
|
660
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee3$(_context3) {
|
|
661
|
+
while (1) {
|
|
662
|
+
switch (_context3.prev = _context3.next) {
|
|
663
|
+
case 0:
|
|
664
|
+
headers = {
|
|
665
|
+
"X-Twilio-Token": _this2.config.token
|
|
666
|
+
};
|
|
667
|
+
request = _this2.executeWithRetry(() => _this2.transport.get(url, headers), _this2.retryWhenThrottled());
|
|
668
|
+
log$1.trace("sending GET request to ", url, " headers ", headers);
|
|
669
|
+
onCancel(() => request.cancel());
|
|
670
|
+
_context3.prev = 4;
|
|
671
|
+
_context3.next = 7;
|
|
672
|
+
return request;
|
|
673
|
+
|
|
674
|
+
case 7:
|
|
675
|
+
response = _context3.sent;
|
|
676
|
+
log$1.trace("response", response);
|
|
677
|
+
resolve(response);
|
|
678
|
+
_context3.next = 16;
|
|
679
|
+
break;
|
|
680
|
+
|
|
681
|
+
case 12:
|
|
682
|
+
_context3.prev = 12;
|
|
683
|
+
_context3.t0 = _context3["catch"](4);
|
|
684
|
+
log$1.debug("get() error ".concat(_context3.t0));
|
|
685
|
+
reject(_context3.t0);
|
|
686
|
+
|
|
687
|
+
case 16:
|
|
688
|
+
case "end":
|
|
689
|
+
return _context3.stop();
|
|
690
|
+
}
|
|
674
691
|
}
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
|
|
692
|
+
}, _callee3, null, [[4, 12]]);
|
|
693
|
+
}));
|
|
694
|
+
|
|
695
|
+
return function (_x4, _x5, _x6) {
|
|
696
|
+
return _ref4.apply(this, arguments);
|
|
697
|
+
};
|
|
698
|
+
}());
|
|
678
699
|
}
|
|
679
700
|
|
|
680
701
|
post(url, category, media, contentType, filename) {
|
|
681
702
|
var _this3 = this;
|
|
682
703
|
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
while (1) {
|
|
687
|
-
switch (_context4.prev = _context4.next) {
|
|
688
|
-
case 0:
|
|
689
|
-
headers = {
|
|
690
|
-
"X-Twilio-Token": _this3.config.token
|
|
691
|
-
};
|
|
692
|
-
|
|
693
|
-
if ((typeof FormData === "undefined" || !(media instanceof FormData)) && contentType) {
|
|
694
|
-
Object.assign(headers, {
|
|
695
|
-
"Content-Type": contentType
|
|
696
|
-
});
|
|
697
|
-
}
|
|
704
|
+
var headers = {
|
|
705
|
+
"X-Twilio-Token": this.config.token
|
|
706
|
+
};
|
|
698
707
|
|
|
699
|
-
|
|
708
|
+
if ((typeof FormData === "undefined" || !(media instanceof FormData)) && contentType) {
|
|
709
|
+
Object.assign(headers, {
|
|
710
|
+
"Content-Type": contentType
|
|
711
|
+
});
|
|
712
|
+
}
|
|
700
713
|
|
|
701
|
-
|
|
702
|
-
fullUrl.searchParams.append("Category", category);
|
|
703
|
-
}
|
|
714
|
+
var fullUrl = new URL(url);
|
|
704
715
|
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
716
|
+
if (category) {
|
|
717
|
+
fullUrl.searchParams.append("Category", category);
|
|
718
|
+
}
|
|
708
719
|
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
return _this3.transport.post(fullUrl.href, headers, media);
|
|
720
|
+
if (filename) {
|
|
721
|
+
fullUrl.searchParams.append("Filename", filename);
|
|
722
|
+
}
|
|
713
723
|
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
724
|
+
return new CancellablePromise( /*#__PURE__*/function () {
|
|
725
|
+
var _ref5 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee4(resolve, reject, onCancel) {
|
|
726
|
+
var request, response;
|
|
727
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee4$(_context4) {
|
|
728
|
+
while (1) {
|
|
729
|
+
switch (_context4.prev = _context4.next) {
|
|
730
|
+
case 0:
|
|
731
|
+
request = _this3.transport.post(fullUrl.href, headers, media);
|
|
732
|
+
onCancel(() => request.cancel());
|
|
733
|
+
log$1.trace("sending POST request to ".concat(url, " with headers ").concat(headers));
|
|
734
|
+
_context4.prev = 3;
|
|
735
|
+
_context4.next = 6;
|
|
736
|
+
return request;
|
|
737
|
+
|
|
738
|
+
case 6:
|
|
739
|
+
response = _context4.sent;
|
|
740
|
+
_context4.next = 17;
|
|
741
|
+
break;
|
|
718
742
|
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
743
|
+
case 9:
|
|
744
|
+
_context4.prev = 9;
|
|
745
|
+
_context4.t0 = _context4["catch"](3);
|
|
722
746
|
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
747
|
+
if (!(global["XMLHttpRequest"] === undefined && media instanceof FormData)) {
|
|
748
|
+
_context4.next = 14;
|
|
749
|
+
break;
|
|
750
|
+
}
|
|
727
751
|
|
|
728
|
-
|
|
752
|
+
reject(new TypeError("Posting FormData supported only with browser engine's FormData"));
|
|
753
|
+
return _context4.abrupt("return");
|
|
729
754
|
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
755
|
+
case 14:
|
|
756
|
+
log$1.debug("post() error ".concat(_context4.t0));
|
|
757
|
+
reject(_context4.t0);
|
|
758
|
+
return _context4.abrupt("return");
|
|
733
759
|
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
760
|
+
case 17:
|
|
761
|
+
log$1.trace("response", response);
|
|
762
|
+
resolve(response);
|
|
737
763
|
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
764
|
+
case 19:
|
|
765
|
+
case "end":
|
|
766
|
+
return _context4.stop();
|
|
767
|
+
}
|
|
741
768
|
}
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
|
|
769
|
+
}, _callee4, null, [[3, 9]]);
|
|
770
|
+
}));
|
|
771
|
+
|
|
772
|
+
return function (_x7, _x8, _x9) {
|
|
773
|
+
return _ref5.apply(this, arguments);
|
|
774
|
+
};
|
|
775
|
+
}());
|
|
745
776
|
}
|
|
746
777
|
|
|
747
778
|
}
|
|
748
779
|
|
|
749
|
-
var version = "0.
|
|
780
|
+
var version = "0.6.0-rc.1";
|
|
750
781
|
|
|
751
782
|
var _class, _temp;
|
|
752
783
|
var log = Logger.scope("");
|
|
@@ -799,66 +830,96 @@ exports['default'] = (_temp = _class = class Client {
|
|
|
799
830
|
/**
|
|
800
831
|
* Gets media from media service
|
|
801
832
|
* @param {String} sid - Media's SID
|
|
802
|
-
* @returns {Promise<Media>}
|
|
803
833
|
*/
|
|
804
834
|
|
|
805
835
|
|
|
806
836
|
get(sid) {
|
|
807
837
|
var _this = this;
|
|
808
838
|
|
|
809
|
-
return
|
|
810
|
-
var
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
839
|
+
return new CancellablePromise( /*#__PURE__*/function () {
|
|
840
|
+
var _ref = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee(resolve, reject, onCancel) {
|
|
841
|
+
var request, response;
|
|
842
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee$(_context) {
|
|
843
|
+
while (1) {
|
|
844
|
+
switch (_context.prev = _context.next) {
|
|
845
|
+
case 0:
|
|
846
|
+
request = _this.network.get("".concat(_this.config.mediaUrl, "/").concat(sid));
|
|
847
|
+
onCancel(() => request.cancel());
|
|
848
|
+
_context.prev = 2;
|
|
849
|
+
_context.next = 5;
|
|
850
|
+
return request;
|
|
851
|
+
|
|
852
|
+
case 5:
|
|
853
|
+
response = _context.sent;
|
|
854
|
+
resolve(new Media(_this.config, _this.network, response.body));
|
|
855
|
+
_context.next = 12;
|
|
856
|
+
break;
|
|
857
|
+
|
|
858
|
+
case 9:
|
|
859
|
+
_context.prev = 9;
|
|
860
|
+
_context.t0 = _context["catch"](2);
|
|
861
|
+
reject(_context.t0);
|
|
862
|
+
|
|
863
|
+
case 12:
|
|
864
|
+
case "end":
|
|
865
|
+
return _context.stop();
|
|
866
|
+
}
|
|
825
867
|
}
|
|
826
|
-
}
|
|
827
|
-
}
|
|
828
|
-
|
|
868
|
+
}, _callee, null, [[2, 9]]);
|
|
869
|
+
}));
|
|
870
|
+
|
|
871
|
+
return function (_x, _x2, _x3) {
|
|
872
|
+
return _ref.apply(this, arguments);
|
|
873
|
+
};
|
|
874
|
+
}());
|
|
829
875
|
}
|
|
830
876
|
/**
|
|
831
877
|
* Posts raw content to media service
|
|
832
878
|
* @param {String} contentType - content type of media
|
|
833
879
|
* @param {String|Buffer|Blob} media - content to post
|
|
834
880
|
* @param {MediaCategory|null} category - category for the media
|
|
835
|
-
* @returns {Promise<Media>}
|
|
836
881
|
*/
|
|
837
882
|
|
|
838
883
|
|
|
839
884
|
post(contentType, media, category, filename) {
|
|
840
885
|
var _this2 = this;
|
|
841
886
|
|
|
842
|
-
return
|
|
843
|
-
var
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
887
|
+
return new CancellablePromise( /*#__PURE__*/function () {
|
|
888
|
+
var _ref2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee2(resolve, reject, onCancel) {
|
|
889
|
+
var request, response;
|
|
890
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee2$(_context2) {
|
|
891
|
+
while (1) {
|
|
892
|
+
switch (_context2.prev = _context2.next) {
|
|
893
|
+
case 0:
|
|
894
|
+
request = _this2.network.post(_this2.config.mediaUrl, category !== null && category !== void 0 ? category : "media", media, contentType, filename);
|
|
895
|
+
onCancel(() => request.cancel());
|
|
896
|
+
_context2.prev = 2;
|
|
897
|
+
_context2.next = 5;
|
|
898
|
+
return request;
|
|
899
|
+
|
|
900
|
+
case 5:
|
|
901
|
+
response = _context2.sent;
|
|
902
|
+
resolve(new Media(_this2.config, _this2.network, response.body));
|
|
903
|
+
_context2.next = 12;
|
|
904
|
+
break;
|
|
905
|
+
|
|
906
|
+
case 9:
|
|
907
|
+
_context2.prev = 9;
|
|
908
|
+
_context2.t0 = _context2["catch"](2);
|
|
909
|
+
reject(_context2.t0);
|
|
910
|
+
|
|
911
|
+
case 12:
|
|
912
|
+
case "end":
|
|
913
|
+
return _context2.stop();
|
|
914
|
+
}
|
|
858
915
|
}
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
|
|
916
|
+
}, _callee2, null, [[2, 9]]);
|
|
917
|
+
}));
|
|
918
|
+
|
|
919
|
+
return function (_x4, _x5, _x6) {
|
|
920
|
+
return _ref2.apply(this, arguments);
|
|
921
|
+
};
|
|
922
|
+
}());
|
|
862
923
|
}
|
|
863
924
|
/**
|
|
864
925
|
* Posts FormData to media service. Can be used only with browser engine's FormData.
|
|
@@ -866,33 +927,48 @@ exports['default'] = (_temp = _class = class Client {
|
|
|
866
927
|
* new TypeError("Posting FormData supported only with browser engine's FormData")
|
|
867
928
|
* @param {FormData} formData - form data to post
|
|
868
929
|
* @param {MediaCategory|null} category - category for the media
|
|
869
|
-
* @returns {Promise<Media>}
|
|
870
930
|
*/
|
|
871
931
|
|
|
872
932
|
|
|
873
933
|
postFormData(formData, category) {
|
|
874
934
|
var _this3 = this;
|
|
875
935
|
|
|
876
|
-
return
|
|
877
|
-
var
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
936
|
+
return new CancellablePromise( /*#__PURE__*/function () {
|
|
937
|
+
var _ref3 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee3(resolve, reject, onCancel) {
|
|
938
|
+
var request, response;
|
|
939
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee3$(_context3) {
|
|
940
|
+
while (1) {
|
|
941
|
+
switch (_context3.prev = _context3.next) {
|
|
942
|
+
case 0:
|
|
943
|
+
request = _this3.network.post(_this3.config.mediaUrl, category !== null && category !== void 0 ? category : "media", formData);
|
|
944
|
+
onCancel(() => request.cancel());
|
|
945
|
+
_context3.prev = 2;
|
|
946
|
+
_context3.next = 5;
|
|
947
|
+
return request;
|
|
948
|
+
|
|
949
|
+
case 5:
|
|
950
|
+
response = _context3.sent;
|
|
951
|
+
resolve(new Media(_this3.config, _this3.network, response.body));
|
|
952
|
+
_context3.next = 12;
|
|
953
|
+
break;
|
|
954
|
+
|
|
955
|
+
case 9:
|
|
956
|
+
_context3.prev = 9;
|
|
957
|
+
_context3.t0 = _context3["catch"](2);
|
|
958
|
+
reject(_context3.t0);
|
|
959
|
+
|
|
960
|
+
case 12:
|
|
961
|
+
case "end":
|
|
962
|
+
return _context3.stop();
|
|
963
|
+
}
|
|
892
964
|
}
|
|
893
|
-
}
|
|
894
|
-
}
|
|
895
|
-
|
|
965
|
+
}, _callee3, null, [[2, 9]]);
|
|
966
|
+
}));
|
|
967
|
+
|
|
968
|
+
return function (_x7, _x8, _x9) {
|
|
969
|
+
return _ref3.apply(this, arguments);
|
|
970
|
+
};
|
|
971
|
+
}());
|
|
896
972
|
}
|
|
897
973
|
/**
|
|
898
974
|
* Retrieve information about multiple media SIDs at the same time.
|
|
@@ -903,48 +979,128 @@ exports['default'] = (_temp = _class = class Client {
|
|
|
903
979
|
mediaSetGet(mediaSids) {
|
|
904
980
|
var _this4 = this;
|
|
905
981
|
|
|
906
|
-
return
|
|
907
|
-
var
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
982
|
+
return new CancellablePromise( /*#__PURE__*/function () {
|
|
983
|
+
var _ref4 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee4(resolve, reject, onCancel) {
|
|
984
|
+
var query, request, response, media;
|
|
985
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee4$(_context4) {
|
|
986
|
+
while (1) {
|
|
987
|
+
switch (_context4.prev = _context4.next) {
|
|
988
|
+
case 0:
|
|
989
|
+
query = {
|
|
990
|
+
command: "get",
|
|
991
|
+
list: mediaSids.map(sid => ({
|
|
992
|
+
media_sid: sid
|
|
993
|
+
}))
|
|
994
|
+
};
|
|
995
|
+
request = _this4.network.post("".concat(_this4.config.mediaSetUrl), null, query, "application/json");
|
|
996
|
+
onCancel(() => request.cancel());
|
|
997
|
+
_context4.prev = 3;
|
|
998
|
+
_context4.next = 6;
|
|
999
|
+
return request;
|
|
1000
|
+
|
|
1001
|
+
case 6:
|
|
1002
|
+
response = _context4.sent;
|
|
1003
|
+
media = response.body.map(item => {
|
|
1004
|
+
if (item.code !== 200) {
|
|
1005
|
+
reject("Failed to obtain detailed information about Media items (failed SID ".concat(item.media_record.sid, ")"));
|
|
1006
|
+
return;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
return new Media(_this4.config, _this4.network, item.media_record);
|
|
1010
|
+
});
|
|
1011
|
+
resolve(media);
|
|
1012
|
+
_context4.next = 14;
|
|
1013
|
+
break;
|
|
927
1014
|
|
|
928
|
-
|
|
929
|
-
|
|
1015
|
+
case 11:
|
|
1016
|
+
_context4.prev = 11;
|
|
1017
|
+
_context4.t0 = _context4["catch"](3);
|
|
1018
|
+
reject(_context4.t0);
|
|
930
1019
|
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
1020
|
+
case 14:
|
|
1021
|
+
case "end":
|
|
1022
|
+
return _context4.stop();
|
|
1023
|
+
}
|
|
934
1024
|
}
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
|
|
1025
|
+
}, _callee4, null, [[3, 11]]);
|
|
1026
|
+
}));
|
|
1027
|
+
|
|
1028
|
+
return function (_x10, _x11, _x12) {
|
|
1029
|
+
return _ref4.apply(this, arguments);
|
|
1030
|
+
};
|
|
1031
|
+
}());
|
|
1032
|
+
}
|
|
1033
|
+
/**
|
|
1034
|
+
* Retrieve temporary URLs for a set of media SIDs.
|
|
1035
|
+
* @param mediaSids array of the media SIDs to get URLs from.
|
|
1036
|
+
*/
|
|
1037
|
+
|
|
1038
|
+
|
|
1039
|
+
mediaSetGetContentUrls(mediaSids) {
|
|
1040
|
+
var _this5 = this;
|
|
1041
|
+
|
|
1042
|
+
return new CancellablePromise( /*#__PURE__*/function () {
|
|
1043
|
+
var _ref5 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee5(resolve, reject, onCancel) {
|
|
1044
|
+
var query, request, response, urls;
|
|
1045
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee5$(_context5) {
|
|
1046
|
+
while (1) {
|
|
1047
|
+
switch (_context5.prev = _context5.next) {
|
|
1048
|
+
case 0:
|
|
1049
|
+
query = {
|
|
1050
|
+
command: "get",
|
|
1051
|
+
list: mediaSids.map(sid => ({
|
|
1052
|
+
media_sid: sid
|
|
1053
|
+
}))
|
|
1054
|
+
};
|
|
1055
|
+
request = _this5.network.post("".concat(_this5.config.mediaSetUrl), null, query, "application/json");
|
|
1056
|
+
onCancel(() => request.cancel());
|
|
1057
|
+
_context5.prev = 3;
|
|
1058
|
+
_context5.next = 6;
|
|
1059
|
+
return request;
|
|
1060
|
+
|
|
1061
|
+
case 6:
|
|
1062
|
+
response = _context5.sent;
|
|
1063
|
+
urls = new Map();
|
|
1064
|
+
response.body.forEach(item => {
|
|
1065
|
+
if (item.code !== 200) {
|
|
1066
|
+
reject("Failed to obtain detailed information about Media items (failed SID ".concat(item.media_record.sid, ")"));
|
|
1067
|
+
return;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
urls.set(item.media_record.sid, item.media_record.links.content_direct_temporary);
|
|
1071
|
+
});
|
|
1072
|
+
resolve(urls);
|
|
1073
|
+
_context5.next = 15;
|
|
1074
|
+
break;
|
|
1075
|
+
|
|
1076
|
+
case 12:
|
|
1077
|
+
_context5.prev = 12;
|
|
1078
|
+
_context5.t0 = _context5["catch"](3);
|
|
1079
|
+
reject(_context5.t0);
|
|
1080
|
+
|
|
1081
|
+
case 15:
|
|
1082
|
+
case "end":
|
|
1083
|
+
return _context5.stop();
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
}, _callee5, null, [[3, 12]]);
|
|
1087
|
+
}));
|
|
1088
|
+
|
|
1089
|
+
return function (_x13, _x14, _x15) {
|
|
1090
|
+
return _ref5.apply(this, arguments);
|
|
1091
|
+
};
|
|
1092
|
+
}());
|
|
938
1093
|
}
|
|
939
1094
|
|
|
940
1095
|
}, _defineProperty__default['default'](_class, "version", version), _temp);
|
|
941
1096
|
|
|
942
1097
|
__decorate([declarativeTypeValidator.validateTypes(declarativeTypeValidator.nonEmptyString), __metadata("design:type", Function), __metadata("design:paramtypes", [String]), __metadata("design:returntype", void 0)], exports['default'].prototype, "updateToken", null);
|
|
943
1098
|
|
|
944
|
-
__decorate([declarativeTypeValidator.validateTypesAsync(declarativeTypeValidator.nonEmptyString), __metadata("design:type", Function), __metadata("design:paramtypes", [String]), __metadata("design:returntype",
|
|
1099
|
+
__decorate([declarativeTypeValidator.validateTypesAsync(declarativeTypeValidator.nonEmptyString), __metadata("design:type", Function), __metadata("design:paramtypes", [String]), __metadata("design:returntype", CancellablePromise)], exports['default'].prototype, "get", null);
|
|
945
1100
|
|
|
946
1101
|
exports['default'] = __decorate([declarativeTypeValidator.validateConstructorTypes(declarativeTypeValidator.nonEmptyString, declarativeTypeValidator.nonEmptyString, [declarativeTypeValidator.nonEmptyString, declarativeTypeValidator.literal(null)], [declarativeTypeValidator.pureObject, "undefined"]), __metadata("design:paramtypes", [String, String, Object, Object])], exports['default']); // Proper renames should happen in index.ts,
|
|
947
1102
|
|
|
1103
|
+
exports.CancellablePromise = CancellablePromise;
|
|
948
1104
|
exports.Client = exports['default'];
|
|
949
1105
|
exports.McsClient = exports['default'];
|
|
950
1106
|
exports.McsMedia = Media;
|