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/index.es.js
CHANGED
|
@@ -367,12 +367,15 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
367
367
|
|
|
368
368
|
if (isFromShadowBannedUser) {
|
|
369
369
|
continue;
|
|
370
|
-
}
|
|
370
|
+
} // If message is already formatted we can skip the tasks below
|
|
371
|
+
// This will be true for messages that are already present at the state -> this happens when we perform merging of message sets
|
|
372
|
+
// This will be also true for message previews used by some SDKs
|
|
373
|
+
|
|
371
374
|
|
|
372
|
-
var
|
|
375
|
+
var isMessageFormatted = messagesToAdd[i].created_at instanceof Date;
|
|
373
376
|
var message = void 0;
|
|
374
377
|
|
|
375
|
-
if (
|
|
378
|
+
if (isMessageFormatted) {
|
|
376
379
|
message = messagesToAdd[i];
|
|
377
380
|
} else {
|
|
378
381
|
var _this$_channel;
|
|
@@ -422,7 +425,7 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
422
425
|
*/
|
|
423
426
|
|
|
424
427
|
|
|
425
|
-
if (parentID && !initializing
|
|
428
|
+
if (parentID && !initializing) {
|
|
426
429
|
var thread = this.threads[parentID] || [];
|
|
427
430
|
|
|
428
431
|
var threadMessages = this._addToMessageList(thread, message, timestampChanged, 'created_at', addIfDoesNotExist);
|
|
@@ -5149,7 +5152,7 @@ function TokenManager(secret) {
|
|
|
5149
5152
|
_defineProperty(this, "loadToken", function () {
|
|
5150
5153
|
// eslint-disable-next-line no-async-promise-executor
|
|
5151
5154
|
_this.loadTokenPromise = new Promise( /*#__PURE__*/function () {
|
|
5152
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(resolve) {
|
|
5155
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(resolve, reject) {
|
|
5153
5156
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
5154
5157
|
while (1) {
|
|
5155
5158
|
switch (_context2.prev = _context2.next) {
|
|
@@ -5163,26 +5166,36 @@ function TokenManager(secret) {
|
|
|
5163
5166
|
|
|
5164
5167
|
case 2:
|
|
5165
5168
|
if (!(_this.tokenProvider && typeof _this.tokenProvider !== 'string')) {
|
|
5166
|
-
_context2.next =
|
|
5169
|
+
_context2.next = 13;
|
|
5167
5170
|
break;
|
|
5168
5171
|
}
|
|
5169
5172
|
|
|
5170
|
-
_context2.
|
|
5173
|
+
_context2.prev = 3;
|
|
5174
|
+
_context2.next = 6;
|
|
5171
5175
|
return _this.tokenProvider();
|
|
5172
5176
|
|
|
5173
|
-
case
|
|
5177
|
+
case 6:
|
|
5174
5178
|
_this.token = _context2.sent;
|
|
5179
|
+
_context2.next = 12;
|
|
5180
|
+
break;
|
|
5181
|
+
|
|
5182
|
+
case 9:
|
|
5183
|
+
_context2.prev = 9;
|
|
5184
|
+
_context2.t0 = _context2["catch"](3);
|
|
5185
|
+
return _context2.abrupt("return", reject(new Error("Call to tokenProvider failed with message: ".concat(_context2.t0))));
|
|
5186
|
+
|
|
5187
|
+
case 12:
|
|
5175
5188
|
resolve(_this.token);
|
|
5176
5189
|
|
|
5177
|
-
case
|
|
5190
|
+
case 13:
|
|
5178
5191
|
case "end":
|
|
5179
5192
|
return _context2.stop();
|
|
5180
5193
|
}
|
|
5181
5194
|
}
|
|
5182
|
-
}, _callee2);
|
|
5195
|
+
}, _callee2, null, [[3, 9]]);
|
|
5183
5196
|
}));
|
|
5184
5197
|
|
|
5185
|
-
return function (_x3) {
|
|
5198
|
+
return function (_x3, _x4) {
|
|
5186
5199
|
return _ref2.apply(this, arguments);
|
|
5187
5200
|
};
|
|
5188
5201
|
}());
|
|
@@ -6692,10 +6705,10 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6692
6705
|
key: "updateAppSettings",
|
|
6693
6706
|
value:
|
|
6694
6707
|
/**
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
|
|
6698
|
-
|
|
6708
|
+
* updateAppSettings - updates application settings
|
|
6709
|
+
*
|
|
6710
|
+
* @param {AppSettings} options App settings.
|
|
6711
|
+
* IE: {
|
|
6699
6712
|
"apn_config": {
|
|
6700
6713
|
"auth_type": "token",
|
|
6701
6714
|
"auth_key": fs.readFileSync(
|
|
@@ -6715,7 +6728,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6715
6728
|
},
|
|
6716
6729
|
"webhook_url": "https://acme.com/my/awesome/webhook/"
|
|
6717
6730
|
}
|
|
6718
|
-
|
|
6731
|
+
*/
|
|
6719
6732
|
function () {
|
|
6720
6733
|
var _updateAppSettings = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(options) {
|
|
6721
6734
|
var _options$apn_config;
|
|
@@ -6906,17 +6919,19 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6906
6919
|
return getAppSettings;
|
|
6907
6920
|
}()
|
|
6908
6921
|
/**
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
6916
|
-
|
|
6917
|
-
|
|
6918
|
-
|
|
6919
|
-
|
|
6922
|
+
* testPushSettings - Tests the push settings for a user with a random chat message and the configured push templates
|
|
6923
|
+
*
|
|
6924
|
+
* @param {string} userID User ID. If user has no devices, it will error
|
|
6925
|
+
* @param {TestPushDataInput} [data] Overrides for push templates/message used
|
|
6926
|
+
* IE: {
|
|
6927
|
+
messageID: 'id-of-message', // will error if message does not exist
|
|
6928
|
+
apnTemplate: '{}', // if app doesn't have apn configured it will error
|
|
6929
|
+
firebaseTemplate: '{}', // if app doesn't have firebase configured it will error
|
|
6930
|
+
firebaseDataTemplate: '{}', // if app doesn't have firebase configured it will error
|
|
6931
|
+
skipDevices: true, // skip config/device checks and sending to real devices
|
|
6932
|
+
pushProviderName: 'staging' // one of your configured push providers
|
|
6933
|
+
pushProviderType: 'apn' // one of supported provider types
|
|
6934
|
+
}
|
|
6920
6935
|
*/
|
|
6921
6936
|
|
|
6922
6937
|
}, {
|
|
@@ -6931,7 +6946,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6931
6946
|
case 0:
|
|
6932
6947
|
data = _args12.length > 1 && _args12[1] !== undefined ? _args12[1] : {};
|
|
6933
6948
|
_context12.next = 3;
|
|
6934
|
-
return this.post(this.baseURL + '/check_push', _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
6949
|
+
return this.post(this.baseURL + '/check_push', _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
6935
6950
|
user_id: userID
|
|
6936
6951
|
}, data.messageID ? {
|
|
6937
6952
|
message_id: data.messageID
|
|
@@ -6943,6 +6958,10 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6943
6958
|
firebase_data_template: data.firebaseDataTemplate
|
|
6944
6959
|
} : {}), data.skipDevices ? {
|
|
6945
6960
|
skip_devices: true
|
|
6961
|
+
} : {}), data.pushProviderName ? {
|
|
6962
|
+
push_provider_name: data.pushProviderName
|
|
6963
|
+
} : {}), data.pushProviderType ? {
|
|
6964
|
+
push_provider_type: data.pushProviderType
|
|
6946
6965
|
} : {}));
|
|
6947
6966
|
|
|
6948
6967
|
case 3:
|
|
@@ -6966,11 +6985,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6966
6985
|
* testSQSSettings - Tests that the given or configured SQS configuration is valid
|
|
6967
6986
|
*
|
|
6968
6987
|
* @param {TestSQSDataInput} [data] Overrides SQS settings for testing if needed
|
|
6969
|
-
*
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
6988
|
+
* IE: {
|
|
6989
|
+
sqs_key: 'auth_key',
|
|
6990
|
+
sqs_secret: 'auth_secret',
|
|
6991
|
+
sqs_url: 'url_to_queue',
|
|
6992
|
+
}
|
|
6974
6993
|
*/
|
|
6975
6994
|
|
|
6976
6995
|
}, {
|
|
@@ -7908,23 +7927,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7908
7927
|
* @param {string} id the device id
|
|
7909
7928
|
* @param {PushProvider} push_provider the push provider
|
|
7910
7929
|
* @param {string} [userID] the user id (defaults to current user)
|
|
7930
|
+
* @param {string} [push_provider_name] user provided push provider name for multi bundle support
|
|
7911
7931
|
*
|
|
7912
7932
|
*/
|
|
7913
7933
|
|
|
7914
7934
|
}, {
|
|
7915
7935
|
key: "addDevice",
|
|
7916
7936
|
value: function () {
|
|
7917
|
-
var _addDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21(id, push_provider, userID) {
|
|
7937
|
+
var _addDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21(id, push_provider, userID, push_provider_name) {
|
|
7918
7938
|
return _regeneratorRuntime.wrap(function _callee21$(_context21) {
|
|
7919
7939
|
while (1) {
|
|
7920
7940
|
switch (_context21.prev = _context21.next) {
|
|
7921
7941
|
case 0:
|
|
7922
7942
|
_context21.next = 2;
|
|
7923
|
-
return this.post(this.baseURL + '/devices', _objectSpread({
|
|
7943
|
+
return this.post(this.baseURL + '/devices', _objectSpread(_objectSpread({
|
|
7924
7944
|
id: id,
|
|
7925
7945
|
push_provider: push_provider
|
|
7926
7946
|
}, userID != null ? {
|
|
7927
7947
|
user_id: userID
|
|
7948
|
+
} : {}), push_provider_name != null ? {
|
|
7949
|
+
push_provider_name: push_provider_name
|
|
7928
7950
|
} : {}));
|
|
7929
7951
|
|
|
7930
7952
|
case 2:
|
|
@@ -7938,7 +7960,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7938
7960
|
}, _callee21, this);
|
|
7939
7961
|
}));
|
|
7940
7962
|
|
|
7941
|
-
function addDevice(_x20, _x21, _x22) {
|
|
7963
|
+
function addDevice(_x20, _x21, _x22, _x23) {
|
|
7942
7964
|
return _addDevice.apply(this, arguments);
|
|
7943
7965
|
}
|
|
7944
7966
|
|
|
@@ -7976,7 +7998,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7976
7998
|
}, _callee22, this);
|
|
7977
7999
|
}));
|
|
7978
8000
|
|
|
7979
|
-
function getDevices(
|
|
8001
|
+
function getDevices(_x24) {
|
|
7980
8002
|
return _getDevices.apply(this, arguments);
|
|
7981
8003
|
}
|
|
7982
8004
|
|
|
@@ -8016,7 +8038,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8016
8038
|
}, _callee23, this);
|
|
8017
8039
|
}));
|
|
8018
8040
|
|
|
8019
|
-
function removeDevice(
|
|
8041
|
+
function removeDevice(_x25, _x26) {
|
|
8020
8042
|
return _removeDevice.apply(this, arguments);
|
|
8021
8043
|
}
|
|
8022
8044
|
|
|
@@ -8057,7 +8079,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8057
8079
|
}, _callee24, this);
|
|
8058
8080
|
}));
|
|
8059
8081
|
|
|
8060
|
-
function getRateLimits(
|
|
8082
|
+
function getRateLimits(_x27) {
|
|
8061
8083
|
return _getRateLimits.apply(this, arguments);
|
|
8062
8084
|
}
|
|
8063
8085
|
|
|
@@ -8158,7 +8180,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8158
8180
|
}, _callee25, this);
|
|
8159
8181
|
}));
|
|
8160
8182
|
|
|
8161
|
-
function partialUpdateUser(
|
|
8183
|
+
function partialUpdateUser(_x28) {
|
|
8162
8184
|
return _partialUpdateUser.apply(this, arguments);
|
|
8163
8185
|
}
|
|
8164
8186
|
|
|
@@ -8244,7 +8266,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8244
8266
|
}, _callee26, this, [[2, 13, 16, 19]]);
|
|
8245
8267
|
}));
|
|
8246
8268
|
|
|
8247
|
-
function upsertUsers(
|
|
8269
|
+
function upsertUsers(_x29) {
|
|
8248
8270
|
return _upsertUsers.apply(this, arguments);
|
|
8249
8271
|
}
|
|
8250
8272
|
|
|
@@ -8357,7 +8379,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8357
8379
|
}, _callee27, this, [[1, 11, 14, 17]]);
|
|
8358
8380
|
}));
|
|
8359
8381
|
|
|
8360
|
-
function partialUpdateUsers(
|
|
8382
|
+
function partialUpdateUsers(_x30) {
|
|
8361
8383
|
return _partialUpdateUsers.apply(this, arguments);
|
|
8362
8384
|
}
|
|
8363
8385
|
|
|
@@ -8385,7 +8407,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8385
8407
|
}, _callee28, this);
|
|
8386
8408
|
}));
|
|
8387
8409
|
|
|
8388
|
-
function deleteUser(
|
|
8410
|
+
function deleteUser(_x31, _x32) {
|
|
8389
8411
|
return _deleteUser.apply(this, arguments);
|
|
8390
8412
|
}
|
|
8391
8413
|
|
|
@@ -8413,7 +8435,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8413
8435
|
}, _callee29, this);
|
|
8414
8436
|
}));
|
|
8415
8437
|
|
|
8416
|
-
function reactivateUser(
|
|
8438
|
+
function reactivateUser(_x33, _x34) {
|
|
8417
8439
|
return _reactivateUser.apply(this, arguments);
|
|
8418
8440
|
}
|
|
8419
8441
|
|
|
@@ -8441,7 +8463,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8441
8463
|
}, _callee30, this);
|
|
8442
8464
|
}));
|
|
8443
8465
|
|
|
8444
|
-
function deactivateUser(
|
|
8466
|
+
function deactivateUser(_x35, _x36) {
|
|
8445
8467
|
return _deactivateUser.apply(this, arguments);
|
|
8446
8468
|
}
|
|
8447
8469
|
|
|
@@ -8469,7 +8491,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8469
8491
|
}, _callee31, this);
|
|
8470
8492
|
}));
|
|
8471
8493
|
|
|
8472
|
-
function exportUser(
|
|
8494
|
+
function exportUser(_x37, _x38) {
|
|
8473
8495
|
return _exportUser.apply(this, arguments);
|
|
8474
8496
|
}
|
|
8475
8497
|
|
|
@@ -8506,7 +8528,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8506
8528
|
}, _callee32, this);
|
|
8507
8529
|
}));
|
|
8508
8530
|
|
|
8509
|
-
function banUser(
|
|
8531
|
+
function banUser(_x39, _x40) {
|
|
8510
8532
|
return _banUser.apply(this, arguments);
|
|
8511
8533
|
}
|
|
8512
8534
|
|
|
@@ -8543,7 +8565,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8543
8565
|
}, _callee33, this);
|
|
8544
8566
|
}));
|
|
8545
8567
|
|
|
8546
|
-
function unbanUser(
|
|
8568
|
+
function unbanUser(_x41, _x42) {
|
|
8547
8569
|
return _unbanUser.apply(this, arguments);
|
|
8548
8570
|
}
|
|
8549
8571
|
|
|
@@ -8580,7 +8602,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8580
8602
|
}, _callee34, this);
|
|
8581
8603
|
}));
|
|
8582
8604
|
|
|
8583
|
-
function shadowBan(
|
|
8605
|
+
function shadowBan(_x43, _x44) {
|
|
8584
8606
|
return _shadowBan.apply(this, arguments);
|
|
8585
8607
|
}
|
|
8586
8608
|
|
|
@@ -8617,7 +8639,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8617
8639
|
}, _callee35, this);
|
|
8618
8640
|
}));
|
|
8619
8641
|
|
|
8620
|
-
function removeShadowBan(
|
|
8642
|
+
function removeShadowBan(_x45, _x46) {
|
|
8621
8643
|
return _removeShadowBan.apply(this, arguments);
|
|
8622
8644
|
}
|
|
8623
8645
|
|
|
@@ -8660,7 +8682,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8660
8682
|
}, _callee36, this);
|
|
8661
8683
|
}));
|
|
8662
8684
|
|
|
8663
|
-
function muteUser(
|
|
8685
|
+
function muteUser(_x47, _x48) {
|
|
8664
8686
|
return _muteUser.apply(this, arguments);
|
|
8665
8687
|
}
|
|
8666
8688
|
|
|
@@ -8699,7 +8721,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8699
8721
|
}, _callee37, this);
|
|
8700
8722
|
}));
|
|
8701
8723
|
|
|
8702
|
-
function unmuteUser(
|
|
8724
|
+
function unmuteUser(_x49, _x50) {
|
|
8703
8725
|
return _unmuteUser.apply(this, arguments);
|
|
8704
8726
|
}
|
|
8705
8727
|
|
|
@@ -8758,7 +8780,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8758
8780
|
}, _callee38, this);
|
|
8759
8781
|
}));
|
|
8760
8782
|
|
|
8761
|
-
function flagMessage(
|
|
8783
|
+
function flagMessage(_x51) {
|
|
8762
8784
|
return _flagMessage.apply(this, arguments);
|
|
8763
8785
|
}
|
|
8764
8786
|
|
|
@@ -8798,7 +8820,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8798
8820
|
}, _callee39, this);
|
|
8799
8821
|
}));
|
|
8800
8822
|
|
|
8801
|
-
function flagUser(
|
|
8823
|
+
function flagUser(_x52) {
|
|
8802
8824
|
return _flagUser.apply(this, arguments);
|
|
8803
8825
|
}
|
|
8804
8826
|
|
|
@@ -8838,7 +8860,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8838
8860
|
}, _callee40, this);
|
|
8839
8861
|
}));
|
|
8840
8862
|
|
|
8841
|
-
function unflagMessage(
|
|
8863
|
+
function unflagMessage(_x53) {
|
|
8842
8864
|
return _unflagMessage.apply(this, arguments);
|
|
8843
8865
|
}
|
|
8844
8866
|
|
|
@@ -8878,7 +8900,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8878
8900
|
}, _callee41, this);
|
|
8879
8901
|
}));
|
|
8880
8902
|
|
|
8881
|
-
function unflagUser(
|
|
8903
|
+
function unflagUser(_x54) {
|
|
8882
8904
|
return _unflagUser.apply(this, arguments);
|
|
8883
8905
|
}
|
|
8884
8906
|
|
|
@@ -9024,7 +9046,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9024
9046
|
}, _callee44, this);
|
|
9025
9047
|
}));
|
|
9026
9048
|
|
|
9027
|
-
function _reviewFlagReport(
|
|
9049
|
+
function _reviewFlagReport(_x55, _x56) {
|
|
9028
9050
|
return _reviewFlagReport2.apply(this, arguments);
|
|
9029
9051
|
}
|
|
9030
9052
|
|
|
@@ -9070,7 +9092,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9070
9092
|
}, _callee45, this);
|
|
9071
9093
|
}));
|
|
9072
9094
|
|
|
9073
|
-
function _unblockMessage(
|
|
9095
|
+
function _unblockMessage(_x57) {
|
|
9074
9096
|
return _unblockMessage2.apply(this, arguments);
|
|
9075
9097
|
}
|
|
9076
9098
|
|
|
@@ -9209,7 +9231,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9209
9231
|
}, _callee47, this);
|
|
9210
9232
|
}));
|
|
9211
9233
|
|
|
9212
|
-
function translateMessage(
|
|
9234
|
+
function translateMessage(_x58, _x59) {
|
|
9213
9235
|
return _translateMessage.apply(this, arguments);
|
|
9214
9236
|
}
|
|
9215
9237
|
|
|
@@ -9371,7 +9393,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9371
9393
|
}, _callee48, this);
|
|
9372
9394
|
}));
|
|
9373
9395
|
|
|
9374
|
-
function updateMessage(
|
|
9396
|
+
function updateMessage(_x60, _x61, _x62) {
|
|
9375
9397
|
return _updateMessage.apply(this, arguments);
|
|
9376
9398
|
}
|
|
9377
9399
|
|
|
@@ -9432,7 +9454,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9432
9454
|
}, _callee49, this);
|
|
9433
9455
|
}));
|
|
9434
9456
|
|
|
9435
|
-
function partialUpdateMessage(
|
|
9457
|
+
function partialUpdateMessage(_x63, _x64, _x65, _x66) {
|
|
9436
9458
|
return _partialUpdateMessage.apply(this, arguments);
|
|
9437
9459
|
}
|
|
9438
9460
|
|
|
@@ -9469,7 +9491,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9469
9491
|
}, _callee50, this);
|
|
9470
9492
|
}));
|
|
9471
9493
|
|
|
9472
|
-
function deleteMessage(
|
|
9494
|
+
function deleteMessage(_x67, _x68) {
|
|
9473
9495
|
return _deleteMessage.apply(this, arguments);
|
|
9474
9496
|
}
|
|
9475
9497
|
|
|
@@ -9497,7 +9519,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9497
9519
|
}, _callee51, this);
|
|
9498
9520
|
}));
|
|
9499
9521
|
|
|
9500
|
-
function getMessage(
|
|
9522
|
+
function getMessage(_x69) {
|
|
9501
9523
|
return _getMessage.apply(this, arguments);
|
|
9502
9524
|
}
|
|
9503
9525
|
|
|
@@ -9506,7 +9528,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9506
9528
|
}, {
|
|
9507
9529
|
key: "getUserAgent",
|
|
9508
9530
|
value: function getUserAgent() {
|
|
9509
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "6.
|
|
9531
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "6.4.0");
|
|
9510
9532
|
}
|
|
9511
9533
|
}, {
|
|
9512
9534
|
key: "setUserAgent",
|
|
@@ -9722,7 +9744,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9722
9744
|
}, _callee52, this);
|
|
9723
9745
|
}));
|
|
9724
9746
|
|
|
9725
|
-
function sendUserCustomEvent(
|
|
9747
|
+
function sendUserCustomEvent(_x70, _x71) {
|
|
9726
9748
|
return _sendUserCustomEvent.apply(this, arguments);
|
|
9727
9749
|
}
|
|
9728
9750
|
|
|
@@ -9815,7 +9837,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9815
9837
|
}, _callee53, this);
|
|
9816
9838
|
}));
|
|
9817
9839
|
|
|
9818
|
-
function createSegment(
|
|
9840
|
+
function createSegment(_x72) {
|
|
9819
9841
|
return _createSegment.apply(this, arguments);
|
|
9820
9842
|
}
|
|
9821
9843
|
|
|
@@ -9855,7 +9877,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9855
9877
|
}, _callee54, this);
|
|
9856
9878
|
}));
|
|
9857
9879
|
|
|
9858
|
-
function getSegment(
|
|
9880
|
+
function getSegment(_x73) {
|
|
9859
9881
|
return _getSegment.apply(this, arguments);
|
|
9860
9882
|
}
|
|
9861
9883
|
|
|
@@ -9894,7 +9916,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9894
9916
|
}, _callee55, this);
|
|
9895
9917
|
}));
|
|
9896
9918
|
|
|
9897
|
-
function listSegments(
|
|
9919
|
+
function listSegments(_x74) {
|
|
9898
9920
|
return _listSegments.apply(this, arguments);
|
|
9899
9921
|
}
|
|
9900
9922
|
|
|
@@ -9937,7 +9959,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9937
9959
|
}, _callee56, this);
|
|
9938
9960
|
}));
|
|
9939
9961
|
|
|
9940
|
-
function updateSegment(
|
|
9962
|
+
function updateSegment(_x75, _x76) {
|
|
9941
9963
|
return _updateSegment.apply(this, arguments);
|
|
9942
9964
|
}
|
|
9943
9965
|
|
|
@@ -9969,7 +9991,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9969
9991
|
}, _callee57, this);
|
|
9970
9992
|
}));
|
|
9971
9993
|
|
|
9972
|
-
function deleteSegment(
|
|
9994
|
+
function deleteSegment(_x77) {
|
|
9973
9995
|
return _deleteSegment.apply(this, arguments);
|
|
9974
9996
|
}
|
|
9975
9997
|
|
|
@@ -10011,7 +10033,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10011
10033
|
}, _callee58, this);
|
|
10012
10034
|
}));
|
|
10013
10035
|
|
|
10014
|
-
function createCampaign(
|
|
10036
|
+
function createCampaign(_x78) {
|
|
10015
10037
|
return _createCampaign.apply(this, arguments);
|
|
10016
10038
|
}
|
|
10017
10039
|
|
|
@@ -10051,7 +10073,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10051
10073
|
}, _callee59, this);
|
|
10052
10074
|
}));
|
|
10053
10075
|
|
|
10054
|
-
function getCampaign(
|
|
10076
|
+
function getCampaign(_x79) {
|
|
10055
10077
|
return _getCampaign.apply(this, arguments);
|
|
10056
10078
|
}
|
|
10057
10079
|
|
|
@@ -10090,7 +10112,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10090
10112
|
}, _callee60, this);
|
|
10091
10113
|
}));
|
|
10092
10114
|
|
|
10093
|
-
function listCampaigns(
|
|
10115
|
+
function listCampaigns(_x80) {
|
|
10094
10116
|
return _listCampaigns.apply(this, arguments);
|
|
10095
10117
|
}
|
|
10096
10118
|
|
|
@@ -10133,7 +10155,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10133
10155
|
}, _callee61, this);
|
|
10134
10156
|
}));
|
|
10135
10157
|
|
|
10136
|
-
function updateCampaign(
|
|
10158
|
+
function updateCampaign(_x81, _x82) {
|
|
10137
10159
|
return _updateCampaign.apply(this, arguments);
|
|
10138
10160
|
}
|
|
10139
10161
|
|
|
@@ -10165,7 +10187,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10165
10187
|
}, _callee62, this);
|
|
10166
10188
|
}));
|
|
10167
10189
|
|
|
10168
|
-
function deleteCampaign(
|
|
10190
|
+
function deleteCampaign(_x83) {
|
|
10169
10191
|
return _deleteCampaign.apply(this, arguments);
|
|
10170
10192
|
}
|
|
10171
10193
|
|
|
@@ -10209,7 +10231,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10209
10231
|
}, _callee63, this);
|
|
10210
10232
|
}));
|
|
10211
10233
|
|
|
10212
|
-
function scheduleCampaign(
|
|
10234
|
+
function scheduleCampaign(_x84, _x85) {
|
|
10213
10235
|
return _scheduleCampaign.apply(this, arguments);
|
|
10214
10236
|
}
|
|
10215
10237
|
|
|
@@ -10249,7 +10271,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10249
10271
|
}, _callee64, this);
|
|
10250
10272
|
}));
|
|
10251
10273
|
|
|
10252
|
-
function stopCampaign(
|
|
10274
|
+
function stopCampaign(_x86) {
|
|
10253
10275
|
return _stopCampaign.apply(this, arguments);
|
|
10254
10276
|
}
|
|
10255
10277
|
|
|
@@ -10289,7 +10311,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10289
10311
|
}, _callee65, this);
|
|
10290
10312
|
}));
|
|
10291
10313
|
|
|
10292
|
-
function resumeCampaign(
|
|
10314
|
+
function resumeCampaign(_x87) {
|
|
10293
10315
|
return _resumeCampaign.apply(this, arguments);
|
|
10294
10316
|
}
|
|
10295
10317
|
|
|
@@ -10332,7 +10354,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10332
10354
|
}, _callee66, this);
|
|
10333
10355
|
}));
|
|
10334
10356
|
|
|
10335
|
-
function testCampaign(
|
|
10357
|
+
function testCampaign(_x88, _x89) {
|
|
10336
10358
|
return _testCampaign.apply(this, arguments);
|
|
10337
10359
|
}
|
|
10338
10360
|
|
|
@@ -10365,7 +10387,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10365
10387
|
}, _callee67, this);
|
|
10366
10388
|
}));
|
|
10367
10389
|
|
|
10368
|
-
function enrichURL(
|
|
10390
|
+
function enrichURL(_x90) {
|
|
10369
10391
|
return _enrichURL.apply(this, arguments);
|
|
10370
10392
|
}
|
|
10371
10393
|
|
|
@@ -10397,7 +10419,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10397
10419
|
}, _callee68, this);
|
|
10398
10420
|
}));
|
|
10399
10421
|
|
|
10400
|
-
function getTask(
|
|
10422
|
+
function getTask(_x91) {
|
|
10401
10423
|
return _getTask.apply(this, arguments);
|
|
10402
10424
|
}
|
|
10403
10425
|
|
|
@@ -10439,7 +10461,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10439
10461
|
}, _callee69, this);
|
|
10440
10462
|
}));
|
|
10441
10463
|
|
|
10442
|
-
function deleteChannels(
|
|
10464
|
+
function deleteChannels(_x92) {
|
|
10443
10465
|
return _deleteChannels.apply(this, arguments);
|
|
10444
10466
|
}
|
|
10445
10467
|
|
|
@@ -10502,7 +10524,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10502
10524
|
}, _callee70, this);
|
|
10503
10525
|
}));
|
|
10504
10526
|
|
|
10505
|
-
function deleteUsers(
|
|
10527
|
+
function deleteUsers(_x93, _x94) {
|
|
10506
10528
|
return _deleteUsers.apply(this, arguments);
|
|
10507
10529
|
}
|
|
10508
10530
|
|
|
@@ -10517,7 +10539,6 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10517
10539
|
*
|
|
10518
10540
|
* @private
|
|
10519
10541
|
* @param {string} filename filename of uploaded data
|
|
10520
|
-
*
|
|
10521
10542
|
* @return {APIResponse & CreateImportResponse} An ImportTask
|
|
10522
10543
|
*/
|
|
10523
10544
|
|
|
@@ -10545,7 +10566,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10545
10566
|
}, _callee71, this);
|
|
10546
10567
|
}));
|
|
10547
10568
|
|
|
10548
|
-
function _createImportURL(
|
|
10569
|
+
function _createImportURL(_x95) {
|
|
10549
10570
|
return _createImportURL2.apply(this, arguments);
|
|
10550
10571
|
}
|
|
10551
10572
|
|
|
@@ -10560,7 +10581,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10560
10581
|
*
|
|
10561
10582
|
* @private
|
|
10562
10583
|
* @param {string} path path of uploaded data
|
|
10563
|
-
*
|
|
10584
|
+
* @param {CreateImportOptions} options import options
|
|
10564
10585
|
* @return {APIResponse & CreateImportResponse} An ImportTask
|
|
10565
10586
|
*/
|
|
10566
10587
|
|
|
@@ -10568,19 +10589,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10568
10589
|
key: "_createImport",
|
|
10569
10590
|
value: function () {
|
|
10570
10591
|
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(path) {
|
|
10592
|
+
var options,
|
|
10593
|
+
_args72 = arguments;
|
|
10571
10594
|
return _regeneratorRuntime.wrap(function _callee72$(_context72) {
|
|
10572
10595
|
while (1) {
|
|
10573
10596
|
switch (_context72.prev = _context72.next) {
|
|
10574
10597
|
case 0:
|
|
10575
|
-
|
|
10576
|
-
|
|
10598
|
+
options = _args72.length > 1 && _args72[1] !== undefined ? _args72[1] : {
|
|
10599
|
+
mode: 'upsert'
|
|
10600
|
+
};
|
|
10601
|
+
_context72.next = 3;
|
|
10602
|
+
return this.post(this.baseURL + "/imports", _objectSpread({
|
|
10577
10603
|
path: path
|
|
10578
|
-
});
|
|
10604
|
+
}, options));
|
|
10579
10605
|
|
|
10580
|
-
case
|
|
10606
|
+
case 3:
|
|
10581
10607
|
return _context72.abrupt("return", _context72.sent);
|
|
10582
10608
|
|
|
10583
|
-
case
|
|
10609
|
+
case 4:
|
|
10584
10610
|
case "end":
|
|
10585
10611
|
return _context72.stop();
|
|
10586
10612
|
}
|
|
@@ -10588,7 +10614,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10588
10614
|
}, _callee72, this);
|
|
10589
10615
|
}));
|
|
10590
10616
|
|
|
10591
|
-
function _createImport(
|
|
10617
|
+
function _createImport(_x96) {
|
|
10592
10618
|
return _createImport2.apply(this, arguments);
|
|
10593
10619
|
}
|
|
10594
10620
|
|
|
@@ -10629,7 +10655,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10629
10655
|
}, _callee73, this);
|
|
10630
10656
|
}));
|
|
10631
10657
|
|
|
10632
|
-
function _getImport(
|
|
10658
|
+
function _getImport(_x97) {
|
|
10633
10659
|
return _getImport2.apply(this, arguments);
|
|
10634
10660
|
}
|
|
10635
10661
|
|
|
@@ -10670,7 +10696,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10670
10696
|
}, _callee74, this);
|
|
10671
10697
|
}));
|
|
10672
10698
|
|
|
10673
|
-
function _listImports(
|
|
10699
|
+
function _listImports(_x98) {
|
|
10674
10700
|
return _listImports2.apply(this, arguments);
|
|
10675
10701
|
}
|
|
10676
10702
|
|
|
@@ -10710,7 +10736,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10710
10736
|
}, _callee75, this);
|
|
10711
10737
|
}));
|
|
10712
10738
|
|
|
10713
|
-
function upsertPushProvider(
|
|
10739
|
+
function upsertPushProvider(_x99) {
|
|
10714
10740
|
return _upsertPushProvider.apply(this, arguments);
|
|
10715
10741
|
}
|
|
10716
10742
|
|
|
@@ -10750,7 +10776,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10750
10776
|
}, _callee76, this);
|
|
10751
10777
|
}));
|
|
10752
10778
|
|
|
10753
|
-
function deletePushProvider(
|
|
10779
|
+
function deletePushProvider(_x100) {
|
|
10754
10780
|
return _deletePushProvider.apply(this, arguments);
|
|
10755
10781
|
}
|
|
10756
10782
|
|