stream-chat 6.3.0 → 6.4.0
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/dist/browser.es.js +122 -96
- package/dist/browser.es.js.map +1 -1
- package/dist/browser.full-bundle.min.js +1 -1
- package/dist/browser.full-bundle.min.js.map +1 -1
- package/dist/browser.js +122 -96
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +122 -96
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +122 -96
- package/dist/index.js.map +1 -1
- package/dist/types/channel_state.d.ts.map +1 -1
- package/dist/types/client.d.ts +29 -27
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/token_manager.d.ts.map +1 -1
- package/dist/types/types.d.ts +23 -5
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/channel_state.ts +6 -3
- package/src/client.ts +33 -26
- package/src/token_manager.ts +6 -2
- package/src/types.ts +26 -6
package/dist/browser.es.js
CHANGED
|
@@ -366,12 +366,15 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
366
366
|
|
|
367
367
|
if (isFromShadowBannedUser) {
|
|
368
368
|
continue;
|
|
369
|
-
}
|
|
369
|
+
} // If message is already formatted we can skip the tasks below
|
|
370
|
+
// This will be true for messages that are already present at the state -> this happens when we perform merging of message sets
|
|
371
|
+
// This will be also true for message previews used by some SDKs
|
|
372
|
+
|
|
370
373
|
|
|
371
|
-
var
|
|
374
|
+
var isMessageFormatted = messagesToAdd[i].created_at instanceof Date;
|
|
372
375
|
var message = void 0;
|
|
373
376
|
|
|
374
|
-
if (
|
|
377
|
+
if (isMessageFormatted) {
|
|
375
378
|
message = messagesToAdd[i];
|
|
376
379
|
} else {
|
|
377
380
|
var _this$_channel;
|
|
@@ -421,7 +424,7 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
421
424
|
*/
|
|
422
425
|
|
|
423
426
|
|
|
424
|
-
if (parentID && !initializing
|
|
427
|
+
if (parentID && !initializing) {
|
|
425
428
|
var thread = this.threads[parentID] || [];
|
|
426
429
|
|
|
427
430
|
var threadMessages = this._addToMessageList(thread, message, timestampChanged, 'created_at', addIfDoesNotExist);
|
|
@@ -5146,7 +5149,7 @@ function TokenManager(secret) {
|
|
|
5146
5149
|
_defineProperty(this, "loadToken", function () {
|
|
5147
5150
|
// eslint-disable-next-line no-async-promise-executor
|
|
5148
5151
|
_this.loadTokenPromise = new Promise( /*#__PURE__*/function () {
|
|
5149
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(resolve) {
|
|
5152
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(resolve, reject) {
|
|
5150
5153
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
5151
5154
|
while (1) {
|
|
5152
5155
|
switch (_context2.prev = _context2.next) {
|
|
@@ -5160,26 +5163,36 @@ function TokenManager(secret) {
|
|
|
5160
5163
|
|
|
5161
5164
|
case 2:
|
|
5162
5165
|
if (!(_this.tokenProvider && typeof _this.tokenProvider !== 'string')) {
|
|
5163
|
-
_context2.next =
|
|
5166
|
+
_context2.next = 13;
|
|
5164
5167
|
break;
|
|
5165
5168
|
}
|
|
5166
5169
|
|
|
5167
|
-
_context2.
|
|
5170
|
+
_context2.prev = 3;
|
|
5171
|
+
_context2.next = 6;
|
|
5168
5172
|
return _this.tokenProvider();
|
|
5169
5173
|
|
|
5170
|
-
case
|
|
5174
|
+
case 6:
|
|
5171
5175
|
_this.token = _context2.sent;
|
|
5176
|
+
_context2.next = 12;
|
|
5177
|
+
break;
|
|
5178
|
+
|
|
5179
|
+
case 9:
|
|
5180
|
+
_context2.prev = 9;
|
|
5181
|
+
_context2.t0 = _context2["catch"](3);
|
|
5182
|
+
return _context2.abrupt("return", reject(new Error("Call to tokenProvider failed with message: ".concat(_context2.t0))));
|
|
5183
|
+
|
|
5184
|
+
case 12:
|
|
5172
5185
|
resolve(_this.token);
|
|
5173
5186
|
|
|
5174
|
-
case
|
|
5187
|
+
case 13:
|
|
5175
5188
|
case "end":
|
|
5176
5189
|
return _context2.stop();
|
|
5177
5190
|
}
|
|
5178
5191
|
}
|
|
5179
|
-
}, _callee2);
|
|
5192
|
+
}, _callee2, null, [[3, 9]]);
|
|
5180
5193
|
}));
|
|
5181
5194
|
|
|
5182
|
-
return function (_x3) {
|
|
5195
|
+
return function (_x3, _x4) {
|
|
5183
5196
|
return _ref2.apply(this, arguments);
|
|
5184
5197
|
};
|
|
5185
5198
|
}());
|
|
@@ -6689,10 +6702,10 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6689
6702
|
key: "updateAppSettings",
|
|
6690
6703
|
value:
|
|
6691
6704
|
/**
|
|
6692
|
-
|
|
6693
|
-
|
|
6694
|
-
|
|
6695
|
-
|
|
6705
|
+
* updateAppSettings - updates application settings
|
|
6706
|
+
*
|
|
6707
|
+
* @param {AppSettings} options App settings.
|
|
6708
|
+
* IE: {
|
|
6696
6709
|
"apn_config": {
|
|
6697
6710
|
"auth_type": "token",
|
|
6698
6711
|
"auth_key": fs.readFileSync(
|
|
@@ -6712,7 +6725,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6712
6725
|
},
|
|
6713
6726
|
"webhook_url": "https://acme.com/my/awesome/webhook/"
|
|
6714
6727
|
}
|
|
6715
|
-
|
|
6728
|
+
*/
|
|
6716
6729
|
function () {
|
|
6717
6730
|
var _updateAppSettings = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(options) {
|
|
6718
6731
|
var _options$apn_config;
|
|
@@ -6903,17 +6916,19 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6903
6916
|
return getAppSettings;
|
|
6904
6917
|
}()
|
|
6905
6918
|
/**
|
|
6906
|
-
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
6916
|
-
|
|
6919
|
+
* testPushSettings - Tests the push settings for a user with a random chat message and the configured push templates
|
|
6920
|
+
*
|
|
6921
|
+
* @param {string} userID User ID. If user has no devices, it will error
|
|
6922
|
+
* @param {TestPushDataInput} [data] Overrides for push templates/message used
|
|
6923
|
+
* IE: {
|
|
6924
|
+
messageID: 'id-of-message', // will error if message does not exist
|
|
6925
|
+
apnTemplate: '{}', // if app doesn't have apn configured it will error
|
|
6926
|
+
firebaseTemplate: '{}', // if app doesn't have firebase configured it will error
|
|
6927
|
+
firebaseDataTemplate: '{}', // if app doesn't have firebase configured it will error
|
|
6928
|
+
skipDevices: true, // skip config/device checks and sending to real devices
|
|
6929
|
+
pushProviderName: 'staging' // one of your configured push providers
|
|
6930
|
+
pushProviderType: 'apn' // one of supported provider types
|
|
6931
|
+
}
|
|
6917
6932
|
*/
|
|
6918
6933
|
|
|
6919
6934
|
}, {
|
|
@@ -6928,7 +6943,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6928
6943
|
case 0:
|
|
6929
6944
|
data = _args12.length > 1 && _args12[1] !== undefined ? _args12[1] : {};
|
|
6930
6945
|
_context12.next = 3;
|
|
6931
|
-
return this.post(this.baseURL + '/check_push', _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
6946
|
+
return this.post(this.baseURL + '/check_push', _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
6932
6947
|
user_id: userID
|
|
6933
6948
|
}, data.messageID ? {
|
|
6934
6949
|
message_id: data.messageID
|
|
@@ -6940,6 +6955,10 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6940
6955
|
firebase_data_template: data.firebaseDataTemplate
|
|
6941
6956
|
} : {}), data.skipDevices ? {
|
|
6942
6957
|
skip_devices: true
|
|
6958
|
+
} : {}), data.pushProviderName ? {
|
|
6959
|
+
push_provider_name: data.pushProviderName
|
|
6960
|
+
} : {}), data.pushProviderType ? {
|
|
6961
|
+
push_provider_type: data.pushProviderType
|
|
6943
6962
|
} : {}));
|
|
6944
6963
|
|
|
6945
6964
|
case 3:
|
|
@@ -6963,11 +6982,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6963
6982
|
* testSQSSettings - Tests that the given or configured SQS configuration is valid
|
|
6964
6983
|
*
|
|
6965
6984
|
* @param {TestSQSDataInput} [data] Overrides SQS settings for testing if needed
|
|
6966
|
-
*
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6985
|
+
* IE: {
|
|
6986
|
+
sqs_key: 'auth_key',
|
|
6987
|
+
sqs_secret: 'auth_secret',
|
|
6988
|
+
sqs_url: 'url_to_queue',
|
|
6989
|
+
}
|
|
6971
6990
|
*/
|
|
6972
6991
|
|
|
6973
6992
|
}, {
|
|
@@ -7905,23 +7924,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7905
7924
|
* @param {string} id the device id
|
|
7906
7925
|
* @param {PushProvider} push_provider the push provider
|
|
7907
7926
|
* @param {string} [userID] the user id (defaults to current user)
|
|
7927
|
+
* @param {string} [push_provider_name] user provided push provider name for multi bundle support
|
|
7908
7928
|
*
|
|
7909
7929
|
*/
|
|
7910
7930
|
|
|
7911
7931
|
}, {
|
|
7912
7932
|
key: "addDevice",
|
|
7913
7933
|
value: function () {
|
|
7914
|
-
var _addDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21(id, push_provider, userID) {
|
|
7934
|
+
var _addDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21(id, push_provider, userID, push_provider_name) {
|
|
7915
7935
|
return _regeneratorRuntime.wrap(function _callee21$(_context21) {
|
|
7916
7936
|
while (1) {
|
|
7917
7937
|
switch (_context21.prev = _context21.next) {
|
|
7918
7938
|
case 0:
|
|
7919
7939
|
_context21.next = 2;
|
|
7920
|
-
return this.post(this.baseURL + '/devices', _objectSpread({
|
|
7940
|
+
return this.post(this.baseURL + '/devices', _objectSpread(_objectSpread({
|
|
7921
7941
|
id: id,
|
|
7922
7942
|
push_provider: push_provider
|
|
7923
7943
|
}, userID != null ? {
|
|
7924
7944
|
user_id: userID
|
|
7945
|
+
} : {}), push_provider_name != null ? {
|
|
7946
|
+
push_provider_name: push_provider_name
|
|
7925
7947
|
} : {}));
|
|
7926
7948
|
|
|
7927
7949
|
case 2:
|
|
@@ -7935,7 +7957,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7935
7957
|
}, _callee21, this);
|
|
7936
7958
|
}));
|
|
7937
7959
|
|
|
7938
|
-
function addDevice(_x20, _x21, _x22) {
|
|
7960
|
+
function addDevice(_x20, _x21, _x22, _x23) {
|
|
7939
7961
|
return _addDevice.apply(this, arguments);
|
|
7940
7962
|
}
|
|
7941
7963
|
|
|
@@ -7973,7 +7995,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7973
7995
|
}, _callee22, this);
|
|
7974
7996
|
}));
|
|
7975
7997
|
|
|
7976
|
-
function getDevices(
|
|
7998
|
+
function getDevices(_x24) {
|
|
7977
7999
|
return _getDevices.apply(this, arguments);
|
|
7978
8000
|
}
|
|
7979
8001
|
|
|
@@ -8013,7 +8035,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8013
8035
|
}, _callee23, this);
|
|
8014
8036
|
}));
|
|
8015
8037
|
|
|
8016
|
-
function removeDevice(
|
|
8038
|
+
function removeDevice(_x25, _x26) {
|
|
8017
8039
|
return _removeDevice.apply(this, arguments);
|
|
8018
8040
|
}
|
|
8019
8041
|
|
|
@@ -8054,7 +8076,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8054
8076
|
}, _callee24, this);
|
|
8055
8077
|
}));
|
|
8056
8078
|
|
|
8057
|
-
function getRateLimits(
|
|
8079
|
+
function getRateLimits(_x27) {
|
|
8058
8080
|
return _getRateLimits.apply(this, arguments);
|
|
8059
8081
|
}
|
|
8060
8082
|
|
|
@@ -8155,7 +8177,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8155
8177
|
}, _callee25, this);
|
|
8156
8178
|
}));
|
|
8157
8179
|
|
|
8158
|
-
function partialUpdateUser(
|
|
8180
|
+
function partialUpdateUser(_x28) {
|
|
8159
8181
|
return _partialUpdateUser.apply(this, arguments);
|
|
8160
8182
|
}
|
|
8161
8183
|
|
|
@@ -8241,7 +8263,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8241
8263
|
}, _callee26, this, [[2, 13, 16, 19]]);
|
|
8242
8264
|
}));
|
|
8243
8265
|
|
|
8244
|
-
function upsertUsers(
|
|
8266
|
+
function upsertUsers(_x29) {
|
|
8245
8267
|
return _upsertUsers.apply(this, arguments);
|
|
8246
8268
|
}
|
|
8247
8269
|
|
|
@@ -8354,7 +8376,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8354
8376
|
}, _callee27, this, [[1, 11, 14, 17]]);
|
|
8355
8377
|
}));
|
|
8356
8378
|
|
|
8357
|
-
function partialUpdateUsers(
|
|
8379
|
+
function partialUpdateUsers(_x30) {
|
|
8358
8380
|
return _partialUpdateUsers.apply(this, arguments);
|
|
8359
8381
|
}
|
|
8360
8382
|
|
|
@@ -8382,7 +8404,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8382
8404
|
}, _callee28, this);
|
|
8383
8405
|
}));
|
|
8384
8406
|
|
|
8385
|
-
function deleteUser(
|
|
8407
|
+
function deleteUser(_x31, _x32) {
|
|
8386
8408
|
return _deleteUser.apply(this, arguments);
|
|
8387
8409
|
}
|
|
8388
8410
|
|
|
@@ -8410,7 +8432,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8410
8432
|
}, _callee29, this);
|
|
8411
8433
|
}));
|
|
8412
8434
|
|
|
8413
|
-
function reactivateUser(
|
|
8435
|
+
function reactivateUser(_x33, _x34) {
|
|
8414
8436
|
return _reactivateUser.apply(this, arguments);
|
|
8415
8437
|
}
|
|
8416
8438
|
|
|
@@ -8438,7 +8460,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8438
8460
|
}, _callee30, this);
|
|
8439
8461
|
}));
|
|
8440
8462
|
|
|
8441
|
-
function deactivateUser(
|
|
8463
|
+
function deactivateUser(_x35, _x36) {
|
|
8442
8464
|
return _deactivateUser.apply(this, arguments);
|
|
8443
8465
|
}
|
|
8444
8466
|
|
|
@@ -8466,7 +8488,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8466
8488
|
}, _callee31, this);
|
|
8467
8489
|
}));
|
|
8468
8490
|
|
|
8469
|
-
function exportUser(
|
|
8491
|
+
function exportUser(_x37, _x38) {
|
|
8470
8492
|
return _exportUser.apply(this, arguments);
|
|
8471
8493
|
}
|
|
8472
8494
|
|
|
@@ -8503,7 +8525,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8503
8525
|
}, _callee32, this);
|
|
8504
8526
|
}));
|
|
8505
8527
|
|
|
8506
|
-
function banUser(
|
|
8528
|
+
function banUser(_x39, _x40) {
|
|
8507
8529
|
return _banUser.apply(this, arguments);
|
|
8508
8530
|
}
|
|
8509
8531
|
|
|
@@ -8540,7 +8562,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8540
8562
|
}, _callee33, this);
|
|
8541
8563
|
}));
|
|
8542
8564
|
|
|
8543
|
-
function unbanUser(
|
|
8565
|
+
function unbanUser(_x41, _x42) {
|
|
8544
8566
|
return _unbanUser.apply(this, arguments);
|
|
8545
8567
|
}
|
|
8546
8568
|
|
|
@@ -8577,7 +8599,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8577
8599
|
}, _callee34, this);
|
|
8578
8600
|
}));
|
|
8579
8601
|
|
|
8580
|
-
function shadowBan(
|
|
8602
|
+
function shadowBan(_x43, _x44) {
|
|
8581
8603
|
return _shadowBan.apply(this, arguments);
|
|
8582
8604
|
}
|
|
8583
8605
|
|
|
@@ -8614,7 +8636,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8614
8636
|
}, _callee35, this);
|
|
8615
8637
|
}));
|
|
8616
8638
|
|
|
8617
|
-
function removeShadowBan(
|
|
8639
|
+
function removeShadowBan(_x45, _x46) {
|
|
8618
8640
|
return _removeShadowBan.apply(this, arguments);
|
|
8619
8641
|
}
|
|
8620
8642
|
|
|
@@ -8657,7 +8679,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8657
8679
|
}, _callee36, this);
|
|
8658
8680
|
}));
|
|
8659
8681
|
|
|
8660
|
-
function muteUser(
|
|
8682
|
+
function muteUser(_x47, _x48) {
|
|
8661
8683
|
return _muteUser.apply(this, arguments);
|
|
8662
8684
|
}
|
|
8663
8685
|
|
|
@@ -8696,7 +8718,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8696
8718
|
}, _callee37, this);
|
|
8697
8719
|
}));
|
|
8698
8720
|
|
|
8699
|
-
function unmuteUser(
|
|
8721
|
+
function unmuteUser(_x49, _x50) {
|
|
8700
8722
|
return _unmuteUser.apply(this, arguments);
|
|
8701
8723
|
}
|
|
8702
8724
|
|
|
@@ -8755,7 +8777,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8755
8777
|
}, _callee38, this);
|
|
8756
8778
|
}));
|
|
8757
8779
|
|
|
8758
|
-
function flagMessage(
|
|
8780
|
+
function flagMessage(_x51) {
|
|
8759
8781
|
return _flagMessage.apply(this, arguments);
|
|
8760
8782
|
}
|
|
8761
8783
|
|
|
@@ -8795,7 +8817,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8795
8817
|
}, _callee39, this);
|
|
8796
8818
|
}));
|
|
8797
8819
|
|
|
8798
|
-
function flagUser(
|
|
8820
|
+
function flagUser(_x52) {
|
|
8799
8821
|
return _flagUser.apply(this, arguments);
|
|
8800
8822
|
}
|
|
8801
8823
|
|
|
@@ -8835,7 +8857,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8835
8857
|
}, _callee40, this);
|
|
8836
8858
|
}));
|
|
8837
8859
|
|
|
8838
|
-
function unflagMessage(
|
|
8860
|
+
function unflagMessage(_x53) {
|
|
8839
8861
|
return _unflagMessage.apply(this, arguments);
|
|
8840
8862
|
}
|
|
8841
8863
|
|
|
@@ -8875,7 +8897,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8875
8897
|
}, _callee41, this);
|
|
8876
8898
|
}));
|
|
8877
8899
|
|
|
8878
|
-
function unflagUser(
|
|
8900
|
+
function unflagUser(_x54) {
|
|
8879
8901
|
return _unflagUser.apply(this, arguments);
|
|
8880
8902
|
}
|
|
8881
8903
|
|
|
@@ -9021,7 +9043,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9021
9043
|
}, _callee44, this);
|
|
9022
9044
|
}));
|
|
9023
9045
|
|
|
9024
|
-
function _reviewFlagReport(
|
|
9046
|
+
function _reviewFlagReport(_x55, _x56) {
|
|
9025
9047
|
return _reviewFlagReport2.apply(this, arguments);
|
|
9026
9048
|
}
|
|
9027
9049
|
|
|
@@ -9067,7 +9089,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9067
9089
|
}, _callee45, this);
|
|
9068
9090
|
}));
|
|
9069
9091
|
|
|
9070
|
-
function _unblockMessage(
|
|
9092
|
+
function _unblockMessage(_x57) {
|
|
9071
9093
|
return _unblockMessage2.apply(this, arguments);
|
|
9072
9094
|
}
|
|
9073
9095
|
|
|
@@ -9206,7 +9228,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9206
9228
|
}, _callee47, this);
|
|
9207
9229
|
}));
|
|
9208
9230
|
|
|
9209
|
-
function translateMessage(
|
|
9231
|
+
function translateMessage(_x58, _x59) {
|
|
9210
9232
|
return _translateMessage.apply(this, arguments);
|
|
9211
9233
|
}
|
|
9212
9234
|
|
|
@@ -9368,7 +9390,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9368
9390
|
}, _callee48, this);
|
|
9369
9391
|
}));
|
|
9370
9392
|
|
|
9371
|
-
function updateMessage(
|
|
9393
|
+
function updateMessage(_x60, _x61, _x62) {
|
|
9372
9394
|
return _updateMessage.apply(this, arguments);
|
|
9373
9395
|
}
|
|
9374
9396
|
|
|
@@ -9429,7 +9451,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9429
9451
|
}, _callee49, this);
|
|
9430
9452
|
}));
|
|
9431
9453
|
|
|
9432
|
-
function partialUpdateMessage(
|
|
9454
|
+
function partialUpdateMessage(_x63, _x64, _x65, _x66) {
|
|
9433
9455
|
return _partialUpdateMessage.apply(this, arguments);
|
|
9434
9456
|
}
|
|
9435
9457
|
|
|
@@ -9466,7 +9488,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9466
9488
|
}, _callee50, this);
|
|
9467
9489
|
}));
|
|
9468
9490
|
|
|
9469
|
-
function deleteMessage(
|
|
9491
|
+
function deleteMessage(_x67, _x68) {
|
|
9470
9492
|
return _deleteMessage.apply(this, arguments);
|
|
9471
9493
|
}
|
|
9472
9494
|
|
|
@@ -9494,7 +9516,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9494
9516
|
}, _callee51, this);
|
|
9495
9517
|
}));
|
|
9496
9518
|
|
|
9497
|
-
function getMessage(
|
|
9519
|
+
function getMessage(_x69) {
|
|
9498
9520
|
return _getMessage.apply(this, arguments);
|
|
9499
9521
|
}
|
|
9500
9522
|
|
|
@@ -9503,7 +9525,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9503
9525
|
}, {
|
|
9504
9526
|
key: "getUserAgent",
|
|
9505
9527
|
value: function getUserAgent() {
|
|
9506
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "6.
|
|
9528
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "6.4.0");
|
|
9507
9529
|
}
|
|
9508
9530
|
}, {
|
|
9509
9531
|
key: "setUserAgent",
|
|
@@ -9719,7 +9741,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9719
9741
|
}, _callee52, this);
|
|
9720
9742
|
}));
|
|
9721
9743
|
|
|
9722
|
-
function sendUserCustomEvent(
|
|
9744
|
+
function sendUserCustomEvent(_x70, _x71) {
|
|
9723
9745
|
return _sendUserCustomEvent.apply(this, arguments);
|
|
9724
9746
|
}
|
|
9725
9747
|
|
|
@@ -9812,7 +9834,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9812
9834
|
}, _callee53, this);
|
|
9813
9835
|
}));
|
|
9814
9836
|
|
|
9815
|
-
function createSegment(
|
|
9837
|
+
function createSegment(_x72) {
|
|
9816
9838
|
return _createSegment.apply(this, arguments);
|
|
9817
9839
|
}
|
|
9818
9840
|
|
|
@@ -9852,7 +9874,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9852
9874
|
}, _callee54, this);
|
|
9853
9875
|
}));
|
|
9854
9876
|
|
|
9855
|
-
function getSegment(
|
|
9877
|
+
function getSegment(_x73) {
|
|
9856
9878
|
return _getSegment.apply(this, arguments);
|
|
9857
9879
|
}
|
|
9858
9880
|
|
|
@@ -9891,7 +9913,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9891
9913
|
}, _callee55, this);
|
|
9892
9914
|
}));
|
|
9893
9915
|
|
|
9894
|
-
function listSegments(
|
|
9916
|
+
function listSegments(_x74) {
|
|
9895
9917
|
return _listSegments.apply(this, arguments);
|
|
9896
9918
|
}
|
|
9897
9919
|
|
|
@@ -9934,7 +9956,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9934
9956
|
}, _callee56, this);
|
|
9935
9957
|
}));
|
|
9936
9958
|
|
|
9937
|
-
function updateSegment(
|
|
9959
|
+
function updateSegment(_x75, _x76) {
|
|
9938
9960
|
return _updateSegment.apply(this, arguments);
|
|
9939
9961
|
}
|
|
9940
9962
|
|
|
@@ -9966,7 +9988,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9966
9988
|
}, _callee57, this);
|
|
9967
9989
|
}));
|
|
9968
9990
|
|
|
9969
|
-
function deleteSegment(
|
|
9991
|
+
function deleteSegment(_x77) {
|
|
9970
9992
|
return _deleteSegment.apply(this, arguments);
|
|
9971
9993
|
}
|
|
9972
9994
|
|
|
@@ -10008,7 +10030,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10008
10030
|
}, _callee58, this);
|
|
10009
10031
|
}));
|
|
10010
10032
|
|
|
10011
|
-
function createCampaign(
|
|
10033
|
+
function createCampaign(_x78) {
|
|
10012
10034
|
return _createCampaign.apply(this, arguments);
|
|
10013
10035
|
}
|
|
10014
10036
|
|
|
@@ -10048,7 +10070,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10048
10070
|
}, _callee59, this);
|
|
10049
10071
|
}));
|
|
10050
10072
|
|
|
10051
|
-
function getCampaign(
|
|
10073
|
+
function getCampaign(_x79) {
|
|
10052
10074
|
return _getCampaign.apply(this, arguments);
|
|
10053
10075
|
}
|
|
10054
10076
|
|
|
@@ -10087,7 +10109,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10087
10109
|
}, _callee60, this);
|
|
10088
10110
|
}));
|
|
10089
10111
|
|
|
10090
|
-
function listCampaigns(
|
|
10112
|
+
function listCampaigns(_x80) {
|
|
10091
10113
|
return _listCampaigns.apply(this, arguments);
|
|
10092
10114
|
}
|
|
10093
10115
|
|
|
@@ -10130,7 +10152,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10130
10152
|
}, _callee61, this);
|
|
10131
10153
|
}));
|
|
10132
10154
|
|
|
10133
|
-
function updateCampaign(
|
|
10155
|
+
function updateCampaign(_x81, _x82) {
|
|
10134
10156
|
return _updateCampaign.apply(this, arguments);
|
|
10135
10157
|
}
|
|
10136
10158
|
|
|
@@ -10162,7 +10184,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10162
10184
|
}, _callee62, this);
|
|
10163
10185
|
}));
|
|
10164
10186
|
|
|
10165
|
-
function deleteCampaign(
|
|
10187
|
+
function deleteCampaign(_x83) {
|
|
10166
10188
|
return _deleteCampaign.apply(this, arguments);
|
|
10167
10189
|
}
|
|
10168
10190
|
|
|
@@ -10206,7 +10228,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10206
10228
|
}, _callee63, this);
|
|
10207
10229
|
}));
|
|
10208
10230
|
|
|
10209
|
-
function scheduleCampaign(
|
|
10231
|
+
function scheduleCampaign(_x84, _x85) {
|
|
10210
10232
|
return _scheduleCampaign.apply(this, arguments);
|
|
10211
10233
|
}
|
|
10212
10234
|
|
|
@@ -10246,7 +10268,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10246
10268
|
}, _callee64, this);
|
|
10247
10269
|
}));
|
|
10248
10270
|
|
|
10249
|
-
function stopCampaign(
|
|
10271
|
+
function stopCampaign(_x86) {
|
|
10250
10272
|
return _stopCampaign.apply(this, arguments);
|
|
10251
10273
|
}
|
|
10252
10274
|
|
|
@@ -10286,7 +10308,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10286
10308
|
}, _callee65, this);
|
|
10287
10309
|
}));
|
|
10288
10310
|
|
|
10289
|
-
function resumeCampaign(
|
|
10311
|
+
function resumeCampaign(_x87) {
|
|
10290
10312
|
return _resumeCampaign.apply(this, arguments);
|
|
10291
10313
|
}
|
|
10292
10314
|
|
|
@@ -10329,7 +10351,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10329
10351
|
}, _callee66, this);
|
|
10330
10352
|
}));
|
|
10331
10353
|
|
|
10332
|
-
function testCampaign(
|
|
10354
|
+
function testCampaign(_x88, _x89) {
|
|
10333
10355
|
return _testCampaign.apply(this, arguments);
|
|
10334
10356
|
}
|
|
10335
10357
|
|
|
@@ -10362,7 +10384,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10362
10384
|
}, _callee67, this);
|
|
10363
10385
|
}));
|
|
10364
10386
|
|
|
10365
|
-
function enrichURL(
|
|
10387
|
+
function enrichURL(_x90) {
|
|
10366
10388
|
return _enrichURL.apply(this, arguments);
|
|
10367
10389
|
}
|
|
10368
10390
|
|
|
@@ -10394,7 +10416,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10394
10416
|
}, _callee68, this);
|
|
10395
10417
|
}));
|
|
10396
10418
|
|
|
10397
|
-
function getTask(
|
|
10419
|
+
function getTask(_x91) {
|
|
10398
10420
|
return _getTask.apply(this, arguments);
|
|
10399
10421
|
}
|
|
10400
10422
|
|
|
@@ -10436,7 +10458,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10436
10458
|
}, _callee69, this);
|
|
10437
10459
|
}));
|
|
10438
10460
|
|
|
10439
|
-
function deleteChannels(
|
|
10461
|
+
function deleteChannels(_x92) {
|
|
10440
10462
|
return _deleteChannels.apply(this, arguments);
|
|
10441
10463
|
}
|
|
10442
10464
|
|
|
@@ -10499,7 +10521,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10499
10521
|
}, _callee70, this);
|
|
10500
10522
|
}));
|
|
10501
10523
|
|
|
10502
|
-
function deleteUsers(
|
|
10524
|
+
function deleteUsers(_x93, _x94) {
|
|
10503
10525
|
return _deleteUsers.apply(this, arguments);
|
|
10504
10526
|
}
|
|
10505
10527
|
|
|
@@ -10514,7 +10536,6 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10514
10536
|
*
|
|
10515
10537
|
* @private
|
|
10516
10538
|
* @param {string} filename filename of uploaded data
|
|
10517
|
-
*
|
|
10518
10539
|
* @return {APIResponse & CreateImportResponse} An ImportTask
|
|
10519
10540
|
*/
|
|
10520
10541
|
|
|
@@ -10542,7 +10563,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10542
10563
|
}, _callee71, this);
|
|
10543
10564
|
}));
|
|
10544
10565
|
|
|
10545
|
-
function _createImportURL(
|
|
10566
|
+
function _createImportURL(_x95) {
|
|
10546
10567
|
return _createImportURL2.apply(this, arguments);
|
|
10547
10568
|
}
|
|
10548
10569
|
|
|
@@ -10557,7 +10578,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10557
10578
|
*
|
|
10558
10579
|
* @private
|
|
10559
10580
|
* @param {string} path path of uploaded data
|
|
10560
|
-
*
|
|
10581
|
+
* @param {CreateImportOptions} options import options
|
|
10561
10582
|
* @return {APIResponse & CreateImportResponse} An ImportTask
|
|
10562
10583
|
*/
|
|
10563
10584
|
|
|
@@ -10565,19 +10586,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10565
10586
|
key: "_createImport",
|
|
10566
10587
|
value: function () {
|
|
10567
10588
|
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(path) {
|
|
10589
|
+
var options,
|
|
10590
|
+
_args72 = arguments;
|
|
10568
10591
|
return _regeneratorRuntime.wrap(function _callee72$(_context72) {
|
|
10569
10592
|
while (1) {
|
|
10570
10593
|
switch (_context72.prev = _context72.next) {
|
|
10571
10594
|
case 0:
|
|
10572
|
-
|
|
10573
|
-
|
|
10595
|
+
options = _args72.length > 1 && _args72[1] !== undefined ? _args72[1] : {
|
|
10596
|
+
mode: 'upsert'
|
|
10597
|
+
};
|
|
10598
|
+
_context72.next = 3;
|
|
10599
|
+
return this.post(this.baseURL + "/imports", _objectSpread({
|
|
10574
10600
|
path: path
|
|
10575
|
-
});
|
|
10601
|
+
}, options));
|
|
10576
10602
|
|
|
10577
|
-
case
|
|
10603
|
+
case 3:
|
|
10578
10604
|
return _context72.abrupt("return", _context72.sent);
|
|
10579
10605
|
|
|
10580
|
-
case
|
|
10606
|
+
case 4:
|
|
10581
10607
|
case "end":
|
|
10582
10608
|
return _context72.stop();
|
|
10583
10609
|
}
|
|
@@ -10585,7 +10611,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10585
10611
|
}, _callee72, this);
|
|
10586
10612
|
}));
|
|
10587
10613
|
|
|
10588
|
-
function _createImport(
|
|
10614
|
+
function _createImport(_x96) {
|
|
10589
10615
|
return _createImport2.apply(this, arguments);
|
|
10590
10616
|
}
|
|
10591
10617
|
|
|
@@ -10626,7 +10652,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10626
10652
|
}, _callee73, this);
|
|
10627
10653
|
}));
|
|
10628
10654
|
|
|
10629
|
-
function _getImport(
|
|
10655
|
+
function _getImport(_x97) {
|
|
10630
10656
|
return _getImport2.apply(this, arguments);
|
|
10631
10657
|
}
|
|
10632
10658
|
|
|
@@ -10667,7 +10693,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10667
10693
|
}, _callee74, this);
|
|
10668
10694
|
}));
|
|
10669
10695
|
|
|
10670
|
-
function _listImports(
|
|
10696
|
+
function _listImports(_x98) {
|
|
10671
10697
|
return _listImports2.apply(this, arguments);
|
|
10672
10698
|
}
|
|
10673
10699
|
|
|
@@ -10707,7 +10733,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10707
10733
|
}, _callee75, this);
|
|
10708
10734
|
}));
|
|
10709
10735
|
|
|
10710
|
-
function upsertPushProvider(
|
|
10736
|
+
function upsertPushProvider(_x99) {
|
|
10711
10737
|
return _upsertPushProvider.apply(this, arguments);
|
|
10712
10738
|
}
|
|
10713
10739
|
|
|
@@ -10747,7 +10773,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10747
10773
|
}, _callee76, this);
|
|
10748
10774
|
}));
|
|
10749
10775
|
|
|
10750
|
-
function deletePushProvider(
|
|
10776
|
+
function deletePushProvider(_x100) {
|
|
10751
10777
|
return _deletePushProvider.apply(this, arguments);
|
|
10752
10778
|
}
|
|
10753
10779
|
|