stream-chat 7.0.0 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.es.js +294 -310
- 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 +294 -310
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +294 -310
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +294 -310
- package/dist/index.js.map +1 -1
- package/dist/types/channel.d.ts +1 -1
- package/dist/types/channel.d.ts.map +1 -1
- package/dist/types/client.d.ts +35 -43
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/types.d.ts +67 -28
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/channel.ts +7 -6
- package/src/client.ts +75 -42
- package/src/types.ts +81 -29
package/dist/browser.es.js
CHANGED
|
@@ -1485,7 +1485,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1485
1485
|
return this._client;
|
|
1486
1486
|
}
|
|
1487
1487
|
/**
|
|
1488
|
-
* getConfig - Get the
|
|
1488
|
+
* getConfig - Get the config for this channel id (cid)
|
|
1489
1489
|
*
|
|
1490
1490
|
* @return {Record<string, unknown>}
|
|
1491
1491
|
*/
|
|
@@ -1494,7 +1494,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1494
1494
|
key: "getConfig",
|
|
1495
1495
|
value: function getConfig() {
|
|
1496
1496
|
var client = this.getClient();
|
|
1497
|
-
return client.configs[this.
|
|
1497
|
+
return client.configs[this.cid];
|
|
1498
1498
|
}
|
|
1499
1499
|
/**
|
|
1500
1500
|
* sendMessage - Send a message to this channel
|
|
@@ -3163,7 +3163,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3163
3163
|
}
|
|
3164
3164
|
}
|
|
3165
3165
|
|
|
3166
|
-
this.getClient()._addChannelConfig(state); // add any messages to our channel state
|
|
3166
|
+
this.getClient()._addChannelConfig(state.channel); // add any messages to our channel state
|
|
3167
3167
|
|
|
3168
3168
|
|
|
3169
3169
|
_this$_initializeStat = this._initializeState(state, messageSetToAddToIfDoesNotExist), messageSet = _this$_initializeStat.messageSet;
|
|
@@ -3888,22 +3888,13 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3888
3888
|
}
|
|
3889
3889
|
|
|
3890
3890
|
if (state.members) {
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
try {
|
|
3895
|
-
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
3896
|
-
var _member = _step4.value;
|
|
3897
|
-
|
|
3898
|
-
if (_member.user) {
|
|
3899
|
-
this.state.members[_member.user.id] = _member;
|
|
3900
|
-
}
|
|
3891
|
+
this.state.members = state.members.reduce(function (acc, member) {
|
|
3892
|
+
if (member.user) {
|
|
3893
|
+
acc[member.user.id] = member;
|
|
3901
3894
|
}
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
}
|
|
3905
|
-
_iterator4.f();
|
|
3906
|
-
}
|
|
3895
|
+
|
|
3896
|
+
return acc;
|
|
3897
|
+
}, {});
|
|
3907
3898
|
}
|
|
3908
3899
|
|
|
3909
3900
|
return {
|
|
@@ -5936,6 +5927,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
5936
5927
|
`messages` soft-hard will delete any messages that the user has sent.
|
|
5937
5928
|
`new_channel_owner_id` any channels owned by the hard-deleted user will be transferred to this user ID
|
|
5938
5929
|
*/
|
|
5930
|
+
// TODO: add better typing
|
|
5939
5931
|
var ErrorFromResponse = /*#__PURE__*/function (_Error) {
|
|
5940
5932
|
_inherits(ErrorFromResponse, _Error);
|
|
5941
5933
|
|
|
@@ -6053,6 +6045,8 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6053
6045
|
|
|
6054
6046
|
_defineProperty(this, "defaultWSTimeout", void 0);
|
|
6055
6047
|
|
|
6048
|
+
_defineProperty(this, "nextRequestAbortController", null);
|
|
6049
|
+
|
|
6056
6050
|
_defineProperty(this, "_getConnectionID", function () {
|
|
6057
6051
|
var _this$wsConnection, _this$wsFallback;
|
|
6058
6052
|
|
|
@@ -7544,7 +7538,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
7544
7538
|
}
|
|
7545
7539
|
|
|
7546
7540
|
if (event.channel && event.type === 'notification.message_new') {
|
|
7547
|
-
this.
|
|
7541
|
+
this._addChannelConfig(event.channel);
|
|
7548
7542
|
}
|
|
7549
7543
|
|
|
7550
7544
|
if (event.type === 'notification.channel_mutes_updated' && (_event$me = event.me) !== null && _event$me !== void 0 && _event$me.channel_mutes) {
|
|
@@ -8021,7 +8015,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8021
8015
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
8022
8016
|
var channelState = _step2.value;
|
|
8023
8017
|
|
|
8024
|
-
this._addChannelConfig(channelState);
|
|
8018
|
+
this._addChannelConfig(channelState.channel);
|
|
8025
8019
|
}
|
|
8026
8020
|
} catch (err) {
|
|
8027
8021
|
_iterator2.e(err);
|
|
@@ -8342,8 +8336,10 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
8342
8336
|
}()
|
|
8343
8337
|
}, {
|
|
8344
8338
|
key: "_addChannelConfig",
|
|
8345
|
-
value: function _addChannelConfig(
|
|
8346
|
-
|
|
8339
|
+
value: function _addChannelConfig(_ref8) {
|
|
8340
|
+
var cid = _ref8.cid,
|
|
8341
|
+
config = _ref8.config;
|
|
8342
|
+
this.configs[cid] = config;
|
|
8347
8343
|
}
|
|
8348
8344
|
/**
|
|
8349
8345
|
* channel - Returns a new channel with the given type, id and custom data
|
|
@@ -9822,7 +9818,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9822
9818
|
}, {
|
|
9823
9819
|
key: "getUserAgent",
|
|
9824
9820
|
value: function getUserAgent() {
|
|
9825
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "7.
|
|
9821
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "7.2.0");
|
|
9826
9822
|
}
|
|
9827
9823
|
}, {
|
|
9828
9824
|
key: "setUserAgent",
|
|
@@ -9849,6 +9845,12 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9849
9845
|
var authorization = token ? {
|
|
9850
9846
|
Authorization: token
|
|
9851
9847
|
} : undefined;
|
|
9848
|
+
var signal = null;
|
|
9849
|
+
|
|
9850
|
+
if (this.nextRequestAbortController !== null) {
|
|
9851
|
+
signal = this.nextRequestAbortController.signal;
|
|
9852
|
+
this.nextRequestAbortController = null;
|
|
9853
|
+
}
|
|
9852
9854
|
|
|
9853
9855
|
if (!((_options$headers = options.headers) !== null && _options$headers !== void 0 && _options$headers['x-client-request-id'])) {
|
|
9854
9856
|
options.headers = _objectSpread(_objectSpread({}, options.headers), {}, {
|
|
@@ -9856,7 +9858,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9856
9858
|
});
|
|
9857
9859
|
}
|
|
9858
9860
|
|
|
9859
|
-
return _objectSpread({
|
|
9861
|
+
return _objectSpread(_objectSpread({
|
|
9860
9862
|
params: _objectSpread({
|
|
9861
9863
|
user_id: this.userID,
|
|
9862
9864
|
connection_id: this._getConnectionID(),
|
|
@@ -9866,7 +9868,9 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
9866
9868
|
'stream-auth-type': this.getAuthType(),
|
|
9867
9869
|
'X-Stream-Client': this.getUserAgent()
|
|
9868
9870
|
}, options.headers)
|
|
9869
|
-
},
|
|
9871
|
+
}, signal ? {
|
|
9872
|
+
signal: signal
|
|
9873
|
+
} : {}), options.config);
|
|
9870
9874
|
}
|
|
9871
9875
|
}, {
|
|
9872
9876
|
key: "_getToken",
|
|
@@ -10142,32 +10146,34 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10142
10146
|
return createSegment;
|
|
10143
10147
|
}()
|
|
10144
10148
|
/**
|
|
10145
|
-
*
|
|
10149
|
+
* querySegments - Query Campaign Segments
|
|
10146
10150
|
*
|
|
10147
|
-
* @param {string} id Segment ID
|
|
10148
10151
|
*
|
|
10149
|
-
* @return {Segment}
|
|
10152
|
+
* @return {Segment[]} Segments
|
|
10150
10153
|
*/
|
|
10151
10154
|
|
|
10152
10155
|
}, {
|
|
10153
|
-
key: "
|
|
10156
|
+
key: "querySegments",
|
|
10154
10157
|
value: function () {
|
|
10155
|
-
var
|
|
10156
|
-
var
|
|
10157
|
-
|
|
10158
|
+
var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(filters) {
|
|
10159
|
+
var options,
|
|
10160
|
+
_args55 = arguments;
|
|
10158
10161
|
return _regeneratorRuntime.wrap(function _callee55$(_context55) {
|
|
10159
10162
|
while (1) {
|
|
10160
10163
|
switch (_context55.prev = _context55.next) {
|
|
10161
10164
|
case 0:
|
|
10162
|
-
|
|
10163
|
-
|
|
10165
|
+
options = _args55.length > 1 && _args55[1] !== undefined ? _args55[1] : {};
|
|
10166
|
+
_context55.next = 3;
|
|
10167
|
+
return this.get(this.baseURL + "/segments", {
|
|
10168
|
+
payload: _objectSpread({
|
|
10169
|
+
filter_conditions: filters
|
|
10170
|
+
}, options)
|
|
10171
|
+
});
|
|
10164
10172
|
|
|
10165
|
-
case
|
|
10166
|
-
|
|
10167
|
-
segment = _yield$this$get.segment;
|
|
10168
|
-
return _context55.abrupt("return", segment);
|
|
10173
|
+
case 3:
|
|
10174
|
+
return _context55.abrupt("return", _context55.sent);
|
|
10169
10175
|
|
|
10170
|
-
case
|
|
10176
|
+
case 4:
|
|
10171
10177
|
case "end":
|
|
10172
10178
|
return _context55.stop();
|
|
10173
10179
|
}
|
|
@@ -10175,50 +10181,11 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10175
10181
|
}, _callee55, this);
|
|
10176
10182
|
}));
|
|
10177
10183
|
|
|
10178
|
-
function
|
|
10179
|
-
return
|
|
10184
|
+
function querySegments(_x74) {
|
|
10185
|
+
return _querySegments.apply(this, arguments);
|
|
10180
10186
|
}
|
|
10181
10187
|
|
|
10182
|
-
return
|
|
10183
|
-
}()
|
|
10184
|
-
/**
|
|
10185
|
-
* listSegments - List Campaign Segments
|
|
10186
|
-
*
|
|
10187
|
-
*
|
|
10188
|
-
* @return {Segment[]} Segments
|
|
10189
|
-
*/
|
|
10190
|
-
|
|
10191
|
-
}, {
|
|
10192
|
-
key: "listSegments",
|
|
10193
|
-
value: function () {
|
|
10194
|
-
var _listSegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(options) {
|
|
10195
|
-
var _yield$this$get2, segments;
|
|
10196
|
-
|
|
10197
|
-
return _regeneratorRuntime.wrap(function _callee56$(_context56) {
|
|
10198
|
-
while (1) {
|
|
10199
|
-
switch (_context56.prev = _context56.next) {
|
|
10200
|
-
case 0:
|
|
10201
|
-
_context56.next = 2;
|
|
10202
|
-
return this.get(this.baseURL + "/segments", options);
|
|
10203
|
-
|
|
10204
|
-
case 2:
|
|
10205
|
-
_yield$this$get2 = _context56.sent;
|
|
10206
|
-
segments = _yield$this$get2.segments;
|
|
10207
|
-
return _context56.abrupt("return", segments);
|
|
10208
|
-
|
|
10209
|
-
case 5:
|
|
10210
|
-
case "end":
|
|
10211
|
-
return _context56.stop();
|
|
10212
|
-
}
|
|
10213
|
-
}
|
|
10214
|
-
}, _callee56, this);
|
|
10215
|
-
}));
|
|
10216
|
-
|
|
10217
|
-
function listSegments(_x75) {
|
|
10218
|
-
return _listSegments.apply(this, arguments);
|
|
10219
|
-
}
|
|
10220
|
-
|
|
10221
|
-
return listSegments;
|
|
10188
|
+
return querySegments;
|
|
10222
10189
|
}()
|
|
10223
10190
|
/**
|
|
10224
10191
|
* updateSegment - Update a Campaign Segment
|
|
@@ -10232,32 +10199,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10232
10199
|
}, {
|
|
10233
10200
|
key: "updateSegment",
|
|
10234
10201
|
value: function () {
|
|
10235
|
-
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10202
|
+
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(id, params) {
|
|
10236
10203
|
var _yield$this$put, segment;
|
|
10237
10204
|
|
|
10238
|
-
return _regeneratorRuntime.wrap(function
|
|
10205
|
+
return _regeneratorRuntime.wrap(function _callee56$(_context56) {
|
|
10239
10206
|
while (1) {
|
|
10240
|
-
switch (
|
|
10207
|
+
switch (_context56.prev = _context56.next) {
|
|
10241
10208
|
case 0:
|
|
10242
|
-
|
|
10209
|
+
_context56.next = 2;
|
|
10243
10210
|
return this.put(this.baseURL + "/segments/".concat(id), {
|
|
10244
10211
|
segment: params
|
|
10245
10212
|
});
|
|
10246
10213
|
|
|
10247
10214
|
case 2:
|
|
10248
|
-
_yield$this$put =
|
|
10215
|
+
_yield$this$put = _context56.sent;
|
|
10249
10216
|
segment = _yield$this$put.segment;
|
|
10250
|
-
return
|
|
10217
|
+
return _context56.abrupt("return", segment);
|
|
10251
10218
|
|
|
10252
10219
|
case 5:
|
|
10253
10220
|
case "end":
|
|
10254
|
-
return
|
|
10221
|
+
return _context56.stop();
|
|
10255
10222
|
}
|
|
10256
10223
|
}
|
|
10257
|
-
},
|
|
10224
|
+
}, _callee56, this);
|
|
10258
10225
|
}));
|
|
10259
10226
|
|
|
10260
|
-
function updateSegment(
|
|
10227
|
+
function updateSegment(_x75, _x76) {
|
|
10261
10228
|
return _updateSegment.apply(this, arguments);
|
|
10262
10229
|
}
|
|
10263
10230
|
|
|
@@ -10274,22 +10241,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10274
10241
|
}, {
|
|
10275
10242
|
key: "deleteSegment",
|
|
10276
10243
|
value: function () {
|
|
10277
|
-
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10278
|
-
return _regeneratorRuntime.wrap(function
|
|
10244
|
+
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(id) {
|
|
10245
|
+
return _regeneratorRuntime.wrap(function _callee57$(_context57) {
|
|
10279
10246
|
while (1) {
|
|
10280
|
-
switch (
|
|
10247
|
+
switch (_context57.prev = _context57.next) {
|
|
10281
10248
|
case 0:
|
|
10282
|
-
return
|
|
10249
|
+
return _context57.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
|
|
10283
10250
|
|
|
10284
10251
|
case 1:
|
|
10285
10252
|
case "end":
|
|
10286
|
-
return
|
|
10253
|
+
return _context57.stop();
|
|
10287
10254
|
}
|
|
10288
10255
|
}
|
|
10289
|
-
},
|
|
10256
|
+
}, _callee57, this);
|
|
10290
10257
|
}));
|
|
10291
10258
|
|
|
10292
|
-
function deleteSegment(
|
|
10259
|
+
function deleteSegment(_x77) {
|
|
10293
10260
|
return _deleteSegment.apply(this, arguments);
|
|
10294
10261
|
}
|
|
10295
10262
|
|
|
@@ -10306,115 +10273,78 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10306
10273
|
}, {
|
|
10307
10274
|
key: "createCampaign",
|
|
10308
10275
|
value: function () {
|
|
10309
|
-
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10276
|
+
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(params) {
|
|
10310
10277
|
var _yield$this$post2, campaign;
|
|
10311
10278
|
|
|
10312
|
-
return _regeneratorRuntime.wrap(function
|
|
10279
|
+
return _regeneratorRuntime.wrap(function _callee58$(_context58) {
|
|
10313
10280
|
while (1) {
|
|
10314
|
-
switch (
|
|
10281
|
+
switch (_context58.prev = _context58.next) {
|
|
10315
10282
|
case 0:
|
|
10316
|
-
|
|
10283
|
+
_context58.next = 2;
|
|
10317
10284
|
return this.post(this.baseURL + "/campaigns", {
|
|
10318
10285
|
campaign: params
|
|
10319
10286
|
});
|
|
10320
10287
|
|
|
10321
10288
|
case 2:
|
|
10322
|
-
_yield$this$post2 =
|
|
10289
|
+
_yield$this$post2 = _context58.sent;
|
|
10323
10290
|
campaign = _yield$this$post2.campaign;
|
|
10324
|
-
return
|
|
10291
|
+
return _context58.abrupt("return", campaign);
|
|
10325
10292
|
|
|
10326
10293
|
case 5:
|
|
10327
10294
|
case "end":
|
|
10328
|
-
return
|
|
10295
|
+
return _context58.stop();
|
|
10329
10296
|
}
|
|
10330
10297
|
}
|
|
10331
|
-
},
|
|
10298
|
+
}, _callee58, this);
|
|
10332
10299
|
}));
|
|
10333
10300
|
|
|
10334
|
-
function createCampaign(
|
|
10301
|
+
function createCampaign(_x78) {
|
|
10335
10302
|
return _createCampaign.apply(this, arguments);
|
|
10336
10303
|
}
|
|
10337
10304
|
|
|
10338
10305
|
return createCampaign;
|
|
10339
10306
|
}()
|
|
10340
10307
|
/**
|
|
10341
|
-
*
|
|
10342
|
-
*
|
|
10343
|
-
* @param {string} id Campaign ID
|
|
10344
|
-
*
|
|
10345
|
-
* @return {Campaign} A Campaign
|
|
10346
|
-
*/
|
|
10347
|
-
|
|
10348
|
-
}, {
|
|
10349
|
-
key: "getCampaign",
|
|
10350
|
-
value: function () {
|
|
10351
|
-
var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(id) {
|
|
10352
|
-
var _yield$this$get3, campaign;
|
|
10353
|
-
|
|
10354
|
-
return _regeneratorRuntime.wrap(function _callee60$(_context60) {
|
|
10355
|
-
while (1) {
|
|
10356
|
-
switch (_context60.prev = _context60.next) {
|
|
10357
|
-
case 0:
|
|
10358
|
-
_context60.next = 2;
|
|
10359
|
-
return this.get(this.baseURL + "/campaigns/".concat(id));
|
|
10360
|
-
|
|
10361
|
-
case 2:
|
|
10362
|
-
_yield$this$get3 = _context60.sent;
|
|
10363
|
-
campaign = _yield$this$get3.campaign;
|
|
10364
|
-
return _context60.abrupt("return", campaign);
|
|
10365
|
-
|
|
10366
|
-
case 5:
|
|
10367
|
-
case "end":
|
|
10368
|
-
return _context60.stop();
|
|
10369
|
-
}
|
|
10370
|
-
}
|
|
10371
|
-
}, _callee60, this);
|
|
10372
|
-
}));
|
|
10373
|
-
|
|
10374
|
-
function getCampaign(_x80) {
|
|
10375
|
-
return _getCampaign.apply(this, arguments);
|
|
10376
|
-
}
|
|
10377
|
-
|
|
10378
|
-
return getCampaign;
|
|
10379
|
-
}()
|
|
10380
|
-
/**
|
|
10381
|
-
* listCampaigns - List Campaigns
|
|
10308
|
+
* queryCampaigns - Query Campaigns
|
|
10382
10309
|
*
|
|
10383
10310
|
*
|
|
10384
10311
|
* @return {Campaign[]} Campaigns
|
|
10385
10312
|
*/
|
|
10386
10313
|
|
|
10387
10314
|
}, {
|
|
10388
|
-
key: "
|
|
10315
|
+
key: "queryCampaigns",
|
|
10389
10316
|
value: function () {
|
|
10390
|
-
var
|
|
10391
|
-
var
|
|
10392
|
-
|
|
10393
|
-
return _regeneratorRuntime.wrap(function
|
|
10317
|
+
var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(filters) {
|
|
10318
|
+
var options,
|
|
10319
|
+
_args59 = arguments;
|
|
10320
|
+
return _regeneratorRuntime.wrap(function _callee59$(_context59) {
|
|
10394
10321
|
while (1) {
|
|
10395
|
-
switch (
|
|
10322
|
+
switch (_context59.prev = _context59.next) {
|
|
10396
10323
|
case 0:
|
|
10397
|
-
|
|
10398
|
-
|
|
10324
|
+
options = _args59.length > 1 && _args59[1] !== undefined ? _args59[1] : {};
|
|
10325
|
+
_context59.next = 3;
|
|
10326
|
+
return this.get(this.baseURL + "/campaigns", {
|
|
10327
|
+
payload: _objectSpread({
|
|
10328
|
+
filter_conditions: filters
|
|
10329
|
+
}, options)
|
|
10330
|
+
});
|
|
10399
10331
|
|
|
10400
|
-
case
|
|
10401
|
-
|
|
10402
|
-
campaigns = _yield$this$get4.campaigns;
|
|
10403
|
-
return _context61.abrupt("return", campaigns);
|
|
10332
|
+
case 3:
|
|
10333
|
+
return _context59.abrupt("return", _context59.sent);
|
|
10404
10334
|
|
|
10405
|
-
case
|
|
10335
|
+
case 4:
|
|
10406
10336
|
case "end":
|
|
10407
|
-
return
|
|
10337
|
+
return _context59.stop();
|
|
10408
10338
|
}
|
|
10409
10339
|
}
|
|
10410
|
-
},
|
|
10340
|
+
}, _callee59, this);
|
|
10411
10341
|
}));
|
|
10412
10342
|
|
|
10413
|
-
function
|
|
10414
|
-
return
|
|
10343
|
+
function queryCampaigns(_x79) {
|
|
10344
|
+
return _queryCampaigns.apply(this, arguments);
|
|
10415
10345
|
}
|
|
10416
10346
|
|
|
10417
|
-
return
|
|
10347
|
+
return queryCampaigns;
|
|
10418
10348
|
}()
|
|
10419
10349
|
/**
|
|
10420
10350
|
* updateCampaign - Update a Campaign
|
|
@@ -10428,32 +10358,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10428
10358
|
}, {
|
|
10429
10359
|
key: "updateCampaign",
|
|
10430
10360
|
value: function () {
|
|
10431
|
-
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10361
|
+
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(id, params) {
|
|
10432
10362
|
var _yield$this$put2, campaign;
|
|
10433
10363
|
|
|
10434
|
-
return _regeneratorRuntime.wrap(function
|
|
10364
|
+
return _regeneratorRuntime.wrap(function _callee60$(_context60) {
|
|
10435
10365
|
while (1) {
|
|
10436
|
-
switch (
|
|
10366
|
+
switch (_context60.prev = _context60.next) {
|
|
10437
10367
|
case 0:
|
|
10438
|
-
|
|
10368
|
+
_context60.next = 2;
|
|
10439
10369
|
return this.put(this.baseURL + "/campaigns/".concat(id), {
|
|
10440
10370
|
campaign: params
|
|
10441
10371
|
});
|
|
10442
10372
|
|
|
10443
10373
|
case 2:
|
|
10444
|
-
_yield$this$put2 =
|
|
10374
|
+
_yield$this$put2 = _context60.sent;
|
|
10445
10375
|
campaign = _yield$this$put2.campaign;
|
|
10446
|
-
return
|
|
10376
|
+
return _context60.abrupt("return", campaign);
|
|
10447
10377
|
|
|
10448
10378
|
case 5:
|
|
10449
10379
|
case "end":
|
|
10450
|
-
return
|
|
10380
|
+
return _context60.stop();
|
|
10451
10381
|
}
|
|
10452
10382
|
}
|
|
10453
|
-
},
|
|
10383
|
+
}, _callee60, this);
|
|
10454
10384
|
}));
|
|
10455
10385
|
|
|
10456
|
-
function updateCampaign(
|
|
10386
|
+
function updateCampaign(_x80, _x81) {
|
|
10457
10387
|
return _updateCampaign.apply(this, arguments);
|
|
10458
10388
|
}
|
|
10459
10389
|
|
|
@@ -10470,22 +10400,25 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10470
10400
|
}, {
|
|
10471
10401
|
key: "deleteCampaign",
|
|
10472
10402
|
value: function () {
|
|
10473
|
-
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10474
|
-
|
|
10403
|
+
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(id) {
|
|
10404
|
+
var params,
|
|
10405
|
+
_args61 = arguments;
|
|
10406
|
+
return _regeneratorRuntime.wrap(function _callee61$(_context61) {
|
|
10475
10407
|
while (1) {
|
|
10476
|
-
switch (
|
|
10408
|
+
switch (_context61.prev = _context61.next) {
|
|
10477
10409
|
case 0:
|
|
10478
|
-
|
|
10410
|
+
params = _args61.length > 1 && _args61[1] !== undefined ? _args61[1] : {};
|
|
10411
|
+
return _context61.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id), params));
|
|
10479
10412
|
|
|
10480
|
-
case
|
|
10413
|
+
case 2:
|
|
10481
10414
|
case "end":
|
|
10482
|
-
return
|
|
10415
|
+
return _context61.stop();
|
|
10483
10416
|
}
|
|
10484
10417
|
}
|
|
10485
|
-
},
|
|
10418
|
+
}, _callee61, this);
|
|
10486
10419
|
}));
|
|
10487
10420
|
|
|
10488
|
-
function deleteCampaign(
|
|
10421
|
+
function deleteCampaign(_x82) {
|
|
10489
10422
|
return _deleteCampaign.apply(this, arguments);
|
|
10490
10423
|
}
|
|
10491
10424
|
|
|
@@ -10503,33 +10436,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10503
10436
|
}, {
|
|
10504
10437
|
key: "scheduleCampaign",
|
|
10505
10438
|
value: function () {
|
|
10506
|
-
var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10439
|
+
var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(id, params) {
|
|
10507
10440
|
var scheduledFor, _yield$this$patch, campaign;
|
|
10508
10441
|
|
|
10509
|
-
return _regeneratorRuntime.wrap(function
|
|
10442
|
+
return _regeneratorRuntime.wrap(function _callee62$(_context62) {
|
|
10510
10443
|
while (1) {
|
|
10511
|
-
switch (
|
|
10444
|
+
switch (_context62.prev = _context62.next) {
|
|
10512
10445
|
case 0:
|
|
10513
10446
|
scheduledFor = params.scheduledFor;
|
|
10514
|
-
|
|
10447
|
+
_context62.next = 3;
|
|
10515
10448
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/schedule"), {
|
|
10516
10449
|
scheduled_for: scheduledFor
|
|
10517
10450
|
});
|
|
10518
10451
|
|
|
10519
10452
|
case 3:
|
|
10520
|
-
_yield$this$patch =
|
|
10453
|
+
_yield$this$patch = _context62.sent;
|
|
10521
10454
|
campaign = _yield$this$patch.campaign;
|
|
10522
|
-
return
|
|
10455
|
+
return _context62.abrupt("return", campaign);
|
|
10523
10456
|
|
|
10524
10457
|
case 6:
|
|
10525
10458
|
case "end":
|
|
10526
|
-
return
|
|
10459
|
+
return _context62.stop();
|
|
10527
10460
|
}
|
|
10528
10461
|
}
|
|
10529
|
-
},
|
|
10462
|
+
}, _callee62, this);
|
|
10530
10463
|
}));
|
|
10531
10464
|
|
|
10532
|
-
function scheduleCampaign(
|
|
10465
|
+
function scheduleCampaign(_x83, _x84) {
|
|
10533
10466
|
return _scheduleCampaign.apply(this, arguments);
|
|
10534
10467
|
}
|
|
10535
10468
|
|
|
@@ -10546,30 +10479,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10546
10479
|
}, {
|
|
10547
10480
|
key: "stopCampaign",
|
|
10548
10481
|
value: function () {
|
|
10549
|
-
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10482
|
+
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(id) {
|
|
10550
10483
|
var _yield$this$patch2, campaign;
|
|
10551
10484
|
|
|
10552
|
-
return _regeneratorRuntime.wrap(function
|
|
10485
|
+
return _regeneratorRuntime.wrap(function _callee63$(_context63) {
|
|
10553
10486
|
while (1) {
|
|
10554
|
-
switch (
|
|
10487
|
+
switch (_context63.prev = _context63.next) {
|
|
10555
10488
|
case 0:
|
|
10556
|
-
|
|
10489
|
+
_context63.next = 2;
|
|
10557
10490
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/stop"));
|
|
10558
10491
|
|
|
10559
10492
|
case 2:
|
|
10560
|
-
_yield$this$patch2 =
|
|
10493
|
+
_yield$this$patch2 = _context63.sent;
|
|
10561
10494
|
campaign = _yield$this$patch2.campaign;
|
|
10562
|
-
return
|
|
10495
|
+
return _context63.abrupt("return", campaign);
|
|
10563
10496
|
|
|
10564
10497
|
case 5:
|
|
10565
10498
|
case "end":
|
|
10566
|
-
return
|
|
10499
|
+
return _context63.stop();
|
|
10567
10500
|
}
|
|
10568
10501
|
}
|
|
10569
|
-
},
|
|
10502
|
+
}, _callee63, this);
|
|
10570
10503
|
}));
|
|
10571
10504
|
|
|
10572
|
-
function stopCampaign(
|
|
10505
|
+
function stopCampaign(_x85) {
|
|
10573
10506
|
return _stopCampaign.apply(this, arguments);
|
|
10574
10507
|
}
|
|
10575
10508
|
|
|
@@ -10586,30 +10519,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10586
10519
|
}, {
|
|
10587
10520
|
key: "resumeCampaign",
|
|
10588
10521
|
value: function () {
|
|
10589
|
-
var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10522
|
+
var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(id) {
|
|
10590
10523
|
var _yield$this$patch3, campaign;
|
|
10591
10524
|
|
|
10592
|
-
return _regeneratorRuntime.wrap(function
|
|
10525
|
+
return _regeneratorRuntime.wrap(function _callee64$(_context64) {
|
|
10593
10526
|
while (1) {
|
|
10594
|
-
switch (
|
|
10527
|
+
switch (_context64.prev = _context64.next) {
|
|
10595
10528
|
case 0:
|
|
10596
|
-
|
|
10529
|
+
_context64.next = 2;
|
|
10597
10530
|
return this.patch(this.baseURL + "/campaigns/".concat(id, "/resume"));
|
|
10598
10531
|
|
|
10599
10532
|
case 2:
|
|
10600
|
-
_yield$this$patch3 =
|
|
10533
|
+
_yield$this$patch3 = _context64.sent;
|
|
10601
10534
|
campaign = _yield$this$patch3.campaign;
|
|
10602
|
-
return
|
|
10535
|
+
return _context64.abrupt("return", campaign);
|
|
10603
10536
|
|
|
10604
10537
|
case 5:
|
|
10605
10538
|
case "end":
|
|
10606
|
-
return
|
|
10539
|
+
return _context64.stop();
|
|
10607
10540
|
}
|
|
10608
10541
|
}
|
|
10609
|
-
},
|
|
10542
|
+
}, _callee64, this);
|
|
10610
10543
|
}));
|
|
10611
10544
|
|
|
10612
|
-
function resumeCampaign(
|
|
10545
|
+
function resumeCampaign(_x86) {
|
|
10613
10546
|
return _resumeCampaign.apply(this, arguments);
|
|
10614
10547
|
}
|
|
10615
10548
|
|
|
@@ -10627,35 +10560,77 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10627
10560
|
}, {
|
|
10628
10561
|
key: "testCampaign",
|
|
10629
10562
|
value: function () {
|
|
10630
|
-
var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10563
|
+
var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(id, params) {
|
|
10631
10564
|
var users;
|
|
10632
|
-
return _regeneratorRuntime.wrap(function
|
|
10565
|
+
return _regeneratorRuntime.wrap(function _callee65$(_context65) {
|
|
10633
10566
|
while (1) {
|
|
10634
|
-
switch (
|
|
10567
|
+
switch (_context65.prev = _context65.next) {
|
|
10635
10568
|
case 0:
|
|
10636
10569
|
users = params.users;
|
|
10637
|
-
|
|
10570
|
+
_context65.next = 3;
|
|
10638
10571
|
return this.post(this.baseURL + "/campaigns/".concat(id, "/test"), {
|
|
10639
10572
|
users: users
|
|
10640
10573
|
});
|
|
10641
10574
|
|
|
10642
10575
|
case 3:
|
|
10643
|
-
return
|
|
10576
|
+
return _context65.abrupt("return", _context65.sent);
|
|
10644
10577
|
|
|
10645
10578
|
case 4:
|
|
10646
10579
|
case "end":
|
|
10647
|
-
return
|
|
10580
|
+
return _context65.stop();
|
|
10648
10581
|
}
|
|
10649
10582
|
}
|
|
10650
|
-
},
|
|
10583
|
+
}, _callee65, this);
|
|
10651
10584
|
}));
|
|
10652
10585
|
|
|
10653
|
-
function testCampaign(
|
|
10586
|
+
function testCampaign(_x87, _x88) {
|
|
10654
10587
|
return _testCampaign.apply(this, arguments);
|
|
10655
10588
|
}
|
|
10656
10589
|
|
|
10657
10590
|
return testCampaign;
|
|
10658
10591
|
}()
|
|
10592
|
+
/**
|
|
10593
|
+
* queryRecipients - Query Campaign Recipient Results
|
|
10594
|
+
*
|
|
10595
|
+
*
|
|
10596
|
+
* @return {Recipient[]} Recipients
|
|
10597
|
+
*/
|
|
10598
|
+
|
|
10599
|
+
}, {
|
|
10600
|
+
key: "queryRecipients",
|
|
10601
|
+
value: function () {
|
|
10602
|
+
var _queryRecipients = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(filters) {
|
|
10603
|
+
var options,
|
|
10604
|
+
_args66 = arguments;
|
|
10605
|
+
return _regeneratorRuntime.wrap(function _callee66$(_context66) {
|
|
10606
|
+
while (1) {
|
|
10607
|
+
switch (_context66.prev = _context66.next) {
|
|
10608
|
+
case 0:
|
|
10609
|
+
options = _args66.length > 1 && _args66[1] !== undefined ? _args66[1] : {};
|
|
10610
|
+
_context66.next = 3;
|
|
10611
|
+
return this.get(this.baseURL + "/recipients", {
|
|
10612
|
+
payload: _objectSpread({
|
|
10613
|
+
filter_conditions: filters
|
|
10614
|
+
}, options)
|
|
10615
|
+
});
|
|
10616
|
+
|
|
10617
|
+
case 3:
|
|
10618
|
+
return _context66.abrupt("return", _context66.sent);
|
|
10619
|
+
|
|
10620
|
+
case 4:
|
|
10621
|
+
case "end":
|
|
10622
|
+
return _context66.stop();
|
|
10623
|
+
}
|
|
10624
|
+
}
|
|
10625
|
+
}, _callee66, this);
|
|
10626
|
+
}));
|
|
10627
|
+
|
|
10628
|
+
function queryRecipients(_x89) {
|
|
10629
|
+
return _queryRecipients.apply(this, arguments);
|
|
10630
|
+
}
|
|
10631
|
+
|
|
10632
|
+
return queryRecipients;
|
|
10633
|
+
}()
|
|
10659
10634
|
/**
|
|
10660
10635
|
* enrichURL - Get OpenGraph data of the given link
|
|
10661
10636
|
*
|
|
@@ -10666,24 +10641,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10666
10641
|
}, {
|
|
10667
10642
|
key: "enrichURL",
|
|
10668
10643
|
value: function () {
|
|
10669
|
-
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10670
|
-
return _regeneratorRuntime.wrap(function
|
|
10644
|
+
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(url) {
|
|
10645
|
+
return _regeneratorRuntime.wrap(function _callee67$(_context67) {
|
|
10671
10646
|
while (1) {
|
|
10672
|
-
switch (
|
|
10647
|
+
switch (_context67.prev = _context67.next) {
|
|
10673
10648
|
case 0:
|
|
10674
|
-
return
|
|
10649
|
+
return _context67.abrupt("return", this.get(this.baseURL + "/og", {
|
|
10675
10650
|
url: url
|
|
10676
10651
|
}));
|
|
10677
10652
|
|
|
10678
10653
|
case 1:
|
|
10679
10654
|
case "end":
|
|
10680
|
-
return
|
|
10655
|
+
return _context67.stop();
|
|
10681
10656
|
}
|
|
10682
10657
|
}
|
|
10683
|
-
},
|
|
10658
|
+
}, _callee67, this);
|
|
10684
10659
|
}));
|
|
10685
10660
|
|
|
10686
|
-
function enrichURL(
|
|
10661
|
+
function enrichURL(_x90) {
|
|
10687
10662
|
return _enrichURL.apply(this, arguments);
|
|
10688
10663
|
}
|
|
10689
10664
|
|
|
@@ -10700,22 +10675,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10700
10675
|
}, {
|
|
10701
10676
|
key: "getTask",
|
|
10702
10677
|
value: function () {
|
|
10703
|
-
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10704
|
-
return _regeneratorRuntime.wrap(function
|
|
10678
|
+
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(id) {
|
|
10679
|
+
return _regeneratorRuntime.wrap(function _callee68$(_context68) {
|
|
10705
10680
|
while (1) {
|
|
10706
|
-
switch (
|
|
10681
|
+
switch (_context68.prev = _context68.next) {
|
|
10707
10682
|
case 0:
|
|
10708
|
-
return
|
|
10683
|
+
return _context68.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
|
|
10709
10684
|
|
|
10710
10685
|
case 1:
|
|
10711
10686
|
case "end":
|
|
10712
|
-
return
|
|
10687
|
+
return _context68.stop();
|
|
10713
10688
|
}
|
|
10714
10689
|
}
|
|
10715
|
-
},
|
|
10690
|
+
}, _callee68, this);
|
|
10716
10691
|
}));
|
|
10717
10692
|
|
|
10718
|
-
function getTask(
|
|
10693
|
+
function getTask(_x91) {
|
|
10719
10694
|
return _getTask.apply(this, arguments);
|
|
10720
10695
|
}
|
|
10721
10696
|
|
|
@@ -10733,31 +10708,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10733
10708
|
}, {
|
|
10734
10709
|
key: "deleteChannels",
|
|
10735
10710
|
value: function () {
|
|
10736
|
-
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10711
|
+
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(cids) {
|
|
10737
10712
|
var options,
|
|
10738
|
-
|
|
10739
|
-
return _regeneratorRuntime.wrap(function
|
|
10713
|
+
_args69 = arguments;
|
|
10714
|
+
return _regeneratorRuntime.wrap(function _callee69$(_context69) {
|
|
10740
10715
|
while (1) {
|
|
10741
|
-
switch (
|
|
10716
|
+
switch (_context69.prev = _context69.next) {
|
|
10742
10717
|
case 0:
|
|
10743
|
-
options =
|
|
10744
|
-
|
|
10718
|
+
options = _args69.length > 1 && _args69[1] !== undefined ? _args69[1] : {};
|
|
10719
|
+
_context69.next = 3;
|
|
10745
10720
|
return this.post(this.baseURL + "/channels/delete", _objectSpread({
|
|
10746
10721
|
cids: cids
|
|
10747
10722
|
}, options));
|
|
10748
10723
|
|
|
10749
10724
|
case 3:
|
|
10750
|
-
return
|
|
10725
|
+
return _context69.abrupt("return", _context69.sent);
|
|
10751
10726
|
|
|
10752
10727
|
case 4:
|
|
10753
10728
|
case "end":
|
|
10754
|
-
return
|
|
10729
|
+
return _context69.stop();
|
|
10755
10730
|
}
|
|
10756
10731
|
}
|
|
10757
|
-
},
|
|
10732
|
+
}, _callee69, this);
|
|
10758
10733
|
}));
|
|
10759
10734
|
|
|
10760
|
-
function deleteChannels(
|
|
10735
|
+
function deleteChannels(_x92) {
|
|
10761
10736
|
return _deleteChannels.apply(this, arguments);
|
|
10762
10737
|
}
|
|
10763
10738
|
|
|
@@ -10775,13 +10750,13 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10775
10750
|
}, {
|
|
10776
10751
|
key: "deleteUsers",
|
|
10777
10752
|
value: function () {
|
|
10778
|
-
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10779
|
-
return _regeneratorRuntime.wrap(function
|
|
10753
|
+
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(user_ids, options) {
|
|
10754
|
+
return _regeneratorRuntime.wrap(function _callee70$(_context70) {
|
|
10780
10755
|
while (1) {
|
|
10781
|
-
switch (
|
|
10756
|
+
switch (_context70.prev = _context70.next) {
|
|
10782
10757
|
case 0:
|
|
10783
10758
|
if (!((options === null || options === void 0 ? void 0 : options.user) !== 'soft' && (options === null || options === void 0 ? void 0 : options.user) !== 'hard')) {
|
|
10784
|
-
|
|
10759
|
+
_context70.next = 2;
|
|
10785
10760
|
break;
|
|
10786
10761
|
}
|
|
10787
10762
|
|
|
@@ -10789,7 +10764,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10789
10764
|
|
|
10790
10765
|
case 2:
|
|
10791
10766
|
if (!(options.messages !== undefined && options.messages !== 'soft' && options.messages !== 'hard')) {
|
|
10792
|
-
|
|
10767
|
+
_context70.next = 4;
|
|
10793
10768
|
break;
|
|
10794
10769
|
}
|
|
10795
10770
|
|
|
@@ -10797,30 +10772,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10797
10772
|
|
|
10798
10773
|
case 4:
|
|
10799
10774
|
if (!(options.conversations !== undefined && options.conversations !== 'soft' && options.conversations !== 'hard')) {
|
|
10800
|
-
|
|
10775
|
+
_context70.next = 6;
|
|
10801
10776
|
break;
|
|
10802
10777
|
}
|
|
10803
10778
|
|
|
10804
10779
|
throw new Error('Invalid delete user options. conversations must be one of [soft hard]');
|
|
10805
10780
|
|
|
10806
10781
|
case 6:
|
|
10807
|
-
|
|
10782
|
+
_context70.next = 8;
|
|
10808
10783
|
return this.post(this.baseURL + "/users/delete", _objectSpread({
|
|
10809
10784
|
user_ids: user_ids
|
|
10810
10785
|
}, options));
|
|
10811
10786
|
|
|
10812
10787
|
case 8:
|
|
10813
|
-
return
|
|
10788
|
+
return _context70.abrupt("return", _context70.sent);
|
|
10814
10789
|
|
|
10815
10790
|
case 9:
|
|
10816
10791
|
case "end":
|
|
10817
|
-
return
|
|
10792
|
+
return _context70.stop();
|
|
10818
10793
|
}
|
|
10819
10794
|
}
|
|
10820
|
-
},
|
|
10795
|
+
}, _callee70, this);
|
|
10821
10796
|
}));
|
|
10822
10797
|
|
|
10823
|
-
function deleteUsers(
|
|
10798
|
+
function deleteUsers(_x93, _x94) {
|
|
10824
10799
|
return _deleteUsers.apply(this, arguments);
|
|
10825
10800
|
}
|
|
10826
10801
|
|
|
@@ -10841,28 +10816,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10841
10816
|
}, {
|
|
10842
10817
|
key: "_createImportURL",
|
|
10843
10818
|
value: function () {
|
|
10844
|
-
var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10845
|
-
return _regeneratorRuntime.wrap(function
|
|
10819
|
+
var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(filename) {
|
|
10820
|
+
return _regeneratorRuntime.wrap(function _callee71$(_context71) {
|
|
10846
10821
|
while (1) {
|
|
10847
|
-
switch (
|
|
10822
|
+
switch (_context71.prev = _context71.next) {
|
|
10848
10823
|
case 0:
|
|
10849
|
-
|
|
10824
|
+
_context71.next = 2;
|
|
10850
10825
|
return this.post(this.baseURL + "/import_urls", {
|
|
10851
10826
|
filename: filename
|
|
10852
10827
|
});
|
|
10853
10828
|
|
|
10854
10829
|
case 2:
|
|
10855
|
-
return
|
|
10830
|
+
return _context71.abrupt("return", _context71.sent);
|
|
10856
10831
|
|
|
10857
10832
|
case 3:
|
|
10858
10833
|
case "end":
|
|
10859
|
-
return
|
|
10834
|
+
return _context71.stop();
|
|
10860
10835
|
}
|
|
10861
10836
|
}
|
|
10862
|
-
},
|
|
10837
|
+
}, _callee71, this);
|
|
10863
10838
|
}));
|
|
10864
10839
|
|
|
10865
|
-
function _createImportURL(
|
|
10840
|
+
function _createImportURL(_x95) {
|
|
10866
10841
|
return _createImportURL2.apply(this, arguments);
|
|
10867
10842
|
}
|
|
10868
10843
|
|
|
@@ -10884,33 +10859,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10884
10859
|
}, {
|
|
10885
10860
|
key: "_createImport",
|
|
10886
10861
|
value: function () {
|
|
10887
|
-
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10862
|
+
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(path) {
|
|
10888
10863
|
var options,
|
|
10889
|
-
|
|
10890
|
-
return _regeneratorRuntime.wrap(function
|
|
10864
|
+
_args72 = arguments;
|
|
10865
|
+
return _regeneratorRuntime.wrap(function _callee72$(_context72) {
|
|
10891
10866
|
while (1) {
|
|
10892
|
-
switch (
|
|
10867
|
+
switch (_context72.prev = _context72.next) {
|
|
10893
10868
|
case 0:
|
|
10894
|
-
options =
|
|
10869
|
+
options = _args72.length > 1 && _args72[1] !== undefined ? _args72[1] : {
|
|
10895
10870
|
mode: 'upsert'
|
|
10896
10871
|
};
|
|
10897
|
-
|
|
10872
|
+
_context72.next = 3;
|
|
10898
10873
|
return this.post(this.baseURL + "/imports", _objectSpread({
|
|
10899
10874
|
path: path
|
|
10900
10875
|
}, options));
|
|
10901
10876
|
|
|
10902
10877
|
case 3:
|
|
10903
|
-
return
|
|
10878
|
+
return _context72.abrupt("return", _context72.sent);
|
|
10904
10879
|
|
|
10905
10880
|
case 4:
|
|
10906
10881
|
case "end":
|
|
10907
|
-
return
|
|
10882
|
+
return _context72.stop();
|
|
10908
10883
|
}
|
|
10909
10884
|
}
|
|
10910
|
-
},
|
|
10885
|
+
}, _callee72, this);
|
|
10911
10886
|
}));
|
|
10912
10887
|
|
|
10913
|
-
function _createImport(
|
|
10888
|
+
function _createImport(_x96) {
|
|
10914
10889
|
return _createImport2.apply(this, arguments);
|
|
10915
10890
|
}
|
|
10916
10891
|
|
|
@@ -10932,26 +10907,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10932
10907
|
}, {
|
|
10933
10908
|
key: "_getImport",
|
|
10934
10909
|
value: function () {
|
|
10935
|
-
var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10936
|
-
return _regeneratorRuntime.wrap(function
|
|
10910
|
+
var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(id) {
|
|
10911
|
+
return _regeneratorRuntime.wrap(function _callee73$(_context73) {
|
|
10937
10912
|
while (1) {
|
|
10938
|
-
switch (
|
|
10913
|
+
switch (_context73.prev = _context73.next) {
|
|
10939
10914
|
case 0:
|
|
10940
|
-
|
|
10915
|
+
_context73.next = 2;
|
|
10941
10916
|
return this.get(this.baseURL + "/imports/".concat(id));
|
|
10942
10917
|
|
|
10943
10918
|
case 2:
|
|
10944
|
-
return
|
|
10919
|
+
return _context73.abrupt("return", _context73.sent);
|
|
10945
10920
|
|
|
10946
10921
|
case 3:
|
|
10947
10922
|
case "end":
|
|
10948
|
-
return
|
|
10923
|
+
return _context73.stop();
|
|
10949
10924
|
}
|
|
10950
10925
|
}
|
|
10951
|
-
},
|
|
10926
|
+
}, _callee73, this);
|
|
10952
10927
|
}));
|
|
10953
10928
|
|
|
10954
|
-
function _getImport(
|
|
10929
|
+
function _getImport(_x97) {
|
|
10955
10930
|
return _getImport2.apply(this, arguments);
|
|
10956
10931
|
}
|
|
10957
10932
|
|
|
@@ -10973,26 +10948,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10973
10948
|
}, {
|
|
10974
10949
|
key: "_listImports",
|
|
10975
10950
|
value: function () {
|
|
10976
|
-
var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
10977
|
-
return _regeneratorRuntime.wrap(function
|
|
10951
|
+
var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(options) {
|
|
10952
|
+
return _regeneratorRuntime.wrap(function _callee74$(_context74) {
|
|
10978
10953
|
while (1) {
|
|
10979
|
-
switch (
|
|
10954
|
+
switch (_context74.prev = _context74.next) {
|
|
10980
10955
|
case 0:
|
|
10981
|
-
|
|
10956
|
+
_context74.next = 2;
|
|
10982
10957
|
return this.get(this.baseURL + "/imports", options);
|
|
10983
10958
|
|
|
10984
10959
|
case 2:
|
|
10985
|
-
return
|
|
10960
|
+
return _context74.abrupt("return", _context74.sent);
|
|
10986
10961
|
|
|
10987
10962
|
case 3:
|
|
10988
10963
|
case "end":
|
|
10989
|
-
return
|
|
10964
|
+
return _context74.stop();
|
|
10990
10965
|
}
|
|
10991
10966
|
}
|
|
10992
|
-
},
|
|
10967
|
+
}, _callee74, this);
|
|
10993
10968
|
}));
|
|
10994
10969
|
|
|
10995
|
-
function _listImports(
|
|
10970
|
+
function _listImports(_x98) {
|
|
10996
10971
|
return _listImports2.apply(this, arguments);
|
|
10997
10972
|
}
|
|
10998
10973
|
|
|
@@ -11011,28 +10986,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11011
10986
|
}, {
|
|
11012
10987
|
key: "upsertPushProvider",
|
|
11013
10988
|
value: function () {
|
|
11014
|
-
var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11015
|
-
return _regeneratorRuntime.wrap(function
|
|
10989
|
+
var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(pushProvider) {
|
|
10990
|
+
return _regeneratorRuntime.wrap(function _callee75$(_context75) {
|
|
11016
10991
|
while (1) {
|
|
11017
|
-
switch (
|
|
10992
|
+
switch (_context75.prev = _context75.next) {
|
|
11018
10993
|
case 0:
|
|
11019
|
-
|
|
10994
|
+
_context75.next = 2;
|
|
11020
10995
|
return this.post(this.baseURL + "/push_providers", {
|
|
11021
10996
|
push_provider: pushProvider
|
|
11022
10997
|
});
|
|
11023
10998
|
|
|
11024
10999
|
case 2:
|
|
11025
|
-
return
|
|
11000
|
+
return _context75.abrupt("return", _context75.sent);
|
|
11026
11001
|
|
|
11027
11002
|
case 3:
|
|
11028
11003
|
case "end":
|
|
11029
|
-
return
|
|
11004
|
+
return _context75.stop();
|
|
11030
11005
|
}
|
|
11031
11006
|
}
|
|
11032
|
-
},
|
|
11007
|
+
}, _callee75, this);
|
|
11033
11008
|
}));
|
|
11034
11009
|
|
|
11035
|
-
function upsertPushProvider(
|
|
11010
|
+
function upsertPushProvider(_x99) {
|
|
11036
11011
|
return _upsertPushProvider.apply(this, arguments);
|
|
11037
11012
|
}
|
|
11038
11013
|
|
|
@@ -11051,28 +11026,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11051
11026
|
}, {
|
|
11052
11027
|
key: "deletePushProvider",
|
|
11053
11028
|
value: function () {
|
|
11054
|
-
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11029
|
+
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(_ref9) {
|
|
11055
11030
|
var type, name;
|
|
11056
|
-
return _regeneratorRuntime.wrap(function
|
|
11031
|
+
return _regeneratorRuntime.wrap(function _callee76$(_context76) {
|
|
11057
11032
|
while (1) {
|
|
11058
|
-
switch (
|
|
11033
|
+
switch (_context76.prev = _context76.next) {
|
|
11059
11034
|
case 0:
|
|
11060
|
-
type =
|
|
11061
|
-
|
|
11035
|
+
type = _ref9.type, name = _ref9.name;
|
|
11036
|
+
_context76.next = 3;
|
|
11062
11037
|
return this.delete(this.baseURL + "/push_providers/".concat(type, "/").concat(name));
|
|
11063
11038
|
|
|
11064
11039
|
case 3:
|
|
11065
|
-
return
|
|
11040
|
+
return _context76.abrupt("return", _context76.sent);
|
|
11066
11041
|
|
|
11067
11042
|
case 4:
|
|
11068
11043
|
case "end":
|
|
11069
|
-
return
|
|
11044
|
+
return _context76.stop();
|
|
11070
11045
|
}
|
|
11071
11046
|
}
|
|
11072
|
-
},
|
|
11047
|
+
}, _callee76, this);
|
|
11073
11048
|
}));
|
|
11074
11049
|
|
|
11075
|
-
function deletePushProvider(
|
|
11050
|
+
function deletePushProvider(_x100) {
|
|
11076
11051
|
return _deletePushProvider.apply(this, arguments);
|
|
11077
11052
|
}
|
|
11078
11053
|
|
|
@@ -11089,23 +11064,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11089
11064
|
}, {
|
|
11090
11065
|
key: "listPushProviders",
|
|
11091
11066
|
value: function () {
|
|
11092
|
-
var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11093
|
-
return _regeneratorRuntime.wrap(function
|
|
11067
|
+
var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77() {
|
|
11068
|
+
return _regeneratorRuntime.wrap(function _callee77$(_context77) {
|
|
11094
11069
|
while (1) {
|
|
11095
|
-
switch (
|
|
11070
|
+
switch (_context77.prev = _context77.next) {
|
|
11096
11071
|
case 0:
|
|
11097
|
-
|
|
11072
|
+
_context77.next = 2;
|
|
11098
11073
|
return this.get(this.baseURL + "/push_providers");
|
|
11099
11074
|
|
|
11100
11075
|
case 2:
|
|
11101
|
-
return
|
|
11076
|
+
return _context77.abrupt("return", _context77.sent);
|
|
11102
11077
|
|
|
11103
11078
|
case 3:
|
|
11104
11079
|
case "end":
|
|
11105
|
-
return
|
|
11080
|
+
return _context77.stop();
|
|
11106
11081
|
}
|
|
11107
11082
|
}
|
|
11108
|
-
},
|
|
11083
|
+
}, _callee77, this);
|
|
11109
11084
|
}));
|
|
11110
11085
|
|
|
11111
11086
|
function listPushProviders() {
|
|
@@ -11114,6 +11089,15 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11114
11089
|
|
|
11115
11090
|
return listPushProviders;
|
|
11116
11091
|
}()
|
|
11092
|
+
/**
|
|
11093
|
+
* creates an abort controller that will be used by the next HTTP Request.
|
|
11094
|
+
*/
|
|
11095
|
+
|
|
11096
|
+
}, {
|
|
11097
|
+
key: "createAbortControllerForNextRequest",
|
|
11098
|
+
value: function createAbortControllerForNextRequest() {
|
|
11099
|
+
return this.nextRequestAbortController = new AbortController();
|
|
11100
|
+
}
|
|
11117
11101
|
}], [{
|
|
11118
11102
|
key: "getInstance",
|
|
11119
11103
|
value: function getInstance(key, secretOrOptions, options) {
|