stream-chat 8.57.2 → 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.
package/dist/index.es.js CHANGED
@@ -4,13 +4,13 @@ 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
13
  import https from 'https';
13
- import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
14
14
  import FormData from 'form-data';
15
15
  import WebSocket from 'isomorphic-ws';
16
16
  import jwt from 'jsonwebtoken';
@@ -11555,6 +11555,8 @@ var StreamChat = /*#__PURE__*/function () {
11555
11555
 
11556
11556
  _defineProperty(this, "sdkIdentifier", void 0);
11557
11557
 
11558
+ _defineProperty(this, "deviceIdentifier", void 0);
11559
+
11558
11560
  _defineProperty(this, "nextRequestAbortController", null);
11559
11561
 
11560
11562
  _defineProperty(this, "_getConnectionID", function () {
@@ -16088,17 +16090,36 @@ var StreamChat = /*#__PURE__*/function () {
16088
16090
  }, {
16089
16091
  key: "getUserAgent",
16090
16092
  value: function getUserAgent() {
16093
+ var _this$deviceIdentifie;
16094
+
16091
16095
  if (this.userAgent) {
16092
16096
  return this.userAgent;
16093
16097
  }
16094
16098
 
16095
- var version = "8.57.2";
16099
+ var version = "8.57.3";
16100
+ var clientBundle = process.env.CLIENT_BUNDLE;
16101
+ var userAgentString = '';
16096
16102
 
16097
16103
  if (this.sdkIdentifier) {
16098
- return "stream-chat-".concat(this.sdkIdentifier.name, "-v").concat(this.sdkIdentifier.version, "-llc-v").concat(version);
16104
+ userAgentString = "stream-chat-".concat(this.sdkIdentifier.name, "-v").concat(this.sdkIdentifier.version, "-llc-v").concat(version);
16099
16105
  } else {
16100
- return "stream-chat-js-v".concat(version, "-").concat(this.node ? 'node' : 'browser');
16106
+ userAgentString = "stream-chat-js-v".concat(version, "-").concat(this.node ? 'node' : 'browser');
16101
16107
  }
16108
+
16109
+ var _ref10 = (_this$deviceIdentifie = this.deviceIdentifier) !== null && _this$deviceIdentifie !== void 0 ? _this$deviceIdentifie : {},
16110
+ os = _ref10.os,
16111
+ model = _ref10.model;
16112
+
16113
+ return [// reports the device OS, if provided
16114
+ ['os', os], // reports the device model, if provided
16115
+ ['device_model', model], // reports which bundle is being picked from the exports
16116
+ ['client_bundle', clientBundle]].reduce(function (withArguments, _ref11) {
16117
+ var _ref12 = _slicedToArray(_ref11, 2),
16118
+ key = _ref12[0],
16119
+ value = _ref12[1];
16120
+
16121
+ return value && value.length > 0 ? withArguments.concat("|".concat(key, "=").concat(value)) : withArguments;
16122
+ }, userAgentString);
16102
16123
  }
16103
16124
  /**
16104
16125
  * @deprecated use sdkIdentifier instead
@@ -16143,10 +16164,10 @@ var StreamChat = /*#__PURE__*/function () {
16143
16164
  });
16144
16165
  }
16145
16166
 
16146
- var _ref10 = this.options.axiosRequestConfig || {},
16147
- axiosRequestConfigParams = _ref10.params,
16148
- axiosRequestConfigHeaders = _ref10.headers,
16149
- axiosRequestConfigRest = _objectWithoutProperties(_ref10, _excluded2);
16167
+ var _ref13 = this.options.axiosRequestConfig || {},
16168
+ axiosRequestConfigParams = _ref13.params,
16169
+ axiosRequestConfigHeaders = _ref13.headers,
16170
+ axiosRequestConfigRest = _objectWithoutProperties(_ref13, _excluded2);
16150
16171
 
16151
16172
  return _objectSpread$1(_objectSpread$1(_objectSpread$1({
16152
16173
  params: _objectSpread$1(_objectSpread$1({
@@ -17489,13 +17510,13 @@ var StreamChat = /*#__PURE__*/function () {
17489
17510
  }, {
17490
17511
  key: "deletePushProvider",
17491
17512
  value: function () {
17492
- var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee97(_ref11) {
17513
+ var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee97(_ref14) {
17493
17514
  var type, name;
17494
17515
  return _regeneratorRuntime.wrap(function _callee97$(_context97) {
17495
17516
  while (1) {
17496
17517
  switch (_context97.prev = _context97.next) {
17497
17518
  case 0:
17498
- type = _ref11.type, name = _ref11.name;
17519
+ type = _ref14.type, name = _ref14.name;
17499
17520
  _context97.next = 3;
17500
17521
  return this.delete(this.baseURL + "/push_providers/".concat(encodeURIComponent(type), "/").concat(encodeURIComponent(name)));
17501
17522