stream-chat 8.3.0 → 8.4.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 +16 -9
- 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 +16 -9
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +16 -9
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +16 -9
- package/dist/index.js.map +1 -1
- package/dist/types/channel.d.ts +2 -0
- package/dist/types/channel.d.ts.map +1 -1
- package/dist/types/client.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/channel.ts +2 -0
- package/src/client.ts +6 -1
package/dist/index.es.js
CHANGED
|
@@ -1507,6 +1507,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1507
1507
|
* @param {boolean} [options.skip_push] Skip sending push notifications
|
|
1508
1508
|
* @param {boolean} [options.is_pending_message] Make this message pending
|
|
1509
1509
|
* @param {Record<string,string>} [options.pending_message_metadata] Metadata for the pending message
|
|
1510
|
+
* @param {boolean} [options.force_moderation] Apply force moderation for server-side requests
|
|
1510
1511
|
*
|
|
1511
1512
|
* @return {Promise<SendMessageAPIResponse<StreamChatGenerics>>} The Server Response
|
|
1512
1513
|
*/
|
|
@@ -6017,7 +6018,8 @@ var ErrorFromResponse = /*#__PURE__*/function (_Error) {
|
|
|
6017
6018
|
return ErrorFromResponse;
|
|
6018
6019
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
6019
6020
|
|
|
6020
|
-
var _excluded = ["created_at", "updated_at", "last_active", "online"]
|
|
6021
|
+
var _excluded = ["created_at", "updated_at", "last_active", "online"],
|
|
6022
|
+
_excluded2 = ["params", "headers"];
|
|
6021
6023
|
|
|
6022
6024
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
6023
6025
|
|
|
@@ -10015,7 +10017,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10015
10017
|
}, {
|
|
10016
10018
|
key: "getUserAgent",
|
|
10017
10019
|
value: function getUserAgent() {
|
|
10018
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.
|
|
10020
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.4.1");
|
|
10019
10021
|
}
|
|
10020
10022
|
}, {
|
|
10021
10023
|
key: "setUserAgent",
|
|
@@ -10055,19 +10057,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10055
10057
|
});
|
|
10056
10058
|
}
|
|
10057
10059
|
|
|
10060
|
+
var _ref9 = this.options.axiosRequestConfig || {},
|
|
10061
|
+
axiosRequestConfigParams = _ref9.params,
|
|
10062
|
+
axiosRequestConfigHeaders = _ref9.headers,
|
|
10063
|
+
axiosRequestConfigRest = _objectWithoutProperties(_ref9, _excluded2);
|
|
10064
|
+
|
|
10058
10065
|
return _objectSpread(_objectSpread(_objectSpread({
|
|
10059
|
-
params: _objectSpread({
|
|
10066
|
+
params: _objectSpread(_objectSpread({
|
|
10060
10067
|
user_id: this.userID,
|
|
10061
10068
|
connection_id: this._getConnectionID(),
|
|
10062
10069
|
api_key: this.key
|
|
10063
|
-
}, options.params),
|
|
10064
|
-
headers: _objectSpread(_objectSpread({}, authorization), {}, {
|
|
10070
|
+
}, options.params), axiosRequestConfigParams || {}),
|
|
10071
|
+
headers: _objectSpread(_objectSpread(_objectSpread({}, authorization), {}, {
|
|
10065
10072
|
'stream-auth-type': this.getAuthType(),
|
|
10066
10073
|
'X-Stream-Client': this.getUserAgent()
|
|
10067
|
-
}, options.headers)
|
|
10074
|
+
}, options.headers), axiosRequestConfigHeaders || {})
|
|
10068
10075
|
}, signal ? {
|
|
10069
10076
|
signal: signal
|
|
10070
|
-
} : {}), options.config),
|
|
10077
|
+
} : {}), options.config), axiosRequestConfigRest || {});
|
|
10071
10078
|
}
|
|
10072
10079
|
}, {
|
|
10073
10080
|
key: "_getToken",
|
|
@@ -11223,13 +11230,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11223
11230
|
}, {
|
|
11224
11231
|
key: "deletePushProvider",
|
|
11225
11232
|
value: function () {
|
|
11226
|
-
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(
|
|
11233
|
+
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(_ref10) {
|
|
11227
11234
|
var type, name;
|
|
11228
11235
|
return _regeneratorRuntime.wrap(function _callee79$(_context79) {
|
|
11229
11236
|
while (1) {
|
|
11230
11237
|
switch (_context79.prev = _context79.next) {
|
|
11231
11238
|
case 0:
|
|
11232
|
-
type =
|
|
11239
|
+
type = _ref10.type, name = _ref10.name;
|
|
11233
11240
|
_context79.next = 3;
|
|
11234
11241
|
return this.delete(this.baseURL + "/push_providers/".concat(type, "/").concat(name));
|
|
11235
11242
|
|