@twilio/conversations 2.4.1-rc.0 → 2.4.1-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/builds/browser.js +16 -21
- package/builds/browser.js.map +1 -1
- package/builds/lib.d.ts +3 -11
- package/builds/lib.js +16 -21
- package/builds/lib.js.map +1 -1
- package/builds/twilio-conversations.js +27 -23
- package/builds/twilio-conversations.min.js +1 -1
- package/dist/media.js +20 -18
- package/dist/media.js.map +1 -1
- package/dist/packages/conversations/package.json.js +1 -1
- package/package.json +2 -2
@@ -34435,12 +34435,21 @@ this.Twilio.Conversations = (function (exports) {
|
|
34435
34435
|
}
|
34436
34436
|
/**
|
34437
34437
|
* @internal
|
34438
|
+
* This payload is compatible with Conversations' media object _state().
|
34438
34439
|
*/
|
34439
34440
|
|
34440
34441
|
}, {
|
34441
34442
|
key: "_state",
|
34442
34443
|
value: function _state() {
|
34443
|
-
|
34444
|
+
var _this$state$filename;
|
34445
|
+
|
34446
|
+
return {
|
34447
|
+
sid: this.state.sid,
|
34448
|
+
category: this.state.category,
|
34449
|
+
filename: (_this$state$filename = this.state.filename) !== null && _this$state$filename !== void 0 ? _this$state$filename : null,
|
34450
|
+
contentType: this.state.contentType,
|
34451
|
+
size: this.state.size
|
34452
|
+
};
|
34444
34453
|
}
|
34445
34454
|
}]);
|
34446
34455
|
|
@@ -34876,7 +34885,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
34876
34885
|
return Network;
|
34877
34886
|
}();
|
34878
34887
|
|
34879
|
-
var version = "0.6.6-rc.
|
34888
|
+
var version = "0.6.6-rc.1";
|
34880
34889
|
|
34881
34890
|
var _class;
|
34882
34891
|
|
@@ -36456,10 +36465,12 @@ this.Twilio.Conversations = (function (exports) {
|
|
36456
36465
|
while (1) {
|
36457
36466
|
switch (_context.prev = _context.next) {
|
36458
36467
|
case 0:
|
36459
|
-
fetchMediaRequest = _this._fetchMcsMedia();
|
36468
|
+
fetchMediaRequest = _this.mcsMedia ? undefined : _this._fetchMcsMedia();
|
36460
36469
|
contentUrlRequest = (_this$mcsMedia = _this.mcsMedia) === null || _this$mcsMedia === void 0 ? void 0 : _this$mcsMedia.getContentUrl();
|
36461
36470
|
onCancel(function () {
|
36462
|
-
fetchMediaRequest
|
36471
|
+
if (fetchMediaRequest) {
|
36472
|
+
fetchMediaRequest.cancel();
|
36473
|
+
}
|
36463
36474
|
|
36464
36475
|
if (contentUrlRequest) {
|
36465
36476
|
contentUrlRequest.cancel();
|
@@ -36467,7 +36478,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
36467
36478
|
});
|
36468
36479
|
_context.prev = 3;
|
36469
36480
|
|
36470
|
-
if (
|
36481
|
+
if (contentUrlRequest) {
|
36471
36482
|
_context.next = 9;
|
36472
36483
|
break;
|
36473
36484
|
}
|
@@ -36477,7 +36488,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
36477
36488
|
|
36478
36489
|
case 7:
|
36479
36490
|
mcsMedia = _context.sent;
|
36480
|
-
contentUrlRequest = mcsMedia.getContentUrl();
|
36491
|
+
contentUrlRequest = mcsMedia === null || mcsMedia === void 0 ? void 0 : mcsMedia.getContentUrl();
|
36481
36492
|
|
36482
36493
|
case 9:
|
36483
36494
|
_context.t0 = resolve;
|
@@ -36534,13 +36545,11 @@ this.Twilio.Conversations = (function (exports) {
|
|
36534
36545
|
while (1) {
|
36535
36546
|
switch (_context2.prev = _context2.next) {
|
36536
36547
|
case 0:
|
36537
|
-
|
36538
|
-
|
36539
|
-
if (!_this2.services.mcsClient) {
|
36540
|
-
_context2.next = 14;
|
36541
|
-
break;
|
36548
|
+
if (_this2.services.mcsClient === null) {
|
36549
|
+
reject(new Error("Media Content Service is unavailable"));
|
36542
36550
|
}
|
36543
36551
|
|
36552
|
+
request = _this2.services.mcsClient.get(_this2.state.sid);
|
36544
36553
|
onCancel(function () {
|
36545
36554
|
return request.cancel();
|
36546
36555
|
});
|
@@ -36550,27 +36559,22 @@ this.Twilio.Conversations = (function (exports) {
|
|
36550
36559
|
|
36551
36560
|
case 6:
|
36552
36561
|
_this2.mcsMedia = _context2.sent;
|
36562
|
+
_this2.state = _this2.mcsMedia._state();
|
36553
36563
|
resolve(_this2.mcsMedia);
|
36554
|
-
_context2.next =
|
36564
|
+
_context2.next = 14;
|
36555
36565
|
break;
|
36556
36566
|
|
36557
|
-
case
|
36558
|
-
_context2.prev =
|
36567
|
+
case 11:
|
36568
|
+
_context2.prev = 11;
|
36559
36569
|
_context2.t0 = _context2["catch"](3);
|
36560
36570
|
reject(_context2.t0);
|
36561
36571
|
|
36562
|
-
case 13:
|
36563
|
-
return _context2.abrupt("return");
|
36564
|
-
|
36565
36572
|
case 14:
|
36566
|
-
reject(new Error("Media Content Service is unavailable"));
|
36567
|
-
|
36568
|
-
case 15:
|
36569
36573
|
case "end":
|
36570
36574
|
return _context2.stop();
|
36571
36575
|
}
|
36572
36576
|
}
|
36573
|
-
}, _callee2, null, [[3,
|
36577
|
+
}, _callee2, null, [[3, 11]]);
|
36574
36578
|
}));
|
36575
36579
|
|
36576
36580
|
return function (_x4, _x5, _x6) {
|
@@ -36585,7 +36589,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
36585
36589
|
}, {
|
36586
36590
|
key: "_state",
|
36587
36591
|
value: function _state() {
|
36588
|
-
return this.
|
36592
|
+
return this.state;
|
36589
36593
|
}
|
36590
36594
|
}]);
|
36591
36595
|
|
@@ -42225,7 +42229,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
42225
42229
|
this.data = data.data || {};
|
42226
42230
|
});
|
42227
42231
|
|
42228
|
-
var version = "2.4.1-rc.
|
42232
|
+
var version = "2.4.1-rc.1";
|
42229
42233
|
|
42230
42234
|
function _isNativeFunction(fn) {
|
42231
42235
|
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|