@twilio/conversations 2.3.0-rc.0 → 2.3.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/builds/browser.js +53 -30
- package/builds/browser.js.map +1 -1
- package/builds/lib.js +44 -30
- package/builds/lib.js.map +1 -1
- package/builds/twilio-conversations.js +54 -31
- package/builds/twilio-conversations.min.js +1 -1
- package/dist/aggregated-delivery-receipt.js +9 -0
- package/dist/aggregated-delivery-receipt.js.map +1 -1
- package/dist/client.js +9 -0
- package/dist/client.js.map +1 -1
- package/dist/command-executor.js +9 -0
- package/dist/command-executor.js.map +1 -1
- package/dist/configuration.js +9 -0
- package/dist/configuration.js.map +1 -1
- package/dist/content-client.js +9 -0
- package/dist/content-client.js.map +1 -1
- package/dist/content-template.js +9 -0
- package/dist/content-template.js.map +1 -1
- package/dist/conversation.js +9 -0
- package/dist/conversation.js.map +1 -1
- package/dist/data/conversations.js +9 -0
- package/dist/data/conversations.js.map +1 -1
- package/dist/data/messages.js +9 -0
- package/dist/data/messages.js.map +1 -1
- package/dist/data/participants.js +9 -0
- package/dist/data/participants.js.map +1 -1
- package/dist/data/users.js +9 -0
- package/dist/data/users.js.map +1 -1
- package/dist/detailed-delivery-receipt.js +9 -0
- package/dist/detailed-delivery-receipt.js.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/interfaces/attributes.js +9 -0
- package/dist/interfaces/attributes.js.map +1 -1
- package/dist/interfaces/notification-types.js +9 -0
- package/dist/interfaces/notification-types.js.map +1 -1
- package/dist/logger.js +9 -0
- package/dist/logger.js.map +1 -1
- package/dist/media.js +9 -0
- package/dist/media.js.map +1 -1
- package/dist/message-builder.js +9 -0
- package/dist/message-builder.js.map +1 -1
- package/dist/message.js +34 -10
- package/dist/message.js.map +1 -1
- package/dist/node_modules/tslib/tslib.es6.js +9 -0
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -1
- package/dist/packages/conversations/package.json.js +10 -1
- package/dist/packages/conversations/package.json.js.map +1 -1
- package/dist/participant.js +9 -0
- package/dist/participant.js.map +1 -1
- package/dist/push-notification.js +9 -0
- package/dist/push-notification.js.map +1 -1
- package/dist/rest-paginator.js +9 -0
- package/dist/rest-paginator.js.map +1 -1
- package/dist/services/network.js +9 -0
- package/dist/services/network.js.map +1 -1
- package/dist/services/typing-indicator.js +9 -0
- package/dist/services/typing-indicator.js.map +1 -1
- package/dist/unsent-message.js +9 -0
- package/dist/unsent-message.js.map +1 -1
- package/dist/user.js +9 -0
- package/dist/user.js.map +1 -1
- package/dist/util/deferred.js +9 -0
- package/dist/util/deferred.js.map +1 -1
- package/dist/util/index.js +9 -0
- package/dist/util/index.js.map +1 -1
- package/package.json +9 -8
@@ -130,6 +130,15 @@ this.Twilio = this.Twilio || {};
|
|
130
130
|
this.Twilio.Conversations = (function (exports) {
|
131
131
|
'use strict';
|
132
132
|
|
133
|
+
var global =
|
134
|
+
typeof global !== "undefined"
|
135
|
+
? global
|
136
|
+
: typeof self !== "undefined"
|
137
|
+
? self
|
138
|
+
: typeof window !== "undefined"
|
139
|
+
? window
|
140
|
+
: {};
|
141
|
+
|
133
142
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
134
143
|
|
135
144
|
function getAugmentedNamespace(n) {
|
@@ -34850,7 +34859,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
34850
34859
|
return Network;
|
34851
34860
|
}();
|
34852
34861
|
|
34853
|
-
var version = "0.6.4-rc.
|
34862
|
+
var version = "0.6.4-rc.1";
|
34854
34863
|
|
34855
34864
|
var _class;
|
34856
34865
|
|
@@ -36984,10 +36993,14 @@ this.Twilio.Conversations = (function (exports) {
|
|
36984
36993
|
|
36985
36994
|
function _isNativeReflectConstruct$5() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
36986
36995
|
var log$3 = Logger.scope("Message");
|
36996
|
+
|
36997
|
+
var XHR = // eslint-disable-next-line @typescript-eslint/no-var-requires
|
36998
|
+
global["XMLHttpRequest"] || require("xmlhttprequest").XMLHttpRequest;
|
36987
36999
|
/**
|
36988
37000
|
* A message in a conversation.
|
36989
37001
|
*/
|
36990
37002
|
|
37003
|
+
|
36991
37004
|
var Message = /*#__PURE__*/function (_ReplayEventEmitter) {
|
36992
37005
|
_inherits$4(Message, _ReplayEventEmitter);
|
36993
37006
|
|
@@ -37754,7 +37767,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
37754
37767
|
|
37755
37768
|
return new browser$1.CancellablePromise( /*#__PURE__*/function () {
|
37756
37769
|
var _ref2 = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime$1.mark(function _callee9(resolve, reject, onCancel) {
|
37757
|
-
var bodies, twilioPrefix, filteredMedias, contentMedia, urlPromise, url,
|
37770
|
+
var bodies, twilioPrefix, filteredMedias, contentMedia, urlPromise, url, jsonStringPromise, json, jsonString, dataType;
|
37758
37771
|
return _regeneratorRuntime$1.wrap(function _callee9$(_context9) {
|
37759
37772
|
while (1) {
|
37760
37773
|
switch (_context9.prev = _context9.next) {
|
@@ -37823,49 +37836,59 @@ this.Twilio.Conversations = (function (exports) {
|
|
37823
37836
|
return _context9.abrupt("return");
|
37824
37837
|
|
37825
37838
|
case 28:
|
37826
|
-
|
37827
|
-
|
37828
|
-
signal: abortController.signal
|
37829
|
-
});
|
37830
|
-
onCancel(function () {
|
37831
|
-
abortController.abort();
|
37832
|
-
});
|
37833
|
-
_context9.prev = 31;
|
37834
|
-
_context9.next = 34;
|
37835
|
-
return responsePromise;
|
37839
|
+
jsonStringPromise = new Promise(function (resolve, reject) {
|
37840
|
+
var _url;
|
37836
37841
|
|
37837
|
-
|
37838
|
-
|
37839
|
-
|
37840
|
-
|
37842
|
+
var isCancelled = false;
|
37843
|
+
var xhr = new XHR();
|
37844
|
+
xhr.open("GET", (_url = url) !== null && _url !== void 0 ? _url : "", true);
|
37845
|
+
xhr.responseType = "text";
|
37841
37846
|
|
37842
|
-
|
37843
|
-
|
37844
|
-
|
37845
|
-
|
37847
|
+
xhr.onreadystatechange = function () {
|
37848
|
+
if (xhr.readyState !== 4 || isCancelled) {
|
37849
|
+
return;
|
37850
|
+
}
|
37846
37851
|
|
37847
|
-
|
37848
|
-
|
37849
|
-
|
37850
|
-
|
37852
|
+
resolve(xhr.responseText);
|
37853
|
+
};
|
37854
|
+
|
37855
|
+
xhr.onerror = function () {
|
37856
|
+
reject(xhr.statusText);
|
37857
|
+
};
|
37858
|
+
|
37859
|
+
onCancel(function () {
|
37860
|
+
isCancelled = true;
|
37861
|
+
xhr.abort();
|
37862
|
+
reject(new Error("XHR has been aborted"));
|
37863
|
+
});
|
37864
|
+
xhr.send();
|
37865
|
+
});
|
37866
|
+
_context9.prev = 29;
|
37867
|
+
_context9.next = 32;
|
37868
|
+
return jsonStringPromise;
|
37869
|
+
|
37870
|
+
case 32:
|
37871
|
+
jsonString = _context9.sent;
|
37872
|
+
json = JSON.parse(jsonString);
|
37873
|
+
_context9.next = 40;
|
37851
37874
|
break;
|
37852
37875
|
|
37853
|
-
case
|
37854
|
-
_context9.prev =
|
37855
|
-
_context9.t1 = _context9["catch"](
|
37876
|
+
case 36:
|
37877
|
+
_context9.prev = 36;
|
37878
|
+
_context9.t1 = _context9["catch"](29);
|
37856
37879
|
reject(_context9.t1);
|
37857
37880
|
return _context9.abrupt("return");
|
37858
37881
|
|
37859
|
-
case
|
37882
|
+
case 40:
|
37860
37883
|
dataType = contentMedia.contentType.replace(twilioPrefix, "").replace(".", "/");
|
37861
37884
|
resolve(parseVariant(dataType, json.data));
|
37862
37885
|
|
37863
|
-
case
|
37886
|
+
case 42:
|
37864
37887
|
case "end":
|
37865
37888
|
return _context9.stop();
|
37866
37889
|
}
|
37867
37890
|
}
|
37868
|
-
}, _callee9, null, [[15, 21], [
|
37891
|
+
}, _callee9, null, [[15, 21], [29, 36]]);
|
37869
37892
|
}));
|
37870
37893
|
|
37871
37894
|
return function (_x8, _x9, _x10) {
|
@@ -41951,7 +41974,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
41951
41974
|
this.data = data.data || {};
|
41952
41975
|
});
|
41953
41976
|
|
41954
|
-
var version = "2.3.0-rc.
|
41977
|
+
var version = "2.3.0-rc.1";
|
41955
41978
|
|
41956
41979
|
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
41957
41980
|
|