stream-chat 8.26.0 → 8.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.es.js +832 -773
- package/dist/browser.es.js.map +1 -1
- package/dist/browser.full-bundle.min.js +1 -1
- package/dist/browser.full-bundle.min.js.map +1 -1
- package/dist/browser.js +832 -773
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +832 -773
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +832 -773
- package/dist/index.js.map +1 -1
- package/dist/types/client.d.ts +13 -3
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/types.d.ts +18 -1
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/channel_state.ts +3 -3
- package/src/client.ts +35 -0
- package/src/types.ts +37 -1
package/dist/browser.es.js
CHANGED
|
@@ -504,6 +504,8 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
504
504
|
});
|
|
505
505
|
|
|
506
506
|
_defineProperty(this, "updatePollVote", function (pollVote, poll, messageId) {
|
|
507
|
+
var _message$poll;
|
|
508
|
+
|
|
507
509
|
var message = _this.findMessage(messageId);
|
|
508
510
|
|
|
509
511
|
if (!message) return;
|
|
@@ -511,7 +513,7 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
511
513
|
|
|
512
514
|
var updatedPoll = _objectSpread$7({}, poll);
|
|
513
515
|
|
|
514
|
-
var ownVotes = _toConsumableArray(message.poll.own_votes || []);
|
|
516
|
+
var ownVotes = _toConsumableArray(((_message$poll = message.poll) === null || _message$poll === void 0 ? void 0 : _message$poll.own_votes) || []);
|
|
515
517
|
|
|
516
518
|
if (pollVote.user_id === _this._channel.getClient().userID) {
|
|
517
519
|
if (pollVote.option_id && poll.enforce_unique_vote) {
|
|
@@ -539,6 +541,8 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
539
541
|
});
|
|
540
542
|
|
|
541
543
|
_defineProperty(this, "addPollVote", function (pollVote, poll, messageId) {
|
|
544
|
+
var _message$poll2;
|
|
545
|
+
|
|
542
546
|
var message = _this.findMessage(messageId);
|
|
543
547
|
|
|
544
548
|
if (!message) return;
|
|
@@ -546,7 +550,7 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
546
550
|
|
|
547
551
|
var updatedPoll = _objectSpread$7({}, poll);
|
|
548
552
|
|
|
549
|
-
var ownVotes = _toConsumableArray(message.poll.own_votes || []);
|
|
553
|
+
var ownVotes = _toConsumableArray(((_message$poll2 = message.poll) === null || _message$poll2 === void 0 ? void 0 : _message$poll2.own_votes) || []);
|
|
550
554
|
|
|
551
555
|
if (pollVote.user_id === _this._channel.getClient().userID) {
|
|
552
556
|
ownVotes.push(pollVote);
|
|
@@ -562,6 +566,8 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
562
566
|
});
|
|
563
567
|
|
|
564
568
|
_defineProperty(this, "removePollVote", function (pollVote, poll, messageId) {
|
|
569
|
+
var _message$poll3;
|
|
570
|
+
|
|
565
571
|
var message = _this.findMessage(messageId);
|
|
566
572
|
|
|
567
573
|
if (!message) return;
|
|
@@ -569,7 +575,7 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
569
575
|
|
|
570
576
|
var updatedPoll = _objectSpread$7({}, poll);
|
|
571
577
|
|
|
572
|
-
var ownVotes = _toConsumableArray(message.poll.own_votes || []);
|
|
578
|
+
var ownVotes = _toConsumableArray(((_message$poll3 = message.poll) === null || _message$poll3 === void 0 ? void 0 : _message$poll3.own_votes) || []);
|
|
573
579
|
|
|
574
580
|
if (pollVote.user_id === _this._channel.getClient().userID) {
|
|
575
581
|
var index = ownVotes.findIndex(function (vote) {
|
|
@@ -591,14 +597,14 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
591
597
|
});
|
|
592
598
|
|
|
593
599
|
_defineProperty(this, "updatePoll", function (poll, messageId) {
|
|
594
|
-
var _message$
|
|
600
|
+
var _message$poll4;
|
|
595
601
|
|
|
596
602
|
var message = _this.findMessage(messageId);
|
|
597
603
|
|
|
598
604
|
if (!message) return;
|
|
599
605
|
|
|
600
606
|
var updatedPoll = _objectSpread$7(_objectSpread$7({}, poll), {}, {
|
|
601
|
-
own_votes: _toConsumableArray(((_message$
|
|
607
|
+
own_votes: _toConsumableArray(((_message$poll4 = message.poll) === null || _message$poll4 === void 0 ? void 0 : _message$poll4.own_votes) || [])
|
|
602
608
|
});
|
|
603
609
|
|
|
604
610
|
var newMessage = _objectSpread$7(_objectSpread$7({}, message), {}, {
|
|
@@ -9089,6 +9095,59 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9089
9095
|
|
|
9090
9096
|
return queryChannels;
|
|
9091
9097
|
}()
|
|
9098
|
+
/**
|
|
9099
|
+
* queryReactions - Query reactions
|
|
9100
|
+
*
|
|
9101
|
+
* @param {ReactionFilters<StreamChatGenerics>} filter object MongoDB style filters
|
|
9102
|
+
* @param {ReactionSort<StreamChatGenerics>} [sort] Sort options, for instance {created_at: -1}.
|
|
9103
|
+
* @param {QueryReactionsOptions} [options] Pagination object
|
|
9104
|
+
*
|
|
9105
|
+
* @return {Promise<{ QueryReactionsAPIResponse } search channels response
|
|
9106
|
+
*/
|
|
9107
|
+
|
|
9108
|
+
}, {
|
|
9109
|
+
key: "queryReactions",
|
|
9110
|
+
value: function () {
|
|
9111
|
+
var _queryReactions = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21(messageID, filter) {
|
|
9112
|
+
var sort,
|
|
9113
|
+
options,
|
|
9114
|
+
payload,
|
|
9115
|
+
_args21 = arguments;
|
|
9116
|
+
return _regeneratorRuntime.wrap(function _callee21$(_context21) {
|
|
9117
|
+
while (1) {
|
|
9118
|
+
switch (_context21.prev = _context21.next) {
|
|
9119
|
+
case 0:
|
|
9120
|
+
sort = _args21.length > 2 && _args21[2] !== undefined ? _args21[2] : [];
|
|
9121
|
+
options = _args21.length > 3 && _args21[3] !== undefined ? _args21[3] : {};
|
|
9122
|
+
_context21.next = 4;
|
|
9123
|
+
return this.wsPromise;
|
|
9124
|
+
|
|
9125
|
+
case 4:
|
|
9126
|
+
// Return a list of channels
|
|
9127
|
+
payload = _objectSpread({
|
|
9128
|
+
filter: filter,
|
|
9129
|
+
sort: normalizeQuerySort(sort)
|
|
9130
|
+
}, options);
|
|
9131
|
+
_context21.next = 7;
|
|
9132
|
+
return this.post(this.baseURL + '/messages/' + messageID + '/reactions', payload);
|
|
9133
|
+
|
|
9134
|
+
case 7:
|
|
9135
|
+
return _context21.abrupt("return", _context21.sent);
|
|
9136
|
+
|
|
9137
|
+
case 8:
|
|
9138
|
+
case "end":
|
|
9139
|
+
return _context21.stop();
|
|
9140
|
+
}
|
|
9141
|
+
}
|
|
9142
|
+
}, _callee21, this);
|
|
9143
|
+
}));
|
|
9144
|
+
|
|
9145
|
+
function queryReactions(_x18, _x19) {
|
|
9146
|
+
return _queryReactions.apply(this, arguments);
|
|
9147
|
+
}
|
|
9148
|
+
|
|
9149
|
+
return queryReactions;
|
|
9150
|
+
}()
|
|
9092
9151
|
}, {
|
|
9093
9152
|
key: "hydrateActiveChannels",
|
|
9094
9153
|
value: function hydrateActiveChannels() {
|
|
@@ -9157,18 +9216,18 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9157
9216
|
}, {
|
|
9158
9217
|
key: "search",
|
|
9159
9218
|
value: function () {
|
|
9160
|
-
var _search = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9219
|
+
var _search = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22(filterConditions, query) {
|
|
9161
9220
|
var options,
|
|
9162
9221
|
payload,
|
|
9163
|
-
|
|
9164
|
-
return _regeneratorRuntime.wrap(function
|
|
9222
|
+
_args22 = arguments;
|
|
9223
|
+
return _regeneratorRuntime.wrap(function _callee22$(_context22) {
|
|
9165
9224
|
while (1) {
|
|
9166
|
-
switch (
|
|
9225
|
+
switch (_context22.prev = _context22.next) {
|
|
9167
9226
|
case 0:
|
|
9168
|
-
options =
|
|
9227
|
+
options = _args22.length > 2 && _args22[2] !== undefined ? _args22[2] : {};
|
|
9169
9228
|
|
|
9170
9229
|
if (!(options.offset && options.next)) {
|
|
9171
|
-
|
|
9230
|
+
_context22.next = 3;
|
|
9172
9231
|
break;
|
|
9173
9232
|
}
|
|
9174
9233
|
|
|
@@ -9182,49 +9241,49 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9182
9241
|
});
|
|
9183
9242
|
|
|
9184
9243
|
if (!(typeof query === 'string')) {
|
|
9185
|
-
|
|
9244
|
+
_context22.next = 8;
|
|
9186
9245
|
break;
|
|
9187
9246
|
}
|
|
9188
9247
|
|
|
9189
9248
|
payload.query = query;
|
|
9190
|
-
|
|
9249
|
+
_context22.next = 13;
|
|
9191
9250
|
break;
|
|
9192
9251
|
|
|
9193
9252
|
case 8:
|
|
9194
9253
|
if (!(_typeof(query) === 'object')) {
|
|
9195
|
-
|
|
9254
|
+
_context22.next = 12;
|
|
9196
9255
|
break;
|
|
9197
9256
|
}
|
|
9198
9257
|
|
|
9199
9258
|
payload.message_filter_conditions = query;
|
|
9200
|
-
|
|
9259
|
+
_context22.next = 13;
|
|
9201
9260
|
break;
|
|
9202
9261
|
|
|
9203
9262
|
case 12:
|
|
9204
9263
|
throw Error("Invalid type ".concat(_typeof(query), " for query parameter"));
|
|
9205
9264
|
|
|
9206
9265
|
case 13:
|
|
9207
|
-
|
|
9266
|
+
_context22.next = 15;
|
|
9208
9267
|
return this.wsPromise;
|
|
9209
9268
|
|
|
9210
9269
|
case 15:
|
|
9211
|
-
|
|
9270
|
+
_context22.next = 17;
|
|
9212
9271
|
return this.get(this.baseURL + '/search', {
|
|
9213
9272
|
payload: payload
|
|
9214
9273
|
});
|
|
9215
9274
|
|
|
9216
9275
|
case 17:
|
|
9217
|
-
return
|
|
9276
|
+
return _context22.abrupt("return", _context22.sent);
|
|
9218
9277
|
|
|
9219
9278
|
case 18:
|
|
9220
9279
|
case "end":
|
|
9221
|
-
return
|
|
9280
|
+
return _context22.stop();
|
|
9222
9281
|
}
|
|
9223
9282
|
}
|
|
9224
|
-
},
|
|
9283
|
+
}, _callee22, this);
|
|
9225
9284
|
}));
|
|
9226
9285
|
|
|
9227
|
-
function search(
|
|
9286
|
+
function search(_x20, _x21) {
|
|
9228
9287
|
return _search.apply(this, arguments);
|
|
9229
9288
|
}
|
|
9230
9289
|
|
|
@@ -9263,12 +9322,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9263
9322
|
}, {
|
|
9264
9323
|
key: "addDevice",
|
|
9265
9324
|
value: function () {
|
|
9266
|
-
var _addDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9267
|
-
return _regeneratorRuntime.wrap(function
|
|
9325
|
+
var _addDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23(id, push_provider, userID, push_provider_name) {
|
|
9326
|
+
return _regeneratorRuntime.wrap(function _callee23$(_context23) {
|
|
9268
9327
|
while (1) {
|
|
9269
|
-
switch (
|
|
9328
|
+
switch (_context23.prev = _context23.next) {
|
|
9270
9329
|
case 0:
|
|
9271
|
-
|
|
9330
|
+
_context23.next = 2;
|
|
9272
9331
|
return this.post(this.baseURL + '/devices', _objectSpread(_objectSpread({
|
|
9273
9332
|
id: id,
|
|
9274
9333
|
push_provider: push_provider
|
|
@@ -9279,17 +9338,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9279
9338
|
} : {}));
|
|
9280
9339
|
|
|
9281
9340
|
case 2:
|
|
9282
|
-
return
|
|
9341
|
+
return _context23.abrupt("return", _context23.sent);
|
|
9283
9342
|
|
|
9284
9343
|
case 3:
|
|
9285
9344
|
case "end":
|
|
9286
|
-
return
|
|
9345
|
+
return _context23.stop();
|
|
9287
9346
|
}
|
|
9288
9347
|
}
|
|
9289
|
-
},
|
|
9348
|
+
}, _callee23, this);
|
|
9290
9349
|
}));
|
|
9291
9350
|
|
|
9292
|
-
function addDevice(
|
|
9351
|
+
function addDevice(_x22, _x23, _x24, _x25) {
|
|
9293
9352
|
return _addDevice.apply(this, arguments);
|
|
9294
9353
|
}
|
|
9295
9354
|
|
|
@@ -9306,28 +9365,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9306
9365
|
}, {
|
|
9307
9366
|
key: "getDevices",
|
|
9308
9367
|
value: function () {
|
|
9309
|
-
var _getDevices = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9310
|
-
return _regeneratorRuntime.wrap(function
|
|
9368
|
+
var _getDevices = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24(userID) {
|
|
9369
|
+
return _regeneratorRuntime.wrap(function _callee24$(_context24) {
|
|
9311
9370
|
while (1) {
|
|
9312
|
-
switch (
|
|
9371
|
+
switch (_context24.prev = _context24.next) {
|
|
9313
9372
|
case 0:
|
|
9314
|
-
|
|
9373
|
+
_context24.next = 2;
|
|
9315
9374
|
return this.get(this.baseURL + '/devices', userID ? {
|
|
9316
9375
|
user_id: userID
|
|
9317
9376
|
} : {});
|
|
9318
9377
|
|
|
9319
9378
|
case 2:
|
|
9320
|
-
return
|
|
9379
|
+
return _context24.abrupt("return", _context24.sent);
|
|
9321
9380
|
|
|
9322
9381
|
case 3:
|
|
9323
9382
|
case "end":
|
|
9324
|
-
return
|
|
9383
|
+
return _context24.stop();
|
|
9325
9384
|
}
|
|
9326
9385
|
}
|
|
9327
|
-
},
|
|
9386
|
+
}, _callee24, this);
|
|
9328
9387
|
}));
|
|
9329
9388
|
|
|
9330
|
-
function getDevices(
|
|
9389
|
+
function getDevices(_x26) {
|
|
9331
9390
|
return _getDevices.apply(this, arguments);
|
|
9332
9391
|
}
|
|
9333
9392
|
|
|
@@ -9344,28 +9403,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9344
9403
|
}, {
|
|
9345
9404
|
key: "getUnreadCount",
|
|
9346
9405
|
value: function () {
|
|
9347
|
-
var _getUnreadCount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9348
|
-
return _regeneratorRuntime.wrap(function
|
|
9406
|
+
var _getUnreadCount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(userID) {
|
|
9407
|
+
return _regeneratorRuntime.wrap(function _callee25$(_context25) {
|
|
9349
9408
|
while (1) {
|
|
9350
|
-
switch (
|
|
9409
|
+
switch (_context25.prev = _context25.next) {
|
|
9351
9410
|
case 0:
|
|
9352
|
-
|
|
9411
|
+
_context25.next = 2;
|
|
9353
9412
|
return this.get(this.baseURL + '/unread', userID ? {
|
|
9354
9413
|
user_id: userID
|
|
9355
9414
|
} : {});
|
|
9356
9415
|
|
|
9357
9416
|
case 2:
|
|
9358
|
-
return
|
|
9417
|
+
return _context25.abrupt("return", _context25.sent);
|
|
9359
9418
|
|
|
9360
9419
|
case 3:
|
|
9361
9420
|
case "end":
|
|
9362
|
-
return
|
|
9421
|
+
return _context25.stop();
|
|
9363
9422
|
}
|
|
9364
9423
|
}
|
|
9365
|
-
},
|
|
9424
|
+
}, _callee25, this);
|
|
9366
9425
|
}));
|
|
9367
9426
|
|
|
9368
|
-
function getUnreadCount(
|
|
9427
|
+
function getUnreadCount(_x27) {
|
|
9369
9428
|
return _getUnreadCount.apply(this, arguments);
|
|
9370
9429
|
}
|
|
9371
9430
|
|
|
@@ -9382,28 +9441,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9382
9441
|
}, {
|
|
9383
9442
|
key: "getUnreadCountBatch",
|
|
9384
9443
|
value: function () {
|
|
9385
|
-
var _getUnreadCountBatch = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9386
|
-
return _regeneratorRuntime.wrap(function
|
|
9444
|
+
var _getUnreadCountBatch = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26(userIDs) {
|
|
9445
|
+
return _regeneratorRuntime.wrap(function _callee26$(_context26) {
|
|
9387
9446
|
while (1) {
|
|
9388
|
-
switch (
|
|
9447
|
+
switch (_context26.prev = _context26.next) {
|
|
9389
9448
|
case 0:
|
|
9390
|
-
|
|
9449
|
+
_context26.next = 2;
|
|
9391
9450
|
return this.post(this.baseURL + '/unread_batch', {
|
|
9392
9451
|
user_ids: userIDs
|
|
9393
9452
|
});
|
|
9394
9453
|
|
|
9395
9454
|
case 2:
|
|
9396
|
-
return
|
|
9455
|
+
return _context26.abrupt("return", _context26.sent);
|
|
9397
9456
|
|
|
9398
9457
|
case 3:
|
|
9399
9458
|
case "end":
|
|
9400
|
-
return
|
|
9459
|
+
return _context26.stop();
|
|
9401
9460
|
}
|
|
9402
9461
|
}
|
|
9403
|
-
},
|
|
9462
|
+
}, _callee26, this);
|
|
9404
9463
|
}));
|
|
9405
9464
|
|
|
9406
|
-
function getUnreadCountBatch(
|
|
9465
|
+
function getUnreadCountBatch(_x28) {
|
|
9407
9466
|
return _getUnreadCountBatch.apply(this, arguments);
|
|
9408
9467
|
}
|
|
9409
9468
|
|
|
@@ -9420,12 +9479,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9420
9479
|
}, {
|
|
9421
9480
|
key: "removeDevice",
|
|
9422
9481
|
value: function () {
|
|
9423
|
-
var _removeDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9424
|
-
return _regeneratorRuntime.wrap(function
|
|
9482
|
+
var _removeDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(id, userID) {
|
|
9483
|
+
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
|
9425
9484
|
while (1) {
|
|
9426
|
-
switch (
|
|
9485
|
+
switch (_context27.prev = _context27.next) {
|
|
9427
9486
|
case 0:
|
|
9428
|
-
|
|
9487
|
+
_context27.next = 2;
|
|
9429
9488
|
return this.delete(this.baseURL + '/devices', _objectSpread({
|
|
9430
9489
|
id: id
|
|
9431
9490
|
}, userID ? {
|
|
@@ -9433,17 +9492,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9433
9492
|
} : {}));
|
|
9434
9493
|
|
|
9435
9494
|
case 2:
|
|
9436
|
-
return
|
|
9495
|
+
return _context27.abrupt("return", _context27.sent);
|
|
9437
9496
|
|
|
9438
9497
|
case 3:
|
|
9439
9498
|
case "end":
|
|
9440
|
-
return
|
|
9499
|
+
return _context27.stop();
|
|
9441
9500
|
}
|
|
9442
9501
|
}
|
|
9443
|
-
},
|
|
9502
|
+
}, _callee27, this);
|
|
9444
9503
|
}));
|
|
9445
9504
|
|
|
9446
|
-
function removeDevice(
|
|
9505
|
+
function removeDevice(_x29, _x30) {
|
|
9447
9506
|
return _removeDevice.apply(this, arguments);
|
|
9448
9507
|
}
|
|
9449
9508
|
|
|
@@ -9460,15 +9519,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9460
9519
|
}, {
|
|
9461
9520
|
key: "getRateLimits",
|
|
9462
9521
|
value: function () {
|
|
9463
|
-
var _getRateLimits = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9522
|
+
var _getRateLimits = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(params) {
|
|
9464
9523
|
var _ref7, serverSide, web, android, ios, endpoints;
|
|
9465
9524
|
|
|
9466
|
-
return _regeneratorRuntime.wrap(function
|
|
9525
|
+
return _regeneratorRuntime.wrap(function _callee28$(_context28) {
|
|
9467
9526
|
while (1) {
|
|
9468
|
-
switch (
|
|
9527
|
+
switch (_context28.prev = _context28.next) {
|
|
9469
9528
|
case 0:
|
|
9470
9529
|
_ref7 = params || {}, serverSide = _ref7.serverSide, web = _ref7.web, android = _ref7.android, ios = _ref7.ios, endpoints = _ref7.endpoints;
|
|
9471
|
-
return
|
|
9530
|
+
return _context28.abrupt("return", this.get(this.baseURL + '/rate_limits', {
|
|
9472
9531
|
server_side: serverSide,
|
|
9473
9532
|
web: web,
|
|
9474
9533
|
android: android,
|
|
@@ -9478,13 +9537,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9478
9537
|
|
|
9479
9538
|
case 2:
|
|
9480
9539
|
case "end":
|
|
9481
|
-
return
|
|
9540
|
+
return _context28.stop();
|
|
9482
9541
|
}
|
|
9483
9542
|
}
|
|
9484
|
-
},
|
|
9543
|
+
}, _callee28, this);
|
|
9485
9544
|
}));
|
|
9486
9545
|
|
|
9487
|
-
function getRateLimits(
|
|
9546
|
+
function getRateLimits(_x31) {
|
|
9488
9547
|
return _getRateLimits.apply(this, arguments);
|
|
9489
9548
|
}
|
|
9490
9549
|
|
|
@@ -9575,26 +9634,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9575
9634
|
* @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>} list of updated users
|
|
9576
9635
|
*/
|
|
9577
9636
|
function () {
|
|
9578
|
-
var _partialUpdateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9579
|
-
return _regeneratorRuntime.wrap(function
|
|
9637
|
+
var _partialUpdateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(partialUserObject) {
|
|
9638
|
+
return _regeneratorRuntime.wrap(function _callee29$(_context29) {
|
|
9580
9639
|
while (1) {
|
|
9581
|
-
switch (
|
|
9640
|
+
switch (_context29.prev = _context29.next) {
|
|
9582
9641
|
case 0:
|
|
9583
|
-
|
|
9642
|
+
_context29.next = 2;
|
|
9584
9643
|
return this.partialUpdateUsers([partialUserObject]);
|
|
9585
9644
|
|
|
9586
9645
|
case 2:
|
|
9587
|
-
return
|
|
9646
|
+
return _context29.abrupt("return", _context29.sent);
|
|
9588
9647
|
|
|
9589
9648
|
case 3:
|
|
9590
9649
|
case "end":
|
|
9591
|
-
return
|
|
9650
|
+
return _context29.stop();
|
|
9592
9651
|
}
|
|
9593
9652
|
}
|
|
9594
|
-
},
|
|
9653
|
+
}, _callee29, this);
|
|
9595
9654
|
}));
|
|
9596
9655
|
|
|
9597
|
-
function partialUpdateUser(
|
|
9656
|
+
function partialUpdateUser(_x32) {
|
|
9598
9657
|
return _partialUpdateUser.apply(this, arguments);
|
|
9599
9658
|
}
|
|
9600
9659
|
|
|
@@ -9611,29 +9670,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9611
9670
|
}, {
|
|
9612
9671
|
key: "upsertUsers",
|
|
9613
9672
|
value: function () {
|
|
9614
|
-
var _upsertUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9673
|
+
var _upsertUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(users) {
|
|
9615
9674
|
var userMap, _iterator4, _step4, userObject;
|
|
9616
9675
|
|
|
9617
|
-
return _regeneratorRuntime.wrap(function
|
|
9676
|
+
return _regeneratorRuntime.wrap(function _callee30$(_context30) {
|
|
9618
9677
|
while (1) {
|
|
9619
|
-
switch (
|
|
9678
|
+
switch (_context30.prev = _context30.next) {
|
|
9620
9679
|
case 0:
|
|
9621
9680
|
userMap = {};
|
|
9622
9681
|
_iterator4 = _createForOfIteratorHelper(users);
|
|
9623
|
-
|
|
9682
|
+
_context30.prev = 2;
|
|
9624
9683
|
|
|
9625
9684
|
_iterator4.s();
|
|
9626
9685
|
|
|
9627
9686
|
case 4:
|
|
9628
9687
|
if ((_step4 = _iterator4.n()).done) {
|
|
9629
|
-
|
|
9688
|
+
_context30.next = 11;
|
|
9630
9689
|
break;
|
|
9631
9690
|
}
|
|
9632
9691
|
|
|
9633
9692
|
userObject = _step4.value;
|
|
9634
9693
|
|
|
9635
9694
|
if (userObject.id) {
|
|
9636
|
-
|
|
9695
|
+
_context30.next = 8;
|
|
9637
9696
|
break;
|
|
9638
9697
|
}
|
|
9639
9698
|
|
|
@@ -9643,44 +9702,44 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9643
9702
|
userMap[userObject.id] = userObject;
|
|
9644
9703
|
|
|
9645
9704
|
case 9:
|
|
9646
|
-
|
|
9705
|
+
_context30.next = 4;
|
|
9647
9706
|
break;
|
|
9648
9707
|
|
|
9649
9708
|
case 11:
|
|
9650
|
-
|
|
9709
|
+
_context30.next = 16;
|
|
9651
9710
|
break;
|
|
9652
9711
|
|
|
9653
9712
|
case 13:
|
|
9654
|
-
|
|
9655
|
-
|
|
9713
|
+
_context30.prev = 13;
|
|
9714
|
+
_context30.t0 = _context30["catch"](2);
|
|
9656
9715
|
|
|
9657
|
-
_iterator4.e(
|
|
9716
|
+
_iterator4.e(_context30.t0);
|
|
9658
9717
|
|
|
9659
9718
|
case 16:
|
|
9660
|
-
|
|
9719
|
+
_context30.prev = 16;
|
|
9661
9720
|
|
|
9662
9721
|
_iterator4.f();
|
|
9663
9722
|
|
|
9664
|
-
return
|
|
9723
|
+
return _context30.finish(16);
|
|
9665
9724
|
|
|
9666
9725
|
case 19:
|
|
9667
|
-
|
|
9726
|
+
_context30.next = 21;
|
|
9668
9727
|
return this.post(this.baseURL + '/users', {
|
|
9669
9728
|
users: userMap
|
|
9670
9729
|
});
|
|
9671
9730
|
|
|
9672
9731
|
case 21:
|
|
9673
|
-
return
|
|
9732
|
+
return _context30.abrupt("return", _context30.sent);
|
|
9674
9733
|
|
|
9675
9734
|
case 22:
|
|
9676
9735
|
case "end":
|
|
9677
|
-
return
|
|
9736
|
+
return _context30.stop();
|
|
9678
9737
|
}
|
|
9679
9738
|
}
|
|
9680
|
-
},
|
|
9739
|
+
}, _callee30, this, [[2, 13, 16, 19]]);
|
|
9681
9740
|
}));
|
|
9682
9741
|
|
|
9683
|
-
function upsertUsers(
|
|
9742
|
+
function upsertUsers(_x33) {
|
|
9684
9743
|
return _upsertUsers.apply(this, arguments);
|
|
9685
9744
|
}
|
|
9686
9745
|
|
|
@@ -9728,72 +9787,72 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9728
9787
|
* @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>}
|
|
9729
9788
|
*/
|
|
9730
9789
|
function () {
|
|
9731
|
-
var _partialUpdateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9790
|
+
var _partialUpdateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(users) {
|
|
9732
9791
|
var _iterator5, _step5, userObject;
|
|
9733
9792
|
|
|
9734
|
-
return _regeneratorRuntime.wrap(function
|
|
9793
|
+
return _regeneratorRuntime.wrap(function _callee31$(_context31) {
|
|
9735
9794
|
while (1) {
|
|
9736
|
-
switch (
|
|
9795
|
+
switch (_context31.prev = _context31.next) {
|
|
9737
9796
|
case 0:
|
|
9738
9797
|
_iterator5 = _createForOfIteratorHelper(users);
|
|
9739
|
-
|
|
9798
|
+
_context31.prev = 1;
|
|
9740
9799
|
|
|
9741
9800
|
_iterator5.s();
|
|
9742
9801
|
|
|
9743
9802
|
case 3:
|
|
9744
9803
|
if ((_step5 = _iterator5.n()).done) {
|
|
9745
|
-
|
|
9804
|
+
_context31.next = 9;
|
|
9746
9805
|
break;
|
|
9747
9806
|
}
|
|
9748
9807
|
|
|
9749
9808
|
userObject = _step5.value;
|
|
9750
9809
|
|
|
9751
9810
|
if (userObject.id) {
|
|
9752
|
-
|
|
9811
|
+
_context31.next = 7;
|
|
9753
9812
|
break;
|
|
9754
9813
|
}
|
|
9755
9814
|
|
|
9756
9815
|
throw Error('User ID is required when updating a user');
|
|
9757
9816
|
|
|
9758
9817
|
case 7:
|
|
9759
|
-
|
|
9818
|
+
_context31.next = 3;
|
|
9760
9819
|
break;
|
|
9761
9820
|
|
|
9762
9821
|
case 9:
|
|
9763
|
-
|
|
9822
|
+
_context31.next = 14;
|
|
9764
9823
|
break;
|
|
9765
9824
|
|
|
9766
9825
|
case 11:
|
|
9767
|
-
|
|
9768
|
-
|
|
9826
|
+
_context31.prev = 11;
|
|
9827
|
+
_context31.t0 = _context31["catch"](1);
|
|
9769
9828
|
|
|
9770
|
-
_iterator5.e(
|
|
9829
|
+
_iterator5.e(_context31.t0);
|
|
9771
9830
|
|
|
9772
9831
|
case 14:
|
|
9773
|
-
|
|
9832
|
+
_context31.prev = 14;
|
|
9774
9833
|
|
|
9775
9834
|
_iterator5.f();
|
|
9776
9835
|
|
|
9777
|
-
return
|
|
9836
|
+
return _context31.finish(14);
|
|
9778
9837
|
|
|
9779
9838
|
case 17:
|
|
9780
|
-
|
|
9839
|
+
_context31.next = 19;
|
|
9781
9840
|
return this.patch(this.baseURL + '/users', {
|
|
9782
9841
|
users: users
|
|
9783
9842
|
});
|
|
9784
9843
|
|
|
9785
9844
|
case 19:
|
|
9786
|
-
return
|
|
9845
|
+
return _context31.abrupt("return", _context31.sent);
|
|
9787
9846
|
|
|
9788
9847
|
case 20:
|
|
9789
9848
|
case "end":
|
|
9790
|
-
return
|
|
9849
|
+
return _context31.stop();
|
|
9791
9850
|
}
|
|
9792
9851
|
}
|
|
9793
|
-
},
|
|
9852
|
+
}, _callee31, this, [[1, 11, 14, 17]]);
|
|
9794
9853
|
}));
|
|
9795
9854
|
|
|
9796
|
-
function partialUpdateUsers(
|
|
9855
|
+
function partialUpdateUsers(_x34) {
|
|
9797
9856
|
return _partialUpdateUsers.apply(this, arguments);
|
|
9798
9857
|
}
|
|
9799
9858
|
|
|
@@ -9802,26 +9861,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9802
9861
|
}, {
|
|
9803
9862
|
key: "deleteUser",
|
|
9804
9863
|
value: function () {
|
|
9805
|
-
var _deleteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9806
|
-
return _regeneratorRuntime.wrap(function
|
|
9864
|
+
var _deleteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(userID, params) {
|
|
9865
|
+
return _regeneratorRuntime.wrap(function _callee32$(_context32) {
|
|
9807
9866
|
while (1) {
|
|
9808
|
-
switch (
|
|
9867
|
+
switch (_context32.prev = _context32.next) {
|
|
9809
9868
|
case 0:
|
|
9810
|
-
|
|
9869
|
+
_context32.next = 2;
|
|
9811
9870
|
return this.delete(this.baseURL + "/users/".concat(userID), params);
|
|
9812
9871
|
|
|
9813
9872
|
case 2:
|
|
9814
|
-
return
|
|
9873
|
+
return _context32.abrupt("return", _context32.sent);
|
|
9815
9874
|
|
|
9816
9875
|
case 3:
|
|
9817
9876
|
case "end":
|
|
9818
|
-
return
|
|
9877
|
+
return _context32.stop();
|
|
9819
9878
|
}
|
|
9820
9879
|
}
|
|
9821
|
-
},
|
|
9880
|
+
}, _callee32, this);
|
|
9822
9881
|
}));
|
|
9823
9882
|
|
|
9824
|
-
function deleteUser(
|
|
9883
|
+
function deleteUser(_x35, _x36) {
|
|
9825
9884
|
return _deleteUser.apply(this, arguments);
|
|
9826
9885
|
}
|
|
9827
9886
|
|
|
@@ -9838,28 +9897,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9838
9897
|
}, {
|
|
9839
9898
|
key: "restoreUsers",
|
|
9840
9899
|
value: function () {
|
|
9841
|
-
var _restoreUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9842
|
-
return _regeneratorRuntime.wrap(function
|
|
9900
|
+
var _restoreUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(user_ids) {
|
|
9901
|
+
return _regeneratorRuntime.wrap(function _callee33$(_context33) {
|
|
9843
9902
|
while (1) {
|
|
9844
|
-
switch (
|
|
9903
|
+
switch (_context33.prev = _context33.next) {
|
|
9845
9904
|
case 0:
|
|
9846
|
-
|
|
9905
|
+
_context33.next = 2;
|
|
9847
9906
|
return this.post(this.baseURL + "/users/restore", {
|
|
9848
9907
|
user_ids: user_ids
|
|
9849
9908
|
});
|
|
9850
9909
|
|
|
9851
9910
|
case 2:
|
|
9852
|
-
return
|
|
9911
|
+
return _context33.abrupt("return", _context33.sent);
|
|
9853
9912
|
|
|
9854
9913
|
case 3:
|
|
9855
9914
|
case "end":
|
|
9856
|
-
return
|
|
9915
|
+
return _context33.stop();
|
|
9857
9916
|
}
|
|
9858
9917
|
}
|
|
9859
|
-
},
|
|
9918
|
+
}, _callee33, this);
|
|
9860
9919
|
}));
|
|
9861
9920
|
|
|
9862
|
-
function restoreUsers(
|
|
9921
|
+
function restoreUsers(_x37) {
|
|
9863
9922
|
return _restoreUsers.apply(this, arguments);
|
|
9864
9923
|
}
|
|
9865
9924
|
|
|
@@ -9877,26 +9936,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9877
9936
|
}, {
|
|
9878
9937
|
key: "reactivateUser",
|
|
9879
9938
|
value: function () {
|
|
9880
|
-
var _reactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9881
|
-
return _regeneratorRuntime.wrap(function
|
|
9939
|
+
var _reactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(userID, options) {
|
|
9940
|
+
return _regeneratorRuntime.wrap(function _callee34$(_context34) {
|
|
9882
9941
|
while (1) {
|
|
9883
|
-
switch (
|
|
9942
|
+
switch (_context34.prev = _context34.next) {
|
|
9884
9943
|
case 0:
|
|
9885
|
-
|
|
9944
|
+
_context34.next = 2;
|
|
9886
9945
|
return this.post(this.baseURL + "/users/".concat(userID, "/reactivate"), _objectSpread({}, options));
|
|
9887
9946
|
|
|
9888
9947
|
case 2:
|
|
9889
|
-
return
|
|
9948
|
+
return _context34.abrupt("return", _context34.sent);
|
|
9890
9949
|
|
|
9891
9950
|
case 3:
|
|
9892
9951
|
case "end":
|
|
9893
|
-
return
|
|
9952
|
+
return _context34.stop();
|
|
9894
9953
|
}
|
|
9895
9954
|
}
|
|
9896
|
-
},
|
|
9955
|
+
}, _callee34, this);
|
|
9897
9956
|
}));
|
|
9898
9957
|
|
|
9899
|
-
function reactivateUser(
|
|
9958
|
+
function reactivateUser(_x38, _x39) {
|
|
9900
9959
|
return _reactivateUser.apply(this, arguments);
|
|
9901
9960
|
}
|
|
9902
9961
|
|
|
@@ -9914,28 +9973,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9914
9973
|
}, {
|
|
9915
9974
|
key: "reactivateUsers",
|
|
9916
9975
|
value: function () {
|
|
9917
|
-
var _reactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9918
|
-
return _regeneratorRuntime.wrap(function
|
|
9976
|
+
var _reactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(user_ids, options) {
|
|
9977
|
+
return _regeneratorRuntime.wrap(function _callee35$(_context35) {
|
|
9919
9978
|
while (1) {
|
|
9920
|
-
switch (
|
|
9979
|
+
switch (_context35.prev = _context35.next) {
|
|
9921
9980
|
case 0:
|
|
9922
|
-
|
|
9981
|
+
_context35.next = 2;
|
|
9923
9982
|
return this.post(this.baseURL + "/users/reactivate", _objectSpread({
|
|
9924
9983
|
user_ids: user_ids
|
|
9925
9984
|
}, options));
|
|
9926
9985
|
|
|
9927
9986
|
case 2:
|
|
9928
|
-
return
|
|
9987
|
+
return _context35.abrupt("return", _context35.sent);
|
|
9929
9988
|
|
|
9930
9989
|
case 3:
|
|
9931
9990
|
case "end":
|
|
9932
|
-
return
|
|
9991
|
+
return _context35.stop();
|
|
9933
9992
|
}
|
|
9934
9993
|
}
|
|
9935
|
-
},
|
|
9994
|
+
}, _callee35, this);
|
|
9936
9995
|
}));
|
|
9937
9996
|
|
|
9938
|
-
function reactivateUsers(
|
|
9997
|
+
function reactivateUsers(_x40, _x41) {
|
|
9939
9998
|
return _reactivateUsers.apply(this, arguments);
|
|
9940
9999
|
}
|
|
9941
10000
|
|
|
@@ -9953,26 +10012,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9953
10012
|
}, {
|
|
9954
10013
|
key: "deactivateUser",
|
|
9955
10014
|
value: function () {
|
|
9956
|
-
var _deactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9957
|
-
return _regeneratorRuntime.wrap(function
|
|
10015
|
+
var _deactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(userID, options) {
|
|
10016
|
+
return _regeneratorRuntime.wrap(function _callee36$(_context36) {
|
|
9958
10017
|
while (1) {
|
|
9959
|
-
switch (
|
|
10018
|
+
switch (_context36.prev = _context36.next) {
|
|
9960
10019
|
case 0:
|
|
9961
|
-
|
|
10020
|
+
_context36.next = 2;
|
|
9962
10021
|
return this.post(this.baseURL + "/users/".concat(userID, "/deactivate"), _objectSpread({}, options));
|
|
9963
10022
|
|
|
9964
10023
|
case 2:
|
|
9965
|
-
return
|
|
10024
|
+
return _context36.abrupt("return", _context36.sent);
|
|
9966
10025
|
|
|
9967
10026
|
case 3:
|
|
9968
10027
|
case "end":
|
|
9969
|
-
return
|
|
10028
|
+
return _context36.stop();
|
|
9970
10029
|
}
|
|
9971
10030
|
}
|
|
9972
|
-
},
|
|
10031
|
+
}, _callee36, this);
|
|
9973
10032
|
}));
|
|
9974
10033
|
|
|
9975
|
-
function deactivateUser(
|
|
10034
|
+
function deactivateUser(_x42, _x43) {
|
|
9976
10035
|
return _deactivateUser.apply(this, arguments);
|
|
9977
10036
|
}
|
|
9978
10037
|
|
|
@@ -9990,28 +10049,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9990
10049
|
}, {
|
|
9991
10050
|
key: "deactivateUsers",
|
|
9992
10051
|
value: function () {
|
|
9993
|
-
var _deactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9994
|
-
return _regeneratorRuntime.wrap(function
|
|
10052
|
+
var _deactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37(user_ids, options) {
|
|
10053
|
+
return _regeneratorRuntime.wrap(function _callee37$(_context37) {
|
|
9995
10054
|
while (1) {
|
|
9996
|
-
switch (
|
|
10055
|
+
switch (_context37.prev = _context37.next) {
|
|
9997
10056
|
case 0:
|
|
9998
|
-
|
|
10057
|
+
_context37.next = 2;
|
|
9999
10058
|
return this.post(this.baseURL + "/users/deactivate", _objectSpread({
|
|
10000
10059
|
user_ids: user_ids
|
|
10001
10060
|
}, options));
|
|
10002
10061
|
|
|
10003
10062
|
case 2:
|
|
10004
|
-
return
|
|
10063
|
+
return _context37.abrupt("return", _context37.sent);
|
|
10005
10064
|
|
|
10006
10065
|
case 3:
|
|
10007
10066
|
case "end":
|
|
10008
|
-
return
|
|
10067
|
+
return _context37.stop();
|
|
10009
10068
|
}
|
|
10010
10069
|
}
|
|
10011
|
-
},
|
|
10070
|
+
}, _callee37, this);
|
|
10012
10071
|
}));
|
|
10013
10072
|
|
|
10014
|
-
function deactivateUsers(
|
|
10073
|
+
function deactivateUsers(_x44, _x45) {
|
|
10015
10074
|
return _deactivateUsers.apply(this, arguments);
|
|
10016
10075
|
}
|
|
10017
10076
|
|
|
@@ -10020,26 +10079,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10020
10079
|
}, {
|
|
10021
10080
|
key: "exportUser",
|
|
10022
10081
|
value: function () {
|
|
10023
|
-
var _exportUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10024
|
-
return _regeneratorRuntime.wrap(function
|
|
10082
|
+
var _exportUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38(userID, options) {
|
|
10083
|
+
return _regeneratorRuntime.wrap(function _callee38$(_context38) {
|
|
10025
10084
|
while (1) {
|
|
10026
|
-
switch (
|
|
10085
|
+
switch (_context38.prev = _context38.next) {
|
|
10027
10086
|
case 0:
|
|
10028
|
-
|
|
10087
|
+
_context38.next = 2;
|
|
10029
10088
|
return this.get(this.baseURL + "/users/".concat(userID, "/export"), _objectSpread({}, options));
|
|
10030
10089
|
|
|
10031
10090
|
case 2:
|
|
10032
|
-
return
|
|
10091
|
+
return _context38.abrupt("return", _context38.sent);
|
|
10033
10092
|
|
|
10034
10093
|
case 3:
|
|
10035
10094
|
case "end":
|
|
10036
|
-
return
|
|
10095
|
+
return _context38.stop();
|
|
10037
10096
|
}
|
|
10038
10097
|
}
|
|
10039
|
-
},
|
|
10098
|
+
}, _callee38, this);
|
|
10040
10099
|
}));
|
|
10041
10100
|
|
|
10042
|
-
function exportUser(
|
|
10101
|
+
function exportUser(_x46, _x47) {
|
|
10043
10102
|
return _exportUser.apply(this, arguments);
|
|
10044
10103
|
}
|
|
10045
10104
|
|
|
@@ -10055,28 +10114,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10055
10114
|
}, {
|
|
10056
10115
|
key: "banUser",
|
|
10057
10116
|
value: function () {
|
|
10058
|
-
var _banUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10059
|
-
return _regeneratorRuntime.wrap(function
|
|
10117
|
+
var _banUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee39(targetUserID, options) {
|
|
10118
|
+
return _regeneratorRuntime.wrap(function _callee39$(_context39) {
|
|
10060
10119
|
while (1) {
|
|
10061
|
-
switch (
|
|
10120
|
+
switch (_context39.prev = _context39.next) {
|
|
10062
10121
|
case 0:
|
|
10063
|
-
|
|
10122
|
+
_context39.next = 2;
|
|
10064
10123
|
return this.post(this.baseURL + '/moderation/ban', _objectSpread({
|
|
10065
10124
|
target_user_id: targetUserID
|
|
10066
10125
|
}, options));
|
|
10067
10126
|
|
|
10068
10127
|
case 2:
|
|
10069
|
-
return
|
|
10128
|
+
return _context39.abrupt("return", _context39.sent);
|
|
10070
10129
|
|
|
10071
10130
|
case 3:
|
|
10072
10131
|
case "end":
|
|
10073
|
-
return
|
|
10132
|
+
return _context39.stop();
|
|
10074
10133
|
}
|
|
10075
10134
|
}
|
|
10076
|
-
},
|
|
10135
|
+
}, _callee39, this);
|
|
10077
10136
|
}));
|
|
10078
10137
|
|
|
10079
|
-
function banUser(
|
|
10138
|
+
function banUser(_x48, _x49) {
|
|
10080
10139
|
return _banUser.apply(this, arguments);
|
|
10081
10140
|
}
|
|
10082
10141
|
|
|
@@ -10092,28 +10151,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10092
10151
|
}, {
|
|
10093
10152
|
key: "unbanUser",
|
|
10094
10153
|
value: function () {
|
|
10095
|
-
var _unbanUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10096
|
-
return _regeneratorRuntime.wrap(function
|
|
10154
|
+
var _unbanUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee40(targetUserID, options) {
|
|
10155
|
+
return _regeneratorRuntime.wrap(function _callee40$(_context40) {
|
|
10097
10156
|
while (1) {
|
|
10098
|
-
switch (
|
|
10157
|
+
switch (_context40.prev = _context40.next) {
|
|
10099
10158
|
case 0:
|
|
10100
|
-
|
|
10159
|
+
_context40.next = 2;
|
|
10101
10160
|
return this.delete(this.baseURL + '/moderation/ban', _objectSpread({
|
|
10102
10161
|
target_user_id: targetUserID
|
|
10103
10162
|
}, options));
|
|
10104
10163
|
|
|
10105
10164
|
case 2:
|
|
10106
|
-
return
|
|
10165
|
+
return _context40.abrupt("return", _context40.sent);
|
|
10107
10166
|
|
|
10108
10167
|
case 3:
|
|
10109
10168
|
case "end":
|
|
10110
|
-
return
|
|
10169
|
+
return _context40.stop();
|
|
10111
10170
|
}
|
|
10112
10171
|
}
|
|
10113
|
-
},
|
|
10172
|
+
}, _callee40, this);
|
|
10114
10173
|
}));
|
|
10115
10174
|
|
|
10116
|
-
function unbanUser(
|
|
10175
|
+
function unbanUser(_x50, _x51) {
|
|
10117
10176
|
return _unbanUser.apply(this, arguments);
|
|
10118
10177
|
}
|
|
10119
10178
|
|
|
@@ -10129,28 +10188,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10129
10188
|
}, {
|
|
10130
10189
|
key: "shadowBan",
|
|
10131
10190
|
value: function () {
|
|
10132
|
-
var _shadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10133
|
-
return _regeneratorRuntime.wrap(function
|
|
10191
|
+
var _shadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee41(targetUserID, options) {
|
|
10192
|
+
return _regeneratorRuntime.wrap(function _callee41$(_context41) {
|
|
10134
10193
|
while (1) {
|
|
10135
|
-
switch (
|
|
10194
|
+
switch (_context41.prev = _context41.next) {
|
|
10136
10195
|
case 0:
|
|
10137
|
-
|
|
10196
|
+
_context41.next = 2;
|
|
10138
10197
|
return this.banUser(targetUserID, _objectSpread({
|
|
10139
10198
|
shadow: true
|
|
10140
10199
|
}, options));
|
|
10141
10200
|
|
|
10142
10201
|
case 2:
|
|
10143
|
-
return
|
|
10202
|
+
return _context41.abrupt("return", _context41.sent);
|
|
10144
10203
|
|
|
10145
10204
|
case 3:
|
|
10146
10205
|
case "end":
|
|
10147
|
-
return
|
|
10206
|
+
return _context41.stop();
|
|
10148
10207
|
}
|
|
10149
10208
|
}
|
|
10150
|
-
},
|
|
10209
|
+
}, _callee41, this);
|
|
10151
10210
|
}));
|
|
10152
10211
|
|
|
10153
|
-
function shadowBan(
|
|
10212
|
+
function shadowBan(_x52, _x53) {
|
|
10154
10213
|
return _shadowBan.apply(this, arguments);
|
|
10155
10214
|
}
|
|
10156
10215
|
|
|
@@ -10166,28 +10225,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10166
10225
|
}, {
|
|
10167
10226
|
key: "removeShadowBan",
|
|
10168
10227
|
value: function () {
|
|
10169
|
-
var _removeShadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10170
|
-
return _regeneratorRuntime.wrap(function
|
|
10228
|
+
var _removeShadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee42(targetUserID, options) {
|
|
10229
|
+
return _regeneratorRuntime.wrap(function _callee42$(_context42) {
|
|
10171
10230
|
while (1) {
|
|
10172
|
-
switch (
|
|
10231
|
+
switch (_context42.prev = _context42.next) {
|
|
10173
10232
|
case 0:
|
|
10174
|
-
|
|
10233
|
+
_context42.next = 2;
|
|
10175
10234
|
return this.unbanUser(targetUserID, _objectSpread({
|
|
10176
10235
|
shadow: true
|
|
10177
10236
|
}, options));
|
|
10178
10237
|
|
|
10179
10238
|
case 2:
|
|
10180
|
-
return
|
|
10239
|
+
return _context42.abrupt("return", _context42.sent);
|
|
10181
10240
|
|
|
10182
10241
|
case 3:
|
|
10183
10242
|
case "end":
|
|
10184
|
-
return
|
|
10243
|
+
return _context42.stop();
|
|
10185
10244
|
}
|
|
10186
10245
|
}
|
|
10187
|
-
},
|
|
10246
|
+
}, _callee42, this);
|
|
10188
10247
|
}));
|
|
10189
10248
|
|
|
10190
|
-
function removeShadowBan(
|
|
10249
|
+
function removeShadowBan(_x54, _x55) {
|
|
10191
10250
|
return _removeShadowBan.apply(this, arguments);
|
|
10192
10251
|
}
|
|
10193
10252
|
|
|
@@ -10204,15 +10263,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10204
10263
|
}, {
|
|
10205
10264
|
key: "muteUser",
|
|
10206
10265
|
value: function () {
|
|
10207
|
-
var _muteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10266
|
+
var _muteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43(targetID, userID) {
|
|
10208
10267
|
var options,
|
|
10209
|
-
|
|
10210
|
-
return _regeneratorRuntime.wrap(function
|
|
10268
|
+
_args43 = arguments;
|
|
10269
|
+
return _regeneratorRuntime.wrap(function _callee43$(_context43) {
|
|
10211
10270
|
while (1) {
|
|
10212
|
-
switch (
|
|
10271
|
+
switch (_context43.prev = _context43.next) {
|
|
10213
10272
|
case 0:
|
|
10214
|
-
options =
|
|
10215
|
-
|
|
10273
|
+
options = _args43.length > 2 && _args43[2] !== undefined ? _args43[2] : {};
|
|
10274
|
+
_context43.next = 3;
|
|
10216
10275
|
return this.post(this.baseURL + '/moderation/mute', _objectSpread(_objectSpread({
|
|
10217
10276
|
target_id: targetID
|
|
10218
10277
|
}, userID ? {
|
|
@@ -10220,17 +10279,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10220
10279
|
} : {}), options));
|
|
10221
10280
|
|
|
10222
10281
|
case 3:
|
|
10223
|
-
return
|
|
10282
|
+
return _context43.abrupt("return", _context43.sent);
|
|
10224
10283
|
|
|
10225
10284
|
case 4:
|
|
10226
10285
|
case "end":
|
|
10227
|
-
return
|
|
10286
|
+
return _context43.stop();
|
|
10228
10287
|
}
|
|
10229
10288
|
}
|
|
10230
|
-
},
|
|
10289
|
+
}, _callee43, this);
|
|
10231
10290
|
}));
|
|
10232
10291
|
|
|
10233
|
-
function muteUser(
|
|
10292
|
+
function muteUser(_x56, _x57) {
|
|
10234
10293
|
return _muteUser.apply(this, arguments);
|
|
10235
10294
|
}
|
|
10236
10295
|
|
|
@@ -10246,12 +10305,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10246
10305
|
}, {
|
|
10247
10306
|
key: "unmuteUser",
|
|
10248
10307
|
value: function () {
|
|
10249
|
-
var _unmuteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10250
|
-
return _regeneratorRuntime.wrap(function
|
|
10308
|
+
var _unmuteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(targetID, currentUserID) {
|
|
10309
|
+
return _regeneratorRuntime.wrap(function _callee44$(_context44) {
|
|
10251
10310
|
while (1) {
|
|
10252
|
-
switch (
|
|
10311
|
+
switch (_context44.prev = _context44.next) {
|
|
10253
10312
|
case 0:
|
|
10254
|
-
|
|
10313
|
+
_context44.next = 2;
|
|
10255
10314
|
return this.post(this.baseURL + '/moderation/unmute', _objectSpread({
|
|
10256
10315
|
target_id: targetID
|
|
10257
10316
|
}, currentUserID ? {
|
|
@@ -10259,17 +10318,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10259
10318
|
} : {}));
|
|
10260
10319
|
|
|
10261
10320
|
case 2:
|
|
10262
|
-
return
|
|
10321
|
+
return _context44.abrupt("return", _context44.sent);
|
|
10263
10322
|
|
|
10264
10323
|
case 3:
|
|
10265
10324
|
case "end":
|
|
10266
|
-
return
|
|
10325
|
+
return _context44.stop();
|
|
10267
10326
|
}
|
|
10268
10327
|
}
|
|
10269
|
-
},
|
|
10328
|
+
}, _callee44, this);
|
|
10270
10329
|
}));
|
|
10271
10330
|
|
|
10272
|
-
function unmuteUser(
|
|
10331
|
+
function unmuteUser(_x58, _x59) {
|
|
10273
10332
|
return _unmuteUser.apply(this, arguments);
|
|
10274
10333
|
}
|
|
10275
10334
|
|
|
@@ -10304,31 +10363,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10304
10363
|
}, {
|
|
10305
10364
|
key: "flagMessage",
|
|
10306
10365
|
value: function () {
|
|
10307
|
-
var _flagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10366
|
+
var _flagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(targetMessageID) {
|
|
10308
10367
|
var options,
|
|
10309
|
-
|
|
10310
|
-
return _regeneratorRuntime.wrap(function
|
|
10368
|
+
_args45 = arguments;
|
|
10369
|
+
return _regeneratorRuntime.wrap(function _callee45$(_context45) {
|
|
10311
10370
|
while (1) {
|
|
10312
|
-
switch (
|
|
10371
|
+
switch (_context45.prev = _context45.next) {
|
|
10313
10372
|
case 0:
|
|
10314
|
-
options =
|
|
10315
|
-
|
|
10373
|
+
options = _args45.length > 1 && _args45[1] !== undefined ? _args45[1] : {};
|
|
10374
|
+
_context45.next = 3;
|
|
10316
10375
|
return this.post(this.baseURL + '/moderation/flag', _objectSpread({
|
|
10317
10376
|
target_message_id: targetMessageID
|
|
10318
10377
|
}, options));
|
|
10319
10378
|
|
|
10320
10379
|
case 3:
|
|
10321
|
-
return
|
|
10380
|
+
return _context45.abrupt("return", _context45.sent);
|
|
10322
10381
|
|
|
10323
10382
|
case 4:
|
|
10324
10383
|
case "end":
|
|
10325
|
-
return
|
|
10384
|
+
return _context45.stop();
|
|
10326
10385
|
}
|
|
10327
10386
|
}
|
|
10328
|
-
},
|
|
10387
|
+
}, _callee45, this);
|
|
10329
10388
|
}));
|
|
10330
10389
|
|
|
10331
|
-
function flagMessage(
|
|
10390
|
+
function flagMessage(_x60) {
|
|
10332
10391
|
return _flagMessage.apply(this, arguments);
|
|
10333
10392
|
}
|
|
10334
10393
|
|
|
@@ -10344,31 +10403,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10344
10403
|
}, {
|
|
10345
10404
|
key: "flagUser",
|
|
10346
10405
|
value: function () {
|
|
10347
|
-
var _flagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10406
|
+
var _flagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(targetID) {
|
|
10348
10407
|
var options,
|
|
10349
|
-
|
|
10350
|
-
return _regeneratorRuntime.wrap(function
|
|
10408
|
+
_args46 = arguments;
|
|
10409
|
+
return _regeneratorRuntime.wrap(function _callee46$(_context46) {
|
|
10351
10410
|
while (1) {
|
|
10352
|
-
switch (
|
|
10411
|
+
switch (_context46.prev = _context46.next) {
|
|
10353
10412
|
case 0:
|
|
10354
|
-
options =
|
|
10355
|
-
|
|
10413
|
+
options = _args46.length > 1 && _args46[1] !== undefined ? _args46[1] : {};
|
|
10414
|
+
_context46.next = 3;
|
|
10356
10415
|
return this.post(this.baseURL + '/moderation/flag', _objectSpread({
|
|
10357
10416
|
target_user_id: targetID
|
|
10358
10417
|
}, options));
|
|
10359
10418
|
|
|
10360
10419
|
case 3:
|
|
10361
|
-
return
|
|
10420
|
+
return _context46.abrupt("return", _context46.sent);
|
|
10362
10421
|
|
|
10363
10422
|
case 4:
|
|
10364
10423
|
case "end":
|
|
10365
|
-
return
|
|
10424
|
+
return _context46.stop();
|
|
10366
10425
|
}
|
|
10367
10426
|
}
|
|
10368
|
-
},
|
|
10427
|
+
}, _callee46, this);
|
|
10369
10428
|
}));
|
|
10370
10429
|
|
|
10371
|
-
function flagUser(
|
|
10430
|
+
function flagUser(_x61) {
|
|
10372
10431
|
return _flagUser.apply(this, arguments);
|
|
10373
10432
|
}
|
|
10374
10433
|
|
|
@@ -10384,31 +10443,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10384
10443
|
}, {
|
|
10385
10444
|
key: "unflagMessage",
|
|
10386
10445
|
value: function () {
|
|
10387
|
-
var _unflagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10446
|
+
var _unflagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47(targetMessageID) {
|
|
10388
10447
|
var options,
|
|
10389
|
-
|
|
10390
|
-
return _regeneratorRuntime.wrap(function
|
|
10448
|
+
_args47 = arguments;
|
|
10449
|
+
return _regeneratorRuntime.wrap(function _callee47$(_context47) {
|
|
10391
10450
|
while (1) {
|
|
10392
|
-
switch (
|
|
10451
|
+
switch (_context47.prev = _context47.next) {
|
|
10393
10452
|
case 0:
|
|
10394
|
-
options =
|
|
10395
|
-
|
|
10453
|
+
options = _args47.length > 1 && _args47[1] !== undefined ? _args47[1] : {};
|
|
10454
|
+
_context47.next = 3;
|
|
10396
10455
|
return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
|
|
10397
10456
|
target_message_id: targetMessageID
|
|
10398
10457
|
}, options));
|
|
10399
10458
|
|
|
10400
10459
|
case 3:
|
|
10401
|
-
return
|
|
10460
|
+
return _context47.abrupt("return", _context47.sent);
|
|
10402
10461
|
|
|
10403
10462
|
case 4:
|
|
10404
10463
|
case "end":
|
|
10405
|
-
return
|
|
10464
|
+
return _context47.stop();
|
|
10406
10465
|
}
|
|
10407
10466
|
}
|
|
10408
|
-
},
|
|
10467
|
+
}, _callee47, this);
|
|
10409
10468
|
}));
|
|
10410
10469
|
|
|
10411
|
-
function unflagMessage(
|
|
10470
|
+
function unflagMessage(_x62) {
|
|
10412
10471
|
return _unflagMessage.apply(this, arguments);
|
|
10413
10472
|
}
|
|
10414
10473
|
|
|
@@ -10424,31 +10483,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10424
10483
|
}, {
|
|
10425
10484
|
key: "unflagUser",
|
|
10426
10485
|
value: function () {
|
|
10427
|
-
var _unflagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10486
|
+
var _unflagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(targetID) {
|
|
10428
10487
|
var options,
|
|
10429
|
-
|
|
10430
|
-
return _regeneratorRuntime.wrap(function
|
|
10488
|
+
_args48 = arguments;
|
|
10489
|
+
return _regeneratorRuntime.wrap(function _callee48$(_context48) {
|
|
10431
10490
|
while (1) {
|
|
10432
|
-
switch (
|
|
10491
|
+
switch (_context48.prev = _context48.next) {
|
|
10433
10492
|
case 0:
|
|
10434
|
-
options =
|
|
10435
|
-
|
|
10493
|
+
options = _args48.length > 1 && _args48[1] !== undefined ? _args48[1] : {};
|
|
10494
|
+
_context48.next = 3;
|
|
10436
10495
|
return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
|
|
10437
10496
|
target_user_id: targetID
|
|
10438
10497
|
}, options));
|
|
10439
10498
|
|
|
10440
10499
|
case 3:
|
|
10441
|
-
return
|
|
10500
|
+
return _context48.abrupt("return", _context48.sent);
|
|
10442
10501
|
|
|
10443
10502
|
case 4:
|
|
10444
10503
|
case "end":
|
|
10445
|
-
return
|
|
10504
|
+
return _context48.stop();
|
|
10446
10505
|
}
|
|
10447
10506
|
}
|
|
10448
|
-
},
|
|
10507
|
+
}, _callee48, this);
|
|
10449
10508
|
}));
|
|
10450
10509
|
|
|
10451
|
-
function unflagUser(
|
|
10510
|
+
function unflagUser(_x63) {
|
|
10452
10511
|
return _unflagUser.apply(this, arguments);
|
|
10453
10512
|
}
|
|
10454
10513
|
|
|
@@ -10465,29 +10524,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10465
10524
|
}, {
|
|
10466
10525
|
key: "getCallToken",
|
|
10467
10526
|
value: function () {
|
|
10468
|
-
var _getCallToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10527
|
+
var _getCallToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(callID) {
|
|
10469
10528
|
var options,
|
|
10470
|
-
|
|
10471
|
-
return _regeneratorRuntime.wrap(function
|
|
10529
|
+
_args49 = arguments;
|
|
10530
|
+
return _regeneratorRuntime.wrap(function _callee49$(_context49) {
|
|
10472
10531
|
while (1) {
|
|
10473
|
-
switch (
|
|
10532
|
+
switch (_context49.prev = _context49.next) {
|
|
10474
10533
|
case 0:
|
|
10475
|
-
options =
|
|
10476
|
-
|
|
10534
|
+
options = _args49.length > 1 && _args49[1] !== undefined ? _args49[1] : {};
|
|
10535
|
+
_context49.next = 3;
|
|
10477
10536
|
return this.post(this.baseURL + "/calls/".concat(callID), _objectSpread({}, options));
|
|
10478
10537
|
|
|
10479
10538
|
case 3:
|
|
10480
|
-
return
|
|
10539
|
+
return _context49.abrupt("return", _context49.sent);
|
|
10481
10540
|
|
|
10482
10541
|
case 4:
|
|
10483
10542
|
case "end":
|
|
10484
|
-
return
|
|
10543
|
+
return _context49.stop();
|
|
10485
10544
|
}
|
|
10486
10545
|
}
|
|
10487
|
-
},
|
|
10546
|
+
}, _callee49, this);
|
|
10488
10547
|
}));
|
|
10489
10548
|
|
|
10490
|
-
function getCallToken(
|
|
10549
|
+
function getCallToken(_x64) {
|
|
10491
10550
|
return _getCallToken.apply(this, arguments);
|
|
10492
10551
|
}
|
|
10493
10552
|
|
|
@@ -10510,30 +10569,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10510
10569
|
}, {
|
|
10511
10570
|
key: "_queryFlags",
|
|
10512
10571
|
value: function () {
|
|
10513
|
-
var _queryFlags2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10572
|
+
var _queryFlags2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50() {
|
|
10514
10573
|
var filterConditions,
|
|
10515
10574
|
options,
|
|
10516
|
-
|
|
10517
|
-
return _regeneratorRuntime.wrap(function
|
|
10575
|
+
_args50 = arguments;
|
|
10576
|
+
return _regeneratorRuntime.wrap(function _callee50$(_context50) {
|
|
10518
10577
|
while (1) {
|
|
10519
|
-
switch (
|
|
10578
|
+
switch (_context50.prev = _context50.next) {
|
|
10520
10579
|
case 0:
|
|
10521
|
-
filterConditions =
|
|
10522
|
-
options =
|
|
10523
|
-
|
|
10580
|
+
filterConditions = _args50.length > 0 && _args50[0] !== undefined ? _args50[0] : {};
|
|
10581
|
+
options = _args50.length > 1 && _args50[1] !== undefined ? _args50[1] : {};
|
|
10582
|
+
_context50.next = 4;
|
|
10524
10583
|
return this.post(this.baseURL + '/moderation/flags', _objectSpread({
|
|
10525
10584
|
filter_conditions: filterConditions
|
|
10526
10585
|
}, options));
|
|
10527
10586
|
|
|
10528
10587
|
case 4:
|
|
10529
|
-
return
|
|
10588
|
+
return _context50.abrupt("return", _context50.sent);
|
|
10530
10589
|
|
|
10531
10590
|
case 5:
|
|
10532
10591
|
case "end":
|
|
10533
|
-
return
|
|
10592
|
+
return _context50.stop();
|
|
10534
10593
|
}
|
|
10535
10594
|
}
|
|
10536
|
-
},
|
|
10595
|
+
}, _callee50, this);
|
|
10537
10596
|
}));
|
|
10538
10597
|
|
|
10539
10598
|
function _queryFlags() {
|
|
@@ -10559,30 +10618,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10559
10618
|
}, {
|
|
10560
10619
|
key: "_queryFlagReports",
|
|
10561
10620
|
value: function () {
|
|
10562
|
-
var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10621
|
+
var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51() {
|
|
10563
10622
|
var filterConditions,
|
|
10564
10623
|
options,
|
|
10565
|
-
|
|
10566
|
-
return _regeneratorRuntime.wrap(function
|
|
10624
|
+
_args51 = arguments;
|
|
10625
|
+
return _regeneratorRuntime.wrap(function _callee51$(_context51) {
|
|
10567
10626
|
while (1) {
|
|
10568
|
-
switch (
|
|
10627
|
+
switch (_context51.prev = _context51.next) {
|
|
10569
10628
|
case 0:
|
|
10570
|
-
filterConditions =
|
|
10571
|
-
options =
|
|
10572
|
-
|
|
10629
|
+
filterConditions = _args51.length > 0 && _args51[0] !== undefined ? _args51[0] : {};
|
|
10630
|
+
options = _args51.length > 1 && _args51[1] !== undefined ? _args51[1] : {};
|
|
10631
|
+
_context51.next = 4;
|
|
10573
10632
|
return this.post(this.baseURL + '/moderation/reports', _objectSpread({
|
|
10574
10633
|
filter_conditions: filterConditions
|
|
10575
10634
|
}, options));
|
|
10576
10635
|
|
|
10577
10636
|
case 4:
|
|
10578
|
-
return
|
|
10637
|
+
return _context51.abrupt("return", _context51.sent);
|
|
10579
10638
|
|
|
10580
10639
|
case 5:
|
|
10581
10640
|
case "end":
|
|
10582
|
-
return
|
|
10641
|
+
return _context51.stop();
|
|
10583
10642
|
}
|
|
10584
10643
|
}
|
|
10585
|
-
},
|
|
10644
|
+
}, _callee51, this);
|
|
10586
10645
|
}));
|
|
10587
10646
|
|
|
10588
10647
|
function _queryFlagReports() {
|
|
@@ -10609,31 +10668,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10609
10668
|
}, {
|
|
10610
10669
|
key: "_reviewFlagReport",
|
|
10611
10670
|
value: function () {
|
|
10612
|
-
var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10671
|
+
var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(id, reviewResult) {
|
|
10613
10672
|
var options,
|
|
10614
|
-
|
|
10615
|
-
return _regeneratorRuntime.wrap(function
|
|
10673
|
+
_args52 = arguments;
|
|
10674
|
+
return _regeneratorRuntime.wrap(function _callee52$(_context52) {
|
|
10616
10675
|
while (1) {
|
|
10617
|
-
switch (
|
|
10676
|
+
switch (_context52.prev = _context52.next) {
|
|
10618
10677
|
case 0:
|
|
10619
|
-
options =
|
|
10620
|
-
|
|
10678
|
+
options = _args52.length > 2 && _args52[2] !== undefined ? _args52[2] : {};
|
|
10679
|
+
_context52.next = 3;
|
|
10621
10680
|
return this.patch(this.baseURL + "/moderation/reports/".concat(id), _objectSpread({
|
|
10622
10681
|
review_result: reviewResult
|
|
10623
10682
|
}, options));
|
|
10624
10683
|
|
|
10625
10684
|
case 3:
|
|
10626
|
-
return
|
|
10685
|
+
return _context52.abrupt("return", _context52.sent);
|
|
10627
10686
|
|
|
10628
10687
|
case 4:
|
|
10629
10688
|
case "end":
|
|
10630
|
-
return
|
|
10689
|
+
return _context52.stop();
|
|
10631
10690
|
}
|
|
10632
10691
|
}
|
|
10633
|
-
},
|
|
10692
|
+
}, _callee52, this);
|
|
10634
10693
|
}));
|
|
10635
10694
|
|
|
10636
|
-
function _reviewFlagReport(
|
|
10695
|
+
function _reviewFlagReport(_x65, _x66) {
|
|
10637
10696
|
return _reviewFlagReport2.apply(this, arguments);
|
|
10638
10697
|
}
|
|
10639
10698
|
|
|
@@ -10651,31 +10710,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10651
10710
|
}, {
|
|
10652
10711
|
key: "unblockMessage",
|
|
10653
10712
|
value: function () {
|
|
10654
|
-
var _unblockMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10713
|
+
var _unblockMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53(targetMessageID) {
|
|
10655
10714
|
var options,
|
|
10656
|
-
|
|
10657
|
-
return _regeneratorRuntime.wrap(function
|
|
10715
|
+
_args53 = arguments;
|
|
10716
|
+
return _regeneratorRuntime.wrap(function _callee53$(_context53) {
|
|
10658
10717
|
while (1) {
|
|
10659
|
-
switch (
|
|
10718
|
+
switch (_context53.prev = _context53.next) {
|
|
10660
10719
|
case 0:
|
|
10661
|
-
options =
|
|
10662
|
-
|
|
10720
|
+
options = _args53.length > 1 && _args53[1] !== undefined ? _args53[1] : {};
|
|
10721
|
+
_context53.next = 3;
|
|
10663
10722
|
return this.post(this.baseURL + '/moderation/unblock_message', _objectSpread({
|
|
10664
10723
|
target_message_id: targetMessageID
|
|
10665
10724
|
}, options));
|
|
10666
10725
|
|
|
10667
10726
|
case 3:
|
|
10668
|
-
return
|
|
10727
|
+
return _context53.abrupt("return", _context53.sent);
|
|
10669
10728
|
|
|
10670
10729
|
case 4:
|
|
10671
10730
|
case "end":
|
|
10672
|
-
return
|
|
10731
|
+
return _context53.stop();
|
|
10673
10732
|
}
|
|
10674
10733
|
}
|
|
10675
|
-
},
|
|
10734
|
+
}, _callee53, this);
|
|
10676
10735
|
}));
|
|
10677
10736
|
|
|
10678
|
-
function unblockMessage(
|
|
10737
|
+
function unblockMessage(_x67) {
|
|
10679
10738
|
return _unblockMessage.apply(this, arguments);
|
|
10680
10739
|
}
|
|
10681
10740
|
|
|
@@ -10694,23 +10753,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10694
10753
|
* @return {Promise<APIResponse>}
|
|
10695
10754
|
*/
|
|
10696
10755
|
function () {
|
|
10697
|
-
var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10756
|
+
var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54() {
|
|
10698
10757
|
var data,
|
|
10699
|
-
|
|
10700
|
-
return _regeneratorRuntime.wrap(function
|
|
10758
|
+
_args54 = arguments;
|
|
10759
|
+
return _regeneratorRuntime.wrap(function _callee54$(_context54) {
|
|
10701
10760
|
while (1) {
|
|
10702
|
-
switch (
|
|
10761
|
+
switch (_context54.prev = _context54.next) {
|
|
10703
10762
|
case 0:
|
|
10704
|
-
data =
|
|
10705
|
-
|
|
10763
|
+
data = _args54.length > 0 && _args54[0] !== undefined ? _args54[0] : {};
|
|
10764
|
+
_context54.next = 3;
|
|
10706
10765
|
return this.post(this.baseURL + '/channels/read', _objectSpread({}, data));
|
|
10707
10766
|
|
|
10708
10767
|
case 3:
|
|
10709
10768
|
case "end":
|
|
10710
|
-
return
|
|
10769
|
+
return _context54.stop();
|
|
10711
10770
|
}
|
|
10712
10771
|
}
|
|
10713
|
-
},
|
|
10772
|
+
}, _callee54, this);
|
|
10714
10773
|
}));
|
|
10715
10774
|
|
|
10716
10775
|
function markChannelsRead() {
|
|
@@ -10785,28 +10844,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10785
10844
|
}, {
|
|
10786
10845
|
key: "translateMessage",
|
|
10787
10846
|
value: function () {
|
|
10788
|
-
var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10789
|
-
return _regeneratorRuntime.wrap(function
|
|
10847
|
+
var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(messageId, language) {
|
|
10848
|
+
return _regeneratorRuntime.wrap(function _callee55$(_context55) {
|
|
10790
10849
|
while (1) {
|
|
10791
|
-
switch (
|
|
10850
|
+
switch (_context55.prev = _context55.next) {
|
|
10792
10851
|
case 0:
|
|
10793
|
-
|
|
10852
|
+
_context55.next = 2;
|
|
10794
10853
|
return this.post(this.baseURL + "/messages/".concat(messageId, "/translate"), {
|
|
10795
10854
|
language: language
|
|
10796
10855
|
});
|
|
10797
10856
|
|
|
10798
10857
|
case 2:
|
|
10799
|
-
return
|
|
10858
|
+
return _context55.abrupt("return", _context55.sent);
|
|
10800
10859
|
|
|
10801
10860
|
case 3:
|
|
10802
10861
|
case "end":
|
|
10803
|
-
return
|
|
10862
|
+
return _context55.stop();
|
|
10804
10863
|
}
|
|
10805
10864
|
}
|
|
10806
|
-
},
|
|
10865
|
+
}, _callee55, this);
|
|
10807
10866
|
}));
|
|
10808
10867
|
|
|
10809
|
-
function translateMessage(
|
|
10868
|
+
function translateMessage(_x68, _x69) {
|
|
10810
10869
|
return _translateMessage.apply(this, arguments);
|
|
10811
10870
|
}
|
|
10812
10871
|
|
|
@@ -10908,14 +10967,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10908
10967
|
}, {
|
|
10909
10968
|
key: "updateMessage",
|
|
10910
10969
|
value: function () {
|
|
10911
|
-
var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10970
|
+
var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(message, userId, options) {
|
|
10912
10971
|
var clonedMessage, reservedMessageFields;
|
|
10913
|
-
return _regeneratorRuntime.wrap(function
|
|
10972
|
+
return _regeneratorRuntime.wrap(function _callee56$(_context56) {
|
|
10914
10973
|
while (1) {
|
|
10915
|
-
switch (
|
|
10974
|
+
switch (_context56.prev = _context56.next) {
|
|
10916
10975
|
case 0:
|
|
10917
10976
|
if (message.id) {
|
|
10918
|
-
|
|
10977
|
+
_context56.next = 2;
|
|
10919
10978
|
break;
|
|
10920
10979
|
}
|
|
10921
10980
|
|
|
@@ -10952,23 +11011,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10952
11011
|
});
|
|
10953
11012
|
}
|
|
10954
11013
|
|
|
10955
|
-
|
|
11014
|
+
_context56.next = 10;
|
|
10956
11015
|
return this.post(this.baseURL + "/messages/".concat(message.id), _objectSpread({
|
|
10957
11016
|
message: clonedMessage
|
|
10958
11017
|
}, options));
|
|
10959
11018
|
|
|
10960
11019
|
case 10:
|
|
10961
|
-
return
|
|
11020
|
+
return _context56.abrupt("return", _context56.sent);
|
|
10962
11021
|
|
|
10963
11022
|
case 11:
|
|
10964
11023
|
case "end":
|
|
10965
|
-
return
|
|
11024
|
+
return _context56.stop();
|
|
10966
11025
|
}
|
|
10967
11026
|
}
|
|
10968
|
-
},
|
|
11027
|
+
}, _callee56, this);
|
|
10969
11028
|
}));
|
|
10970
11029
|
|
|
10971
|
-
function updateMessage(
|
|
11030
|
+
function updateMessage(_x70, _x71, _x72) {
|
|
10972
11031
|
return _updateMessage.apply(this, arguments);
|
|
10973
11032
|
}
|
|
10974
11033
|
|
|
@@ -10991,14 +11050,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10991
11050
|
}, {
|
|
10992
11051
|
key: "partialUpdateMessage",
|
|
10993
11052
|
value: function () {
|
|
10994
|
-
var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11053
|
+
var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(id, partialMessageObject, userId, options) {
|
|
10995
11054
|
var user;
|
|
10996
|
-
return _regeneratorRuntime.wrap(function
|
|
11055
|
+
return _regeneratorRuntime.wrap(function _callee57$(_context57) {
|
|
10997
11056
|
while (1) {
|
|
10998
|
-
switch (
|
|
11057
|
+
switch (_context57.prev = _context57.next) {
|
|
10999
11058
|
case 0:
|
|
11000
11059
|
if (id) {
|
|
11001
|
-
|
|
11060
|
+
_context57.next = 2;
|
|
11002
11061
|
break;
|
|
11003
11062
|
}
|
|
11004
11063
|
|
|
@@ -11013,23 +11072,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11013
11072
|
};
|
|
11014
11073
|
}
|
|
11015
11074
|
|
|
11016
|
-
|
|
11075
|
+
_context57.next = 6;
|
|
11017
11076
|
return this.put(this.baseURL + "/messages/".concat(id), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
|
|
11018
11077
|
user: user
|
|
11019
11078
|
}));
|
|
11020
11079
|
|
|
11021
11080
|
case 6:
|
|
11022
|
-
return
|
|
11081
|
+
return _context57.abrupt("return", _context57.sent);
|
|
11023
11082
|
|
|
11024
11083
|
case 7:
|
|
11025
11084
|
case "end":
|
|
11026
|
-
return
|
|
11085
|
+
return _context57.stop();
|
|
11027
11086
|
}
|
|
11028
11087
|
}
|
|
11029
|
-
},
|
|
11088
|
+
}, _callee57, this);
|
|
11030
11089
|
}));
|
|
11031
11090
|
|
|
11032
|
-
function partialUpdateMessage(
|
|
11091
|
+
function partialUpdateMessage(_x73, _x74, _x75, _x76) {
|
|
11033
11092
|
return _partialUpdateMessage.apply(this, arguments);
|
|
11034
11093
|
}
|
|
11035
11094
|
|
|
@@ -11038,11 +11097,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11038
11097
|
}, {
|
|
11039
11098
|
key: "deleteMessage",
|
|
11040
11099
|
value: function () {
|
|
11041
|
-
var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11100
|
+
var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(messageID, hardDelete) {
|
|
11042
11101
|
var params;
|
|
11043
|
-
return _regeneratorRuntime.wrap(function
|
|
11102
|
+
return _regeneratorRuntime.wrap(function _callee58$(_context58) {
|
|
11044
11103
|
while (1) {
|
|
11045
|
-
switch (
|
|
11104
|
+
switch (_context58.prev = _context58.next) {
|
|
11046
11105
|
case 0:
|
|
11047
11106
|
params = {};
|
|
11048
11107
|
|
|
@@ -11052,21 +11111,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11052
11111
|
};
|
|
11053
11112
|
}
|
|
11054
11113
|
|
|
11055
|
-
|
|
11114
|
+
_context58.next = 4;
|
|
11056
11115
|
return this.delete(this.baseURL + "/messages/".concat(messageID), params);
|
|
11057
11116
|
|
|
11058
11117
|
case 4:
|
|
11059
|
-
return
|
|
11118
|
+
return _context58.abrupt("return", _context58.sent);
|
|
11060
11119
|
|
|
11061
11120
|
case 5:
|
|
11062
11121
|
case "end":
|
|
11063
|
-
return
|
|
11122
|
+
return _context58.stop();
|
|
11064
11123
|
}
|
|
11065
11124
|
}
|
|
11066
|
-
},
|
|
11125
|
+
}, _callee58, this);
|
|
11067
11126
|
}));
|
|
11068
11127
|
|
|
11069
|
-
function deleteMessage(
|
|
11128
|
+
function deleteMessage(_x77, _x78) {
|
|
11070
11129
|
return _deleteMessage.apply(this, arguments);
|
|
11071
11130
|
}
|
|
11072
11131
|
|
|
@@ -11088,28 +11147,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11088
11147
|
}, {
|
|
11089
11148
|
key: "undeleteMessage",
|
|
11090
11149
|
value: function () {
|
|
11091
|
-
var _undeleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11092
|
-
return _regeneratorRuntime.wrap(function
|
|
11150
|
+
var _undeleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(messageID, userID) {
|
|
11151
|
+
return _regeneratorRuntime.wrap(function _callee59$(_context59) {
|
|
11093
11152
|
while (1) {
|
|
11094
|
-
switch (
|
|
11153
|
+
switch (_context59.prev = _context59.next) {
|
|
11095
11154
|
case 0:
|
|
11096
|
-
|
|
11155
|
+
_context59.next = 2;
|
|
11097
11156
|
return this.post(this.baseURL + "/messages/".concat(messageID, "/undelete"), {
|
|
11098
11157
|
undeleted_by: userID
|
|
11099
11158
|
});
|
|
11100
11159
|
|
|
11101
11160
|
case 2:
|
|
11102
|
-
return
|
|
11161
|
+
return _context59.abrupt("return", _context59.sent);
|
|
11103
11162
|
|
|
11104
11163
|
case 3:
|
|
11105
11164
|
case "end":
|
|
11106
|
-
return
|
|
11165
|
+
return _context59.stop();
|
|
11107
11166
|
}
|
|
11108
11167
|
}
|
|
11109
|
-
},
|
|
11168
|
+
}, _callee59, this);
|
|
11110
11169
|
}));
|
|
11111
11170
|
|
|
11112
|
-
function undeleteMessage(
|
|
11171
|
+
function undeleteMessage(_x79, _x80) {
|
|
11113
11172
|
return _undeleteMessage.apply(this, arguments);
|
|
11114
11173
|
}
|
|
11115
11174
|
|
|
@@ -11118,26 +11177,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11118
11177
|
}, {
|
|
11119
11178
|
key: "getMessage",
|
|
11120
11179
|
value: function () {
|
|
11121
|
-
var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11122
|
-
return _regeneratorRuntime.wrap(function
|
|
11180
|
+
var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(messageID, options) {
|
|
11181
|
+
return _regeneratorRuntime.wrap(function _callee60$(_context60) {
|
|
11123
11182
|
while (1) {
|
|
11124
|
-
switch (
|
|
11183
|
+
switch (_context60.prev = _context60.next) {
|
|
11125
11184
|
case 0:
|
|
11126
|
-
|
|
11185
|
+
_context60.next = 2;
|
|
11127
11186
|
return this.get(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)), _objectSpread({}, options));
|
|
11128
11187
|
|
|
11129
11188
|
case 2:
|
|
11130
|
-
return
|
|
11189
|
+
return _context60.abrupt("return", _context60.sent);
|
|
11131
11190
|
|
|
11132
11191
|
case 3:
|
|
11133
11192
|
case "end":
|
|
11134
|
-
return
|
|
11193
|
+
return _context60.stop();
|
|
11135
11194
|
}
|
|
11136
11195
|
}
|
|
11137
|
-
},
|
|
11196
|
+
}, _callee60, this);
|
|
11138
11197
|
}));
|
|
11139
11198
|
|
|
11140
|
-
function getMessage(
|
|
11199
|
+
function getMessage(_x81, _x82) {
|
|
11141
11200
|
return _getMessage.apply(this, arguments);
|
|
11142
11201
|
}
|
|
11143
11202
|
|
|
@@ -11158,13 +11217,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11158
11217
|
}, {
|
|
11159
11218
|
key: "queryThreads",
|
|
11160
11219
|
value: function () {
|
|
11161
|
-
var _queryThreads = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11220
|
+
var _queryThreads = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(options) {
|
|
11162
11221
|
var _this5 = this;
|
|
11163
11222
|
|
|
11164
11223
|
var opts, res;
|
|
11165
|
-
return _regeneratorRuntime.wrap(function
|
|
11224
|
+
return _regeneratorRuntime.wrap(function _callee61$(_context61) {
|
|
11166
11225
|
while (1) {
|
|
11167
|
-
switch (
|
|
11226
|
+
switch (_context61.prev = _context61.next) {
|
|
11168
11227
|
case 0:
|
|
11169
11228
|
opts = _objectSpread({
|
|
11170
11229
|
limit: 10,
|
|
@@ -11172,12 +11231,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11172
11231
|
reply_limit: 3,
|
|
11173
11232
|
watch: true
|
|
11174
11233
|
}, options);
|
|
11175
|
-
|
|
11234
|
+
_context61.next = 3;
|
|
11176
11235
|
return this.post(this.baseURL + "/threads", opts);
|
|
11177
11236
|
|
|
11178
11237
|
case 3:
|
|
11179
|
-
res =
|
|
11180
|
-
return
|
|
11238
|
+
res = _context61.sent;
|
|
11239
|
+
return _context61.abrupt("return", {
|
|
11181
11240
|
threads: res.threads.map(function (thread) {
|
|
11182
11241
|
return new Thread(_this5, thread);
|
|
11183
11242
|
}),
|
|
@@ -11186,13 +11245,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11186
11245
|
|
|
11187
11246
|
case 5:
|
|
11188
11247
|
case "end":
|
|
11189
|
-
return
|
|
11248
|
+
return _context61.stop();
|
|
11190
11249
|
}
|
|
11191
11250
|
}
|
|
11192
|
-
},
|
|
11251
|
+
}, _callee61, this);
|
|
11193
11252
|
}));
|
|
11194
11253
|
|
|
11195
|
-
function queryThreads(
|
|
11254
|
+
function queryThreads(_x83) {
|
|
11196
11255
|
return _queryThreads.apply(this, arguments);
|
|
11197
11256
|
}
|
|
11198
11257
|
|
|
@@ -11213,19 +11272,19 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11213
11272
|
}, {
|
|
11214
11273
|
key: "getThread",
|
|
11215
11274
|
value: function () {
|
|
11216
|
-
var _getThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11275
|
+
var _getThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(messageId) {
|
|
11217
11276
|
var options,
|
|
11218
11277
|
opts,
|
|
11219
11278
|
res,
|
|
11220
|
-
|
|
11221
|
-
return _regeneratorRuntime.wrap(function
|
|
11279
|
+
_args62 = arguments;
|
|
11280
|
+
return _regeneratorRuntime.wrap(function _callee62$(_context62) {
|
|
11222
11281
|
while (1) {
|
|
11223
|
-
switch (
|
|
11282
|
+
switch (_context62.prev = _context62.next) {
|
|
11224
11283
|
case 0:
|
|
11225
|
-
options =
|
|
11284
|
+
options = _args62.length > 1 && _args62[1] !== undefined ? _args62[1] : {};
|
|
11226
11285
|
|
|
11227
11286
|
if (messageId) {
|
|
11228
|
-
|
|
11287
|
+
_context62.next = 3;
|
|
11229
11288
|
break;
|
|
11230
11289
|
}
|
|
11231
11290
|
|
|
@@ -11237,22 +11296,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11237
11296
|
reply_limit: 3,
|
|
11238
11297
|
watch: true
|
|
11239
11298
|
}, options);
|
|
11240
|
-
|
|
11299
|
+
_context62.next = 6;
|
|
11241
11300
|
return this.get(this.baseURL + "/threads/".concat(messageId), opts);
|
|
11242
11301
|
|
|
11243
11302
|
case 6:
|
|
11244
|
-
res =
|
|
11245
|
-
return
|
|
11303
|
+
res = _context62.sent;
|
|
11304
|
+
return _context62.abrupt("return", new Thread(this, res.thread));
|
|
11246
11305
|
|
|
11247
11306
|
case 8:
|
|
11248
11307
|
case "end":
|
|
11249
|
-
return
|
|
11308
|
+
return _context62.stop();
|
|
11250
11309
|
}
|
|
11251
11310
|
}
|
|
11252
|
-
},
|
|
11311
|
+
}, _callee62, this);
|
|
11253
11312
|
}));
|
|
11254
11313
|
|
|
11255
|
-
function getThread(
|
|
11314
|
+
function getThread(_x84) {
|
|
11256
11315
|
return _getThread.apply(this, arguments);
|
|
11257
11316
|
}
|
|
11258
11317
|
|
|
@@ -11270,15 +11329,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11270
11329
|
}, {
|
|
11271
11330
|
key: "partialUpdateThread",
|
|
11272
11331
|
value: function () {
|
|
11273
|
-
var _partialUpdateThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11332
|
+
var _partialUpdateThread = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(messageId, partialThreadObject) {
|
|
11274
11333
|
var reservedThreadFields, _key5;
|
|
11275
11334
|
|
|
11276
|
-
return _regeneratorRuntime.wrap(function
|
|
11335
|
+
return _regeneratorRuntime.wrap(function _callee63$(_context63) {
|
|
11277
11336
|
while (1) {
|
|
11278
|
-
switch (
|
|
11337
|
+
switch (_context63.prev = _context63.next) {
|
|
11279
11338
|
case 0:
|
|
11280
11339
|
if (messageId) {
|
|
11281
|
-
|
|
11340
|
+
_context63.next = 2;
|
|
11282
11341
|
break;
|
|
11283
11342
|
}
|
|
11284
11343
|
|
|
@@ -11288,43 +11347,43 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11288
11347
|
// check for reserved fields from ThreadResponse type within partialThreadObject's set and unset.
|
|
11289
11348
|
// Throw error if any of the reserved field is found.
|
|
11290
11349
|
reservedThreadFields = ['created_at', 'id', 'last_message_at', 'type', 'updated_at', 'user', 'reply_count', 'participants', 'channel'];
|
|
11291
|
-
|
|
11350
|
+
_context63.t0 = _regeneratorRuntime.keys(_objectSpread(_objectSpread({}, partialThreadObject.set), partialThreadObject.unset));
|
|
11292
11351
|
|
|
11293
11352
|
case 4:
|
|
11294
|
-
if ((
|
|
11295
|
-
|
|
11353
|
+
if ((_context63.t1 = _context63.t0()).done) {
|
|
11354
|
+
_context63.next = 10;
|
|
11296
11355
|
break;
|
|
11297
11356
|
}
|
|
11298
11357
|
|
|
11299
|
-
_key5 =
|
|
11358
|
+
_key5 = _context63.t1.value;
|
|
11300
11359
|
|
|
11301
11360
|
if (!reservedThreadFields.includes(_key5)) {
|
|
11302
|
-
|
|
11361
|
+
_context63.next = 8;
|
|
11303
11362
|
break;
|
|
11304
11363
|
}
|
|
11305
11364
|
|
|
11306
11365
|
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."));
|
|
11307
11366
|
|
|
11308
11367
|
case 8:
|
|
11309
|
-
|
|
11368
|
+
_context63.next = 4;
|
|
11310
11369
|
break;
|
|
11311
11370
|
|
|
11312
11371
|
case 10:
|
|
11313
|
-
|
|
11372
|
+
_context63.next = 12;
|
|
11314
11373
|
return this.patch(this.baseURL + "/threads/".concat(messageId), partialThreadObject);
|
|
11315
11374
|
|
|
11316
11375
|
case 12:
|
|
11317
|
-
return
|
|
11376
|
+
return _context63.abrupt("return", _context63.sent);
|
|
11318
11377
|
|
|
11319
11378
|
case 13:
|
|
11320
11379
|
case "end":
|
|
11321
|
-
return
|
|
11380
|
+
return _context63.stop();
|
|
11322
11381
|
}
|
|
11323
11382
|
}
|
|
11324
|
-
},
|
|
11383
|
+
}, _callee63, this);
|
|
11325
11384
|
}));
|
|
11326
11385
|
|
|
11327
|
-
function partialUpdateThread(
|
|
11386
|
+
function partialUpdateThread(_x85, _x86) {
|
|
11328
11387
|
return _partialUpdateThread.apply(this, arguments);
|
|
11329
11388
|
}
|
|
11330
11389
|
|
|
@@ -11333,7 +11392,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11333
11392
|
}, {
|
|
11334
11393
|
key: "getUserAgent",
|
|
11335
11394
|
value: function getUserAgent() {
|
|
11336
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.
|
|
11395
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.27.0");
|
|
11337
11396
|
}
|
|
11338
11397
|
}, {
|
|
11339
11398
|
key: "setUserAgent",
|
|
@@ -11552,28 +11611,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11552
11611
|
}, {
|
|
11553
11612
|
key: "sendUserCustomEvent",
|
|
11554
11613
|
value: function () {
|
|
11555
|
-
var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11556
|
-
return _regeneratorRuntime.wrap(function
|
|
11614
|
+
var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(targetUserID, event) {
|
|
11615
|
+
return _regeneratorRuntime.wrap(function _callee64$(_context64) {
|
|
11557
11616
|
while (1) {
|
|
11558
|
-
switch (
|
|
11617
|
+
switch (_context64.prev = _context64.next) {
|
|
11559
11618
|
case 0:
|
|
11560
|
-
|
|
11619
|
+
_context64.next = 2;
|
|
11561
11620
|
return this.post("".concat(this.baseURL, "/users/").concat(targetUserID, "/event"), {
|
|
11562
11621
|
event: event
|
|
11563
11622
|
});
|
|
11564
11623
|
|
|
11565
11624
|
case 2:
|
|
11566
|
-
return
|
|
11625
|
+
return _context64.abrupt("return", _context64.sent);
|
|
11567
11626
|
|
|
11568
11627
|
case 3:
|
|
11569
11628
|
case "end":
|
|
11570
|
-
return
|
|
11629
|
+
return _context64.stop();
|
|
11571
11630
|
}
|
|
11572
11631
|
}
|
|
11573
|
-
},
|
|
11632
|
+
}, _callee64, this);
|
|
11574
11633
|
}));
|
|
11575
11634
|
|
|
11576
|
-
function sendUserCustomEvent(
|
|
11635
|
+
function sendUserCustomEvent(_x87, _x88) {
|
|
11577
11636
|
return _sendUserCustomEvent.apply(this, arguments);
|
|
11578
11637
|
}
|
|
11579
11638
|
|
|
@@ -11670,28 +11729,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11670
11729
|
}, {
|
|
11671
11730
|
key: "createSegment",
|
|
11672
11731
|
value: function () {
|
|
11673
|
-
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11732
|
+
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(type, id, data) {
|
|
11674
11733
|
var body;
|
|
11675
|
-
return _regeneratorRuntime.wrap(function
|
|
11734
|
+
return _regeneratorRuntime.wrap(function _callee65$(_context65) {
|
|
11676
11735
|
while (1) {
|
|
11677
|
-
switch (
|
|
11736
|
+
switch (_context65.prev = _context65.next) {
|
|
11678
11737
|
case 0:
|
|
11679
11738
|
this.validateServerSideAuth();
|
|
11680
11739
|
body = _objectSpread({
|
|
11681
11740
|
id: id,
|
|
11682
11741
|
type: type
|
|
11683
11742
|
}, data);
|
|
11684
|
-
return
|
|
11743
|
+
return _context65.abrupt("return", this.post(this.baseURL + "/segments", body));
|
|
11685
11744
|
|
|
11686
11745
|
case 3:
|
|
11687
11746
|
case "end":
|
|
11688
|
-
return
|
|
11747
|
+
return _context65.stop();
|
|
11689
11748
|
}
|
|
11690
11749
|
}
|
|
11691
|
-
},
|
|
11750
|
+
}, _callee65, this);
|
|
11692
11751
|
}));
|
|
11693
11752
|
|
|
11694
|
-
function createSegment(
|
|
11753
|
+
function createSegment(_x89, _x90, _x91) {
|
|
11695
11754
|
return _createSegment.apply(this, arguments);
|
|
11696
11755
|
}
|
|
11697
11756
|
|
|
@@ -11710,23 +11769,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11710
11769
|
}, {
|
|
11711
11770
|
key: "createUserSegment",
|
|
11712
11771
|
value: function () {
|
|
11713
|
-
var _createUserSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11714
|
-
return _regeneratorRuntime.wrap(function
|
|
11772
|
+
var _createUserSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(id, data) {
|
|
11773
|
+
return _regeneratorRuntime.wrap(function _callee66$(_context66) {
|
|
11715
11774
|
while (1) {
|
|
11716
|
-
switch (
|
|
11775
|
+
switch (_context66.prev = _context66.next) {
|
|
11717
11776
|
case 0:
|
|
11718
11777
|
this.validateServerSideAuth();
|
|
11719
|
-
return
|
|
11778
|
+
return _context66.abrupt("return", this.createSegment('user', id, data));
|
|
11720
11779
|
|
|
11721
11780
|
case 2:
|
|
11722
11781
|
case "end":
|
|
11723
|
-
return
|
|
11782
|
+
return _context66.stop();
|
|
11724
11783
|
}
|
|
11725
11784
|
}
|
|
11726
|
-
},
|
|
11785
|
+
}, _callee66, this);
|
|
11727
11786
|
}));
|
|
11728
11787
|
|
|
11729
|
-
function createUserSegment(
|
|
11788
|
+
function createUserSegment(_x92, _x93) {
|
|
11730
11789
|
return _createUserSegment.apply(this, arguments);
|
|
11731
11790
|
}
|
|
11732
11791
|
|
|
@@ -11745,23 +11804,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11745
11804
|
}, {
|
|
11746
11805
|
key: "createChannelSegment",
|
|
11747
11806
|
value: function () {
|
|
11748
|
-
var _createChannelSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11749
|
-
return _regeneratorRuntime.wrap(function
|
|
11807
|
+
var _createChannelSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(id, data) {
|
|
11808
|
+
return _regeneratorRuntime.wrap(function _callee67$(_context67) {
|
|
11750
11809
|
while (1) {
|
|
11751
|
-
switch (
|
|
11810
|
+
switch (_context67.prev = _context67.next) {
|
|
11752
11811
|
case 0:
|
|
11753
11812
|
this.validateServerSideAuth();
|
|
11754
|
-
return
|
|
11813
|
+
return _context67.abrupt("return", this.createSegment('channel', id, data));
|
|
11755
11814
|
|
|
11756
11815
|
case 2:
|
|
11757
11816
|
case "end":
|
|
11758
|
-
return
|
|
11817
|
+
return _context67.stop();
|
|
11759
11818
|
}
|
|
11760
11819
|
}
|
|
11761
|
-
},
|
|
11820
|
+
}, _callee67, this);
|
|
11762
11821
|
}));
|
|
11763
11822
|
|
|
11764
|
-
function createChannelSegment(
|
|
11823
|
+
function createChannelSegment(_x94, _x95) {
|
|
11765
11824
|
return _createChannelSegment.apply(this, arguments);
|
|
11766
11825
|
}
|
|
11767
11826
|
|
|
@@ -11770,23 +11829,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11770
11829
|
}, {
|
|
11771
11830
|
key: "getSegment",
|
|
11772
11831
|
value: function () {
|
|
11773
|
-
var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11774
|
-
return _regeneratorRuntime.wrap(function
|
|
11832
|
+
var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(id) {
|
|
11833
|
+
return _regeneratorRuntime.wrap(function _callee68$(_context68) {
|
|
11775
11834
|
while (1) {
|
|
11776
|
-
switch (
|
|
11835
|
+
switch (_context68.prev = _context68.next) {
|
|
11777
11836
|
case 0:
|
|
11778
11837
|
this.validateServerSideAuth();
|
|
11779
|
-
return
|
|
11838
|
+
return _context68.abrupt("return", this.get(this.baseURL + "/segments/".concat(id)));
|
|
11780
11839
|
|
|
11781
11840
|
case 2:
|
|
11782
11841
|
case "end":
|
|
11783
|
-
return
|
|
11842
|
+
return _context68.stop();
|
|
11784
11843
|
}
|
|
11785
11844
|
}
|
|
11786
|
-
},
|
|
11845
|
+
}, _callee68, this);
|
|
11787
11846
|
}));
|
|
11788
11847
|
|
|
11789
|
-
function getSegment(
|
|
11848
|
+
function getSegment(_x96) {
|
|
11790
11849
|
return _getSegment.apply(this, arguments);
|
|
11791
11850
|
}
|
|
11792
11851
|
|
|
@@ -11804,23 +11863,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11804
11863
|
}, {
|
|
11805
11864
|
key: "updateSegment",
|
|
11806
11865
|
value: function () {
|
|
11807
|
-
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11808
|
-
return _regeneratorRuntime.wrap(function
|
|
11866
|
+
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(id, data) {
|
|
11867
|
+
return _regeneratorRuntime.wrap(function _callee69$(_context69) {
|
|
11809
11868
|
while (1) {
|
|
11810
|
-
switch (
|
|
11869
|
+
switch (_context69.prev = _context69.next) {
|
|
11811
11870
|
case 0:
|
|
11812
11871
|
this.validateServerSideAuth();
|
|
11813
|
-
return
|
|
11872
|
+
return _context69.abrupt("return", this.put(this.baseURL + "/segments/".concat(id), data));
|
|
11814
11873
|
|
|
11815
11874
|
case 2:
|
|
11816
11875
|
case "end":
|
|
11817
|
-
return
|
|
11876
|
+
return _context69.stop();
|
|
11818
11877
|
}
|
|
11819
11878
|
}
|
|
11820
|
-
},
|
|
11879
|
+
}, _callee69, this);
|
|
11821
11880
|
}));
|
|
11822
11881
|
|
|
11823
|
-
function updateSegment(
|
|
11882
|
+
function updateSegment(_x97, _x98) {
|
|
11824
11883
|
return _updateSegment.apply(this, arguments);
|
|
11825
11884
|
}
|
|
11826
11885
|
|
|
@@ -11838,27 +11897,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11838
11897
|
}, {
|
|
11839
11898
|
key: "addSegmentTargets",
|
|
11840
11899
|
value: function () {
|
|
11841
|
-
var _addSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11900
|
+
var _addSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(id, targets) {
|
|
11842
11901
|
var body;
|
|
11843
|
-
return _regeneratorRuntime.wrap(function
|
|
11902
|
+
return _regeneratorRuntime.wrap(function _callee70$(_context70) {
|
|
11844
11903
|
while (1) {
|
|
11845
|
-
switch (
|
|
11904
|
+
switch (_context70.prev = _context70.next) {
|
|
11846
11905
|
case 0:
|
|
11847
11906
|
this.validateServerSideAuth();
|
|
11848
11907
|
body = {
|
|
11849
11908
|
target_ids: targets
|
|
11850
11909
|
};
|
|
11851
|
-
return
|
|
11910
|
+
return _context70.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/addtargets"), body));
|
|
11852
11911
|
|
|
11853
11912
|
case 3:
|
|
11854
11913
|
case "end":
|
|
11855
|
-
return
|
|
11914
|
+
return _context70.stop();
|
|
11856
11915
|
}
|
|
11857
11916
|
}
|
|
11858
|
-
},
|
|
11917
|
+
}, _callee70, this);
|
|
11859
11918
|
}));
|
|
11860
11919
|
|
|
11861
|
-
function addSegmentTargets(
|
|
11920
|
+
function addSegmentTargets(_x99, _x100) {
|
|
11862
11921
|
return _addSegmentTargets.apply(this, arguments);
|
|
11863
11922
|
}
|
|
11864
11923
|
|
|
@@ -11867,33 +11926,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11867
11926
|
}, {
|
|
11868
11927
|
key: "querySegmentTargets",
|
|
11869
11928
|
value: function () {
|
|
11870
|
-
var _querySegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11929
|
+
var _querySegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(id) {
|
|
11871
11930
|
var filter,
|
|
11872
11931
|
sort,
|
|
11873
11932
|
options,
|
|
11874
|
-
|
|
11875
|
-
return _regeneratorRuntime.wrap(function
|
|
11933
|
+
_args71 = arguments;
|
|
11934
|
+
return _regeneratorRuntime.wrap(function _callee71$(_context71) {
|
|
11876
11935
|
while (1) {
|
|
11877
|
-
switch (
|
|
11936
|
+
switch (_context71.prev = _context71.next) {
|
|
11878
11937
|
case 0:
|
|
11879
|
-
filter =
|
|
11880
|
-
sort =
|
|
11881
|
-
options =
|
|
11938
|
+
filter = _args71.length > 1 && _args71[1] !== undefined ? _args71[1] : {};
|
|
11939
|
+
sort = _args71.length > 2 && _args71[2] !== undefined ? _args71[2] : [];
|
|
11940
|
+
options = _args71.length > 3 && _args71[3] !== undefined ? _args71[3] : {};
|
|
11882
11941
|
this.validateServerSideAuth();
|
|
11883
|
-
return
|
|
11942
|
+
return _context71.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/targets/query"), _objectSpread({
|
|
11884
11943
|
filter: filter || {},
|
|
11885
11944
|
sort: sort || []
|
|
11886
11945
|
}, options)));
|
|
11887
11946
|
|
|
11888
11947
|
case 5:
|
|
11889
11948
|
case "end":
|
|
11890
|
-
return
|
|
11949
|
+
return _context71.stop();
|
|
11891
11950
|
}
|
|
11892
11951
|
}
|
|
11893
|
-
},
|
|
11952
|
+
}, _callee71, this);
|
|
11894
11953
|
}));
|
|
11895
11954
|
|
|
11896
|
-
function querySegmentTargets(
|
|
11955
|
+
function querySegmentTargets(_x101) {
|
|
11897
11956
|
return _querySegmentTargets.apply(this, arguments);
|
|
11898
11957
|
}
|
|
11899
11958
|
|
|
@@ -11911,27 +11970,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11911
11970
|
}, {
|
|
11912
11971
|
key: "removeSegmentTargets",
|
|
11913
11972
|
value: function () {
|
|
11914
|
-
var _removeSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11973
|
+
var _removeSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(id, targets) {
|
|
11915
11974
|
var body;
|
|
11916
|
-
return _regeneratorRuntime.wrap(function
|
|
11975
|
+
return _regeneratorRuntime.wrap(function _callee72$(_context72) {
|
|
11917
11976
|
while (1) {
|
|
11918
|
-
switch (
|
|
11977
|
+
switch (_context72.prev = _context72.next) {
|
|
11919
11978
|
case 0:
|
|
11920
11979
|
this.validateServerSideAuth();
|
|
11921
11980
|
body = {
|
|
11922
11981
|
target_ids: targets
|
|
11923
11982
|
};
|
|
11924
|
-
return
|
|
11983
|
+
return _context72.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/deletetargets"), body));
|
|
11925
11984
|
|
|
11926
11985
|
case 3:
|
|
11927
11986
|
case "end":
|
|
11928
|
-
return
|
|
11987
|
+
return _context72.stop();
|
|
11929
11988
|
}
|
|
11930
11989
|
}
|
|
11931
|
-
},
|
|
11990
|
+
}, _callee72, this);
|
|
11932
11991
|
}));
|
|
11933
11992
|
|
|
11934
|
-
function removeSegmentTargets(
|
|
11993
|
+
function removeSegmentTargets(_x102, _x103) {
|
|
11935
11994
|
return _removeSegmentTargets.apply(this, arguments);
|
|
11936
11995
|
}
|
|
11937
11996
|
|
|
@@ -11949,29 +12008,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11949
12008
|
}, {
|
|
11950
12009
|
key: "querySegments",
|
|
11951
12010
|
value: function () {
|
|
11952
|
-
var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12011
|
+
var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(filter, sort) {
|
|
11953
12012
|
var options,
|
|
11954
|
-
|
|
11955
|
-
return _regeneratorRuntime.wrap(function
|
|
12013
|
+
_args73 = arguments;
|
|
12014
|
+
return _regeneratorRuntime.wrap(function _callee73$(_context73) {
|
|
11956
12015
|
while (1) {
|
|
11957
|
-
switch (
|
|
12016
|
+
switch (_context73.prev = _context73.next) {
|
|
11958
12017
|
case 0:
|
|
11959
|
-
options =
|
|
12018
|
+
options = _args73.length > 2 && _args73[2] !== undefined ? _args73[2] : {};
|
|
11960
12019
|
this.validateServerSideAuth();
|
|
11961
|
-
return
|
|
12020
|
+
return _context73.abrupt("return", this.post(this.baseURL + "/segments/query", _objectSpread({
|
|
11962
12021
|
filter: filter,
|
|
11963
12022
|
sort: sort
|
|
11964
12023
|
}, options)));
|
|
11965
12024
|
|
|
11966
12025
|
case 3:
|
|
11967
12026
|
case "end":
|
|
11968
|
-
return
|
|
12027
|
+
return _context73.stop();
|
|
11969
12028
|
}
|
|
11970
12029
|
}
|
|
11971
|
-
},
|
|
12030
|
+
}, _callee73, this);
|
|
11972
12031
|
}));
|
|
11973
12032
|
|
|
11974
|
-
function querySegments(
|
|
12033
|
+
function querySegments(_x104, _x105) {
|
|
11975
12034
|
return _querySegments.apply(this, arguments);
|
|
11976
12035
|
}
|
|
11977
12036
|
|
|
@@ -11988,23 +12047,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11988
12047
|
}, {
|
|
11989
12048
|
key: "deleteSegment",
|
|
11990
12049
|
value: function () {
|
|
11991
|
-
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11992
|
-
return _regeneratorRuntime.wrap(function
|
|
12050
|
+
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(id) {
|
|
12051
|
+
return _regeneratorRuntime.wrap(function _callee74$(_context74) {
|
|
11993
12052
|
while (1) {
|
|
11994
|
-
switch (
|
|
12053
|
+
switch (_context74.prev = _context74.next) {
|
|
11995
12054
|
case 0:
|
|
11996
12055
|
this.validateServerSideAuth();
|
|
11997
|
-
return
|
|
12056
|
+
return _context74.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
|
|
11998
12057
|
|
|
11999
12058
|
case 2:
|
|
12000
12059
|
case "end":
|
|
12001
|
-
return
|
|
12060
|
+
return _context74.stop();
|
|
12002
12061
|
}
|
|
12003
12062
|
}
|
|
12004
|
-
},
|
|
12063
|
+
}, _callee74, this);
|
|
12005
12064
|
}));
|
|
12006
12065
|
|
|
12007
|
-
function deleteSegment(
|
|
12066
|
+
function deleteSegment(_x106) {
|
|
12008
12067
|
return _deleteSegment.apply(this, arguments);
|
|
12009
12068
|
}
|
|
12010
12069
|
|
|
@@ -12022,23 +12081,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12022
12081
|
}, {
|
|
12023
12082
|
key: "segmentTargetExists",
|
|
12024
12083
|
value: function () {
|
|
12025
|
-
var _segmentTargetExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12026
|
-
return _regeneratorRuntime.wrap(function
|
|
12084
|
+
var _segmentTargetExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(segmentId, targetId) {
|
|
12085
|
+
return _regeneratorRuntime.wrap(function _callee75$(_context75) {
|
|
12027
12086
|
while (1) {
|
|
12028
|
-
switch (
|
|
12087
|
+
switch (_context75.prev = _context75.next) {
|
|
12029
12088
|
case 0:
|
|
12030
12089
|
this.validateServerSideAuth();
|
|
12031
|
-
return
|
|
12090
|
+
return _context75.abrupt("return", this.get(this.baseURL + "/segments/".concat(segmentId, "/target/").concat(targetId)));
|
|
12032
12091
|
|
|
12033
12092
|
case 2:
|
|
12034
12093
|
case "end":
|
|
12035
|
-
return
|
|
12094
|
+
return _context75.stop();
|
|
12036
12095
|
}
|
|
12037
12096
|
}
|
|
12038
|
-
},
|
|
12097
|
+
}, _callee75, this);
|
|
12039
12098
|
}));
|
|
12040
12099
|
|
|
12041
|
-
function segmentTargetExists(
|
|
12100
|
+
function segmentTargetExists(_x107, _x108) {
|
|
12042
12101
|
return _segmentTargetExists.apply(this, arguments);
|
|
12043
12102
|
}
|
|
12044
12103
|
|
|
@@ -12055,23 +12114,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12055
12114
|
}, {
|
|
12056
12115
|
key: "createCampaign",
|
|
12057
12116
|
value: function () {
|
|
12058
|
-
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12059
|
-
return _regeneratorRuntime.wrap(function
|
|
12117
|
+
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(params) {
|
|
12118
|
+
return _regeneratorRuntime.wrap(function _callee76$(_context76) {
|
|
12060
12119
|
while (1) {
|
|
12061
|
-
switch (
|
|
12120
|
+
switch (_context76.prev = _context76.next) {
|
|
12062
12121
|
case 0:
|
|
12063
12122
|
this.validateServerSideAuth();
|
|
12064
|
-
return
|
|
12123
|
+
return _context76.abrupt("return", this.post(this.baseURL + "/campaigns", _objectSpread({}, params)));
|
|
12065
12124
|
|
|
12066
12125
|
case 2:
|
|
12067
12126
|
case "end":
|
|
12068
|
-
return
|
|
12127
|
+
return _context76.stop();
|
|
12069
12128
|
}
|
|
12070
12129
|
}
|
|
12071
|
-
},
|
|
12130
|
+
}, _callee76, this);
|
|
12072
12131
|
}));
|
|
12073
12132
|
|
|
12074
|
-
function createCampaign(
|
|
12133
|
+
function createCampaign(_x109) {
|
|
12075
12134
|
return _createCampaign.apply(this, arguments);
|
|
12076
12135
|
}
|
|
12077
12136
|
|
|
@@ -12080,23 +12139,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12080
12139
|
}, {
|
|
12081
12140
|
key: "getCampaign",
|
|
12082
12141
|
value: function () {
|
|
12083
|
-
var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12084
|
-
return _regeneratorRuntime.wrap(function
|
|
12142
|
+
var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77(id) {
|
|
12143
|
+
return _regeneratorRuntime.wrap(function _callee77$(_context77) {
|
|
12085
12144
|
while (1) {
|
|
12086
|
-
switch (
|
|
12145
|
+
switch (_context77.prev = _context77.next) {
|
|
12087
12146
|
case 0:
|
|
12088
12147
|
this.validateServerSideAuth();
|
|
12089
|
-
return
|
|
12148
|
+
return _context77.abrupt("return", this.get(this.baseURL + "/campaigns/".concat(id)));
|
|
12090
12149
|
|
|
12091
12150
|
case 2:
|
|
12092
12151
|
case "end":
|
|
12093
|
-
return
|
|
12152
|
+
return _context77.stop();
|
|
12094
12153
|
}
|
|
12095
12154
|
}
|
|
12096
|
-
},
|
|
12155
|
+
}, _callee77, this);
|
|
12097
12156
|
}));
|
|
12098
12157
|
|
|
12099
|
-
function getCampaign(
|
|
12158
|
+
function getCampaign(_x110) {
|
|
12100
12159
|
return _getCampaign.apply(this, arguments);
|
|
12101
12160
|
}
|
|
12102
12161
|
|
|
@@ -12105,26 +12164,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12105
12164
|
}, {
|
|
12106
12165
|
key: "startCampaign",
|
|
12107
12166
|
value: function () {
|
|
12108
|
-
var _startCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12109
|
-
return _regeneratorRuntime.wrap(function
|
|
12167
|
+
var _startCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78(id, options) {
|
|
12168
|
+
return _regeneratorRuntime.wrap(function _callee78$(_context78) {
|
|
12110
12169
|
while (1) {
|
|
12111
|
-
switch (
|
|
12170
|
+
switch (_context78.prev = _context78.next) {
|
|
12112
12171
|
case 0:
|
|
12113
12172
|
this.validateServerSideAuth();
|
|
12114
|
-
return
|
|
12173
|
+
return _context78.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(id, "/start"), {
|
|
12115
12174
|
scheduled_for: options === null || options === void 0 ? void 0 : options.scheduledFor,
|
|
12116
12175
|
stop_at: options === null || options === void 0 ? void 0 : options.stopAt
|
|
12117
12176
|
}));
|
|
12118
12177
|
|
|
12119
12178
|
case 2:
|
|
12120
12179
|
case "end":
|
|
12121
|
-
return
|
|
12180
|
+
return _context78.stop();
|
|
12122
12181
|
}
|
|
12123
12182
|
}
|
|
12124
|
-
},
|
|
12183
|
+
}, _callee78, this);
|
|
12125
12184
|
}));
|
|
12126
12185
|
|
|
12127
|
-
function startCampaign(
|
|
12186
|
+
function startCampaign(_x111, _x112) {
|
|
12128
12187
|
return _startCampaign.apply(this, arguments);
|
|
12129
12188
|
}
|
|
12130
12189
|
|
|
@@ -12140,30 +12199,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12140
12199
|
}, {
|
|
12141
12200
|
key: "queryCampaigns",
|
|
12142
12201
|
value: function () {
|
|
12143
|
-
var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12144
|
-
return _regeneratorRuntime.wrap(function
|
|
12202
|
+
var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(filter, sort, options) {
|
|
12203
|
+
return _regeneratorRuntime.wrap(function _callee79$(_context79) {
|
|
12145
12204
|
while (1) {
|
|
12146
|
-
switch (
|
|
12205
|
+
switch (_context79.prev = _context79.next) {
|
|
12147
12206
|
case 0:
|
|
12148
12207
|
this.validateServerSideAuth();
|
|
12149
|
-
|
|
12208
|
+
_context79.next = 3;
|
|
12150
12209
|
return this.post(this.baseURL + "/campaigns/query", _objectSpread({
|
|
12151
12210
|
filter: filter,
|
|
12152
12211
|
sort: sort
|
|
12153
12212
|
}, options || {}));
|
|
12154
12213
|
|
|
12155
12214
|
case 3:
|
|
12156
|
-
return
|
|
12215
|
+
return _context79.abrupt("return", _context79.sent);
|
|
12157
12216
|
|
|
12158
12217
|
case 4:
|
|
12159
12218
|
case "end":
|
|
12160
|
-
return
|
|
12219
|
+
return _context79.stop();
|
|
12161
12220
|
}
|
|
12162
12221
|
}
|
|
12163
|
-
},
|
|
12222
|
+
}, _callee79, this);
|
|
12164
12223
|
}));
|
|
12165
12224
|
|
|
12166
|
-
function queryCampaigns(
|
|
12225
|
+
function queryCampaigns(_x113, _x114, _x115) {
|
|
12167
12226
|
return _queryCampaigns.apply(this, arguments);
|
|
12168
12227
|
}
|
|
12169
12228
|
|
|
@@ -12181,23 +12240,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12181
12240
|
}, {
|
|
12182
12241
|
key: "updateCampaign",
|
|
12183
12242
|
value: function () {
|
|
12184
|
-
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12185
|
-
return _regeneratorRuntime.wrap(function
|
|
12243
|
+
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee80(id, params) {
|
|
12244
|
+
return _regeneratorRuntime.wrap(function _callee80$(_context80) {
|
|
12186
12245
|
while (1) {
|
|
12187
|
-
switch (
|
|
12246
|
+
switch (_context80.prev = _context80.next) {
|
|
12188
12247
|
case 0:
|
|
12189
12248
|
this.validateServerSideAuth();
|
|
12190
|
-
return
|
|
12249
|
+
return _context80.abrupt("return", this.put(this.baseURL + "/campaigns/".concat(id), params));
|
|
12191
12250
|
|
|
12192
12251
|
case 2:
|
|
12193
12252
|
case "end":
|
|
12194
|
-
return
|
|
12253
|
+
return _context80.stop();
|
|
12195
12254
|
}
|
|
12196
12255
|
}
|
|
12197
|
-
},
|
|
12256
|
+
}, _callee80, this);
|
|
12198
12257
|
}));
|
|
12199
12258
|
|
|
12200
|
-
function updateCampaign(
|
|
12259
|
+
function updateCampaign(_x116, _x117) {
|
|
12201
12260
|
return _updateCampaign.apply(this, arguments);
|
|
12202
12261
|
}
|
|
12203
12262
|
|
|
@@ -12214,23 +12273,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12214
12273
|
}, {
|
|
12215
12274
|
key: "deleteCampaign",
|
|
12216
12275
|
value: function () {
|
|
12217
|
-
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12218
|
-
return _regeneratorRuntime.wrap(function
|
|
12276
|
+
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee81(id) {
|
|
12277
|
+
return _regeneratorRuntime.wrap(function _callee81$(_context81) {
|
|
12219
12278
|
while (1) {
|
|
12220
|
-
switch (
|
|
12279
|
+
switch (_context81.prev = _context81.next) {
|
|
12221
12280
|
case 0:
|
|
12222
12281
|
this.validateServerSideAuth();
|
|
12223
|
-
return
|
|
12282
|
+
return _context81.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id)));
|
|
12224
12283
|
|
|
12225
12284
|
case 2:
|
|
12226
12285
|
case "end":
|
|
12227
|
-
return
|
|
12286
|
+
return _context81.stop();
|
|
12228
12287
|
}
|
|
12229
12288
|
}
|
|
12230
|
-
},
|
|
12289
|
+
}, _callee81, this);
|
|
12231
12290
|
}));
|
|
12232
12291
|
|
|
12233
|
-
function deleteCampaign(
|
|
12292
|
+
function deleteCampaign(_x118) {
|
|
12234
12293
|
return _deleteCampaign.apply(this, arguments);
|
|
12235
12294
|
}
|
|
12236
12295
|
|
|
@@ -12247,23 +12306,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12247
12306
|
}, {
|
|
12248
12307
|
key: "stopCampaign",
|
|
12249
12308
|
value: function () {
|
|
12250
|
-
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12251
|
-
return _regeneratorRuntime.wrap(function
|
|
12309
|
+
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee82(id) {
|
|
12310
|
+
return _regeneratorRuntime.wrap(function _callee82$(_context82) {
|
|
12252
12311
|
while (1) {
|
|
12253
|
-
switch (
|
|
12312
|
+
switch (_context82.prev = _context82.next) {
|
|
12254
12313
|
case 0:
|
|
12255
12314
|
this.validateServerSideAuth();
|
|
12256
|
-
return
|
|
12315
|
+
return _context82.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(id, "/stop")));
|
|
12257
12316
|
|
|
12258
12317
|
case 2:
|
|
12259
12318
|
case "end":
|
|
12260
|
-
return
|
|
12319
|
+
return _context82.stop();
|
|
12261
12320
|
}
|
|
12262
12321
|
}
|
|
12263
|
-
},
|
|
12322
|
+
}, _callee82, this);
|
|
12264
12323
|
}));
|
|
12265
12324
|
|
|
12266
|
-
function stopCampaign(
|
|
12325
|
+
function stopCampaign(_x119) {
|
|
12267
12326
|
return _stopCampaign.apply(this, arguments);
|
|
12268
12327
|
}
|
|
12269
12328
|
|
|
@@ -12279,24 +12338,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12279
12338
|
}, {
|
|
12280
12339
|
key: "enrichURL",
|
|
12281
12340
|
value: function () {
|
|
12282
|
-
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12283
|
-
return _regeneratorRuntime.wrap(function
|
|
12341
|
+
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee83(url) {
|
|
12342
|
+
return _regeneratorRuntime.wrap(function _callee83$(_context83) {
|
|
12284
12343
|
while (1) {
|
|
12285
|
-
switch (
|
|
12344
|
+
switch (_context83.prev = _context83.next) {
|
|
12286
12345
|
case 0:
|
|
12287
|
-
return
|
|
12346
|
+
return _context83.abrupt("return", this.get(this.baseURL + "/og", {
|
|
12288
12347
|
url: url
|
|
12289
12348
|
}));
|
|
12290
12349
|
|
|
12291
12350
|
case 1:
|
|
12292
12351
|
case "end":
|
|
12293
|
-
return
|
|
12352
|
+
return _context83.stop();
|
|
12294
12353
|
}
|
|
12295
12354
|
}
|
|
12296
|
-
},
|
|
12355
|
+
}, _callee83, this);
|
|
12297
12356
|
}));
|
|
12298
12357
|
|
|
12299
|
-
function enrichURL(
|
|
12358
|
+
function enrichURL(_x120) {
|
|
12300
12359
|
return _enrichURL.apply(this, arguments);
|
|
12301
12360
|
}
|
|
12302
12361
|
|
|
@@ -12313,22 +12372,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12313
12372
|
}, {
|
|
12314
12373
|
key: "getTask",
|
|
12315
12374
|
value: function () {
|
|
12316
|
-
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12317
|
-
return _regeneratorRuntime.wrap(function
|
|
12375
|
+
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee84(id) {
|
|
12376
|
+
return _regeneratorRuntime.wrap(function _callee84$(_context84) {
|
|
12318
12377
|
while (1) {
|
|
12319
|
-
switch (
|
|
12378
|
+
switch (_context84.prev = _context84.next) {
|
|
12320
12379
|
case 0:
|
|
12321
|
-
return
|
|
12380
|
+
return _context84.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
|
|
12322
12381
|
|
|
12323
12382
|
case 1:
|
|
12324
12383
|
case "end":
|
|
12325
|
-
return
|
|
12384
|
+
return _context84.stop();
|
|
12326
12385
|
}
|
|
12327
12386
|
}
|
|
12328
|
-
},
|
|
12387
|
+
}, _callee84, this);
|
|
12329
12388
|
}));
|
|
12330
12389
|
|
|
12331
|
-
function getTask(
|
|
12390
|
+
function getTask(_x121) {
|
|
12332
12391
|
return _getTask.apply(this, arguments);
|
|
12333
12392
|
}
|
|
12334
12393
|
|
|
@@ -12346,31 +12405,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12346
12405
|
}, {
|
|
12347
12406
|
key: "deleteChannels",
|
|
12348
12407
|
value: function () {
|
|
12349
|
-
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12408
|
+
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee85(cids) {
|
|
12350
12409
|
var options,
|
|
12351
|
-
|
|
12352
|
-
return _regeneratorRuntime.wrap(function
|
|
12410
|
+
_args85 = arguments;
|
|
12411
|
+
return _regeneratorRuntime.wrap(function _callee85$(_context85) {
|
|
12353
12412
|
while (1) {
|
|
12354
|
-
switch (
|
|
12413
|
+
switch (_context85.prev = _context85.next) {
|
|
12355
12414
|
case 0:
|
|
12356
|
-
options =
|
|
12357
|
-
|
|
12415
|
+
options = _args85.length > 1 && _args85[1] !== undefined ? _args85[1] : {};
|
|
12416
|
+
_context85.next = 3;
|
|
12358
12417
|
return this.post(this.baseURL + "/channels/delete", _objectSpread({
|
|
12359
12418
|
cids: cids
|
|
12360
12419
|
}, options));
|
|
12361
12420
|
|
|
12362
12421
|
case 3:
|
|
12363
|
-
return
|
|
12422
|
+
return _context85.abrupt("return", _context85.sent);
|
|
12364
12423
|
|
|
12365
12424
|
case 4:
|
|
12366
12425
|
case "end":
|
|
12367
|
-
return
|
|
12426
|
+
return _context85.stop();
|
|
12368
12427
|
}
|
|
12369
12428
|
}
|
|
12370
|
-
},
|
|
12429
|
+
}, _callee85, this);
|
|
12371
12430
|
}));
|
|
12372
12431
|
|
|
12373
|
-
function deleteChannels(
|
|
12432
|
+
function deleteChannels(_x122) {
|
|
12374
12433
|
return _deleteChannels.apply(this, arguments);
|
|
12375
12434
|
}
|
|
12376
12435
|
|
|
@@ -12388,17 +12447,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12388
12447
|
}, {
|
|
12389
12448
|
key: "deleteUsers",
|
|
12390
12449
|
value: function () {
|
|
12391
|
-
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12450
|
+
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee86(user_ids) {
|
|
12392
12451
|
var options,
|
|
12393
|
-
|
|
12394
|
-
return _regeneratorRuntime.wrap(function
|
|
12452
|
+
_args86 = arguments;
|
|
12453
|
+
return _regeneratorRuntime.wrap(function _callee86$(_context86) {
|
|
12395
12454
|
while (1) {
|
|
12396
|
-
switch (
|
|
12455
|
+
switch (_context86.prev = _context86.next) {
|
|
12397
12456
|
case 0:
|
|
12398
|
-
options =
|
|
12457
|
+
options = _args86.length > 1 && _args86[1] !== undefined ? _args86[1] : {};
|
|
12399
12458
|
|
|
12400
12459
|
if (!(typeof options.user !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.user))) {
|
|
12401
|
-
|
|
12460
|
+
_context86.next = 3;
|
|
12402
12461
|
break;
|
|
12403
12462
|
}
|
|
12404
12463
|
|
|
@@ -12406,7 +12465,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12406
12465
|
|
|
12407
12466
|
case 3:
|
|
12408
12467
|
if (!(typeof options.conversations !== 'undefined' && !['soft', 'hard'].includes(options.conversations))) {
|
|
12409
|
-
|
|
12468
|
+
_context86.next = 5;
|
|
12410
12469
|
break;
|
|
12411
12470
|
}
|
|
12412
12471
|
|
|
@@ -12414,30 +12473,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12414
12473
|
|
|
12415
12474
|
case 5:
|
|
12416
12475
|
if (!(typeof options.messages !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.messages))) {
|
|
12417
|
-
|
|
12476
|
+
_context86.next = 7;
|
|
12418
12477
|
break;
|
|
12419
12478
|
}
|
|
12420
12479
|
|
|
12421
12480
|
throw new Error('Invalid delete user options. messages must be one of [soft hard pruning]');
|
|
12422
12481
|
|
|
12423
12482
|
case 7:
|
|
12424
|
-
|
|
12483
|
+
_context86.next = 9;
|
|
12425
12484
|
return this.post(this.baseURL + "/users/delete", _objectSpread({
|
|
12426
12485
|
user_ids: user_ids
|
|
12427
12486
|
}, options));
|
|
12428
12487
|
|
|
12429
12488
|
case 9:
|
|
12430
|
-
return
|
|
12489
|
+
return _context86.abrupt("return", _context86.sent);
|
|
12431
12490
|
|
|
12432
12491
|
case 10:
|
|
12433
12492
|
case "end":
|
|
12434
|
-
return
|
|
12493
|
+
return _context86.stop();
|
|
12435
12494
|
}
|
|
12436
12495
|
}
|
|
12437
|
-
},
|
|
12496
|
+
}, _callee86, this);
|
|
12438
12497
|
}));
|
|
12439
12498
|
|
|
12440
|
-
function deleteUsers(
|
|
12499
|
+
function deleteUsers(_x123) {
|
|
12441
12500
|
return _deleteUsers.apply(this, arguments);
|
|
12442
12501
|
}
|
|
12443
12502
|
|
|
@@ -12458,28 +12517,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12458
12517
|
}, {
|
|
12459
12518
|
key: "_createImportURL",
|
|
12460
12519
|
value: function () {
|
|
12461
|
-
var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12462
|
-
return _regeneratorRuntime.wrap(function
|
|
12520
|
+
var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee87(filename) {
|
|
12521
|
+
return _regeneratorRuntime.wrap(function _callee87$(_context87) {
|
|
12463
12522
|
while (1) {
|
|
12464
|
-
switch (
|
|
12523
|
+
switch (_context87.prev = _context87.next) {
|
|
12465
12524
|
case 0:
|
|
12466
|
-
|
|
12525
|
+
_context87.next = 2;
|
|
12467
12526
|
return this.post(this.baseURL + "/import_urls", {
|
|
12468
12527
|
filename: filename
|
|
12469
12528
|
});
|
|
12470
12529
|
|
|
12471
12530
|
case 2:
|
|
12472
|
-
return
|
|
12531
|
+
return _context87.abrupt("return", _context87.sent);
|
|
12473
12532
|
|
|
12474
12533
|
case 3:
|
|
12475
12534
|
case "end":
|
|
12476
|
-
return
|
|
12535
|
+
return _context87.stop();
|
|
12477
12536
|
}
|
|
12478
12537
|
}
|
|
12479
|
-
},
|
|
12538
|
+
}, _callee87, this);
|
|
12480
12539
|
}));
|
|
12481
12540
|
|
|
12482
|
-
function _createImportURL(
|
|
12541
|
+
function _createImportURL(_x124) {
|
|
12483
12542
|
return _createImportURL2.apply(this, arguments);
|
|
12484
12543
|
}
|
|
12485
12544
|
|
|
@@ -12501,33 +12560,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12501
12560
|
}, {
|
|
12502
12561
|
key: "_createImport",
|
|
12503
12562
|
value: function () {
|
|
12504
|
-
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12563
|
+
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee88(path) {
|
|
12505
12564
|
var options,
|
|
12506
|
-
|
|
12507
|
-
return _regeneratorRuntime.wrap(function
|
|
12565
|
+
_args88 = arguments;
|
|
12566
|
+
return _regeneratorRuntime.wrap(function _callee88$(_context88) {
|
|
12508
12567
|
while (1) {
|
|
12509
|
-
switch (
|
|
12568
|
+
switch (_context88.prev = _context88.next) {
|
|
12510
12569
|
case 0:
|
|
12511
|
-
options =
|
|
12570
|
+
options = _args88.length > 1 && _args88[1] !== undefined ? _args88[1] : {
|
|
12512
12571
|
mode: 'upsert'
|
|
12513
12572
|
};
|
|
12514
|
-
|
|
12573
|
+
_context88.next = 3;
|
|
12515
12574
|
return this.post(this.baseURL + "/imports", _objectSpread({
|
|
12516
12575
|
path: path
|
|
12517
12576
|
}, options));
|
|
12518
12577
|
|
|
12519
12578
|
case 3:
|
|
12520
|
-
return
|
|
12579
|
+
return _context88.abrupt("return", _context88.sent);
|
|
12521
12580
|
|
|
12522
12581
|
case 4:
|
|
12523
12582
|
case "end":
|
|
12524
|
-
return
|
|
12583
|
+
return _context88.stop();
|
|
12525
12584
|
}
|
|
12526
12585
|
}
|
|
12527
|
-
},
|
|
12586
|
+
}, _callee88, this);
|
|
12528
12587
|
}));
|
|
12529
12588
|
|
|
12530
|
-
function _createImport(
|
|
12589
|
+
function _createImport(_x125) {
|
|
12531
12590
|
return _createImport2.apply(this, arguments);
|
|
12532
12591
|
}
|
|
12533
12592
|
|
|
@@ -12549,26 +12608,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12549
12608
|
}, {
|
|
12550
12609
|
key: "_getImport",
|
|
12551
12610
|
value: function () {
|
|
12552
|
-
var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12553
|
-
return _regeneratorRuntime.wrap(function
|
|
12611
|
+
var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee89(id) {
|
|
12612
|
+
return _regeneratorRuntime.wrap(function _callee89$(_context89) {
|
|
12554
12613
|
while (1) {
|
|
12555
|
-
switch (
|
|
12614
|
+
switch (_context89.prev = _context89.next) {
|
|
12556
12615
|
case 0:
|
|
12557
|
-
|
|
12616
|
+
_context89.next = 2;
|
|
12558
12617
|
return this.get(this.baseURL + "/imports/".concat(id));
|
|
12559
12618
|
|
|
12560
12619
|
case 2:
|
|
12561
|
-
return
|
|
12620
|
+
return _context89.abrupt("return", _context89.sent);
|
|
12562
12621
|
|
|
12563
12622
|
case 3:
|
|
12564
12623
|
case "end":
|
|
12565
|
-
return
|
|
12624
|
+
return _context89.stop();
|
|
12566
12625
|
}
|
|
12567
12626
|
}
|
|
12568
|
-
},
|
|
12627
|
+
}, _callee89, this);
|
|
12569
12628
|
}));
|
|
12570
12629
|
|
|
12571
|
-
function _getImport(
|
|
12630
|
+
function _getImport(_x126) {
|
|
12572
12631
|
return _getImport2.apply(this, arguments);
|
|
12573
12632
|
}
|
|
12574
12633
|
|
|
@@ -12590,26 +12649,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12590
12649
|
}, {
|
|
12591
12650
|
key: "_listImports",
|
|
12592
12651
|
value: function () {
|
|
12593
|
-
var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12594
|
-
return _regeneratorRuntime.wrap(function
|
|
12652
|
+
var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee90(options) {
|
|
12653
|
+
return _regeneratorRuntime.wrap(function _callee90$(_context90) {
|
|
12595
12654
|
while (1) {
|
|
12596
|
-
switch (
|
|
12655
|
+
switch (_context90.prev = _context90.next) {
|
|
12597
12656
|
case 0:
|
|
12598
|
-
|
|
12657
|
+
_context90.next = 2;
|
|
12599
12658
|
return this.get(this.baseURL + "/imports", options);
|
|
12600
12659
|
|
|
12601
12660
|
case 2:
|
|
12602
|
-
return
|
|
12661
|
+
return _context90.abrupt("return", _context90.sent);
|
|
12603
12662
|
|
|
12604
12663
|
case 3:
|
|
12605
12664
|
case "end":
|
|
12606
|
-
return
|
|
12665
|
+
return _context90.stop();
|
|
12607
12666
|
}
|
|
12608
12667
|
}
|
|
12609
|
-
},
|
|
12668
|
+
}, _callee90, this);
|
|
12610
12669
|
}));
|
|
12611
12670
|
|
|
12612
|
-
function _listImports(
|
|
12671
|
+
function _listImports(_x127) {
|
|
12613
12672
|
return _listImports2.apply(this, arguments);
|
|
12614
12673
|
}
|
|
12615
12674
|
|
|
@@ -12628,28 +12687,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12628
12687
|
}, {
|
|
12629
12688
|
key: "upsertPushProvider",
|
|
12630
12689
|
value: function () {
|
|
12631
|
-
var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12632
|
-
return _regeneratorRuntime.wrap(function
|
|
12690
|
+
var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee91(pushProvider) {
|
|
12691
|
+
return _regeneratorRuntime.wrap(function _callee91$(_context91) {
|
|
12633
12692
|
while (1) {
|
|
12634
|
-
switch (
|
|
12693
|
+
switch (_context91.prev = _context91.next) {
|
|
12635
12694
|
case 0:
|
|
12636
|
-
|
|
12695
|
+
_context91.next = 2;
|
|
12637
12696
|
return this.post(this.baseURL + "/push_providers", {
|
|
12638
12697
|
push_provider: pushProvider
|
|
12639
12698
|
});
|
|
12640
12699
|
|
|
12641
12700
|
case 2:
|
|
12642
|
-
return
|
|
12701
|
+
return _context91.abrupt("return", _context91.sent);
|
|
12643
12702
|
|
|
12644
12703
|
case 3:
|
|
12645
12704
|
case "end":
|
|
12646
|
-
return
|
|
12705
|
+
return _context91.stop();
|
|
12647
12706
|
}
|
|
12648
12707
|
}
|
|
12649
|
-
},
|
|
12708
|
+
}, _callee91, this);
|
|
12650
12709
|
}));
|
|
12651
12710
|
|
|
12652
|
-
function upsertPushProvider(
|
|
12711
|
+
function upsertPushProvider(_x128) {
|
|
12653
12712
|
return _upsertPushProvider.apply(this, arguments);
|
|
12654
12713
|
}
|
|
12655
12714
|
|
|
@@ -12668,28 +12727,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12668
12727
|
}, {
|
|
12669
12728
|
key: "deletePushProvider",
|
|
12670
12729
|
value: function () {
|
|
12671
|
-
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12730
|
+
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee92(_ref10) {
|
|
12672
12731
|
var type, name;
|
|
12673
|
-
return _regeneratorRuntime.wrap(function
|
|
12732
|
+
return _regeneratorRuntime.wrap(function _callee92$(_context92) {
|
|
12674
12733
|
while (1) {
|
|
12675
|
-
switch (
|
|
12734
|
+
switch (_context92.prev = _context92.next) {
|
|
12676
12735
|
case 0:
|
|
12677
12736
|
type = _ref10.type, name = _ref10.name;
|
|
12678
|
-
|
|
12737
|
+
_context92.next = 3;
|
|
12679
12738
|
return this.delete(this.baseURL + "/push_providers/".concat(type, "/").concat(name));
|
|
12680
12739
|
|
|
12681
12740
|
case 3:
|
|
12682
|
-
return
|
|
12741
|
+
return _context92.abrupt("return", _context92.sent);
|
|
12683
12742
|
|
|
12684
12743
|
case 4:
|
|
12685
12744
|
case "end":
|
|
12686
|
-
return
|
|
12745
|
+
return _context92.stop();
|
|
12687
12746
|
}
|
|
12688
12747
|
}
|
|
12689
|
-
},
|
|
12748
|
+
}, _callee92, this);
|
|
12690
12749
|
}));
|
|
12691
12750
|
|
|
12692
|
-
function deletePushProvider(
|
|
12751
|
+
function deletePushProvider(_x129) {
|
|
12693
12752
|
return _deletePushProvider.apply(this, arguments);
|
|
12694
12753
|
}
|
|
12695
12754
|
|
|
@@ -12706,23 +12765,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12706
12765
|
}, {
|
|
12707
12766
|
key: "listPushProviders",
|
|
12708
12767
|
value: function () {
|
|
12709
|
-
var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12710
|
-
return _regeneratorRuntime.wrap(function
|
|
12768
|
+
var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee93() {
|
|
12769
|
+
return _regeneratorRuntime.wrap(function _callee93$(_context93) {
|
|
12711
12770
|
while (1) {
|
|
12712
|
-
switch (
|
|
12771
|
+
switch (_context93.prev = _context93.next) {
|
|
12713
12772
|
case 0:
|
|
12714
|
-
|
|
12773
|
+
_context93.next = 2;
|
|
12715
12774
|
return this.get(this.baseURL + "/push_providers");
|
|
12716
12775
|
|
|
12717
12776
|
case 2:
|
|
12718
|
-
return
|
|
12777
|
+
return _context93.abrupt("return", _context93.sent);
|
|
12719
12778
|
|
|
12720
12779
|
case 3:
|
|
12721
12780
|
case "end":
|
|
12722
|
-
return
|
|
12781
|
+
return _context93.stop();
|
|
12723
12782
|
}
|
|
12724
12783
|
}
|
|
12725
|
-
},
|
|
12784
|
+
}, _callee93, this);
|
|
12726
12785
|
}));
|
|
12727
12786
|
|
|
12728
12787
|
function listPushProviders() {
|
|
@@ -12750,26 +12809,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12750
12809
|
}, {
|
|
12751
12810
|
key: "commitMessage",
|
|
12752
12811
|
value: function () {
|
|
12753
|
-
var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12754
|
-
return _regeneratorRuntime.wrap(function
|
|
12812
|
+
var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee94(id) {
|
|
12813
|
+
return _regeneratorRuntime.wrap(function _callee94$(_context94) {
|
|
12755
12814
|
while (1) {
|
|
12756
|
-
switch (
|
|
12815
|
+
switch (_context94.prev = _context94.next) {
|
|
12757
12816
|
case 0:
|
|
12758
|
-
|
|
12817
|
+
_context94.next = 2;
|
|
12759
12818
|
return this.post(this.baseURL + "/messages/".concat(id, "/commit"));
|
|
12760
12819
|
|
|
12761
12820
|
case 2:
|
|
12762
|
-
return
|
|
12821
|
+
return _context94.abrupt("return", _context94.sent);
|
|
12763
12822
|
|
|
12764
12823
|
case 3:
|
|
12765
12824
|
case "end":
|
|
12766
|
-
return
|
|
12825
|
+
return _context94.stop();
|
|
12767
12826
|
}
|
|
12768
12827
|
}
|
|
12769
|
-
},
|
|
12828
|
+
}, _callee94, this);
|
|
12770
12829
|
}));
|
|
12771
12830
|
|
|
12772
|
-
function commitMessage(
|
|
12831
|
+
function commitMessage(_x130) {
|
|
12773
12832
|
return _commitMessage.apply(this, arguments);
|
|
12774
12833
|
}
|
|
12775
12834
|
|
|
@@ -12784,26 +12843,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12784
12843
|
}, {
|
|
12785
12844
|
key: "createPoll",
|
|
12786
12845
|
value: function () {
|
|
12787
|
-
var _createPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12788
|
-
return _regeneratorRuntime.wrap(function
|
|
12846
|
+
var _createPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee95(poll) {
|
|
12847
|
+
return _regeneratorRuntime.wrap(function _callee95$(_context95) {
|
|
12789
12848
|
while (1) {
|
|
12790
|
-
switch (
|
|
12849
|
+
switch (_context95.prev = _context95.next) {
|
|
12791
12850
|
case 0:
|
|
12792
|
-
|
|
12851
|
+
_context95.next = 2;
|
|
12793
12852
|
return this.post(this.baseURL + "/polls", poll);
|
|
12794
12853
|
|
|
12795
12854
|
case 2:
|
|
12796
|
-
return
|
|
12855
|
+
return _context95.abrupt("return", _context95.sent);
|
|
12797
12856
|
|
|
12798
12857
|
case 3:
|
|
12799
12858
|
case "end":
|
|
12800
|
-
return
|
|
12859
|
+
return _context95.stop();
|
|
12801
12860
|
}
|
|
12802
12861
|
}
|
|
12803
|
-
},
|
|
12862
|
+
}, _callee95, this);
|
|
12804
12863
|
}));
|
|
12805
12864
|
|
|
12806
|
-
function createPoll(
|
|
12865
|
+
function createPoll(_x131) {
|
|
12807
12866
|
return _createPoll.apply(this, arguments);
|
|
12808
12867
|
}
|
|
12809
12868
|
|
|
@@ -12818,28 +12877,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12818
12877
|
}, {
|
|
12819
12878
|
key: "getPoll",
|
|
12820
12879
|
value: function () {
|
|
12821
|
-
var _getPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12822
|
-
return _regeneratorRuntime.wrap(function
|
|
12880
|
+
var _getPoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee96(id, userId) {
|
|
12881
|
+
return _regeneratorRuntime.wrap(function _callee96$(_context96) {
|
|
12823
12882
|
while (1) {
|
|
12824
|
-
switch (
|
|
12883
|
+
switch (_context96.prev = _context96.next) {
|
|
12825
12884
|
case 0:
|
|
12826
|
-
|
|
12885
|
+
_context96.next = 2;
|
|
12827
12886
|
return this.get(this.baseURL + "/polls/".concat(id), _objectSpread({}, userId ? {
|
|
12828
12887
|
user_id: userId
|
|
12829
12888
|
} : {}));
|
|
12830
12889
|
|
|
12831
12890
|
case 2:
|
|
12832
|
-
return
|
|
12891
|
+
return _context96.abrupt("return", _context96.sent);
|
|
12833
12892
|
|
|
12834
12893
|
case 3:
|
|
12835
12894
|
case "end":
|
|
12836
|
-
return
|
|
12895
|
+
return _context96.stop();
|
|
12837
12896
|
}
|
|
12838
12897
|
}
|
|
12839
|
-
},
|
|
12898
|
+
}, _callee96, this);
|
|
12840
12899
|
}));
|
|
12841
12900
|
|
|
12842
|
-
function getPoll(
|
|
12901
|
+
function getPoll(_x132, _x133) {
|
|
12843
12902
|
return _getPoll.apply(this, arguments);
|
|
12844
12903
|
}
|
|
12845
12904
|
|
|
@@ -12854,26 +12913,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12854
12913
|
}, {
|
|
12855
12914
|
key: "updatePoll",
|
|
12856
12915
|
value: function () {
|
|
12857
|
-
var _updatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12858
|
-
return _regeneratorRuntime.wrap(function
|
|
12916
|
+
var _updatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee97(poll) {
|
|
12917
|
+
return _regeneratorRuntime.wrap(function _callee97$(_context97) {
|
|
12859
12918
|
while (1) {
|
|
12860
|
-
switch (
|
|
12919
|
+
switch (_context97.prev = _context97.next) {
|
|
12861
12920
|
case 0:
|
|
12862
|
-
|
|
12921
|
+
_context97.next = 2;
|
|
12863
12922
|
return this.put(this.baseURL + "/polls", poll);
|
|
12864
12923
|
|
|
12865
12924
|
case 2:
|
|
12866
|
-
return
|
|
12925
|
+
return _context97.abrupt("return", _context97.sent);
|
|
12867
12926
|
|
|
12868
12927
|
case 3:
|
|
12869
12928
|
case "end":
|
|
12870
|
-
return
|
|
12929
|
+
return _context97.stop();
|
|
12871
12930
|
}
|
|
12872
12931
|
}
|
|
12873
|
-
},
|
|
12932
|
+
}, _callee97, this);
|
|
12874
12933
|
}));
|
|
12875
12934
|
|
|
12876
|
-
function updatePoll(
|
|
12935
|
+
function updatePoll(_x134) {
|
|
12877
12936
|
return _updatePoll.apply(this, arguments);
|
|
12878
12937
|
}
|
|
12879
12938
|
|
|
@@ -12890,26 +12949,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12890
12949
|
}, {
|
|
12891
12950
|
key: "partialUpdatePoll",
|
|
12892
12951
|
value: function () {
|
|
12893
|
-
var _partialUpdatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12894
|
-
return _regeneratorRuntime.wrap(function
|
|
12952
|
+
var _partialUpdatePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee98(id, partialPollObject) {
|
|
12953
|
+
return _regeneratorRuntime.wrap(function _callee98$(_context98) {
|
|
12895
12954
|
while (1) {
|
|
12896
|
-
switch (
|
|
12955
|
+
switch (_context98.prev = _context98.next) {
|
|
12897
12956
|
case 0:
|
|
12898
|
-
|
|
12957
|
+
_context98.next = 2;
|
|
12899
12958
|
return this.patch(this.baseURL + "/polls/".concat(id), partialPollObject);
|
|
12900
12959
|
|
|
12901
12960
|
case 2:
|
|
12902
|
-
return
|
|
12961
|
+
return _context98.abrupt("return", _context98.sent);
|
|
12903
12962
|
|
|
12904
12963
|
case 3:
|
|
12905
12964
|
case "end":
|
|
12906
|
-
return
|
|
12965
|
+
return _context98.stop();
|
|
12907
12966
|
}
|
|
12908
12967
|
}
|
|
12909
|
-
},
|
|
12968
|
+
}, _callee98, this);
|
|
12910
12969
|
}));
|
|
12911
12970
|
|
|
12912
|
-
function partialUpdatePoll(
|
|
12971
|
+
function partialUpdatePoll(_x135, _x136) {
|
|
12913
12972
|
return _partialUpdatePoll.apply(this, arguments);
|
|
12914
12973
|
}
|
|
12915
12974
|
|
|
@@ -12925,28 +12984,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12925
12984
|
}, {
|
|
12926
12985
|
key: "deletePoll",
|
|
12927
12986
|
value: function () {
|
|
12928
|
-
var _deletePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12929
|
-
return _regeneratorRuntime.wrap(function
|
|
12987
|
+
var _deletePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee99(id, userId) {
|
|
12988
|
+
return _regeneratorRuntime.wrap(function _callee99$(_context99) {
|
|
12930
12989
|
while (1) {
|
|
12931
|
-
switch (
|
|
12990
|
+
switch (_context99.prev = _context99.next) {
|
|
12932
12991
|
case 0:
|
|
12933
|
-
|
|
12992
|
+
_context99.next = 2;
|
|
12934
12993
|
return this.delete(this.baseURL + "/polls/".concat(id), _objectSpread({}, userId ? {
|
|
12935
12994
|
user_id: userId
|
|
12936
12995
|
} : {}));
|
|
12937
12996
|
|
|
12938
12997
|
case 2:
|
|
12939
|
-
return
|
|
12998
|
+
return _context99.abrupt("return", _context99.sent);
|
|
12940
12999
|
|
|
12941
13000
|
case 3:
|
|
12942
13001
|
case "end":
|
|
12943
|
-
return
|
|
13002
|
+
return _context99.stop();
|
|
12944
13003
|
}
|
|
12945
13004
|
}
|
|
12946
|
-
},
|
|
13005
|
+
}, _callee99, this);
|
|
12947
13006
|
}));
|
|
12948
13007
|
|
|
12949
|
-
function deletePoll(
|
|
13008
|
+
function deletePoll(_x137, _x138) {
|
|
12950
13009
|
return _deletePoll.apply(this, arguments);
|
|
12951
13010
|
}
|
|
12952
13011
|
|
|
@@ -12961,12 +13020,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12961
13020
|
}, {
|
|
12962
13021
|
key: "closePoll",
|
|
12963
13022
|
value: function () {
|
|
12964
|
-
var _closePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12965
|
-
return _regeneratorRuntime.wrap(function
|
|
13023
|
+
var _closePoll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee100(id) {
|
|
13024
|
+
return _regeneratorRuntime.wrap(function _callee100$(_context100) {
|
|
12966
13025
|
while (1) {
|
|
12967
|
-
switch (
|
|
13026
|
+
switch (_context100.prev = _context100.next) {
|
|
12968
13027
|
case 0:
|
|
12969
|
-
return
|
|
13028
|
+
return _context100.abrupt("return", this.partialUpdatePoll(id, {
|
|
12970
13029
|
set: {
|
|
12971
13030
|
is_closed: true
|
|
12972
13031
|
}
|
|
@@ -12974,13 +13033,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12974
13033
|
|
|
12975
13034
|
case 1:
|
|
12976
13035
|
case "end":
|
|
12977
|
-
return
|
|
13036
|
+
return _context100.stop();
|
|
12978
13037
|
}
|
|
12979
13038
|
}
|
|
12980
|
-
},
|
|
13039
|
+
}, _callee100, this);
|
|
12981
13040
|
}));
|
|
12982
13041
|
|
|
12983
|
-
function closePoll(
|
|
13042
|
+
function closePoll(_x139) {
|
|
12984
13043
|
return _closePoll.apply(this, arguments);
|
|
12985
13044
|
}
|
|
12986
13045
|
|
|
@@ -12996,26 +13055,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12996
13055
|
}, {
|
|
12997
13056
|
key: "createPollOption",
|
|
12998
13057
|
value: function () {
|
|
12999
|
-
var _createPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13000
|
-
return _regeneratorRuntime.wrap(function
|
|
13058
|
+
var _createPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee101(pollId, option) {
|
|
13059
|
+
return _regeneratorRuntime.wrap(function _callee101$(_context101) {
|
|
13001
13060
|
while (1) {
|
|
13002
|
-
switch (
|
|
13061
|
+
switch (_context101.prev = _context101.next) {
|
|
13003
13062
|
case 0:
|
|
13004
|
-
|
|
13063
|
+
_context101.next = 2;
|
|
13005
13064
|
return this.post(this.baseURL + "/polls/".concat(pollId, "/options"), option);
|
|
13006
13065
|
|
|
13007
13066
|
case 2:
|
|
13008
|
-
return
|
|
13067
|
+
return _context101.abrupt("return", _context101.sent);
|
|
13009
13068
|
|
|
13010
13069
|
case 3:
|
|
13011
13070
|
case "end":
|
|
13012
|
-
return
|
|
13071
|
+
return _context101.stop();
|
|
13013
13072
|
}
|
|
13014
13073
|
}
|
|
13015
|
-
},
|
|
13074
|
+
}, _callee101, this);
|
|
13016
13075
|
}));
|
|
13017
13076
|
|
|
13018
|
-
function createPollOption(
|
|
13077
|
+
function createPollOption(_x140, _x141) {
|
|
13019
13078
|
return _createPollOption.apply(this, arguments);
|
|
13020
13079
|
}
|
|
13021
13080
|
|
|
@@ -13031,26 +13090,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13031
13090
|
}, {
|
|
13032
13091
|
key: "getPollOption",
|
|
13033
13092
|
value: function () {
|
|
13034
|
-
var _getPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13035
|
-
return _regeneratorRuntime.wrap(function
|
|
13093
|
+
var _getPollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee102(pollId, optionId) {
|
|
13094
|
+
return _regeneratorRuntime.wrap(function _callee102$(_context102) {
|
|
13036
13095
|
while (1) {
|
|
13037
|
-
switch (
|
|
13096
|
+
switch (_context102.prev = _context102.next) {
|
|
13038
13097
|
case 0:
|
|
13039
|
-
|
|
13098
|
+
_context102.next = 2;
|
|
13040
13099
|
return this.get(this.baseURL + "/polls/".concat(pollId, "/options/").concat(optionId));
|
|
13041
13100
|
|
|
13042
13101
|
case 2:
|
|
13043
|
-
return
|
|
13102
|
+
return _context102.abrupt("return", _context102.sent);
|
|
13044
13103
|
|
|
13045
13104
|
case 3:
|
|
13046
13105
|
case "end":
|
|
13047
|
-
return
|
|
13106
|
+
return _context102.stop();
|
|
13048
13107
|
}
|
|
13049
13108
|
}
|
|
13050
|
-
},
|
|
13109
|
+
}, _callee102, this);
|
|
13051
13110
|
}));
|
|
13052
13111
|
|
|
13053
|
-
function getPollOption(
|
|
13112
|
+
function getPollOption(_x142, _x143) {
|
|
13054
13113
|
return _getPollOption.apply(this, arguments);
|
|
13055
13114
|
}
|
|
13056
13115
|
|
|
@@ -13066,26 +13125,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13066
13125
|
}, {
|
|
13067
13126
|
key: "updatePollOption",
|
|
13068
13127
|
value: function () {
|
|
13069
|
-
var _updatePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13070
|
-
return _regeneratorRuntime.wrap(function
|
|
13128
|
+
var _updatePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee103(pollId, option) {
|
|
13129
|
+
return _regeneratorRuntime.wrap(function _callee103$(_context103) {
|
|
13071
13130
|
while (1) {
|
|
13072
|
-
switch (
|
|
13131
|
+
switch (_context103.prev = _context103.next) {
|
|
13073
13132
|
case 0:
|
|
13074
|
-
|
|
13133
|
+
_context103.next = 2;
|
|
13075
13134
|
return this.put(this.baseURL + "/polls/".concat(pollId, "/options"), option);
|
|
13076
13135
|
|
|
13077
13136
|
case 2:
|
|
13078
|
-
return
|
|
13137
|
+
return _context103.abrupt("return", _context103.sent);
|
|
13079
13138
|
|
|
13080
13139
|
case 3:
|
|
13081
13140
|
case "end":
|
|
13082
|
-
return
|
|
13141
|
+
return _context103.stop();
|
|
13083
13142
|
}
|
|
13084
13143
|
}
|
|
13085
|
-
},
|
|
13144
|
+
}, _callee103, this);
|
|
13086
13145
|
}));
|
|
13087
13146
|
|
|
13088
|
-
function updatePollOption(
|
|
13147
|
+
function updatePollOption(_x144, _x145) {
|
|
13089
13148
|
return _updatePollOption.apply(this, arguments);
|
|
13090
13149
|
}
|
|
13091
13150
|
|
|
@@ -13101,26 +13160,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13101
13160
|
}, {
|
|
13102
13161
|
key: "deletePollOption",
|
|
13103
13162
|
value: function () {
|
|
13104
|
-
var _deletePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13105
|
-
return _regeneratorRuntime.wrap(function
|
|
13163
|
+
var _deletePollOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee104(pollId, optionId) {
|
|
13164
|
+
return _regeneratorRuntime.wrap(function _callee104$(_context104) {
|
|
13106
13165
|
while (1) {
|
|
13107
|
-
switch (
|
|
13166
|
+
switch (_context104.prev = _context104.next) {
|
|
13108
13167
|
case 0:
|
|
13109
|
-
|
|
13168
|
+
_context104.next = 2;
|
|
13110
13169
|
return this.delete(this.baseURL + "/polls/".concat(pollId, "/options/").concat(optionId));
|
|
13111
13170
|
|
|
13112
13171
|
case 2:
|
|
13113
|
-
return
|
|
13172
|
+
return _context104.abrupt("return", _context104.sent);
|
|
13114
13173
|
|
|
13115
13174
|
case 3:
|
|
13116
13175
|
case "end":
|
|
13117
|
-
return
|
|
13176
|
+
return _context104.stop();
|
|
13118
13177
|
}
|
|
13119
13178
|
}
|
|
13120
|
-
},
|
|
13179
|
+
}, _callee104, this);
|
|
13121
13180
|
}));
|
|
13122
13181
|
|
|
13123
|
-
function deletePollOption(
|
|
13182
|
+
function deletePollOption(_x146, _x147) {
|
|
13124
13183
|
return _deletePollOption.apply(this, arguments);
|
|
13125
13184
|
}
|
|
13126
13185
|
|
|
@@ -13137,31 +13196,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13137
13196
|
}, {
|
|
13138
13197
|
key: "castPollVote",
|
|
13139
13198
|
value: function () {
|
|
13140
|
-
var _castPollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13199
|
+
var _castPollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee105(messageId, pollId, vote) {
|
|
13141
13200
|
var options,
|
|
13142
|
-
|
|
13143
|
-
return _regeneratorRuntime.wrap(function
|
|
13201
|
+
_args105 = arguments;
|
|
13202
|
+
return _regeneratorRuntime.wrap(function _callee105$(_context105) {
|
|
13144
13203
|
while (1) {
|
|
13145
|
-
switch (
|
|
13204
|
+
switch (_context105.prev = _context105.next) {
|
|
13146
13205
|
case 0:
|
|
13147
|
-
options =
|
|
13148
|
-
|
|
13206
|
+
options = _args105.length > 3 && _args105[3] !== undefined ? _args105[3] : {};
|
|
13207
|
+
_context105.next = 3;
|
|
13149
13208
|
return this.post(this.baseURL + "/messages/".concat(messageId, "/polls/").concat(pollId, "/vote"), _objectSpread({
|
|
13150
13209
|
vote: vote
|
|
13151
13210
|
}, options));
|
|
13152
13211
|
|
|
13153
13212
|
case 3:
|
|
13154
|
-
return
|
|
13213
|
+
return _context105.abrupt("return", _context105.sent);
|
|
13155
13214
|
|
|
13156
13215
|
case 4:
|
|
13157
13216
|
case "end":
|
|
13158
|
-
return
|
|
13217
|
+
return _context105.stop();
|
|
13159
13218
|
}
|
|
13160
13219
|
}
|
|
13161
|
-
},
|
|
13220
|
+
}, _callee105, this);
|
|
13162
13221
|
}));
|
|
13163
13222
|
|
|
13164
|
-
function castPollVote(
|
|
13223
|
+
function castPollVote(_x148, _x149, _x150) {
|
|
13165
13224
|
return _castPollVote.apply(this, arguments);
|
|
13166
13225
|
}
|
|
13167
13226
|
|
|
@@ -13177,24 +13236,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13177
13236
|
}, {
|
|
13178
13237
|
key: "addPollAnswer",
|
|
13179
13238
|
value: function () {
|
|
13180
|
-
var _addPollAnswer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13181
|
-
return _regeneratorRuntime.wrap(function
|
|
13239
|
+
var _addPollAnswer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee106(messageId, pollId, answerText) {
|
|
13240
|
+
return _regeneratorRuntime.wrap(function _callee106$(_context106) {
|
|
13182
13241
|
while (1) {
|
|
13183
|
-
switch (
|
|
13242
|
+
switch (_context106.prev = _context106.next) {
|
|
13184
13243
|
case 0:
|
|
13185
|
-
return
|
|
13244
|
+
return _context106.abrupt("return", this.castPollVote(messageId, pollId, {
|
|
13186
13245
|
answer_text: answerText
|
|
13187
13246
|
}));
|
|
13188
13247
|
|
|
13189
13248
|
case 1:
|
|
13190
13249
|
case "end":
|
|
13191
|
-
return
|
|
13250
|
+
return _context106.stop();
|
|
13192
13251
|
}
|
|
13193
13252
|
}
|
|
13194
|
-
},
|
|
13253
|
+
}, _callee106, this);
|
|
13195
13254
|
}));
|
|
13196
13255
|
|
|
13197
|
-
function addPollAnswer(
|
|
13256
|
+
function addPollAnswer(_x151, _x152, _x153) {
|
|
13198
13257
|
return _addPollAnswer.apply(this, arguments);
|
|
13199
13258
|
}
|
|
13200
13259
|
|
|
@@ -13203,26 +13262,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13203
13262
|
}, {
|
|
13204
13263
|
key: "removePollVote",
|
|
13205
13264
|
value: function () {
|
|
13206
|
-
var _removePollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13207
|
-
return _regeneratorRuntime.wrap(function
|
|
13265
|
+
var _removePollVote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee107(messageId, pollId, voteId) {
|
|
13266
|
+
return _regeneratorRuntime.wrap(function _callee107$(_context107) {
|
|
13208
13267
|
while (1) {
|
|
13209
|
-
switch (
|
|
13268
|
+
switch (_context107.prev = _context107.next) {
|
|
13210
13269
|
case 0:
|
|
13211
|
-
|
|
13270
|
+
_context107.next = 2;
|
|
13212
13271
|
return this.delete(this.baseURL + "/messages/".concat(messageId, "/polls/").concat(pollId, "/vote/").concat(voteId));
|
|
13213
13272
|
|
|
13214
13273
|
case 2:
|
|
13215
|
-
return
|
|
13274
|
+
return _context107.abrupt("return", _context107.sent);
|
|
13216
13275
|
|
|
13217
13276
|
case 3:
|
|
13218
13277
|
case "end":
|
|
13219
|
-
return
|
|
13278
|
+
return _context107.stop();
|
|
13220
13279
|
}
|
|
13221
13280
|
}
|
|
13222
|
-
},
|
|
13281
|
+
}, _callee107, this);
|
|
13223
13282
|
}));
|
|
13224
13283
|
|
|
13225
|
-
function removePollVote(
|
|
13284
|
+
function removePollVote(_x154, _x155, _x156) {
|
|
13226
13285
|
return _removePollVote.apply(this, arguments);
|
|
13227
13286
|
}
|
|
13228
13287
|
|
|
@@ -13239,33 +13298,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13239
13298
|
}, {
|
|
13240
13299
|
key: "queryPolls",
|
|
13241
13300
|
value: function () {
|
|
13242
|
-
var _queryPolls = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13301
|
+
var _queryPolls = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee108() {
|
|
13243
13302
|
var filter,
|
|
13244
13303
|
sort,
|
|
13245
13304
|
options,
|
|
13246
|
-
|
|
13247
|
-
return _regeneratorRuntime.wrap(function
|
|
13305
|
+
_args108 = arguments;
|
|
13306
|
+
return _regeneratorRuntime.wrap(function _callee108$(_context108) {
|
|
13248
13307
|
while (1) {
|
|
13249
|
-
switch (
|
|
13308
|
+
switch (_context108.prev = _context108.next) {
|
|
13250
13309
|
case 0:
|
|
13251
|
-
filter =
|
|
13252
|
-
sort =
|
|
13253
|
-
options =
|
|
13254
|
-
|
|
13310
|
+
filter = _args108.length > 0 && _args108[0] !== undefined ? _args108[0] : {};
|
|
13311
|
+
sort = _args108.length > 1 && _args108[1] !== undefined ? _args108[1] : [];
|
|
13312
|
+
options = _args108.length > 2 && _args108[2] !== undefined ? _args108[2] : {};
|
|
13313
|
+
_context108.next = 5;
|
|
13255
13314
|
return this.post(this.baseURL + '/polls/query', _objectSpread({
|
|
13256
13315
|
filter: filter,
|
|
13257
13316
|
sort: normalizeQuerySort(sort)
|
|
13258
13317
|
}, options));
|
|
13259
13318
|
|
|
13260
13319
|
case 5:
|
|
13261
|
-
return
|
|
13320
|
+
return _context108.abrupt("return", _context108.sent);
|
|
13262
13321
|
|
|
13263
13322
|
case 6:
|
|
13264
13323
|
case "end":
|
|
13265
|
-
return
|
|
13324
|
+
return _context108.stop();
|
|
13266
13325
|
}
|
|
13267
13326
|
}
|
|
13268
|
-
},
|
|
13327
|
+
}, _callee108, this);
|
|
13269
13328
|
}));
|
|
13270
13329
|
|
|
13271
13330
|
function queryPolls() {
|
|
@@ -13286,36 +13345,36 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
13286
13345
|
}, {
|
|
13287
13346
|
key: "queryPollVotes",
|
|
13288
13347
|
value: function () {
|
|
13289
|
-
var _queryPollVotes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
13348
|
+
var _queryPollVotes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee109(pollId) {
|
|
13290
13349
|
var filter,
|
|
13291
13350
|
sort,
|
|
13292
13351
|
options,
|
|
13293
|
-
|
|
13294
|
-
return _regeneratorRuntime.wrap(function
|
|
13352
|
+
_args109 = arguments;
|
|
13353
|
+
return _regeneratorRuntime.wrap(function _callee109$(_context109) {
|
|
13295
13354
|
while (1) {
|
|
13296
|
-
switch (
|
|
13355
|
+
switch (_context109.prev = _context109.next) {
|
|
13297
13356
|
case 0:
|
|
13298
|
-
filter =
|
|
13299
|
-
sort =
|
|
13300
|
-
options =
|
|
13301
|
-
|
|
13357
|
+
filter = _args109.length > 1 && _args109[1] !== undefined ? _args109[1] : {};
|
|
13358
|
+
sort = _args109.length > 2 && _args109[2] !== undefined ? _args109[2] : [];
|
|
13359
|
+
options = _args109.length > 3 && _args109[3] !== undefined ? _args109[3] : {};
|
|
13360
|
+
_context109.next = 5;
|
|
13302
13361
|
return this.post(this.baseURL + "/polls/".concat(pollId, "/votes"), _objectSpread({
|
|
13303
13362
|
filter: filter,
|
|
13304
13363
|
sort: normalizeQuerySort(sort)
|
|
13305
13364
|
}, options));
|
|
13306
13365
|
|
|
13307
13366
|
case 5:
|
|
13308
|
-
return
|
|
13367
|
+
return _context109.abrupt("return", _context109.sent);
|
|
13309
13368
|
|
|
13310
13369
|
case 6:
|
|
13311
13370
|
case "end":
|
|
13312
|
-
return
|
|
13371
|
+
return _context109.stop();
|
|
13313
13372
|
}
|
|
13314
13373
|
}
|
|
13315
|
-
},
|
|
13374
|
+
}, _callee109, this);
|
|
13316
13375
|
}));
|
|
13317
13376
|
|
|
13318
|
-
function queryPollVotes(
|
|
13377
|
+
function queryPollVotes(_x157) {
|
|
13319
13378
|
return _queryPollVotes.apply(this, arguments);
|
|
13320
13379
|
}
|
|
13321
13380
|
|