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