stream-chat 6.6.0 → 6.7.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 +417 -318
- 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 +417 -318
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +417 -318
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +417 -318
- package/dist/index.js.map +1 -1
- package/dist/types/channel.d.ts +8 -1
- package/dist/types/channel.d.ts.map +1 -1
- package/dist/types/channel_state.d.ts +1 -0
- package/dist/types/channel_state.d.ts.map +1 -1
- package/dist/types/client.d.ts +12 -8
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/types.d.ts +50 -0
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/channel.ts +28 -1
- package/src/channel_state.ts +2 -2
- package/src/client.ts +12 -0
- package/src/types.ts +60 -1
package/dist/browser.es.js
CHANGED
|
@@ -720,7 +720,9 @@ var ChannelState = /*#__PURE__*/function () {
|
|
|
720
720
|
this.threads[messageToRemove.parent_id] = threadMessages;
|
|
721
721
|
isRemoved = removed;
|
|
722
722
|
} else {
|
|
723
|
-
var
|
|
723
|
+
var _messageToRemove$mess;
|
|
724
|
+
|
|
725
|
+
var messageSetIndex = (_messageToRemove$mess = messageToRemove.messageSetIndex) !== null && _messageToRemove$mess !== void 0 ? _messageToRemove$mess : this.findMessageSetIndex(messageToRemove);
|
|
724
726
|
|
|
725
727
|
if (messageSetIndex !== -1) {
|
|
726
728
|
var _this$removeMessageFr3 = this.removeMessageFromArray(this.messageSets[messageSetIndex].messages, messageToRemove),
|
|
@@ -3418,6 +3420,41 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3418
3420
|
|
|
3419
3421
|
return removeShadowBan;
|
|
3420
3422
|
}()
|
|
3423
|
+
/**
|
|
3424
|
+
* createCall - creates a call for the current channel
|
|
3425
|
+
*
|
|
3426
|
+
* @param {CreateCallOptions} options
|
|
3427
|
+
* @returns {Promise<CreateCallResponse>}
|
|
3428
|
+
*/
|
|
3429
|
+
|
|
3430
|
+
}, {
|
|
3431
|
+
key: "createCall",
|
|
3432
|
+
value: function () {
|
|
3433
|
+
var _createCall = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38(options) {
|
|
3434
|
+
return _regeneratorRuntime.wrap(function _callee38$(_context38) {
|
|
3435
|
+
while (1) {
|
|
3436
|
+
switch (_context38.prev = _context38.next) {
|
|
3437
|
+
case 0:
|
|
3438
|
+
_context38.next = 2;
|
|
3439
|
+
return this.getClient().post(this._channelURL() + '/call', options);
|
|
3440
|
+
|
|
3441
|
+
case 2:
|
|
3442
|
+
return _context38.abrupt("return", _context38.sent);
|
|
3443
|
+
|
|
3444
|
+
case 3:
|
|
3445
|
+
case "end":
|
|
3446
|
+
return _context38.stop();
|
|
3447
|
+
}
|
|
3448
|
+
}
|
|
3449
|
+
}, _callee38, this);
|
|
3450
|
+
}));
|
|
3451
|
+
|
|
3452
|
+
function createCall(_x37) {
|
|
3453
|
+
return _createCall.apply(this, arguments);
|
|
3454
|
+
}
|
|
3455
|
+
|
|
3456
|
+
return createCall;
|
|
3457
|
+
}()
|
|
3421
3458
|
/**
|
|
3422
3459
|
* on - Listen to events on this channel.
|
|
3423
3460
|
*
|
|
@@ -3500,7 +3537,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3500
3537
|
}, {
|
|
3501
3538
|
key: "_handleChannelEvent",
|
|
3502
3539
|
value: function _handleChannelEvent(event) {
|
|
3503
|
-
var _event$user, _event$user2, _event$user3, _event$user5, _event$user6, _event$member, _event$user9;
|
|
3540
|
+
var _event$user, _event$user2, _event$user3, _event$user5, _event$user6, _event$channel, _event$member, _event$user9;
|
|
3504
3541
|
|
|
3505
3542
|
var channel = this;
|
|
3506
3543
|
|
|
@@ -3615,7 +3652,29 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3615
3652
|
break;
|
|
3616
3653
|
|
|
3617
3654
|
case 'channel.truncated':
|
|
3618
|
-
|
|
3655
|
+
if ((_event$channel = event.channel) !== null && _event$channel !== void 0 && _event$channel.truncated_at) {
|
|
3656
|
+
var truncatedAt = +new Date(event.channel.truncated_at);
|
|
3657
|
+
channelState.messageSets.forEach(function (messageSet, messageSetIndex) {
|
|
3658
|
+
messageSet.messages.forEach(function (_ref2) {
|
|
3659
|
+
var createdAt = _ref2.created_at,
|
|
3660
|
+
id = _ref2.id;
|
|
3661
|
+
if (truncatedAt > +createdAt) channelState.removeMessage({
|
|
3662
|
+
id: id,
|
|
3663
|
+
messageSetIndex: messageSetIndex
|
|
3664
|
+
});
|
|
3665
|
+
});
|
|
3666
|
+
});
|
|
3667
|
+
channelState.pinnedMessages.forEach(function (_ref3) {
|
|
3668
|
+
var id = _ref3.id,
|
|
3669
|
+
createdAt = _ref3.created_at;
|
|
3670
|
+
if (truncatedAt > +createdAt) channelState.removePinnedMessage({
|
|
3671
|
+
id: id
|
|
3672
|
+
});
|
|
3673
|
+
});
|
|
3674
|
+
} else {
|
|
3675
|
+
channelState.clearMessages();
|
|
3676
|
+
}
|
|
3677
|
+
|
|
3619
3678
|
channelState.unreadCount = 0; // system messages don't increment unread counts
|
|
3620
3679
|
|
|
3621
3680
|
if (event.message) {
|
|
@@ -3645,11 +3704,11 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3645
3704
|
|
|
3646
3705
|
case 'channel.updated':
|
|
3647
3706
|
if (event.channel) {
|
|
3648
|
-
var _event$channel$hidden, _event$
|
|
3707
|
+
var _event$channel$hidden, _event$channel2, _channel$data, _event$channel$own_ca, _event$channel3, _channel$data2;
|
|
3649
3708
|
|
|
3650
3709
|
channel.data = _objectSpread$5(_objectSpread$5({}, event.channel), {}, {
|
|
3651
|
-
hidden: (_event$channel$hidden = (_event$
|
|
3652
|
-
own_capabilities: (_event$channel$own_ca = (_event$
|
|
3710
|
+
hidden: (_event$channel$hidden = (_event$channel2 = event.channel) === null || _event$channel2 === void 0 ? void 0 : _event$channel2.hidden) !== null && _event$channel$hidden !== void 0 ? _event$channel$hidden : (_channel$data = channel.data) === null || _channel$data === void 0 ? void 0 : _channel$data.hidden,
|
|
3711
|
+
own_capabilities: (_event$channel$own_ca = (_event$channel3 = event.channel) === null || _event$channel3 === void 0 ? void 0 : _event$channel3.own_capabilities) !== null && _event$channel$own_ca !== void 0 ? _event$channel$own_ca : (_channel$data2 = channel.data) === null || _channel$data2 === void 0 ? void 0 : _channel$data2.own_capabilities
|
|
3653
3712
|
});
|
|
3654
3713
|
}
|
|
3655
3714
|
|
|
@@ -5773,6 +5832,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
5773
5832
|
/**
|
|
5774
5833
|
* Response Types
|
|
5775
5834
|
*/
|
|
5835
|
+
// Thumb URL(thumb_url) is added considering video attachments as the backend will return the thumbnail in the response.
|
|
5776
5836
|
|
|
5777
5837
|
/**
|
|
5778
5838
|
* Option Types
|
|
@@ -9001,6 +9061,45 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9001
9061
|
|
|
9002
9062
|
return unflagUser;
|
|
9003
9063
|
}()
|
|
9064
|
+
/**
|
|
9065
|
+
* getCallToken - retrieves the auth token needed to join a call
|
|
9066
|
+
*
|
|
9067
|
+
* @param {string} callID
|
|
9068
|
+
* @param {object} options
|
|
9069
|
+
* @returns {Promise<GetCallTokenResponse>}
|
|
9070
|
+
*/
|
|
9071
|
+
|
|
9072
|
+
}, {
|
|
9073
|
+
key: "getCallToken",
|
|
9074
|
+
value: function () {
|
|
9075
|
+
var _getCallToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee42(callID) {
|
|
9076
|
+
var options,
|
|
9077
|
+
_args42 = arguments;
|
|
9078
|
+
return _regeneratorRuntime.wrap(function _callee42$(_context42) {
|
|
9079
|
+
while (1) {
|
|
9080
|
+
switch (_context42.prev = _context42.next) {
|
|
9081
|
+
case 0:
|
|
9082
|
+
options = _args42.length > 1 && _args42[1] !== undefined ? _args42[1] : {};
|
|
9083
|
+
_context42.next = 3;
|
|
9084
|
+
return this.post(this.baseURL + "/calls/".concat(callID), _objectSpread({}, options));
|
|
9085
|
+
|
|
9086
|
+
case 3:
|
|
9087
|
+
return _context42.abrupt("return", _context42.sent);
|
|
9088
|
+
|
|
9089
|
+
case 4:
|
|
9090
|
+
case "end":
|
|
9091
|
+
return _context42.stop();
|
|
9092
|
+
}
|
|
9093
|
+
}
|
|
9094
|
+
}, _callee42, this);
|
|
9095
|
+
}));
|
|
9096
|
+
|
|
9097
|
+
function getCallToken(_x55) {
|
|
9098
|
+
return _getCallToken.apply(this, arguments);
|
|
9099
|
+
}
|
|
9100
|
+
|
|
9101
|
+
return getCallToken;
|
|
9102
|
+
}()
|
|
9004
9103
|
/**
|
|
9005
9104
|
* _queryFlags - Query flags.
|
|
9006
9105
|
*
|
|
@@ -9018,30 +9117,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9018
9117
|
}, {
|
|
9019
9118
|
key: "_queryFlags",
|
|
9020
9119
|
value: function () {
|
|
9021
|
-
var _queryFlags2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9120
|
+
var _queryFlags2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43() {
|
|
9022
9121
|
var filterConditions,
|
|
9023
9122
|
options,
|
|
9024
|
-
|
|
9025
|
-
return _regeneratorRuntime.wrap(function
|
|
9123
|
+
_args43 = arguments;
|
|
9124
|
+
return _regeneratorRuntime.wrap(function _callee43$(_context43) {
|
|
9026
9125
|
while (1) {
|
|
9027
|
-
switch (
|
|
9126
|
+
switch (_context43.prev = _context43.next) {
|
|
9028
9127
|
case 0:
|
|
9029
|
-
filterConditions =
|
|
9030
|
-
options =
|
|
9031
|
-
|
|
9128
|
+
filterConditions = _args43.length > 0 && _args43[0] !== undefined ? _args43[0] : {};
|
|
9129
|
+
options = _args43.length > 1 && _args43[1] !== undefined ? _args43[1] : {};
|
|
9130
|
+
_context43.next = 4;
|
|
9032
9131
|
return this.post(this.baseURL + '/moderation/flags', _objectSpread({
|
|
9033
9132
|
filter_conditions: filterConditions
|
|
9034
9133
|
}, options));
|
|
9035
9134
|
|
|
9036
9135
|
case 4:
|
|
9037
|
-
return
|
|
9136
|
+
return _context43.abrupt("return", _context43.sent);
|
|
9038
9137
|
|
|
9039
9138
|
case 5:
|
|
9040
9139
|
case "end":
|
|
9041
|
-
return
|
|
9140
|
+
return _context43.stop();
|
|
9042
9141
|
}
|
|
9043
9142
|
}
|
|
9044
|
-
},
|
|
9143
|
+
}, _callee43, this);
|
|
9045
9144
|
}));
|
|
9046
9145
|
|
|
9047
9146
|
function _queryFlags() {
|
|
@@ -9067,30 +9166,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9067
9166
|
}, {
|
|
9068
9167
|
key: "_queryFlagReports",
|
|
9069
9168
|
value: function () {
|
|
9070
|
-
var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9169
|
+
var _queryFlagReports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44() {
|
|
9071
9170
|
var filterConditions,
|
|
9072
9171
|
options,
|
|
9073
|
-
|
|
9074
|
-
return _regeneratorRuntime.wrap(function
|
|
9172
|
+
_args44 = arguments;
|
|
9173
|
+
return _regeneratorRuntime.wrap(function _callee44$(_context44) {
|
|
9075
9174
|
while (1) {
|
|
9076
|
-
switch (
|
|
9175
|
+
switch (_context44.prev = _context44.next) {
|
|
9077
9176
|
case 0:
|
|
9078
|
-
filterConditions =
|
|
9079
|
-
options =
|
|
9080
|
-
|
|
9177
|
+
filterConditions = _args44.length > 0 && _args44[0] !== undefined ? _args44[0] : {};
|
|
9178
|
+
options = _args44.length > 1 && _args44[1] !== undefined ? _args44[1] : {};
|
|
9179
|
+
_context44.next = 4;
|
|
9081
9180
|
return this.post(this.baseURL + '/moderation/reports', _objectSpread({
|
|
9082
9181
|
filter_conditions: filterConditions
|
|
9083
9182
|
}, options));
|
|
9084
9183
|
|
|
9085
9184
|
case 4:
|
|
9086
|
-
return
|
|
9185
|
+
return _context44.abrupt("return", _context44.sent);
|
|
9087
9186
|
|
|
9088
9187
|
case 5:
|
|
9089
9188
|
case "end":
|
|
9090
|
-
return
|
|
9189
|
+
return _context44.stop();
|
|
9091
9190
|
}
|
|
9092
9191
|
}
|
|
9093
|
-
},
|
|
9192
|
+
}, _callee44, this);
|
|
9094
9193
|
}));
|
|
9095
9194
|
|
|
9096
9195
|
function _queryFlagReports() {
|
|
@@ -9117,31 +9216,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9117
9216
|
}, {
|
|
9118
9217
|
key: "_reviewFlagReport",
|
|
9119
9218
|
value: function () {
|
|
9120
|
-
var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9219
|
+
var _reviewFlagReport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(id, reviewResult) {
|
|
9121
9220
|
var options,
|
|
9122
|
-
|
|
9123
|
-
return _regeneratorRuntime.wrap(function
|
|
9221
|
+
_args45 = arguments;
|
|
9222
|
+
return _regeneratorRuntime.wrap(function _callee45$(_context45) {
|
|
9124
9223
|
while (1) {
|
|
9125
|
-
switch (
|
|
9224
|
+
switch (_context45.prev = _context45.next) {
|
|
9126
9225
|
case 0:
|
|
9127
|
-
options =
|
|
9128
|
-
|
|
9226
|
+
options = _args45.length > 2 && _args45[2] !== undefined ? _args45[2] : {};
|
|
9227
|
+
_context45.next = 3;
|
|
9129
9228
|
return this.patch(this.baseURL + "/moderation/reports/".concat(id), _objectSpread({
|
|
9130
9229
|
review_result: reviewResult
|
|
9131
9230
|
}, options));
|
|
9132
9231
|
|
|
9133
9232
|
case 3:
|
|
9134
|
-
return
|
|
9233
|
+
return _context45.abrupt("return", _context45.sent);
|
|
9135
9234
|
|
|
9136
9235
|
case 4:
|
|
9137
9236
|
case "end":
|
|
9138
|
-
return
|
|
9237
|
+
return _context45.stop();
|
|
9139
9238
|
}
|
|
9140
9239
|
}
|
|
9141
|
-
},
|
|
9240
|
+
}, _callee45, this);
|
|
9142
9241
|
}));
|
|
9143
9242
|
|
|
9144
|
-
function _reviewFlagReport(
|
|
9243
|
+
function _reviewFlagReport(_x56, _x57) {
|
|
9145
9244
|
return _reviewFlagReport2.apply(this, arguments);
|
|
9146
9245
|
}
|
|
9147
9246
|
|
|
@@ -9163,31 +9262,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9163
9262
|
}, {
|
|
9164
9263
|
key: "_unblockMessage",
|
|
9165
9264
|
value: function () {
|
|
9166
|
-
var _unblockMessage2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9265
|
+
var _unblockMessage2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(targetMessageID) {
|
|
9167
9266
|
var options,
|
|
9168
|
-
|
|
9169
|
-
return _regeneratorRuntime.wrap(function
|
|
9267
|
+
_args46 = arguments;
|
|
9268
|
+
return _regeneratorRuntime.wrap(function _callee46$(_context46) {
|
|
9170
9269
|
while (1) {
|
|
9171
|
-
switch (
|
|
9270
|
+
switch (_context46.prev = _context46.next) {
|
|
9172
9271
|
case 0:
|
|
9173
|
-
options =
|
|
9174
|
-
|
|
9272
|
+
options = _args46.length > 1 && _args46[1] !== undefined ? _args46[1] : {};
|
|
9273
|
+
_context46.next = 3;
|
|
9175
9274
|
return this.post(this.baseURL + '/moderation/unblock_message', _objectSpread({
|
|
9176
9275
|
target_message_id: targetMessageID
|
|
9177
9276
|
}, options));
|
|
9178
9277
|
|
|
9179
9278
|
case 3:
|
|
9180
|
-
return
|
|
9279
|
+
return _context46.abrupt("return", _context46.sent);
|
|
9181
9280
|
|
|
9182
9281
|
case 4:
|
|
9183
9282
|
case "end":
|
|
9184
|
-
return
|
|
9283
|
+
return _context46.stop();
|
|
9185
9284
|
}
|
|
9186
9285
|
}
|
|
9187
|
-
},
|
|
9286
|
+
}, _callee46, this);
|
|
9188
9287
|
}));
|
|
9189
9288
|
|
|
9190
|
-
function _unblockMessage(
|
|
9289
|
+
function _unblockMessage(_x58) {
|
|
9191
9290
|
return _unblockMessage2.apply(this, arguments);
|
|
9192
9291
|
}
|
|
9193
9292
|
|
|
@@ -9214,23 +9313,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9214
9313
|
* @return {Promise<APIResponse>}
|
|
9215
9314
|
*/
|
|
9216
9315
|
function () {
|
|
9217
|
-
var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9316
|
+
var _markChannelsRead = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47() {
|
|
9218
9317
|
var data,
|
|
9219
|
-
|
|
9220
|
-
return _regeneratorRuntime.wrap(function
|
|
9318
|
+
_args47 = arguments;
|
|
9319
|
+
return _regeneratorRuntime.wrap(function _callee47$(_context47) {
|
|
9221
9320
|
while (1) {
|
|
9222
|
-
switch (
|
|
9321
|
+
switch (_context47.prev = _context47.next) {
|
|
9223
9322
|
case 0:
|
|
9224
|
-
data =
|
|
9225
|
-
|
|
9323
|
+
data = _args47.length > 0 && _args47[0] !== undefined ? _args47[0] : {};
|
|
9324
|
+
_context47.next = 3;
|
|
9226
9325
|
return this.post(this.baseURL + '/channels/read', _objectSpread({}, data));
|
|
9227
9326
|
|
|
9228
9327
|
case 3:
|
|
9229
9328
|
case "end":
|
|
9230
|
-
return
|
|
9329
|
+
return _context47.stop();
|
|
9231
9330
|
}
|
|
9232
9331
|
}
|
|
9233
|
-
},
|
|
9332
|
+
}, _callee47, this);
|
|
9234
9333
|
}));
|
|
9235
9334
|
|
|
9236
9335
|
function markChannelsRead() {
|
|
@@ -9305,28 +9404,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9305
9404
|
}, {
|
|
9306
9405
|
key: "translateMessage",
|
|
9307
9406
|
value: function () {
|
|
9308
|
-
var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9309
|
-
return _regeneratorRuntime.wrap(function
|
|
9407
|
+
var _translateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(messageId, language) {
|
|
9408
|
+
return _regeneratorRuntime.wrap(function _callee48$(_context48) {
|
|
9310
9409
|
while (1) {
|
|
9311
|
-
switch (
|
|
9410
|
+
switch (_context48.prev = _context48.next) {
|
|
9312
9411
|
case 0:
|
|
9313
|
-
|
|
9412
|
+
_context48.next = 2;
|
|
9314
9413
|
return this.post(this.baseURL + "/messages/".concat(messageId, "/translate"), {
|
|
9315
9414
|
language: language
|
|
9316
9415
|
});
|
|
9317
9416
|
|
|
9318
9417
|
case 2:
|
|
9319
|
-
return
|
|
9418
|
+
return _context48.abrupt("return", _context48.sent);
|
|
9320
9419
|
|
|
9321
9420
|
case 3:
|
|
9322
9421
|
case "end":
|
|
9323
|
-
return
|
|
9422
|
+
return _context48.stop();
|
|
9324
9423
|
}
|
|
9325
9424
|
}
|
|
9326
|
-
},
|
|
9425
|
+
}, _callee48, this);
|
|
9327
9426
|
}));
|
|
9328
9427
|
|
|
9329
|
-
function translateMessage(
|
|
9428
|
+
function translateMessage(_x59, _x60) {
|
|
9330
9429
|
return _translateMessage.apply(this, arguments);
|
|
9331
9430
|
}
|
|
9332
9431
|
|
|
@@ -9428,14 +9527,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9428
9527
|
}, {
|
|
9429
9528
|
key: "updateMessage",
|
|
9430
9529
|
value: function () {
|
|
9431
|
-
var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9530
|
+
var _updateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(message, userId, options) {
|
|
9432
9531
|
var clonedMessage, reservedMessageFields;
|
|
9433
|
-
return _regeneratorRuntime.wrap(function
|
|
9532
|
+
return _regeneratorRuntime.wrap(function _callee49$(_context49) {
|
|
9434
9533
|
while (1) {
|
|
9435
|
-
switch (
|
|
9534
|
+
switch (_context49.prev = _context49.next) {
|
|
9436
9535
|
case 0:
|
|
9437
9536
|
if (message.id) {
|
|
9438
|
-
|
|
9537
|
+
_context49.next = 2;
|
|
9439
9538
|
break;
|
|
9440
9539
|
}
|
|
9441
9540
|
|
|
@@ -9472,23 +9571,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9472
9571
|
});
|
|
9473
9572
|
}
|
|
9474
9573
|
|
|
9475
|
-
|
|
9574
|
+
_context49.next = 10;
|
|
9476
9575
|
return this.post(this.baseURL + "/messages/".concat(message.id), _objectSpread({
|
|
9477
9576
|
message: clonedMessage
|
|
9478
9577
|
}, options));
|
|
9479
9578
|
|
|
9480
9579
|
case 10:
|
|
9481
|
-
return
|
|
9580
|
+
return _context49.abrupt("return", _context49.sent);
|
|
9482
9581
|
|
|
9483
9582
|
case 11:
|
|
9484
9583
|
case "end":
|
|
9485
|
-
return
|
|
9584
|
+
return _context49.stop();
|
|
9486
9585
|
}
|
|
9487
9586
|
}
|
|
9488
|
-
},
|
|
9587
|
+
}, _callee49, this);
|
|
9489
9588
|
}));
|
|
9490
9589
|
|
|
9491
|
-
function updateMessage(
|
|
9590
|
+
function updateMessage(_x61, _x62, _x63) {
|
|
9492
9591
|
return _updateMessage.apply(this, arguments);
|
|
9493
9592
|
}
|
|
9494
9593
|
|
|
@@ -9511,14 +9610,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9511
9610
|
}, {
|
|
9512
9611
|
key: "partialUpdateMessage",
|
|
9513
9612
|
value: function () {
|
|
9514
|
-
var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9613
|
+
var _partialUpdateMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50(id, partialMessageObject, userId, options) {
|
|
9515
9614
|
var user;
|
|
9516
|
-
return _regeneratorRuntime.wrap(function
|
|
9615
|
+
return _regeneratorRuntime.wrap(function _callee50$(_context50) {
|
|
9517
9616
|
while (1) {
|
|
9518
|
-
switch (
|
|
9617
|
+
switch (_context50.prev = _context50.next) {
|
|
9519
9618
|
case 0:
|
|
9520
9619
|
if (id) {
|
|
9521
|
-
|
|
9620
|
+
_context50.next = 2;
|
|
9522
9621
|
break;
|
|
9523
9622
|
}
|
|
9524
9623
|
|
|
@@ -9533,23 +9632,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9533
9632
|
};
|
|
9534
9633
|
}
|
|
9535
9634
|
|
|
9536
|
-
|
|
9635
|
+
_context50.next = 6;
|
|
9537
9636
|
return this.put(this.baseURL + "/messages/".concat(id), _objectSpread(_objectSpread(_objectSpread({}, partialMessageObject), options), {}, {
|
|
9538
9637
|
user: user
|
|
9539
9638
|
}));
|
|
9540
9639
|
|
|
9541
9640
|
case 6:
|
|
9542
|
-
return
|
|
9641
|
+
return _context50.abrupt("return", _context50.sent);
|
|
9543
9642
|
|
|
9544
9643
|
case 7:
|
|
9545
9644
|
case "end":
|
|
9546
|
-
return
|
|
9645
|
+
return _context50.stop();
|
|
9547
9646
|
}
|
|
9548
9647
|
}
|
|
9549
|
-
},
|
|
9648
|
+
}, _callee50, this);
|
|
9550
9649
|
}));
|
|
9551
9650
|
|
|
9552
|
-
function partialUpdateMessage(
|
|
9651
|
+
function partialUpdateMessage(_x64, _x65, _x66, _x67) {
|
|
9553
9652
|
return _partialUpdateMessage.apply(this, arguments);
|
|
9554
9653
|
}
|
|
9555
9654
|
|
|
@@ -9558,11 +9657,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9558
9657
|
}, {
|
|
9559
9658
|
key: "deleteMessage",
|
|
9560
9659
|
value: function () {
|
|
9561
|
-
var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9660
|
+
var _deleteMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51(messageID, hardDelete) {
|
|
9562
9661
|
var params;
|
|
9563
|
-
return _regeneratorRuntime.wrap(function
|
|
9662
|
+
return _regeneratorRuntime.wrap(function _callee51$(_context51) {
|
|
9564
9663
|
while (1) {
|
|
9565
|
-
switch (
|
|
9664
|
+
switch (_context51.prev = _context51.next) {
|
|
9566
9665
|
case 0:
|
|
9567
9666
|
params = {};
|
|
9568
9667
|
|
|
@@ -9572,21 +9671,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9572
9671
|
};
|
|
9573
9672
|
}
|
|
9574
9673
|
|
|
9575
|
-
|
|
9674
|
+
_context51.next = 4;
|
|
9576
9675
|
return this.delete(this.baseURL + "/messages/".concat(messageID), params);
|
|
9577
9676
|
|
|
9578
9677
|
case 4:
|
|
9579
|
-
return
|
|
9678
|
+
return _context51.abrupt("return", _context51.sent);
|
|
9580
9679
|
|
|
9581
9680
|
case 5:
|
|
9582
9681
|
case "end":
|
|
9583
|
-
return
|
|
9682
|
+
return _context51.stop();
|
|
9584
9683
|
}
|
|
9585
9684
|
}
|
|
9586
|
-
},
|
|
9685
|
+
}, _callee51, this);
|
|
9587
9686
|
}));
|
|
9588
9687
|
|
|
9589
|
-
function deleteMessage(
|
|
9688
|
+
function deleteMessage(_x68, _x69) {
|
|
9590
9689
|
return _deleteMessage.apply(this, arguments);
|
|
9591
9690
|
}
|
|
9592
9691
|
|
|
@@ -9595,26 +9694,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9595
9694
|
}, {
|
|
9596
9695
|
key: "getMessage",
|
|
9597
9696
|
value: function () {
|
|
9598
|
-
var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9599
|
-
return _regeneratorRuntime.wrap(function
|
|
9697
|
+
var _getMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(messageID) {
|
|
9698
|
+
return _regeneratorRuntime.wrap(function _callee52$(_context52) {
|
|
9600
9699
|
while (1) {
|
|
9601
|
-
switch (
|
|
9700
|
+
switch (_context52.prev = _context52.next) {
|
|
9602
9701
|
case 0:
|
|
9603
|
-
|
|
9702
|
+
_context52.next = 2;
|
|
9604
9703
|
return this.get(this.baseURL + "/messages/".concat(messageID));
|
|
9605
9704
|
|
|
9606
9705
|
case 2:
|
|
9607
|
-
return
|
|
9706
|
+
return _context52.abrupt("return", _context52.sent);
|
|
9608
9707
|
|
|
9609
9708
|
case 3:
|
|
9610
9709
|
case "end":
|
|
9611
|
-
return
|
|
9710
|
+
return _context52.stop();
|
|
9612
9711
|
}
|
|
9613
9712
|
}
|
|
9614
|
-
},
|
|
9713
|
+
}, _callee52, this);
|
|
9615
9714
|
}));
|
|
9616
9715
|
|
|
9617
|
-
function getMessage(
|
|
9716
|
+
function getMessage(_x70) {
|
|
9618
9717
|
return _getMessage.apply(this, arguments);
|
|
9619
9718
|
}
|
|
9620
9719
|
|
|
@@ -9623,7 +9722,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9623
9722
|
}, {
|
|
9624
9723
|
key: "getUserAgent",
|
|
9625
9724
|
value: function getUserAgent() {
|
|
9626
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "6.
|
|
9725
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "6.7.2");
|
|
9627
9726
|
}
|
|
9628
9727
|
}, {
|
|
9629
9728
|
key: "setUserAgent",
|
|
@@ -9818,28 +9917,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9818
9917
|
}, {
|
|
9819
9918
|
key: "sendUserCustomEvent",
|
|
9820
9919
|
value: function () {
|
|
9821
|
-
var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
9822
|
-
return _regeneratorRuntime.wrap(function
|
|
9920
|
+
var _sendUserCustomEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53(targetUserID, event) {
|
|
9921
|
+
return _regeneratorRuntime.wrap(function _callee53$(_context53) {
|
|
9823
9922
|
while (1) {
|
|
9824
|
-
switch (
|
|
9923
|
+
switch (_context53.prev = _context53.next) {
|
|
9825
9924
|
case 0:
|
|
9826
|
-
|
|
9925
|
+
_context53.next = 2;
|
|
9827
9926
|
return this.post("".concat(this.baseURL, "/users/").concat(targetUserID, "/event"), {
|
|
9828
9927
|
event: event
|
|
9829
9928
|
});
|
|
9830
9929
|
|
|
9831
9930
|
case 2:
|
|
9832
|
-
return
|
|
9931
|
+
return _context53.abrupt("return", _context53.sent);
|
|
9833
9932
|
|
|
9834
9933
|
case 3:
|
|
9835
9934
|
case "end":
|
|
9836
|
-
return
|
|
9935
|
+
return _context53.stop();
|
|
9837
9936
|
}
|
|
9838
9937
|
}
|
|
9839
|
-
},
|
|
9938
|
+
}, _callee53, this);
|
|
9840
9939
|
}));
|
|
9841
9940
|
|
|
9842
|
-
function sendUserCustomEvent(
|
|
9941
|
+
function sendUserCustomEvent(_x71, _x72) {
|
|
9843
9942
|
return _sendUserCustomEvent.apply(this, arguments);
|
|
9844
9943
|
}
|
|
9845
9944
|
|
|
@@ -9907,32 +10006,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9907
10006
|
}, {
|
|
9908
10007
|
key: "createSegment",
|
|
9909
10008
|
value: function () {
|
|
9910
|
-
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10009
|
+
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54(params) {
|
|
9911
10010
|
var _yield$this$post, segment;
|
|
9912
10011
|
|
|
9913
|
-
return _regeneratorRuntime.wrap(function
|
|
10012
|
+
return _regeneratorRuntime.wrap(function _callee54$(_context54) {
|
|
9914
10013
|
while (1) {
|
|
9915
|
-
switch (
|
|
10014
|
+
switch (_context54.prev = _context54.next) {
|
|
9916
10015
|
case 0:
|
|
9917
|
-
|
|
10016
|
+
_context54.next = 2;
|
|
9918
10017
|
return this.post(this.baseURL + "/segments", {
|
|
9919
10018
|
segment: params
|
|
9920
10019
|
});
|
|
9921
10020
|
|
|
9922
10021
|
case 2:
|
|
9923
|
-
_yield$this$post =
|
|
10022
|
+
_yield$this$post = _context54.sent;
|
|
9924
10023
|
segment = _yield$this$post.segment;
|
|
9925
|
-
return
|
|
10024
|
+
return _context54.abrupt("return", segment);
|
|
9926
10025
|
|
|
9927
10026
|
case 5:
|
|
9928
10027
|
case "end":
|
|
9929
|
-
return
|
|
10028
|
+
return _context54.stop();
|
|
9930
10029
|
}
|
|
9931
10030
|
}
|
|
9932
|
-
},
|
|
10031
|
+
}, _callee54, this);
|
|
9933
10032
|
}));
|
|
9934
10033
|
|
|
9935
|
-
function createSegment(
|
|
10034
|
+
function createSegment(_x73) {
|
|
9936
10035
|
return _createSegment.apply(this, arguments);
|
|
9937
10036
|
}
|
|
9938
10037
|
|
|
@@ -9949,30 +10048,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9949
10048
|
}, {
|
|
9950
10049
|
key: "getSegment",
|
|
9951
10050
|
value: function () {
|
|
9952
|
-
var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10051
|
+
var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(id) {
|
|
9953
10052
|
var _yield$this$get, segment;
|
|
9954
10053
|
|
|
9955
|
-
return _regeneratorRuntime.wrap(function
|
|
10054
|
+
return _regeneratorRuntime.wrap(function _callee55$(_context55) {
|
|
9956
10055
|
while (1) {
|
|
9957
|
-
switch (
|
|
10056
|
+
switch (_context55.prev = _context55.next) {
|
|
9958
10057
|
case 0:
|
|
9959
|
-
|
|
10058
|
+
_context55.next = 2;
|
|
9960
10059
|
return this.get(this.baseURL + "/segments/".concat(id));
|
|
9961
10060
|
|
|
9962
10061
|
case 2:
|
|
9963
|
-
_yield$this$get =
|
|
10062
|
+
_yield$this$get = _context55.sent;
|
|
9964
10063
|
segment = _yield$this$get.segment;
|
|
9965
|
-
return
|
|
10064
|
+
return _context55.abrupt("return", segment);
|
|
9966
10065
|
|
|
9967
10066
|
case 5:
|
|
9968
10067
|
case "end":
|
|
9969
|
-
return
|
|
10068
|
+
return _context55.stop();
|
|
9970
10069
|
}
|
|
9971
10070
|
}
|
|
9972
|
-
},
|
|
10071
|
+
}, _callee55, this);
|
|
9973
10072
|
}));
|
|
9974
10073
|
|
|
9975
|
-
function getSegment(
|
|
10074
|
+
function getSegment(_x74) {
|
|
9976
10075
|
return _getSegment.apply(this, arguments);
|
|
9977
10076
|
}
|
|
9978
10077
|
|
|
@@ -9988,30 +10087,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9988
10087
|
}, {
|
|
9989
10088
|
key: "listSegments",
|
|
9990
10089
|
value: function () {
|
|
9991
|
-
var _listSegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10090
|
+
var _listSegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(options) {
|
|
9992
10091
|
var _yield$this$get2, segments;
|
|
9993
10092
|
|
|
9994
|
-
return _regeneratorRuntime.wrap(function
|
|
10093
|
+
return _regeneratorRuntime.wrap(function _callee56$(_context56) {
|
|
9995
10094
|
while (1) {
|
|
9996
|
-
switch (
|
|
10095
|
+
switch (_context56.prev = _context56.next) {
|
|
9997
10096
|
case 0:
|
|
9998
|
-
|
|
10097
|
+
_context56.next = 2;
|
|
9999
10098
|
return this.get(this.baseURL + "/segments", options);
|
|
10000
10099
|
|
|
10001
10100
|
case 2:
|
|
10002
|
-
_yield$this$get2 =
|
|
10101
|
+
_yield$this$get2 = _context56.sent;
|
|
10003
10102
|
segments = _yield$this$get2.segments;
|
|
10004
|
-
return
|
|
10103
|
+
return _context56.abrupt("return", segments);
|
|
10005
10104
|
|
|
10006
10105
|
case 5:
|
|
10007
10106
|
case "end":
|
|
10008
|
-
return
|
|
10107
|
+
return _context56.stop();
|
|
10009
10108
|
}
|
|
10010
10109
|
}
|
|
10011
|
-
},
|
|
10110
|
+
}, _callee56, this);
|
|
10012
10111
|
}));
|
|
10013
10112
|
|
|
10014
|
-
function listSegments(
|
|
10113
|
+
function listSegments(_x75) {
|
|
10015
10114
|
return _listSegments.apply(this, arguments);
|
|
10016
10115
|
}
|
|
10017
10116
|
|
|
@@ -10029,32 +10128,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10029
10128
|
}, {
|
|
10030
10129
|
key: "updateSegment",
|
|
10031
10130
|
value: function () {
|
|
10032
|
-
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10131
|
+
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(id, params) {
|
|
10033
10132
|
var _yield$this$put, segment;
|
|
10034
10133
|
|
|
10035
|
-
return _regeneratorRuntime.wrap(function
|
|
10134
|
+
return _regeneratorRuntime.wrap(function _callee57$(_context57) {
|
|
10036
10135
|
while (1) {
|
|
10037
|
-
switch (
|
|
10136
|
+
switch (_context57.prev = _context57.next) {
|
|
10038
10137
|
case 0:
|
|
10039
|
-
|
|
10138
|
+
_context57.next = 2;
|
|
10040
10139
|
return this.put(this.baseURL + "/segments/".concat(id), {
|
|
10041
10140
|
segment: params
|
|
10042
10141
|
});
|
|
10043
10142
|
|
|
10044
10143
|
case 2:
|
|
10045
|
-
_yield$this$put =
|
|
10144
|
+
_yield$this$put = _context57.sent;
|
|
10046
10145
|
segment = _yield$this$put.segment;
|
|
10047
|
-
return
|
|
10146
|
+
return _context57.abrupt("return", segment);
|
|
10048
10147
|
|
|
10049
10148
|
case 5:
|
|
10050
10149
|
case "end":
|
|
10051
|
-
return
|
|
10150
|
+
return _context57.stop();
|
|
10052
10151
|
}
|
|
10053
10152
|
}
|
|
10054
|
-
},
|
|
10153
|
+
}, _callee57, this);
|
|
10055
10154
|
}));
|
|
10056
10155
|
|
|
10057
|
-
function updateSegment(
|
|
10156
|
+
function updateSegment(_x76, _x77) {
|
|
10058
10157
|
return _updateSegment.apply(this, arguments);
|
|
10059
10158
|
}
|
|
10060
10159
|
|
|
@@ -10071,22 +10170,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10071
10170
|
}, {
|
|
10072
10171
|
key: "deleteSegment",
|
|
10073
10172
|
value: function () {
|
|
10074
|
-
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10075
|
-
return _regeneratorRuntime.wrap(function
|
|
10173
|
+
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(id) {
|
|
10174
|
+
return _regeneratorRuntime.wrap(function _callee58$(_context58) {
|
|
10076
10175
|
while (1) {
|
|
10077
|
-
switch (
|
|
10176
|
+
switch (_context58.prev = _context58.next) {
|
|
10078
10177
|
case 0:
|
|
10079
|
-
return
|
|
10178
|
+
return _context58.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
|
|
10080
10179
|
|
|
10081
10180
|
case 1:
|
|
10082
10181
|
case "end":
|
|
10083
|
-
return
|
|
10182
|
+
return _context58.stop();
|
|
10084
10183
|
}
|
|
10085
10184
|
}
|
|
10086
|
-
},
|
|
10185
|
+
}, _callee58, this);
|
|
10087
10186
|
}));
|
|
10088
10187
|
|
|
10089
|
-
function deleteSegment(
|
|
10188
|
+
function deleteSegment(_x78) {
|
|
10090
10189
|
return _deleteSegment.apply(this, arguments);
|
|
10091
10190
|
}
|
|
10092
10191
|
|
|
@@ -10103,32 +10202,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10103
10202
|
}, {
|
|
10104
10203
|
key: "createCampaign",
|
|
10105
10204
|
value: function () {
|
|
10106
|
-
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10205
|
+
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(params) {
|
|
10107
10206
|
var _yield$this$post2, campaign;
|
|
10108
10207
|
|
|
10109
|
-
return _regeneratorRuntime.wrap(function
|
|
10208
|
+
return _regeneratorRuntime.wrap(function _callee59$(_context59) {
|
|
10110
10209
|
while (1) {
|
|
10111
|
-
switch (
|
|
10210
|
+
switch (_context59.prev = _context59.next) {
|
|
10112
10211
|
case 0:
|
|
10113
|
-
|
|
10212
|
+
_context59.next = 2;
|
|
10114
10213
|
return this.post(this.baseURL + "/campaigns", {
|
|
10115
10214
|
campaign: params
|
|
10116
10215
|
});
|
|
10117
10216
|
|
|
10118
10217
|
case 2:
|
|
10119
|
-
_yield$this$post2 =
|
|
10218
|
+
_yield$this$post2 = _context59.sent;
|
|
10120
10219
|
campaign = _yield$this$post2.campaign;
|
|
10121
|
-
return
|
|
10220
|
+
return _context59.abrupt("return", campaign);
|
|
10122
10221
|
|
|
10123
10222
|
case 5:
|
|
10124
10223
|
case "end":
|
|
10125
|
-
return
|
|
10224
|
+
return _context59.stop();
|
|
10126
10225
|
}
|
|
10127
10226
|
}
|
|
10128
|
-
},
|
|
10227
|
+
}, _callee59, this);
|
|
10129
10228
|
}));
|
|
10130
10229
|
|
|
10131
|
-
function createCampaign(
|
|
10230
|
+
function createCampaign(_x79) {
|
|
10132
10231
|
return _createCampaign.apply(this, arguments);
|
|
10133
10232
|
}
|
|
10134
10233
|
|
|
@@ -10145,30 +10244,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10145
10244
|
}, {
|
|
10146
10245
|
key: "getCampaign",
|
|
10147
10246
|
value: function () {
|
|
10148
|
-
var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10247
|
+
var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(id) {
|
|
10149
10248
|
var _yield$this$get3, campaign;
|
|
10150
10249
|
|
|
10151
|
-
return _regeneratorRuntime.wrap(function
|
|
10250
|
+
return _regeneratorRuntime.wrap(function _callee60$(_context60) {
|
|
10152
10251
|
while (1) {
|
|
10153
|
-
switch (
|
|
10252
|
+
switch (_context60.prev = _context60.next) {
|
|
10154
10253
|
case 0:
|
|
10155
|
-
|
|
10254
|
+
_context60.next = 2;
|
|
10156
10255
|
return this.get(this.baseURL + "/campaigns/".concat(id));
|
|
10157
10256
|
|
|
10158
10257
|
case 2:
|
|
10159
|
-
_yield$this$get3 =
|
|
10258
|
+
_yield$this$get3 = _context60.sent;
|
|
10160
10259
|
campaign = _yield$this$get3.campaign;
|
|
10161
|
-
return
|
|
10260
|
+
return _context60.abrupt("return", campaign);
|
|
10162
10261
|
|
|
10163
10262
|
case 5:
|
|
10164
10263
|
case "end":
|
|
10165
|
-
return
|
|
10264
|
+
return _context60.stop();
|
|
10166
10265
|
}
|
|
10167
10266
|
}
|
|
10168
|
-
},
|
|
10267
|
+
}, _callee60, this);
|
|
10169
10268
|
}));
|
|
10170
10269
|
|
|
10171
|
-
function getCampaign(
|
|
10270
|
+
function getCampaign(_x80) {
|
|
10172
10271
|
return _getCampaign.apply(this, arguments);
|
|
10173
10272
|
}
|
|
10174
10273
|
|
|
@@ -10184,30 +10283,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10184
10283
|
}, {
|
|
10185
10284
|
key: "listCampaigns",
|
|
10186
10285
|
value: function () {
|
|
10187
|
-
var _listCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10286
|
+
var _listCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(options) {
|
|
10188
10287
|
var _yield$this$get4, campaigns;
|
|
10189
10288
|
|
|
10190
|
-
return _regeneratorRuntime.wrap(function
|
|
10289
|
+
return _regeneratorRuntime.wrap(function _callee61$(_context61) {
|
|
10191
10290
|
while (1) {
|
|
10192
|
-
switch (
|
|
10291
|
+
switch (_context61.prev = _context61.next) {
|
|
10193
10292
|
case 0:
|
|
10194
|
-
|
|
10293
|
+
_context61.next = 2;
|
|
10195
10294
|
return this.get(this.baseURL + "/campaigns", options);
|
|
10196
10295
|
|
|
10197
10296
|
case 2:
|
|
10198
|
-
_yield$this$get4 =
|
|
10297
|
+
_yield$this$get4 = _context61.sent;
|
|
10199
10298
|
campaigns = _yield$this$get4.campaigns;
|
|
10200
|
-
return
|
|
10299
|
+
return _context61.abrupt("return", campaigns);
|
|
10201
10300
|
|
|
10202
10301
|
case 5:
|
|
10203
10302
|
case "end":
|
|
10204
|
-
return
|
|
10303
|
+
return _context61.stop();
|
|
10205
10304
|
}
|
|
10206
10305
|
}
|
|
10207
|
-
},
|
|
10306
|
+
}, _callee61, this);
|
|
10208
10307
|
}));
|
|
10209
10308
|
|
|
10210
|
-
function listCampaigns(
|
|
10309
|
+
function listCampaigns(_x81) {
|
|
10211
10310
|
return _listCampaigns.apply(this, arguments);
|
|
10212
10311
|
}
|
|
10213
10312
|
|
|
@@ -10225,32 +10324,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10225
10324
|
}, {
|
|
10226
10325
|
key: "updateCampaign",
|
|
10227
10326
|
value: function () {
|
|
10228
|
-
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10327
|
+
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(id, params) {
|
|
10229
10328
|
var _yield$this$put2, campaign;
|
|
10230
10329
|
|
|
10231
|
-
return _regeneratorRuntime.wrap(function
|
|
10330
|
+
return _regeneratorRuntime.wrap(function _callee62$(_context62) {
|
|
10232
10331
|
while (1) {
|
|
10233
|
-
switch (
|
|
10332
|
+
switch (_context62.prev = _context62.next) {
|
|
10234
10333
|
case 0:
|
|
10235
|
-
|
|
10334
|
+
_context62.next = 2;
|
|
10236
10335
|
return this.put(this.baseURL + "/campaigns/".concat(id), {
|
|
10237
10336
|
campaign: params
|
|
10238
10337
|
});
|
|
10239
10338
|
|
|
10240
10339
|
case 2:
|
|
10241
|
-
_yield$this$put2 =
|
|
10340
|
+
_yield$this$put2 = _context62.sent;
|
|
10242
10341
|
campaign = _yield$this$put2.campaign;
|
|
10243
|
-
return
|
|
10342
|
+
return _context62.abrupt("return", campaign);
|
|
10244
10343
|
|
|
10245
10344
|
case 5:
|
|
10246
10345
|
case "end":
|
|
10247
|
-
return
|
|
10346
|
+
return _context62.stop();
|
|
10248
10347
|
}
|
|
10249
10348
|
}
|
|
10250
|
-
},
|
|
10349
|
+
}, _callee62, this);
|
|
10251
10350
|
}));
|
|
10252
10351
|
|
|
10253
|
-
function updateCampaign(
|
|
10352
|
+
function updateCampaign(_x82, _x83) {
|
|
10254
10353
|
return _updateCampaign.apply(this, arguments);
|
|
10255
10354
|
}
|
|
10256
10355
|
|
|
@@ -10267,22 +10366,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10267
10366
|
}, {
|
|
10268
10367
|
key: "deleteCampaign",
|
|
10269
10368
|
value: function () {
|
|
10270
|
-
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10271
|
-
return _regeneratorRuntime.wrap(function
|
|
10369
|
+
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(id) {
|
|
10370
|
+
return _regeneratorRuntime.wrap(function _callee63$(_context63) {
|
|
10272
10371
|
while (1) {
|
|
10273
|
-
switch (
|
|
10372
|
+
switch (_context63.prev = _context63.next) {
|
|
10274
10373
|
case 0:
|
|
10275
|
-
return
|
|
10374
|
+
return _context63.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id)));
|
|
10276
10375
|
|
|
10277
10376
|
case 1:
|
|
10278
10377
|
case "end":
|
|
10279
|
-
return
|
|
10378
|
+
return _context63.stop();
|
|
10280
10379
|
}
|
|
10281
10380
|
}
|
|
10282
|
-
},
|
|
10381
|
+
}, _callee63, this);
|
|
10283
10382
|
}));
|
|
10284
10383
|
|
|
10285
|
-
function deleteCampaign(
|
|
10384
|
+
function deleteCampaign(_x84) {
|
|
10286
10385
|
return _deleteCampaign.apply(this, arguments);
|
|
10287
10386
|
}
|
|
10288
10387
|
|
|
@@ -10300,33 +10399,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10300
10399
|
}, {
|
|
10301
10400
|
key: "scheduleCampaign",
|
|
10302
10401
|
value: function () {
|
|
10303
|
-
var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10402
|
+
var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(id, params) {
|
|
10304
10403
|
var scheduledFor, _yield$this$patch, campaign;
|
|
10305
10404
|
|
|
10306
|
-
return _regeneratorRuntime.wrap(function
|
|
10405
|
+
return _regeneratorRuntime.wrap(function _callee64$(_context64) {
|
|
10307
10406
|
while (1) {
|
|
10308
|
-
switch (
|
|
10407
|
+
switch (_context64.prev = _context64.next) {
|
|
10309
10408
|
case 0:
|
|
10310
10409
|
scheduledFor = params.scheduledFor;
|
|
10311
|
-
|
|
10410
|
+
_context64.next = 3;
|
|
10312
10411
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/schedule"), {
|
|
10313
10412
|
scheduled_for: scheduledFor
|
|
10314
10413
|
});
|
|
10315
10414
|
|
|
10316
10415
|
case 3:
|
|
10317
|
-
_yield$this$patch =
|
|
10416
|
+
_yield$this$patch = _context64.sent;
|
|
10318
10417
|
campaign = _yield$this$patch.campaign;
|
|
10319
|
-
return
|
|
10418
|
+
return _context64.abrupt("return", campaign);
|
|
10320
10419
|
|
|
10321
10420
|
case 6:
|
|
10322
10421
|
case "end":
|
|
10323
|
-
return
|
|
10422
|
+
return _context64.stop();
|
|
10324
10423
|
}
|
|
10325
10424
|
}
|
|
10326
|
-
},
|
|
10425
|
+
}, _callee64, this);
|
|
10327
10426
|
}));
|
|
10328
10427
|
|
|
10329
|
-
function scheduleCampaign(
|
|
10428
|
+
function scheduleCampaign(_x85, _x86) {
|
|
10330
10429
|
return _scheduleCampaign.apply(this, arguments);
|
|
10331
10430
|
}
|
|
10332
10431
|
|
|
@@ -10343,30 +10442,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10343
10442
|
}, {
|
|
10344
10443
|
key: "stopCampaign",
|
|
10345
10444
|
value: function () {
|
|
10346
|
-
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10445
|
+
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(id) {
|
|
10347
10446
|
var _yield$this$patch2, campaign;
|
|
10348
10447
|
|
|
10349
|
-
return _regeneratorRuntime.wrap(function
|
|
10448
|
+
return _regeneratorRuntime.wrap(function _callee65$(_context65) {
|
|
10350
10449
|
while (1) {
|
|
10351
|
-
switch (
|
|
10450
|
+
switch (_context65.prev = _context65.next) {
|
|
10352
10451
|
case 0:
|
|
10353
|
-
|
|
10452
|
+
_context65.next = 2;
|
|
10354
10453
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/stop"));
|
|
10355
10454
|
|
|
10356
10455
|
case 2:
|
|
10357
|
-
_yield$this$patch2 =
|
|
10456
|
+
_yield$this$patch2 = _context65.sent;
|
|
10358
10457
|
campaign = _yield$this$patch2.campaign;
|
|
10359
|
-
return
|
|
10458
|
+
return _context65.abrupt("return", campaign);
|
|
10360
10459
|
|
|
10361
10460
|
case 5:
|
|
10362
10461
|
case "end":
|
|
10363
|
-
return
|
|
10462
|
+
return _context65.stop();
|
|
10364
10463
|
}
|
|
10365
10464
|
}
|
|
10366
|
-
},
|
|
10465
|
+
}, _callee65, this);
|
|
10367
10466
|
}));
|
|
10368
10467
|
|
|
10369
|
-
function stopCampaign(
|
|
10468
|
+
function stopCampaign(_x87) {
|
|
10370
10469
|
return _stopCampaign.apply(this, arguments);
|
|
10371
10470
|
}
|
|
10372
10471
|
|
|
@@ -10383,30 +10482,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10383
10482
|
}, {
|
|
10384
10483
|
key: "resumeCampaign",
|
|
10385
10484
|
value: function () {
|
|
10386
|
-
var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10485
|
+
var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(id) {
|
|
10387
10486
|
var _yield$this$patch3, campaign;
|
|
10388
10487
|
|
|
10389
|
-
return _regeneratorRuntime.wrap(function
|
|
10488
|
+
return _regeneratorRuntime.wrap(function _callee66$(_context66) {
|
|
10390
10489
|
while (1) {
|
|
10391
|
-
switch (
|
|
10490
|
+
switch (_context66.prev = _context66.next) {
|
|
10392
10491
|
case 0:
|
|
10393
|
-
|
|
10492
|
+
_context66.next = 2;
|
|
10394
10493
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/resume"));
|
|
10395
10494
|
|
|
10396
10495
|
case 2:
|
|
10397
|
-
_yield$this$patch3 =
|
|
10496
|
+
_yield$this$patch3 = _context66.sent;
|
|
10398
10497
|
campaign = _yield$this$patch3.campaign;
|
|
10399
|
-
return
|
|
10498
|
+
return _context66.abrupt("return", campaign);
|
|
10400
10499
|
|
|
10401
10500
|
case 5:
|
|
10402
10501
|
case "end":
|
|
10403
|
-
return
|
|
10502
|
+
return _context66.stop();
|
|
10404
10503
|
}
|
|
10405
10504
|
}
|
|
10406
|
-
},
|
|
10505
|
+
}, _callee66, this);
|
|
10407
10506
|
}));
|
|
10408
10507
|
|
|
10409
|
-
function resumeCampaign(
|
|
10508
|
+
function resumeCampaign(_x88) {
|
|
10410
10509
|
return _resumeCampaign.apply(this, arguments);
|
|
10411
10510
|
}
|
|
10412
10511
|
|
|
@@ -10424,30 +10523,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10424
10523
|
}, {
|
|
10425
10524
|
key: "testCampaign",
|
|
10426
10525
|
value: function () {
|
|
10427
|
-
var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10526
|
+
var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(id, params) {
|
|
10428
10527
|
var users;
|
|
10429
|
-
return _regeneratorRuntime.wrap(function
|
|
10528
|
+
return _regeneratorRuntime.wrap(function _callee67$(_context67) {
|
|
10430
10529
|
while (1) {
|
|
10431
|
-
switch (
|
|
10530
|
+
switch (_context67.prev = _context67.next) {
|
|
10432
10531
|
case 0:
|
|
10433
10532
|
users = params.users;
|
|
10434
|
-
|
|
10533
|
+
_context67.next = 3;
|
|
10435
10534
|
return this.post(this.baseURL + "/campaigns/".concat(id, "/test"), {
|
|
10436
10535
|
users: users
|
|
10437
10536
|
});
|
|
10438
10537
|
|
|
10439
10538
|
case 3:
|
|
10440
|
-
return
|
|
10539
|
+
return _context67.abrupt("return", _context67.sent);
|
|
10441
10540
|
|
|
10442
10541
|
case 4:
|
|
10443
10542
|
case "end":
|
|
10444
|
-
return
|
|
10543
|
+
return _context67.stop();
|
|
10445
10544
|
}
|
|
10446
10545
|
}
|
|
10447
|
-
},
|
|
10546
|
+
}, _callee67, this);
|
|
10448
10547
|
}));
|
|
10449
10548
|
|
|
10450
|
-
function testCampaign(
|
|
10549
|
+
function testCampaign(_x89, _x90) {
|
|
10451
10550
|
return _testCampaign.apply(this, arguments);
|
|
10452
10551
|
}
|
|
10453
10552
|
|
|
@@ -10463,24 +10562,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10463
10562
|
}, {
|
|
10464
10563
|
key: "enrichURL",
|
|
10465
10564
|
value: function () {
|
|
10466
|
-
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10467
|
-
return _regeneratorRuntime.wrap(function
|
|
10565
|
+
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(url) {
|
|
10566
|
+
return _regeneratorRuntime.wrap(function _callee68$(_context68) {
|
|
10468
10567
|
while (1) {
|
|
10469
|
-
switch (
|
|
10568
|
+
switch (_context68.prev = _context68.next) {
|
|
10470
10569
|
case 0:
|
|
10471
|
-
return
|
|
10570
|
+
return _context68.abrupt("return", this.get(this.baseURL + "/og", {
|
|
10472
10571
|
url: url
|
|
10473
10572
|
}));
|
|
10474
10573
|
|
|
10475
10574
|
case 1:
|
|
10476
10575
|
case "end":
|
|
10477
|
-
return
|
|
10576
|
+
return _context68.stop();
|
|
10478
10577
|
}
|
|
10479
10578
|
}
|
|
10480
|
-
},
|
|
10579
|
+
}, _callee68, this);
|
|
10481
10580
|
}));
|
|
10482
10581
|
|
|
10483
|
-
function enrichURL(
|
|
10582
|
+
function enrichURL(_x91) {
|
|
10484
10583
|
return _enrichURL.apply(this, arguments);
|
|
10485
10584
|
}
|
|
10486
10585
|
|
|
@@ -10497,22 +10596,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10497
10596
|
}, {
|
|
10498
10597
|
key: "getTask",
|
|
10499
10598
|
value: function () {
|
|
10500
|
-
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10501
|
-
return _regeneratorRuntime.wrap(function
|
|
10599
|
+
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(id) {
|
|
10600
|
+
return _regeneratorRuntime.wrap(function _callee69$(_context69) {
|
|
10502
10601
|
while (1) {
|
|
10503
|
-
switch (
|
|
10602
|
+
switch (_context69.prev = _context69.next) {
|
|
10504
10603
|
case 0:
|
|
10505
|
-
return
|
|
10604
|
+
return _context69.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
|
|
10506
10605
|
|
|
10507
10606
|
case 1:
|
|
10508
10607
|
case "end":
|
|
10509
|
-
return
|
|
10608
|
+
return _context69.stop();
|
|
10510
10609
|
}
|
|
10511
10610
|
}
|
|
10512
|
-
},
|
|
10611
|
+
}, _callee69, this);
|
|
10513
10612
|
}));
|
|
10514
10613
|
|
|
10515
|
-
function getTask(
|
|
10614
|
+
function getTask(_x92) {
|
|
10516
10615
|
return _getTask.apply(this, arguments);
|
|
10517
10616
|
}
|
|
10518
10617
|
|
|
@@ -10530,31 +10629,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10530
10629
|
}, {
|
|
10531
10630
|
key: "deleteChannels",
|
|
10532
10631
|
value: function () {
|
|
10533
|
-
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10632
|
+
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(cids) {
|
|
10534
10633
|
var options,
|
|
10535
|
-
|
|
10536
|
-
return _regeneratorRuntime.wrap(function
|
|
10634
|
+
_args70 = arguments;
|
|
10635
|
+
return _regeneratorRuntime.wrap(function _callee70$(_context70) {
|
|
10537
10636
|
while (1) {
|
|
10538
|
-
switch (
|
|
10637
|
+
switch (_context70.prev = _context70.next) {
|
|
10539
10638
|
case 0:
|
|
10540
|
-
options =
|
|
10541
|
-
|
|
10639
|
+
options = _args70.length > 1 && _args70[1] !== undefined ? _args70[1] : {};
|
|
10640
|
+
_context70.next = 3;
|
|
10542
10641
|
return this.post(this.baseURL + "/channels/delete", _objectSpread({
|
|
10543
10642
|
cids: cids
|
|
10544
10643
|
}, options));
|
|
10545
10644
|
|
|
10546
10645
|
case 3:
|
|
10547
|
-
return
|
|
10646
|
+
return _context70.abrupt("return", _context70.sent);
|
|
10548
10647
|
|
|
10549
10648
|
case 4:
|
|
10550
10649
|
case "end":
|
|
10551
|
-
return
|
|
10650
|
+
return _context70.stop();
|
|
10552
10651
|
}
|
|
10553
10652
|
}
|
|
10554
|
-
},
|
|
10653
|
+
}, _callee70, this);
|
|
10555
10654
|
}));
|
|
10556
10655
|
|
|
10557
|
-
function deleteChannels(
|
|
10656
|
+
function deleteChannels(_x93) {
|
|
10558
10657
|
return _deleteChannels.apply(this, arguments);
|
|
10559
10658
|
}
|
|
10560
10659
|
|
|
@@ -10572,13 +10671,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10572
10671
|
}, {
|
|
10573
10672
|
key: "deleteUsers",
|
|
10574
10673
|
value: function () {
|
|
10575
|
-
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10576
|
-
return _regeneratorRuntime.wrap(function
|
|
10674
|
+
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(user_ids, options) {
|
|
10675
|
+
return _regeneratorRuntime.wrap(function _callee71$(_context71) {
|
|
10577
10676
|
while (1) {
|
|
10578
|
-
switch (
|
|
10677
|
+
switch (_context71.prev = _context71.next) {
|
|
10579
10678
|
case 0:
|
|
10580
10679
|
if (!((options === null || options === void 0 ? void 0 : options.user) !== 'soft' && (options === null || options === void 0 ? void 0 : options.user) !== 'hard')) {
|
|
10581
|
-
|
|
10680
|
+
_context71.next = 2;
|
|
10582
10681
|
break;
|
|
10583
10682
|
}
|
|
10584
10683
|
|
|
@@ -10586,7 +10685,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10586
10685
|
|
|
10587
10686
|
case 2:
|
|
10588
10687
|
if (!(options.messages !== undefined && options.messages !== 'soft' && options.messages !== 'hard')) {
|
|
10589
|
-
|
|
10688
|
+
_context71.next = 4;
|
|
10590
10689
|
break;
|
|
10591
10690
|
}
|
|
10592
10691
|
|
|
@@ -10594,30 +10693,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10594
10693
|
|
|
10595
10694
|
case 4:
|
|
10596
10695
|
if (!(options.conversations !== undefined && options.conversations !== 'soft' && options.conversations !== 'hard')) {
|
|
10597
|
-
|
|
10696
|
+
_context71.next = 6;
|
|
10598
10697
|
break;
|
|
10599
10698
|
}
|
|
10600
10699
|
|
|
10601
10700
|
throw new Error('Invalid delete user options. conversations must be one of [soft hard]');
|
|
10602
10701
|
|
|
10603
10702
|
case 6:
|
|
10604
|
-
|
|
10703
|
+
_context71.next = 8;
|
|
10605
10704
|
return this.post(this.baseURL + "/users/delete", _objectSpread({
|
|
10606
10705
|
user_ids: user_ids
|
|
10607
10706
|
}, options));
|
|
10608
10707
|
|
|
10609
10708
|
case 8:
|
|
10610
|
-
return
|
|
10709
|
+
return _context71.abrupt("return", _context71.sent);
|
|
10611
10710
|
|
|
10612
10711
|
case 9:
|
|
10613
10712
|
case "end":
|
|
10614
|
-
return
|
|
10713
|
+
return _context71.stop();
|
|
10615
10714
|
}
|
|
10616
10715
|
}
|
|
10617
|
-
},
|
|
10716
|
+
}, _callee71, this);
|
|
10618
10717
|
}));
|
|
10619
10718
|
|
|
10620
|
-
function deleteUsers(
|
|
10719
|
+
function deleteUsers(_x94, _x95) {
|
|
10621
10720
|
return _deleteUsers.apply(this, arguments);
|
|
10622
10721
|
}
|
|
10623
10722
|
|
|
@@ -10638,28 +10737,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10638
10737
|
}, {
|
|
10639
10738
|
key: "_createImportURL",
|
|
10640
10739
|
value: function () {
|
|
10641
|
-
var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10642
|
-
return _regeneratorRuntime.wrap(function
|
|
10740
|
+
var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(filename) {
|
|
10741
|
+
return _regeneratorRuntime.wrap(function _callee72$(_context72) {
|
|
10643
10742
|
while (1) {
|
|
10644
|
-
switch (
|
|
10743
|
+
switch (_context72.prev = _context72.next) {
|
|
10645
10744
|
case 0:
|
|
10646
|
-
|
|
10745
|
+
_context72.next = 2;
|
|
10647
10746
|
return this.post(this.baseURL + "/import_urls", {
|
|
10648
10747
|
filename: filename
|
|
10649
10748
|
});
|
|
10650
10749
|
|
|
10651
10750
|
case 2:
|
|
10652
|
-
return
|
|
10751
|
+
return _context72.abrupt("return", _context72.sent);
|
|
10653
10752
|
|
|
10654
10753
|
case 3:
|
|
10655
10754
|
case "end":
|
|
10656
|
-
return
|
|
10755
|
+
return _context72.stop();
|
|
10657
10756
|
}
|
|
10658
10757
|
}
|
|
10659
|
-
},
|
|
10758
|
+
}, _callee72, this);
|
|
10660
10759
|
}));
|
|
10661
10760
|
|
|
10662
|
-
function _createImportURL(
|
|
10761
|
+
function _createImportURL(_x96) {
|
|
10663
10762
|
return _createImportURL2.apply(this, arguments);
|
|
10664
10763
|
}
|
|
10665
10764
|
|
|
@@ -10681,33 +10780,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10681
10780
|
}, {
|
|
10682
10781
|
key: "_createImport",
|
|
10683
10782
|
value: function () {
|
|
10684
|
-
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10783
|
+
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(path) {
|
|
10685
10784
|
var options,
|
|
10686
|
-
|
|
10687
|
-
return _regeneratorRuntime.wrap(function
|
|
10785
|
+
_args73 = arguments;
|
|
10786
|
+
return _regeneratorRuntime.wrap(function _callee73$(_context73) {
|
|
10688
10787
|
while (1) {
|
|
10689
|
-
switch (
|
|
10788
|
+
switch (_context73.prev = _context73.next) {
|
|
10690
10789
|
case 0:
|
|
10691
|
-
options =
|
|
10790
|
+
options = _args73.length > 1 && _args73[1] !== undefined ? _args73[1] : {
|
|
10692
10791
|
mode: 'upsert'
|
|
10693
10792
|
};
|
|
10694
|
-
|
|
10793
|
+
_context73.next = 3;
|
|
10695
10794
|
return this.post(this.baseURL + "/imports", _objectSpread({
|
|
10696
10795
|
path: path
|
|
10697
10796
|
}, options));
|
|
10698
10797
|
|
|
10699
10798
|
case 3:
|
|
10700
|
-
return
|
|
10799
|
+
return _context73.abrupt("return", _context73.sent);
|
|
10701
10800
|
|
|
10702
10801
|
case 4:
|
|
10703
10802
|
case "end":
|
|
10704
|
-
return
|
|
10803
|
+
return _context73.stop();
|
|
10705
10804
|
}
|
|
10706
10805
|
}
|
|
10707
|
-
},
|
|
10806
|
+
}, _callee73, this);
|
|
10708
10807
|
}));
|
|
10709
10808
|
|
|
10710
|
-
function _createImport(
|
|
10809
|
+
function _createImport(_x97) {
|
|
10711
10810
|
return _createImport2.apply(this, arguments);
|
|
10712
10811
|
}
|
|
10713
10812
|
|
|
@@ -10729,26 +10828,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10729
10828
|
}, {
|
|
10730
10829
|
key: "_getImport",
|
|
10731
10830
|
value: function () {
|
|
10732
|
-
var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10733
|
-
return _regeneratorRuntime.wrap(function
|
|
10831
|
+
var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(id) {
|
|
10832
|
+
return _regeneratorRuntime.wrap(function _callee74$(_context74) {
|
|
10734
10833
|
while (1) {
|
|
10735
|
-
switch (
|
|
10834
|
+
switch (_context74.prev = _context74.next) {
|
|
10736
10835
|
case 0:
|
|
10737
|
-
|
|
10836
|
+
_context74.next = 2;
|
|
10738
10837
|
return this.get(this.baseURL + "/imports/".concat(id));
|
|
10739
10838
|
|
|
10740
10839
|
case 2:
|
|
10741
|
-
return
|
|
10840
|
+
return _context74.abrupt("return", _context74.sent);
|
|
10742
10841
|
|
|
10743
10842
|
case 3:
|
|
10744
10843
|
case "end":
|
|
10745
|
-
return
|
|
10844
|
+
return _context74.stop();
|
|
10746
10845
|
}
|
|
10747
10846
|
}
|
|
10748
|
-
},
|
|
10847
|
+
}, _callee74, this);
|
|
10749
10848
|
}));
|
|
10750
10849
|
|
|
10751
|
-
function _getImport(
|
|
10850
|
+
function _getImport(_x98) {
|
|
10752
10851
|
return _getImport2.apply(this, arguments);
|
|
10753
10852
|
}
|
|
10754
10853
|
|
|
@@ -10770,26 +10869,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10770
10869
|
}, {
|
|
10771
10870
|
key: "_listImports",
|
|
10772
10871
|
value: function () {
|
|
10773
|
-
var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10774
|
-
return _regeneratorRuntime.wrap(function
|
|
10872
|
+
var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(options) {
|
|
10873
|
+
return _regeneratorRuntime.wrap(function _callee75$(_context75) {
|
|
10775
10874
|
while (1) {
|
|
10776
|
-
switch (
|
|
10875
|
+
switch (_context75.prev = _context75.next) {
|
|
10777
10876
|
case 0:
|
|
10778
|
-
|
|
10877
|
+
_context75.next = 2;
|
|
10779
10878
|
return this.get(this.baseURL + "/imports", options);
|
|
10780
10879
|
|
|
10781
10880
|
case 2:
|
|
10782
|
-
return
|
|
10881
|
+
return _context75.abrupt("return", _context75.sent);
|
|
10783
10882
|
|
|
10784
10883
|
case 3:
|
|
10785
10884
|
case "end":
|
|
10786
|
-
return
|
|
10885
|
+
return _context75.stop();
|
|
10787
10886
|
}
|
|
10788
10887
|
}
|
|
10789
|
-
},
|
|
10888
|
+
}, _callee75, this);
|
|
10790
10889
|
}));
|
|
10791
10890
|
|
|
10792
|
-
function _listImports(
|
|
10891
|
+
function _listImports(_x99) {
|
|
10793
10892
|
return _listImports2.apply(this, arguments);
|
|
10794
10893
|
}
|
|
10795
10894
|
|
|
@@ -10808,28 +10907,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10808
10907
|
}, {
|
|
10809
10908
|
key: "upsertPushProvider",
|
|
10810
10909
|
value: function () {
|
|
10811
|
-
var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10812
|
-
return _regeneratorRuntime.wrap(function
|
|
10910
|
+
var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(pushProvider) {
|
|
10911
|
+
return _regeneratorRuntime.wrap(function _callee76$(_context76) {
|
|
10813
10912
|
while (1) {
|
|
10814
|
-
switch (
|
|
10913
|
+
switch (_context76.prev = _context76.next) {
|
|
10815
10914
|
case 0:
|
|
10816
|
-
|
|
10915
|
+
_context76.next = 2;
|
|
10817
10916
|
return this.post(this.baseURL + "/push_providers", {
|
|
10818
10917
|
push_provider: pushProvider
|
|
10819
10918
|
});
|
|
10820
10919
|
|
|
10821
10920
|
case 2:
|
|
10822
|
-
return
|
|
10921
|
+
return _context76.abrupt("return", _context76.sent);
|
|
10823
10922
|
|
|
10824
10923
|
case 3:
|
|
10825
10924
|
case "end":
|
|
10826
|
-
return
|
|
10925
|
+
return _context76.stop();
|
|
10827
10926
|
}
|
|
10828
10927
|
}
|
|
10829
|
-
},
|
|
10928
|
+
}, _callee76, this);
|
|
10830
10929
|
}));
|
|
10831
10930
|
|
|
10832
|
-
function upsertPushProvider(
|
|
10931
|
+
function upsertPushProvider(_x100) {
|
|
10833
10932
|
return _upsertPushProvider.apply(this, arguments);
|
|
10834
10933
|
}
|
|
10835
10934
|
|
|
@@ -10848,28 +10947,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10848
10947
|
}, {
|
|
10849
10948
|
key: "deletePushProvider",
|
|
10850
10949
|
value: function () {
|
|
10851
|
-
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10950
|
+
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77(_ref8) {
|
|
10852
10951
|
var type, name;
|
|
10853
|
-
return _regeneratorRuntime.wrap(function
|
|
10952
|
+
return _regeneratorRuntime.wrap(function _callee77$(_context77) {
|
|
10854
10953
|
while (1) {
|
|
10855
|
-
switch (
|
|
10954
|
+
switch (_context77.prev = _context77.next) {
|
|
10856
10955
|
case 0:
|
|
10857
10956
|
type = _ref8.type, name = _ref8.name;
|
|
10858
|
-
|
|
10957
|
+
_context77.next = 3;
|
|
10859
10958
|
return this.delete(this.baseURL + "/push_providers/".concat(type, "/").concat(name));
|
|
10860
10959
|
|
|
10861
10960
|
case 3:
|
|
10862
|
-
return
|
|
10961
|
+
return _context77.abrupt("return", _context77.sent);
|
|
10863
10962
|
|
|
10864
10963
|
case 4:
|
|
10865
10964
|
case "end":
|
|
10866
|
-
return
|
|
10965
|
+
return _context77.stop();
|
|
10867
10966
|
}
|
|
10868
10967
|
}
|
|
10869
|
-
},
|
|
10968
|
+
}, _callee77, this);
|
|
10870
10969
|
}));
|
|
10871
10970
|
|
|
10872
|
-
function deletePushProvider(
|
|
10971
|
+
function deletePushProvider(_x101) {
|
|
10873
10972
|
return _deletePushProvider.apply(this, arguments);
|
|
10874
10973
|
}
|
|
10875
10974
|
|
|
@@ -10886,23 +10985,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10886
10985
|
}, {
|
|
10887
10986
|
key: "listPushProviders",
|
|
10888
10987
|
value: function () {
|
|
10889
|
-
var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10890
|
-
return _regeneratorRuntime.wrap(function
|
|
10988
|
+
var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78() {
|
|
10989
|
+
return _regeneratorRuntime.wrap(function _callee78$(_context78) {
|
|
10891
10990
|
while (1) {
|
|
10892
|
-
switch (
|
|
10991
|
+
switch (_context78.prev = _context78.next) {
|
|
10893
10992
|
case 0:
|
|
10894
|
-
|
|
10993
|
+
_context78.next = 2;
|
|
10895
10994
|
return this.get(this.baseURL + "/push_providers");
|
|
10896
10995
|
|
|
10897
10996
|
case 2:
|
|
10898
|
-
return
|
|
10997
|
+
return _context78.abrupt("return", _context78.sent);
|
|
10899
10998
|
|
|
10900
10999
|
case 3:
|
|
10901
11000
|
case "end":
|
|
10902
|
-
return
|
|
11001
|
+
return _context78.stop();
|
|
10903
11002
|
}
|
|
10904
11003
|
}
|
|
10905
|
-
},
|
|
11004
|
+
}, _callee78, this);
|
|
10906
11005
|
}));
|
|
10907
11006
|
|
|
10908
11007
|
function listPushProviders() {
|