stream-chat 8.12.0 → 8.12.2
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 +579 -535
- 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 +579 -535
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +579 -535
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +579 -535
- package/dist/index.js.map +1 -1
- package/dist/types/client.d.ts +4 -9
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/types.d.ts +13 -0
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils.d.ts +2 -0
- package/dist/types/utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/channel.ts +2 -2
- package/src/client.ts +10 -2
- package/src/types.ts +14 -0
- package/src/utils.ts +14 -0
package/dist/browser.es.js
CHANGED
|
@@ -1311,6 +1311,19 @@ function removeConnectionEventListeners(cb) {
|
|
|
1311
1311
|
window.removeEventListener('online', cb);
|
|
1312
1312
|
}
|
|
1313
1313
|
}
|
|
1314
|
+
var axiosParamsSerializer = function axiosParamsSerializer(params) {
|
|
1315
|
+
var newParams = [];
|
|
1316
|
+
|
|
1317
|
+
for (var k in params) {
|
|
1318
|
+
if (Array.isArray(params[k]) || _typeof(params[k]) === 'object') {
|
|
1319
|
+
newParams.push("".concat(k, "=").concat(encodeURIComponent(JSON.stringify(params[k]))));
|
|
1320
|
+
} else {
|
|
1321
|
+
newParams.push("".concat(k, "=").concat(encodeURIComponent(params[k])));
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
return newParams.join('&');
|
|
1326
|
+
};
|
|
1314
1327
|
|
|
1315
1328
|
function _createForOfIteratorHelper$2(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$2(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
1316
1329
|
|
|
@@ -1638,12 +1651,12 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1638
1651
|
case 0:
|
|
1639
1652
|
options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
|
|
1640
1653
|
|
|
1641
|
-
if (!(options.offset &&
|
|
1654
|
+
if (!(options.offset && options.next)) {
|
|
1642
1655
|
_context4.next = 3;
|
|
1643
1656
|
break;
|
|
1644
1657
|
}
|
|
1645
1658
|
|
|
1646
|
-
throw Error("Cannot specify offset with
|
|
1659
|
+
throw Error("Cannot specify offset with next");
|
|
1647
1660
|
|
|
1648
1661
|
case 3:
|
|
1649
1662
|
// Return a list of channels
|
|
@@ -6913,6 +6926,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6913
6926
|
this.insightMetrics = new InsightMetrics();
|
|
6914
6927
|
this.defaultWSTimeoutWithFallback = 6000;
|
|
6915
6928
|
this.defaultWSTimeout = 15000;
|
|
6929
|
+
this.axiosInstance.defaults.paramsSerializer = axiosParamsSerializer;
|
|
6916
6930
|
/**
|
|
6917
6931
|
* logger function should accept 3 parameters:
|
|
6918
6932
|
* @param logLevel string
|
|
@@ -8183,12 +8197,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8183
8197
|
case 0:
|
|
8184
8198
|
options = _args20.length > 2 && _args20[2] !== undefined ? _args20[2] : {};
|
|
8185
8199
|
|
|
8186
|
-
if (!(options.offset &&
|
|
8200
|
+
if (!(options.offset && options.next)) {
|
|
8187
8201
|
_context20.next = 3;
|
|
8188
8202
|
break;
|
|
8189
8203
|
}
|
|
8190
8204
|
|
|
8191
|
-
throw Error("Cannot specify offset with
|
|
8205
|
+
throw Error("Cannot specify offset with next");
|
|
8192
8206
|
|
|
8193
8207
|
case 3:
|
|
8194
8208
|
payload = _objectSpread(_objectSpread({
|
|
@@ -8349,6 +8363,36 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8349
8363
|
|
|
8350
8364
|
return getDevices;
|
|
8351
8365
|
}()
|
|
8366
|
+
}, {
|
|
8367
|
+
key: "getUnreadCount",
|
|
8368
|
+
value: function () {
|
|
8369
|
+
var _getUnreadCount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23(userID) {
|
|
8370
|
+
return _regeneratorRuntime.wrap(function _callee23$(_context23) {
|
|
8371
|
+
while (1) {
|
|
8372
|
+
switch (_context23.prev = _context23.next) {
|
|
8373
|
+
case 0:
|
|
8374
|
+
_context23.next = 2;
|
|
8375
|
+
return this.get(this.baseURL + '/unread', userID ? {
|
|
8376
|
+
user_id: userID
|
|
8377
|
+
} : {});
|
|
8378
|
+
|
|
8379
|
+
case 2:
|
|
8380
|
+
return _context23.abrupt("return", _context23.sent);
|
|
8381
|
+
|
|
8382
|
+
case 3:
|
|
8383
|
+
case "end":
|
|
8384
|
+
return _context23.stop();
|
|
8385
|
+
}
|
|
8386
|
+
}
|
|
8387
|
+
}, _callee23, this);
|
|
8388
|
+
}));
|
|
8389
|
+
|
|
8390
|
+
function getUnreadCount(_x25) {
|
|
8391
|
+
return _getUnreadCount.apply(this, arguments);
|
|
8392
|
+
}
|
|
8393
|
+
|
|
8394
|
+
return getUnreadCount;
|
|
8395
|
+
}()
|
|
8352
8396
|
/**
|
|
8353
8397
|
* removeDevice - Removes the device with the given id. Clientside users can only delete their own devices
|
|
8354
8398
|
*
|
|
@@ -8360,12 +8404,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8360
8404
|
}, {
|
|
8361
8405
|
key: "removeDevice",
|
|
8362
8406
|
value: function () {
|
|
8363
|
-
var _removeDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8364
|
-
return _regeneratorRuntime.wrap(function
|
|
8407
|
+
var _removeDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24(id, userID) {
|
|
8408
|
+
return _regeneratorRuntime.wrap(function _callee24$(_context24) {
|
|
8365
8409
|
while (1) {
|
|
8366
|
-
switch (
|
|
8410
|
+
switch (_context24.prev = _context24.next) {
|
|
8367
8411
|
case 0:
|
|
8368
|
-
|
|
8412
|
+
_context24.next = 2;
|
|
8369
8413
|
return this.delete(this.baseURL + '/devices', _objectSpread({
|
|
8370
8414
|
id: id
|
|
8371
8415
|
}, userID ? {
|
|
@@ -8373,17 +8417,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8373
8417
|
} : {}));
|
|
8374
8418
|
|
|
8375
8419
|
case 2:
|
|
8376
|
-
return
|
|
8420
|
+
return _context24.abrupt("return", _context24.sent);
|
|
8377
8421
|
|
|
8378
8422
|
case 3:
|
|
8379
8423
|
case "end":
|
|
8380
|
-
return
|
|
8424
|
+
return _context24.stop();
|
|
8381
8425
|
}
|
|
8382
8426
|
}
|
|
8383
|
-
},
|
|
8427
|
+
}, _callee24, this);
|
|
8384
8428
|
}));
|
|
8385
8429
|
|
|
8386
|
-
function removeDevice(
|
|
8430
|
+
function removeDevice(_x26, _x27) {
|
|
8387
8431
|
return _removeDevice.apply(this, arguments);
|
|
8388
8432
|
}
|
|
8389
8433
|
|
|
@@ -8400,15 +8444,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8400
8444
|
}, {
|
|
8401
8445
|
key: "getRateLimits",
|
|
8402
8446
|
value: function () {
|
|
8403
|
-
var _getRateLimits = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8447
|
+
var _getRateLimits = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(params) {
|
|
8404
8448
|
var _ref7, serverSide, web, android, ios, endpoints;
|
|
8405
8449
|
|
|
8406
|
-
return _regeneratorRuntime.wrap(function
|
|
8450
|
+
return _regeneratorRuntime.wrap(function _callee25$(_context25) {
|
|
8407
8451
|
while (1) {
|
|
8408
|
-
switch (
|
|
8452
|
+
switch (_context25.prev = _context25.next) {
|
|
8409
8453
|
case 0:
|
|
8410
8454
|
_ref7 = params || {}, serverSide = _ref7.serverSide, web = _ref7.web, android = _ref7.android, ios = _ref7.ios, endpoints = _ref7.endpoints;
|
|
8411
|
-
return
|
|
8455
|
+
return _context25.abrupt("return", this.get(this.baseURL + '/rate_limits', {
|
|
8412
8456
|
server_side: serverSide,
|
|
8413
8457
|
web: web,
|
|
8414
8458
|
android: android,
|
|
@@ -8418,13 +8462,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8418
8462
|
|
|
8419
8463
|
case 2:
|
|
8420
8464
|
case "end":
|
|
8421
|
-
return
|
|
8465
|
+
return _context25.stop();
|
|
8422
8466
|
}
|
|
8423
8467
|
}
|
|
8424
|
-
},
|
|
8468
|
+
}, _callee25, this);
|
|
8425
8469
|
}));
|
|
8426
8470
|
|
|
8427
|
-
function getRateLimits(
|
|
8471
|
+
function getRateLimits(_x28) {
|
|
8428
8472
|
return _getRateLimits.apply(this, arguments);
|
|
8429
8473
|
}
|
|
8430
8474
|
|
|
@@ -8515,26 +8559,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8515
8559
|
* @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>} list of updated users
|
|
8516
8560
|
*/
|
|
8517
8561
|
function () {
|
|
8518
|
-
var _partialUpdateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8519
|
-
return _regeneratorRuntime.wrap(function
|
|
8562
|
+
var _partialUpdateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26(partialUserObject) {
|
|
8563
|
+
return _regeneratorRuntime.wrap(function _callee26$(_context26) {
|
|
8520
8564
|
while (1) {
|
|
8521
|
-
switch (
|
|
8565
|
+
switch (_context26.prev = _context26.next) {
|
|
8522
8566
|
case 0:
|
|
8523
|
-
|
|
8567
|
+
_context26.next = 2;
|
|
8524
8568
|
return this.partialUpdateUsers([partialUserObject]);
|
|
8525
8569
|
|
|
8526
8570
|
case 2:
|
|
8527
|
-
return
|
|
8571
|
+
return _context26.abrupt("return", _context26.sent);
|
|
8528
8572
|
|
|
8529
8573
|
case 3:
|
|
8530
8574
|
case "end":
|
|
8531
|
-
return
|
|
8575
|
+
return _context26.stop();
|
|
8532
8576
|
}
|
|
8533
8577
|
}
|
|
8534
|
-
},
|
|
8578
|
+
}, _callee26, this);
|
|
8535
8579
|
}));
|
|
8536
8580
|
|
|
8537
|
-
function partialUpdateUser(
|
|
8581
|
+
function partialUpdateUser(_x29) {
|
|
8538
8582
|
return _partialUpdateUser.apply(this, arguments);
|
|
8539
8583
|
}
|
|
8540
8584
|
|
|
@@ -8551,29 +8595,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8551
8595
|
}, {
|
|
8552
8596
|
key: "upsertUsers",
|
|
8553
8597
|
value: function () {
|
|
8554
|
-
var _upsertUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8598
|
+
var _upsertUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(users) {
|
|
8555
8599
|
var userMap, _iterator4, _step4, userObject;
|
|
8556
8600
|
|
|
8557
|
-
return _regeneratorRuntime.wrap(function
|
|
8601
|
+
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
|
8558
8602
|
while (1) {
|
|
8559
|
-
switch (
|
|
8603
|
+
switch (_context27.prev = _context27.next) {
|
|
8560
8604
|
case 0:
|
|
8561
8605
|
userMap = {};
|
|
8562
8606
|
_iterator4 = _createForOfIteratorHelper(users);
|
|
8563
|
-
|
|
8607
|
+
_context27.prev = 2;
|
|
8564
8608
|
|
|
8565
8609
|
_iterator4.s();
|
|
8566
8610
|
|
|
8567
8611
|
case 4:
|
|
8568
8612
|
if ((_step4 = _iterator4.n()).done) {
|
|
8569
|
-
|
|
8613
|
+
_context27.next = 11;
|
|
8570
8614
|
break;
|
|
8571
8615
|
}
|
|
8572
8616
|
|
|
8573
8617
|
userObject = _step4.value;
|
|
8574
8618
|
|
|
8575
8619
|
if (userObject.id) {
|
|
8576
|
-
|
|
8620
|
+
_context27.next = 8;
|
|
8577
8621
|
break;
|
|
8578
8622
|
}
|
|
8579
8623
|
|
|
@@ -8583,44 +8627,44 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8583
8627
|
userMap[userObject.id] = userObject;
|
|
8584
8628
|
|
|
8585
8629
|
case 9:
|
|
8586
|
-
|
|
8630
|
+
_context27.next = 4;
|
|
8587
8631
|
break;
|
|
8588
8632
|
|
|
8589
8633
|
case 11:
|
|
8590
|
-
|
|
8634
|
+
_context27.next = 16;
|
|
8591
8635
|
break;
|
|
8592
8636
|
|
|
8593
8637
|
case 13:
|
|
8594
|
-
|
|
8595
|
-
|
|
8638
|
+
_context27.prev = 13;
|
|
8639
|
+
_context27.t0 = _context27["catch"](2);
|
|
8596
8640
|
|
|
8597
|
-
_iterator4.e(
|
|
8641
|
+
_iterator4.e(_context27.t0);
|
|
8598
8642
|
|
|
8599
8643
|
case 16:
|
|
8600
|
-
|
|
8644
|
+
_context27.prev = 16;
|
|
8601
8645
|
|
|
8602
8646
|
_iterator4.f();
|
|
8603
8647
|
|
|
8604
|
-
return
|
|
8648
|
+
return _context27.finish(16);
|
|
8605
8649
|
|
|
8606
8650
|
case 19:
|
|
8607
|
-
|
|
8651
|
+
_context27.next = 21;
|
|
8608
8652
|
return this.post(this.baseURL + '/users', {
|
|
8609
8653
|
users: userMap
|
|
8610
8654
|
});
|
|
8611
8655
|
|
|
8612
8656
|
case 21:
|
|
8613
|
-
return
|
|
8657
|
+
return _context27.abrupt("return", _context27.sent);
|
|
8614
8658
|
|
|
8615
8659
|
case 22:
|
|
8616
8660
|
case "end":
|
|
8617
|
-
return
|
|
8661
|
+
return _context27.stop();
|
|
8618
8662
|
}
|
|
8619
8663
|
}
|
|
8620
|
-
},
|
|
8664
|
+
}, _callee27, this, [[2, 13, 16, 19]]);
|
|
8621
8665
|
}));
|
|
8622
8666
|
|
|
8623
|
-
function upsertUsers(
|
|
8667
|
+
function upsertUsers(_x30) {
|
|
8624
8668
|
return _upsertUsers.apply(this, arguments);
|
|
8625
8669
|
}
|
|
8626
8670
|
|
|
@@ -8668,72 +8712,72 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8668
8712
|
* @return {Promise<{ users: { [key: string]: UserResponse<StreamChatGenerics> } }>}
|
|
8669
8713
|
*/
|
|
8670
8714
|
function () {
|
|
8671
|
-
var _partialUpdateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8715
|
+
var _partialUpdateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(users) {
|
|
8672
8716
|
var _iterator5, _step5, userObject;
|
|
8673
8717
|
|
|
8674
|
-
return _regeneratorRuntime.wrap(function
|
|
8718
|
+
return _regeneratorRuntime.wrap(function _callee28$(_context28) {
|
|
8675
8719
|
while (1) {
|
|
8676
|
-
switch (
|
|
8720
|
+
switch (_context28.prev = _context28.next) {
|
|
8677
8721
|
case 0:
|
|
8678
8722
|
_iterator5 = _createForOfIteratorHelper(users);
|
|
8679
|
-
|
|
8723
|
+
_context28.prev = 1;
|
|
8680
8724
|
|
|
8681
8725
|
_iterator5.s();
|
|
8682
8726
|
|
|
8683
8727
|
case 3:
|
|
8684
8728
|
if ((_step5 = _iterator5.n()).done) {
|
|
8685
|
-
|
|
8729
|
+
_context28.next = 9;
|
|
8686
8730
|
break;
|
|
8687
8731
|
}
|
|
8688
8732
|
|
|
8689
8733
|
userObject = _step5.value;
|
|
8690
8734
|
|
|
8691
8735
|
if (userObject.id) {
|
|
8692
|
-
|
|
8736
|
+
_context28.next = 7;
|
|
8693
8737
|
break;
|
|
8694
8738
|
}
|
|
8695
8739
|
|
|
8696
8740
|
throw Error('User ID is required when updating a user');
|
|
8697
8741
|
|
|
8698
8742
|
case 7:
|
|
8699
|
-
|
|
8743
|
+
_context28.next = 3;
|
|
8700
8744
|
break;
|
|
8701
8745
|
|
|
8702
8746
|
case 9:
|
|
8703
|
-
|
|
8747
|
+
_context28.next = 14;
|
|
8704
8748
|
break;
|
|
8705
8749
|
|
|
8706
8750
|
case 11:
|
|
8707
|
-
|
|
8708
|
-
|
|
8751
|
+
_context28.prev = 11;
|
|
8752
|
+
_context28.t0 = _context28["catch"](1);
|
|
8709
8753
|
|
|
8710
|
-
_iterator5.e(
|
|
8754
|
+
_iterator5.e(_context28.t0);
|
|
8711
8755
|
|
|
8712
8756
|
case 14:
|
|
8713
|
-
|
|
8757
|
+
_context28.prev = 14;
|
|
8714
8758
|
|
|
8715
8759
|
_iterator5.f();
|
|
8716
8760
|
|
|
8717
|
-
return
|
|
8761
|
+
return _context28.finish(14);
|
|
8718
8762
|
|
|
8719
8763
|
case 17:
|
|
8720
|
-
|
|
8764
|
+
_context28.next = 19;
|
|
8721
8765
|
return this.patch(this.baseURL + '/users', {
|
|
8722
8766
|
users: users
|
|
8723
8767
|
});
|
|
8724
8768
|
|
|
8725
8769
|
case 19:
|
|
8726
|
-
return
|
|
8770
|
+
return _context28.abrupt("return", _context28.sent);
|
|
8727
8771
|
|
|
8728
8772
|
case 20:
|
|
8729
8773
|
case "end":
|
|
8730
|
-
return
|
|
8774
|
+
return _context28.stop();
|
|
8731
8775
|
}
|
|
8732
8776
|
}
|
|
8733
|
-
},
|
|
8777
|
+
}, _callee28, this, [[1, 11, 14, 17]]);
|
|
8734
8778
|
}));
|
|
8735
8779
|
|
|
8736
|
-
function partialUpdateUsers(
|
|
8780
|
+
function partialUpdateUsers(_x31) {
|
|
8737
8781
|
return _partialUpdateUsers.apply(this, arguments);
|
|
8738
8782
|
}
|
|
8739
8783
|
|
|
@@ -8742,26 +8786,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8742
8786
|
}, {
|
|
8743
8787
|
key: "deleteUser",
|
|
8744
8788
|
value: function () {
|
|
8745
|
-
var _deleteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8746
|
-
return _regeneratorRuntime.wrap(function
|
|
8789
|
+
var _deleteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(userID, params) {
|
|
8790
|
+
return _regeneratorRuntime.wrap(function _callee29$(_context29) {
|
|
8747
8791
|
while (1) {
|
|
8748
|
-
switch (
|
|
8792
|
+
switch (_context29.prev = _context29.next) {
|
|
8749
8793
|
case 0:
|
|
8750
|
-
|
|
8794
|
+
_context29.next = 2;
|
|
8751
8795
|
return this.delete(this.baseURL + "/users/".concat(userID), params);
|
|
8752
8796
|
|
|
8753
8797
|
case 2:
|
|
8754
|
-
return
|
|
8798
|
+
return _context29.abrupt("return", _context29.sent);
|
|
8755
8799
|
|
|
8756
8800
|
case 3:
|
|
8757
8801
|
case "end":
|
|
8758
|
-
return
|
|
8802
|
+
return _context29.stop();
|
|
8759
8803
|
}
|
|
8760
8804
|
}
|
|
8761
|
-
},
|
|
8805
|
+
}, _callee29, this);
|
|
8762
8806
|
}));
|
|
8763
8807
|
|
|
8764
|
-
function deleteUser(
|
|
8808
|
+
function deleteUser(_x32, _x33) {
|
|
8765
8809
|
return _deleteUser.apply(this, arguments);
|
|
8766
8810
|
}
|
|
8767
8811
|
|
|
@@ -8778,28 +8822,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8778
8822
|
}, {
|
|
8779
8823
|
key: "restoreUsers",
|
|
8780
8824
|
value: function () {
|
|
8781
|
-
var _restoreUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8782
|
-
return _regeneratorRuntime.wrap(function
|
|
8825
|
+
var _restoreUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(user_ids) {
|
|
8826
|
+
return _regeneratorRuntime.wrap(function _callee30$(_context30) {
|
|
8783
8827
|
while (1) {
|
|
8784
|
-
switch (
|
|
8828
|
+
switch (_context30.prev = _context30.next) {
|
|
8785
8829
|
case 0:
|
|
8786
|
-
|
|
8830
|
+
_context30.next = 2;
|
|
8787
8831
|
return this.post(this.baseURL + "/users/restore", {
|
|
8788
8832
|
user_ids: user_ids
|
|
8789
8833
|
});
|
|
8790
8834
|
|
|
8791
8835
|
case 2:
|
|
8792
|
-
return
|
|
8836
|
+
return _context30.abrupt("return", _context30.sent);
|
|
8793
8837
|
|
|
8794
8838
|
case 3:
|
|
8795
8839
|
case "end":
|
|
8796
|
-
return
|
|
8840
|
+
return _context30.stop();
|
|
8797
8841
|
}
|
|
8798
8842
|
}
|
|
8799
|
-
},
|
|
8843
|
+
}, _callee30, this);
|
|
8800
8844
|
}));
|
|
8801
8845
|
|
|
8802
|
-
function restoreUsers(
|
|
8846
|
+
function restoreUsers(_x34) {
|
|
8803
8847
|
return _restoreUsers.apply(this, arguments);
|
|
8804
8848
|
}
|
|
8805
8849
|
|
|
@@ -8817,26 +8861,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8817
8861
|
}, {
|
|
8818
8862
|
key: "reactivateUser",
|
|
8819
8863
|
value: function () {
|
|
8820
|
-
var _reactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8821
|
-
return _regeneratorRuntime.wrap(function
|
|
8864
|
+
var _reactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(userID, options) {
|
|
8865
|
+
return _regeneratorRuntime.wrap(function _callee31$(_context31) {
|
|
8822
8866
|
while (1) {
|
|
8823
|
-
switch (
|
|
8867
|
+
switch (_context31.prev = _context31.next) {
|
|
8824
8868
|
case 0:
|
|
8825
|
-
|
|
8869
|
+
_context31.next = 2;
|
|
8826
8870
|
return this.post(this.baseURL + "/users/".concat(userID, "/reactivate"), _objectSpread({}, options));
|
|
8827
8871
|
|
|
8828
8872
|
case 2:
|
|
8829
|
-
return
|
|
8873
|
+
return _context31.abrupt("return", _context31.sent);
|
|
8830
8874
|
|
|
8831
8875
|
case 3:
|
|
8832
8876
|
case "end":
|
|
8833
|
-
return
|
|
8877
|
+
return _context31.stop();
|
|
8834
8878
|
}
|
|
8835
8879
|
}
|
|
8836
|
-
},
|
|
8880
|
+
}, _callee31, this);
|
|
8837
8881
|
}));
|
|
8838
8882
|
|
|
8839
|
-
function reactivateUser(
|
|
8883
|
+
function reactivateUser(_x35, _x36) {
|
|
8840
8884
|
return _reactivateUser.apply(this, arguments);
|
|
8841
8885
|
}
|
|
8842
8886
|
|
|
@@ -8854,28 +8898,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8854
8898
|
}, {
|
|
8855
8899
|
key: "reactivateUsers",
|
|
8856
8900
|
value: function () {
|
|
8857
|
-
var _reactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8858
|
-
return _regeneratorRuntime.wrap(function
|
|
8901
|
+
var _reactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(user_ids, options) {
|
|
8902
|
+
return _regeneratorRuntime.wrap(function _callee32$(_context32) {
|
|
8859
8903
|
while (1) {
|
|
8860
|
-
switch (
|
|
8904
|
+
switch (_context32.prev = _context32.next) {
|
|
8861
8905
|
case 0:
|
|
8862
|
-
|
|
8906
|
+
_context32.next = 2;
|
|
8863
8907
|
return this.post(this.baseURL + "/users/reactivate", _objectSpread({
|
|
8864
8908
|
user_ids: user_ids
|
|
8865
8909
|
}, options));
|
|
8866
8910
|
|
|
8867
8911
|
case 2:
|
|
8868
|
-
return
|
|
8912
|
+
return _context32.abrupt("return", _context32.sent);
|
|
8869
8913
|
|
|
8870
8914
|
case 3:
|
|
8871
8915
|
case "end":
|
|
8872
|
-
return
|
|
8916
|
+
return _context32.stop();
|
|
8873
8917
|
}
|
|
8874
8918
|
}
|
|
8875
|
-
},
|
|
8919
|
+
}, _callee32, this);
|
|
8876
8920
|
}));
|
|
8877
8921
|
|
|
8878
|
-
function reactivateUsers(
|
|
8922
|
+
function reactivateUsers(_x37, _x38) {
|
|
8879
8923
|
return _reactivateUsers.apply(this, arguments);
|
|
8880
8924
|
}
|
|
8881
8925
|
|
|
@@ -8893,26 +8937,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8893
8937
|
}, {
|
|
8894
8938
|
key: "deactivateUser",
|
|
8895
8939
|
value: function () {
|
|
8896
|
-
var _deactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8897
|
-
return _regeneratorRuntime.wrap(function
|
|
8940
|
+
var _deactivateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(userID, options) {
|
|
8941
|
+
return _regeneratorRuntime.wrap(function _callee33$(_context33) {
|
|
8898
8942
|
while (1) {
|
|
8899
|
-
switch (
|
|
8943
|
+
switch (_context33.prev = _context33.next) {
|
|
8900
8944
|
case 0:
|
|
8901
|
-
|
|
8945
|
+
_context33.next = 2;
|
|
8902
8946
|
return this.post(this.baseURL + "/users/".concat(userID, "/deactivate"), _objectSpread({}, options));
|
|
8903
8947
|
|
|
8904
8948
|
case 2:
|
|
8905
|
-
return
|
|
8949
|
+
return _context33.abrupt("return", _context33.sent);
|
|
8906
8950
|
|
|
8907
8951
|
case 3:
|
|
8908
8952
|
case "end":
|
|
8909
|
-
return
|
|
8953
|
+
return _context33.stop();
|
|
8910
8954
|
}
|
|
8911
8955
|
}
|
|
8912
|
-
},
|
|
8956
|
+
}, _callee33, this);
|
|
8913
8957
|
}));
|
|
8914
8958
|
|
|
8915
|
-
function deactivateUser(
|
|
8959
|
+
function deactivateUser(_x39, _x40) {
|
|
8916
8960
|
return _deactivateUser.apply(this, arguments);
|
|
8917
8961
|
}
|
|
8918
8962
|
|
|
@@ -8930,28 +8974,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8930
8974
|
}, {
|
|
8931
8975
|
key: "deactivateUsers",
|
|
8932
8976
|
value: function () {
|
|
8933
|
-
var _deactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8934
|
-
return _regeneratorRuntime.wrap(function
|
|
8977
|
+
var _deactivateUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(user_ids, options) {
|
|
8978
|
+
return _regeneratorRuntime.wrap(function _callee34$(_context34) {
|
|
8935
8979
|
while (1) {
|
|
8936
|
-
switch (
|
|
8980
|
+
switch (_context34.prev = _context34.next) {
|
|
8937
8981
|
case 0:
|
|
8938
|
-
|
|
8982
|
+
_context34.next = 2;
|
|
8939
8983
|
return this.post(this.baseURL + "/users/deactivate", _objectSpread({
|
|
8940
8984
|
user_ids: user_ids
|
|
8941
8985
|
}, options));
|
|
8942
8986
|
|
|
8943
8987
|
case 2:
|
|
8944
|
-
return
|
|
8988
|
+
return _context34.abrupt("return", _context34.sent);
|
|
8945
8989
|
|
|
8946
8990
|
case 3:
|
|
8947
8991
|
case "end":
|
|
8948
|
-
return
|
|
8992
|
+
return _context34.stop();
|
|
8949
8993
|
}
|
|
8950
8994
|
}
|
|
8951
|
-
},
|
|
8995
|
+
}, _callee34, this);
|
|
8952
8996
|
}));
|
|
8953
8997
|
|
|
8954
|
-
function deactivateUsers(
|
|
8998
|
+
function deactivateUsers(_x41, _x42) {
|
|
8955
8999
|
return _deactivateUsers.apply(this, arguments);
|
|
8956
9000
|
}
|
|
8957
9001
|
|
|
@@ -8960,26 +9004,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8960
9004
|
}, {
|
|
8961
9005
|
key: "exportUser",
|
|
8962
9006
|
value: function () {
|
|
8963
|
-
var _exportUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8964
|
-
return _regeneratorRuntime.wrap(function
|
|
9007
|
+
var _exportUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(userID, options) {
|
|
9008
|
+
return _regeneratorRuntime.wrap(function _callee35$(_context35) {
|
|
8965
9009
|
while (1) {
|
|
8966
|
-
switch (
|
|
9010
|
+
switch (_context35.prev = _context35.next) {
|
|
8967
9011
|
case 0:
|
|
8968
|
-
|
|
9012
|
+
_context35.next = 2;
|
|
8969
9013
|
return this.get(this.baseURL + "/users/".concat(userID, "/export"), _objectSpread({}, options));
|
|
8970
9014
|
|
|
8971
9015
|
case 2:
|
|
8972
|
-
return
|
|
9016
|
+
return _context35.abrupt("return", _context35.sent);
|
|
8973
9017
|
|
|
8974
9018
|
case 3:
|
|
8975
9019
|
case "end":
|
|
8976
|
-
return
|
|
9020
|
+
return _context35.stop();
|
|
8977
9021
|
}
|
|
8978
9022
|
}
|
|
8979
|
-
},
|
|
9023
|
+
}, _callee35, this);
|
|
8980
9024
|
}));
|
|
8981
9025
|
|
|
8982
|
-
function exportUser(
|
|
9026
|
+
function exportUser(_x43, _x44) {
|
|
8983
9027
|
return _exportUser.apply(this, arguments);
|
|
8984
9028
|
}
|
|
8985
9029
|
|
|
@@ -8995,28 +9039,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8995
9039
|
}, {
|
|
8996
9040
|
key: "banUser",
|
|
8997
9041
|
value: function () {
|
|
8998
|
-
var _banUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8999
|
-
return _regeneratorRuntime.wrap(function
|
|
9042
|
+
var _banUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(targetUserID, options) {
|
|
9043
|
+
return _regeneratorRuntime.wrap(function _callee36$(_context36) {
|
|
9000
9044
|
while (1) {
|
|
9001
|
-
switch (
|
|
9045
|
+
switch (_context36.prev = _context36.next) {
|
|
9002
9046
|
case 0:
|
|
9003
|
-
|
|
9047
|
+
_context36.next = 2;
|
|
9004
9048
|
return this.post(this.baseURL + '/moderation/ban', _objectSpread({
|
|
9005
9049
|
target_user_id: targetUserID
|
|
9006
9050
|
}, options));
|
|
9007
9051
|
|
|
9008
9052
|
case 2:
|
|
9009
|
-
return
|
|
9053
|
+
return _context36.abrupt("return", _context36.sent);
|
|
9010
9054
|
|
|
9011
9055
|
case 3:
|
|
9012
9056
|
case "end":
|
|
9013
|
-
return
|
|
9057
|
+
return _context36.stop();
|
|
9014
9058
|
}
|
|
9015
9059
|
}
|
|
9016
|
-
},
|
|
9060
|
+
}, _callee36, this);
|
|
9017
9061
|
}));
|
|
9018
9062
|
|
|
9019
|
-
function banUser(
|
|
9063
|
+
function banUser(_x45, _x46) {
|
|
9020
9064
|
return _banUser.apply(this, arguments);
|
|
9021
9065
|
}
|
|
9022
9066
|
|
|
@@ -9032,28 +9076,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9032
9076
|
}, {
|
|
9033
9077
|
key: "unbanUser",
|
|
9034
9078
|
value: function () {
|
|
9035
|
-
var _unbanUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9036
|
-
return _regeneratorRuntime.wrap(function
|
|
9079
|
+
var _unbanUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37(targetUserID, options) {
|
|
9080
|
+
return _regeneratorRuntime.wrap(function _callee37$(_context37) {
|
|
9037
9081
|
while (1) {
|
|
9038
|
-
switch (
|
|
9082
|
+
switch (_context37.prev = _context37.next) {
|
|
9039
9083
|
case 0:
|
|
9040
|
-
|
|
9084
|
+
_context37.next = 2;
|
|
9041
9085
|
return this.delete(this.baseURL + '/moderation/ban', _objectSpread({
|
|
9042
9086
|
target_user_id: targetUserID
|
|
9043
9087
|
}, options));
|
|
9044
9088
|
|
|
9045
9089
|
case 2:
|
|
9046
|
-
return
|
|
9090
|
+
return _context37.abrupt("return", _context37.sent);
|
|
9047
9091
|
|
|
9048
9092
|
case 3:
|
|
9049
9093
|
case "end":
|
|
9050
|
-
return
|
|
9094
|
+
return _context37.stop();
|
|
9051
9095
|
}
|
|
9052
9096
|
}
|
|
9053
|
-
},
|
|
9097
|
+
}, _callee37, this);
|
|
9054
9098
|
}));
|
|
9055
9099
|
|
|
9056
|
-
function unbanUser(
|
|
9100
|
+
function unbanUser(_x47, _x48) {
|
|
9057
9101
|
return _unbanUser.apply(this, arguments);
|
|
9058
9102
|
}
|
|
9059
9103
|
|
|
@@ -9069,28 +9113,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9069
9113
|
}, {
|
|
9070
9114
|
key: "shadowBan",
|
|
9071
9115
|
value: function () {
|
|
9072
|
-
var _shadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9073
|
-
return _regeneratorRuntime.wrap(function
|
|
9116
|
+
var _shadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38(targetUserID, options) {
|
|
9117
|
+
return _regeneratorRuntime.wrap(function _callee38$(_context38) {
|
|
9074
9118
|
while (1) {
|
|
9075
|
-
switch (
|
|
9119
|
+
switch (_context38.prev = _context38.next) {
|
|
9076
9120
|
case 0:
|
|
9077
|
-
|
|
9121
|
+
_context38.next = 2;
|
|
9078
9122
|
return this.banUser(targetUserID, _objectSpread({
|
|
9079
9123
|
shadow: true
|
|
9080
9124
|
}, options));
|
|
9081
9125
|
|
|
9082
9126
|
case 2:
|
|
9083
|
-
return
|
|
9127
|
+
return _context38.abrupt("return", _context38.sent);
|
|
9084
9128
|
|
|
9085
9129
|
case 3:
|
|
9086
9130
|
case "end":
|
|
9087
|
-
return
|
|
9131
|
+
return _context38.stop();
|
|
9088
9132
|
}
|
|
9089
9133
|
}
|
|
9090
|
-
},
|
|
9134
|
+
}, _callee38, this);
|
|
9091
9135
|
}));
|
|
9092
9136
|
|
|
9093
|
-
function shadowBan(
|
|
9137
|
+
function shadowBan(_x49, _x50) {
|
|
9094
9138
|
return _shadowBan.apply(this, arguments);
|
|
9095
9139
|
}
|
|
9096
9140
|
|
|
@@ -9106,28 +9150,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9106
9150
|
}, {
|
|
9107
9151
|
key: "removeShadowBan",
|
|
9108
9152
|
value: function () {
|
|
9109
|
-
var _removeShadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9110
|
-
return _regeneratorRuntime.wrap(function
|
|
9153
|
+
var _removeShadowBan = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee39(targetUserID, options) {
|
|
9154
|
+
return _regeneratorRuntime.wrap(function _callee39$(_context39) {
|
|
9111
9155
|
while (1) {
|
|
9112
|
-
switch (
|
|
9156
|
+
switch (_context39.prev = _context39.next) {
|
|
9113
9157
|
case 0:
|
|
9114
|
-
|
|
9158
|
+
_context39.next = 2;
|
|
9115
9159
|
return this.unbanUser(targetUserID, _objectSpread({
|
|
9116
9160
|
shadow: true
|
|
9117
9161
|
}, options));
|
|
9118
9162
|
|
|
9119
9163
|
case 2:
|
|
9120
|
-
return
|
|
9164
|
+
return _context39.abrupt("return", _context39.sent);
|
|
9121
9165
|
|
|
9122
9166
|
case 3:
|
|
9123
9167
|
case "end":
|
|
9124
|
-
return
|
|
9168
|
+
return _context39.stop();
|
|
9125
9169
|
}
|
|
9126
9170
|
}
|
|
9127
|
-
},
|
|
9171
|
+
}, _callee39, this);
|
|
9128
9172
|
}));
|
|
9129
9173
|
|
|
9130
|
-
function removeShadowBan(
|
|
9174
|
+
function removeShadowBan(_x51, _x52) {
|
|
9131
9175
|
return _removeShadowBan.apply(this, arguments);
|
|
9132
9176
|
}
|
|
9133
9177
|
|
|
@@ -9144,15 +9188,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9144
9188
|
}, {
|
|
9145
9189
|
key: "muteUser",
|
|
9146
9190
|
value: function () {
|
|
9147
|
-
var _muteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9191
|
+
var _muteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee40(targetID, userID) {
|
|
9148
9192
|
var options,
|
|
9149
|
-
|
|
9150
|
-
return _regeneratorRuntime.wrap(function
|
|
9193
|
+
_args40 = arguments;
|
|
9194
|
+
return _regeneratorRuntime.wrap(function _callee40$(_context40) {
|
|
9151
9195
|
while (1) {
|
|
9152
|
-
switch (
|
|
9196
|
+
switch (_context40.prev = _context40.next) {
|
|
9153
9197
|
case 0:
|
|
9154
|
-
options =
|
|
9155
|
-
|
|
9198
|
+
options = _args40.length > 2 && _args40[2] !== undefined ? _args40[2] : {};
|
|
9199
|
+
_context40.next = 3;
|
|
9156
9200
|
return this.post(this.baseURL + '/moderation/mute', _objectSpread(_objectSpread({
|
|
9157
9201
|
target_id: targetID
|
|
9158
9202
|
}, userID ? {
|
|
@@ -9160,17 +9204,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9160
9204
|
} : {}), options));
|
|
9161
9205
|
|
|
9162
9206
|
case 3:
|
|
9163
|
-
return
|
|
9207
|
+
return _context40.abrupt("return", _context40.sent);
|
|
9164
9208
|
|
|
9165
9209
|
case 4:
|
|
9166
9210
|
case "end":
|
|
9167
|
-
return
|
|
9211
|
+
return _context40.stop();
|
|
9168
9212
|
}
|
|
9169
9213
|
}
|
|
9170
|
-
},
|
|
9214
|
+
}, _callee40, this);
|
|
9171
9215
|
}));
|
|
9172
9216
|
|
|
9173
|
-
function muteUser(
|
|
9217
|
+
function muteUser(_x53, _x54) {
|
|
9174
9218
|
return _muteUser.apply(this, arguments);
|
|
9175
9219
|
}
|
|
9176
9220
|
|
|
@@ -9186,12 +9230,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9186
9230
|
}, {
|
|
9187
9231
|
key: "unmuteUser",
|
|
9188
9232
|
value: function () {
|
|
9189
|
-
var _unmuteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9190
|
-
return _regeneratorRuntime.wrap(function
|
|
9233
|
+
var _unmuteUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee41(targetID, currentUserID) {
|
|
9234
|
+
return _regeneratorRuntime.wrap(function _callee41$(_context41) {
|
|
9191
9235
|
while (1) {
|
|
9192
|
-
switch (
|
|
9236
|
+
switch (_context41.prev = _context41.next) {
|
|
9193
9237
|
case 0:
|
|
9194
|
-
|
|
9238
|
+
_context41.next = 2;
|
|
9195
9239
|
return this.post(this.baseURL + '/moderation/unmute', _objectSpread({
|
|
9196
9240
|
target_id: targetID
|
|
9197
9241
|
}, currentUserID ? {
|
|
@@ -9199,17 +9243,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9199
9243
|
} : {}));
|
|
9200
9244
|
|
|
9201
9245
|
case 2:
|
|
9202
|
-
return
|
|
9246
|
+
return _context41.abrupt("return", _context41.sent);
|
|
9203
9247
|
|
|
9204
9248
|
case 3:
|
|
9205
9249
|
case "end":
|
|
9206
|
-
return
|
|
9250
|
+
return _context41.stop();
|
|
9207
9251
|
}
|
|
9208
9252
|
}
|
|
9209
|
-
},
|
|
9253
|
+
}, _callee41, this);
|
|
9210
9254
|
}));
|
|
9211
9255
|
|
|
9212
|
-
function unmuteUser(
|
|
9256
|
+
function unmuteUser(_x55, _x56) {
|
|
9213
9257
|
return _unmuteUser.apply(this, arguments);
|
|
9214
9258
|
}
|
|
9215
9259
|
|
|
@@ -9244,31 +9288,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9244
9288
|
}, {
|
|
9245
9289
|
key: "flagMessage",
|
|
9246
9290
|
value: function () {
|
|
9247
|
-
var _flagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9291
|
+
var _flagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee42(targetMessageID) {
|
|
9248
9292
|
var options,
|
|
9249
|
-
|
|
9250
|
-
return _regeneratorRuntime.wrap(function
|
|
9293
|
+
_args42 = arguments;
|
|
9294
|
+
return _regeneratorRuntime.wrap(function _callee42$(_context42) {
|
|
9251
9295
|
while (1) {
|
|
9252
|
-
switch (
|
|
9296
|
+
switch (_context42.prev = _context42.next) {
|
|
9253
9297
|
case 0:
|
|
9254
|
-
options =
|
|
9255
|
-
|
|
9298
|
+
options = _args42.length > 1 && _args42[1] !== undefined ? _args42[1] : {};
|
|
9299
|
+
_context42.next = 3;
|
|
9256
9300
|
return this.post(this.baseURL + '/moderation/flag', _objectSpread({
|
|
9257
9301
|
target_message_id: targetMessageID
|
|
9258
9302
|
}, options));
|
|
9259
9303
|
|
|
9260
9304
|
case 3:
|
|
9261
|
-
return
|
|
9305
|
+
return _context42.abrupt("return", _context42.sent);
|
|
9262
9306
|
|
|
9263
9307
|
case 4:
|
|
9264
9308
|
case "end":
|
|
9265
|
-
return
|
|
9309
|
+
return _context42.stop();
|
|
9266
9310
|
}
|
|
9267
9311
|
}
|
|
9268
|
-
},
|
|
9312
|
+
}, _callee42, this);
|
|
9269
9313
|
}));
|
|
9270
9314
|
|
|
9271
|
-
function flagMessage(
|
|
9315
|
+
function flagMessage(_x57) {
|
|
9272
9316
|
return _flagMessage.apply(this, arguments);
|
|
9273
9317
|
}
|
|
9274
9318
|
|
|
@@ -9284,31 +9328,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9284
9328
|
}, {
|
|
9285
9329
|
key: "flagUser",
|
|
9286
9330
|
value: function () {
|
|
9287
|
-
var _flagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9331
|
+
var _flagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43(targetID) {
|
|
9288
9332
|
var options,
|
|
9289
|
-
|
|
9290
|
-
return _regeneratorRuntime.wrap(function
|
|
9333
|
+
_args43 = arguments;
|
|
9334
|
+
return _regeneratorRuntime.wrap(function _callee43$(_context43) {
|
|
9291
9335
|
while (1) {
|
|
9292
|
-
switch (
|
|
9336
|
+
switch (_context43.prev = _context43.next) {
|
|
9293
9337
|
case 0:
|
|
9294
|
-
options =
|
|
9295
|
-
|
|
9338
|
+
options = _args43.length > 1 && _args43[1] !== undefined ? _args43[1] : {};
|
|
9339
|
+
_context43.next = 3;
|
|
9296
9340
|
return this.post(this.baseURL + '/moderation/flag', _objectSpread({
|
|
9297
9341
|
target_user_id: targetID
|
|
9298
9342
|
}, options));
|
|
9299
9343
|
|
|
9300
9344
|
case 3:
|
|
9301
|
-
return
|
|
9345
|
+
return _context43.abrupt("return", _context43.sent);
|
|
9302
9346
|
|
|
9303
9347
|
case 4:
|
|
9304
9348
|
case "end":
|
|
9305
|
-
return
|
|
9349
|
+
return _context43.stop();
|
|
9306
9350
|
}
|
|
9307
9351
|
}
|
|
9308
|
-
},
|
|
9352
|
+
}, _callee43, this);
|
|
9309
9353
|
}));
|
|
9310
9354
|
|
|
9311
|
-
function flagUser(
|
|
9355
|
+
function flagUser(_x58) {
|
|
9312
9356
|
return _flagUser.apply(this, arguments);
|
|
9313
9357
|
}
|
|
9314
9358
|
|
|
@@ -9324,31 +9368,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9324
9368
|
}, {
|
|
9325
9369
|
key: "unflagMessage",
|
|
9326
9370
|
value: function () {
|
|
9327
|
-
var _unflagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9371
|
+
var _unflagMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(targetMessageID) {
|
|
9328
9372
|
var options,
|
|
9329
|
-
|
|
9330
|
-
return _regeneratorRuntime.wrap(function
|
|
9373
|
+
_args44 = arguments;
|
|
9374
|
+
return _regeneratorRuntime.wrap(function _callee44$(_context44) {
|
|
9331
9375
|
while (1) {
|
|
9332
|
-
switch (
|
|
9376
|
+
switch (_context44.prev = _context44.next) {
|
|
9333
9377
|
case 0:
|
|
9334
|
-
options =
|
|
9335
|
-
|
|
9378
|
+
options = _args44.length > 1 && _args44[1] !== undefined ? _args44[1] : {};
|
|
9379
|
+
_context44.next = 3;
|
|
9336
9380
|
return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
|
|
9337
9381
|
target_message_id: targetMessageID
|
|
9338
9382
|
}, options));
|
|
9339
9383
|
|
|
9340
9384
|
case 3:
|
|
9341
|
-
return
|
|
9385
|
+
return _context44.abrupt("return", _context44.sent);
|
|
9342
9386
|
|
|
9343
9387
|
case 4:
|
|
9344
9388
|
case "end":
|
|
9345
|
-
return
|
|
9389
|
+
return _context44.stop();
|
|
9346
9390
|
}
|
|
9347
9391
|
}
|
|
9348
|
-
},
|
|
9392
|
+
}, _callee44, this);
|
|
9349
9393
|
}));
|
|
9350
9394
|
|
|
9351
|
-
function unflagMessage(
|
|
9395
|
+
function unflagMessage(_x59) {
|
|
9352
9396
|
return _unflagMessage.apply(this, arguments);
|
|
9353
9397
|
}
|
|
9354
9398
|
|
|
@@ -9364,31 +9408,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9364
9408
|
}, {
|
|
9365
9409
|
key: "unflagUser",
|
|
9366
9410
|
value: function () {
|
|
9367
|
-
var _unflagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9411
|
+
var _unflagUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(targetID) {
|
|
9368
9412
|
var options,
|
|
9369
|
-
|
|
9370
|
-
return _regeneratorRuntime.wrap(function
|
|
9413
|
+
_args45 = arguments;
|
|
9414
|
+
return _regeneratorRuntime.wrap(function _callee45$(_context45) {
|
|
9371
9415
|
while (1) {
|
|
9372
|
-
switch (
|
|
9416
|
+
switch (_context45.prev = _context45.next) {
|
|
9373
9417
|
case 0:
|
|
9374
|
-
options =
|
|
9375
|
-
|
|
9418
|
+
options = _args45.length > 1 && _args45[1] !== undefined ? _args45[1] : {};
|
|
9419
|
+
_context45.next = 3;
|
|
9376
9420
|
return this.post(this.baseURL + '/moderation/unflag', _objectSpread({
|
|
9377
9421
|
target_user_id: targetID
|
|
9378
9422
|
}, options));
|
|
9379
9423
|
|
|
9380
9424
|
case 3:
|
|
9381
|
-
return
|
|
9425
|
+
return _context45.abrupt("return", _context45.sent);
|
|
9382
9426
|
|
|
9383
9427
|
case 4:
|
|
9384
9428
|
case "end":
|
|
9385
|
-
return
|
|
9429
|
+
return _context45.stop();
|
|
9386
9430
|
}
|
|
9387
9431
|
}
|
|
9388
|
-
},
|
|
9432
|
+
}, _callee45, this);
|
|
9389
9433
|
}));
|
|
9390
9434
|
|
|
9391
|
-
function unflagUser(
|
|
9435
|
+
function unflagUser(_x60) {
|
|
9392
9436
|
return _unflagUser.apply(this, arguments);
|
|
9393
9437
|
}
|
|
9394
9438
|
|
|
@@ -9405,29 +9449,29 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9405
9449
|
}, {
|
|
9406
9450
|
key: "getCallToken",
|
|
9407
9451
|
value: function () {
|
|
9408
|
-
var _getCallToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9452
|
+
var _getCallToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(callID) {
|
|
9409
9453
|
var options,
|
|
9410
|
-
|
|
9411
|
-
return _regeneratorRuntime.wrap(function
|
|
9454
|
+
_args46 = arguments;
|
|
9455
|
+
return _regeneratorRuntime.wrap(function _callee46$(_context46) {
|
|
9412
9456
|
while (1) {
|
|
9413
|
-
switch (
|
|
9457
|
+
switch (_context46.prev = _context46.next) {
|
|
9414
9458
|
case 0:
|
|
9415
|
-
options =
|
|
9416
|
-
|
|
9459
|
+
options = _args46.length > 1 && _args46[1] !== undefined ? _args46[1] : {};
|
|
9460
|
+
_context46.next = 3;
|
|
9417
9461
|
return this.post(this.baseURL + "/calls/".concat(callID), _objectSpread({}, options));
|
|
9418
9462
|
|
|
9419
9463
|
case 3:
|
|
9420
|
-
return
|
|
9464
|
+
return _context46.abrupt("return", _context46.sent);
|
|
9421
9465
|
|
|
9422
9466
|
case 4:
|
|
9423
9467
|
case "end":
|
|
9424
|
-
return
|
|
9468
|
+
return _context46.stop();
|
|
9425
9469
|
}
|
|
9426
9470
|
}
|
|
9427
|
-
},
|
|
9471
|
+
}, _callee46, this);
|
|
9428
9472
|
}));
|
|
9429
9473
|
|
|
9430
|
-
function getCallToken(
|
|
9474
|
+
function getCallToken(_x61) {
|
|
9431
9475
|
return _getCallToken.apply(this, arguments);
|
|
9432
9476
|
}
|
|
9433
9477
|
|
|
@@ -9450,30 +9494,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9450
9494
|
}, {
|
|
9451
9495
|
key: "_queryFlags",
|
|
9452
9496
|
value: function () {
|
|
9453
|
-
var _queryFlags2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9497
|
+
var _queryFlags2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47() {
|
|
9454
9498
|
var filterConditions,
|
|
9455
9499
|
options,
|
|
9456
|
-
|
|
9457
|
-
return _regeneratorRuntime.wrap(function
|
|
9500
|
+
_args47 = arguments;
|
|
9501
|
+
return _regeneratorRuntime.wrap(function _callee47$(_context47) {
|
|
9458
9502
|
while (1) {
|
|
9459
|
-
switch (
|
|
9503
|
+
switch (_context47.prev = _context47.next) {
|
|
9460
9504
|
case 0:
|
|
9461
|
-
filterConditions =
|
|
9462
|
-
options =
|
|
9463
|
-
|
|
9505
|
+
filterConditions = _args47.length > 0 && _args47[0] !== undefined ? _args47[0] : {};
|
|
9506
|
+
options = _args47.length > 1 && _args47[1] !== undefined ? _args47[1] : {};
|
|
9507
|
+
_context47.next = 4;
|
|
9464
9508
|
return this.post(this.baseURL + '/moderation/flags', _objectSpread({
|
|
9465
9509
|
filter_conditions: filterConditions
|
|
9466
9510
|
}, options));
|
|
9467
9511
|
|
|
9468
9512
|
case 4:
|
|
9469
|
-
return
|
|
9513
|
+
return _context47.abrupt("return", _context47.sent);
|
|
9470
9514
|
|
|
9471
9515
|
case 5:
|
|
9472
9516
|
case "end":
|
|
9473
|
-
return
|
|
9517
|
+
return _context47.stop();
|
|
9474
9518
|
}
|
|
9475
9519
|
}
|
|
9476
|
-
},
|
|
9520
|
+
}, _callee47, this);
|
|
9477
9521
|
}));
|
|
9478
9522
|
|
|
9479
9523
|
function _queryFlags() {
|
|
@@ -9499,30 +9543,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9499
9543
|
}, {
|
|
9500
9544
|
key: "_queryFlagReports",
|
|
9501
9545
|
value: function () {
|
|
9502
|
-
var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9546
|
+
var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48() {
|
|
9503
9547
|
var filterConditions,
|
|
9504
9548
|
options,
|
|
9505
|
-
|
|
9506
|
-
return _regeneratorRuntime.wrap(function
|
|
9549
|
+
_args48 = arguments;
|
|
9550
|
+
return _regeneratorRuntime.wrap(function _callee48$(_context48) {
|
|
9507
9551
|
while (1) {
|
|
9508
|
-
switch (
|
|
9552
|
+
switch (_context48.prev = _context48.next) {
|
|
9509
9553
|
case 0:
|
|
9510
|
-
filterConditions =
|
|
9511
|
-
options =
|
|
9512
|
-
|
|
9554
|
+
filterConditions = _args48.length > 0 && _args48[0] !== undefined ? _args48[0] : {};
|
|
9555
|
+
options = _args48.length > 1 && _args48[1] !== undefined ? _args48[1] : {};
|
|
9556
|
+
_context48.next = 4;
|
|
9513
9557
|
return this.post(this.baseURL + '/moderation/reports', _objectSpread({
|
|
9514
9558
|
filter_conditions: filterConditions
|
|
9515
9559
|
}, options));
|
|
9516
9560
|
|
|
9517
9561
|
case 4:
|
|
9518
|
-
return
|
|
9562
|
+
return _context48.abrupt("return", _context48.sent);
|
|
9519
9563
|
|
|
9520
9564
|
case 5:
|
|
9521
9565
|
case "end":
|
|
9522
|
-
return
|
|
9566
|
+
return _context48.stop();
|
|
9523
9567
|
}
|
|
9524
9568
|
}
|
|
9525
|
-
},
|
|
9569
|
+
}, _callee48, this);
|
|
9526
9570
|
}));
|
|
9527
9571
|
|
|
9528
9572
|
function _queryFlagReports() {
|
|
@@ -9549,31 +9593,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9549
9593
|
}, {
|
|
9550
9594
|
key: "_reviewFlagReport",
|
|
9551
9595
|
value: function () {
|
|
9552
|
-
var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9596
|
+
var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(id, reviewResult) {
|
|
9553
9597
|
var options,
|
|
9554
|
-
|
|
9555
|
-
return _regeneratorRuntime.wrap(function
|
|
9598
|
+
_args49 = arguments;
|
|
9599
|
+
return _regeneratorRuntime.wrap(function _callee49$(_context49) {
|
|
9556
9600
|
while (1) {
|
|
9557
|
-
switch (
|
|
9601
|
+
switch (_context49.prev = _context49.next) {
|
|
9558
9602
|
case 0:
|
|
9559
|
-
options =
|
|
9560
|
-
|
|
9603
|
+
options = _args49.length > 2 && _args49[2] !== undefined ? _args49[2] : {};
|
|
9604
|
+
_context49.next = 3;
|
|
9561
9605
|
return this.patch(this.baseURL + "/moderation/reports/".concat(id), _objectSpread({
|
|
9562
9606
|
review_result: reviewResult
|
|
9563
9607
|
}, options));
|
|
9564
9608
|
|
|
9565
9609
|
case 3:
|
|
9566
|
-
return
|
|
9610
|
+
return _context49.abrupt("return", _context49.sent);
|
|
9567
9611
|
|
|
9568
9612
|
case 4:
|
|
9569
9613
|
case "end":
|
|
9570
|
-
return
|
|
9614
|
+
return _context49.stop();
|
|
9571
9615
|
}
|
|
9572
9616
|
}
|
|
9573
|
-
},
|
|
9617
|
+
}, _callee49, this);
|
|
9574
9618
|
}));
|
|
9575
9619
|
|
|
9576
|
-
function _reviewFlagReport(
|
|
9620
|
+
function _reviewFlagReport(_x62, _x63) {
|
|
9577
9621
|
return _reviewFlagReport2.apply(this, arguments);
|
|
9578
9622
|
}
|
|
9579
9623
|
|
|
@@ -9591,31 +9635,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9591
9635
|
}, {
|
|
9592
9636
|
key: "unblockMessage",
|
|
9593
9637
|
value: function () {
|
|
9594
|
-
var _unblockMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9638
|
+
var _unblockMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50(targetMessageID) {
|
|
9595
9639
|
var options,
|
|
9596
|
-
|
|
9597
|
-
return _regeneratorRuntime.wrap(function
|
|
9640
|
+
_args50 = arguments;
|
|
9641
|
+
return _regeneratorRuntime.wrap(function _callee50$(_context50) {
|
|
9598
9642
|
while (1) {
|
|
9599
|
-
switch (
|
|
9643
|
+
switch (_context50.prev = _context50.next) {
|
|
9600
9644
|
case 0:
|
|
9601
|
-
options =
|
|
9602
|
-
|
|
9645
|
+
options = _args50.length > 1 && _args50[1] !== undefined ? _args50[1] : {};
|
|
9646
|
+
_context50.next = 3;
|
|
9603
9647
|
return this.post(this.baseURL + '/moderation/unblock_message', _objectSpread({
|
|
9604
9648
|
target_message_id: targetMessageID
|
|
9605
9649
|
}, options));
|
|
9606
9650
|
|
|
9607
9651
|
case 3:
|
|
9608
|
-
return
|
|
9652
|
+
return _context50.abrupt("return", _context50.sent);
|
|
9609
9653
|
|
|
9610
9654
|
case 4:
|
|
9611
9655
|
case "end":
|
|
9612
|
-
return
|
|
9656
|
+
return _context50.stop();
|
|
9613
9657
|
}
|
|
9614
9658
|
}
|
|
9615
|
-
},
|
|
9659
|
+
}, _callee50, this);
|
|
9616
9660
|
}));
|
|
9617
9661
|
|
|
9618
|
-
function unblockMessage(
|
|
9662
|
+
function unblockMessage(_x64) {
|
|
9619
9663
|
return _unblockMessage.apply(this, arguments);
|
|
9620
9664
|
}
|
|
9621
9665
|
|
|
@@ -9634,23 +9678,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9634
9678
|
* @return {Promise<APIResponse>}
|
|
9635
9679
|
*/
|
|
9636
9680
|
function () {
|
|
9637
|
-
var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9681
|
+
var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51() {
|
|
9638
9682
|
var data,
|
|
9639
|
-
|
|
9640
|
-
return _regeneratorRuntime.wrap(function
|
|
9683
|
+
_args51 = arguments;
|
|
9684
|
+
return _regeneratorRuntime.wrap(function _callee51$(_context51) {
|
|
9641
9685
|
while (1) {
|
|
9642
|
-
switch (
|
|
9686
|
+
switch (_context51.prev = _context51.next) {
|
|
9643
9687
|
case 0:
|
|
9644
|
-
data =
|
|
9645
|
-
|
|
9688
|
+
data = _args51.length > 0 && _args51[0] !== undefined ? _args51[0] : {};
|
|
9689
|
+
_context51.next = 3;
|
|
9646
9690
|
return this.post(this.baseURL + '/channels/read', _objectSpread({}, data));
|
|
9647
9691
|
|
|
9648
9692
|
case 3:
|
|
9649
9693
|
case "end":
|
|
9650
|
-
return
|
|
9694
|
+
return _context51.stop();
|
|
9651
9695
|
}
|
|
9652
9696
|
}
|
|
9653
|
-
},
|
|
9697
|
+
}, _callee51, this);
|
|
9654
9698
|
}));
|
|
9655
9699
|
|
|
9656
9700
|
function markChannelsRead() {
|
|
@@ -9725,28 +9769,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9725
9769
|
}, {
|
|
9726
9770
|
key: "translateMessage",
|
|
9727
9771
|
value: function () {
|
|
9728
|
-
var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9729
|
-
return _regeneratorRuntime.wrap(function
|
|
9772
|
+
var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(messageId, language) {
|
|
9773
|
+
return _regeneratorRuntime.wrap(function _callee52$(_context52) {
|
|
9730
9774
|
while (1) {
|
|
9731
|
-
switch (
|
|
9775
|
+
switch (_context52.prev = _context52.next) {
|
|
9732
9776
|
case 0:
|
|
9733
|
-
|
|
9777
|
+
_context52.next = 2;
|
|
9734
9778
|
return this.post(this.baseURL + "/messages/".concat(messageId, "/translate"), {
|
|
9735
9779
|
language: language
|
|
9736
9780
|
});
|
|
9737
9781
|
|
|
9738
9782
|
case 2:
|
|
9739
|
-
return
|
|
9783
|
+
return _context52.abrupt("return", _context52.sent);
|
|
9740
9784
|
|
|
9741
9785
|
case 3:
|
|
9742
9786
|
case "end":
|
|
9743
|
-
return
|
|
9787
|
+
return _context52.stop();
|
|
9744
9788
|
}
|
|
9745
9789
|
}
|
|
9746
|
-
},
|
|
9790
|
+
}, _callee52, this);
|
|
9747
9791
|
}));
|
|
9748
9792
|
|
|
9749
|
-
function translateMessage(
|
|
9793
|
+
function translateMessage(_x65, _x66) {
|
|
9750
9794
|
return _translateMessage.apply(this, arguments);
|
|
9751
9795
|
}
|
|
9752
9796
|
|
|
@@ -9848,14 +9892,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9848
9892
|
}, {
|
|
9849
9893
|
key: "updateMessage",
|
|
9850
9894
|
value: function () {
|
|
9851
|
-
var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9895
|
+
var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53(message, userId, options) {
|
|
9852
9896
|
var clonedMessage, reservedMessageFields;
|
|
9853
|
-
return _regeneratorRuntime.wrap(function
|
|
9897
|
+
return _regeneratorRuntime.wrap(function _callee53$(_context53) {
|
|
9854
9898
|
while (1) {
|
|
9855
|
-
switch (
|
|
9899
|
+
switch (_context53.prev = _context53.next) {
|
|
9856
9900
|
case 0:
|
|
9857
9901
|
if (message.id) {
|
|
9858
|
-
|
|
9902
|
+
_context53.next = 2;
|
|
9859
9903
|
break;
|
|
9860
9904
|
}
|
|
9861
9905
|
|
|
@@ -9892,23 +9936,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9892
9936
|
});
|
|
9893
9937
|
}
|
|
9894
9938
|
|
|
9895
|
-
|
|
9939
|
+
_context53.next = 10;
|
|
9896
9940
|
return this.post(this.baseURL + "/messages/".concat(message.id), _objectSpread({
|
|
9897
9941
|
message: clonedMessage
|
|
9898
9942
|
}, options));
|
|
9899
9943
|
|
|
9900
9944
|
case 10:
|
|
9901
|
-
return
|
|
9945
|
+
return _context53.abrupt("return", _context53.sent);
|
|
9902
9946
|
|
|
9903
9947
|
case 11:
|
|
9904
9948
|
case "end":
|
|
9905
|
-
return
|
|
9949
|
+
return _context53.stop();
|
|
9906
9950
|
}
|
|
9907
9951
|
}
|
|
9908
|
-
},
|
|
9952
|
+
}, _callee53, this);
|
|
9909
9953
|
}));
|
|
9910
9954
|
|
|
9911
|
-
function updateMessage(
|
|
9955
|
+
function updateMessage(_x67, _x68, _x69) {
|
|
9912
9956
|
return _updateMessage.apply(this, arguments);
|
|
9913
9957
|
}
|
|
9914
9958
|
|
|
@@ -9931,14 +9975,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9931
9975
|
}, {
|
|
9932
9976
|
key: "partialUpdateMessage",
|
|
9933
9977
|
value: function () {
|
|
9934
|
-
var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9978
|
+
var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54(id, partialMessageObject, userId, options) {
|
|
9935
9979
|
var user;
|
|
9936
|
-
return _regeneratorRuntime.wrap(function
|
|
9980
|
+
return _regeneratorRuntime.wrap(function _callee54$(_context54) {
|
|
9937
9981
|
while (1) {
|
|
9938
|
-
switch (
|
|
9982
|
+
switch (_context54.prev = _context54.next) {
|
|
9939
9983
|
case 0:
|
|
9940
9984
|
if (id) {
|
|
9941
|
-
|
|
9985
|
+
_context54.next = 2;
|
|
9942
9986
|
break;
|
|
9943
9987
|
}
|
|
9944
9988
|
|
|
@@ -9953,23 +9997,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9953
9997
|
};
|
|
9954
9998
|
}
|
|
9955
9999
|
|
|
9956
|
-
|
|
10000
|
+
_context54.next = 6;
|
|
9957
10001
|
return this.put(this.baseURL + "/messages/".concat(id), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
|
|
9958
10002
|
user: user
|
|
9959
10003
|
}));
|
|
9960
10004
|
|
|
9961
10005
|
case 6:
|
|
9962
|
-
return
|
|
10006
|
+
return _context54.abrupt("return", _context54.sent);
|
|
9963
10007
|
|
|
9964
10008
|
case 7:
|
|
9965
10009
|
case "end":
|
|
9966
|
-
return
|
|
10010
|
+
return _context54.stop();
|
|
9967
10011
|
}
|
|
9968
10012
|
}
|
|
9969
|
-
},
|
|
10013
|
+
}, _callee54, this);
|
|
9970
10014
|
}));
|
|
9971
10015
|
|
|
9972
|
-
function partialUpdateMessage(
|
|
10016
|
+
function partialUpdateMessage(_x70, _x71, _x72, _x73) {
|
|
9973
10017
|
return _partialUpdateMessage.apply(this, arguments);
|
|
9974
10018
|
}
|
|
9975
10019
|
|
|
@@ -9978,11 +10022,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9978
10022
|
}, {
|
|
9979
10023
|
key: "deleteMessage",
|
|
9980
10024
|
value: function () {
|
|
9981
|
-
var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10025
|
+
var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(messageID, hardDelete) {
|
|
9982
10026
|
var params;
|
|
9983
|
-
return _regeneratorRuntime.wrap(function
|
|
10027
|
+
return _regeneratorRuntime.wrap(function _callee55$(_context55) {
|
|
9984
10028
|
while (1) {
|
|
9985
|
-
switch (
|
|
10029
|
+
switch (_context55.prev = _context55.next) {
|
|
9986
10030
|
case 0:
|
|
9987
10031
|
params = {};
|
|
9988
10032
|
|
|
@@ -9992,21 +10036,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9992
10036
|
};
|
|
9993
10037
|
}
|
|
9994
10038
|
|
|
9995
|
-
|
|
10039
|
+
_context55.next = 4;
|
|
9996
10040
|
return this.delete(this.baseURL + "/messages/".concat(messageID), params);
|
|
9997
10041
|
|
|
9998
10042
|
case 4:
|
|
9999
|
-
return
|
|
10043
|
+
return _context55.abrupt("return", _context55.sent);
|
|
10000
10044
|
|
|
10001
10045
|
case 5:
|
|
10002
10046
|
case "end":
|
|
10003
|
-
return
|
|
10047
|
+
return _context55.stop();
|
|
10004
10048
|
}
|
|
10005
10049
|
}
|
|
10006
|
-
},
|
|
10050
|
+
}, _callee55, this);
|
|
10007
10051
|
}));
|
|
10008
10052
|
|
|
10009
|
-
function deleteMessage(
|
|
10053
|
+
function deleteMessage(_x74, _x75) {
|
|
10010
10054
|
return _deleteMessage.apply(this, arguments);
|
|
10011
10055
|
}
|
|
10012
10056
|
|
|
@@ -10015,26 +10059,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10015
10059
|
}, {
|
|
10016
10060
|
key: "getMessage",
|
|
10017
10061
|
value: function () {
|
|
10018
|
-
var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10019
|
-
return _regeneratorRuntime.wrap(function
|
|
10062
|
+
var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(messageID) {
|
|
10063
|
+
return _regeneratorRuntime.wrap(function _callee56$(_context56) {
|
|
10020
10064
|
while (1) {
|
|
10021
|
-
switch (
|
|
10065
|
+
switch (_context56.prev = _context56.next) {
|
|
10022
10066
|
case 0:
|
|
10023
|
-
|
|
10067
|
+
_context56.next = 2;
|
|
10024
10068
|
return this.get(this.baseURL + "/messages/".concat(encodeURIComponent(messageID)));
|
|
10025
10069
|
|
|
10026
10070
|
case 2:
|
|
10027
|
-
return
|
|
10071
|
+
return _context56.abrupt("return", _context56.sent);
|
|
10028
10072
|
|
|
10029
10073
|
case 3:
|
|
10030
10074
|
case "end":
|
|
10031
|
-
return
|
|
10075
|
+
return _context56.stop();
|
|
10032
10076
|
}
|
|
10033
10077
|
}
|
|
10034
|
-
},
|
|
10078
|
+
}, _callee56, this);
|
|
10035
10079
|
}));
|
|
10036
10080
|
|
|
10037
|
-
function getMessage(
|
|
10081
|
+
function getMessage(_x76) {
|
|
10038
10082
|
return _getMessage.apply(this, arguments);
|
|
10039
10083
|
}
|
|
10040
10084
|
|
|
@@ -10043,7 +10087,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10043
10087
|
}, {
|
|
10044
10088
|
key: "getUserAgent",
|
|
10045
10089
|
value: function getUserAgent() {
|
|
10046
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.12.
|
|
10090
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.12.2");
|
|
10047
10091
|
}
|
|
10048
10092
|
}, {
|
|
10049
10093
|
key: "setUserAgent",
|
|
@@ -10262,28 +10306,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10262
10306
|
}, {
|
|
10263
10307
|
key: "sendUserCustomEvent",
|
|
10264
10308
|
value: function () {
|
|
10265
|
-
var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10266
|
-
return _regeneratorRuntime.wrap(function
|
|
10309
|
+
var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(targetUserID, event) {
|
|
10310
|
+
return _regeneratorRuntime.wrap(function _callee57$(_context57) {
|
|
10267
10311
|
while (1) {
|
|
10268
|
-
switch (
|
|
10312
|
+
switch (_context57.prev = _context57.next) {
|
|
10269
10313
|
case 0:
|
|
10270
|
-
|
|
10314
|
+
_context57.next = 2;
|
|
10271
10315
|
return this.post("".concat(this.baseURL, "/users/").concat(targetUserID, "/event"), {
|
|
10272
10316
|
event: event
|
|
10273
10317
|
});
|
|
10274
10318
|
|
|
10275
10319
|
case 2:
|
|
10276
|
-
return
|
|
10320
|
+
return _context57.abrupt("return", _context57.sent);
|
|
10277
10321
|
|
|
10278
10322
|
case 3:
|
|
10279
10323
|
case "end":
|
|
10280
|
-
return
|
|
10324
|
+
return _context57.stop();
|
|
10281
10325
|
}
|
|
10282
10326
|
}
|
|
10283
|
-
},
|
|
10327
|
+
}, _callee57, this);
|
|
10284
10328
|
}));
|
|
10285
10329
|
|
|
10286
|
-
function sendUserCustomEvent(
|
|
10330
|
+
function sendUserCustomEvent(_x77, _x78) {
|
|
10287
10331
|
return _sendUserCustomEvent.apply(this, arguments);
|
|
10288
10332
|
}
|
|
10289
10333
|
|
|
@@ -10351,32 +10395,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10351
10395
|
}, {
|
|
10352
10396
|
key: "createSegment",
|
|
10353
10397
|
value: function () {
|
|
10354
|
-
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10398
|
+
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(params) {
|
|
10355
10399
|
var _yield$this$post, segment;
|
|
10356
10400
|
|
|
10357
|
-
return _regeneratorRuntime.wrap(function
|
|
10401
|
+
return _regeneratorRuntime.wrap(function _callee58$(_context58) {
|
|
10358
10402
|
while (1) {
|
|
10359
|
-
switch (
|
|
10403
|
+
switch (_context58.prev = _context58.next) {
|
|
10360
10404
|
case 0:
|
|
10361
|
-
|
|
10405
|
+
_context58.next = 2;
|
|
10362
10406
|
return this.post(this.baseURL + "/segments", {
|
|
10363
10407
|
segment: params
|
|
10364
10408
|
});
|
|
10365
10409
|
|
|
10366
10410
|
case 2:
|
|
10367
|
-
_yield$this$post =
|
|
10411
|
+
_yield$this$post = _context58.sent;
|
|
10368
10412
|
segment = _yield$this$post.segment;
|
|
10369
|
-
return
|
|
10413
|
+
return _context58.abrupt("return", segment);
|
|
10370
10414
|
|
|
10371
10415
|
case 5:
|
|
10372
10416
|
case "end":
|
|
10373
|
-
return
|
|
10417
|
+
return _context58.stop();
|
|
10374
10418
|
}
|
|
10375
10419
|
}
|
|
10376
|
-
},
|
|
10420
|
+
}, _callee58, this);
|
|
10377
10421
|
}));
|
|
10378
10422
|
|
|
10379
|
-
function createSegment(
|
|
10423
|
+
function createSegment(_x79) {
|
|
10380
10424
|
return _createSegment.apply(this, arguments);
|
|
10381
10425
|
}
|
|
10382
10426
|
|
|
@@ -10392,15 +10436,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10392
10436
|
}, {
|
|
10393
10437
|
key: "querySegments",
|
|
10394
10438
|
value: function () {
|
|
10395
|
-
var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10439
|
+
var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(filters) {
|
|
10396
10440
|
var options,
|
|
10397
|
-
|
|
10398
|
-
return _regeneratorRuntime.wrap(function
|
|
10441
|
+
_args59 = arguments;
|
|
10442
|
+
return _regeneratorRuntime.wrap(function _callee59$(_context59) {
|
|
10399
10443
|
while (1) {
|
|
10400
|
-
switch (
|
|
10444
|
+
switch (_context59.prev = _context59.next) {
|
|
10401
10445
|
case 0:
|
|
10402
|
-
options =
|
|
10403
|
-
|
|
10446
|
+
options = _args59.length > 1 && _args59[1] !== undefined ? _args59[1] : {};
|
|
10447
|
+
_context59.next = 3;
|
|
10404
10448
|
return this.get(this.baseURL + "/segments", {
|
|
10405
10449
|
payload: _objectSpread({
|
|
10406
10450
|
filter_conditions: filters
|
|
@@ -10408,17 +10452,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10408
10452
|
});
|
|
10409
10453
|
|
|
10410
10454
|
case 3:
|
|
10411
|
-
return
|
|
10455
|
+
return _context59.abrupt("return", _context59.sent);
|
|
10412
10456
|
|
|
10413
10457
|
case 4:
|
|
10414
10458
|
case "end":
|
|
10415
|
-
return
|
|
10459
|
+
return _context59.stop();
|
|
10416
10460
|
}
|
|
10417
10461
|
}
|
|
10418
|
-
},
|
|
10462
|
+
}, _callee59, this);
|
|
10419
10463
|
}));
|
|
10420
10464
|
|
|
10421
|
-
function querySegments(
|
|
10465
|
+
function querySegments(_x80) {
|
|
10422
10466
|
return _querySegments.apply(this, arguments);
|
|
10423
10467
|
}
|
|
10424
10468
|
|
|
@@ -10436,32 +10480,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10436
10480
|
}, {
|
|
10437
10481
|
key: "updateSegment",
|
|
10438
10482
|
value: function () {
|
|
10439
|
-
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10483
|
+
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(id, params) {
|
|
10440
10484
|
var _yield$this$put, segment;
|
|
10441
10485
|
|
|
10442
|
-
return _regeneratorRuntime.wrap(function
|
|
10486
|
+
return _regeneratorRuntime.wrap(function _callee60$(_context60) {
|
|
10443
10487
|
while (1) {
|
|
10444
|
-
switch (
|
|
10488
|
+
switch (_context60.prev = _context60.next) {
|
|
10445
10489
|
case 0:
|
|
10446
|
-
|
|
10490
|
+
_context60.next = 2;
|
|
10447
10491
|
return this.put(this.baseURL + "/segments/".concat(id), {
|
|
10448
10492
|
segment: params
|
|
10449
10493
|
});
|
|
10450
10494
|
|
|
10451
10495
|
case 2:
|
|
10452
|
-
_yield$this$put =
|
|
10496
|
+
_yield$this$put = _context60.sent;
|
|
10453
10497
|
segment = _yield$this$put.segment;
|
|
10454
|
-
return
|
|
10498
|
+
return _context60.abrupt("return", segment);
|
|
10455
10499
|
|
|
10456
10500
|
case 5:
|
|
10457
10501
|
case "end":
|
|
10458
|
-
return
|
|
10502
|
+
return _context60.stop();
|
|
10459
10503
|
}
|
|
10460
10504
|
}
|
|
10461
|
-
},
|
|
10505
|
+
}, _callee60, this);
|
|
10462
10506
|
}));
|
|
10463
10507
|
|
|
10464
|
-
function updateSegment(
|
|
10508
|
+
function updateSegment(_x81, _x82) {
|
|
10465
10509
|
return _updateSegment.apply(this, arguments);
|
|
10466
10510
|
}
|
|
10467
10511
|
|
|
@@ -10478,22 +10522,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10478
10522
|
}, {
|
|
10479
10523
|
key: "deleteSegment",
|
|
10480
10524
|
value: function () {
|
|
10481
|
-
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10482
|
-
return _regeneratorRuntime.wrap(function
|
|
10525
|
+
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(id) {
|
|
10526
|
+
return _regeneratorRuntime.wrap(function _callee61$(_context61) {
|
|
10483
10527
|
while (1) {
|
|
10484
|
-
switch (
|
|
10528
|
+
switch (_context61.prev = _context61.next) {
|
|
10485
10529
|
case 0:
|
|
10486
|
-
return
|
|
10530
|
+
return _context61.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
|
|
10487
10531
|
|
|
10488
10532
|
case 1:
|
|
10489
10533
|
case "end":
|
|
10490
|
-
return
|
|
10534
|
+
return _context61.stop();
|
|
10491
10535
|
}
|
|
10492
10536
|
}
|
|
10493
|
-
},
|
|
10537
|
+
}, _callee61, this);
|
|
10494
10538
|
}));
|
|
10495
10539
|
|
|
10496
|
-
function deleteSegment(
|
|
10540
|
+
function deleteSegment(_x83) {
|
|
10497
10541
|
return _deleteSegment.apply(this, arguments);
|
|
10498
10542
|
}
|
|
10499
10543
|
|
|
@@ -10510,32 +10554,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10510
10554
|
}, {
|
|
10511
10555
|
key: "createCampaign",
|
|
10512
10556
|
value: function () {
|
|
10513
|
-
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10557
|
+
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(params) {
|
|
10514
10558
|
var _yield$this$post2, campaign;
|
|
10515
10559
|
|
|
10516
|
-
return _regeneratorRuntime.wrap(function
|
|
10560
|
+
return _regeneratorRuntime.wrap(function _callee62$(_context62) {
|
|
10517
10561
|
while (1) {
|
|
10518
|
-
switch (
|
|
10562
|
+
switch (_context62.prev = _context62.next) {
|
|
10519
10563
|
case 0:
|
|
10520
|
-
|
|
10564
|
+
_context62.next = 2;
|
|
10521
10565
|
return this.post(this.baseURL + "/campaigns", {
|
|
10522
10566
|
campaign: params
|
|
10523
10567
|
});
|
|
10524
10568
|
|
|
10525
10569
|
case 2:
|
|
10526
|
-
_yield$this$post2 =
|
|
10570
|
+
_yield$this$post2 = _context62.sent;
|
|
10527
10571
|
campaign = _yield$this$post2.campaign;
|
|
10528
|
-
return
|
|
10572
|
+
return _context62.abrupt("return", campaign);
|
|
10529
10573
|
|
|
10530
10574
|
case 5:
|
|
10531
10575
|
case "end":
|
|
10532
|
-
return
|
|
10576
|
+
return _context62.stop();
|
|
10533
10577
|
}
|
|
10534
10578
|
}
|
|
10535
|
-
},
|
|
10579
|
+
}, _callee62, this);
|
|
10536
10580
|
}));
|
|
10537
10581
|
|
|
10538
|
-
function createCampaign(
|
|
10582
|
+
function createCampaign(_x84) {
|
|
10539
10583
|
return _createCampaign.apply(this, arguments);
|
|
10540
10584
|
}
|
|
10541
10585
|
|
|
@@ -10551,15 +10595,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10551
10595
|
}, {
|
|
10552
10596
|
key: "queryCampaigns",
|
|
10553
10597
|
value: function () {
|
|
10554
|
-
var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10598
|
+
var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(filters) {
|
|
10555
10599
|
var options,
|
|
10556
|
-
|
|
10557
|
-
return _regeneratorRuntime.wrap(function
|
|
10600
|
+
_args63 = arguments;
|
|
10601
|
+
return _regeneratorRuntime.wrap(function _callee63$(_context63) {
|
|
10558
10602
|
while (1) {
|
|
10559
|
-
switch (
|
|
10603
|
+
switch (_context63.prev = _context63.next) {
|
|
10560
10604
|
case 0:
|
|
10561
|
-
options =
|
|
10562
|
-
|
|
10605
|
+
options = _args63.length > 1 && _args63[1] !== undefined ? _args63[1] : {};
|
|
10606
|
+
_context63.next = 3;
|
|
10563
10607
|
return this.get(this.baseURL + "/campaigns", {
|
|
10564
10608
|
payload: _objectSpread({
|
|
10565
10609
|
filter_conditions: filters
|
|
@@ -10567,17 +10611,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10567
10611
|
});
|
|
10568
10612
|
|
|
10569
10613
|
case 3:
|
|
10570
|
-
return
|
|
10614
|
+
return _context63.abrupt("return", _context63.sent);
|
|
10571
10615
|
|
|
10572
10616
|
case 4:
|
|
10573
10617
|
case "end":
|
|
10574
|
-
return
|
|
10618
|
+
return _context63.stop();
|
|
10575
10619
|
}
|
|
10576
10620
|
}
|
|
10577
|
-
},
|
|
10621
|
+
}, _callee63, this);
|
|
10578
10622
|
}));
|
|
10579
10623
|
|
|
10580
|
-
function queryCampaigns(
|
|
10624
|
+
function queryCampaigns(_x85) {
|
|
10581
10625
|
return _queryCampaigns.apply(this, arguments);
|
|
10582
10626
|
}
|
|
10583
10627
|
|
|
@@ -10595,32 +10639,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10595
10639
|
}, {
|
|
10596
10640
|
key: "updateCampaign",
|
|
10597
10641
|
value: function () {
|
|
10598
|
-
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10642
|
+
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(id, params) {
|
|
10599
10643
|
var _yield$this$put2, campaign;
|
|
10600
10644
|
|
|
10601
|
-
return _regeneratorRuntime.wrap(function
|
|
10645
|
+
return _regeneratorRuntime.wrap(function _callee64$(_context64) {
|
|
10602
10646
|
while (1) {
|
|
10603
|
-
switch (
|
|
10647
|
+
switch (_context64.prev = _context64.next) {
|
|
10604
10648
|
case 0:
|
|
10605
|
-
|
|
10649
|
+
_context64.next = 2;
|
|
10606
10650
|
return this.put(this.baseURL + "/campaigns/".concat(id), {
|
|
10607
10651
|
campaign: params
|
|
10608
10652
|
});
|
|
10609
10653
|
|
|
10610
10654
|
case 2:
|
|
10611
|
-
_yield$this$put2 =
|
|
10655
|
+
_yield$this$put2 = _context64.sent;
|
|
10612
10656
|
campaign = _yield$this$put2.campaign;
|
|
10613
|
-
return
|
|
10657
|
+
return _context64.abrupt("return", campaign);
|
|
10614
10658
|
|
|
10615
10659
|
case 5:
|
|
10616
10660
|
case "end":
|
|
10617
|
-
return
|
|
10661
|
+
return _context64.stop();
|
|
10618
10662
|
}
|
|
10619
10663
|
}
|
|
10620
|
-
},
|
|
10664
|
+
}, _callee64, this);
|
|
10621
10665
|
}));
|
|
10622
10666
|
|
|
10623
|
-
function updateCampaign(
|
|
10667
|
+
function updateCampaign(_x86, _x87) {
|
|
10624
10668
|
return _updateCampaign.apply(this, arguments);
|
|
10625
10669
|
}
|
|
10626
10670
|
|
|
@@ -10637,25 +10681,25 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10637
10681
|
}, {
|
|
10638
10682
|
key: "deleteCampaign",
|
|
10639
10683
|
value: function () {
|
|
10640
|
-
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10684
|
+
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(id) {
|
|
10641
10685
|
var params,
|
|
10642
|
-
|
|
10643
|
-
return _regeneratorRuntime.wrap(function
|
|
10686
|
+
_args65 = arguments;
|
|
10687
|
+
return _regeneratorRuntime.wrap(function _callee65$(_context65) {
|
|
10644
10688
|
while (1) {
|
|
10645
|
-
switch (
|
|
10689
|
+
switch (_context65.prev = _context65.next) {
|
|
10646
10690
|
case 0:
|
|
10647
|
-
params =
|
|
10648
|
-
return
|
|
10691
|
+
params = _args65.length > 1 && _args65[1] !== undefined ? _args65[1] : {};
|
|
10692
|
+
return _context65.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id), params));
|
|
10649
10693
|
|
|
10650
10694
|
case 2:
|
|
10651
10695
|
case "end":
|
|
10652
|
-
return
|
|
10696
|
+
return _context65.stop();
|
|
10653
10697
|
}
|
|
10654
10698
|
}
|
|
10655
|
-
},
|
|
10699
|
+
}, _callee65, this);
|
|
10656
10700
|
}));
|
|
10657
10701
|
|
|
10658
|
-
function deleteCampaign(
|
|
10702
|
+
function deleteCampaign(_x88) {
|
|
10659
10703
|
return _deleteCampaign.apply(this, arguments);
|
|
10660
10704
|
}
|
|
10661
10705
|
|
|
@@ -10673,33 +10717,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10673
10717
|
}, {
|
|
10674
10718
|
key: "scheduleCampaign",
|
|
10675
10719
|
value: function () {
|
|
10676
|
-
var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10720
|
+
var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(id, params) {
|
|
10677
10721
|
var scheduledFor, _yield$this$patch, campaign;
|
|
10678
10722
|
|
|
10679
|
-
return _regeneratorRuntime.wrap(function
|
|
10723
|
+
return _regeneratorRuntime.wrap(function _callee66$(_context66) {
|
|
10680
10724
|
while (1) {
|
|
10681
|
-
switch (
|
|
10725
|
+
switch (_context66.prev = _context66.next) {
|
|
10682
10726
|
case 0:
|
|
10683
10727
|
scheduledFor = params.scheduledFor;
|
|
10684
|
-
|
|
10728
|
+
_context66.next = 3;
|
|
10685
10729
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/schedule"), {
|
|
10686
10730
|
scheduled_for: scheduledFor
|
|
10687
10731
|
});
|
|
10688
10732
|
|
|
10689
10733
|
case 3:
|
|
10690
|
-
_yield$this$patch =
|
|
10734
|
+
_yield$this$patch = _context66.sent;
|
|
10691
10735
|
campaign = _yield$this$patch.campaign;
|
|
10692
|
-
return
|
|
10736
|
+
return _context66.abrupt("return", campaign);
|
|
10693
10737
|
|
|
10694
10738
|
case 6:
|
|
10695
10739
|
case "end":
|
|
10696
|
-
return
|
|
10740
|
+
return _context66.stop();
|
|
10697
10741
|
}
|
|
10698
10742
|
}
|
|
10699
|
-
},
|
|
10743
|
+
}, _callee66, this);
|
|
10700
10744
|
}));
|
|
10701
10745
|
|
|
10702
|
-
function scheduleCampaign(
|
|
10746
|
+
function scheduleCampaign(_x89, _x90) {
|
|
10703
10747
|
return _scheduleCampaign.apply(this, arguments);
|
|
10704
10748
|
}
|
|
10705
10749
|
|
|
@@ -10716,30 +10760,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10716
10760
|
}, {
|
|
10717
10761
|
key: "stopCampaign",
|
|
10718
10762
|
value: function () {
|
|
10719
|
-
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10763
|
+
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(id) {
|
|
10720
10764
|
var _yield$this$patch2, campaign;
|
|
10721
10765
|
|
|
10722
|
-
return _regeneratorRuntime.wrap(function
|
|
10766
|
+
return _regeneratorRuntime.wrap(function _callee67$(_context67) {
|
|
10723
10767
|
while (1) {
|
|
10724
|
-
switch (
|
|
10768
|
+
switch (_context67.prev = _context67.next) {
|
|
10725
10769
|
case 0:
|
|
10726
|
-
|
|
10770
|
+
_context67.next = 2;
|
|
10727
10771
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/stop"));
|
|
10728
10772
|
|
|
10729
10773
|
case 2:
|
|
10730
|
-
_yield$this$patch2 =
|
|
10774
|
+
_yield$this$patch2 = _context67.sent;
|
|
10731
10775
|
campaign = _yield$this$patch2.campaign;
|
|
10732
|
-
return
|
|
10776
|
+
return _context67.abrupt("return", campaign);
|
|
10733
10777
|
|
|
10734
10778
|
case 5:
|
|
10735
10779
|
case "end":
|
|
10736
|
-
return
|
|
10780
|
+
return _context67.stop();
|
|
10737
10781
|
}
|
|
10738
10782
|
}
|
|
10739
|
-
},
|
|
10783
|
+
}, _callee67, this);
|
|
10740
10784
|
}));
|
|
10741
10785
|
|
|
10742
|
-
function stopCampaign(
|
|
10786
|
+
function stopCampaign(_x91) {
|
|
10743
10787
|
return _stopCampaign.apply(this, arguments);
|
|
10744
10788
|
}
|
|
10745
10789
|
|
|
@@ -10756,30 +10800,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10756
10800
|
}, {
|
|
10757
10801
|
key: "resumeCampaign",
|
|
10758
10802
|
value: function () {
|
|
10759
|
-
var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10803
|
+
var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(id) {
|
|
10760
10804
|
var _yield$this$patch3, campaign;
|
|
10761
10805
|
|
|
10762
|
-
return _regeneratorRuntime.wrap(function
|
|
10806
|
+
return _regeneratorRuntime.wrap(function _callee68$(_context68) {
|
|
10763
10807
|
while (1) {
|
|
10764
|
-
switch (
|
|
10808
|
+
switch (_context68.prev = _context68.next) {
|
|
10765
10809
|
case 0:
|
|
10766
|
-
|
|
10810
|
+
_context68.next = 2;
|
|
10767
10811
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/resume"));
|
|
10768
10812
|
|
|
10769
10813
|
case 2:
|
|
10770
|
-
_yield$this$patch3 =
|
|
10814
|
+
_yield$this$patch3 = _context68.sent;
|
|
10771
10815
|
campaign = _yield$this$patch3.campaign;
|
|
10772
|
-
return
|
|
10816
|
+
return _context68.abrupt("return", campaign);
|
|
10773
10817
|
|
|
10774
10818
|
case 5:
|
|
10775
10819
|
case "end":
|
|
10776
|
-
return
|
|
10820
|
+
return _context68.stop();
|
|
10777
10821
|
}
|
|
10778
10822
|
}
|
|
10779
|
-
},
|
|
10823
|
+
}, _callee68, this);
|
|
10780
10824
|
}));
|
|
10781
10825
|
|
|
10782
|
-
function resumeCampaign(
|
|
10826
|
+
function resumeCampaign(_x92) {
|
|
10783
10827
|
return _resumeCampaign.apply(this, arguments);
|
|
10784
10828
|
}
|
|
10785
10829
|
|
|
@@ -10797,30 +10841,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10797
10841
|
}, {
|
|
10798
10842
|
key: "testCampaign",
|
|
10799
10843
|
value: function () {
|
|
10800
|
-
var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10844
|
+
var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(id, params) {
|
|
10801
10845
|
var users;
|
|
10802
|
-
return _regeneratorRuntime.wrap(function
|
|
10846
|
+
return _regeneratorRuntime.wrap(function _callee69$(_context69) {
|
|
10803
10847
|
while (1) {
|
|
10804
|
-
switch (
|
|
10848
|
+
switch (_context69.prev = _context69.next) {
|
|
10805
10849
|
case 0:
|
|
10806
10850
|
users = params.users;
|
|
10807
|
-
|
|
10851
|
+
_context69.next = 3;
|
|
10808
10852
|
return this.post(this.baseURL + "/campaigns/".concat(id, "/test"), {
|
|
10809
10853
|
users: users
|
|
10810
10854
|
});
|
|
10811
10855
|
|
|
10812
10856
|
case 3:
|
|
10813
|
-
return
|
|
10857
|
+
return _context69.abrupt("return", _context69.sent);
|
|
10814
10858
|
|
|
10815
10859
|
case 4:
|
|
10816
10860
|
case "end":
|
|
10817
|
-
return
|
|
10861
|
+
return _context69.stop();
|
|
10818
10862
|
}
|
|
10819
10863
|
}
|
|
10820
|
-
},
|
|
10864
|
+
}, _callee69, this);
|
|
10821
10865
|
}));
|
|
10822
10866
|
|
|
10823
|
-
function testCampaign(
|
|
10867
|
+
function testCampaign(_x93, _x94) {
|
|
10824
10868
|
return _testCampaign.apply(this, arguments);
|
|
10825
10869
|
}
|
|
10826
10870
|
|
|
@@ -10836,15 +10880,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10836
10880
|
}, {
|
|
10837
10881
|
key: "queryRecipients",
|
|
10838
10882
|
value: function () {
|
|
10839
|
-
var _queryRecipients = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10883
|
+
var _queryRecipients = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(filters) {
|
|
10840
10884
|
var options,
|
|
10841
|
-
|
|
10842
|
-
return _regeneratorRuntime.wrap(function
|
|
10885
|
+
_args70 = arguments;
|
|
10886
|
+
return _regeneratorRuntime.wrap(function _callee70$(_context70) {
|
|
10843
10887
|
while (1) {
|
|
10844
|
-
switch (
|
|
10888
|
+
switch (_context70.prev = _context70.next) {
|
|
10845
10889
|
case 0:
|
|
10846
|
-
options =
|
|
10847
|
-
|
|
10890
|
+
options = _args70.length > 1 && _args70[1] !== undefined ? _args70[1] : {};
|
|
10891
|
+
_context70.next = 3;
|
|
10848
10892
|
return this.get(this.baseURL + "/recipients", {
|
|
10849
10893
|
payload: _objectSpread({
|
|
10850
10894
|
filter_conditions: filters
|
|
@@ -10852,17 +10896,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10852
10896
|
});
|
|
10853
10897
|
|
|
10854
10898
|
case 3:
|
|
10855
|
-
return
|
|
10899
|
+
return _context70.abrupt("return", _context70.sent);
|
|
10856
10900
|
|
|
10857
10901
|
case 4:
|
|
10858
10902
|
case "end":
|
|
10859
|
-
return
|
|
10903
|
+
return _context70.stop();
|
|
10860
10904
|
}
|
|
10861
10905
|
}
|
|
10862
|
-
},
|
|
10906
|
+
}, _callee70, this);
|
|
10863
10907
|
}));
|
|
10864
10908
|
|
|
10865
|
-
function queryRecipients(
|
|
10909
|
+
function queryRecipients(_x95) {
|
|
10866
10910
|
return _queryRecipients.apply(this, arguments);
|
|
10867
10911
|
}
|
|
10868
10912
|
|
|
@@ -10878,24 +10922,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10878
10922
|
}, {
|
|
10879
10923
|
key: "enrichURL",
|
|
10880
10924
|
value: function () {
|
|
10881
|
-
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10882
|
-
return _regeneratorRuntime.wrap(function
|
|
10925
|
+
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(url) {
|
|
10926
|
+
return _regeneratorRuntime.wrap(function _callee71$(_context71) {
|
|
10883
10927
|
while (1) {
|
|
10884
|
-
switch (
|
|
10928
|
+
switch (_context71.prev = _context71.next) {
|
|
10885
10929
|
case 0:
|
|
10886
|
-
return
|
|
10930
|
+
return _context71.abrupt("return", this.get(this.baseURL + "/og", {
|
|
10887
10931
|
url: url
|
|
10888
10932
|
}));
|
|
10889
10933
|
|
|
10890
10934
|
case 1:
|
|
10891
10935
|
case "end":
|
|
10892
|
-
return
|
|
10936
|
+
return _context71.stop();
|
|
10893
10937
|
}
|
|
10894
10938
|
}
|
|
10895
|
-
},
|
|
10939
|
+
}, _callee71, this);
|
|
10896
10940
|
}));
|
|
10897
10941
|
|
|
10898
|
-
function enrichURL(
|
|
10942
|
+
function enrichURL(_x96) {
|
|
10899
10943
|
return _enrichURL.apply(this, arguments);
|
|
10900
10944
|
}
|
|
10901
10945
|
|
|
@@ -10912,22 +10956,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10912
10956
|
}, {
|
|
10913
10957
|
key: "getTask",
|
|
10914
10958
|
value: function () {
|
|
10915
|
-
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10916
|
-
return _regeneratorRuntime.wrap(function
|
|
10959
|
+
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(id) {
|
|
10960
|
+
return _regeneratorRuntime.wrap(function _callee72$(_context72) {
|
|
10917
10961
|
while (1) {
|
|
10918
|
-
switch (
|
|
10962
|
+
switch (_context72.prev = _context72.next) {
|
|
10919
10963
|
case 0:
|
|
10920
|
-
return
|
|
10964
|
+
return _context72.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
|
|
10921
10965
|
|
|
10922
10966
|
case 1:
|
|
10923
10967
|
case "end":
|
|
10924
|
-
return
|
|
10968
|
+
return _context72.stop();
|
|
10925
10969
|
}
|
|
10926
10970
|
}
|
|
10927
|
-
},
|
|
10971
|
+
}, _callee72, this);
|
|
10928
10972
|
}));
|
|
10929
10973
|
|
|
10930
|
-
function getTask(
|
|
10974
|
+
function getTask(_x97) {
|
|
10931
10975
|
return _getTask.apply(this, arguments);
|
|
10932
10976
|
}
|
|
10933
10977
|
|
|
@@ -10945,31 +10989,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10945
10989
|
}, {
|
|
10946
10990
|
key: "deleteChannels",
|
|
10947
10991
|
value: function () {
|
|
10948
|
-
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10992
|
+
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(cids) {
|
|
10949
10993
|
var options,
|
|
10950
|
-
|
|
10951
|
-
return _regeneratorRuntime.wrap(function
|
|
10994
|
+
_args73 = arguments;
|
|
10995
|
+
return _regeneratorRuntime.wrap(function _callee73$(_context73) {
|
|
10952
10996
|
while (1) {
|
|
10953
|
-
switch (
|
|
10997
|
+
switch (_context73.prev = _context73.next) {
|
|
10954
10998
|
case 0:
|
|
10955
|
-
options =
|
|
10956
|
-
|
|
10999
|
+
options = _args73.length > 1 && _args73[1] !== undefined ? _args73[1] : {};
|
|
11000
|
+
_context73.next = 3;
|
|
10957
11001
|
return this.post(this.baseURL + "/channels/delete", _objectSpread({
|
|
10958
11002
|
cids: cids
|
|
10959
11003
|
}, options));
|
|
10960
11004
|
|
|
10961
11005
|
case 3:
|
|
10962
|
-
return
|
|
11006
|
+
return _context73.abrupt("return", _context73.sent);
|
|
10963
11007
|
|
|
10964
11008
|
case 4:
|
|
10965
11009
|
case "end":
|
|
10966
|
-
return
|
|
11010
|
+
return _context73.stop();
|
|
10967
11011
|
}
|
|
10968
11012
|
}
|
|
10969
|
-
},
|
|
11013
|
+
}, _callee73, this);
|
|
10970
11014
|
}));
|
|
10971
11015
|
|
|
10972
|
-
function deleteChannels(
|
|
11016
|
+
function deleteChannels(_x98) {
|
|
10973
11017
|
return _deleteChannels.apply(this, arguments);
|
|
10974
11018
|
}
|
|
10975
11019
|
|
|
@@ -10987,13 +11031,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10987
11031
|
}, {
|
|
10988
11032
|
key: "deleteUsers",
|
|
10989
11033
|
value: function () {
|
|
10990
|
-
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10991
|
-
return _regeneratorRuntime.wrap(function
|
|
11034
|
+
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(user_ids, options) {
|
|
11035
|
+
return _regeneratorRuntime.wrap(function _callee74$(_context74) {
|
|
10992
11036
|
while (1) {
|
|
10993
|
-
switch (
|
|
11037
|
+
switch (_context74.prev = _context74.next) {
|
|
10994
11038
|
case 0:
|
|
10995
11039
|
if (!((options === null || options === void 0 ? void 0 : options.user) !== 'soft' && (options === null || options === void 0 ? void 0 : options.user) !== 'hard')) {
|
|
10996
|
-
|
|
11040
|
+
_context74.next = 2;
|
|
10997
11041
|
break;
|
|
10998
11042
|
}
|
|
10999
11043
|
|
|
@@ -11001,7 +11045,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11001
11045
|
|
|
11002
11046
|
case 2:
|
|
11003
11047
|
if (!(options.messages !== undefined && options.messages !== 'soft' && options.messages !== 'hard')) {
|
|
11004
|
-
|
|
11048
|
+
_context74.next = 4;
|
|
11005
11049
|
break;
|
|
11006
11050
|
}
|
|
11007
11051
|
|
|
@@ -11009,30 +11053,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11009
11053
|
|
|
11010
11054
|
case 4:
|
|
11011
11055
|
if (!(options.conversations !== undefined && options.conversations !== 'soft' && options.conversations !== 'hard')) {
|
|
11012
|
-
|
|
11056
|
+
_context74.next = 6;
|
|
11013
11057
|
break;
|
|
11014
11058
|
}
|
|
11015
11059
|
|
|
11016
11060
|
throw new Error('Invalid delete user options. conversations must be one of [soft hard]');
|
|
11017
11061
|
|
|
11018
11062
|
case 6:
|
|
11019
|
-
|
|
11063
|
+
_context74.next = 8;
|
|
11020
11064
|
return this.post(this.baseURL + "/users/delete", _objectSpread({
|
|
11021
11065
|
user_ids: user_ids
|
|
11022
11066
|
}, options));
|
|
11023
11067
|
|
|
11024
11068
|
case 8:
|
|
11025
|
-
return
|
|
11069
|
+
return _context74.abrupt("return", _context74.sent);
|
|
11026
11070
|
|
|
11027
11071
|
case 9:
|
|
11028
11072
|
case "end":
|
|
11029
|
-
return
|
|
11073
|
+
return _context74.stop();
|
|
11030
11074
|
}
|
|
11031
11075
|
}
|
|
11032
|
-
},
|
|
11076
|
+
}, _callee74, this);
|
|
11033
11077
|
}));
|
|
11034
11078
|
|
|
11035
|
-
function deleteUsers(
|
|
11079
|
+
function deleteUsers(_x99, _x100) {
|
|
11036
11080
|
return _deleteUsers.apply(this, arguments);
|
|
11037
11081
|
}
|
|
11038
11082
|
|
|
@@ -11053,28 +11097,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11053
11097
|
}, {
|
|
11054
11098
|
key: "_createImportURL",
|
|
11055
11099
|
value: function () {
|
|
11056
|
-
var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11057
|
-
return _regeneratorRuntime.wrap(function
|
|
11100
|
+
var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(filename) {
|
|
11101
|
+
return _regeneratorRuntime.wrap(function _callee75$(_context75) {
|
|
11058
11102
|
while (1) {
|
|
11059
|
-
switch (
|
|
11103
|
+
switch (_context75.prev = _context75.next) {
|
|
11060
11104
|
case 0:
|
|
11061
|
-
|
|
11105
|
+
_context75.next = 2;
|
|
11062
11106
|
return this.post(this.baseURL + "/import_urls", {
|
|
11063
11107
|
filename: filename
|
|
11064
11108
|
});
|
|
11065
11109
|
|
|
11066
11110
|
case 2:
|
|
11067
|
-
return
|
|
11111
|
+
return _context75.abrupt("return", _context75.sent);
|
|
11068
11112
|
|
|
11069
11113
|
case 3:
|
|
11070
11114
|
case "end":
|
|
11071
|
-
return
|
|
11115
|
+
return _context75.stop();
|
|
11072
11116
|
}
|
|
11073
11117
|
}
|
|
11074
|
-
},
|
|
11118
|
+
}, _callee75, this);
|
|
11075
11119
|
}));
|
|
11076
11120
|
|
|
11077
|
-
function _createImportURL(
|
|
11121
|
+
function _createImportURL(_x101) {
|
|
11078
11122
|
return _createImportURL2.apply(this, arguments);
|
|
11079
11123
|
}
|
|
11080
11124
|
|
|
@@ -11096,33 +11140,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11096
11140
|
}, {
|
|
11097
11141
|
key: "_createImport",
|
|
11098
11142
|
value: function () {
|
|
11099
|
-
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11143
|
+
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(path) {
|
|
11100
11144
|
var options,
|
|
11101
|
-
|
|
11102
|
-
return _regeneratorRuntime.wrap(function
|
|
11145
|
+
_args76 = arguments;
|
|
11146
|
+
return _regeneratorRuntime.wrap(function _callee76$(_context76) {
|
|
11103
11147
|
while (1) {
|
|
11104
|
-
switch (
|
|
11148
|
+
switch (_context76.prev = _context76.next) {
|
|
11105
11149
|
case 0:
|
|
11106
|
-
options =
|
|
11150
|
+
options = _args76.length > 1 && _args76[1] !== undefined ? _args76[1] : {
|
|
11107
11151
|
mode: 'upsert'
|
|
11108
11152
|
};
|
|
11109
|
-
|
|
11153
|
+
_context76.next = 3;
|
|
11110
11154
|
return this.post(this.baseURL + "/imports", _objectSpread({
|
|
11111
11155
|
path: path
|
|
11112
11156
|
}, options));
|
|
11113
11157
|
|
|
11114
11158
|
case 3:
|
|
11115
|
-
return
|
|
11159
|
+
return _context76.abrupt("return", _context76.sent);
|
|
11116
11160
|
|
|
11117
11161
|
case 4:
|
|
11118
11162
|
case "end":
|
|
11119
|
-
return
|
|
11163
|
+
return _context76.stop();
|
|
11120
11164
|
}
|
|
11121
11165
|
}
|
|
11122
|
-
},
|
|
11166
|
+
}, _callee76, this);
|
|
11123
11167
|
}));
|
|
11124
11168
|
|
|
11125
|
-
function _createImport(
|
|
11169
|
+
function _createImport(_x102) {
|
|
11126
11170
|
return _createImport2.apply(this, arguments);
|
|
11127
11171
|
}
|
|
11128
11172
|
|
|
@@ -11144,26 +11188,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11144
11188
|
}, {
|
|
11145
11189
|
key: "_getImport",
|
|
11146
11190
|
value: function () {
|
|
11147
|
-
var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11148
|
-
return _regeneratorRuntime.wrap(function
|
|
11191
|
+
var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77(id) {
|
|
11192
|
+
return _regeneratorRuntime.wrap(function _callee77$(_context77) {
|
|
11149
11193
|
while (1) {
|
|
11150
|
-
switch (
|
|
11194
|
+
switch (_context77.prev = _context77.next) {
|
|
11151
11195
|
case 0:
|
|
11152
|
-
|
|
11196
|
+
_context77.next = 2;
|
|
11153
11197
|
return this.get(this.baseURL + "/imports/".concat(id));
|
|
11154
11198
|
|
|
11155
11199
|
case 2:
|
|
11156
|
-
return
|
|
11200
|
+
return _context77.abrupt("return", _context77.sent);
|
|
11157
11201
|
|
|
11158
11202
|
case 3:
|
|
11159
11203
|
case "end":
|
|
11160
|
-
return
|
|
11204
|
+
return _context77.stop();
|
|
11161
11205
|
}
|
|
11162
11206
|
}
|
|
11163
|
-
},
|
|
11207
|
+
}, _callee77, this);
|
|
11164
11208
|
}));
|
|
11165
11209
|
|
|
11166
|
-
function _getImport(
|
|
11210
|
+
function _getImport(_x103) {
|
|
11167
11211
|
return _getImport2.apply(this, arguments);
|
|
11168
11212
|
}
|
|
11169
11213
|
|
|
@@ -11185,26 +11229,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11185
11229
|
}, {
|
|
11186
11230
|
key: "_listImports",
|
|
11187
11231
|
value: function () {
|
|
11188
|
-
var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11189
|
-
return _regeneratorRuntime.wrap(function
|
|
11232
|
+
var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78(options) {
|
|
11233
|
+
return _regeneratorRuntime.wrap(function _callee78$(_context78) {
|
|
11190
11234
|
while (1) {
|
|
11191
|
-
switch (
|
|
11235
|
+
switch (_context78.prev = _context78.next) {
|
|
11192
11236
|
case 0:
|
|
11193
|
-
|
|
11237
|
+
_context78.next = 2;
|
|
11194
11238
|
return this.get(this.baseURL + "/imports", options);
|
|
11195
11239
|
|
|
11196
11240
|
case 2:
|
|
11197
|
-
return
|
|
11241
|
+
return _context78.abrupt("return", _context78.sent);
|
|
11198
11242
|
|
|
11199
11243
|
case 3:
|
|
11200
11244
|
case "end":
|
|
11201
|
-
return
|
|
11245
|
+
return _context78.stop();
|
|
11202
11246
|
}
|
|
11203
11247
|
}
|
|
11204
|
-
},
|
|
11248
|
+
}, _callee78, this);
|
|
11205
11249
|
}));
|
|
11206
11250
|
|
|
11207
|
-
function _listImports(
|
|
11251
|
+
function _listImports(_x104) {
|
|
11208
11252
|
return _listImports2.apply(this, arguments);
|
|
11209
11253
|
}
|
|
11210
11254
|
|
|
@@ -11223,28 +11267,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11223
11267
|
}, {
|
|
11224
11268
|
key: "upsertPushProvider",
|
|
11225
11269
|
value: function () {
|
|
11226
|
-
var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11227
|
-
return _regeneratorRuntime.wrap(function
|
|
11270
|
+
var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(pushProvider) {
|
|
11271
|
+
return _regeneratorRuntime.wrap(function _callee79$(_context79) {
|
|
11228
11272
|
while (1) {
|
|
11229
|
-
switch (
|
|
11273
|
+
switch (_context79.prev = _context79.next) {
|
|
11230
11274
|
case 0:
|
|
11231
|
-
|
|
11275
|
+
_context79.next = 2;
|
|
11232
11276
|
return this.post(this.baseURL + "/push_providers", {
|
|
11233
11277
|
push_provider: pushProvider
|
|
11234
11278
|
});
|
|
11235
11279
|
|
|
11236
11280
|
case 2:
|
|
11237
|
-
return
|
|
11281
|
+
return _context79.abrupt("return", _context79.sent);
|
|
11238
11282
|
|
|
11239
11283
|
case 3:
|
|
11240
11284
|
case "end":
|
|
11241
|
-
return
|
|
11285
|
+
return _context79.stop();
|
|
11242
11286
|
}
|
|
11243
11287
|
}
|
|
11244
|
-
},
|
|
11288
|
+
}, _callee79, this);
|
|
11245
11289
|
}));
|
|
11246
11290
|
|
|
11247
|
-
function upsertPushProvider(
|
|
11291
|
+
function upsertPushProvider(_x105) {
|
|
11248
11292
|
return _upsertPushProvider.apply(this, arguments);
|
|
11249
11293
|
}
|
|
11250
11294
|
|
|
@@ -11263,28 +11307,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11263
11307
|
}, {
|
|
11264
11308
|
key: "deletePushProvider",
|
|
11265
11309
|
value: function () {
|
|
11266
|
-
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11310
|
+
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee80(_ref10) {
|
|
11267
11311
|
var type, name;
|
|
11268
|
-
return _regeneratorRuntime.wrap(function
|
|
11312
|
+
return _regeneratorRuntime.wrap(function _callee80$(_context80) {
|
|
11269
11313
|
while (1) {
|
|
11270
|
-
switch (
|
|
11314
|
+
switch (_context80.prev = _context80.next) {
|
|
11271
11315
|
case 0:
|
|
11272
11316
|
type = _ref10.type, name = _ref10.name;
|
|
11273
|
-
|
|
11317
|
+
_context80.next = 3;
|
|
11274
11318
|
return this.delete(this.baseURL + "/push_providers/".concat(type, "/").concat(name));
|
|
11275
11319
|
|
|
11276
11320
|
case 3:
|
|
11277
|
-
return
|
|
11321
|
+
return _context80.abrupt("return", _context80.sent);
|
|
11278
11322
|
|
|
11279
11323
|
case 4:
|
|
11280
11324
|
case "end":
|
|
11281
|
-
return
|
|
11325
|
+
return _context80.stop();
|
|
11282
11326
|
}
|
|
11283
11327
|
}
|
|
11284
|
-
},
|
|
11328
|
+
}, _callee80, this);
|
|
11285
11329
|
}));
|
|
11286
11330
|
|
|
11287
|
-
function deletePushProvider(
|
|
11331
|
+
function deletePushProvider(_x106) {
|
|
11288
11332
|
return _deletePushProvider.apply(this, arguments);
|
|
11289
11333
|
}
|
|
11290
11334
|
|
|
@@ -11301,23 +11345,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11301
11345
|
}, {
|
|
11302
11346
|
key: "listPushProviders",
|
|
11303
11347
|
value: function () {
|
|
11304
|
-
var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11305
|
-
return _regeneratorRuntime.wrap(function
|
|
11348
|
+
var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee81() {
|
|
11349
|
+
return _regeneratorRuntime.wrap(function _callee81$(_context81) {
|
|
11306
11350
|
while (1) {
|
|
11307
|
-
switch (
|
|
11351
|
+
switch (_context81.prev = _context81.next) {
|
|
11308
11352
|
case 0:
|
|
11309
|
-
|
|
11353
|
+
_context81.next = 2;
|
|
11310
11354
|
return this.get(this.baseURL + "/push_providers");
|
|
11311
11355
|
|
|
11312
11356
|
case 2:
|
|
11313
|
-
return
|
|
11357
|
+
return _context81.abrupt("return", _context81.sent);
|
|
11314
11358
|
|
|
11315
11359
|
case 3:
|
|
11316
11360
|
case "end":
|
|
11317
|
-
return
|
|
11361
|
+
return _context81.stop();
|
|
11318
11362
|
}
|
|
11319
11363
|
}
|
|
11320
|
-
},
|
|
11364
|
+
}, _callee81, this);
|
|
11321
11365
|
}));
|
|
11322
11366
|
|
|
11323
11367
|
function listPushProviders() {
|
|
@@ -11345,26 +11389,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11345
11389
|
}, {
|
|
11346
11390
|
key: "commitMessage",
|
|
11347
11391
|
value: function () {
|
|
11348
|
-
var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11349
|
-
return _regeneratorRuntime.wrap(function
|
|
11392
|
+
var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee82(id) {
|
|
11393
|
+
return _regeneratorRuntime.wrap(function _callee82$(_context82) {
|
|
11350
11394
|
while (1) {
|
|
11351
|
-
switch (
|
|
11395
|
+
switch (_context82.prev = _context82.next) {
|
|
11352
11396
|
case 0:
|
|
11353
|
-
|
|
11397
|
+
_context82.next = 2;
|
|
11354
11398
|
return this.post(this.baseURL + "/messages/".concat(id, "/commit"));
|
|
11355
11399
|
|
|
11356
11400
|
case 2:
|
|
11357
|
-
return
|
|
11401
|
+
return _context82.abrupt("return", _context82.sent);
|
|
11358
11402
|
|
|
11359
11403
|
case 3:
|
|
11360
11404
|
case "end":
|
|
11361
|
-
return
|
|
11405
|
+
return _context82.stop();
|
|
11362
11406
|
}
|
|
11363
11407
|
}
|
|
11364
|
-
},
|
|
11408
|
+
}, _callee82, this);
|
|
11365
11409
|
}));
|
|
11366
11410
|
|
|
11367
|
-
function commitMessage(
|
|
11411
|
+
function commitMessage(_x107) {
|
|
11368
11412
|
return _commitMessage.apply(this, arguments);
|
|
11369
11413
|
}
|
|
11370
11414
|
|