stream-chat 8.57.1 → 8.57.3

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.
@@ -4,12 +4,12 @@ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
4
4
  import _createClass from '@babel/runtime/helpers/createClass';
5
5
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
6
6
  import _regeneratorRuntime from '@babel/runtime/regenerator';
7
+ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
7
8
  import _extends from '@babel/runtime/helpers/extends';
8
9
  import _typeof from '@babel/runtime/helpers/typeof';
9
10
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
10
11
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
11
12
  import axios from 'axios';
12
- import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
13
13
  import FormData from 'form-data';
14
14
  import WebSocket from 'isomorphic-ws';
15
15
  import _assertThisInitialized from '@babel/runtime/helpers/assertThisInitialized';
@@ -11552,6 +11552,8 @@ var StreamChat = /*#__PURE__*/function () {
11552
11552
 
11553
11553
  _defineProperty(this, "sdkIdentifier", void 0);
11554
11554
 
11555
+ _defineProperty(this, "deviceIdentifier", void 0);
11556
+
11555
11557
  _defineProperty(this, "nextRequestAbortController", null);
11556
11558
 
11557
11559
  _defineProperty(this, "_getConnectionID", function () {
@@ -16085,17 +16087,36 @@ var StreamChat = /*#__PURE__*/function () {
16085
16087
  }, {
16086
16088
  key: "getUserAgent",
16087
16089
  value: function getUserAgent() {
16090
+ var _this$deviceIdentifie;
16091
+
16088
16092
  if (this.userAgent) {
16089
16093
  return this.userAgent;
16090
16094
  }
16091
16095
 
16092
- var version = "8.57.1";
16096
+ var version = "8.57.3";
16097
+ var clientBundle = process.env.CLIENT_BUNDLE;
16098
+ var userAgentString = '';
16093
16099
 
16094
16100
  if (this.sdkIdentifier) {
16095
- return "stream-chat-".concat(this.sdkIdentifier.name, "-v").concat(this.sdkIdentifier.version, "-llc-v").concat(version);
16101
+ userAgentString = "stream-chat-".concat(this.sdkIdentifier.name, "-v").concat(this.sdkIdentifier.version, "-llc-v").concat(version);
16096
16102
  } else {
16097
- return "stream-chat-js-v".concat(version, "-").concat(this.node ? 'node' : 'browser');
16103
+ userAgentString = "stream-chat-js-v".concat(version, "-").concat(this.node ? 'node' : 'browser');
16098
16104
  }
16105
+
16106
+ var _ref10 = (_this$deviceIdentifie = this.deviceIdentifier) !== null && _this$deviceIdentifie !== void 0 ? _this$deviceIdentifie : {},
16107
+ os = _ref10.os,
16108
+ model = _ref10.model;
16109
+
16110
+ return [// reports the device OS, if provided
16111
+ ['os', os], // reports the device model, if provided
16112
+ ['device_model', model], // reports which bundle is being picked from the exports
16113
+ ['client_bundle', clientBundle]].reduce(function (withArguments, _ref11) {
16114
+ var _ref12 = _slicedToArray(_ref11, 2),
16115
+ key = _ref12[0],
16116
+ value = _ref12[1];
16117
+
16118
+ return value && value.length > 0 ? withArguments.concat("|".concat(key, "=").concat(value)) : withArguments;
16119
+ }, userAgentString);
16099
16120
  }
16100
16121
  /**
16101
16122
  * @deprecated use sdkIdentifier instead
@@ -16140,10 +16161,10 @@ var StreamChat = /*#__PURE__*/function () {
16140
16161
  });
16141
16162
  }
16142
16163
 
16143
- var _ref10 = this.options.axiosRequestConfig || {},
16144
- axiosRequestConfigParams = _ref10.params,
16145
- axiosRequestConfigHeaders = _ref10.headers,
16146
- axiosRequestConfigRest = _objectWithoutProperties(_ref10, _excluded2);
16164
+ var _ref13 = this.options.axiosRequestConfig || {},
16165
+ axiosRequestConfigParams = _ref13.params,
16166
+ axiosRequestConfigHeaders = _ref13.headers,
16167
+ axiosRequestConfigRest = _objectWithoutProperties(_ref13, _excluded2);
16147
16168
 
16148
16169
  return _objectSpread$1(_objectSpread$1(_objectSpread$1({
16149
16170
  params: _objectSpread$1(_objectSpread$1({
@@ -17486,13 +17507,13 @@ var StreamChat = /*#__PURE__*/function () {
17486
17507
  }, {
17487
17508
  key: "deletePushProvider",
17488
17509
  value: function () {
17489
- var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee97(_ref11) {
17510
+ var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee97(_ref14) {
17490
17511
  var type, name;
17491
17512
  return _regeneratorRuntime.wrap(function _callee97$(_context97) {
17492
17513
  while (1) {
17493
17514
  switch (_context97.prev = _context97.next) {
17494
17515
  case 0:
17495
- type = _ref11.type, name = _ref11.name;
17516
+ type = _ref14.type, name = _ref14.name;
17496
17517
  _context97.next = 3;
17497
17518
  return this.delete(this.baseURL + "/push_providers/".concat(encodeURIComponent(type), "/").concat(encodeURIComponent(name)));
17498
17519
 
@@ -19231,5 +19252,5 @@ var SearchController = /*#__PURE__*/function () {
19231
19252
  return SearchController;
19232
19253
  }();
19233
19254
 
19234
- export { Allow, AllowAll, AnyResource, AnyRole, BaseSearchSource, BuiltinPermissions, BuiltinRoles, Campaign, Channel, ChannelManager, ChannelSearchSource, ChannelState, CheckSignature, ClientState, DEFAULT_CHANNEL_MANAGER_OPTIONS, DEFAULT_CHANNEL_MANAGER_PAGINATION_OPTIONS, Deny, DenyAll, DevToken, EVENT_MAP, ErrorFromResponse, InsightMetrics, JWTServerToken, JWTUserToken, MODERATION_ENTITY_TYPES, MaxPriority, MessageSearchSource, MinPriority, Moderation, Permission, Poll, PollManager, SearchController, Segment, StableWSConnection, StateStore, StreamChat, THREAD_MANAGER_INITIAL_STATE, Thread, ThreadManager, TokenManager, UserFromToken, UserSearchSource, VotingVisibility, buildWsFatalInsight, buildWsSuccessAfterFailureInsight, channelManagerEventToHandlerMapping, chatCodes, decodeBase64, encodeBase64, extractPollData, extractPollEnrichedData, formatMessage, isOwnUser, isPatch, isVoteAnswer, logChatPromiseExecution, postInsights };
19255
+ export { Allow, AllowAll, AnyResource, AnyRole, BaseSearchSource, BuiltinPermissions, BuiltinRoles, Campaign, Channel, ChannelManager, ChannelSearchSource, ChannelState, CheckSignature, ClientState, DEFAULT_CHANNEL_MANAGER_OPTIONS, DEFAULT_CHANNEL_MANAGER_PAGINATION_OPTIONS, Deny, DenyAll, DevToken, EVENT_MAP, ErrorFromResponse, InsightMetrics, JWTServerToken, JWTUserToken, MODERATION_ENTITY_TYPES, MaxPriority, MessageSearchSource, MinPriority, Moderation, Permission, Poll, PollManager, SearchController, Segment, StableWSConnection, StateStore, StreamChat, THREAD_MANAGER_INITIAL_STATE, Thread, ThreadManager, TokenManager, UserFromToken, UserSearchSource, VotingVisibility, buildWsFatalInsight, buildWsSuccessAfterFailureInsight, channelManagerEventToHandlerMapping, chatCodes, decodeBase64, encodeBase64, extractPollData, extractPollEnrichedData, formatMessage, isOwnUser, isPatch, isVoteAnswer, logChatPromiseExecution, postInsights, promoteChannel };
19235
19256
  //# sourceMappingURL=browser.es.js.map