stream-chat 8.52.3 → 8.54.0
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 +889 -796
- 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 +889 -796
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +889 -796
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +889 -796
- package/dist/index.js.map +1 -1
- package/dist/types/channel.d.ts +2 -1
- package/dist/types/channel.d.ts.map +1 -1
- package/dist/types/client.d.ts +67 -4
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/constants.d.ts.map +1 -1
- package/dist/types/types.d.ts +20 -0
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/channel.ts +2 -0
- package/src/client.ts +67 -6
- package/src/constants.ts +1 -1
- package/src/types.ts +25 -0
- package/src/utils.ts +1 -0
package/dist/index.es.js
CHANGED
|
@@ -369,7 +369,8 @@ function isOwnUserBaseProperty(property) {
|
|
|
369
369
|
unread_threads: true,
|
|
370
370
|
invisible: true,
|
|
371
371
|
privacy_settings: true,
|
|
372
|
-
roles: true
|
|
372
|
+
roles: true,
|
|
373
|
+
push_preferences: true
|
|
373
374
|
};
|
|
374
375
|
return ownUserBaseProperties[property];
|
|
375
376
|
}
|
|
@@ -952,8 +953,8 @@ var messageSetPagination = function messageSetPagination(params) {
|
|
|
952
953
|
var DEFAULT_QUERY_CHANNELS_MESSAGE_LIST_PAGE_SIZE = 25;
|
|
953
954
|
var DEFAULT_QUERY_CHANNEL_MESSAGE_LIST_PAGE_SIZE = 100;
|
|
954
955
|
var DEFAULT_MESSAGE_SET_PAGINATION = {
|
|
955
|
-
hasNext:
|
|
956
|
-
hasPrev:
|
|
956
|
+
hasNext: false,
|
|
957
|
+
hasPrev: false
|
|
957
958
|
};
|
|
958
959
|
|
|
959
960
|
function ownKeys$b(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -1980,6 +1981,8 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1980
1981
|
|
|
1981
1982
|
_defineProperty(this, "disconnected", void 0);
|
|
1982
1983
|
|
|
1984
|
+
_defineProperty(this, "push_preferences", void 0);
|
|
1985
|
+
|
|
1983
1986
|
_defineProperty(this, "create", /*#__PURE__*/function () {
|
|
1984
1987
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(options) {
|
|
1985
1988
|
var defaultOptions;
|
|
@@ -12599,6 +12602,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12599
12602
|
c.data = channelState.channel;
|
|
12600
12603
|
c.offlineMode = offlineMode;
|
|
12601
12604
|
c.initialized = !offlineMode;
|
|
12605
|
+
c.push_preferences = channelState.push_preferences;
|
|
12602
12606
|
var updatedMessagesSet = void 0;
|
|
12603
12607
|
|
|
12604
12608
|
if (skipInitialization === undefined) {
|
|
@@ -12900,6 +12904,44 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12900
12904
|
|
|
12901
12905
|
return getUnreadCountBatch;
|
|
12902
12906
|
}()
|
|
12907
|
+
/**
|
|
12908
|
+
* setPushPreferences - Applies the list of push preferences.
|
|
12909
|
+
*
|
|
12910
|
+
* @param {PushPreference[]} A list of push preferences.
|
|
12911
|
+
*
|
|
12912
|
+
* @return {<UpsertPushPreferencesResponse>}
|
|
12913
|
+
*/
|
|
12914
|
+
|
|
12915
|
+
}, {
|
|
12916
|
+
key: "setPushPreferences",
|
|
12917
|
+
value: function () {
|
|
12918
|
+
var _setPushPreferences = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(preferences) {
|
|
12919
|
+
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
|
12920
|
+
while (1) {
|
|
12921
|
+
switch (_context27.prev = _context27.next) {
|
|
12922
|
+
case 0:
|
|
12923
|
+
_context27.next = 2;
|
|
12924
|
+
return this.post(this.baseURL + '/push_preferences', {
|
|
12925
|
+
preferences: preferences
|
|
12926
|
+
});
|
|
12927
|
+
|
|
12928
|
+
case 2:
|
|
12929
|
+
return _context27.abrupt("return", _context27.sent);
|
|
12930
|
+
|
|
12931
|
+
case 3:
|
|
12932
|
+
case "end":
|
|
12933
|
+
return _context27.stop();
|
|
12934
|
+
}
|
|
12935
|
+
}
|
|
12936
|
+
}, _callee27, this);
|
|
12937
|
+
}));
|
|
12938
|
+
|
|
12939
|
+
function setPushPreferences(_x29) {
|
|
12940
|
+
return _setPushPreferences.apply(this, arguments);
|
|
12941
|
+
}
|
|
12942
|
+
|
|
12943
|
+
return setPushPreferences;
|
|
12944
|
+
}()
|
|
12903
12945
|
/**
|
|
12904
12946
|
* removeDevice - Removes the device with the given id. Clientside users can only delete their own devices
|
|
12905
12947
|
*
|
|
@@ -12911,12 +12953,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12911
12953
|
}, {
|
|
12912
12954
|
key: "removeDevice",
|
|
12913
12955
|
value: function () {
|
|
12914
|
-
var _removeDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12915
|
-
return _regeneratorRuntime.wrap(function
|
|
12956
|
+
var _removeDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(id, userID) {
|
|
12957
|
+
return _regeneratorRuntime.wrap(function _callee28$(_context28) {
|
|
12916
12958
|
while (1) {
|
|
12917
|
-
switch (
|
|
12959
|
+
switch (_context28.prev = _context28.next) {
|
|
12918
12960
|
case 0:
|
|
12919
|
-
|
|
12961
|
+
_context28.next = 2;
|
|
12920
12962
|
return this.delete(this.baseURL + '/devices', _objectSpread({
|
|
12921
12963
|
id: id
|
|
12922
12964
|
}, userID ? {
|
|
@@ -12924,17 +12966,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12924
12966
|
} : {}));
|
|
12925
12967
|
|
|
12926
12968
|
case 2:
|
|
12927
|
-
return
|
|
12969
|
+
return _context28.abrupt("return", _context28.sent);
|
|
12928
12970
|
|
|
12929
12971
|
case 3:
|
|
12930
12972
|
case "end":
|
|
12931
|
-
return
|
|
12973
|
+
return _context28.stop();
|
|
12932
12974
|
}
|
|
12933
12975
|
}
|
|
12934
|
-
},
|
|
12976
|
+
}, _callee28, this);
|
|
12935
12977
|
}));
|
|
12936
12978
|
|
|
12937
|
-
function removeDevice(
|
|
12979
|
+
function removeDevice(_x30, _x31) {
|
|
12938
12980
|
return _removeDevice.apply(this, arguments);
|
|
12939
12981
|
}
|
|
12940
12982
|
|
|
@@ -12951,15 +12993,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12951
12993
|
}, {
|
|
12952
12994
|
key: "getRateLimits",
|
|
12953
12995
|
value: function () {
|
|
12954
|
-
var _getRateLimits = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12996
|
+
var _getRateLimits = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(params) {
|
|
12955
12997
|
var _ref7, serverSide, web, android, ios, endpoints;
|
|
12956
12998
|
|
|
12957
|
-
return _regeneratorRuntime.wrap(function
|
|
12999
|
+
return _regeneratorRuntime.wrap(function _callee29$(_context29) {
|
|
12958
13000
|
while (1) {
|
|
12959
|
-
switch (
|
|
13001
|
+
switch (_context29.prev = _context29.next) {
|
|
12960
13002
|
case 0:
|
|
12961
13003
|
_ref7 = params || {}, serverSide = _ref7.serverSide, web = _ref7.web, android = _ref7.android, ios = _ref7.ios, endpoints = _ref7.endpoints;
|
|
12962
|
-
return
|
|
13004
|
+
return _context29.abrupt("return", this.get(this.baseURL + '/rate_limits', {
|
|
12963
13005
|
server_side: serverSide,
|
|
12964
13006
|
web: web,
|
|
12965
13007
|
android: android,
|
|
@@ -12969,13 +13011,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12969
13011
|
|
|
12970
13012
|
case 2:
|
|
12971
13013
|
case "end":
|
|
12972
|
-
return
|
|
13014
|
+
return _context29.stop();
|
|
12973
13015
|
}
|
|
12974
13016
|
}
|
|
12975
|
-
},
|
|
13017
|
+
}, _callee29, this);
|
|
12976
13018
|
}));
|
|
12977
13019
|
|
|
12978
|
-
function getRateLimits(
|
|
13020
|
+
function getRateLimits(_x32) {
|
|
12979
13021
|
return _getRateLimits.apply(this, arguments);
|
|
12980
13022
|
}
|
|
12981
13023
|
|
|
@@ -13069,26 +13111,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13069
13111
|
* @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>} list of updated users
|
|
13070
13112
|
*/
|
|
13071
13113
|
function () {
|
|
13072
|
-
var _partialUpdateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13073
|
-
return _regeneratorRuntime.wrap(function
|
|
13114
|
+
var _partialUpdateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(partialUserObject) {
|
|
13115
|
+
return _regeneratorRuntime.wrap(function _callee30$(_context30) {
|
|
13074
13116
|
while (1) {
|
|
13075
|
-
switch (
|
|
13117
|
+
switch (_context30.prev = _context30.next) {
|
|
13076
13118
|
case 0:
|
|
13077
|
-
|
|
13119
|
+
_context30.next = 2;
|
|
13078
13120
|
return this.partialUpdateUsers([partialUserObject]);
|
|
13079
13121
|
|
|
13080
13122
|
case 2:
|
|
13081
|
-
return
|
|
13123
|
+
return _context30.abrupt("return", _context30.sent);
|
|
13082
13124
|
|
|
13083
13125
|
case 3:
|
|
13084
13126
|
case "end":
|
|
13085
|
-
return
|
|
13127
|
+
return _context30.stop();
|
|
13086
13128
|
}
|
|
13087
13129
|
}
|
|
13088
|
-
},
|
|
13130
|
+
}, _callee30, this);
|
|
13089
13131
|
}));
|
|
13090
13132
|
|
|
13091
|
-
function partialUpdateUser(
|
|
13133
|
+
function partialUpdateUser(_x33) {
|
|
13092
13134
|
return _partialUpdateUser.apply(this, arguments);
|
|
13093
13135
|
}
|
|
13094
13136
|
|
|
@@ -13105,29 +13147,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13105
13147
|
}, {
|
|
13106
13148
|
key: "upsertUsers",
|
|
13107
13149
|
value: function () {
|
|
13108
|
-
var _upsertUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13150
|
+
var _upsertUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(users) {
|
|
13109
13151
|
var userMap, _iterator3, _step3, userObject;
|
|
13110
13152
|
|
|
13111
|
-
return _regeneratorRuntime.wrap(function
|
|
13153
|
+
return _regeneratorRuntime.wrap(function _callee31$(_context31) {
|
|
13112
13154
|
while (1) {
|
|
13113
|
-
switch (
|
|
13155
|
+
switch (_context31.prev = _context31.next) {
|
|
13114
13156
|
case 0:
|
|
13115
13157
|
userMap = {};
|
|
13116
13158
|
_iterator3 = _createForOfIteratorHelper(users);
|
|
13117
|
-
|
|
13159
|
+
_context31.prev = 2;
|
|
13118
13160
|
|
|
13119
13161
|
_iterator3.s();
|
|
13120
13162
|
|
|
13121
13163
|
case 4:
|
|
13122
13164
|
if ((_step3 = _iterator3.n()).done) {
|
|
13123
|
-
|
|
13165
|
+
_context31.next = 11;
|
|
13124
13166
|
break;
|
|
13125
13167
|
}
|
|
13126
13168
|
|
|
13127
13169
|
userObject = _step3.value;
|
|
13128
13170
|
|
|
13129
13171
|
if (userObject.id) {
|
|
13130
|
-
|
|
13172
|
+
_context31.next = 8;
|
|
13131
13173
|
break;
|
|
13132
13174
|
}
|
|
13133
13175
|
|
|
@@ -13137,44 +13179,44 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13137
13179
|
userMap[userObject.id] = userObject;
|
|
13138
13180
|
|
|
13139
13181
|
case 9:
|
|
13140
|
-
|
|
13182
|
+
_context31.next = 4;
|
|
13141
13183
|
break;
|
|
13142
13184
|
|
|
13143
13185
|
case 11:
|
|
13144
|
-
|
|
13186
|
+
_context31.next = 16;
|
|
13145
13187
|
break;
|
|
13146
13188
|
|
|
13147
13189
|
case 13:
|
|
13148
|
-
|
|
13149
|
-
|
|
13190
|
+
_context31.prev = 13;
|
|
13191
|
+
_context31.t0 = _context31["catch"](2);
|
|
13150
13192
|
|
|
13151
|
-
_iterator3.e(
|
|
13193
|
+
_iterator3.e(_context31.t0);
|
|
13152
13194
|
|
|
13153
13195
|
case 16:
|
|
13154
|
-
|
|
13196
|
+
_context31.prev = 16;
|
|
13155
13197
|
|
|
13156
13198
|
_iterator3.f();
|
|
13157
13199
|
|
|
13158
|
-
return
|
|
13200
|
+
return _context31.finish(16);
|
|
13159
13201
|
|
|
13160
13202
|
case 19:
|
|
13161
|
-
|
|
13203
|
+
_context31.next = 21;
|
|
13162
13204
|
return this.post(this.baseURL + '/users', {
|
|
13163
13205
|
users: userMap
|
|
13164
13206
|
});
|
|
13165
13207
|
|
|
13166
13208
|
case 21:
|
|
13167
|
-
return
|
|
13209
|
+
return _context31.abrupt("return", _context31.sent);
|
|
13168
13210
|
|
|
13169
13211
|
case 22:
|
|
13170
13212
|
case "end":
|
|
13171
|
-
return
|
|
13213
|
+
return _context31.stop();
|
|
13172
13214
|
}
|
|
13173
13215
|
}
|
|
13174
|
-
},
|
|
13216
|
+
}, _callee31, this, [[2, 13, 16, 19]]);
|
|
13175
13217
|
}));
|
|
13176
13218
|
|
|
13177
|
-
function upsertUsers(
|
|
13219
|
+
function upsertUsers(_x34) {
|
|
13178
13220
|
return _upsertUsers.apply(this, arguments);
|
|
13179
13221
|
}
|
|
13180
13222
|
|
|
@@ -13222,72 +13264,72 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13222
13264
|
* @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>}
|
|
13223
13265
|
*/
|
|
13224
13266
|
function () {
|
|
13225
|
-
var _partialUpdateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13267
|
+
var _partialUpdateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(users) {
|
|
13226
13268
|
var _iterator4, _step4, userObject;
|
|
13227
13269
|
|
|
13228
|
-
return _regeneratorRuntime.wrap(function
|
|
13270
|
+
return _regeneratorRuntime.wrap(function _callee32$(_context32) {
|
|
13229
13271
|
while (1) {
|
|
13230
|
-
switch (
|
|
13272
|
+
switch (_context32.prev = _context32.next) {
|
|
13231
13273
|
case 0:
|
|
13232
13274
|
_iterator4 = _createForOfIteratorHelper(users);
|
|
13233
|
-
|
|
13275
|
+
_context32.prev = 1;
|
|
13234
13276
|
|
|
13235
13277
|
_iterator4.s();
|
|
13236
13278
|
|
|
13237
13279
|
case 3:
|
|
13238
13280
|
if ((_step4 = _iterator4.n()).done) {
|
|
13239
|
-
|
|
13281
|
+
_context32.next = 9;
|
|
13240
13282
|
break;
|
|
13241
13283
|
}
|
|
13242
13284
|
|
|
13243
13285
|
userObject = _step4.value;
|
|
13244
13286
|
|
|
13245
13287
|
if (userObject.id) {
|
|
13246
|
-
|
|
13288
|
+
_context32.next = 7;
|
|
13247
13289
|
break;
|
|
13248
13290
|
}
|
|
13249
13291
|
|
|
13250
13292
|
throw Error('User ID is required when updating a user');
|
|
13251
13293
|
|
|
13252
13294
|
case 7:
|
|
13253
|
-
|
|
13295
|
+
_context32.next = 3;
|
|
13254
13296
|
break;
|
|
13255
13297
|
|
|
13256
13298
|
case 9:
|
|
13257
|
-
|
|
13299
|
+
_context32.next = 14;
|
|
13258
13300
|
break;
|
|
13259
13301
|
|
|
13260
13302
|
case 11:
|
|
13261
|
-
|
|
13262
|
-
|
|
13303
|
+
_context32.prev = 11;
|
|
13304
|
+
_context32.t0 = _context32["catch"](1);
|
|
13263
13305
|
|
|
13264
|
-
_iterator4.e(
|
|
13306
|
+
_iterator4.e(_context32.t0);
|
|
13265
13307
|
|
|
13266
13308
|
case 14:
|
|
13267
|
-
|
|
13309
|
+
_context32.prev = 14;
|
|
13268
13310
|
|
|
13269
13311
|
_iterator4.f();
|
|
13270
13312
|
|
|
13271
|
-
return
|
|
13313
|
+
return _context32.finish(14);
|
|
13272
13314
|
|
|
13273
13315
|
case 17:
|
|
13274
|
-
|
|
13316
|
+
_context32.next = 19;
|
|
13275
13317
|
return this.patch(this.baseURL + '/users', {
|
|
13276
13318
|
users: users
|
|
13277
13319
|
});
|
|
13278
13320
|
|
|
13279
13321
|
case 19:
|
|
13280
|
-
return
|
|
13322
|
+
return _context32.abrupt("return", _context32.sent);
|
|
13281
13323
|
|
|
13282
13324
|
case 20:
|
|
13283
13325
|
case "end":
|
|
13284
|
-
return
|
|
13326
|
+
return _context32.stop();
|
|
13285
13327
|
}
|
|
13286
13328
|
}
|
|
13287
|
-
},
|
|
13329
|
+
}, _callee32, this, [[1, 11, 14, 17]]);
|
|
13288
13330
|
}));
|
|
13289
13331
|
|
|
13290
|
-
function partialUpdateUsers(
|
|
13332
|
+
function partialUpdateUsers(_x35) {
|
|
13291
13333
|
return _partialUpdateUsers.apply(this, arguments);
|
|
13292
13334
|
}
|
|
13293
13335
|
|
|
@@ -13296,26 +13338,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13296
13338
|
}, {
|
|
13297
13339
|
key: "deleteUser",
|
|
13298
13340
|
value: function () {
|
|
13299
|
-
var _deleteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13300
|
-
return _regeneratorRuntime.wrap(function
|
|
13341
|
+
var _deleteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(userID, params) {
|
|
13342
|
+
return _regeneratorRuntime.wrap(function _callee33$(_context33) {
|
|
13301
13343
|
while (1) {
|
|
13302
|
-
switch (
|
|
13344
|
+
switch (_context33.prev = _context33.next) {
|
|
13303
13345
|
case 0:
|
|
13304
|
-
|
|
13346
|
+
_context33.next = 2;
|
|
13305
13347
|
return this.delete(this.baseURL + "/users/".concat(encodeURIComponent(userID)), params);
|
|
13306
13348
|
|
|
13307
13349
|
case 2:
|
|
13308
|
-
return
|
|
13350
|
+
return _context33.abrupt("return", _context33.sent);
|
|
13309
13351
|
|
|
13310
13352
|
case 3:
|
|
13311
13353
|
case "end":
|
|
13312
|
-
return
|
|
13354
|
+
return _context33.stop();
|
|
13313
13355
|
}
|
|
13314
13356
|
}
|
|
13315
|
-
},
|
|
13357
|
+
}, _callee33, this);
|
|
13316
13358
|
}));
|
|
13317
13359
|
|
|
13318
|
-
function deleteUser(
|
|
13360
|
+
function deleteUser(_x36, _x37) {
|
|
13319
13361
|
return _deleteUser.apply(this, arguments);
|
|
13320
13362
|
}
|
|
13321
13363
|
|
|
@@ -13332,28 +13374,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13332
13374
|
}, {
|
|
13333
13375
|
key: "restoreUsers",
|
|
13334
13376
|
value: function () {
|
|
13335
|
-
var _restoreUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13336
|
-
return _regeneratorRuntime.wrap(function
|
|
13377
|
+
var _restoreUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(user_ids) {
|
|
13378
|
+
return _regeneratorRuntime.wrap(function _callee34$(_context34) {
|
|
13337
13379
|
while (1) {
|
|
13338
|
-
switch (
|
|
13380
|
+
switch (_context34.prev = _context34.next) {
|
|
13339
13381
|
case 0:
|
|
13340
|
-
|
|
13382
|
+
_context34.next = 2;
|
|
13341
13383
|
return this.post(this.baseURL + "/users/restore", {
|
|
13342
13384
|
user_ids: user_ids
|
|
13343
13385
|
});
|
|
13344
13386
|
|
|
13345
13387
|
case 2:
|
|
13346
|
-
return
|
|
13388
|
+
return _context34.abrupt("return", _context34.sent);
|
|
13347
13389
|
|
|
13348
13390
|
case 3:
|
|
13349
13391
|
case "end":
|
|
13350
|
-
return
|
|
13392
|
+
return _context34.stop();
|
|
13351
13393
|
}
|
|
13352
13394
|
}
|
|
13353
|
-
},
|
|
13395
|
+
}, _callee34, this);
|
|
13354
13396
|
}));
|
|
13355
13397
|
|
|
13356
|
-
function restoreUsers(
|
|
13398
|
+
function restoreUsers(_x38) {
|
|
13357
13399
|
return _restoreUsers.apply(this, arguments);
|
|
13358
13400
|
}
|
|
13359
13401
|
|
|
@@ -13371,26 +13413,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13371
13413
|
}, {
|
|
13372
13414
|
key: "reactivateUser",
|
|
13373
13415
|
value: function () {
|
|
13374
|
-
var _reactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13375
|
-
return _regeneratorRuntime.wrap(function
|
|
13416
|
+
var _reactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(userID, options) {
|
|
13417
|
+
return _regeneratorRuntime.wrap(function _callee35$(_context35) {
|
|
13376
13418
|
while (1) {
|
|
13377
|
-
switch (
|
|
13419
|
+
switch (_context35.prev = _context35.next) {
|
|
13378
13420
|
case 0:
|
|
13379
|
-
|
|
13421
|
+
_context35.next = 2;
|
|
13380
13422
|
return this.post(this.baseURL + "/users/".concat(encodeURIComponent(userID), "/reactivate"), _objectSpread({}, options));
|
|
13381
13423
|
|
|
13382
13424
|
case 2:
|
|
13383
|
-
return
|
|
13425
|
+
return _context35.abrupt("return", _context35.sent);
|
|
13384
13426
|
|
|
13385
13427
|
case 3:
|
|
13386
13428
|
case "end":
|
|
13387
|
-
return
|
|
13429
|
+
return _context35.stop();
|
|
13388
13430
|
}
|
|
13389
13431
|
}
|
|
13390
|
-
},
|
|
13432
|
+
}, _callee35, this);
|
|
13391
13433
|
}));
|
|
13392
13434
|
|
|
13393
|
-
function reactivateUser(
|
|
13435
|
+
function reactivateUser(_x39, _x40) {
|
|
13394
13436
|
return _reactivateUser.apply(this, arguments);
|
|
13395
13437
|
}
|
|
13396
13438
|
|
|
@@ -13408,28 +13450,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13408
13450
|
}, {
|
|
13409
13451
|
key: "reactivateUsers",
|
|
13410
13452
|
value: function () {
|
|
13411
|
-
var _reactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13412
|
-
return _regeneratorRuntime.wrap(function
|
|
13453
|
+
var _reactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(user_ids, options) {
|
|
13454
|
+
return _regeneratorRuntime.wrap(function _callee36$(_context36) {
|
|
13413
13455
|
while (1) {
|
|
13414
|
-
switch (
|
|
13456
|
+
switch (_context36.prev = _context36.next) {
|
|
13415
13457
|
case 0:
|
|
13416
|
-
|
|
13458
|
+
_context36.next = 2;
|
|
13417
13459
|
return this.post(this.baseURL + "/users/reactivate", _objectSpread({
|
|
13418
13460
|
user_ids: user_ids
|
|
13419
13461
|
}, options));
|
|
13420
13462
|
|
|
13421
13463
|
case 2:
|
|
13422
|
-
return
|
|
13464
|
+
return _context36.abrupt("return", _context36.sent);
|
|
13423
13465
|
|
|
13424
13466
|
case 3:
|
|
13425
13467
|
case "end":
|
|
13426
|
-
return
|
|
13468
|
+
return _context36.stop();
|
|
13427
13469
|
}
|
|
13428
13470
|
}
|
|
13429
|
-
},
|
|
13471
|
+
}, _callee36, this);
|
|
13430
13472
|
}));
|
|
13431
13473
|
|
|
13432
|
-
function reactivateUsers(
|
|
13474
|
+
function reactivateUsers(_x41, _x42) {
|
|
13433
13475
|
return _reactivateUsers.apply(this, arguments);
|
|
13434
13476
|
}
|
|
13435
13477
|
|
|
@@ -13447,26 +13489,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13447
13489
|
}, {
|
|
13448
13490
|
key: "deactivateUser",
|
|
13449
13491
|
value: function () {
|
|
13450
|
-
var _deactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13451
|
-
return _regeneratorRuntime.wrap(function
|
|
13492
|
+
var _deactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37(userID, options) {
|
|
13493
|
+
return _regeneratorRuntime.wrap(function _callee37$(_context37) {
|
|
13452
13494
|
while (1) {
|
|
13453
|
-
switch (
|
|
13495
|
+
switch (_context37.prev = _context37.next) {
|
|
13454
13496
|
case 0:
|
|
13455
|
-
|
|
13497
|
+
_context37.next = 2;
|
|
13456
13498
|
return this.post(this.baseURL + "/users/".concat(encodeURIComponent(userID), "/deactivate"), _objectSpread({}, options));
|
|
13457
13499
|
|
|
13458
13500
|
case 2:
|
|
13459
|
-
return
|
|
13501
|
+
return _context37.abrupt("return", _context37.sent);
|
|
13460
13502
|
|
|
13461
13503
|
case 3:
|
|
13462
13504
|
case "end":
|
|
13463
|
-
return
|
|
13505
|
+
return _context37.stop();
|
|
13464
13506
|
}
|
|
13465
13507
|
}
|
|
13466
|
-
},
|
|
13508
|
+
}, _callee37, this);
|
|
13467
13509
|
}));
|
|
13468
13510
|
|
|
13469
|
-
function deactivateUser(
|
|
13511
|
+
function deactivateUser(_x43, _x44) {
|
|
13470
13512
|
return _deactivateUser.apply(this, arguments);
|
|
13471
13513
|
}
|
|
13472
13514
|
|
|
@@ -13484,28 +13526,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13484
13526
|
}, {
|
|
13485
13527
|
key: "deactivateUsers",
|
|
13486
13528
|
value: function () {
|
|
13487
|
-
var _deactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13488
|
-
return _regeneratorRuntime.wrap(function
|
|
13529
|
+
var _deactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38(user_ids, options) {
|
|
13530
|
+
return _regeneratorRuntime.wrap(function _callee38$(_context38) {
|
|
13489
13531
|
while (1) {
|
|
13490
|
-
switch (
|
|
13532
|
+
switch (_context38.prev = _context38.next) {
|
|
13491
13533
|
case 0:
|
|
13492
|
-
|
|
13534
|
+
_context38.next = 2;
|
|
13493
13535
|
return this.post(this.baseURL + "/users/deactivate", _objectSpread({
|
|
13494
13536
|
user_ids: user_ids
|
|
13495
13537
|
}, options));
|
|
13496
13538
|
|
|
13497
13539
|
case 2:
|
|
13498
|
-
return
|
|
13540
|
+
return _context38.abrupt("return", _context38.sent);
|
|
13499
13541
|
|
|
13500
13542
|
case 3:
|
|
13501
13543
|
case "end":
|
|
13502
|
-
return
|
|
13544
|
+
return _context38.stop();
|
|
13503
13545
|
}
|
|
13504
13546
|
}
|
|
13505
|
-
},
|
|
13547
|
+
}, _callee38, this);
|
|
13506
13548
|
}));
|
|
13507
13549
|
|
|
13508
|
-
function deactivateUsers(
|
|
13550
|
+
function deactivateUsers(_x45, _x46) {
|
|
13509
13551
|
return _deactivateUsers.apply(this, arguments);
|
|
13510
13552
|
}
|
|
13511
13553
|
|
|
@@ -13514,26 +13556,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13514
13556
|
}, {
|
|
13515
13557
|
key: "exportUser",
|
|
13516
13558
|
value: function () {
|
|
13517
|
-
var _exportUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13518
|
-
return _regeneratorRuntime.wrap(function
|
|
13559
|
+
var _exportUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee39(userID, options) {
|
|
13560
|
+
return _regeneratorRuntime.wrap(function _callee39$(_context39) {
|
|
13519
13561
|
while (1) {
|
|
13520
|
-
switch (
|
|
13562
|
+
switch (_context39.prev = _context39.next) {
|
|
13521
13563
|
case 0:
|
|
13522
|
-
|
|
13564
|
+
_context39.next = 2;
|
|
13523
13565
|
return this.get(this.baseURL + "/users/".concat(encodeURIComponent(userID), "/export"), _objectSpread({}, options));
|
|
13524
13566
|
|
|
13525
13567
|
case 2:
|
|
13526
|
-
return
|
|
13568
|
+
return _context39.abrupt("return", _context39.sent);
|
|
13527
13569
|
|
|
13528
13570
|
case 3:
|
|
13529
13571
|
case "end":
|
|
13530
|
-
return
|
|
13572
|
+
return _context39.stop();
|
|
13531
13573
|
}
|
|
13532
13574
|
}
|
|
13533
|
-
},
|
|
13575
|
+
}, _callee39, this);
|
|
13534
13576
|
}));
|
|
13535
13577
|
|
|
13536
|
-
function exportUser(
|
|
13578
|
+
function exportUser(_x47, _x48) {
|
|
13537
13579
|
return _exportUser.apply(this, arguments);
|
|
13538
13580
|
}
|
|
13539
13581
|
|
|
@@ -13549,28 +13591,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13549
13591
|
}, {
|
|
13550
13592
|
key: "banUser",
|
|
13551
13593
|
value: function () {
|
|
13552
|
-
var _banUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13553
|
-
return _regeneratorRuntime.wrap(function
|
|
13594
|
+
var _banUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee40(targetUserID, options) {
|
|
13595
|
+
return _regeneratorRuntime.wrap(function _callee40$(_context40) {
|
|
13554
13596
|
while (1) {
|
|
13555
|
-
switch (
|
|
13597
|
+
switch (_context40.prev = _context40.next) {
|
|
13556
13598
|
case 0:
|
|
13557
|
-
|
|
13599
|
+
_context40.next = 2;
|
|
13558
13600
|
return this.post(this.baseURL + '/moderation/ban', _objectSpread({
|
|
13559
13601
|
target_user_id: targetUserID
|
|
13560
13602
|
}, options));
|
|
13561
13603
|
|
|
13562
13604
|
case 2:
|
|
13563
|
-
return
|
|
13605
|
+
return _context40.abrupt("return", _context40.sent);
|
|
13564
13606
|
|
|
13565
13607
|
case 3:
|
|
13566
13608
|
case "end":
|
|
13567
|
-
return
|
|
13609
|
+
return _context40.stop();
|
|
13568
13610
|
}
|
|
13569
13611
|
}
|
|
13570
|
-
},
|
|
13612
|
+
}, _callee40, this);
|
|
13571
13613
|
}));
|
|
13572
13614
|
|
|
13573
|
-
function banUser(
|
|
13615
|
+
function banUser(_x49, _x50) {
|
|
13574
13616
|
return _banUser.apply(this, arguments);
|
|
13575
13617
|
}
|
|
13576
13618
|
|
|
@@ -13586,28 +13628,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13586
13628
|
}, {
|
|
13587
13629
|
key: "unbanUser",
|
|
13588
13630
|
value: function () {
|
|
13589
|
-
var _unbanUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13590
|
-
return _regeneratorRuntime.wrap(function
|
|
13631
|
+
var _unbanUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee41(targetUserID, options) {
|
|
13632
|
+
return _regeneratorRuntime.wrap(function _callee41$(_context41) {
|
|
13591
13633
|
while (1) {
|
|
13592
|
-
switch (
|
|
13634
|
+
switch (_context41.prev = _context41.next) {
|
|
13593
13635
|
case 0:
|
|
13594
|
-
|
|
13636
|
+
_context41.next = 2;
|
|
13595
13637
|
return this.delete(this.baseURL + '/moderation/ban', _objectSpread({
|
|
13596
13638
|
target_user_id: targetUserID
|
|
13597
13639
|
}, options));
|
|
13598
13640
|
|
|
13599
13641
|
case 2:
|
|
13600
|
-
return
|
|
13642
|
+
return _context41.abrupt("return", _context41.sent);
|
|
13601
13643
|
|
|
13602
13644
|
case 3:
|
|
13603
13645
|
case "end":
|
|
13604
|
-
return
|
|
13646
|
+
return _context41.stop();
|
|
13605
13647
|
}
|
|
13606
13648
|
}
|
|
13607
|
-
},
|
|
13649
|
+
}, _callee41, this);
|
|
13608
13650
|
}));
|
|
13609
13651
|
|
|
13610
|
-
function unbanUser(
|
|
13652
|
+
function unbanUser(_x51, _x52) {
|
|
13611
13653
|
return _unbanUser.apply(this, arguments);
|
|
13612
13654
|
}
|
|
13613
13655
|
|
|
@@ -13623,28 +13665,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13623
13665
|
}, {
|
|
13624
13666
|
key: "shadowBan",
|
|
13625
13667
|
value: function () {
|
|
13626
|
-
var _shadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13627
|
-
return _regeneratorRuntime.wrap(function
|
|
13668
|
+
var _shadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee42(targetUserID, options) {
|
|
13669
|
+
return _regeneratorRuntime.wrap(function _callee42$(_context42) {
|
|
13628
13670
|
while (1) {
|
|
13629
|
-
switch (
|
|
13671
|
+
switch (_context42.prev = _context42.next) {
|
|
13630
13672
|
case 0:
|
|
13631
|
-
|
|
13673
|
+
_context42.next = 2;
|
|
13632
13674
|
return this.banUser(targetUserID, _objectSpread({
|
|
13633
13675
|
shadow: true
|
|
13634
13676
|
}, options));
|
|
13635
13677
|
|
|
13636
13678
|
case 2:
|
|
13637
|
-
return
|
|
13679
|
+
return _context42.abrupt("return", _context42.sent);
|
|
13638
13680
|
|
|
13639
13681
|
case 3:
|
|
13640
13682
|
case "end":
|
|
13641
|
-
return
|
|
13683
|
+
return _context42.stop();
|
|
13642
13684
|
}
|
|
13643
13685
|
}
|
|
13644
|
-
},
|
|
13686
|
+
}, _callee42, this);
|
|
13645
13687
|
}));
|
|
13646
13688
|
|
|
13647
|
-
function shadowBan(
|
|
13689
|
+
function shadowBan(_x53, _x54) {
|
|
13648
13690
|
return _shadowBan.apply(this, arguments);
|
|
13649
13691
|
}
|
|
13650
13692
|
|
|
@@ -13660,28 +13702,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13660
13702
|
}, {
|
|
13661
13703
|
key: "removeShadowBan",
|
|
13662
13704
|
value: function () {
|
|
13663
|
-
var _removeShadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13664
|
-
return _regeneratorRuntime.wrap(function
|
|
13705
|
+
var _removeShadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43(targetUserID, options) {
|
|
13706
|
+
return _regeneratorRuntime.wrap(function _callee43$(_context43) {
|
|
13665
13707
|
while (1) {
|
|
13666
|
-
switch (
|
|
13708
|
+
switch (_context43.prev = _context43.next) {
|
|
13667
13709
|
case 0:
|
|
13668
|
-
|
|
13710
|
+
_context43.next = 2;
|
|
13669
13711
|
return this.unbanUser(targetUserID, _objectSpread({
|
|
13670
13712
|
shadow: true
|
|
13671
13713
|
}, options));
|
|
13672
13714
|
|
|
13673
13715
|
case 2:
|
|
13674
|
-
return
|
|
13716
|
+
return _context43.abrupt("return", _context43.sent);
|
|
13675
13717
|
|
|
13676
13718
|
case 3:
|
|
13677
13719
|
case "end":
|
|
13678
|
-
return
|
|
13720
|
+
return _context43.stop();
|
|
13679
13721
|
}
|
|
13680
13722
|
}
|
|
13681
|
-
},
|
|
13723
|
+
}, _callee43, this);
|
|
13682
13724
|
}));
|
|
13683
13725
|
|
|
13684
|
-
function removeShadowBan(
|
|
13726
|
+
function removeShadowBan(_x55, _x56) {
|
|
13685
13727
|
return _removeShadowBan.apply(this, arguments);
|
|
13686
13728
|
}
|
|
13687
13729
|
|
|
@@ -13690,12 +13732,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13690
13732
|
}, {
|
|
13691
13733
|
key: "blockUser",
|
|
13692
13734
|
value: function () {
|
|
13693
|
-
var _blockUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13694
|
-
return _regeneratorRuntime.wrap(function
|
|
13735
|
+
var _blockUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(blockedUserID, user_id) {
|
|
13736
|
+
return _regeneratorRuntime.wrap(function _callee44$(_context44) {
|
|
13695
13737
|
while (1) {
|
|
13696
|
-
switch (
|
|
13738
|
+
switch (_context44.prev = _context44.next) {
|
|
13697
13739
|
case 0:
|
|
13698
|
-
|
|
13740
|
+
_context44.next = 2;
|
|
13699
13741
|
return this.post(this.baseURL + '/users/block', _objectSpread({
|
|
13700
13742
|
blocked_user_id: blockedUserID
|
|
13701
13743
|
}, user_id ? {
|
|
@@ -13703,17 +13745,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13703
13745
|
} : {}));
|
|
13704
13746
|
|
|
13705
13747
|
case 2:
|
|
13706
|
-
return
|
|
13748
|
+
return _context44.abrupt("return", _context44.sent);
|
|
13707
13749
|
|
|
13708
13750
|
case 3:
|
|
13709
13751
|
case "end":
|
|
13710
|
-
return
|
|
13752
|
+
return _context44.stop();
|
|
13711
13753
|
}
|
|
13712
13754
|
}
|
|
13713
|
-
},
|
|
13755
|
+
}, _callee44, this);
|
|
13714
13756
|
}));
|
|
13715
13757
|
|
|
13716
|
-
function blockUser(
|
|
13758
|
+
function blockUser(_x57, _x58) {
|
|
13717
13759
|
return _blockUser.apply(this, arguments);
|
|
13718
13760
|
}
|
|
13719
13761
|
|
|
@@ -13722,28 +13764,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13722
13764
|
}, {
|
|
13723
13765
|
key: "getBlockedUsers",
|
|
13724
13766
|
value: function () {
|
|
13725
|
-
var _getBlockedUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13726
|
-
return _regeneratorRuntime.wrap(function
|
|
13767
|
+
var _getBlockedUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(user_id) {
|
|
13768
|
+
return _regeneratorRuntime.wrap(function _callee45$(_context45) {
|
|
13727
13769
|
while (1) {
|
|
13728
|
-
switch (
|
|
13770
|
+
switch (_context45.prev = _context45.next) {
|
|
13729
13771
|
case 0:
|
|
13730
|
-
|
|
13772
|
+
_context45.next = 2;
|
|
13731
13773
|
return this.get(this.baseURL + '/users/block', _objectSpread({}, user_id ? {
|
|
13732
13774
|
user_id: user_id
|
|
13733
13775
|
} : {}));
|
|
13734
13776
|
|
|
13735
13777
|
case 2:
|
|
13736
|
-
return
|
|
13778
|
+
return _context45.abrupt("return", _context45.sent);
|
|
13737
13779
|
|
|
13738
13780
|
case 3:
|
|
13739
13781
|
case "end":
|
|
13740
|
-
return
|
|
13782
|
+
return _context45.stop();
|
|
13741
13783
|
}
|
|
13742
13784
|
}
|
|
13743
|
-
},
|
|
13785
|
+
}, _callee45, this);
|
|
13744
13786
|
}));
|
|
13745
13787
|
|
|
13746
|
-
function getBlockedUsers(
|
|
13788
|
+
function getBlockedUsers(_x59) {
|
|
13747
13789
|
return _getBlockedUsers.apply(this, arguments);
|
|
13748
13790
|
}
|
|
13749
13791
|
|
|
@@ -13752,12 +13794,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13752
13794
|
}, {
|
|
13753
13795
|
key: "unBlockUser",
|
|
13754
13796
|
value: function () {
|
|
13755
|
-
var _unBlockUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13756
|
-
return _regeneratorRuntime.wrap(function
|
|
13797
|
+
var _unBlockUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(blockedUserID, userID) {
|
|
13798
|
+
return _regeneratorRuntime.wrap(function _callee46$(_context46) {
|
|
13757
13799
|
while (1) {
|
|
13758
|
-
switch (
|
|
13800
|
+
switch (_context46.prev = _context46.next) {
|
|
13759
13801
|
case 0:
|
|
13760
|
-
|
|
13802
|
+
_context46.next = 2;
|
|
13761
13803
|
return this.post(this.baseURL + '/users/unblock', _objectSpread({
|
|
13762
13804
|
blocked_user_id: blockedUserID
|
|
13763
13805
|
}, userID ? {
|
|
@@ -13765,17 +13807,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13765
13807
|
} : {}));
|
|
13766
13808
|
|
|
13767
13809
|
case 2:
|
|
13768
|
-
return
|
|
13810
|
+
return _context46.abrupt("return", _context46.sent);
|
|
13769
13811
|
|
|
13770
13812
|
case 3:
|
|
13771
13813
|
case "end":
|
|
13772
|
-
return
|
|
13814
|
+
return _context46.stop();
|
|
13773
13815
|
}
|
|
13774
13816
|
}
|
|
13775
|
-
},
|
|
13817
|
+
}, _callee46, this);
|
|
13776
13818
|
}));
|
|
13777
13819
|
|
|
13778
|
-
function unBlockUser(
|
|
13820
|
+
function unBlockUser(_x60, _x61) {
|
|
13779
13821
|
return _unBlockUser.apply(this, arguments);
|
|
13780
13822
|
}
|
|
13781
13823
|
|
|
@@ -13792,15 +13834,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13792
13834
|
}, {
|
|
13793
13835
|
key: "muteUser",
|
|
13794
13836
|
value: function () {
|
|
13795
|
-
var _muteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13837
|
+
var _muteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47(targetID, userID) {
|
|
13796
13838
|
var options,
|
|
13797
|
-
|
|
13798
|
-
return _regeneratorRuntime.wrap(function
|
|
13839
|
+
_args47 = arguments;
|
|
13840
|
+
return _regeneratorRuntime.wrap(function _callee47$(_context47) {
|
|
13799
13841
|
while (1) {
|
|
13800
|
-
switch (
|
|
13842
|
+
switch (_context47.prev = _context47.next) {
|
|
13801
13843
|
case 0:
|
|
13802
|
-
options =
|
|
13803
|
-
|
|
13844
|
+
options = _args47.length > 2 && _args47[2] !== undefined ? _args47[2] : {};
|
|
13845
|
+
_context47.next = 3;
|
|
13804
13846
|
return this.post(this.baseURL + '/moderation/mute', _objectSpread(_objectSpread({
|
|
13805
13847
|
target_id: targetID
|
|
13806
13848
|
}, userID ? {
|
|
@@ -13808,17 +13850,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13808
13850
|
} : {}), options));
|
|
13809
13851
|
|
|
13810
13852
|
case 3:
|
|
13811
|
-
return
|
|
13853
|
+
return _context47.abrupt("return", _context47.sent);
|
|
13812
13854
|
|
|
13813
13855
|
case 4:
|
|
13814
13856
|
case "end":
|
|
13815
|
-
return
|
|
13857
|
+
return _context47.stop();
|
|
13816
13858
|
}
|
|
13817
13859
|
}
|
|
13818
|
-
},
|
|
13860
|
+
}, _callee47, this);
|
|
13819
13861
|
}));
|
|
13820
13862
|
|
|
13821
|
-
function muteUser(
|
|
13863
|
+
function muteUser(_x62, _x63) {
|
|
13822
13864
|
return _muteUser.apply(this, arguments);
|
|
13823
13865
|
}
|
|
13824
13866
|
|
|
@@ -13834,12 +13876,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13834
13876
|
}, {
|
|
13835
13877
|
key: "unmuteUser",
|
|
13836
13878
|
value: function () {
|
|
13837
|
-
var _unmuteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13838
|
-
return _regeneratorRuntime.wrap(function
|
|
13879
|
+
var _unmuteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(targetID, currentUserID) {
|
|
13880
|
+
return _regeneratorRuntime.wrap(function _callee48$(_context48) {
|
|
13839
13881
|
while (1) {
|
|
13840
|
-
switch (
|
|
13882
|
+
switch (_context48.prev = _context48.next) {
|
|
13841
13883
|
case 0:
|
|
13842
|
-
|
|
13884
|
+
_context48.next = 2;
|
|
13843
13885
|
return this.post(this.baseURL + '/moderation/unmute', _objectSpread({
|
|
13844
13886
|
target_id: targetID
|
|
13845
13887
|
}, currentUserID ? {
|
|
@@ -13847,17 +13889,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13847
13889
|
} : {}));
|
|
13848
13890
|
|
|
13849
13891
|
case 2:
|
|
13850
|
-
return
|
|
13892
|
+
return _context48.abrupt("return", _context48.sent);
|
|
13851
13893
|
|
|
13852
13894
|
case 3:
|
|
13853
13895
|
case "end":
|
|
13854
|
-
return
|
|
13896
|
+
return _context48.stop();
|
|
13855
13897
|
}
|
|
13856
13898
|
}
|
|
13857
|
-
},
|
|
13899
|
+
}, _callee48, this);
|
|
13858
13900
|
}));
|
|
13859
13901
|
|
|
13860
|
-
function unmuteUser(
|
|
13902
|
+
function unmuteUser(_x64, _x65) {
|
|
13861
13903
|
return _unmuteUser.apply(this, arguments);
|
|
13862
13904
|
}
|
|
13863
13905
|
|
|
@@ -13892,31 +13934,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13892
13934
|
}, {
|
|
13893
13935
|
key: "flagMessage",
|
|
13894
13936
|
value: function () {
|
|
13895
|
-
var _flagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13937
|
+
var _flagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(targetMessageID) {
|
|
13896
13938
|
var options,
|
|
13897
|
-
|
|
13898
|
-
return _regeneratorRuntime.wrap(function
|
|
13939
|
+
_args49 = arguments;
|
|
13940
|
+
return _regeneratorRuntime.wrap(function _callee49$(_context49) {
|
|
13899
13941
|
while (1) {
|
|
13900
|
-
switch (
|
|
13942
|
+
switch (_context49.prev = _context49.next) {
|
|
13901
13943
|
case 0:
|
|
13902
|
-
options =
|
|
13903
|
-
|
|
13944
|
+
options = _args49.length > 1 && _args49[1] !== undefined ? _args49[1] : {};
|
|
13945
|
+
_context49.next = 3;
|
|
13904
13946
|
return this.post(this.baseURL + '/moderation/flag', _objectSpread({
|
|
13905
13947
|
target_message_id: targetMessageID
|
|
13906
13948
|
}, options));
|
|
13907
13949
|
|
|
13908
13950
|
case 3:
|
|
13909
|
-
return
|
|
13951
|
+
return _context49.abrupt("return", _context49.sent);
|
|
13910
13952
|
|
|
13911
13953
|
case 4:
|
|
13912
13954
|
case "end":
|
|
13913
|
-
return
|
|
13955
|
+
return _context49.stop();
|
|
13914
13956
|
}
|
|
13915
13957
|
}
|
|
13916
|
-
},
|
|
13958
|
+
}, _callee49, this);
|
|
13917
13959
|
}));
|
|
13918
13960
|
|
|
13919
|
-
function flagMessage(
|
|
13961
|
+
function flagMessage(_x66) {
|
|
13920
13962
|
return _flagMessage.apply(this, arguments);
|
|
13921
13963
|
}
|
|
13922
13964
|
|
|
@@ -13932,31 +13974,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13932
13974
|
}, {
|
|
13933
13975
|
key: "flagUser",
|
|
13934
13976
|
value: function () {
|
|
13935
|
-
var _flagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13977
|
+
var _flagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50(targetID) {
|
|
13936
13978
|
var options,
|
|
13937
|
-
|
|
13938
|
-
return _regeneratorRuntime.wrap(function
|
|
13979
|
+
_args50 = arguments;
|
|
13980
|
+
return _regeneratorRuntime.wrap(function _callee50$(_context50) {
|
|
13939
13981
|
while (1) {
|
|
13940
|
-
switch (
|
|
13982
|
+
switch (_context50.prev = _context50.next) {
|
|
13941
13983
|
case 0:
|
|
13942
|
-
options =
|
|
13943
|
-
|
|
13984
|
+
options = _args50.length > 1 && _args50[1] !== undefined ? _args50[1] : {};
|
|
13985
|
+
_context50.next = 3;
|
|
13944
13986
|
return this.post(this.baseURL + '/moderation/flag', _objectSpread({
|
|
13945
13987
|
target_user_id: targetID
|
|
13946
13988
|
}, options));
|
|
13947
13989
|
|
|
13948
13990
|
case 3:
|
|
13949
|
-
return
|
|
13991
|
+
return _context50.abrupt("return", _context50.sent);
|
|
13950
13992
|
|
|
13951
13993
|
case 4:
|
|
13952
13994
|
case "end":
|
|
13953
|
-
return
|
|
13995
|
+
return _context50.stop();
|
|
13954
13996
|
}
|
|
13955
13997
|
}
|
|
13956
|
-
},
|
|
13998
|
+
}, _callee50, this);
|
|
13957
13999
|
}));
|
|
13958
14000
|
|
|
13959
|
-
function flagUser(
|
|
14001
|
+
function flagUser(_x67) {
|
|
13960
14002
|
return _flagUser.apply(this, arguments);
|
|
13961
14003
|
}
|
|
13962
14004
|
|
|
@@ -13972,31 +14014,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13972
14014
|
}, {
|
|
13973
14015
|
key: "unflagMessage",
|
|
13974
14016
|
value: function () {
|
|
13975
|
-
var _unflagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
14017
|
+
var _unflagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51(targetMessageID) {
|
|
13976
14018
|
var options,
|
|
13977
|
-
|
|
13978
|
-
return _regeneratorRuntime.wrap(function
|
|
14019
|
+
_args51 = arguments;
|
|
14020
|
+
return _regeneratorRuntime.wrap(function _callee51$(_context51) {
|
|
13979
14021
|
while (1) {
|
|
13980
|
-
switch (
|
|
14022
|
+
switch (_context51.prev = _context51.next) {
|
|
13981
14023
|
case 0:
|
|
13982
|
-
options =
|
|
13983
|
-
|
|
14024
|
+
options = _args51.length > 1 && _args51[1] !== undefined ? _args51[1] : {};
|
|
14025
|
+
_context51.next = 3;
|
|
13984
14026
|
return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
|
|
13985
14027
|
target_message_id: targetMessageID
|
|
13986
14028
|
}, options));
|
|
13987
14029
|
|
|
13988
14030
|
case 3:
|
|
13989
|
-
return
|
|
14031
|
+
return _context51.abrupt("return", _context51.sent);
|
|
13990
14032
|
|
|
13991
14033
|
case 4:
|
|
13992
14034
|
case "end":
|
|
13993
|
-
return
|
|
14035
|
+
return _context51.stop();
|
|
13994
14036
|
}
|
|
13995
14037
|
}
|
|
13996
|
-
},
|
|
14038
|
+
}, _callee51, this);
|
|
13997
14039
|
}));
|
|
13998
14040
|
|
|
13999
|
-
function unflagMessage(
|
|
14041
|
+
function unflagMessage(_x68) {
|
|
14000
14042
|
return _unflagMessage.apply(this, arguments);
|
|
14001
14043
|
}
|
|
14002
14044
|
|
|
@@ -14012,31 +14054,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14012
14054
|
}, {
|
|
14013
14055
|
key: "unflagUser",
|
|
14014
14056
|
value: function () {
|
|
14015
|
-
var _unflagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
14057
|
+
var _unflagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(targetID) {
|
|
14016
14058
|
var options,
|
|
14017
|
-
|
|
14018
|
-
return _regeneratorRuntime.wrap(function
|
|
14059
|
+
_args52 = arguments;
|
|
14060
|
+
return _regeneratorRuntime.wrap(function _callee52$(_context52) {
|
|
14019
14061
|
while (1) {
|
|
14020
|
-
switch (
|
|
14062
|
+
switch (_context52.prev = _context52.next) {
|
|
14021
14063
|
case 0:
|
|
14022
|
-
options =
|
|
14023
|
-
|
|
14064
|
+
options = _args52.length > 1 && _args52[1] !== undefined ? _args52[1] : {};
|
|
14065
|
+
_context52.next = 3;
|
|
14024
14066
|
return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
|
|
14025
14067
|
target_user_id: targetID
|
|
14026
14068
|
}, options));
|
|
14027
14069
|
|
|
14028
14070
|
case 3:
|
|
14029
|
-
return
|
|
14071
|
+
return _context52.abrupt("return", _context52.sent);
|
|
14030
14072
|
|
|
14031
14073
|
case 4:
|
|
14032
14074
|
case "end":
|
|
14033
|
-
return
|
|
14075
|
+
return _context52.stop();
|
|
14034
14076
|
}
|
|
14035
14077
|
}
|
|
14036
|
-
},
|
|
14078
|
+
}, _callee52, this);
|
|
14037
14079
|
}));
|
|
14038
14080
|
|
|
14039
|
-
function unflagUser(
|
|
14081
|
+
function unflagUser(_x69) {
|
|
14040
14082
|
return _unflagUser.apply(this, arguments);
|
|
14041
14083
|
}
|
|
14042
14084
|
|
|
@@ -14053,29 +14095,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14053
14095
|
}, {
|
|
14054
14096
|
key: "getCallToken",
|
|
14055
14097
|
value: function () {
|
|
14056
|
-
var _getCallToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
14098
|
+
var _getCallToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53(callID) {
|
|
14057
14099
|
var options,
|
|
14058
|
-
|
|
14059
|
-
return _regeneratorRuntime.wrap(function
|
|
14100
|
+
_args53 = arguments;
|
|
14101
|
+
return _regeneratorRuntime.wrap(function _callee53$(_context53) {
|
|
14060
14102
|
while (1) {
|
|
14061
|
-
switch (
|
|
14103
|
+
switch (_context53.prev = _context53.next) {
|
|
14062
14104
|
case 0:
|
|
14063
|
-
options =
|
|
14064
|
-
|
|
14105
|
+
options = _args53.length > 1 && _args53[1] !== undefined ? _args53[1] : {};
|
|
14106
|
+
_context53.next = 3;
|
|
14065
14107
|
return this.post(this.baseURL + "/calls/".concat(encodeURIComponent(callID)), _objectSpread({}, options));
|
|
14066
14108
|
|
|
14067
14109
|
case 3:
|
|
14068
|
-
return
|
|
14110
|
+
return _context53.abrupt("return", _context53.sent);
|
|
14069
14111
|
|
|
14070
14112
|
case 4:
|
|
14071
14113
|
case "end":
|
|
14072
|
-
return
|
|
14114
|
+
return _context53.stop();
|
|
14073
14115
|
}
|
|
14074
14116
|
}
|
|
14075
|
-
},
|
|
14117
|
+
}, _callee53, this);
|
|
14076
14118
|
}));
|
|
14077
14119
|
|
|
14078
|
-
function getCallToken(
|
|
14120
|
+
function getCallToken(_x70) {
|
|
14079
14121
|
return _getCallToken.apply(this, arguments);
|
|
14080
14122
|
}
|
|
14081
14123
|
|
|
@@ -14098,30 +14140,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14098
14140
|
}, {
|
|
14099
14141
|
key: "_queryFlags",
|
|
14100
14142
|
value: function () {
|
|
14101
|
-
var _queryFlags2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
14143
|
+
var _queryFlags2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54() {
|
|
14102
14144
|
var filterConditions,
|
|
14103
14145
|
options,
|
|
14104
|
-
|
|
14105
|
-
return _regeneratorRuntime.wrap(function
|
|
14146
|
+
_args54 = arguments;
|
|
14147
|
+
return _regeneratorRuntime.wrap(function _callee54$(_context54) {
|
|
14106
14148
|
while (1) {
|
|
14107
|
-
switch (
|
|
14149
|
+
switch (_context54.prev = _context54.next) {
|
|
14108
14150
|
case 0:
|
|
14109
|
-
filterConditions =
|
|
14110
|
-
options =
|
|
14111
|
-
|
|
14151
|
+
filterConditions = _args54.length > 0 && _args54[0] !== undefined ? _args54[0] : {};
|
|
14152
|
+
options = _args54.length > 1 && _args54[1] !== undefined ? _args54[1] : {};
|
|
14153
|
+
_context54.next = 4;
|
|
14112
14154
|
return this.post(this.baseURL + '/moderation/flags', _objectSpread({
|
|
14113
14155
|
filter_conditions: filterConditions
|
|
14114
14156
|
}, options));
|
|
14115
14157
|
|
|
14116
14158
|
case 4:
|
|
14117
|
-
return
|
|
14159
|
+
return _context54.abrupt("return", _context54.sent);
|
|
14118
14160
|
|
|
14119
14161
|
case 5:
|
|
14120
14162
|
case "end":
|
|
14121
|
-
return
|
|
14163
|
+
return _context54.stop();
|
|
14122
14164
|
}
|
|
14123
14165
|
}
|
|
14124
|
-
},
|
|
14166
|
+
}, _callee54, this);
|
|
14125
14167
|
}));
|
|
14126
14168
|
|
|
14127
14169
|
function _queryFlags() {
|
|
@@ -14147,30 +14189,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14147
14189
|
}, {
|
|
14148
14190
|
key: "_queryFlagReports",
|
|
14149
14191
|
value: function () {
|
|
14150
|
-
var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
14192
|
+
var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55() {
|
|
14151
14193
|
var filterConditions,
|
|
14152
14194
|
options,
|
|
14153
|
-
|
|
14154
|
-
return _regeneratorRuntime.wrap(function
|
|
14195
|
+
_args55 = arguments;
|
|
14196
|
+
return _regeneratorRuntime.wrap(function _callee55$(_context55) {
|
|
14155
14197
|
while (1) {
|
|
14156
|
-
switch (
|
|
14198
|
+
switch (_context55.prev = _context55.next) {
|
|
14157
14199
|
case 0:
|
|
14158
|
-
filterConditions =
|
|
14159
|
-
options =
|
|
14160
|
-
|
|
14200
|
+
filterConditions = _args55.length > 0 && _args55[0] !== undefined ? _args55[0] : {};
|
|
14201
|
+
options = _args55.length > 1 && _args55[1] !== undefined ? _args55[1] : {};
|
|
14202
|
+
_context55.next = 4;
|
|
14161
14203
|
return this.post(this.baseURL + '/moderation/reports', _objectSpread({
|
|
14162
14204
|
filter_conditions: filterConditions
|
|
14163
14205
|
}, options));
|
|
14164
14206
|
|
|
14165
14207
|
case 4:
|
|
14166
|
-
return
|
|
14208
|
+
return _context55.abrupt("return", _context55.sent);
|
|
14167
14209
|
|
|
14168
14210
|
case 5:
|
|
14169
14211
|
case "end":
|
|
14170
|
-
return
|
|
14212
|
+
return _context55.stop();
|
|
14171
14213
|
}
|
|
14172
14214
|
}
|
|
14173
|
-
},
|
|
14215
|
+
}, _callee55, this);
|
|
14174
14216
|
}));
|
|
14175
14217
|
|
|
14176
14218
|
function _queryFlagReports() {
|
|
@@ -14197,31 +14239,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14197
14239
|
}, {
|
|
14198
14240
|
key: "_reviewFlagReport",
|
|
14199
14241
|
value: function () {
|
|
14200
|
-
var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
14242
|
+
var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(id, reviewResult) {
|
|
14201
14243
|
var options,
|
|
14202
|
-
|
|
14203
|
-
return _regeneratorRuntime.wrap(function
|
|
14244
|
+
_args56 = arguments;
|
|
14245
|
+
return _regeneratorRuntime.wrap(function _callee56$(_context56) {
|
|
14204
14246
|
while (1) {
|
|
14205
|
-
switch (
|
|
14247
|
+
switch (_context56.prev = _context56.next) {
|
|
14206
14248
|
case 0:
|
|
14207
|
-
options =
|
|
14208
|
-
|
|
14249
|
+
options = _args56.length > 2 && _args56[2] !== undefined ? _args56[2] : {};
|
|
14250
|
+
_context56.next = 3;
|
|
14209
14251
|
return this.patch(this.baseURL + "/moderation/reports/".concat(encodeURIComponent(id)), _objectSpread({
|
|
14210
14252
|
review_result: reviewResult
|
|
14211
14253
|
}, options));
|
|
14212
14254
|
|
|
14213
14255
|
case 3:
|
|
14214
|
-
return
|
|
14256
|
+
return _context56.abrupt("return", _context56.sent);
|
|
14215
14257
|
|
|
14216
14258
|
case 4:
|
|
14217
14259
|
case "end":
|
|
14218
|
-
return
|
|
14260
|
+
return _context56.stop();
|
|
14219
14261
|
}
|
|
14220
14262
|
}
|
|
14221
|
-
},
|
|
14263
|
+
}, _callee56, this);
|
|
14222
14264
|
}));
|
|
14223
14265
|
|
|
14224
|
-
function _reviewFlagReport(
|
|
14266
|
+
function _reviewFlagReport(_x71, _x72) {
|
|
14225
14267
|
return _reviewFlagReport2.apply(this, arguments);
|
|
14226
14268
|
}
|
|
14227
14269
|
|
|
@@ -14239,31 +14281,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14239
14281
|
}, {
|
|
14240
14282
|
key: "unblockMessage",
|
|
14241
14283
|
value: function () {
|
|
14242
|
-
var _unblockMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
14284
|
+
var _unblockMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(targetMessageID) {
|
|
14243
14285
|
var options,
|
|
14244
|
-
|
|
14245
|
-
return _regeneratorRuntime.wrap(function
|
|
14286
|
+
_args57 = arguments;
|
|
14287
|
+
return _regeneratorRuntime.wrap(function _callee57$(_context57) {
|
|
14246
14288
|
while (1) {
|
|
14247
|
-
switch (
|
|
14289
|
+
switch (_context57.prev = _context57.next) {
|
|
14248
14290
|
case 0:
|
|
14249
|
-
options =
|
|
14250
|
-
|
|
14291
|
+
options = _args57.length > 1 && _args57[1] !== undefined ? _args57[1] : {};
|
|
14292
|
+
_context57.next = 3;
|
|
14251
14293
|
return this.post(this.baseURL + '/moderation/unblock_message', _objectSpread({
|
|
14252
14294
|
target_message_id: targetMessageID
|
|
14253
14295
|
}, options));
|
|
14254
14296
|
|
|
14255
14297
|
case 3:
|
|
14256
|
-
return
|
|
14298
|
+
return _context57.abrupt("return", _context57.sent);
|
|
14257
14299
|
|
|
14258
14300
|
case 4:
|
|
14259
14301
|
case "end":
|
|
14260
|
-
return
|
|
14302
|
+
return _context57.stop();
|
|
14261
14303
|
}
|
|
14262
14304
|
}
|
|
14263
|
-
},
|
|
14305
|
+
}, _callee57, this);
|
|
14264
14306
|
}));
|
|
14265
14307
|
|
|
14266
|
-
function unblockMessage(
|
|
14308
|
+
function unblockMessage(_x73) {
|
|
14267
14309
|
return _unblockMessage.apply(this, arguments);
|
|
14268
14310
|
}
|
|
14269
14311
|
|
|
@@ -14282,23 +14324,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14282
14324
|
* @return {Promise<APIResponse>}
|
|
14283
14325
|
*/
|
|
14284
14326
|
function () {
|
|
14285
|
-
var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
14327
|
+
var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58() {
|
|
14286
14328
|
var data,
|
|
14287
|
-
|
|
14288
|
-
return _regeneratorRuntime.wrap(function
|
|
14329
|
+
_args58 = arguments;
|
|
14330
|
+
return _regeneratorRuntime.wrap(function _callee58$(_context58) {
|
|
14289
14331
|
while (1) {
|
|
14290
|
-
switch (
|
|
14332
|
+
switch (_context58.prev = _context58.next) {
|
|
14291
14333
|
case 0:
|
|
14292
|
-
data =
|
|
14293
|
-
|
|
14334
|
+
data = _args58.length > 0 && _args58[0] !== undefined ? _args58[0] : {};
|
|
14335
|
+
_context58.next = 3;
|
|
14294
14336
|
return this.post(this.baseURL + '/channels/read', _objectSpread({}, data));
|
|
14295
14337
|
|
|
14296
14338
|
case 3:
|
|
14297
14339
|
case "end":
|
|
14298
|
-
return
|
|
14340
|
+
return _context58.stop();
|
|
14299
14341
|
}
|
|
14300
14342
|
}
|
|
14301
|
-
},
|
|
14343
|
+
}, _callee58, this);
|
|
14302
14344
|
}));
|
|
14303
14345
|
|
|
14304
14346
|
function markChannelsRead() {
|
|
@@ -14373,28 +14415,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14373
14415
|
}, {
|
|
14374
14416
|
key: "translateMessage",
|
|
14375
14417
|
value: function () {
|
|
14376
|
-
var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
14377
|
-
return _regeneratorRuntime.wrap(function
|
|
14418
|
+
var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(messageId, language) {
|
|
14419
|
+
return _regeneratorRuntime.wrap(function _callee59$(_context59) {
|
|
14378
14420
|
while (1) {
|
|
14379
|
-
switch (
|
|
14421
|
+
switch (_context59.prev = _context59.next) {
|
|
14380
14422
|
case 0:
|
|
14381
|
-
|
|
14423
|
+
_context59.next = 2;
|
|
14382
14424
|
return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(messageId), "/translate"), {
|
|
14383
14425
|
language: language
|
|
14384
14426
|
});
|
|
14385
14427
|
|
|
14386
14428
|
case 2:
|
|
14387
|
-
return
|
|
14429
|
+
return _context59.abrupt("return", _context59.sent);
|
|
14388
14430
|
|
|
14389
14431
|
case 3:
|
|
14390
14432
|
case "end":
|
|
14391
|
-
return
|
|
14433
|
+
return _context59.stop();
|
|
14392
14434
|
}
|
|
14393
14435
|
}
|
|
14394
|
-
},
|
|
14436
|
+
}, _callee59, this);
|
|
14395
14437
|
}));
|
|
14396
14438
|
|
|
14397
|
-
function translateMessage(
|
|
14439
|
+
function translateMessage(_x74, _x75) {
|
|
14398
14440
|
return _translateMessage.apply(this, arguments);
|
|
14399
14441
|
}
|
|
14400
14442
|
|
|
@@ -14413,12 +14455,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14413
14455
|
}, {
|
|
14414
14456
|
key: "translate",
|
|
14415
14457
|
value: function () {
|
|
14416
|
-
var _translate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
14417
|
-
return _regeneratorRuntime.wrap(function
|
|
14458
|
+
var _translate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(text, destination_language, source_language) {
|
|
14459
|
+
return _regeneratorRuntime.wrap(function _callee60$(_context60) {
|
|
14418
14460
|
while (1) {
|
|
14419
|
-
switch (
|
|
14461
|
+
switch (_context60.prev = _context60.next) {
|
|
14420
14462
|
case 0:
|
|
14421
|
-
|
|
14463
|
+
_context60.next = 2;
|
|
14422
14464
|
return this.post(this.baseURL + "/translate", {
|
|
14423
14465
|
text: text,
|
|
14424
14466
|
source_language: source_language,
|
|
@@ -14426,17 +14468,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14426
14468
|
});
|
|
14427
14469
|
|
|
14428
14470
|
case 2:
|
|
14429
|
-
return
|
|
14471
|
+
return _context60.abrupt("return", _context60.sent);
|
|
14430
14472
|
|
|
14431
14473
|
case 3:
|
|
14432
14474
|
case "end":
|
|
14433
|
-
return
|
|
14475
|
+
return _context60.stop();
|
|
14434
14476
|
}
|
|
14435
14477
|
}
|
|
14436
|
-
},
|
|
14478
|
+
}, _callee60, this);
|
|
14437
14479
|
}));
|
|
14438
14480
|
|
|
14439
|
-
function translate(
|
|
14481
|
+
function translate(_x76, _x77, _x78) {
|
|
14440
14482
|
return _translate.apply(this, arguments);
|
|
14441
14483
|
}
|
|
14442
14484
|
|
|
@@ -14538,14 +14580,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14538
14580
|
}, {
|
|
14539
14581
|
key: "updateMessage",
|
|
14540
14582
|
value: function () {
|
|
14541
|
-
var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
14583
|
+
var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(message, userId, options) {
|
|
14542
14584
|
var clonedMessage, reservedMessageFields;
|
|
14543
|
-
return _regeneratorRuntime.wrap(function
|
|
14585
|
+
return _regeneratorRuntime.wrap(function _callee61$(_context61) {
|
|
14544
14586
|
while (1) {
|
|
14545
|
-
switch (
|
|
14587
|
+
switch (_context61.prev = _context61.next) {
|
|
14546
14588
|
case 0:
|
|
14547
14589
|
if (message.id) {
|
|
14548
|
-
|
|
14590
|
+
_context61.next = 2;
|
|
14549
14591
|
break;
|
|
14550
14592
|
}
|
|
14551
14593
|
|
|
@@ -14582,23 +14624,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14582
14624
|
});
|
|
14583
14625
|
}
|
|
14584
14626
|
|
|
14585
|
-
|
|
14627
|
+
_context61.next = 10;
|
|
14586
14628
|
return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(message.id)), _objectSpread({
|
|
14587
14629
|
message: clonedMessage
|
|
14588
14630
|
}, options));
|
|
14589
14631
|
|
|
14590
14632
|
case 10:
|
|
14591
|
-
return
|
|
14633
|
+
return _context61.abrupt("return", _context61.sent);
|
|
14592
14634
|
|
|
14593
14635
|
case 11:
|
|
14594
14636
|
case "end":
|
|
14595
|
-
return
|
|
14637
|
+
return _context61.stop();
|
|
14596
14638
|
}
|
|
14597
14639
|
}
|
|
14598
|
-
},
|
|
14640
|
+
}, _callee61, this);
|
|
14599
14641
|
}));
|
|
14600
14642
|
|
|
14601
|
-
function updateMessage(
|
|
14643
|
+
function updateMessage(_x79, _x80, _x81) {
|
|
14602
14644
|
return _updateMessage.apply(this, arguments);
|
|
14603
14645
|
}
|
|
14604
14646
|
|
|
@@ -14621,14 +14663,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14621
14663
|
}, {
|
|
14622
14664
|
key: "partialUpdateMessage",
|
|
14623
14665
|
value: function () {
|
|
14624
|
-
var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
14666
|
+
var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(id, partialMessageObject, userId, options) {
|
|
14625
14667
|
var user;
|
|
14626
|
-
return _regeneratorRuntime.wrap(function
|
|
14668
|
+
return _regeneratorRuntime.wrap(function _callee62$(_context62) {
|
|
14627
14669
|
while (1) {
|
|
14628
|
-
switch (
|
|
14670
|
+
switch (_context62.prev = _context62.next) {
|
|
14629
14671
|
case 0:
|
|
14630
14672
|
if (id) {
|
|
14631
|
-
|
|
14673
|
+
_context62.next = 2;
|
|
14632
14674
|
break;
|
|
14633
14675
|
}
|
|
14634
14676
|
|
|
@@ -14643,23 +14685,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14643
14685
|
};
|
|
14644
14686
|
}
|
|
14645
14687
|
|
|
14646
|
-
|
|
14688
|
+
_context62.next = 6;
|
|
14647
14689
|
return this.put(this.baseURL + "/messages/".concat(encodeURIComponent(id)), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
|
|
14648
14690
|
user: user
|
|
14649
14691
|
}));
|
|
14650
14692
|
|
|
14651
14693
|
case 6:
|
|
14652
|
-
return
|
|
14694
|
+
return _context62.abrupt("return", _context62.sent);
|
|
14653
14695
|
|
|
14654
14696
|
case 7:
|
|
14655
14697
|
case "end":
|
|
14656
|
-
return
|
|
14698
|
+
return _context62.stop();
|
|
14657
14699
|
}
|
|
14658
14700
|
}
|
|
14659
|
-
},
|
|
14701
|
+
}, _callee62, this);
|
|
14660
14702
|
}));
|
|
14661
14703
|
|
|
14662
|
-
function partialUpdateMessage(
|
|
14704
|
+
function partialUpdateMessage(_x82, _x83, _x84, _x85) {
|
|
14663
14705
|
return _partialUpdateMessage.apply(this, arguments);
|
|
14664
14706
|
}
|
|
14665
14707
|
|
|
@@ -14668,11 +14710,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14668
14710
|
}, {
|
|
14669
14711
|
key: "deleteMessage",
|
|
14670
14712
|
value: function () {
|
|
14671
|
-
var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
14713
|
+
var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(messageID, hardDelete) {
|
|
14672
14714
|
var params;
|
|
14673
|
-
return _regeneratorRuntime.wrap(function
|
|
14715
|
+
return _regeneratorRuntime.wrap(function _callee63$(_context63) {
|
|
14674
14716
|
while (1) {
|
|
14675
|
-
switch (
|
|
14717
|
+
switch (_context63.prev = _context63.next) {
|
|
14676
14718
|
case 0:
|
|
14677
14719
|
params = {};
|
|
14678
14720
|
|
|
@@ -14682,21 +14724,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14682
14724
|
};
|
|
14683
14725
|
}
|
|
14684
14726
|
|
|
14685
|
-
|
|
14727
|
+
_context63.next = 4;
|
|
14686
14728
|
return this.delete(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)), params);
|
|
14687
14729
|
|
|
14688
14730
|
case 4:
|
|
14689
|
-
return
|
|
14731
|
+
return _context63.abrupt("return", _context63.sent);
|
|
14690
14732
|
|
|
14691
14733
|
case 5:
|
|
14692
14734
|
case "end":
|
|
14693
|
-
return
|
|
14735
|
+
return _context63.stop();
|
|
14694
14736
|
}
|
|
14695
14737
|
}
|
|
14696
|
-
},
|
|
14738
|
+
}, _callee63, this);
|
|
14697
14739
|
}));
|
|
14698
14740
|
|
|
14699
|
-
function deleteMessage(
|
|
14741
|
+
function deleteMessage(_x86, _x87) {
|
|
14700
14742
|
return _deleteMessage.apply(this, arguments);
|
|
14701
14743
|
}
|
|
14702
14744
|
|
|
@@ -14718,28 +14760,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14718
14760
|
}, {
|
|
14719
14761
|
key: "undeleteMessage",
|
|
14720
14762
|
value: function () {
|
|
14721
|
-
var _undeleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
14722
|
-
return _regeneratorRuntime.wrap(function
|
|
14763
|
+
var _undeleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(messageID, userID) {
|
|
14764
|
+
return _regeneratorRuntime.wrap(function _callee64$(_context64) {
|
|
14723
14765
|
while (1) {
|
|
14724
|
-
switch (
|
|
14766
|
+
switch (_context64.prev = _context64.next) {
|
|
14725
14767
|
case 0:
|
|
14726
|
-
|
|
14768
|
+
_context64.next = 2;
|
|
14727
14769
|
return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(messageID), "/undelete"), {
|
|
14728
14770
|
undeleted_by: userID
|
|
14729
14771
|
});
|
|
14730
14772
|
|
|
14731
14773
|
case 2:
|
|
14732
|
-
return
|
|
14774
|
+
return _context64.abrupt("return", _context64.sent);
|
|
14733
14775
|
|
|
14734
14776
|
case 3:
|
|
14735
14777
|
case "end":
|
|
14736
|
-
return
|
|
14778
|
+
return _context64.stop();
|
|
14737
14779
|
}
|
|
14738
14780
|
}
|
|
14739
|
-
},
|
|
14781
|
+
}, _callee64, this);
|
|
14740
14782
|
}));
|
|
14741
14783
|
|
|
14742
|
-
function undeleteMessage(
|
|
14784
|
+
function undeleteMessage(_x88, _x89) {
|
|
14743
14785
|
return _undeleteMessage.apply(this, arguments);
|
|
14744
14786
|
}
|
|
14745
14787
|
|
|
@@ -14748,26 +14790,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14748
14790
|
}, {
|
|
14749
14791
|
key: "getMessage",
|
|
14750
14792
|
value: function () {
|
|
14751
|
-
var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
14752
|
-
return _regeneratorRuntime.wrap(function
|
|
14793
|
+
var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(messageID, options) {
|
|
14794
|
+
return _regeneratorRuntime.wrap(function _callee65$(_context65) {
|
|
14753
14795
|
while (1) {
|
|
14754
|
-
switch (
|
|
14796
|
+
switch (_context65.prev = _context65.next) {
|
|
14755
14797
|
case 0:
|
|
14756
|
-
|
|
14798
|
+
_context65.next = 2;
|
|
14757
14799
|
return this.get(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)), _objectSpread({}, options));
|
|
14758
14800
|
|
|
14759
14801
|
case 2:
|
|
14760
|
-
return
|
|
14802
|
+
return _context65.abrupt("return", _context65.sent);
|
|
14761
14803
|
|
|
14762
14804
|
case 3:
|
|
14763
14805
|
case "end":
|
|
14764
|
-
return
|
|
14806
|
+
return _context65.stop();
|
|
14765
14807
|
}
|
|
14766
14808
|
}
|
|
14767
|
-
},
|
|
14809
|
+
}, _callee65, this);
|
|
14768
14810
|
}));
|
|
14769
14811
|
|
|
14770
|
-
function getMessage(
|
|
14812
|
+
function getMessage(_x90, _x91) {
|
|
14771
14813
|
return _getMessage.apply(this, arguments);
|
|
14772
14814
|
}
|
|
14773
14815
|
|
|
@@ -14788,30 +14830,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14788
14830
|
}, {
|
|
14789
14831
|
key: "queryThreads",
|
|
14790
14832
|
value: function () {
|
|
14791
|
-
var _queryThreads = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
14833
|
+
var _queryThreads = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66() {
|
|
14792
14834
|
var _this5 = this;
|
|
14793
14835
|
|
|
14794
14836
|
var options,
|
|
14795
14837
|
optionsWithDefaults,
|
|
14796
14838
|
response,
|
|
14797
|
-
|
|
14798
|
-
return _regeneratorRuntime.wrap(function
|
|
14839
|
+
_args66 = arguments;
|
|
14840
|
+
return _regeneratorRuntime.wrap(function _callee66$(_context66) {
|
|
14799
14841
|
while (1) {
|
|
14800
|
-
switch (
|
|
14842
|
+
switch (_context66.prev = _context66.next) {
|
|
14801
14843
|
case 0:
|
|
14802
|
-
options =
|
|
14844
|
+
options = _args66.length > 0 && _args66[0] !== undefined ? _args66[0] : {};
|
|
14803
14845
|
optionsWithDefaults = _objectSpread({
|
|
14804
14846
|
limit: 10,
|
|
14805
14847
|
participant_limit: 10,
|
|
14806
14848
|
reply_limit: 3,
|
|
14807
14849
|
watch: true
|
|
14808
14850
|
}, options);
|
|
14809
|
-
|
|
14851
|
+
_context66.next = 4;
|
|
14810
14852
|
return this.post("".concat(this.baseURL, "/threads"), optionsWithDefaults);
|
|
14811
14853
|
|
|
14812
14854
|
case 4:
|
|
14813
|
-
response =
|
|
14814
|
-
return
|
|
14855
|
+
response = _context66.sent;
|
|
14856
|
+
return _context66.abrupt("return", {
|
|
14815
14857
|
threads: response.threads.map(function (thread) {
|
|
14816
14858
|
return new Thread({
|
|
14817
14859
|
client: _this5,
|
|
@@ -14823,10 +14865,10 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14823
14865
|
|
|
14824
14866
|
case 6:
|
|
14825
14867
|
case "end":
|
|
14826
|
-
return
|
|
14868
|
+
return _context66.stop();
|
|
14827
14869
|
}
|
|
14828
14870
|
}
|
|
14829
|
-
},
|
|
14871
|
+
}, _callee66, this);
|
|
14830
14872
|
}));
|
|
14831
14873
|
|
|
14832
14874
|
function queryThreads() {
|
|
@@ -14850,19 +14892,19 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14850
14892
|
}, {
|
|
14851
14893
|
key: "getThread",
|
|
14852
14894
|
value: function () {
|
|
14853
|
-
var _getThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
14895
|
+
var _getThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(messageId) {
|
|
14854
14896
|
var options,
|
|
14855
14897
|
optionsWithDefaults,
|
|
14856
14898
|
response,
|
|
14857
|
-
|
|
14858
|
-
return _regeneratorRuntime.wrap(function
|
|
14899
|
+
_args67 = arguments;
|
|
14900
|
+
return _regeneratorRuntime.wrap(function _callee67$(_context67) {
|
|
14859
14901
|
while (1) {
|
|
14860
|
-
switch (
|
|
14902
|
+
switch (_context67.prev = _context67.next) {
|
|
14861
14903
|
case 0:
|
|
14862
|
-
options =
|
|
14904
|
+
options = _args67.length > 1 && _args67[1] !== undefined ? _args67[1] : {};
|
|
14863
14905
|
|
|
14864
14906
|
if (messageId) {
|
|
14865
|
-
|
|
14907
|
+
_context67.next = 3;
|
|
14866
14908
|
break;
|
|
14867
14909
|
}
|
|
14868
14910
|
|
|
@@ -14874,25 +14916,25 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14874
14916
|
reply_limit: 3,
|
|
14875
14917
|
watch: true
|
|
14876
14918
|
}, options);
|
|
14877
|
-
|
|
14919
|
+
_context67.next = 6;
|
|
14878
14920
|
return this.get("".concat(this.baseURL, "/threads/").concat(encodeURIComponent(messageId)), optionsWithDefaults);
|
|
14879
14921
|
|
|
14880
14922
|
case 6:
|
|
14881
|
-
response =
|
|
14882
|
-
return
|
|
14923
|
+
response = _context67.sent;
|
|
14924
|
+
return _context67.abrupt("return", new Thread({
|
|
14883
14925
|
client: this,
|
|
14884
14926
|
threadData: response.thread
|
|
14885
14927
|
}));
|
|
14886
14928
|
|
|
14887
14929
|
case 8:
|
|
14888
14930
|
case "end":
|
|
14889
|
-
return
|
|
14931
|
+
return _context67.stop();
|
|
14890
14932
|
}
|
|
14891
14933
|
}
|
|
14892
|
-
},
|
|
14934
|
+
}, _callee67, this);
|
|
14893
14935
|
}));
|
|
14894
14936
|
|
|
14895
|
-
function getThread(
|
|
14937
|
+
function getThread(_x92) {
|
|
14896
14938
|
return _getThread.apply(this, arguments);
|
|
14897
14939
|
}
|
|
14898
14940
|
|
|
@@ -14910,15 +14952,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14910
14952
|
}, {
|
|
14911
14953
|
key: "partialUpdateThread",
|
|
14912
14954
|
value: function () {
|
|
14913
|
-
var _partialUpdateThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
14955
|
+
var _partialUpdateThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(messageId, partialThreadObject) {
|
|
14914
14956
|
var reservedThreadFields, _key5;
|
|
14915
14957
|
|
|
14916
|
-
return _regeneratorRuntime.wrap(function
|
|
14958
|
+
return _regeneratorRuntime.wrap(function _callee68$(_context68) {
|
|
14917
14959
|
while (1) {
|
|
14918
|
-
switch (
|
|
14960
|
+
switch (_context68.prev = _context68.next) {
|
|
14919
14961
|
case 0:
|
|
14920
14962
|
if (messageId) {
|
|
14921
|
-
|
|
14963
|
+
_context68.next = 2;
|
|
14922
14964
|
break;
|
|
14923
14965
|
}
|
|
14924
14966
|
|
|
@@ -14928,43 +14970,43 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14928
14970
|
// check for reserved fields from ThreadResponse type within partialThreadObject's set and unset.
|
|
14929
14971
|
// Throw error if any of the reserved field is found.
|
|
14930
14972
|
reservedThreadFields = ['created_at', 'id', 'last_message_at', 'type', 'updated_at', 'user', 'reply_count', 'participants', 'channel', 'custom'];
|
|
14931
|
-
|
|
14973
|
+
_context68.t0 = _regeneratorRuntime.keys(_objectSpread(_objectSpread({}, partialThreadObject.set), partialThreadObject.unset));
|
|
14932
14974
|
|
|
14933
14975
|
case 4:
|
|
14934
|
-
if ((
|
|
14935
|
-
|
|
14976
|
+
if ((_context68.t1 = _context68.t0()).done) {
|
|
14977
|
+
_context68.next = 10;
|
|
14936
14978
|
break;
|
|
14937
14979
|
}
|
|
14938
14980
|
|
|
14939
|
-
_key5 =
|
|
14981
|
+
_key5 = _context68.t1.value;
|
|
14940
14982
|
|
|
14941
14983
|
if (!reservedThreadFields.includes(_key5)) {
|
|
14942
|
-
|
|
14984
|
+
_context68.next = 8;
|
|
14943
14985
|
break;
|
|
14944
14986
|
}
|
|
14945
14987
|
|
|
14946
14988
|
throw Error("You cannot set ".concat(_key5, " field on Thread object. ").concat(_key5, " is reserved for server-side use. Please omit ").concat(_key5, " from your set object."));
|
|
14947
14989
|
|
|
14948
14990
|
case 8:
|
|
14949
|
-
|
|
14991
|
+
_context68.next = 4;
|
|
14950
14992
|
break;
|
|
14951
14993
|
|
|
14952
14994
|
case 10:
|
|
14953
|
-
|
|
14995
|
+
_context68.next = 12;
|
|
14954
14996
|
return this.patch("".concat(this.baseURL, "/threads/").concat(encodeURIComponent(messageId)), partialThreadObject);
|
|
14955
14997
|
|
|
14956
14998
|
case 12:
|
|
14957
|
-
return
|
|
14999
|
+
return _context68.abrupt("return", _context68.sent);
|
|
14958
15000
|
|
|
14959
15001
|
case 13:
|
|
14960
15002
|
case "end":
|
|
14961
|
-
return
|
|
15003
|
+
return _context68.stop();
|
|
14962
15004
|
}
|
|
14963
15005
|
}
|
|
14964
|
-
},
|
|
15006
|
+
}, _callee68, this);
|
|
14965
15007
|
}));
|
|
14966
15008
|
|
|
14967
|
-
function partialUpdateThread(
|
|
15009
|
+
function partialUpdateThread(_x93, _x94) {
|
|
14968
15010
|
return _partialUpdateThread.apply(this, arguments);
|
|
14969
15011
|
}
|
|
14970
15012
|
|
|
@@ -14973,7 +15015,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14973
15015
|
}, {
|
|
14974
15016
|
key: "getUserAgent",
|
|
14975
15017
|
value: function getUserAgent() {
|
|
14976
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.
|
|
15018
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.54.0");
|
|
14977
15019
|
}
|
|
14978
15020
|
}, {
|
|
14979
15021
|
key: "setUserAgent",
|
|
@@ -15192,57 +15234,108 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15192
15234
|
}, {
|
|
15193
15235
|
key: "sendUserCustomEvent",
|
|
15194
15236
|
value: function () {
|
|
15195
|
-
var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15196
|
-
return _regeneratorRuntime.wrap(function
|
|
15237
|
+
var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(targetUserID, event) {
|
|
15238
|
+
return _regeneratorRuntime.wrap(function _callee69$(_context69) {
|
|
15197
15239
|
while (1) {
|
|
15198
|
-
switch (
|
|
15240
|
+
switch (_context69.prev = _context69.next) {
|
|
15199
15241
|
case 0:
|
|
15200
|
-
|
|
15242
|
+
_context69.next = 2;
|
|
15201
15243
|
return this.post("".concat(this.baseURL, "/users/").concat(encodeURIComponent(targetUserID), "/event"), {
|
|
15202
15244
|
event: event
|
|
15203
15245
|
});
|
|
15204
15246
|
|
|
15205
15247
|
case 2:
|
|
15206
|
-
return
|
|
15248
|
+
return _context69.abrupt("return", _context69.sent);
|
|
15207
15249
|
|
|
15208
15250
|
case 3:
|
|
15209
15251
|
case "end":
|
|
15210
|
-
return
|
|
15252
|
+
return _context69.stop();
|
|
15211
15253
|
}
|
|
15212
15254
|
}
|
|
15213
|
-
},
|
|
15255
|
+
}, _callee69, this);
|
|
15214
15256
|
}));
|
|
15215
15257
|
|
|
15216
|
-
function sendUserCustomEvent(
|
|
15258
|
+
function sendUserCustomEvent(_x95, _x96) {
|
|
15217
15259
|
return _sendUserCustomEvent.apply(this, arguments);
|
|
15218
15260
|
}
|
|
15219
15261
|
|
|
15220
15262
|
return sendUserCustomEvent;
|
|
15221
15263
|
}()
|
|
15264
|
+
/**
|
|
15265
|
+
* Creates a new block list
|
|
15266
|
+
*
|
|
15267
|
+
* @param {BlockList} blockList - The block list to create
|
|
15268
|
+
* @param {string} blockList.name - The name of the block list
|
|
15269
|
+
* @param {string[]} blockList.words - List of words to block
|
|
15270
|
+
* @param {string} [blockList.team] - Team ID the block list belongs to
|
|
15271
|
+
*
|
|
15272
|
+
* @returns {Promise<APIResponse>} The server response
|
|
15273
|
+
*/
|
|
15274
|
+
|
|
15222
15275
|
}, {
|
|
15223
15276
|
key: "createBlockList",
|
|
15224
15277
|
value: function createBlockList(blockList) {
|
|
15225
15278
|
return this.post("".concat(this.baseURL, "/blocklists"), blockList);
|
|
15226
15279
|
}
|
|
15280
|
+
/**
|
|
15281
|
+
* Lists all block lists
|
|
15282
|
+
*
|
|
15283
|
+
* @param {Object} [data] - Query parameters
|
|
15284
|
+
* @param {string} [data.team] - Team ID to filter block lists by
|
|
15285
|
+
*
|
|
15286
|
+
* @returns {Promise<APIResponse & {blocklists: BlockListResponse[]}>} Response containing array of block lists
|
|
15287
|
+
*/
|
|
15288
|
+
|
|
15227
15289
|
}, {
|
|
15228
15290
|
key: "listBlockLists",
|
|
15229
|
-
value: function listBlockLists() {
|
|
15230
|
-
return this.get("".concat(this.baseURL, "/blocklists"));
|
|
15291
|
+
value: function listBlockLists(data) {
|
|
15292
|
+
return this.get("".concat(this.baseURL, "/blocklists"), data);
|
|
15231
15293
|
}
|
|
15294
|
+
/**
|
|
15295
|
+
* Gets a specific block list
|
|
15296
|
+
*
|
|
15297
|
+
* @param {string} name - The name of the block list to retrieve
|
|
15298
|
+
* @param {Object} [data] - Query parameters
|
|
15299
|
+
* @param {string} [data.team] - Team ID that blocklist belongs to
|
|
15300
|
+
*
|
|
15301
|
+
* @returns {Promise<APIResponse & {blocklist: BlockListResponse}>} Response containing the block list
|
|
15302
|
+
*/
|
|
15303
|
+
|
|
15232
15304
|
}, {
|
|
15233
15305
|
key: "getBlockList",
|
|
15234
|
-
value: function getBlockList(name) {
|
|
15235
|
-
return this.get("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)));
|
|
15306
|
+
value: function getBlockList(name, data) {
|
|
15307
|
+
return this.get("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)), data);
|
|
15236
15308
|
}
|
|
15309
|
+
/**
|
|
15310
|
+
* Updates an existing block list
|
|
15311
|
+
*
|
|
15312
|
+
* @param {string} name - The name of the block list to update
|
|
15313
|
+
* @param {Object} data - The update data
|
|
15314
|
+
* @param {string[]} data.words - New list of words to block
|
|
15315
|
+
* @param {string} [data.team] - Team ID that blocklist belongs to
|
|
15316
|
+
*
|
|
15317
|
+
* @returns {Promise<APIResponse>} The server response
|
|
15318
|
+
*/
|
|
15319
|
+
|
|
15237
15320
|
}, {
|
|
15238
15321
|
key: "updateBlockList",
|
|
15239
15322
|
value: function updateBlockList(name, data) {
|
|
15240
15323
|
return this.put("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)), data);
|
|
15241
15324
|
}
|
|
15325
|
+
/**
|
|
15326
|
+
* Deletes a block list
|
|
15327
|
+
*
|
|
15328
|
+
* @param {string} name - The name of the block list to delete
|
|
15329
|
+
* @param {Object} [data] - Query parameters
|
|
15330
|
+
* @param {string} [data.team] - Team ID that blocklist belongs to
|
|
15331
|
+
*
|
|
15332
|
+
* @returns {Promise<APIResponse>} The server response
|
|
15333
|
+
*/
|
|
15334
|
+
|
|
15242
15335
|
}, {
|
|
15243
15336
|
key: "deleteBlockList",
|
|
15244
|
-
value: function deleteBlockList(name) {
|
|
15245
|
-
return this.delete("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)));
|
|
15337
|
+
value: function deleteBlockList(name, data) {
|
|
15338
|
+
return this.delete("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)), data);
|
|
15246
15339
|
}
|
|
15247
15340
|
}, {
|
|
15248
15341
|
key: "exportChannels",
|
|
@@ -15310,28 +15403,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15310
15403
|
}, {
|
|
15311
15404
|
key: "createSegment",
|
|
15312
15405
|
value: function () {
|
|
15313
|
-
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15406
|
+
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(type, id, data) {
|
|
15314
15407
|
var body;
|
|
15315
|
-
return _regeneratorRuntime.wrap(function
|
|
15408
|
+
return _regeneratorRuntime.wrap(function _callee70$(_context70) {
|
|
15316
15409
|
while (1) {
|
|
15317
|
-
switch (
|
|
15410
|
+
switch (_context70.prev = _context70.next) {
|
|
15318
15411
|
case 0:
|
|
15319
15412
|
this.validateServerSideAuth();
|
|
15320
15413
|
body = _objectSpread({
|
|
15321
15414
|
id: id,
|
|
15322
15415
|
type: type
|
|
15323
15416
|
}, data);
|
|
15324
|
-
return
|
|
15417
|
+
return _context70.abrupt("return", this.post(this.baseURL + "/segments", body));
|
|
15325
15418
|
|
|
15326
15419
|
case 3:
|
|
15327
15420
|
case "end":
|
|
15328
|
-
return
|
|
15421
|
+
return _context70.stop();
|
|
15329
15422
|
}
|
|
15330
15423
|
}
|
|
15331
|
-
},
|
|
15424
|
+
}, _callee70, this);
|
|
15332
15425
|
}));
|
|
15333
15426
|
|
|
15334
|
-
function createSegment(
|
|
15427
|
+
function createSegment(_x97, _x98, _x99) {
|
|
15335
15428
|
return _createSegment.apply(this, arguments);
|
|
15336
15429
|
}
|
|
15337
15430
|
|
|
@@ -15350,23 +15443,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15350
15443
|
}, {
|
|
15351
15444
|
key: "createUserSegment",
|
|
15352
15445
|
value: function () {
|
|
15353
|
-
var _createUserSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15354
|
-
return _regeneratorRuntime.wrap(function
|
|
15446
|
+
var _createUserSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(id, data) {
|
|
15447
|
+
return _regeneratorRuntime.wrap(function _callee71$(_context71) {
|
|
15355
15448
|
while (1) {
|
|
15356
|
-
switch (
|
|
15449
|
+
switch (_context71.prev = _context71.next) {
|
|
15357
15450
|
case 0:
|
|
15358
15451
|
this.validateServerSideAuth();
|
|
15359
|
-
return
|
|
15452
|
+
return _context71.abrupt("return", this.createSegment('user', id, data));
|
|
15360
15453
|
|
|
15361
15454
|
case 2:
|
|
15362
15455
|
case "end":
|
|
15363
|
-
return
|
|
15456
|
+
return _context71.stop();
|
|
15364
15457
|
}
|
|
15365
15458
|
}
|
|
15366
|
-
},
|
|
15459
|
+
}, _callee71, this);
|
|
15367
15460
|
}));
|
|
15368
15461
|
|
|
15369
|
-
function createUserSegment(
|
|
15462
|
+
function createUserSegment(_x100, _x101) {
|
|
15370
15463
|
return _createUserSegment.apply(this, arguments);
|
|
15371
15464
|
}
|
|
15372
15465
|
|
|
@@ -15385,23 +15478,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15385
15478
|
}, {
|
|
15386
15479
|
key: "createChannelSegment",
|
|
15387
15480
|
value: function () {
|
|
15388
|
-
var _createChannelSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15389
|
-
return _regeneratorRuntime.wrap(function
|
|
15481
|
+
var _createChannelSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(id, data) {
|
|
15482
|
+
return _regeneratorRuntime.wrap(function _callee72$(_context72) {
|
|
15390
15483
|
while (1) {
|
|
15391
|
-
switch (
|
|
15484
|
+
switch (_context72.prev = _context72.next) {
|
|
15392
15485
|
case 0:
|
|
15393
15486
|
this.validateServerSideAuth();
|
|
15394
|
-
return
|
|
15487
|
+
return _context72.abrupt("return", this.createSegment('channel', id, data));
|
|
15395
15488
|
|
|
15396
15489
|
case 2:
|
|
15397
15490
|
case "end":
|
|
15398
|
-
return
|
|
15491
|
+
return _context72.stop();
|
|
15399
15492
|
}
|
|
15400
15493
|
}
|
|
15401
|
-
},
|
|
15494
|
+
}, _callee72, this);
|
|
15402
15495
|
}));
|
|
15403
15496
|
|
|
15404
|
-
function createChannelSegment(
|
|
15497
|
+
function createChannelSegment(_x102, _x103) {
|
|
15405
15498
|
return _createChannelSegment.apply(this, arguments);
|
|
15406
15499
|
}
|
|
15407
15500
|
|
|
@@ -15410,23 +15503,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15410
15503
|
}, {
|
|
15411
15504
|
key: "getSegment",
|
|
15412
15505
|
value: function () {
|
|
15413
|
-
var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15414
|
-
return _regeneratorRuntime.wrap(function
|
|
15506
|
+
var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(id) {
|
|
15507
|
+
return _regeneratorRuntime.wrap(function _callee73$(_context73) {
|
|
15415
15508
|
while (1) {
|
|
15416
|
-
switch (
|
|
15509
|
+
switch (_context73.prev = _context73.next) {
|
|
15417
15510
|
case 0:
|
|
15418
15511
|
this.validateServerSideAuth();
|
|
15419
|
-
return
|
|
15512
|
+
return _context73.abrupt("return", this.get(this.baseURL + "/segments/".concat(encodeURIComponent(id))));
|
|
15420
15513
|
|
|
15421
15514
|
case 2:
|
|
15422
15515
|
case "end":
|
|
15423
|
-
return
|
|
15516
|
+
return _context73.stop();
|
|
15424
15517
|
}
|
|
15425
15518
|
}
|
|
15426
|
-
},
|
|
15519
|
+
}, _callee73, this);
|
|
15427
15520
|
}));
|
|
15428
15521
|
|
|
15429
|
-
function getSegment(
|
|
15522
|
+
function getSegment(_x104) {
|
|
15430
15523
|
return _getSegment.apply(this, arguments);
|
|
15431
15524
|
}
|
|
15432
15525
|
|
|
@@ -15444,23 +15537,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15444
15537
|
}, {
|
|
15445
15538
|
key: "updateSegment",
|
|
15446
15539
|
value: function () {
|
|
15447
|
-
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15448
|
-
return _regeneratorRuntime.wrap(function
|
|
15540
|
+
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(id, data) {
|
|
15541
|
+
return _regeneratorRuntime.wrap(function _callee74$(_context74) {
|
|
15449
15542
|
while (1) {
|
|
15450
|
-
switch (
|
|
15543
|
+
switch (_context74.prev = _context74.next) {
|
|
15451
15544
|
case 0:
|
|
15452
15545
|
this.validateServerSideAuth();
|
|
15453
|
-
return
|
|
15546
|
+
return _context74.abrupt("return", this.put(this.baseURL + "/segments/".concat(encodeURIComponent(id)), data));
|
|
15454
15547
|
|
|
15455
15548
|
case 2:
|
|
15456
15549
|
case "end":
|
|
15457
|
-
return
|
|
15550
|
+
return _context74.stop();
|
|
15458
15551
|
}
|
|
15459
15552
|
}
|
|
15460
|
-
},
|
|
15553
|
+
}, _callee74, this);
|
|
15461
15554
|
}));
|
|
15462
15555
|
|
|
15463
|
-
function updateSegment(
|
|
15556
|
+
function updateSegment(_x105, _x106) {
|
|
15464
15557
|
return _updateSegment.apply(this, arguments);
|
|
15465
15558
|
}
|
|
15466
15559
|
|
|
@@ -15478,27 +15571,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15478
15571
|
}, {
|
|
15479
15572
|
key: "addSegmentTargets",
|
|
15480
15573
|
value: function () {
|
|
15481
|
-
var _addSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15574
|
+
var _addSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(id, targets) {
|
|
15482
15575
|
var body;
|
|
15483
|
-
return _regeneratorRuntime.wrap(function
|
|
15576
|
+
return _regeneratorRuntime.wrap(function _callee75$(_context75) {
|
|
15484
15577
|
while (1) {
|
|
15485
|
-
switch (
|
|
15578
|
+
switch (_context75.prev = _context75.next) {
|
|
15486
15579
|
case 0:
|
|
15487
15580
|
this.validateServerSideAuth();
|
|
15488
15581
|
body = {
|
|
15489
15582
|
target_ids: targets
|
|
15490
15583
|
};
|
|
15491
|
-
return
|
|
15584
|
+
return _context75.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/addtargets"), body));
|
|
15492
15585
|
|
|
15493
15586
|
case 3:
|
|
15494
15587
|
case "end":
|
|
15495
|
-
return
|
|
15588
|
+
return _context75.stop();
|
|
15496
15589
|
}
|
|
15497
15590
|
}
|
|
15498
|
-
},
|
|
15591
|
+
}, _callee75, this);
|
|
15499
15592
|
}));
|
|
15500
15593
|
|
|
15501
|
-
function addSegmentTargets(
|
|
15594
|
+
function addSegmentTargets(_x107, _x108) {
|
|
15502
15595
|
return _addSegmentTargets.apply(this, arguments);
|
|
15503
15596
|
}
|
|
15504
15597
|
|
|
@@ -15507,33 +15600,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15507
15600
|
}, {
|
|
15508
15601
|
key: "querySegmentTargets",
|
|
15509
15602
|
value: function () {
|
|
15510
|
-
var _querySegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15603
|
+
var _querySegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(id) {
|
|
15511
15604
|
var filter,
|
|
15512
15605
|
sort,
|
|
15513
15606
|
options,
|
|
15514
|
-
|
|
15515
|
-
return _regeneratorRuntime.wrap(function
|
|
15607
|
+
_args76 = arguments;
|
|
15608
|
+
return _regeneratorRuntime.wrap(function _callee76$(_context76) {
|
|
15516
15609
|
while (1) {
|
|
15517
|
-
switch (
|
|
15610
|
+
switch (_context76.prev = _context76.next) {
|
|
15518
15611
|
case 0:
|
|
15519
|
-
filter =
|
|
15520
|
-
sort =
|
|
15521
|
-
options =
|
|
15612
|
+
filter = _args76.length > 1 && _args76[1] !== undefined ? _args76[1] : {};
|
|
15613
|
+
sort = _args76.length > 2 && _args76[2] !== undefined ? _args76[2] : [];
|
|
15614
|
+
options = _args76.length > 3 && _args76[3] !== undefined ? _args76[3] : {};
|
|
15522
15615
|
this.validateServerSideAuth();
|
|
15523
|
-
return
|
|
15616
|
+
return _context76.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/targets/query"), _objectSpread({
|
|
15524
15617
|
filter: filter || {},
|
|
15525
15618
|
sort: sort || []
|
|
15526
15619
|
}, options)));
|
|
15527
15620
|
|
|
15528
15621
|
case 5:
|
|
15529
15622
|
case "end":
|
|
15530
|
-
return
|
|
15623
|
+
return _context76.stop();
|
|
15531
15624
|
}
|
|
15532
15625
|
}
|
|
15533
|
-
},
|
|
15626
|
+
}, _callee76, this);
|
|
15534
15627
|
}));
|
|
15535
15628
|
|
|
15536
|
-
function querySegmentTargets(
|
|
15629
|
+
function querySegmentTargets(_x109) {
|
|
15537
15630
|
return _querySegmentTargets.apply(this, arguments);
|
|
15538
15631
|
}
|
|
15539
15632
|
|
|
@@ -15551,27 +15644,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15551
15644
|
}, {
|
|
15552
15645
|
key: "removeSegmentTargets",
|
|
15553
15646
|
value: function () {
|
|
15554
|
-
var _removeSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15647
|
+
var _removeSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77(id, targets) {
|
|
15555
15648
|
var body;
|
|
15556
|
-
return _regeneratorRuntime.wrap(function
|
|
15649
|
+
return _regeneratorRuntime.wrap(function _callee77$(_context77) {
|
|
15557
15650
|
while (1) {
|
|
15558
|
-
switch (
|
|
15651
|
+
switch (_context77.prev = _context77.next) {
|
|
15559
15652
|
case 0:
|
|
15560
15653
|
this.validateServerSideAuth();
|
|
15561
15654
|
body = {
|
|
15562
15655
|
target_ids: targets
|
|
15563
15656
|
};
|
|
15564
|
-
return
|
|
15657
|
+
return _context77.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/deletetargets"), body));
|
|
15565
15658
|
|
|
15566
15659
|
case 3:
|
|
15567
15660
|
case "end":
|
|
15568
|
-
return
|
|
15661
|
+
return _context77.stop();
|
|
15569
15662
|
}
|
|
15570
15663
|
}
|
|
15571
|
-
},
|
|
15664
|
+
}, _callee77, this);
|
|
15572
15665
|
}));
|
|
15573
15666
|
|
|
15574
|
-
function removeSegmentTargets(
|
|
15667
|
+
function removeSegmentTargets(_x110, _x111) {
|
|
15575
15668
|
return _removeSegmentTargets.apply(this, arguments);
|
|
15576
15669
|
}
|
|
15577
15670
|
|
|
@@ -15589,29 +15682,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15589
15682
|
}, {
|
|
15590
15683
|
key: "querySegments",
|
|
15591
15684
|
value: function () {
|
|
15592
|
-
var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15685
|
+
var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78(filter, sort) {
|
|
15593
15686
|
var options,
|
|
15594
|
-
|
|
15595
|
-
return _regeneratorRuntime.wrap(function
|
|
15687
|
+
_args78 = arguments;
|
|
15688
|
+
return _regeneratorRuntime.wrap(function _callee78$(_context78) {
|
|
15596
15689
|
while (1) {
|
|
15597
|
-
switch (
|
|
15690
|
+
switch (_context78.prev = _context78.next) {
|
|
15598
15691
|
case 0:
|
|
15599
|
-
options =
|
|
15692
|
+
options = _args78.length > 2 && _args78[2] !== undefined ? _args78[2] : {};
|
|
15600
15693
|
this.validateServerSideAuth();
|
|
15601
|
-
return
|
|
15694
|
+
return _context78.abrupt("return", this.post(this.baseURL + "/segments/query", _objectSpread({
|
|
15602
15695
|
filter: filter,
|
|
15603
15696
|
sort: sort
|
|
15604
15697
|
}, options)));
|
|
15605
15698
|
|
|
15606
15699
|
case 3:
|
|
15607
15700
|
case "end":
|
|
15608
|
-
return
|
|
15701
|
+
return _context78.stop();
|
|
15609
15702
|
}
|
|
15610
15703
|
}
|
|
15611
|
-
},
|
|
15704
|
+
}, _callee78, this);
|
|
15612
15705
|
}));
|
|
15613
15706
|
|
|
15614
|
-
function querySegments(
|
|
15707
|
+
function querySegments(_x112, _x113) {
|
|
15615
15708
|
return _querySegments.apply(this, arguments);
|
|
15616
15709
|
}
|
|
15617
15710
|
|
|
@@ -15628,23 +15721,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15628
15721
|
}, {
|
|
15629
15722
|
key: "deleteSegment",
|
|
15630
15723
|
value: function () {
|
|
15631
|
-
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15632
|
-
return _regeneratorRuntime.wrap(function
|
|
15724
|
+
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(id) {
|
|
15725
|
+
return _regeneratorRuntime.wrap(function _callee79$(_context79) {
|
|
15633
15726
|
while (1) {
|
|
15634
|
-
switch (
|
|
15727
|
+
switch (_context79.prev = _context79.next) {
|
|
15635
15728
|
case 0:
|
|
15636
15729
|
this.validateServerSideAuth();
|
|
15637
|
-
return
|
|
15730
|
+
return _context79.abrupt("return", this.delete(this.baseURL + "/segments/".concat(encodeURIComponent(id))));
|
|
15638
15731
|
|
|
15639
15732
|
case 2:
|
|
15640
15733
|
case "end":
|
|
15641
|
-
return
|
|
15734
|
+
return _context79.stop();
|
|
15642
15735
|
}
|
|
15643
15736
|
}
|
|
15644
|
-
},
|
|
15737
|
+
}, _callee79, this);
|
|
15645
15738
|
}));
|
|
15646
15739
|
|
|
15647
|
-
function deleteSegment(
|
|
15740
|
+
function deleteSegment(_x114) {
|
|
15648
15741
|
return _deleteSegment.apply(this, arguments);
|
|
15649
15742
|
}
|
|
15650
15743
|
|
|
@@ -15662,23 +15755,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15662
15755
|
}, {
|
|
15663
15756
|
key: "segmentTargetExists",
|
|
15664
15757
|
value: function () {
|
|
15665
|
-
var _segmentTargetExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15666
|
-
return _regeneratorRuntime.wrap(function
|
|
15758
|
+
var _segmentTargetExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee80(segmentId, targetId) {
|
|
15759
|
+
return _regeneratorRuntime.wrap(function _callee80$(_context80) {
|
|
15667
15760
|
while (1) {
|
|
15668
|
-
switch (
|
|
15761
|
+
switch (_context80.prev = _context80.next) {
|
|
15669
15762
|
case 0:
|
|
15670
15763
|
this.validateServerSideAuth();
|
|
15671
|
-
return
|
|
15764
|
+
return _context80.abrupt("return", this.get(this.baseURL + "/segments/".concat(encodeURIComponent(segmentId), "/target/").concat(encodeURIComponent(targetId))));
|
|
15672
15765
|
|
|
15673
15766
|
case 2:
|
|
15674
15767
|
case "end":
|
|
15675
|
-
return
|
|
15768
|
+
return _context80.stop();
|
|
15676
15769
|
}
|
|
15677
15770
|
}
|
|
15678
|
-
},
|
|
15771
|
+
}, _callee80, this);
|
|
15679
15772
|
}));
|
|
15680
15773
|
|
|
15681
|
-
function segmentTargetExists(
|
|
15774
|
+
function segmentTargetExists(_x115, _x116) {
|
|
15682
15775
|
return _segmentTargetExists.apply(this, arguments);
|
|
15683
15776
|
}
|
|
15684
15777
|
|
|
@@ -15695,23 +15788,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15695
15788
|
}, {
|
|
15696
15789
|
key: "createCampaign",
|
|
15697
15790
|
value: function () {
|
|
15698
|
-
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15699
|
-
return _regeneratorRuntime.wrap(function
|
|
15791
|
+
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee81(params) {
|
|
15792
|
+
return _regeneratorRuntime.wrap(function _callee81$(_context81) {
|
|
15700
15793
|
while (1) {
|
|
15701
|
-
switch (
|
|
15794
|
+
switch (_context81.prev = _context81.next) {
|
|
15702
15795
|
case 0:
|
|
15703
15796
|
this.validateServerSideAuth();
|
|
15704
|
-
return
|
|
15797
|
+
return _context81.abrupt("return", this.post(this.baseURL + "/campaigns", _objectSpread({}, params)));
|
|
15705
15798
|
|
|
15706
15799
|
case 2:
|
|
15707
15800
|
case "end":
|
|
15708
|
-
return
|
|
15801
|
+
return _context81.stop();
|
|
15709
15802
|
}
|
|
15710
15803
|
}
|
|
15711
|
-
},
|
|
15804
|
+
}, _callee81, this);
|
|
15712
15805
|
}));
|
|
15713
15806
|
|
|
15714
|
-
function createCampaign(
|
|
15807
|
+
function createCampaign(_x117) {
|
|
15715
15808
|
return _createCampaign.apply(this, arguments);
|
|
15716
15809
|
}
|
|
15717
15810
|
|
|
@@ -15720,23 +15813,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15720
15813
|
}, {
|
|
15721
15814
|
key: "getCampaign",
|
|
15722
15815
|
value: function () {
|
|
15723
|
-
var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15724
|
-
return _regeneratorRuntime.wrap(function
|
|
15816
|
+
var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee82(id) {
|
|
15817
|
+
return _regeneratorRuntime.wrap(function _callee82$(_context82) {
|
|
15725
15818
|
while (1) {
|
|
15726
|
-
switch (
|
|
15819
|
+
switch (_context82.prev = _context82.next) {
|
|
15727
15820
|
case 0:
|
|
15728
15821
|
this.validateServerSideAuth();
|
|
15729
|
-
return
|
|
15822
|
+
return _context82.abrupt("return", this.get(this.baseURL + "/campaigns/".concat(encodeURIComponent(id))));
|
|
15730
15823
|
|
|
15731
15824
|
case 2:
|
|
15732
15825
|
case "end":
|
|
15733
|
-
return
|
|
15826
|
+
return _context82.stop();
|
|
15734
15827
|
}
|
|
15735
15828
|
}
|
|
15736
|
-
},
|
|
15829
|
+
}, _callee82, this);
|
|
15737
15830
|
}));
|
|
15738
15831
|
|
|
15739
|
-
function getCampaign(
|
|
15832
|
+
function getCampaign(_x118) {
|
|
15740
15833
|
return _getCampaign.apply(this, arguments);
|
|
15741
15834
|
}
|
|
15742
15835
|
|
|
@@ -15745,26 +15838,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15745
15838
|
}, {
|
|
15746
15839
|
key: "startCampaign",
|
|
15747
15840
|
value: function () {
|
|
15748
|
-
var _startCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15749
|
-
return _regeneratorRuntime.wrap(function
|
|
15841
|
+
var _startCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee83(id, options) {
|
|
15842
|
+
return _regeneratorRuntime.wrap(function _callee83$(_context83) {
|
|
15750
15843
|
while (1) {
|
|
15751
|
-
switch (
|
|
15844
|
+
switch (_context83.prev = _context83.next) {
|
|
15752
15845
|
case 0:
|
|
15753
15846
|
this.validateServerSideAuth();
|
|
15754
|
-
return
|
|
15847
|
+
return _context83.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(encodeURIComponent(id), "/start"), {
|
|
15755
15848
|
scheduled_for: options === null || options === void 0 ? void 0 : options.scheduledFor,
|
|
15756
15849
|
stop_at: options === null || options === void 0 ? void 0 : options.stopAt
|
|
15757
15850
|
}));
|
|
15758
15851
|
|
|
15759
15852
|
case 2:
|
|
15760
15853
|
case "end":
|
|
15761
|
-
return
|
|
15854
|
+
return _context83.stop();
|
|
15762
15855
|
}
|
|
15763
15856
|
}
|
|
15764
|
-
},
|
|
15857
|
+
}, _callee83, this);
|
|
15765
15858
|
}));
|
|
15766
15859
|
|
|
15767
|
-
function startCampaign(
|
|
15860
|
+
function startCampaign(_x119, _x120) {
|
|
15768
15861
|
return _startCampaign.apply(this, arguments);
|
|
15769
15862
|
}
|
|
15770
15863
|
|
|
@@ -15780,30 +15873,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15780
15873
|
}, {
|
|
15781
15874
|
key: "queryCampaigns",
|
|
15782
15875
|
value: function () {
|
|
15783
|
-
var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15784
|
-
return _regeneratorRuntime.wrap(function
|
|
15876
|
+
var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee84(filter, sort, options) {
|
|
15877
|
+
return _regeneratorRuntime.wrap(function _callee84$(_context84) {
|
|
15785
15878
|
while (1) {
|
|
15786
|
-
switch (
|
|
15879
|
+
switch (_context84.prev = _context84.next) {
|
|
15787
15880
|
case 0:
|
|
15788
15881
|
this.validateServerSideAuth();
|
|
15789
|
-
|
|
15882
|
+
_context84.next = 3;
|
|
15790
15883
|
return this.post(this.baseURL + "/campaigns/query", _objectSpread({
|
|
15791
15884
|
filter: filter,
|
|
15792
15885
|
sort: sort
|
|
15793
15886
|
}, options || {}));
|
|
15794
15887
|
|
|
15795
15888
|
case 3:
|
|
15796
|
-
return
|
|
15889
|
+
return _context84.abrupt("return", _context84.sent);
|
|
15797
15890
|
|
|
15798
15891
|
case 4:
|
|
15799
15892
|
case "end":
|
|
15800
|
-
return
|
|
15893
|
+
return _context84.stop();
|
|
15801
15894
|
}
|
|
15802
15895
|
}
|
|
15803
|
-
},
|
|
15896
|
+
}, _callee84, this);
|
|
15804
15897
|
}));
|
|
15805
15898
|
|
|
15806
|
-
function queryCampaigns(
|
|
15899
|
+
function queryCampaigns(_x121, _x122, _x123) {
|
|
15807
15900
|
return _queryCampaigns.apply(this, arguments);
|
|
15808
15901
|
}
|
|
15809
15902
|
|
|
@@ -15821,23 +15914,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15821
15914
|
}, {
|
|
15822
15915
|
key: "updateCampaign",
|
|
15823
15916
|
value: function () {
|
|
15824
|
-
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15825
|
-
return _regeneratorRuntime.wrap(function
|
|
15917
|
+
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee85(id, params) {
|
|
15918
|
+
return _regeneratorRuntime.wrap(function _callee85$(_context85) {
|
|
15826
15919
|
while (1) {
|
|
15827
|
-
switch (
|
|
15920
|
+
switch (_context85.prev = _context85.next) {
|
|
15828
15921
|
case 0:
|
|
15829
15922
|
this.validateServerSideAuth();
|
|
15830
|
-
return
|
|
15923
|
+
return _context85.abrupt("return", this.put(this.baseURL + "/campaigns/".concat(encodeURIComponent(id)), params));
|
|
15831
15924
|
|
|
15832
15925
|
case 2:
|
|
15833
15926
|
case "end":
|
|
15834
|
-
return
|
|
15927
|
+
return _context85.stop();
|
|
15835
15928
|
}
|
|
15836
15929
|
}
|
|
15837
|
-
},
|
|
15930
|
+
}, _callee85, this);
|
|
15838
15931
|
}));
|
|
15839
15932
|
|
|
15840
|
-
function updateCampaign(
|
|
15933
|
+
function updateCampaign(_x124, _x125) {
|
|
15841
15934
|
return _updateCampaign.apply(this, arguments);
|
|
15842
15935
|
}
|
|
15843
15936
|
|
|
@@ -15854,23 +15947,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15854
15947
|
}, {
|
|
15855
15948
|
key: "deleteCampaign",
|
|
15856
15949
|
value: function () {
|
|
15857
|
-
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15858
|
-
return _regeneratorRuntime.wrap(function
|
|
15950
|
+
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee86(id) {
|
|
15951
|
+
return _regeneratorRuntime.wrap(function _callee86$(_context86) {
|
|
15859
15952
|
while (1) {
|
|
15860
|
-
switch (
|
|
15953
|
+
switch (_context86.prev = _context86.next) {
|
|
15861
15954
|
case 0:
|
|
15862
15955
|
this.validateServerSideAuth();
|
|
15863
|
-
return
|
|
15956
|
+
return _context86.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(encodeURIComponent(id))));
|
|
15864
15957
|
|
|
15865
15958
|
case 2:
|
|
15866
15959
|
case "end":
|
|
15867
|
-
return
|
|
15960
|
+
return _context86.stop();
|
|
15868
15961
|
}
|
|
15869
15962
|
}
|
|
15870
|
-
},
|
|
15963
|
+
}, _callee86, this);
|
|
15871
15964
|
}));
|
|
15872
15965
|
|
|
15873
|
-
function deleteCampaign(
|
|
15966
|
+
function deleteCampaign(_x126) {
|
|
15874
15967
|
return _deleteCampaign.apply(this, arguments);
|
|
15875
15968
|
}
|
|
15876
15969
|
|
|
@@ -15887,23 +15980,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15887
15980
|
}, {
|
|
15888
15981
|
key: "stopCampaign",
|
|
15889
15982
|
value: function () {
|
|
15890
|
-
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15891
|
-
return _regeneratorRuntime.wrap(function
|
|
15983
|
+
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee87(id) {
|
|
15984
|
+
return _regeneratorRuntime.wrap(function _callee87$(_context87) {
|
|
15892
15985
|
while (1) {
|
|
15893
|
-
switch (
|
|
15986
|
+
switch (_context87.prev = _context87.next) {
|
|
15894
15987
|
case 0:
|
|
15895
15988
|
this.validateServerSideAuth();
|
|
15896
|
-
return
|
|
15989
|
+
return _context87.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(encodeURIComponent(id), "/stop")));
|
|
15897
15990
|
|
|
15898
15991
|
case 2:
|
|
15899
15992
|
case "end":
|
|
15900
|
-
return
|
|
15993
|
+
return _context87.stop();
|
|
15901
15994
|
}
|
|
15902
15995
|
}
|
|
15903
|
-
},
|
|
15996
|
+
}, _callee87, this);
|
|
15904
15997
|
}));
|
|
15905
15998
|
|
|
15906
|
-
function stopCampaign(
|
|
15999
|
+
function stopCampaign(_x127) {
|
|
15907
16000
|
return _stopCampaign.apply(this, arguments);
|
|
15908
16001
|
}
|
|
15909
16002
|
|
|
@@ -15919,24 +16012,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15919
16012
|
}, {
|
|
15920
16013
|
key: "enrichURL",
|
|
15921
16014
|
value: function () {
|
|
15922
|
-
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15923
|
-
return _regeneratorRuntime.wrap(function
|
|
16015
|
+
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee88(url) {
|
|
16016
|
+
return _regeneratorRuntime.wrap(function _callee88$(_context88) {
|
|
15924
16017
|
while (1) {
|
|
15925
|
-
switch (
|
|
16018
|
+
switch (_context88.prev = _context88.next) {
|
|
15926
16019
|
case 0:
|
|
15927
|
-
return
|
|
16020
|
+
return _context88.abrupt("return", this.get(this.baseURL + "/og", {
|
|
15928
16021
|
url: url
|
|
15929
16022
|
}));
|
|
15930
16023
|
|
|
15931
16024
|
case 1:
|
|
15932
16025
|
case "end":
|
|
15933
|
-
return
|
|
16026
|
+
return _context88.stop();
|
|
15934
16027
|
}
|
|
15935
16028
|
}
|
|
15936
|
-
},
|
|
16029
|
+
}, _callee88, this);
|
|
15937
16030
|
}));
|
|
15938
16031
|
|
|
15939
|
-
function enrichURL(
|
|
16032
|
+
function enrichURL(_x128) {
|
|
15940
16033
|
return _enrichURL.apply(this, arguments);
|
|
15941
16034
|
}
|
|
15942
16035
|
|
|
@@ -15953,22 +16046,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15953
16046
|
}, {
|
|
15954
16047
|
key: "getTask",
|
|
15955
16048
|
value: function () {
|
|
15956
|
-
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15957
|
-
return _regeneratorRuntime.wrap(function
|
|
16049
|
+
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee89(id) {
|
|
16050
|
+
return _regeneratorRuntime.wrap(function _callee89$(_context89) {
|
|
15958
16051
|
while (1) {
|
|
15959
|
-
switch (
|
|
16052
|
+
switch (_context89.prev = _context89.next) {
|
|
15960
16053
|
case 0:
|
|
15961
|
-
return
|
|
16054
|
+
return _context89.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(encodeURIComponent(id))));
|
|
15962
16055
|
|
|
15963
16056
|
case 1:
|
|
15964
16057
|
case "end":
|
|
15965
|
-
return
|
|
16058
|
+
return _context89.stop();
|
|
15966
16059
|
}
|
|
15967
16060
|
}
|
|
15968
|
-
},
|
|
16061
|
+
}, _callee89, this);
|
|
15969
16062
|
}));
|
|
15970
16063
|
|
|
15971
|
-
function getTask(
|
|
16064
|
+
function getTask(_x129) {
|
|
15972
16065
|
return _getTask.apply(this, arguments);
|
|
15973
16066
|
}
|
|
15974
16067
|
|
|
@@ -15986,31 +16079,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15986
16079
|
}, {
|
|
15987
16080
|
key: "deleteChannels",
|
|
15988
16081
|
value: function () {
|
|
15989
|
-
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16082
|
+
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee90(cids) {
|
|
15990
16083
|
var options,
|
|
15991
|
-
|
|
15992
|
-
return _regeneratorRuntime.wrap(function
|
|
16084
|
+
_args90 = arguments;
|
|
16085
|
+
return _regeneratorRuntime.wrap(function _callee90$(_context90) {
|
|
15993
16086
|
while (1) {
|
|
15994
|
-
switch (
|
|
16087
|
+
switch (_context90.prev = _context90.next) {
|
|
15995
16088
|
case 0:
|
|
15996
|
-
options =
|
|
15997
|
-
|
|
16089
|
+
options = _args90.length > 1 && _args90[1] !== undefined ? _args90[1] : {};
|
|
16090
|
+
_context90.next = 3;
|
|
15998
16091
|
return this.post(this.baseURL + "/channels/delete", _objectSpread({
|
|
15999
16092
|
cids: cids
|
|
16000
16093
|
}, options));
|
|
16001
16094
|
|
|
16002
16095
|
case 3:
|
|
16003
|
-
return
|
|
16096
|
+
return _context90.abrupt("return", _context90.sent);
|
|
16004
16097
|
|
|
16005
16098
|
case 4:
|
|
16006
16099
|
case "end":
|
|
16007
|
-
return
|
|
16100
|
+
return _context90.stop();
|
|
16008
16101
|
}
|
|
16009
16102
|
}
|
|
16010
|
-
},
|
|
16103
|
+
}, _callee90, this);
|
|
16011
16104
|
}));
|
|
16012
16105
|
|
|
16013
|
-
function deleteChannels(
|
|
16106
|
+
function deleteChannels(_x130) {
|
|
16014
16107
|
return _deleteChannels.apply(this, arguments);
|
|
16015
16108
|
}
|
|
16016
16109
|
|
|
@@ -16028,17 +16121,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16028
16121
|
}, {
|
|
16029
16122
|
key: "deleteUsers",
|
|
16030
16123
|
value: function () {
|
|
16031
|
-
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16124
|
+
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee91(user_ids) {
|
|
16032
16125
|
var options,
|
|
16033
|
-
|
|
16034
|
-
return _regeneratorRuntime.wrap(function
|
|
16126
|
+
_args91 = arguments;
|
|
16127
|
+
return _regeneratorRuntime.wrap(function _callee91$(_context91) {
|
|
16035
16128
|
while (1) {
|
|
16036
|
-
switch (
|
|
16129
|
+
switch (_context91.prev = _context91.next) {
|
|
16037
16130
|
case 0:
|
|
16038
|
-
options =
|
|
16131
|
+
options = _args91.length > 1 && _args91[1] !== undefined ? _args91[1] : {};
|
|
16039
16132
|
|
|
16040
16133
|
if (!(typeof options.user !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.user))) {
|
|
16041
|
-
|
|
16134
|
+
_context91.next = 3;
|
|
16042
16135
|
break;
|
|
16043
16136
|
}
|
|
16044
16137
|
|
|
@@ -16046,7 +16139,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16046
16139
|
|
|
16047
16140
|
case 3:
|
|
16048
16141
|
if (!(typeof options.conversations !== 'undefined' && !['soft', 'hard'].includes(options.conversations))) {
|
|
16049
|
-
|
|
16142
|
+
_context91.next = 5;
|
|
16050
16143
|
break;
|
|
16051
16144
|
}
|
|
16052
16145
|
|
|
@@ -16054,30 +16147,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16054
16147
|
|
|
16055
16148
|
case 5:
|
|
16056
16149
|
if (!(typeof options.messages !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.messages))) {
|
|
16057
|
-
|
|
16150
|
+
_context91.next = 7;
|
|
16058
16151
|
break;
|
|
16059
16152
|
}
|
|
16060
16153
|
|
|
16061
16154
|
throw new Error('Invalid delete user options. messages must be one of [soft hard pruning]');
|
|
16062
16155
|
|
|
16063
16156
|
case 7:
|
|
16064
|
-
|
|
16157
|
+
_context91.next = 9;
|
|
16065
16158
|
return this.post(this.baseURL + "/users/delete", _objectSpread({
|
|
16066
16159
|
user_ids: user_ids
|
|
16067
16160
|
}, options));
|
|
16068
16161
|
|
|
16069
16162
|
case 9:
|
|
16070
|
-
return
|
|
16163
|
+
return _context91.abrupt("return", _context91.sent);
|
|
16071
16164
|
|
|
16072
16165
|
case 10:
|
|
16073
16166
|
case "end":
|
|
16074
|
-
return
|
|
16167
|
+
return _context91.stop();
|
|
16075
16168
|
}
|
|
16076
16169
|
}
|
|
16077
|
-
},
|
|
16170
|
+
}, _callee91, this);
|
|
16078
16171
|
}));
|
|
16079
16172
|
|
|
16080
|
-
function deleteUsers(
|
|
16173
|
+
function deleteUsers(_x131) {
|
|
16081
16174
|
return _deleteUsers.apply(this, arguments);
|
|
16082
16175
|
}
|
|
16083
16176
|
|
|
@@ -16098,28 +16191,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16098
16191
|
}, {
|
|
16099
16192
|
key: "_createImportURL",
|
|
16100
16193
|
value: function () {
|
|
16101
|
-
var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16102
|
-
return _regeneratorRuntime.wrap(function
|
|
16194
|
+
var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee92(filename) {
|
|
16195
|
+
return _regeneratorRuntime.wrap(function _callee92$(_context92) {
|
|
16103
16196
|
while (1) {
|
|
16104
|
-
switch (
|
|
16197
|
+
switch (_context92.prev = _context92.next) {
|
|
16105
16198
|
case 0:
|
|
16106
|
-
|
|
16199
|
+
_context92.next = 2;
|
|
16107
16200
|
return this.post(this.baseURL + "/import_urls", {
|
|
16108
16201
|
filename: filename
|
|
16109
16202
|
});
|
|
16110
16203
|
|
|
16111
16204
|
case 2:
|
|
16112
|
-
return
|
|
16205
|
+
return _context92.abrupt("return", _context92.sent);
|
|
16113
16206
|
|
|
16114
16207
|
case 3:
|
|
16115
16208
|
case "end":
|
|
16116
|
-
return
|
|
16209
|
+
return _context92.stop();
|
|
16117
16210
|
}
|
|
16118
16211
|
}
|
|
16119
|
-
},
|
|
16212
|
+
}, _callee92, this);
|
|
16120
16213
|
}));
|
|
16121
16214
|
|
|
16122
|
-
function _createImportURL(
|
|
16215
|
+
function _createImportURL(_x132) {
|
|
16123
16216
|
return _createImportURL2.apply(this, arguments);
|
|
16124
16217
|
}
|
|
16125
16218
|
|
|
@@ -16141,33 +16234,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16141
16234
|
}, {
|
|
16142
16235
|
key: "_createImport",
|
|
16143
16236
|
value: function () {
|
|
16144
|
-
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16237
|
+
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee93(path) {
|
|
16145
16238
|
var options,
|
|
16146
|
-
|
|
16147
|
-
return _regeneratorRuntime.wrap(function
|
|
16239
|
+
_args93 = arguments;
|
|
16240
|
+
return _regeneratorRuntime.wrap(function _callee93$(_context93) {
|
|
16148
16241
|
while (1) {
|
|
16149
|
-
switch (
|
|
16242
|
+
switch (_context93.prev = _context93.next) {
|
|
16150
16243
|
case 0:
|
|
16151
|
-
options =
|
|
16244
|
+
options = _args93.length > 1 && _args93[1] !== undefined ? _args93[1] : {
|
|
16152
16245
|
mode: 'upsert'
|
|
16153
16246
|
};
|
|
16154
|
-
|
|
16247
|
+
_context93.next = 3;
|
|
16155
16248
|
return this.post(this.baseURL + "/imports", _objectSpread({
|
|
16156
16249
|
path: path
|
|
16157
16250
|
}, options));
|
|
16158
16251
|
|
|
16159
16252
|
case 3:
|
|
16160
|
-
return
|
|
16253
|
+
return _context93.abrupt("return", _context93.sent);
|
|
16161
16254
|
|
|
16162
16255
|
case 4:
|
|
16163
16256
|
case "end":
|
|
16164
|
-
return
|
|
16257
|
+
return _context93.stop();
|
|
16165
16258
|
}
|
|
16166
16259
|
}
|
|
16167
|
-
},
|
|
16260
|
+
}, _callee93, this);
|
|
16168
16261
|
}));
|
|
16169
16262
|
|
|
16170
|
-
function _createImport(
|
|
16263
|
+
function _createImport(_x133) {
|
|
16171
16264
|
return _createImport2.apply(this, arguments);
|
|
16172
16265
|
}
|
|
16173
16266
|
|
|
@@ -16189,26 +16282,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16189
16282
|
}, {
|
|
16190
16283
|
key: "_getImport",
|
|
16191
16284
|
value: function () {
|
|
16192
|
-
var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16193
|
-
return _regeneratorRuntime.wrap(function
|
|
16285
|
+
var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee94(id) {
|
|
16286
|
+
return _regeneratorRuntime.wrap(function _callee94$(_context94) {
|
|
16194
16287
|
while (1) {
|
|
16195
|
-
switch (
|
|
16288
|
+
switch (_context94.prev = _context94.next) {
|
|
16196
16289
|
case 0:
|
|
16197
|
-
|
|
16290
|
+
_context94.next = 2;
|
|
16198
16291
|
return this.get(this.baseURL + "/imports/".concat(encodeURIComponent(id)));
|
|
16199
16292
|
|
|
16200
16293
|
case 2:
|
|
16201
|
-
return
|
|
16294
|
+
return _context94.abrupt("return", _context94.sent);
|
|
16202
16295
|
|
|
16203
16296
|
case 3:
|
|
16204
16297
|
case "end":
|
|
16205
|
-
return
|
|
16298
|
+
return _context94.stop();
|
|
16206
16299
|
}
|
|
16207
16300
|
}
|
|
16208
|
-
},
|
|
16301
|
+
}, _callee94, this);
|
|
16209
16302
|
}));
|
|
16210
16303
|
|
|
16211
|
-
function _getImport(
|
|
16304
|
+
function _getImport(_x134) {
|
|
16212
16305
|
return _getImport2.apply(this, arguments);
|
|
16213
16306
|
}
|
|
16214
16307
|
|
|
@@ -16230,26 +16323,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16230
16323
|
}, {
|
|
16231
16324
|
key: "_listImports",
|
|
16232
16325
|
value: function () {
|
|
16233
|
-
var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16234
|
-
return _regeneratorRuntime.wrap(function
|
|
16326
|
+
var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee95(options) {
|
|
16327
|
+
return _regeneratorRuntime.wrap(function _callee95$(_context95) {
|
|
16235
16328
|
while (1) {
|
|
16236
|
-
switch (
|
|
16329
|
+
switch (_context95.prev = _context95.next) {
|
|
16237
16330
|
case 0:
|
|
16238
|
-
|
|
16331
|
+
_context95.next = 2;
|
|
16239
16332
|
return this.get(this.baseURL + "/imports", options);
|
|
16240
16333
|
|
|
16241
16334
|
case 2:
|
|
16242
|
-
return
|
|
16335
|
+
return _context95.abrupt("return", _context95.sent);
|
|
16243
16336
|
|
|
16244
16337
|
case 3:
|
|
16245
16338
|
case "end":
|
|
16246
|
-
return
|
|
16339
|
+
return _context95.stop();
|
|
16247
16340
|
}
|
|
16248
16341
|
}
|
|
16249
|
-
},
|
|
16342
|
+
}, _callee95, this);
|
|
16250
16343
|
}));
|
|
16251
16344
|
|
|
16252
|
-
function _listImports(
|
|
16345
|
+
function _listImports(_x135) {
|
|
16253
16346
|
return _listImports2.apply(this, arguments);
|
|
16254
16347
|
}
|
|
16255
16348
|
|
|
@@ -16268,28 +16361,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16268
16361
|
}, {
|
|
16269
16362
|
key: "upsertPushProvider",
|
|
16270
16363
|
value: function () {
|
|
16271
|
-
var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16272
|
-
return _regeneratorRuntime.wrap(function
|
|
16364
|
+
var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee96(pushProvider) {
|
|
16365
|
+
return _regeneratorRuntime.wrap(function _callee96$(_context96) {
|
|
16273
16366
|
while (1) {
|
|
16274
|
-
switch (
|
|
16367
|
+
switch (_context96.prev = _context96.next) {
|
|
16275
16368
|
case 0:
|
|
16276
|
-
|
|
16369
|
+
_context96.next = 2;
|
|
16277
16370
|
return this.post(this.baseURL + "/push_providers", {
|
|
16278
16371
|
push_provider: pushProvider
|
|
16279
16372
|
});
|
|
16280
16373
|
|
|
16281
16374
|
case 2:
|
|
16282
|
-
return
|
|
16375
|
+
return _context96.abrupt("return", _context96.sent);
|
|
16283
16376
|
|
|
16284
16377
|
case 3:
|
|
16285
16378
|
case "end":
|
|
16286
|
-
return
|
|
16379
|
+
return _context96.stop();
|
|
16287
16380
|
}
|
|
16288
16381
|
}
|
|
16289
|
-
},
|
|
16382
|
+
}, _callee96, this);
|
|
16290
16383
|
}));
|
|
16291
16384
|
|
|
16292
|
-
function upsertPushProvider(
|
|
16385
|
+
function upsertPushProvider(_x136) {
|
|
16293
16386
|
return _upsertPushProvider.apply(this, arguments);
|
|
16294
16387
|
}
|
|
16295
16388
|
|
|
@@ -16308,28 +16401,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16308
16401
|
}, {
|
|
16309
16402
|
key: "deletePushProvider",
|
|
16310
16403
|
value: function () {
|
|
16311
|
-
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16404
|
+
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee97(_ref10) {
|
|
16312
16405
|
var type, name;
|
|
16313
|
-
return _regeneratorRuntime.wrap(function
|
|
16406
|
+
return _regeneratorRuntime.wrap(function _callee97$(_context97) {
|
|
16314
16407
|
while (1) {
|
|
16315
|
-
switch (
|
|
16408
|
+
switch (_context97.prev = _context97.next) {
|
|
16316
16409
|
case 0:
|
|
16317
16410
|
type = _ref10.type, name = _ref10.name;
|
|
16318
|
-
|
|
16411
|
+
_context97.next = 3;
|
|
16319
16412
|
return this.delete(this.baseURL + "/push_providers/".concat(encodeURIComponent(type), "/").concat(encodeURIComponent(name)));
|
|
16320
16413
|
|
|
16321
16414
|
case 3:
|
|
16322
|
-
return
|
|
16415
|
+
return _context97.abrupt("return", _context97.sent);
|
|
16323
16416
|
|
|
16324
16417
|
case 4:
|
|
16325
16418
|
case "end":
|
|
16326
|
-
return
|
|
16419
|
+
return _context97.stop();
|
|
16327
16420
|
}
|
|
16328
16421
|
}
|
|
16329
|
-
},
|
|
16422
|
+
}, _callee97, this);
|
|
16330
16423
|
}));
|
|
16331
16424
|
|
|
16332
|
-
function deletePushProvider(
|
|
16425
|
+
function deletePushProvider(_x137) {
|
|
16333
16426
|
return _deletePushProvider.apply(this, arguments);
|
|
16334
16427
|
}
|
|
16335
16428
|
|
|
@@ -16346,23 +16439,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16346
16439
|
}, {
|
|
16347
16440
|
key: "listPushProviders",
|
|
16348
16441
|
value: function () {
|
|
16349
|
-
var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16350
|
-
return _regeneratorRuntime.wrap(function
|
|
16442
|
+
var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee98() {
|
|
16443
|
+
return _regeneratorRuntime.wrap(function _callee98$(_context98) {
|
|
16351
16444
|
while (1) {
|
|
16352
|
-
switch (
|
|
16445
|
+
switch (_context98.prev = _context98.next) {
|
|
16353
16446
|
case 0:
|
|
16354
|
-
|
|
16447
|
+
_context98.next = 2;
|
|
16355
16448
|
return this.get(this.baseURL + "/push_providers");
|
|
16356
16449
|
|
|
16357
16450
|
case 2:
|
|
16358
|
-
return
|
|
16451
|
+
return _context98.abrupt("return", _context98.sent);
|
|
16359
16452
|
|
|
16360
16453
|
case 3:
|
|
16361
16454
|
case "end":
|
|
16362
|
-
return
|
|
16455
|
+
return _context98.stop();
|
|
16363
16456
|
}
|
|
16364
16457
|
}
|
|
16365
|
-
},
|
|
16458
|
+
}, _callee98, this);
|
|
16366
16459
|
}));
|
|
16367
16460
|
|
|
16368
16461
|
function listPushProviders() {
|
|
@@ -16390,26 +16483,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16390
16483
|
}, {
|
|
16391
16484
|
key: "commitMessage",
|
|
16392
16485
|
value: function () {
|
|
16393
|
-
var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16394
|
-
return _regeneratorRuntime.wrap(function
|
|
16486
|
+
var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee99(id) {
|
|
16487
|
+
return _regeneratorRuntime.wrap(function _callee99$(_context99) {
|
|
16395
16488
|
while (1) {
|
|
16396
|
-
switch (
|
|
16489
|
+
switch (_context99.prev = _context99.next) {
|
|
16397
16490
|
case 0:
|
|
16398
|
-
|
|
16491
|
+
_context99.next = 2;
|
|
16399
16492
|
return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(id), "/commit"));
|
|
16400
16493
|
|
|
16401
16494
|
case 2:
|
|
16402
|
-
return
|
|
16495
|
+
return _context99.abrupt("return", _context99.sent);
|
|
16403
16496
|
|
|
16404
16497
|
case 3:
|
|
16405
16498
|
case "end":
|
|
16406
|
-
return
|
|
16499
|
+
return _context99.stop();
|
|
16407
16500
|
}
|
|
16408
16501
|
}
|
|
16409
|
-
},
|
|
16502
|
+
}, _callee99, this);
|
|
16410
16503
|
}));
|
|
16411
16504
|
|
|
16412
|
-
function commitMessage(
|
|
16505
|
+
function commitMessage(_x138) {
|
|
16413
16506
|
return _commitMessage.apply(this, arguments);
|
|
16414
16507
|
}
|
|
16415
16508
|
|
|
@@ -16425,28 +16518,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16425
16518
|
}, {
|
|
16426
16519
|
key: "createPoll",
|
|
16427
16520
|
value: function () {
|
|
16428
|
-
var _createPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16429
|
-
return _regeneratorRuntime.wrap(function
|
|
16521
|
+
var _createPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee100(poll, userId) {
|
|
16522
|
+
return _regeneratorRuntime.wrap(function _callee100$(_context100) {
|
|
16430
16523
|
while (1) {
|
|
16431
|
-
switch (
|
|
16524
|
+
switch (_context100.prev = _context100.next) {
|
|
16432
16525
|
case 0:
|
|
16433
|
-
|
|
16526
|
+
_context100.next = 2;
|
|
16434
16527
|
return this.post(this.baseURL + "/polls", _objectSpread(_objectSpread({}, poll), userId ? {
|
|
16435
16528
|
user_id: userId
|
|
16436
16529
|
} : {}));
|
|
16437
16530
|
|
|
16438
16531
|
case 2:
|
|
16439
|
-
return
|
|
16532
|
+
return _context100.abrupt("return", _context100.sent);
|
|
16440
16533
|
|
|
16441
16534
|
case 3:
|
|
16442
16535
|
case "end":
|
|
16443
|
-
return
|
|
16536
|
+
return _context100.stop();
|
|
16444
16537
|
}
|
|
16445
16538
|
}
|
|
16446
|
-
},
|
|
16539
|
+
}, _callee100, this);
|
|
16447
16540
|
}));
|
|
16448
16541
|
|
|
16449
|
-
function createPoll(
|
|
16542
|
+
function createPoll(_x139, _x140) {
|
|
16450
16543
|
return _createPoll.apply(this, arguments);
|
|
16451
16544
|
}
|
|
16452
16545
|
|
|
@@ -16462,28 +16555,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16462
16555
|
}, {
|
|
16463
16556
|
key: "getPoll",
|
|
16464
16557
|
value: function () {
|
|
16465
|
-
var _getPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16466
|
-
return _regeneratorRuntime.wrap(function
|
|
16558
|
+
var _getPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee101(id, userId) {
|
|
16559
|
+
return _regeneratorRuntime.wrap(function _callee101$(_context101) {
|
|
16467
16560
|
while (1) {
|
|
16468
|
-
switch (
|
|
16561
|
+
switch (_context101.prev = _context101.next) {
|
|
16469
16562
|
case 0:
|
|
16470
|
-
|
|
16563
|
+
_context101.next = 2;
|
|
16471
16564
|
return this.get(this.baseURL + "/polls/".concat(encodeURIComponent(id)), userId ? {
|
|
16472
16565
|
user_id: userId
|
|
16473
16566
|
} : {});
|
|
16474
16567
|
|
|
16475
16568
|
case 2:
|
|
16476
|
-
return
|
|
16569
|
+
return _context101.abrupt("return", _context101.sent);
|
|
16477
16570
|
|
|
16478
16571
|
case 3:
|
|
16479
16572
|
case "end":
|
|
16480
|
-
return
|
|
16573
|
+
return _context101.stop();
|
|
16481
16574
|
}
|
|
16482
16575
|
}
|
|
16483
|
-
},
|
|
16576
|
+
}, _callee101, this);
|
|
16484
16577
|
}));
|
|
16485
16578
|
|
|
16486
|
-
function getPoll(
|
|
16579
|
+
function getPoll(_x141, _x142) {
|
|
16487
16580
|
return _getPoll.apply(this, arguments);
|
|
16488
16581
|
}
|
|
16489
16582
|
|
|
@@ -16499,28 +16592,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16499
16592
|
}, {
|
|
16500
16593
|
key: "updatePoll",
|
|
16501
16594
|
value: function () {
|
|
16502
|
-
var _updatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16503
|
-
return _regeneratorRuntime.wrap(function
|
|
16595
|
+
var _updatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee102(poll, userId) {
|
|
16596
|
+
return _regeneratorRuntime.wrap(function _callee102$(_context102) {
|
|
16504
16597
|
while (1) {
|
|
16505
|
-
switch (
|
|
16598
|
+
switch (_context102.prev = _context102.next) {
|
|
16506
16599
|
case 0:
|
|
16507
|
-
|
|
16600
|
+
_context102.next = 2;
|
|
16508
16601
|
return this.put(this.baseURL + "/polls", _objectSpread(_objectSpread({}, poll), userId ? {
|
|
16509
16602
|
user_id: userId
|
|
16510
16603
|
} : {}));
|
|
16511
16604
|
|
|
16512
16605
|
case 2:
|
|
16513
|
-
return
|
|
16606
|
+
return _context102.abrupt("return", _context102.sent);
|
|
16514
16607
|
|
|
16515
16608
|
case 3:
|
|
16516
16609
|
case "end":
|
|
16517
|
-
return
|
|
16610
|
+
return _context102.stop();
|
|
16518
16611
|
}
|
|
16519
16612
|
}
|
|
16520
|
-
},
|
|
16613
|
+
}, _callee102, this);
|
|
16521
16614
|
}));
|
|
16522
16615
|
|
|
16523
|
-
function updatePoll(
|
|
16616
|
+
function updatePoll(_x143, _x144) {
|
|
16524
16617
|
return _updatePoll.apply(this, arguments);
|
|
16525
16618
|
}
|
|
16526
16619
|
|
|
@@ -16538,28 +16631,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16538
16631
|
}, {
|
|
16539
16632
|
key: "partialUpdatePoll",
|
|
16540
16633
|
value: function () {
|
|
16541
|
-
var _partialUpdatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16542
|
-
return _regeneratorRuntime.wrap(function
|
|
16634
|
+
var _partialUpdatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee103(id, partialPollObject, userId) {
|
|
16635
|
+
return _regeneratorRuntime.wrap(function _callee103$(_context103) {
|
|
16543
16636
|
while (1) {
|
|
16544
|
-
switch (
|
|
16637
|
+
switch (_context103.prev = _context103.next) {
|
|
16545
16638
|
case 0:
|
|
16546
|
-
|
|
16639
|
+
_context103.next = 2;
|
|
16547
16640
|
return this.patch(this.baseURL + "/polls/".concat(encodeURIComponent(id)), _objectSpread(_objectSpread({}, partialPollObject), userId ? {
|
|
16548
16641
|
user_id: userId
|
|
16549
16642
|
} : {}));
|
|
16550
16643
|
|
|
16551
16644
|
case 2:
|
|
16552
|
-
return
|
|
16645
|
+
return _context103.abrupt("return", _context103.sent);
|
|
16553
16646
|
|
|
16554
16647
|
case 3:
|
|
16555
16648
|
case "end":
|
|
16556
|
-
return
|
|
16649
|
+
return _context103.stop();
|
|
16557
16650
|
}
|
|
16558
16651
|
}
|
|
16559
|
-
},
|
|
16652
|
+
}, _callee103, this);
|
|
16560
16653
|
}));
|
|
16561
16654
|
|
|
16562
|
-
function partialUpdatePoll(
|
|
16655
|
+
function partialUpdatePoll(_x145, _x146, _x147) {
|
|
16563
16656
|
return _partialUpdatePoll.apply(this, arguments);
|
|
16564
16657
|
}
|
|
16565
16658
|
|
|
@@ -16575,28 +16668,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16575
16668
|
}, {
|
|
16576
16669
|
key: "deletePoll",
|
|
16577
16670
|
value: function () {
|
|
16578
|
-
var _deletePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16579
|
-
return _regeneratorRuntime.wrap(function
|
|
16671
|
+
var _deletePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee104(id, userId) {
|
|
16672
|
+
return _regeneratorRuntime.wrap(function _callee104$(_context104) {
|
|
16580
16673
|
while (1) {
|
|
16581
|
-
switch (
|
|
16674
|
+
switch (_context104.prev = _context104.next) {
|
|
16582
16675
|
case 0:
|
|
16583
|
-
|
|
16676
|
+
_context104.next = 2;
|
|
16584
16677
|
return this.delete(this.baseURL + "/polls/".concat(encodeURIComponent(id)), _objectSpread({}, userId ? {
|
|
16585
16678
|
user_id: userId
|
|
16586
16679
|
} : {}));
|
|
16587
16680
|
|
|
16588
16681
|
case 2:
|
|
16589
|
-
return
|
|
16682
|
+
return _context104.abrupt("return", _context104.sent);
|
|
16590
16683
|
|
|
16591
16684
|
case 3:
|
|
16592
16685
|
case "end":
|
|
16593
|
-
return
|
|
16686
|
+
return _context104.stop();
|
|
16594
16687
|
}
|
|
16595
16688
|
}
|
|
16596
|
-
},
|
|
16689
|
+
}, _callee104, this);
|
|
16597
16690
|
}));
|
|
16598
16691
|
|
|
16599
|
-
function deletePoll(
|
|
16692
|
+
function deletePoll(_x148, _x149) {
|
|
16600
16693
|
return _deletePoll.apply(this, arguments);
|
|
16601
16694
|
}
|
|
16602
16695
|
|
|
@@ -16612,12 +16705,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16612
16705
|
}, {
|
|
16613
16706
|
key: "closePoll",
|
|
16614
16707
|
value: function () {
|
|
16615
|
-
var _closePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16616
|
-
return _regeneratorRuntime.wrap(function
|
|
16708
|
+
var _closePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee105(id, userId) {
|
|
16709
|
+
return _regeneratorRuntime.wrap(function _callee105$(_context105) {
|
|
16617
16710
|
while (1) {
|
|
16618
|
-
switch (
|
|
16711
|
+
switch (_context105.prev = _context105.next) {
|
|
16619
16712
|
case 0:
|
|
16620
|
-
return
|
|
16713
|
+
return _context105.abrupt("return", this.partialUpdatePoll(id, {
|
|
16621
16714
|
set: {
|
|
16622
16715
|
is_closed: true
|
|
16623
16716
|
}
|
|
@@ -16625,13 +16718,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16625
16718
|
|
|
16626
16719
|
case 1:
|
|
16627
16720
|
case "end":
|
|
16628
|
-
return
|
|
16721
|
+
return _context105.stop();
|
|
16629
16722
|
}
|
|
16630
16723
|
}
|
|
16631
|
-
},
|
|
16724
|
+
}, _callee105, this);
|
|
16632
16725
|
}));
|
|
16633
16726
|
|
|
16634
|
-
function closePoll(
|
|
16727
|
+
function closePoll(_x150, _x151) {
|
|
16635
16728
|
return _closePoll.apply(this, arguments);
|
|
16636
16729
|
}
|
|
16637
16730
|
|
|
@@ -16648,28 +16741,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16648
16741
|
}, {
|
|
16649
16742
|
key: "createPollOption",
|
|
16650
16743
|
value: function () {
|
|
16651
|
-
var _createPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16652
|
-
return _regeneratorRuntime.wrap(function
|
|
16744
|
+
var _createPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee106(pollId, option, userId) {
|
|
16745
|
+
return _regeneratorRuntime.wrap(function _callee106$(_context106) {
|
|
16653
16746
|
while (1) {
|
|
16654
|
-
switch (
|
|
16747
|
+
switch (_context106.prev = _context106.next) {
|
|
16655
16748
|
case 0:
|
|
16656
|
-
|
|
16749
|
+
_context106.next = 2;
|
|
16657
16750
|
return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options"), _objectSpread(_objectSpread({}, option), userId ? {
|
|
16658
16751
|
user_id: userId
|
|
16659
16752
|
} : {}));
|
|
16660
16753
|
|
|
16661
16754
|
case 2:
|
|
16662
|
-
return
|
|
16755
|
+
return _context106.abrupt("return", _context106.sent);
|
|
16663
16756
|
|
|
16664
16757
|
case 3:
|
|
16665
16758
|
case "end":
|
|
16666
|
-
return
|
|
16759
|
+
return _context106.stop();
|
|
16667
16760
|
}
|
|
16668
16761
|
}
|
|
16669
|
-
},
|
|
16762
|
+
}, _callee106, this);
|
|
16670
16763
|
}));
|
|
16671
16764
|
|
|
16672
|
-
function createPollOption(
|
|
16765
|
+
function createPollOption(_x152, _x153, _x154) {
|
|
16673
16766
|
return _createPollOption.apply(this, arguments);
|
|
16674
16767
|
}
|
|
16675
16768
|
|
|
@@ -16686,28 +16779,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16686
16779
|
}, {
|
|
16687
16780
|
key: "getPollOption",
|
|
16688
16781
|
value: function () {
|
|
16689
|
-
var _getPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16690
|
-
return _regeneratorRuntime.wrap(function
|
|
16782
|
+
var _getPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee107(pollId, optionId, userId) {
|
|
16783
|
+
return _regeneratorRuntime.wrap(function _callee107$(_context107) {
|
|
16691
16784
|
while (1) {
|
|
16692
|
-
switch (
|
|
16785
|
+
switch (_context107.prev = _context107.next) {
|
|
16693
16786
|
case 0:
|
|
16694
|
-
|
|
16787
|
+
_context107.next = 2;
|
|
16695
16788
|
return this.get(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options/").concat(encodeURIComponent(optionId)), userId ? {
|
|
16696
16789
|
user_id: userId
|
|
16697
16790
|
} : {});
|
|
16698
16791
|
|
|
16699
16792
|
case 2:
|
|
16700
|
-
return
|
|
16793
|
+
return _context107.abrupt("return", _context107.sent);
|
|
16701
16794
|
|
|
16702
16795
|
case 3:
|
|
16703
16796
|
case "end":
|
|
16704
|
-
return
|
|
16797
|
+
return _context107.stop();
|
|
16705
16798
|
}
|
|
16706
16799
|
}
|
|
16707
|
-
},
|
|
16800
|
+
}, _callee107, this);
|
|
16708
16801
|
}));
|
|
16709
16802
|
|
|
16710
|
-
function getPollOption(
|
|
16803
|
+
function getPollOption(_x155, _x156, _x157) {
|
|
16711
16804
|
return _getPollOption.apply(this, arguments);
|
|
16712
16805
|
}
|
|
16713
16806
|
|
|
@@ -16724,28 +16817,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16724
16817
|
}, {
|
|
16725
16818
|
key: "updatePollOption",
|
|
16726
16819
|
value: function () {
|
|
16727
|
-
var _updatePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16728
|
-
return _regeneratorRuntime.wrap(function
|
|
16820
|
+
var _updatePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee108(pollId, option, userId) {
|
|
16821
|
+
return _regeneratorRuntime.wrap(function _callee108$(_context108) {
|
|
16729
16822
|
while (1) {
|
|
16730
|
-
switch (
|
|
16823
|
+
switch (_context108.prev = _context108.next) {
|
|
16731
16824
|
case 0:
|
|
16732
|
-
|
|
16825
|
+
_context108.next = 2;
|
|
16733
16826
|
return this.put(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options"), _objectSpread(_objectSpread({}, option), userId ? {
|
|
16734
16827
|
user_id: userId
|
|
16735
16828
|
} : {}));
|
|
16736
16829
|
|
|
16737
16830
|
case 2:
|
|
16738
|
-
return
|
|
16831
|
+
return _context108.abrupt("return", _context108.sent);
|
|
16739
16832
|
|
|
16740
16833
|
case 3:
|
|
16741
16834
|
case "end":
|
|
16742
|
-
return
|
|
16835
|
+
return _context108.stop();
|
|
16743
16836
|
}
|
|
16744
16837
|
}
|
|
16745
|
-
},
|
|
16838
|
+
}, _callee108, this);
|
|
16746
16839
|
}));
|
|
16747
16840
|
|
|
16748
|
-
function updatePollOption(
|
|
16841
|
+
function updatePollOption(_x158, _x159, _x160) {
|
|
16749
16842
|
return _updatePollOption.apply(this, arguments);
|
|
16750
16843
|
}
|
|
16751
16844
|
|
|
@@ -16762,28 +16855,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16762
16855
|
}, {
|
|
16763
16856
|
key: "deletePollOption",
|
|
16764
16857
|
value: function () {
|
|
16765
|
-
var _deletePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16766
|
-
return _regeneratorRuntime.wrap(function
|
|
16858
|
+
var _deletePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee109(pollId, optionId, userId) {
|
|
16859
|
+
return _regeneratorRuntime.wrap(function _callee109$(_context109) {
|
|
16767
16860
|
while (1) {
|
|
16768
|
-
switch (
|
|
16861
|
+
switch (_context109.prev = _context109.next) {
|
|
16769
16862
|
case 0:
|
|
16770
|
-
|
|
16863
|
+
_context109.next = 2;
|
|
16771
16864
|
return this.delete(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options/").concat(encodeURIComponent(optionId)), userId ? {
|
|
16772
16865
|
user_id: userId
|
|
16773
16866
|
} : {});
|
|
16774
16867
|
|
|
16775
16868
|
case 2:
|
|
16776
|
-
return
|
|
16869
|
+
return _context109.abrupt("return", _context109.sent);
|
|
16777
16870
|
|
|
16778
16871
|
case 3:
|
|
16779
16872
|
case "end":
|
|
16780
|
-
return
|
|
16873
|
+
return _context109.stop();
|
|
16781
16874
|
}
|
|
16782
16875
|
}
|
|
16783
|
-
},
|
|
16876
|
+
}, _callee109, this);
|
|
16784
16877
|
}));
|
|
16785
16878
|
|
|
16786
|
-
function deletePollOption(
|
|
16879
|
+
function deletePollOption(_x161, _x162, _x163) {
|
|
16787
16880
|
return _deletePollOption.apply(this, arguments);
|
|
16788
16881
|
}
|
|
16789
16882
|
|
|
@@ -16801,12 +16894,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16801
16894
|
}, {
|
|
16802
16895
|
key: "castPollVote",
|
|
16803
16896
|
value: function () {
|
|
16804
|
-
var _castPollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16805
|
-
return _regeneratorRuntime.wrap(function
|
|
16897
|
+
var _castPollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee110(messageId, pollId, vote, userId) {
|
|
16898
|
+
return _regeneratorRuntime.wrap(function _callee110$(_context110) {
|
|
16806
16899
|
while (1) {
|
|
16807
|
-
switch (
|
|
16900
|
+
switch (_context110.prev = _context110.next) {
|
|
16808
16901
|
case 0:
|
|
16809
|
-
|
|
16902
|
+
_context110.next = 2;
|
|
16810
16903
|
return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(messageId), "/polls/").concat(encodeURIComponent(pollId), "/vote"), _objectSpread({
|
|
16811
16904
|
vote: vote
|
|
16812
16905
|
}, userId ? {
|
|
@@ -16814,17 +16907,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16814
16907
|
} : {}));
|
|
16815
16908
|
|
|
16816
16909
|
case 2:
|
|
16817
|
-
return
|
|
16910
|
+
return _context110.abrupt("return", _context110.sent);
|
|
16818
16911
|
|
|
16819
16912
|
case 3:
|
|
16820
16913
|
case "end":
|
|
16821
|
-
return
|
|
16914
|
+
return _context110.stop();
|
|
16822
16915
|
}
|
|
16823
16916
|
}
|
|
16824
|
-
},
|
|
16917
|
+
}, _callee110, this);
|
|
16825
16918
|
}));
|
|
16826
16919
|
|
|
16827
|
-
function castPollVote(
|
|
16920
|
+
function castPollVote(_x164, _x165, _x166, _x167) {
|
|
16828
16921
|
return _castPollVote.apply(this, arguments);
|
|
16829
16922
|
}
|
|
16830
16923
|
|
|
@@ -16841,24 +16934,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16841
16934
|
}, {
|
|
16842
16935
|
key: "addPollAnswer",
|
|
16843
16936
|
value: function () {
|
|
16844
|
-
var _addPollAnswer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16845
|
-
return _regeneratorRuntime.wrap(function
|
|
16937
|
+
var _addPollAnswer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee111(messageId, pollId, answerText, userId) {
|
|
16938
|
+
return _regeneratorRuntime.wrap(function _callee111$(_context111) {
|
|
16846
16939
|
while (1) {
|
|
16847
|
-
switch (
|
|
16940
|
+
switch (_context111.prev = _context111.next) {
|
|
16848
16941
|
case 0:
|
|
16849
|
-
return
|
|
16942
|
+
return _context111.abrupt("return", this.castPollVote(messageId, pollId, {
|
|
16850
16943
|
answer_text: answerText
|
|
16851
16944
|
}, userId));
|
|
16852
16945
|
|
|
16853
16946
|
case 1:
|
|
16854
16947
|
case "end":
|
|
16855
|
-
return
|
|
16948
|
+
return _context111.stop();
|
|
16856
16949
|
}
|
|
16857
16950
|
}
|
|
16858
|
-
},
|
|
16951
|
+
}, _callee111, this);
|
|
16859
16952
|
}));
|
|
16860
16953
|
|
|
16861
|
-
function addPollAnswer(
|
|
16954
|
+
function addPollAnswer(_x168, _x169, _x170, _x171) {
|
|
16862
16955
|
return _addPollAnswer.apply(this, arguments);
|
|
16863
16956
|
}
|
|
16864
16957
|
|
|
@@ -16867,28 +16960,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16867
16960
|
}, {
|
|
16868
16961
|
key: "removePollVote",
|
|
16869
16962
|
value: function () {
|
|
16870
|
-
var _removePollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16871
|
-
return _regeneratorRuntime.wrap(function
|
|
16963
|
+
var _removePollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee112(messageId, pollId, voteId, userId) {
|
|
16964
|
+
return _regeneratorRuntime.wrap(function _callee112$(_context112) {
|
|
16872
16965
|
while (1) {
|
|
16873
|
-
switch (
|
|
16966
|
+
switch (_context112.prev = _context112.next) {
|
|
16874
16967
|
case 0:
|
|
16875
|
-
|
|
16968
|
+
_context112.next = 2;
|
|
16876
16969
|
return this.delete(this.baseURL + "/messages/".concat(encodeURIComponent(messageId), "/polls/").concat(encodeURIComponent(pollId), "/vote/").concat(encodeURIComponent(voteId)), _objectSpread({}, userId ? {
|
|
16877
16970
|
user_id: userId
|
|
16878
16971
|
} : {}));
|
|
16879
16972
|
|
|
16880
16973
|
case 2:
|
|
16881
|
-
return
|
|
16974
|
+
return _context112.abrupt("return", _context112.sent);
|
|
16882
16975
|
|
|
16883
16976
|
case 3:
|
|
16884
16977
|
case "end":
|
|
16885
|
-
return
|
|
16978
|
+
return _context112.stop();
|
|
16886
16979
|
}
|
|
16887
16980
|
}
|
|
16888
|
-
},
|
|
16981
|
+
}, _callee112, this);
|
|
16889
16982
|
}));
|
|
16890
16983
|
|
|
16891
|
-
function removePollVote(
|
|
16984
|
+
function removePollVote(_x172, _x173, _x174, _x175) {
|
|
16892
16985
|
return _removePollVote.apply(this, arguments);
|
|
16893
16986
|
}
|
|
16894
16987
|
|
|
@@ -16906,37 +16999,37 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16906
16999
|
}, {
|
|
16907
17000
|
key: "queryPolls",
|
|
16908
17001
|
value: function () {
|
|
16909
|
-
var _queryPolls = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
17002
|
+
var _queryPolls = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee113() {
|
|
16910
17003
|
var filter,
|
|
16911
17004
|
sort,
|
|
16912
17005
|
options,
|
|
16913
17006
|
userId,
|
|
16914
17007
|
q,
|
|
16915
|
-
|
|
16916
|
-
return _regeneratorRuntime.wrap(function
|
|
17008
|
+
_args113 = arguments;
|
|
17009
|
+
return _regeneratorRuntime.wrap(function _callee113$(_context113) {
|
|
16917
17010
|
while (1) {
|
|
16918
|
-
switch (
|
|
17011
|
+
switch (_context113.prev = _context113.next) {
|
|
16919
17012
|
case 0:
|
|
16920
|
-
filter =
|
|
16921
|
-
sort =
|
|
16922
|
-
options =
|
|
16923
|
-
userId =
|
|
17013
|
+
filter = _args113.length > 0 && _args113[0] !== undefined ? _args113[0] : {};
|
|
17014
|
+
sort = _args113.length > 1 && _args113[1] !== undefined ? _args113[1] : [];
|
|
17015
|
+
options = _args113.length > 2 && _args113[2] !== undefined ? _args113[2] : {};
|
|
17016
|
+
userId = _args113.length > 3 ? _args113[3] : undefined;
|
|
16924
17017
|
q = userId ? "?user_id=".concat(userId) : '';
|
|
16925
|
-
|
|
17018
|
+
_context113.next = 7;
|
|
16926
17019
|
return this.post(this.baseURL + "/polls/query".concat(q), _objectSpread({
|
|
16927
17020
|
filter: filter,
|
|
16928
17021
|
sort: normalizeQuerySort(sort)
|
|
16929
17022
|
}, options));
|
|
16930
17023
|
|
|
16931
17024
|
case 7:
|
|
16932
|
-
return
|
|
17025
|
+
return _context113.abrupt("return", _context113.sent);
|
|
16933
17026
|
|
|
16934
17027
|
case 8:
|
|
16935
17028
|
case "end":
|
|
16936
|
-
return
|
|
17029
|
+
return _context113.stop();
|
|
16937
17030
|
}
|
|
16938
17031
|
}
|
|
16939
|
-
},
|
|
17032
|
+
}, _callee113, this);
|
|
16940
17033
|
}));
|
|
16941
17034
|
|
|
16942
17035
|
function queryPolls() {
|
|
@@ -16958,40 +17051,40 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16958
17051
|
}, {
|
|
16959
17052
|
key: "queryPollVotes",
|
|
16960
17053
|
value: function () {
|
|
16961
|
-
var _queryPollVotes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
17054
|
+
var _queryPollVotes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee114(pollId) {
|
|
16962
17055
|
var filter,
|
|
16963
17056
|
sort,
|
|
16964
17057
|
options,
|
|
16965
17058
|
userId,
|
|
16966
17059
|
q,
|
|
16967
|
-
|
|
16968
|
-
return _regeneratorRuntime.wrap(function
|
|
17060
|
+
_args114 = arguments;
|
|
17061
|
+
return _regeneratorRuntime.wrap(function _callee114$(_context114) {
|
|
16969
17062
|
while (1) {
|
|
16970
|
-
switch (
|
|
17063
|
+
switch (_context114.prev = _context114.next) {
|
|
16971
17064
|
case 0:
|
|
16972
|
-
filter =
|
|
16973
|
-
sort =
|
|
16974
|
-
options =
|
|
16975
|
-
userId =
|
|
17065
|
+
filter = _args114.length > 1 && _args114[1] !== undefined ? _args114[1] : {};
|
|
17066
|
+
sort = _args114.length > 2 && _args114[2] !== undefined ? _args114[2] : [];
|
|
17067
|
+
options = _args114.length > 3 && _args114[3] !== undefined ? _args114[3] : {};
|
|
17068
|
+
userId = _args114.length > 4 ? _args114[4] : undefined;
|
|
16976
17069
|
q = userId ? "?user_id=".concat(userId) : '';
|
|
16977
|
-
|
|
17070
|
+
_context114.next = 7;
|
|
16978
17071
|
return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/votes").concat(q), _objectSpread({
|
|
16979
17072
|
filter: filter,
|
|
16980
17073
|
sort: normalizeQuerySort(sort)
|
|
16981
17074
|
}, options));
|
|
16982
17075
|
|
|
16983
17076
|
case 7:
|
|
16984
|
-
return
|
|
17077
|
+
return _context114.abrupt("return", _context114.sent);
|
|
16985
17078
|
|
|
16986
17079
|
case 8:
|
|
16987
17080
|
case "end":
|
|
16988
|
-
return
|
|
17081
|
+
return _context114.stop();
|
|
16989
17082
|
}
|
|
16990
17083
|
}
|
|
16991
|
-
},
|
|
17084
|
+
}, _callee114, this);
|
|
16992
17085
|
}));
|
|
16993
17086
|
|
|
16994
|
-
function queryPollVotes(
|
|
17087
|
+
function queryPollVotes(_x176) {
|
|
16995
17088
|
return _queryPollVotes.apply(this, arguments);
|
|
16996
17089
|
}
|
|
16997
17090
|
|
|
@@ -17010,23 +17103,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
17010
17103
|
}, {
|
|
17011
17104
|
key: "queryPollAnswers",
|
|
17012
17105
|
value: function () {
|
|
17013
|
-
var _queryPollAnswers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
17106
|
+
var _queryPollAnswers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee115(pollId) {
|
|
17014
17107
|
var filter,
|
|
17015
17108
|
sort,
|
|
17016
17109
|
options,
|
|
17017
17110
|
userId,
|
|
17018
17111
|
q,
|
|
17019
|
-
|
|
17020
|
-
return _regeneratorRuntime.wrap(function
|
|
17112
|
+
_args115 = arguments;
|
|
17113
|
+
return _regeneratorRuntime.wrap(function _callee115$(_context115) {
|
|
17021
17114
|
while (1) {
|
|
17022
|
-
switch (
|
|
17115
|
+
switch (_context115.prev = _context115.next) {
|
|
17023
17116
|
case 0:
|
|
17024
|
-
filter =
|
|
17025
|
-
sort =
|
|
17026
|
-
options =
|
|
17027
|
-
userId =
|
|
17117
|
+
filter = _args115.length > 1 && _args115[1] !== undefined ? _args115[1] : {};
|
|
17118
|
+
sort = _args115.length > 2 && _args115[2] !== undefined ? _args115[2] : [];
|
|
17119
|
+
options = _args115.length > 3 && _args115[3] !== undefined ? _args115[3] : {};
|
|
17120
|
+
userId = _args115.length > 4 ? _args115[4] : undefined;
|
|
17028
17121
|
q = userId ? "?user_id=".concat(userId) : '';
|
|
17029
|
-
|
|
17122
|
+
_context115.next = 7;
|
|
17030
17123
|
return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/votes").concat(q), _objectSpread({
|
|
17031
17124
|
filter: _objectSpread(_objectSpread({}, filter), {}, {
|
|
17032
17125
|
is_answer: true
|
|
@@ -17035,17 +17128,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
17035
17128
|
}, options));
|
|
17036
17129
|
|
|
17037
17130
|
case 7:
|
|
17038
|
-
return
|
|
17131
|
+
return _context115.abrupt("return", _context115.sent);
|
|
17039
17132
|
|
|
17040
17133
|
case 8:
|
|
17041
17134
|
case "end":
|
|
17042
|
-
return
|
|
17135
|
+
return _context115.stop();
|
|
17043
17136
|
}
|
|
17044
17137
|
}
|
|
17045
|
-
},
|
|
17138
|
+
}, _callee115, this);
|
|
17046
17139
|
}));
|
|
17047
17140
|
|
|
17048
|
-
function queryPollAnswers(
|
|
17141
|
+
function queryPollAnswers(_x177) {
|
|
17049
17142
|
return _queryPollAnswers.apply(this, arguments);
|
|
17050
17143
|
}
|
|
17051
17144
|
|
|
@@ -17062,33 +17155,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
17062
17155
|
}, {
|
|
17063
17156
|
key: "queryMessageHistory",
|
|
17064
17157
|
value: function () {
|
|
17065
|
-
var _queryMessageHistory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
17158
|
+
var _queryMessageHistory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee116() {
|
|
17066
17159
|
var filter,
|
|
17067
17160
|
sort,
|
|
17068
17161
|
options,
|
|
17069
|
-
|
|
17070
|
-
return _regeneratorRuntime.wrap(function
|
|
17162
|
+
_args116 = arguments;
|
|
17163
|
+
return _regeneratorRuntime.wrap(function _callee116$(_context116) {
|
|
17071
17164
|
while (1) {
|
|
17072
|
-
switch (
|
|
17165
|
+
switch (_context116.prev = _context116.next) {
|
|
17073
17166
|
case 0:
|
|
17074
|
-
filter =
|
|
17075
|
-
sort =
|
|
17076
|
-
options =
|
|
17077
|
-
|
|
17167
|
+
filter = _args116.length > 0 && _args116[0] !== undefined ? _args116[0] : {};
|
|
17168
|
+
sort = _args116.length > 1 && _args116[1] !== undefined ? _args116[1] : [];
|
|
17169
|
+
options = _args116.length > 2 && _args116[2] !== undefined ? _args116[2] : {};
|
|
17170
|
+
_context116.next = 5;
|
|
17078
17171
|
return this.post(this.baseURL + '/messages/history', _objectSpread({
|
|
17079
17172
|
filter: filter,
|
|
17080
17173
|
sort: normalizeQuerySort(sort)
|
|
17081
17174
|
}, options));
|
|
17082
17175
|
|
|
17083
17176
|
case 5:
|
|
17084
|
-
return
|
|
17177
|
+
return _context116.abrupt("return", _context116.sent);
|
|
17085
17178
|
|
|
17086
17179
|
case 6:
|
|
17087
17180
|
case "end":
|
|
17088
|
-
return
|
|
17181
|
+
return _context116.stop();
|
|
17089
17182
|
}
|
|
17090
17183
|
}
|
|
17091
|
-
},
|
|
17184
|
+
}, _callee116, this);
|
|
17092
17185
|
}));
|
|
17093
17186
|
|
|
17094
17187
|
function queryMessageHistory() {
|
|
@@ -17109,32 +17202,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
17109
17202
|
}, {
|
|
17110
17203
|
key: "updateFlags",
|
|
17111
17204
|
value: function () {
|
|
17112
|
-
var _updateFlags = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
17205
|
+
var _updateFlags = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee117(message_ids, reviewed_by) {
|
|
17113
17206
|
var options,
|
|
17114
|
-
|
|
17115
|
-
return _regeneratorRuntime.wrap(function
|
|
17207
|
+
_args117 = arguments;
|
|
17208
|
+
return _regeneratorRuntime.wrap(function _callee117$(_context117) {
|
|
17116
17209
|
while (1) {
|
|
17117
|
-
switch (
|
|
17210
|
+
switch (_context117.prev = _context117.next) {
|
|
17118
17211
|
case 0:
|
|
17119
|
-
options =
|
|
17120
|
-
|
|
17212
|
+
options = _args117.length > 2 && _args117[2] !== undefined ? _args117[2] : {};
|
|
17213
|
+
_context117.next = 3;
|
|
17121
17214
|
return this.post(this.baseURL + '/automod/v1/moderation/update_flags', _objectSpread({
|
|
17122
17215
|
message_ids: message_ids,
|
|
17123
17216
|
reviewed_by: reviewed_by
|
|
17124
17217
|
}, options));
|
|
17125
17218
|
|
|
17126
17219
|
case 3:
|
|
17127
|
-
return
|
|
17220
|
+
return _context117.abrupt("return", _context117.sent);
|
|
17128
17221
|
|
|
17129
17222
|
case 4:
|
|
17130
17223
|
case "end":
|
|
17131
|
-
return
|
|
17224
|
+
return _context117.stop();
|
|
17132
17225
|
}
|
|
17133
17226
|
}
|
|
17134
|
-
},
|
|
17227
|
+
}, _callee117, this);
|
|
17135
17228
|
}));
|
|
17136
17229
|
|
|
17137
|
-
function updateFlags(
|
|
17230
|
+
function updateFlags(_x178, _x179) {
|
|
17138
17231
|
return _updateFlags.apply(this, arguments);
|
|
17139
17232
|
}
|
|
17140
17233
|
|