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