stream-chat 8.56.1 → 8.57.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.js CHANGED
@@ -295,13 +295,13 @@ var Campaign = /*#__PURE__*/function () {
295
295
  }, {
296
296
  key: "get",
297
297
  value: function () {
298
- var _get = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee6() {
298
+ var _get = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee6(options) {
299
299
  return _regeneratorRuntime__default['default'].wrap(function _callee6$(_context6) {
300
300
  while (1) {
301
301
  switch (_context6.prev = _context6.next) {
302
302
  case 0:
303
303
  this.verifyCampaignId();
304
- return _context6.abrupt("return", this.client.getCampaign(this.id));
304
+ return _context6.abrupt("return", this.client.getCampaign(this.id, options));
305
305
 
306
306
  case 2:
307
307
  case "end":
@@ -311,7 +311,7 @@ var Campaign = /*#__PURE__*/function () {
311
311
  }, _callee6, this);
312
312
  }));
313
313
 
314
- function get() {
314
+ function get(_x3) {
315
315
  return _get.apply(this, arguments);
316
316
  }
317
317
 
@@ -10801,6 +10801,7 @@ var channelManagerEventToHandlerMapping = {
10801
10801
  'channel.deleted': 'channelDeletedHandler',
10802
10802
  'channel.hidden': 'channelHiddenHandler',
10803
10803
  'channel.truncated': 'channelTruncatedHandler',
10804
+ 'channel.updated': 'channelUpdatedHandler',
10804
10805
  'channel.visible': 'channelVisibleHandler',
10805
10806
  'message.new': 'newMessageHandler',
10806
10807
  'member.updated': 'memberUpdatedHandler',
@@ -11574,6 +11575,8 @@ var StreamChat = /*#__PURE__*/function () {
11574
11575
 
11575
11576
  _defineProperty__default['default'](this, "defaultWSTimeout", void 0);
11576
11577
 
11578
+ _defineProperty__default['default'](this, "sdkIdentifier", void 0);
11579
+
11577
11580
  _defineProperty__default['default'](this, "nextRequestAbortController", null);
11578
11581
 
11579
11582
  _defineProperty__default['default'](this, "_getConnectionID", function () {
@@ -16107,8 +16110,23 @@ var StreamChat = /*#__PURE__*/function () {
16107
16110
  }, {
16108
16111
  key: "getUserAgent",
16109
16112
  value: function getUserAgent() {
16110
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.56.1");
16113
+ if (this.userAgent) {
16114
+ return this.userAgent;
16115
+ }
16116
+
16117
+ var version = "8.57.1";
16118
+
16119
+ if (this.sdkIdentifier) {
16120
+ return "stream-chat-".concat(this.sdkIdentifier.name, "-v").concat(this.sdkIdentifier.version, "-llc-v").concat(version);
16121
+ } else {
16122
+ return "stream-chat-js-v".concat(version, "-").concat(this.node ? 'node' : 'browser');
16123
+ }
16111
16124
  }
16125
+ /**
16126
+ * @deprecated use sdkIdentifier instead
16127
+ * @param userAgent
16128
+ */
16129
+
16112
16130
  }, {
16113
16131
  key: "setUserAgent",
16114
16132
  value: function setUserAgent(userAgent) {
@@ -16905,13 +16923,13 @@ var StreamChat = /*#__PURE__*/function () {
16905
16923
  }, {
16906
16924
  key: "getCampaign",
16907
16925
  value: function () {
16908
- var _getCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee82(id) {
16926
+ var _getCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee82(id, options) {
16909
16927
  return _regeneratorRuntime__default['default'].wrap(function _callee82$(_context82) {
16910
16928
  while (1) {
16911
16929
  switch (_context82.prev = _context82.next) {
16912
16930
  case 0:
16913
16931
  this.validateServerSideAuth();
16914
- return _context82.abrupt("return", this.get(this.baseURL + "/campaigns/".concat(encodeURIComponent(id))));
16932
+ return _context82.abrupt("return", this.get(this.baseURL + "/campaigns/".concat(encodeURIComponent(id)), _objectSpread$1({}, options === null || options === void 0 ? void 0 : options.users)));
16915
16933
 
16916
16934
  case 2:
16917
16935
  case "end":
@@ -16921,7 +16939,7 @@ var StreamChat = /*#__PURE__*/function () {
16921
16939
  }, _callee82, this);
16922
16940
  }));
16923
16941
 
16924
- function getCampaign(_x118) {
16942
+ function getCampaign(_x118, _x119) {
16925
16943
  return _getCampaign.apply(this, arguments);
16926
16944
  }
16927
16945
 
@@ -16949,7 +16967,7 @@ var StreamChat = /*#__PURE__*/function () {
16949
16967
  }, _callee83, this);
16950
16968
  }));
16951
16969
 
16952
- function startCampaign(_x119, _x120) {
16970
+ function startCampaign(_x120, _x121) {
16953
16971
  return _startCampaign.apply(this, arguments);
16954
16972
  }
16955
16973
 
@@ -16988,7 +17006,7 @@ var StreamChat = /*#__PURE__*/function () {
16988
17006
  }, _callee84, this);
16989
17007
  }));
16990
17008
 
16991
- function queryCampaigns(_x121, _x122, _x123) {
17009
+ function queryCampaigns(_x122, _x123, _x124) {
16992
17010
  return _queryCampaigns.apply(this, arguments);
16993
17011
  }
16994
17012
 
@@ -17022,7 +17040,7 @@ var StreamChat = /*#__PURE__*/function () {
17022
17040
  }, _callee85, this);
17023
17041
  }));
17024
17042
 
17025
- function updateCampaign(_x124, _x125) {
17043
+ function updateCampaign(_x125, _x126) {
17026
17044
  return _updateCampaign.apply(this, arguments);
17027
17045
  }
17028
17046
 
@@ -17055,7 +17073,7 @@ var StreamChat = /*#__PURE__*/function () {
17055
17073
  }, _callee86, this);
17056
17074
  }));
17057
17075
 
17058
- function deleteCampaign(_x126) {
17076
+ function deleteCampaign(_x127) {
17059
17077
  return _deleteCampaign.apply(this, arguments);
17060
17078
  }
17061
17079
 
@@ -17088,7 +17106,7 @@ var StreamChat = /*#__PURE__*/function () {
17088
17106
  }, _callee87, this);
17089
17107
  }));
