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.es.js
CHANGED
|
@@ -6087,6 +6087,544 @@ var WSConnectionFallback = /*#__PURE__*/function () {
|
|
|
6087
6087
|
return WSConnectionFallback;
|
|
6088
6088
|
}();
|
|
6089
6089
|
|
|
6090
|
+
var Campaign = /*#__PURE__*/function () {
|
|
6091
|
+
function Campaign(client, id, data) {
|
|
6092
|
+
_classCallCheck(this, Campaign);
|
|
6093
|
+
|
|
6094
|
+
_defineProperty(this, "id", void 0);
|
|
6095
|
+
|
|
6096
|
+
_defineProperty(this, "data", void 0);
|
|
6097
|
+
|
|
6098
|
+
_defineProperty(this, "client", void 0);
|
|
6099
|
+
|
|
6100
|
+
this.client = client;
|
|
6101
|
+
this.id = id;
|
|
6102
|
+
this.data = data;
|
|
6103
|
+
}
|
|
6104
|
+
|
|
6105
|
+
_createClass(Campaign, [{
|
|
6106
|
+
key: "create",
|
|
6107
|
+
value: function () {
|
|
6108
|
+
var _create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
6109
|
+
var _this$data, _this$data2, _this$data3, _this$data4, _this$data5, _this$data6, _this$data7, _this$data8;
|
|
6110
|
+
|
|
6111
|
+
var body, result;
|
|
6112
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
6113
|
+
while (1) {
|
|
6114
|
+
switch (_context.prev = _context.next) {
|
|
6115
|
+
case 0:
|
|
6116
|
+
body = {
|
|
6117
|
+
id: this.id,
|
|
6118
|
+
message_template: (_this$data = this.data) === null || _this$data === void 0 ? void 0 : _this$data.message_template,
|
|
6119
|
+
segment_ids: (_this$data2 = this.data) === null || _this$data2 === void 0 ? void 0 : _this$data2.segment_ids,
|
|
6120
|
+
sender_id: (_this$data3 = this.data) === null || _this$data3 === void 0 ? void 0 : _this$data3.sender_id,
|
|
6121
|
+
channel_template: (_this$data4 = this.data) === null || _this$data4 === void 0 ? void 0 : _this$data4.channel_template,
|
|
6122
|
+
create_channels: (_this$data5 = this.data) === null || _this$data5 === void 0 ? void 0 : _this$data5.create_channels,
|
|
6123
|
+
description: (_this$data6 = this.data) === null || _this$data6 === void 0 ? void 0 : _this$data6.description,
|
|
6124
|
+
name: (_this$data7 = this.data) === null || _this$data7 === void 0 ? void 0 : _this$data7.name,
|
|
6125
|
+
user_ids: (_this$data8 = this.data) === null || _this$data8 === void 0 ? void 0 : _this$data8.user_ids
|
|
6126
|
+
};
|
|
6127
|
+
_context.next = 3;
|
|
6128
|
+
return this.client.createCampaign(body);
|
|
6129
|
+
|
|
6130
|
+
case 3:
|
|
6131
|
+
result = _context.sent;
|
|
6132
|
+
this.id = result.campaign.id;
|
|
6133
|
+
this.data = result.campaign;
|
|
6134
|
+
return _context.abrupt("return", result);
|
|
6135
|
+
|
|
6136
|
+
case 7:
|
|
6137
|
+
case "end":
|
|
6138
|
+
return _context.stop();
|
|
6139
|
+
}
|
|
6140
|
+
}
|
|
6141
|
+
}, _callee, this);
|
|
6142
|
+
}));
|
|
6143
|
+
|
|
6144
|
+
function create() {
|
|
6145
|
+
return _create.apply(this, arguments);
|
|
6146
|
+
}
|
|
6147
|
+
|
|
6148
|
+
return create;
|
|
6149
|
+
}()
|
|
6150
|
+
}, {
|
|
6151
|
+
key: "verifyCampaignId",
|
|
6152
|
+
value: function verifyCampaignId() {
|
|
6153
|
+
if (!this.id) {
|
|
6154
|
+
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)');
|
|
6155
|
+
}
|
|
6156
|
+
}
|
|
6157
|
+
}, {
|
|
6158
|
+
key: "start",
|
|
6159
|
+
value: function () {
|
|
6160
|
+
var _start = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(scheduledFor) {
|
|
6161
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
6162
|
+
while (1) {
|
|
6163
|
+
switch (_context2.prev = _context2.next) {
|
|
6164
|
+
case 0:
|
|
6165
|
+
this.verifyCampaignId();
|
|
6166
|
+
_context2.next = 3;
|
|
6167
|
+
return this.client.startCampaign(this.id, scheduledFor);
|
|
6168
|
+
|
|
6169
|
+
case 3:
|
|
6170
|
+
return _context2.abrupt("return", _context2.sent);
|
|
6171
|
+
|
|
6172
|
+
case 4:
|
|
6173
|
+
case "end":
|
|
6174
|
+
return _context2.stop();
|
|
6175
|
+
}
|
|
6176
|
+
}
|
|
6177
|
+
}, _callee2, this);
|
|
6178
|
+
}));
|
|
6179
|
+
|
|
6180
|
+
function start(_x) {
|
|
6181
|
+
return _start.apply(this, arguments);
|
|
6182
|
+
}
|
|
6183
|
+
|
|
6184
|
+
return start;
|
|
6185
|
+
}()
|
|
6186
|
+
}, {
|
|
6187
|
+
key: "update",
|
|
6188
|
+
value: function () {
|
|
6189
|
+
var _update = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(data) {
|
|
6190
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
6191
|
+
while (1) {
|
|
6192
|
+
switch (_context3.prev = _context3.next) {
|
|
6193
|
+
case 0:
|
|
6194
|
+
this.verifyCampaignId();
|
|
6195
|
+
return _context3.abrupt("return", this.client.updateCampaign(this.id, data));
|
|
6196
|
+
|
|
6197
|
+
case 2:
|
|
6198
|
+
case "end":
|
|
6199
|
+
return _context3.stop();
|
|
6200
|
+
}
|
|
6201
|
+
}
|
|
6202
|
+
}, _callee3, this);
|
|
6203
|
+
}));
|
|
6204
|
+
|
|
6205
|
+
function update(_x2) {
|
|
6206
|
+
return _update.apply(this, arguments);
|
|
6207
|
+
}
|
|
6208
|
+
|
|
6209
|
+
return update;
|
|
6210
|
+
}()
|
|
6211
|
+
}, {
|
|
6212
|
+
key: "delete",
|
|
6213
|
+
value: function () {
|
|
6214
|
+
var _delete2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
|
|
6215
|
+
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
6216
|
+
while (1) {
|
|
6217
|
+
switch (_context4.prev = _context4.next) {
|
|
6218
|
+
case 0:
|
|
6219
|
+
this.verifyCampaignId();
|
|
6220
|
+
_context4.next = 3;
|
|
6221
|
+
return this.client.delete(this.client.baseURL + "/campaigns/".concat(this.id));
|
|
6222
|
+
|
|
6223
|
+
case 3:
|
|
6224
|
+
return _context4.abrupt("return", _context4.sent);
|
|
6225
|
+
|
|
6226
|
+
case 4:
|
|
6227
|
+
case "end":
|
|
6228
|
+
return _context4.stop();
|
|
6229
|
+
}
|
|
6230
|
+
}
|
|
6231
|
+
}, _callee4, this);
|
|
6232
|
+
}));
|
|
6233
|
+
|
|
6234
|
+
function _delete() {
|
|
6235
|
+
return _delete2.apply(this, arguments);
|
|
6236
|
+
}
|
|
6237
|
+
|
|
6238
|
+
return _delete;
|
|
6239
|
+
}()
|
|
6240
|
+
}, {
|
|
6241
|
+
key: "schedule",
|
|
6242
|
+
value: function () {
|
|
6243
|
+
var _schedule = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(params) {
|
|
6244
|
+
var scheduledFor, _yield$this$client$pa, campaign;
|
|
6245
|
+
|
|
6246
|
+
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
6247
|
+
while (1) {
|
|
6248
|
+
switch (_context5.prev = _context5.next) {
|
|
6249
|
+
case 0:
|
|
6250
|
+
this.verifyCampaignId();
|
|
6251
|
+
scheduledFor = params.scheduledFor;
|
|
6252
|
+
_context5.next = 4;
|
|
6253
|
+
return this.client.patch(this.client.baseURL + "/campaigns/".concat(this.id, "/schedule"), {
|
|
6254
|
+
scheduled_for: scheduledFor
|
|
6255
|
+
});
|
|
6256
|
+
|
|
6257
|
+
case 4:
|
|
6258
|
+
_yield$this$client$pa = _context5.sent;
|
|
6259
|
+
campaign = _yield$this$client$pa.campaign;
|
|
6260
|
+
return _context5.abrupt("return", campaign);
|
|
6261
|
+
|
|
6262
|
+
case 7:
|
|
6263
|
+
case "end":
|
|
6264
|
+
return _context5.stop();
|
|
6265
|
+
}
|
|
6266
|
+
}
|
|
6267
|
+
}, _callee5, this);
|
|
6268
|
+
}));
|
|
6269
|
+
|
|
6270
|
+
function schedule(_x3) {
|
|
6271
|
+
return _schedule.apply(this, arguments);
|
|
6272
|
+
}
|
|
6273
|
+
|
|
6274
|
+
return schedule;
|
|
6275
|
+
}()
|
|
6276
|
+
}, {
|
|
6277
|
+
key: "stop",
|
|
6278
|
+
value: function () {
|
|
6279
|
+
var _stop = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
|
|
6280
|
+
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
6281
|
+
while (1) {
|
|
6282
|
+
switch (_context6.prev = _context6.next) {
|
|
6283
|
+
case 0:
|
|
6284
|
+
this.verifyCampaignId();
|
|
6285
|
+
return _context6.abrupt("return", this.client.patch(this.client.baseURL + "/campaigns/".concat(this.id, "/stop")));
|
|
6286
|
+
|
|
6287
|
+
case 2:
|
|
6288
|
+
case "end":
|
|
6289
|
+
return _context6.stop();
|
|
6290
|
+
}
|
|
6291
|
+
}
|
|
6292
|
+
}, _callee6, this);
|
|
6293
|
+
}));
|
|
6294
|
+
|
|
6295
|
+
function stop() {
|
|
6296
|
+
return _stop.apply(this, arguments);
|
|
6297
|
+
}
|
|
6298
|
+
|
|
6299
|
+
return stop;
|
|
6300
|
+
}()
|
|
6301
|
+
}, {
|
|
6302
|
+
key: "pause",
|
|
6303
|
+
value: function () {
|
|
6304
|
+
var _pause = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {
|
|
6305
|
+
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
6306
|
+
while (1) {
|
|
6307
|
+
switch (_context7.prev = _context7.next) {
|
|
6308
|
+
case 0:
|
|
6309
|
+
this.verifyCampaignId();
|
|
6310
|
+
return _context7.abrupt("return", this.client.patch(this.client.baseURL + "/campaigns/".concat(this.id, "/pause")));
|
|
6311
|
+
|
|
6312
|
+
case 2:
|
|
6313
|
+
case "end":
|
|
6314
|
+
return _context7.stop();
|
|
6315
|
+
}
|
|
6316
|
+
}
|
|
6317
|
+
}, _callee7, this);
|
|
6318
|
+
}));
|
|
6319
|
+
|
|
6320
|
+
function pause() {
|
|
6321
|
+
return _pause.apply(this, arguments);
|
|
6322
|
+
}
|
|
6323
|
+
|
|
6324
|
+
return pause;
|
|
6325
|
+
}()
|
|
6326
|
+
}, {
|
|
6327
|
+
key: "resume",
|
|
6328
|
+
value: function () {
|
|
6329
|
+
var _resume = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
|
|
6330
|
+
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
6331
|
+
while (1) {
|
|
6332
|
+
switch (_context8.prev = _context8.next) {
|
|
6333
|
+
case 0:
|
|
6334
|
+
this.verifyCampaignId();
|
|
6335
|
+
return _context8.abrupt("return", this.client.patch(this.client.baseURL + "/campaigns/".concat(this.id, "/resume")));
|
|
6336
|
+
|
|
6337
|
+
case 2:
|
|
6338
|
+
case "end":
|
|
6339
|
+
return _context8.stop();
|
|
6340
|
+
}
|
|
6341
|
+
}
|
|
6342
|
+
}, _callee8, this);
|
|
6343
|
+
}));
|
|
6344
|
+
|
|
6345
|
+
function resume() {
|
|
6346
|
+
return _resume.apply(this, arguments);
|
|
6347
|
+
}
|
|
6348
|
+
|
|
6349
|
+
return resume;
|
|
6350
|
+
}()
|
|
6351
|
+
}, {
|
|
6352
|
+
key: "get",
|
|
6353
|
+
value: function () {
|
|
6354
|
+
var _get = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
|
|
6355
|
+
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
6356
|
+
while (1) {
|
|
6357
|
+
switch (_context9.prev = _context9.next) {
|
|
6358
|
+
case 0:
|
|
6359
|
+
this.verifyCampaignId();
|
|
6360
|
+
return _context9.abrupt("return", this.client.getCampaign(this.id));
|
|
6361
|
+
|
|
6362
|
+
case 2:
|
|
6363
|
+
case "end":
|
|
6364
|
+
return _context9.stop();
|
|
6365
|
+
}
|
|
6366
|
+
}
|
|
6367
|
+
}, _callee9, this);
|
|
6368
|
+
}));
|
|
6369
|
+
|
|
6370
|
+
function get() {
|
|
6371
|
+
return _get.apply(this, arguments);
|
|
6372
|
+
}
|
|
6373
|
+
|
|
6374
|
+
return get;
|
|
6375
|
+
}()
|
|
6376
|
+
}]);
|
|
6377
|
+
|
|
6378
|
+
return Campaign;
|
|
6379
|
+
}();
|
|
6380
|
+
|
|
6381
|
+
var Segment = /*#__PURE__*/function () {
|
|
6382
|
+
function Segment(client, type, id, data) {
|
|
6383
|
+
_classCallCheck(this, Segment);
|
|
6384
|
+
|
|
6385
|
+
_defineProperty(this, "type", void 0);
|
|
6386
|
+
|
|
6387
|
+
_defineProperty(this, "id", void 0);
|
|
6388
|
+
|
|
6389
|
+
_defineProperty(this, "client", void 0);
|
|
6390
|
+
|
|
6391
|
+
_defineProperty(this, "data", void 0);
|
|
6392
|
+
|
|
6393
|
+
this.client = client;
|
|
6394
|
+
this.type = type;
|
|
6395
|
+
this.id = id;
|
|
6396
|
+
this.data = data;
|
|
6397
|
+
}
|
|
6398
|
+
|
|
6399
|
+
_createClass(Segment, [{
|
|
6400
|
+
key: "create",
|
|
6401
|
+
value: function () {
|
|
6402
|
+
var _create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
6403
|
+
var _this$data, _this$data2, _this$data3, _this$data4;
|
|
6404
|
+
|
|
6405
|
+
var body;
|
|
6406
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
6407
|
+
while (1) {
|
|
6408
|
+
switch (_context.prev = _context.next) {
|
|
6409
|
+
case 0:
|
|
6410
|
+
body = {
|
|
6411
|
+
id: this.id,
|
|
6412
|
+
type: this.type,
|
|
6413
|
+
name: (_this$data = this.data) === null || _this$data === void 0 ? void 0 : _this$data.name,
|
|
6414
|
+
filter: (_this$data2 = this.data) === null || _this$data2 === void 0 ? void 0 : _this$data2.filter,
|
|
6415
|
+
description: (_this$data3 = this.data) === null || _this$data3 === void 0 ? void 0 : _this$data3.description,
|
|
6416
|
+
all_users: (_this$data4 = this.data) === null || _this$data4 === void 0 ? void 0 : _this$data4.all_users
|
|
6417
|
+
};
|
|
6418
|
+
return _context.abrupt("return", this.client.post(this.client.baseURL + "/segments", body));
|
|
6419
|
+
|
|
6420
|
+
case 2:
|
|
6421
|
+
case "end":
|
|
6422
|
+
return _context.stop();
|
|
6423
|
+
}
|
|
6424
|
+
}
|
|
6425
|
+
}, _callee, this);
|
|
6426
|
+
}));
|
|
6427
|
+
|
|
6428
|
+
function create() {
|
|
6429
|
+
return _create.apply(this, arguments);
|
|
6430
|
+
}
|
|
6431
|
+
|
|
6432
|
+
return create;
|
|
6433
|
+
}()
|
|
6434
|
+
}, {
|
|
6435
|
+
key: "verifySegmentId",
|
|
6436
|
+
value: function verifySegmentId() {
|
|
6437
|
+
if (!this.id) {
|
|
6438
|
+
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)');
|
|
6439
|
+
}
|
|
6440
|
+
}
|
|
6441
|
+
}, {
|
|
6442
|
+
key: "get",
|
|
6443
|
+
value: function () {
|
|
6444
|
+
var _get = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
6445
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
6446
|
+
while (1) {
|
|
6447
|
+
switch (_context2.prev = _context2.next) {
|
|
6448
|
+
case 0:
|
|
6449
|
+
this.verifySegmentId();
|
|
6450
|
+
return _context2.abrupt("return", this.client.getSegment(this.id));
|
|
6451
|
+
|
|
6452
|
+
case 2:
|
|
6453
|
+
case "end":
|
|
6454
|
+
return _context2.stop();
|
|
6455
|
+
}
|
|
6456
|
+
}
|
|
6457
|
+
}, _callee2, this);
|
|
6458
|
+
}));
|
|
6459
|
+
|
|
6460
|
+
function get() {
|
|
6461
|
+
return _get.apply(this, arguments);
|
|
6462
|
+
}
|
|
6463
|
+
|
|
6464
|
+
return get;
|
|
6465
|
+
}()
|
|
6466
|
+
}, {
|
|
6467
|
+
key: "update",
|
|
6468
|
+
value: function () {
|
|
6469
|
+
var _update = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(data) {
|
|
6470
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
6471
|
+
while (1) {
|
|
6472
|
+
switch (_context3.prev = _context3.next) {
|
|
6473
|
+
case 0:
|
|
6474
|
+
this.verifySegmentId();
|
|
6475
|
+
return _context3.abrupt("return", this.client.updateSegment(this.id, data));
|
|
6476
|
+
|
|
6477
|
+
case 2:
|
|
6478
|
+
case "end":
|
|
6479
|
+
return _context3.stop();
|
|
6480
|
+
}
|
|
6481
|
+
}
|
|
6482
|
+
}, _callee3, this);
|
|
6483
|
+
}));
|
|
6484
|
+
|
|
6485
|
+
function update(_x) {
|
|
6486
|
+
return _update.apply(this, arguments);
|
|
6487
|
+
}
|
|
6488
|
+
|
|
6489
|
+
return update;
|
|
6490
|
+
}()
|
|
6491
|
+
}, {
|
|
6492
|
+
key: "addTargets",
|
|
6493
|
+
value: function () {
|
|
6494
|
+
var _addTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(targets) {
|
|
6495
|
+
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
6496
|
+
while (1) {
|
|
6497
|
+
switch (_context4.prev = _context4.next) {
|
|
6498
|
+
case 0:
|
|
6499
|
+
this.verifySegmentId();
|
|
6500
|
+
return _context4.abrupt("return", this.client.addSegmentTargets(this.id, targets));
|
|
6501
|
+
|
|
6502
|
+
case 2:
|
|
6503
|
+
case "end":
|
|
6504
|
+
return _context4.stop();
|
|
6505
|
+
}
|
|
6506
|
+
}
|
|
6507
|
+
}, _callee4, this);
|
|
6508
|
+
}));
|
|
6509
|
+
|
|
6510
|
+
function addTargets(_x2) {
|
|
6511
|
+
return _addTargets.apply(this, arguments);
|
|
6512
|
+
}
|
|
6513
|
+
|
|
6514
|
+
return addTargets;
|
|
6515
|
+
}()
|
|
6516
|
+
}, {
|
|
6517
|
+
key: "removeTargets",
|
|
6518
|
+
value: function () {
|
|
6519
|
+
var _removeTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(targets) {
|
|
6520
|
+
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
6521
|
+
while (1) {
|
|
6522
|
+
switch (_context5.prev = _context5.next) {
|
|
6523
|
+
case 0:
|
|
6524
|
+
this.verifySegmentId();
|
|
6525
|
+
return _context5.abrupt("return", this.client.removeSegmentTargets(this.id, targets));
|
|
6526
|
+
|
|
6527
|
+
case 2:
|
|
6528
|
+
case "end":
|
|
6529
|
+
return _context5.stop();
|
|
6530
|
+
}
|
|
6531
|
+
}
|
|
6532
|
+
}, _callee5, this);
|
|
6533
|
+
}));
|
|
6534
|
+
|
|
6535
|
+
function removeTargets(_x3) {
|
|
6536
|
+
return _removeTargets.apply(this, arguments);
|
|
6537
|
+
}
|
|
6538
|
+
|
|
6539
|
+
return removeTargets;
|
|
6540
|
+
}()
|
|
6541
|
+
}, {
|
|
6542
|
+
key: "delete",
|
|
6543
|
+
value: function () {
|
|
6544
|
+
var _delete2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
|
|
6545
|
+
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
6546
|
+
while (1) {
|
|
6547
|
+
switch (_context6.prev = _context6.next) {
|
|
6548
|
+
case 0:
|
|
6549
|
+
this.verifySegmentId();
|
|
6550
|
+
return _context6.abrupt("return", this.client.deleteSegment(this.id));
|
|
6551
|
+
|
|
6552
|
+
case 2:
|
|
6553
|
+
case "end":
|
|
6554
|
+
return _context6.stop();
|
|
6555
|
+
}
|
|
6556
|
+
}
|
|
6557
|
+
}, _callee6, this);
|
|
6558
|
+
}));
|
|
6559
|
+
|
|
6560
|
+
function _delete() {
|
|
6561
|
+
return _delete2.apply(this, arguments);
|
|
6562
|
+
}
|
|
6563
|
+
|
|
6564
|
+
return _delete;
|
|
6565
|
+
}()
|
|
6566
|
+
}, {
|
|
6567
|
+
key: "targetExists",
|
|
6568
|
+
value: function () {
|
|
6569
|
+
var _targetExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(targetId) {
|
|
6570
|
+
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
6571
|
+
while (1) {
|
|
6572
|
+
switch (_context7.prev = _context7.next) {
|
|
6573
|
+
case 0:
|
|
6574
|
+
this.verifySegmentId();
|
|
6575
|
+
return _context7.abrupt("return", this.client.segmentTargetExists(this.id, targetId));
|
|
6576
|
+
|
|
6577
|
+
case 2:
|
|
6578
|
+
case "end":
|
|
6579
|
+
return _context7.stop();
|
|
6580
|
+
}
|
|
6581
|
+
}
|
|
6582
|
+
}, _callee7, this);
|
|
6583
|
+
}));
|
|
6584
|
+
|
|
6585
|
+
function targetExists(_x4) {
|
|
6586
|
+
return _targetExists.apply(this, arguments);
|
|
6587
|
+
}
|
|
6588
|
+
|
|
6589
|
+
return targetExists;
|
|
6590
|
+
}()
|
|
6591
|
+
}, {
|
|
6592
|
+
key: "queryTargets",
|
|
6593
|
+
value: function () {
|
|
6594
|
+
var _queryTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
|
|
6595
|
+
var filter,
|
|
6596
|
+
sort,
|
|
6597
|
+
options,
|
|
6598
|
+
_args8 = arguments;
|
|
6599
|
+
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
6600
|
+
while (1) {
|
|
6601
|
+
switch (_context8.prev = _context8.next) {
|
|
6602
|
+
case 0:
|
|
6603
|
+
filter = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
|
|
6604
|
+
sort = _args8.length > 1 && _args8[1] !== undefined ? _args8[1] : [];
|
|
6605
|
+
options = _args8.length > 2 && _args8[2] !== undefined ? _args8[2] : {};
|
|
6606
|
+
this.verifySegmentId();
|
|
6607
|
+
return _context8.abrupt("return", this.client.querySegmentTargets(this.id, filter, sort, options));
|
|
6608
|
+
|
|
6609
|
+
case 5:
|
|
6610
|
+
case "end":
|
|
6611
|
+
return _context8.stop();
|
|
6612
|
+
}
|
|
6613
|
+
}
|
|
6614
|
+
}, _callee8, this);
|
|
6615
|
+
}));
|
|
6616
|
+
|
|
6617
|
+
function queryTargets() {
|
|
6618
|
+
return _queryTargets.apply(this, arguments);
|
|
6619
|
+
}
|
|
6620
|
+
|
|
6621
|
+
return queryTargets;
|
|
6622
|
+
}()
|
|
6623
|
+
}]);
|
|
6624
|
+
|
|
6625
|
+
return Segment;
|
|
6626
|
+
}();
|
|
6627
|
+
|
|
6090
6628
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
6091
6629
|
|
|
6092
6630
|
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; } }
|
|
@@ -10604,7 +11142,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10604
11142
|
}, {
|
|
10605
11143
|
key: "getUserAgent",
|
|
10606
11144
|
value: function getUserAgent() {
|
|
10607
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.
|
|
11145
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.18.0");
|
|
10608
11146
|
}
|
|
10609
11147
|
}, {
|
|
10610
11148
|
key: "setUserAgent",
|
|
@@ -10901,6 +11439,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10901
11439
|
value: function getExportChannelStatus(id) {
|
|
10902
11440
|
return this.get("".concat(this.baseURL, "/export_channels/").concat(id));
|
|
10903
11441
|
}
|
|
11442
|
+
}, {
|
|
11443
|
+
key: "campaign",
|
|
11444
|
+
value: function campaign(idOrData, data) {
|
|
11445
|
+
if (typeof idOrData === 'string') {
|
|
11446
|
+
return new Campaign(this, idOrData, data);
|
|
11447
|
+
}
|
|
11448
|
+
|
|
11449
|
+
return new Campaign(this, null, idOrData);
|
|
11450
|
+
}
|
|
11451
|
+
}, {
|
|
11452
|
+
key: "segment",
|
|
11453
|
+
value: function segment(type, idOrData, data) {
|
|
11454
|
+
if (typeof idOrData === 'string') {
|
|
11455
|
+
return new Segment(this, type, idOrData, data);
|
|
11456
|
+
}
|
|
11457
|
+
|
|
11458
|
+
return new Segment(this, type, null, idOrData);
|
|
11459
|
+
}
|
|
11460
|
+
}, {
|
|
11461
|
+
key: "validateServerSideAuth",
|
|
11462
|
+
value: function validateServerSideAuth() {
|
|
11463
|
+
if (!this.secret) {
|
|
11464
|
+
throw new Error('Campaigns is a server-side only feature. Please initialize the client with a secret to use this feature.');
|
|
11465
|
+
}
|
|
11466
|
+
}
|
|
10904
11467
|
/**
|
|
10905
11468
|
* createSegment - Creates a segment
|
|
10906
11469
|
*
|
|
@@ -10910,34 +11473,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10910
11473
|
* @param {string} name Segment name (valid UUID)
|
|
10911
11474
|
* @param {SegmentData} params Segment data
|
|
10912
11475
|
*
|
|
10913
|
-
* @return {
|
|
11476
|
+
* @return {{segment: SegmentResponse} & APIResponse} The created Segment
|
|
10914
11477
|
*/
|
|
10915
11478
|
|
|
10916
11479
|
}, {
|
|
10917
11480
|
key: "createSegment",
|
|
10918
11481
|
value: function () {
|
|
10919
11482
|
var _createSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee63(type, id, name, data) {
|
|
10920
|
-
var body
|
|
10921
|
-
|
|
11483
|
+
var body;
|
|
10922
11484
|
return _regeneratorRuntime.wrap(function _callee63$(_context63) {
|
|
10923
11485
|
while (1) {
|
|
10924
11486
|
switch (_context63.prev = _context63.next) {
|
|
10925
11487
|
case 0:
|
|
11488
|
+
this.validateServerSideAuth();
|
|
10926
11489
|
body = {
|
|
10927
11490
|
id: id,
|
|
10928
11491
|
type: type,
|
|
10929
11492
|
name: name,
|
|
10930
11493
|
data: data
|
|
10931
11494
|
};
|
|
10932
|
-
_context63.
|
|
10933
|
-
return this.post(this.baseURL + "/segments", body);
|
|
11495
|
+
return _context63.abrupt("return", this.post(this.baseURL + "/segments", body));
|
|
10934
11496
|
|
|
10935
11497
|
case 3:
|
|
10936
|
-
_yield$this$post = _context63.sent;
|
|
10937
|
-
segment = _yield$this$post.segment;
|
|
10938
|
-
return _context63.abrupt("return", segment);
|
|
10939
|
-
|
|
10940
|
-
case 6:
|
|
10941
11498
|
case "end":
|
|
10942
11499
|
return _context63.stop();
|
|
10943
11500
|
}
|
|
@@ -10969,13 +11526,10 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10969
11526
|
while (1) {
|
|
10970
11527
|
switch (_context64.prev = _context64.next) {
|
|
10971
11528
|
case 0:
|
|
10972
|
-
|
|
10973
|
-
return this.createSegment('user', id, name, data);
|
|
11529
|
+
this.validateServerSideAuth();
|
|
11530
|
+
return _context64.abrupt("return", this.createSegment('user', id, name, data));
|
|
10974
11531
|
|
|
10975
11532
|
case 2:
|
|
10976
|
-
return _context64.abrupt("return", _context64.sent);
|
|
10977
|
-
|
|
10978
|
-
case 3:
|
|
10979
11533
|
case "end":
|
|
10980
11534
|
return _context64.stop();
|
|
10981
11535
|
}
|
|
@@ -11007,13 +11561,10 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11007
11561
|
while (1) {
|
|
11008
11562
|
switch (_context65.prev = _context65.next) {
|
|
11009
11563
|
case 0:
|
|
11010
|
-
|
|
11011
|
-
return this.createSegment('channel', id, name, data);
|
|
11564
|
+
this.validateServerSideAuth();
|
|
11565
|
+
return _context65.abrupt("return", this.createSegment('channel', id, name, data));
|
|
11012
11566
|
|
|
11013
11567
|
case 2:
|
|
11014
|
-
return _context65.abrupt("return", _context65.sent);
|
|
11015
|
-
|
|
11016
|
-
case 3:
|
|
11017
11568
|
case "end":
|
|
11018
11569
|
return _context65.stop();
|
|
11019
11570
|
}
|
|
@@ -11027,34 +11578,18 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11027
11578
|
|
|
11028
11579
|
return createChannelSegment;
|
|
11029
11580
|
}()
|
|
11030
|
-
/**
|
|
11031
|
-
* updateSegment - Update a segment
|
|
11032
|
-
*
|
|
11033
|
-
* @param {string} id Segment ID
|
|
11034
|
-
* @param {Partial<UpdateSegmentData>} data Data to update
|
|
11035
|
-
*
|
|
11036
|
-
* @return {Segment} Updated Segment
|
|
11037
|
-
*/
|
|
11038
|
-
|
|
11039
11581
|
}, {
|
|
11040
|
-
key: "
|
|
11582
|
+
key: "getSegment",
|
|
11041
11583
|
value: function () {
|
|
11042
|
-
var
|
|
11043
|
-
var _yield$this$put, segment;
|
|
11044
|
-
|
|
11584
|
+
var _getSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66(id) {
|
|
11045
11585
|
return _regeneratorRuntime.wrap(function _callee66$(_context66) {
|
|
11046
11586
|
while (1) {
|
|
11047
11587
|
switch (_context66.prev = _context66.next) {
|
|
11048
11588
|
case 0:
|
|
11049
|
-
|
|
11050
|
-
return this.
|
|
11589
|
+
this.validateServerSideAuth();
|
|
11590
|
+
return _context66.abrupt("return", this.get(this.baseURL + "/segments/".concat(id)));
|
|
11051
11591
|
|
|
11052
11592
|
case 2:
|
|
11053
|
-
_yield$this$put = _context66.sent;
|
|
11054
|
-
segment = _yield$this$put.segment;
|
|
11055
|
-
return _context66.abrupt("return", segment);
|
|
11056
|
-
|
|
11057
|
-
case 5:
|
|
11058
11593
|
case "end":
|
|
11059
11594
|
return _context66.stop();
|
|
11060
11595
|
}
|
|
@@ -11062,40 +11597,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11062
11597
|
}, _callee66, this);
|
|
11063
11598
|
}));
|
|
11064
11599
|
|
|
11065
|
-
function
|
|
11066
|
-
return
|
|
11600
|
+
function getSegment(_x94) {
|
|
11601
|
+
return _getSegment.apply(this, arguments);
|
|
11067
11602
|
}
|
|
11068
11603
|
|
|
11069
|
-
return
|
|
11604
|
+
return getSegment;
|
|
11070
11605
|
}()
|
|
11071
11606
|
/**
|
|
11072
|
-
*
|
|
11607
|
+
* updateSegment - Update a segment
|
|
11073
11608
|
*
|
|
11074
11609
|
* @param {string} id Segment ID
|
|
11075
|
-
* @param {
|
|
11610
|
+
* @param {Partial<UpdateSegmentData>} data Data to update
|
|
11076
11611
|
*
|
|
11077
|
-
* @return {
|
|
11612
|
+
* @return {Segment} Updated Segment
|
|
11078
11613
|
*/
|
|
11079
11614
|
|
|
11080
11615
|
}, {
|
|
11081
|
-
key: "
|
|
11616
|
+
key: "updateSegment",
|
|
11082
11617
|
value: function () {
|
|
11083
|
-
var
|
|
11084
|
-
var body;
|
|
11618
|
+
var _updateSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67(id, data) {
|
|
11085
11619
|
return _regeneratorRuntime.wrap(function _callee67$(_context67) {
|
|
11086
11620
|
while (1) {
|
|
11087
11621
|
switch (_context67.prev = _context67.next) {
|
|
11088
11622
|
case 0:
|
|
11089
|
-
|
|
11090
|
-
|
|
11091
|
-
};
|
|
11092
|
-
_context67.next = 3;
|
|
11093
|
-
return this.post(this.baseURL + "/segments/".concat(id, "/addtargets"), body);
|
|
11094
|
-
|
|
11095
|
-
case 3:
|
|
11096
|
-
return _context67.abrupt("return", _context67.sent);
|
|
11623
|
+
this.validateServerSideAuth();
|
|
11624
|
+
return _context67.abrupt("return", this.put(this.baseURL + "/segments/".concat(id), data));
|
|
11097
11625
|
|
|
11098
|
-
case
|
|
11626
|
+
case 2:
|
|
11099
11627
|
case "end":
|
|
11100
11628
|
return _context67.stop();
|
|
11101
11629
|
}
|
|
@@ -11103,14 +11631,14 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11103
11631
|
}, _callee67, this);
|
|
11104
11632
|
}));
|
|
11105
11633
|
|
|
11106
|
-
function
|
|
11107
|
-
return
|
|
11634
|
+
function updateSegment(_x95, _x96) {
|
|
11635
|
+
return _updateSegment.apply(this, arguments);
|
|
11108
11636
|
}
|
|
11109
11637
|
|
|
11110
|
-
return
|
|
11638
|
+
return updateSegment;
|
|
11111
11639
|
}()
|
|
11112
11640
|
/**
|
|
11113
|
-
*
|
|
11641
|
+
* addSegmentTargets - Add targets to a segment
|
|
11114
11642
|
*
|
|
11115
11643
|
* @param {string} id Segment ID
|
|
11116
11644
|
* @param {string[]} targets Targets to add to the segment
|
|
@@ -11119,24 +11647,21 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11119
11647
|
*/
|
|
11120
11648
|
|
|
11121
11649
|
}, {
|
|
11122
|
-
key: "
|
|
11650
|
+
key: "addSegmentTargets",
|
|
11123
11651
|
value: function () {
|
|
11124
|
-
var
|
|
11652
|
+
var _addSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68(id, targets) {
|
|
11125
11653
|
var body;
|
|
11126
11654
|
return _regeneratorRuntime.wrap(function _callee68$(_context68) {
|
|
11127
11655
|
while (1) {
|
|
11128
11656
|
switch (_context68.prev = _context68.next) {
|
|
11129
11657
|
case 0:
|
|
11658
|
+
this.validateServerSideAuth();
|
|
11130
11659
|
body = {
|
|
11131
|
-
|
|
11660
|
+
target_ids: targets
|
|
11132
11661
|
};
|
|
11133
|
-
_context68.
|
|
11134
|
-
return this.post(this.baseURL + "/segments/".concat(id, "/deletetargets"), body);
|
|
11662
|
+
return _context68.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/addtargets"), body));
|
|
11135
11663
|
|
|
11136
11664
|
case 3:
|
|
11137
|
-
return _context68.abrupt("return", _context68.sent);
|
|
11138
|
-
|
|
11139
|
-
case 4:
|
|
11140
11665
|
case "end":
|
|
11141
11666
|
return _context68.stop();
|
|
11142
11667
|
}
|
|
@@ -11144,43 +11669,34 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11144
11669
|
}, _callee68, this);
|
|
11145
11670
|
}));
|
|
11146
11671
|
|
|
11147
|
-
function
|
|
11148
|
-
return
|
|
11672
|
+
function addSegmentTargets(_x97, _x98) {
|
|
11673
|
+
return _addSegmentTargets.apply(this, arguments);
|
|
11149
11674
|
}
|
|
11150
11675
|
|
|
11151
|
-
return
|
|
11676
|
+
return addSegmentTargets;
|
|
11152
11677
|
}()
|
|
11153
|
-
/**
|
|
11154
|
-
* querySegments - Query Segments
|
|
11155
|
-
*
|
|
11156
|
-
* @param {filter} filter MongoDB style filter conditions
|
|
11157
|
-
* @param {QuerySegmentsOptions} options Options for sorting/paginating the results
|
|
11158
|
-
*
|
|
11159
|
-
* @return {Segment[]} Segments
|
|
11160
|
-
*/
|
|
11161
|
-
|
|
11162
11678
|
}, {
|
|
11163
|
-
key: "
|
|
11679
|
+
key: "querySegmentTargets",
|
|
11164
11680
|
value: function () {
|
|
11165
|
-
var
|
|
11166
|
-
var
|
|
11681
|
+
var _querySegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69(id) {
|
|
11682
|
+
var filter,
|
|
11683
|
+
sort,
|
|
11684
|
+
options,
|
|
11167
11685
|
_args69 = arguments;
|
|
11168
11686
|
return _regeneratorRuntime.wrap(function _callee69$(_context69) {
|
|
11169
11687
|
while (1) {
|
|
11170
11688
|
switch (_context69.prev = _context69.next) {
|
|
11171
11689
|
case 0:
|
|
11172
|
-
|
|
11173
|
-
|
|
11174
|
-
|
|
11175
|
-
|
|
11176
|
-
|
|
11177
|
-
},
|
|
11178
|
-
|
|
11179
|
-
|
|
11180
|
-
case 3:
|
|
11181
|
-
return _context69.abrupt("return", _context69.sent);
|
|
11690
|
+
filter = _args69.length > 1 && _args69[1] !== undefined ? _args69[1] : {};
|
|
11691
|
+
sort = _args69.length > 2 && _args69[2] !== undefined ? _args69[2] : [];
|
|
11692
|
+
options = _args69.length > 3 && _args69[3] !== undefined ? _args69[3] : {};
|
|
11693
|
+
this.validateServerSideAuth();
|
|
11694
|
+
return _context69.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/targets/query"), _objectSpread({
|
|
11695
|
+
filter: filter || {},
|
|
11696
|
+
sort: sort || []
|
|
11697
|
+
}, options)));
|
|
11182
11698
|
|
|
11183
|
-
case
|
|
11699
|
+
case 5:
|
|
11184
11700
|
case "end":
|
|
11185
11701
|
return _context69.stop();
|
|
11186
11702
|
}
|
|
@@ -11188,33 +11704,35 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11188
11704
|
}, _callee69, this);
|
|
11189
11705
|
}));
|
|
11190
11706
|
|
|
11191
|
-
function
|
|
11192
|
-
return
|
|
11707
|
+
function querySegmentTargets(_x99) {
|
|
11708
|
+
return _querySegmentTargets.apply(this, arguments);
|
|
11193
11709
|
}
|
|
11194
11710
|
|
|
11195
|
-
return
|
|
11711
|
+
return querySegmentTargets;
|
|
11196
11712
|
}()
|
|
11197
11713
|
/**
|
|
11198
|
-
*
|
|
11714
|
+
* removeSegmentTargets - Remove targets from a segment
|
|
11199
11715
|
*
|
|
11200
11716
|
* @param {string} id Segment ID
|
|
11717
|
+
* @param {string[]} targets Targets to add to the segment
|
|
11201
11718
|
*
|
|
11202
|
-
* @return {
|
|
11719
|
+
* @return {APIResponse} API response
|
|
11203
11720
|
*/
|
|
11204
11721
|
|
|
11205
11722
|
}, {
|
|
11206
|
-
key: "
|
|
11723
|
+
key: "removeSegmentTargets",
|
|
11207
11724
|
value: function () {
|
|
11208
|
-
var
|
|
11725
|
+
var _removeSegmentTargets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70(id, targets) {
|
|
11726
|
+
var body;
|
|
11209
11727
|
return _regeneratorRuntime.wrap(function _callee70$(_context70) {
|
|
11210
11728
|
while (1) {
|
|
11211
11729
|
switch (_context70.prev = _context70.next) {
|
|
11212
11730
|
case 0:
|
|
11213
|
-
|
|
11214
|
-
|
|
11215
|
-
|
|
11216
|
-
|
|
11217
|
-
return _context70.abrupt("return",
|
|
11731
|
+
this.validateServerSideAuth();
|
|
11732
|
+
body = {
|
|
11733
|
+
target_ids: targets
|
|
11734
|
+
};
|
|
11735
|
+
return _context70.abrupt("return", this.post(this.baseURL + "/segments/".concat(id, "/deletetargets"), body));
|
|
11218
11736
|
|
|
11219
11737
|
case 3:
|
|
11220
11738
|
case "end":
|
|
@@ -11224,34 +11742,37 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11224
11742
|
}, _callee70, this);
|
|
11225
11743
|
}));
|
|
11226
11744
|
|
|
11227
|
-
function
|
|
11228
|
-
return
|
|
11745
|
+
function removeSegmentTargets(_x100, _x101) {
|
|
11746
|
+
return _removeSegmentTargets.apply(this, arguments);
|
|
11229
11747
|
}
|
|
11230
11748
|
|
|
11231
|
-
return
|
|
11749
|
+
return removeSegmentTargets;
|
|
11232
11750
|
}()
|
|
11233
11751
|
/**
|
|
11234
|
-
*
|
|
11752
|
+
* querySegments - Query Segments
|
|
11235
11753
|
*
|
|
11236
|
-
* @param {
|
|
11237
|
-
* @param {
|
|
11754
|
+
* @param {filter} filter MongoDB style filter conditions
|
|
11755
|
+
* @param {QuerySegmentsOptions} options Options for sorting/paginating the results
|
|
11238
11756
|
*
|
|
11239
|
-
* @return {
|
|
11757
|
+
* @return {Segment[]} Segments
|
|
11240
11758
|
*/
|
|
11241
11759
|
|
|
11242
11760
|
}, {
|
|
11243
|
-
key: "
|
|
11761
|
+
key: "querySegments",
|
|
11244
11762
|
value: function () {
|
|
11245
|
-
var
|
|
11763
|
+
var _querySegments = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71(filter, sort) {
|
|
11764
|
+
var options,
|
|
11765
|
+
_args71 = arguments;
|
|
11246
11766
|
return _regeneratorRuntime.wrap(function _callee71$(_context71) {
|
|
11247
11767
|
while (1) {
|
|
11248
11768
|
switch (_context71.prev = _context71.next) {
|
|
11249
11769
|
case 0:
|
|
11250
|
-
|
|
11251
|
-
|
|
11252
|
-
|
|
11253
|
-
|
|
11254
|
-
|
|
11770
|
+
options = _args71.length > 2 && _args71[2] !== undefined ? _args71[2] : {};
|
|
11771
|
+
this.validateServerSideAuth();
|
|
11772
|
+
return _context71.abrupt("return", this.post(this.baseURL + "/segments/query", _objectSpread({
|
|
11773
|
+
filter: filter,
|
|
11774
|
+
sort: sort
|
|
11775
|
+
}, options)));
|
|
11255
11776
|
|
|
11256
11777
|
case 3:
|
|
11257
11778
|
case "end":
|
|
@@ -11261,41 +11782,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11261
11782
|
}, _callee71, this);
|
|
11262
11783
|
}));
|
|
11263
11784
|
|
|
11264
|
-
function
|
|
11265
|
-
return
|
|
11785
|
+
function querySegments(_x102, _x103) {
|
|
11786
|
+
return _querySegments.apply(this, arguments);
|
|
11266
11787
|
}
|
|
11267
11788
|
|
|
11268
|
-
return
|
|
11789
|
+
return querySegments;
|
|
11269
11790
|
}()
|
|
11270
11791
|
/**
|
|
11271
|
-
*
|
|
11792
|
+
* deleteSegment - Delete a Campaign Segment
|
|
11272
11793
|
*
|
|
11273
|
-
* @param {
|
|
11794
|
+
* @param {string} id Segment ID
|
|
11274
11795
|
*
|
|
11275
|
-
* @return {
|
|
11796
|
+
* @return {Promise<APIResponse>} The Server Response
|
|
11276
11797
|
*/
|
|
11277
11798
|
|
|
11278
11799
|
}, {
|
|
11279
|
-
key: "
|
|
11800
|
+
key: "deleteSegment",
|
|
11280
11801
|
value: function () {
|
|
11281
|
-
var
|
|
11282
|
-
var _yield$this$post2, campaign;
|
|
11283
|
-
|
|
11802
|
+
var _deleteSegment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72(id) {
|
|
11284
11803
|
return _regeneratorRuntime.wrap(function _callee72$(_context72) {
|
|
11285
11804
|
while (1) {
|
|
11286
11805
|
switch (_context72.prev = _context72.next) {
|
|
11287
11806
|
case 0:
|
|
11288
|
-
|
|
11289
|
-
return this.
|
|
11290
|
-
campaign: params
|
|
11291
|
-
});
|
|
11807
|
+
this.validateServerSideAuth();
|
|
11808
|
+
return _context72.abrupt("return", this.delete(this.baseURL + "/segments/".concat(id)));
|
|
11292
11809
|
|
|
11293
11810
|
case 2:
|
|
11294
|
-
_yield$this$post2 = _context72.sent;
|
|
11295
|
-
campaign = _yield$this$post2.campaign;
|
|
11296
|
-
return _context72.abrupt("return", campaign);
|
|
11297
|
-
|
|
11298
|
-
case 5:
|
|
11299
11811
|
case "end":
|
|
11300
11812
|
return _context72.stop();
|
|
11301
11813
|
}
|
|
@@ -11303,41 +11815,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11303
11815
|
}, _callee72, this);
|
|
11304
11816
|
}));
|
|
11305
11817
|
|
|
11306
|
-
function
|
|
11307
|
-
return
|
|
11818
|
+
function deleteSegment(_x104) {
|
|
11819
|
+
return _deleteSegment.apply(this, arguments);
|
|
11308
11820
|
}
|
|
11309
11821
|
|
|
11310
|
-
return
|
|
11822
|
+
return deleteSegment;
|
|
11311
11823
|
}()
|
|
11312
11824
|
/**
|
|
11313
|
-
*
|
|
11825
|
+
* segmentTargetExists - Check if a target exists in a segment
|
|
11314
11826
|
*
|
|
11827
|
+
* @param {string} segmentId Segment ID
|
|
11828
|
+
* @param {string} targetId Target ID
|
|
11315
11829
|
*
|
|
11316
|
-
* @return {
|
|
11830
|
+
* @return {Promise<APIResponse>} The Server Response
|
|
11317
11831
|
*/
|
|
11318
11832
|
|
|
11319
11833
|
}, {
|
|
11320
|
-
key: "
|
|
11834
|
+
key: "segmentTargetExists",
|
|
11321
11835
|
value: function () {
|
|
11322
|
-
var
|
|
11323
|
-
var options,
|
|
11324
|
-
_args73 = arguments;
|
|
11836
|
+
var _segmentTargetExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73(segmentId, targetId) {
|
|
11325
11837
|
return _regeneratorRuntime.wrap(function _callee73$(_context73) {
|
|
11326
11838
|
while (1) {
|
|
11327
11839
|
switch (_context73.prev = _context73.next) {
|
|
11328
11840
|
case 0:
|
|
11329
|
-
|
|
11330
|
-
_context73.
|
|
11331
|
-
return this.get(this.baseURL + "/campaigns", {
|
|
11332
|
-
payload: _objectSpread({
|
|
11333
|
-
filter_conditions: filters
|
|
11334
|
-
}, options)
|
|
11335
|
-
});
|
|
11336
|
-
|
|
11337
|
-
case 3:
|
|
11338
|
-
return _context73.abrupt("return", _context73.sent);
|
|
11841
|
+
this.validateServerSideAuth();
|
|
11842
|
+
return _context73.abrupt("return", this.get(this.baseURL + "/segments/".concat(segmentId, "/target/").concat(targetId)));
|
|
11339
11843
|
|
|
11340
|
-
case
|
|
11844
|
+
case 2:
|
|
11341
11845
|
case "end":
|
|
11342
11846
|
return _context73.stop();
|
|
11343
11847
|
}
|
|
@@ -11345,42 +11849,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11345
11849
|
}, _callee73, this);
|
|
11346
11850
|
}));
|
|
11347
11851
|
|
|
11348
|
-
function
|
|
11349
|
-
return
|
|
11852
|
+
function segmentTargetExists(_x105, _x106) {
|
|
11853
|
+
return _segmentTargetExists.apply(this, arguments);
|
|
11350
11854
|
}
|
|
11351
11855
|
|
|
11352
|
-
return
|
|
11856
|
+
return segmentTargetExists;
|
|
11353
11857
|
}()
|
|
11354
11858
|
/**
|
|
11355
|
-
*
|
|
11859
|
+
* createCampaign - Creates a Campaign
|
|
11356
11860
|
*
|
|
11357
|
-
* @param {
|
|
11358
|
-
* @param {Partial<CampaignData>} params Campaign data
|
|
11861
|
+
* @param {CampaignData} params Campaign data
|
|
11359
11862
|
*
|
|
11360
|
-
* @return {Campaign}
|
|
11863
|
+
* @return {Campaign} The Created Campaign
|
|
11361
11864
|
*/
|
|
11362
11865
|
|
|
11363
11866
|
}, {
|
|
11364
|
-
key: "
|
|
11867
|
+
key: "createCampaign",
|
|
11365
11868
|
value: function () {
|
|
11366
|
-
var
|
|
11367
|
-
var _yield$this$put2, campaign;
|
|
11368
|
-
|
|
11869
|
+
var _createCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee74(params) {
|
|
11369
11870
|
return _regeneratorRuntime.wrap(function _callee74$(_context74) {
|
|
11370
11871
|
while (1) {
|
|
11371
11872
|
switch (_context74.prev = _context74.next) {
|
|
11372
11873
|
case 0:
|
|
11373
|
-
|
|
11374
|
-
return this.
|
|
11375
|
-
campaign: params
|
|
11376
|
-
});
|
|
11874
|
+
this.validateServerSideAuth();
|
|
11875
|
+
return _context74.abrupt("return", this.post(this.baseURL + "/campaigns", _objectSpread({}, params)));
|
|
11377
11876
|
|
|
11378
11877
|
case 2:
|
|
11379
|
-
_yield$this$put2 = _context74.sent;
|
|
11380
|
-
campaign = _yield$this$put2.campaign;
|
|
11381
|
-
return _context74.abrupt("return", campaign);
|
|
11382
|
-
|
|
11383
|
-
case 5:
|
|
11384
11878
|
case "end":
|
|
11385
11879
|
return _context74.stop();
|
|
11386
11880
|
}
|
|
@@ -11388,32 +11882,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11388
11882
|
}, _callee74, this);
|
|
11389
11883
|
}));
|
|
11390
11884
|
|
|
11391
|
-
function
|
|
11392
|
-
return
|
|
11885
|
+
function createCampaign(_x107) {
|
|
11886
|
+
return _createCampaign.apply(this, arguments);
|
|
11393
11887
|
}
|
|
11394
11888
|
|
|
11395
|
-
return
|
|
11889
|
+
return createCampaign;
|
|
11396
11890
|
}()
|
|
11397
|
-
/**
|
|
11398
|
-
* deleteCampaign - Delete a Campaign
|
|
11399
|
-
*
|
|
11400
|
-
* @param {string} id Campaign ID
|
|
11401
|
-
*
|
|
11402
|
-
* @return {Promise<APIResponse>} The Server Response
|
|
11403
|
-
*/
|
|
11404
|
-
|
|
11405
11891
|
}, {
|
|
11406
|
-
key: "
|
|
11892
|
+
key: "getCampaign",
|
|
11407
11893
|
value: function () {
|
|
11408
|
-
var
|
|
11409
|
-
var params,
|
|
11410
|
-
_args75 = arguments;
|
|
11894
|
+
var _getCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee75(id) {
|
|
11411
11895
|
return _regeneratorRuntime.wrap(function _callee75$(_context75) {
|
|
11412
11896
|
while (1) {
|
|
11413
11897
|
switch (_context75.prev = _context75.next) {
|
|
11414
11898
|
case 0:
|
|
11415
|
-
|
|
11416
|
-
return _context75.abrupt("return", this.
|
|
11899
|
+
this.validateServerSideAuth();
|
|
11900
|
+
return _context75.abrupt("return", this.get(this.baseURL + "/campaigns/".concat(id)));
|
|
11417
11901
|
|
|
11418
11902
|
case 2:
|
|
11419
11903
|
case "end":
|
|
@@ -11423,43 +11907,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11423
11907
|
}, _callee75, this);
|
|
11424
11908
|
}));
|
|
11425
11909
|
|
|
11426
|
-
function
|
|
11427
|
-
return
|
|
11910
|
+
function getCampaign(_x108) {
|
|
11911
|
+
return _getCampaign.apply(this, arguments);
|
|
11428
11912
|
}
|
|
11429
11913
|
|
|
11430
|
-
return
|
|
11914
|
+
return getCampaign;
|
|
11431
11915
|
}()
|
|
11432
|
-
/**
|
|
11433
|
-
* scheduleCampaign - Schedule a Campaign
|
|
11434
|
-
*
|
|
11435
|
-
* @param {string} id Campaign ID
|
|
11436
|
-
* @param {{scheduledFor: number}} params Schedule params
|
|
11437
|
-
*
|
|
11438
|
-
* @return {Campaign} Scheduled Campaign
|
|
11439
|
-
*/
|
|
11440
|
-
|
|
11441
11916
|
}, {
|
|
11442
|
-
key: "
|
|
11917
|
+
key: "startCampaign",
|
|
11443
11918
|
value: function () {
|
|
11444
|
-
var
|
|
11445
|
-
var scheduledFor, _yield$this$patch, campaign;
|
|
11446
|
-
|
|
11919
|
+
var _startCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee76(id, scheduledFor) {
|
|
11447
11920
|
return _regeneratorRuntime.wrap(function _callee76$(_context76) {
|
|
11448
11921
|
while (1) {
|
|
11449
11922
|
switch (_context76.prev = _context76.next) {
|
|
11450
11923
|
case 0:
|
|
11451
|
-
|
|
11452
|
-
_context76.
|
|
11453
|
-
return this.patch(this.baseURL + "/campaigns/".concat(id, "/schedule"), {
|
|
11924
|
+
this.validateServerSideAuth();
|
|
11925
|
+
return _context76.abrupt("return", this.post(this.baseURL + "/campaigns/".concat(id, "/start"), {
|
|
11454
11926
|
scheduled_for: scheduledFor
|
|
11455
|
-
});
|
|
11456
|
-
|
|
11457
|
-
case 3:
|
|
11458
|
-
_yield$this$patch = _context76.sent;
|
|
11459
|
-
campaign = _yield$this$patch.campaign;
|
|
11460
|
-
return _context76.abrupt("return", campaign);
|
|
11927
|
+
}));
|
|
11461
11928
|
|
|
11462
|
-
case
|
|
11929
|
+
case 2:
|
|
11463
11930
|
case "end":
|
|
11464
11931
|
return _context76.stop();
|
|
11465
11932
|
}
|
|
@@ -11467,39 +11934,38 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11467
11934
|
}, _callee76, this);
|
|
11468
11935
|
}));
|
|
11469
11936
|
|
|
11470
|
-
function
|
|
11471
|
-
return
|
|
11937
|
+
function startCampaign(_x109, _x110) {
|
|
11938
|
+
return _startCampaign.apply(this, arguments);
|
|
11472
11939
|
}
|
|
11473
11940
|
|
|
11474
|
-
return
|
|
11941
|
+
return startCampaign;
|
|
11475
11942
|
}()
|
|
11476
11943
|
/**
|
|
11477
|
-
*
|
|
11944
|
+
* queryCampaigns - Query Campaigns
|
|
11478
11945
|
*
|
|
11479
|
-
* @param {string} id Campaign ID
|
|
11480
11946
|
*
|
|
11481
|
-
* @return {Campaign}
|
|
11947
|
+
* @return {Campaign[]} Campaigns
|
|
11482
11948
|
*/
|
|
11483
11949
|
|
|
11484
11950
|
}, {
|
|
11485
|
-
key: "
|
|
11951
|
+
key: "queryCampaigns",
|
|
11486
11952
|
value: function () {
|
|
11487
|
-
var
|
|
11488
|
-
var _yield$this$patch2, campaign;
|
|
11489
|
-
|
|
11953
|
+
var _queryCampaigns = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee77(filter, sort, options) {
|
|
11490
11954
|
return _regeneratorRuntime.wrap(function _callee77$(_context77) {
|
|
11491
11955
|
while (1) {
|
|
11492
11956
|
switch (_context77.prev = _context77.next) {
|
|
11493
11957
|
case 0:
|
|
11494
|
-
|
|
11495
|
-
|
|
11958
|
+
this.validateServerSideAuth();
|
|
11959
|
+
_context77.next = 3;
|
|
11960
|
+
return this.post(this.baseURL + "/campaigns/query", _objectSpread({
|
|
11961
|
+
filter: filter,
|
|
11962
|
+
sort: sort
|
|
11963
|
+
}, options || {}));
|
|
11496
11964
|
|
|
11497
|
-
case
|
|
11498
|
-
|
|
11499
|
-
campaign = _yield$this$patch2.campaign;
|
|
11500
|
-
return _context77.abrupt("return", campaign);
|
|
11965
|
+
case 3:
|
|
11966
|
+
return _context77.abrupt("return", _context77.sent);
|
|
11501
11967
|
|
|
11502
|
-
case
|
|
11968
|
+
case 4:
|
|
11503
11969
|
case "end":
|
|
11504
11970
|
return _context77.stop();
|
|
11505
11971
|
}
|
|
@@ -11507,39 +11973,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11507
11973
|
}, _callee77, this);
|
|
11508
11974
|
}));
|
|
11509
11975
|
|
|
11510
|
-
function
|
|
11511
|
-
return
|
|
11976
|
+
function queryCampaigns(_x111, _x112, _x113) {
|
|
11977
|
+
return _queryCampaigns.apply(this, arguments);
|
|
11512
11978
|
}
|
|
11513
11979
|
|
|
11514
|
-
return
|
|
11980
|
+
return queryCampaigns;
|
|
11515
11981
|
}()
|
|
11516
11982
|
/**
|
|
11517
|
-
*
|
|
11983
|
+
* updateCampaign - Update a Campaign
|
|
11518
11984
|
*
|
|
11519
11985
|
* @param {string} id Campaign ID
|
|
11986
|
+
* @param {Partial<CampaignData>} params Campaign data
|
|
11520
11987
|
*
|
|
11521
|
-
* @return {Campaign}
|
|
11988
|
+
* @return {Campaign} Updated Campaign
|
|
11522
11989
|
*/
|
|
11523
11990
|
|
|
11524
11991
|
}, {
|
|
11525
|
-
key: "
|
|
11992
|
+
key: "updateCampaign",
|
|
11526
11993
|
value: function () {
|
|
11527
|
-
var
|
|
11528
|
-
var _yield$this$patch3, campaign;
|
|
11529
|
-
|
|
11994
|
+
var _updateCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78(id, params) {
|
|
11530
11995
|
return _regeneratorRuntime.wrap(function _callee78$(_context78) {
|
|
11531
11996
|
while (1) {
|
|
11532
11997
|
switch (_context78.prev = _context78.next) {
|
|
11533
11998
|
case 0:
|
|
11534
|
-
|
|
11535
|
-
return this.
|
|
11999
|
+
this.validateServerSideAuth();
|
|
12000
|
+
return _context78.abrupt("return", this.put(this.baseURL + "/campaigns/".concat(id), params));
|
|
11536
12001
|
|
|
11537
12002
|
case 2:
|
|
11538
|
-
_yield$this$patch3 = _context78.sent;
|
|
11539
|
-
campaign = _yield$this$patch3.campaign;
|
|
11540
|
-
return _context78.abrupt("return", campaign);
|
|
11541
|
-
|
|
11542
|
-
case 5:
|
|
11543
12003
|
case "end":
|
|
11544
12004
|
return _context78.stop();
|
|
11545
12005
|
}
|
|
@@ -11547,40 +12007,32 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11547
12007
|
}, _callee78, this);
|
|
11548
12008
|
}));
|
|
11549
12009
|
|
|
11550
|
-
function
|
|
11551
|
-
return
|
|
12010
|
+
function updateCampaign(_x114, _x115) {
|
|
12011
|
+
return _updateCampaign.apply(this, arguments);
|
|
11552
12012
|
}
|
|
11553
12013
|
|
|
11554
|
-
return
|
|
12014
|
+
return updateCampaign;
|
|
11555
12015
|
}()
|
|
11556
12016
|
/**
|
|
11557
|
-
*
|
|
12017
|
+
* deleteCampaign - Delete a Campaign
|
|
11558
12018
|
*
|
|
11559
12019
|
* @param {string} id Campaign ID
|
|
11560
|
-
* @param {{users: string[]}} params Test params
|
|
11561
12020
|
*
|
|
11562
|
-
* @return {
|
|
12021
|
+
* @return {Promise<APIResponse>} The Server Response
|
|
11563
12022
|
*/
|
|
11564
12023
|
|
|
11565
12024
|
}, {
|
|
11566
|
-
key: "
|
|
12025
|
+
key: "deleteCampaign",
|
|
11567
12026
|
value: function () {
|
|
11568
|
-
var
|
|
11569
|
-
var users;
|
|
12027
|
+
var _deleteCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79(id) {
|
|
11570
12028
|
return _regeneratorRuntime.wrap(function _callee79$(_context79) {
|
|
11571
12029
|
while (1) {
|
|
11572
12030
|
switch (_context79.prev = _context79.next) {
|
|
11573
12031
|
case 0:
|
|
11574
|
-
|
|
11575
|
-
_context79.
|
|
11576
|
-
return this.post(this.baseURL + "/campaigns/".concat(id, "/test"), {
|
|
11577
|
-
users: users
|
|
11578
|
-
});
|
|
12032
|
+
this.validateServerSideAuth();
|
|
12033
|
+
return _context79.abrupt("return", this.delete(this.baseURL + "/campaigns/".concat(id)));
|
|
11579
12034
|
|
|
11580
|
-
case
|
|
11581
|
-
return _context79.abrupt("return", _context79.sent);
|
|
11582
|
-
|
|
11583
|
-
case 4:
|
|
12035
|
+
case 2:
|
|
11584
12036
|
case "end":
|
|
11585
12037
|
return _context79.stop();
|
|
11586
12038
|
}
|
|
@@ -11588,11 +12040,52 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11588
12040
|
}, _callee79, this);
|
|
11589
12041
|
}));
|
|
11590
12042
|
|
|
11591
|
-
function
|
|
11592
|
-
return
|
|
12043
|
+
function deleteCampaign(_x116) {
|
|
12044
|
+
return _deleteCampaign.apply(this, arguments);
|
|
12045
|
+
}
|
|
12046
|
+
|
|
12047
|
+
return deleteCampaign;
|
|
12048
|
+
}()
|
|
12049
|
+
/**
|
|
12050
|
+
* stopCampaign - Stop a Campaign
|
|
12051
|
+
*
|
|
12052
|
+
* @param {string} id Campaign ID
|
|
12053
|
+
*
|
|
12054
|
+
* @return {Campaign} Stopped Campaign
|
|
12055
|
+
*/
|
|
12056
|
+
|
|
12057
|
+
}, {
|
|
12058
|
+
key: "stopCampaign",
|
|
12059
|
+
value: function () {
|
|
12060
|
+
var _stopCampaign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee80(id) {
|
|
12061
|
+
var _yield$this$patch, campaign;
|
|
12062
|
+
|
|
12063
|
+
return _regeneratorRuntime.wrap(function _callee80$(_context80) {
|
|
12064
|
+
while (1) {
|
|
12065
|
+
switch (_context80.prev = _context80.next) {
|
|
12066
|
+
case 0:
|
|
12067
|
+
this.validateServerSideAuth();
|
|
12068
|
+
_context80.next = 3;
|
|
12069
|
+
return this.patch(this.baseURL + "/campaigns/".concat(id, "/stop"));
|
|
12070
|
+
|
|
12071
|
+
case 3:
|
|
12072
|
+
_yield$this$patch = _context80.sent;
|
|
12073
|
+
campaign = _yield$this$patch.campaign;
|
|
12074
|
+
return _context80.abrupt("return", campaign);
|
|
12075
|
+
|
|
12076
|
+
case 6:
|
|
12077
|
+
case "end":
|
|
12078
|
+
return _context80.stop();
|
|
12079
|
+
}
|
|
12080
|
+
}
|
|
12081
|
+
}, _callee80, this);
|
|
12082
|
+
}));
|
|
12083
|
+
|
|
12084
|
+
function stopCampaign(_x117) {
|
|
12085
|
+
return _stopCampaign.apply(this, arguments);
|
|
11593
12086
|
}
|
|
11594
12087
|
|
|
11595
|
-
return
|
|
12088
|
+
return stopCampaign;
|
|
11596
12089
|
}()
|
|
11597
12090
|
/**
|
|
11598
12091
|
* enrichURL - Get OpenGraph data of the given link
|
|
@@ -11604,24 +12097,24 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11604
12097
|
}, {
|
|
11605
12098
|
key: "enrichURL",
|
|
11606
12099
|
value: function () {
|
|
11607
|
-
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11608
|
-
return _regeneratorRuntime.wrap(function
|
|
12100
|
+
var _enrichURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee81(url) {
|
|
12101
|
+
return _regeneratorRuntime.wrap(function _callee81$(_context81) {
|
|
11609
12102
|
while (1) {
|
|
11610
|
-
switch (
|
|
12103
|
+
switch (_context81.prev = _context81.next) {
|
|
11611
12104
|
case 0:
|
|
11612
|
-
return
|
|
12105
|
+
return _context81.abrupt("return", this.get(this.baseURL + "/og", {
|
|
11613
12106
|
url: url
|
|
11614
12107
|
}));
|
|
11615
12108
|
|
|
11616
12109
|
case 1:
|
|
11617
12110
|
case "end":
|
|
11618
|
-
return
|
|
12111
|
+
return _context81.stop();
|
|
11619
12112
|
}
|
|
11620
12113
|
}
|
|
11621
|
-
},
|
|
12114
|
+
}, _callee81, this);
|
|
11622
12115
|
}));
|
|
11623
12116
|
|
|
11624
|
-
function enrichURL(
|
|
12117
|
+
function enrichURL(_x118) {
|
|
11625
12118
|
return _enrichURL.apply(this, arguments);
|
|
11626
12119
|
}
|
|
11627
12120
|
|
|
@@ -11638,22 +12131,22 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11638
12131
|
}, {
|
|
11639
12132
|
key: "getTask",
|
|
11640
12133
|
value: function () {
|
|
11641
|
-
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11642
|
-
return _regeneratorRuntime.wrap(function
|
|
12134
|
+
var _getTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee82(id) {
|
|
12135
|
+
return _regeneratorRuntime.wrap(function _callee82$(_context82) {
|
|
11643
12136
|
while (1) {
|
|
11644
|
-
switch (
|
|
12137
|
+
switch (_context82.prev = _context82.next) {
|
|
11645
12138
|
case 0:
|
|
11646
|
-
return
|
|
12139
|
+
return _context82.abrupt("return", this.get("".concat(this.baseURL, "/tasks/").concat(id)));
|
|
11647
12140
|
|
|
11648
12141
|
case 1:
|
|
11649
12142
|
case "end":
|
|
11650
|
-
return
|
|
12143
|
+
return _context82.stop();
|
|
11651
12144
|
}
|
|
11652
12145
|
}
|
|
11653
|
-
},
|
|
12146
|
+
}, _callee82, this);
|
|
11654
12147
|
}));
|
|
11655
12148
|
|
|
11656
|
-
function getTask(
|
|
12149
|
+
function getTask(_x119) {
|
|
11657
12150
|
return _getTask.apply(this, arguments);
|
|
11658
12151
|
}
|
|
11659
12152
|
|
|
@@ -11671,31 +12164,31 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11671
12164
|
}, {
|
|
11672
12165
|
key: "deleteChannels",
|
|
11673
12166
|
value: function () {
|
|
11674
|
-
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12167
|
+
var _deleteChannels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee83(cids) {
|
|
11675
12168
|
var options,
|
|
11676
|
-
|
|
11677
|
-
return _regeneratorRuntime.wrap(function
|
|
12169
|
+
_args83 = arguments;
|
|
12170
|
+
return _regeneratorRuntime.wrap(function _callee83$(_context83) {
|
|
11678
12171
|
while (1) {
|
|
11679
|
-
switch (
|
|
12172
|
+
switch (_context83.prev = _context83.next) {
|
|
11680
12173
|
case 0:
|
|
11681
|
-
options =
|
|
11682
|
-
|
|
12174
|
+
options = _args83.length > 1 && _args83[1] !== undefined ? _args83[1] : {};
|
|
12175
|
+
_context83.next = 3;
|
|
11683
12176
|
return this.post(this.baseURL + "/channels/delete", _objectSpread({
|
|
11684
12177
|
cids: cids
|
|
11685
12178
|
}, options));
|
|
11686
12179
|
|
|
11687
12180
|
case 3:
|
|
11688
|
-
return
|
|
12181
|
+
return _context83.abrupt("return", _context83.sent);
|
|
11689
12182
|
|
|
11690
12183
|
case 4:
|
|
11691
12184
|
case "end":
|
|
11692
|
-
return
|
|
12185
|
+
return _context83.stop();
|
|
11693
12186
|
}
|
|
11694
12187
|
}
|
|
11695
|
-
},
|
|
12188
|
+
}, _callee83, this);
|
|
11696
12189
|
}));
|
|
11697
12190
|
|
|
11698
|
-
function deleteChannels(
|
|
12191
|
+
function deleteChannels(_x120) {
|
|
11699
12192
|
return _deleteChannels.apply(this, arguments);
|
|
11700
12193
|
}
|
|
11701
12194
|
|
|
@@ -11713,17 +12206,17 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11713
12206
|
}, {
|
|
11714
12207
|
key: "deleteUsers",
|
|
11715
12208
|
value: function () {
|
|
11716
|
-
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12209
|
+
var _deleteUsers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee84(user_ids) {
|
|
11717
12210
|
var options,
|
|
11718
|
-
|
|
11719
|
-
return _regeneratorRuntime.wrap(function
|
|
12211
|
+
_args84 = arguments;
|
|
12212
|
+
return _regeneratorRuntime.wrap(function _callee84$(_context84) {
|
|
11720
12213
|
while (1) {
|
|
11721
|
-
switch (
|
|
12214
|
+
switch (_context84.prev = _context84.next) {
|
|
11722
12215
|
case 0:
|
|
11723
|
-
options =
|
|
12216
|
+
options = _args84.length > 1 && _args84[1] !== undefined ? _args84[1] : {};
|
|
11724
12217
|
|
|
11725
12218
|
if (!(typeof options.user !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.user))) {
|
|
11726
|
-
|
|
12219
|
+
_context84.next = 3;
|
|
11727
12220
|
break;
|
|
11728
12221
|
}
|
|
11729
12222
|
|
|
@@ -11731,7 +12224,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11731
12224
|
|
|
11732
12225
|
case 3:
|
|
11733
12226
|
if (!(typeof options.conversations !== 'undefined' && !['soft', 'hard'].includes(options.conversations))) {
|
|
11734
|
-
|
|
12227
|
+
_context84.next = 5;
|
|
11735
12228
|
break;
|
|
11736
12229
|
}
|
|
11737
12230
|
|
|
@@ -11739,30 +12232,30 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11739
12232
|
|
|
11740
12233
|
case 5:
|
|
11741
12234
|
if (!(typeof options.messages !== 'undefined' && !['soft', 'hard', 'pruning'].includes(options.messages))) {
|
|
11742
|
-
|
|
12235
|
+
_context84.next = 7;
|
|
11743
12236
|
break;
|
|
11744
12237
|
}
|
|
11745
12238
|
|
|
11746
12239
|
throw new Error('Invalid delete user options. messages must be one of [soft hard pruning]');
|
|
11747
12240
|
|
|
11748
12241
|
case 7:
|
|
11749
|
-
|
|
12242
|
+
_context84.next = 9;
|
|
11750
12243
|
return this.post(this.baseURL + "/users/delete", _objectSpread({
|
|
11751
12244
|
user_ids: user_ids
|
|
11752
12245
|
}, options));
|
|
11753
12246
|
|
|
11754
12247
|
case 9:
|
|
11755
|
-
return
|
|
12248
|
+
return _context84.abrupt("return", _context84.sent);
|
|
11756
12249
|
|
|
11757
12250
|
case 10:
|
|
11758
12251
|
case "end":
|
|
11759
|
-
return
|
|
12252
|
+
return _context84.stop();
|
|
11760
12253
|
}
|
|
11761
12254
|
}
|
|
11762
|
-
},
|
|
12255
|
+
}, _callee84, this);
|
|
11763
12256
|
}));
|
|
11764
12257
|
|
|
11765
|
-
function deleteUsers(
|
|
12258
|
+
function deleteUsers(_x121) {
|
|
11766
12259
|
return _deleteUsers.apply(this, arguments);
|
|
11767
12260
|
}
|
|
11768
12261
|
|
|
@@ -11783,28 +12276,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11783
12276
|
}, {
|
|
11784
12277
|
key: "_createImportURL",
|
|
11785
12278
|
value: function () {
|
|
11786
|
-
var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11787
|
-
return _regeneratorRuntime.wrap(function
|
|
12279
|
+
var _createImportURL2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee85(filename) {
|
|
12280
|
+
return _regeneratorRuntime.wrap(function _callee85$(_context85) {
|
|
11788
12281
|
while (1) {
|
|
11789
|
-
switch (
|
|
12282
|
+
switch (_context85.prev = _context85.next) {
|
|
11790
12283
|
case 0:
|
|
11791
|
-
|
|
12284
|
+
_context85.next = 2;
|
|
11792
12285
|
return this.post(this.baseURL + "/import_urls", {
|
|
11793
12286
|
filename: filename
|
|
11794
12287
|
});
|
|
11795
12288
|
|
|
11796
12289
|
case 2:
|
|
11797
|
-
return
|
|
12290
|
+
return _context85.abrupt("return", _context85.sent);
|
|
11798
12291
|
|
|
11799
12292
|
case 3:
|
|
11800
12293
|
case "end":
|
|
11801
|
-
return
|
|
12294
|
+
return _context85.stop();
|
|
11802
12295
|
}
|
|
11803
12296
|
}
|
|
11804
|
-
},
|
|
12297
|
+
}, _callee85, this);
|
|
11805
12298
|
}));
|
|
11806
12299
|
|
|
11807
|
-
function _createImportURL(
|
|
12300
|
+
function _createImportURL(_x122) {
|
|
11808
12301
|
return _createImportURL2.apply(this, arguments);
|
|
11809
12302
|
}
|
|
11810
12303
|
|
|
@@ -11826,33 +12319,33 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11826
12319
|
}, {
|
|
11827
12320
|
key: "_createImport",
|
|
11828
12321
|
value: function () {
|
|
11829
|
-
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12322
|
+
var _createImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee86(path) {
|
|
11830
12323
|
var options,
|
|
11831
|
-
|
|
11832
|
-
return _regeneratorRuntime.wrap(function
|
|
12324
|
+
_args86 = arguments;
|
|
12325
|
+
return _regeneratorRuntime.wrap(function _callee86$(_context86) {
|
|
11833
12326
|
while (1) {
|
|
11834
|
-
switch (
|
|
12327
|
+
switch (_context86.prev = _context86.next) {
|
|
11835
12328
|
case 0:
|
|
11836
|
-
options =
|
|
12329
|
+
options = _args86.length > 1 && _args86[1] !== undefined ? _args86[1] : {
|
|
11837
12330
|
mode: 'upsert'
|
|
11838
12331
|
};
|
|
11839
|
-
|
|
12332
|
+
_context86.next = 3;
|
|
11840
12333
|
return this.post(this.baseURL + "/imports", _objectSpread({
|
|
11841
12334
|
path: path
|
|
11842
12335
|
}, options));
|
|
11843
12336
|
|
|
11844
12337
|
case 3:
|
|
11845
|
-
return
|
|
12338
|
+
return _context86.abrupt("return", _context86.sent);
|
|
11846
12339
|
|
|
11847
12340
|
case 4:
|
|
11848
12341
|
case "end":
|
|
11849
|
-
return
|
|
12342
|
+
return _context86.stop();
|
|
11850
12343
|
}
|
|
11851
12344
|
}
|
|
11852
|
-
},
|
|
12345
|
+
}, _callee86, this);
|
|
11853
12346
|
}));
|
|
11854
12347
|
|
|
11855
|
-
function _createImport(
|
|
12348
|
+
function _createImport(_x123) {
|
|
11856
12349
|
return _createImport2.apply(this, arguments);
|
|
11857
12350
|
}
|
|
11858
12351
|
|
|
@@ -11874,26 +12367,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11874
12367
|
}, {
|
|
11875
12368
|
key: "_getImport",
|
|
11876
12369
|
value: function () {
|
|
11877
|
-
var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11878
|
-
return _regeneratorRuntime.wrap(function
|
|
12370
|
+
var _getImport2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee87(id) {
|
|
12371
|
+
return _regeneratorRuntime.wrap(function _callee87$(_context87) {
|
|
11879
12372
|
while (1) {
|
|
11880
|
-
switch (
|
|
12373
|
+
switch (_context87.prev = _context87.next) {
|
|
11881
12374
|
case 0:
|
|
11882
|
-
|
|
12375
|
+
_context87.next = 2;
|
|
11883
12376
|
return this.get(this.baseURL + "/imports/".concat(id));
|
|
11884
12377
|
|
|
11885
12378
|
case 2:
|
|
11886
|
-
return
|
|
12379
|
+
return _context87.abrupt("return", _context87.sent);
|
|
11887
12380
|
|
|
11888
12381
|
case 3:
|
|
11889
12382
|
case "end":
|
|
11890
|
-
return
|
|
12383
|
+
return _context87.stop();
|
|
11891
12384
|
}
|
|
11892
12385
|
}
|
|
11893
|
-
},
|
|
12386
|
+
}, _callee87, this);
|
|
11894
12387
|
}));
|
|
11895
12388
|
|
|
11896
|
-
function _getImport(
|
|
12389
|
+
function _getImport(_x124) {
|
|
11897
12390
|
return _getImport2.apply(this, arguments);
|
|
11898
12391
|
}
|
|
11899
12392
|
|
|
@@ -11915,26 +12408,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11915
12408
|
}, {
|
|
11916
12409
|
key: "_listImports",
|
|
11917
12410
|
value: function () {
|
|
11918
|
-
var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11919
|
-
return _regeneratorRuntime.wrap(function
|
|
12411
|
+
var _listImports2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee88(options) {
|
|
12412
|
+
return _regeneratorRuntime.wrap(function _callee88$(_context88) {
|
|
11920
12413
|
while (1) {
|
|
11921
|
-
switch (
|
|
12414
|
+
switch (_context88.prev = _context88.next) {
|
|
11922
12415
|
case 0:
|
|
11923
|
-
|
|
12416
|
+
_context88.next = 2;
|
|
11924
12417
|
return this.get(this.baseURL + "/imports", options);
|
|
11925
12418
|
|
|
11926
12419
|
case 2:
|
|
11927
|
-
return
|
|
12420
|
+
return _context88.abrupt("return", _context88.sent);
|
|
11928
12421
|
|
|
11929
12422
|
case 3:
|
|
11930
12423
|
case "end":
|
|
11931
|
-
return
|
|
12424
|
+
return _context88.stop();
|
|
11932
12425
|
}
|
|
11933
12426
|
}
|
|
11934
|
-
},
|
|
12427
|
+
}, _callee88, this);
|
|
11935
12428
|
}));
|
|
11936
12429
|
|
|
11937
|
-
function _listImports(
|
|
12430
|
+
function _listImports(_x125) {
|
|
11938
12431
|
return _listImports2.apply(this, arguments);
|
|
11939
12432
|
}
|
|
11940
12433
|
|
|
@@ -11953,28 +12446,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11953
12446
|
}, {
|
|
11954
12447
|
key: "upsertPushProvider",
|
|
11955
12448
|
value: function () {
|
|
11956
|
-
var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
11957
|
-
return _regeneratorRuntime.wrap(function
|
|
12449
|
+
var _upsertPushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee89(pushProvider) {
|
|
12450
|
+
return _regeneratorRuntime.wrap(function _callee89$(_context89) {
|
|
11958
12451
|
while (1) {
|
|
11959
|
-
switch (
|
|
12452
|
+
switch (_context89.prev = _context89.next) {
|
|
11960
12453
|
case 0:
|
|
11961
|
-
|
|
12454
|
+
_context89.next = 2;
|
|
11962
12455
|
return this.post(this.baseURL + "/push_providers", {
|
|
11963
12456
|
push_provider: pushProvider
|
|
11964
12457
|
});
|
|
11965
12458
|
|
|
11966
12459
|
case 2:
|
|
11967
|
-
return
|
|
12460
|
+
return _context89.abrupt("return", _context89.sent);
|
|
11968
12461
|
|
|
11969
12462
|
case 3:
|
|
11970
12463
|
case "end":
|
|
11971
|
-
return
|
|
12464
|
+
return _context89.stop();
|
|
11972
12465
|
}
|
|
11973
12466
|
}
|
|
11974
|
-
},
|
|
12467
|
+
}, _callee89, this);
|
|
11975
12468
|
}));
|
|
11976
12469
|
|
|
11977
|
-
function upsertPushProvider(
|
|
12470
|
+
function upsertPushProvider(_x126) {
|
|
11978
12471
|
return _upsertPushProvider.apply(this, arguments);
|
|
11979
12472
|
}
|
|
11980
12473
|
|
|
@@ -11993,28 +12486,28 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
11993
12486
|
}, {
|
|
11994
12487
|
key: "deletePushProvider",
|
|
11995
12488
|
value: function () {
|
|
11996
|
-
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12489
|
+
var _deletePushProvider = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee90(_ref10) {
|
|
11997
12490
|
var type, name;
|
|
11998
|
-
return _regeneratorRuntime.wrap(function
|
|
12491
|
+
return _regeneratorRuntime.wrap(function _callee90$(_context90) {
|
|
11999
12492
|
while (1) {
|
|
12000
|
-
switch (
|
|
12493
|
+
switch (_context90.prev = _context90.next) {
|
|
12001
12494
|
case 0:
|
|
12002
12495
|
type = _ref10.type, name = _ref10.name;
|
|
12003
|
-
|
|
12496
|
+
_context90.next = 3;
|
|
12004
12497
|
return this.delete(this.baseURL + "/push_providers/".concat(type, "/").concat(name));
|
|
12005
12498
|
|
|
12006
12499
|
case 3:
|
|
12007
|
-
return
|
|
12500
|
+
return _context90.abrupt("return", _context90.sent);
|
|
12008
12501
|
|
|
12009
12502
|
case 4:
|
|
12010
12503
|
case "end":
|
|
12011
|
-
return
|
|
12504
|
+
return _context90.stop();
|
|
12012
12505
|
}
|
|
12013
12506
|
}
|
|
12014
|
-
},
|
|
12507
|
+
}, _callee90, this);
|
|
12015
12508
|
}));
|
|
12016
12509
|
|
|
12017
|
-
function deletePushProvider(
|
|
12510
|
+
function deletePushProvider(_x127) {
|
|
12018
12511
|
return _deletePushProvider.apply(this, arguments);
|
|
12019
12512
|
}
|
|
12020
12513
|
|
|
@@ -12031,23 +12524,23 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12031
12524
|
}, {
|
|
12032
12525
|
key: "listPushProviders",
|
|
12033
12526
|
value: function () {
|
|
12034
|
-
var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12035
|
-
return _regeneratorRuntime.wrap(function
|
|
12527
|
+
var _listPushProviders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee91() {
|
|
12528
|
+
return _regeneratorRuntime.wrap(function _callee91$(_context91) {
|
|
12036
12529
|
while (1) {
|
|
12037
|
-
switch (
|
|
12530
|
+
switch (_context91.prev = _context91.next) {
|
|
12038
12531
|
case 0:
|
|
12039
|
-
|
|
12532
|
+
_context91.next = 2;
|
|
12040
12533
|
return this.get(this.baseURL + "/push_providers");
|
|
12041
12534
|
|
|
12042
12535
|
case 2:
|
|
12043
|
-
return
|
|
12536
|
+
return _context91.abrupt("return", _context91.sent);
|
|
12044
12537
|
|
|
12045
12538
|
case 3:
|
|
12046
12539
|
case "end":
|
|
12047
|
-
return
|
|
12540
|
+
return _context91.stop();
|
|
12048
12541
|
}
|
|
12049
12542
|
}
|
|
12050
|
-
},
|
|
12543
|
+
}, _callee91, this);
|
|
12051
12544
|
}));
|
|
12052
12545
|
|
|
12053
12546
|
function listPushProviders() {
|
|
@@ -12075,26 +12568,26 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
12075
12568
|
}, {
|
|
12076
12569
|
key: "commitMessage",
|
|
12077
12570
|
value: function () {
|
|
12078
|
-
var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
12079
|
-
return _regeneratorRuntime.wrap(function
|
|
12571
|
+
var _commitMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee92(id) {
|
|
12572
|
+
return _regeneratorRuntime.wrap(function _callee92$(_context92) {
|
|
12080
12573
|
while (1) {
|
|
12081
|
-
switch (
|
|
12574
|
+
switch (_context92.prev = _context92.next) {
|
|
12082
12575
|
case 0:
|
|
12083
|
-
|
|
12576
|
+
_context92.next = 2;
|
|
12084
12577
|
return this.post(this.baseURL + "/messages/".concat(id, "/commit"));
|
|
12085
12578
|
|
|
12086
12579
|
case 2:
|
|
12087
|
-
return
|
|
12580
|
+
return _context92.abrupt("return", _context92.sent);
|
|
12088
12581
|
|
|
12089
12582
|
case 3:
|
|
12090
12583
|
case "end":
|
|
12091
|
-
return
|
|
12584
|
+
return _context92.stop();
|
|
12092
12585
|
}
|
|
12093
12586
|
}
|
|
12094
|
-
},
|
|
12587
|
+
}, _callee92, this);
|
|
12095
12588
|
}));
|
|
12096
12589
|
|
|
12097
|
-
function commitMessage(
|
|
12590
|
+
function commitMessage(_x128) {
|
|
12098
12591
|
return _commitMessage.apply(this, arguments);
|
|
12099
12592
|
}
|
|
12100
12593
|
|
|
@@ -12246,5 +12739,5 @@ var BuiltinPermissions = {
|
|
|
12246
12739
|
UseFrozenChannel: 'Send messages and reactions to frozen channels'
|
|
12247
12740
|
};
|
|
12248
12741
|
|
|
12249
|
-
export { Allow, AllowAll, AnyResource, AnyRole, BuiltinPermissions, BuiltinRoles, Channel, ChannelState, CheckSignature, ClientState, Deny, DenyAll, DevToken, EVENT_MAP, ErrorFromResponse, InsightMetrics, JWTServerToken, JWTUserToken, MaxPriority, MinPriority, Permission, StableWSConnection, StreamChat, Thread, TokenManager, UserFromToken, buildWsFatalInsight, buildWsSuccessAfterFailureInsight, chatCodes, decodeBase64, encodeBase64, formatMessage, isOwnUser, logChatPromiseExecution, postInsights };
|
|
12742
|
+
export { Allow, AllowAll, AnyResource, AnyRole, BuiltinPermissions, BuiltinRoles, Campaign, Channel, ChannelState, CheckSignature, ClientState, Deny, DenyAll, DevToken, EVENT_MAP, ErrorFromResponse, InsightMetrics, JWTServerToken, JWTUserToken, MaxPriority, MinPriority, Permission, Segment, StableWSConnection, StreamChat, Thread, TokenManager, UserFromToken, buildWsFatalInsight, buildWsSuccessAfterFailureInsight, chatCodes, decodeBase64, encodeBase64, formatMessage, isOwnUser, logChatPromiseExecution, postInsights };
|
|
12250
12743
|
//# sourceMappingURL=browser.es.js.map
|