@twilio/conversations 2.5.0 → 2.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/README.md +2 -2
- package/builds/browser.esm.js +10730 -0
- package/builds/browser.esm.js.map +1 -0
- package/builds/browser.js +183 -9
- package/builds/browser.js.map +1 -1
- package/builds/lib.d.ts +6 -1
- package/builds/lib.esm.d.ts +3171 -0
- package/builds/lib.esm.js +10729 -0
- package/builds/lib.js +192 -9
- package/builds/lib.js.map +1 -1
- package/builds/twilio-conversations.js +324 -150
- package/builds/twilio-conversations.min.js +1 -1
- package/dist/aggregated-delivery-receipt.js +3 -5
- package/dist/aggregated-delivery-receipt.js.map +1 -1
- package/dist/channel-metadata-client.js +7 -9
- package/dist/channel-metadata-client.js.map +1 -1
- package/dist/client.js +207 -158
- package/dist/client.js.map +1 -1
- package/dist/command-executor.js +8 -8
- package/dist/command-executor.js.map +1 -1
- package/dist/configuration.js +12 -9
- package/dist/configuration.js.map +1 -1
- package/dist/content-client.js +11 -8
- package/dist/content-client.js.map +1 -1
- package/dist/content-template.js +3 -5
- package/dist/content-template.js.map +1 -1
- package/dist/conversation.js +113 -87
- package/dist/conversation.js.map +1 -1
- package/dist/data/conversations.js +42 -40
- package/dist/data/conversations.js.map +1 -1
- package/dist/data/messages.js +18 -22
- package/dist/data/messages.js.map +1 -1
- package/dist/data/participants.js +25 -23
- package/dist/data/participants.js.map +1 -1
- package/dist/data/users.js +15 -13
- package/dist/data/users.js.map +1 -1
- package/dist/detailed-delivery-receipt.js +3 -5
- package/dist/detailed-delivery-receipt.js.map +1 -1
- package/dist/index.js +17 -49
- package/dist/index.js.map +1 -1
- package/dist/interfaces/notification-types.js +1 -5
- package/dist/interfaces/notification-types.js.map +1 -1
- package/dist/interfaces/rules.js +13 -10
- package/dist/interfaces/rules.js.map +1 -1
- package/dist/logger.js +25 -26
- package/dist/logger.js.map +1 -1
- package/dist/media.js +11 -8
- package/dist/media.js.map +1 -1
- package/dist/message-builder.js +48 -40
- package/dist/message-builder.js.map +1 -1
- package/dist/message-recipients-client.js +10 -12
- package/dist/message-recipients-client.js.map +1 -1
- package/dist/message.js +88 -75
- package/dist/message.js.map +1 -1
- package/dist/node_modules/quick-lru/index.js +1 -5
- package/dist/node_modules/quick-lru/index.js.map +1 -1
- package/dist/node_modules/tslib/tslib.es6.js +1 -7
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -1
- package/dist/packages/conversations/package.json.js +2 -6
- package/dist/packages/conversations/package.json.js.map +1 -1
- package/dist/participant.js +34 -29
- package/dist/participant.js.map +1 -1
- package/dist/push-notification.js +5 -4
- package/dist/push-notification.js.map +1 -1
- package/dist/rest-paginator.js +6 -4
- package/dist/rest-paginator.js.map +1 -1
- package/dist/services/network.js +3 -7
- package/dist/services/network.js.map +1 -1
- package/dist/services/typing-indicator.js +11 -8
- package/dist/services/typing-indicator.js.map +1 -1
- package/dist/unsent-message.js +9 -8
- package/dist/unsent-message.js.map +1 -1
- package/dist/user.js +27 -24
- package/dist/user.js.map +1 -1
- package/dist/util/deferred.js +6 -4
- package/dist/util/deferred.js.map +1 -1
- package/dist/util/index.js +1 -9
- package/dist/util/index.js.map +1 -1
- package/docs/assets/js/search.js +1 -1
- package/docs/classes/Client.html +4 -4
- package/docs/classes/Media.html +2 -2
- package/docs/classes/Message.html +8 -8
- package/docs/classes/MessageBuilder.html +2 -2
- package/docs/classes/UnsentMessage.html +2 -2
- package/docs/index.html +3 -7
- package/docs/modules.html +2 -6
- package/package.json +2 -2
- package/docs/classes/CancellablePromise.html +0 -3213
@@ -1851,6 +1851,21 @@ this.Twilio.Conversations = (function (exports) {
|
|
1851
1851
|
}
|
1852
1852
|
}
|
1853
1853
|
|
1854
|
+
var $$q = _export;
|
1855
|
+
var $map$1 = arrayIteration.map;
|
1856
|
+
var arrayMethodHasSpeciesSupport$3 = arrayMethodHasSpeciesSupport$5;
|
1857
|
+
|
1858
|
+
var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport$3('map');
|
1859
|
+
|
1860
|
+
// `Array.prototype.map` method
|
1861
|
+
// https://tc39.es/ecma262/#sec-array.prototype.map
|
1862
|
+
// with adding support of @@species
|
1863
|
+
$$q({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 }, {
|
1864
|
+
map: function map(callbackfn /* , thisArg */) {
|
1865
|
+
return $map$1(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
1866
|
+
}
|
1867
|
+
});
|
1868
|
+
|
1854
1869
|
var wellKnownSymbol$l = wellKnownSymbol$s;
|
1855
1870
|
|
1856
1871
|
var TO_STRING_TAG$3 = wellKnownSymbol$l('toStringTag');
|
@@ -1906,9 +1921,96 @@ this.Twilio.Conversations = (function (exports) {
|
|
1906
1921
|
redefine$a(Object.prototype, 'toString', toString$b, { unsafe: true });
|
1907
1922
|
}
|
1908
1923
|
|
1924
|
+
// iterable DOM collections
|
1925
|
+
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
1926
|
+
var domIterables = {
|
1927
|
+
CSSRuleList: 0,
|
1928
|
+
CSSStyleDeclaration: 0,
|
1929
|
+
CSSValueList: 0,
|
1930
|
+
ClientRectList: 0,
|
1931
|
+
DOMRectList: 0,
|
1932
|
+
DOMStringList: 0,
|
1933
|
+
DOMTokenList: 1,
|
1934
|
+
DataTransferItemList: 0,
|
1935
|
+
FileList: 0,
|
1936
|
+
HTMLAllCollection: 0,
|
1937
|
+
HTMLCollection: 0,
|
1938
|
+
HTMLFormElement: 0,
|
1939
|
+
HTMLSelectElement: 0,
|
1940
|
+
MediaList: 0,
|
1941
|
+
MimeTypeArray: 0,
|
1942
|
+
NamedNodeMap: 0,
|
1943
|
+
NodeList: 1,
|
1944
|
+
PaintRequestList: 0,
|
1945
|
+
Plugin: 0,
|
1946
|
+
PluginArray: 0,
|
1947
|
+
SVGLengthList: 0,
|
1948
|
+
SVGNumberList: 0,
|
1949
|
+
SVGPathSegList: 0,
|
1950
|
+
SVGPointList: 0,
|
1951
|
+
SVGStringList: 0,
|
1952
|
+
SVGTransformList: 0,
|
1953
|
+
SourceBufferList: 0,
|
1954
|
+
StyleSheetList: 0,
|
1955
|
+
TextTrackCueList: 0,
|
1956
|
+
TextTrackList: 0,
|
1957
|
+
TouchList: 0
|
1958
|
+
};
|
1959
|
+
|
1960
|
+
// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
|
1961
|
+
var documentCreateElement = documentCreateElement$2;
|
1962
|
+
|
1963
|
+
var classList = documentCreateElement('span').classList;
|
1964
|
+
var DOMTokenListPrototype$2 = classList && classList.constructor && classList.constructor.prototype;
|
1965
|
+
|
1966
|
+
var domTokenListPrototype = DOMTokenListPrototype$2 === Object.prototype ? undefined : DOMTokenListPrototype$2;
|
1967
|
+
|
1968
|
+
var fails$q = fails$B;
|
1969
|
+
|
1970
|
+
var arrayMethodIsStrict$4 = function (METHOD_NAME, argument) {
|
1971
|
+
var method = [][METHOD_NAME];
|
1972
|
+
return !!method && fails$q(function () {
|
1973
|
+
// eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
|
1974
|
+
method.call(null, argument || function () { throw 1; }, 1);
|
1975
|
+
});
|
1976
|
+
};
|
1977
|
+
|
1978
|
+
var $forEach$1 = arrayIteration.forEach;
|
1979
|
+
var arrayMethodIsStrict$3 = arrayMethodIsStrict$4;
|
1980
|
+
|
1981
|
+
var STRICT_METHOD$3 = arrayMethodIsStrict$3('forEach');
|
1982
|
+
|
1983
|
+
// `Array.prototype.forEach` method implementation
|
1984
|
+
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
1985
|
+
var arrayForEach = !STRICT_METHOD$3 ? function forEach(callbackfn /* , thisArg */) {
|
1986
|
+
return $forEach$1(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
1987
|
+
// eslint-disable-next-line es/no-array-prototype-foreach -- safe
|
1988
|
+
} : [].forEach;
|
1989
|
+
|
1909
1990
|
var global$p = global$D;
|
1991
|
+
var DOMIterables$1 = domIterables;
|
1992
|
+
var DOMTokenListPrototype$1 = domTokenListPrototype;
|
1993
|
+
var forEach$1 = arrayForEach;
|
1994
|
+
var createNonEnumerableProperty$7 = createNonEnumerableProperty$c;
|
1995
|
+
|
1996
|
+
var handlePrototype$1 = function (CollectionPrototype) {
|
1997
|
+
// some Chrome versions have non-configurable methods on DOMTokenList
|
1998
|
+
if (CollectionPrototype && CollectionPrototype.forEach !== forEach$1) try {
|
1999
|
+
createNonEnumerableProperty$7(CollectionPrototype, 'forEach', forEach$1);
|
2000
|
+
} catch (error) {
|
2001
|
+
CollectionPrototype.forEach = forEach$1;
|
2002
|
+
}
|
2003
|
+
};
|
2004
|
+
|
2005
|
+
for (var COLLECTION_NAME$1 in DOMIterables$1) {
|
2006
|
+
handlePrototype$1(global$p[COLLECTION_NAME$1] && global$p[COLLECTION_NAME$1].prototype);
|
2007
|
+
}
|
2008
|
+
|
2009
|
+
handlePrototype$1(DOMTokenListPrototype$1);
|
2010
|
+
|
2011
|
+
var global$o = global$D;
|
1910
2012
|
|
1911
|
-
var nativePromiseConstructor = global$
|
2013
|
+
var nativePromiseConstructor = global$o.Promise;
|
1912
2014
|
|
1913
2015
|
var redefine$9 = redefine$d.exports;
|
1914
2016
|
|
@@ -2152,23 +2254,23 @@ this.Twilio.Conversations = (function (exports) {
|
|
2152
2254
|
var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$4);
|
2153
2255
|
|
2154
2256
|
var classof$6 = classofRaw$1;
|
2155
|
-
var global$
|
2257
|
+
var global$n = global$D;
|
2156
2258
|
|
2157
|
-
var engineIsNode = classof$6(global$
|
2259
|
+
var engineIsNode = classof$6(global$n.process) == 'process';
|
2158
2260
|
|
2159
|
-
var global$
|
2160
|
-
var fails$
|
2261
|
+
var global$m = global$D;
|
2262
|
+
var fails$p = fails$B;
|
2161
2263
|
var bind$5 = functionBindContext;
|
2162
2264
|
var html = html$2;
|
2163
2265
|
var createElement = documentCreateElement$2;
|
2164
2266
|
var IS_IOS$1 = engineIsIos;
|
2165
2267
|
var IS_NODE$2 = engineIsNode;
|
2166
2268
|
|
2167
|
-
var set$1 = global$
|
2168
|
-
var clear = global$
|
2169
|
-
var process$2 = global$
|
2170
|
-
var MessageChannel = global$
|
2171
|
-
var Dispatch = global$
|
2269
|
+
var set$1 = global$m.setImmediate;
|
2270
|
+
var clear = global$m.clearImmediate;
|
2271
|
+
var process$2 = global$m.process;
|
2272
|
+
var MessageChannel = global$m.MessageChannel;
|
2273
|
+
var Dispatch = global$m.Dispatch;
|
2172
2274
|
var counter = 0;
|
2173
2275
|
var queue = {};
|
2174
2276
|
var ONREADYSTATECHANGE = 'onreadystatechange';
|
@@ -2176,7 +2278,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
2176
2278
|
|
2177
2279
|
try {
|
2178
2280
|
// Deno throws a ReferenceError on `location` access without `--location` flag
|
2179
|
-
location = global$
|
2281
|
+
location = global$m.location;
|
2180
2282
|
} catch (error) { /* empty */ }
|
2181
2283
|
|
2182
2284
|
var run = function (id) {
|
@@ -2200,7 +2302,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
2200
2302
|
|
2201
2303
|
var post = function (id) {
|
2202
2304
|
// old engines have not location.origin
|
2203
|
-
global$
|
2305
|
+
global$m.postMessage(String(id), location.protocol + '//' + location.host);
|
2204
2306
|
};
|
2205
2307
|
|
2206
2308
|
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
|
@@ -2240,14 +2342,14 @@ this.Twilio.Conversations = (function (exports) {
|
|
2240
2342
|
// Browsers with postMessage, skip WebWorkers
|
2241
2343
|
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
2242
2344
|
} else if (
|
2243
|
-
global$
|
2345
|
+
global$m.addEventListener &&
|
2244
2346
|
typeof postMessage == 'function' &&
|
2245
|
-
!global$
|
2347
|
+
!global$m.importScripts &&
|
2246
2348
|
location && location.protocol !== 'file:' &&
|
2247
|
-
!fails$
|
2349
|
+
!fails$p(post)
|
2248
2350
|
) {
|
2249
2351
|
defer = post;
|
2250
|
-
global$
|
2352
|
+
global$m.addEventListener('message', listener, false);
|
2251
2353
|
// IE8-
|
2252
2354
|
} else if (ONREADYSTATECHANGE in createElement('script')) {
|
2253
2355
|
defer = function (id) {
|
@@ -2270,15 +2372,15 @@ this.Twilio.Conversations = (function (exports) {
|
|
2270
2372
|
};
|
2271
2373
|
|
2272
2374
|
var userAgent$3 = engineUserAgent;
|
2273
|
-
var global$
|
2375
|
+
var global$l = global$D;
|
2274
2376
|
|
2275
|
-
var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$3) && global$
|
2377
|
+
var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$3) && global$l.Pebble !== undefined;
|
2276
2378
|
|
2277
2379
|
var userAgent$2 = engineUserAgent;
|
2278
2380
|
|
2279
2381
|
var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent$2);
|
2280
2382
|
|
2281
|
-
var global$
|
2383
|
+
var global$k = global$D;
|
2282
2384
|
var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
|
2283
2385
|
var macrotask = task$1.set;
|
2284
2386
|
var IS_IOS = engineIsIos;
|
@@ -2286,12 +2388,12 @@ this.Twilio.Conversations = (function (exports) {
|
|
2286
2388
|
var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
|
2287
2389
|
var IS_NODE$1 = engineIsNode;
|
2288
2390
|
|
2289
|
-
var MutationObserver = global$
|
2290
|
-
var document$2 = global$
|
2291
|
-
var process$1 = global$
|
2292
|
-
var Promise$1 = global$
|
2391
|
+
var MutationObserver = global$k.MutationObserver || global$k.WebKitMutationObserver;
|
2392
|
+
var document$2 = global$k.document;
|
2393
|
+
var process$1 = global$k.process;
|
2394
|
+
var Promise$1 = global$k.Promise;
|
2293
2395
|
// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
|
2294
|
-
var queueMicrotaskDescriptor = getOwnPropertyDescriptor$2(global$
|
2396
|
+
var queueMicrotaskDescriptor = getOwnPropertyDescriptor$2(global$k, 'queueMicrotask');
|
2295
2397
|
var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
|
2296
2398
|
|
2297
2399
|
var flush, head, last, notify$1, toggle, node, promise, then;
|
@@ -2348,7 +2450,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
2348
2450
|
} else {
|
2349
2451
|
notify$1 = function () {
|
2350
2452
|
// strange IE + webpack dev server bug - use .call(global)
|
2351
|
-
macrotask.call(global$
|
2453
|
+
macrotask.call(global$k, flush);
|
2352
2454
|
};
|
2353
2455
|
}
|
2354
2456
|
}
|
@@ -2396,10 +2498,10 @@ this.Twilio.Conversations = (function (exports) {
|
|
2396
2498
|
return promiseCapability.promise;
|
2397
2499
|
};
|
2398
2500
|
|
2399
|
-
var global$
|
2501
|
+
var global$j = global$D;
|
2400
2502
|
|
2401
2503
|
var hostReportErrors$1 = function (a, b) {
|
2402
|
-
var console = global$
|
2504
|
+
var console = global$j.console;
|
2403
2505
|
if (console && console.error) {
|
2404
2506
|
arguments.length === 1 ? console.error(a) : console.error(a, b);
|
2405
2507
|
}
|
@@ -2415,8 +2517,8 @@ this.Twilio.Conversations = (function (exports) {
|
|
2415
2517
|
|
2416
2518
|
var engineIsBrowser = typeof window == 'object';
|
2417
2519
|
|
2418
|
-
var $$
|
2419
|
-
var global$
|
2520
|
+
var $$p = _export;
|
2521
|
+
var global$i = global$D;
|
2420
2522
|
var getBuiltIn$2 = getBuiltIn$a;
|
2421
2523
|
var NativePromise = nativePromiseConstructor;
|
2422
2524
|
var redefine$8 = redefine$d.exports;
|
@@ -2452,12 +2554,12 @@ this.Twilio.Conversations = (function (exports) {
|
|
2452
2554
|
var NativePromisePrototype = NativePromise && NativePromise.prototype;
|
2453
2555
|
var PromiseConstructor = NativePromise;
|
2454
2556
|
var PromiseConstructorPrototype = NativePromisePrototype;
|
2455
|
-
var TypeError$1 = global$
|
2456
|
-
var document$1 = global$
|
2457
|
-
var process = global$
|
2557
|
+
var TypeError$1 = global$i.TypeError;
|
2558
|
+
var document$1 = global$i.document;
|
2559
|
+
var process = global$i.process;
|
2458
2560
|
var newPromiseCapability = newPromiseCapabilityModule.f;
|
2459
2561
|
var newGenericPromiseCapability = newPromiseCapability;
|
2460
|
-
var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$
|
2562
|
+
var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$i.dispatchEvent);
|
2461
2563
|
var NATIVE_REJECTION_EVENT = typeof PromiseRejectionEvent == 'function';
|
2462
2564
|
var UNHANDLED_REJECTION = 'unhandledrejection';
|
2463
2565
|
var REJECTION_HANDLED = 'rejectionhandled';
|
@@ -2558,14 +2660,14 @@ this.Twilio.Conversations = (function (exports) {
|
|
2558
2660
|
event.promise = promise;
|
2559
2661
|
event.reason = reason;
|
2560
2662
|
event.initEvent(name, false, true);
|
2561
|
-
global$
|
2663
|
+
global$i.dispatchEvent(event);
|
2562
2664
|
} else event = { promise: promise, reason: reason };
|
2563
|
-
if (!NATIVE_REJECTION_EVENT && (handler = global$
|
2665
|
+
if (!NATIVE_REJECTION_EVENT && (handler = global$i['on' + name])) handler(event);
|
2564
2666
|
else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
|
2565
2667
|
};
|
2566
2668
|
|
2567
2669
|
var onUnhandled = function (state) {
|
2568
|
-
task.call(global$
|
2670
|
+
task.call(global$i, function () {
|
2569
2671
|
var promise = state.facade;
|
2570
2672
|
var value = state.value;
|
2571
2673
|
var IS_UNHANDLED = isUnhandled(state);
|
@@ -2588,7 +2690,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
2588
2690
|
};
|
2589
2691
|
|
2590
2692
|
var onHandleUnhandled = function (state) {
|
2591
|
-
task.call(global$
|
2693
|
+
task.call(global$i, function () {
|
2592
2694
|
var promise = state.facade;
|
2593
2695
|
if (IS_NODE) {
|
2594
2696
|
process.emit('rejectionHandled', promise);
|
@@ -2730,7 +2832,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
2730
2832
|
}
|
2731
2833
|
}
|
2732
2834
|
|
2733
|
-
$$
|
2835
|
+
$$p({ global: true, wrap: true, forced: FORCED$7 }, {
|
2734
2836
|
Promise: PromiseConstructor
|
2735
2837
|
});
|
2736
2838
|
|
@@ -2740,7 +2842,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
2740
2842
|
PromiseWrapper = getBuiltIn$2(PROMISE);
|
2741
2843
|
|
2742
2844
|
// statics
|
2743
|
-
$$
|
2845
|
+
$$p({ target: PROMISE, stat: true, forced: FORCED$7 }, {
|
2744
2846
|
// `Promise.reject` method
|
2745
2847
|
// https://tc39.es/ecma262/#sec-promise.reject
|
2746
2848
|
reject: function reject(r) {
|
@@ -2750,7 +2852,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
2750
2852
|
}
|
2751
2853
|
});
|
2752
2854
|
|
2753
|
-
$$
|
2855
|
+
$$p({ target: PROMISE, stat: true, forced: FORCED$7 }, {
|
2754
2856
|
// `Promise.resolve` method
|
2755
2857
|
// https://tc39.es/ecma262/#sec-promise.resolve
|
2756
2858
|
resolve: function resolve(x) {
|
@@ -2758,7 +2860,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
2758
2860
|
}
|
2759
2861
|
});
|
2760
2862
|
|
2761
|
-
$$
|
2863
|
+
$$p({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION$1 }, {
|
2762
2864
|
// `Promise.all` method
|
2763
2865
|
// https://tc39.es/ecma262/#sec-promise.all
|
2764
2866
|
all: function all(iterable) {
|
@@ -2805,108 +2907,6 @@ this.Twilio.Conversations = (function (exports) {
|
|
2805
2907
|
}
|
2806
2908
|
});
|
2807
2909
|
|
2808
|
-
var $$p = _export;
|
2809
|
-
var $map$1 = arrayIteration.map;
|
2810
|
-
var arrayMethodHasSpeciesSupport$3 = arrayMethodHasSpeciesSupport$5;
|
2811
|
-
|
2812
|
-
var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport$3('map');
|
2813
|
-
|
2814
|
-
// `Array.prototype.map` method
|
2815
|
-
// https://tc39.es/ecma262/#sec-array.prototype.map
|
2816
|
-
// with adding support of @@species
|
2817
|
-
$$p({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 }, {
|
2818
|
-
map: function map(callbackfn /* , thisArg */) {
|
2819
|
-
return $map$1(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
2820
|
-
}
|
2821
|
-
});
|
2822
|
-
|
2823
|
-
// iterable DOM collections
|
2824
|
-
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
2825
|
-
var domIterables = {
|
2826
|
-
CSSRuleList: 0,
|
2827
|
-
CSSStyleDeclaration: 0,
|
2828
|
-
CSSValueList: 0,
|
2829
|
-
ClientRectList: 0,
|
2830
|
-
DOMRectList: 0,
|
2831
|
-
DOMStringList: 0,
|
2832
|
-
DOMTokenList: 1,
|
2833
|
-
DataTransferItemList: 0,
|
2834
|
-
FileList: 0,
|
2835
|
-
HTMLAllCollection: 0,
|
2836
|
-
HTMLCollection: 0,
|
2837
|
-
HTMLFormElement: 0,
|
2838
|
-
HTMLSelectElement: 0,
|
2839
|
-
MediaList: 0,
|
2840
|
-
MimeTypeArray: 0,
|
2841
|
-
NamedNodeMap: 0,
|
2842
|
-
NodeList: 1,
|
2843
|
-
PaintRequestList: 0,
|
2844
|
-
Plugin: 0,
|
2845
|
-
PluginArray: 0,
|
2846
|
-
SVGLengthList: 0,
|
2847
|
-
SVGNumberList: 0,
|
2848
|
-
SVGPathSegList: 0,
|
2849
|
-
SVGPointList: 0,
|
2850
|
-
SVGStringList: 0,
|
2851
|
-
SVGTransformList: 0,
|
2852
|
-
SourceBufferList: 0,
|
2853
|
-
StyleSheetList: 0,
|
2854
|
-
TextTrackCueList: 0,
|
2855
|
-
TextTrackList: 0,
|
2856
|
-
TouchList: 0
|
2857
|
-
};
|
2858
|
-
|
2859
|
-
// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
|
2860
|
-
var documentCreateElement = documentCreateElement$2;
|
2861
|
-
|
2862
|
-
var classList = documentCreateElement('span').classList;
|
2863
|
-
var DOMTokenListPrototype$2 = classList && classList.constructor && classList.constructor.prototype;
|
2864
|
-
|
2865
|
-
var domTokenListPrototype = DOMTokenListPrototype$2 === Object.prototype ? undefined : DOMTokenListPrototype$2;
|
2866
|
-
|
2867
|
-
var fails$p = fails$B;
|
2868
|
-
|
2869
|
-
var arrayMethodIsStrict$4 = function (METHOD_NAME, argument) {
|
2870
|
-
var method = [][METHOD_NAME];
|
2871
|
-
return !!method && fails$p(function () {
|
2872
|
-
// eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
|
2873
|
-
method.call(null, argument || function () { throw 1; }, 1);
|
2874
|
-
});
|
2875
|
-
};
|
2876
|
-
|
2877
|
-
var $forEach$1 = arrayIteration.forEach;
|
2878
|
-
var arrayMethodIsStrict$3 = arrayMethodIsStrict$4;
|
2879
|
-
|
2880
|
-
var STRICT_METHOD$3 = arrayMethodIsStrict$3('forEach');
|
2881
|
-
|
2882
|
-
// `Array.prototype.forEach` method implementation
|
2883
|
-
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
2884
|
-
var arrayForEach = !STRICT_METHOD$3 ? function forEach(callbackfn /* , thisArg */) {
|
2885
|
-
return $forEach$1(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
2886
|
-
// eslint-disable-next-line es/no-array-prototype-foreach -- safe
|
2887
|
-
} : [].forEach;
|
2888
|
-
|
2889
|
-
var global$i = global$D;
|
2890
|
-
var DOMIterables$1 = domIterables;
|
2891
|
-
var DOMTokenListPrototype$1 = domTokenListPrototype;
|
2892
|
-
var forEach$1 = arrayForEach;
|
2893
|
-
var createNonEnumerableProperty$7 = createNonEnumerableProperty$c;
|
2894
|
-
|
2895
|
-
var handlePrototype$1 = function (CollectionPrototype) {
|
2896
|
-
// some Chrome versions have non-configurable methods on DOMTokenList
|
2897
|
-
if (CollectionPrototype && CollectionPrototype.forEach !== forEach$1) try {
|
2898
|
-
createNonEnumerableProperty$7(CollectionPrototype, 'forEach', forEach$1);
|
2899
|
-
} catch (error) {
|
2900
|
-
CollectionPrototype.forEach = forEach$1;
|
2901
|
-
}
|
2902
|
-
};
|
2903
|
-
|
2904
|
-
for (var COLLECTION_NAME$1 in DOMIterables$1) {
|
2905
|
-
handlePrototype$1(global$i[COLLECTION_NAME$1] && global$i[COLLECTION_NAME$1].prototype);
|
2906
|
-
}
|
2907
|
-
|
2908
|
-
handlePrototype$1(DOMTokenListPrototype$1);
|
2909
|
-
|
2910
2910
|
/**
|
2911
2911
|
* Copyright (c) 2014-present, Facebook, Inc.
|
2912
2912
|
*
|
@@ -9528,6 +9528,22 @@ this.Twilio.Conversations = (function (exports) {
|
|
9528
9528
|
* @event
|
9529
9529
|
*/
|
9530
9530
|
|
9531
|
+
/**
|
9532
|
+
* Fired when the client has subscribed to the user.
|
9533
|
+
*
|
9534
|
+
* Parameters:
|
9535
|
+
* 1. {@link User} `user` - the user in question
|
9536
|
+
* @event
|
9537
|
+
*/
|
9538
|
+
|
9539
|
+
/**
|
9540
|
+
* Fired when the client has unsubscribed from the user.
|
9541
|
+
*
|
9542
|
+
* Parameters:
|
9543
|
+
* 1. {@link User} `user` - the user in question
|
9544
|
+
* @event
|
9545
|
+
*/
|
9546
|
+
|
9531
9547
|
|
9532
9548
|
_createClass$4(User, [{
|
9533
9549
|
key: "identity",
|
@@ -35346,6 +35362,24 @@ this.Twilio.Conversations = (function (exports) {
|
|
35346
35362
|
* @event
|
35347
35363
|
*/
|
35348
35364
|
|
35365
|
+
/**
|
35366
|
+
* Fired when the participant has stopped typing.
|
35367
|
+
*
|
35368
|
+
* Parameters:
|
35369
|
+
* 1. {@link Participant} `participant` - the participant in question
|
35370
|
+
* @event
|
35371
|
+
*/
|
35372
|
+
|
35373
|
+
/**
|
35374
|
+
* Fired when the fields of the participant have been updated.
|
35375
|
+
*
|
35376
|
+
* Parameters:
|
35377
|
+
* 1. object `data` - info object provided with the event. It has the following properties:
|
35378
|
+
* * {@link Participant} participant - the participant in question
|
35379
|
+
* * {@link ParticipantUpdateReason}[] updateReasons - array of reasons for the update
|
35380
|
+
* @event
|
35381
|
+
*/
|
35382
|
+
|
35349
35383
|
|
35350
35384
|
_createClass$4(Participant, [{
|
35351
35385
|
key: "sid",
|
@@ -37231,6 +37265,15 @@ this.Twilio.Conversations = (function (exports) {
|
|
37231
37265
|
|
37232
37266
|
return _this;
|
37233
37267
|
}
|
37268
|
+
/**
|
37269
|
+
* Fired when the properties or the body of the message has been updated.
|
37270
|
+
*
|
37271
|
+
* Parameters:
|
37272
|
+
* 1. object `data` - info object provided with the event. It has the following properties:
|
37273
|
+
* * {@link Message} message - the message in question
|
37274
|
+
* * {@link MessageUpdateReason}[] updateReasons - array of reasons for the update
|
37275
|
+
*/
|
37276
|
+
|
37234
37277
|
|
37235
37278
|
_createClass$4(Message, [{
|
37236
37279
|
key: "sid",
|
@@ -39227,6 +39270,64 @@ this.Twilio.Conversations = (function (exports) {
|
|
39227
39270
|
* Logger instance.
|
39228
39271
|
*/
|
39229
39272
|
|
39273
|
+
/**
|
39274
|
+
* Unique system identifier of the conversation.
|
39275
|
+
*/
|
39276
|
+
|
39277
|
+
/**
|
39278
|
+
* Conversation links for REST requests.
|
39279
|
+
* @internal
|
39280
|
+
*/
|
39281
|
+
|
39282
|
+
/**
|
39283
|
+
* Configuration of the client that the conversation belongs to.
|
39284
|
+
*/
|
39285
|
+
|
39286
|
+
/**
|
39287
|
+
* Conversation service objects.
|
39288
|
+
*/
|
39289
|
+
|
39290
|
+
/**
|
39291
|
+
* Internal state of the conversation.
|
39292
|
+
*/
|
39293
|
+
|
39294
|
+
/**
|
39295
|
+
* Name of the conversation entity document.
|
39296
|
+
*/
|
39297
|
+
|
39298
|
+
/**
|
39299
|
+
* Messages entity.
|
39300
|
+
*/
|
39301
|
+
|
39302
|
+
/**
|
39303
|
+
* Sync list containing messages.
|
39304
|
+
*/
|
39305
|
+
|
39306
|
+
/**
|
39307
|
+
* Map of participants.
|
39308
|
+
* @internal
|
39309
|
+
*/
|
39310
|
+
|
39311
|
+
/**
|
39312
|
+
* Participants entity.
|
39313
|
+
*/
|
39314
|
+
|
39315
|
+
/**
|
39316
|
+
* Sync map containing participants.
|
39317
|
+
*/
|
39318
|
+
|
39319
|
+
/**
|
39320
|
+
* Source of the most recent update.
|
39321
|
+
*/
|
39322
|
+
|
39323
|
+
/**
|
39324
|
+
* Promise for the conversation entity document.
|
39325
|
+
*/
|
39326
|
+
|
39327
|
+
/**
|
39328
|
+
* Conversation entity document.
|
39329
|
+
*/
|
39330
|
+
|
39230
39331
|
/**
|
39231
39332
|
* @param descriptor Conversation descriptor.
|
39232
39333
|
* @param sid Conversation SID.
|
@@ -42311,7 +42412,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
42311
42412
|
this.data = data.data || {};
|
42312
42413
|
});
|
42313
42414
|
|
42314
|
-
var version = "2.
|
42415
|
+
var version = "2.6.0-rc.1";
|
42315
42416
|
|
42316
42417
|
function _isNativeFunction(fn) {
|
42317
42418
|
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
@@ -43270,6 +43371,22 @@ this.Twilio.Conversations = (function (exports) {
|
|
43270
43371
|
* Type of recipient.
|
43271
43372
|
*/
|
43272
43373
|
|
43374
|
+
/**
|
43375
|
+
* Sid of the message that this recipient belongs to.
|
43376
|
+
*/
|
43377
|
+
|
43378
|
+
/**
|
43379
|
+
* Email recipient level.
|
43380
|
+
*/
|
43381
|
+
|
43382
|
+
/**
|
43383
|
+
* Name of the recipient.
|
43384
|
+
*/
|
43385
|
+
|
43386
|
+
/**
|
43387
|
+
* Address of the recipient.
|
43388
|
+
*/
|
43389
|
+
|
43273
43390
|
/**
|
43274
43391
|
* @internal
|
43275
43392
|
*/
|
@@ -43723,6 +43840,46 @@ this.Twilio.Conversations = (function (exports) {
|
|
43723
43840
|
* Client connection state.
|
43724
43841
|
*/
|
43725
43842
|
|
43843
|
+
/**
|
43844
|
+
* Promise that resolves on successful initialization.
|
43845
|
+
*/
|
43846
|
+
|
43847
|
+
/**
|
43848
|
+
* Options passed to the client.
|
43849
|
+
*/
|
43850
|
+
|
43851
|
+
/**
|
43852
|
+
* Client service objects.
|
43853
|
+
*/
|
43854
|
+
|
43855
|
+
/**
|
43856
|
+
* The user of the client.
|
43857
|
+
*/
|
43858
|
+
|
43859
|
+
/**
|
43860
|
+
* Resolves the {@link Client._ensureReady} promise.
|
43861
|
+
*/
|
43862
|
+
|
43863
|
+
/**
|
43864
|
+
* Rejects the {@link Client._ensureReady} promise.
|
43865
|
+
*/
|
43866
|
+
|
43867
|
+
/**
|
43868
|
+
* The current token of the client.
|
43869
|
+
*/
|
43870
|
+
|
43871
|
+
/**
|
43872
|
+
* The constructed configuration object.
|
43873
|
+
*/
|
43874
|
+
|
43875
|
+
/**
|
43876
|
+
* The Conversations entity.
|
43877
|
+
*/
|
43878
|
+
|
43879
|
+
/**
|
43880
|
+
* Promise that resolves when initial conversations are fetched.
|
43881
|
+
*/
|
43882
|
+
|
43726
43883
|
/**
|
43727
43884
|
* Returned Conversations Client instance is not yet fully initialized. Calling any
|
43728
43885
|
* operations will block until it is. Use connection events to monitor when
|
@@ -43862,6 +44019,8 @@ this.Twilio.Conversations = (function (exports) {
|
|
43862
44019
|
terminal: true,
|
43863
44020
|
message: "Twilsock has disconnected."
|
43864
44021
|
});
|
44022
|
+
|
44023
|
+
_this._initializeEnsureReady((options === null || options === void 0 ? void 0 : options.throwErrorsAlways) || false);
|
43865
44024
|
};
|
43866
44025
|
|
43867
44026
|
_this._services.twilsockClient.once("connectionError", emitFailed);
|
@@ -43919,12 +44078,7 @@ this.Twilio.Conversations = (function (exports) {
|
|
43919
44078
|
}, _callee, null, [[3, 11]]);
|
43920
44079
|
})));
|
43921
44080
|
|
43922
|
-
_this.
|
43923
|
-
_this._resolveEnsureReady = resolve;
|
43924
|
-
_this._rejectEnsureReady = reject;
|
43925
|
-
}).catch(function () {
|
43926
|
-
return void 0;
|
43927
|
-
}); // @todo How to process unhandled rejection here?
|
44081
|
+
_this._initializeEnsureReady((options === null || options === void 0 ? void 0 : options.throwErrorsAlways) || false);
|
43928
44082
|
|
43929
44083
|
if (startTwilsock) {
|
43930
44084
|
_this._services.twilsockClient.connect();
|
@@ -44817,6 +44971,26 @@ this.Twilio.Conversations = (function (exports) {
|
|
44817
44971
|
_this5._services.notificationClient.unsubscribe(channelType, messageType);
|
44818
44972
|
});
|
44819
44973
|
}
|
44974
|
+
/**
|
44975
|
+
* Initialize the ensureReady promise.
|
44976
|
+
*/
|
44977
|
+
|
44978
|
+
}, {
|
44979
|
+
key: "_initializeEnsureReady",
|
44980
|
+
value: function _initializeEnsureReady(throwErrorsAlways) {
|
44981
|
+
var _this6 = this;
|
44982
|
+
|
44983
|
+
this._ensureReady = new Promise(function (resolve, reject) {
|
44984
|
+
_this6._resolveEnsureReady = resolve;
|
44985
|
+
_this6._rejectEnsureReady = reject;
|
44986
|
+
}).catch(function (error) {
|
44987
|
+
if (throwErrorsAlways) {
|
44988
|
+
throw error;
|
44989
|
+
} else {
|
44990
|
+
return void 0;
|
44991
|
+
}
|
44992
|
+
});
|
44993
|
+
}
|
44820
44994
|
}], [{
|
44821
44995
|
key: "create",
|
44822
44996
|
value: function () {
|