17090
17108
 
17091
- function stopCampaign(_x127) {
17109
+ function stopCampaign(_x128) {
17092
17110
  return _stopCampaign.apply(this, arguments);
17093
17111
  }
17094
17112
 
@@ -17121,7 +17139,7 @@ var StreamChat = /*#__PURE__*/function () {
17121
17139
  }, _callee88, this);
17122
17140
  }));
17123
17141
 
17124
- function enrichURL(_x128) {
17142
+ function enrichURL(_x129) {
17125
17143
  return _enrichURL.apply(this, arguments);
17126
17144
  }
17127
17145
 
@@ -17153,7 +17171,7 @@ var StreamChat = /*#__PURE__*/function () {
17153
17171
  }, _callee89, this);
17154
17172
  }));
17155
17173
 
17156
- function getTask(_x129) {
17174
+ function getTask(_x130) {
17157
17175
  return _getTask.apply(this, arguments);
17158
17176
  }
17159
17177
 
@@ -17195,7 +17213,7 @@ var StreamChat = /*#__PURE__*/function () {
17195
17213
  }, _callee90, this);
17196
17214
  }));
17197
17215
 
17198
- function deleteChannels(_x130) {
17216
+ function deleteChannels(_x131) {
17199
17217
  return _deleteChannels.apply(this, arguments);
17200
17218
  }
17201
17219
 
@@ -17262,7 +17280,7 @@ var StreamChat = /*#__PURE__*/function () {
17262
17280
  }, _callee91, this);
17263
17281
  }));
17264
17282
 
17265
- function deleteUsers(_x131) {
17283
+ function deleteUsers(_x132) {
17266
17284
  return _deleteUsers.apply(this, arguments);
17267
17285
  }
17268
17286
 
@@ -17304,7 +17322,7 @@ var StreamChat = /*#__PURE__*/function () {
17304
17322
  }, _callee92, this);
17305
17323
  }));
17306
17324
 
17307
- function _createImportURL(_x132) {
17325
+ function _createImportURL(_x133) {
17308
17326
  return _createImportURL2.apply(this, arguments);
17309
17327
  }
17310
17328
 
@@ -17352,7 +17370,7 @@ var StreamChat = /*#__PURE__*/function () {
17352
17370
  }, _callee93, this);
17353
17371
  }));
17354
17372
 
