stream-chat 5.2.0 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.es.js +280 -231
- 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 +280 -231
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +280 -231
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +280 -231
- package/dist/index.js.map +1 -1
- package/dist/types/channel.d.ts.map +1 -1
- package/dist/types/channel_state.d.ts +7 -4
- package/dist/types/channel_state.d.ts.map +1 -1
- package/dist/types/client.d.ts +26 -1
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/types.d.ts +15 -7
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/channel.ts +11 -4
- package/src/channel_state.ts +6 -1
- package/src/client.ts +21 -2
- package/src/types.ts +16 -7
package/dist/index.es.js
CHANGED
|
@@ -3194,7 +3194,8 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3194
3194
|
channelState.read[event.user.id] = {
|
|
3195
3195
|
// because in client.ts the handleEvent call that flows to this sets this `event.received_at = new Date();`
|
|
3196
3196
|
last_read: event.received_at,
|
|
3197
|
-
user: event.user
|
|
3197
|
+
user: event.user,
|
|
3198
|
+
unread_messages: 0
|
|
3198
3199
|
};
|
|
3199
3200
|
|
|
3200
3201
|
if (((_event$user4 = event.user) === null || _event$user4 === void 0 ? void 0 : _event$user4.id) === ((_this$getClient$user = this.getClient().user) === null || _this$getClient$user === void 0 ? void 0 : _this$getClient$user.id)) {
|
|
@@ -3251,7 +3252,8 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3251
3252
|
channelState.unreadCount = 0;
|
|
3252
3253
|
channelState.read[event.user.id] = {
|
|
3253
3254
|
last_read: new Date(event.created_at),
|
|
3254
|
-
user: event.user
|
|
3255
|
+
user: event.user,
|
|
3256
|
+
unread_messages: 0
|
|
3255
3257
|
};
|
|
3256
3258
|
} else if (this._countMessageAsUnread(event.message)) {
|
|
3257
3259
|
channelState.unreadCount = channelState.unreadCount + 1;
|
|
@@ -3430,7 +3432,8 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3430
3432
|
if (user) {
|
|
3431
3433
|
this.state.read[user.id] = {
|
|
3432
3434
|
user: user,
|
|
3433
|
-
last_read: last_read
|
|
3435
|
+
last_read: last_read,
|
|
3436
|
+
unread_messages: 0
|
|
3434
3437
|
};
|
|
3435
3438
|
}
|
|
3436
3439
|
} // apply read state if part of the state
|
|
@@ -3442,16 +3445,17 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3442
3445
|
|
|
3443
3446
|
try {
|
|
3444
3447
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
3445
|
-
var
|
|
3446
|
-
|
|
3447
|
-
var parsedRead = _objectSpread$5(_objectSpread$5({}, read), {}, {
|
|
3448
|
-
last_read: new Date(read.last_read)
|
|
3449
|
-
});
|
|
3448
|
+
var _read$unread_messages;
|
|
3450
3449
|
|
|
3451
|
-
|
|
3450
|
+
var read = _step3.value;
|
|
3451
|
+
this.state.read[read.user.id] = {
|
|
3452
|
+
last_read: new Date(read.last_read),
|
|
3453
|
+
unread_messages: (_read$unread_messages = read.unread_messages) !== null && _read$unread_messages !== void 0 ? _read$unread_messages : 0,
|
|
3454
|
+
user: read.user
|
|
3455
|
+
};
|
|
3452
3456
|
|
|
3453
|
-
if (read.user.id === (user === null || user === void 0 ? void 0 : user.id)
|
|
3454
|
-
this.state.unreadCount =
|
|
3457
|
+
if (read.user.id === (user === null || user === void 0 ? void 0 : user.id)) {
|
|
3458
|
+
this.state.unreadCount = this.state.read[read.user.id].unread_messages;
|
|
3455
3459
|
}
|
|
3456
3460
|
}
|
|
3457
3461
|
} catch (err) {
|
|
@@ -6569,7 +6573,6 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6569
6573
|
apnTemplate: '{}', //if app doesn't have apn configured it will error
|
|
6570
6574
|
firebaseTemplate: '{}', //if app doesn't have firebase configured it will error
|
|
6571
6575
|
firebaseDataTemplate: '{}', //if app doesn't have firebase configured it will error
|
|
6572
|
-
huaweiDataTemplate: '{}' //if app doesn't have huawei configured it will error
|
|
6573
6576
|
skipDevices: true, // skip config/device checks and sending to real devices
|
|
6574
6577
|
}
|
|
6575
6578
|
*/
|
|
@@ -6586,7 +6589,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6586
6589
|
case 0:
|
|
6587
6590
|
data = _args12.length > 1 && _args12[1] !== undefined ? _args12[1] : {};
|
|
6588
6591
|
_context12.next = 3;
|
|
6589
|
-
return this.post(this.baseURL + '/check_push', _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(
|
|
6592
|
+
return this.post(this.baseURL + '/check_push', _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
6590
6593
|
user_id: userID
|
|
6591
6594
|
}, data.messageID ? {
|
|
6592
6595
|
message_id: data.messageID
|
|
@@ -6596,8 +6599,6 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6596
6599
|
firebase_template: data.firebaseTemplate
|
|
6597
6600
|
} : {}), data.firebaseDataTemplate ? {
|
|
6598
6601
|
firebase_data_template: data.firebaseDataTemplate
|
|
6599
|
-
} : {}), data.huaweiDataTemplate ? {
|
|
6600
|
-
huawei_data_template: data.huaweiDataTemplate
|
|
6601
6602
|
} : {}), data.skipDevices ? {
|
|
6602
6603
|
skip_devices: true
|
|
6603
6604
|
} : {}));
|
|
@@ -8542,6 +8543,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8542
8543
|
* It is present for internal usage only.
|
|
8543
8544
|
* This function can, and will, break and/or be removed at any point in time.
|
|
8544
8545
|
*
|
|
8546
|
+
* @private
|
|
8545
8547
|
* @param {FlagReportsFilters} filterConditions MongoDB style filter conditions
|
|
8546
8548
|
* @param {FlagReportsPaginationOptions} options Option object, {limit: 10, offset:0}
|
|
8547
8549
|
*
|
|
@@ -8590,6 +8592,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8590
8592
|
* It is present for internal usage only.
|
|
8591
8593
|
* This function can, and will, break and/or be removed at any point in time.
|
|
8592
8594
|
*
|
|
8595
|
+
* @private
|
|
8593
8596
|
* @param {string} [id] flag report to review
|
|
8594
8597
|
* @param {string} [reviewResult] flag report review result
|
|
8595
8598
|
* @param {string} [options.user_id] currentUserID, only used with serverside auth
|
|
@@ -8630,6 +8633,52 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8630
8633
|
|
|
8631
8634
|
return _reviewFlagReport;
|
|
8632
8635
|
}()
|
|
8636
|
+
/**
|
|
8637
|
+
* _unblockMessage - unblocks message blocked by automod
|
|
8638
|
+
*
|
|
8639
|
+
* Note: Do not use this.
|
|
8640
|
+
* It is present for internal usage only.
|
|
8641
|
+
* This function can, and will, break and/or be removed at any point in time.
|
|
8642
|
+
*
|
|
8643
|
+
* @private
|
|
8644
|
+
* @param {string} targetMessageID
|
|
8645
|
+
* @param {string} [options.user_id] currentUserID, only used with serverside auth
|
|
8646
|
+
* @returns {Promise<APIResponse>}
|
|
8647
|
+
*/
|
|
8648
|
+
|
|
8649
|
+
}, {
|
|
8650
|
+
key: "_unblockMessage",
|
|
8651
|
+
value: function () {
|
|
8652
|
+
var _unblockMessage2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(targetMessageID) {
|
|
8653
|
+
var options,
|
|
8654
|
+
_args44 = arguments;
|
|
8655
|
+
return _regeneratorRuntime.wrap(function _callee44$(_context44) {
|
|
8656
|
+
while (1) {
|
|
8657
|
+
switch (_context44.prev = _context44.next) {
|
|
8658
|
+
case 0:
|
|
8659
|
+
options = _args44.length > 1 && _args44[1] !== undefined ? _args44[1] : {};
|
|
8660
|
+
_context44.next = 3;
|
|
8661
|
+
return this.post(this.baseURL + '/moderation/unblock_message', _objectSpread({
|
|
8662
|
+
target_message_id: targetMessageID
|
|
8663
|
+
}, options));
|
|
8664
|
+
|
|
8665
|
+
case 3:
|
|
8666
|
+
return _context44.abrupt("return", _context44.sent);
|
|
8667
|
+
|
|
8668
|
+
case 4:
|
|
8669
|
+
case "end":
|
|
8670
|
+
return _context44.stop();
|
|
8671
|
+
}
|
|
8672
|
+
}
|
|
8673
|
+
}, _callee44, this);
|
|
8674
|
+
}));
|
|
8675
|
+
|
|
8676
|
+
function _unblockMessage(_x56) {
|
|
8677
|
+
return _unblockMessage2.apply(this, arguments);
|
|
8678
|
+
}
|
|
8679
|
+
|
|
8680
|
+
return _unblockMessage;
|
|
8681
|
+
}()
|
|
8633
8682
|
/**
|
|
8634
8683
|
* @deprecated use markChannelsRead instead
|
|
8635
8684
|
*
|
|
@@ -8651,23 +8700,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8651
8700
|
* @return {Promise<APIResponse>}
|
|
8652
8701
|
*/
|
|
8653
8702
|
function () {
|
|
8654
|
-
var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8703
|
+
var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45() {
|
|
8655
8704
|
var data,
|
|
8656
|
-
|
|
8657
|
-
return _regeneratorRuntime.wrap(function
|
|
8705
|
+
_args45 = arguments;
|
|
8706
|
+
return _regeneratorRuntime.wrap(function _callee45$(_context45) {
|
|
8658
8707
|
while (1) {
|
|
8659
|
-
switch (
|
|
8708
|
+
switch (_context45.prev = _context45.next) {
|
|
8660
8709
|
case 0:
|
|
8661
|
-
data =
|
|
8662
|
-
|
|
8710
|
+
data = _args45.length > 0 && _args45[0] !== undefined ? _args45[0] : {};
|
|
8711
|
+
_context45.next = 3;
|
|
8663
8712
|
return this.post(this.baseURL + '/channels/read', _objectSpread({}, data));
|
|
8664
8713
|
|
|
8665
8714
|
case 3:
|
|
8666
8715
|
case "end":
|
|
8667
|
-
return
|
|
8716
|
+
return _context45.stop();
|
|
8668
8717
|
}
|
|
8669
8718
|
}
|
|
8670
|
-
},
|
|
8719
|
+
}, _callee45, this);
|
|
8671
8720
|
}));
|
|
8672
8721
|
|
|
8673
8722
|
function markChannelsRead() {
|
|
@@ -8742,28 +8791,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8742
8791
|
}, {
|
|
8743
8792
|
key: "translateMessage",
|
|
8744
8793
|
value: function () {
|
|
8745
|
-
var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8746
|
-
return _regeneratorRuntime.wrap(function
|
|
8794
|
+
var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(messageId, language) {
|
|
8795
|
+
return _regeneratorRuntime.wrap(function _callee46$(_context46) {
|
|
8747
8796
|
while (1) {
|
|
8748
|
-
switch (
|
|
8797
|
+
switch (_context46.prev = _context46.next) {
|
|
8749
8798
|
case 0:
|
|
8750
|
-
|
|
8799
|
+
_context46.next = 2;
|
|
8751
8800
|
return this.post(this.baseURL + "/messages/".concat(messageId, "/translate"), {
|
|
8752
8801
|
language: language
|
|
8753
8802
|
});
|
|
8754
8803
|
|
|
8755
8804
|
case 2:
|
|
8756
|
-
return
|
|
8805
|
+
return _context46.abrupt("return", _context46.sent);
|
|
8757
8806
|
|
|
8758
8807
|
case 3:
|
|
8759
8808
|
case "end":
|
|
8760
|
-
return
|
|
8809
|
+
return _context46.stop();
|
|
8761
8810
|
}
|
|
8762
8811
|
}
|
|
8763
|
-
},
|
|
8812
|
+
}, _callee46, this);
|
|
8764
8813
|
}));
|
|
8765
8814
|
|
|
8766
|
-
function translateMessage(
|
|
8815
|
+
function translateMessage(_x57, _x58) {
|
|
8767
8816
|
return _translateMessage.apply(this, arguments);
|
|
8768
8817
|
}
|
|
8769
8818
|
|
|
@@ -8865,14 +8914,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8865
8914
|
}, {
|
|
8866
8915
|
key: "updateMessage",
|
|
8867
8916
|
value: function () {
|
|
8868
|
-
var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
8917
|
+
var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47(message, userId, options) {
|
|
8869
8918
|
var clonedMessage, reservedMessageFields;
|
|
8870
|
-
return _regeneratorRuntime.wrap(function
|
|
8919
|
+
return _regeneratorRuntime.wrap(function _callee47$(_context47) {
|
|
8871
8920
|
while (1) {
|
|
8872
|
-
switch (
|
|
8921
|
+
switch (_context47.prev = _context47.next) {
|
|
8873
8922
|
case 0:
|
|
8874
8923
|
if (message.id) {
|
|
8875
|
-
|
|
8924
|
+
_context47.next = 2;
|
|
8876
8925
|
break;
|
|
8877
8926
|
}
|
|
8878
8927
|
|
|
@@ -8909,23 +8958,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8909
8958
|
});
|
|
8910
8959
|
}
|
|
8911
8960
|
|
|
8912
|
-
|
|
8961
|
+
_context47.next = 10;
|
|
8913
8962
|
return this.post(this.baseURL + "/messages/".concat(message.id), _objectSpread({
|
|
8914
8963
|
message: clonedMessage
|
|
8915
8964
|
}, options));
|
|
8916
8965
|
|
|
8917
8966
|
case 10:
|
|
8918
|
-
return
|
|
8967
|
+
return _context47.abrupt("return", _context47.sent);
|
|
8919
8968
|
|
|
8920
8969
|
case 11:
|
|
8921
8970
|
case "end":
|
|
8922
|
-
return
|
|
8971
|
+
return _context47.stop();
|
|
8923
8972
|
}
|
|
8924
8973
|
}
|
|
8925
|
-
},
|
|
8974
|
+
}, _callee47, this);
|
|
8926
8975
|
}));
|
|
8927
8976
|
|
|
8928
|
-
function updateMessage(
|
|
8977
|
+
function updateMessage(_x59, _x60, _x61) {
|
|
8929
8978
|
return _updateMessage.apply(this, arguments);
|
|
8930
8979
|
}
|
|
8931
8980
|
|
|
@@ -8948,14 +8997,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8948
8997
|
}, {
|
|
8949
8998
|
key: "partialUpdateMessage",
|
|
8950
8999
|
value: function () {
|
|
8951
|
-
var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9000
|
+
var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(id, partialMessageObject, userId, options) {
|
|
8952
9001
|
var user;
|
|
8953
|
-
return _regeneratorRuntime.wrap(function
|
|
9002
|
+
return _regeneratorRuntime.wrap(function _callee48$(_context48) {
|
|
8954
9003
|
while (1) {
|
|
8955
|
-
switch (
|
|
9004
|
+
switch (_context48.prev = _context48.next) {
|
|
8956
9005
|
case 0:
|
|
8957
9006
|
if (id) {
|
|
8958
|
-
|
|
9007
|
+
_context48.next = 2;
|
|
8959
9008
|
break;
|
|
8960
9009
|
}
|
|
8961
9010
|
|
|
@@ -8970,23 +9019,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8970
9019
|
};
|
|
8971
9020
|
}
|
|
8972
9021
|
|
|
8973
|
-
|
|
9022
|
+
_context48.next = 6;
|
|
8974
9023
|
return this.put(this.baseURL + "/messages/".concat(id), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
|
|
8975
9024
|
user: user
|
|
8976
9025
|
}));
|
|
8977
9026
|
|
|
8978
9027
|
case 6:
|
|
8979
|
-
return
|
|
9028
|
+
return _context48.abrupt("return", _context48.sent);
|
|
8980
9029
|
|
|
8981
9030
|
case 7:
|
|
8982
9031
|
case "end":
|
|
8983
|
-
return
|
|
9032
|
+
return _context48.stop();
|
|
8984
9033
|
}
|
|
8985
9034
|
}
|
|
8986
|
-
},
|
|
9035
|
+
}, _callee48, this);
|
|
8987
9036
|
}));
|
|
8988
9037
|
|
|
8989
|
-
function partialUpdateMessage(
|
|
9038
|
+
function partialUpdateMessage(_x62, _x63, _x64, _x65) {
|
|
8990
9039
|
return _partialUpdateMessage.apply(this, arguments);
|
|
8991
9040
|
}
|
|
8992
9041
|
|
|
@@ -8995,11 +9044,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8995
9044
|
}, {
|
|
8996
9045
|
key: "deleteMessage",
|
|
8997
9046
|
value: function () {
|
|
8998
|
-
var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9047
|
+
var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(messageID, hardDelete) {
|
|
8999
9048
|
var params;
|
|
9000
|
-
return _regeneratorRuntime.wrap(function
|
|
9049
|
+
return _regeneratorRuntime.wrap(function _callee49$(_context49) {
|
|
9001
9050
|
while (1) {
|
|
9002
|
-
switch (
|
|
9051
|
+
switch (_context49.prev = _context49.next) {
|
|
9003
9052
|
case 0:
|
|
9004
9053
|
params = {};
|
|
9005
9054
|
|
|
@@ -9009,21 +9058,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9009
9058
|
};
|
|
9010
9059
|
}
|
|
9011
9060
|
|
|
9012
|
-
|
|
9061
|
+
_context49.next = 4;
|
|
9013
9062
|
return this.delete(this.baseURL + "/messages/".concat(messageID), params);
|
|
9014
9063
|
|
|
9015
9064
|
case 4:
|
|
9016
|
-
return
|
|
9065
|
+
return _context49.abrupt("return", _context49.sent);
|
|
9017
9066
|
|
|
9018
9067
|
case 5:
|
|
9019
9068
|
case "end":
|
|
9020
|
-
return
|
|
9069
|
+
return _context49.stop();
|
|
9021
9070
|
}
|
|
9022
9071
|
}
|
|
9023
|
-
},
|
|
9072
|
+
}, _callee49, this);
|
|
9024
9073
|
}));
|
|
9025
9074
|
|
|
9026
|
-
function deleteMessage(
|
|
9075
|
+
function deleteMessage(_x66, _x67) {
|
|
9027
9076
|
return _deleteMessage.apply(this, arguments);
|
|
9028
9077
|
}
|
|
9029
9078
|
|
|
@@ -9032,26 +9081,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9032
9081
|
}, {
|
|
9033
9082
|
key: "getMessage",
|
|
9034
9083
|
value: function () {
|
|
9035
|
-
var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9036
|
-
return _regeneratorRuntime.wrap(function
|
|
9084
|
+
var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50(messageID) {
|
|
9085
|
+
return _regeneratorRuntime.wrap(function _callee50$(_context50) {
|
|
9037
9086
|
while (1) {
|
|
9038
|
-
switch (
|
|
9087
|
+
switch (_context50.prev = _context50.next) {
|
|
9039
9088
|
case 0:
|
|
9040
|
-
|
|
9089
|
+
_context50.next = 2;
|
|
9041
9090
|
return this.get(this.baseURL + "/messages/".concat(messageID));
|
|
9042
9091
|
|
|
9043
9092
|
case 2:
|
|
9044
|
-
return
|
|
9093
|
+
return _context50.abrupt("return", _context50.sent);
|
|
9045
9094
|
|
|
9046
9095
|
case 3:
|
|
9047
9096
|
case "end":
|
|
9048
|
-
return
|
|
9097
|
+
return _context50.stop();
|
|
9049
9098
|
}
|
|
9050
9099
|
}
|
|
9051
|
-
},
|
|
9100
|
+
}, _callee50, this);
|
|
9052
9101
|
}));
|
|
9053
9102
|
|
|
9054
|
-
function getMessage(
|
|
9103
|
+
function getMessage(_x68) {
|
|
9055
9104
|
return _getMessage.apply(this, arguments);
|
|
9056
9105
|
}
|
|
9057
9106
|
|
|
@@ -9060,7 +9109,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9060
9109
|
}, {
|
|
9061
9110
|
key: "getUserAgent",
|
|
9062
9111
|
value: function getUserAgent() {
|
|
9063
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "5.
|
|
9112
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "5.3.0");
|
|
9064
9113
|
}
|
|
9065
9114
|
}, {
|
|
9066
9115
|
key: "setUserAgent",
|
|
@@ -9255,28 +9304,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9255
9304
|
}, {
|
|
9256
9305
|
key: "sendUserCustomEvent",
|
|
9257
9306
|
value: function () {
|
|
9258
|
-
var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9259
|
-
return _regeneratorRuntime.wrap(function
|
|
9307
|
+
var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51(targetUserID, event) {
|
|
9308
|
+
return _regeneratorRuntime.wrap(function _callee51$(_context51) {
|
|
9260
9309
|
while (1) {
|
|
9261
|
-
switch (
|
|
9310
|
+
switch (_context51.prev = _context51.next) {
|
|
9262
9311
|
case 0:
|
|
9263
|
-
|
|
9312
|
+
_context51.next = 2;
|
|
9264
9313
|
return this.post("".concat(this.baseURL, "/users/").concat(targetUserID, "/event"), {
|
|
9265
9314
|
event: event
|
|
9266
9315
|
});
|
|
9267
9316
|
|
|
9268
9317
|
case 2:
|
|
9269
|
-
return
|
|
9318
|
+
return _context51.abrupt("return", _context51.sent);
|
|
9270
9319
|
|
|
9271
9320
|
case 3:
|
|
9272
9321
|
case "end":
|
|
9273
|
-
return
|
|
9322
|
+
return _context51.stop();
|
|
9274
9323
|
}
|
|
9275
9324
|
}
|
|
9276
|
-
},
|
|
9325
|
+
}, _callee51, this);
|
|
9277
9326
|
}));
|
|
9278
9327
|
|
|
9279
|
-
function sendUserCustomEvent(
|
|
9328
|
+
function sendUserCustomEvent(_x69, _x70) {
|
|
9280
9329
|
return _sendUserCustomEvent.apply(this, arguments);
|
|
9281
9330
|
}
|
|
9282
9331
|
|
|
@@ -9344,32 +9393,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9344
9393
|
}, {
|
|
9345
9394
|
key: "createSegment",
|
|
9346
9395
|
value: function () {
|
|
9347
|
-
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9396
|
+
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(params) {
|
|
9348
9397
|
var _yield$this$post, segment;
|
|
9349
9398
|
|
|
9350
|
-
return _regeneratorRuntime.wrap(function
|
|
9399
|
+
return _regeneratorRuntime.wrap(function _callee52$(_context52) {
|
|
9351
9400
|
while (1) {
|
|
9352
|
-
switch (
|
|
9401
|
+
switch (_context52.prev = _context52.next) {
|
|
9353
9402
|
case 0:
|
|
9354
|
-
|
|
9403
|
+
_context52.next = 2;
|
|
9355
9404
|
return this.post(this.baseURL + "/segments", {
|
|
9356
9405
|
segment: params
|
|
9357
9406
|
});
|
|
9358
9407
|
|
|
9359
9408
|
case 2:
|
|
9360
|
-
_yield$this$post =
|
|
9409
|
+
_yield$this$post = _context52.sent;
|
|
9361
9410
|
segment = _yield$this$post.segment;
|
|
9362
|
-
return
|
|
9411
|
+
return _context52.abrupt("return", segment);
|
|
9363
9412
|
|
|
9364
9413
|
case 5:
|
|
9365
9414
|
case "end":
|
|
9366
|
-
return
|
|
9415
|
+
return _context52.stop();
|
|
9367
9416
|
}
|
|
9368
9417
|
}
|
|
9369
|
-
},
|
|
9418
|
+
}, _callee52, this);
|
|
9370
9419
|
}));
|
|
9371
9420
|
|
|
9372
|
-
function createSegment(
|
|
9421
|
+
function createSegment(_x71) {
|
|
9373
9422
|
return _createSegment.apply(this, arguments);
|
|
9374
9423
|
}
|
|
9375
9424
|
|
|
@@ -9386,30 +9435,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9386
9435
|
}, {
|
|
9387
9436
|
key: "getSegment",
|
|
9388
9437
|
value: function () {
|
|
9389
|
-
var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9438
|
+
var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53(id) {
|
|
9390
9439
|
var _yield$this$get, segment;
|
|
9391
9440
|
|
|
9392
|
-
return _regeneratorRuntime.wrap(function
|
|
9441
|
+
return _regeneratorRuntime.wrap(function _callee53$(_context53) {
|
|
9393
9442
|
while (1) {
|
|
9394
|
-
switch (
|
|
9443
|
+
switch (_context53.prev = _context53.next) {
|
|
9395
9444
|
case 0:
|
|
9396
|
-
|
|
9445
|
+
_context53.next = 2;
|
|
9397
9446
|
return this.get(this.baseURL + "/segments/".concat(id));
|
|
9398
9447
|
|
|
9399
9448
|
case 2:
|
|
9400
|
-
_yield$this$get =
|
|
9449
|
+
_yield$this$get = _context53.sent;
|
|
9401
9450
|
segment = _yield$this$get.segment;
|
|
9402
|
-
return
|
|
9451
|
+
return _context53.abrupt("return", segment);
|
|
9403
9452
|
|
|
9404
9453
|
case 5:
|
|
9405
9454
|
case "end":
|
|
9406
|
-
return
|
|
9455
|
+
return _context53.stop();
|
|
9407
9456
|
}
|
|
9408
9457
|
}
|
|
9409
|
-
},
|
|
9458
|
+
}, _callee53, this);
|
|
9410
9459
|
}));
|
|
9411
9460
|
|
|
9412
|
-
function getSegment(
|
|
9461
|
+
function getSegment(_x72) {
|
|
9413
9462
|
return _getSegment.apply(this, arguments);
|
|
9414
9463
|
}
|
|
9415
9464
|
|
|
@@ -9425,30 +9474,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9425
9474
|
}, {
|
|
9426
9475
|
key: "listSegments",
|
|
9427
9476
|
value: function () {
|
|
9428
|
-
var _listSegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9477
|
+
var _listSegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54(options) {
|
|
9429
9478
|
var _yield$this$get2, segments;
|
|
9430
9479
|
|
|
9431
|
-
return _regeneratorRuntime.wrap(function
|
|
9480
|
+
return _regeneratorRuntime.wrap(function _callee54$(_context54) {
|
|
9432
9481
|
while (1) {
|
|
9433
|
-
switch (
|
|
9482
|
+
switch (_context54.prev = _context54.next) {
|
|
9434
9483
|
case 0:
|
|
9435
|
-
|
|
9484
|
+
_context54.next = 2;
|
|
9436
9485
|
return this.get(this.baseURL + "/segments", options);
|
|
9437
9486
|
|
|
9438
9487
|
case 2:
|
|
9439
|
-
_yield$this$get2 =
|
|
9488
|
+
_yield$this$get2 = _context54.sent;
|
|
9440
9489
|
segments = _yield$this$get2.segments;
|
|
9441
|
-
return
|
|
9490
|
+
return _context54.abrupt("return", segments);
|
|
9442
9491
|
|
|
9443
9492
|
case 5:
|
|
9444
9493
|
case "end":
|
|
9445
|
-
return
|
|
9494
|
+
return _context54.stop();
|
|
9446
9495
|
}
|
|
9447
9496
|
}
|
|
9448
|
-
},
|
|
9497
|
+
}, _callee54, this);
|
|
9449
9498
|
}));
|
|
9450
9499
|
|
|
9451
|
-
function listSegments(
|
|
9500
|
+
function listSegments(_x73) {
|
|
9452
9501
|
return _listSegments.apply(this, arguments);
|
|
9453
9502
|
}
|
|
9454
9503
|
|
|
@@ -9466,32 +9515,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9466
9515
|
}, {
|
|
9467
9516
|
key: "updateSegment",
|
|
9468
9517
|
value: function () {
|
|
9469
|
-
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9518
|
+
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(id, params) {
|
|
9470
9519
|
var _yield$this$put, segment;
|
|
9471
9520
|
|
|
9472
|
-
return _regeneratorRuntime.wrap(function
|
|
9521
|
+
return _regeneratorRuntime.wrap(function _callee55$(_context55) {
|
|
9473
9522
|
while (1) {
|
|
9474
|
-
switch (
|
|
9523
|
+
switch (_context55.prev = _context55.next) {
|
|
9475
9524
|
case 0:
|
|
9476
|
-
|
|
9525
|
+
_context55.next = 2;
|
|
9477
9526
|
return this.put(this.baseURL + "/segments/".concat(id), {
|
|
9478
9527
|
segment: params
|
|
9479
9528
|
});
|
|
9480
9529
|
|
|
9481
9530
|
case 2:
|
|
9482
|
-
_yield$this$put =
|
|
9531
|
+
_yield$this$put = _context55.sent;
|
|
9483
9532
|
segment = _yield$this$put.segment;
|
|
9484
|
-
return
|
|
9533
|
+
return _context55.abrupt("return", segment);
|
|
9485
9534
|
|
|
9486
9535
|
case 5:
|
|
9487
9536
|
case "end":
|
|
9488
|
-
return
|
|
9537
|
+
return _context55.stop();
|
|
9489
9538
|
}
|
|
9490
9539
|
}
|
|
9491
|
-
},
|
|
9540
|
+
}, _callee55, this);
|
|
9492
9541
|
}));
|
|
9493
9542
|
|
|
9494
|
-
function updateSegment(
|
|
9543
|
+
function updateSegment(_x74, _x75) {
|
|
9495
9544
|
return _updateSegment.apply(this, arguments);
|
|
9496
9545
|
}
|
|
9497
9546
|
|
|
@@ -9508,22 +9557,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9508
9557
|
}, {
|
|
9509
9558
|
key: "deleteSegment",
|
|
9510
9559
|
value: function () {
|
|
9511
|
-
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9512
|
-
return _regeneratorRuntime.wrap(function
|
|
9560
|
+
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(id) {
|
|
9561
|
+
return _regeneratorRuntime.wrap(function _callee56$(_context56) {
|
|
9513
9562
|
while (1) {
|
|
9514
|
-
switch (
|
|
9563
|
+
switch (_context56.prev = _context56.next) {
|
|
9515
9564
|
case 0:
|
|
9516
|
-
return
|
|
9565
|
+
return _context56.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
|
|
9517
9566
|
|
|
9518
9567
|
case 1:
|
|
9519
9568
|
case "end":
|
|
9520
|
-
return
|
|
9569
|
+
return _context56.stop();
|
|
9521
9570
|
}
|
|
9522
9571
|
}
|
|
9523
|
-
},
|
|
9572
|
+
}, _callee56, this);
|
|
9524
9573
|
}));
|
|
9525
9574
|
|
|
9526
|
-
function deleteSegment(
|
|
9575
|
+
function deleteSegment(_x76) {
|
|
9527
9576
|
return _deleteSegment.apply(this, arguments);
|
|
9528
9577
|
}
|
|
9529
9578
|
|
|
@@ -9540,32 +9589,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9540
9589
|
}, {
|
|
9541
9590
|
key: "createCampaign",
|
|
9542
9591
|
value: function () {
|
|
9543
|
-
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9592
|
+
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(params) {
|
|
9544
9593
|
var _yield$this$post2, campaign;
|
|
9545
9594
|
|
|
9546
|
-
return _regeneratorRuntime.wrap(function
|
|
9595
|
+
return _regeneratorRuntime.wrap(function _callee57$(_context57) {
|
|
9547
9596
|
while (1) {
|
|
9548
|
-
switch (
|
|
9597
|
+
switch (_context57.prev = _context57.next) {
|
|
9549
9598
|
case 0:
|
|
9550
|
-
|
|
9599
|
+
_context57.next = 2;
|
|
9551
9600
|
return this.post(this.baseURL + "/campaigns", {
|
|
9552
9601
|
campaign: params
|
|
9553
9602
|
});
|
|
9554
9603
|
|
|
9555
9604
|
case 2:
|
|
9556
|
-
_yield$this$post2 =
|
|
9605
|
+
_yield$this$post2 = _context57.sent;
|
|
9557
9606
|
campaign = _yield$this$post2.campaign;
|
|
9558
|
-
return
|
|
9607
|
+
return _context57.abrupt("return", campaign);
|
|
9559
9608
|
|
|
9560
9609
|
case 5:
|
|
9561
9610
|
case "end":
|
|
9562
|
-
return
|
|
9611
|
+
return _context57.stop();
|
|
9563
9612
|
}
|
|
9564
9613
|
}
|
|
9565
|
-
},
|
|
9614
|
+
}, _callee57, this);
|
|
9566
9615
|
}));
|
|
9567
9616
|
|
|
9568
|
-
function createCampaign(
|
|
9617
|
+
function createCampaign(_x77) {
|
|
9569
9618
|
return _createCampaign.apply(this, arguments);
|
|
9570
9619
|
}
|
|
9571
9620
|
|
|
@@ -9582,30 +9631,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9582
9631
|
}, {
|
|
9583
9632
|
key: "getCampaign",
|
|
9584
9633
|
value: function () {
|
|
9585
|
-
var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9634
|
+
var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(id) {
|
|
9586
9635
|
var _yield$this$get3, campaign;
|
|
9587
9636
|
|
|
9588
|
-
return _regeneratorRuntime.wrap(function
|
|
9637
|
+
return _regeneratorRuntime.wrap(function _callee58$(_context58) {
|
|
9589
9638
|
while (1) {
|
|
9590
|
-
switch (
|
|
9639
|
+
switch (_context58.prev = _context58.next) {
|
|
9591
9640
|
case 0:
|
|
9592
|
-
|
|
9641
|
+
_context58.next = 2;
|
|
9593
9642
|
return this.get(this.baseURL + "/campaigns/".concat(id));
|
|
9594
9643
|
|
|
9595
9644
|
case 2:
|
|
9596
|
-
_yield$this$get3 =
|
|
9645
|
+
_yield$this$get3 = _context58.sent;
|
|
9597
9646
|
campaign = _yield$this$get3.campaign;
|
|
9598
|
-
return
|
|
9647
|
+
return _context58.abrupt("return", campaign);
|
|
9599
9648
|
|
|
9600
9649
|
case 5:
|
|
9601
9650
|
case "end":
|
|
9602
|
-
return
|
|
9651
|
+
return _context58.stop();
|
|
9603
9652
|
}
|
|
9604
9653
|
}
|
|
9605
|
-
},
|
|
9654
|
+
}, _callee58, this);
|
|
9606
9655
|
}));
|
|
9607
9656
|
|
|
9608
|
-
function getCampaign(
|
|
9657
|
+
function getCampaign(_x78) {
|
|
9609
9658
|
return _getCampaign.apply(this, arguments);
|
|
9610
9659
|
}
|
|
9611
9660
|
|
|
@@ -9621,30 +9670,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9621
9670
|
}, {
|
|
9622
9671
|
key: "listCampaigns",
|
|
9623
9672
|
value: function () {
|
|
9624
|
-
var _listCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9673
|
+
var _listCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(options) {
|
|
9625
9674
|
var _yield$this$get4, campaigns;
|
|
9626
9675
|
|
|
9627
|
-
return _regeneratorRuntime.wrap(function
|
|
9676
|
+
return _regeneratorRuntime.wrap(function _callee59$(_context59) {
|
|
9628
9677
|
while (1) {
|
|
9629
|
-
switch (
|
|
9678
|
+
switch (_context59.prev = _context59.next) {
|
|
9630
9679
|
case 0:
|
|
9631
|
-
|
|
9680
|
+
_context59.next = 2;
|
|
9632
9681
|
return this.get(this.baseURL + "/campaigns", options);
|
|
9633
9682
|
|
|
9634
9683
|
case 2:
|
|
9635
|
-
_yield$this$get4 =
|
|
9684
|
+
_yield$this$get4 = _context59.sent;
|
|
9636
9685
|
campaigns = _yield$this$get4.campaigns;
|
|
9637
|
-
return
|
|
9686
|
+
return _context59.abrupt("return", campaigns);
|
|
9638
9687
|
|
|
9639
9688
|
case 5:
|
|
9640
9689
|
case "end":
|
|
9641
|
-
return
|
|
9690
|
+
return _context59.stop();
|
|
9642
9691
|
}
|
|
9643
9692
|
}
|
|
9644
|
-
},
|
|
9693
|
+
}, _callee59, this);
|
|
9645
9694
|
}));
|
|
9646
9695
|
|
|
9647
|
-
function listCampaigns(
|
|
9696
|
+
function listCampaigns(_x79) {
|
|
9648
9697
|
return _listCampaigns.apply(this, arguments);
|
|
9649
9698
|
}
|
|
9650
9699
|
|
|
@@ -9662,32 +9711,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9662
9711
|
}, {
|
|
9663
9712
|
key: "updateCampaign",
|
|
9664
9713
|
value: function () {
|
|
9665
|
-
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9714
|
+
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(id, params) {
|
|
9666
9715
|
var _yield$this$put2, campaign;
|
|
9667
9716
|
|
|
9668
|
-
return _regeneratorRuntime.wrap(function
|
|
9717
|
+
return _regeneratorRuntime.wrap(function _callee60$(_context60) {
|
|
9669
9718
|
while (1) {
|
|
9670
|
-
switch (
|
|
9719
|
+
switch (_context60.prev = _context60.next) {
|
|
9671
9720
|
case 0:
|
|
9672
|
-
|
|
9721
|
+
_context60.next = 2;
|
|
9673
9722
|
return this.put(this.baseURL + "/campaigns/".concat(id), {
|
|
9674
9723
|
campaign: params
|
|
9675
9724
|
});
|
|
9676
9725
|
|
|
9677
9726
|
case 2:
|
|
9678
|
-
_yield$this$put2 =
|
|
9727
|
+
_yield$this$put2 = _context60.sent;
|
|
9679
9728
|
campaign = _yield$this$put2.campaign;
|
|
9680
|
-
return
|
|
9729
|
+
return _context60.abrupt("return", campaign);
|
|
9681
9730
|
|
|
9682
9731
|
case 5:
|
|
9683
9732
|
case "end":
|
|
9684
|
-
return
|
|
9733
|
+
return _context60.stop();
|
|
9685
9734
|
}
|
|
9686
9735
|
}
|
|
9687
|
-
},
|
|
9736
|
+
}, _callee60, this);
|
|
9688
9737
|
}));
|
|
9689
9738
|
|
|
9690
|
-
function updateCampaign(
|
|
9739
|
+
function updateCampaign(_x80, _x81) {
|
|
9691
9740
|
return _updateCampaign.apply(this, arguments);
|
|
9692
9741
|
}
|
|
9693
9742
|
|
|
@@ -9704,22 +9753,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9704
9753
|
}, {
|
|
9705
9754
|
key: "deleteCampaign",
|
|
9706
9755
|
value: function () {
|
|
9707
|
-
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9708
|
-
return _regeneratorRuntime.wrap(function
|
|
9756
|
+
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(id) {
|
|
9757
|
+
return _regeneratorRuntime.wrap(function _callee61$(_context61) {
|
|
9709
9758
|
while (1) {
|
|
9710
|
-
switch (
|
|
9759
|
+
switch (_context61.prev = _context61.next) {
|
|
9711
9760
|
case 0:
|
|
9712
|
-
return
|
|
9761
|
+
return _context61.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id)));
|
|
9713
9762
|
|
|
9714
9763
|
case 1:
|
|
9715
9764
|
case "end":
|
|
9716
|
-
return
|
|
9765
|
+
return _context61.stop();
|
|
9717
9766
|
}
|
|
9718
9767
|
}
|
|
9719
|
-
},
|
|
9768
|
+
}, _callee61, this);
|
|
9720
9769
|
}));
|
|
9721
9770
|
|
|
9722
|
-
function deleteCampaign(
|
|
9771
|
+
function deleteCampaign(_x82) {
|
|
9723
9772
|
return _deleteCampaign.apply(this, arguments);
|
|
9724
9773
|
}
|
|
9725
9774
|
|
|
@@ -9737,33 +9786,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9737
9786
|
}, {
|
|
9738
9787
|
key: "scheduleCampaign",
|
|
9739
9788
|
value: function () {
|
|
9740
|
-
var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9789
|
+
var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(id, params) {
|
|
9741
9790
|
var sendAt, _yield$this$patch, campaign;
|
|
9742
9791
|
|
|
9743
|
-
return _regeneratorRuntime.wrap(function
|
|
9792
|
+
return _regeneratorRuntime.wrap(function _callee62$(_context62) {
|
|
9744
9793
|
while (1) {
|
|
9745
|
-
switch (
|
|
9794
|
+
switch (_context62.prev = _context62.next) {
|
|
9746
9795
|
case 0:
|
|
9747
9796
|
sendAt = params.sendAt;
|
|
9748
|
-
|
|
9797
|
+
_context62.next = 3;
|
|
9749
9798
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/schedule"), {
|
|
9750
9799
|
send_at: sendAt
|
|
9751
9800
|
});
|
|
9752
9801
|
|
|
9753
9802
|
case 3:
|
|
9754
|
-
_yield$this$patch =
|
|
9803
|
+
_yield$this$patch = _context62.sent;
|
|
9755
9804
|
campaign = _yield$this$patch.campaign;
|
|
9756
|
-
return
|
|
9805
|
+
return _context62.abrupt("return", campaign);
|
|
9757
9806
|
|
|
9758
9807
|
case 6:
|
|
9759
9808
|
case "end":
|
|
9760
|
-
return
|
|
9809
|
+
return _context62.stop();
|
|
9761
9810
|
}
|
|
9762
9811
|
}
|
|
9763
|
-
},
|
|
9812
|
+
}, _callee62, this);
|
|
9764
9813
|
}));
|
|
9765
9814
|
|
|
9766
|
-
function scheduleCampaign(
|
|
9815
|
+
function scheduleCampaign(_x83, _x84) {
|
|
9767
9816
|
return _scheduleCampaign.apply(this, arguments);
|
|
9768
9817
|
}
|
|
9769
9818
|
|
|
@@ -9780,30 +9829,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9780
9829
|
}, {
|
|
9781
9830
|
key: "stopCampaign",
|
|
9782
9831
|
value: function () {
|
|
9783
|
-
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9832
|
+
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(id) {
|
|
9784
9833
|
var _yield$this$patch2, campaign;
|
|
9785
9834
|
|
|
9786
|
-
return _regeneratorRuntime.wrap(function
|
|
9835
|
+
return _regeneratorRuntime.wrap(function _callee63$(_context63) {
|
|
9787
9836
|
while (1) {
|
|
9788
|
-
switch (
|
|
9837
|
+
switch (_context63.prev = _context63.next) {
|
|
9789
9838
|
case 0:
|
|
9790
|
-
|
|
9839
|
+
_context63.next = 2;
|
|
9791
9840
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/stop"));
|
|
9792
9841
|
|
|
9793
9842
|
case 2:
|
|
9794
|
-
_yield$this$patch2 =
|
|
9843
|
+
_yield$this$patch2 = _context63.sent;
|
|
9795
9844
|
campaign = _yield$this$patch2.campaign;
|
|
9796
|
-
return
|
|
9845
|
+
return _context63.abrupt("return", campaign);
|
|
9797
9846
|
|
|
9798
9847
|
case 5:
|
|
9799
9848
|
case "end":
|
|
9800
|
-
return
|
|
9849
|
+
return _context63.stop();
|
|
9801
9850
|
}
|
|
9802
9851
|
}
|
|
9803
|
-
},
|
|
9852
|
+
}, _callee63, this);
|
|
9804
9853
|
}));
|
|
9805
9854
|
|
|
9806
|
-
function stopCampaign(
|
|
9855
|
+
function stopCampaign(_x85) {
|
|
9807
9856
|
return _stopCampaign.apply(this, arguments);
|
|
9808
9857
|
}
|
|
9809
9858
|
|
|
@@ -9820,30 +9869,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9820
9869
|
}, {
|
|
9821
9870
|
key: "resumeCampaign",
|
|
9822
9871
|
value: function () {
|
|
9823
|
-
var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9872
|
+
var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(id) {
|
|
9824
9873
|
var _yield$this$patch3, campaign;
|
|
9825
9874
|
|
|
9826
|
-
return _regeneratorRuntime.wrap(function
|
|
9875
|
+
return _regeneratorRuntime.wrap(function _callee64$(_context64) {
|
|
9827
9876
|
while (1) {
|
|
9828
|
-
switch (
|
|
9877
|
+
switch (_context64.prev = _context64.next) {
|
|
9829
9878
|
case 0:
|
|
9830
|
-
|
|
9879
|
+
_context64.next = 2;
|
|
9831
9880
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/resume"));
|
|
9832
9881
|
|
|
9833
9882
|
case 2:
|
|
9834
|
-
_yield$this$patch3 =
|
|
9883
|
+
_yield$this$patch3 = _context64.sent;
|
|
9835
9884
|
campaign = _yield$this$patch3.campaign;
|
|
9836
|
-
return
|
|
9885
|
+
return _context64.abrupt("return", campaign);
|
|
9837
9886
|
|
|
9838
9887
|
case 5:
|
|
9839
9888
|
case "end":
|
|
9840
|
-
return
|
|
9889
|
+
return _context64.stop();
|
|
9841
9890
|
}
|
|
9842
9891
|
}
|
|
9843
|
-
},
|
|
9892
|
+
}, _callee64, this);
|
|
9844
9893
|
}));
|
|
9845
9894
|
|
|
9846
|
-
function resumeCampaign(
|
|
9895
|
+
function resumeCampaign(_x86) {
|
|
9847
9896
|
return _resumeCampaign.apply(this, arguments);
|
|
9848
9897
|
}
|
|
9849
9898
|
|
|
@@ -9860,33 +9909,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9860
9909
|
}, {
|
|
9861
9910
|
key: "testCampaign",
|
|
9862
9911
|
value: function () {
|
|
9863
|
-
var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9912
|
+
var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(id, params) {
|
|
9864
9913
|
var users, _yield$this$post3, campaign;
|
|
9865
9914
|
|
|
9866
|
-
return _regeneratorRuntime.wrap(function
|
|
9915
|
+
return _regeneratorRuntime.wrap(function _callee65$(_context65) {
|
|
9867
9916
|
while (1) {
|
|
9868
|
-
switch (
|
|
9917
|
+
switch (_context65.prev = _context65.next) {
|
|
9869
9918
|
case 0:
|
|
9870
9919
|
users = params.users;
|
|
9871
|
-
|
|
9920
|
+
_context65.next = 3;
|
|
9872
9921
|
return this.post(this.baseURL + "/campaigns/".concat(id, "/test"), {
|
|
9873
9922
|
users: users
|
|
9874
9923
|
});
|
|
9875
9924
|
|
|
9876
9925
|
case 3:
|
|
9877
|
-
_yield$this$post3 =
|
|
9926
|
+
_yield$this$post3 = _context65.sent;
|
|
9878
9927
|
campaign = _yield$this$post3.campaign;
|
|
9879
|
-
return
|
|
9928
|
+
return _context65.abrupt("return", campaign);
|
|
9880
9929
|
|
|
9881
9930
|
case 6:
|
|
9882
9931
|
case "end":
|
|
9883
|
-
return
|
|
9932
|
+
return _context65.stop();
|
|
9884
9933
|
}
|
|
9885
9934
|
}
|
|
9886
|
-
},
|
|
9935
|
+
}, _callee65, this);
|
|
9887
9936
|
}));
|
|
9888
9937
|
|
|
9889
|
-
function testCampaign(
|
|
9938
|
+
function testCampaign(_x87, _x88) {
|
|
9890
9939
|
return _testCampaign.apply(this, arguments);
|
|
9891
9940
|
}
|
|
9892
9941
|
|
|
@@ -9902,24 +9951,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9902
9951
|
}, {
|
|
9903
9952
|
key: "enrichURL",
|
|
9904
9953
|
value: function () {
|
|
9905
|
-
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9906
|
-
return _regeneratorRuntime.wrap(function
|
|
9954
|
+
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(url) {
|
|
9955
|
+
return _regeneratorRuntime.wrap(function _callee66$(_context66) {
|
|
9907
9956
|
while (1) {
|
|
9908
|
-
switch (
|
|
9957
|
+
switch (_context66.prev = _context66.next) {
|
|
9909
9958
|
case 0:
|
|
9910
|
-
return
|
|
9959
|
+
return _context66.abrupt("return", this.get(this.baseURL + "/og", {
|
|
9911
9960
|
url: url
|
|
9912
9961
|
}));
|
|
9913
9962
|
|
|
9914
9963
|
case 1:
|
|
9915
9964
|
case "end":
|
|
9916
|
-
return
|
|
9965
|
+
return _context66.stop();
|
|
9917
9966
|
}
|
|
9918
9967
|
}
|
|
9919
|
-
},
|
|
9968
|
+
}, _callee66, this);
|
|
9920
9969
|
}));
|
|
9921
9970
|
|
|
9922
|
-
function enrichURL(
|
|
9971
|
+
function enrichURL(_x89) {
|
|
9923
9972
|
return _enrichURL.apply(this, arguments);
|
|
9924
9973
|
}
|
|
9925
9974
|
|
|
@@ -9936,22 +9985,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9936
9985
|
}, {
|
|
9937
9986
|
key: "getTask",
|
|
9938
9987
|
value: function () {
|
|
9939
|
-
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9940
|
-
return _regeneratorRuntime.wrap(function
|
|
9988
|
+
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(id) {
|
|
9989
|
+
return _regeneratorRuntime.wrap(function _callee67$(_context67) {
|
|
9941
9990
|
while (1) {
|
|
9942
|
-
switch (
|
|
9991
|
+
switch (_context67.prev = _context67.next) {
|
|
9943
9992
|
case 0:
|
|
9944
|
-
return
|
|
9993
|
+
return _context67.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
|
|
9945
9994
|
|
|
9946
9995
|
case 1:
|
|
9947
9996
|
case "end":
|
|
9948
|
-
return
|
|
9997
|
+
return _context67.stop();
|
|
9949
9998
|
}
|
|
9950
9999
|
}
|
|
9951
|
-
},
|
|
10000
|
+
}, _callee67, this);
|
|
9952
10001
|
}));
|
|
9953
10002
|
|
|
9954
|
-
function getTask(
|
|
10003
|
+
function getTask(_x90) {
|
|
9955
10004
|
return _getTask.apply(this, arguments);
|
|
9956
10005
|
}
|
|
9957
10006
|
|
|
@@ -9969,31 +10018,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9969
10018
|
}, {
|
|
9970
10019
|
key: "deleteChannels",
|
|
9971
10020
|
value: function () {
|
|
9972
|
-
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10021
|
+
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(cids) {
|
|
9973
10022
|
var options,
|
|
9974
|
-
|
|
9975
|
-
return _regeneratorRuntime.wrap(function
|
|
10023
|
+
_args68 = arguments;
|
|
10024
|
+
return _regeneratorRuntime.wrap(function _callee68$(_context68) {
|
|
9976
10025
|
while (1) {
|
|
9977
|
-
switch (
|
|
10026
|
+
switch (_context68.prev = _context68.next) {
|
|
9978
10027
|
case 0:
|
|
9979
|
-
options =
|
|
9980
|
-
|
|
10028
|
+
options = _args68.length > 1 && _args68[1] !== undefined ? _args68[1] : {};
|
|
10029
|
+
_context68.next = 3;
|
|
9981
10030
|
return this.post(this.baseURL + "/channels/delete", _objectSpread({
|
|
9982
10031
|
cids: cids
|
|
9983
10032
|
}, options));
|
|
9984
10033
|
|
|
9985
10034
|
case 3:
|
|
9986
|
-
return
|
|
10035
|
+
return _context68.abrupt("return", _context68.sent);
|
|
9987
10036
|
|
|
9988
10037
|
case 4:
|
|
9989
10038
|
case "end":
|
|
9990
|
-
return
|
|
10039
|
+
return _context68.stop();
|
|
9991
10040
|
}
|
|
9992
10041
|
}
|
|
9993
|
-
},
|
|
10042
|
+
}, _callee68, this);
|
|
9994
10043
|
}));
|
|
9995
10044
|
|
|
9996
|
-
function deleteChannels(
|
|
10045
|
+
function deleteChannels(_x91) {
|
|
9997
10046
|
return _deleteChannels.apply(this, arguments);
|
|
9998
10047
|
}
|
|
9999
10048
|
|
|
@@ -10011,13 +10060,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10011
10060
|
}, {
|
|
10012
10061
|
key: "deleteUsers",
|
|
10013
10062
|
value: function () {
|
|
10014
|
-
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10015
|
-
return _regeneratorRuntime.wrap(function
|
|
10063
|
+
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(user_ids, options) {
|
|
10064
|
+
return _regeneratorRuntime.wrap(function _callee69$(_context69) {
|
|
10016
10065
|
while (1) {
|
|
10017
|
-
switch (
|
|
10066
|
+
switch (_context69.prev = _context69.next) {
|
|
10018
10067
|
case 0:
|
|
10019
10068
|
if (!((options === null || options === void 0 ? void 0 : options.user) !== 'soft' && (options === null || options === void 0 ? void 0 : options.user) !== 'hard')) {
|
|
10020
|
-
|
|
10069
|
+
_context69.next = 2;
|
|
10021
10070
|
break;
|
|
10022
10071
|
}
|
|
10023
10072
|
|
|
@@ -10025,7 +10074,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10025
10074
|
|
|
10026
10075
|
case 2:
|
|
10027
10076
|
if (!(options.messages !== undefined && options.messages !== 'soft' && options.messages !== 'hard')) {
|
|
10028
|
-
|
|
10077
|
+
_context69.next = 4;
|
|
10029
10078
|
break;
|
|
10030
10079
|
}
|
|
10031
10080
|
|
|
@@ -10033,30 +10082,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10033
10082
|
|
|
10034
10083
|
case 4:
|
|
10035
10084
|
if (!(options.conversations !== undefined && options.conversations !== 'soft' && options.conversations !== 'hard')) {
|
|
10036
|
-
|
|
10085
|
+
_context69.next = 6;
|
|
10037
10086
|
break;
|
|
10038
10087
|
}
|
|
10039
10088
|
|
|
10040
10089
|
throw new Error('Invalid delete user options. conversations must be one of [soft hard]');
|
|
10041
10090
|
|
|
10042
10091
|
case 6:
|
|
10043
|
-
|
|
10092
|
+
_context69.next = 8;
|
|
10044
10093
|
return this.post(this.baseURL + "/users/delete", _objectSpread({
|
|
10045
10094
|
user_ids: user_ids
|
|
10046
10095
|
}, options));
|
|
10047
10096
|
|
|
10048
10097
|
case 8:
|
|
10049
|
-
return
|
|
10098
|
+
return _context69.abrupt("return", _context69.sent);
|
|
10050
10099
|
|
|
10051
10100
|
case 9:
|
|
10052
10101
|
case "end":
|
|
10053
|
-
return
|
|
10102
|
+
return _context69.stop();
|
|
10054
10103
|
}
|
|
10055
10104
|
}
|
|
10056
|
-
},
|
|
10105
|
+
}, _callee69, this);
|
|
10057
10106
|
}));
|
|
10058
10107
|
|
|
10059
|
-
function deleteUsers(
|
|
10108
|
+
function deleteUsers(_x92, _x93) {
|
|
10060
10109
|
return _deleteUsers.apply(this, arguments);
|
|
10061
10110
|
}
|
|
10062
10111
|
|