stream-chat 8.52.3 → 8.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.es.js +889 -796
- package/dist/browser.es.js.map +1 -1
- package/dist/browser.full-bundle.min.js +1 -1
- package/dist/browser.full-bundle.min.js.map +1 -1
- package/dist/browser.js +889 -796
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +889 -796
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +889 -796
- package/dist/index.js.map +1 -1
- package/dist/types/channel.d.ts +2 -1
- package/dist/types/channel.d.ts.map +1 -1
- package/dist/types/client.d.ts +67 -4
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/constants.d.ts.map +1 -1
- package/dist/types/types.d.ts +20 -0
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/channel.ts +2 -0
- package/src/client.ts +67 -6
- package/src/constants.ts +1 -1
- package/src/types.ts +25 -0
- package/src/utils.ts +1 -0
package/dist/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.54.0");
|
|
14974
15016
|
}
|
|
14975
15017
|
}, {
|
|
14976
15018
|
key: "setUserAgent",
|
|
@@ -15189,57 +15231,108 @@ 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
|
|
|
15217
15259
|
return sendUserCustomEvent;
|
|
15218
15260
|
}()
|
|
15261
|
+
/**
|
|
15262
|
+
* Creates a new block list
|
|
15263
|
+
*
|
|
15264
|
+
* @param {BlockList} blockList - The block list to create
|
|
15265
|
+
* @param {string} blockList.name - The name of the block list
|
|
15266
|
+
* @param {string[]} blockList.words - List of words to block
|
|
15267
|
+
* @param {string} [blockList.team] - Team ID the block list belongs to
|
|
15268
|
+
*
|
|
15269
|
+
* @returns {Promise<APIResponse>} The server response
|
|
15270
|
+
*/
|
|
15271
|
+
|
|
15219
15272
|
}, {
|
|
15220
15273
|
key: "createBlockList",
|
|
15221
15274
|
value: function createBlockList(blockList) {
|
|
15222
15275
|
return this.post("".concat(this.baseURL, "/blocklists"), blockList);
|
|
15223
15276
|
}
|
|
15277
|
+
/**
|
|
15278
|
+
* Lists all block lists
|
|
15279
|
+
*
|
|
15280
|
+
* @param {Object} [data] - Query parameters
|
|
15281
|
+
* @param {string} [data.team] - Team ID to filter block lists by
|
|
15282
|
+
*
|
|
15283
|
+
* @returns {Promise<APIResponse & {blocklists: BlockListResponse[]}>} Response containing array of block lists
|
|
15284
|
+
*/
|
|
15285
|
+
|
|
15224
15286
|
}, {
|
|
15225
15287
|
key: "listBlockLists",
|
|
15226
|
-
value: function listBlockLists() {
|
|
15227
|
-
return this.get("".concat(this.baseURL, "/blocklists"));
|
|
15288
|
+
value: function listBlockLists(data) {
|
|
15289
|
+
return this.get("".concat(this.baseURL, "/blocklists"), data);
|
|
15228
15290
|
}
|
|
15291
|
+
/**
|
|
15292
|
+
* Gets a specific block list
|
|
15293
|
+
*
|
|
15294
|
+
* @param {string} name - The name of the block list to retrieve
|
|
15295
|
+
* @param {Object} [data] - Query parameters
|
|
15296
|
+
* @param {string} [data.team] - Team ID that blocklist belongs to
|
|
15297
|
+
*
|
|
15298
|
+
* @returns {Promise<APIResponse & {blocklist: BlockListResponse}>} Response containing the block list
|
|
15299
|
+
*/
|
|
15300
|
+
|
|
15229
15301
|
}, {
|
|
15230
15302
|
key: "getBlockList",
|
|
15231
|
-
value: function getBlockList(name) {
|
|
15232
|
-
return this.get("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)));
|
|
15303
|
+
value: function getBlockList(name, data) {
|
|
15304
|
+
return this.get("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)), data);
|
|
15233
15305
|
}
|
|
15306
|
+
/**
|
|
15307
|
+
* Updates an existing block list
|
|
15308
|
+
*
|
|
15309
|
+
* @param {string} name - The name of the block list to update
|
|
15310
|
+
* @param {Object} data - The update data
|
|
15311
|
+
* @param {string[]} data.words - New list of words to block
|
|
15312
|
+
* @param {string} [data.team] - Team ID that blocklist belongs to
|
|
15313
|
+
*
|
|
15314
|
+
* @returns {Promise<APIResponse>} The server response
|
|
15315
|
+
*/
|
|
15316
|
+
|
|
15234
15317
|
}, {
|
|
15235
15318
|
key: "updateBlockList",
|
|
15236
15319
|
value: function updateBlockList(name, data) {
|
|
15237
15320
|
return this.put("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)), data);
|
|
15238
15321
|
}
|
|
15322
|
+
/**
|
|
15323
|
+
* Deletes a block list
|
|
15324
|
+
*
|
|
15325
|
+
* @param {string} name - The name of the block list to delete
|
|
15326
|
+
* @param {Object} [data] - Query parameters
|
|
15327
|
+
* @param {string} [data.team] - Team ID that blocklist belongs to
|
|
15328
|
+
*
|
|
15329
|
+
* @returns {Promise<APIResponse>} The server response
|
|
15330
|
+
*/
|
|
15331
|
+
|
|
15239
15332
|
}, {
|
|
15240
15333
|
key: "deleteBlockList",
|
|
15241
|
-
value: function deleteBlockList(name) {
|
|
15242
|
-
return this.delete("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)));
|
|
15334
|
+
value: function deleteBlockList(name, data) {
|
|
15335
|
+
return this.delete("".concat(this.baseURL, "/blocklists/").concat(encodeURIComponent(name)), data);
|
|
15243
15336
|
}
|
|
15244
15337
|
}, {
|
|
15245
15338
|
key: "exportChannels",
|
|
@@ -15307,28 +15400,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15307
15400
|
}, {
|
|
15308
15401
|
key: "createSegment",
|
|
15309
15402
|
value: function () {
|
|
15310
|
-
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15403
|
+
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(type, id, data) {
|
|
15311
15404
|
var body;
|
|
15312
|
-
return _regeneratorRuntime.wrap(function
|
|
15405
|
+
return _regeneratorRuntime.wrap(function _callee70$(_context70) {
|
|
15313
15406
|
while (1) {
|
|
15314
|
-
switch (
|
|
15407
|
+
switch (_context70.prev = _context70.next) {
|
|
15315
15408
|
case 0:
|
|
15316
15409
|
this.validateServerSideAuth();
|
|
15317
15410
|
body = _objectSpread({
|
|
15318
15411
|
id: id,
|
|
15319
15412
|
type: type
|
|
15320
15413
|
}, data);
|
|
15321
|
-
return
|
|
15414
|
+
return _context70.abrupt("return", this.post(this.baseURL + "/segments", body));
|
|
15322
15415
|
|
|
15323
15416
|
case 3:
|
|
15324
15417
|
case "end":
|
|
15325
|
-
return
|
|
15418
|
+
return _context70.stop();
|
|
15326
15419
|
}
|
|
15327
15420
|
}
|
|
15328
|
-
},
|
|
15421
|
+
}, _callee70, this);
|
|
15329
15422
|
}));
|
|
15330
15423
|
|
|
15331
|
-
function createSegment(
|
|
15424
|
+
function createSegment(_x97, _x98, _x99) {
|
|
15332
15425
|
return _createSegment.apply(this, arguments);
|
|
15333
15426
|
}
|
|
15334
15427
|
|
|
@@ -15347,23 +15440,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15347
15440
|
}, {
|
|
15348
15441
|
key: "createUserSegment",
|
|
15349
15442
|
value: function () {
|
|
15350
|
-
var _createUserSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15351
|
-
return _regeneratorRuntime.wrap(function
|
|
15443
|
+
var _createUserSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(id, data) {
|
|
15444
|
+
return _regeneratorRuntime.wrap(function _callee71$(_context71) {
|
|
15352
15445
|
while (1) {
|
|
15353
|
-
switch (
|
|
15446
|
+
switch (_context71.prev = _context71.next) {
|
|
15354
15447
|
case 0:
|
|
15355
15448
|
this.validateServerSideAuth();
|
|
15356
|
-
return
|
|
15449
|
+
return _context71.abrupt("return", this.createSegment('user', id, data));
|
|
15357
15450
|
|
|
15358
15451
|
case 2:
|
|
15359
15452
|
case "end":
|
|
15360
|
-
return
|
|
15453
|
+
return _context71.stop();
|
|
15361
15454
|
}
|
|
15362
15455
|
}
|
|
15363
|
-
},
|
|
15456
|
+
}, _callee71, this);
|
|
15364
15457
|
}));
|
|
15365
15458
|
|
|
15366
|
-
function createUserSegment(
|
|
15459
|
+
function createUserSegment(_x100, _x101) {
|
|
15367
15460
|
return _createUserSegment.apply(this, arguments);
|
|
15368
15461
|
}
|
|
15369
15462
|
|
|
@@ -15382,23 +15475,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15382
15475
|
}, {
|
|
15383
15476
|
key: "createChannelSegment",
|
|
15384
15477
|
value: function () {
|
|
15385
|
-
var _createChannelSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15386
|
-
return _regeneratorRuntime.wrap(function
|
|
15478
|
+
var _createChannelSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(id, data) {
|
|
15479
|
+
return _regeneratorRuntime.wrap(function _callee72$(_context72) {
|
|
15387
15480
|
while (1) {
|
|
15388
|
-
switch (
|
|
15481
|
+
switch (_context72.prev = _context72.next) {
|
|
15389
15482
|
case 0:
|
|
15390
15483
|
this.validateServerSideAuth();
|
|
15391
|
-
return
|
|
15484
|
+
return _context72.abrupt("return", this.createSegment('channel', id, data));
|
|
15392
15485
|
|
|
15393
15486
|
case 2:
|
|
15394
15487
|
case "end":
|
|
15395
|
-
return
|
|
15488
|
+
return _context72.stop();
|
|
15396
15489
|
}
|
|
15397
15490
|
}
|
|
15398
|
-
},
|
|
15491
|
+
}, _callee72, this);
|
|
15399
15492
|
}));
|
|
15400
15493
|
|
|
15401
|
-
function createChannelSegment(
|
|
15494
|
+
function createChannelSegment(_x102, _x103) {
|
|
15402
15495
|
return _createChannelSegment.apply(this, arguments);
|
|
15403
15496
|
}
|
|
15404
15497
|
|
|
@@ -15407,23 +15500,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15407
15500
|
}, {
|
|
15408
15501
|
key: "getSegment",
|
|
15409
15502
|
value: function () {
|
|
15410
|
-
var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15411
|
-
return _regeneratorRuntime.wrap(function
|
|
15503
|
+
var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(id) {
|
|
15504
|
+
return _regeneratorRuntime.wrap(function _callee73$(_context73) {
|
|
15412
15505
|
while (1) {
|
|
15413
|
-
switch (
|
|
15506
|
+
switch (_context73.prev = _context73.next) {
|
|
15414
15507
|
case 0:
|
|
15415
15508
|
this.validateServerSideAuth();
|
|
15416
|
-
return
|
|
15509
|
+
return _context73.abrupt("return", this.get(this.baseURL + "/segments/".concat(encodeURIComponent(id))));
|
|
15417
15510
|
|
|
15418
15511
|
case 2:
|
|
15419
15512
|
case "end":
|
|
15420
|
-
return
|
|
15513
|
+
return _context73.stop();
|
|
15421
15514
|
}
|
|
15422
15515
|
}
|
|
15423
|
-
},
|
|
15516
|
+
}, _callee73, this);
|
|
15424
15517
|
}));
|
|
15425
15518
|
|
|
15426
|
-
function getSegment(
|
|
15519
|
+
function getSegment(_x104) {
|
|
15427
15520
|
return _getSegment.apply(this, arguments);
|
|
15428
15521
|
}
|
|
15429
15522
|
|
|
@@ -15441,23 +15534,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15441
15534
|
}, {
|
|
15442
15535
|
key: "updateSegment",
|
|
15443
15536
|
value: function () {
|
|
15444
|
-
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15445
|
-
return _regeneratorRuntime.wrap(function
|
|
15537
|
+
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(id, data) {
|
|
15538
|
+
return _regeneratorRuntime.wrap(function _callee74$(_context74) {
|
|
15446
15539
|
while (1) {
|
|
15447
|
-
switch (
|
|
15540
|
+
switch (_context74.prev = _context74.next) {
|
|
15448
15541
|
case 0:
|
|
15449
15542
|
this.validateServerSideAuth();
|
|
15450
|
-
return
|
|
15543
|
+
return _context74.abrupt("return", this.put(this.baseURL + "/segments/".concat(encodeURIComponent(id)), data));
|
|
15451
15544
|
|
|
15452
15545
|
case 2:
|
|
15453
15546
|
case "end":
|
|
15454
|
-
return
|
|
15547
|
+
return _context74.stop();
|
|
15455
15548
|
}
|
|
15456
15549
|
}
|
|
15457
|
-
},
|
|
15550
|
+
}, _callee74, this);
|
|
15458
15551
|
}));
|
|
15459
15552
|
|
|
15460
|
-
function updateSegment(
|
|
15553
|
+
function updateSegment(_x105, _x106) {
|
|
15461
15554
|
return _updateSegment.apply(this, arguments);
|
|
15462
15555
|
}
|
|
15463
15556
|
|
|
@@ -15475,27 +15568,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15475
15568
|
}, {
|
|
15476
15569
|
key: "addSegmentTargets",
|
|
15477
15570
|
value: function () {
|
|
15478
|
-
var _addSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15571
|
+
var _addSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(id, targets) {
|
|
15479
15572
|
var body;
|
|
15480
|
-
return _regeneratorRuntime.wrap(function
|
|
15573
|
+
return _regeneratorRuntime.wrap(function _callee75$(_context75) {
|
|
15481
15574
|
while (1) {
|
|
15482
|
-
switch (
|
|
15575
|
+
switch (_context75.prev = _context75.next) {
|
|
15483
15576
|
case 0:
|
|
15484
15577
|
this.validateServerSideAuth();
|
|
15485
15578
|
body = {
|
|
15486
15579
|
target_ids: targets
|
|
15487
15580
|
};
|
|
15488
|
-
return
|
|
15581
|
+
return _context75.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/addtargets"), body));
|
|
15489
15582
|
|
|
15490
15583
|
case 3:
|
|
15491
15584
|
case "end":
|
|
15492
|
-
return
|
|
15585
|
+
return _context75.stop();
|
|
15493
15586
|
}
|
|
15494
15587
|
}
|
|
15495
|
-
},
|
|
15588
|
+
}, _callee75, this);
|
|
15496
15589
|
}));
|
|
15497
15590
|
|
|
15498
|
-
function addSegmentTargets(
|
|
15591
|
+
function addSegmentTargets(_x107, _x108) {
|
|
15499
15592
|
return _addSegmentTargets.apply(this, arguments);
|
|
15500
15593
|
}
|
|
15501
15594
|
|
|
@@ -15504,33 +15597,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15504
15597
|
}, {
|
|
15505
15598
|
key: "querySegmentTargets",
|
|
15506
15599
|
value: function () {
|
|
15507
|
-
var _querySegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15600
|
+
var _querySegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(id) {
|
|
15508
15601
|
var filter,
|
|
15509
15602
|
sort,
|
|
15510
15603
|
options,
|
|
15511
|
-
|
|
15512
|
-
return _regeneratorRuntime.wrap(function
|
|
15604
|
+
_args76 = arguments;
|
|
15605
|
+
return _regeneratorRuntime.wrap(function _callee76$(_context76) {
|
|
15513
15606
|
while (1) {
|
|
15514
|
-
switch (
|
|
15607
|
+
switch (_context76.prev = _context76.next) {
|
|
15515
15608
|
case 0:
|
|
15516
|
-
filter =
|
|
15517
|
-
sort =
|
|
15518
|
-
options =
|
|
15609
|
+
filter = _args76.length > 1 && _args76[1] !== undefined ? _args76[1] : {};
|
|
15610
|
+
sort = _args76.length > 2 && _args76[2] !== undefined ? _args76[2] : [];
|
|
15611
|
+
options = _args76.length > 3 && _args76[3] !== undefined ? _args76[3] : {};
|
|
15519
15612
|
this.validateServerSideAuth();
|
|
15520
|
-
return
|
|
15613
|
+
return _context76.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/targets/query"), _objectSpread({
|
|
15521
15614
|
filter: filter || {},
|
|
15522
15615
|
sort: sort || []
|
|
15523
15616
|
}, options)));
|
|
15524
15617
|
|
|
15525
15618
|
case 5:
|
|
15526
15619
|
case "end":
|
|
15527
|
-
return
|
|
15620
|
+
return _context76.stop();
|
|
15528
15621
|
}
|
|
15529
15622
|
}
|
|
15530
|
-
},
|
|
15623
|
+
}, _callee76, this);
|
|
15531
15624
|
}));
|
|
15532
15625
|
|
|
15533
|
-
function querySegmentTargets(
|
|
15626
|
+
function querySegmentTargets(_x109) {
|
|
15534
15627
|
return _querySegmentTargets.apply(this, arguments);
|
|
15535
15628
|
}
|
|
15536
15629
|
|
|
@@ -15548,27 +15641,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15548
15641
|
}, {
|
|
15549
15642
|
key: "removeSegmentTargets",
|
|
15550
15643
|
value: function () {
|
|
15551
|
-
var _removeSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15644
|
+
var _removeSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77(id, targets) {
|
|
15552
15645
|
var body;
|
|
15553
|
-
return _regeneratorRuntime.wrap(function
|
|
15646
|
+
return _regeneratorRuntime.wrap(function _callee77$(_context77) {
|
|
15554
15647
|
while (1) {
|
|
15555
|
-
switch (
|
|
15648
|
+
switch (_context77.prev = _context77.next) {
|
|
15556
15649
|
case 0:
|
|
15557
15650
|
this.validateServerSideAuth();
|
|
15558
15651
|
body = {
|
|
15559
15652
|
target_ids: targets
|
|
15560
15653
|
};
|
|
15561
|
-
return
|
|
15654
|
+
return _context77.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/deletetargets"), body));
|
|
15562
15655
|
|
|
15563
15656
|
case 3:
|
|
15564
15657
|
case "end":
|
|
15565
|
-
return
|
|
15658
|
+
return _context77.stop();
|
|
15566
15659
|
}
|
|
15567
15660
|
}
|
|
15568
|
-
},
|
|
15661
|
+
}, _callee77, this);
|
|
15569
15662
|
}));
|
|
15570
15663
|
|
|
15571
|
-
function removeSegmentTargets(
|
|
15664
|
+
function removeSegmentTargets(_x110, _x111) {
|
|
15572
15665
|
return _removeSegmentTargets.apply(this, arguments);
|
|
15573
15666
|
}
|
|
15574
15667
|
|
|
@@ -15586,29 +15679,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15586
15679
|
}, {
|
|
15587
15680
|
key: "querySegments",
|
|
15588
15681
|
value: function () {
|
|
15589
|
-
var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15682
|
+
var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78(filter, sort) {
|
|
15590
15683
|
var options,
|
|
15591
|
-
|
|
15592
|
-
return _regeneratorRuntime.wrap(function
|
|
15684
|
+
_args78 = arguments;
|
|
15685
|
+
return _regeneratorRuntime.wrap(function _callee78$(_context78) {
|
|
15593
15686
|
while (1) {
|
|
15594
|
-
switch (
|
|
15687
|
+
switch (_context78.prev = _context78.next) {
|
|
15595
15688
|
case 0:
|
|
15596
|
-
options =
|
|
15689
|
+
options = _args78.length > 2 && _args78[2] !== undefined ? _args78[2] : {};
|
|
15597
15690
|
this.validateServerSideAuth();
|
|
15598
|
-
return
|
|
15691
|
+
return _context78.abrupt("return", this.post(this.baseURL + "/segments/query", _objectSpread({
|
|
15599
15692
|
filter: filter,
|
|
15600
15693
|
sort: sort
|
|
15601
15694
|
}, options)));
|
|
15602
15695
|
|
|
15603
15696
|
case 3:
|
|
15604
15697
|
case "end":
|
|
15605
|
-
return
|
|
15698
|
+
return _context78.stop();
|
|
15606
15699
|
}
|
|
15607
15700
|
}
|
|
15608
|
-
},
|
|
15701
|
+
}, _callee78, this);
|
|
15609
15702
|
}));
|
|
15610
15703
|
|
|
15611
|
-
function querySegments(
|
|
15704
|
+
function querySegments(_x112, _x113) {
|
|
15612
15705
|
return _querySegments.apply(this, arguments);
|
|
15613
15706
|
}
|
|
15614
15707
|
|
|
@@ -15625,23 +15718,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15625
15718
|
}, {
|
|
15626
15719
|
key: "deleteSegment",
|
|
15627
15720
|
value: function () {
|
|
15628
|
-
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15629
|
-
return _regeneratorRuntime.wrap(function
|
|
15721
|
+
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(id) {
|
|
15722
|
+
return _regeneratorRuntime.wrap(function _callee79$(_context79) {
|
|
15630
15723
|
while (1) {
|
|
15631
|
-
switch (
|
|
15724
|
+
switch (_context79.prev = _context79.next) {
|
|
15632
15725
|
case 0:
|
|
15633
15726
|
this.validateServerSideAuth();
|
|
15634
|
-
return
|
|
15727
|
+
return _context79.abrupt("return", this.delete(this.baseURL + "/segments/".concat(encodeURIComponent(id))));
|
|
15635
15728
|
|
|
15636
15729
|
case 2:
|
|
15637
15730
|
case "end":
|
|
15638
|
-
return
|
|
15731
|
+
return _context79.stop();
|
|
15639
15732
|
}
|
|
15640
15733
|
}
|
|
15641
|
-
},
|
|
15734
|
+
}, _callee79, this);
|
|
15642
15735
|
}));
|
|
15643
15736
|
|
|
15644
|
-
function deleteSegment(
|
|
15737
|
+
function deleteSegment(_x114) {
|
|
15645
15738
|
return _deleteSegment.apply(this, arguments);
|
|
15646
15739
|
}
|
|
15647
15740
|
|
|
@@ -15659,23 +15752,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15659
15752
|
}, {
|
|
15660
15753
|
key: "segmentTargetExists",
|
|
15661
15754
|
value: function () {
|
|
15662
|
-
var _segmentTargetExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15663
|
-
return _regeneratorRuntime.wrap(function
|
|
15755
|
+
var _segmentTargetExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee80(segmentId, targetId) {
|
|
15756
|
+
return _regeneratorRuntime.wrap(function _callee80$(_context80) {
|
|
15664
15757
|
while (1) {
|
|
15665
|
-
switch (
|
|
15758
|
+
switch (_context80.prev = _context80.next) {
|
|
15666
15759
|
case 0:
|
|
15667
15760
|
this.validateServerSideAuth();
|
|
15668
|
-
return
|
|
15761
|
+
return _context80.abrupt("return", this.get(this.baseURL + "/segments/".concat(encodeURIComponent(segmentId), "/target/").concat(encodeURIComponent(targetId))));
|
|
15669
15762
|
|
|
15670
15763
|
case 2:
|
|
15671
15764
|
case "end":
|
|
15672
|
-
return
|
|
15765
|
+
return _context80.stop();
|
|
15673
15766
|
}
|
|
15674
15767
|
}
|
|
15675
|
-
},
|
|
15768
|
+
}, _callee80, this);
|
|
15676
15769
|
}));
|
|
15677
15770
|
|
|
15678
|
-
function segmentTargetExists(
|
|
15771
|
+
function segmentTargetExists(_x115, _x116) {
|
|
15679
15772
|
return _segmentTargetExists.apply(this, arguments);
|
|
15680
15773
|
}
|
|
15681
15774
|
|
|
@@ -15692,23 +15785,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15692
15785
|
}, {
|
|
15693
15786
|
key: "createCampaign",
|
|
15694
15787
|
value: function () {
|
|
15695
|
-
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15696
|
-
return _regeneratorRuntime.wrap(function
|
|
15788
|
+
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee81(params) {
|
|
15789
|
+
return _regeneratorRuntime.wrap(function _callee81$(_context81) {
|
|
15697
15790
|
while (1) {
|
|
15698
|
-
switch (
|
|
15791
|
+
switch (_context81.prev = _context81.next) {
|
|
15699
15792
|
case 0:
|
|
15700
15793
|
this.validateServerSideAuth();
|
|
15701
|
-
return
|
|
15794
|
+
return _context81.abrupt("return", this.post(this.baseURL + "/campaigns", _objectSpread({}, params)));
|
|
15702
15795
|
|
|
15703
15796
|
case 2:
|
|
15704
15797
|
case "end":
|
|
15705
|
-
return
|
|
15798
|
+
return _context81.stop();
|
|
15706
15799
|
}
|
|
15707
15800
|
}
|
|
15708
|
-
},
|
|
15801
|
+
}, _callee81, this);
|
|
15709
15802
|
}));
|
|
15710
15803
|
|
|
15711
|
-
function createCampaign(
|
|
15804
|
+
function createCampaign(_x117) {
|
|
15712
15805
|
return _createCampaign.apply(this, arguments);
|
|
15713
15806
|
}
|
|
15714
15807
|
|
|
@@ -15717,23 +15810,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15717
15810
|
}, {
|
|
15718
15811
|
key: "getCampaign",
|
|
15719
15812
|
value: function () {
|
|
15720
|
-
var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15721
|
-
return _regeneratorRuntime.wrap(function
|
|
15813
|
+
var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee82(id) {
|
|
15814
|
+
return _regeneratorRuntime.wrap(function _callee82$(_context82) {
|
|
15722
15815
|
while (1) {
|
|
15723
|
-
switch (
|
|
15816
|
+
switch (_context82.prev = _context82.next) {
|
|
15724
15817
|
case 0:
|
|
15725
15818
|
this.validateServerSideAuth();
|
|
15726
|
-
return
|
|
15819
|
+
return _context82.abrupt("return", this.get(this.baseURL + "/campaigns/".concat(encodeURIComponent(id))));
|
|
15727
15820
|
|
|
15728
15821
|
case 2:
|
|
15729
15822
|
case "end":
|
|
15730
|
-
return
|
|
15823
|
+
return _context82.stop();
|
|
15731
15824
|
}
|
|
15732
15825
|
}
|
|
15733
|
-
},
|
|
15826
|
+
}, _callee82, this);
|
|
15734
15827
|
}));
|
|
15735
15828
|
|
|
15736
|
-
function getCampaign(
|
|
15829
|
+
function getCampaign(_x118) {
|
|
15737
15830
|
return _getCampaign.apply(this, arguments);
|
|
15738
15831
|
}
|
|
15739
15832
|
|
|
@@ -15742,26 +15835,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15742
15835
|
}, {
|
|
15743
15836
|
key: "startCampaign",
|
|
15744
15837
|
value: function () {
|
|
15745
|
-
var _startCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15746
|
-
return _regeneratorRuntime.wrap(function
|
|
15838
|
+
var _startCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee83(id, options) {
|
|
15839
|
+
return _regeneratorRuntime.wrap(function _callee83$(_context83) {
|
|
15747
15840
|
while (1) {
|
|
15748
|
-
switch (
|
|
15841
|
+
switch (_context83.prev = _context83.next) {
|
|
15749
15842
|
case 0:
|
|
15750
15843
|
this.validateServerSideAuth();
|
|
15751
|
-
return
|
|
15844
|
+
return _context83.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(encodeURIComponent(id), "/start"), {
|
|
15752
15845
|
scheduled_for: options === null || options === void 0 ? void 0 : options.scheduledFor,
|
|
15753
15846
|
stop_at: options === null || options === void 0 ? void 0 : options.stopAt
|
|
15754
15847
|
}));
|
|
15755
15848
|
|
|
15756
15849
|
case 2:
|
|
15757
15850
|
case "end":
|
|
15758
|
-
return
|
|
15851
|
+
return _context83.stop();
|
|
15759
15852
|
}
|
|
15760
15853
|
}
|
|
15761
|
-
},
|
|
15854
|
+
}, _callee83, this);
|
|
15762
15855
|
}));
|
|
15763
15856
|
|
|
15764
|
-
function startCampaign(
|
|
15857
|
+
function startCampaign(_x119, _x120) {
|
|
15765
15858
|
return _startCampaign.apply(this, arguments);
|
|
15766
15859
|
}
|
|
15767
15860
|
|
|
@@ -15777,30 +15870,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15777
15870
|
}, {
|
|
15778
15871
|
key: "queryCampaigns",
|
|
15779
15872
|
value: function () {
|
|
15780
|
-
var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15781
|
-
return _regeneratorRuntime.wrap(function
|
|
15873
|
+
var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee84(filter, sort, options) {
|
|
15874
|
+
return _regeneratorRuntime.wrap(function _callee84$(_context84) {
|
|
15782
15875
|
while (1) {
|
|
15783
|
-
switch (
|
|
15876
|
+
switch (_context84.prev = _context84.next) {
|
|
15784
15877
|
case 0:
|
|
15785
15878
|
this.validateServerSideAuth();
|
|
15786
|
-
|
|
15879
|
+
_context84.next = 3;
|
|
15787
15880
|
return this.post(this.baseURL + "/campaigns/query", _objectSpread({
|
|
15788
15881
|
filter: filter,
|
|
15789
15882
|
sort: sort
|
|
15790
15883
|
}, options || {}));
|
|
15791
15884
|
|
|
15792
15885
|
case 3:
|
|
15793
|
-
return
|
|
15886
|
+
return _context84.abrupt("return", _context84.sent);
|
|
15794
15887
|
|
|
15795
15888
|
case 4:
|
|
15796
15889
|
case "end":
|
|
15797
|
-
return
|
|
15890
|
+
return _context84.stop();
|
|
15798
15891
|
}
|
|
15799
15892
|
}
|
|
15800
|
-
},
|
|
15893
|
+
}, _callee84, this);
|
|
15801
15894
|
}));
|
|
15802
15895
|
|
|
15803
|
-
function queryCampaigns(
|
|
15896
|
+
function queryCampaigns(_x121, _x122, _x123) {
|
|
15804
15897
|
return _queryCampaigns.apply(this, arguments);
|
|
15805
15898
|
}
|
|
15806
15899
|
|
|
@@ -15818,23 +15911,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15818
15911
|
}, {
|
|
15819
15912
|
key: "updateCampaign",
|
|
15820
15913
|
value: function () {
|
|
15821
|
-
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15822
|
-
return _regeneratorRuntime.wrap(function
|
|
15914
|
+
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee85(id, params) {
|
|
15915
|
+
return _regeneratorRuntime.wrap(function _callee85$(_context85) {
|
|
15823
15916
|
while (1) {
|
|
15824
|
-
switch (
|
|
15917
|
+
switch (_context85.prev = _context85.next) {
|
|
15825
15918
|
case 0:
|
|
15826
15919
|
this.validateServerSideAuth();
|
|
15827
|
-
return
|
|
15920
|
+
return _context85.abrupt("return", this.put(this.baseURL + "/campaigns/".concat(encodeURIComponent(id)), params));
|
|
15828
15921
|
|
|
15829
15922
|
case 2:
|
|
15830
15923
|
case "end":
|
|
15831
|
-
return
|
|
15924
|
+
return _context85.stop();
|
|
15832
15925
|
}
|
|
15833
15926
|
}
|
|
15834
|
-
},
|
|
15927
|
+
}, _callee85, this);
|
|
15835
15928
|
}));
|
|
15836
15929
|
|
|
15837
|
-
function updateCampaign(
|
|
15930
|
+
function updateCampaign(_x124, _x125) {
|
|
15838
15931
|
return _updateCampaign.apply(this, arguments);
|
|
15839
15932
|
}
|
|
15840
15933
|
|
|
@@ -15851,23 +15944,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15851
15944
|
}, {
|
|
15852
15945
|
key: "deleteCampaign",
|
|
15853
15946
|
value: function () {
|
|
15854
|
-
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15855
|
-
return _regeneratorRuntime.wrap(function
|
|
15947
|
+
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee86(id) {
|
|
15948
|
+
return _regeneratorRuntime.wrap(function _callee86$(_context86) {
|
|
15856
15949
|
while (1) {
|
|
15857
|
-
switch (
|
|
15950
|
+
switch (_context86.prev = _context86.next) {
|
|
15858
15951
|
case 0:
|
|
15859
15952
|
this.validateServerSideAuth();
|
|
15860
|
-
return
|
|
15953
|
+
return _context86.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(encodeURIComponent(id))));
|
|
15861
15954
|
|
|
15862
15955
|
case 2:
|
|
15863
15956
|
case "end":
|
|
15864
|
-
return
|
|
15957
|
+
return _context86.stop();
|
|
15865
15958
|
}
|
|
15866
15959
|
}
|
|
15867
|
-
},
|
|
15960
|
+
}, _callee86, this);
|
|
15868
15961
|
}));
|
|
15869
15962
|
|
|
15870
|
-
function deleteCampaign(
|
|
15963
|
+
function deleteCampaign(_x126) {
|
|
15871
15964
|
return _deleteCampaign.apply(this, arguments);
|
|
15872
15965
|
}
|
|
15873
15966
|
|
|
@@ -15884,23 +15977,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15884
15977
|
}, {
|
|
15885
15978
|
key: "stopCampaign",
|
|
15886
15979
|
value: function () {
|
|
15887
|
-
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15888
|
-
return _regeneratorRuntime.wrap(function
|
|
15980
|
+
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee87(id) {
|
|
15981
|
+
return _regeneratorRuntime.wrap(function _callee87$(_context87) {
|
|
15889
15982
|
while (1) {
|
|
15890
|
-
switch (
|
|
15983
|
+
switch (_context87.prev = _context87.next) {
|
|
15891
15984
|
case 0:
|
|
15892
15985
|
this.validateServerSideAuth();
|
|
15893
|
-
return
|
|
15986
|
+
return _context87.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(encodeURIComponent(id), "/stop")));
|
|
15894
15987
|
|
|
15895
15988
|
case 2:
|
|
15896
15989
|
case "end":
|
|
15897
|
-
return
|
|
15990
|
+
return _context87.stop();
|
|
15898
15991
|
}
|
|
15899
15992
|
}
|
|
15900
|
-
},
|
|
15993
|
+
}, _callee87, this);
|
|
15901
15994
|
}));
|
|
15902
15995
|
|
|
15903
|
-
function stopCampaign(
|
|
15996
|
+
function stopCampaign(_x127) {
|
|
15904
15997
|
return _stopCampaign.apply(this, arguments);
|
|
15905
15998
|
}
|
|
15906
15999
|
|
|
@@ -15916,24 +16009,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15916
16009
|
}, {
|
|
15917
16010
|
key: "enrichURL",
|
|
15918
16011
|
value: function () {
|
|
15919
|
-
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15920
|
-
return _regeneratorRuntime.wrap(function
|
|
16012
|
+
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee88(url) {
|
|
16013
|
+
return _regeneratorRuntime.wrap(function _callee88$(_context88) {
|
|
15921
16014
|
while (1) {
|
|
15922
|
-
switch (
|
|
16015
|
+
switch (_context88.prev = _context88.next) {
|
|
15923
16016
|
case 0:
|
|
15924
|
-
return
|
|
16017
|
+
return _context88.abrupt("return", this.get(this.baseURL + "/og", {
|
|
15925
16018
|
url: url
|
|
15926
16019
|
}));
|
|
15927
16020
|
|
|
15928
16021
|
case 1:
|
|
15929
16022
|
case "end":
|
|
15930
|
-
return
|
|
16023
|
+
return _context88.stop();
|
|
15931
16024
|
}
|
|
15932
16025
|
}
|
|
15933
|
-
},
|
|
16026
|
+
}, _callee88, this);
|
|
15934
16027
|
}));
|
|
15935
16028
|
|
|
15936
|
-
function enrichURL(
|
|
16029
|
+
function enrichURL(_x128) {
|
|
15937
16030
|
return _enrichURL.apply(this, arguments);
|
|
15938
16031
|
}
|
|
15939
16032
|
|
|
@@ -15950,22 +16043,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15950
16043
|
}, {
|
|
15951
16044
|
key: "getTask",
|
|
15952
16045
|
value: function () {
|
|
15953
|
-
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
15954
|
-
return _regeneratorRuntime.wrap(function
|
|
16046
|
+
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee89(id) {
|
|
16047
|
+
return _regeneratorRuntime.wrap(function _callee89$(_context89) {
|
|
15955
16048
|
while (1) {
|
|
15956
|
-
switch (
|
|
16049
|
+
switch (_context89.prev = _context89.next) {
|
|
15957
16050
|
case 0:
|
|
15958
|
-
return
|
|
16051
|
+
return _context89.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(encodeURIComponent(id))));
|
|
15959
16052
|
|
|
15960
16053
|
case 1:
|
|
15961
16054
|
case "end":
|
|
15962
|
-
return
|
|
16055
|
+
return _context89.stop();
|
|
15963
16056
|
}
|
|
15964
16057
|
}
|
|
15965
|
-
},
|
|
16058
|
+
}, _callee89, this);
|
|
15966
16059
|
}));
|
|
15967
16060
|
|
|
15968
|
-
function getTask(
|
|
16061
|
+
function getTask(_x129) {
|
|
15969
16062
|
return _getTask.apply(this, arguments);
|
|
15970
16063
|
}
|
|
15971
16064
|
|
|
@@ -15983,31 +16076,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15983
16076
|
}, {
|
|
15984
16077
|
key: "deleteChannels",
|
|
15985
16078
|
value: function () {
|
|
15986
|
-
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16079
|
+
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee90(cids) {
|
|
15987
16080
|
var options,
|
|
15988
|
-
|
|
15989
|
-
return _regeneratorRuntime.wrap(function
|
|
16081
|
+
_args90 = arguments;
|
|
16082
|
+
return _regeneratorRuntime.wrap(function _callee90$(_context90) {
|
|
15990
16083
|
while (1) {
|
|
15991
|
-
switch (
|
|
16084
|
+
switch (_context90.prev = _context90.next) {
|
|
15992
16085
|
case 0:
|
|
15993
|
-
options =
|
|
15994
|
-
|
|
16086
|
+
options = _args90.length > 1 && _args90[1] !== undefined ? _args90[1] : {};
|
|
16087
|
+
_context90.next = 3;
|
|
15995
16088
|
return this.post(this.baseURL + "/channels/delete", _objectSpread({
|
|
15996
16089
|
cids: cids
|
|
15997
16090
|
}, options));
|
|
15998
16091
|
|
|
15999
16092
|
case 3:
|
|
16000
|
-
return
|
|
16093
|
+
return _context90.abrupt("return", _context90.sent);
|
|
16001
16094
|
|
|
16002
16095
|
case 4:
|
|
16003
16096
|
case "end":
|
|
16004
|
-
return
|
|
16097
|
+
return _context90.stop();
|
|
16005
16098
|
}
|
|
16006
16099
|
}
|
|
16007
|
-
},
|
|
16100
|
+
}, _callee90, this);
|
|
16008
16101
|
}));
|
|
16009
16102
|
|
|
16010
|
-
function deleteChannels(
|
|
16103
|
+
function deleteChannels(_x130) {
|
|
16011
16104
|
return _deleteChannels.apply(this, arguments);
|
|
16012
16105
|
}
|
|
16013
16106
|
|
|
@@ -16025,17 +16118,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16025
16118
|
}, {
|
|
16026
16119
|
key: "deleteUsers",
|
|
16027
16120
|
value: function () {
|
|
16028
|
-
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16121
|
+
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee91(user_ids) {
|
|
16029
16122
|
var options,
|
|
16030
|
-
|
|
16031
|
-
return _regeneratorRuntime.wrap(function
|
|
16123
|
+
_args91 = arguments;
|
|
16124
|
+
return _regeneratorRuntime.wrap(function _callee91$(_context91) {
|
|
16032
16125
|
while (1) {
|
|
16033
|
-
switch (
|
|
16126
|
+
switch (_context91.prev = _context91.next) {
|
|
16034
16127
|
case 0:
|
|
16035
|
-
options =
|
|
16128
|
+
options = _args91.length > 1 && _args91[1] !== undefined ? _args91[1] : {};
|
|
16036
16129
|
|
|
16037
16130
|
if (!(typeof options.user !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.user))) {
|
|
16038
|
-
|
|
16131
|
+
_context91.next = 3;
|
|
16039
16132
|
break;
|
|
16040
16133
|
}
|
|
16041
16134
|
|
|
@@ -16043,7 +16136,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16043
16136
|
|
|
16044
16137
|
case 3:
|
|
16045
16138
|
if (!(typeof options.conversations !== 'undefined' && !['soft', 'hard'].includes(options.conversations))) {
|
|
16046
|
-
|
|
16139
|
+
_context91.next = 5;
|
|
16047
16140
|
break;
|
|
16048
16141
|
}
|
|
16049
16142
|
|
|
@@ -16051,30 +16144,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16051
16144
|
|
|
16052
16145
|
case 5:
|
|
16053
16146
|
if (!(typeof options.messages !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.messages))) {
|
|
16054
|
-
|
|
16147
|
+
_context91.next = 7;
|
|
16055
16148
|
break;
|
|
16056
16149
|
}
|
|
16057
16150
|
|
|
16058
16151
|
throw new Error('Invalid delete user options. messages must be one of [soft hard pruning]');
|
|
16059
16152
|
|
|
16060
16153
|
case 7:
|
|
16061
|
-
|
|
16154
|
+
_context91.next = 9;
|
|
16062
16155
|
return this.post(this.baseURL + "/users/delete", _objectSpread({
|
|
16063
16156
|
user_ids: user_ids
|
|
16064
16157
|
}, options));
|
|
16065
16158
|
|
|
16066
16159
|
case 9:
|
|
16067
|
-
return
|
|
16160
|
+
return _context91.abrupt("return", _context91.sent);
|
|
16068
16161
|
|
|
16069
16162
|
case 10:
|
|
16070
16163
|
case "end":
|
|
16071
|
-
return
|
|
16164
|
+
return _context91.stop();
|
|
16072
16165
|
}
|
|
16073
16166
|
}
|
|
16074
|
-
},
|
|
16167
|
+
}, _callee91, this);
|
|
16075
16168
|
}));
|
|
16076
16169
|
|
|
16077
|
-
function deleteUsers(
|
|
16170
|
+
function deleteUsers(_x131) {
|
|
16078
16171
|
return _deleteUsers.apply(this, arguments);
|
|
16079
16172
|
}
|
|
16080
16173
|
|
|
@@ -16095,28 +16188,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16095
16188
|
}, {
|
|
16096
16189
|
key: "_createImportURL",
|
|
16097
16190
|
value: function () {
|
|
16098
|
-
var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16099
|
-
return _regeneratorRuntime.wrap(function
|
|
16191
|
+
var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee92(filename) {
|
|
16192
|
+
return _regeneratorRuntime.wrap(function _callee92$(_context92) {
|
|
16100
16193
|
while (1) {
|
|
16101
|
-
switch (
|
|
16194
|
+
switch (_context92.prev = _context92.next) {
|
|
16102
16195
|
case 0:
|
|
16103
|
-
|
|
16196
|
+
_context92.next = 2;
|
|
16104
16197
|
return this.post(this.baseURL + "/import_urls", {
|
|
16105
16198
|
filename: filename
|
|
16106
16199
|
});
|
|
16107
16200
|
|
|
16108
16201
|
case 2:
|
|
16109
|
-
return
|
|
16202
|
+
return _context92.abrupt("return", _context92.sent);
|
|
16110
16203
|
|
|
16111
16204
|
case 3:
|
|
16112
16205
|
case "end":
|
|
16113
|
-
return
|
|
16206
|
+
return _context92.stop();
|
|
16114
16207
|
}
|
|
16115
16208
|
}
|
|
16116
|
-
},
|
|
16209
|
+
}, _callee92, this);
|
|
16117
16210
|
}));
|
|
16118
16211
|
|
|
16119
|
-
function _createImportURL(
|
|
16212
|
+
function _createImportURL(_x132) {
|
|
16120
16213
|
return _createImportURL2.apply(this, arguments);
|
|
16121
16214
|
}
|
|
16122
16215
|
|
|
@@ -16138,33 +16231,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16138
16231
|
}, {
|
|
16139
16232
|
key: "_createImport",
|
|
16140
16233
|
value: function () {
|
|
16141
|
-
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16234
|
+
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee93(path) {
|
|
16142
16235
|
var options,
|
|
16143
|
-
|
|
16144
|
-
return _regeneratorRuntime.wrap(function
|
|
16236
|
+
_args93 = arguments;
|
|
16237
|
+
return _regeneratorRuntime.wrap(function _callee93$(_context93) {
|
|
16145
16238
|
while (1) {
|
|
16146
|
-
switch (
|
|
16239
|
+
switch (_context93.prev = _context93.next) {
|
|
16147
16240
|
case 0:
|
|
16148
|
-
options =
|
|
16241
|
+
options = _args93.length > 1 && _args93[1] !== undefined ? _args93[1] : {
|
|
16149
16242
|
mode: 'upsert'
|
|
16150
16243
|
};
|
|
16151
|
-
|
|
16244
|
+
_context93.next = 3;
|
|
16152
16245
|
return this.post(this.baseURL + "/imports", _objectSpread({
|
|
16153
16246
|
path: path
|
|
16154
16247
|
}, options));
|
|
16155
16248
|
|
|
16156
16249
|
case 3:
|
|
16157
|
-
return
|
|
16250
|
+
return _context93.abrupt("return", _context93.sent);
|
|
16158
16251
|
|
|
16159
16252
|
case 4:
|
|
16160
16253
|
case "end":
|
|
16161
|
-
return
|
|
16254
|
+
return _context93.stop();
|
|
16162
16255
|
}
|
|
16163
16256
|
}
|
|
16164
|
-
},
|
|
16257
|
+
}, _callee93, this);
|
|
16165
16258
|
}));
|
|
16166
16259
|
|
|
16167
|
-
function _createImport(
|
|
16260
|
+
function _createImport(_x133) {
|
|
16168
16261
|
return _createImport2.apply(this, arguments);
|
|
16169
16262
|
}
|
|
16170
16263
|
|
|
@@ -16186,26 +16279,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16186
16279
|
}, {
|
|
16187
16280
|
key: "_getImport",
|
|
16188
16281
|
value: function () {
|
|
16189
|
-
var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16190
|
-
return _regeneratorRuntime.wrap(function
|
|
16282
|
+
var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee94(id) {
|
|
16283
|
+
return _regeneratorRuntime.wrap(function _callee94$(_context94) {
|
|
16191
16284
|
while (1) {
|
|
16192
|
-
switch (
|
|
16285
|
+
switch (_context94.prev = _context94.next) {
|
|
16193
16286
|
case 0:
|
|
16194
|
-
|
|
16287
|
+
_context94.next = 2;
|
|
16195
16288
|
return this.get(this.baseURL + "/imports/".concat(encodeURIComponent(id)));
|
|
16196
16289
|
|
|
16197
16290
|
case 2:
|
|
16198
|
-
return
|
|
16291
|
+
return _context94.abrupt("return", _context94.sent);
|
|
16199
16292
|
|
|
16200
16293
|
case 3:
|
|
16201
16294
|
case "end":
|
|
16202
|
-
return
|
|
16295
|
+
return _context94.stop();
|
|
16203
16296
|
}
|
|
16204
16297
|
}
|
|
16205
|
-
},
|
|
16298
|
+
}, _callee94, this);
|
|
16206
16299
|
}));
|
|
16207
16300
|
|
|
16208
|
-
function _getImport(
|
|
16301
|
+
function _getImport(_x134) {
|
|
16209
16302
|
return _getImport2.apply(this, arguments);
|
|
16210
16303
|
}
|
|
16211
16304
|
|
|
@@ -16227,26 +16320,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16227
16320
|
}, {
|
|
16228
16321
|
key: "_listImports",
|
|
16229
16322
|
value: function () {
|
|
16230
|
-
var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16231
|
-
return _regeneratorRuntime.wrap(function
|
|
16323
|
+
var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee95(options) {
|
|
16324
|
+
return _regeneratorRuntime.wrap(function _callee95$(_context95) {
|
|
16232
16325
|
while (1) {
|
|
16233
|
-
switch (
|
|
16326
|
+
switch (_context95.prev = _context95.next) {
|
|
16234
16327
|
case 0:
|
|
16235
|
-
|
|
16328
|
+
_context95.next = 2;
|
|
16236
16329
|
return this.get(this.baseURL + "/imports", options);
|
|
16237
16330
|
|
|
16238
16331
|
case 2:
|
|
16239
|
-
return
|
|
16332
|
+
return _context95.abrupt("return", _context95.sent);
|
|
16240
16333
|
|
|
16241
16334
|
case 3:
|
|
16242
16335
|
case "end":
|
|
16243
|
-
return
|
|
16336
|
+
return _context95.stop();
|
|
16244
16337
|
}
|
|
16245
16338
|
}
|
|
16246
|
-
},
|
|
16339
|
+
}, _callee95, this);
|
|
16247
16340
|
}));
|
|
16248
16341
|
|
|
16249
|
-
function _listImports(
|
|
16342
|
+
function _listImports(_x135) {
|
|
16250
16343
|
return _listImports2.apply(this, arguments);
|
|
16251
16344
|
}
|
|
16252
16345
|
|
|
@@ -16265,28 +16358,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16265
16358
|
}, {
|
|
16266
16359
|
key: "upsertPushProvider",
|
|
16267
16360
|
value: function () {
|
|
16268
|
-
var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16269
|
-
return _regeneratorRuntime.wrap(function
|
|
16361
|
+
var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee96(pushProvider) {
|
|
16362
|
+
return _regeneratorRuntime.wrap(function _callee96$(_context96) {
|
|
16270
16363
|
while (1) {
|
|
16271
|
-
switch (
|
|
16364
|
+
switch (_context96.prev = _context96.next) {
|
|
16272
16365
|
case 0:
|
|
16273
|
-
|
|
16366
|
+
_context96.next = 2;
|
|
16274
16367
|
return this.post(this.baseURL + "/push_providers", {
|
|
16275
16368
|
push_provider: pushProvider
|
|
16276
16369
|
});
|
|
16277
16370
|
|
|
16278
16371
|
case 2:
|
|
16279
|
-
return
|
|
16372
|
+
return _context96.abrupt("return", _context96.sent);
|
|
16280
16373
|
|
|
16281
16374
|
case 3:
|
|
16282
16375
|
case "end":
|
|
16283
|
-
return
|
|
16376
|
+
return _context96.stop();
|
|
16284
16377
|
}
|
|
16285
16378
|
}
|
|
16286
|
-
},
|
|
16379
|
+
}, _callee96, this);
|
|
16287
16380
|
}));
|
|
16288
16381
|
|
|
16289
|
-
function upsertPushProvider(
|
|
16382
|
+
function upsertPushProvider(_x136) {
|
|
16290
16383
|
return _upsertPushProvider.apply(this, arguments);
|
|
16291
16384
|
}
|
|
16292
16385
|
|
|
@@ -16305,28 +16398,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16305
16398
|
}, {
|
|
16306
16399
|
key: "deletePushProvider",
|
|
16307
16400
|
value: function () {
|
|
16308
|
-
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16401
|
+
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee97(_ref10) {
|
|
16309
16402
|
var type, name;
|
|
16310
|
-
return _regeneratorRuntime.wrap(function
|
|
16403
|
+
return _regeneratorRuntime.wrap(function _callee97$(_context97) {
|
|
16311
16404
|
while (1) {
|
|
16312
|
-
switch (
|
|
16405
|
+
switch (_context97.prev = _context97.next) {
|
|
16313
16406
|
case 0:
|
|
16314
16407
|
type = _ref10.type, name = _ref10.name;
|
|
16315
|
-
|
|
16408
|
+
_context97.next = 3;
|
|
16316
16409
|
return this.delete(this.baseURL + "/push_providers/".concat(encodeURIComponent(type), "/").concat(encodeURIComponent(name)));
|
|
16317
16410
|
|
|
16318
16411
|
case 3:
|
|
16319
|
-
return
|
|
16412
|
+
return _context97.abrupt("return", _context97.sent);
|
|
16320
16413
|
|
|
16321
16414
|
case 4:
|
|
16322
16415
|
case "end":
|
|
16323
|
-
return
|
|
16416
|
+
return _context97.stop();
|
|
16324
16417
|
}
|
|
16325
16418
|
}
|
|
16326
|
-
},
|
|
16419
|
+
}, _callee97, this);
|
|
16327
16420
|
}));
|
|
16328
16421
|
|
|
16329
|
-
function deletePushProvider(
|
|
16422
|
+
function deletePushProvider(_x137) {
|
|
16330
16423
|
return _deletePushProvider.apply(this, arguments);
|
|
16331
16424
|
}
|
|
16332
16425
|
|
|
@@ -16343,23 +16436,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16343
16436
|
}, {
|
|
16344
16437
|
key: "listPushProviders",
|
|
16345
16438
|
value: function () {
|
|
16346
|
-
var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16347
|
-
return _regeneratorRuntime.wrap(function
|
|
16439
|
+
var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee98() {
|
|
16440
|
+
return _regeneratorRuntime.wrap(function _callee98$(_context98) {
|
|
16348
16441
|
while (1) {
|
|
16349
|
-
switch (
|
|
16442
|
+
switch (_context98.prev = _context98.next) {
|
|
16350
16443
|
case 0:
|
|
16351
|
-
|
|
16444
|
+
_context98.next = 2;
|
|
16352
16445
|
return this.get(this.baseURL + "/push_providers");
|
|
16353
16446
|
|
|
16354
16447
|
case 2:
|
|
16355
|
-
return
|
|
16448
|
+
return _context98.abrupt("return", _context98.sent);
|
|
16356
16449
|
|
|
16357
16450
|
case 3:
|
|
16358
16451
|
case "end":
|
|
16359
|
-
return
|
|
16452
|
+
return _context98.stop();
|
|
16360
16453
|
}
|
|
16361
16454
|
}
|
|
16362
|
-
},
|
|
16455
|
+
}, _callee98, this);
|
|
16363
16456
|
}));
|
|
16364
16457
|
|
|
16365
16458
|
function listPushProviders() {
|
|
@@ -16387,26 +16480,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16387
16480
|
}, {
|
|
16388
16481
|
key: "commitMessage",
|
|
16389
16482
|
value: function () {
|
|
16390
|
-
var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16391
|
-
return _regeneratorRuntime.wrap(function
|
|
16483
|
+
var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee99(id) {
|
|
16484
|
+
return _regeneratorRuntime.wrap(function _callee99$(_context99) {
|
|
16392
16485
|
while (1) {
|
|
16393
|
-
switch (
|
|
16486
|
+
switch (_context99.prev = _context99.next) {
|
|
16394
16487
|
case 0:
|
|
16395
|
-
|
|
16488
|
+
_context99.next = 2;
|
|
16396
16489
|
return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(id), "/commit"));
|
|
16397
16490
|
|
|
16398
16491
|
case 2:
|
|
16399
|
-
return
|
|
16492
|
+
return _context99.abrupt("return", _context99.sent);
|
|
16400
16493
|
|
|
16401
16494
|
case 3:
|
|
16402
16495
|
case "end":
|
|
16403
|
-
return
|
|
16496
|
+
return _context99.stop();
|
|
16404
16497
|
}
|
|
16405
16498
|
}
|
|
16406
|
-
},
|
|
16499
|
+
}, _callee99, this);
|
|
16407
16500
|
}));
|
|
16408
16501
|
|
|
16409
|
-
function commitMessage(
|
|
16502
|
+
function commitMessage(_x138) {
|
|
16410
16503
|
return _commitMessage.apply(this, arguments);
|
|
16411
16504
|
}
|
|
16412
16505
|
|
|
@@ -16422,28 +16515,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16422
16515
|
}, {
|
|
16423
16516
|
key: "createPoll",
|
|
16424
16517
|
value: function () {
|
|
16425
|
-
var _createPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16426
|
-
return _regeneratorRuntime.wrap(function
|
|
16518
|
+
var _createPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee100(poll, userId) {
|
|
16519
|
+
return _regeneratorRuntime.wrap(function _callee100$(_context100) {
|
|
16427
16520
|
while (1) {
|
|
16428
|
-
switch (
|
|
16521
|
+
switch (_context100.prev = _context100.next) {
|
|
16429
16522
|
case 0:
|
|
16430
|
-
|
|
16523
|
+
_context100.next = 2;
|
|
16431
16524
|
return this.post(this.baseURL + "/polls", _objectSpread(_objectSpread({}, poll), userId ? {
|
|
16432
16525
|
user_id: userId
|
|
16433
16526
|
} : {}));
|
|
16434
16527
|
|
|
16435
16528
|
case 2:
|
|
16436
|
-
return
|
|
16529
|
+
return _context100.abrupt("return", _context100.sent);
|
|
16437
16530
|
|
|
16438
16531
|
case 3:
|
|
16439
16532
|
case "end":
|
|
16440
|
-
return
|
|
16533
|
+
return _context100.stop();
|
|
16441
16534
|
}
|
|
16442
16535
|
}
|
|
16443
|
-
},
|
|
16536
|
+
}, _callee100, this);
|
|
16444
16537
|
}));
|
|
16445
16538
|
|
|
16446
|
-
function createPoll(
|
|
16539
|
+
function createPoll(_x139, _x140) {
|
|
16447
16540
|
return _createPoll.apply(this, arguments);
|
|
16448
16541
|
}
|
|
16449
16542
|
|
|
@@ -16459,28 +16552,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16459
16552
|
}, {
|
|
16460
16553
|
key: "getPoll",
|
|
16461
16554
|
value: function () {
|
|
16462
|
-
var _getPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16463
|
-
return _regeneratorRuntime.wrap(function
|
|
16555
|
+
var _getPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee101(id, userId) {
|
|
16556
|
+
return _regeneratorRuntime.wrap(function _callee101$(_context101) {
|
|
16464
16557
|
while (1) {
|
|
16465
|
-
switch (
|
|
16558
|
+
switch (_context101.prev = _context101.next) {
|
|
16466
16559
|
case 0:
|
|
16467
|
-
|
|
16560
|
+
_context101.next = 2;
|
|
16468
16561
|
return this.get(this.baseURL + "/polls/".concat(encodeURIComponent(id)), userId ? {
|
|
16469
16562
|
user_id: userId
|
|
16470
16563
|
} : {});
|
|
16471
16564
|
|
|
16472
16565
|
case 2:
|
|
16473
|
-
return
|
|
16566
|
+
return _context101.abrupt("return", _context101.sent);
|
|
16474
16567
|
|
|
16475
16568
|
case 3:
|
|
16476
16569
|
case "end":
|
|
16477
|
-
return
|
|
16570
|
+
return _context101.stop();
|
|
16478
16571
|
}
|
|
16479
16572
|
}
|
|
16480
|
-
},
|
|
16573
|
+
}, _callee101, this);
|
|
16481
16574
|
}));
|
|
16482
16575
|
|
|
16483
|
-
function getPoll(
|
|
16576
|
+
function getPoll(_x141, _x142) {
|
|
16484
16577
|
return _getPoll.apply(this, arguments);
|
|
16485
16578
|
}
|
|
16486
16579
|
|
|
@@ -16496,28 +16589,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16496
16589
|
}, {
|
|
16497
16590
|
key: "updatePoll",
|
|
16498
16591
|
value: function () {
|
|
16499
|
-
var _updatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16500
|
-
return _regeneratorRuntime.wrap(function
|
|
16592
|
+
var _updatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee102(poll, userId) {
|
|
16593
|
+
return _regeneratorRuntime.wrap(function _callee102$(_context102) {
|
|
16501
16594
|
while (1) {
|
|
16502
|
-
switch (
|
|
16595
|
+
switch (_context102.prev = _context102.next) {
|
|
16503
16596
|
case 0:
|
|
16504
|
-
|
|
16597
|
+
_context102.next = 2;
|
|
16505
16598
|
return this.put(this.baseURL + "/polls", _objectSpread(_objectSpread({}, poll), userId ? {
|
|
16506
16599
|
user_id: userId
|
|
16507
16600
|
} : {}));
|
|
16508
16601
|
|
|
16509
16602
|
case 2:
|
|
16510
|
-
return
|
|
16603
|
+
return _context102.abrupt("return", _context102.sent);
|
|
16511
16604
|
|
|
16512
16605
|
case 3:
|
|
16513
16606
|
case "end":
|
|
16514
|
-
return
|
|
16607
|
+
return _context102.stop();
|
|
16515
16608
|
}
|
|
16516
16609
|
}
|
|
16517
|
-
},
|
|
16610
|
+
}, _callee102, this);
|
|
16518
16611
|
}));
|
|
16519
16612
|
|
|
16520
|
-
function updatePoll(
|
|
16613
|
+
function updatePoll(_x143, _x144) {
|
|
16521
16614
|
return _updatePoll.apply(this, arguments);
|
|
16522
16615
|
}
|
|
16523
16616
|
|
|
@@ -16535,28 +16628,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16535
16628
|
}, {
|
|
16536
16629
|
key: "partialUpdatePoll",
|
|
16537
16630
|
value: function () {
|
|
16538
|
-
var _partialUpdatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16539
|
-
return _regeneratorRuntime.wrap(function
|
|
16631
|
+
var _partialUpdatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee103(id, partialPollObject, userId) {
|
|
16632
|
+
return _regeneratorRuntime.wrap(function _callee103$(_context103) {
|
|
16540
16633
|
while (1) {
|
|
16541
|
-
switch (
|
|
16634
|
+
switch (_context103.prev = _context103.next) {
|
|
16542
16635
|
case 0:
|
|
16543
|
-
|
|
16636
|
+
_context103.next = 2;
|
|
16544
16637
|
return this.patch(this.baseURL + "/polls/".concat(encodeURIComponent(id)), _objectSpread(_objectSpread({}, partialPollObject), userId ? {
|
|
16545
16638
|
user_id: userId
|
|
16546
16639
|
} : {}));
|
|
16547
16640
|
|
|
16548
16641
|
case 2:
|
|
16549
|
-
return
|
|
16642
|
+
return _context103.abrupt("return", _context103.sent);
|
|
16550
16643
|
|
|
16551
16644
|
case 3:
|
|
16552
16645
|
case "end":
|
|
16553
|
-
return
|
|
16646
|
+
return _context103.stop();
|
|
16554
16647
|
}
|
|
16555
16648
|
}
|
|
16556
|
-
},
|
|
16649
|
+
}, _callee103, this);
|
|
16557
16650
|
}));
|
|
16558
16651
|
|
|
16559
|
-
function partialUpdatePoll(
|
|
16652
|
+
function partialUpdatePoll(_x145, _x146, _x147) {
|
|
16560
16653
|
return _partialUpdatePoll.apply(this, arguments);
|
|
16561
16654
|
}
|
|
16562
16655
|
|
|
@@ -16572,28 +16665,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16572
16665
|
}, {
|
|
16573
16666
|
key: "deletePoll",
|
|
16574
16667
|
value: function () {
|
|
16575
|
-
var _deletePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16576
|
-
return _regeneratorRuntime.wrap(function
|
|
16668
|
+
var _deletePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee104(id, userId) {
|
|
16669
|
+
return _regeneratorRuntime.wrap(function _callee104$(_context104) {
|
|
16577
16670
|
while (1) {
|
|
16578
|
-
switch (
|
|
16671
|
+
switch (_context104.prev = _context104.next) {
|
|
16579
16672
|
case 0:
|
|
16580
|
-
|
|
16673
|
+
_context104.next = 2;
|
|
16581
16674
|
return this.delete(this.baseURL + "/polls/".concat(encodeURIComponent(id)), _objectSpread({}, userId ? {
|
|
16582
16675
|
user_id: userId
|
|
16583
16676
|
} : {}));
|
|
16584
16677
|
|
|
16585
16678
|
case 2:
|
|
16586
|
-
return
|
|
16679
|
+
return _context104.abrupt("return", _context104.sent);
|
|
16587
16680
|
|
|
16588
16681
|
case 3:
|
|
16589
16682
|
case "end":
|
|
16590
|
-
return
|
|
16683
|
+
return _context104.stop();
|
|
16591
16684
|
}
|
|
16592
16685
|
}
|
|
16593
|
-
},
|
|
16686
|
+
}, _callee104, this);
|
|
16594
16687
|
}));
|
|
16595
16688
|
|
|
16596
|
-
function deletePoll(
|
|
16689
|
+
function deletePoll(_x148, _x149) {
|
|
16597
16690
|
return _deletePoll.apply(this, arguments);
|
|
16598
16691
|
}
|
|
16599
16692
|
|
|
@@ -16609,12 +16702,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16609
16702
|
}, {
|
|
16610
16703
|
key: "closePoll",
|
|
16611
16704
|
value: function () {
|
|
16612
|
-
var _closePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16613
|
-
return _regeneratorRuntime.wrap(function
|
|
16705
|
+
var _closePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee105(id, userId) {
|
|
16706
|
+
return _regeneratorRuntime.wrap(function _callee105$(_context105) {
|
|
16614
16707
|
while (1) {
|
|
16615
|
-
switch (
|
|
16708
|
+
switch (_context105.prev = _context105.next) {
|
|
16616
16709
|
case 0:
|
|
16617
|
-
return
|
|
16710
|
+
return _context105.abrupt("return", this.partialUpdatePoll(id, {
|
|
16618
16711
|
set: {
|
|
16619
16712
|
is_closed: true
|
|
16620
16713
|
}
|
|
@@ -16622,13 +16715,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16622
16715
|
|
|
16623
16716
|
case 1:
|
|
16624
16717
|
case "end":
|
|
16625
|
-
return
|
|
16718
|
+
return _context105.stop();
|
|
16626
16719
|
}
|
|
16627
16720
|
}
|
|
16628
|
-
},
|
|
16721
|
+
}, _callee105, this);
|
|
16629
16722
|
}));
|
|
16630
16723
|
|
|
16631
|
-
function closePoll(
|
|
16724
|
+
function closePoll(_x150, _x151) {
|
|
16632
16725
|
return _closePoll.apply(this, arguments);
|
|
16633
16726
|
}
|
|
16634
16727
|
|
|
@@ -16645,28 +16738,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16645
16738
|
}, {
|
|
16646
16739
|
key: "createPollOption",
|
|
16647
16740
|
value: function () {
|
|
16648
|
-
var _createPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16649
|
-
return _regeneratorRuntime.wrap(function
|
|
16741
|
+
var _createPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee106(pollId, option, userId) {
|
|
16742
|
+
return _regeneratorRuntime.wrap(function _callee106$(_context106) {
|
|
16650
16743
|
while (1) {
|
|
16651
|
-
switch (
|
|
16744
|
+
switch (_context106.prev = _context106.next) {
|
|
16652
16745
|
case 0:
|
|
16653
|
-
|
|
16746
|
+
_context106.next = 2;
|
|
16654
16747
|
return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options"), _objectSpread(_objectSpread({}, option), userId ? {
|
|
16655
16748
|
user_id: userId
|
|
16656
16749
|
} : {}));
|
|
16657
16750
|
|
|
16658
16751
|
case 2:
|
|
16659
|
-
return
|
|
16752
|
+
return _context106.abrupt("return", _context106.sent);
|
|
16660
16753
|
|
|
16661
16754
|
case 3:
|
|
16662
16755
|
case "end":
|
|
16663
|
-
return
|
|
16756
|
+
return _context106.stop();
|
|
16664
16757
|
}
|
|
16665
16758
|
}
|
|
16666
|
-
},
|
|
16759
|
+
}, _callee106, this);
|
|
16667
16760
|
}));
|
|
16668
16761
|
|
|
16669
|
-
function createPollOption(
|
|
16762
|
+
function createPollOption(_x152, _x153, _x154) {
|
|
16670
16763
|
return _createPollOption.apply(this, arguments);
|
|
16671
16764
|
}
|
|
16672
16765
|
|
|
@@ -16683,28 +16776,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16683
16776
|
}, {
|
|
16684
16777
|
key: "getPollOption",
|
|
16685
16778
|
value: function () {
|
|
16686
|
-
var _getPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16687
|
-
return _regeneratorRuntime.wrap(function
|
|
16779
|
+
var _getPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee107(pollId, optionId, userId) {
|
|
16780
|
+
return _regeneratorRuntime.wrap(function _callee107$(_context107) {
|
|
16688
16781
|
while (1) {
|
|
16689
|
-
switch (
|
|
16782
|
+
switch (_context107.prev = _context107.next) {
|
|
16690
16783
|
case 0:
|
|
16691
|
-
|
|
16784
|
+
_context107.next = 2;
|
|
16692
16785
|
return this.get(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options/").concat(encodeURIComponent(optionId)), userId ? {
|
|
16693
16786
|
user_id: userId
|
|
16694
16787
|
} : {});
|
|
16695
16788
|
|
|
16696
16789
|
case 2:
|
|
16697
|
-
return
|
|
16790
|
+
return _context107.abrupt("return", _context107.sent);
|
|
16698
16791
|
|
|
16699
16792
|
case 3:
|
|
16700
16793
|
case "end":
|
|
16701
|
-
return
|
|
16794
|
+
return _context107.stop();
|
|
16702
16795
|
}
|
|
16703
16796
|
}
|
|
16704
|
-
},
|
|
16797
|
+
}, _callee107, this);
|
|
16705
16798
|
}));
|
|
16706
16799
|
|
|
16707
|
-
function getPollOption(
|
|
16800
|
+
function getPollOption(_x155, _x156, _x157) {
|
|
16708
16801
|
return _getPollOption.apply(this, arguments);
|
|
16709
16802
|
}
|
|
16710
16803
|
|
|
@@ -16721,28 +16814,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16721
16814
|
}, {
|
|
16722
16815
|
key: "updatePollOption",
|
|
16723
16816
|
value: function () {
|
|
16724
|
-
var _updatePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16725
|
-
return _regeneratorRuntime.wrap(function
|
|
16817
|
+
var _updatePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee108(pollId, option, userId) {
|
|
16818
|
+
return _regeneratorRuntime.wrap(function _callee108$(_context108) {
|
|
16726
16819
|
while (1) {
|
|
16727
|
-
switch (
|
|
16820
|
+
switch (_context108.prev = _context108.next) {
|
|
16728
16821
|
case 0:
|
|
16729
|
-
|
|
16822
|
+
_context108.next = 2;
|
|
16730
16823
|
return this.put(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options"), _objectSpread(_objectSpread({}, option), userId ? {
|
|
16731
16824
|
user_id: userId
|
|
16732
16825
|
} : {}));
|
|
16733
16826
|
|
|
16734
16827
|
case 2:
|
|
16735
|
-
return
|
|
16828
|
+
return _context108.abrupt("return", _context108.sent);
|
|
16736
16829
|
|
|
16737
16830
|
case 3:
|
|
16738
16831
|
case "end":
|
|
16739
|
-
return
|
|
16832
|
+
return _context108.stop();
|
|
16740
16833
|
}
|
|
16741
16834
|
}
|
|
16742
|
-
},
|
|
16835
|
+
}, _callee108, this);
|
|
16743
16836
|
}));
|
|
16744
16837
|
|
|
16745
|
-
function updatePollOption(
|
|
16838
|
+
function updatePollOption(_x158, _x159, _x160) {
|
|
16746
16839
|
return _updatePollOption.apply(this, arguments);
|
|
16747
16840
|
}
|
|
16748
16841
|
|
|
@@ -16759,28 +16852,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16759
16852
|
}, {
|
|
16760
16853
|
key: "deletePollOption",
|
|
16761
16854
|
value: function () {
|
|
16762
|
-
var _deletePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16763
|
-
return _regeneratorRuntime.wrap(function
|
|
16855
|
+
var _deletePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee109(pollId, optionId, userId) {
|
|
16856
|
+
return _regeneratorRuntime.wrap(function _callee109$(_context109) {
|
|
16764
16857
|
while (1) {
|
|
16765
|
-
switch (
|
|
16858
|
+
switch (_context109.prev = _context109.next) {
|
|
16766
16859
|
case 0:
|
|
16767
|
-
|
|
16860
|
+
_context109.next = 2;
|
|
16768
16861
|
return this.delete(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options/").concat(encodeURIComponent(optionId)), userId ? {
|
|
16769
16862
|
user_id: userId
|
|
16770
16863
|
} : {});
|
|
16771
16864
|
|
|
16772
16865
|
case 2:
|
|
16773
|
-
return
|
|
16866
|
+
return _context109.abrupt("return", _context109.sent);
|
|
16774
16867
|
|
|
16775
16868
|
case 3:
|
|
16776
16869
|
case "end":
|
|
16777
|
-
return
|
|
16870
|
+
return _context109.stop();
|
|
16778
16871
|
}
|
|
16779
16872
|
}
|
|
16780
|
-
},
|
|
16873
|
+
}, _callee109, this);
|
|
16781
16874
|
}));
|
|
16782
16875
|
|
|
16783
|
-
function deletePollOption(
|
|
16876
|
+
function deletePollOption(_x161, _x162, _x163) {
|
|
16784
16877
|
return _deletePollOption.apply(this, arguments);
|
|
16785
16878
|
}
|
|
16786
16879
|
|
|
@@ -16798,12 +16891,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16798
16891
|
}, {
|
|
16799
16892
|
key: "castPollVote",
|
|
16800
16893
|
value: function () {
|
|
16801
|
-
var _castPollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16802
|
-
return _regeneratorRuntime.wrap(function
|
|
16894
|
+
var _castPollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee110(messageId, pollId, vote, userId) {
|
|
16895
|
+
return _regeneratorRuntime.wrap(function _callee110$(_context110) {
|
|
16803
16896
|
while (1) {
|
|
16804
|
-
switch (
|
|
16897
|
+
switch (_context110.prev = _context110.next) {
|
|
16805
16898
|
case 0:
|
|
16806
|
-
|
|
16899
|
+
_context110.next = 2;
|
|
16807
16900
|
return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(messageId), "/polls/").concat(encodeURIComponent(pollId), "/vote"), _objectSpread({
|
|
16808
16901
|
vote: vote
|
|
16809
16902
|
}, userId ? {
|
|
@@ -16811,17 +16904,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16811
16904
|
} : {}));
|
|
16812
16905
|
|
|
16813
16906
|
case 2:
|
|
16814
|
-
return
|
|
16907
|
+
return _context110.abrupt("return", _context110.sent);
|
|
16815
16908
|
|
|
16816
16909
|
case 3:
|
|
16817
16910
|
case "end":
|
|
16818
|
-
return
|
|
16911
|
+
return _context110.stop();
|
|
16819
16912
|
}
|
|
16820
16913
|
}
|
|
16821
|
-
},
|
|
16914
|
+
}, _callee110, this);
|
|
16822
16915
|
}));
|
|
16823
16916
|
|
|
16824
|
-
function castPollVote(
|
|
16917
|
+
function castPollVote(_x164, _x165, _x166, _x167) {
|
|
16825
16918
|
return _castPollVote.apply(this, arguments);
|
|
16826
16919
|
}
|
|
16827
16920
|
|
|
@@ -16838,24 +16931,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16838
16931
|
}, {
|
|
16839
16932
|
key: "addPollAnswer",
|
|
16840
16933
|
value: function () {
|
|
16841
|
-
var _addPollAnswer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16842
|
-
return _regeneratorRuntime.wrap(function
|
|
16934
|
+
var _addPollAnswer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee111(messageId, pollId, answerText, userId) {
|
|
16935
|
+
return _regeneratorRuntime.wrap(function _callee111$(_context111) {
|
|
16843
16936
|
while (1) {
|
|
16844
|
-
switch (
|
|
16937
|
+
switch (_context111.prev = _context111.next) {
|
|
16845
16938
|
case 0:
|
|
16846
|
-
return
|
|
16939
|
+
return _context111.abrupt("return", this.castPollVote(messageId, pollId, {
|
|
16847
16940
|
answer_text: answerText
|
|
16848
16941
|
}, userId));
|
|
16849
16942
|
|
|
16850
16943
|
case 1:
|
|
16851
16944
|
case "end":
|
|
16852
|
-
return
|
|
16945
|
+
return _context111.stop();
|
|
16853
16946
|
}
|
|
16854
16947
|
}
|
|
16855
|
-
},
|
|
16948
|
+
}, _callee111, this);
|
|
16856
16949
|
}));
|
|
16857
16950
|
|
|
16858
|
-
function addPollAnswer(
|
|
16951
|
+
function addPollAnswer(_x168, _x169, _x170, _x171) {
|
|
16859
16952
|
return _addPollAnswer.apply(this, arguments);
|
|
16860
16953
|
}
|
|
16861
16954
|
|
|
@@ -16864,28 +16957,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16864
16957
|
}, {
|
|
16865
16958
|
key: "removePollVote",
|
|
16866
16959
|
value: function () {
|
|
16867
|
-
var _removePollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16868
|
-
return _regeneratorRuntime.wrap(function
|
|
16960
|
+
var _removePollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee112(messageId, pollId, voteId, userId) {
|
|
16961
|
+
return _regeneratorRuntime.wrap(function _callee112$(_context112) {
|
|
16869
16962
|
while (1) {
|
|
16870
|
-
switch (
|
|
16963
|
+
switch (_context112.prev = _context112.next) {
|
|
16871
16964
|
case 0:
|
|
16872
|
-
|
|
16965
|
+
_context112.next = 2;
|
|
16873
16966
|
return this.delete(this.baseURL + "/messages/".concat(encodeURIComponent(messageId), "/polls/").concat(encodeURIComponent(pollId), "/vote/").concat(encodeURIComponent(voteId)), _objectSpread({}, userId ? {
|
|
16874
16967
|
user_id: userId
|
|
16875
16968
|
} : {}));
|
|
16876
16969
|
|
|
16877
16970
|
case 2:
|
|
16878
|
-
return
|
|
16971
|
+
return _context112.abrupt("return", _context112.sent);
|
|
16879
16972
|
|
|
16880
16973
|
case 3:
|
|
16881
16974
|
case "end":
|
|
16882
|
-
return
|
|
16975
|
+
return _context112.stop();
|
|
16883
16976
|
}
|
|
16884
16977
|
}
|
|
16885
|
-
},
|
|
16978
|
+
}, _callee112, this);
|
|
16886
16979
|
}));
|
|
16887
16980
|
|
|
16888
|
-
function removePollVote(
|
|
16981
|
+
function removePollVote(_x172, _x173, _x174, _x175) {
|
|
16889
16982
|
return _removePollVote.apply(this, arguments);
|
|
16890
16983
|
}
|
|
16891
16984
|
|
|
@@ -16903,37 +16996,37 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16903
16996
|
}, {
|
|
16904
16997
|
key: "queryPolls",
|
|
16905
16998
|
value: function () {
|
|
16906
|
-
var _queryPolls = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
16999
|
+
var _queryPolls = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee113() {
|
|
16907
17000
|
var filter,
|
|
16908
17001
|
sort,
|
|
16909
17002
|
options,
|
|
16910
17003
|
userId,
|
|
16911
17004
|
q,
|
|
16912
|
-
|
|
16913
|
-
return _regeneratorRuntime.wrap(function
|
|
17005
|
+
_args113 = arguments;
|
|
17006
|
+
return _regeneratorRuntime.wrap(function _callee113$(_context113) {
|
|
16914
17007
|
while (1) {
|
|
16915
|
-
switch (
|
|
17008
|
+
switch (_context113.prev = _context113.next) {
|
|
16916
17009
|
case 0:
|
|
16917
|
-
filter =
|
|
16918
|
-
sort =
|
|
16919
|
-
options =
|
|
16920
|
-
userId =
|
|
17010
|
+
filter = _args113.length > 0 && _args113[0] !== undefined ? _args113[0] : {};
|
|
17011
|
+
sort = _args113.length > 1 && _args113[1] !== undefined ? _args113[1] : [];
|
|
17012
|
+
options = _args113.length > 2 && _args113[2] !== undefined ? _args113[2] : {};
|
|
17013
|
+
userId = _args113.length > 3 ? _args113[3] : undefined;
|
|
16921
17014
|
q = userId ? "?user_id=".concat(userId) : '';
|
|
16922
|
-
|
|
17015
|
+
_context113.next = 7;
|
|
16923
17016
|
return this.post(this.baseURL + "/polls/query".concat(q), _objectSpread({
|
|
16924
17017
|
filter: filter,
|
|
16925
17018
|
sort: normalizeQuerySort(sort)
|
|
16926
17019
|
}, options));
|
|
16927
17020
|
|
|
16928
17021
|
case 7:
|
|
16929
|
-
return
|
|
17022
|
+
return _context113.abrupt("return", _context113.sent);
|
|
16930
17023
|
|
|
16931
17024
|
case 8:
|
|
16932
17025
|
case "end":
|
|
16933
|
-
return
|
|
17026
|
+
return _context113.stop();
|
|
16934
17027
|
}
|
|
16935
17028
|
}
|
|
16936
|
-
},
|
|
17029
|
+
}, _callee113, this);
|
|
16937
17030
|
}));
|
|
16938
17031
|
|
|
16939
17032
|
function queryPolls() {
|
|
@@ -16955,40 +17048,40 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16955
17048
|
}, {
|
|
16956
17049
|
key: "queryPollVotes",
|
|
16957
17050
|
value: function () {
|
|
16958
|
-
var _queryPollVotes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
17051
|
+
var _queryPollVotes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee114(pollId) {
|
|
16959
17052
|
var filter,
|
|
16960
17053
|
sort,
|
|
16961
17054
|
options,
|
|
16962
17055
|
userId,
|
|
16963
17056
|
q,
|
|
16964
|
-
|
|
16965
|
-
return _regeneratorRuntime.wrap(function
|
|
17057
|
+
_args114 = arguments;
|
|
17058
|
+
return _regeneratorRuntime.wrap(function _callee114$(_context114) {
|
|
16966
17059
|
while (1) {
|
|
16967
|
-
switch (
|
|
17060
|
+
switch (_context114.prev = _context114.next) {
|
|
16968
17061
|
case 0:
|
|
16969
|
-
filter =
|
|
16970
|
-
sort =
|
|
16971
|
-
options =
|
|
16972
|
-
userId =
|
|
17062
|
+
filter = _args114.length > 1 && _args114[1] !== undefined ? _args114[1] : {};
|
|
17063
|
+
sort = _args114.length > 2 && _args114[2] !== undefined ? _args114[2] : [];
|
|
17064
|
+
options = _args114.length > 3 && _args114[3] !== undefined ? _args114[3] : {};
|
|
17065
|
+
userId = _args114.length > 4 ? _args114[4] : undefined;
|
|
16973
17066
|
q = userId ? "?user_id=".concat(userId) : '';
|
|
16974
|
-
|
|
17067
|
+
_context114.next = 7;
|
|
16975
17068
|
return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/votes").concat(q), _objectSpread({
|
|
16976
17069
|
filter: filter,
|
|
16977
17070
|
sort: normalizeQuerySort(sort)
|
|
16978
17071
|
}, options));
|
|
16979
17072
|
|
|
16980
17073
|
case 7:
|
|
16981
|
-
return
|
|
17074
|
+
return _context114.abrupt("return", _context114.sent);
|
|
16982
17075
|
|
|
16983
17076
|
case 8:
|
|
16984
17077
|
case "end":
|
|
16985
|
-
return
|
|
17078
|
+
return _context114.stop();
|
|
16986
17079
|
}
|
|
16987
17080
|
}
|
|
16988
|
-
},
|
|
17081
|
+
}, _callee114, this);
|
|
16989
17082
|
}));
|
|
16990
17083
|
|
|
16991
|
-
function queryPollVotes(
|
|
17084
|
+
function queryPollVotes(_x176) {
|
|
16992
17085
|
return _queryPollVotes.apply(this, arguments);
|
|
16993
17086
|
}
|
|
16994
17087
|
|
|
@@ -17007,23 +17100,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
17007
17100
|
}, {
|
|
17008
17101
|
key: "queryPollAnswers",
|
|
17009
17102
|
value: function () {
|
|
17010
|
-
var _queryPollAnswers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
17103
|
+
var _queryPollAnswers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee115(pollId) {
|
|
17011
17104
|
var filter,
|
|
17012
17105
|
sort,
|
|
17013
17106
|
options,
|
|
17014
17107
|
userId,
|
|
17015
17108
|
q,
|
|
17016
|
-
|
|
17017
|
-
return _regeneratorRuntime.wrap(function
|
|
17109
|
+
_args115 = arguments;
|
|
17110
|
+
return _regeneratorRuntime.wrap(function _callee115$(_context115) {
|
|
17018
17111
|
while (1) {
|
|
17019
|
-
switch (
|
|
17112
|
+
switch (_context115.prev = _context115.next) {
|
|
17020
17113
|
case 0:
|
|
17021
|
-
filter =
|
|
17022
|
-
sort =
|
|
17023
|
-
options =
|
|
17024
|
-
userId =
|
|
17114
|
+
filter = _args115.length > 1 && _args115[1] !== undefined ? _args115[1] : {};
|
|
17115
|
+
sort = _args115.length > 2 && _args115[2] !== undefined ? _args115[2] : [];
|
|
17116
|
+
options = _args115.length > 3 && _args115[3] !== undefined ? _args115[3] : {};
|
|
17117
|
+
userId = _args115.length > 4 ? _args115[4] : undefined;
|
|
17025
17118
|
q = userId ? "?user_id=".concat(userId) : '';
|
|
17026
|
-
|
|
17119
|
+
_context115.next = 7;
|
|
17027
17120
|
return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/votes").concat(q), _objectSpread({
|
|
17028
17121
|
filter: _objectSpread(_objectSpread({}, filter), {}, {
|
|
17029
17122
|
is_answer: true
|
|
@@ -17032,17 +17125,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
17032
17125
|
}, options));
|
|
17033
17126
|
|
|
17034
17127
|
case 7:
|
|
17035
|
-
return
|
|
17128
|
+
return _context115.abrupt("return", _context115.sent);
|
|
17036
17129
|
|
|
17037
17130
|
case 8:
|
|
17038
17131
|
case "end":
|
|
17039
|
-
return
|
|
17132
|
+
return _context115.stop();
|
|
17040
17133
|
}
|
|
17041
17134
|
}
|
|
17042
|
-
},
|
|
17135
|
+
}, _callee115, this);
|
|
17043
17136
|
}));
|
|
17044
17137
|
|
|
17045
|
-
function queryPollAnswers(
|
|
17138
|
+
function queryPollAnswers(_x177) {
|
|
17046
17139
|
return _queryPollAnswers.apply(this, arguments);
|
|
17047
17140
|
}
|
|
17048
17141
|
|
|
@@ -17059,33 +17152,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
17059
17152
|
}, {
|
|
17060
17153
|
key: "queryMessageHistory",
|
|
17061
17154
|
value: function () {
|
|
17062
|
-
var _queryMessageHistory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
17155
|
+
var _queryMessageHistory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee116() {
|
|
17063
17156
|
var filter,
|
|
17064
17157
|
sort,
|
|
17065
17158
|
options,
|
|
17066
|
-
|
|
17067
|
-
return _regeneratorRuntime.wrap(function
|
|
17159
|
+
_args116 = arguments;
|
|
17160
|
+
return _regeneratorRuntime.wrap(function _callee116$(_context116) {
|
|
17068
17161
|
while (1) {
|
|
17069
|
-
switch (
|
|
17162
|
+
switch (_context116.prev = _context116.next) {
|
|
17070
17163
|
case 0:
|
|
17071
|
-
filter =
|
|
17072
|
-
sort =
|
|
17073
|
-
options =
|
|
17074
|
-
|
|
17164
|
+
filter = _args116.length > 0 && _args116[0] !== undefined ? _args116[0] : {};
|
|
17165
|
+
sort = _args116.length > 1 && _args116[1] !== undefined ? _args116[1] : [];
|
|
17166
|
+
options = _args116.length > 2 && _args116[2] !== undefined ? _args116[2] : {};
|
|
17167
|
+
_context116.next = 5;
|
|
17075
17168
|
return this.post(this.baseURL + '/messages/history', _objectSpread({
|
|
17076
17169
|
filter: filter,
|
|
17077
17170
|
sort: normalizeQuerySort(sort)
|
|
17078
17171
|
}, options));
|
|
17079
17172
|
|
|
17080
17173
|
case 5:
|
|
17081
|
-
return
|
|
17174
|
+
return _context116.abrupt("return", _context116.sent);
|
|
17082
17175
|
|
|
17083
17176
|
case 6:
|
|
17084
17177
|
case "end":
|
|
17085
|
-
return
|
|
17178
|
+
return _context116.stop();
|
|
17086
17179
|
}
|
|
17087
17180
|
}
|
|
17088
|
-
},
|
|
17181
|
+
}, _callee116, this);
|
|
17089
17182
|
}));
|
|
17090
17183
|
|
|
17091
17184
|
function queryMessageHistory() {
|
|
@@ -17106,32 +17199,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
17106
17199
|
}, {
|
|
17107
17200
|
key: "updateFlags",
|
|
17108
17201
|
value: function () {
|
|
17109
|
-
var _updateFlags = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
17202
|
+
var _updateFlags = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee117(message_ids, reviewed_by) {
|
|
17110
17203
|
var options,
|
|
17111
|
-
|
|
17112
|
-
return _regeneratorRuntime.wrap(function
|
|
17204
|
+
_args117 = arguments;
|
|
17205
|
+
return _regeneratorRuntime.wrap(function _callee117$(_context117) {
|
|
17113
17206
|
while (1) {
|
|
17114
|
-
switch (
|
|
17207
|
+
switch (_context117.prev = _context117.next) {
|
|
17115
17208
|
case 0:
|
|
17116
|
-
options =
|
|
17117
|
-
|
|
17209
|
+
options = _args117.length > 2 && _args117[2] !== undefined ? _args117[2] : {};
|
|
17210
|
+
_context117.next = 3;
|
|
17118
17211
|
return this.post(this.baseURL + '/automod/v1/moderation/update_flags', _objectSpread({
|
|
17119
17212
|
message_ids: message_ids,
|
|
17120
17213
|
reviewed_by: reviewed_by
|
|
17121
17214
|
}, options));
|
|
17122
17215
|
|
|
17123
17216
|
case 3:
|
|
17124
|
-
return
|
|
17217
|
+
return _context117.abrupt("return", _context117.sent);
|
|
17125
17218
|
|
|
17126
17219
|
case 4:
|
|
17127
17220
|
case "end":
|
|
17128
|
-
return
|
|
17221
|
+
return _context117.stop();
|
|
17129
17222
|
}
|
|
17130
17223
|
}
|
|
17131
|
-
},
|
|
17224
|
+
}, _callee117, this);
|
|
17132
17225
|
}));
|
|
17133
17226
|
|
|
17134
|
-
function updateFlags(
|
|
17227
|
+
function updateFlags(_x178, _x179) {
|
|
17135
17228
|
return _updateFlags.apply(this, arguments);
|
|
17136
17229
|
}
|
|
17137
17230
|
|