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