17355
- function _createImport(_x133) {
17373
+ function _createImport(_x134) {
17356
17374
  return _createImport2.apply(this, arguments);
17357
17375
  }
17358
17376
 
@@ -17393,7 +17411,7 @@ var StreamChat = /*#__PURE__*/function () {
17393
17411
  }, _callee94, this);
17394
17412
  }));
17395
17413
 
17396
- function _getImport(_x134) {
17414
+ function _getImport(_x135) {
17397
17415
  return _getImport2.apply(this, arguments);
17398
17416
  }
17399
17417
 
@@ -17434,7 +17452,7 @@ var StreamChat = /*#__PURE__*/function () {
17434
17452
  }, _callee95, this);
17435
17453
  }));
17436
17454
 
17437
- function _listImports(_x135) {
17455
+ function _listImports(_x136) {
17438
17456
  return _listImports2.apply(this, arguments);
17439
17457
  }
17440
17458
 
@@ -17474,7 +17492,7 @@ var StreamChat = /*#__PURE__*/function () {
17474
17492
  }, _callee96, this);
17475
17493
  }));
17476
17494
 
17477
- function upsertPushProvider(_x136) {
17495
+ function upsertPushProvider(_x137) {
17478
17496
  return _upsertPushProvider.apply(this, arguments);
17479
17497
  }
17480
17498
 
@@ -17514,7 +17532,7 @@ var StreamChat = /*#__PURE__*/function () {
17514
17532
  }, _callee97, this);
17515
17533
  }));
17516
17534
 
17517
- function deletePushProvider(_x137) {
17535
+ function deletePushProvider(_x138) {
17518
17536
  return _deletePushProvider.apply(this, arguments);
17519
17537
  }
17520
17538
 
@@ -17594,7 +17612,7 @@ var StreamChat = /*#__PURE__*/function () {
17594
17612
  }, _callee99, this);
17595
17613
  }));
17596
17614
 
17597
- function commitMessage(_x138) {
17615
+ function commitMessage(_x139) {
17598
17616
  return _commitMessage.apply(this, arguments);
17599
17617
  }
17600
17618
 
@@ -17631,7 +17649,7 @@ var StreamChat = /*#__PURE__*/function () {
17631
17649
  }, _callee100, this);
17632
17650
  }));
17633
17651
 
17634
- function createPoll(_x139, _x140) {
17652
+ function createPoll(_x140, _x141) {
17635
17653
  return _createPoll.apply(this, arguments);
17636
17654
  }
17637
17655
 
@@ -17668,7 +17686,7 @@ var StreamChat = /*#__PURE__*/function () {
17668
17686
  }, _callee101, this);
17669
17687
  }));
17670
17688
 
17671
- function getPoll(_x141, _x142) {
17689
+ function getPoll(_x142, _x143) {
17672
17690
  return _getPoll.apply(this, arguments);
17673
17691
  }
17674
17692
 
@@ -17705,7 +17723,7 @@ var StreamChat = /*#__PURE__*/function () {
17705
17723
  }, _callee102, this);
17706
17724
  }));
17707
17725
 
17708
- function updatePoll(_x143, _x144) {
17726
+ function updatePoll(_x144, _x145) {
17709
17727
  return _updatePoll.apply(this, arguments);
17710
17728
  }
17711
17729
 
@@ -17744,7 +17762,7 @@ var StreamChat = /*#__PURE__*/function () {
17744
17762
  }, _callee103, this);
17745
17763
  }));
17746
17764
 
17747
- function partialUpdatePoll(_x145, _x146, _x147) {
17765
+ function partialUpdatePoll(_x146, _x147, _x148) {
17748
17766
  return _partialUpdatePoll.apply(this, arguments);
17749
17767
  }
17750
17768
 
@@ -17781,7 +17799,7 @@ var StreamChat = /*#__PURE__*/function () {
17781
17799
  }, _callee104, this);
17782
17800
  }));
17783
17801
 
17784
- function deletePoll(_x148, _x149) {
17802
+ function deletePoll(_x149, _x150) {
17785
17803
  return _deletePoll.apply(this, arguments);
17786
17804
  }
17787
17805
 
@@ -17816,7 +17834,7 @@ var StreamChat = /*#__PURE__*/function () {
17816
17834
  }, _callee105, this);
17817
17835
  }));
17818
17836
 
