stream-chat 8.18.1 → 8.19.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.
@@ -6158,14 +6158,14 @@ var Campaign = /*#__PURE__*/function () {
6158
6158
  }, {
6159
6159
  key: "start",
6160
6160
  value: function () {
6161
- var _start = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(scheduledFor) {
6161
+ var _start = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(options) {
6162
6162
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
6163
6163
  while (1) {
6164
6164
  switch (_context2.prev = _context2.next) {
6165
6165
  case 0:
6166
6166
  this.verifyCampaignId();
6167
6167
  _context2.next = 3;
6168
- return this.client.startCampaign(this.id, scheduledFor);
6168
+ return this.client.startCampaign(this.id, options);
6169
6169
 
6170
6170
  case 3:
6171
6171
  return _context2.abrupt("return", _context2.sent);
@@ -6239,28 +6239,17 @@ var Campaign = /*#__PURE__*/function () {
6239
6239
  return _delete;
6240
6240
  }()
6241
6241
  }, {
6242
- key: "schedule",
6242
+ key: "stop",
6243
6243
  value: function () {
6244
- var _schedule = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(params) {
6245
- var scheduledFor, _yield$this$client$pa, campaign;
6246
-
6244
+ var _stop = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
6247
6245
  return _regeneratorRuntime.wrap(function _callee5$(_context5) {
6248
6246
  while (1) {
6249
6247
  switch (_context5.prev = _context5.next) {
6250
6248
  case 0:
6251
6249
  this.verifyCampaignId();
6252
- scheduledFor = params.scheduledFor;
6253
- _context5.next = 4;
6254
- return this.client.patch(this.client.baseURL + "/campaigns/".concat(this.id, "/schedule"), {
6255
- scheduled_for: scheduledFor
6256
- });
6257
-
6258
- case 4:
6259
- _yield$this$client$pa = _context5.sent;
6260
- campaign = _yield$this$client$pa.campaign;
6261
- return _context5.abrupt("return", campaign);
6250
+ return _context5.abrupt("return", this.client.patch(this.client.baseURL + "/campaigns/".concat(this.id, "/stop")));
6262
6251
 
6263
- case 7:
6252
+ case 2:
6264
6253
  case "end":
6265
6254
  return _context5.stop();
6266
6255
  }
@@ -6268,104 +6257,29 @@ var Campaign = /*#__PURE__*/function () {
6268
6257
  }, _callee5, this);
6269
6258
  }));
6270
6259
 
6271
- function schedule(_x3) {
6272
- return _schedule.apply(this, arguments);
6273
- }
6274
-
6275
- return schedule;
6276
- }()
6277
- }, {
6278
- key: "stop",
6279
- value: function () {
6280
- var _stop = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
6281
- return _regeneratorRuntime.wrap(function _callee6$(_context6) {
6282
- while (1) {
6283
- switch (_context6.prev = _context6.next) {
6284
- case 0:
6285
- this.verifyCampaignId();
6286
- return _context6.abrupt("return", this.client.patch(this.client.baseURL + "/campaigns/".concat(this.id, "/stop")));
6287
-
6288
- case 2:
6289
- case "end":
6290
- return _context6.stop();
6291
- }
6292
- }
6293
- }, _callee6, this);
6294
- }));
6295
-
6296
6260
  function stop() {
6297
6261
  return _stop.apply(this, arguments);
6298
6262
  }
6299
6263
 
6300
6264
  return stop;
6301
6265
  }()
6302
- }, {
6303
- key: "pause",
6304
- value: function () {
6305
- var _pause = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {
6306
- return _regeneratorRuntime.wrap(function _callee7$(_context7) {
6307
- while (1) {
6308
- switch (_context7.prev = _context7.next) {
6309
- case 0:
6310
- this.verifyCampaignId();
6311
- return _context7.abrupt("return", this.client.patch(this.client.baseURL + "/campaigns/".concat(this.id, "/pause")));
6312
-
6313
- case 2:
6314
- case "end":
6315
- return _context7.stop();
6316
- }
6317
- }
6318
- }, _callee7, this);
6319
- }));
6320
-
6321
- function pause() {
6322
- return _pause.apply(this, arguments);
6323
- }
6324
-
6325
- return pause;
6326
- }()
6327
- }, {
6328
- key: "resume",
6329
- value: function () {
6330
- var _resume = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
6331
- return _regeneratorRuntime.wrap(function _callee8$(_context8) {
6332
- while (1) {
6333
- switch (_context8.prev = _context8.next) {
6334
- case 0:
6335
- this.verifyCampaignId();
6336
- return _context8.abrupt("return", this.client.patch(this.client.baseURL + "/campaigns/".concat(this.id, "/resume")));
6337
-
6338
- case 2:
6339
- case "end":
6340
- return _context8.stop();
6341
- }
6342
- }
6343
- }, _callee8, this);
6344
- }));
6345
-
6346
- function resume() {
6347
- return _resume.apply(this, arguments);
6348
- }
6349
-
6350
- return resume;
6351
- }()
6352
6266
  }, {
6353
6267
  key: "get",
6354
6268
  value: function () {
6355
- var _get = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
6356
- return _regeneratorRuntime.wrap(function _callee9$(_context9) {
6269
+ var _get = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
6270
+ return _regeneratorRuntime.wrap(function _callee6$(_context6) {
6357
6271
  while (1) {
6358
- switch (_context9.prev = _context9.next) {
6272
+ switch (_context6.prev = _context6.next) {
6359
6273
  case 0:
6360
6274
  this.verifyCampaignId();
6361
- return _context9.abrupt("return", this.client.getCampaign(this.id));
6275
+ return _context6.abrupt("return", this.client.getCampaign(this.id));
6362
6276
 
6363
6277
  case 2:
6364
6278
  case "end":
6365
- return _context9.stop();
6279
+ return _context6.stop();
6366
6280
  }
6367
6281
  }
6368
- }, _callee9, this);
6282
+ }, _callee6, this);
6369
6283
  }));
6370
6284
 
6371
6285
  function get() {
@@ -11156,7 +11070,7 @@ var StreamChat = /*#__PURE__*/function () {
11156
11070
  }, {
11157
11071
  key: "getUserAgent",
11158
11072
  value: function getUserAgent() {
11159
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.18.1");
11073
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.19.0");
11160
11074
  }
11161
11075
  }, {
11162
11076
  key: "setUserAgent",
@@ -11930,14 +11844,15 @@ var StreamChat = /*#__PURE__*/function () {
11930
11844
  }, {
11931
11845
  key: "startCampaign",
11932
11846
  value: function () {
11933
- var _startCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(id, scheduledFor) {
11847
+ var _startCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(id, options) {
11934
11848
  return _regeneratorRuntime.wrap(function _callee76$(_context76) {
11935
11849
  while (1) {
11936
11850
  switch (_context76.prev = _context76.next) {
11937
11851
  case 0:
11938
11852
  this.validateServerSideAuth();
11939
11853
  return _context76.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(id, "/start"), {
11940
- scheduled_for: scheduledFor
11854
+ scheduled_for: options === null || options === void 0 ? void 0 : options.scheduledFor,
11855
+ stop_at: options === null || options === void 0 ? void 0 : options.stopAt
11941
11856
  }));
11942
11857
 
11943
11858
  case 2: