stream-chat 8.14.3 → 8.14.5
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 +42 -31
- 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 +42 -31
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +42 -31
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +42 -31
- package/dist/index.js.map +1 -1
- package/dist/types/client.d.ts +1 -1
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/types.d.ts +9 -3
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +8 -8
- package/src/types.ts +21 -8
package/dist/index.es.js
CHANGED
|
@@ -6072,11 +6072,18 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
6072
6072
|
/*
|
|
6073
6073
|
DeleteUserOptions specifies a collection of one or more `user_ids` to be deleted.
|
|
6074
6074
|
|
|
6075
|
-
`user
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
`
|
|
6075
|
+
`user`:
|
|
6076
|
+
- soft: marks user as deleted and retains all user data
|
|
6077
|
+
- pruning: marks user as deleted and nullifies user information
|
|
6078
|
+
- hard: deletes user completely - this requires hard option for messages and conversation as well
|
|
6079
|
+
`conversations`:
|
|
6080
|
+
- soft: marks all conversation channels as deleted (same effect as Delete Channels with 'hard' option disabled)
|
|
6081
|
+
- hard: deletes channel and all its data completely including messages (same effect as Delete Channels with 'hard' option enabled)
|
|
6082
|
+
`messages`:
|
|
6083
|
+
- soft: marks all user messages as deleted without removing any related message data
|
|
6084
|
+
- pruning: marks all user messages as deleted, nullifies message information and removes some message data such as reactions and flags
|
|
6085
|
+
- hard: deletes messages completely with all related information
|
|
6086
|
+
`new_channel_owner_id`: any channels owned by the hard-deleted user will be transferred to this user ID
|
|
6080
6087
|
*/
|
|
6081
6088
|
// TODO: add better typing
|
|
6082
6089
|
var ErrorFromResponse = /*#__PURE__*/function (_Error) {
|
|
@@ -7682,7 +7689,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7682
7689
|
}, {
|
|
7683
7690
|
key: "sendFile",
|
|
7684
7691
|
value: function sendFile(url, uri, name, contentType, user) {
|
|
7685
|
-
var data = addFileToFormData(uri, name, contentType);
|
|
7692
|
+
var data = addFileToFormData(uri, name, contentType || 'multipart/form-data');
|
|
7686
7693
|
if (user != null) data.append('user', JSON.stringify(user));
|
|
7687
7694
|
return this.doAxiosRequest('postForm', url, data, {
|
|
7688
7695
|
headers: data.getHeaders ? data.getHeaders() : {},
|
|
@@ -10175,7 +10182,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10175
10182
|
}, {
|
|
10176
10183
|
key: "getUserAgent",
|
|
10177
10184
|
value: function getUserAgent() {
|
|
10178
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.14.
|
|
10185
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.14.5");
|
|
10179
10186
|
}
|
|
10180
10187
|
}, {
|
|
10181
10188
|
key: "setUserAgent",
|
|
@@ -11119,44 +11126,48 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11119
11126
|
}, {
|
|
11120
11127
|
key: "deleteUsers",
|
|
11121
11128
|
value: function () {
|
|
11122
|
-
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(user_ids
|
|
11129
|
+
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(user_ids) {
|
|
11130
|
+
var options,
|
|
11131
|
+
_args75 = arguments;
|
|
11123
11132
|
return _regeneratorRuntime.wrap(function _callee75$(_context75) {
|
|
11124
11133
|
while (1) {
|
|
11125
11134
|
switch (_context75.prev = _context75.next) {
|
|
11126
11135
|
case 0:
|
|
11127
|
-
|
|
11128
|
-
|
|
11136
|
+
options = _args75.length > 1 && _args75[1] !== undefined ? _args75[1] : {};
|
|
11137
|
+
|
|
11138
|
+
if (!(typeof options.user !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.user))) {
|
|
11139
|
+
_context75.next = 3;
|
|
11129
11140
|
break;
|
|
11130
11141
|
}
|
|
11131
11142
|
|
|
11132
|
-
throw new Error('Invalid delete user options. user must be one of [soft hard]');
|
|
11143
|
+
throw new Error('Invalid delete user options. user must be one of [soft hard pruning]');
|
|
11133
11144
|
|
|
11134
|
-
case
|
|
11135
|
-
if (!(options.
|
|
11136
|
-
_context75.next =
|
|
11145
|
+
case 3:
|
|
11146
|
+
if (!(typeof options.conversations !== 'undefined' && !['soft', 'hard'].includes(options.conversations))) {
|
|
11147
|
+
_context75.next = 5;
|
|
11137
11148
|
break;
|
|
11138
11149
|
}
|
|
11139
11150
|
|
|
11140
|
-
throw new Error('Invalid delete user options.
|
|
11151
|
+
throw new Error('Invalid delete user options. conversations must be one of [soft hard]');
|
|
11141
11152
|
|
|
11142
|
-
case
|
|
11143
|
-
if (!(options.
|
|
11144
|
-
_context75.next =
|
|
11153
|
+
case 5:
|
|
11154
|
+
if (!(typeof options.messages !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.messages))) {
|
|
11155
|
+
_context75.next = 7;
|
|
11145
11156
|
break;
|
|
11146
11157
|
}
|
|
11147
11158
|
|
|
11148
|
-
throw new Error('Invalid delete user options.
|
|
11159
|
+
throw new Error('Invalid delete user options. messages must be one of [soft hard pruning]');
|
|
11149
11160
|
|
|
11150
|
-
case
|
|
11151
|
-
_context75.next =
|
|
11161
|
+
case 7:
|
|
11162
|
+
_context75.next = 9;
|
|
11152
11163
|
return this.post(this.baseURL + "/users/delete", _objectSpread({
|
|
11153
11164
|
user_ids: user_ids
|
|
11154
11165
|
}, options));
|
|
11155
11166
|
|
|
11156
|
-
case
|
|
11167
|
+
case 9:
|
|
11157
11168
|
return _context75.abrupt("return", _context75.sent);
|
|
11158
11169
|
|
|
11159
|
-
case
|
|
11170
|
+
case 10:
|
|
11160
11171
|
case "end":
|
|
11161
11172
|
return _context75.stop();
|
|
11162
11173
|
}
|
|
@@ -11164,7 +11175,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11164
11175
|
}, _callee75, this);
|
|
11165
11176
|
}));
|
|
11166
11177
|
|
|
11167
|
-
function deleteUsers(_x99
|
|
11178
|
+
function deleteUsers(_x99) {
|
|
11168
11179
|
return _deleteUsers.apply(this, arguments);
|
|
11169
11180
|
}
|
|
11170
11181
|
|
|
@@ -11206,7 +11217,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11206
11217
|
}, _callee76, this);
|
|
11207
11218
|
}));
|
|
11208
11219
|
|
|
11209
|
-
function _createImportURL(
|
|
11220
|
+
function _createImportURL(_x100) {
|
|
11210
11221
|
return _createImportURL2.apply(this, arguments);
|
|
11211
11222
|
}
|
|
11212
11223
|
|
|
@@ -11254,7 +11265,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11254
11265
|
}, _callee77, this);
|
|
11255
11266
|
}));
|
|
11256
11267
|
|
|
11257
|
-
function _createImport(
|
|
11268
|
+
function _createImport(_x101) {
|
|
11258
11269
|
return _createImport2.apply(this, arguments);
|
|
11259
11270
|
}
|
|
11260
11271
|
|
|
@@ -11295,7 +11306,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11295
11306
|
}, _callee78, this);
|
|
11296
11307
|
}));
|
|
11297
11308
|
|
|
11298
|
-
function _getImport(
|
|
11309
|
+
function _getImport(_x102) {
|
|
11299
11310
|
return _getImport2.apply(this, arguments);
|
|
11300
11311
|
}
|
|
11301
11312
|
|
|
@@ -11336,7 +11347,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11336
11347
|
}, _callee79, this);
|
|
11337
11348
|
}));
|
|
11338
11349
|
|
|
11339
|
-
function _listImports(
|
|
11350
|
+
function _listImports(_x103) {
|
|
11340
11351
|
return _listImports2.apply(this, arguments);
|
|
11341
11352
|
}
|
|
11342
11353
|
|
|
@@ -11376,7 +11387,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11376
11387
|
}, _callee80, this);
|
|
11377
11388
|
}));
|
|
11378
11389
|
|
|
11379
|
-
function upsertPushProvider(
|
|
11390
|
+
function upsertPushProvider(_x104) {
|
|
11380
11391
|
return _upsertPushProvider.apply(this, arguments);
|
|
11381
11392
|
}
|
|
11382
11393
|
|
|
@@ -11416,7 +11427,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11416
11427
|
}, _callee81, this);
|
|
11417
11428
|
}));
|
|
11418
11429
|
|
|
11419
|
-
function deletePushProvider(
|
|
11430
|
+
function deletePushProvider(_x105) {
|
|
11420
11431
|
return _deletePushProvider.apply(this, arguments);
|
|
11421
11432
|
}
|
|
11422
11433
|
|
|
@@ -11496,7 +11507,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11496
11507
|
}, _callee83, this);
|
|
11497
11508
|
}));
|
|
11498
11509
|
|
|
11499
|
-
function commitMessage(
|
|
11510
|
+
function commitMessage(_x106) {
|
|
11500
11511
|
return _commitMessage.apply(this, arguments);
|
|
11501
11512
|
}
|
|
11502
11513
|
|