stream-chat 8.17.0 → 8.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.es.js +875 -382
- package/dist/browser.es.js.map +1 -1
- package/dist/browser.full-bundle.min.js +1 -1
- package/dist/browser.full-bundle.min.js.map +1 -1
- package/dist/browser.js +876 -381
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +875 -382
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +876 -381
- package/dist/index.js.map +1 -1
- package/dist/types/campaign.d.ts +35 -0
- package/dist/types/campaign.d.ts.map +1 -0
- package/dist/types/client.d.ts +44 -46
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/segment.d.ts +35 -0
- package/dist/types/segment.d.ts.map +1 -0
- package/dist/types/types.d.ts +40 -12
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/campaign.ts +97 -0
- package/src/client.ts +116 -89
- package/src/index.ts +2 -0
- package/src/segment.ts +89 -0
- package/src/types.ts +41 -12
package/dist/index.js
CHANGED
|
@@ -6118,6 +6118,544 @@ var WSConnectionFallback = /*#__PURE__*/function () {
|
|
|
6118
6118
|
return WSConnectionFallback;
|
|
6119
6119
|
}();
|
|
6120
6120
|
|
|
6121
|
+
var Campaign = /*#__PURE__*/function () {
|
|
6122
|
+
function Campaign(client, id, data) {
|
|
6123
|
+
_classCallCheck__default['default'](this, Campaign);
|
|
6124
|
+
|
|
6125
|
+
_defineProperty__default['default'](this, "id", void 0);
|
|
6126
|
+
|
|
6127
|
+
_defineProperty__default['default'](this, "data", void 0);
|
|
6128
|
+
|
|
6129
|
+
_defineProperty__default['default'](this, "client", void 0);
|
|
6130
|
+
|
|
6131
|
+
this.client = client;
|
|
6132
|
+
this.id = id;
|
|
6133
|
+
this.data = data;
|
|
6134
|
+
}
|
|
6135
|
+
|
|
6136
|
+
_createClass__default['default'](Campaign, [{
|
|
6137
|
+
key: "create",
|
|
6138
|
+
value: function () {
|
|
6139
|
+
var _create = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee() {
|
|
6140
|
+
var _this$data, _this$data2, _this$data3, _this$data4, _this$data5, _this$data6, _this$data7, _this$data8;
|
|
6141
|
+
|
|
6142
|
+
var body, result;
|
|
6143
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee$(_context) {
|
|
6144
|
+
while (1) {
|
|
6145
|
+
switch (_context.prev = _context.next) {
|
|
6146
|
+
case 0:
|
|
6147
|
+
body = {
|
|
6148
|
+
id: this.id,
|
|
6149
|
+
message_template: (_this$data = this.data) === null || _this$data === void 0 ? void 0 : _this$data.message_template,
|
|
6150
|
+
segment_ids: (_this$data2 = this.data) === null || _this$data2 === void 0 ? void 0 : _this$data2.segment_ids,
|
|
6151
|
+
sender_id: (_this$data3 = this.data) === null || _this$data3 === void 0 ? void 0 : _this$data3.sender_id,
|
|
6152
|
+
channel_template: (_this$data4 = this.data) === null || _this$data4 === void 0 ? void 0 : _this$data4.channel_template,
|
|
6153
|
+
create_channels: (_this$data5 = this.data) === null || _this$data5 === void 0 ? void 0 : _this$data5.create_channels,
|
|
6154
|
+
description: (_this$data6 = this.data) === null || _this$data6 === void 0 ? void 0 : _this$data6.description,
|
|
6155
|
+
name: (_this$data7 = this.data) === null || _this$data7 === void 0 ? void 0 : _this$data7.name,
|
|
6156
|
+
user_ids: (_this$data8 = this.data) === null || _this$data8 === void 0 ? void 0 : _this$data8.user_ids
|
|
6157
|
+
};
|
|
6158
|
+
_context.next = 3;
|
|
6159
|
+
return this.client.createCampaign(body);
|
|
6160
|
+
|
|
6161
|
+
case 3:
|
|
6162
|
+
result = _context.sent;
|
|
6163
|
+
this.id = result.campaign.id;
|
|
6164
|
+
this.data = result.campaign;
|
|
6165
|
+
return _context.abrupt("return", result);
|
|
6166
|
+
|
|
6167
|
+
case 7:
|
|
6168
|
+
case "end":
|
|
6169
|
+
return _context.stop();
|
|
6170
|
+
}
|
|
6171
|
+
}
|
|
6172
|
+
}, _callee, this);
|
|
6173
|
+
}));
|
|
6174
|
+
|
|
6175
|
+
function create() {
|
|
6176
|
+
return _create.apply(this, arguments);
|
|
6177
|
+
}
|
|
6178
|
+
|
|
6179
|
+
return create;
|
|
6180
|
+
}()
|
|
6181
|
+
}, {
|
|
6182
|
+
key: "verifyCampaignId",
|
|
6183
|
+
value: function verifyCampaignId() {
|
|
6184
|
+
if (!this.id) {
|
|
6185
|
+
throw new Error('Campaign id is missing. Either create the campaign using campaign.create() or set the id during instantiation - const campaign = client.campaign(id)');
|
|
6186
|
+
}
|
|
6187
|
+
}
|
|
6188
|
+
}, {
|
|
6189
|
+
key: "start",
|
|
6190
|
+
value: function () {
|
|
6191
|
+
var _start = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee2(scheduledFor) {
|
|
6192
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee2$(_context2) {
|
|
6193
|
+
while (1) {
|
|
6194
|
+
switch (_context2.prev = _context2.next) {
|
|
6195
|
+
case 0:
|
|
6196
|
+
this.verifyCampaignId();
|
|
6197
|
+
_context2.next = 3;
|
|
6198
|
+
return this.client.startCampaign(this.id, scheduledFor);
|
|
6199
|
+
|
|
6200
|
+
case 3:
|
|
6201
|
+
return _context2.abrupt("return", _context2.sent);
|
|
6202
|
+
|
|
6203
|
+
case 4:
|
|
6204
|
+
case "end":
|
|
6205
|
+
return _context2.stop();
|
|
6206
|
+
}
|
|
6207
|
+
}
|
|
6208
|
+
}, _callee2, this);
|
|
6209
|
+
}));
|
|
6210
|
+
|
|
6211
|
+
function start(_x) {
|
|
6212
|
+
return _start.apply(this, arguments);
|
|
6213
|
+
}
|
|
6214
|
+
|
|
6215
|
+
return start;
|
|
6216
|
+
}()
|
|
6217
|
+
}, {
|
|
6218
|
+
key: "update",
|
|
6219
|
+
value: function () {
|
|
6220
|
+
var _update = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee3(data) {
|
|
6221
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee3$(_context3) {
|
|
6222
|
+
while (1) {
|
|
6223
|
+
switch (_context3.prev = _context3.next) {
|
|
6224
|
+
case 0:
|
|
6225
|
+
this.verifyCampaignId();
|
|
6226
|
+
return _context3.abrupt("return", this.client.updateCampaign(this.id, data));
|
|
6227
|
+
|
|
6228
|
+
case 2:
|
|
6229
|
+
case "end":
|
|
6230
|
+
return _context3.stop();
|
|
6231
|
+
}
|
|
6232
|
+
}
|
|
6233
|
+
}, _callee3, this);
|
|
6234
|
+
}));
|
|
6235
|
+
|
|
6236
|
+
function update(_x2) {
|
|
6237
|
+
return _update.apply(this, arguments);
|
|
6238
|
+
}
|
|
6239
|
+
|
|
6240
|
+
return update;
|
|
6241
|
+
}()
|
|
6242
|
+
}, {
|
|
6243
|
+
key: "delete",
|
|
6244
|
+
value: function () {
|
|
6245
|
+
var _delete2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee4() {
|
|
6246
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee4$(_context4) {
|
|
6247
|
+
while (1) {
|
|
6248
|
+
switch (_context4.prev = _context4.next) {
|
|
6249
|
+
case 0:
|
|
6250
|
+
this.verifyCampaignId();
|
|
6251
|
+
_context4.next = 3;
|
|
6252
|
+
return this.client.delete(this.client.baseURL + "/campaigns/".concat(this.id));
|
|
6253
|
+
|
|
6254
|
+
case 3:
|
|
6255
|
+
return _context4.abrupt("return", _context4.sent);
|
|
6256
|
+
|
|
6257
|
+
case 4:
|
|
6258
|
+
case "end":
|
|
6259
|
+
return _context4.stop();
|
|
6260
|
+
}
|
|
6261
|
+
}
|
|
6262
|
+
}, _callee4, this);
|
|
6263
|
+
}));
|
|
6264
|
+
|
|
6265
|
+
function _delete() {
|
|
6266
|
+
return _delete2.apply(this, arguments);
|
|
6267
|
+
}
|
|
6268
|
+
|
|
6269
|
+
return _delete;
|
|
6270
|
+
}()
|
|
6271
|
+
}, {
|
|
6272
|
+
key: "schedule",
|
|
6273
|
+
value: function () {
|
|
6274
|
+
var _schedule = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee5(params) {
|
|
6275
|
+
var scheduledFor, _yield$this$client$pa, campaign;
|
|
6276
|
+
|
|
6277
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee5$(_context5) {
|
|
6278
|
+
while (1) {
|
|
6279
|
+
switch (_context5.prev = _context5.next) {
|
|
6280
|
+
case 0:
|
|
6281
|
+
this.verifyCampaignId();
|
|
6282
|
+
scheduledFor = params.scheduledFor;
|
|
6283
|
+
_context5.next = 4;
|
|
6284
|
+
return this.client.patch(this.client.baseURL + "/campaigns/".concat(this.id, "/schedule"), {
|
|
6285
|
+
scheduled_for: scheduledFor
|
|
6286
|
+
});
|
|
6287
|
+
|
|
6288
|
+
case 4:
|
|
6289
|
+
_yield$this$client$pa = _context5.sent;
|
|
6290
|
+
campaign = _yield$this$client$pa.campaign;
|
|
6291
|
+
return _context5.abrupt("return", campaign);
|
|
6292
|
+
|
|
6293
|
+
case 7:
|
|
6294
|
+
case "end":
|
|
6295
|
+
return _context5.stop();
|
|
6296
|
+
}
|
|
6297
|
+
}
|
|
6298
|
+
}, _callee5, this);
|
|
6299
|
+
}));
|
|
6300
|
+
|
|
6301
|
+
function schedule(_x3) {
|
|
6302
|
+
return _schedule.apply(this, arguments);
|
|
6303
|
+
}
|
|
6304
|
+
|
|
6305
|
+
return schedule;
|
|
6306
|
+
}()
|
|
6307
|
+
}, {
|
|
6308
|
+
key: "stop",
|
|
6309
|
+
value: function () {
|
|
6310
|
+
var _stop = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee6() {
|
|
6311
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee6$(_context6) {
|
|
6312
|
+
while (1) {
|
|
6313
|
+
switch (_context6.prev = _context6.next) {
|
|
6314
|
+
case 0:
|
|
6315
|
+
this.verifyCampaignId();
|
|
6316
|
+
return _context6.abrupt("return", this.client.patch(this.client.baseURL + "/campaigns/".concat(this.id, "/stop")));
|
|
6317
|
+
|
|
6318
|
+
case 2:
|
|
6319
|
+
case "end":
|
|
6320
|
+
return _context6.stop();
|
|
6321
|
+
}
|
|
6322
|
+
}
|
|
6323
|
+
}, _callee6, this);
|
|
6324
|
+
}));
|
|
6325
|
+
|
|
6326
|
+
function stop() {
|
|
6327
|
+
return _stop.apply(this, arguments);
|
|
6328
|
+
}
|
|
6329
|
+
|
|
6330
|
+
return stop;
|
|
6331
|
+
}()
|
|
6332
|
+
}, {
|
|
6333
|
+
key: "pause",
|
|
6334
|
+
value: function () {
|
|
6335
|
+
var _pause = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee7() {
|
|
6336
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee7$(_context7) {
|
|
6337
|
+
while (1) {
|
|
6338
|
+
switch (_context7.prev = _context7.next) {
|
|
6339
|
+
case 0:
|
|
6340
|
+
this.verifyCampaignId();
|
|
6341
|
+
return _context7.abrupt("return", this.client.patch(this.client.baseURL + "/campaigns/".concat(this.id, "/pause")));
|
|
6342
|
+
|
|
6343
|
+
case 2:
|
|
6344
|
+
case "end":
|
|
6345
|
+
return _context7.stop();
|
|
6346
|
+
}
|
|
6347
|
+
}
|
|
6348
|
+
}, _callee7, this);
|
|
6349
|
+
}));
|
|
6350
|
+
|
|
6351
|
+
function pause() {
|
|
6352
|
+
return _pause.apply(this, arguments);
|
|
6353
|
+
}
|
|
6354
|
+
|
|
6355
|
+
return pause;
|
|
6356
|
+
}()
|
|
6357
|
+
}, {
|
|
6358
|
+
key: "resume",
|
|
6359
|
+
value: function () {
|
|
6360
|
+
var _resume = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee8() {
|
|
6361
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee8$(_context8) {
|
|
6362
|
+
while (1) {
|
|
6363
|
+
switch (_context8.prev = _context8.next) {
|
|
6364
|
+
case 0:
|
|
6365
|
+
this.verifyCampaignId();
|
|
6366
|
+
return _context8.abrupt("return", this.client.patch(this.client.baseURL + "/campaigns/".concat(this.id, "/resume")));
|
|
6367
|
+
|
|
6368
|
+
case 2:
|
|
6369
|
+
case "end":
|
|
6370
|
+
return _context8.stop();
|
|
6371
|
+
}
|
|
6372
|
+
}
|
|
6373
|
+
}, _callee8, this);
|
|
6374
|
+
}));
|
|
6375
|
+
|
|
6376
|
+
function resume() {
|
|
6377
|
+
return _resume.apply(this, arguments);
|
|
6378
|
+
}
|
|
6379
|
+
|
|
6380
|
+
return resume;
|
|
6381
|
+
}()
|
|
6382
|
+
}, {
|
|
6383
|
+
key: "get",
|
|
6384
|
+
value: function () {
|
|
6385
|
+
var _get = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee9() {
|
|
6386
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee9$(_context9) {
|
|
6387
|
+
while (1) {
|
|
6388
|
+
switch (_context9.prev = _context9.next) {
|
|
6389
|
+
case 0:
|
|
6390
|
+
this.verifyCampaignId();
|
|
6391
|
+
return _context9.abrupt("return", this.client.getCampaign(this.id));
|
|
6392
|
+
|
|
6393
|
+
case 2:
|
|
6394
|
+
case "end":
|
|
6395
|
+
return _context9.stop();
|
|
6396
|
+
}
|
|
6397
|
+
}
|
|
6398
|
+
}, _callee9, this);
|
|
6399
|
+
}));
|
|
6400
|
+
|
|
6401
|
+
function get() {
|
|
6402
|
+
return _get.apply(this, arguments);
|
|
6403
|
+
}
|
|
6404
|
+
|
|
6405
|
+
return get;
|
|
6406
|
+
}()
|
|
6407
|
+
}]);
|
|
6408
|
+
|
|
6409
|
+
return Campaign;
|
|
6410
|
+
}();
|
|
6411
|
+
|
|
6412
|
+
var Segment = /*#__PURE__*/function () {
|
|
6413
|
+
function Segment(client, type, id, data) {
|
|
6414
|
+
_classCallCheck__default['default'](this, Segment);
|
|
6415
|
+
|
|
6416
|
+
_defineProperty__default['default'](this, "type", void 0);
|
|
6417
|
+
|
|
6418
|
+
_defineProperty__default['default'](this, "id", void 0);
|
|
6419
|
+
|
|
6420
|
+
_defineProperty__default['default'](this, "client", void 0);
|
|
6421
|
+
|
|
6422
|
+
_defineProperty__default['default'](this, "data", void 0);
|
|
6423
|
+
|
|
6424
|
+
this.client = client;
|
|
6425
|
+
this.type = type;
|
|
6426
|
+
this.id = id;
|
|
6427
|
+
this.data = data;
|
|
6428
|
+
}
|
|
6429
|
+
|
|
6430
|
+
_createClass__default['default'](Segment, [{
|
|
6431
|
+
key: "create",
|
|
6432
|
+
value: function () {
|
|
6433
|
+
var _create = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee() {
|
|
6434
|
+
var _this$data, _this$data2, _this$data3, _this$data4;
|
|
6435
|
+
|
|
6436
|
+
var body;
|
|
6437
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee$(_context) {
|
|
6438
|
+
while (1) {
|
|
6439
|
+
switch (_context.prev = _context.next) {
|
|
6440
|
+
case 0:
|
|
6441
|
+
body = {
|
|
6442
|
+
id: this.id,
|
|
6443
|
+
type: this.type,
|
|
6444
|
+
name: (_this$data = this.data) === null || _this$data === void 0 ? void 0 : _this$data.name,
|
|
6445
|
+
filter: (_this$data2 = this.data) === null || _this$data2 === void 0 ? void 0 : _this$data2.filter,
|
|
6446
|
+
description: (_this$data3 = this.data) === null || _this$data3 === void 0 ? void 0 : _this$data3.description,
|
|
6447
|
+
all_users: (_this$data4 = this.data) === null || _this$data4 === void 0 ? void 0 : _this$data4.all_users
|
|
6448
|
+
};
|
|
6449
|
+
return _context.abrupt("return", this.client.post(this.client.baseURL + "/segments", body));
|
|
6450
|
+
|
|
6451
|
+
case 2:
|
|
6452
|
+
case "end":
|
|
6453
|
+
return _context.stop();
|
|
6454
|
+
}
|
|
6455
|
+
}
|
|
6456
|
+
}, _callee, this);
|
|
6457
|
+
}));
|
|
6458
|
+
|
|
6459
|
+
function create() {
|
|
6460
|
+
return _create.apply(this, arguments);
|
|
6461
|
+
}
|
|
6462
|
+
|
|
6463
|
+
return create;
|
|
6464
|
+
}()
|
|
6465
|
+
}, {
|
|
6466
|
+
key: "verifySegmentId",
|
|
6467
|
+
value: function verifySegmentId() {
|
|
6468
|
+
if (!this.id) {
|
|
6469
|
+
throw new Error('Segment id is missing. Either create the segment using segment.create() or set the id during instantiation - const segment = client.segment(id)');
|
|
6470
|
+
}
|
|
6471
|
+
}
|
|
6472
|
+
}, {
|
|
6473
|
+
key: "get",
|
|
6474
|
+
value: function () {
|
|
6475
|
+
var _get = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee2() {
|
|
6476
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee2$(_context2) {
|
|
6477
|
+
while (1) {
|
|
6478
|
+
switch (_context2.prev = _context2.next) {
|
|
6479
|
+
case 0:
|
|
6480
|
+
this.verifySegmentId();
|
|
6481
|
+
return _context2.abrupt("return", this.client.getSegment(this.id));
|
|
6482
|
+
|
|
6483
|
+
case 2:
|
|
6484
|
+
case "end":
|
|
6485
|
+
return _context2.stop();
|
|
6486
|
+
}
|
|
6487
|
+
}
|
|
6488
|
+
}, _callee2, this);
|
|
6489
|
+
}));
|
|
6490
|
+
|
|
6491
|
+
function get() {
|
|
6492
|
+
return _get.apply(this, arguments);
|
|
6493
|
+
}
|
|
6494
|
+
|
|
6495
|
+
return get;
|
|
6496
|
+
}()
|
|
6497
|
+
}, {
|
|
6498
|
+
key: "update",
|
|
6499
|
+
value: function () {
|
|
6500
|
+
var _update = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee3(data) {
|
|
6501
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee3$(_context3) {
|
|
6502
|
+
while (1) {
|
|
6503
|
+
switch (_context3.prev = _context3.next) {
|
|
6504
|
+
case 0:
|
|
6505
|
+
this.verifySegmentId();
|
|
6506
|
+
return _context3.abrupt("return", this.client.updateSegment(this.id, data));
|
|
6507
|
+
|
|
6508
|
+
case 2:
|
|
6509
|
+
case "end":
|
|
6510
|
+
return _context3.stop();
|
|
6511
|
+
}
|
|
6512
|
+
}
|
|
6513
|
+
}, _callee3, this);
|
|
6514
|
+
}));
|
|
6515
|
+
|
|
6516
|
+
function update(_x) {
|
|
6517
|
+
return _update.apply(this, arguments);
|
|
6518
|
+
}
|
|
6519
|
+
|
|
6520
|
+
return update;
|
|
6521
|
+
}()
|
|
6522
|
+
}, {
|
|
6523
|
+
key: "addTargets",
|
|
6524
|
+
value: function () {
|
|
6525
|
+
var _addTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee4(targets) {
|
|
6526
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee4$(_context4) {
|
|
6527
|
+
while (1) {
|
|
6528
|
+
switch (_context4.prev = _context4.next) {
|
|
6529
|
+
case 0:
|
|
6530
|
+
this.verifySegmentId();
|
|
6531
|
+
return _context4.abrupt("return", this.client.addSegmentTargets(this.id, targets));
|
|
6532
|
+
|
|
6533
|
+
case 2:
|
|
6534
|
+
case "end":
|
|
6535
|
+
return _context4.stop();
|
|
6536
|
+
}
|
|
6537
|
+
}
|
|
6538
|
+
}, _callee4, this);
|
|
6539
|
+
}));
|
|
6540
|
+
|
|
6541
|
+
function addTargets(_x2) {
|
|
6542
|
+
return _addTargets.apply(this, arguments);
|
|
6543
|
+
}
|
|
6544
|
+
|
|
6545
|
+
return addTargets;
|
|
6546
|
+
}()
|
|
6547
|
+
}, {
|
|
6548
|
+
key: "removeTargets",
|
|
6549
|
+
value: function () {
|
|
6550
|
+
var _removeTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee5(targets) {
|
|
6551
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee5$(_context5) {
|
|
6552
|
+
while (1) {
|
|
6553
|
+
switch (_context5.prev = _context5.next) {
|
|
6554
|
+
case 0:
|
|
6555
|
+
this.verifySegmentId();
|
|
6556
|
+
return _context5.abrupt("return", this.client.removeSegmentTargets(this.id, targets));
|
|
6557
|
+
|
|
6558
|
+
case 2:
|
|
6559
|
+
case "end":
|
|
6560
|
+
return _context5.stop();
|
|
6561
|
+
}
|
|
6562
|
+
}
|
|
6563
|
+
}, _callee5, this);
|
|
6564
|
+
}));
|
|
6565
|
+
|
|
6566
|
+
function removeTargets(_x3) {
|
|
6567
|
+
return _removeTargets.apply(this, arguments);
|
|
6568
|
+
}
|
|
6569
|
+
|
|
6570
|
+
return removeTargets;
|
|
6571
|
+
}()
|
|
6572
|
+
}, {
|
|
6573
|
+
key: "delete",
|
|
6574
|
+
value: function () {
|
|
6575
|
+
var _delete2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee6() {
|
|
6576
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee6$(_context6) {
|
|
6577
|
+
while (1) {
|
|
6578
|
+
switch (_context6.prev = _context6.next) {
|
|
6579
|
+
case 0:
|
|
6580
|
+
this.verifySegmentId();
|
|
6581
|
+
return _context6.abrupt("return", this.client.deleteSegment(this.id));
|
|
6582
|
+
|
|
6583
|
+
case 2:
|
|
6584
|
+
case "end":
|
|
6585
|
+
return _context6.stop();
|
|
6586
|
+
}
|
|
6587
|
+
}
|
|
6588
|
+
}, _callee6, this);
|
|
6589
|
+
}));
|
|
6590
|
+
|
|
6591
|
+
function _delete() {
|
|
6592
|
+
return _delete2.apply(this, arguments);
|
|
6593
|
+
}
|
|
6594
|
+
|
|
6595
|
+
return _delete;
|
|
6596
|
+
}()
|
|
6597
|
+
}, {
|
|
6598
|
+
key: "targetExists",
|
|
6599
|
+
value: function () {
|
|
6600
|
+
var _targetExists = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee7(targetId) {
|
|
6601
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee7$(_context7) {
|
|
6602
|
+
while (1) {
|
|
6603
|
+
switch (_context7.prev = _context7.next) {
|
|
6604
|
+
case 0:
|
|
6605
|
+
this.verifySegmentId();
|
|
6606
|
+
return _context7.abrupt("return", this.client.segmentTargetExists(this.id, targetId));
|
|
6607
|
+
|
|
6608
|
+
case 2:
|
|
6609
|
+
case "end":
|
|
6610
|
+
return _context7.stop();
|
|
6611
|
+
}
|
|
6612
|
+
}
|
|
6613
|
+
}, _callee7, this);
|
|
6614
|
+
}));
|
|
6615
|
+
|
|
6616
|
+
function targetExists(_x4) {
|
|
6617
|
+
return _targetExists.apply(this, arguments);
|
|
6618
|
+
}
|
|
6619
|
+
|
|
6620
|
+
return targetExists;
|
|
6621
|
+
}()
|
|
6622
|
+
}, {
|
|
6623
|
+
key: "queryTargets",
|
|
6624
|
+
value: function () {
|
|
6625
|
+
var _queryTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee8() {
|
|
6626
|
+
var filter,
|
|
6627
|
+
sort,
|
|
6628
|
+
options,
|
|
6629
|
+
_args8 = arguments;
|
|
6630
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee8$(_context8) {
|
|
6631
|
+
while (1) {
|
|
6632
|
+
switch (_context8.prev = _context8.next) {
|
|
6633
|
+
case 0:
|
|
6634
|
+
filter = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
|
|
6635
|
+
sort = _args8.length > 1 && _args8[1] !== undefined ? _args8[1] : [];
|
|
6636
|
+
options = _args8.length > 2 && _args8[2] !== undefined ? _args8[2] : {};
|
|
6637
|
+
this.verifySegmentId();
|
|
6638
|
+
return _context8.abrupt("return", this.client.querySegmentTargets(this.id, filter, sort, options));
|
|
6639
|
+
|
|
6640
|
+
case 5:
|
|
6641
|
+
case "end":
|
|
6642
|
+
return _context8.stop();
|
|
6643
|
+
}
|
|
6644
|
+
}
|
|
6645
|
+
}, _callee8, this);
|
|
6646
|
+
}));
|
|
6647
|
+
|
|
6648
|
+
function queryTargets() {
|
|
6649
|
+
return _queryTargets.apply(this, arguments);
|
|
6650
|
+
}
|
|
6651
|
+
|
|
6652
|
+
return queryTargets;
|
|
6653
|
+
}()
|
|
6654
|
+
}]);
|
|
6655
|
+
|
|
6656
|
+
return Segment;
|
|
6657
|
+
}();
|
|
6658
|
+
|
|
6121
6659
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
|
|
6122
6660
|
|
|
6123
6661
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
@@ -10635,7 +11173,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10635
11173
|
}, {
|
|
10636
11174
|
key: "getUserAgent",
|
|
10637
11175
|
value: function getUserAgent() {
|
|
10638
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.
|
|
11176
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.18.0");
|
|
10639
11177
|
}
|
|
10640
11178
|
}, {
|
|
10641
11179
|
key: "setUserAgent",
|
|
@@ -10932,6 +11470,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10932
11470
|
value: function getExportChannelStatus(id) {
|
|
10933
11471
|
return this.get("".concat(this.baseURL, "/export_channels/").concat(id));
|
|
10934
11472
|
}
|
|
11473
|
+
}, {
|
|
11474
|
+
key: "campaign",
|
|
11475
|
+
value: function campaign(idOrData, data) {
|
|
11476
|
+
if (typeof idOrData === 'string') {
|
|
11477
|
+
return new Campaign(this, idOrData, data);
|
|
11478
|
+
}
|
|
11479
|
+
|
|
11480
|
+
return new Campaign(this, null, idOrData);
|
|
11481
|
+
}
|
|
11482
|
+
}, {
|
|
11483
|
+
key: "segment",
|
|
11484
|
+
value: function segment(type, idOrData, data) {
|
|
11485
|
+
if (typeof idOrData === 'string') {
|
|
11486
|
+
return new Segment(this, type, idOrData, data);
|
|
11487
|
+
}
|
|
11488
|
+
|
|
11489
|
+
return new Segment(this, type, null, idOrData);
|
|
11490
|
+
}
|
|
11491
|
+
}, {
|
|
11492
|
+
key: "validateServerSideAuth",
|
|
11493
|
+
value: function validateServerSideAuth() {
|
|
11494
|
+
if (!this.secret) {
|
|
11495
|
+
throw new Error('Campaigns is a server-side only feature. Please initialize the client with a secret to use this feature.');
|
|
11496
|
+
}
|
|
11497
|
+
}
|
|
10935
11498
|
/**
|
|
10936
11499
|
* createSegment - Creates a segment
|
|
10937
11500
|
*
|
|
@@ -10941,34 +11504,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10941
11504
|
* @param {string} name Segment name (valid UUID)
|
|
10942
11505
|
* @param {SegmentData} params Segment data
|
|
10943
11506
|
*
|
|
10944
|
-
* @return {
|
|
11507
|
+
* @return {{segment: SegmentResponse} & APIResponse} The created Segment
|
|
10945
11508
|
*/
|
|
10946
11509
|
|
|
10947
11510
|
}, {
|
|
10948
11511
|
key: "createSegment",
|
|
10949
11512
|
value: function () {
|
|
10950
11513
|
var _createSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee63(type, id, name, data) {
|
|
10951
|
-
var body
|
|
10952
|
-
|
|
11514
|
+
var body;
|
|
10953
11515
|
return _regeneratorRuntime__default['default'].wrap(function _callee63$(_context63) {
|
|
10954
11516
|
while (1) {
|
|
10955
11517
|
switch (_context63.prev = _context63.next) {
|
|
10956
11518
|
case 0:
|
|
11519
|
+
this.validateServerSideAuth();
|
|
10957
11520
|
body = {
|
|
10958
11521
|
id: id,
|
|
10959
11522
|
type: type,
|
|
10960
11523
|
name: name,
|
|
10961
11524
|
data: data
|
|
10962
11525
|
};
|
|
10963
|
-
_context63.
|
|
10964
|
-
return this.post(this.baseURL + "/segments", body);
|
|
11526
|
+
return _context63.abrupt("return", this.post(this.baseURL + "/segments", body));
|
|
10965
11527
|
|
|
10966
11528
|
case 3:
|
|
10967
|
-
_yield$this$post = _context63.sent;
|
|
10968
|
-
segment = _yield$this$post.segment;
|
|
10969
|
-
return _context63.abrupt("return", segment);
|
|
10970
|
-
|
|
10971
|
-
case 6:
|
|
10972
11529
|
case "end":
|
|
10973
11530
|
return _context63.stop();
|
|
10974
11531
|
}
|
|
@@ -11000,13 +11557,10 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11000
11557
|
while (1) {
|
|
11001
11558
|
switch (_context64.prev = _context64.next) {
|
|
11002
11559
|
case 0:
|
|
11003
|
-
|
|
11004
|
-
return this.createSegment('user', id, name, data);
|
|
11560
|
+
this.validateServerSideAuth();
|
|
11561
|
+
return _context64.abrupt("return", this.createSegment('user', id, name, data));
|
|
11005
11562
|
|
|
11006
11563
|
case 2:
|
|
11007
|
-
return _context64.abrupt("return", _context64.sent);
|
|
11008
|
-
|
|
11009
|
-
case 3:
|
|
11010
11564
|
case "end":
|
|
11011
11565
|
return _context64.stop();
|
|
11012
11566
|
}
|
|
@@ -11038,13 +11592,10 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11038
11592
|
while (1) {
|
|
11039
11593
|
switch (_context65.prev = _context65.next) {
|
|
11040
11594
|
case 0:
|
|
11041
|
-
|
|
11042
|
-
return this.createSegment('channel', id, name, data);
|
|
11595
|
+
this.validateServerSideAuth();
|
|
11596
|
+
return _context65.abrupt("return", this.createSegment('channel', id, name, data));
|
|
11043
11597
|
|
|
11044
11598
|
case 2:
|
|
11045
|
-
return _context65.abrupt("return", _context65.sent);
|
|
11046
|
-
|
|
11047
|
-
case 3:
|
|
11048
11599
|
case "end":
|
|
11049
11600
|
return _context65.stop();
|
|
11050
11601
|
}
|
|
@@ -11058,34 +11609,18 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11058
11609
|
|
|
11059
11610
|
return createChannelSegment;
|
|
11060
11611
|
}()
|
|
11061
|
-
/**
|
|
11062
|
-
* updateSegment - Update a segment
|
|
11063
|
-
*
|
|
11064
|
-
* @param {string} id Segment ID
|
|
11065
|
-
* @param {Partial<UpdateSegmentData>} data Data to update
|
|
11066
|
-
*
|
|
11067
|
-
* @return {Segment} Updated Segment
|
|
11068
|
-
*/
|
|
11069
|
-
|
|
11070
11612
|
}, {
|
|
11071
|
-
key: "
|
|
11613
|
+
key: "getSegment",
|
|
11072
11614
|
value: function () {
|
|
11073
|
-
var
|
|
11074
|
-
var _yield$this$put, segment;
|
|
11075
|
-
|
|
11615
|
+
var _getSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee66(id) {
|
|
11076
11616
|
return _regeneratorRuntime__default['default'].wrap(function _callee66$(_context66) {
|
|
11077
11617
|
while (1) {
|
|
11078
11618
|
switch (_context66.prev = _context66.next) {
|
|
11079
11619
|
case 0:
|
|
11080
|
-
|
|
11081
|
-
return this.
|
|
11620
|
+
this.validateServerSideAuth();
|
|
11621
|
+
return _context66.abrupt("return", this.get(this.baseURL + "/segments/".concat(id)));
|
|
11082
11622
|
|
|
11083
11623
|
case 2:
|
|
11084
|
-
_yield$this$put = _context66.sent;
|
|
11085
|
-
segment = _yield$this$put.segment;
|
|
11086
|
-
return _context66.abrupt("return", segment);
|
|
11087
|
-
|
|
11088
|
-
case 5:
|
|
11089
11624
|
case "end":
|
|
11090
11625
|
return _context66.stop();
|
|
11091
11626
|
}
|
|
@@ -11093,40 +11628,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11093
11628
|
}, _callee66, this);
|
|
11094
11629
|
}));
|
|
11095
11630
|
|
|
11096
|
-
function
|
|
11097
|
-
return
|
|
11631
|
+
function getSegment(_x94) {
|
|
11632
|
+
return _getSegment.apply(this, arguments);
|
|
11098
11633
|
}
|
|
11099
11634
|
|
|
11100
|
-
return
|
|
11635
|
+
return getSegment;
|
|
11101
11636
|
}()
|
|
11102
11637
|
/**
|
|
11103
|
-
*
|
|
11638
|
+
* updateSegment - Update a segment
|
|
11104
11639
|
*
|
|
11105
11640
|
* @param {string} id Segment ID
|
|
11106
|
-
* @param {
|
|
11641
|
+
* @param {Partial<UpdateSegmentData>} data Data to update
|
|
11107
11642
|
*
|
|
11108
|
-
* @return {
|
|
11643
|
+
* @return {Segment} Updated Segment
|
|
11109
11644
|
*/
|
|
11110
11645
|
|
|
11111
11646
|
}, {
|
|
11112
|
-
key: "
|
|
11647
|
+
key: "updateSegment",
|
|
11113
11648
|
value: function () {
|
|
11114
|
-
var
|
|
11115
|
-
var body;
|
|
11649
|
+
var _updateSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee67(id, data) {
|
|
11116
11650
|
return _regeneratorRuntime__default['default'].wrap(function _callee67$(_context67) {
|
|
11117
11651
|
while (1) {
|
|
11118
11652
|
switch (_context67.prev = _context67.next) {
|
|
11119
11653
|
case 0:
|
|
11120
|
-
|
|
11121
|
-
|
|
11122
|
-
};
|
|
11123
|
-
_context67.next = 3;
|
|
11124
|
-
return this.post(this.baseURL + "/segments/".concat(id, "/addtargets"), body);
|
|
11125
|
-
|
|
11126
|
-
case 3:
|
|
11127
|
-
return _context67.abrupt("return", _context67.sent);
|
|
11654
|
+
this.validateServerSideAuth();
|
|
11655
|
+
return _context67.abrupt("return", this.put(this.baseURL + "/segments/".concat(id), data));
|
|
11128
11656
|
|
|
11129
|
-
case
|
|
11657
|
+
case 2:
|
|
11130
11658
|
case "end":
|
|
11131
11659
|
return _context67.stop();
|
|
11132
11660
|
}
|
|
@@ -11134,14 +11662,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11134
11662
|
}, _callee67, this);
|
|
11135
11663
|
}));
|
|
11136
11664
|
|
|
11137
|
-
function
|
|
11138
|
-
return
|
|
11665
|
+
function updateSegment(_x95, _x96) {
|
|
11666
|
+
return _updateSegment.apply(this, arguments);
|
|
11139
11667
|
}
|
|
11140
11668
|
|
|
11141
|
-
return
|
|
11669
|
+
return updateSegment;
|
|
11142
11670
|
}()
|
|
11143
11671
|
/**
|
|
11144
|
-
*
|
|
11672
|
+
* addSegmentTargets - Add targets to a segment
|
|
11145
11673
|
*
|
|
11146
11674
|
* @param {string} id Segment ID
|
|
11147
11675
|
* @param {string[]} targets Targets to add to the segment
|
|
@@ -11150,24 +11678,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11150
11678
|
*/
|
|
11151
11679
|
|
|
11152
11680
|
}, {
|
|
11153
|
-
key: "
|
|
11681
|
+
key: "addSegmentTargets",
|
|
11154
11682
|
value: function () {
|
|
11155
|
-
var
|
|
11683
|
+
var _addSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee68(id, targets) {
|
|
11156
11684
|
var body;
|
|
11157
11685
|
return _regeneratorRuntime__default['default'].wrap(function _callee68$(_context68) {
|
|
11158
11686
|
while (1) {
|
|
11159
11687
|
switch (_context68.prev = _context68.next) {
|
|
11160
11688
|
case 0:
|
|
11689
|
+
this.validateServerSideAuth();
|
|
11161
11690
|
body = {
|
|
11162
|
-
|
|
11691
|
+
target_ids: targets
|
|
11163
11692
|
};
|
|
11164
|
-
_context68.
|
|
11165
|
-
return this.post(this.baseURL + "/segments/".concat(id, "/deletetargets"), body);
|
|
11693
|
+
return _context68.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/addtargets"), body));
|
|
11166
11694
|
|
|
11167
11695
|
case 3:
|
|
11168
|
-
return _context68.abrupt("return", _context68.sent);
|
|
11169
|
-
|
|
11170
|
-
case 4:
|
|
11171
11696
|
case "end":
|
|
11172
11697
|
return _context68.stop();
|
|
11173
11698
|
}
|
|
@@ -11175,43 +11700,34 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11175
11700
|
}, _callee68, this);
|
|
11176
11701
|
}));
|
|
11177
11702
|
|
|
11178
|
-
function
|
|
11179
|
-
return
|
|
11703
|
+
function addSegmentTargets(_x97, _x98) {
|
|
11704
|
+
return _addSegmentTargets.apply(this, arguments);
|
|
11180
11705
|
}
|
|
11181
11706
|
|
|
11182
|
-
return
|
|
11707
|
+
return addSegmentTargets;
|
|
11183
11708
|
}()
|
|
11184
|
-
/**
|
|
11185
|
-
* querySegments - Query Segments
|
|
11186
|
-
*
|
|
11187
|
-
* @param {filter} filter MongoDB style filter conditions
|
|
11188
|
-
* @param {QuerySegmentsOptions} options Options for sorting/paginating the results
|
|
11189
|
-
*
|
|
11190
|
-
* @return {Segment[]} Segments
|
|
11191
|
-
*/
|
|
11192
|
-
|
|
11193
11709
|
}, {
|
|
11194
|
-
key: "
|
|
11710
|
+
key: "querySegmentTargets",
|
|
11195
11711
|
value: function () {
|
|
11196
|
-
var
|
|
11197
|
-
var
|
|
11712
|
+
var _querySegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee69(id) {
|
|
11713
|
+
var filter,
|
|
11714
|
+
sort,
|
|
11715
|
+
options,
|
|
11198
11716
|
_args69 = arguments;
|
|
11199
11717
|
return _regeneratorRuntime__default['default'].wrap(function _callee69$(_context69) {
|
|
11200
11718
|
while (1) {
|
|
11201
11719
|
switch (_context69.prev = _context69.next) {
|
|
11202
11720
|
case 0:
|
|
11203
|
-
|
|
11204
|
-
|
|
11205
|
-
|
|
11206
|
-
|
|
11207
|
-
|
|
11208
|
-
},
|
|
11209
|
-
|
|
11210
|
-
|
|
11211
|
-
case 3:
|
|
11212
|
-
return _context69.abrupt("return", _context69.sent);
|
|
11721
|
+
filter = _args69.length > 1 && _args69[1] !== undefined ? _args69[1] : {};
|
|
11722
|
+
sort = _args69.length > 2 && _args69[2] !== undefined ? _args69[2] : [];
|
|
11723
|
+
options = _args69.length > 3 && _args69[3] !== undefined ? _args69[3] : {};
|
|
11724
|
+
this.validateServerSideAuth();
|
|
11725
|
+
return _context69.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/targets/query"), _objectSpread({
|
|
11726
|
+
filter: filter || {},
|
|
11727
|
+
sort: sort || []
|
|
11728
|
+
}, options)));
|
|
11213
11729
|
|
|
11214
|
-
case
|
|
11730
|
+
case 5:
|
|
11215
11731
|
case "end":
|
|
11216
11732
|
return _context69.stop();
|
|
11217
11733
|
}
|
|
@@ -11219,33 +11735,35 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11219
11735
|
}, _callee69, this);
|
|
11220
11736
|
}));
|
|
11221
11737
|
|
|
11222
|
-
function
|
|
11223
|
-
return
|
|
11738
|
+
function querySegmentTargets(_x99) {
|
|
11739
|
+
return _querySegmentTargets.apply(this, arguments);
|
|
11224
11740
|
}
|
|
11225
11741
|
|
|
11226
|
-
return
|
|
11742
|
+
return querySegmentTargets;
|
|
11227
11743
|
}()
|
|
11228
11744
|
/**
|
|
11229
|
-
*
|
|
11745
|
+
* removeSegmentTargets - Remove targets from a segment
|
|
11230
11746
|
*
|
|
11231
11747
|
* @param {string} id Segment ID
|
|
11748
|
+
* @param {string[]} targets Targets to add to the segment
|
|
11232
11749
|
*
|
|
11233
|
-
* @return {
|
|
11750
|
+
* @return {APIResponse} API response
|
|
11234
11751
|
*/
|
|
11235
11752
|
|
|
11236
11753
|
}, {
|
|
11237
|
-
key: "
|
|
11754
|
+
key: "removeSegmentTargets",
|
|
11238
11755
|
value: function () {
|
|
11239
|
-
var
|
|
11756
|
+
var _removeSegmentTargets = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee70(id, targets) {
|
|
11757
|
+
var body;
|
|
11240
11758
|
return _regeneratorRuntime__default['default'].wrap(function _callee70$(_context70) {
|
|
11241
11759
|
while (1) {
|
|
11242
11760
|
switch (_context70.prev = _context70.next) {
|
|
11243
11761
|
case 0:
|
|
11244
|
-
|
|
11245
|
-
|
|
11246
|
-
|
|
11247
|
-
|
|
11248
|
-
return _context70.abrupt("return",
|
|
11762
|
+
this.validateServerSideAuth();
|
|
11763
|
+
body = {
|
|
11764
|
+
target_ids: targets
|
|
11765
|
+
};
|
|
11766
|
+
return _context70.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/deletetargets"), body));
|
|
11249
11767
|
|
|
11250
11768
|
case 3:
|
|
11251
11769
|
case "end":
|
|
@@ -11255,34 +11773,37 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11255
11773
|
}, _callee70, this);
|
|
11256
11774
|
}));
|
|
11257
11775
|
|
|
11258
|
-
function
|
|
11259
|
-
return
|
|
11776
|
+
function removeSegmentTargets(_x100, _x101) {
|
|
11777
|
+
return _removeSegmentTargets.apply(this, arguments);
|
|
11260
11778
|
}
|
|
11261
11779
|
|
|
11262
|
-
return
|
|
11780
|
+
return removeSegmentTargets;
|
|
11263
11781
|
}()
|
|
11264
11782
|
/**
|
|
11265
|
-
*
|
|
11783
|
+
* querySegments - Query Segments
|
|
11266
11784
|
*
|
|
11267
|
-
* @param {
|
|
11268
|
-
* @param {
|
|
11785
|
+
* @param {filter} filter MongoDB style filter conditions
|
|
11786
|
+
* @param {QuerySegmentsOptions} options Options for sorting/paginating the results
|
|
11269
11787
|
*
|
|
11270
|
-
* @return {
|
|
11788
|
+
* @return {Segment[]} Segments
|
|
11271
11789
|
*/
|
|
11272
11790
|
|
|
11273
11791
|
}, {
|
|
11274
|
-
key: "
|
|
11792
|
+
key: "querySegments",
|
|
11275
11793
|
value: function () {
|
|
11276
|
-
var
|
|
11794
|
+
var _querySegments = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee71(filter, sort) {
|
|
11795
|
+
var options,
|
|
11796
|
+
_args71 = arguments;
|
|
11277
11797
|
return _regeneratorRuntime__default['default'].wrap(function _callee71$(_context71) {
|
|
11278
11798
|
while (1) {
|
|
11279
11799
|
switch (_context71.prev = _context71.next) {
|
|
11280
11800
|
case 0:
|
|
11281
|
-
|
|
11282
|
-
|
|
11283
|
-
|
|
11284
|
-
|
|
11285
|
-
|
|
11801
|
+
options = _args71.length > 2 && _args71[2] !== undefined ? _args71[2] : {};
|
|
11802
|
+
this.validateServerSideAuth();
|
|
11803
|
+
return _context71.abrupt("return", this.post(this.baseURL + "/segments/query", _objectSpread({
|
|
11804
|
+
filter: filter,
|
|
11805
|
+
sort: sort
|
|
11806
|
+
}, options)));
|
|
11286
11807
|
|
|
11287
11808
|
case 3:
|
|
11288
11809
|
case "end":
|
|
@@ -11292,41 +11813,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11292
11813
|
}, _callee71, this);
|
|
11293
11814
|
}));
|
|
11294
11815
|
|
|
11295
|
-
function
|
|
11296
|
-
return
|
|
11816
|
+
function querySegments(_x102, _x103) {
|
|
11817
|
+
return _querySegments.apply(this, arguments);
|
|
11297
11818
|
}
|
|
11298
11819
|
|
|
11299
|
-
return
|
|
11820
|
+
return querySegments;
|
|
11300
11821
|
}()
|
|
11301
11822
|
/**
|
|
11302
|
-
*
|
|
11823
|
+
* deleteSegment - Delete a Campaign Segment
|
|
11303
11824
|
*
|
|
11304
|
-
* @param {
|
|
11825
|
+
* @param {string} id Segment ID
|
|
11305
11826
|
*
|
|
11306
|
-
* @return {
|
|
11827
|
+
* @return {Promise<APIResponse>} The Server Response
|
|
11307
11828
|
*/
|
|
11308
11829
|
|
|
11309
11830
|
}, {
|
|
11310
|
-
key: "
|
|
11831
|
+
key: "deleteSegment",
|
|
11311
11832
|
value: function () {
|
|
11312
|
-
var
|
|
11313
|
-
var _yield$this$post2, campaign;
|
|
11314
|
-
|
|
11833
|
+
var _deleteSegment = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee72(id) {
|
|
11315
11834
|
return _regeneratorRuntime__default['default'].wrap(function _callee72$(_context72) {
|
|
11316
11835
|
while (1) {
|
|
11317
11836
|
switch (_context72.prev = _context72.next) {
|
|
11318
11837
|
case 0:
|
|
11319
|
-
|
|
11320
|
-
return this.
|
|
11321
|
-
campaign: params
|
|
11322
|
-
});
|
|
11838
|
+
this.validateServerSideAuth();
|
|
11839
|
+
return _context72.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
|
|
11323
11840
|
|
|
11324
11841
|
case 2:
|
|
11325
|
-
_yield$this$post2 = _context72.sent;
|
|
11326
|
-
campaign = _yield$this$post2.campaign;
|
|
11327
|
-
return _context72.abrupt("return", campaign);
|
|
11328
|
-
|
|
11329
|
-
case 5:
|
|
11330
11842
|
case "end":
|
|
11331
11843
|
return _context72.stop();
|
|
11332
11844
|
}
|
|
@@ -11334,41 +11846,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11334
11846
|
}, _callee72, this);
|
|
11335
11847
|
}));
|
|
11336
11848
|
|
|
11337
|
-
function
|
|
11338
|
-
return
|
|
11849
|
+
function deleteSegment(_x104) {
|
|
11850
|
+
return _deleteSegment.apply(this, arguments);
|
|
11339
11851
|
}
|
|
11340
11852
|
|
|
11341
|
-
return
|
|
11853
|
+
return deleteSegment;
|
|
11342
11854
|
}()
|
|
11343
11855
|
/**
|
|
11344
|
-
*
|
|
11856
|
+
* segmentTargetExists - Check if a target exists in a segment
|
|
11345
11857
|
*
|
|
11858
|
+
* @param {string} segmentId Segment ID
|
|
11859
|
+
* @param {string} targetId Target ID
|
|
11346
11860
|
*
|
|
11347
|
-
* @return {
|
|
11861
|
+
* @return {Promise<APIResponse>} The Server Response
|
|
11348
11862
|
*/
|
|
11349
11863
|
|
|
11350
11864
|
}, {
|
|
11351
|
-
key: "
|
|
11865
|
+
key: "segmentTargetExists",
|
|
11352
11866
|
value: function () {
|
|
11353
|
-
var
|
|
11354
|
-
var options,
|
|
11355
|
-
_args73 = arguments;
|
|
11867
|
+
var _segmentTargetExists = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee73(segmentId, targetId) {
|
|
11356
11868
|
return _regeneratorRuntime__default['default'].wrap(function _callee73$(_context73) {
|
|
11357
11869
|
while (1) {
|
|
11358
11870
|
switch (_context73.prev = _context73.next) {
|
|
11359
11871
|
case 0:
|
|
11360
|
-
|
|
11361
|
-
_context73.
|
|
11362
|
-
return this.get(this.baseURL + "/campaigns", {
|
|
11363
|
-
payload: _objectSpread({
|
|
11364
|
-
filter_conditions: filters
|
|
11365
|
-
}, options)
|
|
11366
|
-
});
|
|
11367
|
-
|
|
11368
|
-
case 3:
|
|
11369
|
-
return _context73.abrupt("return", _context73.sent);
|
|
11872
|
+
this.validateServerSideAuth();
|
|
11873
|
+
return _context73.abrupt("return", this.get(this.baseURL + "/segments/".concat(segmentId, "/target/").concat(targetId)));
|
|
11370
11874
|
|
|
11371
|
-
case
|
|
11875
|
+
case 2:
|
|
11372
11876
|
case "end":
|
|
11373
11877
|
return _context73.stop();
|
|
11374
11878
|
}
|
|
@@ -11376,42 +11880,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11376
11880
|
}, _callee73, this);
|
|
11377
11881
|
}));
|
|
11378
11882
|
|
|
11379
|
-
function
|
|
11380
|
-
return
|
|
11883
|
+
function segmentTargetExists(_x105, _x106) {
|
|
11884
|
+
return _segmentTargetExists.apply(this, arguments);
|
|
11381
11885
|
}
|
|
11382
11886
|
|
|
11383
|
-
return
|
|
11887
|
+
return segmentTargetExists;
|
|
11384
11888
|
}()
|
|
11385
11889
|
/**
|
|
11386
|
-
*
|
|
11890
|
+
* createCampaign - Creates a Campaign
|
|
11387
11891
|
*
|
|
11388
|
-
* @param {
|
|
11389
|
-
* @param {Partial<CampaignData>} params Campaign data
|
|
11892
|
+
* @param {CampaignData} params Campaign data
|
|
11390
11893
|
*
|
|
11391
|
-
* @return {Campaign}
|
|
11894
|
+
* @return {Campaign} The Created Campaign
|
|
11392
11895
|
*/
|
|
11393
11896
|
|
|
11394
11897
|
}, {
|
|
11395
|
-
key: "
|
|
11898
|
+
key: "createCampaign",
|
|
11396
11899
|
value: function () {
|
|
11397
|
-
var
|
|
11398
|
-
var _yield$this$put2, campaign;
|
|
11399
|
-
|
|
11900
|
+
var _createCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee74(params) {
|
|
11400
11901
|
return _regeneratorRuntime__default['default'].wrap(function _callee74$(_context74) {
|
|
11401
11902
|
while (1) {
|
|
11402
11903
|
switch (_context74.prev = _context74.next) {
|
|
11403
11904
|
case 0:
|
|
11404
|
-
|
|
11405
|
-
return this.
|
|
11406
|
-
campaign: params
|
|
11407
|
-
});
|
|
11905
|
+
this.validateServerSideAuth();
|
|
11906
|
+
return _context74.abrupt("return", this.post(this.baseURL + "/campaigns", _objectSpread({}, params)));
|
|
11408
11907
|
|
|
11409
11908
|
case 2:
|
|
11410
|
-
_yield$this$put2 = _context74.sent;
|
|
11411
|
-
campaign = _yield$this$put2.campaign;
|
|
11412
|
-
return _context74.abrupt("return", campaign);
|
|
11413
|
-
|
|
11414
|
-
case 5:
|
|
11415
11909
|
case "end":
|
|
11416
11910
|
return _context74.stop();
|
|
11417
11911
|
}
|
|
@@ -11419,32 +11913,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11419
11913
|
}, _callee74, this);
|
|
11420
11914
|
}));
|
|
11421
11915
|
|
|
11422
|
-
function
|
|
11423
|
-
return
|
|
11916
|
+
function createCampaign(_x107) {
|
|
11917
|
+
return _createCampaign.apply(this, arguments);
|
|
11424
11918
|
}
|
|
11425
11919
|
|
|
11426
|
-
return
|
|
11920
|
+
return createCampaign;
|
|
11427
11921
|
}()
|
|
11428
|
-
/**
|
|
11429
|
-
* deleteCampaign - Delete a Campaign
|
|
11430
|
-
*
|
|
11431
|
-
* @param {string} id Campaign ID
|
|
11432
|
-
*
|
|
11433
|
-
* @return {Promise<APIResponse>} The Server Response
|
|
11434
|
-
*/
|
|
11435
|
-
|
|
11436
11922
|
}, {
|
|
11437
|
-
key: "
|
|
11923
|
+
key: "getCampaign",
|
|
11438
11924
|
value: function () {
|
|
11439
|
-
var
|
|
11440
|
-
var params,
|
|
11441
|
-
_args75 = arguments;
|
|
11925
|
+
var _getCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee75(id) {
|
|
11442
11926
|
return _regeneratorRuntime__default['default'].wrap(function _callee75$(_context75) {
|
|
11443
11927
|
while (1) {
|
|
11444
11928
|
switch (_context75.prev = _context75.next) {
|
|
11445
11929
|
case 0:
|
|
11446
|
-
|
|
11447
|
-
return _context75.abrupt("return", this.
|
|
11930
|
+
this.validateServerSideAuth();
|
|
11931
|
+
return _context75.abrupt("return", this.get(this.baseURL + "/campaigns/".concat(id)));
|
|
11448
11932
|
|
|
11449
11933
|
case 2:
|
|
11450
11934
|
case "end":
|
|
@@ -11454,43 +11938,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11454
11938
|
}, _callee75, this);
|
|
11455
11939
|
}));
|
|
11456
11940
|
|
|
11457
|
-
function
|
|
11458
|
-
return
|
|
11941
|
+
function getCampaign(_x108) {
|
|
11942
|
+
return _getCampaign.apply(this, arguments);
|
|
11459
11943
|
}
|
|
11460
11944
|
|
|
11461
|
-
return
|
|
11945
|
+
return getCampaign;
|
|
11462
11946
|
}()
|
|
11463
|
-
/**
|
|
11464
|
-
* scheduleCampaign - Schedule a Campaign
|
|
11465
|
-
*
|
|
11466
|
-
* @param {string} id Campaign ID
|
|
11467
|
-
* @param {{scheduledFor: number}} params Schedule params
|
|
11468
|
-
*
|
|
11469
|
-
* @return {Campaign} Scheduled Campaign
|
|
11470
|
-
*/
|
|
11471
|
-
|
|
11472
11947
|
}, {
|
|
11473
|
-
key: "
|
|
11948
|
+
key: "startCampaign",
|
|
11474
11949
|
value: function () {
|
|
11475
|
-
var
|
|
11476
|
-
var scheduledFor, _yield$this$patch, campaign;
|
|
11477
|
-
|
|
11950
|
+
var _startCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee76(id, scheduledFor) {
|
|
11478
11951
|
return _regeneratorRuntime__default['default'].wrap(function _callee76$(_context76) {
|
|
11479
11952
|
while (1) {
|
|
11480
11953
|
switch (_context76.prev = _context76.next) {
|
|
11481
11954
|
case 0:
|
|
11482
|
-
|
|
11483
|
-
_context76.
|
|
11484
|
-
return this.patch(this.baseURL + "/campaigns/".concat(id, "/schedule"), {
|
|
11955
|
+
this.validateServerSideAuth();
|
|
11956
|
+
return _context76.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(id, "/start"), {
|
|
11485
11957
|
scheduled_for: scheduledFor
|
|
11486
|
-
});
|
|
11487
|
-
|
|
11488
|
-
case 3:
|
|
11489
|
-
_yield$this$patch = _context76.sent;
|
|
11490
|
-
campaign = _yield$this$patch.campaign;
|
|
11491
|
-
return _context76.abrupt("return", campaign);
|
|
11958
|
+
}));
|
|
11492
11959
|
|
|
11493
|
-
case
|
|
11960
|
+
case 2:
|
|
11494
11961
|
case "end":
|
|
11495
11962
|
return _context76.stop();
|
|
11496
11963
|
}
|
|
@@ -11498,39 +11965,38 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11498
11965
|
}, _callee76, this);
|
|
11499
11966
|
}));
|
|
11500
11967
|
|
|
11501
|
-
function
|
|
11502
|
-
return
|
|
11968
|
+
function startCampaign(_x109, _x110) {
|
|
11969
|
+
return _startCampaign.apply(this, arguments);
|
|
11503
11970
|
}
|
|
11504
11971
|
|
|
11505
|
-
return
|
|
11972
|
+
return startCampaign;
|
|
11506
11973
|
}()
|
|
11507
11974
|
/**
|
|
11508
|
-
*
|
|
11975
|
+
* queryCampaigns - Query Campaigns
|
|
11509
11976
|
*
|
|
11510
|
-
* @param {string} id Campaign ID
|
|
11511
11977
|
*
|
|
11512
|
-
* @return {Campaign}
|
|
11978
|
+
* @return {Campaign[]} Campaigns
|
|
11513
11979
|
*/
|
|
11514
11980
|
|
|
11515
11981
|
}, {
|
|
11516
|
-
key: "
|
|
11982
|
+
key: "queryCampaigns",
|
|
11517
11983
|
value: function () {
|
|
11518
|
-
var
|
|
11519
|
-
var _yield$this$patch2, campaign;
|
|
11520
|
-
|
|
11984
|
+
var _queryCampaigns = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee77(filter, sort, options) {
|
|
11521
11985
|
return _regeneratorRuntime__default['default'].wrap(function _callee77$(_context77) {
|
|
11522
11986
|
while (1) {
|
|
11523
11987
|
switch (_context77.prev = _context77.next) {
|
|
11524
11988
|
case 0:
|
|
11525
|
-
|
|
11526
|
-
|
|
11989
|
+
this.validateServerSideAuth();
|
|
11990
|
+
_context77.next = 3;
|
|
11991
|
+
return this.post(this.baseURL + "/campaigns/query", _objectSpread({
|
|
11992
|
+
filter: filter,
|
|
11993
|
+
sort: sort
|
|
11994
|
+
}, options || {}));
|
|
11527
11995
|
|
|
11528
|
-
case
|
|
11529
|
-
|
|
11530
|
-
campaign = _yield$this$patch2.campaign;
|
|
11531
|
-
return _context77.abrupt("return", campaign);
|
|
11996
|
+
case 3:
|
|
11997
|
+
return _context77.abrupt("return", _context77.sent);
|
|
11532
11998
|
|
|
11533
|
-
case
|
|
11999
|
+
case 4:
|
|
11534
12000
|
case "end":
|
|
11535
12001
|
return _context77.stop();
|
|
11536
12002
|
}
|
|
@@ -11538,39 +12004,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11538
12004
|
}, _callee77, this);
|
|
11539
12005
|
}));
|
|
11540
12006
|
|
|
11541
|
-
function
|
|
11542
|
-
return
|
|
12007
|
+
function queryCampaigns(_x111, _x112, _x113) {
|
|
12008
|
+
return _queryCampaigns.apply(this, arguments);
|
|
11543
12009
|
}
|
|
11544
12010
|
|
|
11545
|
-
return
|
|
12011
|
+
return queryCampaigns;
|
|
11546
12012
|
}()
|
|
11547
12013
|
/**
|
|
11548
|
-
*
|
|
12014
|
+
* updateCampaign - Update a Campaign
|
|
11549
12015
|
*
|
|
11550
12016
|
* @param {string} id Campaign ID
|
|
12017
|
+
* @param {Partial<CampaignData>} params Campaign data
|
|
11551
12018
|
*
|
|
11552
|
-
* @return {Campaign}
|
|
12019
|
+
* @return {Campaign} Updated Campaign
|
|
11553
12020
|
*/
|
|
11554
12021
|
|
|
11555
12022
|
}, {
|
|
11556
|
-
key: "
|
|
12023
|
+
key: "updateCampaign",
|
|
11557
12024
|
value: function () {
|
|
11558
|
-
var
|
|
11559
|
-
var _yield$this$patch3, campaign;
|
|
11560
|
-
|
|
12025
|
+
var _updateCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee78(id, params) {
|
|
11561
12026
|
return _regeneratorRuntime__default['default'].wrap(function _callee78$(_context78) {
|
|
11562
12027
|
while (1) {
|
|
11563
12028
|
switch (_context78.prev = _context78.next) {
|
|
11564
12029
|
case 0:
|
|
11565
|
-
|
|
11566
|
-
return this.
|
|
12030
|
+
this.validateServerSideAuth();
|
|
12031
|
+
return _context78.abrupt("return", this.put(this.baseURL + "/campaigns/".concat(id), params));
|
|
11567
12032
|
|
|
11568
12033
|
case 2:
|
|
11569
|
-
_yield$this$patch3 = _context78.sent;
|
|
11570
|
-
campaign = _yield$this$patch3.campaign;
|
|
11571
|
-
return _context78.abrupt("return", campaign);
|
|
11572
|
-
|
|
11573
|
-
case 5:
|
|
11574
12034
|
case "end":
|
|
11575
12035
|
return _context78.stop();
|
|
11576
12036
|
}
|
|
@@ -11578,40 +12038,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11578
12038
|
}, _callee78, this);
|
|
11579
12039
|
}));
|
|
11580
12040
|
|
|
11581
|
-
function
|
|
11582
|
-
return
|
|
12041
|
+
function updateCampaign(_x114, _x115) {
|
|
12042
|
+
return _updateCampaign.apply(this, arguments);
|
|
11583
12043
|
}
|
|
11584
12044
|
|
|
11585
|
-
return
|
|
12045
|
+
return updateCampaign;
|
|
11586
12046
|
}()
|
|
11587
12047
|
/**
|
|
11588
|
-
*
|
|
12048
|
+
* deleteCampaign - Delete a Campaign
|
|
11589
12049
|
*
|
|
11590
12050
|
* @param {string} id Campaign ID
|
|
11591
|
-
* @param {{users: string[]}} params Test params
|
|
11592
12051
|
*
|
|
11593
|
-
* @return {
|
|
12052
|
+
* @return {Promise<APIResponse>} The Server Response
|
|
11594
12053
|
*/
|
|
11595
12054
|
|
|
11596
12055
|
}, {
|
|
11597
|
-
key: "
|
|
12056
|
+
key: "deleteCampaign",
|
|
11598
12057
|
value: function () {
|
|
11599
|
-
var
|
|
11600
|
-
var users;
|
|
12058
|
+
var _deleteCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee79(id) {
|
|
11601
12059
|
return _regeneratorRuntime__default['default'].wrap(function _callee79$(_context79) {
|
|
11602
12060
|
while (1) {
|
|
11603
12061
|
switch (_context79.prev = _context79.next) {
|
|
11604
12062
|
case 0:
|
|
11605
|
-
|
|
11606
|
-
_context79.
|
|
11607
|
-
return this.post(this.baseURL + "/campaigns/".concat(id, "/test"), {
|
|
11608
|
-
users: users
|
|
11609
|
-
});
|
|
12063
|
+
this.validateServerSideAuth();
|
|
12064
|
+
return _context79.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id)));
|
|
11610
12065
|
|
|
11611
|
-
case
|
|
11612
|
-
return _context79.abrupt("return", _context79.sent);
|
|
11613
|
-
|
|
11614
|
-
case 4:
|
|
12066
|
+
case 2:
|
|
11615
12067
|
case "end":
|
|
11616
12068
|
return _context79.stop();
|
|
11617
12069
|
}
|
|
@@ -11619,11 +12071,52 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11619
12071
|
}, _callee79, this);
|
|
11620
12072
|
}));
|
|
11621
12073
|
|
|
11622
|
-
function
|
|
11623
|
-
return
|
|
12074
|
+
function deleteCampaign(_x116) {
|
|
12075
|
+
return _deleteCampaign.apply(this, arguments);
|
|
12076
|
+
}
|
|
12077
|
+
|
|
12078
|
+
return deleteCampaign;
|
|
12079
|
+
}()
|
|
12080
|
+
/**
|
|
12081
|
+
* stopCampaign - Stop a Campaign
|
|
12082
|
+
*
|
|
12083
|
+
* @param {string} id Campaign ID
|
|
12084
|
+
*
|
|
12085
|
+
* @return {Campaign} Stopped Campaign
|
|
12086
|
+
*/
|
|
12087
|
+
|
|
12088
|
+
}, {
|
|
12089
|
+
key: "stopCampaign",
|
|
12090
|
+
value: function () {
|
|
12091
|
+
var _stopCampaign = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee80(id) {
|
|
12092
|
+
var _yield$this$patch, campaign;
|
|
12093
|
+
|
|
12094
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee80$(_context80) {
|
|
12095
|
+
while (1) {
|
|
12096
|
+
switch (_context80.prev = _context80.next) {
|
|
12097
|
+
case 0:
|
|
12098
|
+
this.validateServerSideAuth();
|
|
12099
|
+
_context80.next = 3;
|
|
12100
|
+
return this.patch(this.baseURL + "/campaigns/".concat(id, "/stop"));
|
|
12101
|
+
|
|
12102
|
+
case 3:
|
|
12103
|
+
_yield$this$patch = _context80.sent;
|
|
12104
|
+
campaign = _yield$this$patch.campaign;
|
|
12105
|
+
return _context80.abrupt("return", campaign);
|
|
12106
|
+
|
|
12107
|
+
case 6:
|
|
12108
|
+
case "end":
|
|
12109
|
+
return _context80.stop();
|
|
12110
|
+
}
|
|
12111
|
+
}
|
|
12112
|
+
}, _callee80, this);
|
|
12113
|
+
}));
|
|
12114
|
+
|
|
12115
|
+
function stopCampaign(_x117) {
|
|
12116
|
+
return _stopCampaign.apply(this, arguments);
|
|
11624
12117
|
}
|
|
11625
12118
|
|
|
11626
|
-
return
|
|
12119
|
+
return stopCampaign;
|
|
11627
12120
|
}()
|
|
11628
12121
|
/**
|
|
11629
12122
|
* enrichURL - Get OpenGraph data of the given link
|
|
@@ -11635,24 +12128,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11635
12128
|
}, {
|
|
11636
12129
|
key: "enrichURL",
|
|
11637
12130
|
value: function () {
|
|
11638
|
-
var _enrichURL = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11639
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12131
|
+
var _enrichURL = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee81(url) {
|
|
12132
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee81$(_context81) {
|
|
11640
12133
|
while (1) {
|
|
11641
|
-
switch (
|
|
12134
|
+
switch (_context81.prev = _context81.next) {
|
|
11642
12135
|
case 0:
|
|
11643
|
-
return
|
|
12136
|
+
return _context81.abrupt("return", this.get(this.baseURL + "/og", {
|
|
11644
12137
|
url: url
|
|
11645
12138
|
}));
|
|
11646
12139
|
|
|
11647
12140
|
case 1:
|
|
11648
12141
|
case "end":
|
|
11649
|
-
return
|
|
12142
|
+
return _context81.stop();
|
|
11650
12143
|
}
|
|
11651
12144
|
}
|
|
11652
|
-
},
|
|
12145
|
+
}, _callee81, this);
|
|
11653
12146
|
}));
|
|
11654
12147
|
|
|
11655
|
-
function enrichURL(
|
|
12148
|
+
function enrichURL(_x118) {
|
|
11656
12149
|
return _enrichURL.apply(this, arguments);
|
|
11657
12150
|
}
|
|
11658
12151
|
|
|
@@ -11669,22 +12162,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11669
12162
|
}, {
|
|
11670
12163
|
key: "getTask",
|
|
11671
12164
|
value: function () {
|
|
11672
|
-
var _getTask = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11673
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12165
|
+
var _getTask = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee82(id) {
|
|
12166
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee82$(_context82) {
|
|
11674
12167
|
while (1) {
|
|
11675
|
-
switch (
|
|
12168
|
+
switch (_context82.prev = _context82.next) {
|
|
11676
12169
|
case 0:
|
|
11677
|
-
return
|
|
12170
|
+
return _context82.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
|
|
11678
12171
|
|
|
11679
12172
|
case 1:
|
|
11680
12173
|
case "end":
|
|
11681
|
-
return
|
|
12174
|
+
return _context82.stop();
|
|
11682
12175
|
}
|
|
11683
12176
|
}
|
|
11684
|
-
},
|
|
12177
|
+
}, _callee82, this);
|
|
11685
12178
|
}));
|
|
11686
12179
|
|
|
11687
|
-
function getTask(
|
|
12180
|
+
function getTask(_x119) {
|
|
11688
12181
|
return _getTask.apply(this, arguments);
|
|
11689
12182
|
}
|
|
11690
12183
|
|
|
@@ -11702,31 +12195,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11702
12195
|
}, {
|
|
11703
12196
|
key: "deleteChannels",
|
|
11704
12197
|
value: function () {
|
|
11705
|
-
var _deleteChannels = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12198
|
+
var _deleteChannels = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee83(cids) {
|
|
11706
12199
|
var options,
|
|
11707
|
-
|
|
11708
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12200
|
+
_args83 = arguments;
|
|
12201
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee83$(_context83) {
|
|
11709
12202
|
while (1) {
|
|
11710
|
-
switch (
|
|
12203
|
+
switch (_context83.prev = _context83.next) {
|
|
11711
12204
|
case 0:
|
|
11712
|
-
options =
|
|
11713
|
-
|
|
12205
|
+
options = _args83.length > 1 && _args83[1] !== undefined ? _args83[1] : {};
|
|
12206
|
+
_context83.next = 3;
|
|
11714
12207
|
return this.post(this.baseURL + "/channels/delete", _objectSpread({
|
|
11715
12208
|
cids: cids
|
|
11716
12209
|
}, options));
|
|
11717
12210
|
|
|
11718
12211
|
case 3:
|
|
11719
|
-
return
|
|
12212
|
+
return _context83.abrupt("return", _context83.sent);
|
|
11720
12213
|
|
|
11721
12214
|
case 4:
|
|
11722
12215
|
case "end":
|
|
11723
|
-
return
|
|
12216
|
+
return _context83.stop();
|
|
11724
12217
|
}
|
|
11725
12218
|
}
|
|
11726
|
-
},
|
|
12219
|
+
}, _callee83, this);
|
|
11727
12220
|
}));
|
|
11728
12221
|
|
|
11729
|
-
function deleteChannels(
|
|
12222
|
+
function deleteChannels(_x120) {
|
|
11730
12223
|
return _deleteChannels.apply(this, arguments);
|
|
11731
12224
|
}
|
|
11732
12225
|
|
|
@@ -11744,17 +12237,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11744
12237
|
}, {
|
|
11745
12238
|
key: "deleteUsers",
|
|
11746
12239
|
value: function () {
|
|
11747
|
-
var _deleteUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12240
|
+
var _deleteUsers = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee84(user_ids) {
|
|
11748
12241
|
var options,
|
|
11749
|
-
|
|
11750
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12242
|
+
_args84 = arguments;
|
|
12243
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee84$(_context84) {
|
|
11751
12244
|
while (1) {
|
|
11752
|
-
switch (
|
|
12245
|
+
switch (_context84.prev = _context84.next) {
|
|
11753
12246
|
case 0:
|
|
11754
|
-
options =
|
|
12247
|
+
options = _args84.length > 1 && _args84[1] !== undefined ? _args84[1] : {};
|
|
11755
12248
|
|
|
11756
12249
|
if (!(typeof options.user !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.user))) {
|
|
11757
|
-
|
|
12250
|
+
_context84.next = 3;
|
|
11758
12251
|
break;
|
|
11759
12252
|
}
|
|
11760
12253
|
|
|
@@ -11762,7 +12255,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11762
12255
|
|
|
11763
12256
|
case 3:
|
|
11764
12257
|
if (!(typeof options.conversations !== 'undefined' && !['soft', 'hard'].includes(options.conversations))) {
|
|
11765
|
-
|
|
12258
|
+
_context84.next = 5;
|
|
11766
12259
|
break;
|
|
11767
12260
|
}
|
|
11768
12261
|
|
|
@@ -11770,30 +12263,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11770
12263
|
|
|
11771
12264
|
case 5:
|
|
11772
12265
|
if (!(typeof options.messages !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.messages))) {
|
|
11773
|
-
|
|
12266
|
+
_context84.next = 7;
|
|
11774
12267
|
break;
|
|
11775
12268
|
}
|
|
11776
12269
|
|
|
11777
12270
|
throw new Error('Invalid delete user options. messages must be one of [soft hard pruning]');
|
|
11778
12271
|
|
|
11779
12272
|
case 7:
|
|
11780
|
-
|
|
12273
|
+
_context84.next = 9;
|
|
11781
12274
|
return this.post(this.baseURL + "/users/delete", _objectSpread({
|
|
11782
12275
|
user_ids: user_ids
|
|
11783
12276
|
}, options));
|
|
11784
12277
|
|
|
11785
12278
|
case 9:
|
|
11786
|
-
return
|
|
12279
|
+
return _context84.abrupt("return", _context84.sent);
|
|
11787
12280
|
|
|
11788
12281
|
case 10:
|
|
11789
12282
|
case "end":
|
|
11790
|
-
return
|
|
12283
|
+
return _context84.stop();
|
|
11791
12284
|
}
|
|
11792
12285
|
}
|
|
11793
|
-
},
|
|
12286
|
+
}, _callee84, this);
|
|
11794
12287
|
}));
|
|
11795
12288
|
|
|
11796
|
-
function deleteUsers(
|
|
12289
|
+
function deleteUsers(_x121) {
|
|
11797
12290
|
return _deleteUsers.apply(this, arguments);
|
|
11798
12291
|
}
|
|
11799
12292
|
|
|
@@ -11814,28 +12307,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11814
12307
|
}, {
|
|
11815
12308
|
key: "_createImportURL",
|
|
11816
12309
|
value: function () {
|
|
11817
|
-
var _createImportURL2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11818
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12310
|
+
var _createImportURL2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee85(filename) {
|
|
12311
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee85$(_context85) {
|
|
11819
12312
|
while (1) {
|
|
11820
|
-
switch (
|
|
12313
|
+
switch (_context85.prev = _context85.next) {
|
|
11821
12314
|
case 0:
|
|
11822
|
-
|
|
12315
|
+
_context85.next = 2;
|
|
11823
12316
|
return this.post(this.baseURL + "/import_urls", {
|
|
11824
12317
|
filename: filename
|
|
11825
12318
|
});
|
|
11826
12319
|
|
|
11827
12320
|
case 2:
|
|
11828
|
-
return
|
|
12321
|
+
return _context85.abrupt("return", _context85.sent);
|
|
11829
12322
|
|
|
11830
12323
|
case 3:
|
|
11831
12324
|
case "end":
|
|
11832
|
-
return
|
|
12325
|
+
return _context85.stop();
|
|
11833
12326
|
}
|
|
11834
12327
|
}
|
|
11835
|
-
},
|
|
12328
|
+
}, _callee85, this);
|
|
11836
12329
|
}));
|
|
11837
12330
|
|
|
11838
|
-
function _createImportURL(
|
|
12331
|
+
function _createImportURL(_x122) {
|
|
11839
12332
|
return _createImportURL2.apply(this, arguments);
|
|
11840
12333
|
}
|
|
11841
12334
|
|
|
@@ -11857,33 +12350,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11857
12350
|
}, {
|
|
11858
12351
|
key: "_createImport",
|
|
11859
12352
|
value: function () {
|
|
11860
|
-
var _createImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12353
|
+
var _createImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee86(path) {
|
|
11861
12354
|
var options,
|
|
11862
|
-
|
|
11863
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12355
|
+
_args86 = arguments;
|
|
12356
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee86$(_context86) {
|
|
11864
12357
|
while (1) {
|
|
11865
|
-
switch (
|
|
12358
|
+
switch (_context86.prev = _context86.next) {
|
|
11866
12359
|
case 0:
|
|
11867
|
-
options =
|
|
12360
|
+
options = _args86.length > 1 && _args86[1] !== undefined ? _args86[1] : {
|
|
11868
12361
|
mode: 'upsert'
|
|
11869
12362
|
};
|
|
11870
|
-
|
|
12363
|
+
_context86.next = 3;
|
|
11871
12364
|
return this.post(this.baseURL + "/imports", _objectSpread({
|
|
11872
12365
|
path: path
|
|
11873
12366
|
}, options));
|
|
11874
12367
|
|
|
11875
12368
|
case 3:
|
|
11876
|
-
return
|
|
12369
|
+
return _context86.abrupt("return", _context86.sent);
|
|
11877
12370
|
|
|
11878
12371
|
case 4:
|
|
11879
12372
|
case "end":
|
|
11880
|
-
return
|
|
12373
|
+
return _context86.stop();
|
|
11881
12374
|
}
|
|
11882
12375
|
}
|
|
11883
|
-
},
|
|
12376
|
+
}, _callee86, this);
|
|
11884
12377
|
}));
|
|
11885
12378
|
|
|
11886
|
-
function _createImport(
|
|
12379
|
+
function _createImport(_x123) {
|
|
11887
12380
|
return _createImport2.apply(this, arguments);
|
|
11888
12381
|
}
|
|
11889
12382
|
|
|
@@ -11905,26 +12398,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11905
12398
|
}, {
|
|
11906
12399
|
key: "_getImport",
|
|
11907
12400
|
value: function () {
|
|
11908
|
-
var _getImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11909
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12401
|
+
var _getImport2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee87(id) {
|
|
12402
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee87$(_context87) {
|
|
11910
12403
|
while (1) {
|
|
11911
|
-
switch (
|
|
12404
|
+
switch (_context87.prev = _context87.next) {
|
|
11912
12405
|
case 0:
|
|
11913
|
-
|
|
12406
|
+
_context87.next = 2;
|
|
11914
12407
|
return this.get(this.baseURL + "/imports/".concat(id));
|
|
11915
12408
|
|
|
11916
12409
|
case 2:
|
|
11917
|
-
return
|
|
12410
|
+
return _context87.abrupt("return", _context87.sent);
|
|
11918
12411
|
|
|
11919
12412
|
case 3:
|
|
11920
12413
|
case "end":
|
|
11921
|
-
return
|
|
12414
|
+
return _context87.stop();
|
|
11922
12415
|
}
|
|
11923
12416
|
}
|
|
11924
|
-
},
|
|
12417
|
+
}, _callee87, this);
|
|
11925
12418
|
}));
|
|
11926
12419
|
|
|
11927
|
-
function _getImport(
|
|
12420
|
+
function _getImport(_x124) {
|
|
11928
12421
|
return _getImport2.apply(this, arguments);
|
|
11929
12422
|
}
|
|
11930
12423
|
|
|
@@ -11946,26 +12439,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11946
12439
|
}, {
|
|
11947
12440
|
key: "_listImports",
|
|
11948
12441
|
value: function () {
|
|
11949
|
-
var _listImports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11950
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12442
|
+
var _listImports2 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee88(options) {
|
|
12443
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee88$(_context88) {
|
|
11951
12444
|
while (1) {
|
|
11952
|
-
switch (
|
|
12445
|
+
switch (_context88.prev = _context88.next) {
|
|
11953
12446
|
case 0:
|
|
11954
|
-
|
|
12447
|
+
_context88.next = 2;
|
|
11955
12448
|
return this.get(this.baseURL + "/imports", options);
|
|
11956
12449
|
|
|
11957
12450
|
case 2:
|
|
11958
|
-
return
|
|
12451
|
+
return _context88.abrupt("return", _context88.sent);
|
|
11959
12452
|
|
|
11960
12453
|
case 3:
|
|
11961
12454
|
case "end":
|
|
11962
|
-
return
|
|
12455
|
+
return _context88.stop();
|
|
11963
12456
|
}
|
|
11964
12457
|
}
|
|
11965
|
-
},
|
|
12458
|
+
}, _callee88, this);
|
|
11966
12459
|
}));
|
|
11967
12460
|
|
|
11968
|
-
function _listImports(
|
|
12461
|
+
function _listImports(_x125) {
|
|
11969
12462
|
return _listImports2.apply(this, arguments);
|
|
11970
12463
|
}
|
|
11971
12464
|
|
|
@@ -11984,28 +12477,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11984
12477
|
}, {
|
|
11985
12478
|
key: "upsertPushProvider",
|
|
11986
12479
|
value: function () {
|
|
11987
|
-
var _upsertPushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
11988
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12480
|
+
var _upsertPushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee89(pushProvider) {
|
|
12481
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee89$(_context89) {
|
|
11989
12482
|
while (1) {
|
|
11990
|
-
switch (
|
|
12483
|
+
switch (_context89.prev = _context89.next) {
|
|
11991
12484
|
case 0:
|
|
11992
|
-
|
|
12485
|
+
_context89.next = 2;
|
|
11993
12486
|
return this.post(this.baseURL + "/push_providers", {
|
|
11994
12487
|
push_provider: pushProvider
|
|
11995
12488
|
});
|
|
11996
12489
|
|
|
11997
12490
|
case 2:
|
|
11998
|
-
return
|
|
12491
|
+
return _context89.abrupt("return", _context89.sent);
|
|
11999
12492
|
|
|
12000
12493
|
case 3:
|
|
12001
12494
|
case "end":
|
|
12002
|
-
return
|
|
12495
|
+
return _context89.stop();
|
|
12003
12496
|
}
|
|
12004
12497
|
}
|
|
12005
|
-
},
|
|
12498
|
+
}, _callee89, this);
|
|
12006
12499
|
}));
|
|
12007
12500
|
|
|
12008
|
-
function upsertPushProvider(
|
|
12501
|
+
function upsertPushProvider(_x126) {
|
|
12009
12502
|
return _upsertPushProvider.apply(this, arguments);
|
|
12010
12503
|
}
|
|
12011
12504
|
|
|
@@ -12024,28 +12517,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12024
12517
|
}, {
|
|
12025
12518
|
key: "deletePushProvider",
|
|
12026
12519
|
value: function () {
|
|
12027
|
-
var _deletePushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12520
|
+
var _deletePushProvider = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee90(_ref10) {
|
|
12028
12521
|
var type, name;
|
|
12029
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12522
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee90$(_context90) {
|
|
12030
12523
|
while (1) {
|
|
12031
|
-
switch (
|
|
12524
|
+
switch (_context90.prev = _context90.next) {
|
|
12032
12525
|
case 0:
|
|
12033
12526
|
type = _ref10.type, name = _ref10.name;
|
|
12034
|
-
|
|
12527
|
+
_context90.next = 3;
|
|
12035
12528
|
return this.delete(this.baseURL + "/push_providers/".concat(type, "/").concat(name));
|
|
12036
12529
|
|
|
12037
12530
|
case 3:
|
|
12038
|
-
return
|
|
12531
|
+
return _context90.abrupt("return", _context90.sent);
|
|
12039
12532
|
|
|
12040
12533
|
case 4:
|
|
12041
12534
|
case "end":
|
|
12042
|
-
return
|
|
12535
|
+
return _context90.stop();
|
|
12043
12536
|
}
|
|
12044
12537
|
}
|
|
12045
|
-
},
|
|
12538
|
+
}, _callee90, this);
|
|
12046
12539
|
}));
|
|
12047
12540
|
|
|
12048
|
-
function deletePushProvider(
|
|
12541
|
+
function deletePushProvider(_x127) {
|
|
12049
12542
|
return _deletePushProvider.apply(this, arguments);
|
|
12050
12543
|
}
|
|
12051
12544
|
|
|
@@ -12062,23 +12555,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12062
12555
|
}, {
|
|
12063
12556
|
key: "listPushProviders",
|
|
12064
12557
|
value: function () {
|
|
12065
|
-
var _listPushProviders = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12066
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12558
|
+
var _listPushProviders = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee91() {
|
|
12559
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee91$(_context91) {
|
|
12067
12560
|
while (1) {
|
|
12068
|
-
switch (
|
|
12561
|
+
switch (_context91.prev = _context91.next) {
|
|
12069
12562
|
case 0:
|
|
12070
|
-
|
|
12563
|
+
_context91.next = 2;
|
|
12071
12564
|
return this.get(this.baseURL + "/push_providers");
|
|
12072
12565
|
|
|
12073
12566
|
case 2:
|
|
12074
|
-
return
|
|
12567
|
+
return _context91.abrupt("return", _context91.sent);
|
|
12075
12568
|
|
|
12076
12569
|
case 3:
|
|
12077
12570
|
case "end":
|
|
12078
|
-
return
|
|
12571
|
+
return _context91.stop();
|
|
12079
12572
|
}
|
|
12080
12573
|
}
|
|
12081
|
-
},
|
|
12574
|
+
}, _callee91, this);
|
|
12082
12575
|
}));
|
|
12083
12576
|
|
|
12084
12577
|
function listPushProviders() {
|
|
@@ -12106,26 +12599,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12106
12599
|
}, {
|
|
12107
12600
|
key: "commitMessage",
|
|
12108
12601
|
value: function () {
|
|
12109
|
-
var _commitMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
12110
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
12602
|
+
var _commitMessage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee92(id) {
|
|
12603
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee92$(_context92) {
|
|
12111
12604
|
while (1) {
|
|
12112
|
-
switch (
|
|
12605
|
+
switch (_context92.prev = _context92.next) {
|
|
12113
12606
|
case 0:
|
|
12114
|
-
|
|
12607
|
+
_context92.next = 2;
|
|
12115
12608
|
return this.post(this.baseURL + "/messages/".concat(id, "/commit"));
|
|
12116
12609
|
|
|
12117
12610
|
case 2:
|
|
12118
|
-
return
|
|
12611
|
+
return _context92.abrupt("return", _context92.sent);
|
|
12119
12612
|
|
|
12120
12613
|
case 3:
|
|
12121
12614
|
case "end":
|
|
12122
|
-
return
|
|
12615
|
+
return _context92.stop();
|
|
12123
12616
|
}
|
|
12124
12617
|
}
|
|
12125
|
-
},
|
|
12618
|
+
}, _callee92, this);
|
|
12126
12619
|
}));
|
|
12127
12620
|
|
|
12128
|
-
function commitMessage(
|
|
12621
|
+
function commitMessage(_x128) {
|
|
12129
12622
|
return _commitMessage.apply(this, arguments);
|
|
12130
12623
|
}
|
|
12131
12624
|
|
|
@@ -12283,6 +12776,7 @@ exports.AnyResource = AnyResource;
|
|
|
12283
12776
|
exports.AnyRole = AnyRole;
|
|
12284
12777
|
exports.BuiltinPermissions = BuiltinPermissions;
|
|
12285
12778
|
exports.BuiltinRoles = BuiltinRoles;
|
|
12779
|
+
exports.Campaign = Campaign;
|
|
12286
12780
|
exports.Channel = Channel;
|
|
12287
12781
|
exports.ChannelState = ChannelState;
|
|
12288
12782
|
exports.CheckSignature = CheckSignature;
|
|
@@ -12298,6 +12792,7 @@ exports.JWTUserToken = JWTUserToken;
|
|
|
12298
12792
|
exports.MaxPriority = MaxPriority;
|
|
12299
12793
|
exports.MinPriority = MinPriority;
|
|
12300
12794
|
exports.Permission = Permission;
|
|
12795
|
+
exports.Segment = Segment;
|
|
12301
12796
|
exports.StableWSConnection = StableWSConnection;
|
|
12302
12797
|
exports.StreamChat = StreamChat;
|
|
12303
12798
|
exports.Thread = Thread;
|