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