stream-chat 8.50.0 → 8.52.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 +623 -514
- 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 +623 -514
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +623 -514
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +623 -514
- package/dist/index.js.map +1 -1
- package/dist/types/client.d.ts +11 -1
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/events.d.ts +1 -0
- package/dist/types/events.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/thread.d.ts +5 -1
- package/dist/types/thread.d.ts.map +1 -1
- package/dist/types/types.d.ts +8 -1
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +36 -12
- package/src/events.ts +1 -0
- package/src/index.ts +2 -1
- package/src/thread.ts +66 -2
- package/src/types.ts +12 -1
package/dist/browser.js
CHANGED
|
@@ -7430,6 +7430,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
7430
7430
|
/**
|
|
7431
7431
|
* Response Types
|
|
7432
7432
|
*/
|
|
7433
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
7433
7434
|
// TODO: Figure out a way to strongly type set and unset.
|
|
7434
7435
|
// Thumb URL(thumb_url) is added considering video attachments as the backend will return the thumbnail in the response.
|
|
7435
7436
|
|
|
@@ -7604,7 +7605,43 @@ var DEFAULT_PAGE_LIMIT = 50;
|
|
|
7604
7605
|
var DEFAULT_SORT = [{
|
|
7605
7606
|
created_at: -1
|
|
7606
7607
|
}];
|
|
7607
|
-
var MARK_AS_READ_THROTTLE_TIMEOUT = 1000;
|
|
7608
|
+
var MARK_AS_READ_THROTTLE_TIMEOUT = 1000; // TODO: remove this once we move to API v2
|
|
7609
|
+
|
|
7610
|
+
var THREAD_RESPONSE_RESERVED_KEYS = {
|
|
7611
|
+
channel: true,
|
|
7612
|
+
channel_cid: true,
|
|
7613
|
+
created_at: true,
|
|
7614
|
+
created_by_user_id: true,
|
|
7615
|
+
parent_message_id: true,
|
|
7616
|
+
title: true,
|
|
7617
|
+
updated_at: true,
|
|
7618
|
+
latest_replies: true,
|
|
7619
|
+
active_participant_count: true,
|
|
7620
|
+
deleted_at: true,
|
|
7621
|
+
last_message_at: true,
|
|
7622
|
+
participant_count: true,
|
|
7623
|
+
reply_count: true,
|
|
7624
|
+
read: true,
|
|
7625
|
+
thread_participants: true,
|
|
7626
|
+
created_by: true,
|
|
7627
|
+
parent_message: true
|
|
7628
|
+
}; // TODO: remove this once we move to API v2
|
|
7629
|
+
|
|
7630
|
+
var constructCustomDataObject = function constructCustomDataObject(threadData) {
|
|
7631
|
+
var custom = {};
|
|
7632
|
+
|
|
7633
|
+
for (var key in threadData) {
|
|
7634
|
+
if (THREAD_RESPONSE_RESERVED_KEYS[key]) {
|
|
7635
|
+
continue;
|
|
7636
|
+
}
|
|
7637
|
+
|
|
7638
|
+
var customKey = key;
|
|
7639
|
+
custom[customKey] = threadData[customKey];
|
|
7640
|
+
}
|
|
7641
|
+
|
|
7642
|
+
return custom;
|
|
7643
|
+
};
|
|
7644
|
+
|
|
7608
7645
|
var Thread = /*#__PURE__*/function () {
|
|
7609
7646
|
function Thread(_ref) {
|
|
7610
7647
|
var _this = this,
|
|
@@ -7612,7 +7649,7 @@ var Thread = /*#__PURE__*/function () {
|
|
|
7612
7649
|
_threadData$reply_cou;
|
|
7613
7650
|
|
|
7614
7651
|
var client = _ref.client,
|
|
7615
|
-
|
|
7652
|
+
_threadData = _ref.threadData;
|
|
7616
7653
|
|
|
7617
7654
|
_classCallCheck__default['default'](this, Thread);
|
|
7618
7655
|
|
|
@@ -7726,6 +7763,8 @@ var Thread = /*#__PURE__*/function () {
|
|
|
7726
7763
|
return;
|
|
7727
7764
|
}
|
|
7728
7765
|
|
|
7766
|
+
_this.unsubscribeFunctions.add(_this.subscribeThreadUpdated());
|
|
7767
|
+
|
|
7729
7768
|
_this.unsubscribeFunctions.add(_this.subscribeMarkActiveThreadRead());
|
|
7730
7769
|
|
|
7731
7770
|
_this.unsubscribeFunctions.add(_this.subscribeReloadActiveStaleThread());
|
|
@@ -7741,6 +7780,24 @@ var Thread = /*#__PURE__*/function () {
|
|
|
7741
7780
|
_this.unsubscribeFunctions.add(_this.subscribeMessageUpdated());
|
|
7742
7781
|
});
|
|
7743
7782
|
|
|
7783
|
+
_defineProperty__default['default'](this, "subscribeThreadUpdated", function () {
|
|
7784
|
+
return _this.client.on('thread.updated', function (event) {
|
|
7785
|
+
if (!event.thread || event.thread.parent_message_id !== _this.id) {
|
|
7786
|
+
return;
|
|
7787
|
+
}
|
|
7788
|
+
|
|
7789
|
+
var threadData = event.thread;
|
|
7790
|
+
|
|
7791
|
+
_this.state.partialNext({
|
|
7792
|
+
title: threadData.title,
|
|
7793
|
+
updatedAt: new Date(threadData.updated_at),
|
|
7794
|
+
deletedAt: threadData.deleted_at ? new Date(threadData.deleted_at) : null,
|
|
7795
|
+
// TODO: use threadData.custom once we move to API v2
|
|
7796
|
+
custom: constructCustomDataObject(threadData)
|
|
7797
|
+
});
|
|
7798
|
+
}).unsubscribe;
|
|
7799
|
+
});
|
|
7800
|
+
|
|
7744
7801
|
_defineProperty__default['default'](this, "subscribeMarkActiveThreadRead", function () {
|
|
7745
7802
|
return _this.state.subscribeWithSelector(function (nextValue) {
|
|
7746
7803
|
return {
|
|
@@ -8168,12 +8225,12 @@ var Thread = /*#__PURE__*/function () {
|
|
|
8168
8225
|
};
|
|
8169
8226
|
}());
|
|
8170
8227
|
|
|
8171
|
-
var _channel = client.channel(
|
|
8172
|
-
name:
|
|
8228
|
+
var _channel = client.channel(_threadData.channel.type, _threadData.channel.id, {
|
|
8229
|
+
name: _threadData.channel.name
|
|
8173
8230
|
});
|
|
8174
8231
|
|
|
8175
8232
|
_channel._hydrateMembers({
|
|
8176
|
-
members: (_threadData$channel$m =
|
|
8233
|
+
members: (_threadData$channel$m = _threadData.channel.members) !== null && _threadData$channel$m !== void 0 ? _threadData$channel$m : [],
|
|
8177
8234
|
overrideCurrentState: false
|
|
8178
8235
|
}); // For when read object is undefined and due to that unreadMessageCount for
|
|
8179
8236
|
// the current user isn't being incremented on message.new
|
|
@@ -8187,21 +8244,26 @@ var Thread = /*#__PURE__*/function () {
|
|
|
8187
8244
|
last_read: new Date().toISOString()
|
|
8188
8245
|
}] : [];
|
|
8189
8246
|
this.state = new StateStore({
|
|
8247
|
+
// local only
|
|
8190
8248
|
active: false,
|
|
8191
|
-
channel: _channel,
|
|
8192
|
-
createdAt: new Date(threadData.created_at),
|
|
8193
|
-
deletedAt: threadData.deleted_at ? new Date(threadData.deleted_at) : null,
|
|
8194
8249
|
isLoading: false,
|
|
8195
8250
|
isStateStale: false,
|
|
8196
|
-
|
|
8197
|
-
|
|
8198
|
-
|
|
8199
|
-
|
|
8200
|
-
|
|
8201
|
-
|
|
8202
|
-
|
|
8251
|
+
// 99.9% should never change
|
|
8252
|
+
channel: _channel,
|
|
8253
|
+
createdAt: new Date(_threadData.created_at),
|
|
8254
|
+
// rest
|
|
8255
|
+
deletedAt: _threadData.deleted_at ? new Date(_threadData.deleted_at) : null,
|
|
8256
|
+
pagination: repliesPaginationFromInitialThread(_threadData),
|
|
8257
|
+
parentMessage: formatMessage(_threadData.parent_message),
|
|
8258
|
+
participants: _threadData.thread_participants,
|
|
8259
|
+
read: formatReadState(!_threadData.read || _threadData.read.length === 0 ? placeholderReadResponse : _threadData.read),
|
|
8260
|
+
replies: _threadData.latest_replies.map(formatMessage),
|
|
8261
|
+
replyCount: (_threadData$reply_cou = _threadData.reply_count) !== null && _threadData$reply_cou !== void 0 ? _threadData$reply_cou : 0,
|
|
8262
|
+
updatedAt: _threadData.updated_at ? new Date(_threadData.updated_at) : null,
|
|
8263
|
+
title: _threadData.title,
|
|
8264
|
+
custom: constructCustomDataObject(_threadData)
|
|
8203
8265
|
});
|
|
8204
|
-
this.id =
|
|
8266
|
+
this.id = _threadData.parent_message_id;
|
|
8205
8267
|
this.client = client;
|
|
8206
8268
|
}
|
|
8207
8269
|
|
|
@@ -14329,6 +14391,48 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14329
14391
|
|
|
14330
14392
|
return translateMessage;
|
|
14331
14393
|
}()
|
|
14394
|
+
/**
|
|
14395
|
+
* translate - translates the given text to provided language
|
|
14396
|
+
*
|
|
14397
|
+
* @param {string} text
|
|
14398
|
+
* @param {string} destination_language
|
|
14399
|
+
* @param {string} source_language
|
|
14400
|
+
*
|
|
14401
|
+
* @return {TranslateResponse} Response that includes the message
|
|
14402
|
+
*/
|
|
14403
|
+
|
|
14404
|
+
}, {
|
|
14405
|
+
key: "translate",
|
|
14406
|
+
value: function () {
|
|
14407
|
+
var _translate = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee59(text, destination_language, source_language) {
|
|
14408
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee59$(_context59) {
|
|
14409
|
+
while (1) {
|
|
14410
|
+
switch (_context59.prev = _context59.next) {
|
|
14411
|
+
case 0:
|
|
14412
|
+
_context59.next = 2;
|
|
14413
|
+
return this.post(this.baseURL + "/translate", {
|
|
14414
|
+
text: text,
|
|
14415
|
+
source_language: source_language,
|
|
14416
|
+
destination_language: destination_language
|
|
14417
|
+
});
|
|
14418
|
+
|
|
14419
|
+
case 2:
|
|
14420
|
+
return _context59.abrupt("return", _context59.sent);
|
|
14421
|
+
|
|
14422
|
+
case 3:
|
|
14423
|
+
case "end":
|
|
14424
|
+
return _context59.stop();
|
|
14425
|
+
}
|
|
14426
|
+
}
|
|
14427
|
+
}, _callee59, this);
|
|
14428
|
+
}));
|
|
14429
|
+
|
|
14430
|
+
function translate(_x75, _x76, _x77) {
|
|
14431
|
+
return _translate.apply(this, arguments);
|
|
14432
|
+
}
|
|
14433
|
+
|
|
14434
|
+
return translate;
|
|
14435
|
+
}()
|
|
14332
14436
|
/**
|
|
14333
14437
|
* _normalizeExpiration - transforms expiration value into ISO string
|
|
14334
14438
|
* @param {undefined|null|number|string|Date} timeoutOrExpirationDate expiration date or timeout. Use number type to set timeout in seconds, string or Date to set exact expiration date
|
|
@@ -14425,14 +14529,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14425
14529
|
}, {
|
|
14426
14530
|
key: "updateMessage",
|
|
14427
14531
|
value: function () {
|
|
14428
|
-
var _updateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14532
|
+
var _updateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee60(message, userId, options) {
|
|
14429
14533
|
var clonedMessage, reservedMessageFields;
|
|
14430
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14534
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee60$(_context60) {
|
|
14431
14535
|
while (1) {
|
|
14432
|
-
switch (
|
|
14536
|
+
switch (_context60.prev = _context60.next) {
|
|
14433
14537
|
case 0:
|
|
14434
14538
|
if (message.id) {
|
|
14435
|
-
|
|
14539
|
+
_context60.next = 2;
|
|
14436
14540
|
break;
|
|
14437
14541
|
}
|
|
14438
14542
|
|
|
@@ -14469,23 +14573,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14469
14573
|
});
|
|
14470
14574
|
}
|
|
14471
14575
|
|
|
14472
|
-
|
|
14576
|
+
_context60.next = 10;
|
|
14473
14577
|
return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(message.id)), _objectSpread({
|
|
14474
14578
|
message: clonedMessage
|
|
14475
14579
|
}, options));
|
|
14476
14580
|
|
|
14477
14581
|
case 10:
|
|
14478
|
-
return
|
|
14582
|
+
return _context60.abrupt("return", _context60.sent);
|
|
14479
14583
|
|
|
14480
14584
|
case 11:
|
|
14481
14585
|
case "end":
|
|
14482
|
-
return
|
|
14586
|
+
return _context60.stop();
|
|
14483
14587
|
}
|
|
14484
14588
|
}
|
|
14485
|
-
},
|
|
14589
|
+
}, _callee60, this);
|
|
14486
14590
|
}));
|
|
14487
14591
|
|
|
14488
|
-
function updateMessage(
|
|
14592
|
+
function updateMessage(_x78, _x79, _x80) {
|
|
14489
14593
|
return _updateMessage.apply(this, arguments);
|
|
14490
14594
|
}
|
|
14491
14595
|
|
|
@@ -14508,14 +14612,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14508
14612
|
}, {
|
|
14509
14613
|
key: "partialUpdateMessage",
|
|
14510
14614
|
value: function () {
|
|
14511
|
-
var _partialUpdateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14615
|
+
var _partialUpdateMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee61(id, partialMessageObject, userId, options) {
|
|
14512
14616
|
var user;
|
|
14513
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14617
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee61$(_context61) {
|
|
14514
14618
|
while (1) {
|
|
14515
|
-
switch (
|
|
14619
|
+
switch (_context61.prev = _context61.next) {
|
|
14516
14620
|
case 0:
|
|
14517
14621
|
if (id) {
|
|
14518
|
-
|
|
14622
|
+
_context61.next = 2;
|
|
14519
14623
|
break;
|
|
14520
14624
|
}
|
|
14521
14625
|
|
|
@@ -14530,23 +14634,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14530
14634
|
};
|
|
14531
14635
|
}
|
|
14532
14636
|
|
|
14533
|
-
|
|
14637
|
+
_context61.next = 6;
|
|
14534
14638
|
return this.put(this.baseURL + "/messages/".concat(encodeURIComponent(id)), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
|
|
14535
14639
|
user: user
|
|
14536
14640
|
}));
|
|
14537
14641
|
|
|
14538
14642
|
case 6:
|
|
14539
|
-
return
|
|
14643
|
+
return _context61.abrupt("return", _context61.sent);
|
|
14540
14644
|
|
|
14541
14645
|
case 7:
|
|
14542
14646
|
case "end":
|
|
14543
|
-
return
|
|
14647
|
+
return _context61.stop();
|
|
14544
14648
|
}
|
|
14545
14649
|
}
|
|
14546
|
-
},
|
|
14650
|
+
}, _callee61, this);
|
|
14547
14651
|
}));
|
|
14548
14652
|
|
|
14549
|
-
function partialUpdateMessage(
|
|
14653
|
+
function partialUpdateMessage(_x81, _x82, _x83, _x84) {
|
|
14550
14654
|
return _partialUpdateMessage.apply(this, arguments);
|
|
14551
14655
|
}
|
|
14552
14656
|
|
|
@@ -14555,11 +14659,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14555
14659
|
}, {
|
|
14556
14660
|
key: "deleteMessage",
|
|
14557
14661
|
value: function () {
|
|
14558
|
-
var _deleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14662
|
+
var _deleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee62(messageID, hardDelete) {
|
|
14559
14663
|
var params;
|
|
14560
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14664
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee62$(_context62) {
|
|
14561
14665
|
while (1) {
|
|
14562
|
-
switch (
|
|
14666
|
+
switch (_context62.prev = _context62.next) {
|
|
14563
14667
|
case 0:
|
|
14564
14668
|
params = {};
|
|
14565
14669
|
|
|
@@ -14569,21 +14673,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14569
14673
|
};
|
|
14570
14674
|
}
|
|
14571
14675
|
|
|
14572
|
-
|
|
14676
|
+
_context62.next = 4;
|
|
14573
14677
|
return this.delete(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)), params);
|
|
14574
14678
|
|
|
14575
14679
|
case 4:
|
|
14576
|
-
return
|
|
14680
|
+
return _context62.abrupt("return", _context62.sent);
|
|
14577
14681
|
|
|
14578
14682
|
case 5:
|
|
14579
14683
|
case "end":
|
|
14580
|
-
return
|
|
14684
|
+
return _context62.stop();
|
|
14581
14685
|
}
|
|
14582
14686
|
}
|
|
14583
|
-
},
|
|
14687
|
+
}, _callee62, this);
|
|
14584
14688
|
}));
|
|
14585
14689
|
|
|
14586
|
-
function deleteMessage(
|
|
14690
|
+
function deleteMessage(_x85, _x86) {
|
|
14587
14691
|
return _deleteMessage.apply(this, arguments);
|
|
14588
14692
|
}
|
|
14589
14693
|
|
|
@@ -14605,28 +14709,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14605
14709
|
}, {
|
|
14606
14710
|
key: "undeleteMessage",
|
|
14607
14711
|
value: function () {
|
|
14608
|
-
var _undeleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14609
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14712
|
+
var _undeleteMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee63(messageID, userID) {
|
|
14713
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee63$(_context63) {
|
|
14610
14714
|
while (1) {
|
|
14611
|
-
switch (
|
|
14715
|
+
switch (_context63.prev = _context63.next) {
|
|
14612
14716
|
case 0:
|
|
14613
|
-
|
|
14717
|
+
_context63.next = 2;
|
|
14614
14718
|
return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(messageID), "/undelete"), {
|
|
14615
14719
|
undeleted_by: userID
|
|
14616
14720
|
});
|
|
14617
14721
|
|
|
14618
14722
|
case 2:
|
|
14619
|
-
return
|
|
14723
|
+
return _context63.abrupt("return", _context63.sent);
|
|
14620
14724
|
|
|
14621
14725
|
case 3:
|
|
14622
14726
|
case "end":
|
|
14623
|
-
return
|
|
14727
|
+
return _context63.stop();
|
|
14624
14728
|
}
|
|
14625
14729
|
}
|
|
14626
|
-
},
|
|
14730
|
+
}, _callee63, this);
|
|
14627
14731
|
}));
|
|
14628
14732
|
|
|
14629
|
-
function undeleteMessage(
|
|
14733
|
+
function undeleteMessage(_x87, _x88) {
|
|
14630
14734
|
return _undeleteMessage.apply(this, arguments);
|
|
14631
14735
|
}
|
|
14632
14736
|
|
|
@@ -14635,26 +14739,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14635
14739
|
}, {
|
|
14636
14740
|
key: "getMessage",
|
|
14637
14741
|
value: function () {
|
|
14638
|
-
var _getMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14639
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14742
|
+
var _getMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee64(messageID, options) {
|
|
14743
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee64$(_context64) {
|
|
14640
14744
|
while (1) {
|
|
14641
|
-
switch (
|
|
14745
|
+
switch (_context64.prev = _context64.next) {
|
|
14642
14746
|
case 0:
|
|
14643
|
-
|
|
14747
|
+
_context64.next = 2;
|
|
14644
14748
|
return this.get(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)), _objectSpread({}, options));
|
|
14645
14749
|
|
|
14646
14750
|
case 2:
|
|
14647
|
-
return
|
|
14751
|
+
return _context64.abrupt("return", _context64.sent);
|
|
14648
14752
|
|
|
14649
14753
|
case 3:
|
|
14650
14754
|
case "end":
|
|
14651
|
-
return
|
|
14755
|
+
return _context64.stop();
|
|
14652
14756
|
}
|
|
14653
14757
|
}
|
|
14654
|
-
},
|
|
14758
|
+
}, _callee64, this);
|
|
14655
14759
|
}));
|
|
14656
14760
|
|
|
14657
|
-
function getMessage(
|
|
14761
|
+
function getMessage(_x89, _x90) {
|
|
14658
14762
|
return _getMessage.apply(this, arguments);
|
|
14659
14763
|
}
|
|
14660
14764
|
|
|
@@ -14675,44 +14779,48 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14675
14779
|
}, {
|
|
14676
14780
|
key: "queryThreads",
|
|
14677
14781
|
value: function () {
|
|
14678
|
-
var _queryThreads = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14782
|
+
var _queryThreads = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee65() {
|
|
14679
14783
|
var _this5 = this;
|
|
14680
14784
|
|
|
14681
|
-
var
|
|
14682
|
-
|
|
14785
|
+
var options,
|
|
14786
|
+
optionsWithDefaults,
|
|
14787
|
+
response,
|
|
14788
|
+
_args65 = arguments;
|
|
14789
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee65$(_context65) {
|
|
14683
14790
|
while (1) {
|
|
14684
|
-
switch (
|
|
14791
|
+
switch (_context65.prev = _context65.next) {
|
|
14685
14792
|
case 0:
|
|
14686
|
-
|
|
14793
|
+
options = _args65.length > 0 && _args65[0] !== undefined ? _args65[0] : {};
|
|
14794
|
+
optionsWithDefaults = _objectSpread({
|
|
14687
14795
|
limit: 10,
|
|
14688
14796
|
participant_limit: 10,
|
|
14689
14797
|
reply_limit: 3,
|
|
14690
14798
|
watch: true
|
|
14691
14799
|
}, options);
|
|
14692
|
-
|
|
14693
|
-
return this.post(this.baseURL
|
|
14800
|
+
_context65.next = 4;
|
|
14801
|
+
return this.post("".concat(this.baseURL, "/threads"), optionsWithDefaults);
|
|
14694
14802
|
|
|
14695
|
-
case
|
|
14696
|
-
|
|
14697
|
-
return
|
|
14698
|
-
threads:
|
|
14803
|
+
case 4:
|
|
14804
|
+
response = _context65.sent;
|
|
14805
|
+
return _context65.abrupt("return", {
|
|
14806
|
+
threads: response.threads.map(function (thread) {
|
|
14699
14807
|
return new Thread({
|
|
14700
14808
|
client: _this5,
|
|
14701
14809
|
threadData: thread
|
|
14702
14810
|
});
|
|
14703
14811
|
}),
|
|
14704
|
-
next:
|
|
14812
|
+
next: response.next
|
|
14705
14813
|
});
|
|
14706
14814
|
|
|
14707
|
-
case
|
|
14815
|
+
case 6:
|
|
14708
14816
|
case "end":
|
|
14709
|
-
return
|
|
14817
|
+
return _context65.stop();
|
|
14710
14818
|
}
|
|
14711
14819
|
}
|
|
14712
|
-
},
|
|
14820
|
+
}, _callee65, this);
|
|
14713
14821
|
}));
|
|
14714
14822
|
|
|
14715
|
-
function queryThreads(
|
|
14823
|
+
function queryThreads() {
|
|
14716
14824
|
return _queryThreads.apply(this, arguments);
|
|
14717
14825
|
}
|
|
14718
14826
|
|
|
@@ -14733,49 +14841,49 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14733
14841
|
}, {
|
|
14734
14842
|
key: "getThread",
|
|
14735
14843
|
value: function () {
|
|
14736
|
-
var _getThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14844
|
+
var _getThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee66(messageId) {
|
|
14737
14845
|
var options,
|
|
14738
|
-
|
|
14739
|
-
|
|
14740
|
-
|
|
14741
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14846
|
+
optionsWithDefaults,
|
|
14847
|
+
response,
|
|
14848
|
+
_args66 = arguments;
|
|
14849
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee66$(_context66) {
|
|
14742
14850
|
while (1) {
|
|
14743
|
-
switch (
|
|
14851
|
+
switch (_context66.prev = _context66.next) {
|
|
14744
14852
|
case 0:
|
|
14745
|
-
options =
|
|
14853
|
+
options = _args66.length > 1 && _args66[1] !== undefined ? _args66[1] : {};
|
|
14746
14854
|
|
|
14747
14855
|
if (messageId) {
|
|
14748
|
-
|
|
14856
|
+
_context66.next = 3;
|
|
14749
14857
|
break;
|
|
14750
14858
|
}
|
|
14751
14859
|
|
|
14752
|
-
throw Error('Please specify the
|
|
14860
|
+
throw Error('Please specify the messageId when calling getThread');
|
|
14753
14861
|
|
|
14754
14862
|
case 3:
|
|
14755
|
-
|
|
14863
|
+
optionsWithDefaults = _objectSpread({
|
|
14756
14864
|
participant_limit: 100,
|
|
14757
14865
|
reply_limit: 3,
|
|
14758
14866
|
watch: true
|
|
14759
14867
|
}, options);
|
|
14760
|
-
|
|
14761
|
-
return this.get(this.baseURL
|
|
14868
|
+
_context66.next = 6;
|
|
14869
|
+
return this.get("".concat(this.baseURL, "/threads/").concat(encodeURIComponent(messageId)), optionsWithDefaults);
|
|
14762
14870
|
|
|
14763
14871
|
case 6:
|
|
14764
|
-
|
|
14765
|
-
return
|
|
14872
|
+
response = _context66.sent;
|
|
14873
|
+
return _context66.abrupt("return", new Thread({
|
|
14766
14874
|
client: this,
|
|
14767
|
-
threadData:
|
|
14875
|
+
threadData: response.thread
|
|
14768
14876
|
}));
|
|
14769
14877
|
|
|
14770
14878
|
case 8:
|
|
14771
14879
|
case "end":
|
|
14772
|
-
return
|
|
14880
|
+
return _context66.stop();
|
|
14773
14881
|
}
|
|
14774
14882
|
}
|
|
14775
|
-
},
|
|
14883
|
+
}, _callee66, this);
|
|
14776
14884
|
}));
|
|
14777
14885
|
|
|
14778
|
-
function getThread(
|
|
14886
|
+
function getThread(_x91) {
|
|
14779
14887
|
return _getThread.apply(this, arguments);
|
|
14780
14888
|
}
|
|
14781
14889
|
|
|
@@ -14793,15 +14901,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14793
14901
|
}, {
|
|
14794
14902
|
key: "partialUpdateThread",
|
|
14795
14903
|
value: function () {
|
|
14796
|
-
var _partialUpdateThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
14904
|
+
var _partialUpdateThread = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee67(messageId, partialThreadObject) {
|
|
14797
14905
|
var reservedThreadFields, _key5;
|
|
14798
14906
|
|
|
14799
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
14907
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee67$(_context67) {
|
|
14800
14908
|
while (1) {
|
|
14801
|
-
switch (
|
|
14909
|
+
switch (_context67.prev = _context67.next) {
|
|
14802
14910
|
case 0:
|
|
14803
14911
|
if (messageId) {
|
|
14804
|
-
|
|
14912
|
+
_context67.next = 2;
|
|
14805
14913
|
break;
|
|
14806
14914
|
}
|
|
14807
14915
|
|
|
@@ -14810,44 +14918,44 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14810
14918
|
case 2:
|
|
14811
14919
|
// check for reserved fields from ThreadResponse type within partialThreadObject's set and unset.
|
|
14812
14920
|
// Throw error if any of the reserved field is found.
|
|
14813
|
-
reservedThreadFields = ['created_at', 'id', 'last_message_at', 'type', 'updated_at', 'user', 'reply_count', 'participants', 'channel'];
|
|
14814
|
-
|
|
14921
|
+
reservedThreadFields = ['created_at', 'id', 'last_message_at', 'type', 'updated_at', 'user', 'reply_count', 'participants', 'channel', 'custom'];
|
|
14922
|
+
_context67.t0 = _regeneratorRuntime__default['default'].keys(_objectSpread(_objectSpread({}, partialThreadObject.set), partialThreadObject.unset));
|
|
14815
14923
|
|
|
14816
14924
|
case 4:
|
|
14817
|
-
if ((
|
|
14818
|
-
|
|
14925
|
+
if ((_context67.t1 = _context67.t0()).done) {
|
|
14926
|
+
_context67.next = 10;
|
|
14819
14927
|
break;
|
|
14820
14928
|
}
|
|
14821
14929
|
|
|
14822
|
-
_key5 =
|
|
14930
|
+
_key5 = _context67.t1.value;
|
|
14823
14931
|
|
|
14824
14932
|
if (!reservedThreadFields.includes(_key5)) {
|
|
14825
|
-
|
|
14933
|
+
_context67.next = 8;
|
|
14826
14934
|
break;
|
|
14827
14935
|
}
|
|
14828
14936
|
|
|
14829
14937
|
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."));
|
|
14830
14938
|
|
|
14831
14939
|
case 8:
|
|
14832
|
-
|
|
14940
|
+
_context67.next = 4;
|
|
14833
14941
|
break;
|
|
14834
14942
|
|
|
14835
14943
|
case 10:
|
|
14836
|
-
|
|
14837
|
-
return this.patch(this.baseURL
|
|
14944
|
+
_context67.next = 12;
|
|
14945
|
+
return this.patch("".concat(this.baseURL, "/threads/").concat(encodeURIComponent(messageId)), partialThreadObject);
|
|
14838
14946
|
|
|
14839
14947
|
case 12:
|
|
14840
|
-
return
|
|
14948
|
+
return _context67.abrupt("return", _context67.sent);
|
|
14841
14949
|
|
|
14842
14950
|
case 13:
|
|
14843
14951
|
case "end":
|
|
14844
|
-
return
|
|
14952
|
+
return _context67.stop();
|
|
14845
14953
|
}
|
|
14846
14954
|
}
|
|
14847
|
-
},
|
|
14955
|
+
}, _callee67, this);
|
|
14848
14956
|
}));
|
|
14849
14957
|
|
|
14850
|
-
function partialUpdateThread(
|
|
14958
|
+
function partialUpdateThread(_x92, _x93) {
|
|
14851
14959
|
return _partialUpdateThread.apply(this, arguments);
|
|
14852
14960
|
}
|
|
14853
14961
|
|
|
@@ -14856,7 +14964,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
14856
14964
|
}, {
|
|
14857
14965
|
key: "getUserAgent",
|
|
14858
14966
|
value: function getUserAgent() {
|
|
14859
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.
|
|
14967
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.52.0");
|
|
14860
14968
|
}
|
|
14861
14969
|
}, {
|
|
14862
14970
|
key: "setUserAgent",
|
|
@@ -15075,28 +15183,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15075
15183
|
}, {
|
|
15076
15184
|
key: "sendUserCustomEvent",
|
|
15077
15185
|
value: function () {
|
|
15078
|
-
var _sendUserCustomEvent = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15079
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15186
|
+
var _sendUserCustomEvent = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee68(targetUserID, event) {
|
|
15187
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee68$(_context68) {
|
|
15080
15188
|
while (1) {
|
|
15081
|
-
switch (
|
|
15189
|
+
switch (_context68.prev = _context68.next) {
|
|
15082
15190
|
case 0:
|
|
15083
|
-
|
|
15191
|
+
_context68.next = 2;
|
|
15084
15192
|
return this.post("".concat(this.baseURL, "/users/").concat(encodeURIComponent(targetUserID), "/event"), {
|
|
15085
15193
|
event: event
|
|
15086
15194
|
});
|
|
15087
15195
|
|
|
15088
15196
|
case 2:
|
|
15089
|
-
return
|
|
15197
|
+
return _context68.abrupt("return", _context68.sent);
|
|
15090
15198
|
|
|
15091
15199
|
case 3:
|
|
15092
15200
|
case "end":
|
|
15093
|
-
return
|
|
15201
|
+
return _context68.stop();
|
|
15094
15202
|
}
|
|
15095
15203
|
}
|
|
15096
|
-
},
|
|
15204
|
+
}, _callee68, this);
|
|
15097
15205
|
}));
|
|
15098
15206
|
|
|
15099
|
-
function sendUserCustomEvent(
|
|
15207
|
+
function sendUserCustomEvent(_x94, _x95) {
|
|
15100
15208
|
return _sendUserCustomEvent.apply(this, arguments);
|
|
15101
15209
|
}
|
|
15102
15210
|
|
|
@@ -15193,28 +15301,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15193
15301
|
}, {
|
|
15194
15302
|
key: "createSegment",
|
|
15195
15303
|
value: function () {
|
|
15196
|
-
var _createSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15304
|
+
var _createSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee69(type, id, data) {
|
|
15197
15305
|
var body;
|
|
15198
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15306
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee69$(_context69) {
|
|
15199
15307
|
while (1) {
|
|
15200
|
-
switch (
|
|
15308
|
+
switch (_context69.prev = _context69.next) {
|
|
15201
15309
|
case 0:
|
|
15202
15310
|
this.validateServerSideAuth();
|
|
15203
15311
|
body = _objectSpread({
|
|
15204
15312
|
id: id,
|
|
15205
15313
|
type: type
|
|
15206
15314
|
}, data);
|
|
15207
|
-
return
|
|
15315
|
+
return _context69.abrupt("return", this.post(this.baseURL + "/segments", body));
|
|
15208
15316
|
|
|
15209
15317
|
case 3:
|
|
15210
15318
|
case "end":
|
|
15211
|
-
return
|
|
15319
|
+
return _context69.stop();
|
|
15212
15320
|
}
|
|
15213
15321
|
}
|
|
15214
|
-
},
|
|
15322
|
+
}, _callee69, this);
|
|
15215
15323
|
}));
|
|
15216
15324
|
|
|
15217
|
-
function createSegment(
|
|
15325
|
+
function createSegment(_x96, _x97, _x98) {
|
|
15218
15326
|
return _createSegment.apply(this, arguments);
|
|
15219
15327
|
}
|
|
15220
15328
|
|
|
@@ -15233,23 +15341,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15233
15341
|
}, {
|
|
15234
15342
|
key: "createUserSegment",
|
|
15235
15343
|
value: function () {
|
|
15236
|
-
var _createUserSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15237
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15344
|
+
var _createUserSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee70(id, data) {
|
|
15345
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee70$(_context70) {
|
|
15238
15346
|
while (1) {
|
|
15239
|
-
switch (
|
|
15347
|
+
switch (_context70.prev = _context70.next) {
|
|
15240
15348
|
case 0:
|
|
15241
15349
|
this.validateServerSideAuth();
|
|
15242
|
-
return
|
|
15350
|
+
return _context70.abrupt("return", this.createSegment('user', id, data));
|
|
15243
15351
|
|
|
15244
15352
|
case 2:
|
|
15245
15353
|
case "end":
|
|
15246
|
-
return
|
|
15354
|
+
return _context70.stop();
|
|
15247
15355
|
}
|
|
15248
15356
|
}
|
|
15249
|
-
},
|
|
15357
|
+
}, _callee70, this);
|
|
15250
15358
|
}));
|
|
15251
15359
|
|
|
15252
|
-
function createUserSegment(
|
|
15360
|
+
function createUserSegment(_x99, _x100) {
|
|
15253
15361
|
return _createUserSegment.apply(this, arguments);
|
|
15254
15362
|
}
|
|
15255
15363
|
|
|
@@ -15268,23 +15376,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15268
15376
|
}, {
|
|
15269
15377
|
key: "createChannelSegment",
|
|
15270
15378
|
value: function () {
|
|
15271
|
-
var _createChannelSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15272
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15379
|
+
var _createChannelSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee71(id, data) {
|
|
15380
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee71$(_context71) {
|
|
15273
15381
|
while (1) {
|
|
15274
|
-
switch (
|
|
15382
|
+
switch (_context71.prev = _context71.next) {
|
|
15275
15383
|
case 0:
|
|
15276
15384
|
this.validateServerSideAuth();
|
|
15277
|
-
return
|
|
15385
|
+
return _context71.abrupt("return", this.createSegment('channel', id, data));
|
|
15278
15386
|
|
|
15279
15387
|
case 2:
|
|
15280
15388
|
case "end":
|
|
15281
|
-
return
|
|
15389
|
+
return _context71.stop();
|
|
15282
15390
|
}
|
|
15283
15391
|
}
|
|
15284
|
-
},
|
|
15392
|
+
}, _callee71, this);
|
|
15285
15393
|
}));
|
|
15286
15394
|
|
|
15287
|
-
function createChannelSegment(
|
|
15395
|
+
function createChannelSegment(_x101, _x102) {
|
|
15288
15396
|
return _createChannelSegment.apply(this, arguments);
|
|
15289
15397
|
}
|
|
15290
15398
|
|
|
@@ -15293,23 +15401,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15293
15401
|
}, {
|
|
15294
15402
|
key: "getSegment",
|
|
15295
15403
|
value: function () {
|
|
15296
|
-
var _getSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15297
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15404
|
+
var _getSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee72(id) {
|
|
15405
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee72$(_context72) {
|
|
15298
15406
|
while (1) {
|
|
15299
|
-
switch (
|
|
15407
|
+
switch (_context72.prev = _context72.next) {
|
|
15300
15408
|
case 0:
|
|
15301
15409
|
this.validateServerSideAuth();
|
|
15302
|
-
return
|
|
15410
|
+
return _context72.abrupt("return", this.get(this.baseURL + "/segments/".concat(encodeURIComponent(id))));
|
|
15303
15411
|
|
|
15304
15412
|
case 2:
|
|
15305
15413
|
case "end":
|
|
15306
|
-
return
|
|
15414
|
+
return _context72.stop();
|
|
15307
15415
|
}
|
|
15308
15416
|
}
|
|
15309
|
-
},
|
|
15417
|
+
}, _callee72, this);
|
|
15310
15418
|
}));
|
|
15311
15419
|
|
|
15312
|
-
function getSegment(
|
|
15420
|
+
function getSegment(_x103) {
|
|
15313
15421
|
return _getSegment.apply(this, arguments);
|
|
15314
15422
|
}
|
|
15315
15423
|
|
|
@@ -15327,23 +15435,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15327
15435
|
}, {
|
|
15328
15436
|
key: "updateSegment",
|
|
15329
15437
|
value: function () {
|
|
15330
|
-
var _updateSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15331
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15438
|
+
var _updateSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee73(id, data) {
|
|
15439
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee73$(_context73) {
|
|
15332
15440
|
while (1) {
|
|
15333
|
-
switch (
|
|
15441
|
+
switch (_context73.prev = _context73.next) {
|
|
15334
15442
|
case 0:
|
|
15335
15443
|
this.validateServerSideAuth();
|
|
15336
|
-
return
|
|
15444
|
+
return _context73.abrupt("return", this.put(this.baseURL + "/segments/".concat(encodeURIComponent(id)), data));
|
|
15337
15445
|
|
|
15338
15446
|
case 2:
|
|
15339
15447
|
case "end":
|
|
15340
|
-
return
|
|
15448
|
+
return _context73.stop();
|
|
15341
15449
|
}
|
|
15342
15450
|
}
|
|
15343
|
-
},
|
|
15451
|
+
}, _callee73, this);
|
|
15344
15452
|
}));
|
|
15345
15453
|
|
|
15346
|
-
function updateSegment(
|
|
15454
|
+
function updateSegment(_x104, _x105) {
|
|
15347
15455
|
return _updateSegment.apply(this, arguments);
|
|
15348
15456
|
}
|
|
15349
15457
|
|
|
@@ -15361,27 +15469,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15361
15469
|
}, {
|
|
15362
15470
|
key: "addSegmentTargets",
|
|
15363
15471
|
value: function () {
|
|
15364
|
-
var _addSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15472
|
+
var _addSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee74(id, targets) {
|
|
15365
15473
|
var body;
|
|
15366
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15474
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee74$(_context74) {
|
|
15367
15475
|
while (1) {
|
|
15368
|
-
switch (
|
|
15476
|
+
switch (_context74.prev = _context74.next) {
|
|
15369
15477
|
case 0:
|
|
15370
15478
|
this.validateServerSideAuth();
|
|
15371
15479
|
body = {
|
|
15372
15480
|
target_ids: targets
|
|
15373
15481
|
};
|
|
15374
|
-
return
|
|
15482
|
+
return _context74.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/addtargets"), body));
|
|
15375
15483
|
|
|
15376
15484
|
case 3:
|
|
15377
15485
|
case "end":
|
|
15378
|
-
return
|
|
15486
|
+
return _context74.stop();
|
|
15379
15487
|
}
|
|
15380
15488
|
}
|
|
15381
|
-
},
|
|
15489
|
+
}, _callee74, this);
|
|
15382
15490
|
}));
|
|
15383
15491
|
|
|
15384
|
-
function addSegmentTargets(
|
|
15492
|
+
function addSegmentTargets(_x106, _x107) {
|
|
15385
15493
|
return _addSegmentTargets.apply(this, arguments);
|
|
15386
15494
|
}
|
|
15387
15495
|
|
|
@@ -15390,33 +15498,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15390
15498
|
}, {
|
|
15391
15499
|
key: "querySegmentTargets",
|
|
15392
15500
|
value: function () {
|
|
15393
|
-
var _querySegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15501
|
+
var _querySegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee75(id) {
|
|
15394
15502
|
var filter,
|
|
15395
15503
|
sort,
|
|
15396
15504
|
options,
|
|
15397
|
-
|
|
15398
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15505
|
+
_args75 = arguments;
|
|
15506
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee75$(_context75) {
|
|
15399
15507
|
while (1) {
|
|
15400
|
-
switch (
|
|
15508
|
+
switch (_context75.prev = _context75.next) {
|
|
15401
15509
|
case 0:
|
|
15402
|
-
filter =
|
|
15403
|
-
sort =
|
|
15404
|
-
options =
|
|
15510
|
+
filter = _args75.length > 1 && _args75[1] !== undefined ? _args75[1] : {};
|
|
15511
|
+
sort = _args75.length > 2 && _args75[2] !== undefined ? _args75[2] : [];
|
|
15512
|
+
options = _args75.length > 3 && _args75[3] !== undefined ? _args75[3] : {};
|
|
15405
15513
|
this.validateServerSideAuth();
|
|
15406
|
-
return
|
|
15514
|
+
return _context75.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/targets/query"), _objectSpread({
|
|
15407
15515
|
filter: filter || {},
|
|
15408
15516
|
sort: sort || []
|
|
15409
15517
|
}, options)));
|
|
15410
15518
|
|
|
15411
15519
|
case 5:
|
|
15412
15520
|
case "end":
|
|
15413
|
-
return
|
|
15521
|
+
return _context75.stop();
|
|
15414
15522
|
}
|
|
15415
15523
|
}
|
|
15416
|
-
},
|
|
15524
|
+
}, _callee75, this);
|
|
15417
15525
|
}));
|
|
15418
15526
|
|
|
15419
|
-
function querySegmentTargets(
|
|
15527
|
+
function querySegmentTargets(_x108) {
|
|
15420
15528
|
return _querySegmentTargets.apply(this, arguments);
|
|
15421
15529
|
}
|
|
15422
15530
|
|
|
@@ -15434,27 +15542,27 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15434
15542
|
}, {
|
|
15435
15543
|
key: "removeSegmentTargets",
|
|
15436
15544
|
value: function () {
|
|
15437
|
-
var _removeSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15545
|
+
var _removeSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee76(id, targets) {
|
|
15438
15546
|
var body;
|
|
15439
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15547
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee76$(_context76) {
|
|
15440
15548
|
while (1) {
|
|
15441
|
-
switch (
|
|
15549
|
+
switch (_context76.prev = _context76.next) {
|
|
15442
15550
|
case 0:
|
|
15443
15551
|
this.validateServerSideAuth();
|
|
15444
15552
|
body = {
|
|
15445
15553
|
target_ids: targets
|
|
15446
15554
|
};
|
|
15447
|
-
return
|
|
15555
|
+
return _context76.abrupt("return", this.post(this.baseURL + "/segments/".concat(encodeURIComponent(id), "/deletetargets"), body));
|
|
15448
15556
|
|
|
15449
15557
|
case 3:
|
|
15450
15558
|
case "end":
|
|
15451
|
-
return
|
|
15559
|
+
return _context76.stop();
|
|
15452
15560
|
}
|
|
15453
15561
|
}
|
|
15454
|
-
},
|
|
15562
|
+
}, _callee76, this);
|
|
15455
15563
|
}));
|
|
15456
15564
|
|
|
15457
|
-
function removeSegmentTargets(
|
|
15565
|
+
function removeSegmentTargets(_x109, _x110) {
|
|
15458
15566
|
return _removeSegmentTargets.apply(this, arguments);
|
|
15459
15567
|
}
|
|
15460
15568
|
|
|
@@ -15472,29 +15580,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15472
15580
|
}, {
|
|
15473
15581
|
key: "querySegments",
|
|
15474
15582
|
value: function () {
|
|
15475
|
-
var _querySegments = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15583
|
+
var _querySegments = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee77(filter, sort) {
|
|
15476
15584
|
var options,
|
|
15477
|
-
|
|
15478
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15585
|
+
_args77 = arguments;
|
|
15586
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee77$(_context77) {
|
|
15479
15587
|
while (1) {
|
|
15480
|
-
switch (
|
|
15588
|
+
switch (_context77.prev = _context77.next) {
|
|
15481
15589
|
case 0:
|
|
15482
|
-
options =
|
|
15590
|
+
options = _args77.length > 2 && _args77[2] !== undefined ? _args77[2] : {};
|
|
15483
15591
|
this.validateServerSideAuth();
|
|
15484
|
-
return
|
|
15592
|
+
return _context77.abrupt("return", this.post(this.baseURL + "/segments/query", _objectSpread({
|
|
15485
15593
|
filter: filter,
|
|
15486
15594
|
sort: sort
|
|
15487
15595
|
}, options)));
|
|
15488
15596
|
|
|
15489
15597
|
case 3:
|
|
15490
15598
|
case "end":
|
|
15491
|
-
return
|
|
15599
|
+
return _context77.stop();
|
|
15492
15600
|
}
|
|
15493
15601
|
}
|
|
15494
|
-
},
|
|
15602
|
+
}, _callee77, this);
|
|
15495
15603
|
}));
|
|
15496
15604
|
|
|
15497
|
-
function querySegments(
|
|
15605
|
+
function querySegments(_x111, _x112) {
|
|
15498
15606
|
return _querySegments.apply(this, arguments);
|
|
15499
15607
|
}
|
|
15500
15608
|
|
|
@@ -15511,23 +15619,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15511
15619
|
}, {
|
|
15512
15620
|
key: "deleteSegment",
|
|
15513
15621
|
value: function () {
|
|
15514
|
-
var _deleteSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15515
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15622
|
+
var _deleteSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee78(id) {
|
|
15623
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee78$(_context78) {
|
|
15516
15624
|
while (1) {
|
|
15517
|
-
switch (
|
|
15625
|
+
switch (_context78.prev = _context78.next) {
|
|
15518
15626
|
case 0:
|
|
15519
15627
|
this.validateServerSideAuth();
|
|
15520
|
-
return
|
|
15628
|
+
return _context78.abrupt("return", this.delete(this.baseURL + "/segments/".concat(encodeURIComponent(id))));
|
|
15521
15629
|
|
|
15522
15630
|
case 2:
|
|
15523
15631
|
case "end":
|
|
15524
|
-
return
|
|
15632
|
+
return _context78.stop();
|
|
15525
15633
|
}
|
|
15526
15634
|
}
|
|
15527
|
-
},
|
|
15635
|
+
}, _callee78, this);
|
|
15528
15636
|
}));
|
|
15529
15637
|
|
|
15530
|
-
function deleteSegment(
|
|
15638
|
+
function deleteSegment(_x113) {
|
|
15531
15639
|
return _deleteSegment.apply(this, arguments);
|
|
15532
15640
|
}
|
|
15533
15641
|
|
|
@@ -15545,23 +15653,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15545
15653
|
}, {
|
|
15546
15654
|
key: "segmentTargetExists",
|
|
15547
15655
|
value: function () {
|
|
15548
|
-
var _segmentTargetExists = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15549
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15656
|
+
var _segmentTargetExists = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee79(segmentId, targetId) {
|
|
15657
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee79$(_context79) {
|
|
15550
15658
|
while (1) {
|
|
15551
|
-
switch (
|
|
15659
|
+
switch (_context79.prev = _context79.next) {
|
|
15552
15660
|
case 0:
|
|
15553
15661
|
this.validateServerSideAuth();
|
|
15554
|
-
return
|
|
15662
|
+
return _context79.abrupt("return", this.get(this.baseURL + "/segments/".concat(encodeURIComponent(segmentId), "/target/").concat(encodeURIComponent(targetId))));
|
|
15555
15663
|
|
|
15556
15664
|
case 2:
|
|
15557
15665
|
case "end":
|
|
15558
|
-
return
|
|
15666
|
+
return _context79.stop();
|
|
15559
15667
|
}
|
|
15560
15668
|
}
|
|
15561
|
-
},
|
|
15669
|
+
}, _callee79, this);
|
|
15562
15670
|
}));
|
|
15563
15671
|
|
|
15564
|
-
function segmentTargetExists(
|
|
15672
|
+
function segmentTargetExists(_x114, _x115) {
|
|
15565
15673
|
return _segmentTargetExists.apply(this, arguments);
|
|
15566
15674
|
}
|
|
15567
15675
|
|
|
@@ -15578,23 +15686,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15578
15686
|
}, {
|
|
15579
15687
|
key: "createCampaign",
|
|
15580
15688
|
value: function () {
|
|
15581
|
-
var _createCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15582
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15689
|
+
var _createCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee80(params) {
|
|
15690
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee80$(_context80) {
|
|
15583
15691
|
while (1) {
|
|
15584
|
-
switch (
|
|
15692
|
+
switch (_context80.prev = _context80.next) {
|
|
15585
15693
|
case 0:
|
|
15586
15694
|
this.validateServerSideAuth();
|
|
15587
|
-
return
|
|
15695
|
+
return _context80.abrupt("return", this.post(this.baseURL + "/campaigns", _objectSpread({}, params)));
|
|
15588
15696
|
|
|
15589
15697
|
case 2:
|
|
15590
15698
|
case "end":
|
|
15591
|
-
return
|
|
15699
|
+
return _context80.stop();
|
|
15592
15700
|
}
|
|
15593
15701
|
}
|
|
15594
|
-
},
|
|
15702
|
+
}, _callee80, this);
|
|
15595
15703
|
}));
|
|
15596
15704
|
|
|
15597
|
-
function createCampaign(
|
|
15705
|
+
function createCampaign(_x116) {
|
|
15598
15706
|
return _createCampaign.apply(this, arguments);
|
|
15599
15707
|
}
|
|
15600
15708
|
|
|
@@ -15603,23 +15711,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15603
15711
|
}, {
|
|
15604
15712
|
key: "getCampaign",
|
|
15605
15713
|
value: function () {
|
|
15606
|
-
var _getCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15607
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15714
|
+
var _getCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee81(id) {
|
|
15715
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee81$(_context81) {
|
|
15608
15716
|
while (1) {
|
|
15609
|
-
switch (
|
|
15717
|
+
switch (_context81.prev = _context81.next) {
|
|
15610
15718
|
case 0:
|
|
15611
15719
|
this.validateServerSideAuth();
|
|
15612
|
-
return
|
|
15720
|
+
return _context81.abrupt("return", this.get(this.baseURL + "/campaigns/".concat(encodeURIComponent(id))));
|
|
15613
15721
|
|
|
15614
15722
|
case 2:
|
|
15615
15723
|
case "end":
|
|
15616
|
-
return
|
|
15724
|
+
return _context81.stop();
|
|
15617
15725
|
}
|
|
15618
15726
|
}
|
|
15619
|
-
},
|
|
15727
|
+
}, _callee81, this);
|
|
15620
15728
|
}));
|
|
15621
15729
|
|
|
15622
|
-
function getCampaign(
|
|
15730
|
+
function getCampaign(_x117) {
|
|
15623
15731
|
return _getCampaign.apply(this, arguments);
|
|
15624
15732
|
}
|
|
15625
15733
|
|
|
@@ -15628,26 +15736,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15628
15736
|
}, {
|
|
15629
15737
|
key: "startCampaign",
|
|
15630
15738
|
value: function () {
|
|
15631
|
-
var _startCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15632
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15739
|
+
var _startCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee82(id, options) {
|
|
15740
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee82$(_context82) {
|
|
15633
15741
|
while (1) {
|
|
15634
|
-
switch (
|
|
15742
|
+
switch (_context82.prev = _context82.next) {
|
|
15635
15743
|
case 0:
|
|
15636
15744
|
this.validateServerSideAuth();
|
|
15637
|
-
return
|
|
15745
|
+
return _context82.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(encodeURIComponent(id), "/start"), {
|
|
15638
15746
|
scheduled_for: options === null || options === void 0 ? void 0 : options.scheduledFor,
|
|
15639
15747
|
stop_at: options === null || options === void 0 ? void 0 : options.stopAt
|
|
15640
15748
|
}));
|
|
15641
15749
|
|
|
15642
15750
|
case 2:
|
|
15643
15751
|
case "end":
|
|
15644
|
-
return
|
|
15752
|
+
return _context82.stop();
|
|
15645
15753
|
}
|
|
15646
15754
|
}
|
|
15647
|
-
},
|
|
15755
|
+
}, _callee82, this);
|
|
15648
15756
|
}));
|
|
15649
15757
|
|
|
15650
|
-
function startCampaign(
|
|
15758
|
+
function startCampaign(_x118, _x119) {
|
|
15651
15759
|
return _startCampaign.apply(this, arguments);
|
|
15652
15760
|
}
|
|
15653
15761
|
|
|
@@ -15663,30 +15771,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15663
15771
|
}, {
|
|
15664
15772
|
key: "queryCampaigns",
|
|
15665
15773
|
value: function () {
|
|
15666
|
-
var _queryCampaigns = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15667
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15774
|
+
var _queryCampaigns = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee83(filter, sort, options) {
|
|
15775
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee83$(_context83) {
|
|
15668
15776
|
while (1) {
|
|
15669
|
-
switch (
|
|
15777
|
+
switch (_context83.prev = _context83.next) {
|
|
15670
15778
|
case 0:
|
|
15671
15779
|
this.validateServerSideAuth();
|
|
15672
|
-
|
|
15780
|
+
_context83.next = 3;
|
|
15673
15781
|
return this.post(this.baseURL + "/campaigns/query", _objectSpread({
|
|
15674
15782
|
filter: filter,
|
|
15675
15783
|
sort: sort
|
|
15676
15784
|
}, options || {}));
|
|
15677
15785
|
|
|
15678
15786
|
case 3:
|
|
15679
|
-
return
|
|
15787
|
+
return _context83.abrupt("return", _context83.sent);
|
|
15680
15788
|
|
|
15681
15789
|
case 4:
|
|
15682
15790
|
case "end":
|
|
15683
|
-
return
|
|
15791
|
+
return _context83.stop();
|
|
15684
15792
|
}
|
|
15685
15793
|
}
|
|
15686
|
-
},
|
|
15794
|
+
}, _callee83, this);
|
|
15687
15795
|
}));
|
|
15688
15796
|
|
|
15689
|
-
function queryCampaigns(
|
|
15797
|
+
function queryCampaigns(_x120, _x121, _x122) {
|
|
15690
15798
|
return _queryCampaigns.apply(this, arguments);
|
|
15691
15799
|
}
|
|
15692
15800
|
|
|
@@ -15704,23 +15812,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15704
15812
|
}, {
|
|
15705
15813
|
key: "updateCampaign",
|
|
15706
15814
|
value: function () {
|
|
15707
|
-
var _updateCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15708
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15815
|
+
var _updateCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee84(id, params) {
|
|
15816
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee84$(_context84) {
|
|
15709
15817
|
while (1) {
|
|
15710
|
-
switch (
|
|
15818
|
+
switch (_context84.prev = _context84.next) {
|
|
15711
15819
|
case 0:
|
|
15712
15820
|
this.validateServerSideAuth();
|
|
15713
|
-
return
|
|
15821
|
+
return _context84.abrupt("return", this.put(this.baseURL + "/campaigns/".concat(encodeURIComponent(id)), params));
|
|
15714
15822
|
|
|
15715
15823
|
case 2:
|
|
15716
15824
|
case "end":
|
|
15717
|
-
return
|
|
15825
|
+
return _context84.stop();
|
|
15718
15826
|
}
|
|
15719
15827
|
}
|
|
15720
|
-
},
|
|
15828
|
+
}, _callee84, this);
|
|
15721
15829
|
}));
|
|
15722
15830
|
|
|
15723
|
-
function updateCampaign(
|
|
15831
|
+
function updateCampaign(_x123, _x124) {
|
|
15724
15832
|
return _updateCampaign.apply(this, arguments);
|
|
15725
15833
|
}
|
|
15726
15834
|
|
|
@@ -15737,23 +15845,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15737
15845
|
}, {
|
|
15738
15846
|
key: "deleteCampaign",
|
|
15739
15847
|
value: function () {
|
|
15740
|
-
var _deleteCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15741
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15848
|
+
var _deleteCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee85(id) {
|
|
15849
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee85$(_context85) {
|
|
15742
15850
|
while (1) {
|
|
15743
|
-
switch (
|
|
15851
|
+
switch (_context85.prev = _context85.next) {
|
|
15744
15852
|
case 0:
|
|
15745
15853
|
this.validateServerSideAuth();
|
|
15746
|
-
return
|
|
15854
|
+
return _context85.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(encodeURIComponent(id))));
|
|
15747
15855
|
|
|
15748
15856
|
case 2:
|
|
15749
15857
|
case "end":
|
|
15750
|
-
return
|
|
15858
|
+
return _context85.stop();
|
|
15751
15859
|
}
|
|
15752
15860
|
}
|
|
15753
|
-
},
|
|
15861
|
+
}, _callee85, this);
|
|
15754
15862
|
}));
|
|
15755
15863
|
|
|
15756
|
-
function deleteCampaign(
|
|
15864
|
+
function deleteCampaign(_x125) {
|
|
15757
15865
|
return _deleteCampaign.apply(this, arguments);
|
|
15758
15866
|
}
|
|
15759
15867
|
|
|
@@ -15770,23 +15878,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15770
15878
|
}, {
|
|
15771
15879
|
key: "stopCampaign",
|
|
15772
15880
|
value: function () {
|
|
15773
|
-
var _stopCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15774
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15881
|
+
var _stopCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee86(id) {
|
|
15882
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee86$(_context86) {
|
|
15775
15883
|
while (1) {
|
|
15776
|
-
switch (
|
|
15884
|
+
switch (_context86.prev = _context86.next) {
|
|
15777
15885
|
case 0:
|
|
15778
15886
|
this.validateServerSideAuth();
|
|
15779
|
-
return
|
|
15887
|
+
return _context86.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(encodeURIComponent(id), "/stop")));
|
|
15780
15888
|
|
|
15781
15889
|
case 2:
|
|
15782
15890
|
case "end":
|
|
15783
|
-
return
|
|
15891
|
+
return _context86.stop();
|
|
15784
15892
|
}
|
|
15785
15893
|
}
|
|
15786
|
-
},
|
|
15894
|
+
}, _callee86, this);
|
|
15787
15895
|
}));
|
|
15788
15896
|
|
|
15789
|
-
function stopCampaign(
|
|
15897
|
+
function stopCampaign(_x126) {
|
|
15790
15898
|
return _stopCampaign.apply(this, arguments);
|
|
15791
15899
|
}
|
|
15792
15900
|
|
|
@@ -15802,24 +15910,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15802
15910
|
}, {
|
|
15803
15911
|
key: "enrichURL",
|
|
15804
15912
|
value: function () {
|
|
15805
|
-
var _enrichURL = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15806
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15913
|
+
var _enrichURL = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee87(url) {
|
|
15914
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee87$(_context87) {
|
|
15807
15915
|
while (1) {
|
|
15808
|
-
switch (
|
|
15916
|
+
switch (_context87.prev = _context87.next) {
|
|
15809
15917
|
case 0:
|
|
15810
|
-
return
|
|
15918
|
+
return _context87.abrupt("return", this.get(this.baseURL + "/og", {
|
|
15811
15919
|
url: url
|
|
15812
15920
|
}));
|
|
15813
15921
|
|
|
15814
15922
|
case 1:
|
|
15815
15923
|
case "end":
|
|
15816
|
-
return
|
|
15924
|
+
return _context87.stop();
|
|
15817
15925
|
}
|
|
15818
15926
|
}
|
|
15819
|
-
},
|
|
15927
|
+
}, _callee87, this);
|
|
15820
15928
|
}));
|
|
15821
15929
|
|
|
15822
|
-
function enrichURL(
|
|
15930
|
+
function enrichURL(_x127) {
|
|
15823
15931
|
return _enrichURL.apply(this, arguments);
|
|
15824
15932
|
}
|
|
15825
15933
|
|
|
@@ -15836,22 +15944,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15836
15944
|
}, {
|
|
15837
15945
|
key: "getTask",
|
|
15838
15946
|
value: function () {
|
|
15839
|
-
var _getTask = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15840
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15947
|
+
var _getTask = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee88(id) {
|
|
15948
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee88$(_context88) {
|
|
15841
15949
|
while (1) {
|
|
15842
|
-
switch (
|
|
15950
|
+
switch (_context88.prev = _context88.next) {
|
|
15843
15951
|
case 0:
|
|
15844
|
-
return
|
|
15952
|
+
return _context88.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(encodeURIComponent(id))));
|
|
15845
15953
|
|
|
15846
15954
|
case 1:
|
|
15847
15955
|
case "end":
|
|
15848
|
-
return
|
|
15956
|
+
return _context88.stop();
|
|
15849
15957
|
}
|
|
15850
15958
|
}
|
|
15851
|
-
},
|
|
15959
|
+
}, _callee88, this);
|
|
15852
15960
|
}));
|
|
15853
15961
|
|
|
15854
|
-
function getTask(
|
|
15962
|
+
function getTask(_x128) {
|
|
15855
15963
|
return _getTask.apply(this, arguments);
|
|
15856
15964
|
}
|
|
15857
15965
|
|
|
@@ -15869,31 +15977,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15869
15977
|
}, {
|
|
15870
15978
|
key: "deleteChannels",
|
|
15871
15979
|
value: function () {
|
|
15872
|
-
var _deleteChannels = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15980
|
+
var _deleteChannels = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee89(cids) {
|
|
15873
15981
|
var options,
|
|
15874
|
-
|
|
15875
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
15982
|
+
_args89 = arguments;
|
|
15983
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee89$(_context89) {
|
|
15876
15984
|
while (1) {
|
|
15877
|
-
switch (
|
|
15985
|
+
switch (_context89.prev = _context89.next) {
|
|
15878
15986
|
case 0:
|
|
15879
|
-
options =
|
|
15880
|
-
|
|
15987
|
+
options = _args89.length > 1 && _args89[1] !== undefined ? _args89[1] : {};
|
|
15988
|
+
_context89.next = 3;
|
|
15881
15989
|
return this.post(this.baseURL + "/channels/delete", _objectSpread({
|
|
15882
15990
|
cids: cids
|
|
15883
15991
|
}, options));
|
|
15884
15992
|
|
|
15885
15993
|
case 3:
|
|
15886
|
-
return
|
|
15994
|
+
return _context89.abrupt("return", _context89.sent);
|
|
15887
15995
|
|
|
15888
15996
|
case 4:
|
|
15889
15997
|
case "end":
|
|
15890
|
-
return
|
|
15998
|
+
return _context89.stop();
|
|
15891
15999
|
}
|
|
15892
16000
|
}
|
|
15893
|
-
},
|
|
16001
|
+
}, _callee89, this);
|
|
15894
16002
|
}));
|
|
15895
16003
|
|
|
15896
|
-
function deleteChannels(
|
|
16004
|
+
function deleteChannels(_x129) {
|
|
15897
16005
|
return _deleteChannels.apply(this, arguments);
|
|
15898
16006
|
}
|
|
15899
16007
|
|
|
@@ -15911,17 +16019,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15911
16019
|
}, {
|
|
15912
16020
|
key: "deleteUsers",
|
|
15913
16021
|
value: function () {
|
|
15914
|
-
var _deleteUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16022
|
+
var _deleteUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee90(user_ids) {
|
|
15915
16023
|
var options,
|
|
15916
|
-
|
|
15917
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16024
|
+
_args90 = arguments;
|
|
16025
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee90$(_context90) {
|
|
15918
16026
|
while (1) {
|
|
15919
|
-
switch (
|
|
16027
|
+
switch (_context90.prev = _context90.next) {
|
|
15920
16028
|
case 0:
|
|
15921
|
-
options =
|
|
16029
|
+
options = _args90.length > 1 && _args90[1] !== undefined ? _args90[1] : {};
|
|
15922
16030
|
|
|
15923
16031
|
if (!(typeof options.user !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.user))) {
|
|
15924
|
-
|
|
16032
|
+
_context90.next = 3;
|
|
15925
16033
|
break;
|
|
15926
16034
|
}
|
|
15927
16035
|
|
|
@@ -15929,7 +16037,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15929
16037
|
|
|
15930
16038
|
case 3:
|
|
15931
16039
|
if (!(typeof options.conversations !== 'undefined' && !['soft', 'hard'].includes(options.conversations))) {
|
|
15932
|
-
|
|
16040
|
+
_context90.next = 5;
|
|
15933
16041
|
break;
|
|
15934
16042
|
}
|
|
15935
16043
|
|
|
@@ -15937,30 +16045,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15937
16045
|
|
|
15938
16046
|
case 5:
|
|
15939
16047
|
if (!(typeof options.messages !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.messages))) {
|
|
15940
|
-
|
|
16048
|
+
_context90.next = 7;
|
|
15941
16049
|
break;
|
|
15942
16050
|
}
|
|
15943
16051
|
|
|
15944
16052
|
throw new Error('Invalid delete user options. messages must be one of [soft hard pruning]');
|
|
15945
16053
|
|
|
15946
16054
|
case 7:
|
|
15947
|
-
|
|
16055
|
+
_context90.next = 9;
|
|
15948
16056
|
return this.post(this.baseURL + "/users/delete", _objectSpread({
|
|
15949
16057
|
user_ids: user_ids
|
|
15950
16058
|
}, options));
|
|
15951
16059
|
|
|
15952
16060
|
case 9:
|
|
15953
|
-
return
|
|
16061
|
+
return _context90.abrupt("return", _context90.sent);
|
|
15954
16062
|
|
|
15955
16063
|
case 10:
|
|
15956
16064
|
case "end":
|
|
15957
|
-
return
|
|
16065
|
+
return _context90.stop();
|
|
15958
16066
|
}
|
|
15959
16067
|
}
|
|
15960
|
-
},
|
|
16068
|
+
}, _callee90, this);
|
|
15961
16069
|
}));
|
|
15962
16070
|
|
|
15963
|
-
function deleteUsers(
|
|
16071
|
+
function deleteUsers(_x130) {
|
|
15964
16072
|
return _deleteUsers.apply(this, arguments);
|
|
15965
16073
|
}
|
|
15966
16074
|
|
|
@@ -15981,28 +16089,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
15981
16089
|
}, {
|
|
15982
16090
|
key: "_createImportURL",
|
|
15983
16091
|
value: function () {
|
|
15984
|
-
var _createImportURL2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
15985
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16092
|
+
var _createImportURL2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee91(filename) {
|
|
16093
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee91$(_context91) {
|
|
15986
16094
|
while (1) {
|
|
15987
|
-
switch (
|
|
16095
|
+
switch (_context91.prev = _context91.next) {
|
|
15988
16096
|
case 0:
|
|
15989
|
-
|
|
16097
|
+
_context91.next = 2;
|
|
15990
16098
|
return this.post(this.baseURL + "/import_urls", {
|
|
15991
16099
|
filename: filename
|
|
15992
16100
|
});
|
|
15993
16101
|
|
|
15994
16102
|
case 2:
|
|
15995
|
-
return
|
|
16103
|
+
return _context91.abrupt("return", _context91.sent);
|
|
15996
16104
|
|
|
15997
16105
|
case 3:
|
|
15998
16106
|
case "end":
|
|
15999
|
-
return
|
|
16107
|
+
return _context91.stop();
|
|
16000
16108
|
}
|
|
16001
16109
|
}
|
|
16002
|
-
},
|
|
16110
|
+
}, _callee91, this);
|
|
16003
16111
|
}));
|
|
16004
16112
|
|
|
16005
|
-
function _createImportURL(
|
|
16113
|
+
function _createImportURL(_x131) {
|
|
16006
16114
|
return _createImportURL2.apply(this, arguments);
|
|
16007
16115
|
}
|
|
16008
16116
|
|
|
@@ -16024,33 +16132,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16024
16132
|
}, {
|
|
16025
16133
|
key: "_createImport",
|
|
16026
16134
|
value: function () {
|
|
16027
|
-
var _createImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16135
|
+
var _createImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee92(path) {
|
|
16028
16136
|
var options,
|
|
16029
|
-
|
|
16030
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16137
|
+
_args92 = arguments;
|
|
16138
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee92$(_context92) {
|
|
16031
16139
|
while (1) {
|
|
16032
|
-
switch (
|
|
16140
|
+
switch (_context92.prev = _context92.next) {
|
|
16033
16141
|
case 0:
|
|
16034
|
-
options =
|
|
16142
|
+
options = _args92.length > 1 && _args92[1] !== undefined ? _args92[1] : {
|
|
16035
16143
|
mode: 'upsert'
|
|
16036
16144
|
};
|
|
16037
|
-
|
|
16145
|
+
_context92.next = 3;
|
|
16038
16146
|
return this.post(this.baseURL + "/imports", _objectSpread({
|
|
16039
16147
|
path: path
|
|
16040
16148
|
}, options));
|
|
16041
16149
|
|
|
16042
16150
|
case 3:
|
|
16043
|
-
return
|
|
16151
|
+
return _context92.abrupt("return", _context92.sent);
|
|
16044
16152
|
|
|
16045
16153
|
case 4:
|
|
16046
16154
|
case "end":
|
|
16047
|
-
return
|
|
16155
|
+
return _context92.stop();
|
|
16048
16156
|
}
|
|
16049
16157
|
}
|
|
16050
|
-
},
|
|
16158
|
+
}, _callee92, this);
|
|
16051
16159
|
}));
|
|
16052
16160
|
|
|
16053
|
-
function _createImport(
|
|
16161
|
+
function _createImport(_x132) {
|
|
16054
16162
|
return _createImport2.apply(this, arguments);
|
|
16055
16163
|
}
|
|
16056
16164
|
|
|
@@ -16072,26 +16180,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16072
16180
|
}, {
|
|
16073
16181
|
key: "_getImport",
|
|
16074
16182
|
value: function () {
|
|
16075
|
-
var _getImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16076
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16183
|
+
var _getImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee93(id) {
|
|
16184
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee93$(_context93) {
|
|
16077
16185
|
while (1) {
|
|
16078
|
-
switch (
|
|
16186
|
+
switch (_context93.prev = _context93.next) {
|
|
16079
16187
|
case 0:
|
|
16080
|
-
|
|
16188
|
+
_context93.next = 2;
|
|
16081
16189
|
return this.get(this.baseURL + "/imports/".concat(encodeURIComponent(id)));
|
|
16082
16190
|
|
|
16083
16191
|
case 2:
|
|
16084
|
-
return
|
|
16192
|
+
return _context93.abrupt("return", _context93.sent);
|
|
16085
16193
|
|
|
16086
16194
|
case 3:
|
|
16087
16195
|
case "end":
|
|
16088
|
-
return
|
|
16196
|
+
return _context93.stop();
|
|
16089
16197
|
}
|
|
16090
16198
|
}
|
|
16091
|
-
},
|
|
16199
|
+
}, _callee93, this);
|
|
16092
16200
|
}));
|
|
16093
16201
|
|
|
16094
|
-
function _getImport(
|
|
16202
|
+
function _getImport(_x133) {
|
|
16095
16203
|
return _getImport2.apply(this, arguments);
|
|
16096
16204
|
}
|
|
16097
16205
|
|
|
@@ -16113,26 +16221,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16113
16221
|
}, {
|
|
16114
16222
|
key: "_listImports",
|
|
16115
16223
|
value: function () {
|
|
16116
|
-
var _listImports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16117
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16224
|
+
var _listImports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee94(options) {
|
|
16225
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee94$(_context94) {
|
|
16118
16226
|
while (1) {
|
|
16119
|
-
switch (
|
|
16227
|
+
switch (_context94.prev = _context94.next) {
|
|
16120
16228
|
case 0:
|
|
16121
|
-
|
|
16229
|
+
_context94.next = 2;
|
|
16122
16230
|
return this.get(this.baseURL + "/imports", options);
|
|
16123
16231
|
|
|
16124
16232
|
case 2:
|
|
16125
|
-
return
|
|
16233
|
+
return _context94.abrupt("return", _context94.sent);
|
|
16126
16234
|
|
|
16127
16235
|
case 3:
|
|
16128
16236
|
case "end":
|
|
16129
|
-
return
|
|
16237
|
+
return _context94.stop();
|
|
16130
16238
|
}
|
|
16131
16239
|
}
|
|
16132
|
-
},
|
|
16240
|
+
}, _callee94, this);
|
|
16133
16241
|
}));
|
|
16134
16242
|
|
|
16135
|
-
function _listImports(
|
|
16243
|
+
function _listImports(_x134) {
|
|
16136
16244
|
return _listImports2.apply(this, arguments);
|
|
16137
16245
|
}
|
|
16138
16246
|
|
|
@@ -16151,28 +16259,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16151
16259
|
}, {
|
|
16152
16260
|
key: "upsertPushProvider",
|
|
16153
16261
|
value: function () {
|
|
16154
|
-
var _upsertPushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16155
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16262
|
+
var _upsertPushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee95(pushProvider) {
|
|
16263
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee95$(_context95) {
|
|
16156
16264
|
while (1) {
|
|
16157
|
-
switch (
|
|
16265
|
+
switch (_context95.prev = _context95.next) {
|
|
16158
16266
|
case 0:
|
|
16159
|
-
|
|
16267
|
+
_context95.next = 2;
|
|
16160
16268
|
return this.post(this.baseURL + "/push_providers", {
|
|
16161
16269
|
push_provider: pushProvider
|
|
16162
16270
|
});
|
|
16163
16271
|
|
|
16164
16272
|
case 2:
|
|
16165
|
-
return
|
|
16273
|
+
return _context95.abrupt("return", _context95.sent);
|
|
16166
16274
|
|
|
16167
16275
|
case 3:
|
|
16168
16276
|
case "end":
|
|
16169
|
-
return
|
|
16277
|
+
return _context95.stop();
|
|
16170
16278
|
}
|
|
16171
16279
|
}
|
|
16172
|
-
},
|
|
16280
|
+
}, _callee95, this);
|
|
16173
16281
|
}));
|
|
16174
16282
|
|
|
16175
|
-
function upsertPushProvider(
|
|
16283
|
+
function upsertPushProvider(_x135) {
|
|
16176
16284
|
return _upsertPushProvider.apply(this, arguments);
|
|
16177
16285
|
}
|
|
16178
16286
|
|
|
@@ -16191,28 +16299,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16191
16299
|
}, {
|
|
16192
16300
|
key: "deletePushProvider",
|
|
16193
16301
|
value: function () {
|
|
16194
|
-
var _deletePushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16302
|
+
var _deletePushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee96(_ref10) {
|
|
16195
16303
|
var type, name;
|
|
16196
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16304
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee96$(_context96) {
|
|
16197
16305
|
while (1) {
|
|
16198
|
-
switch (
|
|
16306
|
+
switch (_context96.prev = _context96.next) {
|
|
16199
16307
|
case 0:
|
|
16200
16308
|
type = _ref10.type, name = _ref10.name;
|
|
16201
|
-
|
|
16309
|
+
_context96.next = 3;
|
|
16202
16310
|
return this.delete(this.baseURL + "/push_providers/".concat(encodeURIComponent(type), "/").concat(encodeURIComponent(name)));
|
|
16203
16311
|
|
|
16204
16312
|
case 3:
|
|
16205
|
-
return
|
|
16313
|
+
return _context96.abrupt("return", _context96.sent);
|
|
16206
16314
|
|
|
16207
16315
|
case 4:
|
|
16208
16316
|
case "end":
|
|
16209
|
-
return
|
|
16317
|
+
return _context96.stop();
|
|
16210
16318
|
}
|
|
16211
16319
|
}
|
|
16212
|
-
},
|
|
16320
|
+
}, _callee96, this);
|
|
16213
16321
|
}));
|
|
16214
16322
|
|
|
16215
|
-
function deletePushProvider(
|
|
16323
|
+
function deletePushProvider(_x136) {
|
|
16216
16324
|
return _deletePushProvider.apply(this, arguments);
|
|
16217
16325
|
}
|
|
16218
16326
|
|
|
@@ -16229,23 +16337,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16229
16337
|
}, {
|
|
16230
16338
|
key: "listPushProviders",
|
|
16231
16339
|
value: function () {
|
|
16232
|
-
var _listPushProviders = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16233
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16340
|
+
var _listPushProviders = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee97() {
|
|
16341
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee97$(_context97) {
|
|
16234
16342
|
while (1) {
|
|
16235
|
-
switch (
|
|
16343
|
+
switch (_context97.prev = _context97.next) {
|
|
16236
16344
|
case 0:
|
|
16237
|
-
|
|
16345
|
+
_context97.next = 2;
|
|
16238
16346
|
return this.get(this.baseURL + "/push_providers");
|
|
16239
16347
|
|
|
16240
16348
|
case 2:
|
|
16241
|
-
return
|
|
16349
|
+
return _context97.abrupt("return", _context97.sent);
|
|
16242
16350
|
|
|
16243
16351
|
case 3:
|
|
16244
16352
|
case "end":
|
|
16245
|
-
return
|
|
16353
|
+
return _context97.stop();
|
|
16246
16354
|
}
|
|
16247
16355
|
}
|
|
16248
|
-
},
|
|
16356
|
+
}, _callee97, this);
|
|
16249
16357
|
}));
|
|
16250
16358
|
|
|
16251
16359
|
function listPushProviders() {
|
|
@@ -16273,26 +16381,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16273
16381
|
}, {
|
|
16274
16382
|
key: "commitMessage",
|
|
16275
16383
|
value: function () {
|
|
16276
|
-
var _commitMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16277
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16384
|
+
var _commitMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee98(id) {
|
|
16385
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee98$(_context98) {
|
|
16278
16386
|
while (1) {
|
|
16279
|
-
switch (
|
|
16387
|
+
switch (_context98.prev = _context98.next) {
|
|
16280
16388
|
case 0:
|
|
16281
|
-
|
|
16389
|
+
_context98.next = 2;
|
|
16282
16390
|
return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(id), "/commit"));
|
|
16283
16391
|
|
|
16284
16392
|
case 2:
|
|
16285
|
-
return
|
|
16393
|
+
return _context98.abrupt("return", _context98.sent);
|
|
16286
16394
|
|
|
16287
16395
|
case 3:
|
|
16288
16396
|
case "end":
|
|
16289
|
-
return
|
|
16397
|
+
return _context98.stop();
|
|
16290
16398
|
}
|
|
16291
16399
|
}
|
|
16292
|
-
},
|
|
16400
|
+
}, _callee98, this);
|
|
16293
16401
|
}));
|
|
16294
16402
|
|
|
16295
|
-
function commitMessage(
|
|
16403
|
+
function commitMessage(_x137) {
|
|
16296
16404
|
return _commitMessage.apply(this, arguments);
|
|
16297
16405
|
}
|
|
16298
16406
|
|
|
@@ -16308,28 +16416,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16308
16416
|
}, {
|
|
16309
16417
|
key: "createPoll",
|
|
16310
16418
|
value: function () {
|
|
16311
|
-
var _createPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16312
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16419
|
+
var _createPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee99(poll, userId) {
|
|
16420
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee99$(_context99) {
|
|
16313
16421
|
while (1) {
|
|
16314
|
-
switch (
|
|
16422
|
+
switch (_context99.prev = _context99.next) {
|
|
16315
16423
|
case 0:
|
|
16316
|
-
|
|
16424
|
+
_context99.next = 2;
|
|
16317
16425
|
return this.post(this.baseURL + "/polls", _objectSpread(_objectSpread({}, poll), userId ? {
|
|
16318
16426
|
user_id: userId
|
|
16319
16427
|
} : {}));
|
|
16320
16428
|
|
|
16321
16429
|
case 2:
|
|
16322
|
-
return
|
|
16430
|
+
return _context99.abrupt("return", _context99.sent);
|
|
16323
16431
|
|
|
16324
16432
|
case 3:
|
|
16325
16433
|
case "end":
|
|
16326
|
-
return
|
|
16434
|
+
return _context99.stop();
|
|
16327
16435
|
}
|
|
16328
16436
|
}
|
|
16329
|
-
},
|
|
16437
|
+
}, _callee99, this);
|
|
16330
16438
|
}));
|
|
16331
16439
|
|
|
16332
|
-
function createPoll(
|
|
16440
|
+
function createPoll(_x138, _x139) {
|
|
16333
16441
|
return _createPoll.apply(this, arguments);
|
|
16334
16442
|
}
|
|
16335
16443
|
|
|
@@ -16345,28 +16453,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16345
16453
|
}, {
|
|
16346
16454
|
key: "getPoll",
|
|
16347
16455
|
value: function () {
|
|
16348
|
-
var _getPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16349
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16456
|
+
var _getPoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee100(id, userId) {
|
|
16457
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee100$(_context100) {
|
|
16350
16458
|
while (1) {
|
|
16351
|
-
switch (
|
|
16459
|
+
switch (_context100.prev = _context100.next) {
|
|
16352
16460
|
case 0:
|
|
16353
|
-
|
|
16461
|
+
_context100.next = 2;
|
|
16354
16462
|
return this.get(this.baseURL + "/polls/".concat(encodeURIComponent(id)), userId ? {
|
|
16355
16463
|
user_id: userId
|
|
16356
16464
|
} : {});
|
|
16357
16465
|
|
|
16358
16466
|
case 2:
|
|
16359
|
-
return
|
|
16467
|
+
return _context100.abrupt("return", _context100.sent);
|
|
16360
16468
|
|
|
16361
16469
|
case 3:
|
|
16362
16470
|
case "end":
|
|
16363
|
-
return
|
|
16471
|
+
return _context100.stop();
|
|
16364
16472
|
}
|
|
16365
16473
|
}
|
|
16366
|
-
},
|
|
16474
|
+
}, _callee100, this);
|
|
16367
16475
|
}));
|
|
16368
16476
|
|
|
16369
|
-
function getPoll(
|
|
16477
|
+
function getPoll(_x140, _x141) {
|
|
16370
16478
|
return _getPoll.apply(this, arguments);
|
|
16371
16479
|
}
|
|
16372
16480
|
|
|
@@ -16382,28 +16490,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16382
16490
|
}, {
|
|
16383
16491
|
key: "updatePoll",
|
|
16384
16492
|
value: function () {
|
|
16385
|
-
var _updatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16386
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16493
|
+
var _updatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee101(poll, userId) {
|
|
16494
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee101$(_context101) {
|
|
16387
16495
|
while (1) {
|
|
16388
|
-
switch (
|
|
16496
|
+
switch (_context101.prev = _context101.next) {
|
|
16389
16497
|
case 0:
|
|
16390
|
-
|
|
16498
|
+
_context101.next = 2;
|
|
16391
16499
|
return this.put(this.baseURL + "/polls", _objectSpread(_objectSpread({}, poll), userId ? {
|
|
16392
16500
|
user_id: userId
|
|
16393
16501
|
} : {}));
|
|
16394
16502
|
|
|
16395
16503
|
case 2:
|
|
16396
|
-
return
|
|
16504
|
+
return _context101.abrupt("return", _context101.sent);
|
|
16397
16505
|
|
|
16398
16506
|
case 3:
|
|
16399
16507
|
case "end":
|
|
16400
|
-
return
|
|
16508
|
+
return _context101.stop();
|
|
16401
16509
|
}
|
|
16402
16510
|
}
|
|
16403
|
-
},
|
|
16511
|
+
}, _callee101, this);
|
|
16404
16512
|
}));
|
|
16405
16513
|
|
|
16406
|
-
function updatePoll(
|
|
16514
|
+
function updatePoll(_x142, _x143) {
|
|
16407
16515
|
return _updatePoll.apply(this, arguments);
|
|
16408
16516
|
}
|
|
16409
16517
|
|
|
@@ -16421,28 +16529,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16421
16529
|
}, {
|
|
16422
16530
|
key: "partialUpdatePoll",
|
|
16423
16531
|
value: function () {
|
|
16424
|
-
var _partialUpdatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16425
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16532
|
+
var _partialUpdatePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee102(id, partialPollObject, userId) {
|
|
16533
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee102$(_context102) {
|
|
16426
16534
|
while (1) {
|
|
16427
|
-
switch (
|
|
16535
|
+
switch (_context102.prev = _context102.next) {
|
|
16428
16536
|
case 0:
|
|
16429
|
-
|
|
16537
|
+
_context102.next = 2;
|
|
16430
16538
|
return this.patch(this.baseURL + "/polls/".concat(encodeURIComponent(id)), _objectSpread(_objectSpread({}, partialPollObject), userId ? {
|
|
16431
16539
|
user_id: userId
|
|
16432
16540
|
} : {}));
|
|
16433
16541
|
|
|
16434
16542
|
case 2:
|
|
16435
|
-
return
|
|
16543
|
+
return _context102.abrupt("return", _context102.sent);
|
|
16436
16544
|
|
|
16437
16545
|
case 3:
|
|
16438
16546
|
case "end":
|
|
16439
|
-
return
|
|
16547
|
+
return _context102.stop();
|
|
16440
16548
|
}
|
|
16441
16549
|
}
|
|
16442
|
-
},
|
|
16550
|
+
}, _callee102, this);
|
|
16443
16551
|
}));
|
|
16444
16552
|
|
|
16445
|
-
function partialUpdatePoll(
|
|
16553
|
+
function partialUpdatePoll(_x144, _x145, _x146) {
|
|
16446
16554
|
return _partialUpdatePoll.apply(this, arguments);
|
|
16447
16555
|
}
|
|
16448
16556
|
|
|
@@ -16458,28 +16566,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16458
16566
|
}, {
|
|
16459
16567
|
key: "deletePoll",
|
|
16460
16568
|
value: function () {
|
|
16461
|
-
var _deletePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16462
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16569
|
+
var _deletePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee103(id, userId) {
|
|
16570
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee103$(_context103) {
|
|
16463
16571
|
while (1) {
|
|
16464
|
-
switch (
|
|
16572
|
+
switch (_context103.prev = _context103.next) {
|
|
16465
16573
|
case 0:
|
|
16466
|
-
|
|
16574
|
+
_context103.next = 2;
|
|
16467
16575
|
return this.delete(this.baseURL + "/polls/".concat(encodeURIComponent(id)), _objectSpread({}, userId ? {
|
|
16468
16576
|
user_id: userId
|
|
16469
16577
|
} : {}));
|
|
16470
16578
|
|
|
16471
16579
|
case 2:
|
|
16472
|
-
return
|
|
16580
|
+
return _context103.abrupt("return", _context103.sent);
|
|
16473
16581
|
|
|
16474
16582
|
case 3:
|
|
16475
16583
|
case "end":
|
|
16476
|
-
return
|
|
16584
|
+
return _context103.stop();
|
|
16477
16585
|
}
|
|
16478
16586
|
}
|
|
16479
|
-
},
|
|
16587
|
+
}, _callee103, this);
|
|
16480
16588
|
}));
|
|
16481
16589
|
|
|
16482
|
-
function deletePoll(
|
|
16590
|
+
function deletePoll(_x147, _x148) {
|
|
16483
16591
|
return _deletePoll.apply(this, arguments);
|
|
16484
16592
|
}
|
|
16485
16593
|
|
|
@@ -16495,12 +16603,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16495
16603
|
}, {
|
|
16496
16604
|
key: "closePoll",
|
|
16497
16605
|
value: function () {
|
|
16498
|
-
var _closePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16499
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16606
|
+
var _closePoll = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee104(id, userId) {
|
|
16607
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee104$(_context104) {
|
|
16500
16608
|
while (1) {
|
|
16501
|
-
switch (
|
|
16609
|
+
switch (_context104.prev = _context104.next) {
|
|
16502
16610
|
case 0:
|
|
16503
|
-
return
|
|
16611
|
+
return _context104.abrupt("return", this.partialUpdatePoll(id, {
|
|
16504
16612
|
set: {
|
|
16505
16613
|
is_closed: true
|
|
16506
16614
|
}
|
|
@@ -16508,13 +16616,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16508
16616
|
|
|
16509
16617
|
case 1:
|
|
16510
16618
|
case "end":
|
|
16511
|
-
return
|
|
16619
|
+
return _context104.stop();
|
|
16512
16620
|
}
|
|
16513
16621
|
}
|
|
16514
|
-
},
|
|
16622
|
+
}, _callee104, this);
|
|
16515
16623
|
}));
|
|
16516
16624
|
|
|
16517
|
-
function closePoll(
|
|
16625
|
+
function closePoll(_x149, _x150) {
|
|
16518
16626
|
return _closePoll.apply(this, arguments);
|
|
16519
16627
|
}
|
|
16520
16628
|
|
|
@@ -16531,28 +16639,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16531
16639
|
}, {
|
|
16532
16640
|
key: "createPollOption",
|
|
16533
16641
|
value: function () {
|
|
16534
|
-
var _createPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16535
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16642
|
+
var _createPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee105(pollId, option, userId) {
|
|
16643
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee105$(_context105) {
|
|
16536
16644
|
while (1) {
|
|
16537
|
-
switch (
|
|
16645
|
+
switch (_context105.prev = _context105.next) {
|
|
16538
16646
|
case 0:
|
|
16539
|
-
|
|
16647
|
+
_context105.next = 2;
|
|
16540
16648
|
return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options"), _objectSpread(_objectSpread({}, option), userId ? {
|
|
16541
16649
|
user_id: userId
|
|
16542
16650
|
} : {}));
|
|
16543
16651
|
|
|
16544
16652
|
case 2:
|
|
16545
|
-
return
|
|
16653
|
+
return _context105.abrupt("return", _context105.sent);
|
|
16546
16654
|
|
|
16547
16655
|
case 3:
|
|
16548
16656
|
case "end":
|
|
16549
|
-
return
|
|
16657
|
+
return _context105.stop();
|
|
16550
16658
|
}
|
|
16551
16659
|
}
|
|
16552
|
-
},
|
|
16660
|
+
}, _callee105, this);
|
|
16553
16661
|
}));
|
|
16554
16662
|
|
|
16555
|
-
function createPollOption(
|
|
16663
|
+
function createPollOption(_x151, _x152, _x153) {
|
|
16556
16664
|
return _createPollOption.apply(this, arguments);
|
|
16557
16665
|
}
|
|
16558
16666
|
|
|
@@ -16569,28 +16677,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16569
16677
|
}, {
|
|
16570
16678
|
key: "getPollOption",
|
|
16571
16679
|
value: function () {
|
|
16572
|
-
var _getPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16573
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16680
|
+
var _getPollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee106(pollId, optionId, userId) {
|
|
16681
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee106$(_context106) {
|
|
16574
16682
|
while (1) {
|
|
16575
|
-
switch (
|
|
16683
|
+
switch (_context106.prev = _context106.next) {
|
|
16576
16684
|
case 0:
|
|
16577
|
-
|
|
16685
|
+
_context106.next = 2;
|
|
16578
16686
|
return this.get(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options/").concat(encodeURIComponent(optionId)), userId ? {
|
|
16579
16687
|
user_id: userId
|
|
16580
16688
|
} : {});
|
|
16581
16689
|
|
|
16582
16690
|
case 2:
|
|
16583
|
-
return
|
|
16691
|
+
return _context106.abrupt("return", _context106.sent);
|
|
16584
16692
|
|
|
16585
16693
|
case 3:
|
|
16586
16694
|
case "end":
|
|
16587
|
-
return
|
|
16695
|
+
return _context106.stop();
|
|
16588
16696
|
}
|
|
16589
16697
|
}
|
|
16590
|
-
},
|
|
16698
|
+
}, _callee106, this);
|
|
16591
16699
|
}));
|
|
16592
16700
|
|
|
16593
|
-
function getPollOption(
|
|
16701
|
+
function getPollOption(_x154, _x155, _x156) {
|
|
16594
16702
|
return _getPollOption.apply(this, arguments);
|
|
16595
16703
|
}
|
|
16596
16704
|
|
|
@@ -16607,28 +16715,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16607
16715
|
}, {
|
|
16608
16716
|
key: "updatePollOption",
|
|
16609
16717
|
value: function () {
|
|
16610
|
-
var _updatePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16611
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16718
|
+
var _updatePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee107(pollId, option, userId) {
|
|
16719
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee107$(_context107) {
|
|
16612
16720
|
while (1) {
|
|
16613
|
-
switch (
|
|
16721
|
+
switch (_context107.prev = _context107.next) {
|
|
16614
16722
|
case 0:
|
|
16615
|
-
|
|
16723
|
+
_context107.next = 2;
|
|
16616
16724
|
return this.put(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options"), _objectSpread(_objectSpread({}, option), userId ? {
|
|
16617
16725
|
user_id: userId
|
|
16618
16726
|
} : {}));
|
|
16619
16727
|
|
|
16620
16728
|
case 2:
|
|
16621
|
-
return
|
|
16729
|
+
return _context107.abrupt("return", _context107.sent);
|
|
16622
16730
|
|
|
16623
16731
|
case 3:
|
|
16624
16732
|
case "end":
|
|
16625
|
-
return
|
|
16733
|
+
return _context107.stop();
|
|
16626
16734
|
}
|
|
16627
16735
|
}
|
|
16628
|
-
},
|
|
16736
|
+
}, _callee107, this);
|
|
16629
16737
|
}));
|
|
16630
16738
|
|
|
16631
|
-
function updatePollOption(
|
|
16739
|
+
function updatePollOption(_x157, _x158, _x159) {
|
|
16632
16740
|
return _updatePollOption.apply(this, arguments);
|
|
16633
16741
|
}
|
|
16634
16742
|
|
|
@@ -16645,28 +16753,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16645
16753
|
}, {
|
|
16646
16754
|
key: "deletePollOption",
|
|
16647
16755
|
value: function () {
|
|
16648
|
-
var _deletePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16649
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16756
|
+
var _deletePollOption = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee108(pollId, optionId, userId) {
|
|
16757
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee108$(_context108) {
|
|
16650
16758
|
while (1) {
|
|
16651
|
-
switch (
|
|
16759
|
+
switch (_context108.prev = _context108.next) {
|
|
16652
16760
|
case 0:
|
|
16653
|
-
|
|
16761
|
+
_context108.next = 2;
|
|
16654
16762
|
return this.delete(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/options/").concat(encodeURIComponent(optionId)), userId ? {
|
|
16655
16763
|
user_id: userId
|
|
16656
16764
|
} : {});
|
|
16657
16765
|
|
|
16658
16766
|
case 2:
|
|
16659
|
-
return
|
|
16767
|
+
return _context108.abrupt("return", _context108.sent);
|
|
16660
16768
|
|
|
16661
16769
|
case 3:
|
|
16662
16770
|
case "end":
|
|
16663
|
-
return
|
|
16771
|
+
return _context108.stop();
|
|
16664
16772
|
}
|
|
16665
16773
|
}
|
|
16666
|
-
},
|
|
16774
|
+
}, _callee108, this);
|
|
16667
16775
|
}));
|
|
16668
16776
|
|
|
16669
|
-
function deletePollOption(
|
|
16777
|
+
function deletePollOption(_x160, _x161, _x162) {
|
|
16670
16778
|
return _deletePollOption.apply(this, arguments);
|
|
16671
16779
|
}
|
|
16672
16780
|
|
|
@@ -16684,12 +16792,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16684
16792
|
}, {
|
|
16685
16793
|
key: "castPollVote",
|
|
16686
16794
|
value: function () {
|
|
16687
|
-
var _castPollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16688
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16795
|
+
var _castPollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee109(messageId, pollId, vote, userId) {
|
|
16796
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee109$(_context109) {
|
|
16689
16797
|
while (1) {
|
|
16690
|
-
switch (
|
|
16798
|
+
switch (_context109.prev = _context109.next) {
|
|
16691
16799
|
case 0:
|
|
16692
|
-
|
|
16800
|
+
_context109.next = 2;
|
|
16693
16801
|
return this.post(this.baseURL + "/messages/".concat(encodeURIComponent(messageId), "/polls/").concat(encodeURIComponent(pollId), "/vote"), _objectSpread({
|
|
16694
16802
|
vote: vote
|
|
16695
16803
|
}, userId ? {
|
|
@@ -16697,17 +16805,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16697
16805
|
} : {}));
|
|
16698
16806
|
|
|
16699
16807
|
case 2:
|
|
16700
|
-
return
|
|
16808
|
+
return _context109.abrupt("return", _context109.sent);
|
|
16701
16809
|
|
|
16702
16810
|
case 3:
|
|
16703
16811
|
case "end":
|
|
16704
|
-
return
|
|
16812
|
+
return _context109.stop();
|
|
16705
16813
|
}
|
|
16706
16814
|
}
|
|
16707
|
-
},
|
|
16815
|
+
}, _callee109, this);
|
|
16708
16816
|
}));
|
|
16709
16817
|
|
|
16710
|
-
function castPollVote(
|
|
16818
|
+
function castPollVote(_x163, _x164, _x165, _x166) {
|
|
16711
16819
|
return _castPollVote.apply(this, arguments);
|
|
16712
16820
|
}
|
|
16713
16821
|
|
|
@@ -16724,24 +16832,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16724
16832
|
}, {
|
|
16725
16833
|
key: "addPollAnswer",
|
|
16726
16834
|
value: function () {
|
|
16727
|
-
var _addPollAnswer = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16728
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16835
|
+
var _addPollAnswer = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee110(messageId, pollId, answerText, userId) {
|
|
16836
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee110$(_context110) {
|
|
16729
16837
|
while (1) {
|
|
16730
|
-
switch (
|
|
16838
|
+
switch (_context110.prev = _context110.next) {
|
|
16731
16839
|
case 0:
|
|
16732
|
-
return
|
|
16840
|
+
return _context110.abrupt("return", this.castPollVote(messageId, pollId, {
|
|
16733
16841
|
answer_text: answerText
|
|
16734
16842
|
}, userId));
|
|
16735
16843
|
|
|
16736
16844
|
case 1:
|
|
16737
16845
|
case "end":
|
|
16738
|
-
return
|
|
16846
|
+
return _context110.stop();
|
|
16739
16847
|
}
|
|
16740
16848
|
}
|
|
16741
|
-
},
|
|
16849
|
+
}, _callee110, this);
|
|
16742
16850
|
}));
|
|
16743
16851
|
|
|
16744
|
-
function addPollAnswer(
|
|
16852
|
+
function addPollAnswer(_x167, _x168, _x169, _x170) {
|
|
16745
16853
|
return _addPollAnswer.apply(this, arguments);
|
|
16746
16854
|
}
|
|
16747
16855
|
|
|
@@ -16750,28 +16858,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16750
16858
|
}, {
|
|
16751
16859
|
key: "removePollVote",
|
|
16752
16860
|
value: function () {
|
|
16753
|
-
var _removePollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16754
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16861
|
+
var _removePollVote = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee111(messageId, pollId, voteId, userId) {
|
|
16862
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee111$(_context111) {
|
|
16755
16863
|
while (1) {
|
|
16756
|
-
switch (
|
|
16864
|
+
switch (_context111.prev = _context111.next) {
|
|
16757
16865
|
case 0:
|
|
16758
|
-
|
|
16866
|
+
_context111.next = 2;
|
|
16759
16867
|
return this.delete(this.baseURL + "/messages/".concat(encodeURIComponent(messageId), "/polls/").concat(encodeURIComponent(pollId), "/vote/").concat(encodeURIComponent(voteId)), _objectSpread({}, userId ? {
|
|
16760
16868
|
user_id: userId
|
|
16761
16869
|
} : {}));
|
|
16762
16870
|
|
|
16763
16871
|
case 2:
|
|
16764
|
-
return
|
|
16872
|
+
return _context111.abrupt("return", _context111.sent);
|
|
16765
16873
|
|
|
16766
16874
|
case 3:
|
|
16767
16875
|
case "end":
|
|
16768
|
-
return
|
|
16876
|
+
return _context111.stop();
|
|
16769
16877
|
}
|
|
16770
16878
|
}
|
|
16771
|
-
},
|
|
16879
|
+
}, _callee111, this);
|
|
16772
16880
|
}));
|
|
16773
16881
|
|
|
16774
|
-
function removePollVote(
|
|
16882
|
+
function removePollVote(_x171, _x172, _x173, _x174) {
|
|
16775
16883
|
return _removePollVote.apply(this, arguments);
|
|
16776
16884
|
}
|
|
16777
16885
|
|
|
@@ -16789,37 +16897,37 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16789
16897
|
}, {
|
|
16790
16898
|
key: "queryPolls",
|
|
16791
16899
|
value: function () {
|
|
16792
|
-
var _queryPolls = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16900
|
+
var _queryPolls = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee112() {
|
|
16793
16901
|
var filter,
|
|
16794
16902
|
sort,
|
|
16795
16903
|
options,
|
|
16796
16904
|
userId,
|
|
16797
16905
|
q,
|
|
16798
|
-
|
|
16799
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16906
|
+
_args112 = arguments;
|
|
16907
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee112$(_context112) {
|
|
16800
16908
|
while (1) {
|
|
16801
|
-
switch (
|
|
16909
|
+
switch (_context112.prev = _context112.next) {
|
|
16802
16910
|
case 0:
|
|
16803
|
-
filter =
|
|
16804
|
-
sort =
|
|
16805
|
-
options =
|
|
16806
|
-
userId =
|
|
16911
|
+
filter = _args112.length > 0 && _args112[0] !== undefined ? _args112[0] : {};
|
|
16912
|
+
sort = _args112.length > 1 && _args112[1] !== undefined ? _args112[1] : [];
|
|
16913
|
+
options = _args112.length > 2 && _args112[2] !== undefined ? _args112[2] : {};
|
|
16914
|
+
userId = _args112.length > 3 ? _args112[3] : undefined;
|
|
16807
16915
|
q = userId ? "?user_id=".concat(userId) : '';
|
|
16808
|
-
|
|
16916
|
+
_context112.next = 7;
|
|
16809
16917
|
return this.post(this.baseURL + "/polls/query".concat(q), _objectSpread({
|
|
16810
16918
|
filter: filter,
|
|
16811
16919
|
sort: normalizeQuerySort(sort)
|
|
16812
16920
|
}, options));
|
|
16813
16921
|
|
|
16814
16922
|
case 7:
|
|
16815
|
-
return
|
|
16923
|
+
return _context112.abrupt("return", _context112.sent);
|
|
16816
16924
|
|
|
16817
16925
|
case 8:
|
|
16818
16926
|
case "end":
|
|
16819
|
-
return
|
|
16927
|
+
return _context112.stop();
|
|
16820
16928
|
}
|
|
16821
16929
|
}
|
|
16822
|
-
},
|
|
16930
|
+
}, _callee112, this);
|
|
16823
16931
|
}));
|
|
16824
16932
|
|
|
16825
16933
|
function queryPolls() {
|
|
@@ -16841,40 +16949,40 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16841
16949
|
}, {
|
|
16842
16950
|
key: "queryPollVotes",
|
|
16843
16951
|
value: function () {
|
|
16844
|
-
var _queryPollVotes = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
16952
|
+
var _queryPollVotes = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee113(pollId) {
|
|
16845
16953
|
var filter,
|
|
16846
16954
|
sort,
|
|
16847
16955
|
options,
|
|
16848
16956
|
userId,
|
|
16849
16957
|
q,
|
|
16850
|
-
|
|
16851
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
16958
|
+
_args113 = arguments;
|
|
16959
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee113$(_context113) {
|
|
16852
16960
|
while (1) {
|
|
16853
|
-
switch (
|
|
16961
|
+
switch (_context113.prev = _context113.next) {
|
|
16854
16962
|
case 0:
|
|
16855
|
-
filter =
|
|
16856
|
-
sort =
|
|
16857
|
-
options =
|
|
16858
|
-
userId =
|
|
16963
|
+
filter = _args113.length > 1 && _args113[1] !== undefined ? _args113[1] : {};
|
|
16964
|
+
sort = _args113.length > 2 && _args113[2] !== undefined ? _args113[2] : [];
|
|
16965
|
+
options = _args113.length > 3 && _args113[3] !== undefined ? _args113[3] : {};
|
|
16966
|
+
userId = _args113.length > 4 ? _args113[4] : undefined;
|
|
16859
16967
|
q = userId ? "?user_id=".concat(userId) : '';
|
|
16860
|
-
|
|
16968
|
+
_context113.next = 7;
|
|
16861
16969
|
return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/votes").concat(q), _objectSpread({
|
|
16862
16970
|
filter: filter,
|
|
16863
16971
|
sort: normalizeQuerySort(sort)
|
|
16864
16972
|
}, options));
|
|
16865
16973
|
|
|
16866
16974
|
case 7:
|
|
16867
|
-
return
|
|
16975
|
+
return _context113.abrupt("return", _context113.sent);
|
|
16868
16976
|
|
|
16869
16977
|
case 8:
|
|
16870
16978
|
case "end":
|
|
16871
|
-
return
|
|
16979
|
+
return _context113.stop();
|
|
16872
16980
|
}
|
|
16873
16981
|
}
|
|
16874
|
-
},
|
|
16982
|
+
}, _callee113, this);
|
|
16875
16983
|
}));
|
|
16876
16984
|
|
|
16877
|
-
function queryPollVotes(
|
|
16985
|
+
function queryPollVotes(_x175) {
|
|
16878
16986
|
return _queryPollVotes.apply(this, arguments);
|
|
16879
16987
|
}
|
|
16880
16988
|
|
|
@@ -16893,23 +17001,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16893
17001
|
}, {
|
|
16894
17002
|
key: "queryPollAnswers",
|
|
16895
17003
|
value: function () {
|
|
16896
|
-
var _queryPollAnswers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
17004
|
+
var _queryPollAnswers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee114(pollId) {
|
|
16897
17005
|
var filter,
|
|
16898
17006
|
sort,
|
|
16899
17007
|
options,
|
|
16900
17008
|
userId,
|
|
16901
17009
|
q,
|
|
16902
|
-
|
|
16903
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
17010
|
+
_args114 = arguments;
|
|
17011
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee114$(_context114) {
|
|
16904
17012
|
while (1) {
|
|
16905
|
-
switch (
|
|
17013
|
+
switch (_context114.prev = _context114.next) {
|
|
16906
17014
|
case 0:
|
|
16907
|
-
filter =
|
|
16908
|
-
sort =
|
|
16909
|
-
options =
|
|
16910
|
-
userId =
|
|
17015
|
+
filter = _args114.length > 1 && _args114[1] !== undefined ? _args114[1] : {};
|
|
17016
|
+
sort = _args114.length > 2 && _args114[2] !== undefined ? _args114[2] : [];
|
|
17017
|
+
options = _args114.length > 3 && _args114[3] !== undefined ? _args114[3] : {};
|
|
17018
|
+
userId = _args114.length > 4 ? _args114[4] : undefined;
|
|
16911
17019
|
q = userId ? "?user_id=".concat(userId) : '';
|
|
16912
|
-
|
|
17020
|
+
_context114.next = 7;
|
|
16913
17021
|
return this.post(this.baseURL + "/polls/".concat(encodeURIComponent(pollId), "/votes").concat(q), _objectSpread({
|
|
16914
17022
|
filter: _objectSpread(_objectSpread({}, filter), {}, {
|
|
16915
17023
|
is_answer: true
|
|
@@ -16918,17 +17026,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16918
17026
|
}, options));
|
|
16919
17027
|
|
|
16920
17028
|
case 7:
|
|
16921
|
-
return
|
|
17029
|
+
return _context114.abrupt("return", _context114.sent);
|
|
16922
17030
|
|
|
16923
17031
|
case 8:
|
|
16924
17032
|
case "end":
|
|
16925
|
-
return
|
|
17033
|
+
return _context114.stop();
|
|
16926
17034
|
}
|
|
16927
17035
|
}
|
|
16928
|
-
},
|
|
17036
|
+
}, _callee114, this);
|
|
16929
17037
|
}));
|
|
16930
17038
|
|
|
16931
|
-
function queryPollAnswers(
|
|
17039
|
+
function queryPollAnswers(_x176) {
|
|
16932
17040
|
return _queryPollAnswers.apply(this, arguments);
|
|
16933
17041
|
}
|
|
16934
17042
|
|
|
@@ -16945,33 +17053,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16945
17053
|
}, {
|
|
16946
17054
|
key: "queryMessageHistory",
|
|
16947
17055
|
value: function () {
|
|
16948
|
-
var _queryMessageHistory = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
17056
|
+
var _queryMessageHistory = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee115() {
|
|
16949
17057
|
var filter,
|
|
16950
17058
|
sort,
|
|
16951
17059
|
options,
|
|
16952
|
-
|
|
16953
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
17060
|
+
_args115 = arguments;
|
|
17061
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee115$(_context115) {
|
|
16954
17062
|
while (1) {
|
|
16955
|
-
switch (
|
|
17063
|
+
switch (_context115.prev = _context115.next) {
|
|
16956
17064
|
case 0:
|
|
16957
|
-
filter =
|
|
16958
|
-
sort =
|
|
16959
|
-
options =
|
|
16960
|
-
|
|
17065
|
+
filter = _args115.length > 0 && _args115[0] !== undefined ? _args115[0] : {};
|
|
17066
|
+
sort = _args115.length > 1 && _args115[1] !== undefined ? _args115[1] : [];
|
|
17067
|
+
options = _args115.length > 2 && _args115[2] !== undefined ? _args115[2] : {};
|
|
17068
|
+
_context115.next = 5;
|
|
16961
17069
|
return this.post(this.baseURL + '/messages/history', _objectSpread({
|
|
16962
17070
|
filter: filter,
|
|
16963
17071
|
sort: normalizeQuerySort(sort)
|
|
16964
17072
|
}, options));
|
|
16965
17073
|
|
|
16966
17074
|
case 5:
|
|
16967
|
-
return
|
|
17075
|
+
return _context115.abrupt("return", _context115.sent);
|
|
16968
17076
|
|
|
16969
17077
|
case 6:
|
|
16970
17078
|
case "end":
|
|
16971
|
-
return
|
|
17079
|
+
return _context115.stop();
|
|
16972
17080
|
}
|
|
16973
17081
|
}
|
|
16974
|
-
},
|
|
17082
|
+
}, _callee115, this);
|
|
16975
17083
|
}));
|
|
16976
17084
|
|
|
16977
17085
|
function queryMessageHistory() {
|
|
@@ -16992,32 +17100,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
16992
17100
|
}, {
|
|
16993
17101
|
key: "updateFlags",
|
|
16994
17102
|
value: function () {
|
|
16995
|
-
var _updateFlags = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
17103
|
+
var _updateFlags = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee116(message_ids, reviewed_by) {
|
|
16996
17104
|
var options,
|
|
16997
|
-
|
|
16998
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
17105
|
+
_args116 = arguments;
|
|
17106
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee116$(_context116) {
|
|
16999
17107
|
while (1) {
|
|
17000
|
-
switch (
|
|
17108
|
+
switch (_context116.prev = _context116.next) {
|
|
17001
17109
|
case 0:
|
|
17002
|
-
options =
|
|
17003
|
-
|
|
17110
|
+
options = _args116.length > 2 && _args116[2] !== undefined ? _args116[2] : {};
|
|
17111
|
+
_context116.next = 3;
|
|
17004
17112
|
return this.post(this.baseURL + '/automod/v1/moderation/update_flags', _objectSpread({
|
|
17005
17113
|
message_ids: message_ids,
|
|
17006
17114
|
reviewed_by: reviewed_by
|
|
17007
17115
|
}, options));
|
|
17008
17116
|
|
|
17009
17117
|
case 3:
|
|
17010
|
-
return
|
|
17118
|
+
return _context116.abrupt("return", _context116.sent);
|
|
17011
17119
|
|
|
17012
17120
|
case 4:
|
|
17013
17121
|
case "end":
|
|
17014
|
-
return
|
|
17122
|
+
return _context116.stop();
|
|
17015
17123
|
}
|
|
17016
17124
|
}
|
|
17017
|
-
},
|
|
17125
|
+
}, _callee116, this);
|
|
17018
17126
|
}));
|
|
17019
17127
|
|
|
17020
|
-
function updateFlags(
|
|
17128
|
+
function updateFlags(_x177, _x178) {
|
|
17021
17129
|
return _updateFlags.apply(this, arguments);
|
|
17022
17130
|
}
|
|
17023
17131
|
|
|
@@ -17083,6 +17191,7 @@ var EVENT_MAP = {
|
|
|
17083
17191
|
'reaction.deleted': true,
|
|
17084
17192
|
'reaction.new': true,
|
|
17085
17193
|
'reaction.updated': true,
|
|
17194
|
+
'thread.updated': true,
|
|
17086
17195
|
'typing.start': true,
|
|
17087
17196
|
'typing.stop': true,
|
|
17088
17197
|
'user.banned': true,
|