stream-chat 7.0.0 → 7.1.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.
@@ -5936,6 +5936,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
5936
5936
  `messages` soft-hard will delete any messages that the user has sent.
5937
5937
  `new_channel_owner_id` any channels owned by the hard-deleted user will be transferred to this user ID
5938
5938
  */
5939
+ // TODO: add better typing
5939
5940
  var ErrorFromResponse = /*#__PURE__*/function (_Error) {
5940
5941
  _inherits(ErrorFromResponse, _Error);
5941
5942
 
@@ -9822,7 +9823,7 @@ var StreamChat = /*#__PURE__*/function () {
9822
9823
  }, {
9823
9824
  key: "getUserAgent",
9824
9825
  value: function getUserAgent() {
9825
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "7.0.0");
9826
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "7.1.0");
9826
9827
  }
9827
9828
  }, {
9828
9829
  key: "setUserAgent",
@@ -10142,32 +10143,34 @@ var StreamChat = /*#__PURE__*/function () {
10142
10143
  return createSegment;
10143
10144
  }()
10144
10145
  /**
10145
- * getSegment - Get a Campaign Segment
10146
+ * querySegments - Query Campaign Segments
10146
10147
  *
10147
- * @param {string} id Segment ID
10148
10148
  *
10149
- * @return {Segment} A Segment
10149
+ * @return {Segment[]} Segments
10150
10150
  */
10151
10151
 
10152
10152
  }, {
10153
- key: "getSegment",
10153
+ key: "querySegments",
10154
10154
  value: function () {
10155
- var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(id) {
10156
- var _yield$this$get, segment;
10157
-
10155
+ var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(filters) {
10156
+ var options,
10157
+ _args55 = arguments;
10158
10158
  return _regeneratorRuntime.wrap(function _callee55$(_context55) {
10159
10159
  while (1) {
10160
10160
  switch (_context55.prev = _context55.next) {
10161
10161
  case 0:
10162
- _context55.next = 2;
10163
- return this.get(this.baseURL + "/segments/".concat(id));
10162
+ options = _args55.length > 1 && _args55[1] !== undefined ? _args55[1] : {};
10163
+ _context55.next = 3;
10164
+ return this.get(this.baseURL + "/segments", {
10165
+ payload: _objectSpread({
10166
+ filter_conditions: filters
10167
+ }, options)
10168
+ });
10164
10169
 
10165
- case 2:
10166
- _yield$this$get = _context55.sent;
10167
- segment = _yield$this$get.segment;
10168
- return _context55.abrupt("return", segment);
10170
+ case 3:
10171
+ return _context55.abrupt("return", _context55.sent);
10169
10172
 
10170
- case 5:
10173
+ case 4:
10171
10174
  case "end":
10172
10175
  return _context55.stop();
10173
10176
  }
@@ -10175,50 +10178,11 @@ var StreamChat = /*#__PURE__*/function () {
10175
10178
  }, _callee55, this);
10176
10179
  }));
10177
10180
 
10178
- function getSegment(_x74) {
10179
- return _getSegment.apply(this, arguments);
10181
+ function querySegments(_x74) {
10182
+ return _querySegments.apply(this, arguments);
10180
10183
  }
10181
10184
 
10182
- return getSegment;
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;
10185
+ return querySegments;
10222
10186
  }()
10223
10187
  /**
10224
10188
  * updateSegment - Update a Campaign Segment
@@ -10232,32 +10196,32 @@ var StreamChat = /*#__PURE__*/function () {
10232
10196
  }, {
10233
10197
  key: "updateSegment",
10234
10198
  value: function () {
10235
- var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(id, params) {
10199
+ var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(id, params) {
10236
10200
  var _yield$this$put, segment;
10237
10201
 
10238
- return _regeneratorRuntime.wrap(function _callee57$(_context57) {
10202
+ return _regeneratorRuntime.wrap(function _callee56$(_context56) {
10239
10203
  while (1) {
10240
- switch (_context57.prev = _context57.next) {
10204
+ switch (_context56.prev = _context56.next) {
10241
10205
  case 0:
10242
- _context57.next = 2;
10206
+ _context56.next = 2;
10243
10207
  return this.put(this.baseURL + "/segments/".concat(id), {
10244
10208
  segment: params
10245
10209
  });
10246
10210
 
10247
10211
  case 2:
10248
- _yield$this$put = _context57.sent;
10212
+ _yield$this$put = _context56.sent;
10249
10213
  segment = _yield$this$put.segment;
10250
- return _context57.abrupt("return", segment);
10214
+ return _context56.abrupt("return", segment);
10251
10215
 
10252
10216
  case 5:
10253
10217
  case "end":
10254
- return _context57.stop();
10218
+ return _context56.stop();
10255
10219
  }
10256
10220
  }
10257
- }, _callee57, this);
10221
+ }, _callee56, this);
10258
10222
  }));
10259
10223
 
10260
- function updateSegment(_x76, _x77) {
10224
+ function updateSegment(_x75, _x76) {
10261
10225
  return _updateSegment.apply(this, arguments);
10262
10226
  }
10263
10227
 
@@ -10274,22 +10238,22 @@ var StreamChat = /*#__PURE__*/function () {
10274
10238
  }, {
10275
10239
  key: "deleteSegment",
10276
10240
  value: function () {
10277
- var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(id) {
10278
- return _regeneratorRuntime.wrap(function _callee58$(_context58) {
10241
+ var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(id) {
10242
+ return _regeneratorRuntime.wrap(function _callee57$(_context57) {
10279
10243
  while (1) {
10280
- switch (_context58.prev = _context58.next) {
10244
+ switch (_context57.prev = _context57.next) {
10281
10245
  case 0:
10282
- return _context58.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
10246
+ return _context57.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
10283
10247
 
10284
10248
  case 1:
10285
10249
  case "end":
10286
- return _context58.stop();
10250
+ return _context57.stop();
10287
10251
  }
10288
10252
  }
10289
- }, _callee58, this);
10253
+ }, _callee57, this);
10290
10254
  }));
10291
10255
 
10292
- function deleteSegment(_x78) {
10256
+ function deleteSegment(_x77) {
10293
10257
  return _deleteSegment.apply(this, arguments);
10294
10258
  }
10295
10259
 
@@ -10306,115 +10270,78 @@ var StreamChat = /*#__PURE__*/function () {
10306
10270
  }, {
10307
10271
  key: "createCampaign",
10308
10272
  value: function () {
10309
- var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(params) {
10273
+ var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(params) {
10310
10274
  var _yield$this$post2, campaign;
10311
10275
 
10312
- return _regeneratorRuntime.wrap(function _callee59$(_context59) {
10276
+ return _regeneratorRuntime.wrap(function _callee58$(_context58) {
10313
10277
  while (1) {
10314
- switch (_context59.prev = _context59.next) {
10278
+ switch (_context58.prev = _context58.next) {
10315
10279
  case 0:
10316
- _context59.next = 2;
10280
+ _context58.next = 2;
10317
10281
  return this.post(this.baseURL + "/campaigns", {
10318
10282
  campaign: params
10319
10283
  });
10320
10284
 
10321
10285
  case 2:
10322
- _yield$this$post2 = _context59.sent;
10286
+ _yield$this$post2 = _context58.sent;
10323
10287
  campaign = _yield$this$post2.campaign;
10324
- return _context59.abrupt("return", campaign);
10288
+ return _context58.abrupt("return", campaign);
10325
10289
 
10326
10290
  case 5:
10327
10291
  case "end":
10328
- return _context59.stop();
10292
+ return _context58.stop();
10329
10293
  }
10330
10294
  }
10331
- }, _callee59, this);
10295
+ }, _callee58, this);
10332
10296
  }));
10333
10297
 
10334
- function createCampaign(_x79) {
10298
+ function createCampaign(_x78) {
10335
10299
  return _createCampaign.apply(this, arguments);
10336
10300
  }
10337
10301
 
10338
10302
  return createCampaign;
10339
10303
  }()
10340
10304
  /**
10341
- * getCampaign - Get a Campaign
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
10305
+ * queryCampaigns - Query Campaigns
10382
10306
  *
10383
10307
  *
10384
10308
  * @return {Campaign[]} Campaigns
10385
10309
  */
10386
10310
 
10387
10311
  }, {
10388
- key: "listCampaigns",
10312
+ key: "queryCampaigns",
10389
10313
  value: function () {
10390
- var _listCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(options) {
10391
- var _yield$this$get4, campaigns;
10392
-
10393
- return _regeneratorRuntime.wrap(function _callee61$(_context61) {
10314
+ var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(filters) {
10315
+ var options,
10316
+ _args59 = arguments;
10317
+ return _regeneratorRuntime.wrap(function _callee59$(_context59) {
10394
10318
  while (1) {
10395
- switch (_context61.prev = _context61.next) {
10319
+ switch (_context59.prev = _context59.next) {
10396
10320
  case 0:
10397
- _context61.next = 2;
10398
- return this.get(this.baseURL + "/campaigns", options);
10321
+ options = _args59.length > 1 && _args59[1] !== undefined ? _args59[1] : {};
10322
+ _context59.next = 3;
10323
+ return this.get(this.baseURL + "/campaigns", {
10324
+ payload: _objectSpread({
10325
+ filter_conditions: filters
10326
+ }, options)
10327
+ });
10399
10328
 
10400
- case 2:
10401
- _yield$this$get4 = _context61.sent;
10402
- campaigns = _yield$this$get4.campaigns;
10403
- return _context61.abrupt("return", campaigns);
10329
+ case 3:
10330
+ return _context59.abrupt("return", _context59.sent);
10404
10331
 
10405
- case 5:
10332
+ case 4:
10406
10333
  case "end":
10407
- return _context61.stop();
10334
+ return _context59.stop();
10408
10335
  }
10409
10336
  }
10410
- }, _callee61, this);
10337
+ }, _callee59, this);
10411
10338
  }));
10412
10339
 
10413
- function listCampaigns(_x81) {
10414
- return _listCampaigns.apply(this, arguments);
10340
+ function queryCampaigns(_x79) {
10341
+ return _queryCampaigns.apply(this, arguments);
10415
10342
  }
10416
10343
 
10417
- return listCampaigns;
10344
+ return queryCampaigns;
10418
10345
  }()
10419
10346
  /**
10420
10347
  * updateCampaign - Update a Campaign
@@ -10428,32 +10355,32 @@ var StreamChat = /*#__PURE__*/function () {
10428
10355
  }, {
10429
10356
  key: "updateCampaign",
10430
10357
  value: function () {
10431
- var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(id, params) {
10358
+ var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(id, params) {
10432
10359
  var _yield$this$put2, campaign;
10433
10360
 
10434
- return _regeneratorRuntime.wrap(function _callee62$(_context62) {
10361
+ return _regeneratorRuntime.wrap(function _callee60$(_context60) {
10435
10362
  while (1) {
10436
- switch (_context62.prev = _context62.next) {
10363
+ switch (_context60.prev = _context60.next) {
10437
10364
  case 0:
10438
- _context62.next = 2;
10365
+ _context60.next = 2;
10439
10366
  return this.put(this.baseURL + "/campaigns/".concat(id), {
10440
10367
  campaign: params
10441
10368
  });
10442
10369
 
10443
10370
  case 2:
10444
- _yield$this$put2 = _context62.sent;
10371
+ _yield$this$put2 = _context60.sent;
10445
10372
  campaign = _yield$this$put2.campaign;
10446
- return _context62.abrupt("return", campaign);
10373
+ return _context60.abrupt("return", campaign);
10447
10374
 
10448
10375
  case 5:
10449
10376
  case "end":
10450
- return _context62.stop();
10377
+ return _context60.stop();
10451
10378
  }
10452
10379
  }
10453
- }, _callee62, this);
10380
+ }, _callee60, this);
10454
10381
  }));
10455
10382
 
10456
- function updateCampaign(_x82, _x83) {
10383
+ function updateCampaign(_x80, _x81) {
10457
10384
  return _updateCampaign.apply(this, arguments);
10458
10385
  }
10459
10386
 
@@ -10470,22 +10397,25 @@ var StreamChat = /*#__PURE__*/function () {
10470
10397
  }, {
10471
10398
  key: "deleteCampaign",
10472
10399
  value: function () {
10473
- var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(id) {
10474
- return _regeneratorRuntime.wrap(function _callee63$(_context63) {
10400
+ var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(id) {
10401
+ var params,
10402
+ _args61 = arguments;
10403
+ return _regeneratorRuntime.wrap(function _callee61$(_context61) {
10475
10404
  while (1) {
10476
- switch (_context63.prev = _context63.next) {
10405
+ switch (_context61.prev = _context61.next) {
10477
10406
  case 0:
10478
- return _context63.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id)));
10407
+ params = _args61.length > 1 && _args61[1] !== undefined ? _args61[1] : {};
10408
+ return _context61.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id), params));
10479
10409
 
10480
- case 1:
10410
+ case 2:
10481
10411
  case "end":
10482
- return _context63.stop();
10412
+ return _context61.stop();
10483
10413
  }
10484
10414
  }
10485
- }, _callee63, this);
10415
+ }, _callee61, this);
10486
10416
  }));
10487
10417
 
10488
- function deleteCampaign(_x84) {
10418
+ function deleteCampaign(_x82) {
10489
10419
  return _deleteCampaign.apply(this, arguments);
10490
10420
  }
10491
10421
 
@@ -10503,33 +10433,33 @@ var StreamChat = /*#__PURE__*/function () {
10503
10433
  }, {
10504
10434
  key: "scheduleCampaign",
10505
10435
  value: function () {
10506
- var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(id, params) {
10436
+ var _scheduleCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee62(id, params) {
10507
10437
  var scheduledFor, _yield$this$patch, campaign;
10508
10438
 
10509
- return _regeneratorRuntime.wrap(function _callee64$(_context64) {
10439
+ return _regeneratorRuntime.wrap(function _callee62$(_context62) {
10510
10440
  while (1) {
10511
- switch (_context64.prev = _context64.next) {
10441
+ switch (_context62.prev = _context62.next) {
10512
10442
  case 0:
10513
10443
  scheduledFor = params.scheduledFor;
10514
- _context64.next = 3;
10444
+ _context62.next = 3;
10515
10445
  return this.patch(this.baseURL + "/campaigns/".concat(id, "/schedule"), {
10516
10446
  scheduled_for: scheduledFor
10517
10447
  });
10518
10448
 
10519
10449
  case 3:
10520
- _yield$this$patch = _context64.sent;
10450
+ _yield$this$patch = _context62.sent;
10521
10451
  campaign = _yield$this$patch.campaign;
10522
- return _context64.abrupt("return", campaign);
10452
+ return _context62.abrupt("return", campaign);
10523
10453
 
10524
10454
  case 6:
10525
10455
  case "end":
10526
- return _context64.stop();
10456
+ return _context62.stop();
10527
10457
  }
10528
10458
  }
10529
- }, _callee64, this);
10459
+ }, _callee62, this);
10530
10460
  }));
10531
10461
 
10532
- function scheduleCampaign(_x85, _x86) {
10462
+ function scheduleCampaign(_x83, _x84) {
10533
10463
  return _scheduleCampaign.apply(this, arguments);
10534
10464
  }
10535
10465
 
@@ -10546,30 +10476,30 @@ var StreamChat = /*#__PURE__*/function () {
10546
10476
  }, {
10547
10477
  key: "stopCampaign",
10548
10478
  value: function () {
10549
- var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(id) {
10479
+ var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(id) {
10550
10480
  var _yield$this$patch2, campaign;
10551
10481
 
10552
- return _regeneratorRuntime.wrap(function _callee65$(_context65) {
10482
+ return _regeneratorRuntime.wrap(function _callee63$(_context63) {
10553
10483
  while (1) {
10554
- switch (_context65.prev = _context65.next) {
10484
+ switch (_context63.prev = _context63.next) {
10555
10485
  case 0:
10556
- _context65.next = 2;
10486
+ _context63.next = 2;
10557
10487
  return this.patch(this.baseURL + "/campaigns/".concat(id, "/stop"));
10558
10488
 
10559
10489
  case 2:
10560
- _yield$this$patch2 = _context65.sent;
10490
+ _yield$this$patch2 = _context63.sent;
10561
10491
  campaign = _yield$this$patch2.campaign;
10562
- return _context65.abrupt("return", campaign);
10492
+ return _context63.abrupt("return", campaign);
10563
10493
 
10564
10494
  case 5:
10565
10495
  case "end":
10566
- return _context65.stop();
10496
+ return _context63.stop();
10567
10497
  }
10568
10498
  }
10569
- }, _callee65, this);
10499
+ }, _callee63, this);
10570
10500
  }));
10571
10501
 
10572
- function stopCampaign(_x87) {
10502
+ function stopCampaign(_x85) {
10573
10503
  return _stopCampaign.apply(this, arguments);
10574
10504
  }
10575
10505
 
@@ -10586,30 +10516,30 @@ var StreamChat = /*#__PURE__*/function () {
10586
10516
  }, {
10587
10517
  key: "resumeCampaign",
10588
10518
  value: function () {
10589
- var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(id) {
10519
+ var _resumeCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee64(id) {
10590
10520
  var _yield$this$patch3, campaign;
10591
10521
 
10592
- return _regeneratorRuntime.wrap(function _callee66$(_context66) {
10522
+ return _regeneratorRuntime.wrap(function _callee64$(_context64) {
10593
10523
  while (1) {
10594
- switch (_context66.prev = _context66.next) {
10524
+ switch (_context64.prev = _context64.next) {
10595
10525
  case 0:
10596
- _context66.next = 2;
10526
+ _context64.next = 2;
10597
10527
  return this.patch(this.baseURL + "/campaigns/".concat(id, "/resume"));
10598
10528
 
10599
10529
  case 2:
10600
- _yield$this$patch3 = _context66.sent;
10530
+ _yield$this$patch3 = _context64.sent;
10601
10531
  campaign = _yield$this$patch3.campaign;
10602
- return _context66.abrupt("return", campaign);
10532
+ return _context64.abrupt("return", campaign);
10603
10533
 
10604
10534
  case 5:
10605
10535
  case "end":
10606
- return _context66.stop();
10536
+ return _context64.stop();
10607
10537
  }
10608
10538
  }
10609
- }, _callee66, this);
10539
+ }, _callee64, this);
10610
10540
  }));
10611
10541
 
10612
- function resumeCampaign(_x88) {
10542
+ function resumeCampaign(_x86) {
10613
10543
  return _resumeCampaign.apply(this, arguments);
10614
10544
  }
10615
10545
 
@@ -10627,35 +10557,77 @@ var StreamChat = /*#__PURE__*/function () {
10627
10557
  }, {
10628
10558
  key: "testCampaign",
10629
10559
  value: function () {
10630
- var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(id, params) {
10560
+ var _testCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65(id, params) {
10631
10561
  var users;
10632
- return _regeneratorRuntime.wrap(function _callee67$(_context67) {
10562
+ return _regeneratorRuntime.wrap(function _callee65$(_context65) {
10633
10563
  while (1) {
10634
- switch (_context67.prev = _context67.next) {
10564
+ switch (_context65.prev = _context65.next) {
10635
10565
  case 0:
10636
10566
  users = params.users;
10637
- _context67.next = 3;
10567
+ _context65.next = 3;
10638
10568
  return this.post(this.baseURL + "/campaigns/".concat(id, "/test"), {
10639
10569
  users: users
10640
10570
  });
10641
10571
 
10642
10572
  case 3:
10643
- return _context67.abrupt("return", _context67.sent);
10573
+ return _context65.abrupt("return", _context65.sent);
10644
10574
 
10645
10575
  case 4:
10646
10576
  case "end":
10647
- return _context67.stop();
10577
+ return _context65.stop();
10648
10578
  }
10649
10579
  }
10650
- }, _callee67, this);
10580
+ }, _callee65, this);
10651
10581
  }));
10652
10582
 
10653
- function testCampaign(_x89, _x90) {
10583
+ function testCampaign(_x87, _x88) {
10654
10584
  return _testCampaign.apply(this, arguments);
10655
10585
  }
10656
10586
 
10657
10587
  return testCampaign;
10658
10588
  }()
10589
+ /**
10590
+ * queryRecipients - Query Campaign Recipient Results
10591
+ *
10592
+ *
10593
+ * @return {Recipient[]} Recipients
10594
+ */
10595
+
10596
+ }, {
10597
+ key: "queryRecipients",
10598
+ value: function () {
10599
+ var _queryRecipients = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(filters) {
10600
+ var options,
10601
+ _args66 = arguments;
10602
+ return _regeneratorRuntime.wrap(function _callee66$(_context66) {
10603
+ while (1) {
10604
+ switch (_context66.prev = _context66.next) {
10605
+ case 0:
10606
+ options = _args66.length > 1 && _args66[1] !== undefined ? _args66[1] : {};
10607
+ _context66.next = 3;
10608
+ return this.get(this.baseURL + "/recipients", {
10609
+ payload: _objectSpread({
10610
+ filter_conditions: filters
10611
+ }, options)
10612
+ });
10613
+
10614
+ case 3:
10615
+ return _context66.abrupt("return", _context66.sent);
10616
+
10617
+ case 4:
10618
+ case "end":
10619
+ return _context66.stop();
10620
+ }
10621
+ }
10622
+ }, _callee66, this);
10623
+ }));
10624
+
10625
+ function queryRecipients(_x89) {
10626
+ return _queryRecipients.apply(this, arguments);
10627
+ }
10628
+
10629
+ return queryRecipients;
10630
+ }()
10659
10631
  /**
10660
10632
  * enrichURL - Get OpenGraph data of the given link
10661
10633
  *
@@ -10666,24 +10638,24 @@ var StreamChat = /*#__PURE__*/function () {
10666
10638
  }, {
10667
10639
  key: "enrichURL",
10668
10640
  value: function () {
10669
- var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(url) {
10670
- return _regeneratorRuntime.wrap(function _callee68$(_context68) {
10641
+ var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(url) {
10642
+ return _regeneratorRuntime.wrap(function _callee67$(_context67) {
10671
10643
  while (1) {
10672
- switch (_context68.prev = _context68.next) {
10644
+ switch (_context67.prev = _context67.next) {
10673
10645
  case 0:
10674
- return _context68.abrupt("return", this.get(this.baseURL + "/og", {
10646
+ return _context67.abrupt("return", this.get(this.baseURL + "/og", {
10675
10647
  url: url
10676
10648
  }));
10677
10649
 
10678
10650
  case 1:
10679
10651
  case "end":
10680
- return _context68.stop();
10652
+ return _context67.stop();
10681
10653
  }
10682
10654
  }
10683
- }, _callee68, this);
10655
+ }, _callee67, this);
10684
10656
  }));
10685
10657
 
10686
- function enrichURL(_x91) {
10658
+ function enrichURL(_x90) {
10687
10659
  return _enrichURL.apply(this, arguments);
10688
10660
  }
10689
10661
 
@@ -10700,22 +10672,22 @@ var StreamChat = /*#__PURE__*/function () {
10700
10672
  }, {
10701
10673
  key: "getTask",
10702
10674
  value: function () {
10703
- var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(id) {
10704
- return _regeneratorRuntime.wrap(function _callee69$(_context69) {
10675
+ var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(id) {
10676
+ return _regeneratorRuntime.wrap(function _callee68$(_context68) {
10705
10677
  while (1) {
10706
- switch (_context69.prev = _context69.next) {
10678
+ switch (_context68.prev = _context68.next) {
10707
10679
  case 0:
10708
- return _context69.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
10680
+ return _context68.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
10709
10681
 
10710
10682
  case 1:
10711
10683
  case "end":
10712
- return _context69.stop();
10684
+ return _context68.stop();
10713
10685
  }
10714
10686
  }
10715
- }, _callee69, this);
10687
+ }, _callee68, this);
10716
10688
  }));
10717
10689
 
10718
- function getTask(_x92) {
10690
+ function getTask(_x91) {
10719
10691
  return _getTask.apply(this, arguments);
10720
10692
  }
10721
10693
 
@@ -10733,31 +10705,31 @@ var StreamChat = /*#__PURE__*/function () {
10733
10705
  }, {
10734
10706
  key: "deleteChannels",
10735
10707
  value: function () {
10736
- var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(cids) {
10708
+ var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(cids) {
10737
10709
  var options,
10738
- _args70 = arguments;
10739
- return _regeneratorRuntime.wrap(function _callee70$(_context70) {
10710
+ _args69 = arguments;
10711
+ return _regeneratorRuntime.wrap(function _callee69$(_context69) {
10740
10712
  while (1) {
10741
- switch (_context70.prev = _context70.next) {
10713
+ switch (_context69.prev = _context69.next) {
10742
10714
  case 0:
10743
- options = _args70.length > 1 && _args70[1] !== undefined ? _args70[1] : {};
10744
- _context70.next = 3;
10715
+ options = _args69.length > 1 && _args69[1] !== undefined ? _args69[1] : {};
10716
+ _context69.next = 3;
10745
10717
  return this.post(this.baseURL + "/channels/delete", _objectSpread({
10746
10718
  cids: cids
10747
10719
  }, options));
10748
10720
 
10749
10721
  case 3:
10750
- return _context70.abrupt("return", _context70.sent);
10722
+ return _context69.abrupt("return", _context69.sent);
10751
10723
 
10752
10724
  case 4:
10753
10725
  case "end":
10754
- return _context70.stop();
10726
+ return _context69.stop();
10755
10727
  }
10756
10728
  }
10757
- }, _callee70, this);
10729
+ }, _callee69, this);
10758
10730
  }));
10759
10731
 
10760
- function deleteChannels(_x93) {
10732
+ function deleteChannels(_x92) {
10761
10733
  return _deleteChannels.apply(this, arguments);
10762
10734
  }
10763
10735
 
@@ -10775,13 +10747,13 @@ var StreamChat = /*#__PURE__*/function () {
10775
10747
  }, {
10776
10748
  key: "deleteUsers",
10777
10749
  value: function () {
10778
- var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(user_ids, options) {
10779
- return _regeneratorRuntime.wrap(function _callee71$(_context71) {
10750
+ var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(user_ids, options) {
10751
+ return _regeneratorRuntime.wrap(function _callee70$(_context70) {
10780
10752
  while (1) {
10781
- switch (_context71.prev = _context71.next) {
10753
+ switch (_context70.prev = _context70.next) {
10782
10754
  case 0:
10783
10755
  if (!((options === null || options === void 0 ? void 0 : options.user) !== 'soft' && (options === null || options === void 0 ? void 0 : options.user) !== 'hard')) {
10784
- _context71.next = 2;
10756
+ _context70.next = 2;
10785
10757
  break;
10786
10758
  }
10787
10759
 
@@ -10789,7 +10761,7 @@ var StreamChat = /*#__PURE__*/function () {
10789
10761
 
10790
10762
  case 2:
10791
10763
  if (!(options.messages !== undefined && options.messages !== 'soft' && options.messages !== 'hard')) {
10792
- _context71.next = 4;
10764
+ _context70.next = 4;
10793
10765
  break;
10794
10766
  }
10795
10767
 
@@ -10797,30 +10769,30 @@ var StreamChat = /*#__PURE__*/function () {
10797
10769
 
10798
10770
  case 4:
10799
10771
  if (!(options.conversations !== undefined && options.conversations !== 'soft' && options.conversations !== 'hard')) {
10800
- _context71.next = 6;
10772
+ _context70.next = 6;
10801
10773
  break;
10802
10774
  }
10803
10775
 
10804
10776
  throw new Error('Invalid delete user options. conversations must be one of [soft hard]');
10805
10777
 
10806
10778
  case 6:
10807
- _context71.next = 8;
10779
+ _context70.next = 8;
10808
10780
  return this.post(this.baseURL + "/users/delete", _objectSpread({
10809
10781
  user_ids: user_ids
10810
10782
  }, options));
10811
10783
 
10812
10784
  case 8:
10813
- return _context71.abrupt("return", _context71.sent);
10785
+ return _context70.abrupt("return", _context70.sent);
10814
10786
 
10815
10787
  case 9:
10816
10788
  case "end":
10817
- return _context71.stop();
10789
+ return _context70.stop();
10818
10790
  }
10819
10791
  }
10820
- }, _callee71, this);
10792
+ }, _callee70, this);
10821
10793
  }));
10822
10794
 
10823
- function deleteUsers(_x94, _x95) {
10795
+ function deleteUsers(_x93, _x94) {
10824
10796
  return _deleteUsers.apply(this, arguments);
10825
10797
  }
10826
10798
 
@@ -10841,28 +10813,28 @@ var StreamChat = /*#__PURE__*/function () {
10841
10813
  }, {
10842
10814
  key: "_createImportURL",
10843
10815
  value: function () {
10844
- var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(filename) {
10845
- return _regeneratorRuntime.wrap(function _callee72$(_context72) {
10816
+ var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(filename) {
10817
+ return _regeneratorRuntime.wrap(function _callee71$(_context71) {
10846
10818
  while (1) {
10847
- switch (_context72.prev = _context72.next) {
10819
+ switch (_context71.prev = _context71.next) {
10848
10820
  case 0:
10849
- _context72.next = 2;
10821
+ _context71.next = 2;
10850
10822
  return this.post(this.baseURL + "/import_urls", {
10851
10823
  filename: filename
10852
10824
  });
10853
10825
 
10854
10826
  case 2:
10855
- return _context72.abrupt("return", _context72.sent);
10827
+ return _context71.abrupt("return", _context71.sent);
10856
10828
 
10857
10829
  case 3:
10858
10830
  case "end":
10859
- return _context72.stop();
10831
+ return _context71.stop();
10860
10832
  }
10861
10833
  }
10862
- }, _callee72, this);
10834
+ }, _callee71, this);
10863
10835
  }));
10864
10836
 
10865
- function _createImportURL(_x96) {
10837
+ function _createImportURL(_x95) {
10866
10838
  return _createImportURL2.apply(this, arguments);
10867
10839
  }
10868
10840
 
@@ -10884,33 +10856,33 @@ var StreamChat = /*#__PURE__*/function () {
10884
10856
  }, {
10885
10857
  key: "_createImport",
10886
10858
  value: function () {
10887
- var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(path) {
10859
+ var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(path) {
10888
10860
  var options,
10889
- _args73 = arguments;
10890
- return _regeneratorRuntime.wrap(function _callee73$(_context73) {
10861
+ _args72 = arguments;
10862
+ return _regeneratorRuntime.wrap(function _callee72$(_context72) {
10891
10863
  while (1) {
10892
- switch (_context73.prev = _context73.next) {
10864
+ switch (_context72.prev = _context72.next) {
10893
10865
  case 0:
10894
- options = _args73.length > 1 && _args73[1] !== undefined ? _args73[1] : {
10866
+ options = _args72.length > 1 && _args72[1] !== undefined ? _args72[1] : {
10895
10867
  mode: 'upsert'
10896
10868
  };
10897
- _context73.next = 3;
10869
+ _context72.next = 3;
10898
10870
  return this.post(this.baseURL + "/imports", _objectSpread({
10899
10871
  path: path
10900
10872
  }, options));
10901
10873
 
10902
10874
  case 3:
10903
- return _context73.abrupt("return", _context73.sent);
10875
+ return _context72.abrupt("return", _context72.sent);
10904
10876
 
10905
10877
  case 4:
10906
10878
  case "end":
10907
- return _context73.stop();
10879
+ return _context72.stop();
10908
10880
  }
10909
10881
  }
10910
- }, _callee73, this);
10882
+ }, _callee72, this);
10911
10883
  }));
10912
10884
 
10913
- function _createImport(_x97) {
10885
+ function _createImport(_x96) {
10914
10886
  return _createImport2.apply(this, arguments);
10915
10887
  }
10916
10888
 
@@ -10932,26 +10904,26 @@ var StreamChat = /*#__PURE__*/function () {
10932
10904
  }, {
10933
10905
  key: "_getImport",
10934
10906
  value: function () {
10935
- var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(id) {
10936
- return _regeneratorRuntime.wrap(function _callee74$(_context74) {
10907
+ var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(id) {
10908
+ return _regeneratorRuntime.wrap(function _callee73$(_context73) {
10937
10909
  while (1) {
10938
- switch (_context74.prev = _context74.next) {
10910
+ switch (_context73.prev = _context73.next) {
10939
10911
  case 0:
10940
- _context74.next = 2;
10912
+ _context73.next = 2;
10941
10913
  return this.get(this.baseURL + "/imports/".concat(id));
10942
10914
 
10943
10915
  case 2:
10944
- return _context74.abrupt("return", _context74.sent);
10916
+ return _context73.abrupt("return", _context73.sent);
10945
10917
 
10946
10918
  case 3:
10947
10919
  case "end":
10948
- return _context74.stop();
10920
+ return _context73.stop();
10949
10921
  }
10950
10922
  }
10951
- }, _callee74, this);
10923
+ }, _callee73, this);
10952
10924
  }));
10953
10925
 
10954
- function _getImport(_x98) {
10926
+ function _getImport(_x97) {
10955
10927
  return _getImport2.apply(this, arguments);
10956
10928
  }
10957
10929
 
@@ -10973,26 +10945,26 @@ var StreamChat = /*#__PURE__*/function () {
10973
10945
  }, {
10974
10946
  key: "_listImports",
10975
10947
  value: function () {
10976
- var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(options) {
10977
- return _regeneratorRuntime.wrap(function _callee75$(_context75) {
10948
+ var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(options) {
10949
+ return _regeneratorRuntime.wrap(function _callee74$(_context74) {
10978
10950
  while (1) {
10979
- switch (_context75.prev = _context75.next) {
10951
+ switch (_context74.prev = _context74.next) {
10980
10952
  case 0:
10981
- _context75.next = 2;
10953
+ _context74.next = 2;
10982
10954
  return this.get(this.baseURL + "/imports", options);
10983
10955
 
10984
10956
  case 2:
10985
- return _context75.abrupt("return", _context75.sent);
10957
+ return _context74.abrupt("return", _context74.sent);
10986
10958
 
10987
10959
  case 3:
10988
10960
  case "end":
10989
- return _context75.stop();
10961
+ return _context74.stop();
10990
10962
  }
10991
10963
  }
10992
- }, _callee75, this);
10964
+ }, _callee74, this);
10993
10965
  }));
10994
10966
 
10995
- function _listImports(_x99) {
10967
+ function _listImports(_x98) {
10996
10968
  return _listImports2.apply(this, arguments);
10997
10969
  }
10998
10970
 
@@ -11011,28 +10983,28 @@ var StreamChat = /*#__PURE__*/function () {
11011
10983
  }, {
11012
10984
  key: "upsertPushProvider",
11013
10985
  value: function () {
11014
- var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(pushProvider) {
11015
- return _regeneratorRuntime.wrap(function _callee76$(_context76) {
10986
+ var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(pushProvider) {
10987
+ return _regeneratorRuntime.wrap(function _callee75$(_context75) {
11016
10988
  while (1) {
11017
- switch (_context76.prev = _context76.next) {
10989
+ switch (_context75.prev = _context75.next) {
11018
10990
  case 0:
11019
- _context76.next = 2;
10991
+ _context75.next = 2;
11020
10992
  return this.post(this.baseURL + "/push_providers", {
11021
10993
  push_provider: pushProvider
11022
10994
  });
11023
10995
 
11024
10996
  case 2:
11025
- return _context76.abrupt("return", _context76.sent);
10997
+ return _context75.abrupt("return", _context75.sent);
11026
10998
 
11027
10999
  case 3:
11028
11000
  case "end":
11029
- return _context76.stop();
11001
+ return _context75.stop();
11030
11002
  }
11031
11003
  }
11032
- }, _callee76, this);
11004
+ }, _callee75, this);
11033
11005
  }));
11034
11006
 
11035
- function upsertPushProvider(_x100) {
11007
+ function upsertPushProvider(_x99) {
11036
11008
  return _upsertPushProvider.apply(this, arguments);
11037
11009
  }
11038
11010
 
@@ -11051,28 +11023,28 @@ var StreamChat = /*#__PURE__*/function () {
11051
11023
  }, {
11052
11024
  key: "deletePushProvider",
11053
11025
  value: function () {
11054
- var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77(_ref8) {
11026
+ var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(_ref8) {
11055
11027
  var type, name;
11056
- return _regeneratorRuntime.wrap(function _callee77$(_context77) {
11028
+ return _regeneratorRuntime.wrap(function _callee76$(_context76) {
11057
11029
  while (1) {
11058
- switch (_context77.prev = _context77.next) {
11030
+ switch (_context76.prev = _context76.next) {
11059
11031
  case 0:
11060
11032
  type = _ref8.type, name = _ref8.name;
11061
- _context77.next = 3;
11033
+ _context76.next = 3;
11062
11034
  return this.delete(this.baseURL + "/push_providers/".concat(type, "/").concat(name));
11063
11035
 
11064
11036
  case 3:
11065
- return _context77.abrupt("return", _context77.sent);
11037
+ return _context76.abrupt("return", _context76.sent);
11066
11038
 
11067
11039
  case 4:
11068
11040
  case "end":
11069
- return _context77.stop();
11041
+ return _context76.stop();
11070
11042
  }
11071
11043
  }
11072
- }, _callee77, this);
11044
+ }, _callee76, this);
11073
11045
  }));
11074
11046
 
11075
- function deletePushProvider(_x101) {
11047
+ function deletePushProvider(_x100) {
11076
11048
  return _deletePushProvider.apply(this, arguments);
11077
11049
  }
11078
11050
 
@@ -11089,23 +11061,23 @@ var StreamChat = /*#__PURE__*/function () {
11089
11061
  }, {
11090
11062
  key: "listPushProviders",
11091
11063
  value: function () {
11092
- var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78() {
11093
- return _regeneratorRuntime.wrap(function _callee78$(_context78) {
11064
+ var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77() {
11065
+ return _regeneratorRuntime.wrap(function _callee77$(_context77) {
11094
11066
  while (1) {
11095
- switch (_context78.prev = _context78.next) {
11067
+ switch (_context77.prev = _context77.next) {
11096
11068
  case 0:
11097
- _context78.next = 2;
11069
+ _context77.next = 2;
11098
11070
  return this.get(this.baseURL + "/push_providers");
11099
11071
 
11100
11072
  case 2:
11101
- return _context78.abrupt("return", _context78.sent);
11073
+ return _context77.abrupt("return", _context77.sent);
11102
11074
 
11103
11075
  case 3:
11104
11076
  case "end":
11105
- return _context78.stop();
11077
+ return _context77.stop();
11106
11078
  }
11107
11079
  }
11108
- }, _callee78, this);
11080
+ }, _callee77, this);
11109
11081
  }));
11110
11082
 
11111
11083
  function listPushProviders() {