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