stream-chat 6.3.0 → 6.5.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/dist/browser.es.js +160 -121
- 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 +160 -121
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +160 -121
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +160 -121
- package/dist/index.js.map +1 -1
- package/dist/types/channel_state.d.ts.map +1 -1
- package/dist/types/client.d.ts +50 -47
- 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 +29 -6
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +3 -1
- package/src/channel_state.ts +6 -3
- package/src/client.ts +63 -47
- package/src/token_manager.ts +6 -2
- package/src/types.ts +69 -9
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
|
}());
|
|
@@ -5949,7 +5962,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
5949
5962
|
}());
|
|
5950
5963
|
|
|
5951
5964
|
_defineProperty(this, "openConnection", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
5952
|
-
var _this$wsConnection3, _this$wsFallback3;
|
|
5965
|
+
var _this$wsConnection3, _this$wsConnection4, _this$wsFallback3;
|
|
5953
5966
|
|
|
5954
5967
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
5955
5968
|
while (1) {
|
|
@@ -5963,18 +5976,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
5963
5976
|
throw Error('User is not set on client, use client.connectUser or client.connectAnonymousUser instead');
|
|
5964
5977
|
|
|
5965
5978
|
case 2:
|
|
5966
|
-
if (!((
|
|
5979
|
+
if (!((_this$wsConnection3 = _this.wsConnection) !== null && _this$wsConnection3 !== void 0 && _this$wsConnection3.isConnecting)) {
|
|
5967
5980
|
_context3.next = 5;
|
|
5968
5981
|
break;
|
|
5969
5982
|
}
|
|
5970
5983
|
|
|
5971
|
-
_this.logger('info', 'client:openConnection() -
|
|
5984
|
+
_this.logger('info', 'client:openConnection() - connection already in progress', {
|
|
5972
5985
|
tags: ['connection', 'client']
|
|
5973
5986
|
});
|
|
5974
5987
|
|
|
5975
5988
|
return _context3.abrupt("return", Promise.resolve());
|
|
5976
5989
|
|
|
5977
5990
|
case 5:
|
|
5991
|
+
if (!(((_this$wsConnection4 = _this.wsConnection) !== null && _this$wsConnection4 !== void 0 && _this$wsConnection4.isHealthy || (_this$wsFallback3 = _this.wsFallback) !== null && _this$wsFallback3 !== void 0 && _this$wsFallback3.isHealthy()) && _this._hasConnectionID())) {
|
|
5992
|
+
_context3.next = 8;
|
|
5993
|
+
break;
|
|
5994
|
+
}
|
|
5995
|
+
|
|
5996
|
+
_this.logger('info', 'client:openConnection() - openConnection called twice, healthy connection already exists', {
|
|
5997
|
+
tags: ['connection', 'client']
|
|
5998
|
+
});
|
|
5999
|
+
|
|
6000
|
+
return _context3.abrupt("return", Promise.resolve());
|
|
6001
|
+
|
|
6002
|
+
case 8:
|
|
5978
6003
|
_this.clientID = "".concat(_this.userID, "--").concat(randomId());
|
|
5979
6004
|
_this.wsPromise = _this.connect();
|
|
5980
6005
|
|
|
@@ -5982,7 +6007,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
5982
6007
|
|
|
5983
6008
|
return _context3.abrupt("return", _this.wsPromise);
|
|
5984
6009
|
|
|
5985
|
-
case
|
|
6010
|
+
case 12:
|
|
5986
6011
|
case "end":
|
|
5987
6012
|
return _context3.stop();
|
|
5988
6013
|
}
|
|
@@ -6689,30 +6714,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6689
6714
|
key: "updateAppSettings",
|
|
6690
6715
|
value:
|
|
6691
6716
|
/**
|
|
6692
|
-
|
|
6693
|
-
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6717
|
+
* updateAppSettings - updates application settings
|
|
6718
|
+
*
|
|
6719
|
+
* @param {AppSettings} options App settings.
|
|
6720
|
+
* IE: {
|
|
6721
|
+
'apn_config': {
|
|
6722
|
+
'auth_type': 'token',
|
|
6723
|
+
'auth_key": fs.readFileSync(
|
|
6724
|
+
'./apn-push-auth-key.p8',
|
|
6725
|
+
'utf-8',
|
|
6726
|
+
),
|
|
6727
|
+
'key_id': 'keyid',
|
|
6728
|
+
'team_id': 'teamid',
|
|
6729
|
+
'notification_template": 'notification handlebars template',
|
|
6730
|
+
'bundle_id': 'com.apple.your.app',
|
|
6731
|
+
'development': true
|
|
6732
|
+
},
|
|
6733
|
+
'firebase_config': {
|
|
6734
|
+
'server_key': 'server key from fcm',
|
|
6735
|
+
'notification_template': 'notification handlebars template',
|
|
6736
|
+
'data_template': 'data handlebars template',
|
|
6737
|
+
'apn_template': 'apn notification handlebars template under v2'
|
|
6738
|
+
},
|
|
6739
|
+
'webhook_url': 'https://acme.com/my/awesome/webhook/'
|
|
6740
|
+
}
|
|
6741
|
+
*/
|
|
6716
6742
|
function () {
|
|
6717
6743
|
var _updateAppSettings = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(options) {
|
|
6718
6744
|
var _options$apn_config;
|
|
@@ -6903,17 +6929,19 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6903
6929
|
return getAppSettings;
|
|
6904
6930
|
}()
|
|
6905
6931
|
/**
|
|
6906
|
-
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
6916
|
-
|
|
6932
|
+
* testPushSettings - Tests the push settings for a user with a random chat message and the configured push templates
|
|
6933
|
+
*
|
|
6934
|
+
* @param {string} userID User ID. If user has no devices, it will error
|
|
6935
|
+
* @param {TestPushDataInput} [data] Overrides for push templates/message used
|
|
6936
|
+
* IE: {
|
|
6937
|
+
messageID: 'id-of-message', // will error if message does not exist
|
|
6938
|
+
apnTemplate: '{}', // if app doesn't have apn configured it will error
|
|
6939
|
+
firebaseTemplate: '{}', // if app doesn't have firebase configured it will error
|
|
6940
|
+
firebaseDataTemplate: '{}', // if app doesn't have firebase configured it will error
|
|
6941
|
+
skipDevices: true, // skip config/device checks and sending to real devices
|
|
6942
|
+
pushProviderName: 'staging' // one of your configured push providers
|
|
6943
|
+
pushProviderType: 'apn' // one of supported provider types
|
|
6944
|
+
}
|
|
6917
6945
|
*/
|
|
6918
6946
|
|
|
6919
6947
|
}, {
|
|
@@ -6928,7 +6956,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6928
6956
|
case 0:
|
|
6929
6957
|
data = _args12.length > 1 && _args12[1] !== undefined ? _args12[1] : {};
|
|
6930
6958
|
_context12.next = 3;
|
|
6931
|
-
return this.post(this.baseURL + '/check_push', _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
6959
|
+
return this.post(this.baseURL + '/check_push', _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
6932
6960
|
user_id: userID
|
|
6933
6961
|
}, data.messageID ? {
|
|
6934
6962
|
message_id: data.messageID
|
|
@@ -6940,6 +6968,10 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6940
6968
|
firebase_data_template: data.firebaseDataTemplate
|
|
6941
6969
|
} : {}), data.skipDevices ? {
|
|
6942
6970
|
skip_devices: true
|
|
6971
|
+
} : {}), data.pushProviderName ? {
|
|
6972
|
+
push_provider_name: data.pushProviderName
|
|
6973
|
+
} : {}), data.pushProviderType ? {
|
|
6974
|
+
push_provider_type: data.pushProviderType
|
|
6943
6975
|
} : {}));
|
|
6944
6976
|
|
|
6945
6977
|
case 3:
|
|
@@ -6963,11 +6995,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6963
6995
|
* testSQSSettings - Tests that the given or configured SQS configuration is valid
|
|
6964
6996
|
*
|
|
6965
6997
|
* @param {TestSQSDataInput} [data] Overrides SQS settings for testing if needed
|
|
6966
|
-
*
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6998
|
+
* IE: {
|
|
6999
|
+
sqs_key: 'auth_key',
|
|
7000
|
+
sqs_secret: 'auth_secret',
|
|
7001
|
+
sqs_url: 'url_to_queue',
|
|
7002
|
+
}
|
|
6971
7003
|
*/
|
|
6972
7004
|
|
|
6973
7005
|
}, {
|
|
@@ -7070,7 +7102,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7070
7102
|
}()
|
|
7071
7103
|
/**
|
|
7072
7104
|
* createToken - Creates a token to authenticate this user. This function is used server side.
|
|
7073
|
-
* The resulting token should be passed to the client side when the users registers or logs in
|
|
7105
|
+
* The resulting token should be passed to the client side when the users registers or logs in.
|
|
7074
7106
|
*
|
|
7075
7107
|
* @param {string} userID The User ID
|
|
7076
7108
|
* @param {number} [exp] The expiration time for the token expressed in the number of seconds since the epoch
|
|
@@ -7322,7 +7354,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7322
7354
|
this.mutedUsers = event.me.mutes;
|
|
7323
7355
|
}
|
|
7324
7356
|
|
|
7325
|
-
if (event.type === 'notification.mark_read') {
|
|
7357
|
+
if (event.type === 'notification.mark_read' && event.unread_channels === 0) {
|
|
7326
7358
|
var activeChannelKeys = Object.keys(this.activeChannels);
|
|
7327
7359
|
activeChannelKeys.forEach(function (activeChannelKey) {
|
|
7328
7360
|
return _this3.activeChannels[activeChannelKey].state.unreadCount = 0;
|
|
@@ -7905,23 +7937,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7905
7937
|
* @param {string} id the device id
|
|
7906
7938
|
* @param {PushProvider} push_provider the push provider
|
|
7907
7939
|
* @param {string} [userID] the user id (defaults to current user)
|
|
7940
|
+
* @param {string} [push_provider_name] user provided push provider name for multi bundle support
|
|
7908
7941
|
*
|
|
7909
7942
|
*/
|
|
7910
7943
|
|
|
7911
7944
|
}, {
|
|
7912
7945
|
key: "addDevice",
|
|
7913
7946
|
value: function () {
|
|
7914
|
-
var _addDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21(id, push_provider, userID) {
|
|
7947
|
+
var _addDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21(id, push_provider, userID, push_provider_name) {
|
|
7915
7948
|
return _regeneratorRuntime.wrap(function _callee21$(_context21) {
|
|
7916
7949
|
while (1) {
|
|
7917
7950
|
switch (_context21.prev = _context21.next) {
|
|
7918
7951
|
case 0:
|
|
7919
7952
|
_context21.next = 2;
|
|
7920
|
-
return this.post(this.baseURL + '/devices', _objectSpread({
|
|
7953
|
+
return this.post(this.baseURL + '/devices', _objectSpread(_objectSpread({
|
|
7921
7954
|
id: id,
|
|
7922
7955
|
push_provider: push_provider
|
|
7923
7956
|
}, userID != null ? {
|
|
7924
7957
|
user_id: userID
|
|
7958
|
+
} : {}), push_provider_name != null ? {
|
|
7959
|
+
push_provider_name: push_provider_name
|
|
7925
7960
|
} : {}));
|
|
7926
7961
|
|
|
7927
7962
|
case 2:
|
|
@@ -7935,7 +7970,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7935
7970
|
}, _callee21, this);
|
|
7936
7971
|
}));
|
|
7937
7972
|
|
|
7938
|
-
function addDevice(_x20, _x21, _x22) {
|
|
7973
|
+
function addDevice(_x20, _x21, _x22, _x23) {
|
|
7939
7974
|
return _addDevice.apply(this, arguments);
|
|
7940
7975
|
}
|
|
7941
7976
|
|
|
@@ -7973,7 +8008,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7973
8008
|
}, _callee22, this);
|
|
7974
8009
|
}));
|
|
7975
8010
|
|
|
7976
|
-
function getDevices(
|
|
8011
|
+
function getDevices(_x24) {
|
|
7977
8012
|
return _getDevices.apply(this, arguments);
|
|
7978
8013
|
}
|
|
7979
8014
|
|
|
@@ -8013,7 +8048,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8013
8048
|
}, _callee23, this);
|
|
8014
8049
|
}));
|
|
8015
8050
|
|
|
8016
|
-
function removeDevice(
|
|
8051
|
+
function removeDevice(_x25, _x26) {
|
|
8017
8052
|
return _removeDevice.apply(this, arguments);
|
|
8018
8053
|
}
|
|
8019
8054
|
|
|
@@ -8054,7 +8089,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8054
8089
|
}, _callee24, this);
|
|
8055
8090
|
}));
|
|
8056
8091
|
|
|
8057
|
-
function getRateLimits(
|
|
8092
|
+
function getRateLimits(_x27) {
|
|
8058
8093
|
return _getRateLimits.apply(this, arguments);
|
|
8059
8094
|
}
|
|
8060
8095
|
|
|
@@ -8155,7 +8190,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8155
8190
|
}, _callee25, this);
|
|
8156
8191
|
}));
|
|
8157
8192
|
|
|
8158
|
-
function partialUpdateUser(
|
|
8193
|
+
function partialUpdateUser(_x28) {
|
|
8159
8194
|
return _partialUpdateUser.apply(this, arguments);
|
|
8160
8195
|
}
|
|
8161
8196
|
|
|
@@ -8241,7 +8276,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8241
8276
|
}, _callee26, this, [[2, 13, 16, 19]]);
|
|
8242
8277
|
}));
|
|
8243
8278
|
|
|
8244
|
-
function upsertUsers(
|
|
8279
|
+
function upsertUsers(_x29) {
|
|
8245
8280
|
return _upsertUsers.apply(this, arguments);
|
|
8246
8281
|
}
|
|
8247
8282
|
|
|
@@ -8354,7 +8389,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8354
8389
|
}, _callee27, this, [[1, 11, 14, 17]]);
|
|
8355
8390
|
}));
|
|
8356
8391
|
|
|
8357
|
-
function partialUpdateUsers(
|
|
8392
|
+
function partialUpdateUsers(_x30) {
|
|
8358
8393
|
return _partialUpdateUsers.apply(this, arguments);
|
|
8359
8394
|
}
|
|
8360
8395
|
|
|
@@ -8382,7 +8417,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8382
8417
|
}, _callee28, this);
|
|
8383
8418
|
}));
|
|
8384
8419
|
|
|
8385
|
-
function deleteUser(
|
|
8420
|
+
function deleteUser(_x31, _x32) {
|
|
8386
8421
|
return _deleteUser.apply(this, arguments);
|
|
8387
8422
|
}
|
|
8388
8423
|
|
|
@@ -8410,7 +8445,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8410
8445
|
}, _callee29, this);
|
|
8411
8446
|
}));
|
|
8412
8447
|
|
|
8413
|
-
function reactivateUser(
|
|
8448
|
+
function reactivateUser(_x33, _x34) {
|
|
8414
8449
|
return _reactivateUser.apply(this, arguments);
|
|
8415
8450
|
}
|
|
8416
8451
|
|
|
@@ -8438,7 +8473,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8438
8473
|
}, _callee30, this);
|
|
8439
8474
|
}));
|
|
8440
8475
|
|
|
8441
|
-
function deactivateUser(
|
|
8476
|
+
function deactivateUser(_x35, _x36) {
|
|
8442
8477
|
return _deactivateUser.apply(this, arguments);
|
|
8443
8478
|
}
|
|
8444
8479
|
|
|
@@ -8466,7 +8501,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8466
8501
|
}, _callee31, this);
|
|
8467
8502
|
}));
|
|
8468
8503
|
|
|
8469
|
-
function exportUser(
|
|
8504
|
+
function exportUser(_x37, _x38) {
|
|
8470
8505
|
return _exportUser.apply(this, arguments);
|
|
8471
8506
|
}
|
|
8472
8507
|
|
|
@@ -8503,7 +8538,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8503
8538
|
}, _callee32, this);
|
|
8504
8539
|
}));
|
|
8505
8540
|
|
|
8506
|
-
function banUser(
|
|
8541
|
+
function banUser(_x39, _x40) {
|
|
8507
8542
|
return _banUser.apply(this, arguments);
|
|
8508
8543
|
}
|
|
8509
8544
|
|
|
@@ -8540,7 +8575,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8540
8575
|
}, _callee33, this);
|
|
8541
8576
|
}));
|
|
8542
8577
|
|
|
8543
|
-
function unbanUser(
|
|
8578
|
+
function unbanUser(_x41, _x42) {
|
|
8544
8579
|
return _unbanUser.apply(this, arguments);
|
|
8545
8580
|
}
|
|
8546
8581
|
|
|
@@ -8577,7 +8612,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8577
8612
|
}, _callee34, this);
|
|
8578
8613
|
}));
|
|
8579
8614
|
|
|
8580
|
-
function shadowBan(
|
|
8615
|
+
function shadowBan(_x43, _x44) {
|
|
8581
8616
|
return _shadowBan.apply(this, arguments);
|
|
8582
8617
|
}
|
|
8583
8618
|
|
|
@@ -8614,7 +8649,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8614
8649
|
}, _callee35, this);
|
|
8615
8650
|
}));
|
|
8616
8651
|
|
|
8617
|
-
function removeShadowBan(
|
|
8652
|
+
function removeShadowBan(_x45, _x46) {
|
|
8618
8653
|
return _removeShadowBan.apply(this, arguments);
|
|
8619
8654
|
}
|
|
8620
8655
|
|
|
@@ -8657,7 +8692,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8657
8692
|
}, _callee36, this);
|
|
8658
8693
|
}));
|
|
8659
8694
|
|
|
8660
|
-
function muteUser(
|
|
8695
|
+
function muteUser(_x47, _x48) {
|
|
8661
8696
|
return _muteUser.apply(this, arguments);
|
|
8662
8697
|
}
|
|
8663
8698
|
|
|
@@ -8696,7 +8731,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8696
8731
|
}, _callee37, this);
|
|
8697
8732
|
}));
|
|
8698
8733
|
|
|
8699
|
-
function unmuteUser(
|
|
8734
|
+
function unmuteUser(_x49, _x50) {
|
|
8700
8735
|
return _unmuteUser.apply(this, arguments);
|
|
8701
8736
|
}
|
|
8702
8737
|
|
|
@@ -8755,7 +8790,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8755
8790
|
}, _callee38, this);
|
|
8756
8791
|
}));
|
|
8757
8792
|
|
|
8758
|
-
function flagMessage(
|
|
8793
|
+
function flagMessage(_x51) {
|
|
8759
8794
|
return _flagMessage.apply(this, arguments);
|
|
8760
8795
|
}
|
|
8761
8796
|
|
|
@@ -8795,7 +8830,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8795
8830
|
}, _callee39, this);
|
|
8796
8831
|
}));
|
|
8797
8832
|
|
|
8798
|
-
function flagUser(
|
|
8833
|
+
function flagUser(_x52) {
|
|
8799
8834
|
return _flagUser.apply(this, arguments);
|
|
8800
8835
|
}
|
|
8801
8836
|
|
|
@@ -8835,7 +8870,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8835
8870
|
}, _callee40, this);
|
|
8836
8871
|
}));
|
|
8837
8872
|
|
|
8838
|
-
function unflagMessage(
|
|
8873
|
+
function unflagMessage(_x53) {
|
|
8839
8874
|
return _unflagMessage.apply(this, arguments);
|
|
8840
8875
|
}
|
|
8841
8876
|
|
|
@@ -8875,7 +8910,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8875
8910
|
}, _callee41, this);
|
|
8876
8911
|
}));
|
|
8877
8912
|
|
|
8878
|
-
function unflagUser(
|
|
8913
|
+
function unflagUser(_x54) {
|
|
8879
8914
|
return _unflagUser.apply(this, arguments);
|
|
8880
8915
|
}
|
|
8881
8916
|
|
|
@@ -9021,7 +9056,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9021
9056
|
}, _callee44, this);
|
|
9022
9057
|
}));
|
|
9023
9058
|
|
|
9024
|
-
function _reviewFlagReport(
|
|
9059
|
+
function _reviewFlagReport(_x55, _x56) {
|
|
9025
9060
|
return _reviewFlagReport2.apply(this, arguments);
|
|
9026
9061
|
}
|
|
9027
9062
|
|
|
@@ -9067,7 +9102,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9067
9102
|
}, _callee45, this);
|
|
9068
9103
|
}));
|
|
9069
9104
|
|
|
9070
|
-
function _unblockMessage(
|
|
9105
|
+
function _unblockMessage(_x57) {
|
|
9071
9106
|
return _unblockMessage2.apply(this, arguments);
|
|
9072
9107
|
}
|
|
9073
9108
|
|
|
@@ -9206,7 +9241,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9206
9241
|
}, _callee47, this);
|
|
9207
9242
|
}));
|
|
9208
9243
|
|
|
9209
|
-
function translateMessage(
|
|
9244
|
+
function translateMessage(_x58, _x59) {
|
|
9210
9245
|
return _translateMessage.apply(this, arguments);
|
|
9211
9246
|
}
|
|
9212
9247
|
|
|
@@ -9368,7 +9403,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9368
9403
|
}, _callee48, this);
|
|
9369
9404
|
}));
|
|
9370
9405
|
|
|
9371
|
-
function updateMessage(
|
|
9406
|
+
function updateMessage(_x60, _x61, _x62) {
|
|
9372
9407
|
return _updateMessage.apply(this, arguments);
|
|
9373
9408
|
}
|
|
9374
9409
|
|
|
@@ -9429,7 +9464,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9429
9464
|
}, _callee49, this);
|
|
9430
9465
|
}));
|
|
9431
9466
|
|
|
9432
|
-
function partialUpdateMessage(
|
|
9467
|
+
function partialUpdateMessage(_x63, _x64, _x65, _x66) {
|
|
9433
9468
|
return _partialUpdateMessage.apply(this, arguments);
|
|
9434
9469
|
}
|
|
9435
9470
|
|
|
@@ -9466,7 +9501,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9466
9501
|
}, _callee50, this);
|
|
9467
9502
|
}));
|
|
9468
9503
|
|
|
9469
|
-
function deleteMessage(
|
|
9504
|
+
function deleteMessage(_x67, _x68) {
|
|
9470
9505
|
return _deleteMessage.apply(this, arguments);
|
|
9471
9506
|
}
|
|
9472
9507
|
|
|
@@ -9494,7 +9529,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9494
9529
|
}, _callee51, this);
|
|
9495
9530
|
}));
|
|
9496
9531
|
|
|
9497
|
-
function getMessage(
|
|
9532
|
+
function getMessage(_x69) {
|
|
9498
9533
|
return _getMessage.apply(this, arguments);
|
|
9499
9534
|
}
|
|
9500
9535
|
|
|
@@ -9503,7 +9538,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9503
9538
|
}, {
|
|
9504
9539
|
key: "getUserAgent",
|
|
9505
9540
|
value: function getUserAgent() {
|
|
9506
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "6.
|
|
9541
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "6.5.1");
|
|
9507
9542
|
}
|
|
9508
9543
|
}, {
|
|
9509
9544
|
key: "setUserAgent",
|
|
@@ -9719,7 +9754,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9719
9754
|
}, _callee52, this);
|
|
9720
9755
|
}));
|
|
9721
9756
|
|
|
9722
|
-
function sendUserCustomEvent(
|
|
9757
|
+
function sendUserCustomEvent(_x70, _x71) {
|
|
9723
9758
|
return _sendUserCustomEvent.apply(this, arguments);
|
|
9724
9759
|
}
|
|
9725
9760
|
|
|
@@ -9812,7 +9847,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9812
9847
|
}, _callee53, this);
|
|
9813
9848
|
}));
|
|
9814
9849
|
|
|
9815
|
-
function createSegment(
|
|
9850
|
+
function createSegment(_x72) {
|
|
9816
9851
|
return _createSegment.apply(this, arguments);
|
|
9817
9852
|
}
|
|
9818
9853
|
|
|
@@ -9852,7 +9887,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9852
9887
|
}, _callee54, this);
|
|
9853
9888
|
}));
|
|
9854
9889
|
|
|
9855
|
-
function getSegment(
|
|
9890
|
+
function getSegment(_x73) {
|
|
9856
9891
|
return _getSegment.apply(this, arguments);
|
|
9857
9892
|
}
|
|
9858
9893
|
|
|
@@ -9891,7 +9926,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9891
9926
|
}, _callee55, this);
|
|
9892
9927
|
}));
|
|
9893
9928
|
|
|
9894
|
-
function listSegments(
|
|
9929
|
+
function listSegments(_x74) {
|
|
9895
9930
|
return _listSegments.apply(this, arguments);
|
|
9896
9931
|
}
|
|
9897
9932
|
|
|
@@ -9934,7 +9969,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9934
9969
|
}, _callee56, this);
|
|
9935
9970
|
}));
|
|
9936
9971
|
|
|
9937
|
-
function updateSegment(
|
|
9972
|
+
function updateSegment(_x75, _x76) {
|
|
9938
9973
|
return _updateSegment.apply(this, arguments);
|
|
9939
9974
|
}
|
|
9940
9975
|
|
|
@@ -9966,7 +10001,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9966
10001
|
}, _callee57, this);
|
|
9967
10002
|
}));
|
|
9968
10003
|
|
|
9969
|
-
function deleteSegment(
|
|
10004
|
+
function deleteSegment(_x77) {
|
|
9970
10005
|
return _deleteSegment.apply(this, arguments);
|
|
9971
10006
|
}
|
|
9972
10007
|
|
|
@@ -10008,7 +10043,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10008
10043
|
}, _callee58, this);
|
|
10009
10044
|
}));
|
|
10010
10045
|
|
|
10011
|
-
function createCampaign(
|
|
10046
|
+
function createCampaign(_x78) {
|
|
10012
10047
|
return _createCampaign.apply(this, arguments);
|
|
10013
10048
|
}
|
|
10014
10049
|
|
|
@@ -10048,7 +10083,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10048
10083
|
}, _callee59, this);
|
|
10049
10084
|
}));
|
|
10050
10085
|
|
|
10051
|
-
function getCampaign(
|
|
10086
|
+
function getCampaign(_x79) {
|
|
10052
10087
|
return _getCampaign.apply(this, arguments);
|
|
10053
10088
|
}
|
|
10054
10089
|
|
|
@@ -10087,7 +10122,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10087
10122
|
}, _callee60, this);
|
|
10088
10123
|
}));
|
|
10089
10124
|
|
|
10090
|
-
function listCampaigns(
|
|
10125
|
+
function listCampaigns(_x80) {
|
|
10091
10126
|
return _listCampaigns.apply(this, arguments);
|
|
10092
10127
|
}
|
|
10093
10128
|
|
|
@@ -10130,7 +10165,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10130
10165
|
}, _callee61, this);
|
|
10131
10166
|
}));
|
|
10132
10167
|
|
|
10133
|
-
function updateCampaign(
|
|
10168
|
+
function updateCampaign(_x81, _x82) {
|
|
10134
10169
|
return _updateCampaign.apply(this, arguments);
|
|
10135
10170
|
}
|
|
10136
10171
|
|
|
@@ -10162,7 +10197,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10162
10197
|
}, _callee62, this);
|
|
10163
10198
|
}));
|
|
10164
10199
|
|
|
10165
|
-
function deleteCampaign(
|
|
10200
|
+
function deleteCampaign(_x83) {
|
|
10166
10201
|
return _deleteCampaign.apply(this, arguments);
|
|
10167
10202
|
}
|
|
10168
10203
|
|
|
@@ -10206,7 +10241,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10206
10241
|
}, _callee63, this);
|
|
10207
10242
|
}));
|
|
10208
10243
|
|
|
10209
|
-
function scheduleCampaign(
|
|
10244
|
+
function scheduleCampaign(_x84, _x85) {
|
|
10210
10245
|
return _scheduleCampaign.apply(this, arguments);
|
|
10211
10246
|
}
|
|
10212
10247
|
|
|
@@ -10246,7 +10281,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10246
10281
|
}, _callee64, this);
|
|
10247
10282
|
}));
|
|
10248
10283
|
|
|
10249
|
-
function stopCampaign(
|
|
10284
|
+
function stopCampaign(_x86) {
|
|
10250
10285
|
return _stopCampaign.apply(this, arguments);
|
|
10251
10286
|
}
|
|
10252
10287
|
|
|
@@ -10286,7 +10321,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10286
10321
|
}, _callee65, this);
|
|
10287
10322
|
}));
|
|
10288
10323
|
|
|
10289
|
-
function resumeCampaign(
|
|
10324
|
+
function resumeCampaign(_x87) {
|
|
10290
10325
|
return _resumeCampaign.apply(this, arguments);
|
|
10291
10326
|
}
|
|
10292
10327
|
|
|
@@ -10329,7 +10364,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10329
10364
|
}, _callee66, this);
|
|
10330
10365
|
}));
|
|
10331
10366
|
|
|
10332
|
-
function testCampaign(
|
|
10367
|
+
function testCampaign(_x88, _x89) {
|
|
10333
10368
|
return _testCampaign.apply(this, arguments);
|
|
10334
10369
|
}
|
|
10335
10370
|
|
|
@@ -10362,7 +10397,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10362
10397
|
}, _callee67, this);
|
|
10363
10398
|
}));
|
|
10364
10399
|
|
|
10365
|
-
function enrichURL(
|
|
10400
|
+
function enrichURL(_x90) {
|
|
10366
10401
|
return _enrichURL.apply(this, arguments);
|
|
10367
10402
|
}
|
|
10368
10403
|
|
|
@@ -10394,7 +10429,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10394
10429
|
}, _callee68, this);
|
|
10395
10430
|
}));
|
|
10396
10431
|
|
|
10397
|
-
function getTask(
|
|
10432
|
+
function getTask(_x91) {
|
|
10398
10433
|
return _getTask.apply(this, arguments);
|
|
10399
10434
|
}
|
|
10400
10435
|
|
|
@@ -10436,7 +10471,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10436
10471
|
}, _callee69, this);
|
|
10437
10472
|
}));
|
|
10438
10473
|
|
|
10439
|
-
function deleteChannels(
|
|
10474
|
+
function deleteChannels(_x92) {
|
|
10440
10475
|
return _deleteChannels.apply(this, arguments);
|
|
10441
10476
|
}
|
|
10442
10477
|
|
|
@@ -10499,7 +10534,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10499
10534
|
}, _callee70, this);
|
|
10500
10535
|
}));
|
|
10501
10536
|
|
|
10502
|
-
function deleteUsers(
|
|
10537
|
+
function deleteUsers(_x93, _x94) {
|
|
10503
10538
|
return _deleteUsers.apply(this, arguments);
|
|
10504
10539
|
}
|
|
10505
10540
|
|
|
@@ -10514,7 +10549,6 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10514
10549
|
*
|
|
10515
10550
|
* @private
|
|
10516
10551
|
* @param {string} filename filename of uploaded data
|
|
10517
|
-
*
|
|
10518
10552
|
* @return {APIResponse & CreateImportResponse} An ImportTask
|
|
10519
10553
|
*/
|
|
10520
10554
|
|
|
@@ -10542,7 +10576,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10542
10576
|
}, _callee71, this);
|
|
10543
10577
|
}));
|
|
10544
10578
|
|
|
10545
|
-
function _createImportURL(
|
|
10579
|
+
function _createImportURL(_x95) {
|
|
10546
10580
|
return _createImportURL2.apply(this, arguments);
|
|
10547
10581
|
}
|
|
10548
10582
|
|
|
@@ -10557,7 +10591,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10557
10591
|
*
|
|
10558
10592
|
* @private
|
|
10559
10593
|
* @param {string} path path of uploaded data
|
|
10560
|
-
*
|
|
10594
|
+
* @param {CreateImportOptions} options import options
|
|
10561
10595
|
* @return {APIResponse & CreateImportResponse} An ImportTask
|
|
10562
10596
|
*/
|
|
10563
10597
|
|
|
@@ -10565,19 +10599,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10565
10599
|
key: "_createImport",
|
|
10566
10600
|
value: function () {
|
|
10567
10601
|
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(path) {
|
|
10602
|
+
var options,
|
|
10603
|
+
_args72 = arguments;
|
|
10568
10604
|
return _regeneratorRuntime.wrap(function _callee72$(_context72) {
|
|
10569
10605
|
while (1) {
|
|
10570
10606
|
switch (_context72.prev = _context72.next) {
|
|
10571
10607
|
case 0:
|
|
10572
|
-
|
|
10573
|
-
|
|
10608
|
+
options = _args72.length > 1 && _args72[1] !== undefined ? _args72[1] : {
|
|
10609
|
+
mode: 'upsert'
|
|
10610
|
+
};
|
|
10611
|
+
_context72.next = 3;
|
|
10612
|
+
return this.post(this.baseURL + "/imports", _objectSpread({
|
|
10574
10613
|
path: path
|
|
10575
|
-
});
|
|
10614
|
+
}, options));
|
|
10576
10615
|
|
|
10577
|
-
case
|
|
10616
|
+
case 3:
|
|
10578
10617
|
return _context72.abrupt("return", _context72.sent);
|
|
10579
10618
|
|
|
10580
|
-
case
|
|
10619
|
+
case 4:
|
|
10581
10620
|
case "end":
|
|
10582
10621
|
return _context72.stop();
|
|
10583
10622
|
}
|
|
@@ -10585,7 +10624,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10585
10624
|
}, _callee72, this);
|
|
10586
10625
|
}));
|
|
10587
10626
|
|
|
10588
|
-
function _createImport(
|
|
10627
|
+
function _createImport(_x96) {
|
|
10589
10628
|
return _createImport2.apply(this, arguments);
|
|
10590
10629
|
}
|
|
10591
10630
|
|
|
@@ -10626,7 +10665,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10626
10665
|
}, _callee73, this);
|
|
10627
10666
|
}));
|
|
10628
10667
|
|
|
10629
|
-
function _getImport(
|
|
10668
|
+
function _getImport(_x97) {
|
|
10630
10669
|
return _getImport2.apply(this, arguments);
|
|
10631
10670
|
}
|
|
10632
10671
|
|
|
@@ -10667,7 +10706,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10667
10706
|
}, _callee74, this);
|
|
10668
10707
|
}));
|
|
10669
10708
|
|
|
10670
|
-
function _listImports(
|
|
10709
|
+
function _listImports(_x98) {
|
|
10671
10710
|
return _listImports2.apply(this, arguments);
|
|
10672
10711
|
}
|
|
10673
10712
|
|
|
@@ -10707,7 +10746,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10707
10746
|
}, _callee75, this);
|
|
10708
10747
|
}));
|
|
10709
10748
|
|
|
10710
|
-
function upsertPushProvider(
|
|
10749
|
+
function upsertPushProvider(_x99) {
|
|
10711
10750
|
return _upsertPushProvider.apply(this, arguments);
|
|
10712
10751
|
}
|
|
10713
10752
|
|
|
@@ -10747,7 +10786,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10747
10786
|
}, _callee76, this);
|
|
10748
10787
|
}));
|
|
10749
10788
|
|
|
10750
|
-
function deletePushProvider(
|
|
10789
|
+
function deletePushProvider(_x100) {
|
|
10751
10790
|
return _deletePushProvider.apply(this, arguments);
|
|
10752
10791
|
}
|
|
10753
10792
|
|