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