17819
- function closePoll(_x150, _x151) {
17837
+ function closePoll(_x151, _x152) {
17820
17838
  return _closePoll.apply(this, arguments);
17821
17839
  }
17822
17840
 
@@ -17854,7 +17872,7 @@ var StreamChat = /*#__PURE__*/function () {
17854
17872
  }, _callee106, this);
17855
17873
  }));
17856
17874
 
17857
- function createPollOption(_x152, _x153, _x154) {
17875
+ function createPollOption(_x153, _x154, _x155) {
17858
17876
  return _createPollOption.apply(this, arguments);
17859
17877
  }
17860
17878
 
@@ -17892,7 +17910,7 @@ var StreamChat = /*#__PURE__*/function () {
17892
17910
  }, _callee107, this);
17893
17911
  }));
17894
17912
 
17895
- function getPollOption(_x155, _x156, _x157) {
17913
+ function getPollOption(_x156, _x157, _x158) {
17896
17914
  return _getPollOption.apply(this, arguments);
17897
17915
  }
17898
17916
 
@@ -17930,7 +17948,7 @@ var StreamChat = /*#__PURE__*/function () {
17930
17948
  }, _callee108, this);
17931
17949
  }));
17932
17950
 
17933
- function updatePollOption(_x158, _x159, _x160) {
17951
+ function updatePollOption(_x159, _x160, _x161) {
17934
17952
  return _updatePollOption.apply(this, arguments);
17935
17953
  }
17936
17954
 
@@ -17968,7 +17986,7 @@ var StreamChat = /*#__PURE__*/function () {
17968
17986
  }, _callee109, this);
17969
17987
  }));
17970
17988
 
17971
- function deletePollOption(_x161, _x162, _x163) {
17989
+ function deletePollOption(_x162, _x163, _x164) {
17972
17990
  return _deletePollOption.apply(this, arguments);
17973
17991
  }
17974
17992
 
@@ -18009,7 +18027,7 @@ var StreamChat = /*#__PURE__*/function () {
18009
18027
  }, _callee110, this);
18010
18028
  }));
18011
18029
 
18012
- function castPollVote(_x164, _x165, _x166, _x167) {
18030
+ function castPollVote(_x165, _x166, _x167, _x168) {
18013
18031
  return _castPollVote.apply(this, arguments);
18014
18032
  }
18015
18033
 
@@ -18043,7 +18061,7 @@ var StreamChat = /*#__PURE__*/function () {
18043
18061
  }, _callee111, this);
18044
18062
  }));
18045
18063
 
18046
- function addPollAnswer(_x168, _x169, _x170, _x171) {
18064
+ function addPollAnswer(_x169, _x170, _x171, _x172) {
18047
18065
  return _addPollAnswer.apply(this, arguments);
18048
18066
  }
18049
18067
 
@@ -18073,7 +18091,7 @@ var StreamChat = /*#__PURE__*/function () {
18073
18091
  }, _callee112, this);
18074
18092
  }));
18075
18093
 
18076
- function removePollVote(_x172, _x173, _x174, _x175) {
18094
+ function removePollVote(_x173, _x174, _x175, _x176) {
18077
18095
  return _removePollVote.apply(this, arguments);
18078
18096
  }
18079
18097
 
@@ -18176,7 +18194,7 @@ var StreamChat = /*#__PURE__*/function () {
18176
18194
  }, _callee114, this);
18177
18195
  }));
18178
18196
 
18179
- function queryPollVotes(_x176) {
18197
+ function queryPollVotes(_x177) {
18180
18198
  return _queryPollVotes.apply(this, arguments);
18181
18199
  }
18182
18200
 
@@ -18230,7 +18248,7 @@ var StreamChat = /*#__PURE__*/function () {
18230
18248
  }, _callee115, this);
18231
18249
  }));
18232
18250
 
18233
- function queryPollAnswers(_x177) {
18251
+ function queryPollAnswers(_x178) {
18234
18252
  return _queryPollAnswers.apply(this, arguments);
18235
18253
  }
18236
18254
 
@@ -18319,7 +18337,7 @@ var StreamChat = /*#__PURE__*/function () {
18319
18337
  }, _callee117, this);
18320
18338
  }));
18321
18339
 
18322
- function updateFlags(_x178, _x179) {
18340
+ function updateFlags(_x179, _x180) {
18323
18341
  return _updateFlags.apply(this, arguments);
18324
18342
  }
18325
18343