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